Skip to content

Conversation

@fisker
Copy link
Member

@fisker fisker commented Nov 15, 2019

  • I’ve added tests to confirm my change works.
  • (If changing the API or CLI) I’ve documented the changes I’ve made (in the docs/ directory)
  • (If the change is user-facing) I’ve added my changes to changelog_unreleased/*/pr-XXXX.md file following changelog_unreleased/TEMPLATE.md.
  • I’ve read the contributing guidelines.

Try the playground for this PR

@fisker fisker changed the title Fix new usage for builtin types Fix new usage for builtin objects Nov 15, 2019
@fisker
Copy link
Member Author

fisker commented Nov 15, 2019

question: keep the rule?

const WIDTH = columns - stringWidth(OK) + 1;
if (input.length < WIDTH) {
input += Array(WIDTH - input.length).join(chalk.dim("."));
input += new Array(WIDTH - input.length).join(chalk.dim("."));
Copy link
Member

Choose a reason for hiding this comment

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

We could also change stuff like this into .repeat on the next branch.

Copy link
Member

Choose a reason for hiding this comment

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

/cc @fisker if you’re looking for more refactoring to do :)

Copy link
Member Author

Choose a reason for hiding this comment

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

maybe later

@lydell
Copy link
Member

lydell commented Nov 16, 2019

Maybe it’s going to be easier to merge all the eslint-plugin-unicorn PRs into next?

@alexander-akait
Copy link
Member

@lydell why? It is not breaking change 😄

@lydell
Copy link
Member

lydell commented Nov 16, 2019

I thought about merge conflicts. If we merge this to master and then replace Array(n+1).join("x") with "x".repeat(n) in next we will get a lot of unnecessary conflicts.

@alexander-akait
Copy link
Member

@lydell it makes sense 👍

@lydell lydell changed the base branch from master to next November 16, 2019 11:42
@lydell lydell merged commit eac6fba into prettier:next Nov 17, 2019
@fisker fisker deleted the new-for-builtins branch November 17, 2019 10:51
sosukesuzuki pushed a commit to sosukesuzuki/prettier that referenced this pull request Jan 2, 2020
lipis added a commit that referenced this pull request Jan 8, 2020
* 'next' of github.com:prettier/prettier:
  Optimize some usage of `Array#filter` (#6996)
  Update `jest` to v24 (#6954)
  Replace `trim{Left,Right}` with `trim{Start,End}` (#6994)
  Set `trailingComma` default value to `es5` (#6963)
  Fix `new` usage for builtin objects (#6968)
  Replace `indexOf` with `includes` (#6967)
  fix: tests for empty type parameters in TS (#6960)
  Fix MDX html parsing errors (#6949)
  fix: issue #6813 (Zero-based lists are broken) (#6852)
  Style: use async functions (#6935)
  Disable trailingComma for Angular internal parser (#6912)
  Update `snapshot-diff` to v0.6.1 (#6955)
  Update build scripts to target Node.js 10 (#6908)
@lock lock bot added the locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting. label Feb 15, 2020
@lock lock bot locked as resolved and limited conversation to collaborators Feb 15, 2020
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