ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

Fix​My​JS

by addyosmani ST2/ST3

SublimeText package for FixMyJS

Labels formatting

Details

Installs

  • Total 6K
  • Win 3K
  • OS X 3K
  • Linux 1K
Mar 26 Mar 25 Mar 24 Mar 23 Mar 22 Mar 21 Mar 20 Mar 19 Mar 18 Mar 17 Mar 16 Mar 15 Mar 14 Mar 13 Mar 12 Mar 11 Mar 10 Mar 9 Mar 8 Mar 7 Mar 6 Mar 5 Mar 4 Mar 3 Mar 2 Mar 1 Feb 28 Feb 27 Feb 26 Feb 25 Feb 24 Feb 23 Feb 22 Feb 21 Feb 20 Feb 19 Feb 18 Feb 17 Feb 16 Feb 15 Feb 14 Feb 13 Feb 12 Feb 11 Feb 10 Feb 9
Windows 1 2 2 3 4 3 5 1 1 3 0 5 2 5 2 4 6 1 12 3 4 2 1 1 2 3 2 2 3 2 1 2 4 2 2 2 3 2 4 0 4 0 0 0 0 2
OS X 0 1 3 1 0 0 2 0 0 1 1 1 1 1 1 0 1 5 0 1 1 0 0 1 4 0 0 0 0 0 0 1 0 2 1 0 0 0 1 2 0 1 0 1 2 1
Linux 0 1 4 1 1 1 0 0 0 1 0 0 0 1 2 0 0 0 5 0 2 1 3 2 1 0 0 1 0 1 1 1 2 0 1 2 2 1 2 2 3 0 2 0 2 0

Readme

Source
raw.​githubusercontent.​com

sublime-fixmyjs

Sublime plugin to correct JS linting issues

You shouldn't have to care about linting issues. Now you don't have to using fixmyjs.

Preview

Install

Package Control

Install FixMyJS with Package Control and restart Sublime.

You need to have Node.js installed.
Make sure it's in your $PATH by running node -v in your command-line.

Note: On OS X it's expected that Node resides in the /usr/local/bin/ folder, which it does when installed with the default installer. If this is not the case, symlink your Node binary to this location:
ln -s /full/path/to/your/node /usr/local/bin/node

Install from GitHub

1) Open the Command Palette (Cmd+Shift+P)

2) Select Package Control > Add Repository

3) Paste in https://github.com/addyosmani/sublime-fixmyjs

4) BOOM.

Getting started

In a js file, open the Command Palette (Cmd+Shift+P) and choose FixMyJS. You can alternatively create one or more selections before running the command to only fix those parts.

Options

(Preferences > Package Settings > FixMyJS > Settings - User)

Default

{
        "legacy": true,
        "fixOnSave": false
}

Legacy mode

By default, this plugin uses the FixMyJS legacy mode. This option uses the last stable version of the module which uses JSHint to detect errors in your code and fix them.

It does not include all of the fixes the current version of FixMyJS exposes, but does do a much better job of preserving source formatting. To disable legacy mode, set legacy to false in your user settings for the package.

{
        "legacy": false
}

Keyboard shortcut

You can also set up a keyboard shortcut to run the command by opening up “Preferences > Key Bindings - User” and adding your shortcut with the fix command.

Example:

[
    { "keys": ["alt+super+j"], "command": "fix" }
]

Project settings

You can override the default and user settings for individual projects. Just add an "FixMyJS" object to the "settings" object in the project's .sublime-project file containing your project specific settings.

Example:

{
    "settings": {
        "FixMyJS": {

        }
    }
}

Kudos

This plugin is based on the excellent Autoprefixer plugin by Sindre Sorhus.

License

MIT © Addy Osmani