0.0.7 • Published 4 years ago

@zorrilla/eslint-config-react v0.0.7

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

Eslint and Prettier Setup

You can use this config for a project using React and Typescript.

Usage

  1. If you don't already have a package.json file, create one with npm init.

  2. Then we need to install everything needed by the config:

npx install-peerdeps --dev @zorrilla/eslint-config-react
  1. You can see in your package.json there are now a big list of devDependencies.

  2. Create a .eslintrc file in the root of your project's directory (it should live where package.json does). Your .eslintrc file should look like this:

{
  "extends": "@zorrilla/react"
}

Tip: You can alternatively put this object in your package.json under the property "eslintConfig":. This makes one less file in your project.

  1. You can add two scripts to your package.json to lint and/or fix:
"scripts": {
  "lint": "eslint './**/*.{ts,tsx}'",
  "lint:fix": "eslint --fix './**/*.{ts,tsx}'"
}
  1. Now you can manually lint your code by running npm run lint and fix all fixable issues with npm run lint:fix. You probably want your editor to do this though.
0.0.7

4 years ago

0.0.5

4 years ago

0.0.4

4 years ago

0.0.6

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago