@theholocron/eslint-config

0.4.3 • Public • Published

ESLint Config npm

An ESLint configuration for writing well-formed Javascript within the Galaxy.

Installation

npm install --save-dev @theholocron/eslint-config

Table of Contents

Usage

In your project package.json add the following:

{
  "eslintConfig": {
    "extends": "@theholocron"
  }
}

How We Write Our Code

  • 1 tab character
  • Semicolons
  • Sort JSX Props: errors; sorted alphabetically, with shorthand first
  • Sort Imports: errors; sorted alphabetically by import with grouping order of "builtin", "external", "parent", "sibling", and "index"
  • Switch statements updates
    • No Case Declarations: errors, all; requires {} in all cases/defaults of the Switch statement to prevent hoisting
    • Curly: errors; require {} in all code regardless of single line availability
  • React hooks plugin
    • error; only call hooks at the top-level
    • error; only call hooks from React functions
    • warn; don't include props in hooks that are not referenced
    • Further reading

For a more complete listing of rules you can check out the eslintrc.json.

How We Track Changes Keep a Changelog

This project uses a CHANGELOG and GitHub releases which contains a curated, chronologically ordered list of notable changes for each version of a project. Read more about changelogs.

How We Version semantic-release

We use SemVer for its versioning providing us an opt-in approach to releases. This means we add a version number according to the spec, as you see below. So rather than force developers to consume the latest and greatest, they can choose which version to consume and test any newer ones before upgrading. Please the read the spec as it goes into further detail.

Given a version number MAJOR.MINOR.PATCH, increment the:

  • MAJOR version when you make incompatible API changes.
  • MINOR version when you add functionality in a backward-compatible manner.
  • PATCH version when you make backward-compatible bug fixes.

Additional labels for pre-release and build metadata are available as extensions to the MAJOR.MINOR.PATCH format.

How to Contribute Conventional Commits

Have a bug or a feature request? Looking to contribute to advance the project? Read our contribution guide or maintenance guide first in order to understand how we do things around here. Or you could look at some of our other guides below:

How do I… (click to expand)

Where to Find Support Contributor Covenant

Looking to talk to someone or need some help? Please read our support guidelines.

License License: GPL v3

©2020 GNU General Public License v3. See LICENSE for specifics.

Readme

Keywords

none

Package Sidebar

Install

npm i @theholocron/eslint-config

Weekly Downloads

26

Version

0.4.3

License

GPL-3.0

Unpacked Size

60.2 kB

Total Files

6

Last publish

Collaborators

  • thenewton