1.0.0-beta.4 • Published 11 months ago

@rubin-epo/eslint-config-react v1.0.0-beta.4

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

Shared ESLint configuration for React projects

This ESLint configuration deactivates all formatting rules of ESLint and makes sure that Prettier is used for code beautifying.

Integrate into new project

  1. Install this package as devDependency. The package uses eslint-patch to include its plugins as devDependencies for minimal configuration.
# with Yarn
$ yarn add -D @rubin-epo/eslint-config-react
  1. Use ESLint config in your project

Create a .eslintrc.js file in project root with the following content:

module.exports = {
  extends: ["@rubin-epo/eslint-config-react"],
  parserOptions: { tsconfigRootDir: __dirname },
};
  1. Add a script to run ESLint in your package.json
{
  "scripts": {
    "lint-js": "eslint -c .eslintrc.js \"**/*.{js,jsx,ts,tsx}\""
  }
}
  1. Add an .eslintignore file to your project to exclude test directories, build directories, and other code that should not be linted.
node_modules/
dist/
storybook-static/
__mocks__/