@rsdoctor/docs 0.4.13 → 1.0.0-alpha.0

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.
@@ -45,6 +45,34 @@ export default {
45
45
  };
46
46
  ```
47
47
 
48
+ #### Enable ECMA Version check
49
+
50
+ The configuration of `browserslist` is used first. If there is no `browserslist`, the following configuration is used for detection
51
+
52
+ ```ts
53
+ import { RsdoctorWebpackPlugin } from '@rsdoctor/webpack-plugin';
54
+
55
+ export default {
56
+ plugin: [
57
+ new RsdoctorWebpackPlugin({
58
+ linter: {
59
+ rules: {
60
+ 'ecma-version-check': [
61
+ 'Warn',
62
+ {
63
+ ecmaVersion: 2015,
64
+ // targets: ["chrome >= 53"],
65
+ },
66
+ ],
67
+ },
68
+ },
69
+ }),
70
+ ],
71
+ };
72
+ ```
73
+
74
+ For more `ECMA Version Check` configuration, please refer to [ECMA Version Check Options](https://github.com/rspack-contrib/rsbuild-plugin-check-syntax?tab=readme-ov-file#options)
75
+
48
76
  The type of `linter`:
49
77
 
50
78
  ```ts
@@ -45,6 +45,34 @@ export default {
45
45
  };
46
46
  ```
47
47
 
48
+ #### 开启 ECMA Version check
49
+
50
+ 优先使用 `browserslist` 的配置,如果没有 `browserslist` 则通过以下配置的方式进行检测
51
+
52
+ ```ts
53
+ import { RsdoctorWebpackPlugin } from '@rsdoctor/webpack-plugin';
54
+
55
+ export default {
56
+ plugin: [
57
+ new RsdoctorWebpackPlugin({
58
+ linter: {
59
+ rules: {
60
+ 'ecma-version-check': [
61
+ 'Warn',
62
+ {
63
+ ecmaVersion: 2015,
64
+ // targets: ["chrome >= 53"],
65
+ },
66
+ ],
67
+ },
68
+ },
69
+ }),
70
+ ],
71
+ };
72
+ ```
73
+
74
+ 更多 `ECMA Version Check` 配置请参考 [ECMA Version Check Options](https://github.com/rspack-contrib/rsbuild-plugin-check-syntax?tab=readme-ov-file#options)
75
+
48
76
  `linter`字段的类型为:
49
77
 
50
78
  ```ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rsdoctor/docs",
3
- "version": "0.4.13",
3
+ "version": "1.0.0-alpha.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/web-infra-dev/rsdoctor",
@@ -19,7 +19,7 @@
19
19
  "registry": "https://registry.npmjs.org/"
20
20
  },
21
21
  "devDependencies": {
22
- "@rspress/plugin-rss": "^1.38.0",
22
+ "@rspress/plugin-rss": "^1.39.4",
23
23
  "@types/node": "^16",
24
24
  "@types/react": "^18.3.18",
25
25
  "@types/react-dom": "^18.3.5",
@@ -30,12 +30,12 @@
30
30
  "rspress-plugin-font-open-sans": "^1.0.0",
31
31
  "rspress-plugin-sitemap": "^1.1.1",
32
32
  "typescript": "^5.2.2",
33
- "@rsdoctor/types": "0.4.13"
33
+ "@rsdoctor/types": "1.0.0-alpha.0"
34
34
  },
35
35
  "dependencies": {
36
36
  "@rstack-dev/doc-ui": "1.5.4",
37
37
  "react-markdown": "^9.0.1",
38
- "rspress": "^1.38.0"
38
+ "rspress": "^1.39.4"
39
39
  },
40
40
  "scripts": {
41
41
  "dev": "rspress dev",