forked from nodejs/nodejs.org
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: create base eslint config (nodejs#7057)
* chore: create base eslint config * chore(eslint): remove typescript from base config * fix: ts parser * chore: remove typescript-eslint from root * chore: update package-lock.json
- Loading branch information
Showing
7 changed files
with
3,363 additions
and
3,735 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
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,53 @@ | ||
import js from '@eslint/js'; | ||
import importX from 'eslint-plugin-import-x'; | ||
import noRelativeImportPaths from 'eslint-plugin-no-relative-import-paths'; | ||
|
||
export default [ | ||
js.configs.recommended, | ||
importX.flatConfigs.recommended, | ||
{ | ||
ignores: [ | ||
'node_modules', | ||
'.turbo', | ||
'.next', | ||
'build', | ||
'coverage', | ||
'global.d.ts', | ||
'junit.xml', | ||
'storybook-static/**', | ||
], | ||
}, | ||
{ | ||
files: ['**/*.{js,mjs,ts,tsx}'], | ||
plugins: { | ||
'no-relative-import-paths': noRelativeImportPaths, | ||
}, | ||
rules: { | ||
'import-x/namespace': 'off', | ||
'import-x/no-named-as-default-member': 'off', | ||
'import-x/no-unresolved': 'off', | ||
'import-x/order': [ | ||
'error', | ||
{ | ||
groups: [ | ||
'builtin', | ||
'external', | ||
'internal', | ||
['sibling', 'parent'], | ||
'index', | ||
'unknown', | ||
], | ||
'newlines-between': 'always', | ||
alphabetize: { | ||
order: 'asc', | ||
caseInsensitive: true, | ||
}, | ||
}, | ||
], | ||
'no-relative-import-paths/no-relative-import-paths': [ | ||
'warn', | ||
{ allowSameFolder: true, prefix: '@' }, | ||
], | ||
}, | ||
}, | ||
]; |
Oops, something went wrong.