-
-
Notifications
You must be signed in to change notification settings - Fork 160
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
Optionally allow bullet lists and other indented text in comments when check-indentation
is enabled
#541
Labels
Comments
mcmire
added a commit
to MetaMask/create-release-branch
that referenced
this issue
Jul 8, 2022
* Assume that all JavaScript and TypeScript files are run in a Node context, and allow `process.env` to be accessed and `process.exit()` to be called freely. * Prevent the JSDoc plugin from checking indentation. It's common to want to use a bulleted or numbered list in a JSDoc block and this rule prevents that. There is an issue open in the `eslint-plugin-jsdoc` repo for this but there doesn't seem to be any progress around this yet: <gajus/eslint-plugin-jsdoc#541> * Tweak rules for blank lines. Currently we check that blank lines are inserted in between: * A directive prologue (like `use strict`) and anything else (except another directive prologue) * A multiline block-like statement (e.g. `if`, `while`, IIFEs, etc.) and a multiline expressions (e.g. multiline function calls) * A multiline block-like statement (e.g. `if`, `while`, IIFEs, etc.) and another multiline block-like statement * A multiline expression and a multiline block-like statement * A multiline expression and another multiline expression The issue is that enforcing line breaks in between multiline function or method calls makes organizing big integration tests more difficult. At the same time, multiline `if` statements more often than not involve some kind of complexity that would be unreadable smooshed up against some other code, so this commit also enforces empty line breaks around any kind of such statement.
mcmire
added a commit
to MetaMask/create-release-branch
that referenced
this issue
Jul 12, 2022
* Assume that all JavaScript and TypeScript files are run in a Node context, and allow `process.env` to be accessed and `process.exit()` to be called freely. * Prevent the JSDoc plugin from checking indentation. It's common to want to use a bulleted or numbered list in a JSDoc block and this rule prevents that. There is an issue open in the `eslint-plugin-jsdoc` repo for this but there doesn't seem to be any progress around this yet: <gajus/eslint-plugin-jsdoc#541> * Tweak rules for blank lines. Currently we check that blank lines are inserted in between: * A directive prologue (like `use strict`) and anything else (except another directive prologue) * A multiline block-like statement (e.g. `if`, `while`, IIFEs, etc.) and a multiline expressions (e.g. multiline function calls) * A multiline block-like statement (e.g. `if`, `while`, IIFEs, etc.) and another multiline block-like statement * A multiline expression and a multiline block-like statement * A multiline expression and another multiline expression The issue is that enforcing line breaks in between multiline function or method calls makes organizing big integration tests more difficult. At the same time, multiline `if` statements more often than not involve some kind of complexity that would be unreadable smooshed up against some other code, so this commit also enforces empty line breaks around any kind of such statement.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For example:
Rather than looking for bullet lists explicitly, the option could cause the linter to only check the indentation of the first line (of each 'section'?):
This could also apply to tags with descriptions, instead of having to list them manually:
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: