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

    [solved] eslint no-tabs errors

    Help
    3
    5
    8348
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • D
      dgk last edited by dgk

      I use atom and the eslint atom package for other work. I keep an eslintrc.js file in my home directory for all projects.
      https://github.com/AtomLinter/linter-eslint

      I’m just now getting back to messing with quasar and when running quasar dev or lint on the default template I get errors that keep it from building related to spaces vs tabs (I use tabs). As there is a .eslintrc.js file in the project directory the atom package should use it rather then my “global” one but this seems not the case. I also get errors in atom itself from the eslint plugin

      Can someone using atom eslinter give some advice how to resolve this.

      /mnt/AllData/hacking/eval-repos/645light/src/main.js
        16:2  error  Unexpected tab character                           no-tabs
        17:2  error  Unexpected tab character                           no-tabs
        17:2  error  Expected indentation of 2 spaces but found 1 tab   indent
      ...
      Errors:
        6  http://eslint.org/docs/rules/no-tabs
        5  http://eslint.org/docs/rules/indent
      
       @ multi ./build/hot-reload ./src/main.js
      
      1 Reply Last reply Reply Quote 0
      • s.molinari
        s.molinari last edited by s.molinari

        I believe you need to either remove the eslintrc.js file from your app (the one Quasar offers) or edit it to fit your rules.

        Scott

        1 Reply Last reply Reply Quote 0
        • D
          dgk last edited by dgk

          Turns out somehow the no-tabs is being set (how I have not clue, maybe in html plugin??)

          If one adds
          "no-tabs": 0,
          the errors go away

          It’s enough of a “bug” that the maintainers should add this to the template’s .eslintrc.js. That way for those of us liking tabs errors are not thrown but otherwise spaces are accepted by default
          @rstoenescu

          See this post this stackoverflow post
          https://stackoverflow.com/questions/40893518/eslint-unexpected-tab-character-when-indent-rule-set-to-tab

          s.molinari 1 Reply Last reply Reply Quote 0
          • N
            nueko last edited by

            maybe you should try editorconfig

            1 Reply Last reply Reply Quote 0
            • s.molinari
              s.molinari @dgk last edited by

              @dgk said in [solved] eslint no-tabs errors:

              It’s enough of a “bug” that the maintainers should add this to the template’s .eslintrc.js. That way for those of us liking tabs errors are not thrown but otherwise spaces are accepted by default
              @rstoenescu

              The linting rules Quasar follows are from StandardJS, with a couple of exceptions.

              http://beta.quasar-framework.org/guide/app-linter-configuration.html
              https://github.com/standard/standard/blob/master/RULES.md

              As you can see from the rules of StandardJS, spaces should be used for indentation.

              It’s not a bug. It’s how it should be (since we are following that linting standard). You’ve found the correct solution though. Just modify the linting config, as you have.

              Scott

              1 Reply Last reply Reply Quote 0
              • First post
                Last post