-
Notifications
You must be signed in to change notification settings - Fork 45
JS files not being linted after update to 0.1.0 #31
Comments
Do you need any more information to help you identify the issue? Still not behaving as expected with 0.1.2, yet works with 0.0.5. |
Do you also have |
I do. My Thank you for you time in tracking this. If you need any more info or you can clearly see that there is something wrong with the configuration, don't hesitate to let me know. {
"extends": "tslint:all",
"rules": {
"arrow-parens": [ true, "ban-single-arg-parens" ],
"array-type": false,
"ban-types": {
"options": [
[ "Function", "Avoid using the `Function` type. Prefer a specific function type, like `() => void`." ],
[ "Boolean", "Avoid using the `Boolean` type. Did you mean `boolean`?" ],
[ "Number", "Avoid using the `Number` type. Did you mean `number`?" ],
[ "String", "Avoid using the `String` type. Did you mean `string`?" ],
[ "Symbol", "Avoid using the `Symbol` type. Did you mean `symbol`?" ]
]
},
"comment-format": false,
"completed-docs": [
true,
{
"all": { "visibilities": [ "exported" ] }
}
],
"curly": false,
"encoding": false,
"file-name-casing": false,
"linebreak-style": false,
"match-default-export-name": false,
"max-classes-per-file": false,
"max-line-length": false,
"member-ordering": [
true,
{
"order": [
"public-constructor",
"protected-constructor",
"private-constructor",
"public-static-method",
"protected-static-method",
"private-static-method",
"public-instance-method",
"protected-instance-method",
"private-instance-method",
"public-static-field",
"protected-static-field",
"private-static-field",
"public-instance-field",
"protected-instance-field",
"private-instance-field"
]
}
],
"newline-before-return": false,
"newline-per-chained-call": false,
"no-consecutive-blank-lines": [ true, 3 ],
"no-implicit-dependencies": [ true, "dev" ],
"no-import-side-effect": [
true,
{ "ignore-module": "(\\.[s]?css)$" }
],
"no-magic-numbers": false,
"no-namespace": false,
"no-non-null-assertion": false,
"no-null-keyword": false,
"no-parameter-properties": false,
"no-parameter-reassignment": false,
"no-submodule-imports": false,
"no-unbound-method": [ true, "ignore-static" ],
"no-unsafe-any": false,
"no-unused-variable": false,
"no-use-before-declare": false,
"no-var-keyword": true,
"no-void-expression": [ true, "ignore-arrow-function-shorthand" ],
"object-literal-sort-keys": false,
"object-literal-shorthand": false,
"one-line": [
true,
"check-whitespace"
],
"only-arrow-functions": [ true, "allow-declarations", "allow-named-functions" ],
"ordered-imports": false,
"prefer-conditional-expression": false,
"prefer-method-signature": false,
"prefer-switch": false,
"promise-function-async": true,
"strict-boolean-expressions": [
true,
"allow-null-union",
"allow-undefined-union",
"allow-string",
"allow-mix"
],
"strict-type-predicates": false,
"switch-default": false,
"switch-final-break": [ true, "always" ],
"trailing-comma": [
true,
{ "esSpecCompliant": true }
],
"typedef": false
},
"jsRules": {
"curly": false,
"file-name-casing": false,
"forin": false,
"linebreak-style": false,
"newline-before-return": false,
"newline-per-chained-call": false,
"no-consecutive-blank-lines": [ true, 3 ],
"no-implicit-dependencies": [ true, "dev" ],
"no-magic-numbers": false,
"no-null-keyword": false,
"no-require-imports": false,
"object-literal-sort-keys": false,
"object-literal-shorthand": false,
"one-line": [
true,
"check-whitespace"
],
"trailing-comma": [
true,
{ "esSpecCompliant": true }
]
}
}
|
Here's what I see in a js file with the latest version of the plugin and your config: In VS Code can you please make sure the js files is include in the |
I'm using {
"compilerOptions": {
"baseUrl": ".",
"experimentalDecorators": true,
"jsx": "react",
"lib": [ "es2015", "dom" ],
"module": "es2015",
"moduleResolution": "node",
"noUnusedLocals": true,
"noUnusedParameters": true,
"skipDefaultLibCheck": true,
"sourceMap": true,
"strict": true,
"target": "es5",
"types": [ "webpack-env" ],
"plugins": [{
"name": "typescript-tslint-plugin",
"jsEnable": true
}]
},
"exclude": [
"bin",
"node_modules"
]
} I cannot put |
The js files need to be part of your
|
@mjbvz I'm also hitting this issue, but I have allowJs and jsEnable true. 🤔
{
"compilerOptions": {
"allowJs": true,
"checkJs": true,
"noUnusedLocals": true,
"esModuleInterop": true,
"moduleResolution": "node",
"experimentalDecorators": true,
"resolveJsonModule": true,
"target": "esnext",
"module": "commonjs",
"inlineSourceMap": true,
"inlineSources": true,
"outDir": "dist",
"lib": [
"dom",
"esnext"
],
"plugins": [
{
"name": "typescript-tslint-plugin",
"jsEnable": true,
"suppressWhileTypeErrorsPresent": false
}
]
}
} Running tslint via the CLI does show js errors as well. |
After updating the
typescript-tslint-plugin
package from 0.0.5 to 0.1.0 and adding"jsEnable": true
to mytsconfig.json
,.js
files are not linted anymore.VSCode 1.29.1
TypeScript TSLint Plugin 0.1.0
typescript
3.1.6 (locally installed for the project; VSCode uses this installation instead of built-in)typescript-tslint-plugin
0.1.0tsconfig.json
snippet:The text was updated successfully, but these errors were encountered: