create-rspeedy 0.10.4 → 0.10.6

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/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # create-rspeedy
2
2
 
3
+ ## 0.10.6
4
+
5
+ ### Patch Changes
6
+
7
+ - Support ESLint for ReactLynx templates ([#1274](https://github.com/lynx-family/lynx-stack/pull/1274))
8
+
9
+ ## 0.10.5
10
+
3
11
  ## 0.10.4
4
12
 
5
13
  ## 0.10.3
package/dist/index.js CHANGED
@@ -79,7 +79,17 @@ create({
79
79
  })),
80
80
  version: devDependencies,
81
81
  getTemplateName,
82
- mapESLintTemplate () {
83
- return null;
82
+ mapESLintTemplate (templateName) {
83
+ var _TEMPLATES_find;
84
+ const lang = null == (_TEMPLATES_find = TEMPLATES.find(({ template })=>templateName.startsWith(template))) ? void 0 : _TEMPLATES_find.lang;
85
+ if (!lang) return null;
86
+ switch(lang){
87
+ case 'js':
88
+ return 'react-js';
89
+ case 'ts':
90
+ return 'react-ts';
91
+ default:
92
+ return null;
93
+ }
84
94
  }
85
95
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-rspeedy",
3
- "version": "0.10.4",
3
+ "version": "0.10.6",
4
4
  "description": "Create Rspeedy-powered ReactLynx apps with one command",
5
5
  "keywords": [
6
6
  "webpack",
@@ -31,14 +31,14 @@
31
31
  "README.md"
32
32
  ],
33
33
  "dependencies": {
34
- "create-rstack": "1.5.5"
34
+ "create-rstack": "1.5.6"
35
35
  },
36
36
  "devDependencies": {
37
- "@rsbuild/plugin-type-check": "1.2.3",
37
+ "@rsbuild/plugin-type-check": "1.2.4",
38
38
  "@lynx-js/qrcode-rsbuild-plugin": "^0.4.0",
39
- "@lynx-js/react": "^0.112.1",
40
- "@lynx-js/rspeedy": "^0.10.4",
41
- "@lynx-js/react-rsbuild-plugin": "^0.10.10"
39
+ "@lynx-js/react": "^0.112.2",
40
+ "@lynx-js/react-rsbuild-plugin": "^0.10.11",
41
+ "@lynx-js/rspeedy": "^0.10.6"
42
42
  },
43
43
  "engines": {
44
44
  "node": ">=18"
@@ -1,6 +1,7 @@
1
1
  /// <reference types="@lynx-js/rspeedy/client" />
2
2
 
3
3
  declare module '@lynx-js/types' {
4
+ // eslint-disable-next-line @typescript-eslint/no-empty-object-type
4
5
  interface GlobalProps {
5
6
  /**
6
7
  * Define your global properties in this interface.
@@ -45,7 +45,7 @@ export function App() {
45
45
  to see updates!
46
46
  </text>
47
47
  </view>
48
- <view style={{ flex: 1 }}></view>
48
+ <view style={{ flex: 1 }} />
49
49
  </view>
50
50
  </view>
51
51
  )
@@ -15,9 +15,9 @@
15
15
  "@lynx-js/react-rsbuild-plugin": "workspace:*",
16
16
  "@lynx-js/rspeedy": "workspace:*",
17
17
  "@lynx-js/types": "3.3.0",
18
- "@rsbuild/plugin-type-check": "1.2.3",
18
+ "@rsbuild/plugin-type-check": "1.2.4",
19
19
  "@types/react": "^18.3.23",
20
- "typescript": "~5.8.3"
20
+ "typescript": "~5.9.2"
21
21
  },
22
22
  "engines": {
23
23
  "node": ">=18"
@@ -45,7 +45,7 @@ export function App() {
45
45
  to see updates!
46
46
  </text>
47
47
  </view>
48
- <view style={{ flex: 1 }}></view>
48
+ <view style={{ flex: 1 }} />
49
49
  </view>
50
50
  </view>
51
51
  )
@@ -15,7 +15,7 @@
15
15
  "@lynx-js/qrcode-rsbuild-plugin": "workspace:*",
16
16
  "@lynx-js/react-rsbuild-plugin": "workspace:*",
17
17
  "@lynx-js/rspeedy": "workspace:*",
18
- "@testing-library/jest-dom": "^6.6.3",
18
+ "@testing-library/jest-dom": "^6.6.4",
19
19
  "jsdom": "^26.1.0",
20
20
  "vitest": "^3.2.4"
21
21
  },
@@ -10,8 +10,8 @@ export function App(props) {
10
10
 
11
11
  useEffect(() => {
12
12
  console.info('Hello, ReactLynx')
13
- props.onMounted?.()
14
13
  }, [])
14
+ props.onRender?.()
15
15
 
16
16
  const onTap = useCallback(() => {
17
17
  'background only'
@@ -46,7 +46,7 @@ export function App(props) {
46
46
  to see updates!
47
47
  </text>
48
48
  </view>
49
- <view style={{ flex: 1 }}></view>
49
+ <view style={{ flex: 1 }} />
50
50
  </view>
51
51
  </view>
52
52
  )
@@ -16,11 +16,11 @@
16
16
  "@lynx-js/react-rsbuild-plugin": "workspace:*",
17
17
  "@lynx-js/rspeedy": "workspace:*",
18
18
  "@lynx-js/types": "3.3.0",
19
- "@rsbuild/plugin-type-check": "1.2.3",
20
- "@testing-library/jest-dom": "^6.6.3",
19
+ "@rsbuild/plugin-type-check": "1.2.4",
20
+ "@testing-library/jest-dom": "^6.6.4",
21
21
  "@types/react": "^18.3.23",
22
22
  "jsdom": "^26.1.0",
23
- "typescript": "~5.8.3",
23
+ "typescript": "~5.9.2",
24
24
  "vitest": "^3.2.4"
25
25
  },
26
26
  "engines": {
@@ -6,14 +6,14 @@ import lynxLogo from './assets/lynx-logo.png'
6
6
  import reactLynxLogo from './assets/react-logo.png'
7
7
 
8
8
  export function App(props: {
9
- onMounted?: () => void
9
+ onRender?: () => void
10
10
  }) {
11
11
  const [alterLogo, setAlterLogo] = useState(false)
12
12
 
13
13
  useEffect(() => {
14
14
  console.info('Hello, ReactLynx')
15
- props.onMounted?.()
16
15
  }, [])
16
+ props.onRender?.()
17
17
 
18
18
  const onTap = useCallback(() => {
19
19
  'background only'
@@ -48,7 +48,7 @@ export function App(props: {
48
48
  to see updates!
49
49
  </text>
50
50
  </view>
51
- <view style={{ flex: 1 }}></view>
51
+ <view style={{ flex: 1 }} />
52
52
  </view>
53
53
  </view>
54
54
  )
@@ -12,7 +12,7 @@ test('App', async () => {
12
12
 
13
13
  render(
14
14
  <App
15
- onMounted={() => {
15
+ onRender={() => {
16
16
  cb(`__MAIN_THREAD__: ${__MAIN_THREAD__}`)
17
17
  }}
18
18
  />,