eclint
eclint copied to clipboard
feature_request(fix): remove leading spaces
1. Summary
It would be nice, if eclint fix will remove leading spaces for tabs users.
2. Argumentation
Some tools automatically generate files with leading spaces. eclint fix doesn't fix it and eclint check makes my builds failed.
3. MCVE
.editorconfig— I prefer tabs:
[*]
indent_style = tab
indent_size = 4
KiraECLint.styl— see Comment-Snippets issue for details:
/*
* Kira Stylus comment
*/
KiraECLint.js— beginning of real file, that generate by grunt-modernizr:
/*! modernizr 3.6.0 (Custom Build) | MIT *
* https://modernizr.com/download/?-webp-addtest-fnbind-printshiv-testprop !*/
Leading spaces in KiraECLint.styl and KiraECLint.js.
4. Steps to reproduce
eclint check
eclint fix
eclint check
5. Expected behavior
Remove leading spaces after fix, successful check.
6. Actual behavior
D:\SashaDebugging\Eclint>eclint check
KiraECLint.js
02:01 ❌️ invalid indent style: space, expected: tab
(EditorConfig indent_style https://goo.gl/8Qkrbr)
KiraECLint.styl
02:01 ❌️ invalid indent style: space, expected: tab
(EditorConfig indent_style https://goo.gl/8Qkrbr)
03:01 ❌️ invalid indent style: space, expected: tab
(EditorConfig indent_style https://goo.gl/8Qkrbr)
D:\SashaDebugging\Eclint>eclint fix
D:\SashaDebugging\Eclint>eclint check
KiraECLint.js
02:01 ❌️ invalid indent style: space, expected: tab
(EditorConfig indent_style https://goo.gl/8Qkrbr)
KiraECLint.styl
02:01 ❌️ invalid indent style: space, expected: tab
(EditorConfig indent_style https://goo.gl/8Qkrbr)
03:01 ❌️ invalid indent style: space, expected: tab
(EditorConfig indent_style https://goo.gl/8Qkrbr)
Thanks.
Think you need to set the block_comment option https://github.com/jedmao/eclint#block_comment
https://github.com/jedmao/eclint#support-for-doc-comments
@nschonni, @gucong3000, Status: partially fixed
+ — eclint check doesn't show errors
- — eclint fix doesn't remove leading spaces in comments
Is it possible remove leading spaces? They are not needed.
Thanks.
My comment was about comment blocks (😉 ) that were being flagged in your example. There are 3 editorconfig settings that deal specifically with comment blocks, that are separate from the indent settings.