feat: add lint

Signed-off-by: d0zingcat <iamtangli42@gmail.com>
This commit is contained in:
2026-01-14 20:21:22 +08:00
parent 451793f6ce
commit d38b75fb66
14 changed files with 151 additions and 84 deletions

View File

@@ -17,27 +17,40 @@
"rules": {
"recommended": true,
"a11y": {
"useButtonType": "off",
"noStaticElementInteractions": "off",
"useKeyWithClickEvents": "off",
"noSvgWithoutTitle": "off",
"noLabelWithoutControl": "off"
"useButtonType": "error",
"noStaticElementInteractions": "error",
"useKeyWithClickEvents": "warn",
"noSvgWithoutTitle": "warn",
"noLabelWithoutControl": "warn"
},
"suspicious": {
"noAssignInExpressions": "off",
"noExplicitAny": "off",
"noImplicitAnyLet": "off",
"noRedeclare": "off",
"noUnknownAtRules": "off"
"noAssignInExpressions": "error",
"noExplicitAny": "warn",
"noImplicitAnyLet": "error",
"noRedeclare": "error",
"noUnknownAtRules": {
"level": "error",
"options": {
"ignore": [
"tailwind",
"layer",
"apply",
"variants",
"responsive",
"screen",
"config"
]
}
}
},
"style": {
"noNonNullAssertion": "off",
"useNodejsImportProtocol": "off"
"noNonNullAssertion": "warn",
"useNodejsImportProtocol": "error"
},
"correctness": {
"useExhaustiveDependencies": "off",
"noUnusedVariables": "off",
"noUnusedImports": "off"
"useExhaustiveDependencies": "warn",
"noUnusedVariables": "error",
"noUnusedImports": "error"
}
}
},
@@ -59,4 +72,4 @@
}
}
}
}
}