Skip to main content

Creating Preset

A preset is a JavaScript or JSON file that exports an configuration object.

export default {
rules: {
"no-missing-namespace": { severity: "error" }
}
};

You can use extends in a preset. For example, you can create a preset based on the recommended preset.

export default {
extends: ["@kosko/plugin-lint/presets/recommended"],
rules: {
"ban-image": {
severity: "error",
config: { images: ["*:latest"] }
}
}
};