This repository was archived by the owner on Jul 15, 2023. It is now read-only.
This repository was archived by the owner on Jul 15, 2023. It is now read-only.
no-string-based-x rules throw errors in Vue SFC #859
Closed
Description
Bug Report
tslint-microsoft-contrib
version: 6.1.1- TSLint version: 5.16.0
- TypeScript version: 3.4.3
- Running TSLint via: Vue CLI generated webpack config, which I think uses fork-ts-checker-webpack-plugin
TypeScript code being linted
<template>
<div class="test">
{{ msg }}
</div>
</template>
<script lang="ts">
import { Vue, Component } from 'vue-property-decorator';
@Component
export default class TestComponent extends Vue {
msg = 'test'
}
</script>
with tslint.json
configuration:
{
"defaultSeverity": "warning",
"extends": ["tslint:latest", "tslint-microsoft-contrib/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,
"max-line-length": [
true,
{
"ignore-pattern": "'(.*?)'"
}
],
"arrow-parens": false,
"no-default-import": false,
"match-default-export-name": false,
"no-implicit-dependencies": [true, ["@"]],
"completed-docs": false,
"newline-per-chained-call": false,
"typedef": false,
"strict-boolean-expressions": false,
"no-unsafe-any": false,
"member-ordering": false,
"no-default-export": false,
"no-any": false,
"no-submodule-imports": false,
"no-this-assignment": false,
"member-access": false,
"trailing-comma": [true, "always"],
"no-relative-imports": [true, "allow-siblings"],
"prefer-type-cast": false,
"import-name": false,
"export-name": false,
"prefer-array-literal": false,
"no-suspicious-comment": false,
"no-inner-html": false,
"no-single-line-block-comment": false,
"no-backbone-get-set-outside-model": false,
}
}
Actual behavior
The 'no-string-based-set-timeout' rule threw an error in '/Users/jwhitmarsh/src/example/src/Test.vue':
TypeError: Cannot read property 'flags' of undefined
at tryGetDeclaredTypeOfSymbol (/Users/jwhitmarsh/src/example/node_modules/typescript/lib/typescript.js:36600:24)
at getDeclaredTypeOfSymbol (/Users/jwhitmarsh/src/example/node_modules/typescript/lib/typescript.js:36597:20)
at tryGetThisTypeAt (/Users/jwhitmarsh/src/example/node_modules/typescript/lib/typescript.js:46543:99)
at checkThisExpression (/Users/jwhitmarsh/src/example/node_modules/typescript/lib/typescript.js:46492:24)
at checkExpressionWorker (/Users/jwhitmarsh/src/example/node_modules/typescript/lib/typescript.js:52215:28)
at checkExpression (/Users/jwhitmarsh/src/example/node_modules/typescript/lib/typescript.js:52185:42)
at checkNonNullExpression (/Users/jwhitmarsh/src/example/node_modules/typescript/lib/typescript.js:48560:37)
at checkPropertyAccessExpressionOrQualifiedName (/Users/jwhitmarsh/src/example/node_modules/typescript/lib/typescript.js:48593:28)
at checkPropertyAccessExpression (/Users/jwhitmarsh/src/example/node_modules/typescript/lib/typescript.js:48586:20)
at checkExpressionWorker (/Users/jwhitmarsh/src/example/node_modules/typescript/lib/typescript.js:52242:28)
Expected behavior
Not to throw an error