![Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility](https://cdn.sanity.io/images/cgdhsj6q/production/97774ea8c88cc8f4bed2766c31994ebc38116948-1664x1366.png?w=400&fit=max&auto=format)
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
The pluggable linting tool for text(plain text and markdown).
It is similar to ESLint.
$ npm install textlint -g
$ textlint README.md
See help.
$ textlint -h
textlint [options] file.md [file.txt] [dir]
Options:
-h, --help Show help.
--rulesdir [path::String] Set rules from this directory and set all default rules to off.
-f, --format String Use a specific output format. - default: stylish
-v, --version Outputs the version number.
--ext [String] Specify text file extensions.
--no-color Enable color in piped output.
-o, --output-file path::String Enable report to be written to a file.
--quiet Report errors only. - default: false
--stdin Lint code provided on <STDIN>. - default: false
See formatters/.
Currently, you can use "stylish" (defaults), "compact", "checkstyle", "jslint-xml", "junit", "tap", "pretty-error".
e.g.) use pretty-error.js
$ textlint -f pretty-error file.md
You can use textlint as node modules.
$ npm install textlint --save-dev
Minimal usage:
var CLIEngine = require("textlint").CLIEngine;
var cliEngine = new CLIEngine({
rulesdir: ["path/to/rule-dir"]
});
var results = cliEngine.executeOnFiles(["README.md"]);
console.log(results[0].filePath);// => "README.md"
console.log(results[0].messages);// => [{message:"lint message"}]
High level usage:
var textlint = require("textlint").textlint;
textlint.setupRules({
// rule-key : rule function(see docs/create-rules.md)
"rule-key": function(context){
var exports = {};
exports[context.Syntax.Str] = function (node) {
context.report(node, new context.RuleError("error message"));
};
return exports;
}
});
var results = cliEngine.executeOnFiles(["README.md"]);
console.log(results[0].filePath);// => "README.md"
console.log(results[0].messages);// => [{message:"lint message"}]
More detail:
Please see docs/
no-todo
rule.git checkout -b my-new-feature
git commit -am 'Add some feature'
git push origin my-new-feature
MIT
and
lib/load-rules.js
, util/traverse.js
, cli.js
and formatters are:
ESLint
Copyright (c) 2013 Nicholas C. Zakas. All rights reserved.
https://github.com/eslint/eslint/blob/master/LICENSE
SCG: TextLint is similar project.
SCG: TextLint's place is equal to my textlint
(Fortuitously, project's name is the same too!).
via Natural Language Checking with Program Checking Tools
Thanks to ESLint.
FAQs
The pluggable linting tool for text and markdown.
The npm package textlint receives a total of 47,147 weekly downloads. As such, textlint popularity was classified as popular.
We found that textlint demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.