Skip to content

Commit ccb8fe8

Browse files
authored
feat(linter/jsdoc): implement no-blank-blocks rule (#25207)
this PR implements `jsdoc/no-blank-blocks` rule, issue #1170
1 parent 648a481 commit ccb8fe8

8 files changed

Lines changed: 405 additions & 1 deletion

File tree

apps/oxlint/src-js/package/config.generated.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1035,6 +1035,7 @@ export interface DummyRuleMap {
10351035
"jsdoc/check-tag-names"?: RuleNoConfig | [AllowWarnDeny, CheckTagNamesConfig];
10361036
"jsdoc/empty-tags"?: RuleNoConfig | [AllowWarnDeny, EmptyTagsConfig];
10371037
"jsdoc/implements-on-classes"?: RuleNoConfig;
1038+
"jsdoc/no-blank-blocks"?: RuleNoConfig | [AllowWarnDeny, NoBlankBlocks];
10381039
"jsdoc/no-defaults"?: RuleNoConfig | [AllowWarnDeny, NoDefaultsConfig];
10391040
"jsdoc/require-param"?: RuleNoConfig | [AllowWarnDeny, RequireParamConfig];
10401041
"jsdoc/require-param-description"?: RuleNoConfig | [AllowWarnDeny, RequireParamDescriptionConfig];
@@ -2575,6 +2576,12 @@ export interface EmptyTagsConfig {
25752576
*/
25762577
tags?: string[];
25772578
}
2579+
export interface NoBlankBlocks {
2580+
/**
2581+
* Whether to automatically remove blank JSDoc blocks.
2582+
*/
2583+
enableFixer?: boolean;
2584+
}
25782585
export interface NoDefaultsConfig {
25792586
/**
25802587
* If true, report the presence of optional param names (square brackets) on `@param` tags.

crates/oxc_linter/src/generated/rule_runner_impls.rs

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/oxc_linter/src/generated/rules_enum.rs

Lines changed: 27 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/oxc_linter/src/rules.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -729,6 +729,7 @@ pub(crate) mod jsdoc {
729729
pub mod check_tag_names;
730730
pub mod empty_tags;
731731
pub mod implements_on_classes;
732+
pub mod no_blank_blocks;
732733
pub mod no_defaults;
733734
pub mod require_param;
734735
pub mod require_param_description;

0 commit comments

Comments
 (0)