-
Notifications
You must be signed in to change notification settings - Fork 607
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(eslint-patch): automatic switching between ESLint version patches
- Loading branch information
1 parent
738aec7
commit ec1fc14
Showing
26 changed files
with
993 additions
and
409 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,31 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. | ||
// See LICENSE in the project root for license information. | ||
|
||
// This is a workaround for https://github.com/eslint/eslint/issues/3458 | ||
require('@rushstack/eslint-config/patch/modern-module-resolution'); | ||
require('@rushstack/eslint-config/patch/eslint-bulk-suppressions'); | ||
require('local-node-rig/profiles/default/includes/eslint/patch/modern-module-resolution'); | ||
// This is a workaround for https://github.com/microsoft/rushstack/issues/3021 | ||
require('local-node-rig/profiles/default/includes/eslint/patch/custom-config-package-names'); | ||
require('local-node-rig/profiles/default/includes/eslint/patch/eslint-bulk-suppressions'); | ||
|
||
module.exports = { | ||
extends: ['plugin:@typescript-eslint/recommended'], | ||
parserOptions: { tsconfigRootDir: __dirname } | ||
extends: [ | ||
'local-node-rig/profiles/default/includes/eslint/profile/node-trusted-tool', | ||
'local-node-rig/profiles/default/includes/eslint/mixins/friendly-locals' | ||
], | ||
parserOptions: { tsconfigRootDir: __dirname }, | ||
|
||
overrides: [ | ||
/** | ||
* Override the parser from @rushstack/eslint-config. Since the config is coming | ||
* from the workspace instead of the external NPM package, the versions of ESLint | ||
* and TypeScript that the config consumes will be resolved from the devDependencies | ||
* of the config instead of from the eslint-8-test package. Overriding the parser | ||
* ensures that the these dependencies come from the eslint-8-test package. See: | ||
* https://github.com/microsoft/rushstack/issues/3021 | ||
*/ | ||
{ | ||
files: ['*.ts', '*.tsx'], | ||
parser: '@typescript-eslint/parser' | ||
} | ||
] | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{ | ||
"$schema": "http://json.schemastore.org/tsconfig", | ||
|
||
"compilerOptions": { | ||
"outDir": "lib", | ||
"rootDir": "src", | ||
"allowSyntheticDefaultImports": true, | ||
"forceConsistentCasingInFileNames": true, | ||
"declaration": true, | ||
"sourceMap": true, | ||
"declarationMap": true, | ||
"inlineSources": true, | ||
"experimentalDecorators": true, | ||
"strictNullChecks": true, | ||
"noUnusedLocals": true, | ||
|
||
"module": "esnext", | ||
"moduleResolution": "node", | ||
"target": "es5", | ||
"lib": ["es5"] | ||
}, | ||
"include": ["src/**/*.ts", "src/**/*.tsx"], | ||
"exclude": ["node_modules", "lib"] | ||
} |
1 change: 0 additions & 1 deletion
1
build-tests/install-test-workspace/workspace/common/pnpm-lock.yaml
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.