Configuration
Configuration fileโ
The configuration file is for specifying the rules and options that apply to. That is usually automatic loading, but you also can load the config expected explicitly using CLI or API.
The automatic loading is recursively searching up from a directory that the target exists. In other words, it applies the configuration files closest to each target.
Markuplint stops searching files if found it what is closest. It is different from the default of ESLint. Its behavior is the same as ESLint is specified as { "root": true }
.
Specify the extends
field if you want to apply configuration files are upper layers more.
Format and Filenameโ
You can apply even if the filename is not .markuplintrc
.
The priority applied names are:
markuplint
field inpackage.json
.markuplintrc.json
.markuplintrc.yaml
.markuplintrc.yml
.markuplintrc.js
.markuplintrc.cjs
.markuplintrc.ts
markuplint.config.js
markuplint.config.cjs
markuplint.config.ts
.markuplintrc
's format is JSON (with comment) and also YAML.
JSONโ
{
"extends": ["markuplint:recommended"]
}
YAMLโ
extends:
- markuplint:recommended
JavaScriptโ
module.exports = {
extends: ['markuplint:recommended'],
};
TypeScriptโ
import type { Config } from '@markuplint/ml-config';
const config: Config = {
extends: ['markuplint:recommended'],
};
export default config;