Skip to content

sanscheese/linter

Repository files navigation

Resources

https://medium.com/@natterstefan/how-to-create-your-own-shared-eslint-prettier-and-stylelint-configuration-3930dd764de3

BHWS ESLint Config

ESlint

Usage

  1. Add this to devDependencies
$ npm i -D @bhws/eslint-config
# or
$ yarn add -D @bhws/eslint-config
  1. Install eslint if not already present locally or globally
$ npm i -D eslint
# or
$ yarn add -D eslint
  1. Create a .eslintrc file

  2. Extend the config (you can use just the scope name as ESLint will assume the eslint-config prefix):

{
  "extends": [
    "bhws"
  ]
}

Full example

A full example .eslintrc for a project with babel support:

Dont forget to npm i -D babel-eslint or yarn add -D babel-eslint

{
  "root": true,
  "parserOptions": {
    "parser": "babel-eslint",
    "sourceType": "module"
  },
  "extends": [
    "bhws"
  ]
}

Additional Notes

Setup inspired by @nuxtjs/eslint-config & eslint-config-standard

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published