- 启用 TanStack Query flat/recommended(7 条规则) - 新增 no-console(允许 warn/error)、consistent-type-imports(inline 风格)、no-non-null-assertion 规则 - 新增自定义规则 no-hardcoded-color-in-style,检测 JSX style 中硬编码颜色值 - 将 ESLint 检查集成到 build 命令(tsc -b && eslint . && vite build) - 修复现有代码中的 lint 违规(import 顺序、type import 风格、unused vars) - 使用 @typescript-eslint/rule-tester 编写自定义规则集成测试
13 lines
258 B
JavaScript
13 lines
258 B
JavaScript
import noHardcodedColorInStyle from './rules/no-hardcoded-color-in-style.js'
|
|
|
|
const plugin = {
|
|
rules: {
|
|
'no-hardcoded-color-in-style': noHardcodedColorInStyle,
|
|
},
|
|
configs: {},
|
|
meta: {
|
|
name: 'eslint-plugin-local',
|
|
},
|
|
}
|
|
|
|
export default plugin |