Closed the-t-in-rtf closed 3 years ago
It seems like lintspaces
cannot be configured more finely than opting JS comments out of their checks altogether.
In my testing, there are side effects that we should be aware of. Indentation errors will now only be reported for the first line of a multi-line comment. So, things like these examples would be allowed:
/*
* A little slanted.
*/
/*
* A lot slanted.
*/
/*
* Oops, forgot a space.
*/
/*
* Oops, cat slept on the spacebar while I was out.
*/
I was hoping ESLint would catch these for us, but it seems pretty agnostic about comment indentation, and accepts each of those as well. I'll see if I can find another library or ESLint plugin that does a better job.
There's a new ESLint rule to enforce a single comment style, and it has indentation checks. Sadly, it only allows you to use a single style, so it seems more appropriate to have people opt into that downstream, as I know we have a mix of "block" and "starred" commenters in the community.
Ignore JS comments in
lintspaces.newlines
checks. See #26 for context.