Giter VIP home page Giter VIP logo

eslint-formatter's Introduction

ESLint-Formatter for Sublime Text 3

Sublime Text 3 Plugin to autoformat your javascript code according to the ESLint configuration files you already have.

This plugin formats but does not lint your code. To also enable linting, use this plugin in conjuction with SublimeLinter-eslint.

Installation

Linter installation

This Sublime Text Plugin depends on a valid installation of eslint version 3 or higher. To install eslint, follow the getting started guide: http://eslint.org/docs/user-guide/getting-started.

Plugin installation

Please use Package Control to install the linter plugin. This will ensure that the plugin will be updated when new versions are available. If you want to install from source so you can modify the source code, you probably know what you are doing so we won’t cover that here.

To install via Package Control, do the following:

  1. Within Sublime Text, bring up the Command Palette and type install. Among the commands you should see Package Control: Install Package. If that command is not highlighted, use the keyboard or mouse to select it. There will be a pause of a few seconds while Package Control fetches the list of available plugins.

  2. When the plugin list appears, type eslint format. Among the entries you should see ESLint-Formatter. If that entry is not highlighted, use the keyboard or mouse to select it.

Commands

Command palette:

  • ESLintFormatter: Format this file

Shortcut key:

  • Linux/Windows: [Ctrl + Shift + H]
  • Mac: [Cmd + Shift + H]

Behavior

The formatting will be applied to the last saved state of a file, not the current buffer. If not using the format_on_save: true option, you have to save your file first and then run the command.

Settings

By default, ESLintFormatter will supply the following settings:

{
  // The Nodejs installation path
  // If these are false, we'll invoke the eslint binary directly.
  "node_path": {
    "windows": "node.exe",
    "linux": "/usr/bin/nodejs",
    "osx": "/usr/local/bin/node"
  },

  // The location to search for a locally installed eslint package.
  // These are all relative paths to a project's directory.
  // If this is not found or are false, it will try to fallback to a global package
  // (see 'eslint_path' below)
  "local_eslint_path": {
    "windows": "node_modules/eslint/bin/eslint.js",
    "linux": "node_modules/.bin/eslint",
    "osx": "node_modules/.bin/eslint"
  },

  // The location of the globally installed eslint package to use as a fallback
  "eslint_path": {
    "windows": "%APPDATA%/npm/node_modules/eslint/bin/eslint",
    "linux": "/usr/bin/eslint",
    "osx": "/usr/local/bin/eslint"
  },

  // Specify this path to an eslint config file to override the default behavior.
  // Passed to eslint as --config. Read more here:
  // http://eslint.org/docs/user-guide/command-line-interface#c---config
  // If an absolute path is provided, it will use as is.
  // Else, it will look for the file in the root of the project directory.
  // Failing either, it will skip the config file
  "config_path": "",

  // Specify the name of a config file, which determines the root of your
  // project. This is a pattern such as ".eslintrc.json" or "package.json"
  // and will be searched for upwards, to determine the working directory
  // for linting. This is different to config_path and is only used for
  // resolving the working directory.
  "config_file": "",

  // Pass additional arguments to eslint.
  //
  // Each command should be a string where it supports the following replacements:
  //   $project_path - The path to the projects root folder
  //
  // Example:
  //   ["--parser-options={\"tsconfigRootDir\": \"$project_path\"}"]
  "extra_args": [],

  // Automatically format when a file is saved.
  "format_on_save": false,

  // Use --fix-to-stdout, --stdin, and --stdin-filename to update the file if using eslint_d.
  // See https://github.com/mantoni/eslint_d.js#automatic-fixing
  "fix_to_stdout": false,

  // Only attempt to format files with whitelisted extensions on save.
  // Leave empty to disable the check
  "format_on_save_extensions": [
    "js",
    "jsx",
    "es",
    "es6",
    "babel"
  ]
}
  • Modify any settings within the Preferences -> Package Settings -> ESLint-Formatter -> Settings - User file.

Project-specific settings override

To override global plugin configuration for a specific project, add a settings object with a ESLint-Formatter key in your .sublime-project. This file is accessible via Project -> Edit Project.

For example:

