-
Notifications
You must be signed in to change notification settings - Fork 1k
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 #6356 from entur/eslint-9
Eslint 9 upgrades
- Loading branch information
Showing
9 changed files
with
1,342 additions
and
1,158 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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
node_modules/ | ||
dist/ | ||
output/ | ||
src/gql/ |
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,40 @@ | ||
import js from '@eslint/js' | ||
import globals from 'globals' | ||
import react from 'eslint-plugin-react' | ||
import reactHooks from 'eslint-plugin-react-hooks' | ||
import reactRefresh from 'eslint-plugin-react-refresh' | ||
import jsxA11y from 'eslint-plugin-jsx-a11y' | ||
import importPlugin from 'eslint-plugin-import' | ||
import tseslint from 'typescript-eslint' | ||
import eslintConfigPrettier from "eslint-config-prettier" | ||
|
||
export default tseslint.config( | ||
{ ignores: ['output', 'node_modules', 'src/gql/**/*'] }, | ||
{ | ||
extends: [js.configs.recommended, ...tseslint.configs.recommended], | ||
files: ['**/*.{ts,tsx}'], | ||
languageOptions: { | ||
ecmaVersion: 2020, | ||
globals: globals.browser, | ||
}, | ||
plugins: { | ||
'react': react, | ||
'react-hooks': reactHooks, | ||
'react-refresh': reactRefresh, | ||
'jsx-a11y': jsxA11y, | ||
'import': importPlugin | ||
}, | ||
rules: { | ||
...reactHooks.configs.recommended.rules, | ||
'react-refresh/only-export-components': [ | ||
'warn', | ||
{ allowConstantExport: true }, | ||
], | ||
"react/jsx-uses-react": "off", | ||
"react/react-in-jsx-scope": "off", | ||
'@typescript-eslint/ban-ts-comment': "off", | ||
'@typescript-eslint/no-unused-vars': ["error", { "caughtErrors": "all", "caughtErrorsIgnorePattern": "^_" }] | ||
}, | ||
}, | ||
eslintConfigPrettier, | ||
) |
Oops, something went wrong.