Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jaydenseric/eslint-config-env
ESLint config optimized for authoring packages that adapts to the project environment.
https://github.com/jaydenseric/eslint-config-env
eslint npm
Last synced: 15 days ago
JSON representation
ESLint config optimized for authoring packages that adapts to the project environment.
- Host: GitHub
- URL: https://github.com/jaydenseric/eslint-config-env
- Owner: jaydenseric
- Created: 2018-06-09T08:36:39.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2022-04-27T03:18:06.000Z (over 2 years ago)
- Last Synced: 2024-10-13T08:19:22.790Z (25 days ago)
- Topics: eslint, npm
- Language: JavaScript
- Homepage: https://npm.im/eslint-config-env
- Size: 325 KB
- Stars: 11
- Watchers: 3
- Forks: 4
- Open Issues: 2
-
Metadata Files:
- Readme: readme.md
- Changelog: changelog.md
- Funding: .github/funding.yml
Awesome Lists containing this project
README
# eslint-config-env
[![npm version](https://badgen.net/npm/v/eslint-config-env)](https://npm.im/eslint-config-env) [![CI status](https://github.com/jaydenseric/eslint-config-env/workflows/CI/badge.svg)](https://github.com/jaydenseric/eslint-config-env/actions)
[ESLint](https://eslint.org) config optimized for authoring packages that adapts to the project environment, supporting:
- [Node.js](https://nodejs.org)
- Browsers
- [Babel](https://babeljs.io)
- [Prettier](https://prettier.io)
- [React](https://reactjs.org)
- [Next.js](https://nextjs.org)
- [jsdoc-md](https://npm.im/jsdoc-md)## Install
To install [`eslint-config-env`](https://npm.im/eslint-config-env) and it’s peer dependencies with [npm](https://npmjs.com/get-npm), run:
```sh
npm install eslint-config-env eslint-plugin-node eslint-plugin-import eslint-plugin-jsdoc --save-dev
```[Configure ESLint](https://eslint.org/docs/user-guide/configuring/configuration-files#using-a-shareable-configuration-package) in your project:
```json
{
"extends": ["env"]
}
```Also follow the setup instructions that are relevant to your project below…
### Node.js
Every project **_must_** specify supported [Node.js](https://nodejs.org) versions in the [`package.json` `engines.node` field](https://docs.npmjs.com/files/package.json#engines).
### Browsers
If it’s not a [Babel](https://babeljs.io) project, also install [`eslint-plugin-compat`](https://npm.im/eslint-plugin-compat):
```sh
npm install eslint-plugin-compat --save-dev
```Supported browsers **_must_** be specified in the [`package.json` `browserslist` field](https://github.com/browserslist/browserslist#packagejson).
### Babel
Also install [`@babel/eslint-parser`](https://npm.im/@babel/eslint-parser):
```sh
npm install @babel/eslint-parser --save-dev
```### Prettier
Also install [`eslint-plugin-prettier`](https://npm.im/eslint-plugin-prettier) and [`eslint-config-prettier`](https://npm.im/eslint-config-prettier):
```sh
npm install eslint-plugin-prettier eslint-config-prettier --save-dev
```### React
Also install [`eslint-plugin-react`](https://npm.im/eslint-plugin-react) and [`eslint-plugin-react-hooks`](https://npm.im/eslint-plugin-react-hooks):
```sh
npm install eslint-plugin-react eslint-plugin-react-hooks --save-dev
```### Next.js
Follow the [Babel setup instructions](#babel).
Also install [`@next/eslint-plugin-next`](https://npm.im/@next/eslint-plugin-next):
```sh
npm install @next/eslint-plugin-next --save-dev
```### jsdoc-md
A [`jsdoc-md`](https://npm.im/jsdoc-md) project does not require additional setup.