diff --git a/linter.py b/linter.py index c927bc5..b65c0fc 100644 --- a/linter.py +++ b/linter.py @@ -44,7 +44,11 @@ def find_errors(self, output): logger.error(output) return - content = json.loads(output) + try: + content = json.loads(output) + except ValueError: + logger.error(output) + return if logger.isEnabledFor(logging.INFO): import pprint diff --git a/messages.json b/messages.json index ef56f9e..4f938c0 100644 --- a/messages.json +++ b/messages.json @@ -1,3 +1,4 @@ { - "install": "messages/install.txt" + "install": "messages/install.txt", + "4.0.1": "messages/4.0.1.txt" } diff --git a/messages/4.0.1.txt b/messages/4.0.1.txt new file mode 100644 index 0000000..4435721 --- /dev/null +++ b/messages/4.0.1.txt @@ -0,0 +1,42 @@ +SublimeLinter-eslint 4.0.1 [BREAKING!] +-------------------------------------- + +We switched to the new SL4 selectors. Which are awesome. + +This replaces the old syntax_map as a ways to get this to work with "vue" +or the "eslint-plugin-html", or even with "Javascript (babel, next)" etc. + +By default, this plugin will now *only* select "source.js", +which should work with most vue/babel/next flavors and embedded code. + +It's also configurable. Open your SublimeLinter settings and set it to e.g.: + + "eslint": { + "selector": "source.js, text.html.basic" + } + + +With the `eslint-plugin-html` installed, it will then take the whole file, +not just the scripts tags, and pass it to eslint. +Want it to grab `vue` files? "source.js, text.html.vue" for the win. + + +Other enhancements: + +- We highlight errors that spread over multiple lines on ... multiple lines! + So, if you have an empty "if" block, we highlight the entire block. + +- You can target different node version by setting, e.g.: + "executable": ["nvm", "exec", "8.9", "path/to/eslint"] + "executable": ["i/compiled/this/node", "path/to/eslint"] + +- You can tweak the execution environment by setting, e.g.: + "env": { + "PATH": "/some/additional/path/bin:$PATH" + } + + + + + +