Skip to content
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

Add explanatory comments to ESLint rules in .eslintrc.json #4189

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,19 @@
],
"env": { "node": true },
"rules": {
// Ensures array methods like .map() and .forEach() have return statements
"array-callback-return": [
2,
{
"allowImplicit": true
}
],
// Disallows `if` statements as the only statement in an `else` block
"no-lonely-if": 2,
"no-proto": 2,
"eqeqeq": [2, "smart"],
"no-caller": 2,
// Encourages dot notation instead of brackets for property access
"dot-notation": 2,
"no-var": 2,
"prefer-const": 2,
Expand All @@ -28,10 +31,13 @@
"prefer-template": 2,
"one-var": [2, "never"],
"prefer-destructuring": [2, { "object": true }],
// Ensures comments start with a capital letter
"capitalized-comments": 2,
// Enforces a consistent style for multiline comments
"multiline-comment-style": [2, "starred-block"],
"spaced-comment": 2,
"yoda": [2, "never"],
// Requires curly braces for multi-line control statements
"curly": [2, "multi-line"],

"no-else-return": [
Expand Down