Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions template-eslint/vue-js/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
import js from '@eslint/js';
import vue from 'eslint-plugin-vue';
import pluginVue from 'eslint-plugin-vue';
import { defineConfig, globalIgnores } from 'eslint/config';
import globals from 'globals';

export default [
export default defineConfig([
{
name: 'app/files-to-lint',
files: ['**/*.{js,mjs,jsx,vue}'],
},
globalIgnores(['**/dist/**', '**/dist-ssr/**', '**/coverage/**']),
{ languageOptions: { globals: globals.browser } },
js.configs.recommended,
...vue.configs['flat/essential'],
{ ignores: ['dist/'] },
];
...pluginVue.configs['flat/essential'],
]);
31 changes: 20 additions & 11 deletions template-eslint/vue-ts/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,14 +1,23 @@
import js from '@eslint/js';
import vue from 'eslint-plugin-vue';
import {
defineConfigWithVueTs,
vueTsConfigs,
} from '@vue/eslint-config-typescript';
import pluginVue from 'eslint-plugin-vue';
import { globalIgnores } from 'eslint/config';
import globals from 'globals';
import ts from 'typescript-eslint';
import { defineConfigWithVueTs, vueTsConfigs } from '@vue/eslint-config-typescript';

export default [
// To allow more languages other than `ts` in `.vue` files, uncomment the following lines:
// import { configureVueProject } from '@vue/eslint-config-typescript'
// configureVueProject({ scriptLangs: ['ts', 'tsx'] })
// More info at https://github.com/vuejs/eslint-config-typescript/#advanced-setup

export default defineConfigWithVueTs(
{
name: 'app/files-to-lint',
files: ['**/*.{ts,mts,tsx,vue}'],
},
globalIgnores(['**/dist/**', '**/dist-ssr/**', '**/coverage/**']),
{ languageOptions: { globals: globals.browser } },
js.configs.recommended,
...ts.configs.recommended,
...vue.configs['flat/essential'],
...defineConfigWithVueTs(vueTsConfigs.recommended),
{ ignores: ['dist/'] },
];
pluginVue.configs['flat/essential'],
vueTsConfigs.recommended,
);
1 change: 0 additions & 1 deletion template-eslint/vue-ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
"lint": "eslint ."
},
"devDependencies": {
"@eslint/js": "^9.23.0",
"@vue/eslint-config-typescript": "^14.5.0",
"eslint": "^9.23.0",
"eslint-plugin-vue": "^10.0.0",
Expand Down