Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jimmyhmiller/eslint-fixit
Eslint-Fixit is an easy way to fix eslint violations. I
https://github.com/jimmyhmiller/eslint-fixit
eslint
Last synced: 14 days ago
JSON representation
Eslint-Fixit is an easy way to fix eslint violations. I
- Host: GitHub
- URL: https://github.com/jimmyhmiller/eslint-fixit
- Owner: jimmyhmiller
- License: mit
- Created: 2017-07-29T15:10:02.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-07-30T14:57:06.000Z (over 7 years ago)
- Last Synced: 2024-11-30T00:08:21.984Z (2 months ago)
- Topics: eslint
- Language: JavaScript
- Homepage:
- Size: 245 KB
- Stars: 3
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Eslint-Fixit
Eslint-Fixit is an easy way to fix eslint violations. It allows you to open up each of the eslint violations in your editor so you can fix them quickly.
![eslint-fixit](images/eslint-fixit.gif)
## Installation
**Yarn:**
```bash
yarn global add npx eslint-fixit
```**Npm:**
```bash
npm install -g npx eslint-fixit
```## Usage
You must already have eslint setup for your project. In the directory containing your project run:
```bash
eslint-fixit .
```## Editor Setup
By default eslint-fixit is setup to use nano. But most likely, you don't use nano as your editor, so you can setup your own editor by adding an export for your editor in your `~/.bash_profile` (or equivilant if you use something other than bash).
```bash
# Vim
export ESLINT_FIXIT_EDITOR="vim \"+call cursor(%line, %column)\" %file"# Sublime Text
export ESLINT_FIXIT_EDITOR="subl -w %file:%line:%column"# Emacs
export ESLINT_FIXIT_EDITOR="emacs +%line:%column %file"# Atom
export ESLINT_FIXIT_EDITOR="atom -w %file:%line:%column"# Visual Studio Code
export ESLINT_FIXIT_EDITOR="code -w -g %file:%line:%column"
# disclaimer: waits for app to close, not tab
```
I know I've missed some editors, pull requests are welcome for any other editors.