generated from homebridge/homebridge-plugin-template
-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc.js
59 lines (59 loc) · 1.82 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
module.exports = {
extends: ['eslint:recommended', 'plugin:import/recommended'],
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint', 'prettier', 'import'],
root: true,
rules: {
'prettier/prettier': 'warn',
'prefer-arrow-callback': 'error',
'sort-imports': [
'error',
{
ignoreDeclarationSort: true,
},
],
'import/no-unresolved': 'error',
'import/no-extraneous-dependencies': 'error',
'import/first': 'error',
'import/no-duplicates': 'error',
'import/no-default-export': 'error',
'import/no-namespace': 'error',
'import/no-useless-path-segments': 'error',
'import/no-named-as-default': 0,
'no-duplicate-imports': 'error',
},
overrides: [
{
files: ['**/*.ts'],
extends: [
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
'plugin:import/typescript',
],
parserOptions: {
project: ['./tsconfig.json'],
},
rules: {
'@typescript-eslint/explicit-module-boundary-types': 'error',
'@typescript-eslint/consistent-type-imports': ['error', { prefer: 'type-imports' }],
},
settings: {
'import/resolver': {
typescript: {
project: './',
},
},
},
},
{
files: ['**/*.js'],
env: {
node: true,
browser: false,
},
rules: {
'@typescript-eslint/no-var-requires': 'off',
},
},
],
}