Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@fuelrats/eslint-config

FuelRats11MIT2.3.0

ESLint config for fuelrats projects

eslint, eslintconfig, fuelrats, javascript, ecma2020, es2020

readme

FuelRats ESLint configs

Standard configurations for Fuel Rats ECMAScript projects

Note about v2

v2 Changes a number of aspects of our code style which may lead to time consuming adjustments, and in some cases an outright refactor of your code.

Please see PR #3 for a comprehensive list of changes made from v1.2.5

If you are a react user, @fuelrats/eslint-config-react no longer extends @fuelrats/eslint-config. See the react package README.md for more information.

Motivation

The TechRat team of The FuelRats utilize ECMAScript on all fronts. Over time these projects have strayed in code standards as no common base has been shared between them.

@fuelrats/eslint-config aims to help unify style and standards across all major FuelRats Javascript projects.

Packages

This config has two separate packages:

@fuelrats/eslint-config

  • Base ESLint ruleset with @babel/eslint-parser as the primary parser. Generally intended for node.js backend projects.
    • Assumes an ECMAScript 2020 environment with Babel 7 as the primary transpiler.
    • Includes [@babel/eslint-plugin][eslint-plugin-babel] for providing core rule compatibility for common babel plugins.
    • Includes eslint-plugin-import for additional ESModule linting.
    • Includes eslint-plugin-jsdoc for JSDoc block linting.
    • Also includes a purejs preset which disables @babel/eslint-parser and [@babel/eslint-plugin][eslint-plugin-babel].

@fuelrats/eslint-config-react

Installation

Development

This monorepo uses yarn workspaces to manage dependencies and versioning. When downloading for development, follow these steps:

  1. Clone the Repository
    $ git clone https://github.com/FuelRats/eslint-config-fuelrats.git && cd eslint-config-fuelrats
  2. Let yarn install everything for you
    $ yarn install
  3. Done! 🎉

Credits

Our code style and this config set was inspired by and derived from the AirBnB javascript style guide.

Send some love their way 😍🎉🎊

changelog

@fuelrats/eslint-config Changelog

Unreleased

2.3.0

Additions

  • Enable new no-nonoctal-decimal-escape rule

Changes

  • Update minimum ESLint version to v7.14

2.2.0

Additions

  • Warn when a lint rule is being disabled that doesn't need to be.
  • Enable ESLint v7 rules
    • default-case-last
    • no-useless-backreference
    • no-promise-executor-return
    • no-unreachable-loop
  • Recognize the path alias ~ as an internal import in import ordering.

Changes

  • Better and more consistent restricted syntax messages.
  • Disallow explicit null checks via no-restricted syntax instead of abusing the combination of eqeqeq's null option and no-eq-null
  • add inheritdoc to certain jsdoc rule exemptedBy options so it's consistent with the default config
  • make import/order case insensitive sort.
  • Remove all node-specific rules since they are now deprecated.
  • Improved settings for import plugin.
  • Use id-denylist over id-blacklist
    • Even though this rule is off we'd rather not have deprecated rule names :D
  • Ensure our config is JSON serializable by replacing Infinity with Number.MAX_SAFE_INTEGER
  • Enable ignoreGlobals for camelcase rule
  • update no-param-reassign ignored Properties
    • draftState can now be shortened to draft
    • event has been added to allowed property names
  • Replace babel-eslint and eslint-plugin-babel with @babel/eslint-parser and @babel/eslint-plugin respectively.
  • Restructure ruleset directories so there's distinction between what is core to the config and what is considered "optional" or "addons"
  • Enable ignoreDefaultValues for no-magic-numbers rule
  • Exempt doc blocks with @yeilds from jsdoc/require-returns

2.1.0

Changes

  • re-enable import/no-cycle due to the problems cyclic dependencies cause in most environments.
  • enable no-undef's typeof rule. If you are typeof checking a global unknown to eslint, you should define it!

2.0.0

  • Initial release intended for general consumption

1.x

Original version (which should no longer be used)