You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Drop support for `officialSorting` & `prependCustom` (`classnames-order`)
- New features from v3.1.0
- Tests adapted
- New tests
- README
- Include fix from #144 (by @mpsijm)
- BREAKING CHANGE: `groupByResponsive`, `officialSorting` and `prependCustom` are deprecated ☠️. The official sorting is always used for `classnames-order`.
43
+
> This was required in order to support classnames generated by plugins.
44
+
- FIX: [Many fixes](https://github.com/francoismassart/eslint-plugin-tailwindcss/pull/132) including support for classnames generated by plugins.
40
45
- FIX: [speeds up `enforces-shorthand` and `classnames-order`](https://github.com/francoismassart/eslint-plugin-tailwindcss/issues/136) with `officialSorting: true` by introducing WeakMap caches to reduce duplicate calculations (by [mpsijm](https://github.com/mpsijm) 🙏)
41
46
- New strategy for whitespaces and linebreaks: the plugin will attempt to leave them intact
42
47
- New option `officialSorting` for [`classnames-order`](docs/rules/classnames-order.md#officialsorting-default-false) can be set to `true` in order to use the same ordering order as the official [`prettier-plugin-tailwindcss`](https://www.npmjs.com/package/prettier-plugin-tailwindcss)
@@ -159,10 +164,7 @@ All these settings have nice default values that are explained in each rules' do
Copy file name to clipboardExpand all lines: docs/rules/classnames-order.md
-30Lines changed: 0 additions & 30 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,10 +25,7 @@ Examples of **correct** code for this rule:
25
25
"tailwindcss/classnames-order": [<enabled>, {
26
26
"callees":Array<string>,
27
27
"config":<string>|<object>,
28
-
"groupByResponsive":<boolean>,
29
28
"groups":Array<object>,
30
-
"officialSorting":<boolean>,
31
-
"prependCustom":<boolean>,
32
29
"removeDuplicates":<boolean>,
33
30
"tags":Array<string>,
34
31
}]
@@ -55,25 +52,6 @@ It is also possible to directly inject a configuration as plain `object` like `{
55
52
56
53
Finally, the plugin will [merge the provided configuration](https://tailwindcss.com/docs/configuration#referencing-in-java-script) with [Tailwind CSS's default configuration](https://github.com/tailwindlabs/tailwindcss/blob/master/stubs/defaultConfig.stub.js).
57
54
58
-
### `groupByResponsive` (default: `true`)
59
-
60
-
When this option was introduced in version 2.x.x of the plugin, this setting was set to `false` to avoid a tsunami of reorder in the classnames.
61
-
You had to set it to `true` intentionally.
62
-
63
-
Since version 3 of the plugin, the default value is now `true`, grouping by responsive modifier in priority vs. grouping by property.
Set `officialSorting` to `true` if you want to use the same ordering rules as the official plugin `prettier-plugin-tailwindcss`. Enabling this settings will cause `groupByResponsive`, `groups`, `prependCustom` and `removeDuplicates` options to be ignored.
122
-
123
-
### `prependCustom` (default: `false`)
124
-
125
-
By default, classnames which doesn't belong to Tailwind CSS will be pushed at the end. Set `prependCustom` to `true` if you prefer to move them at the beginning.
126
-
127
97
### `removeDuplicates` (default: `true`)
128
98
129
99
Duplicate classnames are automatically removed but you can always disable this behavior by setting `removeDuplicates` to `false`.
0 commit comments