0.2.2 • Published 4 years ago

@epilot/eslint-react-config v0.2.2

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

@epilot/eslint-react-config

This packages is a set of eslint rules, recommended for all React Projects.

ESLint statically analyzes your code to quickly find problems. ESLint is built into most text editors and you can run ESLint as part of your continuous integration pipeline. More Info

This Project is also bundled with Prettier in order to ensure company wide Code formatting.

Usage

yarn add @epilot/eslint-react-config -D --peer

Now add the config to either your package.json:

{
  "eslintConfig": {
    "extends": "@epilot/eslint-react-config"
  }
}

to your .eslintrc:

{
  "extends": "@epilot/eslint-react-config"
}

or .eslintrc.js:

module.exports = {
  extends: '@epilot/eslint-react-config'
}

vsCode

Its recommended to install eslint Extension. and configure your settings like

    "eslint.alwaysShowStatus": true,
    "eslint.validate": [
        "javascript",
        "javascriptreact",
        "typescript",
        "typescriptreact"
    ],
    "editor.codeActionsOnSave": {
        "source.fixAll.eslint": true
    },

Assumptions

This ESLint configuration comes with some fundamental assumptions:

  • React environment
  • parser: typescript

Developer instructions

Requirements

  • node.js (12/13 recommended)
  • yarn

Installation requirements on macOS

brew install node
brew install yarn

Development

git clone git@gitlab.com:e-pilot/cookie-cutter/epilot-eslint-react-config.git
cd epilot-eslint-react-config
yarn
yarn test

other useful scripts

yarn run

or check package.json

new Release

Create a Tag on master by one of these scripts

yarn version:patch
yarn version:minor
yarn version:major