-
Notifications
You must be signed in to change notification settings - Fork 0
/
eslint.config.js
56 lines (55 loc) · 1.29 KB
/
eslint.config.js
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
import globals from 'globals';
import tseslint from 'typescript-eslint';
import pluginReact from 'eslint-plugin-react';
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended';
import eslintConfigPrettier from 'eslint-config-prettier';
export default [
{
files: ['**/*.{js,mjs,cjs,ts,jsx,tsx}'],
ignores: ['src/components/ui/'], // Use "ignores" to specify files and directories to ignore
},
{languageOptions: {globals: globals.browser}},
...tseslint.configs.recommended,
pluginReact.configs.flat.recommended,
eslintPluginPrettierRecommended,
eslintConfigPrettier,
{
settings: {
react: {
version: 'detect', // Automatically detect the version of React
},
},
rules: {
'react/react-in-jsx-scope': 'off',
'react/jsx-uses-react': 'off',
'react/jsx-filename-extension': [
1,
{extensions: ['.js', '.jsx', '.ts', '.tsx']},
],
'prettier/prettier': [
'error',
{
singleQuote: true,
trailingComma: 'all',
semi: true,
tabWidth: 2,
},
],
'@typescript-eslint/no-unused-vars': [
'error',
{
vars: 'all',
args: 'after-used',
ignoreRestSiblings: true,
},
],
'@typescript-eslint/no-explicit-any': [
'error',
{
fixToUnknown: false,
ignoreRestArgs: false,
},
],
},
},
];