{
  "folders": [
    {
      "path": "."
    }
  ],
  "settings": {
    "ESLint-Formatter": {
      "format_on_save": true
    }
  }
}

Performance

If you experience performance issues, it may be worth taking a look at eslint_d. You can modify the settings to point to the eslint_d binary instead of eslint.

For example:

{
  "local_eslint_path": {
    "osx": "node_modules/.bin/eslint_d"
  }
}

Contributing

If you find any bugs feel free to report them here.

Pull requests are also encouraged.

eslint-formatter's People

Contributors

aodev avatar balupton avatar dinnerbone avatar greenek avatar ian-infogrid avatar ipwright83 avatar jm78915 avatar johnyluyte avatar jtokoph avatar lnfnunes avatar maxkostow avatar mf-pherlihy avatar mrjoelkemp avatar ramiel avatar skeggse avatar thesavior avatar xwartz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

eslint-formatter's Issues

format_on_save not work on Mac

set format_on_save: true not work on Mac.
I have try using sublime pos_save hook to run format_eslint command, not work again.
Hope for your help. Thanks.

Format on pre-save

Would it be possible to configure the formatter to format the file before it's saved (but after pressing Cmd-s) instead of after? Now it seems that the file is saved to disk, then the formatter formats the file and saves it again, resulting in two saves.

This is problematic in cases where saved files are watched for changes, as the first (unformatted) save triggers actions (babel-compiles etc), and the second (formatted) save goes by unnoticed since the action is already in progress.

format_on_save

v2.3.1 is installed, after setting config: "format_on_save: true",
it would only pop out Linter warning and not fixed.
But if using hot key, it works perfectly.

My env:
OS: Sierra 10.12
Sublime Text 3

Below is the debug message:

SublimeLinter: eslint: Hello.vue ['/Users/user/pwa/node_modules/.bin/eslint', '--format', 'compact', '--stdin', '--stdin-filename', '@'] 
SublimeLinter: eslint output:
/Users/user/pwa/src/components/Hello.vue: line 5, col 13, Error - Expected indentation of 6 spaces but found 8. (indent)

1 problem 

I still can not find out the reason.
Has any idea?
Thank you

local_eslint_path doesn't work

This is my sublime project.
.sublime-project

{
  "folders":
  [
    {
      "path": "."
    }
  ],
  "settings": {
    "ESLint-Formatter": {
      "format_on_save": true,
      "config_path": "website/.eslintrc",
      "local_eslint_path": {
        "osx": "website/node_modules/.bin/eslint"
      }
    }
  }
}

I open the project using the project file, not the folder.

local_eslint_path and config_path are supposed to be resolved relative to the project root, however the plugin doesn't seem to resolve correctly since it defaults to defaults.

EDIT: absolute path seems to work for config_path but not for local_eslint_path

Need a test suite

This plugin needs a test suite to ensure the stability of the plugin and verify changes.

If anyone has experience with python or sublime plugins and wants to take a stab at this, or has recommendations for a path to go down, that knowledge would be much appreciated.

It looks like this might be a good approach:
https://github.com/randy3k/UnitTesting

macOS node error from eslint

Probably user error, but I installed ESLint-Formatter with Sublime Package Control and still get an odd error when I press cmd-shift-H:

When I type

$ eslint filename.js --fix 

at the bash prompt it works OK.

But when I run eslint-formatter in Sublime Text 3 it pops up a Sublime-logoed window saying:

Error: 
/Users/michael/.nvm/versions/node/v6.4.0/lib/node_modules/eslint/bin/eslint.js:16
const useStdIn = (process.argv.indexOf("--stdin") > -1),
^^^^^
SyntaxError: Use of const in strict mode.
    at Module._compile (module.js:439:25)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Function.Module.runMain (module.js:497:10)
    at startup (node.js:119:16)
    at node.js:906:3

Conflict with SublimeJSCSFormatter

I have both your ESLint-Formatter and SublimeJSCSFormatter installed. When I run ESLint Formatter I get this error:

Error: No configuration found. Add a .jscsrc file to your project root or use the -c option.

And this is correct, I have no .jscsrc for current project, but I have .eslintrc.json and run ESLint Formatter.

