-
Notifications
You must be signed in to change notification settings - Fork 2
/
common.eslintrc.js
46 lines (45 loc) · 1.25 KB
/
common.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
const conf = {
rules: {
// 'curly': ['error', 'all', 'consistent'],
'comma-dangle': ['error', 'always-multiline'],
'import/no-extraneous-dependencies': [
'error', {
'devDependencies': [
'**/*.d.ts',
'**/*.spec.ts',
'**/jest.*',
'gulpfile.esm.js',
],
},
],
'import/no-unresolved': 'error',
'import/prefer-default-export': 'off',
'import/no-default-export': 'error',
'linebreak-style': 'off',
'no-console': 'off',
'no-trailing-spaces': 'error',
'no-tabs': ['warn', { 'allowIndentationTabs': true }],
'quotes': ['error', 'single'],
'@typescript-eslint/ban-types': ['error', {
'types': { 'Function': false },
'extendDefaults': true
}],
'@typescript-eslint/brace-style': ['error', 'stroustrup'],
'@typescript-eslint/indent': ['error', 'tab', {
SwitchCase: 1, // Only this from airbnb redefines default
// Other Airbnb setting same as default, JSX no matter
}],
'@typescript-eslint/no-unused-vars': ['warn'],
// Old school interface class naming
'@typescript-eslint/naming-convention': ['error', {
'selector': 'interface',
'format': ['PascalCase'],
'custom': {
'regex': '^I[A-Z]',
'match': true
}
}],
'@typescript-eslint/ban-ts-comment': 'off',
},
};
module.exports = conf;