-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy patheslint.config.mjs
More file actions
47 lines (45 loc) · 1.1 KB
/
Copy patheslint.config.mjs
File metadata and controls
47 lines (45 loc) · 1.1 KB
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
import { defineConfig } from 'eslint/config'
import globals from 'globals'
import js from '@eslint/js'
import pluginReact from 'eslint-plugin-react'
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended'
export default defineConfig([
{ files: ['**/*.{js,mjs,cjs,jsx}'] },
{
files: ['**/*.{js,mjs,cjs,jsx}'],
languageOptions: {
parserOptions: {
ecmaFeatures: {
jsx: true
}
},
globals: {
...globals.browser,
...globals.commonjs,
$: 'readonly',
APP_CONFIG: 'readonly',
__dirname: 'readonly'
}
},
rules: {
'no-console': 'warn'
}
},
{ files: ['**/*.{js,mjs,cjs,jsx}'], plugins: { js }, extends: ['js/recommended'] },
pluginReact.configs.flat.recommended,
{
files: ['**/*.{js,jsx,tsx}'],
settings: {
react: {
version: 'detect'
}
},
rules: {
'react/prop-types': 'off',
'react/no-string-refs': 'warn',
'react/no-find-dom-node': 'warn',
'react/no-is-mounted': 'warn'
}
},
eslintPluginPrettierRecommended
])