/ .lint / remark-lint-config.js
remark-lint-config.js
 1  // Get list of plugins from package.json.
 2  var fs = require('fs'), path = require('path');
 3  var packageFile = path.resolve(__dirname, 'package.json');
 4  var deps = Object.keys(JSON.parse(fs.readFileSync(packageFile)).dependencies);
 5  
 6  var pluginOptions = {
 7      'remark-lint-code-block-style': 'indented',
 8      'remark-lint-emphasis-marker': '*',
 9      'remark-lint-strong-marker': '*',
10      'remark-lint-heading-style': 'atx',
11      'remark-lint-list-item-indent': 'space',
12      'remark-lint-no-heading-punctuation': '.,;:!',
13      'remark-lint-unordered-list-marker-style': '-',
14      'remark-lint-no-dead-urls': { skipOffline: true },
15      'remark-lint-no-missing-blank-lines': { exceptTightLists: true },
16  };
17  
18  exports.plugins = [];
19  deps.forEach(function (d) {
20      if (d.match(/^remark-(lint|validate)/)) {
21          var option = pluginOptions[d];
22          exports.plugins.push(option ? [d, option] : d);
23      }
24  });