Skip to content

Commit

Permalink
feat: upgrade to eslint 9
Browse files Browse the repository at this point in the history
  • Loading branch information
fboulnois committed Feb 13, 2025
1 parent 371bb15 commit 4d9c508
Show file tree
Hide file tree
Showing 5 changed files with 1,487 additions and 1,873 deletions.
4 changes: 0 additions & 4 deletions .babelrc

This file was deleted.

88 changes: 0 additions & 88 deletions .eslintrc

This file was deleted.

51 changes: 51 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
import js from '@eslint/js'
import globals from 'globals'
import ts from 'typescript-eslint'
import react from 'eslint-plugin-react'
import reactHooks from 'eslint-plugin-react-hooks'
import reactRefresh from 'eslint-plugin-react-refresh'
import cypress from 'eslint-plugin-cypress/flat'

export default ts.config(
{ ignores: ['build'] },
{
extends: [cypress.configs.recommended, js.configs.recommended, ts.configs.recommended],
files: ['**/*.{js,jsx,ts,tsx}'],
languageOptions: {
ecmaVersion: 2022,
globals: {
...globals.browser,
...globals.node,
}
},
settings: { react: { version: '18.3' } },
plugins: {
react,
'react-hooks': reactHooks,
'react-refresh': reactRefresh,
},
rules: {
...js.configs.recommended.rules,
...react.configs.recommended.rules,
...reactHooks.configs.recommended.rules,
'react-refresh/only-export-components': [
'warn',
{ allowConstantExport: true },
],
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': [
"error",
{
"args": "all",
"argsIgnorePattern": "^_",
"caughtErrors": "all",
"caughtErrorsIgnorePattern": "^_",
"destructuredArrayIgnorePattern": "^_",
"varsIgnorePattern": "^_",
"ignoreRestSiblings": true
}
],
'react/prop-types': 'off',
},
},
)
Loading

0 comments on commit 4d9c508

Please sign in to comment.