-
Notifications
You must be signed in to change notification settings - Fork 92
/
.eslintrc.js
63 lines (63 loc) · 1.74 KB
/
.eslintrc.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
57
58
59
60
61
62
63
module.exports = {
env: {
browser: true,
es6: true,
node: true,
},
plugins: ["import", "react", "prettier"],
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:import/recommended",
"plugin:import/electron",
"plugin:import/typescript",
"plugin:react/recommended",
"plugin:react-hooks/recommended",
"airbnb",
"airbnb/hooks",
"airbnb-typescript",
"prettier",
],
parserOptions: {
parser: "@typescript-eslint/parser",
project: "./tsconfig.json",
tsconfigRootDir: __dirname,
},
settings: {
"import/parsers": {
"@typescript-eslint/parser": [".ts", ".tsx"],
},
react: {
version: "detect",
},
"import/resolver": {
typescript: {
project: ".",
},
alias: {
map: [
["@Assets", "./src/static"],
["@Renderer", "./src/renderer"],
["@Types", "./src/renderer/types"],
],
extensions: [".ts", ".js", ".jsx", ".tsx", ".json"],
},
},
},
rules: {
"prettier/prettier": ["error"],
"import/no-extraneous-dependencies": ["error", { devDependencies: true }],
"no-underscore-dangle": "off", // we should not use _ in variables in any case
"react/require-default-props": "off",
"react/function-component-definition": "off",
"import/prefer-default-export": "off",
"react/jsx-no-useless-fragment": "off",
"no-restricted-syntax": "off",
"@typescript-eslint/lines-between-class-members": "off",
"max-classes-per-file": ["warn", 2],
"prefer-regex-literals": "off",
"no-control-regex": "off",
},
ignorePatterns: ["/*", "!/src"], // we only care about linting src folder
};