Skip to content

Commit ac36335

Browse files
committed
[upgrade] package
[fix] Downloader task package [polish] eslint config
1 parent 4a6b3f6 commit ac36335

File tree

9 files changed

+2126
-1043
lines changed

9 files changed

+2126
-1043
lines changed

eslint.config.mjs

Lines changed: 39 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,27 @@
1-
import { fixupPluginRules } from '@eslint/compat';
1+
import cspellPlugin from '@cspell/eslint-plugin';
22
import eslint from '@eslint/js';
33
import eslintConfigPrettier from 'eslint-config-prettier';
4-
import reactPlugin from 'eslint-plugin-react';
4+
import react from 'eslint-plugin-react';
55
import simpleImportSortPlugin from 'eslint-plugin-simple-import-sort';
66
import globals from 'globals';
77
import tsEslint from 'typescript-eslint';
8-
import url from 'url';
8+
import { fileURLToPath } from 'url';
99

10-
const __dirname = url.fileURLToPath(new URL('.', import.meta.url));
10+
/**
11+
* When using the ESLint extension, remember to check the "ESLint: Use Flat config" setting for instant code rule hints.
12+
*/
13+
14+
const tsconfigRootDir = fileURLToPath(new URL('.', import.meta.url));
1115

1216
export default tsEslint.config(
1317
// register all of the plugins up-front
1418
{
1519
plugins: {
1620
'@typescript-eslint': tsEslint.plugin,
17-
// https://github.com/jsx-eslint/eslint-plugin-react/issues/3699
18-
react: fixupPluginRules(reactPlugin),
19-
'simple-import-sort': simpleImportSortPlugin
21+
// - https://github.com/jsx-eslint/eslint-plugin-react/issues/3838#issuecomment-2395472758
22+
react: /** @type {import('eslint').ESLint.Plugin} */ (react),
23+
'simple-import-sort': simpleImportSortPlugin,
24+
'@cspell': cspellPlugin
2025
}
2126
},
2227
{
@@ -38,13 +43,18 @@ export default tsEslint.config(
3843
},
3944
parserOptions: {
4045
projectService: true,
41-
tsconfigRootDir: __dirname,
46+
tsconfigRootDir,
4247
warnOnUnsupportedTypeScriptVersion: false
4348
}
4449
},
4550
rules: {
51+
'arrow-body-style': ['error', 'as-needed'],
4652
'simple-import-sort/exports': 'error',
4753
'simple-import-sort/imports': 'error',
54+
'react/jsx-curly-brace-presence': [
55+
'error',
56+
{ props: 'never', children: 'never' }
57+
],
4858
'react/jsx-no-target-blank': 'warn',
4959
'react/jsx-sort-props': [
5060
'error',
@@ -55,7 +65,27 @@ export default tsEslint.config(
5565
noSortAlphabetically: true
5666
}
5767
],
58-
'@typescript-eslint/no-empty-object-type': 'off'
68+
'react/self-closing-comp': [
69+
'error',
70+
{ component: true, html: true }
71+
],
72+
'@typescript-eslint/no-empty-object-type': 'off',
73+
'@cspell/spellchecker': [
74+
'warn',
75+
{
76+
cspell: {
77+
language: 'en',
78+
dictionaries: [
79+
'typescript',
80+
'node',
81+
'html',
82+
'css',
83+
'bash',
84+
'npm'
85+
]
86+
}
87+
}
88+
]
5989
}
6090
},
6191
{

package.json

Lines changed: 52 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -4,74 +4,86 @@
44
"description": "React project scaffold based on TypeScript, MobX & Bootstrap, which is inspired by WebCell scaffold.",
55
"author": "[email protected]",
66
"dependencies": {
7-
"@editorjs/code": "^2.9.0",
8-
"@editorjs/editorjs": "^2.30.5",
9-
"@editorjs/header": "^2.8.7",
10-
"@editorjs/image": "^2.9.3",
7+
"@editorjs/code": "^2.9.3",
8+
"@editorjs/editorjs": "^2.30.7",
9+
"@editorjs/header": "^2.8.8",
10+
"@editorjs/image": "^2.10.1",
1111
"@editorjs/link": "^2.6.2",
12-
"@editorjs/list": "^1.10.0",
12+
"@editorjs/list": "^2.0.2",
1313
"@editorjs/paragraph": "^2.11.6",
14-
"@editorjs/quote": "^2.7.2",
14+
"@editorjs/quote": "^2.7.4",
1515
"browser-fs-access": "^0.35.0",
1616
"browser-unhandled-rejection": "^1.0.2",
1717
"echarts-jsx": "^1.2.1",
1818
"editorjs-html": "^3.4.3",
19-
"idea-react": "^2.0.0-rc.2",
20-
"koajax": "^3.0.2",
19+
"idea-react": "^2.0.0-rc.8",
20+
"koajax": "^3.0.3",
2121
"lodash": "^4.17.21",
22-
"mobx": "^6.13.2",
23-
"mobx-github": "^0.3.4",
24-
"mobx-i18n": "^0.5.0",
22+
"mobx": "^6.13.5",
23+
"mobx-downloader": "^0.3.0",
24+
"mobx-github": "^0.3.5",
25+
"mobx-i18n": "^0.6.0",
2526
"mobx-react": "^9.1.1",
26-
"mobx-restful": "^1.0.1",
27+
"mobx-restful": "^2.0.0",
2728
"mobx-restful-table": "^2.0.0",
2829
"react": "^18.3.1",
29-
"react-dom": "^18.3.1",
30-
"react-bootstrap": "^2.10.4",
30+
"react-bootstrap": "^2.10.6",
3131
"react-bootstrap-editor": "^2.0.4",
32+
"react-dom": "^18.3.1",
3233
"react-editor-js": "^2.1.0",
3334
"react-router-class-tools": "^0.1.3",
34-
"react-router-dom": "^6.26.2",
35-
"web-utility": "^4.4.0"
35+
"react-router-dom": "^6.28.0",
36+
"web-utility": "^4.4.2"
3637
},
3738
"devDependencies": {
38-
"@babel/runtime": "^7.25.6",
39-
"@eslint/compat": "^1.1.1",
40-
"@eslint/js": "^9.10.0",
41-
"@parcel/config-default": "~2.12.0",
42-
"@parcel/packager-raw-url": "~2.12.0",
43-
"@parcel/transformer-less": "~2.12.0",
44-
"@parcel/transformer-typescript-tsc": "~2.12.0",
45-
"@parcel/transformer-webmanifest": "~2.12.0",
46-
"@types/lodash": "^4.17.7",
47-
"@types/node": "^20.16.5",
48-
"@types/react": "^18.3.5",
49-
"@types/react-dom": "^18.3.0",
50-
"@typescript-eslint/eslint-plugin": "^8.5.0",
51-
"@typescript-eslint/parser": "^8.5.0",
39+
"@babel/runtime": "^7.26.0",
40+
"@cspell/eslint-plugin": "^8.16.1",
41+
"@eslint/compat": "^1.2.3",
42+
"@eslint/js": "^9.15.0",
43+
"@parcel/config-default": "~2.13.2",
44+
"@parcel/packager-raw-url": "~2.13.2",
45+
"@parcel/transformer-less": "~2.13.2",
46+
"@parcel/transformer-typescript-tsc": "~2.13.2",
47+
"@parcel/transformer-webmanifest": "~2.13.2",
48+
"@softonus/prettier-plugin-duplicate-remover": "^1.1.2",
49+
"@types/eslint-config-prettier": "^6.11.3",
50+
"@types/eslint__eslintrc": "^2.1.2",
51+
"@types/eslint__js": "^8.42.3",
52+
"@types/lodash": "^4.17.13",
53+
"@types/node": "^20.17.9",
54+
"@types/react": "^18.3.12",
55+
"@types/react-dom": "^18.3.1",
56+
"@typescript-eslint/eslint-plugin": "^8.16.00",
57+
"@typescript-eslint/parser": "^8.16.0",
5258
"buffer": "^6.0.3",
53-
"eslint": "^9.10.0",
59+
"eslint": "^9.15.0",
5460
"eslint-config-prettier": "^9.1.0",
55-
"eslint-plugin-react": "^7.36.1",
61+
"eslint-plugin-react": "^7.37.2",
5662
"eslint-plugin-simple-import-sort": "^12.1.1",
5763
"eslint-plugin-spellcheck": "^0.0.20",
58-
"globals": "^15.9.0",
59-
"husky": "^9.1.6",
64+
"globals": "^15.12.0",
65+
"husky": "^9.1.7",
6066
"lint-staged": "^15.2.10",
61-
"parcel": "~2.12.0",
67+
"parcel": "~2.13.2",
6268
"parcel-transformer-mdx": "^0.4.2",
63-
"prettier": "^3.3.3",
69+
"postcss": "^8.4.49",
70+
"prettier": "^3.4.1",
71+
"prettier-plugin-css-order": "2.1.2",
6472
"prismjs": "^1.29.0",
6573
"process": "^0.11.10",
66-
"typescript": "~5.6.2",
67-
"typescript-eslint": "^8.5.0",
68-
"workbox-cli": "^7.1.0"
74+
"typescript": "~5.7.2",
75+
"typescript-eslint": "^8.16.0",
76+
"workbox-cli": "^7.3.0"
6977
},
7078
"prettier": {
7179
"singleQuote": true,
7280
"trailingComma": "none",
7381
"arrowParens": "avoid",
74-
"tabWidth": 4
82+
"tabWidth": 4,
83+
"plugins": [
84+
"prettier-plugin-css-order",
85+
"@softonus/prettier-plugin-duplicate-remover"
86+
]
7587
},
7688
"lint-staged": {
7789
"*.{html,md,less,json,yml,js,mjs,ts,tsx}": "prettier --write",

0 commit comments

Comments
 (0)