npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

ng-tslint

v1.1.2

Published

Useful TSLint rules extracted from `angular/components` for Angular libraries.

Downloads

35

Readme

Gitpod ready-to-code

ng-tslint

Useful TSLint rules extracted from angular/components for Angular libraries.

Install

# npm
npm i -D ng-tslint

# yarn
yarn add -D ng-tslint

Rules

class-list-signatures

Rule that catches cases where classList is used in a way that won't work in all browsers that we support.

coercion-types

TSLint rule that verifies that classes declare corresponding ngAcceptInputType_* static fields for inputs that use coercion inside of their setters. Also handles inherited class members and members that come from an interface.

lightweight-tokens

Rule that warns if a DI constructor is discovered for which parameters optionally inject classes without using the lightweight token pattern. The rule intends to help with optimized source code that works well for tree shakers. Read more about this here: https://angular.io/guide/lightweight-injection-tokens.

member-naming

Lint rule that checks the names of class members against a pattern. Configured per modifier, e.g.

{
  "member-naming": [
    true,
    {
      "private": "^_" // All private properties should start with `_`.
    }
  ]
}

ng-on-changes-property-access

Rule that catches cases where a property of a SimpleChanges object is accessed directly, rather than through a literal. Accessing properties of SimpleChanges directly can break when using Closure's property renaming.

no-cross-entry-point-relative-imports

Rule that enforces that imports or exports with relative paths do not resolve to source files outside of the current Bazel package. This enforcement is necessary because relative cross entry-point imports/exports can cause code being inlined unintentionally and could break module resolution since the folder structure changes in the Angular Package release output.

no-exposed-todo

Rule that walks through all comments inside of the library and adds failures when it detects TODO's inside of multi-line comments. TODOs need to be placed inside of single-line comments.

no-import-export-spacing

Rule that ensures that there are no spaces before/after the braces in import and export clauses.

no-private-getters

Rule that doesn't allow private getters.

no-undecorated-base-class-di

Rule that doesn't allow inheriting a constructor using dependency injection from an undecorated base class. With Ivy, undecorated base classes cannot use dependency injection. Classes that inherit the constructor from the base class can specify an explicit pass-through constructor to make DI work.

no-undecorated-class-with-angular-features

Rule that doesn't allow undecorated class declarations using Angular features.

no-unescaped-html-tag

Rule that walks through all comments inside of the library and adds failures when it detects unescaped HTML tags inside of multi-line comments.

prefer-const-enum

Rule that enforces that we use const enum rather than a plain enum.

require-breaking-change-version

Rule that ensures that comments, indicating a deprecation or a breaking change, have a valid version.

require-license-banner

Rule that walks through all TypeScript files of public packages and shows failures if a file does not have the license banner at the top of the file.

setters-after-getters

Rule that enforces that property setters are declared after getters.

validate-decorators

Rule that enforces certain decorator properties to be defined and to match a pattern. Properties can be forbidden by prefixing their name with a !. Supports specifying a matcher for filtering valid files via the third argument, as well as validating all the arguments by passing in a regex. E.g.

{
  "validate-decorators": [
    true,
    {
      "Component": {
        "argument": 0,
        "properties": {
          "encapsulation": "\\.None$",
          "!styles": ".*"
        }
      },
      "NgModule": {
        "argument": 0,
        "properties": "^(?!\\s*$).+"
      }
    },
    "src/material"
  ]
}

License

MIT © JounQin@1stG.me