2.1.0 • Published 5 months ago

@dopamine-code/eslint-config v2.1.0

Weekly downloads
-
License
ISC
Repository
github
Last release
5 months ago

@dopamine-code/eslint-config

How to use it

Add an .eslintrc file with the following:

{
  "extends": "@dopamine-code"
}

Extend more specific configs like so:

{
  "extends": [
   "@dopamine-code/eslint-config/react"
  ]
}

Prettier is also integrated in this config so add a .prettierrc file as well:

{
  "singleQuote": true,
  "trailingComma": "all"
}

You can add your own custom rules for edge cases in your project.

Available configurations

This library has the following configurations available:

NameDescription
@dopamine-codeBase config for Node projects that use plain JavaScript
@dopamine-code/eslint-config/reactFrontend config for React projects that use Babel
@dopamine-code/eslint-config/typescriptBase config for Node projects that use TypeScript
@dopamine-code/eslint-config/react-typescriptFrontend config for React projects that use TypeScript
@dopamine-code/eslint-config/next-typescriptFrontend config for React projects that use Next.js

All specific configs extend from the base config, so only extending 1 config suffices.

Note on Prettier integration

Using the eslint-plugin-prettier adds Prettier as a rule to ESLint, delegating all formatting concerns to Prettier and code style to ESLint. This means that running eslint --fix will also run Prettier. Therefore it is no longer necessary to have prettier-eslint installed in your project.