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

Also had to add a `babel.config.js` for it to work
This commit is contained in:
JC Brand 2022-08-09 11:41:08 +02:00
parent 5f6e70289b
commit 603f8349e8
7 changed files with 566 additions and 489 deletions

View File

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

View File

@ -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
babel.config.json Normal file
View File

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

1014
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -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",

View File

@ -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/,

View File

@ -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',