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