Skip to content

Commit 5c4e915

Browse files
authored
chore: upgrade babel eslint (#927)
1 parent bf27aa7 commit 5c4e915

File tree

5 files changed

+1833
-3256
lines changed

5 files changed

+1833
-3256
lines changed

.eslintrc.js

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/** @type {import('eslint').Linter.Config} */
22
module.exports = {
3-
plugins: ['@nrwl/nx', 'lodash'],
3+
plugins: ['lodash'],
44
ignorePatterns: ['node_modules', 'release', 'html-report'],
55
globals: {
66
page: true,
@@ -16,7 +16,6 @@ module.exports = {
1616
{
1717
files: ['*.ts', '*.tsx', '*.js', '*.jsx'],
1818
extends: [
19-
'plugin:@nrwl/nx/javascript',
2019
'plugin:import/recommended',
2120
'plugin:prettier/recommended',
2221
],
@@ -36,34 +35,20 @@ module.exports = {
3635
'import/named': 'off',
3736
'no-console': 'warn',
3837
'@typescript-eslint/no-empty-function': 'off',
39-
// for more detail view here https://nx.dev/structure/monorepo-tags
40-
'@nrwl/nx/enforce-module-boundaries': [
41-
'error',
42-
{
43-
enforceBuildableLibDependency: false,
44-
allow: [],
45-
depConstraints: [
46-
{
47-
sourceTag: '*',
48-
onlyDependOnLibsWithTags: ['*'],
49-
},
50-
],
51-
},
52-
],
5338
},
5439
},
5540
// js files
5641
{
5742
files: ['*.js', '*.jsx'],
58-
extends: ['plugin:@nrwl/nx/javascript'],
43+
extends: [],
5944
rules: {
6045
'@typescript-eslint/no-empty-function': 'off',
6146
},
6247
},
6348
// ts files
6449
{
6550
files: ['*.ts', '*.tsx'],
66-
extends: ['plugin:@nrwl/nx/typescript', 'plugin:import/typescript'],
51+
extends: ['plugin:import/typescript'],
6752
rules: {
6853
'@typescript-eslint/no-non-null-asserted-optional-chain': 'off',
6954
'@typescript-eslint/no-empty-interface': 'off',
@@ -88,7 +73,7 @@ module.exports = {
8873
// react files
8974
{
9075
files: ['*.jsx', '*.tsx'],
91-
extends: ['plugin:@nrwl/nx/react'],
76+
extends: [],
9277
rules: {
9378
// a11y still not need in our app
9479
'jsx-a11y/anchor-is-valid': 'off',
@@ -108,7 +93,6 @@ module.exports = {
10893
],
10994
plugins: ['jest'],
11095
rules: {
111-
'@nrwl/nx/enforce-module-boundaries': 'off',
11296
'react-hooks/rules-of-hooks': 'off',
11397
'no-undef': 'off',
11498
},

babel.config.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ module.exports = (api) => {
2626
plugins: [
2727
'@babel/plugin-proposal-export-default-from',
2828
'@babel/plugin-proposal-function-bind',
29-
'@babel/plugin-proposal-optional-chaining',
30-
'@babel/plugin-proposal-nullish-coalescing-operator',
29+
'@babel/plugin-transform-optional-chaining',
30+
'@babel/plugin-transform-nullish-coalescing-operator',
3131
['@babel/plugin-proposal-decorators', { legacy: true }],
32-
['@babel/plugin-proposal-class-properties', { loose: true }],
32+
['@babel/plugin-transform-class-properties', { loose: true }],
3333
'const-enum',
3434
],
3535
sourceMaps: true

package.json

Lines changed: 26 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -13,25 +13,23 @@
1313
"build-extension": "cross-env NODE_ENV=production RELEASE_DIR=extension LOCAL_EXTENSION_MODE=1 webpack --config webpack-production.config.js"
1414
},
1515
"devDependencies": {
16-
"@babel/core": "^7.20.12",
17-
"@babel/plugin-proposal-class-properties": "^7.10.4",
18-
"@babel/plugin-proposal-decorators": "^7.10.5",
19-
"@babel/plugin-proposal-export-default-from": "^7.10.4",
20-
"@babel/plugin-proposal-function-bind": "^7.10.4",
21-
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.10.4",
22-
"@babel/plugin-proposal-optional-chaining": "^7.11.0",
23-
"@babel/plugin-transform-runtime": "^7.11.0",
24-
"@babel/preset-env": "^7.11.0",
25-
"@babel/preset-react": "^7.10.4",
26-
"@babel/preset-typescript": "^7.18.6",
27-
"@babel/register": "^7.15.3",
28-
"@nrwl/eslint-plugin-nx": "15.3.3",
29-
"@typescript-eslint/eslint-plugin": "5.36.1",
30-
"@typescript-eslint/parser": "5.36.1",
16+
"@babel/core": "^7.26.0",
17+
"@babel/plugin-transform-class-properties": "^7.25.9",
18+
"@babel/plugin-proposal-decorators": "^7.25.9",
19+
"@babel/plugin-proposal-export-default-from": "^7.25.9",
20+
"@babel/plugin-proposal-function-bind": "^7.25.9",
21+
"@babel/plugin-transform-nullish-coalescing-operator": "^7.25.9",
22+
"@babel/plugin-transform-optional-chaining": "^7.25.9",
23+
"@babel/plugin-transform-runtime": "^7.25.9",
24+
"@babel/preset-env": "^7.26.0",
25+
"@babel/preset-react": "^7.26.3",
26+
"@babel/preset-typescript": "^7.26.0",
27+
"@babel/eslint-parser": "^7.25.9",
28+
"@typescript-eslint/eslint-plugin": "^8.17.0",
29+
"@typescript-eslint/parser": "^8.17.0",
3130
"autoprefixer": "^10.4.20",
32-
"babel-eslint": "^10.0.1",
33-
"babel-loader": "^9.1.2",
34-
"babel-plugin-const-enum": "^1.0.1",
31+
"babel-loader": "^9.2.1",
32+
"babel-plugin-const-enum": "^1.2.0",
3533
"babel-plugin-direct-import": "^1.0.0",
3634
"babel-plugin-transform-typescript-metadata": "^0.3.2",
3735
"buffer": "^6.0.3",
@@ -40,15 +38,15 @@
4038
"crypto-browserify": "^3.12.0",
4139
"css-loader": "^7.1.2",
4240
"dotenv": "^6.2.0",
43-
"eslint": "8.23.0",
44-
"eslint-config-prettier": "8.5.0",
45-
"eslint-plugin-import": "2.26.0",
46-
"eslint-plugin-jest": "27.0.1",
47-
"eslint-plugin-jsx-a11y": "6.6.1",
48-
"eslint-plugin-lodash": "^7.4.0",
49-
"eslint-plugin-prettier": "4.2.1",
50-
"eslint-plugin-react": "7.31.1",
51-
"eslint-plugin-react-hooks": "4.6.0",
41+
"eslint": "^9.16.0",
42+
"eslint-config-prettier": "^9.1.0",
43+
"eslint-plugin-import": "^2.31.0",
44+
"eslint-plugin-jest": "^28.9.0",
45+
"eslint-plugin-jsx-a11y": "^6.10.2",
46+
"eslint-plugin-lodash": "^8.0.0",
47+
"eslint-plugin-prettier": "^5.2.1",
48+
"eslint-plugin-react": "^7.37.2",
49+
"eslint-plugin-react-hooks": "5.0.0",
5250
"events": "^3.3.0",
5351
"jest": "^29.7.0",
5452
"jest-puppeteer": "^10.1.4",
@@ -66,7 +64,7 @@
6664
"style-loader": "^4.0.0",
6765
"string-replace-loader": "^3.1.0",
6866
"terser-webpack-plugin": "^5.3.10",
69-
"typescript": "^4.9.4",
67+
"typescript": "^5.7.2",
7068
"vm-browserify": "1.1.2",
7169
"webpack": "^5.96.1",
7270
"webpack-cli": "^5.1.4",

webpack-dev-server.config.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
// require('@babel/register')({
2-
// extensions: ['.js', '.jsx', '.ts', '.tsx', '.mjs'],
3-
// ignore: [/node_modules/],
4-
// rootMode: 'upward',
5-
// });
6-
71
const fs = require('fs');
82
const path = require('path');
93
const webpack = require('webpack');

0 commit comments

Comments
 (0)