@brightsole/eslint-config-lint-node

eslint & prettier node setup

Stats

stars 🌟issues ⚠️updated 🛠created 🐣size 🏋️‍♀️
00Apr 24, 2021Aug 24, 2018Minified + gzip package size for @brightsole/eslint-config-lint-node in KB

Readme

(eslint-config-)lint-node

code style: prettier published on npm!

What is it?

tl;dr: eslint & prettier setup for node projects

prettier and eslint are pretty great tools for writing repeatable and easy to parse code, so long as you configure them correctly. This is a very small standard setup for linting things that look like something run in a node environment. I like the way the output looks for the most part. This repo is here to gobble up all the deps needed to make that happen, and pipe them to a standard config.

That being said I'm not a huge fan of prettier's my way or the highway bucko mentality, and will rip it out hardcore as soon as something equally easy to use comes along that lets me do some more customization not made by me.

This repo should at the very least get you pointed in the right direction for now, however.


How to use it?

tl;dr: yarn add -D @brightsole/eslint-config-lint-node
After the install, you need to extend the eslint setup by adding an `.eslintrc` file with the following contents:
  {
    "extends": "@brightsole/lint-node"
  }

Then, all that's left is to add a script for linting, like the one in this repo:

  ...
  "scripts": { "lint": "eslint . --fix" },
  ...
That's pretty much it, but...

Some things to be cognizent of:

  • Some projects will need overrides, you can still do that in the .eslintrc.
  • Some projects will need a .eslintignore
  • linting should probably be handled pre-commit by something like husky but wrapping that in here would be wrong

TODO:

tl;dr: not. much.
  1. add it to project-status
  2. generate a couple badges

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.