@fuelrats/eslint-config

2.3.0 • Public • Published

@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].

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

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 projects.

Setup

Installation

We recommend the install-peerdeps package for automatically adding the peer dependencies required by this config.

NOTE: The commands below assume you are installing to devDependencies. If you want to install to your main dependencies (not recommended), remove the -d flag.

Via npm v5+

$ npx install-peerdeps -d @fuelrats/eslint-config

Via yarn 1.x

Yarn v1 does not have an included remote script runner. First you must globally install install-peerdeps:

$ yarn global add install-peerdeps

then run:

$ install-peerdeps -d -Y @fuelrats/eslint-config

Via yarn 2 😎

$ yarn dlx install-peerdeps -d -Y @fuelrats/eslint-config

Other Package managers

Refer to your manager docs, or just manually install everything (borrriiiiing). Below is a list of package names you can apply to the manager of your choice.

eslint @babel/core @babel/eslint-parser @babel/eslint-plugin eslint-plugin-import eslint-plugin-jsdoc @fuelrats/eslint-config

Configuration

  1. Add the following to your .eslintrc file:
"extends": "@fuelrats/eslint-config",

or, if you don't use Babel:

"extends": "@fuelrats/eslint-config/purejs",
  1. Setup additional environment options. This config only enables the "es6" environment. All other env settings are up to your project.
    • For more information on eslint envrionment settings, visit the eslint docs

Credits

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

Send some love their way 😍🎉🎊

Package Sidebar

Install

npm i @fuelrats/eslint-config

Weekly Downloads

3

Version

2.3.0

License

MIT

Unpacked Size

65.3 kB

Total Files

20

Last publish

Collaborators

  • trezy
  • xlexious
  • clapton