This repository has been archived by the owner on Apr 7, 2020. It is now read-only.
/
.eslintrc.js
65 lines (65 loc) · 1.93 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
64
65
// tsconfigRootDir is relative to the current working directory, so for the
// editor to find the tsconfig.json file, we have to use __dirname to make
// the path relative to the eslintrc file.
// https://github.com/typescript-eslint/typescript-eslint/issues/251
module.exports = {
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint"],
"env": {
"mocha": true
},
"extends": [
"standard",
"react-app",
"plugin:react/recommended",
"plugin:@typescript-eslint/recommended"
],
"overrides": [{
files: ['**/*.ts', '**/*.tsx'],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 2018,
sourceType: 'module',
ecmaFeatures: { jsx: true },
warnOnUnsupportedTypeScriptVersion: true,
},
plugins: ['@typescript-eslint']
}],
"rules": {
"no-restricted-imports": ["error", {
"patterns": ["**/shared"]
}],
"no-useless-constructor": "off",
"indent": "off",
"lines-between-class-members": "off",
"@typescript-eslint/no-useless-constructor": "error",
"@typescript-eslint/member-delimiter-style": ["error", {
"multiline": {
"delimiter": "comma",
"requireLast": false
},
"singleline": {
"delimiter": "comma",
"requireLast": false
}
}],
"@typescript-eslint/indent": ["error", 2],
"@typescript-eslint/explicit-member-accessibility": ["error", {
"accessibility": "no-public"
}],
"@typescript-eslint/no-unused-vars": ["error", {
"argsIgnorePattern": "^_"
}],
"@typescript-eslint/explicit-function-return-type": ["error", {
"allowExpressions": true
}],
"camelcase": "off",
"@typescript-eslint/ban-ts-ignore": "off",
"@typescript-eslint/camelcase": "off",
"require-await": "error",
"@typescript-eslint/array-type": ["error", {
"default": "array-simple"
}],
"jsx-quotes": ["error", "prefer-single"]
}
}