Skip to content

jsebrech/sbt-tslint

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#sbt-tslint Build Status

An sbt plugin for tslint. It will statically check your typescript files for error prone code. By default linting occurs as part of your project's tslint task. Both src/main/assets/**/*.ts and src/test/assets/**/*.ts sources are linted. The rules that will be checked in your project can be specified with a tslint.json file.

Installing

To use this plugin use the addSbtPlugin command within your project's plugins.sbt (or as a global setting) i.e.:

addSbtPlugin("name.de-vries" % "sbt-tslint" % "3.15.1")

Your project's build file also needs to enable sbt-web plugins. For example with build.sbt:

lazy val root = (project in file(".")).enablePlugins(SbtWeb)

If you want to use just the tslint rules you can use this tslint.json as a starter.

You can also use different linting rule sets. The plugin provides convenience settings for the following rule sets:

To add f.i. tslint-eslint add the following to your build.sbt.

libraryDependencies ++=Seq(   "org.webjars.npm" % "tslint-eslint-rules" % "1.2.0")

(rulesDirectories in tslint) := Some(List((tslintEslintRulesDir).value))

See the setting keys for configuration options. For example: the default formatter is "prose".

History

v3.15.1

  • upgrades to tslint 3.15.1 and typescript 2.0.10
  • upgrades webjars-locator, sbt-web and sbt-js-engine

v3.13.0

  • follows tslint version nr
  • adds support for ts 2 in combination with codelyzer

v0.9.7

  • fixes ng2 linting

v0.9.6

  • add convenience setting for ng2 lint rules.

v0.9.5

  • upgrades to typescript 1.8.10
  • extended example tslint.json with eslint configurations

v0.9.4

  • upgrades to typescript 1.8.7 and tslint 3.6.0

v0.9.3

  • allows for comments in the tslint.json

v0.9.1_01

  • Fixes a bug in the tslint-eslint example.

v0.9.1

  • support for configuring different rules directories, different formatters, different formatter directories.
  • convenience setting for tslint-eslint-rules rules. See the example build.sbt for an example of how to use these rules that lint both ES6 and Typescript.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Scala 70.4%
  • JavaScript 28.9%
  • TypeScript 0.7%