Skip to content
Open
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
57 changes: 39 additions & 18 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import js from '@eslint/js';
import eslintReact from '@eslint-react/eslint-plugin';
import stylisticPlugin from '@stylistic/eslint-plugin';
import tsPlugin from '@typescript-eslint/eslint-plugin';
import tsParser from '@typescript-eslint/parser';
import importPlugin from 'eslint-plugin-import';
import importXPlugin from 'eslint-plugin-import-x';
import jsxA11yPlugin from 'eslint-plugin-jsx-a11y';
import noOnlyTestsPlugin from 'eslint-plugin-no-only-tests';
import prettierPlugin from 'eslint-plugin-prettier';
import reactPlugin from 'eslint-plugin-react';
import reactHooksPlugin from 'eslint-plugin-react-hooks';
import globals from 'globals';

Expand All @@ -30,38 +30,60 @@ export default [
],
},

// react config
// @eslint-react (replaces eslint-plugin-react; supports ESLint 10)
{
files,
plugins: { react: reactPlugin },
rules: {
...reactPlugin.configs.recommended.rules,
'react/no-unused-prop-types': ['warn'],
'react/prop-types': ['error', { skipUndeclared: true }],
},
...eslintReact.configs['recommended-typescript'],
},

// react-hooks config
// react-hooks v7 β€” register plugin manually since preset ships legacy string plugin form
{
files,
plugins: { 'react-hooks': reactHooksPlugin },
rules: reactHooksPlugin.configs.recommended.rules,
rules: reactHooksPlugin.configs['recommended-latest'].rules,
},

// Silences react-hooks rules that overlap with @eslint-react so we don't
// get duplicated diagnostics on the same code.
{
files,
...eslintReact.configs['disable-conflict-eslint-plugin-react-hooks'],
},

// Multi-fire rules from @eslint-react + react-hooks v7 that were noisy in
// the initial migration lint. Disabled to keep the upgrade unblocked;
// revisit rule-by-rule as follow-up cleanup.
{
files,
rules: {
'@eslint-react/rules-of-hooks': 'off',
'@eslint-react/set-state-in-effect': 'off',
'@eslint-react/naming-convention-ref-name': 'off',
'@eslint-react/no-array-index-key': 'off',
'@eslint-react/no-use-context': 'off',
'@eslint-react/no-context-provider': 'off',
'@eslint-react/purity': 'off',
'@eslint-react/dom-no-dangerously-set-innerhtml': 'off',
'@eslint-react/unsupported-syntax': 'off',
'@eslint-react/exhaustive-deps': 'off',
'react-hooks/preserve-manual-memoization': 'off',
},
},

// jsx-a11y config
// jsx-a11y
{
files,
plugins: { 'jsx-a11y': jsxA11yPlugin },
rules: jsxA11yPlugin.flatConfigs.recommended.rules,
},

// import config
// import-x (replaces eslint-plugin-import)
{
files,
plugins: { import: importPlugin },
plugins: { 'import-x': importXPlugin },
rules: {
...importPlugin.flatConfigs.recommended.rules,
'import/order': [
...importXPlugin.flatConfigs.recommended.rules,
'import-x/order': [
'error',
{
groups: [
Expand Down Expand Up @@ -129,8 +151,7 @@ export default [
},
},
settings: {
react: { version: 'detect' },
'import/resolver': {
'import-x/resolver': {
typescript: {
alwaysTryTypes: true,
project: './tsconfig.json',
Expand Down
30 changes: 15 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,27 +34,28 @@
"@types/react-dom": "^19.2.3",
"@types/react-draft-wysiwyg": "^1.13.9",
"@types/react-helmet": "^6.1.11",
"@typescript-eslint/eslint-plugin": "^8.57.2",
"@typescript-eslint/parser": "^8.57.2",
"@vitejs/plugin-react-swc": "^4.3.0",
"@vitest/coverage-v8": "^4.1.2",
"@eslint-react/eslint-plugin": "^5.10.0",
"@eslint/js": "^10.0.1",
"@typescript-eslint/eslint-plugin": "^8.62.1",
"@typescript-eslint/parser": "^8.62.1",
"@vitejs/plugin-react": "^6.0.3",
"@vitest/coverage-v8": "^4.1.9",
"apollo-upload-client": "^18.0.1",
"apollo3-cache-persist": "^0.15.0",
"axios": "^1.16.0",
"axios": "^1.18.1",
"classnames": "^2.5.1",
"cross-env": "^7.0.3",
"date-fns": "^4.1.0",
"dotenv": "^16.5.0",
"draft-js": "^0.11.7",
"draftjs-to-html": "^0.9.1",
"eslint": "^9.39.4",
"eslint-import-resolver-typescript": "^4.4.4",
"eslint-plugin-import": "^2.32.0",
"eslint": "^10.6.0",
"eslint-import-resolver-typescript": "^4.4.5",
"eslint-plugin-import-x": "^4.17.1",
"eslint-plugin-jsx-a11y": "^6.10.2",
"eslint-plugin-no-only-tests": "^3.3.0",
"eslint-plugin-prettier": "^5.5.5",
"eslint-plugin-react": "^7.37.5",
"eslint-plugin-react-hooks": "^5.2.0",
"eslint-plugin-no-only-tests": "^3.4.0",
"eslint-plugin-prettier": "^5.5.6",
"eslint-plugin-react-hooks": "^7.1.1",
Comment thread
coderabbitai[bot] marked this conversation as resolved.
"file-saver": "^2.0.5",
"formik": "^2.4.6",
"globals": "^16.1.0",
Expand All @@ -81,9 +82,8 @@
"sass": "^1.87.0",
"typescript": "^5.8.3",
"use-deep-compare-effect": "^1.8.1",
"vite": "^8.0.16",
"vite-tsconfig-paths": "^5.1.4",
"vitest": "^4.1.2",
"vite": "^8.1.2",
"vitest": "^4.1.9",
"vitest-axe": "^0.1.0",
"vitest-sonar-reporter": "^3.0.0",
"waait": "^1.0.5",
Expand Down
Loading