-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
no-multi-spaces
conflicts with smart-tabs
#2077
Comments
What version of ESLint are you using? I don't see any errors with this code. In the future, please also include the errors you're seeing on the console when reporting an issue. It really helps us triage. |
0.17.0
code:
(3 tabs, and then 4 spaces to align variable names)
|
Ah okay, GitHub was converting those to spaces. Yeah, we can probably just ignore spaces that are in indent position. |
Came here to open the same issue. 👍 |
@nzakas @ilyavolodin Based on the discussion, I think a decision has been made but the labels are not yet updated. |
Yup, thanks! |
+1 |
1 similar comment
+1 |
@message @tape88 thanks for commenting. This issue is marked as "accepted", so it's just waiting for someone to volunteer to work on it. |
Have the same issue. Anyone working on it yet? |
@satya164 It's all yours if you want it. Looks like some tweaking is needed in: https://github.com/eslint/eslint/blob/master/lib/rules/no-multi-spaces.js#L73 |
@IanVS I can work on it, can you point me to documentation for writing rules? |
Yep, rule development docs are at: http://eslint.org/docs/developer-guide/working-with-rules I would suggest to create a test case first which fails, and then update the regex I linked to so that the test passes. Feel free to hop in the Gitter room if you need more guidance. |
@satya164, do you still plan to work on this? I verified it is still an issue in |
+1 :) (Still an issue in 1.9.0) Btw, although somewhat a different discussion, when using smart-tabs, I also have to set [edit] It could make sense / clear things up to house all this under the |
@oh-ren please open a separate issue for that discussion. |
@nzakas Will do, was already thinking about that myself as well. |
I've taken a stab at this, let me know if you have any comments / suggestions. |
Fix: no-multi-spaces conflicts with smart tabs (fixes #2077)
If I have
"no-mixed-spaces-and-tabs":[2, "smart-tabs"]
, thenno-multi-spaces
should not throw an error/warning for lines that use smart-tabs.test case, try with the following code:
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
The text was updated successfully, but these errors were encountered: