@atom.io/template-preact-svg-editor 0.0.60 → 0.0.61

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.
@@ -7,4 +7,4 @@ dist/index.html 0.52 kB │ gzip: 0.32 kB
7
7
  dist/assets/index-BNVXGhU4.css 1.58 kB │ gzip: 0.72 kB
8
8
  dist/assets/index-BJWFwj8i.js 81.11 kB │ gzip: 25.32 kB
9
9
 
10
- ✓ built in 196ms
10
+ ✓ built in 264ms
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @atom.io/template-preact-svg-editor
2
2
 
3
+ ## 0.0.61
4
+
5
+ ### Patch Changes
6
+
7
+ - 95e41d3: Migrate React linting templates to `@eslint-react/eslint-plugin` and ship local ESLint React typings.
8
+
3
9
  ## 0.0.60
4
10
 
5
11
  ### Patch Changes
package/eslint.config.ts CHANGED
@@ -1,8 +1,8 @@
1
+ import eslintReact from "@eslint-react/eslint-plugin"
1
2
  import { default as TypeScriptPlugin } from "@typescript-eslint/eslint-plugin"
2
3
  import * as parser from "@typescript-eslint/parser"
3
4
  import AtomIOPlugin from "atom.io/eslint-plugin"
4
5
  import type { ESLint, Linter } from "eslint"
5
- import PreactConfig from "eslint-config-preact"
6
6
  import * as ImportPlugin from "eslint-plugin-import-x"
7
7
  import { default as SimpleImportSortPlugin } from "eslint-plugin-simple-import-sort"
8
8
 
@@ -160,11 +160,26 @@ const commonRules = {
160
160
  quotes: [ERROR, `backtick`],
161
161
  } satisfies Linter.Config[`rules`]
162
162
 
163
+ const eslintReactConfig = eslintReact.configs[
164
+ `recommended-typescript`
165
+ ] satisfies Linter.Config
166
+
163
167
  const configs: Linter.Config[] = [
164
- ...PreactConfig,
165
168
  {
166
169
  ignores: [`**/dist/**`, `**/gen/**`, `**/node_modules/**`],
167
170
  },
171
+ {
172
+ ...eslintReactConfig,
173
+ files: [`**/*.ts{,x}`],
174
+ settings: {
175
+ ...eslintReactConfig.settings,
176
+ "react-x": {
177
+ ...eslintReactConfig.settings?.[`react-x`],
178
+ importSource: `preact`,
179
+ version: `detect`,
180
+ },
181
+ },
182
+ },
168
183
  {
169
184
  languageOptions: { parser, parserOptions },
170
185
  files: [`**/*.ts{,x}`, `eslint.config.ts`],
package/eslint.d.ts CHANGED
@@ -23,9 +23,17 @@ declare module "@typescript-eslint/eslint-plugin" {
23
23
  }
24
24
 
25
25
  // eslint-disable-next-line quotes
26
- declare module "eslint-config-preact" {
27
- import type { Linter } from "eslint"
26
+ declare module "@eslint-react/eslint-plugin" {
27
+ import type { ESLint, Linter } from "eslint"
28
28
 
29
- const configs: Linter.Config[]
30
- export = configs
29
+ type Config = Linter.Config & {
30
+ settings?: Record<string, Record<string, unknown>>
31
+ }
32
+
33
+ const plugin: ESLint.Plugin & {
34
+ configs: Record<string, Config> & {
35
+ [`recommended-typescript`]: Config
36
+ }
37
+ }
38
+ export default plugin
31
39
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atom.io/template-preact-svg-editor",
3
- "version": "0.0.60",
3
+ "version": "0.0.61",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -17,10 +17,10 @@
17
17
  "atom.io": "0.47.1"
18
18
  },
19
19
  "devDependencies": {
20
+ "@eslint-react/eslint-plugin": "5.8.10",
20
21
  "@preact/preset-vite": "2.10.5",
21
22
  "@typescript-eslint/eslint-plugin": "8.60.1",
22
23
  "@typescript-eslint/parser": "8.60.1",
23
- "eslint-config-preact": "2.0.0",
24
24
  "eslint-plugin-import-x": "4.16.2",
25
25
  "eslint-plugin-simple-import-sort": "13.0.0",
26
26
  "typescript": "6.0.3",
@@ -83,7 +83,7 @@ function Bezier({
83
83
  // eslint-disable-next-line @typescript-eslint/switch-exhaustiveness-check
84
84
  switch (typeof maybeNode) {
85
85
  case `undefined`:
86
- // eslint-disable-next-line react-hooks/rules-of-hooks
86
+ // eslint-disable-next-line @eslint-react/rules-of-hooks
87
87
  node = useO(nodeAtoms, prevSubpathKey)
88
88
  break
89
89
  default: