-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.mjs
More file actions
52 lines (50 loc) · 1.7 KB
/
Copy patheslint.config.mjs
File metadata and controls
52 lines (50 loc) · 1.7 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
48
49
50
51
52
import pluginJs from "@eslint/js"
import i18next from 'eslint-plugin-i18next'
import pluginReact from "eslint-plugin-react"
import globals from "globals"
import tseslint from "typescript-eslint"
/** @type {import('eslint').Linter.Config[]} */
export default [
{
files: ["**/*.{js,mjs,cjs,ts,jsx,tsx}"],
plugins: { react: pluginReact, typescript:tseslint},
languageOptions: {
parserOptions: {
ecmaFeatures: {
jsx: true,
},
},
globals: {
...globals.browser,
"__IS_DEV__":true
},
},
rules: {
// ...pluginReact.configs.recommended.rules,
...i18next.configs['flat/recommended'].rules,
"react/react-in-jsx-scope": "off",
"react/jsx-indent": [2, 4],
"react/jsx-indent-props": [2, 4],
"@typescript-eslint/no-unused-vars":"off",
"import/no-unresolved":'off',
"import/prefer-default-export":'off',
indent:[2,4],
"react/jsx-filename-extension":[2, {extensions:[".js",'.jsx','.tsx']}],
"react/require-default-props":"off",
"react/jsx-props-no-spreading":"off",
// "react/jsx-props-no-spreading":"warn",
"react/function-component-definition":'off',
"import/extensions":"off",
"no-underscore-dangle":"off"
},
settings: {
react: {
version: "detect",
},
},
},
pluginJs.configs.recommended,
...tseslint.configs.recommended,
i18next.configs['flat/recommended']
// pluginReact.configs.flat.recommended
];