-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbase-typescript.js
72 lines (72 loc) · 2.04 KB
/
base-typescript.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
68
69
70
71
72
module.exports = {
parser: '@typescript-eslint/parser',
extends: [
'plugin:@typescript-eslint/recommended',
],
plugins: ['@typescript-eslint', 'import', 'eslint-plugin-tsdoc'],
parserOptions: {
sourceType: 'module',
},
env: {
es6: true,
node: true,
},
rules: {
'no-undef': 'error',
'generator-star-spacing': ['error', 'after'],
'max-len': ['error', { code: 120, tabWidth: 2, ignoreUrls: true }],
'comma-dangle': ['error', 'always-multiline'],
'function-paren-newline': ['error', 'consistent'],
'operator-linebreak': ['error', 'before'],
'@typescript-eslint/explicit-function-return-type': 'error',
'@typescript-eslint/explicit-member-accessibility': 'off',
'@typescript-eslint/indent': [
'error',
2,
],
'@typescript-eslint/member-delimiter-style': ['error', { multiline: { delimiter: 'none' } }],
'@typescript-eslint/prefer-interface': 0,
'@typescript-eslint/no-explicit-any': 'warn',
'@typescript-eslint/interface-name-prefix': 'off',
// already used via esling plugin, this ignores JSX usage...
// https://github.com/typescript-eslint/typescript-eslint/issues/868
'@typescript-eslint/no-unused-vars': 'error',
'import/no-cycle': 'error',
'import/named': 'warn',
'import/extensions': [
'error',
'ignorePackages',
{
js: 'never',
jsx: 'never',
ts: 'never',
tsx: 'never',
},
],
'space-before-function-paren': 0,
'padding-line-between-statements': [
'error',
{ blankLine: 'always', prev: ['const', 'let', 'var'], next: '*' },
{ blankLine: 'any', prev: ['const', 'let', 'var'], next: ['const', 'let', 'var'] },
],
'@typescript-eslint/require-await': 'off',
},
globals: {
describe: true,
test: true,
expect: true,
it: true,
cy: true,
beforeEach: true,
context: true,
jest: true,
fetch: true,
},
settings: {
'import/resolver': {
node: {
extensions: ['.js', '.jsx', '.ts', '.tsx', '.json'],
},
},
},
}