Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jetbrains/eslint-config
JetBrains config for ESLint
https://github.com/jetbrains/eslint-config
eslint eslint-config jetbrains-ui
Last synced: 30 days ago
JSON representation
JetBrains config for ESLint
- Host: GitHub
- URL: https://github.com/jetbrains/eslint-config
- Owner: JetBrains
- License: apache-2.0
- Created: 2017-05-24T15:05:54.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2024-04-11T16:19:24.000Z (7 months ago)
- Last Synced: 2024-05-12T03:21:04.642Z (6 months ago)
- Topics: eslint, eslint-config, jetbrains-ui
- Language: JavaScript
- Size: 860 KB
- Stars: 20
- Watchers: 18
- Forks: 7
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.txt
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# JetBrains config for ESLint
[![official JetBrains project](http://jb.gg/badges/official-flat-square.svg)](https://confluence.jetbrains.com/display/ALL/JetBrains+on+GitHub)
## Package contents
`@jetbrains` basic and style rules
`@jetbrains/eslint-config/base` basic rules
`@jetbrains/eslint-config/style` style rules
`@jetbrains/eslint-config/browser` browser rules and environment
`@jetbrains/eslint-config/es6` ES6 rules and environment, including [eslint-plugin-import](https://github.com/benmosher/eslint-plugin-import)
`@jetbrains/eslint-config/node` Node.js rules and environment
`@jetbrains/eslint-config/react` rules for [eslint-plugin-react](https://github.com/yannickcr/eslint-plugin-react), [eslint-plugin-react-hooks](https://github.com/facebook/react/tree/master/packages/eslint-plugin-react-hooks), and [eslint-plugin-jsx-a11y](https://github.com/evcohen/eslint-plugin-jsx-a11y)
`@jetbrains/eslint-config/angular` rules for [eslint-plugin-angular](https://github.com/Gillespie59/eslint-plugin-angular)
`@jetbrains/eslint-config/test` mocha, chai, sinon rules and environment, including [eslint-plugin-bdd](https://github.com/Nate-Wilkins/eslint-plugin-bdd)
## Installation
1. Install ESLint if it is not yet installed in your project: `npm install eslint`
1. Install JetBrains' config package: `npm install @jetbrains/eslint-config`
1. JetBrains' configuration doesn't implicitly install plugins it uses. This approach lets you specify what exactly version you'd like to use. You need to install these peer dependencies, if they are not yet installed in your project: `npm install eslint-import-resolver-webpack eslint-plugin-angular eslint-plugin-bdd eslint-plugin-import eslint-plugin-jsx-a11y eslint-plugin-react eslint-plugin-react-hooks`## Usage example
```json
{
"parser": "babel-eslint",
"extends": [
"@jetbrains",
"@jetbrains/eslint-config/browser",
"@jetbrains/eslint-config/es6",
"@jetbrains/eslint-config/node",
"@jetbrains/eslint-config/react",
"@jetbrains/eslint-config/angular",
"@jetbrains/eslint-config/test"
]
}
```## Usage with Prettier
If you're using this ESLint config with [Prettier](https://prettier.io), make sure that you disable
the `arrow-body-style` rule in the ESLint config, because it conflicts with Prettier rules:```json
"rules": {
"arrow-body-style": "off"
}
```**Note to maintainers**: to trigger publishing of the npm package append *\[Publish\]* to the commit message. For example:
*Tweaked the rules \[Publish\]*