Skip to content

How to configure parser in eslintrc.js #2203

Answered by skyrocks
moooofish asked this question in Q&A
Discussion options

You must be logged in to vote

package.json

    "@typescript-eslint/eslint-plugin": "^4.15.0",
    "@typescript-eslint/parser": "^4.15.0",
    "eslint-config-prettier": "^7.2.0",
    "eslint-plugin-prettier": "^3.3.1",
    "eslint-plugin-vue": "^7.5.0",
    "prettier": "^2.2.1",

eslintrc.js

module.exports = {
  root: true,
  env: {
    browser: true,
    node: true,
    es6: true
  },
  parser: 'vue-eslint-parser',
  parserOptions: {
    parser: '@typescript-eslint/parser',
    ecmaVersion: 2020,
    sourceType: 'module',
    ecmaFeatures: {
      jsx: true
    }
  },
  globals: {
    process: true
  },
  extends: [
    'plugin:vue/vue3-recommended',
    'plugin:@typescript-eslint/recommended',
    'prettier/@typescri…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@moooofish
Comment options

@jonaskuske
Comment options

@moooofish
Comment options

Answer selected by moooofish
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants