https://github.com/miirinjej/eslint-config
Sharable eslint config for JavaScript
https://github.com/miirinjej/eslint-config
es2021 eslint eslint-config eslint-plugin-import eslint-plugin-promise eslint-plugin-unicorn javascript
Last synced: about 2 months ago
JSON representation
Sharable eslint config for JavaScript
- Host: GitHub
- URL: https://github.com/miirinjej/eslint-config
- Owner: miirinjej
- License: mit
- Created: 2020-11-27T16:55:01.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-08-01T20:35:52.000Z (almost 4 years ago)
- Last Synced: 2025-03-18T04:59:00.268Z (2 months ago)
- Topics: es2021, eslint, eslint-config, eslint-plugin-import, eslint-plugin-promise, eslint-plugin-unicorn, javascript
- Language: JavaScript
- Homepage:
- Size: 302 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# @miirinjej/eslint-config
[](https://www.npmjs.org/package/@miirinjej/eslint-config)
> Sharable eslint config for JavaScript
## Installation
```
npm install --save-dev @miirinjej/eslint-config eslint
```Or (if Babel isn't set up):
```
npm install --save-dev @babel/core @babel/preset-env @miirinjej/eslint-config eslint
```In addition, when options `"useBuiltIns": "entry"|"usage"` are used in Babel config:
```
npm install core-js@latest
```## Usage
Add this config to `package.json`:
```yaml
"eslintConfig": {
"extends": [
"@miirinjej/eslint-config"
]
}
```See also: [https://eslint.org/docs/user-guide/configuring](https://eslint.org/docs/user-guide/configuring)
### Extending the config
You can extend the current configuration by extending (or overriding) rules or an array of existing configurations:
```yaml
{
"extends": ["@miirinjej/eslint-config", "./eslint.config.js"],
"rules": {
"no-console": "off"
}
}
```See also: [https://eslint.org/docs/user-guide/configuring#extending-configuration-files](https://eslint.org/docs/user-guide/configuring#extending-configuration-files)
## Included features
### [@babel/eslint-parser](https://github.com/babel/babel/tree/main/eslint/babel-eslint-parser)
`@babel/eslint-parser` allows you to lint all valid Babel code with eslint.
**Note:** `@babel/eslint-parser` requires `@babel/core` and a valid Babel configuration file to run. If you do not have
this already set up, please see the [Babel usage guide](https://babeljs.io/docs/en/usage).### [@babel/preset-env](https://babeljs.io/docs/en/babel-preset-env.html)
`@babel/preset-env` allows you to use the latest JavaScript based on your target environment(s).
## Extensions
- [@babel/eslint-parser](https://github.com/babel/babel/tree/main/eslint/babel-eslint-parser)
— Use Babel's parser for linting all Babel features.
- [@babel/eslint-plugin](https://github.com/babel/babel/tree/main/eslint/babel-eslint-plugin)
— Adds replacements for built-in rules to include Babel features.
- [eslint-plugin-import](https://github.com/benmosher/eslint-plugin-import)
— Linting of ES2015+ import/export syntax, and prevent issues with misspelling of file paths and import names.
- [eslint-plugin-promise](https://github.com/xjamundx/eslint-plugin-promise)
— Best practices when working with promises.
- [eslint-plugin-unicorn](https://github.com/sindresorhus/eslint-plugin-unicorn)
— Various awesome ESLint rules.## Rules
See [config](https://github.com/miirinjej/eslint-config/blob/master/index.js) itself.
Rules are grouped and sorted by default as in the original lists:
- [eslint](https://eslint.org/docs/rules/)
- [eslint-plugin-import](https://github.com/benmosher/eslint-plugin-import#rules)
- [eslint-plugin-promise](https://github.com/xjamundx/eslint-plugin-promise#rules)
- [eslint-plugin-unicorn](https://github.com/sindresorhus/eslint-plugin-unicorn#rules)