0.1.1 • Published 5 years ago

eslint-config-jonyamo-react v0.1.1

Weekly downloads
-
License
MIT
Repository
-
Last release
5 years ago

eslint-config-jonyamo-react

React specific ESLint and Prettier configuration.

Installation

Install ESLint and Prettier:

$ yarn add eslint prettier --dev

Install this package:

$ yarn add eslint-config-jonyamo-react --dev

Configuration

Add an extends section to your .eslintrc (or equivalent) and specify jonyamo-react as an extended configuration. Rules can be adjusted by overriding them in the rules section. E.g.:

// .eslintrc.js

module.exports = {
    extends: ['jonyamo-react'],
    rules: {
        'react/jsx-curly-newline': 'off',
    },
};

Create React App

For apps built with create-react-app, in order to extend the included base config follow these instructions, which basically state:

  1. In .env set:
EXTEND_ESLINT=true
  1. In package.json:
{
    "eslintConfig": {
        "extends": ["react-app", "jonyamo-react"]
    }
}