@lark-apaas/fullstack-presets 1.1.3-beta.1 → 1.1.3-beta.2

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.
@@ -1,4 +1,4 @@
1
- export declare const looseSpecificSyntaxRules: {
1
+ export declare const looseRestrictSyntaxRules: {
2
2
  selector: string;
3
3
  message: string;
4
4
  }[];
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.looseSpecificSyntaxRules = void 0;
3
+ exports.looseRestrictSyntaxRules = void 0;
4
4
  const globals = require('globals');
5
5
  const reactHooks = require('eslint-plugin-react-hooks');
6
6
  const tseslint = require('typescript-eslint');
@@ -32,7 +32,7 @@ const baseSyntaxRules = [
32
32
  },
33
33
  ];
34
34
  // loose模式特化的规则
35
- exports.looseSpecificSyntaxRules = [
35
+ exports.looseRestrictSyntaxRules = [
36
36
  // 约束RoutesComponent路由组件 dom规则
37
37
  {
38
38
  // 箭头函数 block body
@@ -94,15 +94,16 @@ const strictSyntaxRules = [
94
94
  message: 'Classname "text-accent" would cause visibility issues. Consider using proper semantic color tokens from `client/src/tailwind-theme.css`',
95
95
  },
96
96
  ];
97
- const looseSpecificRules = {
98
- '@lark-apaas/no-nested-styled-jsx': 'error'
99
- };
100
97
  const looseSpecificPlugins = {
101
98
  '@lark-apaas': { rules: custom_eslint_rules_1.customRules }
102
99
  };
100
+ const looseSpecificRules = {
101
+ '@lark-apaas/no-nested-styled-jsx': 'error'
102
+ };
103
103
  // 宽松模式下覆盖的规则(关闭非关键规则)
104
104
  const looseOverrideRules = isLooseMode
105
105
  ? {
106
+ ...looseSpecificRules,
106
107
  '@typescript-eslint/no-unsafe-function-type': 'off',
107
108
  '@typescript-eslint/no-unused-expressions': 'off',
108
109
  'no-useless-escape': 'off', // 允许不必要的转义字符
@@ -175,7 +176,7 @@ exports.default = {
175
176
  'no-restricted-syntax': [
176
177
  'error',
177
178
  ...baseSyntaxRules,
178
- ...(isLooseMode ? exports.looseSpecificSyntaxRules : strictSyntaxRules),
179
+ ...(isLooseMode ? exports.looseRestrictSyntaxRules : strictSyntaxRules),
179
180
  ],
180
181
  // 宽松模式下覆盖上述规则
181
182
  ...looseOverrideRules,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lark-apaas/fullstack-presets",
3
- "version": "1.1.3-beta.1",
3
+ "version": "1.1.3-beta.2",
4
4
  "files": [
5
5
  "lib"
6
6
  ],