|
1 | 1 | import js from '@eslint/js';
|
2 |
| -import pluginVue from 'eslint-plugin-vue'; |
3 | 2 | import skipFormatting from '@vue/eslint-config-prettier/skip-formatting';
|
| 3 | +import importPlugin from 'eslint-plugin-import'; |
| 4 | +import pluginVue from 'eslint-plugin-vue'; |
| 5 | +import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended'; |
4 | 6 |
|
5 | 7 | export default [
|
| 8 | + js.configs.recommended, |
| 9 | + ...pluginVue.configs['flat/essential'], |
| 10 | + skipFormatting, |
| 11 | + importPlugin.flatConfigs.recommended, |
| 12 | + eslintPluginPrettierRecommended, |
| 13 | + { |
| 14 | + name: 'app/files-to-ignore', |
| 15 | + ignores: ['**/dist/**', '**/dist-ssr/**', '**/coverage/**'], |
| 16 | + }, |
6 | 17 | {
|
7 | 18 | name: 'app/files-to-lint',
|
8 |
| - files: ['**/*.{js,mjs,jsx,vue}'], |
| 19 | + files: ['**/*.{js,mjs,cjs}'], |
9 | 20 | },
|
10 |
| - |
11 | 21 | {
|
12 |
| - name: 'app/files-to-ignore', |
13 |
| - ignores: ['**/dist/**', '**/dist-ssr/**', '**/coverage/**'], |
| 22 | + files: ['src/**/*.{js,vue}'], |
| 23 | + rules: { |
| 24 | + 'import/extensions': ['error', 'always'], |
| 25 | + }, |
14 | 26 | },
|
15 | 27 |
|
16 |
| - js.configs.recommended, |
17 |
| - ...pluginVue.configs['flat/essential'], |
18 |
| - skipFormatting, |
| 28 | + { |
| 29 | + languageOptions: { |
| 30 | + ecmaVersion: 'latest', |
| 31 | + sourceType: 'module', |
| 32 | + }, |
| 33 | + rules: { |
| 34 | + 'no-unused-vars': 'off', |
| 35 | + 'import/no-dynamic-require': 'warn', |
| 36 | + }, |
| 37 | + }, |
19 | 38 | ];
|
0 commit comments