Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Eslint 9 upgrades #6356

Merged
merged 6 commits into from
Jan 2, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 0 additions & 42 deletions client/.eslintrc.cjs

This file was deleted.

4 changes: 3 additions & 1 deletion client/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ node_modules
dist
dist-ssr
*.local
output

# Editor directories and files
.vscode/*
Expand All @@ -27,4 +28,5 @@ dist-ssr
src/gql/

# Vite cache folder
.vite/
.vite/

2 changes: 1 addition & 1 deletion client/.prettierignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
node_modules/
dist/
output/
src/gql/
40 changes: 40 additions & 0 deletions client/eslint.config.mjs
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,
)
Loading
Loading