diff --git a/.all-contributorsrc b/.all-contributorsrc
index b1822ca..012e447 100644
--- a/.all-contributorsrc
+++ b/.all-contributorsrc
@@ -121,6 +121,16 @@
"contributions": [
"bug"
]
+ },
+ {
+ "login": "mrm007",
+ "name": "mrm007",
+ "avatar_url": "https://avatars0.githubusercontent.com/u/3297808?v=3",
+ "profile": "https://github.com/mrm007",
+ "contributions": [
+ "bug",
+ "code"
+ ]
}
]
}
diff --git a/README.md b/README.md
index e18ba35..db233e6 100644
--- a/README.md
+++ b/README.md
@@ -9,7 +9,7 @@ CLI for [`prettier-eslint`][prettier-eslint]
[![downloads][downloads-badge]][npm-stat]
[![MIT License][license-badge]][LICENSE]
-[![All Contributors](https://img.shields.io/badge/all_contributors-12-orange.svg?style=flat-square)](#contributors)
+[![All Contributors](https://img.shields.io/badge/all_contributors-13-orange.svg?style=flat-square)](#contributors)
[![PRs Welcome][prs-badge]][prs]
[![Donate][donate-badge]][donate]
[![Code of Conduct][coc-badge]][coc]
@@ -183,7 +183,7 @@ Thanks goes to these people ([emoji key][emojis]):
| [
Kent C. Dodds](https://kentcdodds.com)
[๐ป](https://github.com/prettier/prettier-eslint-cli/commits?author=kentcdodds "Code") [๐](https://github.com/prettier/prettier-eslint-cli/commits?author=kentcdodds "Documentation") [๐](#infra-kentcdodds "Infrastructure (Hosting, Build-Tools, etc)") [โ ๏ธ](https://github.com/prettier/prettier-eslint-cli/commits?author=kentcdodds "Tests") | [
Adam Harris](https://github.com/aharris88)
[๐ป](https://github.com/prettier/prettier-eslint-cli/commits?author=aharris88 "Code") [๐](https://github.com/prettier/prettier-eslint-cli/commits?author=aharris88 "Documentation") [๐](#review-aharris88 "Reviewed Pull Requests") | [
Eric McCormick](https://ericmccormick.io)
[๐](#review-edm00se "Reviewed Pull Requests") | [
Joel Sequeira](https://github.com/joelseq)
[๐](https://github.com/prettier/prettier-eslint-cli/commits?author=joelseq "Documentation") | [
Frank Taillandier](https://frank.taillandier.me)
| [
Adam Stankiewicz](http://sheerun.net)
[๐ป](https://github.com/prettier/prettier-eslint-cli/commits?author=sheerun "Code") | [
Stephen John Sorensen](http://www.stephenjohnsorensen.com/)
[๐ป](https://github.com/prettier/prettier-eslint-cli/commits?author=spudly "Code") |
| :---: | :---: | :---: | :---: | :---: | :---: | :---: |
-| [
Gandem](https://github.com/Gandem)
[๐ป](https://github.com/prettier/prettier-eslint-cli/commits?author=Gandem "Code") [โ ๏ธ](https://github.com/prettier/prettier-eslint-cli/commits?author=Gandem "Tests") | [
Matteo Ronchi](https://github.com/cef62)
[๐](https://github.com/prettier/prettier-eslint-cli/issues?q=author%3Acef62 "Bug reports") [๐ป](https://github.com/prettier/prettier-eslint-cli/commits?author=cef62 "Code") | [
Benoรฎt Zugmeyer](https://github.com/BenoitZugmeyer)
[๐ป](https://github.com/prettier/prettier-eslint-cli/commits?author=BenoitZugmeyer "Code") [โ ๏ธ](https://github.com/prettier/prettier-eslint-cli/commits?author=BenoitZugmeyer "Tests") | [
Charlike Mike Reagent](https://i.am.charlike.online)
[๐ป](https://github.com/prettier/prettier-eslint-cli/commits?author=tunnckoCore "Code") [โ ๏ธ](https://github.com/prettier/prettier-eslint-cli/commits?author=tunnckoCore "Tests") | [
Dion Dirza](https://github.com/diondirza)
[๐](https://github.com/prettier/prettier-eslint-cli/issues?q=author%3Adiondirza "Bug reports") |
+| [
Gandem](https://github.com/Gandem)
[๐ป](https://github.com/prettier/prettier-eslint-cli/commits?author=Gandem "Code") [โ ๏ธ](https://github.com/prettier/prettier-eslint-cli/commits?author=Gandem "Tests") | [
Matteo Ronchi](https://github.com/cef62)
[๐](https://github.com/prettier/prettier-eslint-cli/issues?q=author%3Acef62 "Bug reports") [๐ป](https://github.com/prettier/prettier-eslint-cli/commits?author=cef62 "Code") | [
Benoรฎt Zugmeyer](https://github.com/BenoitZugmeyer)
[๐ป](https://github.com/prettier/prettier-eslint-cli/commits?author=BenoitZugmeyer "Code") [โ ๏ธ](https://github.com/prettier/prettier-eslint-cli/commits?author=BenoitZugmeyer "Tests") | [
Charlike Mike Reagent](https://i.am.charlike.online)
[๐ป](https://github.com/prettier/prettier-eslint-cli/commits?author=tunnckoCore "Code") [โ ๏ธ](https://github.com/prettier/prettier-eslint-cli/commits?author=tunnckoCore "Tests") | [
Dion Dirza](https://github.com/diondirza)
[๐](https://github.com/prettier/prettier-eslint-cli/issues?q=author%3Adiondirza "Bug reports") | [
mrm007](https://github.com/mrm007)
[๐](https://github.com/prettier/prettier-eslint-cli/issues?q=author%3Amrm007 "Bug reports") [๐ป](https://github.com/prettier/prettier-eslint-cli/commits?author=mrm007 "Code") |
This project follows the [all-contributors][all-contributors] specification. Contributions of any kind welcome!
diff --git a/src/parser.js b/src/parser.js
index 83f868c..a52b64e 100644
--- a/src/parser.js
+++ b/src/parser.js
@@ -9,7 +9,8 @@ const logger = getLogger({prefix: 'prettier-eslint-cli'})
const parser = yargs
.usage(
- stripIndent`Usage: $0 ... [--option-1 option-1-value --option-2]
+ stripIndent`
+ Usage: $0 ... [--option-1 option-1-value --option-2]
Prefix an option with "no-" to set it to false, such as --no-semi to
disable semicolons and --no-eslint-ignore to disable default ignores.
@@ -78,22 +79,18 @@ const parser = yargs
type: 'boolean',
},
'use-tabs': {
- default: false,
type: 'boolean',
describe: 'Indent lines with tabs instead of spaces.',
},
'print-width': {
- default: 80,
type: 'number',
describe: 'Specify the length of line that the printer will wrap on.',
},
'tab-width': {
- default: 2,
type: 'number',
describe: 'Specify the number of spaces per indentation-level.',
},
'trailing-comma': {
- default: 'none',
type: 'string',
describe: stripIndent`
Print trailing commas wherever possible.
@@ -103,10 +100,9 @@ const parser = yargs
- "es5" - trailing commas where valid in ES5 (objects, arrays, etc)
- "all" - trailing commas wherever possible (function arguments)
`,
+ choices: ['none', 'es5', 'all'],
},
-
'bracket-spacing': {
- default: true,
type: 'boolean',
describe: stripIndent`
Print spaces between brackets in object literals.
@@ -116,9 +112,9 @@ const parser = yargs
- true - Example: { foo: bar }
- false - Example: {foo: bar}
`,
+ choices: [true, false],
},
'jsx-bracket-same-line': {
- default: false,
type: 'boolean',
describe: oneLine`
Put the > of a multi-line JSX element at
@@ -127,12 +123,10 @@ const parser = yargs
`,
},
parser: {
- default: 'babylon',
type: 'string',
describe: 'Specify which parser to use.',
},
semi: {
- default: true,
type: 'boolean',
describe: stripIndent`
Print semicolons at the ends of statements.
@@ -145,9 +139,9 @@ const parser = yargs
that may introduce ASI failures
`}
`,
+ choices: [true, false],
},
'single-quote': {
- default: false,
type: 'boolean',
describe: 'Use single quotes instead of double quotes.',
},