Skip to content

Commit

Permalink
update devDependencies
Browse files Browse the repository at this point in the history
Highlights:
* VFile#quiet no longer exists, and VFile#fail throws an error instead of returning value. https://github.com/wooorm/vfile/releases/tag/2.0.0
* ESLint now supports abeautiful `codeframe` formatter. eslint/eslint@e46666b
  • Loading branch information
shinnn committed Nov 25, 2016
1 parent 46c2911 commit 68610c4
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 18 deletions.
2 changes: 1 addition & 1 deletion LICENSE
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2015 Shinnosuke Watanabe
Copyright (c) 2015 - 2016 Shinnosuke Watanabe

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
Expand Down
18 changes: 9 additions & 9 deletions README.md 100755 → 100644
Expand Up @@ -6,16 +6,16 @@
[![Dependency Status](https://david-dm.org/shinnn/vfile-messages-to-vscode-diagnostics.svg)](https://david-dm.org/shinnn/vfile-messages-to-vscode-diagnostics)
[![devDependency Status](https://david-dm.org/shinnn/vfile-messages-to-vscode-diagnostics/dev-status.svg)](https://david-dm.org/shinnn/vfile-messages-to-vscode-diagnostics#info=devDependencies)

A [Node](https://nodejs.org/) module to convert [VFile#messages](https://github.com/wooorm/vfile#vfilemessages) into an array of [VS Code](https://code.visualstudio.com/) [diagnostic](https://github.com/Microsoft/vscode-extension-vscode/blob/0.10.6/vscode.d.ts#L2220)s
A [Node.js](https://nodejs.org/) module to convert [VFile#messages](https://github.com/wooorm/vfile#vfilemessages) into an array of [VS Code](https://code.visualstudio.com/) [diagnostic](https://github.com/Microsoft/vscode-languageserver-node/blob/v2.6.2/types/src/main.ts#L153)s

```javascript
const VFile = require('vfile');
const vFileMessagesToVSCodeDiagnostics = require('vfile-messages-to-vscode-diagnostics');

vFileMessagesToVSCodeDiagnostics(new VFile().warn('error!', {line: 10, column: 2}));
vFileMessagesToVSCodeDiagnostics(new VFile().message('warning!', {line: 10, column: 2}));
/* =>
[{
message: 'error!',
message: 'warning!',
severity: 2,
range: {
start: {line: 9, character: 1},
Expand Down Expand Up @@ -51,8 +51,8 @@ const VFile = require('vfile');
const vFileMessagesToVSCodeDiagnostics = require('vfile-messages-to-vscode-diagnostics');

const file = new VFile();
file.warn('err1');
file.warn('err2', {
file.message('warning1');
file.message('warning2', {
position: {
start: {line: 23, column: 5},
end: {line: 23, column: 11}
Expand All @@ -62,14 +62,14 @@ file.warn('err2', {
vFileMessagesToVSCodeDiagnostics(file.messages);
/* =>
[{
message: 'err1',
message: 'warning1',
severity: 2,
range: {
start: {line: 0, character: 0},
end: {line: 0, character: 0}
}
}
}, {
message: 'err2',
message: 'warning2',
severity: 2,
range: {
start: {line: 22, character: 4},
Expand All @@ -81,6 +81,6 @@ vFileMessagesToVSCodeDiagnostics(file.messages);

## License

Copyright (c) 2015 [Shinnosuke Watanabe](https://github.com/shinnn)
Copyright (c) 2015 - 2016 [Shinnosuke Watanabe](https://github.com/shinnn)

Licensed under [the MIT License](./LICENSE).
15 changes: 9 additions & 6 deletions package.json
Expand Up @@ -5,7 +5,7 @@
"repository": "shinnn/vfile-messages-to-vscode-diagnostics",
"author": "Shinnosuke Watanabe (https://github.com/shinnn)",
"scripts": {
"pretest": "eslint --fix --config @shinnn/node index.js test.js",
"pretest": "eslint --fix --format=codeframe index.js test.js",
"test": "node --throw-deprecation --track-heap-objects test.js",
"coverage": "istanbul cover test.js"
},
Expand Down Expand Up @@ -36,10 +36,13 @@
},
"devDependencies": {
"@shinnn/eslint-config-node": "^3.0.0",
"alex": "^3.1.0",
"eslint": "^3.2.2",
"istanbul": "^0.4.4",
"tape": "^4.6.0",
"vfile": "^1.4.0"
"alex": "^4.0.1",
"eslint": "^3.10.2",
"istanbul": "^0.4.5",
"tape": "^4.6.3",
"vfile": "^2.0.0"
},
"eslintConfig": {
"extends": "@shinnn/node"
}
}
4 changes: 2 additions & 2 deletions test.js 100755 → 100644
Expand Up @@ -54,8 +54,8 @@ test('vFileMessagesToVSCodeDiagnostics()', t => {
);

const file = new VFile();
file.quiet = true;
file.fail('foo');
file.message('foo');
file.messages[0].fatal = true;

t.deepEqual(
vFileMessagesToVSCodeDiagnostics(file.messages),
Expand Down

0 comments on commit 68610c4

Please sign in to comment.