-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
43 lines (40 loc) · 1.54 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
module.exports = {
root: true,
env: { es6: true },
ignorePatterns: [`node_modules/`, `dist/`],
plugins: [`deprecation`],
overrides: [
{
files: [`*.js`],
parserOptions: { ecmaVersion: 2018 },
extends: [`plugin:prettier/recommended`],
rules: { 'eol-last': `warn`, quotes: [`warn`, `backtick`] },
},
{
files: [`*.ts`],
parserOptions: { project: [`tsconfig.json`], createDefaultProgram: true },
extends: [
`plugin:@angular-eslint/recommended`,
`plugin:@angular-eslint/template/process-inline-templates`,
`plugin:@typescript-eslint/recommended`,
`plugin:prettier/recommended`,
],
rules: {
'@angular-eslint/directive-selector': [`error`, { type: `attribute`, prefix: `dm`, style: `camelCase` }],
'@angular-eslint/component-selector': [`error`, { type: `element`, prefix: `dm`, style: `kebab-case` }],
'@typescript-eslint/consistent-type-assertions': [
`warn`,
{ assertionStyle: `as`, objectLiteralTypeAssertions: `allow-as-parameter` },
],
'@typescript-eslint/semi': `warn`,
'@typescript-eslint/member-delimiter-style': `warn`,
'@typescript-eslint/prefer-readonly': `warn`,
'@typescript-eslint/no-unused-vars': [`warn`, { args: `all`, argsIgnorePattern: `^_` }],
'deprecation/deprecation': `warn`,
'eol-last': `warn`,
quotes: [`warn`, `backtick`],
},
},
{ files: [`*.html`], extends: [`plugin:@angular-eslint/template/recommended`], rules: {} },
],
};