You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 25, 2021. It is now read-only.
The VSCode IDE reports that the object syntax for the import-blacklist rule is invalid, and that the "require-const-for-all-caps" option for the variable-name rule is invalid.
Screenshots
Expected behavior
Both of these options are valid, they work just fine. They are taken straight from the documentation page. The JSON schema just needs to be updated to know about these so they don't throw people off when they are trying to configure these rules.
The text was updated successfully, but these errors were encountered:
I took a look at this and noticed that for "variable-name" the "require-const-for-all-caps" rule is indeed missing from the JSON schema enum. I will try to make time one of these days for a PR.
That being said, the situation for import-blacklist is different as the JSON schema is supposed to handle the mentioned situation. The problem there seems to be that VSCode is configured to use the JSON Schema Store server (http://schemastore.org/) and the tslint JSON schema is indeed not updated on their server.
Even if someone did update the schema from there I think that the default behavior of VSCode using the JSON Schema Store server is flawed because it doesn't seem to have a versioning concept, which might result in mismatches if breaking changes are introduced in tslint.
There is an alternative to updating the schema on the server, more exactly to define another schema in the VS Code workspace or the VS Code settings files.
More information about VSCode and JSON schemas can be found here.
I've fixed up the variable name rule metadata in #4731. We don't maintain the JSON schema in Schema Store here in this repo. As @mirceapop89 mentioned, getting the schema there to match up with the installed version of TSLint is a little out of scope, but if you find a good solution please share here.
Bug Report
with
tslint.json
configuration:Actual behavior
The VSCode IDE reports that the object syntax for the import-blacklist rule is invalid, and that the
"require-const-for-all-caps"
option for the variable-name rule is invalid.Screenshots
Expected behavior
Both of these options are valid, they work just fine. They are taken straight from the documentation page. The JSON schema just needs to be updated to know about these so they don't throw people off when they are trying to configure these rules.
The text was updated successfully, but these errors were encountered: