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 errors on todo can't be ignored using /*jslint todo: true */Β #4462

Closed

Description

@csantanapr

I have js code that have comments with 'TODO'

jslint should complain about this.

When I run latest version of jslint from command line in my toolchain I need to add the following jslint directive

/*jslint todo:true */

On Brackets Sprint 27, with no extensions installs just default download
running on Mac OSX 10.8

Brackets give erros about the jslint directive which I think is valid

Here are some resources I found:
http://jslinterrors.com/unexpected-todo-comment/
http://www.jslint.com/lint.html

Maybe is the version of jslint is old or brakcets is running jslint without default options
https://github.com/douglascrockford/JSLint/blob/master/jslint.js

nls_app_strings js__brackets

Activity

  1. busykai commented on Jul 15, 2013

    @busykai
    Contributor

    You're right: the version of JSLint Brackets uses is dated beginning 2012, it does not yet support todos. With current version you can freely use TODO: in your code and the lint won't complain.

    I believe the error you're seeing is related due to inability of JSLint to understand the todo option.

    Perhaps, it makes sense to update the JSLint to a newer version.

  2. csantanapr commented on Jul 15, 2013

    @csantanapr
    Author

    @busykai I was thinking that was the case, I just wanted to know if there was known reason that updating to the latest version of jslint in Brackets will be a problem.

  3. added a commit that references this issue on Jul 16, 2013
    1021ca1
  4. dangoor commented on Jul 22, 2013

    @dangoor
    Contributor

    Thanks for reporting this. Our fix for this is going to be to switch to JSHint and ideally make the linter configurable. See the card in trello:

    https://trello.com/c/SQhvGHri/498-3-jshint-support

  5. dangoor commented on Jul 23, 2013

    @dangoor
    Contributor

    Reopening. @TomMalbran said (in #4467) that he's part way through doing the JSLint upgrade and it sounds like the cleanup in general will be beneficial.

  6. ghost assigned on Jul 23, 2013
  7. csantanapr commented on Jul 23, 2013

    @csantanapr
    Author

    @dangoor Thanks Kevin I was a bit confuse seeing the bug close with no comments on which build was fix with new version of JSLint.
    Thanks for reopening

  8. hacker112 commented on Apr 3, 2014

    @hacker112

    I made a workaround on Mac OS X by replacing JSLint in Brackets with a newer version.

    Steps:

    1. Download JSLint from https://github.com/douglascrockford/JSLint
    2. Quit Brackets if it is running.
    3. Assuming that Brackets is installed in the Applications folder, replace the files in /Applications/Brackets.app/Contents/www/extensions/default/JSLint/thirdparty/jslint with files from the git repository. You can access the contents Brackets.app by right clicking it in Finder and choose " Show Package Contents".
    4. Start Brackets
  9. njx commented on Apr 3, 2014

    @njx

    I nominated #4557, an old PR that we never merged to update jslint to a more recent version, so that we'll look at it sooner rather than later.

  10. peterflynn commented on Sep 4, 2014

    @peterflynn
    Member

    Closing per @dangoor's comment in #8842 (comment) -- this is basically the same issue, and similarly is tracked by our backlog item for switching to JSHint as the default packaged linter. Thanks to @markmcintyre there's now a JSLint extension available in the registry that has the latest version of JSLint, so there's also a workaround for this available now.

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