I think problem is in the name of main class FormatJavascriptCommand. Both plugins use this name for command and Sublime Text decides which plugin will run this command. I suggest to use different commands in this plugins.

Can't convert 'NoneType' object to str implicitly

I installed this today, and I really like it! However, I keep getting errors like these. What additional debug information can I provide to help resolve this issue?

Unexpected error(<class 'TypeError'>): Can't convert 'NoneType' object to str implicitly
error: Can't convert 'NoneType' object to str implicitly

This is the eslinter output:

myFileName.js: line 3, col 8, Warning - 'SettingsUtils' is defined but never used (no-unused-vars)
myFileName.js: line 6, col 3, Warning - Expected indentation of 1 tab character but found 0. (indent)
myFileName.js: line 6, col 20, Warning - Missing space before function parentheses. (space-before-function-paren)
myFileName.js: line 7, col 5, Warning - Expected indentation of 1 tab character but found 0. (indent)
myFileName.js: line 8, col 7, Warning - Expected indentation of 1 tab character but found 0. (indent)
myFileName.js: line 9, col 7, Warning - Expected indentation of 1 tab character but found 0. (indent)
myFileName.js: line 10, col 7, Warning - Expected indentation of 1 tab character but found 0. (indent)
myFileName.js: line 14, col 3, Warning - Expected indentation of 1 tab character but found 0. (indent)
myFileName.js: line 14, col 23, Warning - Missing space before function parentheses. (space-before-function-paren)
myFileName.js: line 15, col 5, Warning - Expected indentation of 1 tab character but found 0. (indent)
myFileName.js: line 16, col 7, Warning - Expected indentation of 1 tab character but found 0. (indent)
myFileName.js: line 17, col 7, Warning - Expected indentation of 1 tab character but found 0. (indent)
myFileName.js: line 18, col 7, Warning - Expected indentation of 1 tab character but found 0. (indent)

Comments not re-indented properly

If I am converting from a file with 2 space indentation to 4 space indentation, all the code gets indented correctly, but comments remain at their original indentation.

For instance:

class {
  /**
   * My doc
   */
  execute() {
    // do something cool
    doSomething();
  }
}

gets reformatted into:

class {
  /**
   * My doc
   */
    execute() {
    // do something cool
      doSomething();
    }
}

when it should be:

class {
    /**
     * My doc
     */
    execute() {
      // do something cool
      doSomething();
    }
}

--fix doesn't work well

I have verified the lint debug view that my node path and eslint path is correct. I also verified manually running the eslint works. My question is that upon fixing the file, it simply push my indent for the tab size i set in eslint config but it did not delete the bad spaces. What is your experience so far, I know I should probably go ahead ask eslint team but was wondering if this is the expected behavior...

doesn't fix mix space an tab

rule

"no-mixed-spaces-and-tabs": "error",
"react/jsx-indent": ["warn", "tab"],

code

     	render() {
  	 	return (
	<div styleName="home">
		<div styleName="gong"></div>
		<Header {...this.props} />
		<div styleName="j"></div>
	</div>
		)
	   }

expect

render() {
	return (
		<div styleName="home">
			<div styleName="gong"></div>
			<Header {...this.props} />
			<div styleName="j"></div>
		</div>
		)
}

real result

     	render() {
  	 	return (
	<div styleName="home">
		<div styleName="gong"></div>
		<Header {...this.props} />
		<div styleName="j"></div>
	</div>
		)
	   }

Cannot find module

When I try to run it, I get an error popup saying that the module 'C:\Users\Me' cannot be found. I have eslint installed and I can run it just fine on the command line.

Look in parent directories for .eslintrc

As specified in the eslint docs, each configuration file should apply to "an entire directory (other than your home directory) and all of its subdirectories."

My Sublime project directory is the parent directory of multiple repositories, several of which are JavaScript projects. Thus I have several .eslintrc files, eg.

/project-root/subdir-one/.eslintrc # should apply to all /project-root/subdir-one/**
/project-root/subdir-two/.eslintrc # should apply to all /project-root/subdir-two/**

