@mpxjs/vue-cli-plugin-mpx-eslint 2.1.29 → 2.1.31

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +4 -8
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -3,21 +3,17 @@ const ESLintPlugin = require('eslint-webpack-plugin')
3
3
  module.exports = function (api, options, webpackConfig) {
4
4
  if (options.lintOnSave) {
5
5
  api.chainWebpack((webpackConfig) => {
6
- const { lintOnSave } = options
7
6
  const extensions = ['js', 'ts', 'mpx']
8
- const treatAllAsWarnings = lintOnSave === true || lintOnSave === 'warning'
9
- const treatAllAsErrors = lintOnSave === 'error'
10
-
11
- const failOnWarning = treatAllAsErrors
12
- const failOnError = !treatAllAsWarnings
13
7
 
14
8
  /** @type {import('eslint-webpack-plugin').Options & import('eslint').ESLint.Options} */
15
9
  const eslintWebpackPluginOptions = {
16
10
  // common to both plugin and ESlint
17
11
  extensions,
18
12
  // ESlint options
19
- failOnWarning,
20
- failOnError
13
+ // 5.x的eslint-webpack-plugin这两个选项是控制是否退出构建的,但是eslint错误上不应该退出构建,所以这里全部禁用
14
+ failOnWarning: false,
15
+ failOnError: false,
16
+ cache: false
21
17
  }
22
18
 
23
19
  webpackConfig
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mpxjs/vue-cli-plugin-mpx-eslint",
3
- "version": "2.1.29",
3
+ "version": "2.1.31",
4
4
  "description": "eslint plugin for mpx-cli",
5
5
  "main": "index.js",
6
6
  "scripts": {