Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

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

Package Overview
Dependencies
Maintainers
2
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

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

  • 1.0.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
2
Created
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

Package last updated on 12 Jul 2019

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc