Skip to content

[jshint] the plugin try to validate html files #345

Open

Description

@jabby

I don't understand why but on my angular-phonecat fork, tern.java try to validate all html files in the project.

Have you an idea how to disable this behaviour ?

Activity

  1. angelozerr commented on Oct 7, 2015

    @angelozerr
    Owner

    As you can have JS in your HTML, validation is done to HTML.

    Have you an idea how to disable this behaviour ?

    You could use JSDT Include Path to exclude path, but I think validation will be done inside HTML when you are typing.

    What is your suggestion to disable HTML validation for JS, a preferences option?

  2. jabby commented on Oct 7, 2015

    @jabby
    Author

    In fact I didn't realise that I can put JS in html file :)

    An option to disable analyze of html file would be great for me.

  3. angelozerr commented on Oct 7, 2015

    @angelozerr
    Owner

    An option to disable analyze of html file would be great for me.

    Just for validation? Or for both validation and completion?

  4. jabby commented on Oct 7, 2015

    @jabby
    Author

    I think it will be more consistent if the option disable validation and completion.

    If I want to write JS in html file, I need completion. So if I enable the validation, tern should also validate the JS in html file.

    is there an option to enable / disable autocomplete in html file ?

  5. angelozerr commented on Oct 7, 2015

    @angelozerr
    Owner

    If I want to write JS in html file, I need completion. So if I enable the validation, tern should also validate the JS in html file.

    Yes you are right.

    is there an option to enable / disable autocomplete in html file ?

    No. I know that MyEclipse has done something for Tern Performance vs Quality https://www.genuitec.com/forums/topic/troubleshooting-performance-issues-in-myeclipse-2015/ I must think about more to implement your idea.

  6. jabby commented on Oct 8, 2015

    @jabby
    Author

    I found a workaround for my problem. On my project I modify the tern Validation configuration.

    I remove all references for jsp, html, htm and php file. Now, jshint validate only js files.

  7. angelozerr commented on Dec 11, 2015

    @angelozerr
    Owner

    @jabby is .jshintignore could help you?

    A PR was created at #377

  8. jabby commented on Dec 11, 2015

    @jabby
    Author

    @angelozerr I think it could help and it will be a great improvement. With this, I will disable validation on my generated JS files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions