-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
95 lines (95 loc) · 3.14 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
module.exports = {
extends: ['plugin:@angular-eslint/recommended'],
rules: {
// ORIGINAL tslint.json -> "directive-selector": [true, "attribute", "app", "camelCase"],
'@angular-eslint/directive-selector': [
'error',
{ type: 'attribute', style: 'camelCase' },
],
// ORIGINAL tslint.json -> "component-selector": [true, "element", "app", "kebab-case"],
'@angular-eslint/component-selector': [
'error',
{ type: 'element', style: 'kebab-case' },
],
},
overrides: [
{
files: ['*.ts'],
extends: [
// AirBnB Styleguide rules
'airbnb-typescript/base',
// Settings for Prettier
'prettier/@typescript-eslint',
'plugin:prettier/recommended',
],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 2020,
sourceType: 'module',
project: './tsconfig.base.json',
},
rules: {
'@typescript-eslint/lines-between-class-members': 'off',
'import/prefer-default-export': 'off',
'import/no-unresolved': 'off',
'class-methods-use-this': 'off',
'@typescript-eslint/no-unused-vars': 'off',
'lines-between-class-members': 'off',
'import/no-extraneous-dependencies': 'off',
'@angular-eslint/component-selector': 'off',
'@typescript-eslint/no-use-before-define': 'off',
'@angular-eslint/no-host-metadata-property': 'off',
'@typescript-eslint/unbound-method': [
'error',
{
ignoreStatic: true,
},
],
},
},
{
files: ['projects/list-form-control-example/**/*.spec.ts', 'projects/list-form-control-example/**/*.d.ts'],
parserOptions: {
project: './projects/list-form-control-example/tsconfig.spec.json',
},
// Jasmine rules
extends: ['plugin:jasmine/recommended'],
// Plugin to run Jasmine rules
plugins: ['jasmine'],
env: { jasmine: true },
},
{
files: ['projects/list-form-control-example/**/*.e2e-spec.ts', 'projects/list-form-control-example/**/*.po.ts'],
parserOptions: {
project: './projects/list-form-control-example/e2e/tsconfig.json',
},
extends: ['plugin:protractor/recommended'],
plugins: ['protractor'],
rules: {
'import/no-extraneous-dependencies': ['error', { devDependencies: true }],
},
},
{
files: ['projects/list-form-control/**/*.spec.ts', 'projects/list-form-control/**/*.d.ts'],
parserOptions: {
project: './projects/list-form-control/tsconfig.spec.json',
},
// Jasmine rules
extends: ['plugin:jasmine/recommended'],
// Plugin to run Jasmine rules
plugins: ['jasmine'],
env: { jasmine: true },
},
{
files: ['projects/list-form-control/**/*.e2e-spec.ts', 'projects/list-form-control/**/*.po.ts'],
parserOptions: {
project: './projects/list-form-control/e2e/tsconfig.json',
},
extends: ['plugin:protractor/recommended'],
plugins: ['protractor'],
rules: {
'import/no-extraneous-dependencies': ['error', { devDependencies: true }],
},
},
],
};