1.0.1 • Published 5 years ago

eslint-config-aurora v1.0.1

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

eslint-config-aurora

JavaScript Style Guide

Standard JavaScript, but with opinionated changes.

Changed rules

RuleOldNewWhy
space-before-function-paren['error', 'always']['error',{'anonymous': 'always', 'named': 'never', 'asyncArrow': 'always' }]Spacing before named function parenthesis is just unusual.

Changes the function parenthesis spacing rule to disallow spaces for named functions but continue to require them for anonymous and asyncArrow functions.

function name(arg) { ... } // ✓ ok now, previously forced a space

RuleOldNewWhy
comma-dangle['error', 'never']['warn', 'multiline']Trailing commas allow for quicker additions to lists from cold starts.

Changes the dangling comma rule to be a warning instead of an error and expect them on the last element or property which is on a different line of comma separated values.

var obj = {
  message: 'hello', // ✓ ok now, previously an error
}

Usage

Install:

yarn add --dev eslint-config-aurora

or

npm install --save-dev eslint-config-aurora

Create or edit .eslintrc.json:

{
  "extends": "aurora"
}

ESLint + Prettier

This ESLint config is designed to work alongside our shareable Prettier config: @auroradigital/prettier-config.