Skip to content

Commit 5d3ffc4

Browse files
chores: Use tsconfig.build.json, use eslint.config.ts, update build script to use rimraf (clean builds)
1 parent 913c7fc commit 5d3ffc4

10 files changed

Lines changed: 169 additions & 57 deletions

.gitattributes

Lines changed: 91 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,93 @@
1+
# Documents
2+
*.bibtex text diff=bibtex
3+
*.doc diff=astextplain
4+
*.DOC diff=astextplain
5+
*.docx diff=astextplain
6+
*.DOCX diff=astextplain
7+
*.dot diff=astextplain
8+
*.DOT diff=astextplain
9+
*.pdf diff=astextplain
10+
*.PDF diff=astextplain
11+
*.rtf diff=astextplain
12+
*.RTF diff=astextplain
13+
*.md text diff=markdown
14+
*.mdx text diff=markdown
15+
*.tex text diff=tex
16+
*.adoc text
17+
*.textile text
18+
*.mustache text
19+
*.csv text eol=crlf
20+
*.tab text
21+
*.tsv text
22+
*.txt text
23+
*.sql text
24+
*.epub diff=astextplain
25+
26+
# Graphics
27+
*.png binary
28+
*.jpg binary
29+
*.jpeg binary
30+
*.gif binary
31+
*.tif binary
32+
*.tiff binary
33+
*.ico binary
34+
# SVG treated as text by default.
35+
*.svg text
36+
# If you want to treat it as binary,
37+
# use the following line instead.
38+
# *.svg binary
39+
*.eps binary
40+
41+
# Scripts
42+
*.bash text eol=lf
43+
*.fish text eol=lf
44+
*.ksh text eol=lf
45+
*.sh text eol=lf
46+
*.zsh text eol=lf
47+
# These are explicitly windows files and should use crlf
48+
*.bat text eol=crlf
49+
*.cmd text eol=crlf
50+
*.ps1 text eol=crlf
51+
52+
# Serialisation
53+
*.json text
54+
*.toml text
55+
*.xml text
56+
*.yaml text
57+
*.yml text
58+
59+
# Archives
60+
*.7z binary
61+
*.bz binary
62+
*.bz2 binary
63+
*.bzip2 binary
64+
*.gz binary
65+
*.lz binary
66+
*.lzma binary
67+
*.rar binary
68+
*.tar binary
69+
*.taz binary
70+
*.tbz binary
71+
*.tbz2 binary
72+
*.tgz binary
73+
*.tlz binary
74+
*.txz binary
75+
*.xz binary
76+
*.Z binary
77+
*.zip binary
78+
*.zst binary
79+
80+
# Text files where line endings should be preserved
81+
*.patch -text
82+
83+
#
84+
# Exclude files from exporting
85+
#
86+
87+
.gitattributes export-ignore
88+
.gitignore export-ignore
89+
.gitkeep export-ignore
90+
191
# From https://github.com/yarnpkg/berry/blob/4c256e0/.gitattributes
292
# This line does two things:
393
# - forces git to use LF
@@ -9,7 +99,7 @@
999
docusaurus/.pnp.* binary linguist-generated
10100

11101
# Set the language for these files to json5 to ensure GitHub doesn't show the comments as errors
12-
.vscode/*.json linguist-language=JSON5
102+
.vscode/*.json linguist-language=JSON-with-Comments
13103

14104
# Hide .yarn and docs from GitHub's language detection
15105
.yarn/**/* linguist-vendored

.pnp.cjs

