eslint-plugin-better-tailwindcss 4.0.1 → 4.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. package/README.md +1 -0
  2. package/lib/api/types.d.ts +2 -1
  3. package/lib/api/types.d.ts.map +1 -1
  4. package/lib/api/types.js +1 -1
  5. package/lib/api/types.js.map +1 -1
  6. package/lib/async-utils/errors.d.ts +4 -0
  7. package/lib/async-utils/errors.d.ts.map +1 -0
  8. package/lib/async-utils/errors.js +21 -0
  9. package/lib/async-utils/errors.js.map +1 -0
  10. package/lib/configs/config.d.ts +1645 -19
  11. package/lib/configs/config.d.ts.map +1 -1
  12. package/lib/configs/config.js +29 -39
  13. package/lib/configs/config.js.map +1 -1
  14. package/lib/options/default-options.d.ts.map +1 -1
  15. package/lib/options/default-options.js +9 -0
  16. package/lib/options/default-options.js.map +1 -1
  17. package/lib/parsers/angular.js.map +1 -1
  18. package/lib/parsers/css.d.ts +5 -0
  19. package/lib/parsers/css.d.ts.map +1 -0
  20. package/lib/parsers/css.js +72 -0
  21. package/lib/parsers/css.js.map +1 -0
  22. package/lib/rules/enforce-canonical-classes.d.ts +128 -50
  23. package/lib/rules/enforce-canonical-classes.d.ts.map +1 -1
  24. package/lib/rules/enforce-consistent-class-order.d.ts +132 -52
  25. package/lib/rules/enforce-consistent-class-order.d.ts.map +1 -1
  26. package/lib/rules/enforce-consistent-important-position.d.ts +124 -48
  27. package/lib/rules/enforce-consistent-important-position.d.ts.map +1 -1
  28. package/lib/rules/enforce-consistent-line-wrapping.d.ts +138 -55
  29. package/lib/rules/enforce-consistent-line-wrapping.d.ts.map +1 -1
  30. package/lib/rules/enforce-consistent-line-wrapping.js +5 -1
  31. package/lib/rules/enforce-consistent-line-wrapping.js.map +1 -1
  32. package/lib/rules/enforce-consistent-variable-syntax.d.ts +124 -48
  33. package/lib/rules/enforce-consistent-variable-syntax.d.ts.map +1 -1
  34. package/lib/rules/enforce-consistent-variable-syntax.js +1 -1
  35. package/lib/rules/enforce-consistent-variable-syntax.js.map +1 -1
  36. package/lib/rules/enforce-shorthand-classes.d.ts +126 -49
  37. package/lib/rules/enforce-shorthand-classes.d.ts.map +1 -1
  38. package/lib/rules/no-conflicting-classes.d.ts +124 -48
  39. package/lib/rules/no-conflicting-classes.d.ts.map +1 -1
  40. package/lib/rules/no-deprecated-classes.d.ts +126 -49
  41. package/lib/rules/no-deprecated-classes.d.ts.map +1 -1
  42. package/lib/rules/no-duplicate-classes.d.ts +124 -48
  43. package/lib/rules/no-duplicate-classes.d.ts.map +1 -1
  44. package/lib/rules/no-restricted-classes.d.ts +128 -50
  45. package/lib/rules/no-restricted-classes.d.ts.map +1 -1
  46. package/lib/rules/no-unknown-classes.d.ts +124 -48
  47. package/lib/rules/no-unknown-classes.d.ts.map +1 -1
  48. package/lib/rules/no-unnecessary-whitespace.d.ts +124 -48
  49. package/lib/rules/no-unnecessary-whitespace.d.ts.map +1 -1
  50. package/lib/tailwindcss/canonical-classes.async.v4.d.ts.map +1 -1
  51. package/lib/tailwindcss/canonical-classes.async.v4.js +11 -18
  52. package/lib/tailwindcss/canonical-classes.async.v4.js.map +1 -1
  53. package/lib/tailwindcss/canonical-classes.d.ts +3 -3
  54. package/lib/tailwindcss/canonical-classes.d.ts.map +1 -1
  55. package/lib/tailwindcss/canonical-classes.js.map +1 -1
  56. package/lib/types/ast.d.ts +21 -14
  57. package/lib/types/ast.d.ts.map +1 -1
  58. package/lib/types/rule.d.ts +11 -9
  59. package/lib/types/rule.d.ts.map +1 -1
  60. package/lib/utils/rule.d.ts +31 -2
  61. package/lib/utils/rule.d.ts.map +1 -1
  62. package/lib/utils/rule.js +39 -9
  63. package/lib/utils/rule.js.map +1 -1
  64. package/package.json +15 -14
