Skip to content

Instantly share code, notes, and snippets.

@lnmunhoz
Last active November 25, 2020 09:23
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lnmunhoz/c5632dd56f5a5672f45ebcad3cdad0bd to your computer and use it in GitHub Desktop.
Save lnmunhoz/c5632dd56f5a5672f45ebcad3cdad0bd to your computer and use it in GitHub Desktop.
Atom: Enable fix files on save with linter-eslint

Atom: Enable fix files on save with linter-eslint

Atom linter-eslint has a very handy command to fix the file with specified linting rules.

You can lint your file with by calling Command + P and typing Fix.

This saves time but you still need to type Fix over and over again to fix your file. Its more time saving if you could lint your file on saving, right? You can!

There's two ways you can config this behaviour. Follow the method that most please you:

Via Settings

  1. Go to your Settings and select the Packages tab. Find the installed linter-eslint and go to its settings.
  2. Check the Fix errors on save options.

Via Atom Config

  1. Command + P and type Config.
  2. Select Application: Open your config. This will open the config.cson file for you.
  3. Add the following config:
"linter-eslint":
  fixOnSave: true

You are good to go! Now your linting rules will be applied on file saving. Happy linting!

http://g.recordit.co/rnyAOI8lgK.gif

@appsparkler
Copy link

Thanks 👍 🙂

@sabbir-320
Copy link

Thanks

Copy link

ghost commented Nov 25, 2020

Thanks 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment