5.0.8 • Published 2 years ago

@vue/cli-plugin-eslint v5.0.8

Weekly downloads
627,103
License
MIT
Repository
github
Last release
2 years ago

@vue/cli-plugin-eslint

eslint plugin for vue-cli

Injected Commands

  • vue-cli-service lint

    Usage: vue-cli-service lint [options] [...files]
    
    Options:
    
      --format [formatter] specify formatter (default: stylish)
      --no-fix             do not fix errors
      --max-errors         specify number of errors to make build failed (default: 0)
      --max-warnings       specify number of warnings to make build failed (default: Infinity)
      --output-file        specify file to write report to

Lints and fixes files. If no specific files are given, it lints all files in src and tests, as well as all JavaScript files in the root directory (these are most often config files such as babel.config.js or .eslintrc.js).

Other ESLint CLI options are not supported.

::: tip vue-cli-service lint will lint dotfiles .*.js by default. If you want to follow ESLint's default behavior instead, consider adding a .eslintignore file in your project. :::

Configuration

ESLint can be configured via .eslintrc or the eslintConfig field in package.json. See the ESLint configuration docs for more detail.

::: tip The following option is under the section of vue.config.js. It is respected only when @vue/cli-plugin-eslint is installed. :::

Lint-on-save during development with eslint-loader is enabled by default. It can be disabled with the lintOnSave option in vue.config.js:

module.exports = {
  lintOnSave: false
}

When set to true, eslint-loader will emit lint errors as warnings. By default, warnings are only logged to the terminal and does not fail the compilation.

To make lint errors show up in the browser overlay, you can use lintOnSave: 'error'. This will force eslint-loader to always emit errors. this also means lint errors will now cause the compilation to fail.

Alternatively, you can configure the overlay to display both warnings and errors:

// vue.config.js
module.exports = {
  devServer: {
    overlay: {
      warnings: true,
      errors: true
    }
  }
}

When lintOnSave is a truthy value, eslint-loader will be applied in both development and production. If you want to disable eslint-loader during production build, you can use the following config:

// vue.config.js
module.exports = {
  lintOnSave: process.env.NODE_ENV !== 'production'
}

Installing in an Already Created Project

vue add eslint

Injected webpack-chain Rules

  • config.module.rule('eslint')
  • config.module.rule('eslint').use('eslint-loader')
@linan919/nan-image-slider@linan919/nan-testvue-cli-plugin-agdkmagnoabsass-sdfddabc-jdjdjjdeuaaaiowttest@gametactic/meta-vue-dev@yujinpan/vue-component-packclim-clim-1@startdt/cli-service-global@yetan/yetan-clis-admin-uidependencies-install-testsidebar-test@maywide/admin-element@maywide/element@maywide/h5-element@maywide/television-npm@meicloud/eslint-configtestmagnovvi-ui@infinitebrahmanuniverse/nolb-_vue_@everything-registry/sub-chunk-994vue-maker-plusvue-cli-plugin-yayaweekenderweweb-clientxme-cli-serviceshared-dependencies-ctl-test-swathishoushoushipsamplevuesamplevuetestakshayscalra-flexformthinvuevite-gardenvue-easy-adminlint-climagicship-cmslemon-cmdliuyi-vuelibkekcomponentshistory-datainfra-uijustkh-apart-modal-componentk-mark-editorjquery-cli-servicehomebridge-infraspec-uilambo-erlambo-er-drawmy-stitch-layerpaas-comparerpackages-servepackages-servicepreporterninjakatt-plugin-webserverpo-microapp-basereact-cli-servicenetmodular-module-adminextnetmodular-module-commonextnetmodular-module-reportextradiate-frameworkragu-vue-server-mixinsratio-idratio-uissy-npm-componentrux-browser-mall-helperrui-rkitska-dev-dependenciessouche-sptimely-data@carlos.gonzalez/banner@carlos.gonzalez/cm-banner@2bitlab/dev-pkg@2bitlab/eslint-config-vue-prettier-ts@378q/eslint-config-vue-ts@belloai/eslint-config-vue-prettier-tsysrysycvuejs-token-viewervuetstestvue-test-onesvue-ssr-pockvuecom-cli-servicevuecli-ts-npmvue3-organization-chart@fe6/norm@fly-vue/builder@houlagins/dist-builder@edwmurph/eslint-config@kservice/eslint-config-vue2@kvuse/eslint-config-vue2@liuyi_npm/vue-cli-plugin-format@lchz/eslint-config-vproject@lchz/project-eslint-config@lazyb/eslint-config@loveyunk/eslint-config-vue-prettier-airbnb@lingshugroup/icons@linksmile-vue3-scaff/environ
5.0.8

2 years ago

5.0.7

2 years ago

5.0.6

2 years ago

5.0.5

2 years ago

4.5.18

2 years ago

4.5.19

2 years ago

5.0.4

3 years ago

5.0.3

3 years ago

5.0.2

3 years ago

4.5.16

3 years ago

4.5.17

3 years ago

5.0.1

3 years ago

5.0.0

3 years ago

5.0.0-rc.2

3 years ago

5.0.0-rc.3

3 years ago

5.0.0-rc.1

3 years ago

5.0.0-beta.7

3 years ago

5.0.0-rc.0

3 years ago

4.5.15

3 years ago

5.0.0-beta.6

3 years ago

5.0.0-beta.5

3 years ago

4.5.14

3 years ago

5.0.0-beta.4

3 years ago

5.0.0-beta.3

3 years ago

5.0.0-beta.2

3 years ago

5.0.0-beta.0

4 years ago

5.0.0-beta.1

4 years ago

4.5.13

4 years ago

5.0.0-alpha.8

4 years ago

4.5.12

4 years ago

5.0.0-alpha.7

4 years ago

5.0.0-alpha.6

4 years ago

5.0.0-alpha.5

4 years ago

5.0.0-alpha.4

4 years ago

5.0.0-alpha.3

4 years ago

4.5.11

4 years ago

5.0.0-alpha.2

4 years ago

5.0.0-alpha.1

4 years ago

4.5.10

4 years ago

5.0.0-alpha.0

4 years ago

4.5.9

4 years ago

4.5.8

4 years ago

4.5.7

4 years ago

4.5.6

4 years ago

4.5.5

4 years ago

4.5.4

4 years ago

4.5.3

4 years ago

4.5.2

4 years ago

4.5.1

4 years ago

4.5.0

4 years ago

4.4.6

4 years ago

4.4.5

4 years ago

4.4.3

4 years ago

4.4.4

4 years ago

4.4.2

4 years ago

4.4.1

5 years ago

4.4.0

5 years ago

4.3.1

5 years ago

4.3.0

5 years ago

4.2.3

5 years ago

4.2.2

5 years ago

4.2.1

5 years ago

4.2.0

5 years ago

4.1.2

5 years ago

4.1.0

5 years ago

4.1.1

5 years ago

4.1.0-beta.0

5 years ago

4.0.5

5 years ago

3.12.1

5 years ago

4.0.4

5 years ago

4.0.3

5 years ago

4.0.2

5 years ago

4.0.1

5 years ago

4.0.0

5 years ago

4.0.0-rc.8

5 years ago

3.12.0

5 years ago

4.0.0-rc.7

5 years ago

4.0.0-rc.6

5 years ago

4.0.0-rc.5

5 years ago

4.0.0-rc.4

5 years ago

4.0.0-rc.3

5 years ago

4.0.0-rc.2

5 years ago

4.0.0-rc.1

5 years ago

3.11.0

5 years ago

4.0.0-rc.0

5 years ago

4.0.0-beta.3

5 years ago

3.10.0

5 years ago

4.0.0-beta.2

5 years ago

4.0.0-beta.1

5 years ago

4.0.0-beta.0

5 years ago

4.0.0-alpha.5

5 years ago

4.0.0-alpha.4

5 years ago

3.9.2

5 years ago

4.0.0-alpha.3

5 years ago

3.9.1

5 years ago

3.9.0

5 years ago

4.0.0-alpha.2

5 years ago

3.8.0

6 years ago

4.0.0-alpha.1

6 years ago

4.0.0-alpha.0

6 years ago

3.7.0

6 years ago

3.6.0

6 years ago

3.5.1

6 years ago

3.5.0

6 years ago

3.4.1

6 years ago

3.4.0

6 years ago

3.3.0

6 years ago

3.2.2

6 years ago

3.2.1

6 years ago

3.2.0

6 years ago

3.1.5

6 years ago

3.1.4

6 years ago

3.1.3

6 years ago

3.1.2

6 years ago

3.1.1

6 years ago

3.1.0

6 years ago

3.0.5

6 years ago

3.0.4

6 years ago

3.0.3

6 years ago

3.0.2

6 years ago

3.0.1

6 years ago

3.0.0

6 years ago

3.0.0-rc.12

6 years ago

3.0.0-rc.11

6 years ago

3.0.0-rc.10

6 years ago

3.0.0-rc.9

6 years ago

3.0.0-rc.8

6 years ago

3.0.0-rc.7

6 years ago

3.0.0-rc.6

6 years ago

3.0.0-rc.5

6 years ago

3.0.0-rc.4

6 years ago

3.0.0-rc.3

6 years ago

3.0.0-rc.2

6 years ago

3.0.0-rc.1

6 years ago

3.0.0-beta.16

6 years ago

3.0.0-beta.15

6 years ago

3.0.0-beta.14

7 years ago

3.0.0-beta.13

7 years ago

3.0.0-beta.12

7 years ago

3.0.0-beta.11

7 years ago

3.0.0-beta.10

7 years ago

3.0.0-beta.9

7 years ago

3.0.0-beta.8

7 years ago

3.0.0-beta.7

7 years ago

3.0.0-beta.6

7 years ago

3.0.0-beta.5

7 years ago

3.0.0-beta.4

7 years ago

3.0.0-beta.3

7 years ago

3.0.0-beta.2

7 years ago

3.0.0-beta.1

7 years ago

3.0.0-alpha.13

7 years ago

3.0.0-alpha.12

7 years ago

3.0.0-alpha.11

7 years ago

3.0.0-alpha.10

7 years ago

3.0.0-alpha.9

7 years ago

3.0.0-alpha.8

7 years ago

3.0.0-alpha.7

7 years ago

3.0.0-alpha.6

7 years ago

3.0.0-alpha.5

7 years ago

3.0.0-alpha.4

7 years ago

3.0.0-alpha.3

7 years ago

3.0.0-alpha.2

7 years ago

3.0.0-alpha.1

7 years ago