-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.cjs
88 lines (88 loc) · 2.31 KB
/
.eslintrc.cjs
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
module.exports = {
parser: "@typescript-eslint/parser",
parserOptions: {
allowImportExportEverywhere: false,
codeFrame: false,
ecmaVersion: "es2022",
errorOnUnknownASTType: true,
errorOnTypeScriptSyntacticAndSemanticIssues: true,
sourceType: "module",
project: "./tsconfig.json",
tsconfigRootDir: __dirname,
},
extends: [
"prettier",
"plugin:prettier/recommended",
"plugin:@typescript-eslint/recommended",
"plugin:import/recommended",
"plugin:import/typescript",
// "plugin:node/recommended", - enable only for node projects/folders
"plugin:react/recommended",
"plugin:you-dont-need-lodash-underscore/compatible"
],
rules: {
"@typescript-eslint/no-unused-vars": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/no-namespace": "off",
"import/namespace": "off",
"class-methods-use-this": "off",
"dot-notation": ["error", { allowPattern: "^(code)$" }],
"function-paren-newline": ["error", "consistent"],
jsxSingleQuote: 0,
"jsx-quotes": 0,
"max-len": [
"error",
{
code: 120,
tabWidth: 2,
ignoreComments: true,
ignoreUrls: true,
ignoreStrings: true,
ignoreTemplateLiterals: true,
},
],
"no-unused-vars": "off",
"no-underscore-dangle": ["error", { allow: ["_id", "_headers"] }],
'prettier/prettier': [
'error',
{
tabWidth: 2,
eslintIntegration: true,
printWidth: 120,
},
],
"react/no-unknown-property": ["error", { "ignore": ["css"] }],
"react/react-in-jsx-scope": 0,
"quote-props": ["error", "consistent-as-needed"],
},
env: {
browser: true,
node: true,
es6: true,
},
globals: {
beforeEach: true,
afterEach: true,
describe: true,
it: true,
expect: true,
},
plugins: ["@typescript-eslint", "react", "node", "prettier", "import", "@emotion"],
settings: {
react: {
pragma: "h",
version: "detect",
},
"import/extensions": [".js", ".jsx", ".ts", ".tsx", ".cjs"],
"import/parsers": {
"@typescript-eslint/parser": [".ts", ".tsx"],
},
"import/resolver": {
typescript: {
directory: "./tsconfig.json",
},
node: true,
},
},
};