diff --git a/.babelrc b/.babelrc deleted file mode 100644 index b68dee76..00000000 --- a/.babelrc +++ /dev/null @@ -1,21 +0,0 @@ -{ - "env": { - "test": { - "plugins": ["@babel/plugin-transform-modules-commonjs"] - } - }, - "presets": [ - [ - "@diplodoc/babel-preset", - { - "env": { - "loose": true, - "modules": false, - "exclude": ["transform-typeof-symbol"] - }, - "typescript": true - } - ] - ], - "plugins": ["@babel/plugin-proposal-object-rest-spread"] -} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dbdbd10a..41be5b1e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,7 +18,7 @@ jobs: - name: Setup Node uses: actions/setup-node@v2 with: - node-version: '14.x' + node-version: '18.x' cache: 'npm' - name: Install Packages run: npm ci diff --git a/package-lock.json b/package-lock.json index 0a1d4f83..c2daee7c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -29,11 +29,8 @@ "slugify": "1.6.5" }, "devDependencies": { - "@babel/core": "7.18.10", - "@babel/plugin-proposal-object-rest-spread": "^7.20.7", - "@babel/plugin-transform-modules-commonjs": "7.18.6", "@diplodoc/babel-preset": "^1.0.2", - "@diplodoc/eslint-config": "^1.0.11", + "@diplodoc/eslint-config": "^1.0.14", "@diplodoc/prettier-config": "^1.0.0", "@diplodoc/tsconfig": "^1.0.2", "@types/css": "0.0.34", @@ -52,7 +49,7 @@ "autoprefixer": "^10.4.15", "esbuild": "^0.19.2", "esbuild-sass-plugin": "^2.12.0", - "eslint": "8.22.0", + "eslint": "^8.22.0", "highlight.js": "^11.8.0", "jest": "28.1.3", "markdown-it-testgen": "^0.1.6", @@ -701,26 +698,6 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-proposal-object-rest-spread": { - "version": "7.20.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.20.7.tgz", - "integrity": "sha512-d2S98yCiLxDVmBmE8UjGcfPvNEUbA1U5q5WxaWFUGRzJSVAZqm5W6MbPct0jxnegUZ0niLeNX+IOzEs7wYg9Dg==", - "deprecated": "This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-object-rest-spread instead.", - "dev": true, - "dependencies": { - "@babel/compat-data": "^7.20.5", - "@babel/helper-compilation-targets": "^7.20.7", - "@babel/helper-plugin-utils": "^7.20.2", - "@babel/plugin-syntax-object-rest-spread": "^7.8.3", - "@babel/plugin-transform-parameters": "^7.20.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, "node_modules/@babel/plugin-syntax-async-generators": { "version": "7.8.4", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", @@ -1354,24 +1331,6 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-transform-modules-commonjs": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.18.6.tgz", - "integrity": "sha512-Qfv2ZOWikpvmedXQJDSbxNqy7Xr/j2Y8/KfijM0iJyKkBTmWuvCA1yeH1yDM7NJhBW/2aXxeucLj6i80/LAJ/Q==", - "dev": true, - "dependencies": { - "@babel/helper-module-transforms": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/helper-simple-access": "^7.18.6", - "babel-plugin-dynamic-import-node": "^2.3.3" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, "node_modules/@babel/plugin-transform-modules-systemjs": { "version": "7.23.0", "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.23.0.tgz", @@ -3132,14 +3091,11 @@ "dev": true }, "node_modules/@diplodoc/eslint-config": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/@diplodoc/eslint-config/-/eslint-config-1.0.11.tgz", - "integrity": "sha512-rl6EB6Bduyp4RQ/JCuV+hHdsoncGpktuev8E5lXUfWoBFL49IneanjShPrPoEHuBR+wxuv03Op88uB8fCxtITA==", + "version": "1.0.14", + "resolved": "https://registry.npmjs.org/@diplodoc/eslint-config/-/eslint-config-1.0.14.tgz", + "integrity": "sha512-oQXaJfApdyOHUHwSXLusPVEqmVKAdiSjqEfydH4b/5wZPro8at2USkaF7oSvygaZHuuZ8ubwctHyqJFfYdFnSg==", "dev": true, "dependencies": { - "@babel/core": "^7.23.2", - "@babel/eslint-parser": "^7.22.15", - "@babel/preset-react": "^7.22.15", "@typescript-eslint/eslint-plugin": "^6.0.0", "@typescript-eslint/parser": "^6.0.0", "eslint-config-prettier": "^9.0.0", @@ -3149,74 +3105,6 @@ "eslint-plugin-security": "1.7.1" } }, - "node_modules/@diplodoc/eslint-config/node_modules/@babel/core": { - "version": "7.23.2", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.23.2.tgz", - "integrity": "sha512-n7s51eWdaWZ3vGT2tD4T7J6eJs3QoBXydv7vkUM06Bf1cbVD2Kc2UrkzhiQwobfV7NwOnQXYL7UBJ5VPU+RGoQ==", - "dev": true, - "dependencies": { - "@ampproject/remapping": "^2.2.0", - "@babel/code-frame": "^7.22.13", - "@babel/generator": "^7.23.0", - "@babel/helper-compilation-targets": "^7.22.15", - "@babel/helper-module-transforms": "^7.23.0", - "@babel/helpers": "^7.23.2", - "@babel/parser": "^7.23.0", - "@babel/template": "^7.22.15", - "@babel/traverse": "^7.23.2", - "@babel/types": "^7.23.0", - "convert-source-map": "^2.0.0", - "debug": "^4.1.0", - "gensync": "^1.0.0-beta.2", - "json5": "^2.2.3", - "semver": "^6.3.1" - }, - "engines": { - "node": ">=6.9.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/babel" - } - }, - "node_modules/@diplodoc/eslint-config/node_modules/@babel/eslint-parser": { - "version": "7.22.15", - "resolved": "https://registry.npmjs.org/@babel/eslint-parser/-/eslint-parser-7.22.15.tgz", - "integrity": "sha512-yc8OOBIQk1EcRrpizuARSQS0TWAcOMpEJ1aafhNznaeYkeL+OhqnDObGFylB8ka8VFF/sZc+S4RzHyO+3LjQxg==", - "dev": true, - "dependencies": { - "@nicolo-ribaudo/eslint-scope-5-internals": "5.1.1-v1", - "eslint-visitor-keys": "^2.1.0", - "semver": "^6.3.1" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || >=14.0.0" - }, - "peerDependencies": { - "@babel/core": "^7.11.0", - "eslint": "^7.5.0 || ^8.0.0" - } - }, - "node_modules/@diplodoc/eslint-config/node_modules/@babel/preset-react": { - "version": "7.22.15", - "resolved": "https://registry.npmjs.org/@babel/preset-react/-/preset-react-7.22.15.tgz", - "integrity": "sha512-Csy1IJ2uEh/PecCBXXoZGAZBeCATTuePzCSB7dLYWS0vOEj6CNpjxIhW4duWwZodBNueH7QO14WbGn8YyeuN9w==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5", - "@babel/helper-validator-option": "^7.22.15", - "@babel/plugin-transform-react-display-name": "^7.22.5", - "@babel/plugin-transform-react-jsx": "^7.22.15", - "@babel/plugin-transform-react-jsx-development": "^7.22.5", - "@babel/plugin-transform-react-pure-annotations": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, "node_modules/@diplodoc/eslint-config/node_modules/@typescript-eslint/eslint-plugin": { "version": "6.7.5", "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.7.5.tgz", @@ -3483,12 +3371,6 @@ "url": "https://opencollective.com/eslint" } }, - "node_modules/@diplodoc/eslint-config/node_modules/convert-source-map": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", - "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", - "dev": true - }, "node_modules/@diplodoc/eslint-config/node_modules/eslint-config-prettier": { "version": "9.0.0", "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-9.0.0.tgz", @@ -4566,15 +4448,6 @@ "@jridgewell/sourcemap-codec": "^1.4.14" } }, - "node_modules/@nicolo-ribaudo/eslint-scope-5-internals": { - "version": "5.1.1-v1", - "resolved": "https://registry.npmjs.org/@nicolo-ribaudo/eslint-scope-5-internals/-/eslint-scope-5-internals-5.1.1-v1.tgz", - "integrity": "sha512-54/JRvkLIzzDWshCWfuhadfrfZVPiElY8Fcgmg1HroEly/EDSszzhBAsarCux+D/kOslTRquNzuyGSmUSTTHGg==", - "dev": true, - "dependencies": { - "eslint-scope": "5.1.1" - } - }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -6384,15 +6257,6 @@ "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==", "dev": true }, - "node_modules/babel-plugin-dynamic-import-node": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.3.tgz", - "integrity": "sha512-jZVI+s9Zg3IqA/kdi0i6UDCybUI3aSBLnglhYbSSjKlV7yF1F/5LWv8MakQmvYpnbJDS6fcBL2KzHSxNCMtWSQ==", - "dev": true, - "dependencies": { - "object.assign": "^4.1.0" - } - }, "node_modules/babel-plugin-istanbul": { "version": "6.1.1", "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz", diff --git a/package.json b/package.json index b968c8de..e2c64eb8 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,8 @@ "build:lib": "tsc -p tsconfig.transform.json", "build:dist": "./esbuild/build.js", "test": "jest --coverage", - "lint": "npx eslint --max-warnings=0 \"{src,test}/**/*.{js,jsx,ts,tsx}\"", + "lint": "eslint --max-warnings=0 \"{src,test}/**/*.{js,jsx,ts,tsx}\"", + "lint:fix": "eslint --fix --max-warnings=0 \"{src,test}/**/*.{js,jsx,ts,tsx}\"", "typecheck": "tsc -p tsconfig.json --noEmit", "precommit": "npm run lint && npm run test", "prepublishOnly": "npm run lint && npm run test && npm run build" @@ -45,11 +46,8 @@ "slugify": "1.6.5" }, "devDependencies": { - "@babel/core": "7.18.10", - "@babel/plugin-proposal-object-rest-spread": "^7.20.7", - "@babel/plugin-transform-modules-commonjs": "7.18.6", "@diplodoc/babel-preset": "^1.0.2", - "@diplodoc/eslint-config": "^1.0.11", + "@diplodoc/eslint-config": "^1.0.14", "@diplodoc/prettier-config": "^1.0.0", "@diplodoc/tsconfig": "^1.0.2", "@types/css": "0.0.34", @@ -68,7 +66,7 @@ "autoprefixer": "^10.4.15", "esbuild": "^0.19.2", "esbuild-sass-plugin": "^2.12.0", - "eslint": "8.22.0", + "eslint": "^8.22.0", "highlight.js": "^11.8.0", "jest": "28.1.3", "markdown-it-testgen": "^0.1.6",