MDL-79003 eslint: Upgrade eslint and babel

This commit is a backport of MDL-74301 which should have been backported
at the time.

This patch includes changes:
* Upgrade "@babel/core" to latest point release
* Remove plugins already included into current "@babel/preset-env":
  - "@babel/plugin-proposal-class-properties"
  - "@babel/plugin-proposal-json-strings"
  - "@babel/plugin-syntax-dynamic-import"
  - "@babel/plugin-syntax-import-meta"
* Upgrade "eslint" to latest version
* Replace "eslint-plugin-babel" (depreacted in 2019) with "@babel/eslint-parser" and "@babel/eslint-plugin"
This commit is contained in:
Ruslan Kabalin 2022-03-22 15:36:39 +00:00 committed by Andrew Nicols
parent 2b864ceec3
commit 8092eb95c4
No known key found for this signature in database
GPG Key ID: 6D1E3157C8CFBF14
3 changed files with 528 additions and 390 deletions

View File

@ -151,11 +151,7 @@ module.exports = grunt => {
//
// It also adds the Moodle plugin name to the AMD module definition
// so that it can be imported as expected in other modules.
path.resolve('.grunt/babel-plugin-add-module-to-define.js'),
'@babel/plugin-syntax-dynamic-import',
'@babel/plugin-syntax-import-meta',
['@babel/plugin-proposal-class-properties', {'loose': false}],
'@babel/plugin-proposal-json-strings'
path.resolve('.grunt/babel-plugin-add-module-to-define.js')
],
presets: [
['@babel/preset-env', {

903
npm-shrinkwrap.json generated

File diff suppressed because it is too large Load Diff

View File

@ -5,22 +5,17 @@
"devDependencies": {
"@babel/core": "7.17.5",
"@babel/eslint-parser": "^7.21.3",
"@babel/plugin-proposal-class-properties": "7.16.7",
"@babel/plugin-proposal-json-strings": "7.16.7",
"@babel/plugin-syntax-dynamic-import": "7.8.3",
"@babel/plugin-syntax-import-meta": "7.10.4",
"@babel/eslint-plugin": "7.19.1",
"@babel/preset-env": "7.16.11",
"@xmldom/xmldom": "^0.8.7",
"ajv": "8.10.0",
"async": "3.2.3",
"babel-eslint": "10.1.0",
"babel-plugin-system-import-transformer": "^4.0.0",
"babel-plugin-transform-es2015-modules-amd-lazy": "2.0.1",
"babel-preset-minify": "0.5.1",
"cross-env": "^7.0.3",
"docdash": "^1.2.0",
"eslint": "8.9.0",
"eslint-plugin-babel": "5.3.1",
"eslint": "8.41.0",
"eslint-plugin-jsdoc": "^37.9.4",
"eslint-plugin-promise": "6.0.0",
"fb-watchman": "2.0.1",