create-packer 1.45.2 → 1.45.4

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 (32) hide show
  1. package/package.json +2 -2
  2. package/template/cli/eslint.config.js +35 -0
  3. package/template/cli/package.json +9 -8
  4. package/template/cli/scripts/pub.js +39 -39
  5. package/template/cli/src/createTemp.ts +1 -1
  6. package/template/lib/workspace/eslint.config.mjs +118 -116
  7. package/template/web-app/react-rsbuild/domain/router/components/index.ts +2 -2
  8. package/template/web-app/react-rsbuild/domain/router/components/route-layout.tsx +19 -19
  9. package/template/web-app/react-rsbuild/domain/router/components/sub-route-outlet.tsx +22 -22
  10. package/template/web-app/react-rsbuild/domain/router/home/routes.tsx +1 -1
  11. package/template/web-app/react-rsbuild/domain/router/index.ts +4 -4
  12. package/template/web-app/react-rsbuild/eslint.config.js +106 -104
  13. package/template/web-app/react-rsbuild/main.css +2 -2
  14. package/template/web-app/react-rsbuild/pages/home/index.ts +1 -1
  15. package/template/web-app/react-rsbuild/shared/components/componentInstance.tsx +80 -80
  16. package/template/web-app/react-rsbuild/shared/components/index.ts +1 -1
  17. package/template/web-app/react-rsbuild/shared/types/utils.ts +1 -1
  18. package/template/web-app/react-vite/domain/router/home/routes.tsx +1 -1
  19. package/template/web-app/react-vite/eslint.config.js +3 -1
  20. package/template/web-app/react-vite/shared/types/utils.ts +1 -1
  21. package/template/web-app/svelte/.env +1 -1
  22. package/template/web-app/svelte/.svelte-kit/ambient.d.ts +12 -14
  23. package/template/web-app/svelte/eslint.config.js +2 -0
  24. package/template/web-app/vue/eslint.config.js +3 -1
  25. package/template/web-app/vue/shared/hooks/useList.ts +1 -1
  26. package/template/web-app/vue/vite-env.d.ts +1 -1
  27. package/template/web-app/vue-rsbuild/env.d.ts +1 -1
  28. package/template/web-app/vue-rsbuild/eslint.config.js +113 -111
  29. package/template/web-app/vue-rsbuild/shared/hooks/useList.ts +1 -1
  30. package/template/web-extension/eslint.config.js +107 -105
  31. package/template/web-extension/shared/types/utils.ts +1 -1
  32. package/template/cli/.eslintrc +0 -35
