8000 docs(linter): improve no-plusplus docs (#10885) · oxc-project/oxc@ccda8f0 · GitHub
[go: up one dir, main page]

Skip to content

Commit ccda8f0

Browse files
docs(linter): improve no-plusplus docs (#10885)
1 parent 539eb9d commit ccda8f0

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

crates/oxc_linter/src/rules/eslint/no_plusplus.rs

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ pub struct NoPlusplus {
3131
declare_oxc_lint!(
3232
/// ### What it does
3333
///
34-
/// Disallow the unary operators `++`` and `--`.
34+
/// Disallow the unary operators `++` and `--`.
3535
///
3636
/// ### Why is this bad?
3737
///
@@ -75,6 +75,21 @@ declare_oxc_lint!(
7575
/// for (let i = 0; i < l; i += 1) {
7676
/// doSomething(i);
7777
/// }
78+
///
79+
/// ### Options
80+
///
81+
/// #### allowForLoopAfterthoughts
82+
///
83+
/// `{ type: boolean, default: false }`
84+
///
85+
/// Pass `"allowForLoopAfterthoughts": true` to allow `++` and `--` in for loop afterthoughts.
86+
///
87+
/// Example:
88+
/// ```json
89+
/// "no-plusplus": [
90+
/// "error",
91+
/// { "allowForLoopAfterthoughts": true }
92+
/// ]
7893
/// ```
7994
NoPlusplus,
8095
eslint,

0 commit comments

Comments
 (0)
0