Skip to content

Commit 00f8c74

Browse files
committed
[add] typedoc table css
[update] package version, eslint config [fix] #32
1 parent 8d1df6e commit 00f8c74

File tree

15 files changed

+2489
-1204
lines changed

15 files changed

+2489
-1204
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
version: 9
1818
- uses: actions/setup-node@v4
1919
with:
20-
node-version: 20
20+
node-version: 22
2121
registry-url: https://registry.npmjs.org
2222
cache: pnpm
2323
- name: Install Dependencies

.github/workflows/push.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
version: 9
1919
- uses: actions/setup-node@v4
2020
with:
21-
node-version: 20
21+
node-version: 22
2222
cache: pnpm
2323
- name: Install & Build
2424
run: |

eslint.config.mjs

Lines changed: 0 additions & 69 deletions
This file was deleted.

eslint.config.ts

Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
import cspellPlugin from '@cspell/eslint-plugin';
2+
import eslint from '@eslint/js';
3+
import stylistic from '@stylistic/eslint-plugin';
4+
import eslintConfigPrettier from 'eslint-config-prettier';
5+
import react from 'eslint-plugin-react';
6+
import simpleImportSortPlugin from 'eslint-plugin-simple-import-sort';
7+
import globals from 'globals';
8+
import tsEslint, { ConfigArray } from 'typescript-eslint';
9+
import { fileURLToPath } from 'url';
10+
11+
/**
12+
* @see{@link https://github.com/typescript-eslint/typescript-eslint/blob/main/eslint.config.mjs}
13+
*/
14+
15+
const tsconfigRootDir = fileURLToPath(new URL('.', import.meta.url));
16+
17+
const config: ConfigArray = tsEslint.config(
18+
// register all of the plugins up-front
19+
{
20+
plugins: {
21+
'@typescript-eslint': tsEslint.plugin,
22+
react,
23+
'@stylistic': stylistic,
24+
'simple-import-sort': simpleImportSortPlugin,
25+
'@cspell': cspellPlugin
26+
}
27+
},
28+
{
29+
// config with just ignores is the replacement for `.eslintignore`
30+
ignores: ['**/node_modules/**', '**/public/**', '**/.next/**']
31+
},
32+
33+
// extends ...
34+
eslint.configs.recommended,
35+
...tsEslint.configs.recommended,
36+
37+
// base config
38+
{
39+
languageOptions: {
40+
globals: { ...globals.es2020, ...globals.browser, ...globals.node },
41+
parserOptions: {
42+
projectService: true,
43+
tsconfigRootDir,
44+
warnOnUnsupportedTypeScriptVersion: false
45+
}
46+
},
47+
rules: {
48+
'arrow-body-style': ['error', 'as-needed'],
49+
'no-empty-pattern': 'warn',
50+
'no-console': ['error', { allow: ['warn', 'error', 'info'] }],
51+
'consistent-return': 'warn',
52+
'prefer-destructuring': ['error', { object: true, array: true }],
53+
54+
// react
55+
'react/no-unescaped-entities': 'off',
56+
'react/self-closing-comp': [
57+
'error',
58+
{ component: true, html: true }
59+
],
60+
'react/jsx-curly-brace-presence': [
61+
'error',
62+
{ props: 'never', children: 'never' }
63+
],
64+
'react/jsx-no-target-blank': 'warn',
65+
'react/jsx-sort-props': [
66+
'error',
67+
{
68+
reservedFirst: true,
69+
callbacksLast: true,
70+
noSortAlphabetically: true
71+
}
72+
],
73+
// typescript
74+
'@typescript-eslint/no-unused-vars': 'warn',
75+
'@typescript-eslint/no-explicit-any': 'warn',
76+
'@typescript-eslint/no-empty-object-type': 'off',
77+
'@typescript-eslint/no-unsafe-declaration-merging': 'warn',
78+
79+
// stylistic
80+
'@stylistic/padding-line-between-statements': [
81+
'error',
82+
{ blankLine: 'always', prev: '*', next: 'return' },
83+
{ blankLine: 'always', prev: 'directive', next: '*' },
84+
{ blankLine: 'any', prev: 'directive', next: 'directive' },
85+
{
86+
blankLine: 'always',
87+
prev: '*',
88+
next: ['enum', 'interface', 'type']
89+
}
90+
],
91+
92+
// simple-import-sort
93+
'simple-import-sort/exports': 'error',
94+
'simple-import-sort/imports': 'error',
95+
// spellchecker
96+
'@cspell/spellchecker': [
97+
'warn',
98+
{
99+
cspell: {
100+
language: 'en',
101+
dictionaries: [
102+
'typescript',
103+
'node',
104+
'html',
105+
'css',
106+
'bash',
107+
'npm',
108+
'pnpm'
109+
]
110+
}
111+
}
112+
]
113+
}
114+
},
115+
eslintConfigPrettier
116+
);
117+
118+
export default config;

package.json

Lines changed: 28 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -27,50 +27,52 @@
2727
"types": "dist/index.d.ts",
2828
"dependencies": {
2929
"@swc/helpers": "^0.5.15",
30-
"dom-renderer": "^2.6.0",
31-
"mobx": ">=6.11",
30+
"dom-renderer": "^2.6.2",
31+
"mobx": ">=6.13.6",
3232
"regenerator-runtime": "^0.14.1",
33-
"web-utility": "^4.4.2"
33+
"web-utility": "^4.4.3"
3434
},
3535
"peerDependencies": {
3636
"@webcomponents/webcomponentsjs": "^2.8",
3737
"core-js": "^3",
3838
"jsdom": ">=23.1"
3939
},
4040
"devDependencies": {
41-
"@eslint/compat": "^1.2.3",
42-
"@eslint/js": "^9.15.0",
43-
"@parcel/config-default": "~2.13.0",
44-
"@parcel/packager-ts": "~2.13.0",
45-
"@parcel/transformer-typescript-tsc": "~2.13.0",
46-
"@parcel/transformer-typescript-types": "~2.13.0",
41+
"@cspell/eslint-plugin": "^8.17.5",
42+
"@eslint/js": "^9.22.0",
43+
"@parcel/config-default": "~2.13.3",
44+
"@parcel/packager-ts": "~2.13.3",
45+
"@parcel/transformer-typescript-tsc": "~2.13.3",
46+
"@parcel/transformer-typescript-types": "~2.13.3",
47+
"@stylistic/eslint-plugin": "^4.2.0",
4748
"@types/eslint-config-prettier": "^6.11.3",
4849
"@types/jest": "^29.5.14",
49-
"@types/node": "^20.17.6",
50-
"core-js": "^3.39.0",
51-
"element-internals-polyfill": "^1.3.12",
52-
"eslint": "^9.15.0",
53-
"eslint-config-prettier": "^9.1.0",
54-
"eslint-plugin-react": "^7.37.2",
50+
"@types/node": "^22.13.10",
51+
"core-js": "^3.41.0",
52+
"element-internals-polyfill": "^1.3.13",
53+
"eslint": "^9.22.0",
54+
"eslint-config-prettier": "^10.1.1",
55+
"eslint-plugin-react": "^7.37.4",
5556
"eslint-plugin-simple-import-sort": "^12.1.1",
56-
"globals": "^15.12.0",
57+
"globals": "^16.0.0",
5758
"husky": "^9.1.7",
5859
"jest": "^29.7.0",
5960
"jest-environment-jsdom": "^29.7.0",
60-
"jsdom": "^25.0.1",
61-
"lint-staged": "^15.2.10",
61+
"jiti": "^2.4.2",
62+
"jsdom": "^26.0.0",
63+
"lint-staged": "^15.5.0",
6264
"open-cli": "^8.0.0",
63-
"parcel": "~2.13.0",
64-
"prettier": "^3.3.3",
65-
"prettier-plugin-sh": "^0.14.0",
65+
"parcel": "~2.13.3",
66+
"prettier": "^3.5.3",
67+
"prettier-plugin-sh": "^0.15.0",
6668
"replace": "^1.2.2",
6769
"rimraf": "^6.0.1",
68-
"ts-jest": "^29.2.5",
70+
"ts-jest": "^29.2.6",
6971
"ts-node": "^10.9.2",
70-
"typedoc": "^0.26.11",
71-
"typedoc-plugin-mdn-links": "^3.3.8",
72-
"typescript": "~5.6.3",
73-
"typescript-eslint": "^8.15.0"
72+
"typedoc": "^0.27.9",
73+
"typedoc-plugin-mdn-links": "^5.0.1",
74+
"typescript": "~5.8.2",
75+
"typescript-eslint": "^8.26.1"
7476
},
7577
"scripts": {
7678
"prepare": "husky",

0 commit comments

Comments
 (0)