Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add --space-before-function-paren option #22

Merged
merged 4 commits into from
Jun 20, 2017

Conversation

josephfrazier
Copy link

This corresponds to ESLint's space-before-function-paren "always"
option: http://eslint.org/docs/rules/space-before-function-paren#always

See prettier#1139

Note that this is based on upstream prettier's master branch, so that should be merged before this. Only the last two commits in this PR are the meaningful ones.

@rhengles
Copy link
Member

Thank you! I just updated the master branch, but there have been some changes.

Can you solve the conflicts please?

@josephfrazier
Copy link
Author

Sure thing, I also added documentation.

@sabrehagen
Copy link

@josephfrazier Can you submit this as a merge request to the prettier/prettier repository? This fork is getting very out of date, and this functionality would be very useful in the main prettier library.

@josephfrazier
Copy link
Author

At https://github.com/prettier/prettier/, this has been split into prettier#3845 and prettier#3847 (this one has a PR at prettier#3903)

brodybits pushed a commit to bangkokjs/prettierx-0.4.x-fork that referenced this pull request Dec 30, 2018
ported from prettier-miscellaneous (arijs#22)

with test coverage added for space-before-function-paren not enabled

TODO: Known issue with generics in TypeScript

Co-authored-by: Christopher J. Brody <chris.brody@gmail.com>
Co-authored-by: Joseph Frazier <1212jtraceur@gmail.com>
Co-authored-by: Ika <ikatyang@gmail.com>
Co-authored-by: Lucas Azzola <derflatulator@gmail.com>
brodybits pushed a commit to bangkokjs/prettierx-0.4.x-fork that referenced this pull request Jan 1, 2019
ported (reimplemented) from prettier-miscellaneous
(arijs#22)

with test coverage added for space-before-function-paren not enabled

configuration & documentation according to new prettier format

TODO: Known issue with generics in TypeScript

Co-authored-by: Christopher J. Brody <chris.brody@gmail.com>
Co-authored-by: Joseph Frazier <1212jtraceur@gmail.com>
Co-authored-by: Rafael Hengles <rafael@hengles.net>
Co-authored-by: Ika <ikatyang@gmail.com>
Co-authored-by: Lucas Azzola <derflatulator@gmail.com>
brodybits pushed a commit to bangkokjs/prettierx-0.4.x-fork that referenced this pull request Jan 2, 2019
ported (largely reimplemented) from prettier-miscellaneous
(arijs#22)

with ES test moved to eslint-compat subdirectory;
     test space-before-function-paren with real member function;
     test coverage added for space-before-function-paren not enabled;
     configuration & documentation according to new prettier format;
     tslint-compat test to cover use of TypeScript generics;
     issue with TypeScript generics resolved; and
     space-before-function-paren option added to README.md.

Co-authored-by: Christopher J. Brody <chris.brody@gmail.com>
Co-authored-by: Joseph Frazier <1212jtraceur@gmail.com>
Co-authored-by: Rafael Hengles <rafael@hengles.net>
Co-authored-by: Ika <ikatyang@gmail.com>
Co-authored-by: Lucas Azzola <derflatulator@gmail.com>
brodybits pushed a commit to bangkokjs/prettierx-0.4.x-fork that referenced this pull request Jan 2, 2019
ported (largely reimplemented) from prettier-miscellaneous
(arijs#22)

with ES test moved to eslint-compat subdirectory;
     test space-before-function-paren with real member function;
     test coverage added for space-before-function-paren not enabled;
     configuration & documentation according to new prettier format;
     tslint-compat test to cover use of TypeScript generics;
     issue with TypeScript generics resolved; and
     space-before-function-paren option added to README.md.

Co-authored-by: Christopher J. Brody <chris.brody@gmail.com>
Co-authored-by: Joseph Frazier <1212jtraceur@gmail.com>
Co-authored-by: Rafael Hengles <rafael@hengles.net>
Co-authored-by: Ika <ikatyang@gmail.com>
Co-authored-by: Lucas Azzola <derflatulator@gmail.com>
@suconghou
Copy link

why this function --space-before-function-paren still not online in 2.2.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants