Skip to content

Commit d04b988

Browse files
committed
add .eslintrc.js
1 parent b0c20ee commit d04b988

File tree

1 file changed

+74
-0
lines changed

1 file changed

+74
-0
lines changed

.eslintrc.js

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
module.exports = {
2+
'env': {
3+
'browser': true,
4+
'es6': true
5+
},
6+
'extends': [
7+
'eslint:recommended',
8+
'plugin:react/recommended',
9+
'plugin:@typescript-eslint/recommended',
10+
],
11+
'settings': {
12+
'react': {
13+
'pragma': 'React',
14+
'version': 'detect'
15+
}
16+
},
17+
'globals': {
18+
'Atomics': 'readonly',
19+
'SharedArrayBuffer': 'readonly'
20+
},
21+
'parser': '@typescript-eslint/parser',
22+
'parserOptions': {
23+
'ecmaFeatures': {
24+
'jsx': true
25+
},
26+
'ecmaVersion': 2018,
27+
'sourceType': 'module',
28+
// 'project': './tsconfig.json'
29+
},
30+
'plugins': [
31+
'react',
32+
'@typescript-eslint',
33+
// 'prettier'
34+
],
35+
'rules': {
36+
'no-undef': 0,
37+
// 'indent': [ 'error', 2 ],
38+
'linebreak-style': [ 'error', 'unix' ],
39+
'quotes': [ 'error', 'single' ],
40+
'semi': [ 2, 'never' ],
41+
'no-unused-vars': 'off',
42+
'prefer-spread': 0,
43+
'prefer-const': 0,
44+
'switch-colon-spacing': [2, {'after': true, 'before': true}],
45+
'default-case': 2,
46+
'no-spaced-func': 2,
47+
'no-case-declarations': 0,
48+
// react jsx
49+
'react/display-name': 0,
50+
'react/jsx-filename-extension': 'off',
51+
'react/jsx-first-prop-new-line': 'off',
52+
'react/jsx-indent': [ 'error', 2 ],
53+
'react/jsx-indent-props': [2, 2],
54+
55+
// @typescript-eslint
56+
'@typescript-eslint/indent': [2, 2],
57+
'@typescript-eslint/camelcase': 0,
58+
'@typescript-eslint/explicit-function-return-type': 0,
59+
'@typescript-eslint/no-non-null-assertion': 0,
60+
'@typescript-eslint/no-use-before-define': 0,
61+
'@typescript-eslint/member-delimiter-style': 0,
62+
'@typescript-eslint/no-unused-vars': 0,
63+
'@typescript-eslint/no-use-before-define': 0,
64+
'@typescript-eslint/no-explicit-any': 0,
65+
'@typescript-eslint/explicit-member-accessibility': 0,
66+
'@typescript-eslint/no-angle-bracket-type-assertion': 0,
67+
'@typescript-eslint/interface-name-prefix': 0,
68+
'@typescript-eslint/no-empty-function': 1,
69+
'@typescript-eslint/semi': 0,
70+
'@typescript-eslint/no-inferrable-types': 0,
71+
'@typescript-eslint/no-empty-interface': 1,
72+
'@typescript-eslint/class-name-casing': 0,
73+
}
74+
};

0 commit comments

Comments
 (0)