Skip to content

chore(deps): update @yarnpkg/eslint-config to 3.0.0 #669

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"**/.yarn": true,
"**/.pnp.*": true
},
"eslint.experimental.useFlatConfig": true,
"eslint.useFlatConfig": true,
"eslint.nodePath": ".yarn/sdks",
"typescript.enablePromptUseWorkspaceTsdk": true,
"editor.codeActionsOnSave": {
Expand Down
3 changes: 3 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ export default [
name: `fetch`,
message: `Use fetch from sources/httpUtils.ts`,
}],
'@typescript-eslint/no-unused-vars': [`error`, {
caughtErrors: `none`,
}],
},
},
];
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"@types/proxy-from-env": "^1",
"@types/semver": "^7.1.0",
"@types/which": "^3.0.0",
"@yarnpkg/eslint-config": "^2.0.0",
"@yarnpkg/eslint-config": "^3.0.0",
"@yarnpkg/fslib": "^3.0.0-rc.48",
"@zkochan/cmd-shim": "^6.0.0",
"better-sqlite3": "^11.7.2",
Expand Down
8 changes: 4 additions & 4 deletions sources/specUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,15 @@ export function parseSpec(raw: unknown, source: string, {enforceExactVersion = t

type CorepackPackageJSON = {
packageManager?: string;
devEngines?: { packageManager?: DevEngineDependency };
devEngines?: {packageManager?: DevEngineDependency};
};

interface DevEngineDependency {
name: string;
version: string;
onFail?: 'ignore' | 'warn' | 'error';
onFail?: `ignore` | `warn` | `error`;
}
function warnOrThrow(errorMessage: string, onFail?: DevEngineDependency['onFail']) {
function warnOrThrow(errorMessage: string, onFail?: DevEngineDependency[`onFail`]) {
switch (onFail) {
case `ignore`:
break;
Expand Down Expand Up @@ -151,7 +151,7 @@ interface FoundSpecResult {
type: `Found`;
target: string;
getSpec: () => Descriptor;
range?: Descriptor & {onFail?: DevEngineDependency['onFail']};
range?: Descriptor & {onFail?: DevEngineDependency[`onFail`]};
envFilePath?: string;
}
export type LoadSpecResult =
Expand Down
Loading