Loading...
Loading...
Guides you through migrating markuplint configuration from v4 to v5. Detects current versions, reviews the migration guide, interactively confirms breaking changes and new rules with the user, updates config files and tests. For Claude Code.
npx skill4agent add markuplint/markuplint migrate4-5markuplint@markuplint/*package.json.markuplintrc.markuplintrc.jsonmarkuplint.config.jsnode_modules/markuplinttrue@markuplint/pug-parsertrueattr-orderpackage.json@markuplint/pug-parseroverrideModenodeRuleschildNodeRulesparserruleIdfeat(markuplint)!: upgrade markuplint to vX.X.Xtest(markuplint): update test expectationsfeat(markuplint): convert rules to new formattest(markuplint): add tests for new rulesnamenodeRulesnamerules[name]// Before
nodeRules: [
{
selector: 'img',
rules: {
'required-attr': { value: 'alt', reason: '...' },
},
},
]
// After
nodeRules: [
{
name: 'my-project/img-require-alt', // added
selector: 'img',
rules: {
'required-attr': { value: 'alt', reason: '...' },
},
},
]// Before — defined directly in rules section
rules: {
'disallowed-element': {
value: ['br'],
reason: '...',
},
}
// After — nested as Named Rule Group
rules: {
'my-project/no-br': {
rules: {
'disallowed-element': {
value: ['br'],
reason: '...',
},
},
},
}rulesrules: {
'performance/img-aspect-ratio': false, // disable entirely
'a11y/require-accessible-name': { severity: 'warning' }, // change severity
}{ group: 'aria' }aria-*{ group: 'data' }data-*const formatted = violations.map(
(v) =>
`${n(v.filePath)}:${v.line}:${v.col} ${v.message} (${v.ruleId})${v.name ? ` [${v.name}]` : ''}`,
);file.html:9:9 ... (permitted-contents) [html-standard/permitted-contents]file.html:26:3 ... (disallowed-element) [my-project/no-br]-c-c-c