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 README to show more options for disabling and overrides #165

Merged
merged 1 commit into from
Mar 25, 2024

Conversation

ADTC
Copy link
Contributor

@ADTC ADTC commented Mar 22, 2024

The new feature of disabling with empty array can do more than just disabling globally and enabling for certain folders or files. It can do the opposite: enabling globally and disabling for certain folders or files. It can also do sort order overrides, where a different order applies to certain folders and files instead of the global order.

Feel free to suggest a rewrite of the text if needed. 🙂 I have used the reverse configuration in an actual project and it works well:

// .prettierrc
{
  "plugins": ["@ianvs/prettier-plugin-sort-imports"],
  "overrides": [
    {
      "files": "please/doNot/sortThis.ts",
      "options": {
        "importOrder": [] // disabled
      }
    }
  ],
  "importOrder": [ /* global order here */ ]
  //...
}

Tip: The overrides order can come before or after the global importOrder. It doesn't matter as Prettier will always apply the override regardless of where it is in .prettierrc.

The new feature of disabling with empty array can do more than just disabling globally and enabling for certain folders or files. It can do the opposite: enabling globally and disabling for certain folders or file. It can also do sort order overrides, where a different order applies to certain folders and files instead of the global order.
@ADTC
Copy link
Contributor Author

ADTC commented Mar 22, 2024

BTW: Would specifying "importOrder": null inside the overrides config make it use the default order (ignoring the custom global order)?

@IanVS
Copy link
Owner

IanVS commented Mar 25, 2024

Thanks for the contribution.

And yes, null is treated the same as undefined by prettier, and will cause the default to be used.

@IanVS IanVS merged commit 135b6e5 into IanVS:main Mar 25, 2024
8 checks passed
@ADTC ADTC deleted the patch-1 branch March 25, 2024 13:54
@farzadmf
Copy link

farzadmf commented May 2, 2024

@ADTC question about this:

I have the following config:

{
  "endOfLine": "auto",
  "importOrder": ["^@/(.*)$", "^[./]"],
  "importOrderParserPlugins": ["typescript", "jsx", "decorators-legacy"],
  "importOrderSeparation": true,
  "importOrderSortSpecifiers": true,
  "plugins": ["@ianvs/prettier-plugin-sort-imports"],
  "overrides": [
    {
      "files": "**/*.spec.ts*",
      "options": {
        "importOrder": []
      }
    }
  ],
  "printWidth": 120,
  "proseWrap": "always",
  "semi": true,
  "singleQuote": true,
  "tabWidth": 2,
  "trailingComma": "all"
}

And I have a test file named ...spec.tsx like this:

const myMock = jest.fn();

jest.mock('src/dependency/used/by/MyModule', () => { /* ... */ });

// import stuff
// import MyModule (jest.mock above would capture the dependency imported by this guy)

it('my tests', () => { /* ... */ });

Now, even with the override, the jest calls are moved after the imports, preventing the dependency to be mocked. Is there something I'm missing in the config?

@fbartho
Copy link
Collaborator

fbartho commented May 2, 2024

@farzadmf this plugin is set to hoist import expressions up to the top of the file. You probably want to disable this plugin on files that use jest.mock in that way since that’s intrinsically incompatible with any tooling that reorganizes imports and code.

@IanVS
Copy link
Owner

IanVS commented May 3, 2024

I believe jest.mock hoists itself to the top no matter where it is when the file is run. That's because in general, imports are always evaluated first even if other code is above it.

Maybe you can open a new issue about the exclusion pattern not working?

@farzadmf
Copy link

farzadmf commented May 3, 2024

Thank you both @IanVS and @fbartho for your replies.

You probably want to disable this plugin on files that use jest.mock in that way

That's what I'm trying to do actually 😆 . Although I'm pretty sure it's something I'm missing because I'd be surprised if people using jest (and its mocking) aren't sorting their imports (please see below for more context, in case you can think of something)

Maybe you can open a new issue about the exclusion pattern not working?

I can do that for sure; wanted to first confirm if I'm doing it properly or not, and what I expect to happen is what should happen

I believe jest.mock hoists itself to the ...

You lost me on this one 😝 , you said:

  • jest.mock hoists itself to the top
  • imports are always evaluated first

So, then, what's happening here? jest.mock is first or the imports 🤔

That being said, I must say I'm not super familiar with jest mocking, so if you guys know a better way, please do let me know (more context below).