Lines changed: 12 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
407 KB
Binary file not shown.
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,11 @@ export default defineConfig(
2323
globalIgnores(['docusaurus/**/*.js', 'typings/**/*', 'out/**/*', 'coverage/**/*', '**/.pnp.*', '.yarn/**/*']),
2424
[{
2525
extends: fixupConfigRules(compat.extends('plugin:import/recommended')),
26-
files: ['src/**/*.ts', 'test/**/*.ts', 'docusaurus/**/*.ts', 'docusaurus/**/*.tsx', 'eslint.config.mjs'],
26+
files: ['src/**/*.ts', 'test/**/*.ts', 'docusaurus/**/*.ts', 'docusaurus/**/*.tsx', 'eslint.config.ts'],
2727

2828
plugins: {
2929
'@stylistic': stylistic,
30+
// @ts-ignore
3031
'@typescript-eslint': typescriptEslint,
3132
'unused-imports': unusedImports
3233
},
@@ -41,7 +42,7 @@ export default defineConfig(
4142
sourceType: 'module',
4243

4344
parserOptions: {
44-
project: ['tsconfig.eslint.json', 'tsconfig.utils.json']
45+
project: ['tsconfig.json']
4546
}
4647
},
4748

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"docs:serve": "yarn workspace docusaurus serve",
2929
"docs:test": "yarn workspace docusaurus start",
3030
"lint": "eslint .",
31-
"build": "tsc --build --clean && tsc"
31+
"build": "rimraf -- ./out/ ./typings/ && tsc --project tsconfig.build.json"
3232
},
3333
"nyc": {
3434
"include": "src"
@@ -76,8 +76,10 @@
7676
"eslint-plugin-jsdoc": "62.9.0",
7777
"eslint-plugin-unused-imports": "4.4.1",
7878
"globals": "17.5.0",
79+
"jiti": "2.6.1",
7980
"mocha": "11.7.5",
8081
"nyc": "18.0.0",
82+
"rimraf": "6.1.3",
8183
"source-map-support": "0.5.21",
8284
"ts-node": "10.9.2",
8385
"typescript": "6.0.3",

tsconfig.build.json

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"extends": "./tsconfig.json",
3+
"compilerOptions": {
4+
"rootDir": "src",
5+
"module": "nodenext",
6+
"target": "es6",
7+
"outDir": "out",
8+
"declarationDir": "typings",
9+
"declaration": true,
10+
"removeComments": false,
11+
"sourceMap": true,
12+
"esModuleInterop": true,
13+
},
14+
"exclude": [
15+
"./eslint.config.ts",
16+
"test",
17+
"typings",
18+
"out",
19+
"docusaurus"
20+
21+
],
22+
"include": [
23+
"src/**/*.ts"
24+
],
25+
"files": []
26+
}
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
{
22
"extends": "./tsconfig.json",
3+
"types": [" node" ],
34
"include": [
45
"**/*.ts",
56
"**/*.tsx",
67
"**/*.spec.ts"
78
],
89
"files": [
9-
"./eslint.config.mjs"
10+
"./eslint.config.ts"
1011
]
1112
}

tsconfig.json

Lines changed: 12 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,23 @@
11
{
22
"compilerOptions": {
3-
"lib": [
4-
"es2023"
5-
],
63
"types": [ "node" ],
7-
"module": "Node16",
8-
"target": "es2022",
9-
"outDir": "out",
10-
"declarationDir": "typings",
11-
"declaration": true,
12-
"removeComments": false,
13-
"sourceMap": true,
14-
"rootDir": "src",
4+
"allowJs": true,
155
"strict": false,
16-
"esModuleInterop": true,
17-
"allowJs": true
186
},
197
"include": [
20-
"src/**/*.ts"
8+
"src/**/*.ts",
9+
"test/**/*.ts",
10+
"test/**/*.spec.ts",
11+
"docusaurus/**/*.ts",
12+
"docusaurus/**/*.tsx",
13+
"**/*.ts",
14+
"**/*.tsx",
15+
"**/*.spec.ts"
16+
],
17+
"files": [
18+
"./eslint.config.ts"
2119
],
2220
"exclude": [
2321
"node_modules",
24-
"out",
25-
"test",
26-
"gulpfile.ts",
27-
"typings",
28-
"docs",
29-
"docs-resources",
30-
"docusaurus"
3122
]
3223
}

tsconfig.utils.json

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

yarn.lock

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8376,20 +8376,20 @@ __metadata:
83768376
languageName: node
83778377
linkType: hard
83788378

8379+
"globals@npm:17.5.0":
8380+
version: 17.5.0
8381+
resolution: "globals@npm:17.5.0"
8382+
checksum: 10/c405a95e1ecf14a1a17caaecd4dadbad38166b3c1b514e07924604ee224e922c043fc93ae21164d124dae5536e5a812566355469e34a689601db7d3d424dc8e7
8383+
languageName: node
8384+
linkType: hard
8385+
83798386
"globals@npm:^14.0.0":
83808387
version: 14.0.0
83818388
resolution: "globals@npm:14.0.0"
83828389
checksum: 10/03939c8af95c6df5014b137cac83aa909090c3a3985caef06ee9a5a669790877af8698ab38007e4c0186873adc14c0b13764acc754b16a754c216cc56aa5f021
83838390
languageName: node
83848391
linkType: hard
83858392

8386-
"globals@npm:^17.5.0":
8387-
version: 17.5.0
8388-
resolution: "globals@npm:17.5.0"
8389-
checksum: 10/c405a95e1ecf14a1a17caaecd4dadbad38166b3c1b514e07924604ee224e922c043fc93ae21164d124dae5536e5a812566355469e34a689601db7d3d424dc8e7
8390-
languageName: node
8391-
linkType: hard
8392-
83938393
"globalthis@npm:^1.0.4":
83948394
version: 1.0.4
83958395
resolution: "globalthis@npm:1.0.4"
@@ -9797,6 +9797,15 @@ __metadata:
97979797
languageName: node
97989798
linkType: hard
97999799

9800+
"jiti@npm:2.6.1":
9801+
version: 2.6.1
9802+
resolution: "jiti@npm:2.6.1"
9803+
bin:
9804+
jiti: lib/jiti-cli.mjs
9805+
checksum: 10/8cd72c5fd03a0502564c3f46c49761090f6dadead21fa191b73535724f095ad86c2fa89ee6fe4bc3515337e8d406cc8fb2d37b73fa0c99a34584bac35cd4a4de
9806+
languageName: node
9807+
linkType: hard
9808+
98009809
"jiti@npm:^1.20.0":
98019810
version: 1.21.7
98029811
resolution: "jiti@npm:1.21.7"
@@ -12250,9 +12259,11 @@ __metadata:
1225012259
eslint-plugin-import: "npm:2.32.0"
1225112260
eslint-plugin-jsdoc: "npm:62.9.0"
1225212261
eslint-plugin-unused-imports: "npm:4.4.1"
12253-
globals: "npm:^17.5.0"
12262+
globals: "npm:17.5.0"
12263+
jiti: "npm:2.6.1"
1225412264
mocha: "npm:11.7.5"
1225512265
nyc: "npm:18.0.0"
12266+
rimraf: "npm:6.1.3"
1225612267
source-map-support: "npm:0.5.21"
1225712268
ts-node: "npm:10.9.2"
1225812269
typescript: "npm:6.0.3"
@@ -13947,7 +13958,7 @@ __metadata:
1394713958
languageName: node
1394813959
linkType: hard
1394913960

13950-
"rimraf@npm:^6.1.3":
13961+
"rimraf@npm:6.1.3, rimraf@npm:^6.1.3":
1395113962
version: 6.1.3
1395213963
resolution: "rimraf@npm:6.1.3"
1395313964
dependencies:

0 commit comments

Comments
 (0)