Skip to content

Commit

Permalink
Merge pull request #42 from sj-distributor/41-package-upgrade
Browse files Browse the repository at this point in the history
package upgrade
  • Loading branch information
Simoon-F authored Jul 3, 2023
2 parents e9ae24b + 5916adc commit 23107fa
Show file tree
Hide file tree
Showing 12 changed files with 85 additions and 56 deletions.
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,10 @@ cd <your-project-name>
pnpm
pnpm dev
```
```

# Templates
|template name|description|
|-|-|
|template-react-recoil|vite + typescript + recoil|
|template-react-ts|vite + typescript|
10 changes: 5 additions & 5 deletions build.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { defineBuildConfig } from 'unbuild'
import { defineBuildConfig } from "unbuild";

export default defineBuildConfig({
entries: ['src/index'],
entries: ["src/index"],
clean: true,
rollup: {
inlineDependencies: true,
Expand All @@ -10,6 +10,6 @@ export default defineBuildConfig({
},
},
alias: {
prompts: 'prompts/lib/index.js',
}
})
prompts: "prompts/lib/index.js",
},
});
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "create-react-boilerplates",
"version": "2.1.2",
"version": "2.1.3",
"type": "module",
"bin": {
"create-react-boilerplates": "index.js",
Expand Down
4 changes: 3 additions & 1 deletion templates/template-react-recoil/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@
"sourceType": "module"
},
"plugins": [],
"rules": {},
"rules": {
"@typescript-eslint/no-explicit-any": "off"
},
"settings": {
"react": {
"version": "detect"
Expand Down
25 changes: 12 additions & 13 deletions templates/template-react-recoil/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,41 +5,40 @@
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
"preview": "vite preview",
"lint": "eslint --cache --report-unused-disable-directives ."
"lint": "eslint src --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
"preview": "vite preview"
},
"dependencies": {
"@sj-distributor/eslint-plugin-react": "^0.7.1",
"@types/node": "^17.0.35",
"ahooks": "^3.7.4",
"axios": "^0.27.2",
"ramda": "^0.28.0",
"axios": "^1.4.0",
"ramda": "^0.29.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-router-dom": "^6.6.1",
"recoil": "^0.7.7"
},
"devDependencies": {
"@types/ramda": "^0.28.23",
"@types/ramda": "^0.29.3",
"@types/react": "^18.0.26",
"@types/react-dom": "^18.0.10",
"@typescript-eslint/eslint-plugin": "^5.26.0",
"@typescript-eslint/parser": "^5.26.0",
"@vitejs/plugin-react": "^1.3.0",
"@vitejs/plugin-react": "^4.0.1",
"autoprefixer": "^10.4.13",
"eslint": "^8.30.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-import": "^2.25.3",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-react": "^7.30.0",
"eslint-plugin-react-hooks": "^4.3.0",
"eslint-plugin-simple-import-sort": "^7.0.0",
"eslint-plugin-unicorn": "^42.0.0",
"eslint-plugin-simple-import-sort": "^10.0.0",
"eslint-plugin-unicorn": "^47.0.0",
"postcss": "^8.4.14",
"prettier": "^2.6.2",
"tailwindcss": "^3.2.4",
"typescript": "^4.6.3",
"typescript-plugin-css-modules": "^3.4.0",
"vite": "^2.9.9"
"typescript": "^5.1.6",
"typescript-plugin-css-modules": "^5.0.1",
"vite": "^4.3.9",
"@sj-distributor/eslint-plugin-react": "^0.7.1"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { useRecoilState, useRecoilValue } from "recoil";
import useCounter from "@/hooks/use-counter";
import { defaultUser, isLoginState, userState } from "@/models";
import { getUserApi } from "@/services/api/api";

export const useStore = () => {
const navigate = useNavigate();

Expand Down
32 changes: 20 additions & 12 deletions templates/template-react-recoil/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,27 +1,35 @@
{
"extends": "./tsconfig.paths.json",
"compilerOptions": {
"target": "ESNext",
"lib": ["ES2020", "DOM", "DOM.Iterable"],
"target": "ES2020",
"module": "ESNext",
"skipLibCheck": true,
"useDefineForClassFields": true,
"lib": ["DOM", "DOM.Iterable", "ESNext"],

/* Bundler mode */
"jsx": "react-jsx",
"noEmit": true,
"allowJs": false,
"skipLibCheck": true,
"esModuleInterop": false,
"allowSyntheticDefaultImports": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"module": "ESNext",
"isolatedModules": true,
"moduleResolution": "Node",
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true,
"jsx": "react-jsx",
"allowSyntheticDefaultImports": true,
"forceConsistentCasingInFileNames": true,

/* Linting */
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true,

/* Plugin */
"plugins": [
{
"name": "typescript-plugin-css-modules"
}
],
"noFallthroughCasesInSwitch": true
]
},
"include": ["src"],
"references": [
Expand Down
6 changes: 4 additions & 2 deletions templates/template-react-recoil/tsconfig.node.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
{
"compilerOptions": {
"module": "ESNext",
"composite": true,
"module": "esnext",
"moduleResolution": "node"
"skipLibCheck": true,
"moduleResolution": "Node",
"allowSyntheticDefaultImports": true
},
"include": ["vite.config.ts"]
}
4 changes: 3 additions & 1 deletion templates/template-react-ts/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@
"sourceType": "module"
},
"plugins": [],
"rules": {},
"rules": {
"@typescript-eslint/no-explicit-any": "off"
},
"settings": {
"react": {
"version": "detect"
Expand Down
11 changes: 5 additions & 6 deletions templates/template-react-ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,12 @@
"dev": "vite",
"build": "tsc && vite build",
"preview": "vite preview",
"lint": "eslint --cache --report-unused-disable-directives ."
"lint": "eslint src --ext ts,tsx --report-unused-disable-directives --max-warnings 0"
},
"dependencies": {
"@sj-distributor/eslint-plugin-react": "^0.7.1",
"@types/node": "^17.0.35",
"ahooks": "^3.7.4",
"axios": "^0.27.2",
"ramda": "^0.28.0",
"axios": "^1.4.0",
"ramda": "^0.29.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-router-dom": "^6.6.1"
Expand All @@ -39,6 +37,7 @@
"tailwindcss": "^3.2.4",
"typescript": "^4.6.3",
"typescript-plugin-css-modules": "^3.4.0",
"vite": "^2.9.9"
"vite": "^2.9.9",
"@sj-distributor/eslint-plugin-react": "^0.7.1"
}
}
32 changes: 20 additions & 12 deletions templates/template-react-ts/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,27 +1,35 @@
{
"extends": "./tsconfig.paths.json",
"compilerOptions": {
"target": "ESNext",
"lib": ["ES2020", "DOM", "DOM.Iterable"],
"target": "ES2020",
"module": "ESNext",
"skipLibCheck": true,
"useDefineForClassFields": true,
"lib": ["DOM", "DOM.Iterable", "ESNext"],

/* Bundler mode */
"jsx": "react-jsx",
"noEmit": true,
"allowJs": false,
"skipLibCheck": true,
"esModuleInterop": false,
"allowSyntheticDefaultImports": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"module": "ESNext",
"isolatedModules": true,
"moduleResolution": "Node",
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true,
"jsx": "react-jsx",
"allowSyntheticDefaultImports": true,
"forceConsistentCasingInFileNames": true,

/* Linting */
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true,

/* Plugin */
"plugins": [
{
"name": "typescript-plugin-css-modules"
}
],
"noFallthroughCasesInSwitch": true
]
},
"include": ["src"],
"references": [
Expand Down
6 changes: 4 additions & 2 deletions templates/template-react-ts/tsconfig.node.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
{
"compilerOptions": {
"module": "ESNext",
"composite": true,
"module": "esnext",
"moduleResolution": "node"
"skipLibCheck": true,
"moduleResolution": "Node",
"allowSyntheticDefaultImports": true
},
"include": ["vite.config.ts"]
}

0 comments on commit 23107fa

Please sign in to comment.