Here's my situation:

  • I have src/a.tsx, src/b.ts, where b defines an object like this:
    export const myObj = {
      hello: ...
    }
  • I'm testing a, which does import { myObj } from b
  • I want to mock b, so in a.spec.tsx, there's:
    const myMock = jest.fn();
    
    jest.mock('src/b', () => ({
      myObj: {
        hello: myMock,
      }
    }))
    
    import { blah } from 'src/a';
    
    it('test blah with the mock etc', () => { /* ... */ })

Please let me know if there's a better way to do this so that I can keep the import sorting

@IanVS
Copy link
Owner

IanVS commented May 3, 2024

This isn't really the best place to debug jest issues. I'd suggest reading https://jestjs.io/docs/manual-mocks#using-with-es-module-imports, and if you're trying to run jest in experimental ESModule mode, then it seems not to be supported and you might want to consider migrating to vitest instead, which has much better ESM support.

Bottom line, is that sorting does not impact jest.mock (or vi.mock), so you can continue sorting imports without any impact on your test functionality.

@farzadmf
Copy link

farzadmf commented May 3, 2024

This isn't really the best place to debug jest issues

You're absolutely right; sorry about that; a bit of a desparate measure 🙂

you might want to consider migrating to vitest instead

Was honestly debating about that; now that you mentioned it, I will check it out


And, just in case of a 0.0001% chance that someone might face the same issue as me:

  • I ended up doing a dynamic import of my module inside my it tests.
  • So, in my it block, I do const { blah } = await import('src/a').

This way, the imports can be sorted, and the tests (and mockcing) work properly.

Thank you again @IanVS for the help and the great plugin

@ADTC
Copy link
Contributor Author

ADTC commented May 3, 2024

I apologize that I'm not of much help here. I think this discussion is better moved to a separate issue, rather than in this PR. Thank you though. 🙂

