Add cli option for --no-semi (#1223)
parent
4a4e1817be
commit
5fa8df331e
|
@ -15,6 +15,7 @@ const argv = minimist(process.argv.slice(2), {
|
||||||
"write",
|
"write",
|
||||||
"stdin",
|
"stdin",
|
||||||
"use-tabs",
|
"use-tabs",
|
||||||
|
"semi",
|
||||||
"single-quote",
|
"single-quote",
|
||||||
"bracket-spacing",
|
"bracket-spacing",
|
||||||
"jsx-bracket-same-line",
|
"jsx-bracket-same-line",
|
||||||
|
@ -121,6 +122,7 @@ function getTrailingComma() {
|
||||||
|
|
||||||
const options = {
|
const options = {
|
||||||
useTabs: argv["use-tabs"],
|
useTabs: argv["use-tabs"],
|
||||||
|
semi: argv["semi"],
|
||||||
printWidth: getIntOption("print-width"),
|
printWidth: getIntOption("print-width"),
|
||||||
tabWidth: getIntOption("tab-width"),
|
tabWidth: getIntOption("tab-width"),
|
||||||
bracketSpacing: argv["bracket-spacing"],
|
bracketSpacing: argv["bracket-spacing"],
|
||||||
|
@ -185,6 +187,7 @@ if (argv["help"] || (!filepatterns.length && !stdin)) {
|
||||||
" --print-width <int> Specify the length of line that the printer will wrap on. Defaults to 80.\n" +
|
" --print-width <int> Specify the length of line that the printer will wrap on. Defaults to 80.\n" +
|
||||||
" --tab-width <int> Specify the number of spaces per indentation-level. Defaults to 2.\n" +
|
" --tab-width <int> Specify the number of spaces per indentation-level. Defaults to 2.\n" +
|
||||||
" --use-tabs Indent lines with tabs instead of spaces. Defaults to false.\n" +
|
" --use-tabs Indent lines with tabs instead of spaces. Defaults to false.\n" +
|
||||||
|
" --no-semi Do not print semicolons, except at the beginning of lines which may need them. Defaults to false.\n" +
|
||||||
" --single-quote Use single quotes instead of double.\n" +
|
" --single-quote Use single quotes instead of double.\n" +
|
||||||
" --bracket-spacing Put spaces between brackets. Defaults to true.\n" +
|
" --bracket-spacing Put spaces between brackets. Defaults to true.\n" +
|
||||||
" --jsx-bracket-same-line Put > on the last line. Defaults to false.\n" +
|
" --jsx-bracket-same-line Put > on the last line. Defaults to false.\n" +
|
||||||
|
|
Loading…
Reference in New Issue