-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.eslintrc.js
45 lines (45 loc) · 1.38 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
module.exports = {
env: {
es6: true,
node: true,
jest: true,
browser: false,
},
parserOptions: {
ecmaVersion: 2018,
sourceType: 'module',
},
extends: ['eslint:recommended', 'plugin:prettier/recommended'],
plugins: ['import', '@typescript-eslint', 'prettier', 'lodash'],
extends: [
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'plugin:prettier/recommended',
'plugin:import/recommended',
'plugin:import/typescript',
'prettier/@typescript-eslint',
],
settings: {
'import/parsers': {
'@typescript-eslint/parser': ['.ts', '.tsx'],
},
},
rules: {
/**
* Allow implicit return types for functions or function interfaces
* @see https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/explicit-function-return-type.md
*/
'@typescript-eslint/explicit-function-return-type': 'off',
/**
* Enforce import order
*/
'import/order': ['error', { groups: [['builtin', 'external', 'internal']] }],
/** Show errors for unused variables */
'@typescript-eslint/no-unused-vars': 'error',
/** Show errors for un-resolved imports */
'import/no-unresolved': 'error',
/** Allow only method imports for lodash */
'lodash/import-scope': ['error', 'method'],
'@typescript-eslint/camelcase': 'off',
},
};