Skip to content

Commit

Permalink
fix(parser): remove default options passed to prettier-eslint (#63)
Browse files Browse the repository at this point in the history
* fix(parser): remove default options passed to `prettier-eslint` (#62)

* docs(contributors): added mrm007

Closes #62
  • Loading branch information
mrm007 authored and Kent C. Dodds committed May 25, 2017
1 parent 87fbbd1 commit 6c0daa3
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 13 deletions.
10 changes: 10 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -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"
]
}
]
}
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down Expand Up @@ -183,7 +183,7 @@ Thanks goes to these people ([emoji key][emojis]):
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
| [<img src="https://avatars.githubusercontent.com/u/1500684?v=3" width="100px;"/><br /><sub>Kent C. Dodds</sub>](https://kentcdodds.com)<br />[💻](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") | [<img src="https://avatars3.githubusercontent.com/u/3266363?v=3" width="100px;"/><br /><sub>Adam Harris</sub>](https://github.com/aharris88)<br />[💻](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") | [<img src="https://avatars.githubusercontent.com/u/622118?v=3" width="100px;"/><br /><sub>Eric McCormick</sub>](https://ericmccormick.io)<br />[👀](#review-edm00se "Reviewed Pull Requests") | [<img src="https://avatars.githubusercontent.com/u/12389411?v=3" width="100px;"/><br /><sub>Joel Sequeira</sub>](https://github.com/joelseq)<br />[📖](https://github.com/prettier/prettier-eslint-cli/commits?author=joelseq "Documentation") | [<img src="https://avatars.githubusercontent.com/u/103008?v=3" width="100px;"/><br /><sub>Frank Taillandier</sub>](https://frank.taillandier.me)<br /> | [<img src="https://avatars3.githubusercontent.com/u/292365?v=3" width="100px;"/><br /><sub>Adam Stankiewicz</sub>](http://sheerun.net)<br />[💻](https://github.com/prettier/prettier-eslint-cli/commits?author=sheerun "Code") | [<img src="https://avatars3.githubusercontent.com/u/487068?v=3" width="100px;"/><br /><sub>Stephen John Sorensen</sub>](http://www.stephenjohnsorensen.com/)<br />[💻](https://github.com/prettier/prettier-eslint-cli/commits?author=spudly "Code") |
| :---: | :---: | :---: | :---: | :---: | :---: | :---: |
| [<img src="https://avatars0.githubusercontent.com/u/11560964?v=3" width="100px;"/><br /><sub>Gandem</sub>](https://github.com/Gandem)<br />[💻](https://github.com/prettier/prettier-eslint-cli/commits?author=Gandem "Code") [⚠️](https://github.com/prettier/prettier-eslint-cli/commits?author=Gandem "Tests") | [<img src="https://avatars0.githubusercontent.com/u/129991?v=3" width="100px;"/><br /><sub>Matteo Ronchi</sub>](https://github.com/cef62)<br />[🐛](https://github.com/prettier/prettier-eslint-cli/issues?q=author%3Acef62 "Bug reports") [💻](https://github.com/prettier/prettier-eslint-cli/commits?author=cef62 "Code") | [<img src="https://avatars2.githubusercontent.com/u/61787?v=3" width="100px;"/><br /><sub>Benoît Zugmeyer</sub>](https://github.com/BenoitZugmeyer)<br />[💻](https://github.com/prettier/prettier-eslint-cli/commits?author=BenoitZugmeyer "Code") [⚠️](https://github.com/prettier/prettier-eslint-cli/commits?author=BenoitZugmeyer "Tests") | [<img src="https://avatars0.githubusercontent.com/u/5038030?v=3" width="100px;"/><br /><sub>Charlike Mike Reagent</sub>](https://i.am.charlike.online)<br />[💻](https://github.com/prettier/prettier-eslint-cli/commits?author=tunnckoCore "Code") [⚠️](https://github.com/prettier/prettier-eslint-cli/commits?author=tunnckoCore "Tests") | [<img src="https://avatars0.githubusercontent.com/u/10954870?v=3" width="100px;"/><br /><sub>Dion Dirza</sub>](https://github.com/diondirza)<br />[🐛](https://github.com/prettier/prettier-eslint-cli/issues?q=author%3Adiondirza "Bug reports") |
| [<img src="https://avatars0.githubusercontent.com/u/11560964?v=3" width="100px;"/><br /><sub>Gandem</sub>](https://github.com/Gandem)<br />[💻](https://github.com/prettier/prettier-eslint-cli/commits?author=Gandem "Code") [⚠️](https://github.com/prettier/prettier-eslint-cli/commits?author=Gandem "Tests") | [<img src="https://avatars0.githubusercontent.com/u/129991?v=3" width="100px;"/><br /><sub>Matteo Ronchi</sub>](https://github.com/cef62)<br />[🐛](https://github.com/prettier/prettier-eslint-cli/issues?q=author%3Acef62 "Bug reports") [💻](https://github.com/prettier/prettier-eslint-cli/commits?author=cef62 "Code") | [<img src="https://avatars2.githubusercontent.com/u/61787?v=3" width="100px;"/><br /><sub>Benoît Zugmeyer</sub>](https://github.com/BenoitZugmeyer)<br />[💻](https://github.com/prettier/prettier-eslint-cli/commits?author=BenoitZugmeyer "Code") [⚠️](https://github.com/prettier/prettier-eslint-cli/commits?author=BenoitZugmeyer "Tests") | [<img src="https://avatars0.githubusercontent.com/u/5038030?v=3" width="100px;"/><br /><sub>Charlike Mike Reagent</sub>](https://i.am.charlike.online)<br />[💻](https://github.com/prettier/prettier-eslint-cli/commits?author=tunnckoCore "Code") [⚠️](https://github.com/prettier/prettier-eslint-cli/commits?author=tunnckoCore "Tests") | [<img src="https://avatars0.githubusercontent.com/u/10954870?v=3" width="100px;"/><br /><sub>Dion Dirza</sub>](https://github.com/diondirza)<br />[🐛](https://github.com/prettier/prettier-eslint-cli/issues?q=author%3Adiondirza "Bug reports") | [<img src="https://avatars0.githubusercontent.com/u/3297808?v=3" width="100px;"/><br /><sub>mrm007</sub>](https://github.com/mrm007)<br />[🐛](https://github.com/prettier/prettier-eslint-cli/issues?q=author%3Amrm007 "Bug reports") [💻](https://github.com/prettier/prettier-eslint-cli/commits?author=mrm007 "Code") |
<!-- ALL-CONTRIBUTORS-LIST:END -->

This project follows the [all-contributors][all-contributors] specification. Contributions of any kind welcome!
Expand Down
16 changes: 5 additions & 11 deletions src/parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ const logger = getLogger({prefix: 'prettier-eslint-cli'})

const parser = yargs
.usage(
stripIndent`Usage: $0 <globs>... [--option-1 option-1-value --option-2]
stripIndent`
Usage: $0 <globs>... [--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.
Expand Down Expand Up @@ -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.
Expand All @@ -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.
Expand All @@ -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
Expand All @@ -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.
Expand All @@ -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.',
},
Expand Down

0 comments on commit 6c0daa3

Please sign in to comment.