I want each of the .eslintrc files to apply to the files in the appropriate subdirectories as defined by the eslint folks above. However, I can't figure out how to do that with this tool. As I understand, my only option is to set a config_path for an entire project. It seems to me that since eslint has a standard behavior, that should be supported in this tool.

support set eslint options

like:

Settings

{
  // The Nodejs installation path
  "node_path": {
    "windows": "node.exe",
    "linux": "/usr/bin/nodejs",
    "osx": "/usr/local/bin/node"
  },
  "eslint_argv": ["--no-eslintrc"], // eslint options
  "config_path": "~/.eslintrc.js",
}

Because when your project has .eslinrc file and set up config_path, You must set --no-eslintrc.

Multiple configs

Would it be possible to use different config files like ESlint itself is doing? I have separate configs for src and test folders, so using only one config in the root, or specified will not work for me.
It would be nice if the plugin used the same logic as ESLint, looking in current files folders and then move on to parents until one is found.

Invalid or unexpected token

eslint-error

I get this error when trying to format a file. The only non-standard thing about my configuration is that I use the Node version manager.

My ESLint config points to the usual node.exe location:

"eslint_path": {
  "windows": "C:/Program Files/nodejs/node.exe"
}

And I tried multiple Node versions - 8.9.3, 8.9.4, 9.5.0 - it didn't make a difference.

Throws error when i try to run the command

This is on Mac OS Sierra.

Error: /Users/jemarjones/Documents/Projects/example/node_modules/.bin/eslint:2
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
          ^^^^^^^
SyntaxError: missing ) after argument list
    at Object.exports.runInThisContext (vm.js:76:16)
    at Module._compile (module.js:542:28)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.runMain (module.js:604:10)
    at run (bootstrap_node.js:394:7)
    at startup (bootstrap_node.js:149:9)
    at bootstrap_node.js:509:3

support other ESLint Formatters

Hi, i am not sure that my request is meaningful, but can this plugin support other eslint formatters like json, html etc. pp.?

P.S: if it is already possible now, what i have to do for get my html file formatted? Sry for my bad english.
P.S.S: i found its not posible with eslint to format html my bad

Config search regression introduced in 2.3.0

I have a monorepo project (inside project multiple sub-project each with own package.json). ESLint is set up in the project root directory, and not in sub-directories with own package.json. With this change introduced in 2.3.0 ESLint-Formatter looking in the closest package.json, but if there is no ESLint, it won't look into project root, and go straight to globally installed ESLint.

Using node.js path on 'osx': /usr/local/bin/node
Using eslint path on 'osx': /usr/local/bin/eslint
Unexpected error(<class 'Exception'>): Error: module.js:471
    throw err;
    ^

Error: Cannot find module '/usr/local/bin/eslint'
    at Function.Module._resolveFilename (module.js:469:15)
    at Function.Module._load (module.js:417:25)
    at Module.runMain (module.js:604:10)
    at run (bootstrap_node.js:389:7)
    at startup (bootstrap_node.js:149:9)
    at bootstrap_node.js:504:3

error: Error: module.js:471
    throw err;
    ^

Error: Cannot find module '/usr/local/bin/eslint'
    at Function.Module._resolveFilename (module.js:469:15)
    at Function.Module._load (module.js:417:25)
    at Module.runMain (module.js:604:10)
    at run (bootstrap_node.js:389:7)
    at startup (bootstrap_node.js:149:9)
    at bootstrap_node.js:504:3

Vue SFC doesn't format missing commas

Here's the SFC:

s<template>
  <q-page class="">
    <h1>Dev Comms</h1>
    <h2>Registration</h2>
    <q-btn @click="check()" rounded glossy color="purple" label="Check"></q-btn>
    <q-btn @click="add()" rounded glossy color="purple" label="Add"></q-btn>
    <q-btn @click="del()" rounded glossy color="purple" label="Delete"></q-btn>
  </q-page>
</template>
<style></style>
<script>
export default {
  name: "PageIndex",
  methods: {
    check() {
      alert("check");
    },
    check() {
      alert("add");




      
    }
    del() {
      alert("delete")
    },
  }
};
</script>

