-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1376 from terrestris/dev-deps
Update Eslint to v9
- Loading branch information
Showing
14 changed files
with
4,091 additions
and
2,078 deletions.
There are no files selected for viewing
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
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,67 @@ | ||
// @ts-check | ||
import globals from 'globals'; | ||
import importPlugin from 'eslint-plugin-import'; | ||
import eslintTerrestris from '@terrestris/eslint-config-typescript'; | ||
import eslint from '@eslint/js'; | ||
import tsEslint from 'typescript-eslint'; | ||
import stylisticEslint from '@stylistic/eslint-plugin' | ||
|
||
export default tsEslint.config({ | ||
extends: [ | ||
eslint.configs.recommended, | ||
...tsEslint.configs.recommended, | ||
...tsEslint.configs.stylistic, | ||
importPlugin.flatConfigs.recommended | ||
], | ||
files: [ | ||
'**/*.ts' | ||
], | ||
ignores: [ | ||
'**/*.spec.ts', | ||
'**/jest/__mocks__/*.ts' | ||
], | ||
languageOptions: { | ||
ecmaVersion: 2022, | ||
globals: globals.browser, | ||
parserOptions: { | ||
project: true, | ||
tsconfigRootDir: import.meta.dirname | ||
}, | ||
}, | ||
plugins: { | ||
'@stylistic': stylisticEslint | ||
}, | ||
rules: { | ||
...eslintTerrestris.rules, | ||
'@typescript-eslint/member-ordering': 'off', | ||
'@typescript-eslint/no-empty-object-type': 'off', | ||
'@typescript-eslint/no-unused-vars': 'warn', | ||
'import/no-unresolved': 'off', | ||
'import/named': 'off', | ||
'import/order': ['warn', { | ||
groups: [ | ||
'builtin', | ||
'external', | ||
'parent', | ||
'sibling', | ||
'index', | ||
'object' | ||
], | ||
pathGroups: [{ | ||
pattern: 'react', | ||
group: 'external', | ||
position: 'before' | ||
}, { | ||
pattern: '@terrestris/**', | ||
group: 'external', | ||
position: 'after' | ||
}], | ||
pathGroupsExcludedImportTypes: ['react'], | ||
'newlines-between': 'always-and-inside-groups', | ||
alphabetize: { | ||
order: 'asc', | ||
caseInsensitive: true | ||
} | ||
}] | ||
} | ||
}); |
Oops, something went wrong.