spaced-line-comment fails sometimes with shebang
See original GitHub issueIn the following example, I get Expected space or tab after // in comment at 1:0
:
{
"rules": {
"spaced-line-comment": [2, "always"]
}
}
#!/usr/bin/env node
''
// Foo
''
I do not know if my test are relevant but the error disappears if:
- I delete any of the 3 following lines
- the second line is not a literal
- the third line is not a comment
<bountysource-plugin>
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource. </bountysource-plugin>
Issue Analytics
- State:
- Created 8 years ago
- Comments:10 (10 by maintainers)
Top Results From Across the Web
The Strange Case of the Malformed Shebang - Natan Yellin
Here is a common error you might encounter on Linux: you download a Python script from the internet and try to run it....
Read more >shebang not working for python script - Stack Overflow
created one file executeme.py #!/usr/bin/env python print("hello"). make it as executable (optional) chmod a+x executeme.py. reanme the file
Read more >Shebang length exceeded in pip executable #1773 - GitHub
When the shebang length limit is exceeded, pip fails with the error: "bad interpreter: No such file or directory". The maximum length for...
Read more >Chicken-egg problem with the shebang line [duplicate]
But it seems there's some logic issue here: If the shell script is not executed, it cannot be known which interpreter to use....
Read more >The case of the supersized shebang - LWN.net
Several failures had to align perfectly for this to happen: This is very often the case. A functioning quality control system has multiple...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I can take a look at this - feel pretty comfortable with the way we add comments in Espree now 😃
Nice. Closing as it looks like it’s fixed now.