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

fix(deps): update eslint and prettier (major) #254

Closed
wants to merge 2 commits into from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Mar 26, 2020

This PR contains the following updates:

Package Type Update Change
eslint-plugin-react-hooks (source) dependencies major ^2.5.1 -> ^4.0.0
prettier (source) devDependencies major ^1.19.1 -> ^2.0.5

Release Notes

prettier/prettier

v2.0.5

Compare Source

diff

Less: Fix formatting of :extend (#​7984 by @​fisker)
// Input
.class {
  &:extend(.some-class .some-other-class .some-very-loooooooooooooong-class all);
}

// Prettier 2.0.4
.class {
  &:extend(
    .some-class .some-other-class .some-very-loooooooooooooong-class all
  );
}

// Prettier 2.0.4 (Second format)
.class {
  &: extend(
    .some-class .some-other-class .some-very-loooooooooooooong-class all
  );
}

// Prettier 2.0.5
.class {
  &:extend(
    .some-class .some-other-class .some-very-loooooooooooooong-class all
  );
}
Editor integration: Use resolve if builtin require.resolve is overridden (#​8072 by @​fisker)

This fixes issues that the users of Atom and WebStorm faced with 2.0.4.

Prettier now switches to using the resolve module for resolving configuration files and plugins if it detects that require.resolve isn't Node's builtin function (doesn't support the second argument), which happens in environments like editor extensions. To force the fallback, set the PRETTIER_FALLBACK_RESOLVE environment variable to true.

v2.0.4

Compare Source

diff

Revert #​7869, "[TypeScript] format TSAsExpression with same logic as BinaryExpression" (#​7958)

v2.0.3

Compare Source

diff

JavaScript
Fix prettier-ignore inside JSX (#​7877 by @​fisker)
// Input
<div>
{
  /* prettier-ignore */
  x     ?   <Y/> : <Z/>
}
</div>;

// Prettier 2.0.2 (first output)
<div>
  {/* prettier-ignore */
  x     ?   <Y/> : <Z/>}
</div>;

// Prettier 2.0.2 (second output)
<div>{/* prettier-ignore */ x     ?   <Y/> : <Z/>}</div>;

// Prettier 2.0.3
<div>
  {
    /* prettier-ignore */
    x     ?   <Y/> : <Z/>
  }
</div>;
Fix regressions in styled-components template literals (#​7883 by @​thorn0)
// Input
const Icon = styled.div`
  background:   var(--${background});
  ${Link}:not(:first-child) {
      fill:    rebeccapurple;
  }
`;

// Prettier 2.0.2
const Icon = styled.div`
  background: var(-- ${background});
  ${Link}:not (:first-child) {
    fill: rebeccapurple;
  }
`;

// Prettier 2.0.3
const Icon = styled.div`
  background: var(--${background});
  ${Link}:not(:first-child) {
    fill: rebeccapurple;
  }
`;
Fix: line endings were not always converted properly in multiline strings and comments (#​7891 by @​sidharthv96)
// Input
export const IAmIncredibleLongFunctionName = IAmAnotherFunctionName(<CRLF>
  (_0: IAmIncredibleLongParameterType) => {<CRLF>
    setTimeout(() => {<CRLF>
      /*<CRLF>
        Multiline comment<CRLF>
        Multiline comment<CRLF>
        Multiline comment<CRLF>
      */<CRLF>
      console.log(<CRLF>
        "Multiline string\<CRLF>
         Multiline string\<CRLF>
         Multiline string"<CRLF>
      );<CRLF>
    });<CRLF>
  }<CRLF>
);<CRLF>

// Prettier 2.0.2
export const IAmIncredibleLongFunctionName = IAmAnotherFunctionName(<CRLF>
  (_0: IAmIncredibleLongParameterType) => {<CRLF>
    setTimeout(() => {<CRLF>
      /*<LF>
        Multiline comment<LF>
        Multiline comment<LF>
        Multiline comment<LF>
      */<CRLF>
      console.log(<CRLF>
        "Multiline string\<LF>
         Multiline string\<LF>
         Multiline string"<CRLF>
      );<CRLF>
    });<CRLF>
  }<CRLF>
);<CRLF>

// Prettier 2.0.3: same as input
Fix bug with holes in array literals (#​7911 by @​bakkot)
// Input
new Test()
  .test()
  .test([, 0])
  .test();

// Prettier 2.0.2
[error] in.js: TypeError: Cannot read property 'type' of null

// Prettier 2.0.3
new Test().test().test([, 0]).test();
TypeScript
Wrap TSAsExpression (#​7869 by @​sosukesuzuki)
// Input
const value = thisIsAnIdentifier as ThisIsAReallyReallyReallyReallyReallyReallyReallyReallyReallyReallyReallyLongInterface;

// Prettier 2.0.2
const value = thisIsAnIdentifier as ThisIsAReallyReallyReallyReallyReallyReallyReallyReallyReallyReallyReallyLongInterface;

// Prettier 2.0.3
const value =
  thisIsAnIdentifier as
  ThisIsAReallyReallyReallyReallyReallyReallyReallyReallyReallyReallyReallyLongInterface;
Flow
Print dangling comments for inexact object type (#​7892 by @​sosukesuzuki)
// Input
type Foo = {
  // comment
  ...,
};

// Prettier 2.0.2
Error: Comment "comment" was not printed. Please report this error!

// Prettier 2.0.3
type Foo = {
  // comment
  ...,
};
Do not add comma for explicit inexact object with indexer property or no properties (#​7923 by @​DmitryGonchar)
// Input
type T = {
  [string]: number,
  ...,
}

type T = {
  // comment
  ...,
}

// Prettier 2.0.2
type T = {
  [string]: number,
  ...,
}

type T = {
  // comment
  ...,
}

// Prettier 2.0.3
type T = {
  [string]: number,
  ...
}

type T = {
  // comment
  ...
}
HTML
Fix printing of ignored empty inline elements (#​7867 by @​fisker)
<!-- Input-->
<!--prettier-ignore--><span></span>
<!--prettier-ignore--><span>_</span>

<!-- Prettier 2.0.2 (first output) -->
<!--prettier-ignore--><span
></span>
<!--prettier-ignore--><span>_</span>

<!-- Prettier 2.0.2 (second output) -->
<!--prettier-ignore--><span

></span>
<!--prettier-ignore--><span>_</span>

<!-- Prettier 2.0.3 -->
<!--prettier-ignore--><span></span>
<!--prettier-ignore--><span>_</span>
Format script and style inside tags with a colon in the name (#​7916 by @​fisker)
<!-- Input -->
<with:colon>
<script>function foo(){      return 1}</script>
<style>a         {color:         #f00}</style>
</with:colon>

<!-- Prettier 2.0.2 -->
<with:colon>
  <script>
    function foo(){ return 1}
  </script>
  <style>
    a {color: #f00}
  </style>
</with:colon>

<!-- Prettier 2.0.3 -->
<with:colon>
  <script>
    function foo() {
      return 1;
    }
  </script>
  <style>
    a {
      color: #f00;
    }
  </style>
</with:colon>
Other changes

v2.0.2

Compare Source

diff

2.0 regressions
JavaScript: Fix formatting of pseudo-elements and pseudo-classes in styled-components template literals (#​7842 by @​thorn0)
// Input
const Foo = styled.div`
  ${media.smallDown}::before {}
`;

// Prettier 2.0.0
const Foo = styled.div`
  ${media.smallDown}: : before{
  }
`;

// Prettier 2.0.2
const Foo = styled.div`
  ${media.smallDown}::before {
  }
`;
TypeScript: Avoid trailing commas on index signatures with only one parameter (#​7836 by @​bakkot)

TypeScript index signatures technically allow multiple parameters and trailing commas, but it's an error to have multiple parameters there, and Babel's TypeScript parser does not accept them. So Prettier now avoids putting a trailing comma there when you have only one parameter.

// Input
export type A = {
  a?: {
    [
      x: string
    ]: typeof SomeLongLongLongTypeName[keyof typeof SomeLongLongLongTypeName];
  } | null;
};

// Prettier 2.0.0
export type A = {
  a?: {
    [
      x: string,
    ]: typeof SomeLongLongLongTypeName[keyof typeof SomeLongLongLongTypeName];
  } | null;
};

// Prettier 2.0.2
export type A = {
  a?: {
    [
      x: string
    ]: typeof SomeLongLongLongTypeName[keyof typeof SomeLongLongLongTypeName];
  } | null;
};
Revert "markdown: fix redundant leading spaces in markdown list" (#​7847)

See #​7846

Other changes
TypeScript: Fix prettier-ignore in union types (#​7798 by @​thorn0)
// Input
export type a =
  // foo
  | foo1&foo2
  // prettier-ignore
  | bar1&bar2
  // baz
  | baz1&baz2;

// Prettier 2.0.0
export type a =
  // foo
  | foo1&foo2
    // prettier-ignore
  // prettier-ignore
  | (bar1 & bar2)
  // baz
  | (baz1 & baz2);

// Prettier 2.0.2
export type a =
  // foo
  | (foo1 & foo2)
  // prettier-ignore
  | bar1&bar2
  // baz
  | (baz1 & baz2);

v2.0.1

Compare Source

diff

API: Fix build script to not corrupt import-fresh module (#​7820 by @​thorn0)

v2.0.0

Compare Source

diff

🔗 Release Notes


Renovate configuration

📅 Schedule: "after 9pm,before 9am" in timezone Asia/Tokyo.

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

♻️ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by WhiteSource Renovate. View repository job log here.

@renovate renovate bot requested a review from a team as a code owner March 26, 2020 12:20
@renovate renovate bot added the renovate label Mar 26, 2020
@ghost ghost requested review from shisama and zaki-yama and removed request for a team March 26, 2020 12:20
@renovate renovate bot force-pushed the renovate/major-eslint-and-prettier branch from 09a3c68 to ffa4ce4 Compare March 27, 2020 19:41
@renovate renovate bot changed the title chore(deps): update dependency prettier to v2 fix(deps): update eslint and prettier (major) Mar 27, 2020
@renovate renovate bot force-pushed the renovate/major-eslint-and-prettier branch 7 times, most recently from 58bf8a4 to 046ed82 Compare April 2, 2020 12:42
@renovate renovate bot force-pushed the renovate/major-eslint-and-prettier branch 5 times, most recently from 880c573 to 12f1367 Compare April 10, 2020 23:57
@renovate renovate bot force-pushed the renovate/major-eslint-and-prettier branch 3 times, most recently from 973be92 to ae5478e Compare April 19, 2020 17:27
@renovate renovate bot force-pushed the renovate/major-eslint-and-prettier branch 6 times, most recently from 9b5e349 to b47a43f Compare April 28, 2020 12:34
@renovate renovate bot force-pushed the renovate/major-eslint-and-prettier branch 2 times, most recently from 6537a24 to 7d9fa45 Compare May 2, 2020 16:37
@renovate renovate bot force-pushed the renovate/major-eslint-and-prettier branch 2 times, most recently from be4a6a4 to 723eae9 Compare May 8, 2020 01:32
@renovate renovate bot force-pushed the renovate/major-eslint-and-prettier branch from 7504a36 to 7301ec8 Compare May 8, 2020 01:44
@renovate
Copy link
Contributor Author

renovate bot commented May 8, 2020

PR has been edited

👷 This PR has received other commits, so Renovate will stop updating it to avoid conflicts or other problems. If you wish to abandon your changes and have Renovate start over you may click the "rebase" checkbox in the PR body/description.

If you think this comment is in error and the branch is not modified, try deleting this comment. If it comes back again the next time Renovate runs, please submit an issue or seek config help.

@zaki-yama
Copy link
Contributor

I fixed CI failure in 0a09dc6 (it's because of major update of prettier).
And according to
https://github.com/facebook/react/blob/master/packages/eslint-plugin-react-hooks/CHANGELOG.md
there are some adds/updates of rules in eslint-plugin-react-hooks from ^2.5.1 -> ^4.0.0.

So we should merge it as a BREAKING CHANGE

CC @shisama

@koba04
Copy link
Contributor

koba04 commented Jun 15, 2020

I'm including the change in #272 and I'll update Prettier to v2 as another PR.

@koba04 koba04 closed this Jun 15, 2020
@koba04 koba04 deleted the renovate/major-eslint-and-prettier branch June 15, 2020 15:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants