Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: Config "typescript-eslint/disable-type-checked": Key "files": Expected value to be a non-empty array at user-defined index 12. #91

Closed
kadeem-lewis opened this issue Oct 14, 2024 · 3 comments

Comments

@kadeem-lewis
Copy link

kadeem-lewis commented Oct 14, 2024

I recently updated to v14 of eslint-config-typescript and the flat config and I have started getting the following error

TypeError: Config "typescript-eslint/disable-type-checked": Key "files": Expected value to be a non-empty array at user-defined index 12.

Originally I updated to v14.1 and whenever I attempted to run eslint I would get that error. I downgraded to v14.0.0 and the error disappeared from the command line and I was able to run eslint normally but the error still exists when looking at the output of the vscode eslint plugin

this is my config file

import pluginVue from "eslint-plugin-vue";
import vueTsEslintConfig from "@vue/eslint-config-typescript";
import skipFormattingConfig from "@vue/eslint-config-prettier/skip-formatting";

export default [
  ...pluginVue.configs["flat/recommended"],
  ...vueTsEslintConfig(),
  skipFormattingConfig,
  {
    name: "app/files-to-lint",
    files: ["**/*.{ts,mts,tsx,vue}"],
  },
  {
    name: "app/files-to-ignore",
    ignores: [
      "**/dist/**",
      "**/dist-ssr/**",
      "**/coverage/**",
      "functions/*",
      "**/.*",
    ],
  },
  {
    name: "app/other-settings",
    settings: {
      "import/core-modules": ["vue-router/auto", "vue-router/auto-routes"],
    },
    rules: {
      "vue/multi-word-component-names": "off",
    },
    languageOptions: {
      ecmaVersion: "latest",
      globals: {
        definePage: "readonly",
      },
    },
  },
];

I am using vscode in WSL2

These are my dev dependencies:

"devDependencies": {
    "@faker-js/faker": "^8.4.1",
    "@playwright/test": "^1.46.1",
    "@rushstack/eslint-patch": "^1.10.4",
    "@tsconfig/node20": "^20.1.4",
    "@types/jsdom": "^21.1.7",
    "@types/node": "^22.5.0",
    "@vitejs/plugin-vue": "^5.1.4",
    "@vue/eslint-config-prettier": "^10.0.0",
    "@vue/eslint-config-typescript": "^14.0.0",
    "@vue/test-utils": "^2.4.6",
    "@vue/tsconfig": "^0.5.1",
    "autoprefixer": "^10.4.20",
    "eslint": "^9.12.0",
    "eslint-plugin-vue": "^9.29.0",
    "npm-run-all2": "^6.2.2",
    "prettier": "^3.3.3",
    "prettier-plugin-tailwindcss": "^0.6.6",
    "tailwindcss": "^3.4.10",
    "typescript": "^5.6.3",
    "unplugin-vue-router": "^0.10.8",
    "vite": "^5.4.8",
    "vite-plugin-vue-devtools": "^7.4.6",
    "vite-plugin-vue-layouts": "^0.11.0",
    "vitest": "^2.0.5",
    "vue-tsc": "^2.1.6"
  }
@Qionar
Copy link

Qionar commented Oct 15, 2024

Yeah, have the same problem. I console loged the vueTsEslintConfig() and literally see an empty array. Could you fix it ASAP please?

Zrzut ekranu 2024-10-15 o 09 48 14

@Qionar
Copy link

Qionar commented Oct 15, 2024

@kadeem-lewis Like a quick solution - temporary move to the previous version "@vue/eslint-config-typescript": "14.0.1"

@haoqunjiang
Copy link
Member

Fixed in 14.1.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants