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

eslint-config-myterminal

v0.11.0

Published

An ESLint configuration following my preferred coding style

Downloads

19

Readme

eslint-config-myterminal

npm version npm downloads License
NPM

An ESLint configuration according to my preferred coding style based on the ones from airbnb

Base

Out of all the configs that I came across all these years, I found the ones from airbnb to be the most compatible with my coding with a few exceptions. The first example that comes to my mind is 4 spaces for indentations as opposed to 2. I made an attempt to create my configs from scratch a while back but the process being so overwhelming and time-consuming, I decided to take a step back and spend that time to write actual code rather than to create extensive coding style configuration.

Usage

Follow the below-mentioned steps for a smooth setup or feel free to do it your way if you feel adventurous.

Install this package from NPM

Run the below command for an install using NPM, or use an equivalent one if you use yarn:

npm install --save-dev eslint eslint-config-myterminal

Note: You definitely need to install eslint to be able to use this config, otherwise what would you do with this config anyway?

Refer it in your config file

Create an ESLint config file and extend it from eslint-config-myterminal or just myterminal as shown below:

{
  "extends": "myterminal",
  "rules": {}
}

Install the peer-dependencies

This config depends on a few peer dependencies that need to be installed as well. Below is a list:

You can either install these manually using the below command:

npm install --save-dev babel-eslint eslint-config-airbnb eslint-plugin-import eslint-plugin-react eslint-plugin-jsx-a11y

or if you have NPM 5+, simply use the below command:

npx install-peerdeps --dev eslint-config-myterminal

(Optional) Override according to your preference

There's a high probability you won't agree with at least some rules from this config. If that is the case and you need to override one, feel free to do that in your .eslintrc file as shown below:

{
  "extends": "myterminal",
  "rules": {
    "indent": ["error", 3],
  }
}

The above example demonstrates how one can enforce an indent of 3 spaces which is rather unusual, but that's just an example. You don't need this line at all if you're a 4 spaces person as that's the rule in this config and if you're the 2 spaces type, you might as well skip this config and use the one from airbnb directly.

(Optional) Use only a specific rule-set

If you only need to impose only a particular set of rules, you can do it like

{
  "extends": "myterminal/rules/base",
  "rules": {}
}

The above will not include rules for React. There are a few individual rule-sets to choose from:

  • base
  • react
  • vue (includes base and needs vue-eslint-parser and eslint-plugin-vue installed as peer-dependencies)

However, if you need all of them, just stick to "myterminal".

Rules that are different from airbnb

(Coming soon)

Badge

If you use this config in your project and want people to know it, use the below badge in your README.md file.

js-myterminal-style

[![js-myterminal-style](https://img.shields.io/badge/code%20style-myterminal-blue.svg)](https://www.npmjs.com/package/eslint-config/myterminal)

To-Do

  • Separate out rules even further into multiple rule-sets
  • Add rules for a few more disciplines