create-packer 1.45.2 → 1.45.3

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.
Files changed (27) hide show
  1. package/package.json +1 -1
  2. package/template/lib/workspace/eslint.config.mjs +118 -116
  3. package/template/web-app/react-rsbuild/domain/router/components/index.ts +2 -2
  4. package/template/web-app/react-rsbuild/domain/router/components/route-layout.tsx +19 -19
  5. package/template/web-app/react-rsbuild/domain/router/components/sub-route-outlet.tsx +22 -22
  6. package/template/web-app/react-rsbuild/domain/router/home/routes.tsx +1 -1
  7. package/template/web-app/react-rsbuild/domain/router/index.ts +4 -4
  8. package/template/web-app/react-rsbuild/eslint.config.js +106 -104
  9. package/template/web-app/react-rsbuild/main.css +2 -2
  10. package/template/web-app/react-rsbuild/pages/home/index.ts +1 -1
  11. package/template/web-app/react-rsbuild/shared/components/componentInstance.tsx +80 -80
  12. package/template/web-app/react-rsbuild/shared/components/index.ts +1 -1
  13. package/template/web-app/react-rsbuild/shared/types/utils.ts +1 -1
  14. package/template/web-app/react-vite/domain/router/home/routes.tsx +1 -1
  15. package/template/web-app/react-vite/eslint.config.js +3 -1
  16. package/template/web-app/react-vite/shared/types/utils.ts +1 -1
  17. package/template/web-app/svelte/.env +1 -1
  18. package/template/web-app/svelte/.svelte-kit/ambient.d.ts +12 -14
  19. package/template/web-app/svelte/eslint.config.js +2 -0
  20. package/template/web-app/vue/eslint.config.js +3 -1
  21. package/template/web-app/vue/shared/hooks/useList.ts +1 -1
  22. package/template/web-app/vue/vite-env.d.ts +1 -1
  23. package/template/web-app/vue-rsbuild/env.d.ts +1 -1
  24. package/template/web-app/vue-rsbuild/eslint.config.js +113 -111
  25. package/template/web-app/vue-rsbuild/shared/hooks/useList.ts +1 -1
  26. package/template/web-extension/eslint.config.js +107 -105
  27. package/template/web-extension/shared/types/utils.ts +1 -1
