@brattonross/eslint-config

0.2.1 • Public • Published

@brattonross/eslint-config

Personal, opinionated ESLint configuration used by @brattonross.

Usage

1. Install

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

2. Select a variant

Depending on the kind of project that you are writing, you should use one of the available config variants. All variants support JavaScript and TypeScript by default.

  • node - Enables rules for a general Node.js project
  • react - Enables rules for a React project
  • vue - Enables rules for a Vue 3 project

Once you've determined which variant you want to use, you can apply it to your eslint config like so:

// This is a workaround for https://github.com/eslint/eslint/issues/3458
require('@brattonross/eslint-config/modern-module-resolution');

module.exports = {
  extends: ['@brattonross/eslint-config/react'],
  parserOptions: { tsconfigRootDir: __dirname },
};

3. Use Prettier

I like to use Prettier along with ESLint to keep code style consistent. I'll typically have Prettier run when I save a file via my editor, and on commit via tools like yorkie or husky. If and how you use Prettier is up to you, these are just my personal recommendations.

You can find my personal Prettier configuration here.

Dependencies (10)

Dev Dependencies (2)

Package Sidebar

Install

npm i @brattonross/eslint-config

Weekly Downloads

0

Version

0.2.1

License

MIT

Unpacked Size

13.2 kB

Total Files

9

Last publish

Collaborators

  • brattonross