前后端基本架构和完全excel表的解析及统计图表的生成以及excel表的到出
This commit is contained in:
28
frontend/.rules/SelectItem.yml
Normal file
28
frontend/.rules/SelectItem.yml
Normal file
@@ -0,0 +1,28 @@
|
||||
id: selectItemWithEmptyValue
|
||||
language: Tsx
|
||||
files:
|
||||
- src/**/*.tsx
|
||||
rule:
|
||||
kind: jsx_opening_element
|
||||
all:
|
||||
- has:
|
||||
kind: identifier
|
||||
regex: '^SelectItem$'
|
||||
- has:
|
||||
kind: jsx_attribute
|
||||
all:
|
||||
- has:
|
||||
kind: property_identifier
|
||||
regex: '^value$'
|
||||
- any:
|
||||
- has:
|
||||
kind: string
|
||||
regex: '^""$'
|
||||
- has:
|
||||
kind: jsx_expression
|
||||
has:
|
||||
kind: string
|
||||
regex: '^""$'
|
||||
|
||||
message: "检测到 SelectItem 组件使用空字符串 value: $MATCH, 这是错误用法, 运行时会报错, 请修改, 如果想实现全选,建议使用all代替空字符串"
|
||||
severity: error
|
||||
Reference in New Issue
Block a user