feat: Add rule checking Prism languages
The linter now checks that fences have languages and that those languages are supported by PrismJS. The linter has been extended over the guide with its own set of rules that only validate code fences.
This commit is contained in:
committed by
mrugesh
parent
b8bdbc7dc8
commit
9de68bd4a7
12
tools/lint-guide/lint-guide.js
Normal file
12
tools/lint-guide/lint-guide.js
Normal file
@@ -0,0 +1,12 @@
|
||||
const lintRules = require('./.guidelintrc');
|
||||
const linter = require('../linter');
|
||||
const argv = require('yargs').argv;
|
||||
|
||||
const isMDRE = /.*\.md$/;
|
||||
|
||||
const lint = linter(lintRules);
|
||||
|
||||
const files = argv._.filter(arg => isMDRE.test(arg));
|
||||
files.forEach(path => lint({ path: path }));
|
||||
|
||||
module.exports = lint;
|
Reference in New Issue
Block a user