@bhws/eslint-config

DR lint config

Usage no npm install needed!

<script type="module">
  import bhwsEslintConfig from 'https://cdn.skypack.dev/@bhws/eslint-config';
</script>

README

Base ESLint Config

ESlint

Usage

  1. Add this to devDependencies: @bhws/eslint-config

ESLint

  1. yarn add -D eslint if not already present locally or globally

  2. Create aN .eslintrc file

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

{
  "extends": [
    "@bhws/eslint-config/eslint"
  ]
}

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

module.exports = {
  "root": true,
  "parserOptions": {
    "parser": "babel-eslint",
    "sourceType": "module"
  },
  "extends": [
    "@bhws/eslint-config/eslint"
  ],
}

Stylelint

  1. yarn add -D stylelint if not already present locally or globally

  2. Create a .stylelintrc file

  3. Extend the stylelint config:

module.exports = {
  extends: [
    "@bhws/eslint-config/stylelint",
  ]
}

Prettier

Note, opting not using prettier on .vue files due the poor formatting on