Skip to content

Personal ESLint config forked from Remix

Notifications You must be signed in to change notification settings

rileytomasek/eslint-config

Repository files navigation

Forked from @remix-run/eslint-config

Personal ESlint config forked from Remix to support non-remix environments.

Installation

First, install this package along with ESLint in your project. This package requires at least version 8.1 of ESLint

npm install -D eslint @rileytomasek/eslint-config

Node.js

Then create a file named .eslintrc.js in the root of your project:

module.exports = {
  extends: [
    "@rileytomasek/eslint-config",
    "@rileytomasek/eslint-config/node",
  ]
};

React

Then create a file named .eslintrc.js in the root of your project:

module.exports = {
  extends: [
    "@rileytomasek/eslint-config",
    "@rileytomasek/eslint-config/react",
  ]
};

Please note that because this ruleset is optional, we do not include the core libraries as peer dependencies for this package. If you use these rules, be sure that you have the following dependencies installed in your project:

{
  "dependencies": {
    "react": "*",
  }
}

Jest

This packages also ships with optional configuration options for projects that use Jest. To enable these rules, add the following to your .eslintrc:

module.exports = {
  extends: [
    "@rileytomasek/eslint-config",
    "@rileytomasek/eslint-config/jest",
  ],
};

Please note that because this ruleset is optional, we do not include the core libraries as peer dependencies for this package. If you use these rules, be sure that you have the following dependencies installed in your project:

{
  "dependencies": {
    "jest": ">=26.0.0"
  }
}