-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Update ESLint to v9, update config, and fix new lint errors (#144)
- Loading branch information
Showing
34 changed files
with
569 additions
and
706 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import eslintConfig from '@meyfa/eslint-config' | ||
|
||
export default [ | ||
...eslintConfig, | ||
{ | ||
ignores: ['dist'] | ||
} | ||
] |
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
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
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 |
---|---|---|
@@ -1,7 +1,11 @@ | ||
{ | ||
"extends": "./tsconfig.json", | ||
"compilerOptions": { | ||
"allowJs": true | ||
}, | ||
"include": [ | ||
"src", | ||
"test" | ||
"test", | ||
"eslint.config.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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import eslintConfig from '@meyfa/eslint-config' | ||
|
||
export default [ | ||
...eslintConfig, | ||
{ | ||
ignores: ['dist'] | ||
} | ||
] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
import eslintConfig from '@meyfa/eslint-config' | ||
import pluginReact from 'eslint-plugin-react' | ||
import pluginReactHooks from 'eslint-plugin-react-hooks' | ||
import pluginJsxA11y from 'eslint-plugin-jsx-a11y' | ||
import { fixupPluginRules } from '@eslint/compat' | ||
|
||
export default [ | ||
...eslintConfig, | ||
pluginReact.configs.flat.recommended, | ||
pluginReact.configs.flat['jsx-runtime'], | ||
pluginJsxA11y.flatConfigs.recommended, | ||
{ | ||
ignores: ['dist'] | ||
}, | ||
{ | ||
plugins: { | ||
'react-hooks': fixupPluginRules(pluginReactHooks) | ||
}, | ||
|
||
settings: { | ||
react: { | ||
version: 'detect' | ||
} | ||
}, | ||
|
||
rules: { | ||
...pluginReactHooks.configs.recommended.rules, | ||
|
||
'react/no-typos': ['error'], | ||
'react/style-prop-object': ['warn'], | ||
'react/jsx-pascal-case': ['warn', { | ||
allowAllCaps: true, | ||
ignore: [] | ||
}], | ||
|
||
'react/void-dom-elements-no-children': ['error'], | ||
'react/no-unstable-nested-components': ['error'], | ||
'react/prop-types': ['error', { | ||
ignore: ['children'] | ||
}], | ||
|
||
// disable in favor of @stylistic | ||
'jsx-quotes': 'off', | ||
'react/jsx-indent': 'off', | ||
'react/jsx-indent-props': 'off', | ||
'react/jsx-first-prop-new-line': 'off', | ||
'react/jsx-max-props-per-line': 'off', | ||
'react/jsx-props-no-multi-spaces': 'off', | ||
'react/jsx-tag-spacing': 'off', | ||
'react/jsx-wrap-multilines': 'off', | ||
|
||
// might clash with @stylistic in the future, but are needed for now | ||
'react/jsx-closing-bracket-location': ['error'], | ||
'react/jsx-equals-spacing': ['error', 'never'] | ||
} | ||
} | ||
] |
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
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
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
Oops, something went wrong.