Gathering detailed insights and metrics for vfile-message
Gathering detailed insights and metrics for vfile-message
Gathering detailed insights and metrics for vfile-message
Gathering detailed insights and metrics for vfile-message
@types/vfile-message
Stub TypeScript definitions entry for vfile-message, which provides its own types definitions
vfile
Virtual file format for text processing
vfile-sort
vfile utility to sort messages by line/column
vfile-statistics
vfile utility to count messages per category: failures, warnings, etc
npm install vfile-message
Typescript
Module System
Node Version
NPM Version
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
10 Stars
111 Commits
2 Forks
7 Watchers
1 Branches
9 Contributors
Updated on May 09, 2023
Latest Version
4.0.2
Package Id
vfile-message@4.0.2
Unpacked Size
21.82 kB
Size
6.19 kB
File Count
7
NPM Version
9.7.2
Node Version
20.0.0
Published on
Jul 07, 2023
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
2
Create vfile messages.
This package provides a (lint) message format.
In most cases, you can use file.message
from VFile
itself, but in some
cases you might not have a file, and still want to emit warnings or errors,
in which case this can be used directly.
This package is ESM only. In Node.js (version 16+), install with npm:
1npm install vfile-message
In Deno with esm.sh
:
1import {VFileMessage} from 'https://esm.sh/vfile-message@4'
In browsers with esm.sh
:
1<script type="module"> 2 import {VFileMessage} from 'https://esm.sh/vfile-message@4?bundle' 3</script>
1import {VFileMessage} from 'vfile-message'
2
3const message = new VFileMessage(
4 'Unexpected unknown word `braavo`, did you mean `bravo`?',
5 {source: 'spell', ruleId: 'typo', place: {line: 1, column: 8}}
6)
7
8console.log(message)
Yields:
1[1:8: Unexpected unknown word `braavo`, did you mean `bravo`?] { 2 reason: 'Unexpected unknown word `braavo`, did you mean `bravo`?', 3 line: 1, 4 column: 8, 5 ancestors: undefined, 6 cause: undefined, 7 fatal: undefined, 8 place: {line: 1, column: 8}, 9 ruleId: 'typo', 10 source: 'spell' 11}
This package exports the identifier VFileMessage
.
There is no default export.
VFileMessage(reason[, options])
Create a message for reason
.
🪦 Note: also has obsolete signatures.
reason
(string
)
— reason for message (should use markdown)options
(Options
, optional)
— configuration.Instance of VFileMessage
.
ancestors
(Array<Node>
or undefined
)
— stack of (inclusive) ancestor nodes surrounding the messagecause
(Error
or undefined
)
— original error cause of the messagecolumn
(number
or undefined
)
— starting column of messagefatal
(boolean
or undefined
)
— state of problem; true
: error, file not usable; false
: warning,
change may be needed; undefined
: info, change likely not neededline
(number
or undefined
)
— starting line of messageplace
(Point
, Position
or undefined
)
— place of messagereason
(string
)
— reason for message (should use markdown)ruleId
(string
or undefined
, example: 'my-rule'
)
— category of messagesource
(string
or undefined
, example: 'my-package'
)
— namespace of messageOptions
Configuration (TypeScript type).
ancestors
(Array<Node>
, optional)
— stack of (inclusive) ancestor nodes surrounding the messagecause
(Error
, optional)
— original error cause of the messageplace
(Point
or Position
, optional)
— place of messageruleId
(string
, optional, example: 'my-rule'
)
— category of messagesource
(string
, optional, , example: 'my-package'
)
— namespace of who sent the messageIt’s OK to store custom data directly on the VFileMessage
, some of those are
handled by utilities.
The following fields are documented and typed here.
actual
(string
, optional)
— specify the source value that’s being reported, which is deemed incorrectexpected
(Array<string>
, optional)
— suggest acceptable values that can be used instead of actual
url
(string
, optional)
— link to docs for the message (this must be an absolute URL that can be
passed as x
to new URL(x)
)note
(string
, optional)
— long form description of the message (you should use markdown)This package is fully typed with TypeScript.
It exports the additional type Options
.
Projects maintained by the unified collective are compatible with maintained versions of Node.js.
When we cut a new major release, we drop support for unmaintained versions of
Node.
This means we try to keep the current release line, vfile-message@^4
,
compatible with Node.js 16.
See contributing.md
in vfile/.github
for ways to
get started.
See support.md
for ways to get help.
This project has a code of conduct. By interacting with this repository, organization, or community you agree to abide by its terms.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
no dangerous workflow patterns detected
Reason
license file detected
Details
Reason
0 existing vulnerabilities detected
Reason
security policy file detected
Details
Reason
Found 2/30 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-06-30
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More