Skip to content

Commit

Permalink
fix(linter): align reportUnusedDisableDirectives default value (#13284)
Browse files Browse the repository at this point in the history
Co-authored-by: pfernandes <[email protected]>
(cherry picked from commit 2772fab)
  • Loading branch information
palexandrefernandes authored and FrozenPandaz committed Nov 28, 2022
1 parent 8d56b1b commit fb2e47c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
1 change: 0 additions & 1 deletion docs/generated/packages/linter.json
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,6 @@
},
"reportUnusedDisableDirectives": {
"type": "string",
"default": "off",
"enum": ["off", "warn", "error"],
"description": "The equivalent of the `--report-unused-disable-directives` flag on the ESLint CLI."
}
Expand Down
1 change: 0 additions & 1 deletion packages/linter/src/executors/eslint/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@
},
"reportUnusedDisableDirectives": {
"type": "string",
"default": "off",
"enum": ["off", "warn", "error"],
"description": "The equivalent of the `--report-unused-disable-directives` flag on the ESLint CLI."
}
Expand Down
10 changes: 10 additions & 0 deletions packages/linter/src/executors/eslint/utility/eslint-utils.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,5 +156,15 @@ describe('eslint-utils', () => {
useEslintrc: true,
});
});

it('should create a ESLint instance with no "reportUnusedDisableDirectives" if it is undefined', async () => {
await lint(undefined, {});

expect(ESLint).toHaveBeenCalledWith(
expect.objectContaining({
reportUnusedDisableDirectives: undefined,
})
);
});
});
});

0 comments on commit fb2e47c

Please sign in to comment.