|
1 | | -import { defineConfig, globalIgnores } from 'eslint/config'; |
2 | | -import i18N from 'eslint-plugin-i18n'; |
3 | | -import simpleImportSort from 'eslint-plugin-simple-import-sort'; |
4 | | -import path from 'node:path'; |
5 | | -import { fileURLToPath } from 'node:url'; |
6 | | -import { FlatCompat } from '@eslint/eslintrc'; |
7 | | -import js from '@eslint/js'; |
8 | | -import typescriptEslint from '@typescript-eslint/eslint-plugin'; |
9 | | -import tsParser from '@typescript-eslint/parser'; |
| 1 | +const { defineConfig, globalIgnores } = require('eslint/config'); |
| 2 | +const i18N = require('eslint-plugin-i18n'); |
| 3 | +const simpleImportSort = require('eslint-plugin-simple-import-sort'); |
| 4 | +const { FlatCompat } = require('@eslint/eslintrc'); |
| 5 | +const js = require('@eslint/js'); |
| 6 | +const typescriptEslint = require('@typescript-eslint/eslint-plugin'); |
| 7 | +const tsParser = require('@typescript-eslint/parser'); |
10 | 8 |
|
11 | | -const __filename = fileURLToPath(import.meta.url); |
12 | | -const __dirname = path.dirname(__filename); |
13 | 9 | const compat = new FlatCompat({ |
14 | 10 | baseDirectory: __dirname, |
15 | 11 | recommendedConfig: js.configs.recommended, |
16 | 12 | allConfig: js.configs.all, |
17 | 13 | }); |
18 | 14 |
|
19 | | -export const BASE_CONFIG = { |
| 15 | +const BASE_CONFIG = { |
20 | 16 | extends: compat.extends( |
21 | 17 | 'eslint:recommended', |
22 | 18 | 'plugin:@typescript-eslint/eslint-recommended', |
23 | 19 | 'plugin:@typescript-eslint/recommended', |
24 | 20 | 'prettier', |
25 | | - 'plugin:prettier/recommended', |
| 21 | + 'plugin:prettier/recommended' |
26 | 22 | ), |
27 | 23 |
|
28 | 24 | plugins: { |
@@ -56,7 +52,7 @@ export const BASE_CONFIG = { |
56 | 52 | }, |
57 | 53 | }; |
58 | 54 |
|
59 | | -export default defineConfig([ |
| 55 | +module.exports = defineConfig([ |
60 | 56 | globalIgnores([ |
61 | 57 | 'node_modules', |
62 | 58 | 'build', |
|
0 commit comments