Code Monkey home page Code Monkey logo

broccoli-tslinter's Introduction

Broccoli TSLinter npm version

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: undefined


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}

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.

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.

broccoli-tslinter's People

Contributors

kratiahuja avatar gavinjoyce avatar

Watchers

Robert Jackson avatar James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.