Skip to content

LLM Resources

@dovenv/lint - API documentation ​

Classes ​

CommitLint ​

Extends ​

  • LintSuper<CommitlintConfig>

Constructors ​

new CommitLint() ​
ts
new CommitLint(opts: undefined | CommitlintConfig, utils: CommandSuper): CommitLint
Parameters ​
ParameterType
optsundefined | CommitlintConfig
utilsCommandSuper
Returns ​

CommitLint

Inherited from ​

LintSuper<CommitlintConfig>.constructor

Methods ​

run() ​
ts
run(userMsg?: string): Promise<undefined | void>
Parameters ​
ParameterType
userMsg?string
Returns ​

Promise<undefined | void>

Properties ​

PropertyModifierTypeInherited from
optspublicundefined | CommitlintConfigLintSuper.opts
utilspublicCommandSuperLintSuper.utils

Eslint ​

Extends ​

  • LintSuper<EslintConfig>

Constructors ​

new Eslint() ​
ts
new Eslint(opts: undefined | EslintConfig, utils: CommandSuper): Eslint
Parameters ​
ParameterType
optsundefined | EslintConfig
utilsCommandSuper
Returns ​

Eslint

Inherited from ​

LintSuper<EslintConfig>.constructor

Methods ​

run() ​
ts
run(flags?: string[]): Promise<undefined | void>
Parameters ​
ParameterType
flags?string[]
Returns ​

Promise<undefined | void>

Properties ​

PropertyModifierTypeInherited from
optspublicundefined | EslintConfigLintSuper.opts
utilspublicCommandSuperLintSuper.utils

Lint ​

Lint class with all lint functions.

Extends ​

Constructors ​

new Lint() ​
ts
new Lint(opts: undefined | Config, utils: CommandSuper): Lint
Parameters ​
ParameterType
optsundefined | Config
utilsCommandSuper
Returns ​

Lint

Inherited from ​

LintSuper<Config>.constructor

Methods ​

commitlint() ​
ts
commitlint(userMsg?: string): Promise<void>
Parameters ​
ParameterType
userMsg?string
Returns ​

Promise<void>

custom() ​
ts
custom(pattern?: string[]): Promise<void>
Parameters ​
ParameterType
pattern?string[]
Returns ​

Promise<void>

eslint() ​
ts
eslint(flags: string[]): Promise<undefined | void>
Parameters ​
ParameterType
flagsstring[]
Returns ​

Promise<undefined | void>

publint() ​
ts
publint(keys?: string[]): Promise<void>
Parameters ​
ParameterType
keys?string[]
Returns ​

Promise<void>

staged() ​
ts
staged(): Promise<void>
Returns ​

Promise<void>

stylelint() ​
ts
stylelint(files?: string[], fix?: boolean): Promise<void>
Parameters ​
ParameterType
files?string[]
fix?boolean
Returns ​

Promise<void>

Properties ​

PropertyModifierTypeInherited from
optspublicundefined | ConfigLintSuper.opts
utilspublicCommandSuperLintSuper.utils

PubLint ​

Extends ​

  • LintSuper<PubLintConfig>

Constructors ​

new PubLint() ​
ts
new PubLint(opts: undefined | PubLintConfig, utils: CommandSuper): PubLint
Parameters ​
ParameterType
optsundefined | PubLintConfig
utilsCommandSuper
Returns ​

PubLint

Inherited from ​

LintSuper<PubLintConfig>.constructor

Methods ​

run() ​
ts
run(keys?: string[]): Promise<void>
Parameters ​
ParameterType
keys?string[]
Returns ​

Promise<void>

runOne() ​
ts
runOne(opts?: PubLintOpts): Promise<void>
Parameters ​
ParameterType
opts?PubLintOpts
Returns ​

Promise<void>

Properties ​

PropertyModifierTypeInherited from
optspublicundefined | PubLintConfigLintSuper.opts
utilspublicCommandSuperLintSuper.utils

StagedLint ​

Extends ​

  • LintSuper<LintStagedConfig>

Constructors ​

new StagedLint() ​
ts
new StagedLint(opts: undefined | LintStagedConfig, utils: CommandSuper): StagedLint
Parameters ​
ParameterType
optsundefined | LintStagedConfig
utilsCommandSuper
Returns ​

StagedLint

Inherited from ​

LintSuper<LintStagedConfig>.constructor

Methods ​

run() ​
ts
run(): Promise<undefined | void>
Returns ​

Promise<undefined | void>

Properties ​

PropertyModifierTypeInherited from
optspublicundefined | LintStagedConfigLintSuper.opts
utilspublicCommandSuperLintSuper.utils

StyleLint ​

Extends ​

  • LintSuper<StylelintConfig>

Constructors ​

new StyleLint() ​
ts
new StyleLint(opts: undefined | LinterOptions, utils: CommandSuper): StyleLint
Parameters ​
ParameterType
optsundefined | LinterOptions
utilsCommandSuper
Returns ​

StyleLint

Inherited from ​

LintSuper<StylelintConfig>.constructor

Methods ​

run() ​
ts
run(files?: string[], fix?: boolean): Promise<undefined | void>
Parameters ​
ParameterType
files?string[]
fix?boolean
Returns ​

Promise<undefined | void>

Properties ​

PropertyModifierTypeInherited from
optspublicundefined | LinterOptionsLintSuper.opts
utilspublicCommandSuperLintSuper.utils

Functions ​

lintPlugin() ​

ts
function lintPlugin(conf?: Config): Config

Configures and returns a DovenvConfig object for linting tools.

Parameters ​

ParameterTypeDescription
conf?ConfigOptional configuration object for linting.

Returns ​

Config

A configuration object with custom lint commands and descriptions.

                           Provides linting commands for different file types and commit messages:
                           - `staged`: Lints staged git files.
                           - `stylelint`: Lints CSS/SCSS/LESS/SASS/PostCSS files with options to fix errors and specify files.
                           - `eslint`: Lints JS/TS/MD/JSON/YAML files.
                           - `commitlint`: Lints commit messages, either the last commit message or a specified message.

                           Examples include linting CSS files, JS files, commit messages, and staged files.

Type Aliases ​

Config ​

ts
type Config: {
  commitlint: CommitlintConfig;
  custom: { [key in string]: Function };
  eslint: EslintConfig;
  publint: PubLintConfig;
  staged: LintStagedConfig;
  stylelint: StylelintConfig;
};

Type declaration ​

NameTypeDescription
commitlint?CommitlintConfigConfig for lint commit messages
custom?{ [key in string]: Function }Custom lint
eslint?EslintConfigConfig for lint JS/TS/MD/JSON/YAML.. Files
publint?PubLintConfigConfig for publint
staged?LintStagedConfigConfig for lint staged GIT files
stylelint?StylelintConfigConfig for lint CSS/SCSS/LESS/SASS/PostCSS files

References ​

default ​

Renames and re-exports lintPlugin