-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(linter): use overrides in root eslint config
- Loading branch information
1 parent
cf7d779
commit cfea9ea
Showing
5 changed files
with
147 additions
and
26 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 |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/** | ||
* This configuration is intended to be applied to ALL .js and .jsx files | ||
* within an Nx workspace. | ||
* | ||
* It should therefore NOT contain any rules or plugins which are specific | ||
* to one ecosystem, such as React, Angular, Node etc. | ||
* | ||
* We use @typescript-eslint/parser rather than the built in JS parser | ||
* because that is what Nx ESLint configs have always done and we don't | ||
* want to change too much all at once. | ||
* | ||
* TODO: Evaluate switching to the built-in JS parser (espree) in Nx v11, | ||
* it should yield a performance improvement but could introduce subtle | ||
* breaking changes - we should also look to replace all the @typescript-eslint | ||
* related plugins and rules below. | ||
*/ | ||
export default { | ||
parser: '@typescript-eslint/parser', | ||
parserOptions: { | ||
ecmaVersion: 2020, | ||
sourceType: 'module', | ||
}, | ||
plugins: ['@typescript-eslint'], | ||
extends: [ | ||
'eslint:recommended', | ||
'plugin:@typescript-eslint/eslint-recommended', | ||
'plugin:@typescript-eslint/recommended', | ||
'prettier', | ||
'prettier/@typescript-eslint', | ||
], | ||
rules: { | ||
'@typescript-eslint/explicit-member-accessibility': 'off', | ||
'@typescript-eslint/explicit-module-boundary-types': 'off', | ||
'@typescript-eslint/explicit-function-return-type': 'off', | ||
'@typescript-eslint/no-parameter-properties': 'off', | ||
}, | ||
}; |
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
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