Coder Social home page Coder Social logo

Comments (16)

silverwind avatar silverwind commented on June 9, 2024 1

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.

from eclint.

silverwind avatar silverwind commented on June 9, 2024 1

It might be a good idea to add/parse an option in .editorconfig for block comment indentation style.

from eclint.

gucong3000 avatar gucong3000 commented on June 9, 2024
/**
 * block
 * comment
 */

We only support C-style documentation comments.

from eclint.

silverwind avatar silverwind commented on June 9, 2024

These extra * are purely stylistic and should be ignored when linting, they are not mandatory in C either.

from eclint.

gucong3000 avatar gucong3000 commented on June 9, 2024

Whould you like to try this PR #87 and do some test?
You can install from npm i jedmao/eclint#non_doc_block_comments

from eclint.

gucong3000 avatar gucong3000 commented on June 9, 2024

@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().

#96

from eclint.

gucong3000 avatar gucong3000 commented on June 9, 2024

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

from eclint.

gucong3000 avatar gucong3000 commented on June 9, 2024

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?

from eclint.

gucong3000 avatar gucong3000 commented on June 9, 2024

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.

from eclint.

gucong3000 avatar gucong3000 commented on June 9, 2024
/*
 * block
 * comment
 */

Do you hate this comment style? It is support by many IDE and editor.

from eclint.

silverwind avatar silverwind commented on June 9, 2024

And no, I don't hate your style, but I see it as extra typing work that can be avoided. ;)

from eclint.

gucong3000 avatar gucong3000 commented on June 9, 2024

It might be a good idea to add/parse an option

What is this options look like?

from eclint.

silverwind avatar silverwind commented on June 9, 2024

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.

from eclint.

gucong3000 avatar gucong3000 commented on June 9, 2024

we should open a new issue for editorconfig/editorconfig

from eclint.

gucong3000 avatar gucong3000 commented on June 9, 2024

I think stylelint is mach better than eclint for CSS file

from eclint.

silverwind avatar silverwind commented on June 9, 2024

Yeah, I actually use both :)

from eclint.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.