pub trait LintRule: Debug + Send + Sync {
// Required methods
fn lint_program_with_ast_view<'view>(
&self,
context: &mut Context<'view>,
program: Program<'view>
);
fn code(&self) -> &'static str;
// Provided methods
fn tags(&self) -> &'static [&'static str] { ... }
fn priority(&self) -> u32 { ... }
}
Required Methods§
sourcefn lint_program_with_ast_view<'view>(
&self,
context: &mut Context<'view>,
program: Program<'view>
)
fn lint_program_with_ast_view<'view>( &self, context: &mut Context<'view>, program: Program<'view> )
Executes lint using dprint-swc-ecma-ast-view
.
Falls back to the lint_program
method if not implemented.
Provided Methods§
Returns the tags this rule belongs to, e.g. recommended