-
Notifications
You must be signed in to change notification settings - Fork 2
/
.eslintrc.js
59 lines (55 loc) · 1.4 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
const SEVERITY = 'error';
const DISABLED = 'off';
module.exports = {
root: true,
extends: ['@terminus/eslint-config-frontend'],
parserOptions: {
ecmaFeatures: {
'modules': true,
},
ecmaVersion: '2018',
project: 'tsconfig.all.json',
sourceType: 'module',
},
rules: {
'jsdoc/require-jsdoc': SEVERITY,
},
overrides: [
// TypeScript and Angular specific rules
{
files: ['*.ts'],
rules: {
// For performance, prefer OnPush
'@angular-eslint/prefer-on-push-component-change-detection': SEVERITY,
},
},
// Test helper files
{
'files': [
'**/*.spec.ts',
'**/*.mock.ts',
'**/test-helpers.ts',
'**/test-components.ts',
],
'rules': {
'@angular-eslint/prefer-on-push-component-change-detection': DISABLED,
},
},
// Demo project
{
files: [
'demo/**/*.ts',
],
rules: {
'@angular-eslint/prefer-on-push-component-change-detection': DISABLED,
'@typescript-eslint/explicit-member-accessibility': DISABLED,
'@typescript-eslint/member-ordering': DISABLED,
'@typescript-eslint/no-explicit-any': DISABLED,
'@typescript-eslint/no-magic-numbers': DISABLED,
'@typescript-eslint/no-non-null-assertion': DISABLED,
'no-console': DISABLED,
'jsdoc/require-jsdoc': DISABLED,
},
},
],
};