Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including eslint-config-react-app with all npm packages installed. Try it out:

require("eslint-plugin-react/package.json"); // eslint-plugin-react is a peer dependency. require("eslint-plugin-import/package.json"); // eslint-plugin-import is a peer dependency. require("eslint-plugin-react-hooks/package.json"); // eslint-plugin-react-hooks is a peer dependency. require("eslint-plugin-flowtype/package.json"); // eslint-plugin-flowtype is a peer dependency. require("eslint/package.json"); // eslint is a peer dependency. require("babel-eslint/package.json"); // babel-eslint is a peer dependency. require("eslint-plugin-jsx-a11y/package.json"); // eslint-plugin-jsx-a11y is a peer dependency. require("@typescript-eslint/parser/package.json"); // @typescript-eslint/parser is a peer dependency. require("@typescript-eslint/eslint-plugin/package.json"); // @typescript-eslint/eslint-plugin is a peer dependency. var eslintConfigReactApp = require("eslint-config-react-app")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

eslint-config-react-app v5.2.1

ESLint configuration used by Create React App

eslint-config-react-app

This package includes the shareable ESLint configuration used by Create React App.
Please refer to its documentation:

Usage in Create React App Projects

The easiest way to use this configuration is with Create React App, which includes it by default.

You don’t need to install it separately in Create React App projects.

Usage Outside of Create React App

If you want to use this ESLint configuration in a project not built with Create React App, you can install it with the following steps.

First, install this package, ESLint and the necessary plugins.

npm install --save-dev eslint-config-react-app @typescript-eslint/eslint-plugin@2.x @typescript-eslint/parser@2.x babel-eslint@10.x eslint@6.x eslint-plugin-flowtype@4.x eslint-plugin-import@2.x eslint-plugin-jsx-a11y@6.x eslint-plugin-react@7.x eslint-plugin-react-hooks@2.x

Then create a file named .eslintrc.json with following contents in the root folder of your project:

{
  "extends": "react-app"
}

That's it! You can override the settings from eslint-config-react-app by editing the .eslintrc.json file. Learn more about configuring ESLint on the ESLint website.

Accessibility Checks

The following rules from the eslint-plugin-jsx-a11y plugin are activated:

If you want to enable even more accessibility rules, you can create an .eslintrc.json file in the root of your project with this content:

{
  "extends": ["react-app", "plugin:jsx-a11y/recommended"],
  "plugins": ["jsx-a11y"]
}

However, if you are using Create React App and have not ejected, any additional rules will only be displayed in the IDE integrations, but not in the browser or the terminal.

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free