-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy patheslint.config.mjs
68 lines (67 loc) · 2.04 KB
/
eslint.config.mjs
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
import angularEslintPlugin from "@angular-eslint/eslint-plugin";
import angularEslintPluginTemplate from "@angular-eslint/eslint-plugin-template";
import angularEslintTemplateParser from "@angular-eslint/template-parser";
import js from "@eslint/js";
import prettier from "eslint-config-prettier";
import deprecation from "eslint-plugin-deprecation";
import globals from "globals";
import tseslint from "typescript-eslint";
export default [
js.configs.recommended,
{ ignores: ["dist/", ".angular/", "**/*.js"] },
{
files: ["**/*.ts"],
languageOptions: {
parser: tseslint.parser,
parserOptions: {
project: [
"./projects/angular-ecmascript-intl/tsconfig.lib.json",
"./projects/angular-ecmascript-intl/tsconfig.spec.json",
"./projects/angular-intl-demo/tsconfig.app.json",
],
},
globals: {
...globals.browser,
},
},
plugins: {
"@typescript-eslint": tseslint.plugin,
deprecation,
"@angular-eslint": angularEslintPlugin,
},
processor: angularEslintPluginTemplate.processors["extract-inline-html"],
rules: {
...tseslint.configs.strictTypeChecked.rules,
...tseslint.configs.stylisticTypeChecked.rules,
...angularEslintPlugin.configs.recommended.rules,
"@typescript-eslint/no-extraneous-class": "off",
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": "error",
"@typescript-eslint/prefer-literal-enum-member": "off",
"deprecation/deprecation": "error",
"@angular-eslint/prefer-standalone-component": "error",
},
},
{
files: ["**/*.spec.ts"],
languageOptions: {
globals: {
...globals.jasmine,
},
},
},
{
files: ["**/*.html"],
plugins: {
"@angular-eslint/template": angularEslintPluginTemplate,
},
languageOptions: {
parser: angularEslintTemplateParser,
},
rules: {
...angularEslintPluginTemplate.configs.recommended.rules,
"@angular-eslint/template/prefer-control-flow": "error",
},
},
prettier,
];