Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong line numbers reported for JavaScript in HTML body #2825

Closed
rmzelle opened this issue Jan 5, 2016 · 0 comments · Fixed by chauncey-garrett/dotfiles#15 · May be fixed by ajesse11x/cjdns#1
Closed

Wrong line numbers reported for JavaScript in HTML body #2825

rmzelle opened this issue Jan 5, 2016 · 0 comments · Fixed by chauncey-garrett/dotfiles#15 · May be fixed by ajesse11x/cjdns#1

Comments

@rmzelle
Copy link

rmzelle commented Jan 5, 2016

Using Atom's linter-jshint, I'm getting JSHint errors on the wrong lines for inline JavaScript in the HTML body:

image

HTML source: https://gist.github.com/rmzelle/e5bc6f1a30113f69db9c

This is with Atom 1.3.2, linter 1.11.3, and linter-jshint 1.2.2 (with "Lint Inline Java Script" checked).

The HTML validates according to https://validator.w3.org/ and it looks like embedding JS in the body is indeed allowed: http://stackoverflow.com/a/1362192/1712389

If I move the JS to <head/> I get correct line numbers.

Originally reported to the Atom linter-jshint repo (AtomLinter/linter-jshint#187), who directed me here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant