forked from modelix/modelix.core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslint.config.mjs
49 lines (48 loc) · 1.35 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
import globals from "globals";
import pluginJs from "@eslint/js";
import tseslint from "typescript-eslint";
import eslintConfigPrettier from "eslint-config-prettier";
export default [
{ files: ["**/*.{js,mjs,cjs,ts}"] },
{ ignores: ["**/.gradle", "**/dist/", "**/build/"] },
{
languageOptions: {
ecmaVersion: "latest",
sourceType: "module",
globals: {
...globals.browser,
...globals.node,
...globals.es2021
},
},
},
pluginJs.configs.recommended,
...tseslint.configs.recommended,
eslintConfigPrettier, // > Turns off all rules that are unnecessary or might conflict with Prettier.
{
// The Redocly plugin uses CommonJS syntax for imports and exports as in the Redocly documentation.
files: ["model-server-openapi/**/*"],
rules: {
"@typescript-eslint/no-require-imports": "off"
}
},
{
rules: {
"@typescript-eslint/consistent-type-imports": "error",
"@typescript-eslint/no-import-type-side-effects": "error",
"@typescript-eslint/no-unused-vars": [
"error",
{
vars: "all",
args: "after-used",
varsIgnorePattern: "^_.+",
argsIgnorePattern: "^_.+",
},
],
"@typescript-eslint/ban-ts-comment": [
"error",
{ "ts-ignore": "allow-with-description" },
],
},
},
];