@@ -1,105 +1,107 @@
1
- import eslint from '@eslint/js'
2
- import globals from 'globals'
3
- import tseslint from 'typescript-eslint'
4
- import importPlugin from 'eslint-plugin-import'
5
- import reactPlugin from 'eslint-plugin-react'
6
- import reactHooksPlugin from 'eslint-plugin-react-hooks'
7
-
8
- const scriptExtensions = ['js', 'jsx', 'mjs', 'cjs', 'ts', 'tsx']
9
- const files = scriptExtensions.map(ext => `**/*.${ext}`)
10
-
11
- export default tseslint.config([
12
- {
13
- ignores: ['**/node_modules/', '**/dist/', '**/.history/', '**/.vscode/', 'vite.config.ts.*']
14
- },
15
- eslint.configs.recommended,
16
- importPlugin.flatConfigs.recommended,
17
- tseslint.configs.recommended,
18
- {
19
- plugins: { reactPlugin, reactHooksPlugin },
20
- files,
21
- languageOptions: {
22
- ecmaVersion: 2018,
23
- sourceType: 'module',
24
- parserOptions: {
25
- ecmaFeatures: {
26
- jsx: true
27
- },
28
- useJSXTextNode: true
29
- },
30
- globals: {
31
- ...globals.browser,
32
- ...globals.node
33
- }
34
- },
35
- settings: {
36
- 'import/resolver': {
37
- typescript: true,
38
- node: true
39
- },
40
- react: {
41
- version: '18'
42
- }
43
- },
44
- rules: {
45
- 'import/export': 'off',
46
- 'import/namespace': 'off',
47
- 'import/default': 'off',
48
- 'import/no-named-as-default-member': 'off',
49
- 'import/no-named-as-default': 'off',
50
- 'import/order': [
51
- 'error',
52
- {
53
- groups: [
54
- 'builtin',
55
- 'external',
56
- 'internal',
57
- 'parent',
58
- 'sibling',
59
- 'index',
60
- 'object',
61
- 'type'
62
- ],
63
- pathGroups: [
64
- { pattern: 'react', group: 'external', position: 'before' },
65
- { pattern: 'react-dom/*', group: 'external', position: 'before' },
66
- { pattern: 'react-router', group: 'external', position: 'before' },
67
- { pattern: 'react-router-dom', group: 'external', position: 'before' }
68
- ],
69
- pathGroupsExcludedImportTypes: ['react', 'react-router', 'react-router-dom']
70
- }
71
- ],
72
- 'no-case-declarations': 'off',
73
- '@typescript-eslint/no-unused-expressions': 'off',
74
- '@typescript-eslint/no-empty-object-type': 'off',
75
- '@typescript-eslint/no-var-requires': 0,
76
- '@typescript-eslint/explicit-function-return-type': 'off',
77
- '@typescript-eslint/no-explicit-any': 0,
78
- '@typescript-eslint/no-non-null-assertion': 'off',
79
- '@typescript-eslint/no-inferrable-types': [
80
- 'warn',
81
- {
82
- ignoreParameters: true
83
- }
84
- ],
85
- '@typescript-eslint/no-unused-vars': [
86
- 'warn',
87
- {
88
- argsIgnorePattern: '^_'
89
- }
90
- ],
91
- '@typescript-eslint/member-delimiter-style': 0,
92
- '@typescript-eslint/class-name-casing': 0,
93
- '@typescript-eslint/explicit-module-boundary-types': 'off',
94
- '@typescript-eslint/ban-ts-comment': 'off',
95
- '@typescript-eslint/no-empty-interface': 'off',
96
- '@typescript-eslint/triple-slash-reference': 'off',
97
- 'react/prop-types': 'off',
98
- 'react/no-find-dom-node': 'off',
99
- 'react-hooks/exhaustive-deps': 'off',
100
- 'react/display-name': 'off',
101
- 'react/react-in-jsx-scope': 'off',
102
- 'no-constant-condition': 'off'
103
- }
104
- }
105
- ])
1
+ import eslint from '@eslint/js'
2
+ import globals from 'globals'
3
+ import tseslint from 'typescript-eslint'
4
+ import importPlugin from 'eslint-plugin-import'
5
+ import reactPlugin from 'eslint-plugin-react'
6
+ import reactHooksPlugin from 'eslint-plugin-react-hooks'
7
+
8
+ const scriptExtensions = ['js', 'jsx', 'mjs', 'cjs', 'ts', 'tsx']
9
+ const files = scriptExtensions.map(ext => `**/*.${ext}`)
10
+
11
+ export default tseslint.config([
12
+ {
13
+ ignores: ['**/node_modules/', '**/dist/', '**/.history/', '**/.vscode/', 'vite.config.ts.*']
14
+ },
15
+ eslint.configs.recommended,
16
+ importPlugin.flatConfigs.recommended,
17
+ tseslint.configs.recommended,
18
+ {
19
+ plugins: { reactPlugin, reactHooksPlugin },
20
+ files,
21
+ languageOptions: {
22
+ ecmaVersion: 2018,
23
+ sourceType: 'module',
24
+ parserOptions: {
25
+ ecmaFeatures: {
26
+ jsx: true
27
+ },
28
+ useJSXTextNode: true
29
+ },
30
+ globals: {
31
+ ...globals.browser,
32
+ ...globals.node
33
+ }
34
+ },
35
+ settings: {
36
+ 'import/resolver': {
37
+ typescript: true,
38
+ node: true
39
+ },
40
+ react: {
41
+ version: '18'
42
+ }
43
+ },
44
+ rules: {
45
+ 'import/export': 'off',
46
+ 'import/namespace': 'off',
47
+ 'import/default': 'off',
48
+ 'import/consistent-type-specifier-style': ['error', 'prefer-inline'],
49
+ 'import/no-duplicates': ['error', { 'prefer-inline': true }],
50
+ 'import/no-named-as-default-member': 'off',
51
+ 'import/no-named-as-default': 'off',
52
+ 'import/order': [
53
+ 'error',
54
+ {
55
+ groups: [
56
+ 'builtin',
57
+ 'external',
58
+ 'internal',
59
+ 'parent',
60
+ 'sibling',
61
+ 'index',
62
+ 'object',
63
+ 'type'
64
+ ],
65
+ pathGroups: [
66
+ { pattern: 'react', group: 'external', position: 'before' },
67
+ { pattern: 'react-dom/*', group: 'external', position: 'before' },
68
+ { pattern: 'react-router', group: 'external', position: 'before' },
69
+ { pattern: 'react-router-dom', group: 'external', position: 'before' }
70
+ ],
71
+ pathGroupsExcludedImportTypes: ['builtin']
72
+ }
73
+ ],
74
+ 'no-case-declarations': 'off',
75
+ '@typescript-eslint/no-unused-expressions': 'off',
76
+ '@typescript-eslint/no-empty-object-type': 'off',
77
+ '@typescript-eslint/no-var-requires': 0,
78
+ '@typescript-eslint/explicit-function-return-type': 'off',
79
+ '@typescript-eslint/no-explicit-any': 0,
80
+ '@typescript-eslint/no-non-null-assertion': 'off',
81
+ '@typescript-eslint/no-inferrable-types': [
82
+ 'warn',
83
+ {
84
+ ignoreParameters: true
85
+ }
86
+ ],
87
+ '@typescript-eslint/no-unused-vars': [
88
+ 'warn',
89
+ {
90
+ argsIgnorePattern: '^_'
91
+ }
92
+ ],
93
+ '@typescript-eslint/member-delimiter-style': 0,
94
+ '@typescript-eslint/class-name-casing': 0,
95
+ '@typescript-eslint/explicit-module-boundary-types': 'off',
96
+ '@typescript-eslint/ban-ts-comment': 'off',
97
+ '@typescript-eslint/no-empty-interface': 'off',
98
+ '@typescript-eslint/triple-slash-reference': 'off',
99
+ 'react/prop-types': 'off',
100
+ 'react/no-find-dom-node': 'off',
101
+ 'react-hooks/exhaustive-deps': 'off',
102
+ 'react/display-name': 'off',
103
+ 'react/react-in-jsx-scope': 'off',
104
+ 'no-constant-condition': 'off'
105
+ }
106
+ }
107
+ ])
@@ -1,3 +1,3 @@
1
- import type { UseBoundStore, StoreApi } from 'zustand'
1
+ import { type UseBoundStore, type StoreApi } from 'zustand'
2
2
 
3
3
  export type ExtractModelType<T> = T extends UseBoundStore<StoreApi<infer S>> ? S : unknown