-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(eslint-plugin-experience): conflicts with typescript-eslint parse…
…r v6 and import plugin
- Loading branch information
Showing
4 changed files
with
13 additions
and
66 deletions.
There are no files selected for viewing
42 changes: 13 additions & 29 deletions
42
projects/eslint-plugin-experience/configs/angular/imports/index.js
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,39 +1,23 @@ | ||
module.exports = { | ||
parser: '@typescript-eslint/parser', | ||
plugins: [ | ||
'import', | ||
'@typescript-eslint', | ||
'simple-import-sort', | ||
'eslint-plugin-import', | ||
], | ||
settings: { | ||
'import/parsers': {'@typescript-eslint/parser': ['.ts']}, | ||
'import/resolver': { | ||
'eslint-import-resolver-typescript': true, | ||
typescript: { | ||
// always try to resolve types under `<root>@types` directory | ||
// even it doesn't contain any source code, like `@types/etc` | ||
alwaysTryTypes: true, | ||
}, | ||
}, | ||
}, | ||
plugins: ['import', 'simple-import-sort'], | ||
rules: { | ||
'simple-import-sort/imports': 'error', | ||
'simple-import-sort/exports': 'error', | ||
'import/first': 'error', | ||
'import/exports-last': 'off', | ||
'import/no-default-export': 'off', | ||
'import/newline-after-import': ['error', {count: 1}], | ||
'import/no-webpack-loader-syntax': 'off', | ||
/** | ||
* @note: note you must disable the base rule | ||
* as it can report incorrect errors in @typescript-eslint | ||
*/ | ||
'import/no-duplicates': 'off', | ||
'import/extensions': 'off', | ||
'import/prefer-default-export': 'off', | ||
'import/no-extraneous-dependencies': 'off', | ||
'import/no-unresolved': 'off', | ||
'no-duplicate-imports': 'off', | ||
'@typescript-eslint/no-duplicate-imports': 'error', | ||
|
||
// overwrite rule from `@tinkoff/eslint-config` | ||
'@typescript-eslint/consistent-type-imports': 'off', | ||
/** | ||
* @note: you must disable some base rule | ||
* as it can report incorrect errors with @typescript-eslint | ||
*/ | ||
'import/first': 'error', | ||
'import/newline-after-import': ['error', {count: 1}], | ||
'simple-import-sort/imports': 'error', | ||
'simple-import-sort/exports': 'error', | ||
}, | ||
}; |
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 was deleted.
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