Socket
Socket
Sign inDemoInstall

broccoli-tslinter

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

broccoli-tslinter

Broccoli plugin for linting typescript files.


Version published
Weekly downloads
382
increased by36.92%
Maintainers
1
Weekly downloads
 
Created
Source

Broccoli TSLinter npm version

Greenkeeper badge

Broccoli plugin for linting typescript files. Uses tslint to lint the files.

Installation

npm install broccoli-tslinter

Usage

Please ensure that the TypeScript source files compile correctly before running the linter.

var TSLint = require('broccoli-tslinter');

// someNode is a broccoli node or a string representing a folder containing all .ts files
var node = new TSLint(someNode);

Documentation

new TSLint(someNode, options)


options.configuration {String}

Specify the path for the lint configuration file containing all the rules described here

Default: uses the file tslint.json (in the root directory of your project)


options.outputFile {String}

Specify the path of the file where the detailed linting results will be present.

Default: lint-test.js


options.failBuild {true|false}

Should we fail the build if there are linting errors?

Default: false


options.disableTestGenerator {true|false}

Disable generating tests for each file linted

Default: false


options.testGenerator {Function|String}

The function used to generate test modules. You can provide a custom function for your client side testing framework of choice.

The function receives the following arguments:

  • relativePath - The relative path to the file being tested.
  • passed - If the linting passed (true/false)
  • errors - A generated string of errors found.

You can also provide a string to use one of the predefined test generators. Currently qunit and mocha are supported.

Default generates QUnit style tests.


options.annotation {String}

A human-readable description for this plugin instance.

Default: undefined

Contributing

Update the version in package.json

npm install
npm run test

License

This project is distributed under the MIT license.

Keywords

FAQs

Package last updated on 20 Dec 2017

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