Skip to content

Commit b0fe476

Browse files
authored
build: TS6 + oxc.rs (#345)
* build: TS6 + oxc.rs * remove typedoc
1 parent e2d74d4 commit b0fe476

10 files changed

Lines changed: 846 additions & 2035 deletions

File tree

.husky/pre-commit

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
yarn lint-staged

.oxfmtrc.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"$schema": "./node_modules/oxfmt/configuration_schema.json",
3+
"trailingComma": "all",
4+
"tabWidth": 2,
5+
"singleQuote": true,
6+
"printWidth": 100,
7+
"sortPackageJson": false,
8+
"ignorePatterns": ["*.md", "*.yml", "*.yaml"]
9+
}

.oxlintrc.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"$schema": "./node_modules/oxlint/configuration_schema.json",
3+
"plugins": ["eslint", "typescript", "unicorn", "oxc", "import"],
4+
"categories": {
5+
"correctness": "warn"
6+
},
7+
"options": {
8+
"typeAware": true
9+
}
10+
}

.prettierignore

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

.prettierrc

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

eslint.config.mjs

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

package.json

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,21 @@
2828
"build:node": "cross-env NODE_OPTIONS='--import=tsx' webpack --config webpack.node.config.ts",
2929
"build": "npm run clean && npm run build:node && npm run build:types && npm run build:browser",
3030
"dev": "cross-env NODE_OPTIONS='--import=tsx' webpack serve --config webpack.dev.config.ts",
31-
"lint:eslint": "eslint -c eslint.config.mjs",
32-
"lint": "tsc --noEmit && prettier . --check --experimental-cli",
33-
"lint:fix": "prettier . --write --experimental-cli && npm run lint:eslint --fix",
31+
"lint": "oxfmt --check . && oxlint",
32+
"lint:fix": "oxfmt --write . && oxlint --fix",
33+
"prepare": "husky",
3434
"prepublishOnly": "npm run build",
3535
"test": "mocha spec-electron-setup/scripts/mocha-cli.ts"
3636
},
37+
"lint-staged": {
38+
"*.{js,ts,jsx,tsx}": [
39+
"oxfmt --write",
40+
"oxlint --fix"
41+
],
42+
"*.{json,css,html}": [
43+
"oxfmt --write"
44+
]
45+
},
3746
"author": "Hitarth Rajput",
3847
"license": "MIT",
3948
"keywords": [
@@ -55,7 +64,6 @@
5564
"node": ">=22.12.0"
5665
},
5766
"devDependencies": {
58-
"@eslint/js": "^9.27.0",
5967
"@tsconfig/node22": "^22.0.2",
6068
"@types/chai": "^5.2.2",
6169
"@types/chrome": "^0.0.326",
@@ -75,26 +83,22 @@
7583
"electron38": "npm:electron@^38",
7684
"electron39": "npm:electron@^39",
7785
"electron40": "npm:electron@^40",
78-
"eslint": "^9.28.0",
79-
"eslint-plugin-chai-friendly": "^1.1.0",
80-
"eslint-plugin-react": "^7.37.5",
81-
"eslint-plugin-react-hooks": "^5.2.0",
82-
"eslint-plugin-unicorn": "^59.0.1",
83-
"globals": "^16.2.0",
8486
"html-webpack-plugin": "^5.6.3",
87+
"husky": "^9.1.7",
88+
"lint-staged": "^16.4.0",
8589
"mocha": "^11.7.1",
90+
"oxfmt": "^0.44.0",
91+
"oxlint": "^1.59.0",
92+
"oxlint-tsgolint": "^0.20.0",
8693
"postcss": "^8.5.4",
8794
"postcss-loader": "^8.1.1",
8895
"postcss-preset-env": "^10.2.1",
89-
"prettier": "^3.6.2",
90-
"prettier-plugin-tailwindcss": "^0.6.13",
9196
"style-loader": "^4.0.0",
9297
"tailwindcss": "^3.4.17",
9398
"ts-loader": "^9.5.2",
9499
"ts-node": "^10.9.2",
95100
"tsx": "^4.20.3",
96-
"typescript": "^5.8.3",
97-
"typescript-eslint": "^8.34.0",
101+
"typescript": "^6.0.2",
98102
"webpack": "^5.99.9",
99103
"webpack-cli": "^6.0.1",
100104
"webpack-dev-server": "^5.2.2"

src/types/css.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
declare module '*.css';
2+
declare module '@fontsource-variable/roboto';

tsconfig.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@
33
"compilerOptions": {
44
"jsx": "react-jsx",
55
"lib": ["DOM"],
6-
"module": "esnext",
7-
"moduleResolution": "node",
6+
"module": "preserve",
7+
"moduleResolution": "bundler",
88
"types": ["chrome", "node", "webpack-env", "electron", "mocha", "chai"],
99
"declaration": false,
1010
"sourceMap": false,
11+
"rootDir": "./src",
1112
"outDir": "./dist",
1213
"forceConsistentCasingInFileNames": true
1314
},

0 commit comments

Comments
 (0)