|
1 | | -import pluginJs from "@eslint/js"; |
2 | | -import eslintConfigPrettier from "eslint-config-prettier"; |
3 | | -import globals from "globals"; |
4 | | -import tseslint from "typescript-eslint"; |
5 | | -import pluginJest from "eslint-plugin-jest"; |
| 1 | +import config from "@nanoforge/utils-eslint-config"; |
6 | 2 |
|
7 | | -export default [ |
8 | | - { |
9 | | - files: ["src/**/*.{ts}"], |
10 | | - }, |
11 | | - { languageOptions: { globals: globals.node } }, |
12 | | - |
13 | | - |
14 | | - pluginJs.configs.recommended, |
15 | | - ...tseslint.configs.recommended, |
16 | | - ...tseslint.configs.strict, |
17 | | - eslintConfigPrettier, |
18 | | - { ignores: ["**/*.js"] }, |
19 | | - { |
20 | | - rules: { |
21 | | - "@typescript-eslint/consistent-type-imports": [ |
22 | | - "error", |
23 | | - { |
24 | | - disallowTypeAnnotations: true, |
25 | | - fixStyle: "inline-type-imports", |
26 | | - prefer: "type-imports", |
27 | | - }, |
28 | | - ], |
29 | | - "@typescript-eslint/no-extraneous-class": "off", |
30 | | - "@typescript-eslint/no-empty-object-type": "off", |
31 | | - "@typescript-eslint/no-explicit-any": "off", |
32 | | - "@typescript-eslint/ban-ts-comment": "off", |
33 | | - "@typescript-eslint/member-ordering": [ |
34 | | - "error", |
35 | | - { |
36 | | - default: [ |
37 | | - "static-field", |
38 | | - "field", |
39 | | - "public-static-method", |
40 | | - "constructor", |
41 | | - "method", |
42 | | - "protected-method", |
43 | | - "private-method", |
44 | | - ], |
45 | | - }, |
46 | | - ], |
47 | | - }, |
48 | | - }, |
49 | | - { |
50 | | - files: ["**/*.spec.ts"], |
51 | | - plugins: { jest: pluginJest }, |
52 | | - languageOptions: { |
53 | | - globals: pluginJest.environments.globals.globals, |
54 | | - }, |
55 | | - rules: { |
56 | | - "jest/no-disabled-tests": "warn", |
57 | | - "jest/no-focused-tests": "error", |
58 | | - "jest/no-identical-title": "error", |
59 | | - "jest/prefer-to-have-length": "warn", |
60 | | - "jest/valid-expect": "error", |
61 | | - } |
62 | | - } |
63 | | -]; |
| 3 | +export default config; |
0 commit comments