https://github.com/voxpelli/compare-eslint-configs
Compare ESLint configs
https://github.com/voxpelli/compare-eslint-configs
cli diff eslint
Last synced: 10 months ago
JSON representation
Compare ESLint configs
- Host: GitHub
- URL: https://github.com/voxpelli/compare-eslint-configs
- Owner: voxpelli
- License: mit
- Created: 2022-07-13T15:59:09.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2024-04-30T07:07:44.000Z (about 2 years ago)
- Last Synced: 2024-05-01T12:23:40.077Z (about 2 years ago)
- Topics: cli, diff, eslint
- Language: JavaScript
- Homepage:
- Size: 128 KB
- Stars: 12
- Watchers: 2
- Forks: 0
- Open Issues: 14
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Compare ESLint configs
[](https://www.npmjs.com/package/compare-eslint-configs)
[](https://www.npmjs.com/package/compare-eslint-configs)
[](https://github.com/voxpelli/eslint-config)
[](https://esmodules.dev/)
[](https://github.com/voxpelli/types-in-js)
## Usage
```bash
npm install -g compare-eslint-configs
compare-eslint-configs compare .eslintrc new.eslintrc
```
Or simply:
```bash
npx compare-eslint-configs compare .eslintrc new.eslintrc
```
## Commands
Found by running `compare-eslint-configs --help`
* **compare** - compares the provided eslint config file(s)
* **diff** - prints what's changed between the second and the first file
* **summary** - prints a summary of the specified configs
## Options
Found by running `compare-eslint-configs --help`, eg: `compare-eslint-configs compare --help`
## Example
### CLI output
```bash
npx compare-eslint-configs compare new.eslintrc -t cli.js
```

### Markdown output
```bash
npx compare-eslint-configs compare new.eslintrc -t cli.js -m
```
> # Only active in some:
>
> * **new.eslintrc**
> * [for-direction](https://eslint.org/docs/rules/for-direction)
>
>
> # Mixed severities:
>
> * [**func-style**](https://eslint.org/docs/rules/func-style)
> * _warn_: .eslintrc
> * _error_: new.eslintrc
> * [**unicorn/prefer-event-target**](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v43.0.2/docs/rules/prefer-event-target.md)
> * _warn_: .eslintrc
> * _error_: new.eslintrc
>
>
> # Mixed configs where otherwise okay:
>
> * [**no-console**](https://eslint.org/docs/rules/no-console)
> * _new.eslintrc_:
> ```json
> [{"allow":["warn","error"]}]
> ```
## See also
* [`@voxpelli/eslint-formatter-summary`](https://github.com/voxpelli/eslint-formatter-summary) – can summarize errors/warnings by ESLint rule + print that list as markdown