[TxMt] Re: Need Help with Bundle Scope
Ronald Wampler
rdwampler at gmail.com
Tue Mar 5 20:58:46 UTC 2019
On Tue, Mar 5, 2019 at 3:08 PM Ryan Fitzer <ryan at ryanfitzer.com> wrote:
>
> I have a bundle for linting JavaScript and I'm having trouble figuring out how to handle JavaScript embedded in HTML. Currently, I'm expecting that the `source.js` refers to a full file. This creates an issue since `source.js` is also part of the scope when JavaScript is embedded in HTML, causing my bundle to lint a full HTML document. Is there a way to configure the bundle to ignore embedded JavaScript, or to dynamically switch to linting only the embedded JavaScript?
>
To ignore embedded JavaScript in HTML try changing the scope selector to
'source.js - text.html’. This shouldn't match the scope source.js
when its parent
scope is 'text.html'. Have you look into eslint-plugin-html
(https://github.com/BenoitZugmeyer/eslint-plugin-html) to handle linting
embedded JavaScript?
-Ron
> This the bundle: https://github.com/ryanfitzer/eslint.tmbundle
>
> _______________________________________________
> textmate mailing list
> textmate at lists.macromates.com
> https://lists.macromates.com/listinfo/textmate
More information about the textmate
mailing list