diff options
| author | Pawel Zelawski <pawel@pzelawski.com> | 2026-05-23 10:50:04 +0200 |
|---|---|---|
| committer | Pawel Zelawski <pawel@pzelawski.com> | 2026-05-23 10:50:04 +0200 |
| commit | b4369d9d0f700869fd82f64bdc3af012a1ce5bd9 (patch) | |
| tree | ee3d2f5324812d2733e4f207fc254db10244c0fa /eslint.config.js | |
| parent | 376feecb280c28504788c9677c6cb3cc455f00b6 (diff) | |
chore: complete dependency upgrades and migrate lint to ESLint 10
Diffstat (limited to 'eslint.config.js')
| -rw-r--r-- | eslint.config.js | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/eslint.config.js b/eslint.config.js new file mode 100644 index 0000000..e8c07b8 --- /dev/null +++ b/eslint.config.js @@ -0,0 +1,51 @@ +import js from '@eslint/js'; +import tsPlugin from '@typescript-eslint/eslint-plugin'; +import tsParser from '@typescript-eslint/parser'; +import prettierConfig from 'eslint-config-prettier'; +import prettierPlugin from 'eslint-plugin-prettier'; +import reactHooks from 'eslint-plugin-react-hooks'; +import globals from 'globals'; + +export default [ + { + ignores: ['dist/**', 'node_modules/**', '.eslintrc.cjs', 'vite.config.ts'], + }, + { + files: ['**/*.{ts,tsx}'], + languageOptions: { + parser: tsParser, + parserOptions: { + ecmaVersion: 'latest', + sourceType: 'module', + ecmaFeatures: { + jsx: true, + }, + }, + globals: { + ...globals.browser, + ...globals.node, + ...globals.es2020, + }, + }, + plugins: { + '@typescript-eslint': tsPlugin, + 'react-hooks': reactHooks, + prettier: prettierPlugin, + }, + rules: { + ...js.configs.recommended.rules, + ...tsPlugin.configs.recommended.rules, + ...reactHooks.configs.recommended.rules, + ...prettierConfig.rules, + 'prettier/prettier': 'warn', + '@typescript-eslint/no-unused-vars': [ + 'warn', + { + argsIgnorePattern: '^_', + varsIgnorePattern: '^_', + caughtErrorsIgnorePattern: '^_', + }, + ], + }, + }, +]; |
