mirror of
https://github.com/remarkjs/remark-lint.git
synced 2024-09-11 19:57:15 +03:00
Remove unused dev-dependencies
This commit is contained in:
parent
6a9f2a937a
commit
7cd0cde7c8
@ -32,7 +32,6 @@
|
||||
],
|
||||
"devDependencies": {
|
||||
"browserify": "^17.0.0",
|
||||
"chalk": "^4.0.0",
|
||||
"dox": "^0.9.0",
|
||||
"lerna": "^3.0.0",
|
||||
"mdast-zone": "^4.0.0",
|
||||
@ -50,15 +49,13 @@
|
||||
"tape": "^5.0.0",
|
||||
"tinyify": "^3.0.0",
|
||||
"to-vfile": "^6.0.0",
|
||||
"trim": "0.0.1",
|
||||
"unist-builder": "^2.0.0",
|
||||
"unist-util-remove-position": "^3.0.0",
|
||||
"vfile-reporter": "^6.0.0",
|
||||
"xo": "^0.33.0"
|
||||
},
|
||||
"scripts": {
|
||||
"postinstall": "lerna bootstrap --no-ci",
|
||||
"format": "remark . -qfo && prettier . --write && xo --fix",
|
||||
"format": "remark . -qfo && prettier . -w --loglevel warn && xo --fix",
|
||||
"generate:presets": "node script/build-presets",
|
||||
"generate:rules": "node script/build-rules",
|
||||
"generate": "npm run generate:presets && npm run generate:rules",
|
||||
|
36
readme.md
36
readme.md
@ -103,9 +103,7 @@ var report = require('vfile-reporter')
|
||||
var remark = require('remark')
|
||||
var styleGuide = require('remark-preset-lint-markdown-style-guide')
|
||||
|
||||
var file = remark()
|
||||
.use(styleGuide)
|
||||
.processSync('_Hello world_')
|
||||
var file = remark().use(styleGuide).processSync('_Hello world_')
|
||||
|
||||
console.log(report(file))
|
||||
```
|
||||
@ -204,10 +202,10 @@ Say we have the following file, `example.js`, showing how formatting rules can
|
||||
be used:
|
||||
|
||||
```js
|
||||
var report = require('vfile-reporter');
|
||||
var remark = require('remark');
|
||||
var emphasisMarker = require('remark-lint-emphasis-marker');
|
||||
var strongMarker = require('remark-lint-strong-marker');
|
||||
var report = require('vfile-reporter')
|
||||
var remark = require('remark')
|
||||
var emphasisMarker = require('remark-lint-emphasis-marker')
|
||||
var strongMarker = require('remark-lint-strong-marker')
|
||||
|
||||
remark()
|
||||
.use(emphasisMarker, '*')
|
||||
@ -218,9 +216,9 @@ remark()
|
||||
// ^ `remark-stringify` settings.
|
||||
})
|
||||
.process('_Hello_, __world__!', function (err, file) {
|
||||
console.error(report(err || file));
|
||||
console.log(String(file));
|
||||
});
|
||||
console.error(report(err || file))
|
||||
console.log(String(file))
|
||||
})
|
||||
```
|
||||
|
||||
Now, running `node example` yields warnings and a formatted file:
|
||||
@ -239,12 +237,12 @@ If you’re using [`remark-stringify`][remark-stringify] explicitly, you can pas
|
||||
options like any other plugin, like so:
|
||||
|
||||
```js
|
||||
var report = require('vfile-reporter');
|
||||
var unified = require('unified');
|
||||
var parse = require('remark-parse');
|
||||
var stringify = require('remark-stringify');
|
||||
var emphasisMarker = require('remark-lint-emphasis-marker');
|
||||
var strongMarker = require('remark-lint-strong-marker');
|
||||
var report = require('vfile-reporter')
|
||||
var unified = require('unified')
|
||||
var parse = require('remark-parse')
|
||||
var stringify = require('remark-stringify')
|
||||
var emphasisMarker = require('remark-lint-emphasis-marker')
|
||||
var strongMarker = require('remark-lint-strong-marker')
|
||||
|
||||
unified()
|
||||
.use(parse)
|
||||
@ -254,9 +252,9 @@ unified()
|
||||
.use(stringify, {emphasis: '*', strong: '*'})
|
||||
// ^ `remark-stringify` with settings.
|
||||
.process('_Hello_, __world__!', function (err, file) {
|
||||
console.error(report(err || file));
|
||||
console.log(String(file));
|
||||
});
|
||||
console.error(report(err || file))
|
||||
console.log(String(file))
|
||||
})
|
||||
```
|
||||
|
||||
Now, when running `node example`, this results in the same output as the
|
||||
|
@ -4,11 +4,9 @@ var fs = require('fs')
|
||||
var path = require('path')
|
||||
var u = require('unist-builder')
|
||||
var dox = require('dox')
|
||||
var chalk = require('chalk')
|
||||
var remark = require('remark')
|
||||
var gfm = require('remark-gfm')
|
||||
var strip = require('strip-indent')
|
||||
var trim = require('trim')
|
||||
var parseAuthor = require('parse-author')
|
||||
var remote = require('../package.json').repository
|
||||
var find = require('./util/find')
|
||||
@ -22,7 +20,7 @@ presets(root).forEach(function (basename) {
|
||||
var doc = fs.readFileSync(path.join(base, 'index.js'), 'utf8')
|
||||
var tags = dox.parseComments(doc)[0].tags
|
||||
var author = parseAuthor(pack.author)
|
||||
var description = trim(strip(find(tags, 'fileoverview')))
|
||||
var description = strip(find(tags, 'fileoverview')).trim()
|
||||
var rows = []
|
||||
var children
|
||||
var short = basename.replace(/^remark-/, '')
|
||||
@ -258,5 +256,5 @@ presets(root).forEach(function (basename) {
|
||||
remark().use(gfm).stringify(u('root', children))
|
||||
)
|
||||
|
||||
console.log(chalk.green('✓') + ' wrote `readme.md` in `' + basename + '`')
|
||||
console.log('✓ wrote `readme.md` in `' + basename + '`')
|
||||
})
|
||||
|
@ -4,7 +4,6 @@ var fs = require('fs')
|
||||
var path = require('path')
|
||||
var inspect = require('util').inspect
|
||||
var u = require('unist-builder')
|
||||
var chalk = require('chalk')
|
||||
var remark = require('remark')
|
||||
var gfm = require('remark-gfm')
|
||||
var parseAuthor = require('parse-author')
|
||||
@ -367,5 +366,5 @@ rules(root).forEach(function (basename) {
|
||||
remark().use(gfm).stringify(u('root', children))
|
||||
)
|
||||
|
||||
console.log(chalk.green('✓') + ' wrote `readme.md` in `' + basename + '`')
|
||||
console.log('✓ wrote `readme.md` in `' + basename + '`')
|
||||
})
|
||||
|
@ -4,7 +4,6 @@ var fs = require('fs')
|
||||
var path = require('path')
|
||||
var dox = require('dox')
|
||||
var strip = require('strip-indent')
|
||||
var trim = require('trim')
|
||||
var find = require('./find')
|
||||
|
||||
module.exports = ruleSync
|
||||
@ -38,7 +37,7 @@ function ruleSync(filePath) {
|
||||
description = strip(description)
|
||||
|
||||
result.ruleId = ruleId
|
||||
result.description = trim(description)
|
||||
result.description = description.trim()
|
||||
result.tests = tests
|
||||
result.filePath = filePath
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user