Comments (10)
Nice catch @postcasio !
from linter.
@park9140 Do you have time to look into this issue? Or I can do it :)
from linter.
@postcasio, @iam4x, this is a bug in the jshint linter implementation and or in jshint itself. Unlike other editors that report tabs as single character in width jshint consistantly seems to report that a tab is in fact 4 characters. This shifts the reported positions. After a bit of investigation I can't seem to find a way to prevent jshint from doing this.
It is going to be decently complicated to adjust the positioning properly in the jshint linter. I have reported the issue to jshint, jshint/jshint#1714
from linter.
Spoke to soon. Found a work around. In your .jshintrc set indent: 1
. This will cause jshint to assume that your tab width is 1 and then report the columns correctly.
from linter.
Reading further it looks like version 2.5 change log calls this out explicitly as the new functionality.
https://github.com/jshint/jshint/releases/tag/2.5.0
So... we should probably just write this off as the known fix when you are using tabs and not spaces.
That release basically makes jshint useless to me in daily usage. We should get a javascript style linter built to restore the style linting they just gutted out of jshint.
from linter.
from linter.
Thanks for your help @park9140, adding indent: 1 works great.
from linter.
@park9140 Nice finds! I use jscs
as code style linter for JavaScript.
from linter.
Seems like there really isn't anything we can do about this with the current state of jshint. I'm going to close this.
Workaround is to just add 'indent: 1' to your jshint rules.
If anyone determines this doesn't work or they add a method to set this configuration from command line re-open and we can work from there.
from linter.
Can anyone add this note about indent: 1
to the documentation? I had to dig through the issues to find this info.
from linter.
Related Issues (20)
- Replacement position does not change when replacement is applied further left
- release span HOT 13
- Atom Linter "highlight error lines in gutter" not showing in settings
- Unable to install 3.3 version of linter on windows
- Feature request: explicitly tell user that by default linter lints on save HOT 1
- linter-csslint:: Error while running CSSLint! HOT 1
- JS private fields error HOT 1
- AtomLinter is showing incorrect errors
- Linter is not honoring "Lint on Change" and "Lint on Change Interval" settings HOT 1
- disabled providers list not respected HOT 7
- Linter is not working HOT 7
- I HATE LINTER!!! NOW I CAN DELETE THIS IN ATOM OR DISABLED??? HOT 3
- Linter dropdown not functioning on some OS X platforms
- Linter timeout using ShellCheck
- Failed to install linter dependencies
- Beep sound on error
- Uncaught ReferenceError: 耽a is not defined
- Getting "Inavlid Point" Error with every linter plugin I try.
- Errors not showing on mac HOT 1
- Problem with Axios >=1.0
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from linter.