create-comate-pagebuilder 1.0.16 → 1.0.17

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-comate-pagebuilder",
3
- "version": "1.0.16",
3
+ "version": "1.0.17",
4
4
  "description": "Create a modern, minimalist React + Vite + Tailwind CSS project",
5
5
  "type": "commonjs",
6
6
  "bin": {
@@ -1,17 +1,28 @@
1
- module.exports = {
2
- parser: '@babel/eslint-parser',
3
- parserOptions: {
4
- requireConfigFile: false,
5
- babelOptions: {
6
- presets: [
7
- [require.resolve('@babel/preset-react'), {runtime: 'automatic'}],
8
- ],
1
+ // ESLint 开关: 设置为 false 禁用所有检查,设置为 true 启用检查,默认关闭即可
2
+ const ESLINT_ENABLED = false;
3
+
4
+ // 如果禁用,返回最小化配置
5
+ if (!ESLINT_ENABLED) {
6
+ module.exports = {
7
+ ignorePatterns: ['**/*'],
8
+ };
9
+ } else {
10
+ // 启用时的完整配置
11
+ module.exports = {
12
+ parser: '@babel/eslint-parser',
13
+ parserOptions: {
14
+ requireConfigFile: false,
15
+ babelOptions: {
16
+ presets: [
17
+ [require.resolve('@babel/preset-react'), {runtime: 'automatic'}],
18
+ ],
19
+ },
9
20
  },
10
- },
11
- extends: [
12
- '@ecomfe/eslint-config',
13
- '@ecomfe/eslint-config/baidu/default',
14
- '@ecomfe/eslint-config/baidu/defect',
15
- '@ecomfe/eslint-config/react',
16
- ],
21
+ extends: [
22
+ '@ecomfe/eslint-config',
23
+ '@ecomfe/eslint-config/baidu/default',
24
+ '@ecomfe/eslint-config/baidu/defect',
25
+ '@ecomfe/eslint-config/react',
26
+ ],
27
+ };
17
28
  };
@@ -50,9 +50,9 @@ src/
50
50
  └── index.css # 全局样式
51
51
  ```
52
52
 
53
- ## 🔍 代码规范
53
+ ## 🔍 代码规范(默认关闭)
54
54
 
55
- 项目使用 ESLint 进行代码质量检查,基于 **@ecomfe/eslint-config** 规范(百度前端团队代码规范)。
55
+ 项目使用 ESLint 进行代码质量检查,基于 **@ecomfe/eslint-config** 规范(百度前端团队代码规范),默认是关闭的。
56
56
 
57
57
  ### 运行 Lint 检查
58
58
 
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "pagebuilder-react-template",
3
- "version": "1.0.16",
3
+ "version": "1.0.17",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "pagebuilder-react-template",
9
- "version": "1.0.16",
9
+ "version": "1.0.17",
10
10
  "dependencies": {
11
11
  "@babel/core": "^7.27.1",
12
12
  "@babel/eslint-parser": "^7.27.1",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pagebuilder-react-template",
3
- "version": "1.0.16",
3
+ "version": "1.0.17",
4
4
  "scripts": {
5
5
  "dev": "vite",
6
6
  "build": "vite build",
@@ -7,7 +7,7 @@ function App() {
7
7
  <div className="min-h-screen">
8
8
  <Router>
9
9
  <Routes>
10
- <Route path="/" element={<Home />} />
10
+ <Route path="/" element={<Home />} />
11
11
  </Routes>
12
12
  </Router>
13
13
  </div>