73rhodes / Sublime-JSLint

JSLint for Sublime Text 2 and 3.
80 stars 14 forks source link

Feature request: Lint only js source scopes #7

Open pwntester opened 11 years ago

pwntester commented 11 years ago

Hi, Would it be possible to lint only the js scopes instead of the whole document? Think about HTML pages with blocks or like my case, a XML file where some js can be included. Thanks, A

darrenderidder commented 11 years ago

This functionality comes from jslint itself. It already supports HTML files, but not XML files. To request XML support you would need to request it from the author of jslint (https://github.com/douglascrockford/JSLint).

pwntester commented 11 years ago

Hi, thanks for the quick response. I meant to use the API function: "view.find_by_selector('source.js')" that can be used to find all specific regions containing a given language code (in this case, js) and then pass all those Regions tos jsLint for further analysis. So any new syntax that xim different scopes, still can get the benefits from jslint through your great plugin!

darrenderidder commented 11 years ago

Sounds interesting... let me check it out.

On Thu, Jan 24, 2013 at 11:14 AM, Alvaro notifications@github.com wrote:

Hi, thanks for the quick response. I meant to use the API function: "view.find_by_selector('source.js')" that can be used to find all specific regions containing a given language code (in this case, js) and then pass all those Regions tos jsLint for further analysis. So any new syntax that xim different scopes, still can get the benefits from jslint through your great plugin!

— Reply to this email directly or view it on GitHubhttps://github.com/darrenderidder/Sublime-JSLint/issues/7#issuecomment-12658628.