No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    1. Home
    2. Elco
    E
    • Profile
    • Following 0
    • Followers 0
    • Topics 1
    • Posts 3
    • Best 0
    • Groups 0

    Elco

    @Elco

    0
    Reputation
    191
    Profile views
    3
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    Elco Follow

    Latest posts made by Elco

    • RE: eslint error on import form quasar (import/no-extraneous-dependencies) with airbnb style

      Found a fix 🙂

      In eslintrc.js:

      plugins: [
          'html',
          'import',
        ],
        settings: {
          'import/core-modules': [ 'quasar' ],
        },
      

      install npm module eslint-plugin-import

      posted in Help
      E
      Elco
    • RE: eslint error on import form quasar (import/no-extraneous-dependencies) with airbnb style

      It seems to be caused by eslint being unaware of the alias in config/index.js

      posted in Help
      E
      Elco
    • eslint error on import form quasar (import/no-extraneous-dependencies) with airbnb style

      I switched my eslint config to airbnb, because I prefer the style over standard.

      This causes an error in imports from quasar.

      To reproduce:

      quasar init test
      cd test
      npm install
      npm install -s eslint-config-airbnb-base
      

      Then in your .eslintrc.js file, change:
      extends: 'standard' to extends: 'airbnb-base'

      I get this error:

      /home/elco/repos/quasar-template/src/components/Error404.vue
        35:1   error  'quasar' should be listed in the project's dependencies. Run 'npm i -S quasar' to add it  import/no-extraneous-dependencies
        35:29  error  Unable to resolve path to module 'quasar'                                                 import/no-unresolved
        35:29  error  Missing file extension for "quasar"                                                       import/extensions
      

      This is with the standard template, I only changed the linter. I can obviously install quasar, but that resolves to this (https://www.npmjs.com/package/quasar), which is not the right thing.

      How can I make eslint understand the imports from quasar?


      PS: I use this to automatically fix linting errors (also makes switching from standard to airbnb easier):

      In package.json, add this line to scripts:
      "lint-fix": "eslint --fix --ext .js,.vue src"

      Now you can fix your linting errors by running: npm run lint-fix

      posted in Help
      E
      Elco