Skip to content

Commit

Permalink
fix: remove react from example
Browse files Browse the repository at this point in the history
  • Loading branch information
npmstudy committed Sep 29, 2023
1 parent 2939e4f commit bcd9431
Show file tree
Hide file tree
Showing 8 changed files with 71 additions and 458 deletions.
47 changes: 33 additions & 14 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,25 @@
},
"settings": {
"import/parsers": {
"@typescript-eslint/parser": [".ts", ".tsx"]
"@typescript-eslint/parser": [
".ts",
".tsx"
]
},
"import/resolver": {
"typescript": {},
"node": {
"extensions": [".js", ".jsx", ".ts", ".tsx"],
"moduleDirectory": ["node_modules", "src/"]
"extensions": [
".js",
".jsx",
".ts",
".tsx"
],
"moduleDirectory": [
"node_modules",
"src/"
]
}
},
"react": {
"version": "detect"
},
"ecmaFeatures": {
"jsx": true
}
},
"extends": [
Expand All @@ -41,7 +46,12 @@
"ecmaVersion": 11,
"sourceType": "module"
},
"plugins": ["import", "react", "react-hooks", "@typescript-eslint"],
"plugins": [
"import",
"react",
"react-hooks",
"@typescript-eslint"
],
"rules": {
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "warn",
Expand All @@ -52,9 +62,18 @@
"warn",
{
"groups": [
["builtin", "external"],
["internal", "parent"],
["sibling", "index"],
[
"builtin",
"external"
],
[
"internal",
"parent"
],
[
"sibling",
"index"
],
"object"
],
"newlines-between": "always",
Expand All @@ -66,4 +85,4 @@
],
"import/no-unresolved": "error"
}
}
}
14 changes: 4 additions & 10 deletions example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,15 @@
"main": "index.js",
"private": true,
"scripts": {
"dev": "tsx watch src/app.ts",
"build": "vite build",
"preview": "vite preview"
"dev": "tsx watch src/app.ts"
},
"devDependencies": {
"@types/koa": "^2.13.9",
"@vitejs/plugin-react": "^4.0.4",
"koa": "^2.14.2",
"nodemon": "^3.0.1",
"typescript": "^4.9.5",
"vite": "^4.4.9"
"typescript": "^4.9.5"
},
"dependencies": {
"lib2": "workspace:*",
"react": "^18.2.0",
"react-dom": "^18.2.0"
"lib2": "workspace:*"
}
}
}
4 changes: 2 additions & 2 deletions example/src/app.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import Koa from 'koa';

import { lib } from 'lib2';
const app = new Koa();

app.use(async (ctx) => {
ctx.body = 'Helsslo World';
ctx.body = `Hello ${lib()}`;
});

app.listen(3000);
16 changes: 10 additions & 6 deletions example/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@
"compilerOptions": {
"target": "ESNext",
"useDefineForClassFields": true,
"lib": ["DOM", "DOM.Iterable", "ESNext"],
"lib": [
"DOM",
"DOM.Iterable",
"ESNext"
],
"allowJs": false,
"skipLibCheck": true,
"esModuleInterop": false,
Expand All @@ -13,9 +17,9 @@
"moduleResolution": "Node",
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true,
"jsx": "react-jsx"
"noEmit": true
},
"include": ["src"],
"references": [{ "path": "./tsconfig.node.json" }]
}
"include": [
"src"
]
}
11 changes: 0 additions & 11 deletions example/tsconfig.node.json

This file was deleted.

6 changes: 0 additions & 6 deletions example/vite.config.cjs

This file was deleted.

2 changes: 0 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@
"eslint-import-resolver-typescript": "^3.6.0",
"eslint-plugin-import": "^2.28.1",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-react": "^7.33.2",
"eslint-plugin-react-hooks": "^4.6.0",
"husky": "^8.0.3",
"lint-staged": "^13.3.0",
"nx": "16.3.2",
Expand Down
Loading

0 comments on commit bcd9431

Please sign in to comment.