1

I just started using Atom. I installed linter-jshint and jshint

After setting the jshint executable path. I had jshint working on JavaScript files. However, after several hours I still cannot get it to work with JavaScript in HTML files. I looked in package.json and the docs but did not find something that works.

I saw that there is a flag --extract=[auto|always|never]. But I am not sure how to use it in Atom.

3 Answers 3

2

linter-jshint package has a lintInlineJavaScript configuration that you can enable to make it lint html files.

You can find more about its configuration in its GitHub README.

Sign up to request clarification or add additional context in comments.

Comments

0

As suggested add the lintInlineJavaScript jshint setting to Atom config.cson

"linter-jshint": executablePath: "~/.atom/packages/atom-jshint" lintInlineJavaScript: true disableWhenNoJshintrcFileInPath: false

(^ so it now should now lint <script> inside *.html file but something is wrong as I can only get it to work with *.js files)

1 Comment

did you get it working on html files? I scouted all forums I could, applied all I read, but can't make it run on html files. JS files are ok though.
0

You can get inline linting to work by adding the following to the scopes (in the settings window inside Atom for Linter Jshint): source.js.embedded.html.

You also need to have the option "Lint Inline Java Script" switched on.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.