atom-linter-xo icon indicating copy to clipboard operation
atom-linter-xo copied to clipboard

Linting in HTML documents does not work

Open sonicdoe opened this issue 6 years ago • 3 comments

Screenshot

XO seems to try to lint the whole HTML document instead of just the JavaScript code within the <script> tags.

sonicdoe avatar Jul 27 '18 14:07 sonicdoe

Probably because of https://github.com/xojs/atom-linter-xo/blob/1797d384b88f57b5147a1b58c082cc0d98be14a5/index.js#L12 I had assumed it would just get the text inside the script block then.

sindresorhus avatar Jul 27 '18 14:07 sindresorhus

Exactly 👍 For example, linter-js-standard (which I’m a maintainer of) finds the code using regular expressions. Although, eventually I’d like to move to eslint-plugin-html which is also used by linter-eslint.

sonicdoe avatar Jul 27 '18 15:07 sonicdoe

I've removed the HTML scope. We should indeed use eslint-plugin-html instead.

sindresorhus avatar Jan 25 '19 13:01 sindresorhus

Closing as Atom is abandoned.

sindresorhus avatar Jun 20 '23 23:06 sindresorhus