@atom.io/template-react-node-backend 0.0.89 → 0.0.91
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.oxlintrc.json +12 -0
- package/.turbo/turbo-build.log +7 -11
- package/CHANGELOG.md +16 -0
- package/README.md +4 -0
- package/_gitignore +1 -0
- package/dist/index.html +1 -1
- package/dprint.json +33 -0
- package/eslint.config.ts +0 -16
- package/package.json +24 -11
- package/src/App.tsx +11 -10
- package/vite.config.ts +2 -3
package/.oxlintrc.json
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "./node_modules/oxlint/configuration_schema.json",
|
|
3
|
+
"extends": ["./node_modules/atom.io/oxlint.json"],
|
|
4
|
+
"plugins": ["typescript", "react"],
|
|
5
|
+
"rules": {
|
|
6
|
+
"react/jsx-key": "error",
|
|
7
|
+
"react/jsx-no-duplicate-props": "error",
|
|
8
|
+
"react/no-children-prop": "error",
|
|
9
|
+
"react/no-danger-with-children": "error",
|
|
10
|
+
"react/rules-of-hooks": "error"
|
|
11
|
+
}
|
|
12
|
+
}
|
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,15 +1,11 @@
|
|
|
1
1
|
$ vite build
|
|
2
|
-
[36mvite v8.2.
|
|
3
|
-
|
|
2
|
+
[36mvite v8.2.2 [32mbuilding client environment for production...[36m[39m
|
|
3
|
+
transforming...
|
|
4
|
+
✓ 123 modules transformed.
|
|
4
5
|
rendering chunks...
|
|
5
6
|
computing gzip size...
|
|
6
|
-
dist/index.html 0.45 kB │ gzip:
|
|
7
|
-
dist/assets/index-NoNSZ6e2.css 2.97 kB │ gzip:
|
|
8
|
-
dist/assets/index-
|
|
7
|
+
dist/index.html 0.45 kB │ gzip: 0.29 kB
|
|
8
|
+
dist/assets/index-NoNSZ6e2.css 2.97 kB │ gzip: 1.01 kB
|
|
9
|
+
dist/assets/index-DjbBHeDH.js 328.18 kB │ gzip: 98.07 kB
|
|
9
10
|
|
|
10
|
-
[
|
|
11
|
-
(!) Some chunks are larger than 500 kB after minification. Consider:
|
|
12
|
-
- Using dynamic import() to code-split the application
|
|
13
|
-
- Use build.rolldownOptions.output.codeSplitting to improve chunking: https://rolldown.rs/reference/OutputOptions.codeSplitting
|
|
14
|
-
- Adjust chunk size limit for this warning via build.chunkSizeWarningLimit.[39m
|
|
15
|
-
[32m✓ built in 934ms[39m
|
|
11
|
+
[32m✓ built in 559ms[39m
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @atom.io/template-react-node-backend
|
|
2
2
|
|
|
3
|
+
## 0.0.91
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 88f81c3: Give every released template a pinned, standalone Oxlint, ESLint, TypeScript, and dprint quality baseline with zero-warning scripts and a single canonical configuration shipped at the atom.io package root.
|
|
8
|
+
- Updated dependencies [98d897b]
|
|
9
|
+
- Updated dependencies [88f81c3]
|
|
10
|
+
- atom.io@0.52.2
|
|
11
|
+
|
|
12
|
+
## 0.0.90
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- Updated dependencies [a082cfd]
|
|
17
|
+
- atom.io@0.52.1
|
|
18
|
+
|
|
3
19
|
## 0.0.89
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -30,6 +30,10 @@ npm run build
|
|
|
30
30
|
npm run preview
|
|
31
31
|
```
|
|
32
32
|
|
|
33
|
+
## Quality Checks
|
|
34
|
+
|
|
35
|
+
Run `npm run lint` before committing. It enforces ESLint, type-aware Oxlint, React hook call-order correctness, and TypeScript with zero warnings. Run `npm run fmt:check` in CI and `npm run fmt` to apply the pinned dprint configuration locally.
|
|
36
|
+
|
|
33
37
|
## Where To Look
|
|
34
38
|
|
|
35
39
|
- `src/App.tsx`: the React UI, loadable atoms, atom families, optimistic writes, and derived stats.
|
package/_gitignore
CHANGED
package/dist/index.html
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
7
|
<title>vite-react</title>
|
|
8
|
-
<script type="module" crossorigin src="/assets/index-
|
|
8
|
+
<script type="module" crossorigin src="/assets/index-DjbBHeDH.js"></script>
|
|
9
9
|
<link rel="stylesheet" crossorigin href="/assets/index-NoNSZ6e2.css">
|
|
10
10
|
</head>
|
|
11
11
|
<body>
|
package/dprint.json
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://dprint.dev/schemas/v0.json",
|
|
3
|
+
"lineWidth": 81,
|
|
4
|
+
"useTabs": true,
|
|
5
|
+
"indentWidth": 2,
|
|
6
|
+
"includes": ["**/*.{ts,tsx,js,jsx,mjs,cjs,json,jsonc,md,mdx,css}"],
|
|
7
|
+
"excludes": [
|
|
8
|
+
"**/dist/**",
|
|
9
|
+
"**/node_modules/**",
|
|
10
|
+
"**/playwright-report/**",
|
|
11
|
+
"**/test-results/**"
|
|
12
|
+
],
|
|
13
|
+
"oxc": {
|
|
14
|
+
"associations": ["**/*.{ts,tsx,js,jsx,mjs,cjs}"],
|
|
15
|
+
"semicolons": "asNeeded",
|
|
16
|
+
"trailingCommas": "all"
|
|
17
|
+
},
|
|
18
|
+
"json": {
|
|
19
|
+
"associations": ["**/*.{json,jsonc}"]
|
|
20
|
+
},
|
|
21
|
+
"markdown": {
|
|
22
|
+
"associations": ["**/*.{md,mdx}"]
|
|
23
|
+
},
|
|
24
|
+
"malva": {
|
|
25
|
+
"associations": ["**/*.css"]
|
|
26
|
+
},
|
|
27
|
+
"plugins": [
|
|
28
|
+
"./node_modules/@dprint/oxc/plugin.wasm",
|
|
29
|
+
"./node_modules/@dprint/json/plugin.wasm",
|
|
30
|
+
"./node_modules/@dprint/markdown/plugin.wasm",
|
|
31
|
+
"./node_modules/dprint-plugin-malva/plugin.wasm"
|
|
32
|
+
]
|
|
33
|
+
}
|
package/eslint.config.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import eslintReact from "@eslint-react/eslint-plugin"
|
|
2
1
|
import { default as TypeScriptPlugin } from "@typescript-eslint/eslint-plugin"
|
|
3
2
|
import * as parser from "@typescript-eslint/parser"
|
|
4
3
|
import AtomIOPlugin from "atom.io/eslint-plugin"
|
|
@@ -160,25 +159,10 @@ const commonRules = {
|
|
|
160
159
|
quotes: [ERROR, `backtick`],
|
|
161
160
|
} satisfies Linter.Config[`rules`]
|
|
162
161
|
|
|
163
|
-
const eslintReactConfig = eslintReact.configs[
|
|
164
|
-
`recommended-typescript`
|
|
165
|
-
] satisfies Linter.Config
|
|
166
|
-
|
|
167
162
|
const configs: Linter.Config[] = [
|
|
168
163
|
{
|
|
169
164
|
ignores: [`**/dist/**`, `**/gen/**`, `**/node_modules/**`],
|
|
170
165
|
},
|
|
171
|
-
{
|
|
172
|
-
...eslintReactConfig,
|
|
173
|
-
files: [`**/*.ts{,x}`],
|
|
174
|
-
settings: {
|
|
175
|
-
...eslintReactConfig.settings,
|
|
176
|
-
"react-x": {
|
|
177
|
-
...eslintReactConfig.settings?.[`react-x`],
|
|
178
|
-
version: `detect`,
|
|
179
|
-
},
|
|
180
|
-
},
|
|
181
|
-
},
|
|
182
166
|
{
|
|
183
167
|
languageOptions: { parser, parserOptions },
|
|
184
168
|
files: [`**/*.ts{,x}`, `eslint.config.ts`],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atom.io/template-react-node-backend",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.91",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -12,30 +12,43 @@
|
|
|
12
12
|
},
|
|
13
13
|
"type": "module",
|
|
14
14
|
"dependencies": {
|
|
15
|
+
"atom.io": "0.52.2",
|
|
15
16
|
"react": "19.2.8",
|
|
16
17
|
"react-dom": "19.2.8",
|
|
17
|
-
"zod": "4.4
|
|
18
|
-
"atom.io": "0.52.0"
|
|
18
|
+
"zod": "4.5.4"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
21
|
"@eslint-react/eslint-plugin": "5.18.6",
|
|
22
|
-
"@
|
|
22
|
+
"@dprint/json": "0.23.0",
|
|
23
|
+
"@dprint/markdown": "0.23.2",
|
|
24
|
+
"@dprint/oxc": "0.37.0",
|
|
25
|
+
"@types/node": "26.4.0",
|
|
23
26
|
"@types/react": "19.2.18",
|
|
24
|
-
"@types/react-dom": "19.2.
|
|
25
|
-
"@vitejs/plugin-react": "6.
|
|
27
|
+
"@types/react-dom": "19.2.5",
|
|
28
|
+
"@vitejs/plugin-react": "6.1.1",
|
|
26
29
|
"babel-plugin-react-compiler": "1.0.0",
|
|
27
30
|
"concurrently": "10.0.5",
|
|
28
|
-
"
|
|
29
|
-
"
|
|
31
|
+
"dprint": "0.56.1",
|
|
32
|
+
"dprint-plugin-malva": "0.16.0",
|
|
33
|
+
"eslint": "10.9.1",
|
|
34
|
+
"eslint-plugin-react-refresh": "0.5.5",
|
|
30
35
|
"globals": "17.11.0",
|
|
36
|
+
"oxlint": "1.80.0",
|
|
37
|
+
"oxlint-tsgolint": "7.0.2001",
|
|
38
|
+
"oxc-transform-react": "0.147.0",
|
|
31
39
|
"typescript": "7.0.2",
|
|
32
|
-
"typescript-eslint": "8.
|
|
33
|
-
"vite": "8.2.
|
|
40
|
+
"typescript-eslint": "8.68.0",
|
|
41
|
+
"vite": "8.2.2"
|
|
34
42
|
},
|
|
35
43
|
"scripts": {
|
|
36
44
|
"dev": "concurrently vite ./node/server.ts ./node/authenticator.ts",
|
|
37
45
|
"build": "vite build",
|
|
38
|
-
"
|
|
46
|
+
"fmt": "dprint fmt .",
|
|
47
|
+
"fmt:check": "dprint check .",
|
|
48
|
+
"lint": "npm run lint:eslint && npm run lint:oxlint && npm run lint:types",
|
|
49
|
+
"lint:eslint": "eslint --max-warnings 0 .",
|
|
50
|
+
"lint:oxlint": "oxlint --deny-warnings .",
|
|
51
|
+
"lint:types": "tsc -b",
|
|
39
52
|
"preview": "concurrently \"vite preview\" ./node/server.ts ./node/authenticator.ts"
|
|
40
53
|
}
|
|
41
54
|
}
|
package/src/App.tsx
CHANGED
|
@@ -9,7 +9,6 @@ import {
|
|
|
9
9
|
setState,
|
|
10
10
|
} from "atom.io"
|
|
11
11
|
import { useI, useLoadable, useO } from "atom.io/react"
|
|
12
|
-
import { useCallback } from "react"
|
|
13
12
|
import z from "zod"
|
|
14
13
|
|
|
15
14
|
const SERVER_URL = `http://localhost:3000`
|
|
@@ -217,11 +216,13 @@ export function App(): React.JSX.Element {
|
|
|
217
216
|
function Todo({ todoKey }: { todoKey: number }): React.JSX.Element {
|
|
218
217
|
const todo = useLoadable(todoAtoms, todoKey, TODO_FALLBACK)
|
|
219
218
|
const isSuspended = todo.loading || !Number.isInteger(todoKey)
|
|
220
|
-
const toggleDone =
|
|
219
|
+
const toggleDone = (e: React.ChangeEvent<HTMLInputElement>): void => {
|
|
221
220
|
const isNowDone = e.target.checked ? 1 : 0
|
|
222
221
|
void toggleTodoDone(todoKey, isNowDone)
|
|
223
|
-
}
|
|
224
|
-
const deleteThisTodo =
|
|
222
|
+
}
|
|
223
|
+
const deleteThisTodo = (): void => {
|
|
224
|
+
void deleteTodo(todoKey)
|
|
225
|
+
}
|
|
225
226
|
return (
|
|
226
227
|
<div className={cn(`todo`, isSuspended && `loading`)}>
|
|
227
228
|
<input
|
|
@@ -249,13 +250,13 @@ const newTodoTextAtom = atom<string>({
|
|
|
249
250
|
function NewTodo(): React.JSX.Element {
|
|
250
251
|
const text = useO(newTodoTextAtom)
|
|
251
252
|
const setText = useI(newTodoTextAtom)
|
|
252
|
-
const change =
|
|
253
|
+
const change = (e: React.ChangeEvent<HTMLInputElement>): void => {
|
|
253
254
|
setText(e.target.value)
|
|
254
|
-
}
|
|
255
|
-
const submit =
|
|
255
|
+
}
|
|
256
|
+
const submit = (e: React.SubmitEvent<HTMLFormElement>): void => {
|
|
256
257
|
e.preventDefault()
|
|
257
258
|
void addTodo()
|
|
258
|
-
}
|
|
259
|
+
}
|
|
259
260
|
return (
|
|
260
261
|
<form className="todo" onSubmit={submit}>
|
|
261
262
|
<input type="checkbox" checked={false} disabled />
|
|
@@ -281,7 +282,7 @@ const longLoadTimesAtom = atom<Loadable<boolean>>({
|
|
|
281
282
|
})
|
|
282
283
|
function LongLoadTimes(): React.JSX.Element {
|
|
283
284
|
const longLoadTimes = useLoadable(longLoadTimesAtom, false)
|
|
284
|
-
const toggle =
|
|
285
|
+
const toggle = async (): Promise<void> => {
|
|
285
286
|
const url = new URL(`/long-load-times`, SERVER_URL)
|
|
286
287
|
const res = await fetch(url, {
|
|
287
288
|
method: `POST`,
|
|
@@ -289,7 +290,7 @@ function LongLoadTimes(): React.JSX.Element {
|
|
|
289
290
|
})
|
|
290
291
|
const newState = await res.json()
|
|
291
292
|
setState(longLoadTimesAtom, newState)
|
|
292
|
-
}
|
|
293
|
+
}
|
|
293
294
|
return (
|
|
294
295
|
<div className="long-load-times">
|
|
295
296
|
<label>
|