[][src]Trait rslint_core::Rule

pub trait Rule: Debug + DynClone + Send + Sync {
    fn name(&self) -> &'static str;
fn group(&self) -> &'static str; fn docs(&self) -> &'static str { ... } }

A generic trait which describes things common to a rule regardless on what they run on.

Each rule should have a new function for easy instantiation. We however do not require this for the purposes of allowing more complex rules to instantiate themselves in a different way. However the rules must be easily instantiated because of rule groups.

Required methods

fn name(&self) -> &'static str

A unique, kebab-case name for the rule.

fn group(&self) -> &'static str

The name of the group this rule belongs to.

Loading content...

Provided methods

fn docs(&self) -> &'static str

Optional docs for the rule, an empty string by default

Loading content...

Implementors

impl Rule for ForDirection[src]

impl Rule for GetterReturn[src]

impl Rule for NoAsyncPromiseExecutor[src]

impl Rule for NoAwaitInLoop[src]

impl Rule for NoCompareNegZero[src]

impl Rule for NoCondAssign[src]

impl Rule for NoConfusingArrow[src]

impl Rule for NoConstantCondition[src]

impl Rule for NoDebugger[src]

impl Rule for NoDupeKeys[src]

impl Rule for NoDuplicateCases[src]

impl Rule for NoEmpty[src]

impl Rule for NoExtraBooleanCast[src]

impl Rule for NoExtraSemi[src]

impl Rule for NoInnerDeclarations[src]

impl Rule for NoIrregularWhitespace[src]

impl Rule for NoNewSymbol[src]

impl Rule for NoPrototypeBuiltins[src]

impl Rule for NoSetterReturn[src]

impl Rule for NoSparseArrays[src]

impl Rule for NoUnexpectedMultiline[src]

impl Rule for NoUnsafeFinally[src]

impl Rule for NoUnsafeNegation[src]

impl Rule for UseIsnan[src]

impl Rule for ValidTypeof[src]

Loading content...