Skip to content
This repository has been archived by the owner on Mar 13, 2022. It is now read-only.

Added extensions won't run w/o /* eslint-disable */ #7

Open
MichaelJCole opened this issue May 3, 2019 · 3 comments
Open

Added extensions won't run w/o /* eslint-disable */ #7

MichaelJCole opened this issue May 3, 2019 · 3 comments

Comments

@MichaelJCole
Copy link
Contributor

This might be a more general Quasar extension bug. While testing this extension I got the error below because the file created by quasar ext add didn't conform to the eslint settings from quasar create. This error breaks the "magic" of automated code scaffolding tools.

Some options might be:

  1. put /* eslint-disable */ a the top of files at extension creation w/ notes in the extension docs.
  2. reformat files after copying them (no idea how)
  3. ?
$ quasar create feathers-test -b dev
$ cd feathers-test
$ quasar ext add @quasar/feathersjs
$ quasar dev

 Dev mode.......... spa
 Pkg quasar........ v1.0.0-beta.20
 Pkg @quasar/app... v1.0.0-beta.22
 Debugging......... enabled

 app:extension Running "@quasar/feathersjs" Quasar App Extension... +0ms
 app:quasar-conf Reading quasar.conf.js +4ms
 app:dev Checking listening address availability (0.0.0.0:8080)... +2ms
 app:webpack Extending SPA Webpack config +242ms
 app:generator Generating Webpack entry point +5ms
 app:dev-server Booting up... +2ms


  SPA █████████████████████████ [100%] in ~6s



 ERROR  Failed to compile with 2 errors                                                                                                                                 07:14:08

 error  in ./src/api/feathers.js

Module Error (from ./node_modules/eslint-loader/index.js):

/home/michael/scm/feathers-test/src/api/feathers.js
   8:1  error  Expected indentation of 2 spaces but found 1 tab  indent
   8:1  error  Unexpected tab character                          no-tabs
  14:1  error  Expected indentation of 2 spaces but found 1 tab  indent
  14:1  error  Unexpected tab character                          no-tabs
  15:1  error  Expected indentation of 2 spaces but found 1 tab  indent
  15:1  error  Unexpected tab character                          no-tabs
  16:1  error  Expected indentation of 2 spaces but found 1 tab  indent
  16:1  error  Unexpected tab character                          no-tabs
  17:1  error  Unexpected tab character                          no-tabs
  17:1  error  Expected indentation of 2 spaces but found 1 tab  indent
  18:1  error  Unexpected tab character                          no-tabs
  18:1  error  Expected indentation of 2 spaces but found 1 tab  indent
  19:1  error  Expected indentation of 2 spaces but found 1 tab  indent
  19:1  error  Unexpected tab character                          no-tabs
  20:1  error  Unexpected tab character                          no-tabs
  20:1  error  Expected indentation of 2 spaces but found 1 tab  indent
  21:1  error  Unexpected tab character                          no-tabs
  21:1  error  Expected indentation of 2 spaces but found 1 tab  indent

✖ 18 problems (18 errors, 0 warnings)
  9 errors and 0 warnings potentially fixable with the `--fix` option.


 @ ./src/store/index.js 4:0-39 6:33-41
 @ ./.quasar/app.js
 @ ./.quasar/client-entry.js
 @ multi (webpack)-dev-server/client?http://0.0.0.0:8080 (webpack)/hot/dev-server.js ./.quasar/client-entry.js

 error  in ./src/store/index.js

Module Error (from ./node_modules/eslint-loader/index.js):

/home/michael/scm/feathers-test/src/store/index.js
   7:1  error  Expected indentation of 2 spaces but found 1 tab   indent
   7:1  error  Unexpected tab character                           no-tabs
   8:1  error  Expected indentation of 2 spaces but found 1 tab   indent
   8:1  error  Unexpected tab character                           no-tabs
   9:1  error  Expected indentation of 2 spaces but found 1 tab   indent
   9:1  error  Unexpected tab character                           no-tabs
  10:1  error  Expected indentation of 2 spaces but found 1 tab   indent
  10:1  error  Unexpected tab character                           no-tabs
  21:1  error  Expected indentation of 2 spaces but found 1 tab   indent
  21:1  error  Unexpected tab character                           no-tabs
  22:1  error  Expected indentation of 4 spaces but found 2 tabs  indent
  22:1  error  Unexpected tab character                           no-tabs
  23:1  error  Expected indentation of 6 spaces but found 3 tabs  indent
  23:1  error  Unexpected tab character                           no-tabs
  23:4  error  'example' is not defined                           no-undef
  24:1  error  Expected indentation of 4 spaces but found 2 tabs  indent
  24:1  error  Unexpected tab character                           no-tabs
  25:1  error  Unexpected tab character                           no-tabs
  25:1  error  Expected indentation of 4 spaces but found 2 tabs  indent
  26:1  error  Expected indentation of 6 spaces but found 3 tabs  indent
  26:1  error  Unexpected tab character                           no-tabs
  28:1  error  Unexpected tab character                           no-tabs
  28:1  error  Expected indentation of 6 spaces but found 3 tabs  indent
  29:1  error  Expected indentation of 8 spaces but found 4 tabs  indent
  29:1  error  Unexpected tab character                           no-tabs
  30:1  error  Expected indentation of 6 spaces but found 3 tabs  indent
  30:1  error  Unexpected tab character                           no-tabs
  31:1  error  Unexpected tab character                           no-tabs
  31:1  error  Expected indentation of 4 spaces but found 2 tabs  indent
  32:1  error  Expected indentation of 2 spaces but found 1 tab   indent
  32:1  error  Unexpected tab character                           no-tabs
  34:1  error  Unexpected tab character                           no-tabs
  34:1  error  Expected indentation of 2 spaces but found 1 tab   indent

✖ 33 problems (33 errors, 0 warnings)
  16 errors and 0 warnings potentially fixable with the `--fix` option.


 @ ./.quasar/app.js 15:0-46 19:21-32 19:50-61 21:7-18
 @ ./.quasar/client-entry.js
 @ multi (webpack)-dev-server/client?http://0.0.0.0:8080 (webpack)/hot/dev-server.js ./.quasar/client-entry.js
@MichaelJCole MichaelJCole changed the title Extensions doomed w/o /* eslint-disable */ Added extensions won't run w/o /* eslint-disable */ May 3, 2019
@MichaelJCole
Copy link
Contributor Author

I just noticed this in the output:

 [*] Running eslint --fix to comply with chosen preset rules...

So this may likely be an already solved problem.

@nothingismagick
Copy link
Contributor

nothingismagick commented May 3, 2019 via email

@corepay
Copy link

corepay commented May 18, 2019

I think general issue with webpack and eslint - i struggle with this on both nuxt builds and quasar. Easy fix is in build config:

    build: {
      scopeHoisting: true,
      // vueRouterMode: 'history',
      // vueCompiler: true,
      // gzip: true,
      // analyze: true,
      // extractCSS: false,
      extendWebpack (cfg) {
        cfg.module.rules.push({
          enforce: 'pre',
          test: /\.(js|vue)$/,
          loader: 'eslint-loader',
          exclude: /node_modules/,     <- (comma)
->          options: {
->            fix: true
->          }
        })
      }
    },

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants