Socket
Socket
Sign inDemoInstall

@rosen-group/tslint-custom-rule-checkfortag

Package Overview
Dependencies
45
Maintainers
2
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @rosen-group/tslint-custom-rule-checkfortag

Custom TsLint rule to find a Tag (specified by rule option) in typescript api documentation (e.g. JsDoc) comments


Version published
Weekly downloads
0
decreased by-100%
Maintainers
2
Install size
3.94 MB
Created
Weekly downloads
 

Readme

Source

tslint-custom-rule-checkfortag

Custom TsLint Rule that is doing almost the same as the default deprecation rule. But the rule is not seaching for the @deprecation tag but for custom tags. These unwanted tags can be specifiedin the rule options.

Installation & Configuration

The rule is available as a npm package. First install the package:

npm install --save-dev @rosen-group/tslint-custom-rule-checkfortag

tslint.json

Inside your tslint.json file include the directory with the rule:

"rulesDirectory": [
    "node_modules/@rosen-group/tslint-custom-rule-checkfortag/dist/"
]

And add a rule for the Tag you want to avoid. Tags are specified as an array of strings:

"check-for-tag": {
    "options": [
        true,
        ["ContactArchitectureBeforeUse"]
    ],
    "severity": "warning"
}

Or specify multiple unwanted tags:

"check-for-tag": {
    "options": [
        true,
        ["ContactArchitectureBeforeUse", "MarkedForDeletion"]
    ],
    "severity": "warning"
}

Important notice: the short config form "check-for-tag": [true, ["ContactArchitectureBeforeUse"]] is not supported yet!

Disable warning

To allow the usage of tags in some cases just use the default TsLint syntax:

/* tslint:disable:check-for-tag */
    /**
     * Demo method
     * @param message Text to output
     * @ContactArchitectureBeforeUse
     */
    public helloWorld(message : string) : string {
        return 'Hello '+message;
    }
/* tslint:enable:check-for-tag */

Keywords

FAQs

Last updated on 12 Jul 2019

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc