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

Lint error when adding typescript support to Quasar V1 project #9

Open
dsl101 opened this issue Apr 3, 2023 · 1 comment
Open

Lint error when adding typescript support to Quasar V1 project #9

dsl101 opened this issue Apr 3, 2023 · 1 comment
Assignees

Comments

@dsl101
Copy link

dsl101 commented Apr 3, 2023

Describe the bug
After following the steps here to add TypeScript support to a legacy project, ESLint would no longer run.

To Reproduce
Steps to reproduce the behavior:

  1. Set up a Quasar V1 project without Typescript support
  2. Add TS support following the steps on that page

After updating .eslintrc.js, I had the following setup:

  extends: [
    'eslint:recommended',
    'plugin:vue/recommended',
    'plugin:quasar/standard',
    'plugin:@typescript-eslint/eslint-recommended',
    'plugin:@typescript-eslint/recommended',
  ],
  plugins: [
    '@typescript-eslint',
    'vue',
  ],

On running ESLint on a single TS file:

> eslint .\src\utils.ts

Oops! Something went wrong! :(

ESLint: 8.35.0

TypeError: Error while loading rule 'quasar/no-invalid-qfield-usage': context.parserServices.defineTemplateBodyVisitor is not a function

Based on a suggestion on Discord, this is likely due to the Quasar plugin either not being compatible with ESLint 8, or should not be used in plain TS files.

Desktop (please complete the following information):

  • OS: Windows 10
@jmsanchezbz
Copy link

Same error

    "extends": [
        'eslint:recommended',
        'plugin:vue/vue3-essential',
        'plugin:quasar/recommended'
    ],
    "plugins": [
        "vue",
        '@typescript-eslint'
    ],

yarn lint

Oops! Something went wrong! :(

ESLint: 8.48.0

TypeError: Error while loading rule 'quasar/no-invalid-qfield-usage': context.parserServices.defineTemplateBodyVisitor is not a function

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