-
Notifications
You must be signed in to change notification settings - Fork 60
/
Copy patheslint.config.mjs
110 lines (109 loc) · 3.72 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
import eslint from "@eslint/js";
import angular from "angular-eslint";
import prettier from "eslint-plugin-prettier/recommended";
import unicorn from "eslint-plugin-unicorn";
import tseslint from "typescript-eslint";
export default tseslint.config(
eslint.configs.recommended,
...angular.configs.tsRecommended,
// @ts-ignore
unicorn.configs["flat/all"],
prettier,
{
files: ["**/*.html"],
extends: [...angular.configs.templateRecommended, ...angular.configs.templateAccessibility],
},
{
files: ["**/*.ts"],
extends: [...tseslint.configs.strictTypeChecked],
languageOptions: {
parserOptions: {
project: true,
tsconfigDirName: import.meta.dirname,
},
},
rules: {
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/consistent-type-imports": "off",
"@typescript-eslint/naming-convention": "off",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/no-empty-interface": "off",
"@typescript-eslint/no-empty-object-type": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-extraneous-class": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-unnecessary-condition": "off",
"@typescript-eslint/no-unsafe-argument": "off",
"@typescript-eslint/no-unsafe-assignment": "off",
"@typescript-eslint/no-unsafe-member-access": "off",
"@typescript-eslint/no-use-before-define": "off",
"@typescript-eslint/no-unused-vars": [
"error",
{
"argsIgnorePattern": "^_",
"caughtErrorsIgnorePattern": "^_",
"destructuredArrayIgnorePattern": "^_",
"varsIgnorePattern": "^_",
},
],
"@typescript-eslint/array-type": ["error", { "default": "array-simple" }],
"@typescript-eslint/prefer-for-of": "off",
"@typescript-eslint/prefer-nullish-coalescing": "off",
"@typescript-eslint/restrict-template-expressions": "off",
},
},
{
ignores: [
"node_modules/",
".angular/",
"packages/**/lib/",
"packages/**/dist/",
"packages/**/node_modules/",
// Arquivos gerados:
"packages/antlr/src/Portugol*.ts",
"packages/resources/assets/",
"packages/resources/recursos.temp/",
"packages/ide/src/index.html",
],
},
{
rules: {
"camelcase": "off",
"capitalized-comments": "off",
"func-names": ["error", "always"],
"lines-between-class-members": "off",
"new-cap": "off",
"no-alert": "off",
"no-await-in-loop": "off",
"no-bitwise": "off",
"no-case-declarations": "off",
"no-empty": "off",
"no-template-curly-in-string": "off",
"no-undef": "off",
"no-unused-vars": "off",
"no-useless-constructor": "off",
"no-useless-escape": "off",
"no-warning-comments": "off",
"prefer-destructuring": "off",
"prefer-named-capture-group": "off",
"require-unicode-regexp": "off",
"unicorn/consistent-function-scoping": "off",
"unicorn/filename-case": "off",
"unicorn/no-abusive-eslint-disable": "off",
"unicorn/no-array-reduce": "off",
"unicorn/no-await-expression-member": "off",
"unicorn/no-for-loop": "off",
"unicorn/no-keyword-prefix": "off",
"unicorn/no-lonely-if": "off",
"unicorn/no-null": "off",
"unicorn/no-object-as-default-parameter": "off",
"unicorn/prefer-export-from": "off",
"unicorn/prefer-global-this": "off",
"unicorn/prefer-spread": "off",
"unicorn/prefer-ternary": "off",
"unicorn/prefer-top-level-await": "off",
"unicorn/prevent-abbreviations": "off",
"unicorn/require-post-message-target-origin": "off",
},
},
);