-
Notifications
You must be signed in to change notification settings - Fork 889
No valid rules have been specified #3735
Comments
I have the same issue Running
{
"extends": ["tslint-config-prettier", "tslint-react"],
"rules": {
"ban": false,
"class-name": true,
"comment-format": [
true,
"check-space"
],
"curly": true,
"eofline": false,
"forin": true,
"interface-name": [true, "never-prefix"],
"jsdoc-format": true,
"jsx-no-lambda": false,
"jsx-no-multiline-js": false,
"label-position": true,
"no-any": false,
"no-arg": true,
"no-bitwise": true,
"no-console": [
false,
"log",
"error",
"debug",
"info",
"time",
"timeEnd",
"trace"
],
"no-construct": true,
"no-debugger": true,
"no-duplicate-variable": true,
"no-empty": true,
"no-eval": true,
"no-shadowed-variable": true,
"no-string-literal": true,
"no-switch-case-fall-through": true,
"no-trailing-whitespace": false,
"no-unused-variable": true,
"no-unused-expression": true,
"no-use-before-declare": true,
"radix": true,
"switch-default": true,
"trailing-comma": [false],
"triple-equals": [ true, "allow-null-check" ],
"typedef": [
true,
"parameter",
"property-declaration"
],
"variable-name": [true, "ban-keywords", "check-format", "allow-leading-underscore", "allow-pascal-case"]
}
} |
I've found a possible solution: If your Adding a rule inside "jsRules": {
"no-empty": true
} |
I just tried adding:
To my tslint.json, but unfortunately the message stays, and it doesn't seem to lint anything still |
What do you get on your output? If there’s no errors then it should be working fine. |
I get the same output/warning, changing it didn't do anything 😢 |
@NattyXD did you add |
@ajcrites Absolutely on point. I think this issue should be closed. |
Also removed "allowJs" from tsconfig, tslint doesn't like it: palantir/tslint#3735
Closing this issue as it seems to be resolved. |
Several months ago I had this issue, then it was solved by the solution explained in this thread, and it was all okey for a while, but recently I started having this issue again, though I do have |
I removed everything from tslint.json and added the following and seems to be working { |
This fixes the tslint warnings in the presubmit. tslint was searching for js rules, but they were not specified in tslint.json. With empty rules the problem persists, so I had to put a single rule: palantir/tslint#3735 Bug: 140546666 Change-Id: I5f4b56cf6265ded92a8241d8f2a6cec2ea9441bc
If you don't want TSLint linting JS files (and you have tslint >= 5.8), simply add the following to your "linterOptions": {
"exclude": [
"**/*.js"
]
} |
Add |
you need to specify the config file, like tslint -c .eslintrc.yml -p tsconfig.json, and there is nothing that's required from above like jsRules or all of those.. |
🤖 Beep boop! 👉 TSLint is deprecated 👈 and you should switch to typescript-eslint! 🤖 🔒 This issue is being locked to prevent further unnecessary discussions. Thank you! 👋 |
Bug Report
With
tslint.json
configuration:Actual behavior
Last week my tslint was working fine with the above configuration. Today I updated my VSCode, and TSLint started complaining that no compatible version of Typescript was installed. To fix this I did
npm install -g typescript
which fixed the TSLint version error.The TSLint extension in VSCode gives the warning
No valid rules have been specified
, and doesn't lint anything.I tried running
tslint --project build
from the CLI, but I get the same error.I thought maybe tslint was looking for a global configuration file, but if I add a syntax error to my local tslint.json, I'll get a different error
Unexpected token f
, so it seems it is looking at the local config but then failing somehowExpected behavior
TSLint should run over the project as it did before
The text was updated successfully, but these errors were encountered: