|
1 |
| -// @ts-check |
2 |
| -import eslint from '@eslint/js'; |
3 |
| -import globals from 'globals'; |
4 |
| -import tseslint from 'typescript-eslint'; |
5 |
| -import nodePlugin from 'eslint-plugin-n'; |
6 |
| -import oxlint from 'eslint-plugin-oxlint'; |
| 1 | +import config from '@repo/eslint-config'; |
7 | 2 |
|
8 |
| -export default tseslint.config( |
9 |
| - { |
10 |
| - ignores: [ |
11 |
| - '.git', |
12 |
| - 'node_modules', |
13 |
| - 'coverage', |
14 |
| - '.yarn', |
15 |
| - 'packages/*/dist/**', |
16 |
| - 'packages/*/node_modules/**', |
17 |
| - 'packages/*/__snapshots__/**', |
18 |
| - ], |
19 |
| - }, |
20 |
| - eslint.configs.recommended, |
21 |
| - nodePlugin.configs['flat/recommended-module'], |
22 |
| - { |
23 |
| - languageOptions: { |
24 |
| - globals: { |
25 |
| - ...globals.nodeBuiltin, |
26 |
| - }, |
27 |
| - }, |
28 |
| - rules: { |
29 |
| - 'n/hashbang': 'off', |
30 |
| - 'unicorn/consistent-function-scoping': 'off', |
31 |
| - 'unicorn/filename-case': 'off', |
32 |
| - 'unicorn/no-array-callback-reference': 'off', |
33 |
| - 'unicorn/no-array-for-each': 'off', |
34 |
| - 'unicorn/no-array-reduce': 'off', |
35 |
| - 'unicorn/no-null': 'off', |
36 |
| - 'unicorn/no-process-exit': 'off', |
37 |
| - 'unicorn/prefer-event-target': 'off', |
38 |
| - 'unicorn/prefer-top-level-await': 'off', |
39 |
| - 'unicorn/prevent-abbreviations': 'off', |
40 |
| - }, |
41 |
| - }, |
42 |
| - { |
43 |
| - files: ['**/*.mts', '**/*.ts'], |
44 |
| - extends: [...tseslint.configs.strictTypeChecked], |
45 |
| - languageOptions: { |
46 |
| - parserOptions: { |
47 |
| - projectService: true, |
48 |
| - }, |
49 |
| - }, |
50 |
| - rules: { |
51 |
| - '@typescript-eslint/restrict-template-expressions': 'off', |
52 |
| - '@typescript-eslint/no-invalid-void-type': 'off', |
53 |
| - '@typescript-eslint/no-non-null-assertion': 'off', |
54 |
| - '@typescript-eslint/no-confusing-void-expression': 'off', |
55 |
| - '@typescript-eslint/no-unnecessary-type-parameters': 'off', |
56 |
| - }, |
57 |
| - }, |
58 |
| - { |
59 |
| - files: ['**/*.cjs'], |
60 |
| - extends: [nodePlugin.configs['flat/recommended-script']], |
61 |
| - languageOptions: { |
62 |
| - globals: { |
63 |
| - ...globals.node, |
64 |
| - }, |
65 |
| - }, |
66 |
| - }, |
67 |
| - { |
68 |
| - files: ['packages/inquirer/test/**', 'packages/**/*.test.*'], |
69 |
| - rules: { |
70 |
| - '@typescript-eslint/unbound-method': 'off', |
71 |
| - 'n/no-extraneous-import': [ |
72 |
| - 'error', |
73 |
| - { |
74 |
| - allowModules: ['vitest'], |
75 |
| - }, |
76 |
| - ], |
77 |
| - 'n/no-extraneous-require': [ |
78 |
| - 'error', |
79 |
| - { |
80 |
| - allowModules: ['vitest'], |
81 |
| - }, |
82 |
| - ], |
83 |
| - 'n/no-unsupported-features/node-builtins': [ |
84 |
| - 'error', |
85 |
| - { |
86 |
| - version: '>=22.0.0', |
87 |
| - }, |
88 |
| - ], |
89 |
| - }, |
90 |
| - }, |
91 |
| - { |
92 |
| - files: [ |
93 |
| - 'tools/**', |
94 |
| - 'integration/**', |
95 |
| - 'packages/inquirer/examples/**', |
96 |
| - 'packages/demo/**', |
97 |
| - ], |
98 |
| - rules: { |
99 |
| - 'n/no-unsupported-features/node-builtins': [ |
100 |
| - 'error', |
101 |
| - { |
102 |
| - version: '>=22.0.0', |
103 |
| - }, |
104 |
| - ], |
105 |
| - }, |
106 |
| - }, |
107 |
| - ...oxlint.configs['flat/recommended'], |
108 |
| -); |
| 3 | +export default config; |
0 commit comments