Skip to content
This repository has been archived by the owner on Aug 7, 2023. It is now read-only.

Invalid position given by 'W040' #484

Open
Sloth-Lee opened this issue Aug 20, 2017 · 2 comments
Open

Invalid position given by 'W040' #484

Sloth-Lee opened this issue Aug 20, 2017 · 2 comments
Labels

Comments

@Sloth-Lee
Copy link

JSHint returned a point that did not exist in the document being edited.
Rule: W040
Requested point: 6833:15

Debug information:

Atom version: 1.19.2
linter-jshint version: v3.1.5
JSHint version: jshint v2.9.5
Hours since last Atom restart: 0.1
Platform: win32
Current file's scopes: [
  "source.js",
  "comment.block.js",
  "punctuation.definition.comment.js"
]
linter-jshint configuration: {
  "executablePath": "",
  "lintInlineJavaScript": false,
  "disableWhenNoJshintrcFileInPath": false,
  "scopes": [
    "source.js",
    "source.js-semantic"
  ],
  "jshintFileName": ".jshintrc",
  "jshintignoreFilename": ".jshintignore"
}
@Arcanemagus
Copy link
Member

Since you didn't provide any example code to verify this with, I'm going to assume that your code is indented using tabs and that this is another case of jshint/jshint#3151.

If anyone is directed to this issue that isn't using tabs to indent their code please provide an example bit of code to reproduce this with so we can get a detailed issue filed on the JSHint project so they can fix this there!

@Arcanemagus
Copy link
Member

There are reports that if you set your indent property of your JSHint configuration to 1 this issue can be worked around. If you don't have a .jshintrc file the following should work:

{
  "indent": 1
}

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants