-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
executable file
·60 lines (59 loc) · 1.51 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
const { resolve } = require('path')
module.exports = {
env: {
browser: false,
es6: true,
jest: true
},
globals: {
Atomics: 'readonly',
SharedArrayBuffer: 'readonly'
},
parserOptions: {
ecmaVersion: 2017,
sourceType: 'module',
project: [resolve(__dirname, 'tsconfig.json'), resolve(__dirname, '__tests__', 'tsconfig.json')]
},
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint', 'import', 'import-helpers', 'prettier'],
extends: ['airbnb-base', 'plugin:@typescript-eslint/recommended', 'prettier/@typescript-eslint'],
rules: {
semi: ['error', 'never'],
'import-helpers/order-imports': [
'warn',
{
// example configuration
newlinesBetween: 'always',
groups: ['module', '/^@/', '/^~/', ['parent', 'sibling', 'index']],
alphabetize: {
order: 'asc',
ignoreCase: true
}
}
],
'import/extensions': [
'error',
'ignorePackages',
{
ts: 'never',
js: 'never'
}
],
'no-useless-constructor': 'off',
'comma-dangle': ['error', 'never'],
'object-curly-newline': 0,
'@typescript-eslint/explicit-function-return-type': 'off',
'class-methods-use-this': 0,
'import/no-cycle': 0,
'prefer-destructuring': ['error', { object: true, array: true }]
},
settings: {
'import/extensions': ['.js', '.ts'],
'import/parsers': {
'@typescript-eslint/parser': ['.ts']
},
'import/resolver': {
typescript: {}
}
}
}