eslint-config-env

23.0.2 • Public • Published

eslint-config-env

npm version CI status

ESLint config optimized for authoring packages that adapts to the project environment, supporting:

Install

To install eslint-config-env and it’s peer dependencies with npm, run:

npm install eslint-config-env eslint-plugin-node eslint-plugin-import eslint-plugin-jsdoc --save-dev

Configure ESLint in your project:

{
  "extends": ["env"]
}

Also follow the setup instructions that are relevant to your project below…

Node.js

Every project must specify supported Node.js versions in the package.json engines.node field.

Browsers

If it’s not a Babel project, also install eslint-plugin-compat:

npm install eslint-plugin-compat --save-dev

Supported browsers must be specified in the package.json browserslist field.

Babel

Also install @babel/eslint-parser:

npm install @babel/eslint-parser --save-dev

Prettier

Also install eslint-plugin-prettier and eslint-config-prettier:

npm install eslint-plugin-prettier eslint-config-prettier --save-dev

React

Also install eslint-plugin-react and eslint-plugin-react-hooks:

npm install eslint-plugin-react eslint-plugin-react-hooks --save-dev

Next.js

Follow the Babel setup instructions.

Also install @next/eslint-plugin-next:

npm install @next/eslint-plugin-next --save-dev

jsdoc-md

A jsdoc-md project does not require additional setup.

Package Sidebar

Install

npm i eslint-config-env

Weekly Downloads

41

Version

23.0.2

License

MIT

Unpacked Size

13.1 kB

Total Files

3

Last publish

Collaborators

  • jaydenseric