package/README.md CHANGED
@@ -83,6 +83,7 @@ Depending on the flavor you are using, you need to install and configure the cor
83
83
  - Astro: [.astro](docs/parsers/astro.md)
84
84
  - Angular: [.html, .ts](docs/parsers/angular.md)
85
85
  - HTML: [.html](docs/parsers/html.md)
86
+ - CSS: [.css](docs/parsers/css.md)
86
87
  - JavaScript: [.js](docs/parsers/javascript.md)
87
88
  - TypeScript: [.ts](docs/parsers/typescript.md)
88
89
 
@@ -1,2 +1,3 @@
1
- export * from "../types/rule.js";
1
+ export type { ObjectKeyMatcher, ObjectValueMatcher, Regex, StringMatcher } from "../types/rule.js";
2
+ export { MatcherType } from "../types/rule.js";
2
3
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/api/types.ts"],"names":[],"mappings":"AAAA,cAAc,kCAAkC,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/api/types.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,gBAAgB,EAChB,kBAAkB,EAClB,KAAK,EACL,aAAa,EACd,MAAM,kCAAkC,CAAC;AAE1C,OAAO,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC"}
package/lib/api/types.js CHANGED
@@ -1,2 +1,2 @@
1
- export * from "../types/rule.js";
1
+ export { MatcherType } from "../types/rule.js";
2
2
  //# sourceMappingURL=types.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/api/types.ts"],"names":[],"mappings":"AAAA,cAAc,kCAAkC,CAAC"}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/api/types.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC"}
@@ -0,0 +1,4 @@
1
+ export type CatchErrors<Fn extends (...args: any[]) => any> = (...args: Parameters<Fn>) => [Error, undefined] | [undefined, Awaited<ReturnType<Fn>>];
2
+ export declare function catchErrors<Fn extends (...args: any[]) => Promise<any>>(fn: Fn): (...args: Parameters<Fn>) => Promise<[Error, undefined] | [undefined, Awaited<ReturnType<Fn>>]>;
3
+ export declare function rethrowErrors<Result>(result: [Error, undefined] | [undefined, Result]): Result;
4
+ //# sourceMappingURL=errors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/async-utils/errors.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,WAAW,CAAC,EAAE,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,IAAI,CAAC,GAAG,IAAI,EAAE,UAAU,CAAC,EAAE,CAAC,KAAK,CAAC,KAAK,EAAE,SAAS,CAAC,GAAG,CAAC,SAAS,EAAE,OAAO,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;AAErJ,wBAAgB,WAAW,CAAC,EAAE,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,OAAO,CAAC,GAAG,CAAC,EAAE,EAAE,EAAE,EAAE,GAAG,CAAC,GAAG,IAAI,EAAE,UAAU,CAAC,EAAE,CAAC,KAAK,OAAO,CAAC,CAAC,KAAK,EAAE,SAAS,CAAC,GAAG,CAAC,SAAS,EAAE,OAAO,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAWhL;AAED,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,KAAK,EAAE,SAAS,CAAC,GAAG,CAAC,SAAS,EAAE,MAAM,CAAC,GAAG,MAAM,CAQ9F"}
@@ -0,0 +1,21 @@
1
+ export function catchErrors(fn) {
2
+ return async (...args) => {
3
+ try {
4
+ return [undefined, await fn(...args)];
5
+ }
6
+ catch (error) {
7
+ if (error instanceof Error) {
8
+ return [error, undefined];
9
+ }
10
+ throw error;
11
+ }
12
+ };
13
+ }
14
+ export function rethrowErrors(result) {
15
+ const [error, value] = result;
16
+ if (error) {
17
+ throw error;
18
+ }
19
+ return value;
20
+ }
21
+ //# sourceMappingURL=errors.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/async-utils/errors.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,WAAW,CAA8C,EAAM;IAC7E,OAAO,KAAK,EAAE,GAAG,IAAoB,EAAE,EAAE;QACvC,IAAI,CAAC;YACH,OAAO,CAAC,SAAS,EAAE,MAAM,EAAE,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC;QACxC,CAAC;QAAC,OAAO,KAAK,EAAC,CAAC;YACd,IAAG,KAAK,YAAY,KAAK,EAAC,CAAC;gBACzB,OAAO,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;YAC5B,CAAC;YACD,MAAM,KAAK,CAAC;QACd,CAAC;IACH,CAAC,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,aAAa,CAAS,MAAgD;IACpF,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,GAAG,MAAM,CAAC;IAE9B,IAAG,KAAK,EAAC,CAAC;QACR,MAAM,KAAK,CAAC;IACd,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC"}