2.0.2 • Published 7 years ago

tslintify v2.0.2

Weekly downloads
36
License
MIT
Repository
github
Last release
7 years ago

tslintify

Build Status

Browserify plugin for linting TypeScript.

Options

  • --warn: Instead of emitting error, emit warning (when using API) or print error (when using CLI)

Some TSLint options are supported:

  • --fix
  • -p, --project
  • -r, --rules-dir
  • -s, --formatters-dir
  • -t, --format

Linter rules go into tslint.json at the project root.

Usage

Note: If using plugin to transform TypeScript (e.g. tsify), tslintify must be specified/added first.

CLI:

$ browserify -p [ tslintify -t stylish ] -p tsify app.ts

API:

var browserify = require('browserify');
var tsify = require('tsify');
var tslintify = require('tslintify');

browserify()
    .plugin(tslintify, { format: 'stylish' })
    .plugin(tsify)
    .add('app.ts')
    .on('error', error => console.error(error))
    .bundle()
    ...

Why a plugin?

tslintify was originally conceived as a transform, but became a plugin so that it could run before transform plugins like tsify (browserify loads all plugins before transforms).

License

MIT

2.0.2

7 years ago

2.0.1

7 years ago

2.0.0

7 years ago

1.2.0

7 years ago

1.1.0

8 years ago

1.0.0

8 years ago

0.1.0

8 years ago