@@ -1,111 +1,113 @@
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 pluginVue from 'eslint-plugin-vue'
6
-
7
- const scriptExtensions = ['js', 'jsx', 'mjs', 'cjs', 'ts', 'tsx']
8
- const files = [...scriptExtensions.map(ext => `**/*.${ext}`), '**/*.vue']
9
-
10
- export default tseslint.config([
11
- { ignores: ['**/node_modules/', 'dist/', '.history/', '.vscode'] },
12
- eslint.configs.recommended,
13
- importPlugin.flatConfigs.recommended,
14
- tseslint.configs.recommended,
15
- pluginVue.configs['flat/recommended'],
16
- {
17
- files,
18
- languageOptions: {
19
- ecmaVersion: 2018,
20
- sourceType: 'module',
21
- parserOptions: {
22
- ecmaFeatures: {
23
- jsx: true
24
- },
25
- useJSXTextNode: true,
26
- parser: tseslint.parser,
27
- },
28
- globals: {
29
- ...globals.browser,
30
- ...globals.node
31
- }
32
- },
33
- settings: {
34
- 'import/resolver': {
35
- typescript: true,
36
- node: true
37
- }
38
- },
39
- rules: {
40
- 'import/export': 'off',
41
- 'import/namespace': 'off',
42
- 'import/default': 'off',
43
- 'import/no-named-as-default-member': 'off',
44
- 'import/no-named-as-default': 'off',
45
- 'import/order': [
46
- 'error',
47
- {
48
- groups: [
49
- 'builtin',
50
- 'external',
51
- 'internal',
52
- 'parent',
53
- 'sibling',
54
- 'index',
55
- 'object',
56
- 'type'
57
- ],
58
- pathGroups: [
59
- { pattern: 'vue', group: 'external', position: 'before' },
60
- { pattern: 'vue-router', group: 'external', position: 'before' }
61
- ],
62
- pathGroupsExcludedImportTypes: ['vue', 'vue-router']
63
- }
64
- ],
65
- 'no-case-declarations': 'off',
66
- '@typescript-eslint/no-unused-expressions': 'off',
67
- '@typescript-eslint/no-empty-object-type': 'off',
68
- '@typescript-eslint/no-var-requires': 0,
69
- '@typescript-eslint/explicit-function-return-type': 'off',
70
- '@typescript-eslint/no-explicit-any': 0,
71
- '@typescript-eslint/no-non-null-assertion': 'off',
72
- '@typescript-eslint/no-inferrable-types': [
73
- 'warn',
74
- {
75
- ignoreParameters: true
76
- }
77
- ],
78
- '@typescript-eslint/no-unused-vars': [
79
- 'warn',
80
- {
81
- argsIgnorePattern: '^_'
82
- }
83
- ],
84
- '@typescript-eslint/member-delimiter-style': 0,
85
- '@typescript-eslint/class-name-casing': 0,
86
- '@typescript-eslint/explicit-module-boundary-types': 'off',
87
- '@typescript-eslint/ban-ts-comment': 'off',
88
- '@typescript-eslint/no-empty-interface': 'off',
89
- 'vue/multi-word-component-names': 0,
90
- 'vue/html-indent': ['error', 4],
91
- 'vue/require-default-prop': 'off',
92
- 'vue/one-component-per-file': 'off',
93
- 'vue/no-dupe-keys': 'off',
94
- 'vue/html-self-closing': [
95
- 'error',
96
- {
97
- html: {
98
- void: 'always',
99
- normal: 'always',
100
- component: 'always'
101
- },
102
- svg: 'always',
103
- math: 'always'
104
- }
105
- ],
106
- 'vue/max-attributes-per-line': 'off',
107
- 'vue/singleline-html-element-content-newline': 'off',
108
- 'no-constant-condition': 'off'
109
- }
110
- }
111
- ])
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 pluginVue from 'eslint-plugin-vue'
6
+
7
+ const scriptExtensions = ['js', 'jsx', 'mjs', 'cjs', 'ts', 'tsx']
8
+ const files = [...scriptExtensions.map(ext => `**/*.${ext}`), '**/*.vue']
9
+
10
+ export default tseslint.config([
11
+ { ignores: ['**/node_modules/', 'dist/', '.history/', '.vscode'] },
12
+ eslint.configs.recommended,
13
+ importPlugin.flatConfigs.recommended,
14
+ tseslint.configs.recommended,
15
+ pluginVue.configs['flat/recommended'],
16
+ {
17
+ files,
18
+ languageOptions: {
19
+ ecmaVersion: 2018,
20
+ sourceType: 'module',
21
+ parserOptions: {
22
+ ecmaFeatures: {
23
+ jsx: true
24
+ },
25
+ useJSXTextNode: true,
26
+ parser: tseslint.parser
27
+ },
28
+ globals: {
29
+ ...globals.browser,
30
+ ...globals.node
31
+ }
32
+ },
33
+ settings: {
34
+ 'import/resolver': {
35
+ typescript: true,
36
+ node: true
37
+ }
38
+ },
39
+ rules: {
40
+ 'import/export': 'off',
41
+ 'import/namespace': 'off',
42
+ 'import/default': 'off',
43
+ 'import/consistent-type-specifier-style': ['error', 'prefer-inline'],
44
+ 'import/no-duplicates': ['error', { 'prefer-inline': true }],
45
+ 'import/no-named-as-default-member': 'off',
46
+ 'import/no-named-as-default': 'off',
47
+ 'import/order': [
48
+ 'error',
49
+ {
50
+ groups: [
51
+ 'builtin',
52
+ 'external',
53
+ 'internal',
54
+ 'parent',
55
+ 'sibling',
56
+ 'index',
57
+ 'object',
58
+ 'type'
59
+ ],
60
+ pathGroups: [
61
+ { pattern: 'vue', group: 'external', position: 'before' },
62
+ { pattern: 'vue-router', group: 'external', position: 'before' }
63
+ ],
64
+ pathGroupsExcludedImportTypes: ['builtin']
65
+ }
66
+ ],
67
+ 'no-case-declarations': 'off',
68
+ '@typescript-eslint/no-unused-expressions': 'off',
69
+ '@typescript-eslint/no-empty-object-type': 'off',
70
+ '@typescript-eslint/no-var-requires': 0,
71
+ '@typescript-eslint/explicit-function-return-type': 'off',
72
+ '@typescript-eslint/no-explicit-any': 0,
73
+ '@typescript-eslint/no-non-null-assertion': 'off',
74
+ '@typescript-eslint/no-inferrable-types': [
75
+ 'warn',
76
+ {
77
+ ignoreParameters: true
78
+ }
79
+ ],
80
+ '@typescript-eslint/no-unused-vars': [
81
+ 'warn',
82
+ {
83
+ argsIgnorePattern: '^_'
84
+ }
85
+ ],
86
+ '@typescript-eslint/member-delimiter-style': 0,
87
+ '@typescript-eslint/class-name-casing': 0,
88
+ '@typescript-eslint/explicit-module-boundary-types': 'off',
89
+ '@typescript-eslint/ban-ts-comment': 'off',
90
+ '@typescript-eslint/no-empty-interface': 'off',
91
+ 'vue/multi-word-component-names': 0,
92
+ 'vue/html-indent': ['error', 4],
93
+ 'vue/require-default-prop': 'off',
94
+ 'vue/one-component-per-file': 'off',
95
+ 'vue/no-dupe-keys': 'off',
96
+ 'vue/html-self-closing': [
97
+ 'error',
98
+ {
99
+ html: {
100
+ void: 'always',
101
+ normal: 'always',
102
+ component: 'always'
103
+ },
104
+ svg: 'always',
105
+ math: 'always'
106
+ }
107
+ ],
108
+ 'vue/max-attributes-per-line': 'off',
109
+ 'vue/singleline-html-element-content-newline': 'off',
110
+ 'no-constant-condition': 'off'
111
+ }
112
+ }
113
+ ])
@@ -51,7 +51,7 @@ export default function createListStore<
51
51
  assign(
52
52
  params,
53
53
  cloneDeep(config.defaultParams),
54
- pick(params, config?.initConfig?.keepParamsKeys || [])
54
+ pick(params, (config?.initConfig?.keepParamsKeys || []) as never)
55
55
  )
