angular-tslint-rules | Shared TSLint & codelyzer rules | Code Analyzer library
kandi X-RAY | angular-tslint-rules Summary
kandi X-RAY | angular-tslint-rules Summary
Shared TSLint & codelyzer rules to enforce a consistent code style for Angular development
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of angular-tslint-rules
angular-tslint-rules Key Features
angular-tslint-rules Examples and Code Snippets
Community Discussions
Trending Discussions on angular-tslint-rules
QUESTION
I am having a problem on PhpStorm (v2020.2.1 Build # PS-202.6948.87) and TSLint on an Angular project.
Indeed, I installed the "angular-tslint-rules" package, activated the automatic configuration of TSLint in the settings of PhpStorm in order to have the cleanest possible code.
However, PhpStorm does not point out all the errors included in the "angular-tslint-rules" package. I have an example with the rule prefer-readonly
. On PhpStorm nothing is underlined as you can see:
In Vscode the same code is underlined with the error "prefer-readonly" as you can see :
So why isn't PhpStorm pointing out the error to me ? Do you have any possible solutions?
Thanks for your help.
...ANSWER
Answered 2020-Sep-14 at 11:01prefer-readonly rule requires type info.
Such rules are not currently supported by TSLint integration because of some technical difficulties: running TSLint with --project tsconfig.json
(required for such rules to work) would not be acceptable for us because it would cause a second instance of TypeScript to be created inside the TSLint process (in addition to the TypeScript instance used for compilation and highlighting, if you have it enabled) and would cause a noticeable performance degradation. While it may look that tslint --project
executes quickly when checking files before commit, the IDE needs to be more responsive when editing code.
To work out the issue, we recommend using typescript-tslint-plugin. To use it:
- install the 'typescript-tslint-plugin' npm package and add it to 'plugins' in tsconfig.json:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install angular-tslint-rules
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page