Closed silverwind closed 7 years ago
/**
* block
* comment
*/
We only support C-style documentation comments.
These extra *
are purely stylistic and should be ignored when linting, they are not mandatory in C either.
Whould you like to try this PR #87 and do some test?
You can install from npm i jedmao/eclint#non_doc_block_comments
@silverwind The new release destroys some pipeline of projects. I plan to not support for this format in eclint.fix()
, just support it in eclint.check()
.
There is format that we support for fix:
/*
if(true) {
//
}
*/
// #if _DEBUG
const data = {
key: 'value'
};
/* #else
const data = {
key: 'value'
};
// #endif */
/*
* module name
*/
If you have any way to compatible all of these formats, please submit PRs
Why not keep it simple and ignore indentation in block comments completely (both in fix
and check
)? You can't really guess what kind of comment style a user uses, unless EditorConfig has an option for it.
As far as I know, eclint
is the only linter that supports comments. lintspaces is compatible with .editorconfig
, and it have a option to ignore indentation in comments.
Does users need two tools with same features?
Why not keep it simple and ignore indentation in block comments.
Because this feature (comment supports) worked well in each project I was involved in. And I need it.
/*
* block
* comment
*/
Do you hate this comment style? It is support by many IDE and editor.
It might be a good idea to add/parse an option in .editorconfig
for block comment indentation style.
And no, I don't hate your style, but I see it as extra typing work that can be avoided. ;)
It might be a good idea to add/parse an option
What is this options look like?
I guess it could use names for the styles, like indent_brace_style
does, but in the simple case, a value of aligned
for your style, and any other value for ignoring indentation would be fine I guess.
You could add support for more styles later. The option could be called block_comment_indent_style
.
we should open a new issue for editorconfig/editorconfig
I think stylelint is mach better than eclint for CSS file
Yeah, I actually use both :)
For example, block comments in CSS:
This fails to pass with these options:
Another issue with above block is that it fails the
indent_size
rule when it is set to 2 or 4, while I think it should be accepted. I'd suggest to disableindent_size
checks inside block comments.