0.0.15 • Published 4 years ago

@movidesk/eslint-config-app v0.0.15

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

Table of Contents

This package provides Movidesk's .eslintrc for React Components as an shareable config. Inspired by QuintoAndar's ESLint shared config.

Getting start

Install

yarn add -D @movidesk/eslint-config-app

Usage

In your project, create a file .eslintrc.json and extends this project:

{
  "extends": "@movidesk/eslint-config-app"
}

After this, only if you are using Typescript, you have to generate your tsconfig.json with the following command:

tsc --init

On package.json, add the folowing script on scripts section:

"lint": "eslint --ignore-path .gitignore . --ext .js --ext .ts --ext .tsx"

If you are not using Typescript, remove the part when starts --ext.

Why --ext? Because when you run in the shell, eslint doesn't recognize .ts and .tsx extensions, even though VSCode does. To see more information, see the end of the README.md from standard-with-typescript and this discussion.

Running local lint

Just run:

yarn lint

Running local test

Just run:

yarn test