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 🙏

© 2024 – Pkg Stats / Ryan Hefner

@nlesc/tslint-config-react-app

v2.0.0

Published

TSLint configuration used by Create React App

Downloads

209

Readme

TSlint configuration used in @nlesc/react-scripts package.

TSlint ruleset which combines:

To use in create-react-app we overridden several rules to make it compatible with webpack and have similar rules to eslint-config-react-app package.

Overridden rules

  • import-name, webpack allows for import of assets like svg and css

  • jsx-alignment, want linting on jsx

  • jsx-no-lambda, want linting on jsx

  • jsx-no-string-ref, want linting on jsx

  • jsx-no-multiline-js, want linting on jsx

  • jsx-self-close, want linting on jsx

  • member-access, everything that has no access modifier is public implicitly, so no need to specify public again

  • missing-jsdoc, not useful for an application, it would be for a library

  • no-any, not everything has to be to typed to allow for incrementally introduction of types for eg. 3rd party libraries

  • no-relative-imports, not practical for an application, it would be for a library because it has a package name

  • no-for-in-array, tslint in create-react-app does not do typecheck

  • no-reserved-keywords, redux requires type keyword for a action, the rule doesn't allow us to whitelist type so we disabled whole rule

  • no-unused-variable:[true, "react"], allow React to be marked used by jsx tags

  • restrict-plus-operands, tslint in create-react-app does not do typecheck

  • quotemark

    • single, single quote because its less typing
    • jsx-double, jsx-double because thats the html way
    • avoid-escape, part of tslint:latest
  • variable-name

    • removed check-format, both camelCased and UPPER_CASED vars in same file
    • removed allow-pascal-case, PascalCase is reserved for classes