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:
Oliver Eyton-Williams
2019-06-21 15:22:14 +02:00
committed by mrugesh
parent b8bdbc7dc8
commit 9de68bd4a7
18 changed files with 1444 additions and 750 deletions

View 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;