diff options
author | 2019-07-03 17:33:05 +0300 | |
---|---|---|
committer | 2023-01-13 10:37:55 +0300 | |
commit | 21846fd33769576ac9c4a5131dbf4baebdc130f1 (patch) | |
tree | 648afdff586d8506644679c5afce25f087012b36 /vnext | |
parent | 3d822d133debdb3631fe6fb0d119cf1439ca7f9b (diff) |
Webpack: eslint-loader
Diffstat (limited to 'vnext')
-rw-r--r-- | vnext/package.json | 1 | ||||
-rw-r--r-- | vnext/webpack.config.js | 9 | ||||
-rw-r--r-- | vnext/yarn.lock | 57 |
3 files changed, 65 insertions, 2 deletions
diff --git a/vnext/package.json b/vnext/package.json index cd54caff..04fa881e 100644 --- a/vnext/package.json +++ b/vnext/package.json @@ -22,6 +22,7 @@ "css-loader": "^3.0.0", "error-overlay-webpack-plugin": "^0.4.0", "eslint": "^6.0.1", + "eslint-loader": "^2.2.0", "eslint-plugin-babel": "^5.3.0", "eslint-plugin-jest": "^22.7.1", "eslint-plugin-only-ascii": "^0.0.0", diff --git a/vnext/webpack.config.js b/vnext/webpack.config.js index 1218542f..e0c6855e 100644 --- a/vnext/webpack.config.js +++ b/vnext/webpack.config.js @@ -39,7 +39,7 @@ module.exports = (env, argv) => { { test: /\.css$/, use: [ - dev? 'style-loader' : MiniCssExtractPlugin.loader, + dev ? 'style-loader' : MiniCssExtractPlugin.loader, { loader: 'css-loader' }, @@ -65,6 +65,13 @@ module.exports = (env, argv) => { { test: /\.js$/, exclude: /node_modules/, + loader: 'eslint-loader', + enforce: 'pre', + options: { failOnWarning: false, failOnError: true, fix: true }, + }, + { + test: /\.js$/, + exclude: /node_modules/, loader: 'babel-loader' }, { diff --git a/vnext/yarn.lock b/vnext/yarn.lock index b339f75d..fff0f34c 100644 --- a/vnext/yarn.lock +++ b/vnext/yarn.lock @@ -3735,6 +3735,17 @@ escodegen@^1.9.1: optionalDependencies: source-map "~0.6.1" +eslint-loader@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/eslint-loader/-/eslint-loader-2.2.0.tgz#e2322b46fc5584ebbffd13c78089cd27d63565a9" + integrity sha512-O7zOQw6HS1t8H08O8DsAXPccSIu3xduku/aqdjQwPHp/NzIT/nwwkq+Ly5EtGfXo931/yTwiCuB9kjg/0D2sTg== + dependencies: + loader-fs-cache "^1.0.0" + loader-utils "^1.0.2" + object-assign "^4.0.1" + object-hash "^1.1.4" + rimraf "^2.6.1" + eslint-plugin-babel@^5.3.0: version "5.3.0" resolved "https://registry.yarnpkg.com/eslint-plugin-babel/-/eslint-plugin-babel-5.3.0.tgz#2e7f251ccc249326da760c1a4c948a91c32d0023" @@ -4212,6 +4223,15 @@ finalhandler@~1.1.2: statuses "~1.5.0" unpipe "~1.0.0" +find-cache-dir@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-0.1.1.tgz#c8defae57c8a52a8a784f9e31c57c742e993a0b9" + integrity sha1-yN765XyKUqinhPnjHFfHQumToLk= + dependencies: + commondir "^1.0.1" + mkdirp "^0.5.1" + pkg-dir "^1.0.0" + find-cache-dir@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-2.0.0.tgz#4c1faed59f45184530fb9d7fa123a4d04a98472d" @@ -4228,6 +4248,14 @@ find-up@3.0.0, find-up@^3.0.0: dependencies: locate-path "^3.0.0" +find-up@^1.0.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f" + integrity sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8= + dependencies: + path-exists "^2.0.0" + pinkie-promise "^2.0.0" + find-up@^2.0.0, find-up@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7" @@ -6143,6 +6171,14 @@ load-json-file@^4.0.0: pify "^3.0.0" strip-bom "^3.0.0" +loader-fs-cache@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/loader-fs-cache/-/loader-fs-cache-1.0.2.tgz#54cedf6b727e1779fd8f01205f05f6e88706f086" + integrity sha512-70IzT/0/L+M20jUlEqZhZyArTU6VKLRTYRDAYN26g4jfzpJqjipLL3/hgYpySqI9PwsVRHHFja0LfEmsx9X2Cw== + dependencies: + find-cache-dir "^0.1.1" + mkdirp "0.5.1" + loader-runner@^2.3.0: version "2.3.1" resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-2.3.1.tgz#026f12fe7c3115992896ac02ba022ba92971b979" @@ -6621,7 +6657,7 @@ mixin-deep@^1.2.0: for-in "^1.0.2" is-extendable "^1.0.1" -mkdirp@0.5.x, mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.0, mkdirp@~0.5.1: +mkdirp@0.5.1, mkdirp@0.5.x, mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.0, mkdirp@~0.5.1: version "0.5.1" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" integrity sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM= @@ -6967,6 +7003,11 @@ object-copy@^0.1.0: define-property "^0.2.5" kind-of "^3.0.3" +object-hash@^1.1.4: + version "1.3.1" + resolved "https://registry.yarnpkg.com/object-hash/-/object-hash-1.3.1.tgz#fde452098a951cb145f039bb7d455449ddc126df" + integrity sha512-OSuu/pU4ENM9kmREg0BdNrUDIl1heYa4mBZacJc+vVWz4GtAwu7jO8s4AIt2aGRUTqxykpWzI3Oqnsm13tTMDA== + object-keys@^1.0.12: version "1.0.12" resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.0.12.tgz#09c53855377575310cca62f55bb334abff7b3ed2" @@ -7326,6 +7367,13 @@ path-dirname@^1.0.0: resolved "https://registry.yarnpkg.com/path-dirname/-/path-dirname-1.0.2.tgz#cc33d24d525e099a5388c0336c6e32b9160609e0" integrity sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA= +path-exists@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-2.1.0.tgz#0feb6c64f0fc518d9a754dd5efb62c7022761f4b" + integrity sha1-D+tsZPD8UY2adU3V77YscCJ2H0s= + dependencies: + pinkie-promise "^2.0.0" + path-exists@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" @@ -7425,6 +7473,13 @@ pirates@^4.0.1: dependencies: node-modules-regexp "^1.0.0" +pkg-dir@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-1.0.0.tgz#7a4b508a8d5bb2d629d447056ff4e9c9314cf3d4" + integrity sha1-ektQio1bstYp1EcFb/TpyTFM89Q= + dependencies: + find-up "^1.0.0" + pkg-dir@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-3.0.0.tgz#2749020f239ed990881b1f71210d51eb6523bea3" |