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.
- package/README.md +1 -0
- package/lib/api/types.d.ts +2 -1
- package/lib/api/types.d.ts.map +1 -1
- package/lib/api/types.js +1 -1
- package/lib/api/types.js.map +1 -1
- package/lib/async-utils/errors.d.ts +4 -0
- package/lib/async-utils/errors.d.ts.map +1 -0
- package/lib/async-utils/errors.js +21 -0
- package/lib/async-utils/errors.js.map +1 -0
- package/lib/configs/config.d.ts +1645 -19
- package/lib/configs/config.d.ts.map +1 -1
- package/lib/configs/config.js +29 -39
- package/lib/configs/config.js.map +1 -1
- package/lib/options/default-options.d.ts.map +1 -1
- package/lib/options/default-options.js +9 -0
- package/lib/options/default-options.js.map +1 -1
- package/lib/parsers/angular.js.map +1 -1
- package/lib/parsers/css.d.ts +5 -0
- package/lib/parsers/css.d.ts.map +1 -0
- package/lib/parsers/css.js +72 -0
- package/lib/parsers/css.js.map +1 -0
- package/lib/rules/enforce-canonical-classes.d.ts +128 -50
- package/lib/rules/enforce-canonical-classes.d.ts.map +1 -1
- package/lib/rules/enforce-consistent-class-order.d.ts +132 -52
- package/lib/rules/enforce-consistent-class-order.d.ts.map +1 -1
- package/lib/rules/enforce-consistent-important-position.d.ts +124 -48
- package/lib/rules/enforce-consistent-important-position.d.ts.map +1 -1
- package/lib/rules/enforce-consistent-line-wrapping.d.ts +138 -55
- package/lib/rules/enforce-consistent-line-wrapping.d.ts.map +1 -1
- package/lib/rules/enforce-consistent-line-wrapping.js +5 -1
- package/lib/rules/enforce-consistent-line-wrapping.js.map +1 -1
- package/lib/rules/enforce-consistent-variable-syntax.d.ts +124 -48
- package/lib/rules/enforce-consistent-variable-syntax.d.ts.map +1 -1
- package/lib/rules/enforce-consistent-variable-syntax.js +1 -1
- package/lib/rules/enforce-consistent-variable-syntax.js.map +1 -1
- package/lib/rules/enforce-shorthand-classes.d.ts +126 -49
- package/lib/rules/enforce-shorthand-classes.d.ts.map +1 -1
- package/lib/rules/no-conflicting-classes.d.ts +124 -48
- package/lib/rules/no-conflicting-classes.d.ts.map +1 -1
- package/lib/rules/no-deprecated-classes.d.ts +126 -49
- package/lib/rules/no-deprecated-classes.d.ts.map +1 -1
- package/lib/rules/no-duplicate-classes.d.ts +124 -48
- package/lib/rules/no-duplicate-classes.d.ts.map +1 -1
- package/lib/rules/no-restricted-classes.d.ts +128 -50
- package/lib/rules/no-restricted-classes.d.ts.map +1 -1
- package/lib/rules/no-unknown-classes.d.ts +124 -48
- package/lib/rules/no-unknown-classes.d.ts.map +1 -1
- package/lib/rules/no-unnecessary-whitespace.d.ts +124 -48
- package/lib/rules/no-unnecessary-whitespace.d.ts.map +1 -1
- package/lib/tailwindcss/canonical-classes.async.v4.d.ts.map +1 -1
- package/lib/tailwindcss/canonical-classes.async.v4.js +11 -18
- package/lib/tailwindcss/canonical-classes.async.v4.js.map +1 -1
- package/lib/tailwindcss/canonical-classes.d.ts +3 -3
- package/lib/tailwindcss/canonical-classes.d.ts.map +1 -1
- package/lib/tailwindcss/canonical-classes.js.map +1 -1
- package/lib/types/ast.d.ts +21 -14
- package/lib/types/ast.d.ts.map +1 -1
- package/lib/types/rule.d.ts +11 -9
- package/lib/types/rule.d.ts.map +1 -1
- package/lib/utils/rule.d.ts +31 -2
- package/lib/utils/rule.d.ts.map +1 -1
- package/lib/utils/rule.js +39 -9
- package/lib/utils/rule.js.map +1 -1
- 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
|
|
package/lib/api/types.d.ts
CHANGED
package/lib/api/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/api/types.ts"],"names":[],"mappings":"AAAA,
|
|
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
|
|
1
|
+
export { MatcherType } from "../types/rule.js";
|
|
2
2
|
//# sourceMappingURL=types.js.map
|
package/lib/api/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/api/types.ts"],"names":[],"mappings":"
|
|
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"}
|