@atom.io/template-preact-svg-editor 0.0.86 → 0.0.87

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 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
+ }
@@ -1,10 +1,11 @@
1
1
  $ vite build
2
- vite v8.2.1 building client environment for production...
3
- 
2
+ vite v8.2.2 building client environment for production...
3
+ transforming...
4
+ ✓ 21 modules transformed.
4
5
  rendering chunks...
5
6
  computing gzip size...
6
7
  dist/index.html 0.52 kB │ gzip: 0.32 kB
7
8
  dist/assets/index-BNVXGhU4.css 1.58 kB │ gzip: 0.72 kB
8
- dist/assets/index-D4vZs64Z.js 83.85 kB │ gzip: 26.20 kB
9
+ dist/assets/index-CV98Fg2H.js 83.81 kB │ gzip: 26.18 kB
9
10
 
10
- ✓ built in 220ms
11
+ ✓ built in 200ms
package/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # @atom.io/template-preact-svg-editor
2
2
 
3
+ ## 0.0.87
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
+
3
12
  ## 0.0.86
4
13
 
5
14
  ### Patch Changes
package/README.md CHANGED
@@ -22,6 +22,10 @@ npm run build
22
22
  npm run preview
23
23
  ```
24
24
 
25
+ ## Quality Checks
26
+
27
+ 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.
28
+
25
29
  ## Where To Look
26
30
 
27
31
  - `src/index.tsx`: Preact entry point and resource links.
package/_gitignore CHANGED
@@ -21,4 +21,5 @@ dist-ssr
21
21
  *.ntvs*
22
22
  *.njsproj
23
23
  *.sln
24
- *.sw?
24
+ *.sw?
25
+ *.tsbuildinfo
package/dist/index.html CHANGED
@@ -6,7 +6,7 @@
6
6
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
7
  <meta name="color-scheme" content="light dark" />
8
8
  <title>Vite + Preact + Atom.io</title>
9
- <script type="module" crossorigin src="/assets/index-D4vZs64Z.js"></script>
9
+ <script type="module" crossorigin src="/assets/index-CV98Fg2H.js"></script>
10
10
  <link rel="stylesheet" crossorigin href="/assets/index-BNVXGhU4.css">
11
11
  </head>
12
12
  <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,8 +1,7 @@
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"
5
- import type { ESLint, Linter } from "eslint"
4
+ import type { Linter } from "eslint"
6
5
  import * as ImportPlugin from "eslint-plugin-import-x"
7
6
  import { default as SimpleImportSortPlugin } from "eslint-plugin-simple-import-sort"
8
7
 
@@ -161,32 +160,16 @@ const commonRules = {
161
160
  quotes: [ERROR, `backtick`],
162
161
  } satisfies Linter.Config[`rules`]
163
162
 
164
- const eslintReactConfig = eslintReact.configs[
165
- `recommended-typescript`
166
- ] satisfies Linter.Config
167
-
168
163
  const configs: Linter.Config[] = [
169
164
  {
170
165
  ignores: [`**/dist/**`, `**/gen/**`, `**/node_modules/**`],
171
166
  },
172
- {
173
- ...eslintReactConfig,
174
- files: [`**/*.ts{,x}`],
175
- settings: {
176
- ...eslintReactConfig.settings,
177
- "react-x": {
178
- ...eslintReactConfig.settings?.[`react-x`],
179
- importSource: `preact`,
180
- version: `detect`,
181
- },
182
- },
183
- },
184
167
  {
185
168
  languageOptions: { parser, parserOptions },
186
169
  files: [`**/*.ts{,x}`, `eslint.config.ts`],
187
170
  plugins: {
188
171
  "@typescript-eslint": TypeScriptPlugin,
189
- "atom.io": AtomIOPlugin as ESLint.Plugin,
172
+ "atom.io": AtomIOPlugin,
190
173
  import: ImportPlugin,
191
174
  "simple-import-sort": SimpleImportSortPlugin,
192
175
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atom.io/template-preact-svg-editor",
3
- "version": "0.0.86",
3
+ "version": "0.0.87",
4
4
  "license": "Apache-2.0",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -12,24 +12,37 @@
12
12
  },
13
13
  "type": "module",
14
14
  "dependencies": {
15
+ "atom.io": "0.52.2",
15
16
  "preact": "10.29.8",
16
17
  "react": "npm:@preact/compat@18.3.2",
17
- "react-dom": "npm:@preact/compat@18.3.2",
18
- "atom.io": "0.52.1"
18
+ "react-dom": "npm:@preact/compat@18.3.2"
19
19
  },
20
20
  "devDependencies": {
21
- "@eslint-react/eslint-plugin": "5.18.6",
21
+ "@dprint/json": "0.23.0",
22
+ "@dprint/markdown": "0.23.2",
23
+ "@dprint/oxc": "0.37.0",
22
24
  "@preact/preset-vite": "2.10.6",
23
- "@typescript-eslint/eslint-plugin": "8.67.0",
24
- "@typescript-eslint/parser": "8.67.0",
25
+ "@typescript-eslint/eslint-plugin": "8.68.0",
26
+ "@typescript-eslint/parser": "8.68.0",
27
+ "dprint": "0.56.1",
28
+ "dprint-plugin-malva": "0.16.0",
29
+ "eslint": "10.9.1",
25
30
  "eslint-plugin-import-x": "4.17.1",
26
31
  "eslint-plugin-simple-import-sort": "14.0.0",
32
+ "oxlint": "1.80.0",
33
+ "oxlint-tsgolint": "7.0.2001",
27
34
  "typescript": "7.0.2",
28
- "vite": "8.2.1"
35
+ "vite": "8.2.2"
29
36
  },
30
37
  "scripts": {
31
38
  "dev": "vite",
32
39
  "build": "vite build",
40
+ "fmt": "dprint fmt .",
41
+ "fmt:check": "dprint check .",
42
+ "lint": "npm run lint:eslint && npm run lint:oxlint && npm run lint:types",
43
+ "lint:eslint": "eslint --max-warnings 0 .",
44
+ "lint:oxlint": "oxlint --deny-warnings .",
45
+ "lint:types": "tsc -b",
33
46
  "preview": "vite preview"
34
47
  }
35
48
  }
@@ -79,16 +79,8 @@ function Bezier({
79
79
  prevSubpathKey: string
80
80
  node?: PointXY
81
81
  }) {
82
- let node: PointXY | null
83
- // eslint-disable-next-line @typescript-eslint/switch-exhaustiveness-check
84
- switch (typeof maybeNode) {
85
- case `undefined`:
86
- // eslint-disable-next-line @eslint-react/rules-of-hooks
87
- node = useO(nodeAtoms, prevSubpathKey)
88
- break
89
- default:
90
- node = maybeNode
91
- }
82
+ const previousNode = useO(nodeAtoms, prevSubpathKey)
83
+ const node = maybeNode ?? previousNode
92
84
  return node === null ? null : (
93
85
  <>
94
86
  <line
package/tsconfig.json CHANGED
@@ -1,5 +1,6 @@
1
1
  {
2
2
  "compilerOptions": {
3
+ "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.tsbuildinfo",
3
4
  "target": "ES2024",
4
5
  "module": "NodeNext",
5
6
  "moduleResolution": "NodeNext",