1.1.3 • Published 4 years ago

eslint-config-roy-law v1.1.3

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

eslint-config-roy-law

ESLint config utilizing TypeScript, Prettier, Jest, React and React Native.

Plugins and configs used:

Additionally, it sets these environments:

Default config:

{
  "env": {
    "es6": true,
    "node": true,
    "react-native/react-native": true
  }
}

Node config:

{
  "env": {
    "es6": true,
    "node": true
  }
}

Installation

npm install --save-dev eslint-config-roy-law

Usage

Add to your ESLint config (.eslintrc, or eslintConfig field in package.json):

{
  "extends": "eslint-config-roy-law"
}

or for Node.js projects:

{
  "extends": "eslint-config-roy-law"
}

Example of extending the configuration

{
  "extends": "eslint-config-roy-law",
  "rules": {
    "global-require": 0,
    "prefer-destructuring": 0
  }
}

TypeScript

In order to use this config in TypeScript project make sure you have installed following dependencies:

Then when running ESLint add --ext '.js,.ts' (you might need also .jsx, .tsx) option, for example:

eslint --ext '.js,.ts' ./src