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

chore(eslint): migrate to eslint 9 flat config #11

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
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
39 changes: 0 additions & 39 deletions .eslintrc.cjs

This file was deleted.

31 changes: 31 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import eslint from '@eslint/js';
import { FlatCompat } from '@eslint/eslintrc';
import tseslint from 'typescript-eslint';
import importPlugin from 'eslint-plugin-import';
import jsxA11y from 'eslint-plugin-jsx-a11y';
import react from 'eslint-plugin-react';

const compat = new FlatCompat();

export default tseslint.config(
{ ignores: ['dist/'] },
eslint.configs.recommended,
tseslint.configs.recommended,
importPlugin.flatConfigs.recommended,
jsxA11y.flatConfigs.recommended,
react.configs.flat.recommended,
react.configs.flat['jsx-runtime'],
...compat.extends('plugin:react-hooks/recommended'),
{
settings: {
'import/resolver': { typescript: true },
react: { version: 'detect' },
},
rules: {
'@typescript-eslint/no-unused-vars': [
'error',
{ argsIgnorePattern: '^_', varsIgnorePattern: '^_' },
],
},
},
);
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"src",
"dist"
],
"packageManager": "pnpm@8.15.0",
"packageManager": "pnpm@9.4.0",
"scripts": {
"compile": "rm -rf dist && pnpm run '/^compile:.*/'",
"compile:esm": "tsc -p tsconfig.esm.json",
Expand All @@ -57,16 +57,14 @@
"singleQuote": true
},
"devDependencies": {
"@eslint/js": "^9.17.0",
"@testing-library/jest-dom": "^6.6.3",
"@testing-library/react": "^16.1.0",
"@testing-library/user-event": "^14.5.2",
"@types/node": "^22.10.2",
"@types/react": "^19.0.2",
"@types/react-dom": "^19.0.2",
"@typescript-eslint/eslint-plugin": "^8.18.1",
"@typescript-eslint/parser": "^8.18.1",
"eslint": "8.57.0",
"eslint-config-prettier": "^9.1.0",
"eslint": "^9.17.0",
"eslint-import-resolver-typescript": "^3.7.0",
"eslint-plugin-import": "^2.31.0",
"eslint-plugin-jsx-a11y": "^6.10.2",
Expand All @@ -80,8 +78,10 @@
"react-dom": "^19.0.0",
"ts-expect": "^1.3.0",
"typescript": "^5.7.2",
"typescript-eslint": "^8.18.1",
"valtio": "^2.1.2",
"vite": "^6.0.4",
"vite-tsconfig-paths": "^5.1.4",
"vitest": "^2.1.8"
},
"peerDependencies": {
Expand Down
Loading
Loading