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

@gbrachetta/tslint-config

v0.0.43

Published

Thorough TSLint configuration for React-based projects based on airbnb and Prettier configs with many additional rules such as autofixable sorting, etc.

Downloads

51

Readme

@gbrachetta/tslint-config

npm

TSLint configuration for a React-based Project (Next.js, Gatsby, etc). Easy to install and configure, it follows the best code standards from airbnb and uses prettier configuration on code format. Integrated with my prettier configuration.

Purpose

This configuration uses airbnb and Prettier configuration plus some extra rules that I find useful for React applications.

For more information, check ESLint, TSLint and Prettier documentations as well the airbnb and prettier.

This package integrates the Prettier rules with ESLint using my configuration, adapted to a typescript project. You can check it at @gbrachetta/prettier-config

How to install

You need ESLint and Prettier installed as development dependencies on your project. You can install them by using npm or yarn.

npm install --save-dev eslint prettier
# or
yarn add eslint prettier -D

Install all peer dependencies of my configuration, these can be listed with the command:

npm info "@gbrachetta/tslint-config@latest" peerDependencies

Install dependencies by:

npx install-peerdeps --dev @gbrachetta/tslint-config

How to use

To configure ESLint and Prettier you can add to your package.json

"eslintConfig": {
  "extends": "@gbrachetta/tslint-config"
},
"prettier": "@gbrachetta/prettier-config"

If you need to override or extend the settings, you can create a .eslintrc.json and .prettierrc.json files and add extends: "@gbrachetta/tslint-config" and "@gbrachetta/prettier-config" respectivally. As an example:

// .eslintrc.json
{
  "extends": "@gbrachetta/tslint-config"
}
// you can edit this configuration as usual, check ESLint docs
// .prettierrc.json
{
  "@gbrachetta/prettier-config"
}

To use ESLint and Prettier from the terminal, add these scripts to your package.json file

{
  "lint": "eslint ./ --ignore-path .gitignore",
  "lint:fix": "npm run lint -- --fix",
  "format": "prettier --write \"{,!(node_modules)/**/}*.js\""
}

Contributing

How to contribute to this open source library

License

Copyright © 2022 Guillermo Brachetta. This library is licensed under the MIT license.