Skip to content

Commit 022afe3

Browse files
committed
feat: use defineConfig & globalIgnores helpers from ESLint 9.22
1 parent e23389e commit 022afe3

File tree

2 files changed

+6
-10
lines changed

2 files changed

+6
-10
lines changed

Diff for: templates/eslint.config.js.ejs

+4-6
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,21 @@
11
<%_ for (const { importer } of configsBeforeVuePlugin) { _%>
22
<%- importer %>
33
<%_ } _%>
4+
import { defineConfig, globalIgnores } from 'eslint/config'
45
import js from '@eslint/js'
56
import pluginVue from 'eslint-plugin-vue'
67
import globals from 'globals'
78
<%_ for (const { importer } of configsAfterVuePlugin) { _%>
89
<%- importer %>
910
<%_ } _%>
1011

11-
export default [
12+
export default defineConfig([
1213
{
1314
name: 'app/files-to-lint',
1415
files: ['**/*.{<%= fileExtensions.join(',') %>}'],
1516
},
1617

17-
{
18-
name: 'app/files-to-ignore',
19-
ignores: ['**/dist/**', '**/dist-ssr/**', '**/coverage/**'],
20-
},
18+
globalIgnores(['**/dist/**', '**/dist-ssr/**', '**/coverage/**']),
2119

2220
{
2321
languageOptions: {
@@ -35,4 +33,4 @@ export default [
3533
<%_ for (const { content } of configsAfterVuePlugin) { _%>
3634
<%- content %><%# TODO: auto-indent if content's multi-line %>
3735
<%_ } _%>
38-
]
36+
])

Diff for: templates/eslint.config.ts.ejs

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<%_ for (const { importer } of configsBeforeVuePlugin) { _%>
22
<%- importer %>
33
<%_ } _%>
4+
import { globalIgnores } from 'eslint/config'
45
import pluginVue from 'eslint-plugin-vue'
56
import { defineConfigWithVueTs, vueTsConfigs } from '@vue/eslint-config-typescript'
67
<%_ for (const { importer } of configsAfterVuePlugin) { _%>
@@ -18,10 +19,7 @@ export default defineConfigWithVueTs(
1819
files: ['**/*.{<%= fileExtensions.join(',') %>}'],
1920
},
2021

21-
{
22-
name: 'app/files-to-ignore',
23-
ignores: ['**/dist/**', '**/dist-ssr/**', '**/coverage/**'],
24-
},
22+
globalIgnores(['**/dist/**', '**/dist-ssr/**', '**/coverage/**']),
2523

2624
<%_ for (const { content } of configsBeforeVuePlugin) { _%>
2725
<%- content %><%# TODO: auto-indent if content's multi-line %>

0 commit comments

Comments
 (0)