kodiakhq bot referenced this pull request in technifit/tasker Jun 26, 2024
… v4.3.0 (#725)

[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [@ianvs/prettier-plugin-sort-imports](https://togithub.com/ianvs/prettier-plugin-sort-imports) | [`4.2.1` -> `4.3.0`](https://renovatebot.com/diffs/npm/@ianvs%2fprettier-plugin-sort-imports/4.2.1/4.3.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@ianvs%2fprettier-plugin-sort-imports/4.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@ianvs%2fprettier-plugin-sort-imports/4.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@ianvs%2fprettier-plugin-sort-imports/4.2.1/4.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@ianvs%2fprettier-plugin-sort-imports/4.2.1/4.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>ianvs/prettier-plugin-sort-imports (@&#8203;ianvs/prettier-plugin-sort-imports)</summary>

### [`v4.3.0`](https://togithub.com/IanVS/prettier-plugin-sort-imports/releases/tag/v4.3.0)

[Compare Source](https://togithub.com/ianvs/prettier-plugin-sort-imports/compare/v4.2.1...v4.3.0)

#### What's Changed

##### Features

-   Add support for import attributes by [@&#8203;IanVS](https://togithub.com/IanVS) in [https://github.com/IanVS/prettier-plugin-sort-imports/pull/174](https://togithub.com/IanVS/prettier-plugin-sort-imports/pull/174)

This release adds support for experimental import attributes / assertions.  There have been a number of styles proposed by TC-39 over the years, but the latest is to use `import x from 'x' with { type: 'json' };`, which is called an "import attribute".  There is also an older "import assertion" form, which uses `assert` instead of `with`.

**Note:** You may need to add `"importAttributes"` to your `"importOrderParserPlugins"` option in order to support this.  And if you are using the older assertion style, you'll need to add it as `'[\"importAttributes\", {\"deprecatedAssertSyntax\": true}]'`.

This plugin will also convert the older assertion style to import attributes.

##### Bugfixes

-   Fix vue 2.7 support by [@&#8203;IanVS](https://togithub.com/IanVS) in [https://github.com/IanVS/prettier-plugin-sort-imports/pull/173](https://togithub.com/IanVS/prettier-plugin-sort-imports/pull/173)

##### TypeScript

-   Augment Prettier `Options` types with internal `PluginConfig` by [@&#8203;jeremy-code](https://togithub.com/jeremy-code) in [https://github.com/IanVS/prettier-plugin-sort-imports/pull/172](https://togithub.com/IanVS/prettier-plugin-sort-imports/pull/172)

You can now type your prettier config as simply `/** @&#8203;type {import("prettier").Config} */`, and you'll also get the types for the options this plugin adds, automatically.

##### Docs

-   Update README to show more options for disabling and overrides by [@&#8203;ADTC](https://togithub.com/ADTC) in [https://github.com/IanVS/prettier-plugin-sort-imports/pull/165](https://togithub.com/IanVS/prettier-plugin-sort-imports/pull/165)

#### New Contributors

-   [@&#8203;ADTC](https://togithub.com/ADTC) made their first contribution in [https://github.com/IanVS/prettier-plugin-sort-imports/pull/165](https://togithub.com/IanVS/prettier-plugin-sort-imports/pull/165)
-   [@&#8203;jeremy-code](https://togithub.com/jeremy-code) made their first contribution in [https://github.com/IanVS/prettier-plugin-sort-imports/pull/172](https://togithub.com/IanVS/prettier-plugin-sort-imports/pull/172)

**Full Changelog**: IanVS/prettier-plugin-sort-imports@v4.2.1...v4.3.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

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

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/technifit/tasker).
renovate bot referenced this pull request in sawyerh/highlights Jul 15, 2024
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
|
[@ianvs/prettier-plugin-sort-imports](https://togithub.com/ianvs/prettier-plugin-sort-imports)
| [`4.2.1` ->
`4.3.1`](https://renovatebot.com/diffs/npm/@ianvs%2fprettier-plugin-sort-imports/4.2.1/4.3.1)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/@ianvs%2fprettier-plugin-sort-imports/4.3.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@ianvs%2fprettier-plugin-sort-imports/4.3.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@ianvs%2fprettier-plugin-sort-imports/4.2.1/4.3.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@ianvs%2fprettier-plugin-sort-imports/4.2.1/4.3.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
|
[eslint-plugin-react](https://togithub.com/jsx-eslint/eslint-plugin-react)
| [`7.34.2` ->
`7.34.3`](https://renovatebot.com/diffs/npm/eslint-plugin-react/7.34.2/7.34.3)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/eslint-plugin-react/7.34.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/eslint-plugin-react/7.34.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/eslint-plugin-react/7.34.2/7.34.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/eslint-plugin-react/7.34.2/7.34.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
|
[prettier-plugin-tailwindcss](https://togithub.com/tailwindlabs/prettier-plugin-tailwindcss)
| [`^0.4.0` ->
`^0.6.0`](https://renovatebot.com/diffs/npm/prettier-plugin-tailwindcss/0.4.1/0.6.5)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/prettier-plugin-tailwindcss/0.6.5?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/prettier-plugin-tailwindcss/0.6.5?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/prettier-plugin-tailwindcss/0.4.1/0.6.5?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/prettier-plugin-tailwindcss/0.4.1/0.6.5?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>ianvs/prettier-plugin-sort-imports
(@&#8203;ianvs/prettier-plugin-sort-imports)</summary>

###
[`v4.3.1`](https://togithub.com/IanVS/prettier-plugin-sort-imports/releases/tag/v4.3.1)

[Compare
Source](https://togithub.com/ianvs/prettier-plugin-sort-imports/compare/v4.3.0...v4.3.1)

#### What's Changed

- fixes readme with correct BUILTIN_MODULES setting name by
[@&#8203;tusharf5](https://togithub.com/tusharf5) in
[https://github.com/IanVS/prettier-plugin-sort-imports/pull/177](https://togithub.com/IanVS/prettier-plugin-sort-imports/pull/177)
- Add support for return in Astro component script by
[@&#8203;IanVS](https://togithub.com/IanVS) in
[https://github.com/IanVS/prettier-plugin-sort-imports/pull/176](https://togithub.com/IanVS/prettier-plugin-sort-imports/pull/176)

#### New Contributors

- [@&#8203;tusharf5](https://togithub.com/tusharf5) made their first
contribution in
[https://github.com/IanVS/prettier-plugin-sort-imports/pull/177](https://togithub.com/IanVS/prettier-plugin-sort-imports/pull/177)

**Full Changelog**:
IanVS/prettier-plugin-sort-imports@v4.3.0...v4.3.1

###
[`v4.3.0`](https://togithub.com/IanVS/prettier-plugin-sort-imports/releases/tag/v4.3.0)

[Compare
Source](https://togithub.com/ianvs/prettier-plugin-sort-imports/compare/v4.2.1...v4.3.0)

#### What's Changed

##### Features

- Add support for import attributes by
[@&#8203;IanVS](https://togithub.com/IanVS) in
[https://github.com/IanVS/prettier-plugin-sort-imports/pull/174](https://togithub.com/IanVS/prettier-plugin-sort-imports/pull/174)

This release adds support for experimental import attributes /
assertions. There have been a number of styles proposed by TC-39 over
the years, but the latest is to use `import x from 'x' with { type:
'json' };`, which is called an "import attribute". There is also an
older "import assertion" form, which uses `assert` instead of `with`.

**Note:** You may need to add `"importAttributes"` to your
`"importOrderParserPlugins"` option in order to support this. And if you
are using the older assertion style, you'll need to add it as
`'[\"importAttributes\", {\"deprecatedAssertSyntax\": true}]'`.

This plugin will also convert the older assertion style to import
attributes.

##### Bugfixes

- Fix vue 2.7 support by [@&#8203;IanVS](https://togithub.com/IanVS) in
[https://github.com/IanVS/prettier-plugin-sort-imports/pull/173](https://togithub.com/IanVS/prettier-plugin-sort-imports/pull/173)

##### TypeScript

- Augment Prettier `Options` types with internal `PluginConfig` by
[@&#8203;jeremy-code](https://togithub.com/jeremy-code) in
[https://github.com/IanVS/prettier-plugin-sort-imports/pull/172](https://togithub.com/IanVS/prettier-plugin-sort-imports/pull/172)

You can now type your prettier config as simply `/** @&#8203;type
{import("prettier").Config} */`, and you'll also get the types for the
options this plugin adds, automatically.

##### Docs

- Update README to show more options for disabling and overrides by
[@&#8203;ADTC](https://togithub.com/ADTC) in
[https://github.com/IanVS/prettier-plugin-sort-imports/pull/165](https://togithub.com/IanVS/prettier-plugin-sort-imports/pull/165)

#### New Contributors

- [@&#8203;ADTC](https://togithub.com/ADTC) made their first
contribution in
[https://github.com/IanVS/prettier-plugin-sort-imports/pull/165](https://togithub.com/IanVS/prettier-plugin-sort-imports/pull/165)
- [@&#8203;jeremy-code](https://togithub.com/jeremy-code) made their
first contribution in
[https://github.com/IanVS/prettier-plugin-sort-imports/pull/172](https://togithub.com/IanVS/prettier-plugin-sort-imports/pull/172)

**Full Changelog**:
IanVS/prettier-plugin-sort-imports@v4.2.1...v4.3.0

</details>

<details>
<summary>jsx-eslint/eslint-plugin-react (eslint-plugin-react)</summary>

###
[`v7.34.3`](https://togithub.com/jsx-eslint/eslint-plugin-react/blob/HEAD/CHANGELOG.md#7343---20240618)

[Compare
Source](https://togithub.com/jsx-eslint/eslint-plugin-react/compare/v7.34.2...v7.34.3)

##### Fixed

- \[`prop-types`]: null-check rootNode before calling getScope
([#&#8203;3762][] [@&#8203;crnhrv](https://togithub.com/crnhrv))
- \[`boolean-prop-naming`]: avoid a crash with a spread prop
([#&#8203;3733][] [@&#8203;ljharb](https://togithub.com/ljharb))
- \[`jsx-boolean-value`]: `assumeUndefinedIsFalse` with `never` must not
allow explicit `true` value ([#&#8203;3757][]
[@&#8203;6uliver](https://togithub.com/6uliver))
- \[`no-object-type-as-default-prop`]: enable rule for components with
many parameters ([#&#8203;3768][]
[@&#8203;JulienR1](https://togithub.com/JulienR1))
- \[`jsx-key`]: incorrect behavior for checkKeyMustBeforeSpread with map
callbacks ([#&#8203;3769][]
[@&#8203;akulsr0](https://togithub.com/akulsr0))

[7.34.3]:
https://togithub.com/jsx-eslint/eslint-plugin-react/compare/v7.34.2...v7.34.3

[#&#8203;3769]:
https://togithub.com/jsx-eslint/eslint-plugin-react/pull/3769

[#&#8203;3768]:
https://togithub.com/jsx-eslint/eslint-plugin-react/pull/3768

[#&#8203;3762]:
https://togithub.com/jsx-eslint/eslint-plugin-react/pull/3762

[#&#8203;3757]:
https://togithub.com/jsx-eslint/eslint-plugin-react/pull/3757

[#&#8203;3733]:
https://togithub.com/jsx-eslint/eslint-plugin-react/issues/3733

</details>

<details>
<summary>tailwindlabs/prettier-plugin-tailwindcss
(prettier-plugin-tailwindcss)</summary>

###
[`v0.6.5`](https://togithub.com/tailwindlabs/prettier-plugin-tailwindcss/blob/HEAD/CHANGELOG.md#065---2024-06-17)

[Compare
Source](https://togithub.com/tailwindlabs/prettier-plugin-tailwindcss/compare/v0.6.4...v0.6.5)

- Only re-apply string escaping when necessary
([#&#8203;295](https://togithub.com/tailwindlabs/prettier-plugin-tailwindcss/pull/295))

###
[`v0.6.4`](https://togithub.com/tailwindlabs/prettier-plugin-tailwindcss/blob/HEAD/CHANGELOG.md#064---2024-06-12)

[Compare
Source](https://togithub.com/tailwindlabs/prettier-plugin-tailwindcss/compare/v0.6.3...v0.6.4)

- Export `PluginOptions` type
([#&#8203;292](https://togithub.com/tailwindlabs/prettier-plugin-tailwindcss/pull/292))

###
[`v0.6.3`](https://togithub.com/tailwindlabs/prettier-plugin-tailwindcss/blob/HEAD/CHANGELOG.md#063---2024-06-11)

[Compare
Source](https://togithub.com/tailwindlabs/prettier-plugin-tailwindcss/compare/v0.6.2...v0.6.3)

- Improve detection of string concatenation
([#&#8203;288](https://togithub.com/tailwindlabs/prettier-plugin-tailwindcss/pull/288))

###
[`v0.6.2`](https://togithub.com/tailwindlabs/prettier-plugin-tailwindcss/blob/HEAD/CHANGELOG.md#062---2024-06-07)

[Compare
Source](https://togithub.com/tailwindlabs/prettier-plugin-tailwindcss/compare/v0.6.1...v0.6.2)

##### Changed

- Only remove duplicate Tailwind classes
([#&#8203;277](https://togithub.com/tailwindlabs/prettier-plugin-tailwindcss/pull/277))
- Make sure escapes in classes are preserved in string literals
([#&#8203;286](https://togithub.com/tailwindlabs/prettier-plugin-tailwindcss/pull/286))

###
[`v0.6.1`](https://togithub.com/tailwindlabs/prettier-plugin-tailwindcss/blob/HEAD/CHANGELOG.md#061---2024-05-31)

[Compare
Source](https://togithub.com/tailwindlabs/prettier-plugin-tailwindcss/compare/v0.6.0...v0.6.1)

##### Added

- Add new `tailwindPreserveDuplicates` option to disable removal of
duplicate classes
([#&#8203;276](https://togithub.com/tailwindlabs/prettier-plugin-tailwindcss/pull/276))

##### Fixed

- Improve handling of whitespace removal when concatenating strings
([#&#8203;276](https://togithub.com/tailwindlabs/prettier-plugin-tailwindcss/pull/276))
- Fix a bug where Angular expressions may produce invalid code after
sorting
([#&#8203;276](https://togithub.com/tailwindlabs/prettier-plugin-tailwindcss/pull/276))
- Disabled whitespace and duplicate class removal for Liquid and Svelte
([#&#8203;276](https://togithub.com/tailwindlabs/prettier-plugin-tailwindcss/pull/276))

###
[`v0.6.0`](https://togithub.com/tailwindlabs/prettier-plugin-tailwindcss/blob/HEAD/CHANGELOG.md#060---2024-05-30)

[Compare
Source](https://togithub.com/tailwindlabs/prettier-plugin-tailwindcss/compare/v0.5.14...v0.6.0)

##### Changed

- Remove duplicate classes
([#&#8203;272](https://togithub.com/tailwindlabs/prettier-plugin-tailwindcss/pull/272))
- Remove extra whitespace around classes
([#&#8203;272](https://togithub.com/tailwindlabs/prettier-plugin-tailwindcss/pull/272))

###
[`v0.5.14`](https://togithub.com/tailwindlabs/prettier-plugin-tailwindcss/blob/HEAD/CHANGELOG.md#0514---2024-04-15)

[Compare
Source](https://togithub.com/tailwindlabs/prettier-plugin-tailwindcss/compare/v0.5.13...v0.5.14)

##### Fixed

- Fix detection of v4 projects on Windows
([#&#8203;265](https://togithub.com/tailwindlabs/prettier-plugin-tailwindcss/pull/265))

###
[`v0.5.13`](https://togithub.com/tailwindlabs/prettier-plugin-tailwindcss/blob/HEAD/CHANGELOG.md#0513---2024-03-27)

[Compare
Source](https://togithub.com/tailwindlabs/prettier-plugin-tailwindcss/compare/v0.5.12...v0.5.13)

##### Added

- Add support for `@zackad/prettier-plugin-twig-melody`
([#&#8203;255](https://togithub.com/tailwindlabs/prettier-plugin-tailwindcss/pull/255))

###
[`v0.5.12`](https://togithub.com/tailwindlabs/prettier-plugin-tailwindcss/blob/HEAD/CHANGELOG.md#0512---2024-03-06)

[Compare
Source](https://togithub.com/tailwindlabs/prettier-plugin-tailwindcss/compare/v0.5.11...v0.5.12)

##### Added

- Add support for `prettier-plugin-sort-imports`
([#&#8203;241](https://togithub.com/tailwindlabs/prettier-plugin-tailwindcss/pull/241))
- Add support for Tailwind CSS v4.0
([#&#8203;249](https://togithub.com/tailwindlabs/prettier-plugin-tailwindcss/pull/249))

###
[`v0.5.11`](https://togithub.com/tailwindlabs/prettier-plugin-tailwindcss/blob/HEAD/CHANGELOG.md#0511---2024-01-05)

[Compare
Source](https://togithub.com/tailwindlabs/prettier-plugin-tailwindcss/compare/v0.5.10...v0.5.11)

##### Changed

- Bumped bundled version of Tailwind CSS to v3.4.1
([#&#8203;240](https://togithub.com/tailwindlabs/prettier-plugin-tailwindcss/pull/240))

###
[`v0.5.10`](https://togithub.com/tailwindlabs/prettier-plugin-tailwindcss/blob/HEAD/CHANGELOG.md#0510---2023-12-28)

[Compare
Source](https://togithub.com/tailwindlabs/prettier-plugin-tailwindcss/compare/v0.5.9...v0.5.10)

##### Changed

- Bumped bundled version of Tailwind CSS to v3.4
([#&#8203;235](https://togithub.com/tailwindlabs/prettier-plugin-tailwindcss/pull/235))

###
[`v0.5.9`](https://togithub.com/tailwindlabs/prettier-plugin-tailwindcss/blob/HEAD/CHANGELOG.md#059---2023-12-05)

[Compare
Source](https://togithub.com/tailwindlabs/prettier-plugin-tailwindcss/compare/v0.5.8...v0.5.9)

##### Fixed

- Fixed location of embedded preflight CSS file
([#&#8203;231](https://togithub.com/tailwindlabs/prettier-plugin-tailwindcss/pull/231))

###
[`v0.5.8`](https://togithub.com/tailwindlabs/prettier-plugin-tailwindcss/blob/HEAD/CHANGELOG.md#058---2023-12-05)

[Compare
Source](https://togithub.com/tailwindlabs/prettier-plugin-tailwindcss/compare/v0.5.7...v0.5.8)

##### Added

- Re-enable support for `prettier-plugin-marko`
([#&#8203;229](https://togithub.com/tailwindlabs/prettier-plugin-tailwindcss/pull/229))

###
[`v0.5.7`](https://togithub.com/tailwindlabs/prettier-plugin-tailwindcss/blob/HEAD/CHANGELOG.md#057---2023-11-08)

[Compare
Source](https://togithub.com/tailwindlabs/prettier-plugin-tailwindcss/compare/v0.5.6...v0.5.7)

##### Fixed

- Fix sorting inside dynamic custom attributes
([#&#8203;225](https://togithub.com/tailwindlabs/prettier-plugin-tailwindcss/pull/225))

###
[`v0.5.6`](https://togithub.com/tailwindlabs/prettier-plugin-tailwindcss/blob/HEAD/CHANGELOG.md#056---2023-10-12)

[Compare
Source](https://togithub.com/tailwindlabs/prettier-plugin-tailwindcss/compare/v0.5.5...v0.5.6)

##### Fixed

- Fix sorting inside `{{ … }}` expressions when using
`@shopify/prettier-plugin-liquid` v1.3+
([#&#8203;222](https://togithub.com/tailwindlabs/prettier-plugin-tailwindcss/pull/222))

###
[`v0.5.5`](https://togithub.com/tailwindlabs/prettier-plugin-tailwindcss/blob/HEAD/CHANGELOG.md#055---2023-10-03)

[Compare
Source](https://togithub.com/tailwindlabs/prettier-plugin-tailwindcss/compare/v0.5.4...v0.5.5)

##### Fixed

- Sort classes inside `className` in Astro
([#&#8203;215](https://togithub.com/tailwindlabs/prettier-plugin-tailwindcss/pull/215))
- Support member access on function calls
([#&#8203;218](https://togithub.com/tailwindlabs/prettier-plugin-tailwindcss/pull/218))

###
[`v0.5.4`](https://togithub.com/tailwindlabs/prettier-plugin-tailwindcss/blob/HEAD/CHANGELOG.md#054---2023-08-31)

[Compare
Source](https://togithub.com/tailwindlabs/prettier-plugin-tailwindcss/compare/v0.5.3...v0.5.4)

##### Fixed

- Type `tailwindFunctions` and `tailwindAttributes` as optional
([#&#8203;206](https://togithub.com/tailwindlabs/prettier-plugin-tailwindcss/pull/206))
- Don’t break `@apply … #{'!important'}` sorting in SCSS
([#&#8203;212](https://togithub.com/tailwindlabs/prettier-plugin-tailwindcss/pull/212))

###
[`v0.5.3`](https://togithub.com/tailwindlabs/prettier-plugin-tailwindcss/blob/HEAD/CHANGELOG.md#053---2023-08-15)

[Compare
Source](https://togithub.com/tailwindlabs/prettier-plugin-tailwindcss/compare/v0.5.2...v0.5.3)

##### Fixed

- Fix CJS `__dirname` interop on Windows
([#&#8203;204](https://togithub.com/tailwindlabs/prettier-plugin-tailwindcss/pull/204))

###
[`v0.5.2`](https://togithub.com/tailwindlabs/prettier-plugin-tailwindcss/blob/HEAD/CHANGELOG.md#052---2023-08-11)

[Compare
Source](https://togithub.com/tailwindlabs/prettier-plugin-tailwindcss/compare/v0.5.1...v0.5.2)

##### Fixed

- Fix intertop with bundled CJS dependencies
([#&#8203;199](https://togithub.com/tailwindlabs/prettier-plugin-tailwindcss/pull/199))

###
[`v0.5.1`](https://togithub.com/tailwindlabs/prettier-plugin-tailwindcss/blob/HEAD/CHANGELOG.md#051---2023-08-10)

[Compare
Source](https://togithub.com/tailwindlabs/prettier-plugin-tailwindcss/compare/v0.5.0...v0.5.1)

##### Fixed

- Updated Prettier peer dependency
([#&#8203;197](https://togithub.com/tailwindlabs/prettier-plugin-tailwindcss/pull/197))

###
[`v0.5.0`](https://togithub.com/tailwindlabs/prettier-plugin-tailwindcss/blob/HEAD/CHANGELOG.md#050---2023-08-10)

[Compare
Source](https://togithub.com/tailwindlabs/prettier-plugin-tailwindcss/compare/v0.4.1...v0.5.0)

##### Added

- Sort expressions in Astro's `class:list` attribute
([#&#8203;192](https://togithub.com/tailwindlabs/prettier-plugin-tailwindcss/pull/192))
- Re-enabled support for plugins when using Prettier v3+
([#&#8203;195](https://togithub.com/tailwindlabs/prettier-plugin-tailwindcss/pull/195))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "before 4am on the first day of the
month" (UTC), 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](https://togithub.com/renovatebot/renovate/discussions) if
that's undesired.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/sawyerh/highlights).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40MjEuMCIsInVwZGF0ZWRJblZlciI6IjM3LjQzMS40IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
renovate bot referenced this pull request in GSTJ/react-native-magic-modal Jul 17, 2024
… v4.3.1 (#97)

[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
|
[@ianvs/prettier-plugin-sort-imports](https://togithub.com/ianvs/prettier-plugin-sort-imports)
| [`4.2.1` ->
`4.3.1`](https://renovatebot.com/diffs/npm/@ianvs%2fprettier-plugin-sort-imports/4.2.1/4.3.1)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/@ianvs%2fprettier-plugin-sort-imports/4.3.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@ianvs%2fprettier-plugin-sort-imports/4.3.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@ianvs%2fprettier-plugin-sort-imports/4.2.1/4.3.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@ianvs%2fprettier-plugin-sort-imports/4.2.1/4.3.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>ianvs/prettier-plugin-sort-imports
(@&#8203;ianvs/prettier-plugin-sort-imports)</summary>

###
[`v4.3.1`](https://togithub.com/IanVS/prettier-plugin-sort-imports/releases/tag/v4.3.1)

[Compare
Source](https://togithub.com/ianvs/prettier-plugin-sort-imports/compare/v4.3.0...v4.3.1)

#### What's Changed

- fixes readme with correct BUILTIN_MODULES setting name by
[@&#8203;tusharf5](https://togithub.com/tusharf5) in
[https://github.com/IanVS/prettier-plugin-sort-imports/pull/177](https://togithub.com/IanVS/prettier-plugin-sort-imports/pull/177)
- Add support for return in Astro component script by
[@&#8203;IanVS](https://togithub.com/IanVS) in
[https://github.com/IanVS/prettier-plugin-sort-imports/pull/176](https://togithub.com/IanVS/prettier-plugin-sort-imports/pull/176)

#### New Contributors

- [@&#8203;tusharf5](https://togithub.com/tusharf5) made their first
contribution in
[https://github.com/IanVS/prettier-plugin-sort-imports/pull/177](https://togithub.com/IanVS/prettier-plugin-sort-imports/pull/177)

**Full Changelog**:
IanVS/prettier-plugin-sort-imports@v4.3.0...v4.3.1

###
[`v4.3.0`](https://togithub.com/IanVS/prettier-plugin-sort-imports/releases/tag/v4.3.0)

[Compare
Source](https://togithub.com/ianvs/prettier-plugin-sort-imports/compare/v4.2.1...v4.3.0)

#### What's Changed

##### Features

- Add support for import attributes by
[@&#8203;IanVS](https://togithub.com/IanVS) in
[https://github.com/IanVS/prettier-plugin-sort-imports/pull/174](https://togithub.com/IanVS/prettier-plugin-sort-imports/pull/174)

This release adds support for experimental import attributes /
assertions. There have been a number of styles proposed by TC-39 over
the years, but the latest is to use `import x from 'x' with { type:
'json' };`, which is called an "import attribute". There is also an
older "import assertion" form, which uses `assert` instead of `with`.

**Note:** You may need to add `"importAttributes"` to your
`"importOrderParserPlugins"` option in order to support this. And if you
are using the older assertion style, you'll need to add it as
`'[\"importAttributes\", {\"deprecatedAssertSyntax\": true}]'`.

This plugin will also convert the older assertion style to import
attributes.

##### Bugfixes

- Fix vue 2.7 support by [@&#8203;IanVS](https://togithub.com/IanVS) in
[https://github.com/IanVS/prettier-plugin-sort-imports/pull/173](https://togithub.com/IanVS/prettier-plugin-sort-imports/pull/173)

##### TypeScript

- Augment Prettier `Options` types with internal `PluginConfig` by
[@&#8203;jeremy-code](https://togithub.com/jeremy-code) in
[https://github.com/IanVS/prettier-plugin-sort-imports/pull/172](https://togithub.com/IanVS/prettier-plugin-sort-imports/pull/172)

You can now type your prettier config as simply `/** @&#8203;type
{import("prettier").Config} */`, and you'll also get the types for the
options this plugin adds, automatically.

##### Docs

- Update README to show more options for disabling and overrides by
[@&#8203;ADTC](https://togithub.com/ADTC) in
[https://github.com/IanVS/prettier-plugin-sort-imports/pull/165](https://togithub.com/IanVS/prettier-plugin-sort-imports/pull/165)

#### New Contributors

- [@&#8203;ADTC](https://togithub.com/ADTC) made their first
contribution in
[https://github.com/IanVS/prettier-plugin-sort-imports/pull/165](https://togithub.com/IanVS/prettier-plugin-sort-imports/pull/165)
- [@&#8203;jeremy-code](https://togithub.com/jeremy-code) made their
first contribution in
[https://github.com/IanVS/prettier-plugin-sort-imports/pull/172](https://togithub.com/IanVS/prettier-plugin-sort-imports/pull/172)

**Full Changelog**:
IanVS/prettier-plugin-sort-imports@v4.2.1...v4.3.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/GSTJ/react-native-magic-modal).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40MzEuNCIsInVwZGF0ZWRJblZlciI6IjM3LjQzMS40IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
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.

4 participants