Forráskód Böngészése

Bump eslint and use `@babel/eslint-parser`

Also had to add a `babel.config.js` for it to work
JC Brand 2 éve
szülő
commit
603f8349e8
7 módosított fájl, 408 hozzáadás és 322 törlés
  1. 1 1
      .eslintrc.json
  2. 0 1
      Makefile
  3. 10 0
      babel.config.json
  4. 390 299
      package-lock.json
  5. 2 2
      package.json
  6. 1 11
      webpack/webpack.common.js
  7. 4 8
      webpack/webpack.nodeps.js

+ 1 - 1
.eslintrc.json

@@ -1,5 +1,5 @@
 {
-    "parser": "babel-eslint",
+    "parser": "@babel/eslint-parser",
     "parserOptions": {
         "ecmaVersion": 2017,
         "sourceType": "module",

+ 0 - 1
Makefile

@@ -1,5 +1,4 @@
 # You can set these variables from the command line.
-BABEL			?= node_modules/.bin/babel
 BOOTSTRAP		= ./node_modules/
 BUILDDIR		= ./docs
 KARMA			?= ./node_modules/.bin/karma

+ 10 - 0
babel.config.json

@@ -0,0 +1,10 @@
+{
+    "presets": [
+        ["@babel/preset-env", {
+            "targets": {
+                "browsers": [">1%", "not ie 11", "not op_mini all", "not dead"]
+            }
+        }]
+    ],
+    "plugins": []
+}

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 390 - 299
package-lock.json


+ 2 - 2
package.json

@@ -65,16 +65,16 @@
   "devDependencies": {
     "@babel/cli": "^7.17.10",
     "@babel/core": "^7.18.5",
+    "@babel/eslint-parser": "^7.18.9",
     "@babel/preset-env": "^7.18.2",
     "@converse/headless": "file:src/headless",
     "autoprefixer": "^10.4.5",
-    "babel-eslint": "^10.1.0",
     "babel-loader": "^8.2.5",
     "bootstrap.native-loader": "2.0.0",
     "clean-css-cli": "^5.6.0",
     "copy-webpack-plugin": "^10.2.4",
     "css-loader": "^6.7.1",
-    "eslint": "^7.32.0",
+    "eslint": "^8.21.0",
     "fast-text-encoding": "^1.0.3",
     "html-webpack-plugin": "^5.3.2",
     "http-server": "^14.1.0",

+ 1 - 11
webpack/webpack.common.js

@@ -87,17 +87,7 @@ module.exports = {
                 /node_modules\/@converse/,
             ],
             use: {
-                loader: 'babel-loader',
-                options: {
-                    presets: [
-                        ["@babel/preset-env", {
-                            "targets": {
-                                "browsers": [">1%", "not ie 11", "not op_mini all", "not dead"]
-                            }
-                        }]
-                    ],
-                    plugins: []
-                }
+                loader: 'babel-loader'
             }
         }, {
             test: /bootstrap\.native/,

+ 4 - 8
webpack/webpack.nodeps.js

@@ -26,12 +26,6 @@ module.exports = merge(common, {
                                 "browsers": ["ie 11"]
                             }
                         }]
-                    ],
-                    plugins: [
-                        '@babel/plugin-proposal-class-properties',
-                        '@babel/plugin-proposal-nullish-coalescing-operator',
-                        '@babel/plugin-proposal-optional-chaining',
-                        '@babel/plugin-syntax-dynamic-import'
                     ]
                 }
             }
@@ -53,13 +47,15 @@ module.exports = merge(common, {
         }]
     },
     externals: [{
-        'pluggable.js': 'pluggable',
         '@converse/skeletor': 'skeletor',
-        'localforage': 'localforage',
         'filesize': 'filesize',
         'jed': 'jed',
+        'lit': 'lit',
+        'lit-html': 'lit-html',
+        'localforage': 'localforage',
         'lodash': 'lodash',
         'lodash.noconflict': 'lodash.noconflict',
+        'pluggable.js': 'pluggable',
         'sizzle': 'sizzle',
         'strophe.js': 'strophe',
         'urijs': 'urijs',

Nem az összes módosított fájl került megjelenítésre, mert túl sok fájl változott