If I set debug: true then it shows that there's a syntax error with the missing comma:

  33:4  error  Parsing error: Unexpected token, expected ","

  14 |       
  15 |     }
> 16 |     del() {
     |     ^
  17 |       alert("delete")
  18 |     },
  19 |   }

... but it doesn't fix it

Formatting works if I add the missing comma, then it will clean up the extra spaces etc.

Default eslint_path for Windows 10 Pro 64bit on Sublime Text 3 does not seem to work when there is a "whitespace" (aka a "space") inside profile user name.

  // The location of the globally installed eslint package to use as a fallback
  "eslint_path": {
    "windows": "%APPDATA%/npm/node_modules/eslint/bin/eslint",
    "linux": "/usr/bin/eslint",
    "osx": "/usr/local/bin/eslint"
  },

I see the default path settings for eslint_path (when it cannot find a local eslint binary) is "%APPDATA%/npm/node_modules/eslint/bin/eslint".

In the default path, there is my user folder "Thomas Cheng" (notice the space in between). "Thomas Cheng" is also the equivalent environment variable %USERPROFILE%.

When I do the lint, it will return the following error:
image

It captured the path "C:\Users\Thomas", but skipped the rest of the path due to the "whitespace" between Thomas Cheng.

Right now, my only workaround is to hardcode the path instead of using %APPDATA%.

Would appreciate if you could help take a quick look into this issue.

Thank you very much for your kind assistance, and afterall an amazing plugin!! Thanks!

Errors only in console

Is it possible to have errors only in console and not with the annoying popup? There are situations where I know there will be errors but having a popup interrupt my workflow heavily.

Formatting errors when ES6 present

Given a bit of code,

var strings = [
    "double",
    'single',
];

ESLint-Formatter works just fine. However, given a bit of code with ES6 template strings or template literals,

var strings = [
    "double",
    'single',
    `templates`,
];

drops an error in the SublimeText console: "4:5 error Parsing error: Unexpected character '`'"

Furthermore, I am noticing formatting errors with ES6 keywords, specifically let and const.

Local config ignored if project contains multiple projects

My current setup is such that I have a single folder, called Projects, where I have all my JS repos. This is the folder I import into Sublime because I am constantly creating and deleting projects and like to avoid having to manually add projects to the sublime space.

Now each project has its own version of eslint and a .eslintrc file. In an instance of Sublime with one of these projects imported individually, the plugin works well. The problem is that when there is a high level folder containing them, the user settings for the formatter are ignored and it tries to default to the global settings, which fail.

Not sure if this is a bug or intended. If intended, is there a way to override this behavior to allow the formatter to use local settings?

Using a local eslint makes node load a shell script

Running windows 10, sublime text 3, ESLint-Formatter 2.1.1.

I just created an empty project and installed eslint locally. I have auto-format turned on on ESLint-Formatter config.

Seemingly 1 in 5 saves, eslint tries to load from the local eslint, and the other 4 it uses global. I assume this is probably #17 causing it to not always find the local eslint.

Whenever it uses the global eslint, it loads node with %APPDATA%/npm/node_modules/eslint/bin/eslint which is a Javascript file, and works great. However...

Whenever it uses the local eslint, it loads node with node_modules/.bin/eslint which is a shell file, and causes this to pop up as an error message:

Unexpected error(<class 'Exception'>): Error: <project>\node_modules\.bin\eslint:2
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
          ^^^^^^^
SyntaxError: missing ) after argument list
    at Object.exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:513:28)
    at Object.Module._extensions..js (module.js:550:10)
    at Module.load (module.js:458:32)
    at tryModuleLoad (module.js:417:12)
    at Function.Module._load (module.js:409:3)
    at Module.runMain (module.js:575:10)
    at run (node.js:348:7)
    at startup (node.js:140:9)
    at node.js:463:3

I'd suggest looking for node_modules/eslint/bin/eslint for local installations instead.

Programmatically find Node and ESLint directory

Hi, I just tried your plugin and it works great. My only concern is that the directory for Node and ESLint is hardcoded into the settings which makes it inconvenient for nvm users who use a different directory. How about making it dynamic instead? I am asking since I faced the similar issue with plugins that depend on Node before, so I'm using a script which overrides the PATH to fix it. If you don't have time I'm always happy to help with PR.

