All Projects → jrparish → tslint-webpack-plugin

jrparish / tslint-webpack-plugin

Licence: MIT license
TSLint plugin for Webpack

Programming Languages

javascript
184084 projects - #8 most used programming language
typescript
32286 projects

Projects that are alternatives of or similar to tslint-webpack-plugin

stencil-boilerplate
A Stencil app boilerplate including routing, Redux etc.
Stars: ✭ 51 (+131.82%)
Mutual labels:  tslint
alda
A boilerplate for React isomorphic aplication with Material Design
Stars: ✭ 16 (-27.27%)
Mutual labels:  tslint
ionic3-awesome
😃 ionic3自定义组件及常用例子 演示地址
Stars: ✭ 95 (+331.82%)
Mutual labels:  tslint
gulp-reporter
Error report for: CSSLint/EditorConfig/ESLint/HTMLHint/JSCS/JSHint/PostCSS/Standard/TSLint/XO
Stars: ✭ 17 (-22.73%)
Mutual labels:  tslint
codeclimate-tslint
Code Climate TSLint-Engine
Stars: ✭ 39 (+77.27%)
Mutual labels:  tslint
custom-tslint-formatters
Custom formatters for TSLint
Stars: ✭ 14 (-36.36%)
Mutual labels:  tslint
spec
🐣 easy to use eslint/stylelint/tslint/prettier/...
Stars: ✭ 60 (+172.73%)
Mutual labels:  tslint
web-build-tool-demo
比较全面的前端构建工具demo,拿来即练,不定时更新,包含git npm gulp webpack babel typescript husky eslint tslint lint-stage prettier等
Stars: ✭ 42 (+90.91%)
Mutual labels:  tslint
astraea
TypeScript + React Boilerplate
Stars: ✭ 15 (-31.82%)
Mutual labels:  tslint
umi-dva-typescript-mock
基于umi + dva + typescript + mock + antd的react框架,内置PWA
Stars: ✭ 17 (-22.73%)
Mutual labels:  tslint
react-ui-kit-boilerplate
A minimal React UI Kit boilerplate with Storybook, hot reloading, Styled Components, Typescript and Jest
Stars: ✭ 88 (+300%)
Mutual labels:  tslint
cms-fe-angular8
A Content Management System with Angular8, UI use Ant-Design(ng-zorro-antd)
Stars: ✭ 65 (+195.45%)
Mutual labels:  tslint
react-typescript
React16 + HMR + typescript + webpack + tslint + tests
Stars: ✭ 21 (-4.55%)
Mutual labels:  tslint
fullstack-typescript
A demo project of a full stack typescript application
Stars: ✭ 28 (+27.27%)
Mutual labels:  tslint
TSLint.MSBuild
[Deprecated] An MSBuild task for running TSLint.
Stars: ✭ 13 (-40.91%)
Mutual labels:  tslint
vscode-lint
A VSCode configuration tool integrating Stylelint and Eslint
Stars: ✭ 60 (+172.73%)
Mutual labels:  tslint
tslint-defocus
A tslint rule to nag you when you forget that you have focused some Jasmine tests with 'fdescribe' or 'fit'
Stars: ✭ 18 (-18.18%)
Mutual labels:  tslint
play-angular-typescript.g8
A giter8 template for a Play Angular 4 Typescript application
Stars: ✭ 91 (+313.64%)
Mutual labels:  tslint
express-ts-api-boilerplate
Express TypeScript API Boilerplate
Stars: ✭ 15 (-31.82%)
Mutual labels:  tslint
react-typescript-boilerplate
A React + Redux + TypeScript + HOT + Webpack + Material-UI + Sass boilerplate
Stars: ✭ 18 (-18.18%)
Mutual labels:  tslint

tslint-webpack-plugin

npm version license

NPM

Due to TSLint being deprecated, consider using/migrating to @typescript-eslint

This is a webpack plugin that provides a very simple method of running TSLint alongside your webpack builds. This project differs from tslint-loader in that it will lint all specified files instead of only those that are imported by webpack. This is especially useful for interface files that are not always picked up by webpack (due to treeshaking or whatever).

Installation

This plugin also requires TSLint to be installed.

Install the plugin with npm:

$ npm install tslint tslint-webpack-plugin --save-dev

Basic Usage

The plugin will output tslint errors as part of your webpack build process. It will not fail the build, but simply notify you of changes that need to be made. Just add the plugin to your webpack config as follows:

var TSLintPlugin = require('tslint-webpack-plugin');
var webpackConfig = {
  entry: 'index.js',
  output: {
    path: 'dist',
    filename: 'index_bundle.js'
  },
  plugins: [
    new TSLintPlugin({
      files: ['./src/**/*.ts']
    })
  ]
};

Configuration

You can pass a hash of configuration options to TSLintWebpackPlugin.

The basic configuration requires the one of the following:

  • files: string | string[] The files to run through the linter.

    • Examples
      • './src/**/*.ts'
      • ['./src/**/*.ts', './test/**/*.spec.ts']
      • './src/main.ts'
      • ['./src/main.ts', './test/main.spec.ts']
  • project: string Path to tsconfig.json

Use a custom tslint.json config

  • config: ./tslint.json

Disable console output if necessary:

  • silent: true

Add the errors and warnings to the webpack compilation result and stats and wait for the linter to finish. This is useful when you create production builds on your build server and you do not want that tslint errors will go to production. Do not set it to true when you use webpack-dev-server because usually incremental builds are much faster than linting for large projects.

  • waitForLinting: true

Treats all errors as warnings:

  • warningsAsError: true

The plugin uses a custom formatter by default, but any of the built-in TSLint formatters can be used. (Not supported by v2 and later)

For advanced usage, see the various runner options here.

License

This project is licensed under MIT.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].