eslint-config-beepyo

JavaScript Coding Standards

Usage no npm install needed!

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

README

Beepyo's JavaScript Linting Rules

Welcome to Beepyo's JavaScript Lint configuration. Here you will find lint rules for the following types of projects:

  • Jest
  • React projects
  • React Native projects
  • Node.js projects

Prettier

We are actively integrating Prettier into our lint rules. Currently, Prettier is ready for use in all frontend projects (i.e. React or React Native). Prettier support for Node projects is still underway. See examples below.

How to Use

This project treats all dependencies as first-class citizens. What this means is that, for simplicity's sake, eslint installs all peer dependencies as regular dependencies. For now, the only dependency you'll need to install other than eslint-config-beepyo is eslint itself. This will probably change in the future as it's not a best practice.

Install Packages

yarn add eslint eslint-config-beepyo

Add it to your .eslintrc

Node.js project example:

{
  "extends": [
    "beepyo",
    "beepyo/rules/node"
  ]
}

Node.js with Jest example:

{
  "extends": [
    "beepyo/rules/node",
    "beepyo/rules/jest"
  ]
}

React with Jest example:

{
  "extends": [
    "beepyo/rules/react",
    "beepyo/rules/jest",
    "beepyo/rules/prettier"
  ]
}

Add "lint" and "format" Scripts to package.json

{
  "scripts": {
    "lint": "eslint ./",
    "format": "eslint --fix ./"
  }
}

Credit Where Credit is Due

These lint rules are heavily inspired by Airbnb's JavaScript style guide.