mirror of
https://github.com/dec0dOS/zero-ui.git
synced 2024-09-20 06:56:05 +08:00
chore: add Typescript linting
This commit is contained in:
parent
5c69694505
commit
70c580474c
|
@ -1,10 +0,0 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"baseUrl": "src"
|
||||
},
|
||||
"include": ["src"],
|
||||
"exclude": ["node_modules", "**/node_modules/*"],
|
||||
"typeAcquisition": {
|
||||
"exclude": ["dotenv", "harmony-reflect"]
|
||||
}
|
||||
}
|
|
@ -31,6 +31,7 @@
|
|||
"eslint-plugin-react-refresh": "^0.4.3",
|
||||
"rimraf": "^5.0.5",
|
||||
"source-map-explorer": "^2.5.3",
|
||||
"typescript": "^5.2.2",
|
||||
"vite": "^4.4.10"
|
||||
},
|
||||
"scripts": {
|
||||
|
@ -39,6 +40,7 @@
|
|||
"serve": "vite preview",
|
||||
"clean": "rimraf build",
|
||||
"lint": "eslint src --ext js,jsx --report-unused-disable-directives --max-warnings 0",
|
||||
"typecheck": "tsc --pretty --noEmit -p tsconfig.json",
|
||||
"analyze": "source-map-explorer 'build/static/js/*.js'"
|
||||
},
|
||||
"homepage": "/app",
|
||||
|
|
1
frontend/src/types.d.ts
vendored
Normal file
1
frontend/src/types.d.ts
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
declare module "*.png";
|
19
frontend/tsconfig.json
Normal file
19
frontend/tsconfig.json
Normal file
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"rootDir": ".",
|
||||
"baseUrl": "src",
|
||||
"allowJs": true,
|
||||
"checkJs": true,
|
||||
"noEmit": true,
|
||||
"skipLibCheck": true,
|
||||
"module": "NodeNext",
|
||||
"moduleResolution": "NodeNext",
|
||||
"target": "ESNext",
|
||||
"lib": ["ESNext", "dom"],
|
||||
"strict": true,
|
||||
"noImplicitAny": false,
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"jsx": "preserve"
|
||||
},
|
||||
"include": ["src"]
|
||||
}
|
|
@ -1,22 +1,6 @@
|
|||
import { defineConfig } from "vite";
|
||||
import react from "@vitejs/plugin-react";
|
||||
|
||||
// import { join, parse, resolve } from "path";
|
||||
// import * as url from "url";
|
||||
// const __dirname = url.fileURLToPath(new URL(".", import.meta.url));
|
||||
|
||||
// function entryPoints(...paths) {
|
||||
// const entries = paths.map(parse).map((entry) => {
|
||||
// const { dir, base, name } = entry;
|
||||
// const key = join(dir, name);
|
||||
// const path = resolve(__dirname, dir, base);
|
||||
// return [key, path];
|
||||
// });
|
||||
|
||||
// const config = Object.fromEntries(entries);
|
||||
// return config;
|
||||
// }
|
||||
|
||||
export default defineConfig({
|
||||
base: "/app",
|
||||
server: {
|
||||
|
|
Loading…
Reference in a new issue