Skip to content

Unable to set up ESLint plugin at all #33

@omnichronous

Description

@omnichronous

Using the example volar.config.js from the README I get a parsing error right in the config itself:

image

and at the very start of every .vue file, right in the <template> tag:

Parsing error: "parserOptions.programs" has been provided for @typescript-eslint/parser.⏎The file was not found in any of the provided program instance(s): components/SoAndSo.vue

Here is my .eslintrc.cjs file:

module.exports = {
  "root": true,
  "parser": "vue-eslint-parser",
  "plugins": ["@typescript-eslint"],
  "parserOptions": {
    "parser": "@typescript-eslint/parser"
  },
  "ignorePatterns": ["types/*.ts", "types/**/*.ts"],
  "extends": [
    "@nuxtjs/eslint-config-typescript"
  ],
  "rules": {
    "@typescript-eslint/no-unused-vars": ["warn"],
    "@typescript-eslint/no-var-requires": ["off"],
    "space-before-function-paren": ["error", {
      "anonymous": "never",
      "named": "never",
      "asyncArrow": "never"
    }],
    "vue/no-unused-vars": ["warn"],
    "vue/no-v-html": ["off"]
  },
  "overrides": [
    {
      "files": ["store/**/*.ts"],
      "rules": {
        "@typescript-eslint/no-unused-vars": "off"
      }
    }
  ]
}

And here are some relevant dependencies I have installed:

    "@nuxt/typescript-build": "^2.1.0",
    "@nuxtjs/eslint-config-typescript": "^12.0.0",
    "@nuxtjs/eslint-module": "^3.0.2",
    "@typescript-eslint/eslint-plugin": "^5.57.0",
    "@typescript-eslint/parser": "^5.57.0",
    "@volar-plugins/eslint": "^2.0.0-alpha.21",
    "@volar/language-service": "^1.0.24",
    "typescript": "^4.8.4",
    "vue-component-meta": "^1.2.0",

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions