mirror of
https://github.com/Smaug123/KaTeX
synced 2025-10-05 03:08:40 +00:00
Migrate to eslint
Summary We'd like contributors to use the same linter and lint rules that we use internally. This diff swaps out eslint for jshint and fixes all lint failures except for the max-len failures in the test suites. Test Plan: - ka-lint src - make lint - make test Reviewers: emily
This commit is contained in:
5
cli.js
5
cli.js
@@ -1,6 +1,7 @@
|
||||
#!/usr/bin/env node
|
||||
// Simple CLI for KaTeX.
|
||||
// Reads TeX from stdin, outputs HTML to stdout.
|
||||
/* eslint no-console:0 */
|
||||
|
||||
var katex = require("./");
|
||||
var input = "";
|
||||
@@ -8,7 +9,7 @@ var input = "";
|
||||
// Skip the first two args, which are just "node" and "cli.js"
|
||||
var args = process.argv.slice(2);
|
||||
|
||||
if (args.indexOf("--help") != -1) {
|
||||
if (args.indexOf("--help") !== -1) {
|
||||
console.log(process.argv[0] + " " + process.argv[1] +
|
||||
" [ --help ]" +
|
||||
" [ --display-mode ]");
|
||||
@@ -25,7 +26,7 @@ process.stdin.on("data", function(chunk) {
|
||||
});
|
||||
|
||||
process.stdin.on("end", function() {
|
||||
var options = { displayMode: args.indexOf("--display-mode") != -1 };
|
||||
var options = { displayMode: args.indexOf("--display-mode") !== -1 };
|
||||
var output = katex.renderToString(input, options);
|
||||
console.log(output);
|
||||
});
|
||||
|
Reference in New Issue
Block a user