/
tslintrc.react.js
67 lines (67 loc) · 1.95 KB
/
tslintrc.react.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
64
65
66
67
module.exports = {
env: {
browser: true,
commonjs: true,
es6: true,
jquery: true,
node: true
},
extends: [
"standard-with-typescript",
"plugin:react/recommended",
"plugin:react-hooks/recommended",
"plugin:@typescript-eslint/recommended"
],
parser: "@typescript-eslint/parser",
parserOptions: {
createDefaultProgram: true,
ecmaFeatures: { jsx: true },
ecmaVersion: "latest",
project: "tsconfig.json",
sourceType: "module",
tsconfigRootDir: __dirname
},
plugins: [
"html",
"react",
"react-hooks",
"@typescript-eslint"
],
root: true,
rules: {
/* eslint-disable quote-props */
"@typescript-eslint/indent": ["error", "tab"], // ts
"@typescript-eslint/no-inferrable-types": ["off"], // ts
"@typescript-eslint/no-unused-vars": ["error"], // ts
"@typescript-eslint/quotes": ["error", "double"], // ts
"@typescript-eslint/semi": ["error", "always"], // ts
"@typescript-eslint/space-before-function-paren": ["error", "never"], // ts
"@typescript-eslint/strict-boolean-expressions": ["off"], // ts
"eol-last": ["error", "never"],
"handle-callback-err": ["error", "err"],
"indent": ["error", "tab"],
"jsx-quotes": ["error", "prefer-double"], // react
"lines-between-class-members": ["error", "never"],
"multiline-ternary": ["off"],
"no-async-promise-executor": ["off"],
"no-console": ["off"],
"no-extend-native": ["off"],
"no-extra-semi": ["error"],
"no-new": ["off"],
"no-proto": ["off"],
"no-return-assign": ["off"],
"no-sequences": ["off"],
"no-tabs": ["off"],
"no-unreachable": ["off"],
"no-useless-constructor": ["off"],
"no-var": ["error"],
"object-curly-spacing": ["error", "always"],
"operator-linebreak": ["error", "before"],
"quotes": ["error", "double"],
"semi": ["error", "always"],
"sort-keys": ["error", "asc", { caseSensitive: false, natural: true }],
"space-before-function-paren": ["error", "never"],
"switch-colon-spacing": ["error"]
/* eslint-enable quote-props */
}
};