Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including tslint-stencil with all npm packages installed. Try it out:

var tslintStencil = require("tslint-stencil")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

tslint-stencil v1.0.1

Adds stylistic rules to tslint for Stencil projects


Adds stylistic tslint rules for Stencil projects

Getting started

Add the following line to your tslint.json file to enable the default ruleset (which follows the Stencil Style Guide)

  "extends": ["tslint-stencil/default"]

Alternatively, you can extend the bare package and enable each rule on a individual basis

  "extends": ["tslint-stencil"],
  "rules": {
    "host-data-precedes-render": true



Ensures that a Component's tag does not use any of the given prefixes.


Ensures that Component members are ordered consistently


Allows a maximum number of Components to be placed in a single file


Requires decorated class members to follow a consistent style (singleline or multiline)


Ensures that Component lifecycle methods are ordered consistently


Ensures that a Component's tag begins with the given prefix(es).


Ensures that Stencil methods (hostData, render) are ordered consistently


Rules in the src/ directory must be camelCased and end in Rule. More information on developing custom tslint rules can be found on the tslint site

Before adding your custom rule, be sure to write a test for it. Then, you should be able to verify that it works by running:

npm run verify


RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free