Skip to content

Do not break require calls - #841

Merged
jlongster merged 1 commit into
prettier:masterfrom
vjeux:require
Mar 3, 2017
Merged

jlongster merged 1 commit into
prettier:masterfrom
vjeux:require

Conversation

@vjeux

@vjeux vjeux commented Mar 1, 2017

Copy link
Copy Markdown
Contributor

This has come up a couple times on the issue tracker on the react-native-web discussion about Twitter internals. It seems like there's a concensus that people don't break long require calls and they'd rather have it go > 80 columns.

Fixes #303
Fixes #752

This has come up a couple times on the issue tracker on the react-native-web discussion about Twitter internals. It seems like there's a concensus that people don't break long require calls and they'd rather have it go > 80 columns.

Fixes prettier#303
Fixes prettier#752
vjeux added a commit to vjeux/prettier that referenced this pull request Mar 1, 2017
This happens very frequently that naming a test makes the entire line go > 80 columns and requires to indent everything which takes a lot more space. We've had this being reported multiple times and it also affects a lot of tests inside of fb.

Fixes prettier#159

(Note, this is built on-top of prettier#841 but github doesn't handle stacked pull requests well...)
nine,
ten,
eleven
} = require(\\"./my-utils\\");

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As long as these still break, I'm fine with it :)

@jlongster
jlongster merged commit 705ac7d into prettier:master Mar 3, 2017
vjeux added a commit to vjeux/prettier that referenced this pull request Mar 3, 2017
This happens very frequently that naming a test makes the entire line go > 80 columns and requires to indent everything which takes a lot more space. We've had this being reported multiple times and it also affects a lot of tests inside of fb.

Fixes prettier#159

(Note, this is built on-top of prettier#841 but github doesn't handle stacked pull requests well...)
@matthewp

matthewp commented Mar 3, 2017

Copy link
Copy Markdown

Does this take into account require functions that aren't the global CommonJS require? Looking at the changes it doesn't appear to, but I could be wrong.

@hawkrives

Copy link
Copy Markdown
Contributor

I'm pretty sure that it's just looking for any functions explicitly called require

jlongster pushed a commit that referenced this pull request Mar 3, 2017
This happens very frequently that naming a test makes the entire line go > 80 columns and requires to indent everything which takes a lot more space. We've had this being reported multiple times and it also affects a lot of tests inside of fb.

Fixes #159

(Note, this is built on-top of #841 but github doesn't handle stacked pull requests well...)
@lock lock Bot added the locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting. label Jan 21, 2019
@lock lock Bot locked as resolved and limited conversation to collaborators Jan 21, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants