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

Update ESLint and Prettier (patch) #174

Merged
merged 1 commit into from
Feb 5, 2024

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Dec 10, 2023

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
eslint-plugin-astro (source) ^0.31.0 -> ^0.31.4 age adoption passing confidence
eslint-plugin-prettier ^5.0.0 -> ^5.0.1 age adoption passing confidence
prettier (source) ^3.2.2 -> ^3.2.5 age adoption passing confidence
prettier-plugin-astro ^0.12.0 -> ^0.12.3 age adoption passing confidence

Release Notes

ota-meshi/eslint-plugin-astro (eslint-plugin-astro)

v0.31.4

Compare Source

Patch Changes

v0.31.3

Compare Source

Patch Changes

v0.31.2

Compare Source

Patch Changes

v0.31.1

Compare Source

Patch Changes
prettier/prettier (prettier)

v3.2.5

Compare Source

diff

Support Angular inline styles as single template literal (#​15968 by @​sosukesuzuki)

Angular v17 supports single string inline styles.

// Input
@​Component({
  template: `<div>...</div>`,
  styles: `h1 { color: blue; }`,
})
export class AppComponent {}

// Prettier 3.2.4
@&#8203;Component({
  template: `<div>...</div>`,
  styles: `h1 { color: blue; }`,
})
export class AppComponent {}

// Prettier 3.2.5
@&#8203;Component({
  template: `<div>...</div>`,
  styles: `
    h1 {
      color: blue;
    }
  `,
})
export class AppComponent {}
Unexpected embedded formatting for Angular template (#​15969 by @​JounQin)

Computed template should not be considered as Angular component template

// Input
const template = "foobar";

@&#8203;Component({
  [template]: `<h1>{{       hello }}</h1>`,
})
export class AppComponent {}

// Prettier 3.2.4
const template = "foobar";

@&#8203;Component({
  [template]: `<h1>{{ hello }}</h1>`,
})
export class AppComponent {}

// Prettier 3.2.5
const template = "foobar";

@&#8203;Component({
  [template]: `<h1>{{       hello }}</h1>`,
})
export class AppComponent {}
Use "json" parser for tsconfig.json by default (#​16012 by @​sosukesuzuki)

In v2.3.0, we introduced "jsonc" parser which adds trialing comma by default.

When adding a new parser we also define how it will be used based on the linguist-languages data.

tsconfig.json is a special file used by TypeScript, it uses .json file extension, but it actually uses the JSON with Comments syntax. However, we found that there are many third-party tools not recognize it correctly because of the confusing .json file extension.

We decide to treat it as a JSON file for now to avoid the extra configuration step.

To keep using the "jsonc" parser for your tsconfig.json files, add the following to your .pretterrc file

{
  "overrides": [
    {
      "files": ["tsconfig.json", "jsconfig.json"],
      "options": {
        "parser": "jsonc"
      }
    }
  ]
}

v3.2.4

Compare Source

diff

Fix incorrect parser inference (#​15947 by @​fisker)

Files like .eslintrc.json were incorrectly formatted as JSONC files.

// Input
prettier --file-info .eslintrc.json
{ "ignored": false, "inferredParser": "jsonc" }

// Prettier 3.2.4
prettier --file-info .eslintrc.json
{ "ignored": false, "inferredParser": "json" }

v3.2.3

Compare Source

diff

Throw errors for invalid code (#​15881 by @​fisker, @​Josh-Cena, @​auvred)
// Input
1++;

// Prettier 3.2.2
1++;

// Prettier 3.2.3
SyntaxError: Invalid left-hand side expression in unary operation (1:1)
> 1 | 1++;
    | ^
// Input
try {} catch (error = 1){}

// Prettier 3.2.2
try {
} catch (error) {}

// Prettier 3.2.3
SyntaxError: Catch clause variable cannot have an initializer. (1:23)
> 1 | try {} catch (error = 1){}
    |                       ^
Fix parser inference (#​15927 by @​fisker)
// Prettier 3.2.2
prettier --file-info tsconfig.json
{ "ignored": false, "inferredParser": "json" }

// Prettier 3.2.3
prettier --file-info tsconfig.json
{ "ignored": false, "inferredParser": "jsonc" }
withastro/prettier-plugin-astro (prettier-plugin-astro)

v0.12.3

Compare Source

Patch Changes
  • e75f9c7: Fix <br /> tags sometimes causing additional spaces to appear
  • b4b0918: Fix not being able to format expressions with more than 2 roots

Configuration

📅 Schedule: Branch creation - "after 8am and before 5pm" in timezone Asia/Tokyo, Automerge - At any time (no schedule defined).

🚦 Automerge: Enabled.

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 Mend Renovate. View repository job log here.

@renovate renovate bot requested a review from a team as a code owner December 10, 2023 02:21
@renovate renovate bot added the renovate label Dec 10, 2023
@renovate renovate bot requested review from moshisora and yamish123 and removed request for a team December 10, 2023 02:21
@renovate renovate bot enabled auto-merge (rebase) December 10, 2023 02:21
@renovate renovate bot force-pushed the renovate/patch-eslint-and-prettier branch 2 times, most recently from a533da3 to c5a66ad Compare December 16, 2023 05:43
@renovate renovate bot force-pushed the renovate/patch-eslint-and-prettier branch 3 times, most recently from a195315 to 2f67f9e Compare December 27, 2023 05:44
@renovate renovate bot force-pushed the renovate/patch-eslint-and-prettier branch 4 times, most recently from 19eeaec to dd1ed41 Compare January 2, 2024 06:14
@renovate renovate bot force-pushed the renovate/patch-eslint-and-prettier branch 3 times, most recently from 731c0e4 to 93e871a Compare January 9, 2024 04:01
@renovate renovate bot force-pushed the renovate/patch-eslint-and-prettier branch 9 times, most recently from 94e6b07 to 0e58733 Compare January 22, 2024 06:31
@renovate renovate bot force-pushed the renovate/patch-eslint-and-prettier branch 2 times, most recently from 59c9207 to 81fa712 Compare February 5, 2024 00:26
@renovate renovate bot force-pushed the renovate/patch-eslint-and-prettier branch from 81fa712 to c4cd6cb Compare February 5, 2024 01:38
@renovate renovate bot merged commit 33a1893 into master Feb 5, 2024
5 checks passed
@renovate renovate bot deleted the renovate/patch-eslint-and-prettier branch February 5, 2024 01:39
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.

1 participant