codermaze / eslint-config-env

ESLint config optimized for authoring packages that adapts to the project environment.

Home Page:https://npm.im/eslint-config-env

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

eslint-config-env

npm version Build status

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

Install

To install eslint-config-env from npm run:

npm install eslint-config-env --save-dev

Configure ESLint in your project:

{
  "extends": ["env"]
}

Unfortunately sharable ESLint configs can’t declare their own plugin or config dependencies, so also follow the relevant setup instructions below…

Node.js

Support for the Node.js environment is required in every project, so also install eslint-plugin-import and eslint-plugin-node:

npm install eslint-plugin-import eslint-plugin-node --save-dev

Supported versions of Node.js must be specified in the package.json engines.node field.

Browser

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:

npm install babel-eslint --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:

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

Next.js

A Next.js project does not require additional setup.

About

ESLint config optimized for authoring packages that adapts to the project environment.

https://npm.im/eslint-config-env


Languages

Language:JavaScript 100.0%