-
Notifications
You must be signed in to change notification settings - Fork 3
/
.eslintrc.js
62 lines (62 loc) · 1.73 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
module.exports = {
root: true,
extends: ['./tools/eslint/base_rules.js'],
env: {
browser: true,
commonjs: true,
es6: true,
node: true,
mocha: true,
jest: true,
},
parser: '@typescript-eslint/parser',
parserOptions: {
project: ['./tsconfig.json'],
sourceType: 'module',
},
plugins: ['ban', 'filenames', 'local', 'prefer-let', '@typescript-eslint', 'prettier'],
settings: {},
rules: {
'@typescript-eslint/restrict-plus-operands': 'error',
'@typescript-eslint/no-unused-vars': ['error', {
varsIgnorePattern: '_.*|response|datasourceUrl|MySchema',
argsIgnorePattern: '_.*|context|param'
},],
'object-shorthand': ['error', 'never'],
'max-len': ['error', { 'code': 80, 'ignoreUrls': true, ignoreRegExpLiterals: true, ignoreStrings: true, ignorePattern: '^import ' }],
'quotes': ['error', 'double', {avoidEscape: true}],
'prefer-const': 'off',
'prefer-let/prefer-let': 2,
'prefer-template': 'off',
'comma-dangle': ['error', 'always-multiline'],
'semi': ['error', 'always',],
'prettier/prettier': 'error',
},
overrides: [
{
files: ['**/*_test.{ts,tsx}'],
rules: {
'@typescript-eslint/no-non-null-assertion': 'off',
},
},
{
files: ['**/*.d.ts'],
rules: {
'@typescript-eslint/no-unused-vars': 'off',
camelcase: 'off',
},
},
{
files: ['**/types.ts'],
rules: {
camelcase: 'off',
},
},
{
files: ['examples/template/**/*.ts'],
rules: {
'@typescript-eslint/consistent-type-imports': 'off'
},
},
],
};