|
1 | 1 | import js from "@eslint/js"; |
2 | | -import { flatConfigs as pluginImportXFlatConfigs } from "eslint-plugin-import-x"; |
3 | 2 | import tseslint from "typescript-eslint"; |
4 | | -import tsParser from "@typescript-eslint/parser"; |
5 | | -import * as tsResolver from "eslint-import-resolver-typescript"; |
| 3 | +import { defineConfig, globalIgnores } from "eslint/config"; |
| 4 | +import eslintPluginUnicorn from "eslint-plugin-unicorn"; |
6 | 5 |
|
7 | | -export default tseslint.config( |
8 | | - { ignores: ["dist"] }, |
| 6 | +export default defineConfig([ |
9 | 7 | { |
10 | | - extends: [ |
11 | | - js.configs.recommended, |
12 | | - tseslint.configs.recommended, |
13 | | - pluginImportXFlatConfigs.recommended, |
14 | | - pluginImportXFlatConfigs.typescript, |
15 | | - ], |
16 | | - files: ["**/*.{ts,tsx}"], |
17 | | - languageOptions: { |
18 | | - parser: tsParser, |
19 | | - ecmaVersion: "latest", |
20 | | - sourceType: "module", |
21 | | - }, |
22 | | - settings: { |
23 | | - "import-x/resolver": { |
24 | | - name: "tsResolver", |
25 | | - resolver: tsResolver, |
26 | | - }, |
| 8 | + files: ["src/**/*.{js,mjs,cjs,ts,mts,cts}"], |
| 9 | + plugins: { js }, |
| 10 | + extends: ["js/recommended"], |
| 11 | + }, |
| 12 | + tseslint.configs.recommended, |
| 13 | + eslintPluginUnicorn.configs.recommended, |
| 14 | + globalIgnores(["src/dist/"]), |
| 15 | + { |
| 16 | + rules: { |
| 17 | + "max-params": ["error", 2], |
27 | 18 | }, |
28 | 19 | }, |
29 | | -); |
| 20 | +]); |
0 commit comments