Fixes: Extra: 1) Refactor ESLint configuration to simplify overrides with modular imports for Astro and Vue; 2) Format ESLint config for consistency.
48 lines
1.1 KiB
JavaScript
48 lines
1.1 KiB
JavaScript
import astroPlugin from 'eslint-plugin-astro';
|
|
import astroParser from 'astro-eslint-parser';
|
|
import vuePlugin from 'eslint-plugin-vue';
|
|
import vueParser from 'vue-eslint-parser';
|
|
|
|
export default [
|
|
{
|
|
files: ['*.astro'],
|
|
languageOptions: {
|
|
parser: astroParser,
|
|
parserOptions: {
|
|
ecmaVersion: 2021,
|
|
sourceType: 'module',
|
|
},
|
|
},
|
|
plugins: {
|
|
astro: astroPlugin,
|
|
},
|
|
extends: ['plugin:astro/recommended'],
|
|
rules: {},
|
|
},
|
|
|
|
{
|
|
files: ['*.vue'],
|
|
languageOptions: {
|
|
parser: vueParser,
|
|
parserOptions: {
|
|
ecmaVersion: 2021,
|
|
sourceType: 'module',
|
|
},
|
|
},
|
|
plugins: {
|
|
vue: vuePlugin,
|
|
},
|
|
extends: ['plugin:vue/vue3-recommended'],
|
|
rules: {},
|
|
},
|
|
|
|
{
|
|
files: ['*.js', '*.jsx'],
|
|
languageOptions: {
|
|
ecmaVersion: 2021,
|
|
sourceType: 'module',
|
|
},
|
|
extends: ['eslint:recommended'],
|
|
rules: {},
|
|
},
|
|
];
|