import { FlatCompat } from "@eslint/eslintrc";
import js from "@eslint/js";
import prettierConfig from "@vue/eslint-config-prettier";
import vueTsEslintConfig from "@vue/eslint-config-typescript";
import eslintPluginPrettierRecommended from "eslint-plugin-prettier/recommended";
import pluginVue from "eslint-plugin-vue";
import url from "url";
const __dirname = url.fileURLToPath(new URL(".", import.meta.url));
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
// allConfig: js.configs.all,
});
export default [
/** Extend recommended configs */
...compat.extends("plugin:vue/vue3-recommended", "plugin:vuejs-accessibility/recommended", "prettier"),
...pluginVue.configs["flat/recommended"],
...vueTsEslintConfig(),
eslintPluginPrettierRecommended,
prettierConfig,
/** Configuration */
{
languageOptions: {
parserOptions: {
ecmaVersion: "latest",
sourceType: "script",
},
},
files: ["src/**/*.js", "src/**/*.mjs", "src/**/*.ts", "src/**/*.tsx", "src/**/*.vue"],
/** Override rules */
rules: {
"max-len": ["error", { code: 120 }],
"prefer-const": 0,
"@typescript-eslint/ban-ts-comment": ["error", { "ts-ignore": "allow-with-description" }],
"@typescript-eslint/no-explicit-any": "off",
"prettier/prettier": [
"warn",
{},
{
usePrettierrc: true,
},
],
"vuejs-accessibility/label-has-for": [
"error",
{
required: {
some: ["nesting", "id"],
},
},
],
},
},
];
Environment
Node version: 23.1.0
npm version: using bun, 1.1.34
Local ESLint version: 9.15.0
Global ESLint version:
Operating System: Ubuntu 24.04
What parser are you using?
Default (Espree)
What did you do?
Configuration
Configured as above, then ran:
What did you expect to happen?
Expected linting to run
What actually happened?
Link to Minimal Reproducible Example
https://github.com/reflectometry/refl1d/tree/lint-frontend/refl1d/webview/client
Participation
Additional comments
This seems to have been introduced in
9.15.0, as if i downgrade eslint to9.14.0, everything works as expected.