refactor: sort `_options` keys

master
ikatyang 2017-09-07 11:25:46 +08:00
parent 29f1873377
commit df6a74a3c5
1 changed files with 62 additions and 62 deletions

View File

@ -1,11 +1,9 @@
"use strict"; "use strict";
const _options = { const _options = {
write: { "bracket-spacing": {
type: "boolean" type: "boolean",
}, isFormatOption: true
stdin: {
type: "boolean"
}, },
color: { color: {
// The supports-color package (a sub sub dependency) looks directly at // The supports-color package (a sub sub dependency) looks directly at
@ -15,47 +13,6 @@ const _options = {
type: "boolean", type: "boolean",
default: true default: true
}, },
"list-different": {
type: "boolean",
alias: "l"
},
help: {
type: "boolean",
alias: "h"
},
version: {
type: "boolean",
alias: "v"
},
"debug-print-doc": {
type: "boolean"
},
"debug-check": {
type: "boolean"
},
"with-node-modules": {
type: "boolean"
},
"flow-parser": {
// Deprecated in 0.0.10
type: "boolean",
isFormatOption: true
},
"cursor-offset": {
type: "int",
isFormatOption: true
},
"range-start": {
type: "int",
isFormatOption: true
},
"range-end": {
type: "int",
isFormatOption: true
},
"stdin-filepath": {
type: "string"
},
config: { config: {
type: "string" type: "string"
}, },
@ -64,17 +21,57 @@ const _options = {
default: "cli-override", default: "cli-override",
choices: ["cli-override", "file-override", "prefer-file"] choices: ["cli-override", "file-override", "prefer-file"]
}, },
"cursor-offset": {
type: "int",
isFormatOption: true
},
"debug-check": {
type: "boolean"
},
"debug-print-doc": {
type: "boolean"
},
"find-config-path": { "find-config-path": {
type: "string" type: "string"
}, },
"flow-parser": {
// Deprecated in 0.0.10
type: "boolean",
isFormatOption: true
},
help: {
type: "boolean",
alias: "h"
},
"ignore-path": { "ignore-path": {
type: "string", type: "string",
default: ".prettierignore" default: ".prettierignore"
}, },
"use-tabs": { "jsx-bracket-same-line": {
type: "boolean", type: "boolean",
isFormatOption: true isFormatOption: true
}, },
"list-different": {
type: "boolean",
alias: "l"
},
parser: {
type: "choice",
isFormatOption: true,
choices: ["flow", "babylon", "typescript", "postcss", "json", "graphql"]
},
"print-width": {
type: "int",
isFormatOption: true
},
"range-end": {
type: "int",
isFormatOption: true
},
"range-start": {
type: "int",
isFormatOption: true
},
semi: { semi: {
type: "boolean", type: "boolean",
isFormatOption: true isFormatOption: true
@ -83,31 +80,34 @@ const _options = {
type: "boolean", type: "boolean",
isFormatOption: true isFormatOption: true
}, },
"bracket-spacing": { stdin: {
type: "boolean", type: "boolean"
isFormatOption: true
}, },
"jsx-bracket-same-line": { "stdin-filepath": {
type: "boolean", type: "string"
isFormatOption: true
},
"print-width": {
type: "int",
isFormatOption: true
}, },
"tab-width": { "tab-width": {
type: "int", type: "int",
isFormatOption: true isFormatOption: true
}, },
parser: {
type: "choice",
isFormatOption: true,
choices: ["flow", "babylon", "typescript", "postcss", "json", "graphql"]
},
"trailing-comma": { "trailing-comma": {
type: "choice", type: "choice",
isFormatOption: true, isFormatOption: true,
choices: ["none", "es5", "all"] choices: ["none", "es5", "all"]
},
"use-tabs": {
type: "boolean",
isFormatOption: true
},
version: {
type: "boolean",
alias: "v"
},
"with-node-modules": {
type: "boolean"
},
write: {
type: "boolean"
} }
}; };