-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslint.config.mjs
42 lines (41 loc) · 1.09 KB
/
eslint.config.mjs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import globals from 'globals'
import eslint from '@eslint/js'
import ts from 'typescript-eslint'
import pluginReactConfig from 'eslint-plugin-react/configs/recommended.js'
import pluginReactJSXRuntime from 'eslint-plugin-react/configs/jsx-runtime.js'
import { fixupConfigRules } from '@eslint/compat'
export default ts.config({
files: ['src/**/*.{ts,tsx}'],
extends: [
eslint.configs.recommended,
...ts.configs.recommended,
...fixupConfigRules(pluginReactConfig),
...fixupConfigRules(pluginReactJSXRuntime),
],
languageOptions: {
parserOptions: { ecmaFeatures: { jsx: true } },
globals: {
...globals.browser,
...globals.es2022,
},
},
settings: {
react: {
version: 'detect',
},
},
rules: {
'no-console': 'warn',
'react/prop-types': 'off',
'@typescript-eslint/no-unused-vars': [
'warn',
{
argsIgnorePattern: '^_',
varsIgnorePattern: '^_',
caughtErrorsIgnorePattern: '^_',
destructuredArrayIgnorePattern: '^_',
},
],
},
ignores: ['build/*', 'node_modules/*', 'vite.config.js'],
})