-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy patheslint.config.mjs
More file actions
52 lines (51 loc) · 1.63 KB
/
eslint.config.mjs
File metadata and controls
52 lines (51 loc) · 1.63 KB
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
import globals from "globals";
import ts from "@typescript-eslint/eslint-plugin";
import eslintConfigPrettier from "eslint-config-prettier";
import tsParser from "@typescript-eslint/parser";
export default [
eslintConfigPrettier,
{
languageOptions: {
parser: tsParser,
parserOptions: {
warnOnUnsupportedTypeScriptVersion: false,
},
globals: {
...globals.node,
},
},
files: ["src/**/*.ts", "test/**/*.ts"],
plugins: {
"@typescript-eslint": ts,
},
rules: {
"linebreak-style": ["error", "unix"],
"no-case-declarations": "off",
"@typescript-eslint/no-require-imports": "error",
"@typescript-eslint/no-explicit-any": "error",
"@typescript-eslint/explicit-function-return-type": ["error", { allowExpressions: true }],
"@typescript-eslint/naming-convention": [
"error",
{
selector: "interface",
format: ["PascalCase"],
},
{
selector: "function",
format: ["camelCase"],
leadingUnderscore: "allow",
},
],
"@typescript-eslint/no-inferrable-types": [
"warn",
{
ignoreParameters: true,
},
],
"@typescript-eslint/no-unused-vars": ["error", { args: "none" }],
},
},
{
ignores: ["coverage/**/*", "examples/**/*", "lib/**/*"],
},
];