Skip to content

Commit 1d0bc31

Browse files
committed
Meta tweaks
1 parent c5c87d8 commit 1d0bc31

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

.gitattributes

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
1-
* text=auto
2-
*.js text eol=lf
1+
* text=auto eol=lf
32
*.ai binary

.travis.yml

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
language: node_js
22
node_js:
3+
- '10'
34
- '8'
45
- '6'

index.js

+9-9
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@ const toVfile = require('to-vfile');
66
const vfileReporterPretty = require('vfile-reporter-pretty');
77
const config = require('./config');
88

9-
const m = opts => {
10-
opts = Object.assign({
9+
const m = options => {
10+
options = Object.assign({
1111
filename: 'readme.md'
12-
}, opts);
12+
}, options);
1313

14-
const readmeFile = globby.sync(opts.filename, {nocase: true})[0];
14+
const readmeFile = globby.sync(options.filename, {nocase: true})[0];
1515

1616
if (!readmeFile) {
17-
return Promise.reject(new Error(`Couldn't find the file ${opts.filename}`));
17+
return Promise.reject(new Error(`Couldn't find the file ${options.filename}`));
1818
}
1919

2020
const run = remark().use(config).process;
@@ -23,16 +23,16 @@ const m = opts => {
2323
return pify(run)(file);
2424
};
2525

26-
m.report = opts => m(opts).then(file => {
26+
m.report = options => m(options).then(file => {
2727
const {messages} = file;
2828

2929
if (messages.length === 0) {
3030
return;
3131
}
3232

33-
messages.forEach(x => {
34-
x.fatal = true; // eslint-ignore-line TODO: because of https://github.com/wooorm/remark-lint/issues/65
35-
});
33+
for (const message of messages) {
34+
message.fatal = true; // TODO: because of https://github.com/wooorm/remark-lint/issues/65
35+
}
3636

3737
process.exitCode = 1;
3838

0 commit comments

Comments
 (0)