Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gravity-ui/eslint-config
https://github.com/gravity-ui/eslint-config
config eslint
Last synced: 1 day ago
JSON representation
- Host: GitHub
- URL: https://github.com/gravity-ui/eslint-config
- Owner: gravity-ui
- License: mit
- Created: 2022-08-23T14:49:23.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-12-26T09:56:17.000Z (about 1 month ago)
- Last Synced: 2024-12-26T10:28:41.057Z (about 1 month ago)
- Topics: config, eslint
- Language: JavaScript
- Homepage:
- Size: 383 KB
- Stars: 6
- Watchers: 0
- Forks: 2
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# @gravity-ui/eslint-config
## Install
```
npm install --save-dev eslint @gravity-ui/eslint-config
```## Usage
Add `.eslintrc` file in the project root with the following content:
```json
{
"extends": "@gravity-ui/eslint-config",
"root": true
}
```Add client and server config files in corresponding directories:
```json
{
"extends": "@gravity-ui/eslint-config/server"
}
``````json
{
"extends": "@gravity-ui/eslint-config/client"
}
```### Prettier
If you are using Prettier, extend root config with the additional rules:
```json
{
"extends": ["@gravity-ui/eslint-config", "@gravity-ui/eslint-config/prettier"],
"root": true
}
```### a11y
If you want to spot accessibility issues, extend root config with the additional rules:
```json
{
"extends": ["@gravity-ui/eslint-config", "@gravity-ui/eslint-config/a11y"],
"root": true
}
```### Order
if you want to enforce a convention in module import order, extend root config with the additional rules:
```json
{
"extends": ["@gravity-ui/eslint-config", "@gravity-ui/eslint-config/import-order"],
"root": true
}
```