problem description
- case 1: if the attribute does not exist, IDE will remind you of the error, but TSlint/ESlint will not throw an error
- 2:TSlint rules
no-empty-interface
rules
,
related codes
-
TSlint.json file
{ "defaultSeverity": "warning", "extends": [ "tslint:recommended" ], "linterOptions": { "exclude": [ "node_modules/**" ] }, "rules": { "quotemark": [true, "single"], "indent": [true, "spaces", 2], "interface-name": false, "ordered-imports": false, "object-literal-sort-keys": false, "no-consecutive-blank-lines": false } }
-
tsconfig.json
{ "compilerOptions": { "target": "esnext", "module": "esnext", "strict": true, "jsx": "preserve", "importHelpers": true, "moduleResolution": "node", "experimentalDecorators": true, "esModuleInterop": true, "allowSyntheticDefaultImports": true, "sourceMap": true, "baseUrl": ".", "types": [ "node" ], "paths": { "@/*": [ "src/*" ] }, "lib": [ "esnext", "dom", "dom.iterable", "scripthost" ] }, "include": [ "src/**/*.ts", "src/**/*.tsx", "src/**/*.vue", "tests/**/*.ts", "tests/**/*.tsx" ], "exclude": [ "node_modules" ] }
what result do you expect?
can TSlint detect and throw errors in TSlint code type checking (case 1)?
if so, how to set it?
if not, is there any way to intercept (case 1) errors in gitHooks.pre-commit
and prevent code submission from unresolved errors?