Dagger
Search

markdownlint

Markdownlint provides utilities for running markdownlint-cli2 without installing locally with npm, brew, or docker. See https://github.com/DavidAnson/markdownlint-cli2 for more info.

Installation

dagger install github.com/act3-ai/dagger/markdownlint@e13721cd4e215872bbee128c1c7f7308ce1f7017

Entrypoint

Return Type
Markdownlint !
Arguments
NameTypeDefault ValueDescription
containerContainer -Custom container to use as a base container. Must have 'markdownlint-cli2' available on PATH.
versionString "latest"Version (image tag) to use as a markdownlint-cli2 binary source.
Example
dagger -m github.com/act3-ai/dagger/markdownlint@e13721cd4e215872bbee128c1c7f7308ce1f7017 call \
func (m *MyModule) Example() *dagger.Markdownlint  {
	return dag.
			Markdownlint()
}
@function
def example() -> dagger.Markdownlint:
	return (
		dag.markdownlint()
	)
@func()
example(): Markdownlint {
	return dag
		.markdownlint()
}

Types

Markdownlint 🔗

container() 🔗

Return Type
Container !
Example
dagger -m github.com/act3-ai/dagger/markdownlint@e13721cd4e215872bbee128c1c7f7308ce1f7017 call \
 container
func (m *MyModule) Example() *dagger.Container  {
	return dag.
			Markdownlint().
			Container()
}
@function
def example() -> dagger.Container:
	return (
		dag.markdownlint()
		.container()
	)
@func()
example(): Container {
	return dag
		.markdownlint()
		.container()
}

run() 🔗

Run markdownlint-cli2. Use the dagger native stdout to get the output, or export if the WithFix option was used.

Return Type
Container !
Arguments
NameTypeDefault ValueDescription
sourceDirectory !-Source directory containing markdown files to be linted.
globs[String ! ] !-Glob expressions (from the globby library), for identifying files in source to lint.
extraArgs[String ! ] -Additional arguments to pass to markdownlint-cli2, without 'markdownlint-cli2' itself.
Example
dagger -m github.com/act3-ai/dagger/markdownlint@e13721cd4e215872bbee128c1c7f7308ce1f7017 call \
 run --source DIR_PATH --globs string1 --globs string2
func (m *MyModule) Example(source *dagger.Directory, globs []string) *dagger.Container  {
	return dag.
			Markdownlint().
			Run(source, globs)
}
@function
def example(source: dagger.Directory, globs: List[str]) -> dagger.Container:
	return (
		dag.markdownlint()
		.run(source, globs)
	)
@func()
example(source: Directory, globs: string[]): Container {
	return dag
		.markdownlint()
		.run(source, globs)
}

withFix() 🔗

WithFix updates files to resolve fixable issues (can be overriden in configuration).

e.g. ‘markdownlint-cli2 –fix’.

Return Type
Markdownlint !
Example
dagger -m github.com/act3-ai/dagger/markdownlint@e13721cd4e215872bbee128c1c7f7308ce1f7017 call \
 with-fix
func (m *MyModule) Example() *dagger.Markdownlint  {
	return dag.
			Markdownlint().
			WithFix()
}
@function
def example() -> dagger.Markdownlint:
	return (
		dag.markdownlint()
		.with_fix()
	)
@func()
example(): Markdownlint {
	return dag
		.markdownlint()
		.withFix()
}

withConfig() 🔗

Specify a custom configuration file.

e.g. ‘markdownlint-cli2 –config ’.

Return Type
Markdownlint !
Arguments
NameTypeDefault ValueDescription
configFile !-Custom configuration file
Example
dagger -m github.com/act3-ai/dagger/markdownlint@e13721cd4e215872bbee128c1c7f7308ce1f7017 call \
 with-config --config file:path
func (m *MyModule) Example(config *dagger.File) *dagger.Markdownlint  {
	return dag.
			Markdownlint().
			WithConfig(config)
}
@function
def example(config: dagger.File) -> dagger.Markdownlint:
	return (
		dag.markdownlint()
		.with_config(config)
	)
@func()
example(config: File): Markdownlint {
	return dag
		.markdownlint()
		.withConfig(config)
}