@lark-apaas/fullstack-presets 1.0.3 → 1.0.5
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.
|
@@ -112,6 +112,11 @@ exports.default = {
|
|
|
112
112
|
message: 'The `value` attribute of the `SelectItem` component cannot be an empty string.',
|
|
113
113
|
selector: 'JSXOpeningElement[name.name="SelectItem"]:has(JSXAttribute[name.name="value"][value.value=""]), JSXOpeningElement[name.name="SelectItem"]:has(JSXAttribute[name.name="value"][value.expression.value=""])',
|
|
114
114
|
},
|
|
115
|
+
// 禁止a标签href使用相对路径
|
|
116
|
+
{
|
|
117
|
+
selector: "JSXOpeningElement[name.name='a']:has(JSXAttribute[name.name='href'][value.value=/^(?!https?:|\\u002F\\u002F|mailto:|tel:|#).+/])",
|
|
118
|
+
message: "Please don't use relative paths in <a> tags. Use NavLink from 'react-router-dom' instead.",
|
|
119
|
+
},
|
|
115
120
|
],
|
|
116
121
|
},
|
|
117
122
|
};
|
|
@@ -26,8 +26,6 @@ declare const _default: {
|
|
|
26
26
|
'@typescript-eslint/no-empty-object-type': string;
|
|
27
27
|
'@typescript-eslint/no-redeclare': string;
|
|
28
28
|
'@typescript-eslint/no-extraneous-class': string;
|
|
29
|
-
'@typescript-eslint/no-unsafe-return': string;
|
|
30
|
-
'@typescript-eslint/no-unsafe-call': string;
|
|
31
29
|
'no-undef': string;
|
|
32
30
|
'no-console': string;
|
|
33
31
|
'prefer-const': string;
|
|
@@ -35,8 +35,6 @@ exports.default = {
|
|
|
35
35
|
'@typescript-eslint/no-empty-object-type': 'off',
|
|
36
36
|
'@typescript-eslint/no-redeclare': 'error',
|
|
37
37
|
'@typescript-eslint/no-extraneous-class': 'off',
|
|
38
|
-
'@typescript-eslint/no-unsafe-return': 'error',
|
|
39
|
-
'@typescript-eslint/no-unsafe-call': 'error',
|
|
40
38
|
// JavaScript 基础规则
|
|
41
39
|
'no-undef': 'off',
|
|
42
40
|
'no-console': 'error',
|