Skip to content
This repository was archived by the owner on Sep 6, 2021. It is now read-only.
This repository was archived by the owner on Sep 6, 2021. It is now read-only.

jslint version is out of date #8842

Closed
Closed

Description

@markmcintyre

The version of jslint bundled in the default extensions is out of date (id 2347ec4, last updated 2011-12-21), and doesn't report on several types of programming errors. This should be updated to the latest version.

Activity

  1. self-assigned this
    on Aug 25, 2014
  2. ingorichter commented on Aug 26, 2014

    @ingorichter
    Contributor

    Dropping in the latest master causes a lot of warnings in the Brackets source. I think we should fix them, since they are low hanging fruits (especially the formatting and unused variables statements).

  3. marcelgerber commented on Aug 26, 2014

    @marcelgerber
    Contributor

    The new JSLint version introduces some linting errors that'd change our code style, for example unnecessary else after disruption.
    I'd like to fix those, but I don't know whether we actually want to change the code (maybe accompanied with Coding Conventions changes) or just use a linting flag.
    Another thing are the define(function (require, exports, module) { lines, where module isn't used very much, but these lines are consistent in the whole project. JSLint wants to disrupt them (unused variable).

  4. lkcampbell commented on Aug 27, 2014

    @lkcampbell
    Contributor

    +1 for being able to find unused variables.

  5. ingorichter commented on Aug 28, 2014

    @ingorichter
    Contributor

    I would be more than happy to make adjustments to the coding style and get these fixed. I'm going to create an overall report and ask the core team/committer about their opinions.
    And yes @lkcampbell, me +1 too.

  6. TomMalbran commented on Aug 28, 2014

    @TomMalbran
    Contributor

    This is almost a dupe of #4462. I made a PR long time ago to update JSLint: #4557. But is totally out of date now. It was closed since the team wanted to switch to JSHint as the default linter for Brackets. When that is done (Brackets provides a default JSHint extension), the JSLint extension could be updated without issues in the Brackets codebase.

  7. redmunds commented on Aug 31, 2014

    @redmunds
    Contributor

    We're considering making this update for the Promises Upgrade feature (trello/waffle), so I started a randy/jslint-update branch.

  8. redmunds commented on Aug 31, 2014

    @redmunds
    Contributor

    @marcelgerber

    The new JSLint version introduces some linting errors that'd change our code style,
    for example unnecessary else after disruption. I'd like to fix those, but I don't know
    whether we actually want to change the code (maybe accompanied with Coding
    Conventions changes) or just use a linting flag.

    That can't be fixed with a flag, so we'd have to fix the code (which I think is a good idea). The fix is simple and there doesn't seem to be too many instances of it. Since JSLint will be flagging it as an error, then we probably don't need to mention it in Coding Conventions as a reminder :)

  9. dangoor commented on Sep 3, 2014

    @dangoor
    Contributor

    Our current plan is to use JSHint and we'd welcome any help in that direction.

  10. markmcintyre commented on Sep 3, 2014

    @markmcintyre
    Author

    Hold up here. This issue is about upgrading the JSLint dependency in Brackets independent of any coding standards used in the Brackets codebase. There are projects other than Brackets that uses Brackets, after all.

    Is the suggestion here that all projects using Brackets must use the old version of JSLint because the Brackets team isn't yet ready to transition their own code to JSHint?

  11. TomMalbran commented on Sep 3, 2014

    @TomMalbran
    Contributor

    @markmcintyre Even if that might be the case, there is no reason to not create a new JSLint extension with the newest version and start using it instead of the default one. I am not sure why none tried that yet.

  12. markmcintyre commented on Sep 3, 2014

    @markmcintyre
    Author

    Ah, I understand. Thanks, @TomMalbran.
    Since no one else has tried it yet, I'm tempted to give it a go myself.

  13. markmcintyre commented on Sep 4, 2014

    @markmcintyre
    Author

    I've created a new JSLint extension that adds support for the latest version of JSLint (2014-07-08 as of this writing). For any existing or future followers of this issue, the extension is available here, as well as in the Brackets Extension Registry under the name "JSLint."

  14. TomMalbran commented on Sep 4, 2014

    @TomMalbran
    Contributor

    @markmcintyre Nice. I just downloaded it and tried. It works nice. What do you think about hacking it a bit so that it does not display errors on lines with only spaces? JSLint in Brackets works like that, so you could copy the code.

    I know it would be better if the default JSLint extension was upto date and this wasn't required. But one awesome thing about Brackets is how easy it is to extend it. And since the core team working full time on Brackets is small, this is awesome as it lets the community add some functionality before it gets implemented in the core code, and sometimes that code can then become part of the core.

  15. Mark-Simulacrum commented on Sep 4, 2014

    @Mark-Simulacrum
    Contributor

    I've opened a pull request on the repository for the JSLint extension with the changes to ignore lines with only spaces or tabs. Hope it helps streamline the addition of that feature into the updated JSLint extension. (Hope it's alright that I copied the code from Brackets, not sure how that works with the Brackets copyright/licensing.).

  16. TomMalbran commented on Sep 4, 2014

    @TomMalbran
    Contributor

    Great. Thanks. Brackets is licensed as MIT, so I think that you can do almost anything with the code.

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions