Skip to content
This repository has been archived by the owner on Aug 7, 2023. It is now read-only.

Fix File commands

Jason Jerome edited this page Sep 21, 2018 · 1 revision

Fix File via keybinding

If you would prefer to bind the Fix File command to a keybinding, this can be accomplished by adding the following to your Keymap file:

'atom-text-editor:not([mini])':
  'ctrl-alt-[': 'linter-eslint:fix-file'

Fix File via Command Palette

Fix the current file by opening the Command Palette, and typing eslint fix

Toggle Fix On Save

If you want the ability to quickly toggle Fix On Save on and off, you can add the following to your Atom init script:

atom.commands.add 'atom-text-editor', 'custom:toggle-linter-eslint-fixOnSave', ->
    fixOnSaveValue = atom.config.get('linter-eslint.fixOnSave')
    atom.config.set('linter-eslint.fixOnSave', !fixOnSaveValue)

And then add the custom command to your keybinds:

'atom-text-editor:not([mini])':
    'ctrl-alt-o': 'custom:toggle-linter-eslint-fixOnSave'
Clone this wiki locally