-
Notifications
You must be signed in to change notification settings - Fork 313
/
eslint.config.mjs
75 lines (74 loc) · 2.15 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
69
70
71
72
73
74
75
import eslint from "@eslint/js";
import tsEslint from "typescript-eslint";
import angular from "angular-eslint";
import stylistic from "@stylistic/eslint-plugin";
import { fixupPluginRules } from "@eslint/compat";
import rxjsAngular from "eslint-plugin-rxjs-angular";
import angularFileNaming from "eslint-plugin-angular-file-naming";
import importPlugin from "eslint-plugin-import";
import unusedImports from "eslint-plugin-unused-imports";
import sonarjs from "eslint-plugin-sonarjs";
import unicorn from 'eslint-plugin-unicorn';
import { eslintHtml } from './eslint/eslint-html.mjs'
import { eslintSpec } from "./eslint/eslint-spec.mjs";
import { fixLaterRules } from "./eslint/eslint-ts-rules-fix-later.mjs";
import { ruleOverrides } from "./eslint/eslint-ts-rules-overrides.mjs";
import { extraRules } from "./eslint/eslint-ts-rules-extra.mjs";
import rxjs from "@smarttools/eslint-plugin-rxjs";
export default tsEslint.config(
{
linterOptions: {
reportUnusedDisableDirectives: "error"
},
},
{
ignores: [
".angular/",
"debian/",
"docker/",
"tests/"
],
},
{
files: ['**/*.ts'],
processor: angular.processInlineTemplates,
languageOptions: {
parserOptions: {
projectService: true,
tsconfigRootDir: import.meta.dirname,
},
},
plugins: {
unicorn,
rxjs,
"rxjs-angular": fixupPluginRules(rxjsAngular),
"angular-file-naming": fixupPluginRules(angularFileNaming),
"unused-imports": unusedImports,
"@stylistic/js": stylistic,
"@stylistic/ts": stylistic,
},
extends: [
eslint.configs.recommended,
...tsEslint.configs.strictTypeChecked,
...tsEslint.configs.stylisticTypeChecked,
...angular.configs.tsRecommended,
stylistic.configs.customize({
semi: true,
jsx: false,
braceStyle: '1tbs',
arrowParens: 'always',
quoteProps: 'as-needed'
}),
importPlugin.flatConfigs.recommended,
sonarjs.configs.recommended,
rxjs.configs.recommended,
],
rules: {
...ruleOverrides,
...extraRules,
...fixLaterRules,
}
},
eslintSpec,
eslintHtml,
);