The eslint-formatter does not format the file

I installed the plugin,and config it ,but when I click the format menu, the file does not changed and the wrong format still exists.
I want to see the wrong format do not appear when I execute the format command.
Will you help me with this problem. Thank you very much!

my config file like this :

{
  // Simply using `node` without specifying a path sometimes doesn't work :(
  // https://github.com/victorporof/Sublime-HTMLPrettify#oh-noez-command-not-found
  // http://nodejs.org/#download
  "node_path": {
    "windows": "D:/Program Files/nodejs/node.exe",
    "linux": "/usr/bin/nodejs",
    "osx": "/usr/local/bin/node"
  },

  // The location to search for a locally installed eslint package.
  // These are all relative paths to a project's directory.
  // If this is not found, it will try to fallback to a global package
  // (see 'eslint_path' below)
  "local_eslint_path": {
    "windows": "node_modules/eslint/bin/eslint.js",
    "linux": "node_modules/.bin/eslint",
    "osx": "node_modules/.bin/eslint"
  },

  // The location of the globally installed eslint package to use as a fallback
  "eslint_path": {
    "windows": "%APPDATA%/npm/node_modules/eslint/bin/eslint",
    "linux": "/usr/bin/eslint",
    "osx": "/usr/local/bin/eslint"
  },

  // Specify this path to an eslint config file to override the default behavior.
  // Passed to eslint as --config. Read more here:
  // http://eslint.org/docs/user-guide/command-line-interface#c---config
  // If an absolute path is provided, it will use as is.
  // Else, it will look for the file in the root of the project directory. 
  // Failing either, it will skip the config file
  "config_path": "",

  // Automatically format when a file is saved.
  "format_on_save": false,

  // Only attempt to format files with whitelisted extensions on save.
  // Leave empty to disable the check
  "format_on_save_extensions": [
    "js",
    "jsx",
    "es",
    "es6",
    "babel"
  ],

  // logs eslint output messages to console when set to true
  "debug": false
}

does not use .eslintrc.js file

I have an .eslintrc.js file in my porject specifying that the airbnb style linter be used. but this is no way to condfigure this plugin to use such files within a project , is there?

Breaks redo stack

Sometimes I'll undo a bunch of code changes and save the file to see how the application looked in a previous state, then redo all the changes to continue working from where I left off. When using "format_on_save": true, this plugin breaks that redo stack.

The same issue occurs with Sublime's trim_trailing_white_space_on_save setting.

I might just need to stop using this undo/redo approach since it is admittedly dangerous even without being broken in the way described in this issue.

local eslint won't work without a sublime-project file

I've got this config for eslint-formatter in settings > user:

{
  // The location to search for a locally installed eslint package.
  // These are all relative paths to a project's directory.
  // If this is not found, it will try to fallback to a global package
  // (see 'eslint_path' below)
  "local_eslint_path": {
    "windows": "node_modules/eslint/bin/eslint.js",
    "linux": "node_modules/.bin/eslint",
    "osx": "node_modules/.bin/eslint"
  }
}

but seems without a sublime-project file as below, format this view won't work, always complained about eslint binary not found.

Just wondering is a sublime-project file necessary to make it work?

{
	"folders":
	[
		{
			"path": "."
		}
	]
}

ESLint output

Currently, I'm using debug: true in the config, and opening sublime's console to see the output, but it's not very practical, I don't think that's the right way to use it

Why doesn't it output errors in the stdout simply (like build commands do), on save?

I don't see any popup, like mentioned in other issues, maybe my OS (ubuntu17.04) and version (ST3 3126) explain the different behavior

Windows: formatting removes the first 3 characters in the file

Whenever I use the formatter (either by using Ctrl+Shift+H or saving with "format_on_save" set to "true") the first three characters in the file get removed. Looking at the console It appears to be happening after "reloading."

Windows 8.1 Enterprise x64
Sublime Text 3, build 3126
ESLint-Formatter v2.2.1

Other Packages Installed...
Package Control v3.2.1
Babel v8.6.3
win_first_3_chars_missing_after_reload

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.