56
56
  }
57
57
  assign(params, arg?.params)
@@ -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
@@ -1,35 +0,0 @@
1
- {
2
- "parser": "@typescript-eslint/parser",
3
- "plugins": ["@typescript-eslint"],
4
- "extends": ["eslint:recommended"],
5
- "env": {
6
- "browser": true,
7
- "node": true
8
- },
9
- "parserOptions": {
10
- "ecmaVersion": 2018,
11
- "sourceType": "module",
12
- "ecmaFeatures": {
13
- "jsx": true
14
- },
15
- "useJSXTextNode": true
16
- },
17
- "rules": {
18
- "@typescript-eslint/no-var-requires": 0,
19
- "@typescript-eslint/explicit-function-return-type": "off",
20
- "@typescript-eslint/no-explicit-any": 1,
21
- "@typescript-eslint/no-inferrable-types": [
22
- "warn",
23
- {
24
- "ignoreParameters": true
25
- }
26
- ],
27
- "@typescript-eslint/no-unused-vars": "warn",
28
- "@typescript-eslint/member-delimiter-style": 0,
29
- "@typescript-eslint/class-name-casing": 0,
30
- "@typescript-eslint/explicit-module-boundary-types": "off",
31
- "@typescript-eslint/ban-ts-comment": "off",
32
- "semi": ["error", "never"],
33
- "quotes": "off"
34
- }
35
- }