1 | module.exports = {
|
2 | parser: "@typescript-eslint/parser",
|
3 | parserOptions: {
|
4 | sourceType: "module",
|
5 | project: "./tsconfig.json",
|
6 | },
|
7 | env: {
|
8 | node: true,
|
9 | es6: true,
|
10 | },
|
11 | plugins: [
|
12 | "import",
|
13 | "prettier",
|
14 | "@typescript-eslint"
|
15 | ],
|
16 | extends: [
|
17 | "plugin:@typescript-eslint/recommended",
|
18 | "prettier"
|
19 | ],
|
20 | globals: {},
|
21 | rules: {
|
22 |
|
23 | "prettier/prettier": ["error"],
|
24 |
|
25 | "@typescript-eslint/no-unused-vars": "error",
|
26 | "@typescript-eslint/explicit-member-accessibility": "off",
|
27 | "@typescript-eslint/no-object-literal-type-assertion": "off",
|
28 | "@typescript-eslint/naming-convention": [
|
29 | "error",
|
30 | {
|
31 | selector: "interface",
|
32 | format: ["PascalCase"],
|
33 | custom: {
|
34 | regex: "^I[A-Z]",
|
35 | match: false,
|
36 | },
|
37 | },
|
38 | ],
|
39 |
|
40 | "import/extensions": [
|
41 | "error",
|
42 | "ignorePackages",
|
43 | {
|
44 | js: "never",
|
45 | mjs: "never",
|
46 | ts: "never",
|
47 | },
|
48 | ],
|
49 | indent: ["error", 4],
|
50 | "no-useless-constructor": "off",
|
51 | },
|
52 | overrides: [
|
53 | {
|
54 | files: ["**/*.spec.ts", "test/**/*.ts"],
|
55 | env: {
|
56 | jest: true,
|
57 | },
|
58 | rules: {
|
59 | "import/named": "off",
|
60 | "import/no-extraneous-dependencies": "off",
|
61 | "max-classes-per-files": "off",
|
62 | "global-require": "off",
|
63 | "@typescript-eslint/no-var-requires": "off",
|
64 | },
|
65 | },
|
66 | {
|
67 | files: ["test/**/*.ts"],
|
68 | rules: {
|
69 | "no-param-reassign": "off",
|
70 | },
|
71 | },
|
72 | ],
|
73 | settings: {
|
74 | "import/resolver": {
|
75 | node: {
|
76 | extensions: [".js", ".ts", ".json"],
|
77 | },
|
78 | },
|
79 | "import/extensions": [".js", ".ts", ".mjs"],
|
80 | },
|
81 | };
|