File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed
crates/oxc_linter/src/rules/eslint Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ pub struct NoPlusplus {
3131declare_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,
You can’t perform that action at this time.
0 commit comments