@dhzh/eslint-plugin-better-tailwindcss 0.0.0-stage → 4.9.0-patch

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 (423) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +247 -2
  3. package/lib/api/defaults.d.ts +103 -0
  4. package/lib/api/defaults.d.ts.map +1 -0
  5. package/lib/api/defaults.js +34 -0
  6. package/lib/api/defaults.js.map +1 -0
  7. package/lib/api/types.d.ts +9 -0
  8. package/lib/api/types.d.ts.map +1 -0
  9. package/lib/api/types.js +5 -0
  10. package/lib/api/types.js.map +1 -0
  11. package/lib/async-utils/cache.d.ts +30 -0
  12. package/lib/async-utils/cache.d.ts.map +1 -0
  13. package/lib/async-utils/cache.js +116 -0
  14. package/lib/async-utils/cache.js.map +1 -0
  15. package/lib/async-utils/escape.d.ts +2 -0
  16. package/lib/async-utils/escape.d.ts.map +1 -0
  17. package/lib/async-utils/escape.js +5 -0
  18. package/lib/async-utils/escape.js.map +1 -0
  19. package/lib/async-utils/fs.d.ts +3 -0
  20. package/lib/async-utils/fs.d.ts.map +1 -0
  21. package/lib/async-utils/fs.js +28 -0
  22. package/lib/async-utils/fs.js.map +1 -0
  23. package/lib/async-utils/module.d.ts +3 -0
  24. package/lib/async-utils/module.d.ts.map +1 -0
  25. package/lib/async-utils/module.js +7 -0
  26. package/lib/async-utils/module.js.map +1 -0
  27. package/lib/async-utils/operations.d.ts +23 -0
  28. package/lib/async-utils/operations.d.ts.map +1 -0
  29. package/lib/async-utils/operations.js +2 -0
  30. package/lib/async-utils/operations.js.map +1 -0
  31. package/lib/async-utils/order.d.ts +4 -0
  32. package/lib/async-utils/order.d.ts.map +1 -0
  33. package/lib/async-utils/order.js +5 -0
  34. package/lib/async-utils/order.js.map +1 -0
  35. package/lib/async-utils/path.d.ts +2 -0
  36. package/lib/async-utils/path.d.ts.map +1 -0
  37. package/lib/async-utils/path.js +7 -0
  38. package/lib/async-utils/path.js.map +1 -0
  39. package/lib/async-utils/platform.d.ts +2 -0
  40. package/lib/async-utils/platform.d.ts.map +1 -0
  41. package/lib/async-utils/platform.js +4 -0
  42. package/lib/async-utils/platform.js.map +1 -0
  43. package/lib/async-utils/regex.d.ts +3 -0
  44. package/lib/async-utils/regex.d.ts.map +1 -0
  45. package/lib/async-utils/regex.js +32 -0
  46. package/lib/async-utils/regex.js.map +1 -0
  47. package/lib/async-utils/resolvers.d.ts +7 -0
  48. package/lib/async-utils/resolvers.d.ts.map +1 -0
  49. package/lib/async-utils/resolvers.js +64 -0
  50. package/lib/async-utils/resolvers.js.map +1 -0
  51. package/lib/async-utils/segment.d.ts +2 -0
  52. package/lib/async-utils/segment.d.ts.map +1 -0
  53. package/lib/async-utils/segment.js +82 -0
  54. package/lib/async-utils/segment.js.map +1 -0
  55. package/lib/async-utils/worker.d.ts +3 -0
  56. package/lib/async-utils/worker.d.ts.map +1 -0
  57. package/lib/async-utils/worker.js +17 -0
  58. package/lib/async-utils/worker.js.map +1 -0
  59. package/lib/configs/config.d.ts +3521 -0
  60. package/lib/configs/config.d.ts.map +1 -0
  61. package/lib/configs/config.js +98 -0
  62. package/lib/configs/config.js.map +1 -0
  63. package/lib/options/callees/cc.d.ts +30 -0
  64. package/lib/options/callees/cc.d.ts.map +1 -0
  65. package/lib/options/callees/cc.js +25 -0
  66. package/lib/options/callees/cc.js.map +1 -0
  67. package/lib/options/callees/clb.d.ts +35 -0
  68. package/lib/options/callees/clb.d.ts.map +1 -0
  69. package/lib/options/callees/clb.js +39 -0
  70. package/lib/options/callees/clb.js.map +1 -0
  71. package/lib/options/callees/clsx.d.ts +30 -0
  72. package/lib/options/callees/clsx.d.ts.map +1 -0
  73. package/lib/options/callees/clsx.js +25 -0
  74. package/lib/options/callees/clsx.js.map +1 -0
  75. package/lib/options/callees/cn.d.ts +30 -0
  76. package/lib/options/callees/cn.d.ts.map +1 -0
  77. package/lib/options/callees/cn.js +25 -0
  78. package/lib/options/callees/cn.js.map +1 -0
  79. package/lib/options/callees/cnb.d.ts +30 -0
  80. package/lib/options/callees/cnb.d.ts.map +1 -0
  81. package/lib/options/callees/cnb.js +25 -0
  82. package/lib/options/callees/cnb.js.map +1 -0
  83. package/lib/options/callees/ctl.d.ts +17 -0
  84. package/lib/options/callees/ctl.d.ts.map +1 -0
  85. package/lib/options/callees/ctl.js +15 -0
  86. package/lib/options/callees/ctl.js.map +1 -0
  87. package/lib/options/callees/cva.d.ts +40 -0
  88. package/lib/options/callees/cva.d.ts.map +1 -0
  89. package/lib/options/callees/cva.js +37 -0
  90. package/lib/options/callees/cva.js.map +1 -0
  91. package/lib/options/callees/cx.d.ts +30 -0
  92. package/lib/options/callees/cx.d.ts.map +1 -0
  93. package/lib/options/callees/cx.js +25 -0
  94. package/lib/options/callees/cx.js.map +1 -0
  95. package/lib/options/callees/dcnb.d.ts +30 -0
  96. package/lib/options/callees/dcnb.d.ts.map +1 -0
  97. package/lib/options/callees/dcnb.js +25 -0
  98. package/lib/options/callees/dcnb.js.map +1 -0
  99. package/lib/options/callees/objstr.d.ts +24 -0
  100. package/lib/options/callees/objstr.d.ts.map +1 -0
  101. package/lib/options/callees/objstr.js +24 -0
  102. package/lib/options/callees/objstr.js.map +1 -0
  103. package/lib/options/callees/tv.d.ts +64 -0
  104. package/lib/options/callees/tv.d.ts.map +1 -0
  105. package/lib/options/callees/tv.js +70 -0
  106. package/lib/options/callees/tv.js.map +1 -0
  107. package/lib/options/callees/twJoin.d.ts +17 -0
  108. package/lib/options/callees/twJoin.d.ts.map +1 -0
  109. package/lib/options/callees/twJoin.js +15 -0
  110. package/lib/options/callees/twJoin.js.map +1 -0
  111. package/lib/options/callees/twMerge.d.ts +17 -0
  112. package/lib/options/callees/twMerge.d.ts.map +1 -0
  113. package/lib/options/callees/twMerge.js +15 -0
  114. package/lib/options/callees/twMerge.js.map +1 -0
  115. package/lib/options/default-options.d.ts +114 -0
  116. package/lib/options/default-options.d.ts.map +1 -0
  117. package/lib/options/default-options.js +176 -0
  118. package/lib/options/default-options.js.map +1 -0
  119. package/lib/options/descriptions.d.ts +657 -0
  120. package/lib/options/descriptions.d.ts.map +1 -0
  121. package/lib/options/descriptions.js +22 -0
  122. package/lib/options/descriptions.js.map +1 -0
  123. package/lib/options/migrate.d.ts +16 -0
  124. package/lib/options/migrate.d.ts.map +1 -0
  125. package/lib/options/migrate.js +132 -0
  126. package/lib/options/migrate.js.map +1 -0
  127. package/lib/options/schemas/attributes.d.ts +100 -0
  128. package/lib/options/schemas/attributes.d.ts.map +1 -0
  129. package/lib/options/schemas/attributes.js +19 -0
  130. package/lib/options/schemas/attributes.js.map +1 -0
  131. package/lib/options/schemas/callees.d.ts +101 -0
  132. package/lib/options/schemas/callees.d.ts.map +1 -0
  133. package/lib/options/schemas/callees.js +19 -0
  134. package/lib/options/schemas/callees.js.map +1 -0
  135. package/lib/options/schemas/common.d.ts +30 -0
  136. package/lib/options/schemas/common.d.ts.map +1 -0
  137. package/lib/options/schemas/common.js +30 -0
  138. package/lib/options/schemas/common.js.map +1 -0
  139. package/lib/options/schemas/matchers.d.ts +13 -0
  140. package/lib/options/schemas/matchers.d.ts.map +1 -0
  141. package/lib/options/schemas/matchers.js +14 -0
  142. package/lib/options/schemas/matchers.js.map +1 -0
  143. package/lib/options/schemas/selectors.d.ts +1289 -0
  144. package/lib/options/schemas/selectors.d.ts.map +1 -0
  145. package/lib/options/schemas/selectors.js +100 -0
  146. package/lib/options/schemas/selectors.js.map +1 -0
  147. package/lib/options/schemas/tags.d.ts +101 -0
  148. package/lib/options/schemas/tags.d.ts.map +1 -0
  149. package/lib/options/schemas/tags.js +19 -0
  150. package/lib/options/schemas/tags.js.map +1 -0
  151. package/lib/options/schemas/variables.d.ts +100 -0
  152. package/lib/options/schemas/variables.d.ts.map +1 -0
  153. package/lib/options/schemas/variables.js +19 -0
  154. package/lib/options/schemas/variables.js.map +1 -0
  155. package/lib/options/tags/twc.d.ts +36 -0
  156. package/lib/options/tags/twc.d.ts.map +1 -0
  157. package/lib/options/tags/twc.js +26 -0
  158. package/lib/options/tags/twc.js.map +1 -0
  159. package/lib/options/tags/twx.d.ts +36 -0
  160. package/lib/options/tags/twx.d.ts.map +1 -0
  161. package/lib/options/tags/twx.js +26 -0
  162. package/lib/options/tags/twx.js.map +1 -0
  163. package/lib/parsers/angular.d.ts +11 -0
  164. package/lib/parsers/angular.d.ts.map +1 -0
  165. package/lib/parsers/angular.js +736 -0
  166. package/lib/parsers/angular.js.map +1 -0
  167. package/lib/parsers/css.d.ts +5 -0
  168. package/lib/parsers/css.d.ts.map +1 -0
  169. package/lib/parsers/css.js +100 -0
  170. package/lib/parsers/css.js.map +1 -0
  171. package/lib/parsers/es.d.ts +49 -0
  172. package/lib/parsers/es.d.ts.map +1 -0
  173. package/lib/parsers/es.js +924 -0
  174. package/lib/parsers/es.js.map +1 -0
  175. package/lib/parsers/html.d.ts +8 -0
  176. package/lib/parsers/html.d.ts.map +1 -0
  177. package/lib/parsers/html.js +51 -0
  178. package/lib/parsers/html.js.map +1 -0
  179. package/lib/parsers/jsx.d.ts +9 -0
  180. package/lib/parsers/jsx.d.ts.map +1 -0
  181. package/lib/parsers/jsx.js +118 -0
  182. package/lib/parsers/jsx.js.map +1 -0
  183. package/lib/parsers/svelte.d.ts +11 -0
  184. package/lib/parsers/svelte.d.ts.map +1 -0
  185. package/lib/parsers/svelte.js +204 -0
  186. package/lib/parsers/svelte.js.map +1 -0
  187. package/lib/parsers/vue.d.ts +9 -0
  188. package/lib/parsers/vue.d.ts.map +1 -0
  189. package/lib/parsers/vue.js +155 -0
  190. package/lib/parsers/vue.js.map +1 -0
  191. package/lib/rules/enforce-canonical-classes.d.ts +229 -0
  192. package/lib/rules/enforce-canonical-classes.d.ts.map +1 -0
  193. package/lib/rules/enforce-canonical-classes.js +84 -0
  194. package/lib/rules/enforce-canonical-classes.js.map +1 -0
  195. package/lib/rules/enforce-consistent-class-order.d.ts +229 -0
  196. package/lib/rules/enforce-consistent-class-order.d.ts.map +1 -0
  197. package/lib/rules/enforce-consistent-class-order.js +250 -0
  198. package/lib/rules/enforce-consistent-class-order.js.map +1 -0
  199. package/lib/rules/enforce-consistent-important-position.d.ts +225 -0
  200. package/lib/rules/enforce-consistent-important-position.d.ts.map +1 -0
  201. package/lib/rules/enforce-consistent-important-position.js +68 -0
  202. package/lib/rules/enforce-consistent-important-position.js.map +1 -0
  203. package/lib/rules/enforce-consistent-line-wrapping.d.ts +235 -0
  204. package/lib/rules/enforce-consistent-line-wrapping.d.ts.map +1 -0
  205. package/lib/rules/enforce-consistent-line-wrapping.js +537 -0
  206. package/lib/rules/enforce-consistent-line-wrapping.js.map +1 -0
  207. package/lib/rules/enforce-consistent-variable-syntax.d.ts +225 -0
  208. package/lib/rules/enforce-consistent-variable-syntax.d.ts.map +1 -0
  209. package/lib/rules/enforce-consistent-variable-syntax.js +164 -0
  210. package/lib/rules/enforce-consistent-variable-syntax.js.map +1 -0
  211. package/lib/rules/enforce-consistent-variant-order.d.ts +225 -0
  212. package/lib/rules/enforce-consistent-variant-order.d.ts.map +1 -0
  213. package/lib/rules/enforce-consistent-variant-order.js +77 -0
  214. package/lib/rules/enforce-consistent-variant-order.js.map +1 -0
  215. package/lib/rules/enforce-logical-properties.d.ts +227 -0
  216. package/lib/rules/enforce-logical-properties.d.ts.map +1 -0
  217. package/lib/rules/enforce-logical-properties.js +142 -0
  218. package/lib/rules/enforce-logical-properties.js.map +1 -0
  219. package/lib/rules/enforce-shorthand-classes.d.ts +229 -0
  220. package/lib/rules/enforce-shorthand-classes.d.ts.map +1 -0
  221. package/lib/rules/enforce-shorthand-classes.js +217 -0
  222. package/lib/rules/enforce-shorthand-classes.js.map +1 -0
  223. package/lib/rules/no-concatenated-classes.d.ts +225 -0
  224. package/lib/rules/no-concatenated-classes.d.ts.map +1 -0
  225. package/lib/rules/no-concatenated-classes.js +31 -0
  226. package/lib/rules/no-concatenated-classes.js.map +1 -0
  227. package/lib/rules/no-conflicting-classes.d.ts +225 -0
  228. package/lib/rules/no-conflicting-classes.d.ts.map +1 -0
  229. package/lib/rules/no-conflicting-classes.js +60 -0
  230. package/lib/rules/no-conflicting-classes.js.map +1 -0
  231. package/lib/rules/no-deprecated-classes.d.ts +227 -0
  232. package/lib/rules/no-deprecated-classes.d.ts.map +1 -0
  233. package/lib/rules/no-deprecated-classes.js +103 -0
  234. package/lib/rules/no-deprecated-classes.js.map +1 -0
  235. package/lib/rules/no-duplicate-classes.d.ts +225 -0
  236. package/lib/rules/no-duplicate-classes.d.ts.map +1 -0
  237. package/lib/rules/no-duplicate-classes.js +52 -0
  238. package/lib/rules/no-duplicate-classes.js.map +1 -0
  239. package/lib/rules/no-restricted-classes.d.ts +225 -0
  240. package/lib/rules/no-restricted-classes.d.ts.map +1 -0
  241. package/lib/rules/no-restricted-classes.js +57 -0
  242. package/lib/rules/no-restricted-classes.js.map +1 -0
  243. package/lib/rules/no-unknown-classes.d.ts +225 -0
  244. package/lib/rules/no-unknown-classes.d.ts.map +1 -0
  245. package/lib/rules/no-unknown-classes.js +82 -0
  246. package/lib/rules/no-unknown-classes.js.map +1 -0
  247. package/lib/rules/no-unnecessary-whitespace.d.ts +225 -0
  248. package/lib/rules/no-unnecessary-whitespace.d.ts.map +1 -0
  249. package/lib/rules/no-unnecessary-whitespace.js +141 -0
  250. package/lib/rules/no-unnecessary-whitespace.js.map +1 -0
  251. package/lib/tailwindcss/canonical-classes.async.v4.d.ts +3 -0
  252. package/lib/tailwindcss/canonical-classes.async.v4.d.ts.map +1 -0
  253. package/lib/tailwindcss/canonical-classes.async.v4.js +54 -0
  254. package/lib/tailwindcss/canonical-classes.async.v4.js.map +1 -0
  255. package/lib/tailwindcss/canonical-classes.d.ts +21 -0
  256. package/lib/tailwindcss/canonical-classes.d.ts.map +1 -0
  257. package/lib/tailwindcss/canonical-classes.js +16 -0
  258. package/lib/tailwindcss/canonical-classes.js.map +1 -0
  259. package/lib/tailwindcss/class-order.async.v3.d.ts +3 -0
  260. package/lib/tailwindcss/class-order.async.v3.d.ts.map +1 -0
  261. package/lib/tailwindcss/class-order.async.v3.js +4 -0
  262. package/lib/tailwindcss/class-order.async.v3.js.map +1 -0
  263. package/lib/tailwindcss/class-order.async.v4.d.ts +3 -0
  264. package/lib/tailwindcss/class-order.async.v4.d.ts.map +1 -0
  265. package/lib/tailwindcss/class-order.async.v4.js +4 -0
  266. package/lib/tailwindcss/class-order.async.v4.js.map +1 -0
  267. package/lib/tailwindcss/class-order.d.ts +11 -0
  268. package/lib/tailwindcss/class-order.d.ts.map +1 -0
  269. package/lib/tailwindcss/class-order.js +16 -0
  270. package/lib/tailwindcss/class-order.js.map +1 -0
  271. package/lib/tailwindcss/conflicting-classes.async.v4.d.ts +35 -0
  272. package/lib/tailwindcss/conflicting-classes.async.v4.d.ts.map +1 -0
  273. package/lib/tailwindcss/conflicting-classes.async.v4.js +82 -0
  274. package/lib/tailwindcss/conflicting-classes.async.v4.js.map +1 -0
  275. package/lib/tailwindcss/conflicting-classes.d.ts +19 -0
  276. package/lib/tailwindcss/conflicting-classes.d.ts.map +1 -0
  277. package/lib/tailwindcss/conflicting-classes.js +17 -0
  278. package/lib/tailwindcss/conflicting-classes.js.map +1 -0
  279. package/lib/tailwindcss/context.async.v3.d.ts +3 -0
  280. package/lib/tailwindcss/context.async.v3.d.ts.map +1 -0
  281. package/lib/tailwindcss/context.async.v3.js +13 -0
  282. package/lib/tailwindcss/context.async.v3.js.map +1 -0
  283. package/lib/tailwindcss/context.async.v4.d.ts +3 -0
  284. package/lib/tailwindcss/context.async.v4.d.ts.map +1 -0
  285. package/lib/tailwindcss/context.async.v4.js +82 -0
  286. package/lib/tailwindcss/context.async.v4.js.map +1 -0
  287. package/lib/tailwindcss/custom-component-classes.async.v3.d.ts +4 -0
  288. package/lib/tailwindcss/custom-component-classes.async.v3.d.ts.map +1 -0
  289. package/lib/tailwindcss/custom-component-classes.async.v3.js +4 -0
  290. package/lib/tailwindcss/custom-component-classes.async.v3.js.map +1 -0
  291. package/lib/tailwindcss/custom-component-classes.async.v4.d.ts +4 -0
  292. package/lib/tailwindcss/custom-component-classes.async.v4.d.ts.map +1 -0
  293. package/lib/tailwindcss/custom-component-classes.async.v4.js +101 -0
  294. package/lib/tailwindcss/custom-component-classes.async.v4.js.map +1 -0
  295. package/lib/tailwindcss/custom-component-classes.d.ts +11 -0
  296. package/lib/tailwindcss/custom-component-classes.d.ts.map +1 -0
  297. package/lib/tailwindcss/custom-component-classes.js +16 -0
  298. package/lib/tailwindcss/custom-component-classes.js.map +1 -0
  299. package/lib/tailwindcss/dissect-classes.async.v3.d.ts +4 -0
  300. package/lib/tailwindcss/dissect-classes.async.v3.d.ts.map +1 -0
  301. package/lib/tailwindcss/dissect-classes.async.v3.js +32 -0
  302. package/lib/tailwindcss/dissect-classes.async.v3.js.map +1 -0
  303. package/lib/tailwindcss/dissect-classes.async.v4.d.ts +3 -0
  304. package/lib/tailwindcss/dissect-classes.async.v4.d.ts.map +1 -0
  305. package/lib/tailwindcss/dissect-classes.async.v4.js +39 -0
  306. package/lib/tailwindcss/dissect-classes.async.v4.js.map +1 -0
  307. package/lib/tailwindcss/dissect-classes.d.ts +23 -0
  308. package/lib/tailwindcss/dissect-classes.d.ts.map +1 -0
  309. package/lib/tailwindcss/dissect-classes.js +16 -0
  310. package/lib/tailwindcss/dissect-classes.js.map +1 -0
  311. package/lib/tailwindcss/prefix.async.v3.d.ts +4 -0
  312. package/lib/tailwindcss/prefix.async.v3.d.ts.map +1 -0
  313. package/lib/tailwindcss/prefix.async.v3.js +7 -0
  314. package/lib/tailwindcss/prefix.async.v3.js.map +1 -0
  315. package/lib/tailwindcss/prefix.async.v4.d.ts +4 -0
  316. package/lib/tailwindcss/prefix.async.v4.d.ts.map +1 -0
  317. package/lib/tailwindcss/prefix.async.v4.js +7 -0
  318. package/lib/tailwindcss/prefix.async.v4.js.map +1 -0
  319. package/lib/tailwindcss/prefix.d.ts +13 -0
  320. package/lib/tailwindcss/prefix.d.ts.map +1 -0
  321. package/lib/tailwindcss/prefix.js +15 -0
  322. package/lib/tailwindcss/prefix.js.map +1 -0
  323. package/lib/tailwindcss/tailwind.async.worker.v3.d.ts +2 -0
  324. package/lib/tailwindcss/tailwind.async.worker.v3.d.ts.map +1 -0
  325. package/lib/tailwindcss/tailwind.async.worker.v3.js +57 -0
  326. package/lib/tailwindcss/tailwind.async.worker.v3.js.map +1 -0
  327. package/lib/tailwindcss/tailwind.async.worker.v4.d.ts +2 -0
  328. package/lib/tailwindcss/tailwind.async.worker.v4.d.ts.map +1 -0
  329. package/lib/tailwindcss/tailwind.async.worker.v4.js +56 -0
  330. package/lib/tailwindcss/tailwind.async.worker.v4.js.map +1 -0
  331. package/lib/tailwindcss/unknown-classes.async.v3.d.ts +4 -0
  332. package/lib/tailwindcss/unknown-classes.async.v3.d.ts.map +1 -0
  333. package/lib/tailwindcss/unknown-classes.async.v3.js +10 -0
  334. package/lib/tailwindcss/unknown-classes.async.v3.js.map +1 -0
  335. package/lib/tailwindcss/unknown-classes.async.v4.d.ts +3 -0
  336. package/lib/tailwindcss/unknown-classes.async.v4.d.ts.map +1 -0
  337. package/lib/tailwindcss/unknown-classes.async.v4.js +5 -0
  338. package/lib/tailwindcss/unknown-classes.async.v4.js.map +1 -0
  339. package/lib/tailwindcss/unknown-classes.d.ts +11 -0
  340. package/lib/tailwindcss/unknown-classes.d.ts.map +1 -0
  341. package/lib/tailwindcss/unknown-classes.js +21 -0
  342. package/lib/tailwindcss/unknown-classes.js.map +1 -0
  343. package/lib/tailwindcss/variant-order.async.v3.d.ts +3 -0
  344. package/lib/tailwindcss/variant-order.async.v3.d.ts.map +1 -0
  345. package/lib/tailwindcss/variant-order.async.v3.js +4 -0
  346. package/lib/tailwindcss/variant-order.async.v3.js.map +1 -0
  347. package/lib/tailwindcss/variant-order.async.v4.d.ts +3 -0
  348. package/lib/tailwindcss/variant-order.async.v4.d.ts.map +1 -0
  349. package/lib/tailwindcss/variant-order.async.v4.js +34 -0
  350. package/lib/tailwindcss/variant-order.async.v4.js.map +1 -0
  351. package/lib/tailwindcss/variant-order.d.ts +11 -0
  352. package/lib/tailwindcss/variant-order.d.ts.map +1 -0
  353. package/lib/tailwindcss/variant-order.js +16 -0
  354. package/lib/tailwindcss/variant-order.js.map +1 -0
  355. package/lib/types/ast.d.ts +79 -0
  356. package/lib/types/ast.d.ts.map +1 -0
  357. package/lib/types/ast.js +2 -0
  358. package/lib/types/ast.js.map +1 -0
  359. package/lib/types/async.d.ts +7 -0
  360. package/lib/types/async.d.ts.map +1 -0
  361. package/lib/types/async.js +2 -0
  362. package/lib/types/async.js.map +1 -0
  363. package/lib/types/estree.d.ts +7 -0
  364. package/lib/types/estree.d.ts.map +1 -0
  365. package/lib/types/estree.js +2 -0
  366. package/lib/types/estree.js.map +1 -0
  367. package/lib/types/rule.d.ts +163 -0
  368. package/lib/types/rule.d.ts.map +1 -0
  369. package/lib/types/rule.js +24 -0
  370. package/lib/types/rule.js.map +1 -0
  371. package/lib/utils/ast.d.ts +4 -0
  372. package/lib/utils/ast.d.ts.map +1 -0
  373. package/lib/utils/ast.js +9 -0
  374. package/lib/utils/ast.js.map +1 -0
  375. package/lib/utils/class.d.ts +12 -0
  376. package/lib/utils/class.d.ts.map +1 -0
  377. package/lib/utils/class.js +19 -0
  378. package/lib/utils/class.js.map +1 -0
  379. package/lib/utils/context.d.ts +20 -0
  380. package/lib/utils/context.d.ts.map +1 -0
  381. package/lib/utils/context.js +91 -0
  382. package/lib/utils/context.js.map +1 -0
  383. package/lib/utils/lint.d.ts +17 -0
  384. package/lib/utils/lint.d.ts.map +1 -0
  385. package/lib/utils/lint.js +40 -0
  386. package/lib/utils/lint.js.map +1 -0
  387. package/lib/utils/matchers.d.ts +24 -0
  388. package/lib/utils/matchers.d.ts.map +1 -0
  389. package/lib/utils/matchers.js +154 -0
  390. package/lib/utils/matchers.js.map +1 -0
  391. package/lib/utils/quotes.d.ts +3 -0
  392. package/lib/utils/quotes.d.ts.map +1 -0
  393. package/lib/utils/quotes.js +9 -0
  394. package/lib/utils/quotes.js.map +1 -0
  395. package/lib/utils/rule.d.ts +31 -0
  396. package/lib/utils/rule.d.ts.map +1 -0
  397. package/lib/utils/rule.js +349 -0
  398. package/lib/utils/rule.js.map +1 -0
  399. package/lib/utils/selectors.d.ts +3 -0
  400. package/lib/utils/selectors.d.ts.map +1 -0
  401. package/lib/utils/selectors.js +4 -0
  402. package/lib/utils/selectors.js.map +1 -0
  403. package/lib/utils/utils.d.ts +49 -0
  404. package/lib/utils/utils.d.ts.map +1 -0
  405. package/lib/utils/utils.js +203 -0
  406. package/lib/utils/utils.js.map +1 -0
  407. package/lib/utils/valibot.d.ts +4 -0
  408. package/lib/utils/valibot.d.ts.map +1 -0
  409. package/lib/utils/valibot.js +12 -0
  410. package/lib/utils/valibot.js.map +1 -0
  411. package/lib/utils/version.d.ts +7 -0
  412. package/lib/utils/version.d.ts.map +1 -0
  413. package/lib/utils/version.js +6 -0
  414. package/lib/utils/version.js.map +1 -0
  415. package/lib/utils/visitedNodes.d.ts +4 -0
  416. package/lib/utils/visitedNodes.d.ts.map +1 -0
  417. package/lib/utils/visitedNodes.js +11 -0
  418. package/lib/utils/visitedNodes.js.map +1 -0
  419. package/lib/utils/warn.d.ts +2 -0
  420. package/lib/utils/warn.d.ts.map +1 -0
  421. package/lib/utils/warn.js +8 -0
  422. package/lib/utils/warn.js.map +1 -0
  423. package/package.json +163 -4
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2023 Roger Schönbächler
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,248 @@
1
- # Temporary Holding Version
1
+ <div align="center">
2
+ <picture>
3
+ <source media="(prefers-color-scheme: dark)" srcset="./assets/eslint-plugin-better-tailwindcss-logo-dark.svg">
4
+ <source media="(prefers-color-scheme: light)" srcset="./assets/eslint-plugin-better-tailwindcss-logo-light.svg">
5
+ <img alt="eslint-plugin-better-tailwindcss logo" src="./assets/eslint-plugin-better-tailwindcss-logo.svg">
6
+ </picture>
7
+ </div>
2
8
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
9
+ <h1 align="center">eslint-plugin-better-tailwindcss</h1>
10
+
11
+ <br/>
12
+ <br/>
13
+
14
+ <div align="center">
15
+ <a alt="GitHub license" href="https://github.com/schoero/eslint-plugin-better-tailwindcss/blob/main/LICENSE"><picture><source media="(prefers-color-scheme: dark)" srcset="https://img.shields.io/github/license/schoero/eslint-plugin-better-tailwindcss?style=flat-square&labelColor=32363B&color=ffffff" /><source media="(prefers-color-scheme: light)" srcset="https://img.shields.io/github/license/schoero/eslint-plugin-better-tailwindcss?style=flat-square&labelColor=EBEEF2&color=000000" /><img alt="eslint-plugin-better-tailwindcss logo" src="https://img.shields.io/github/license/schoero/eslint-plugin-better-tailwindcss?style=flat-square&labelColor=EBEEF2&color=000000" /></picture></a>
16
+ <a alt="npm version" href="https://www.npmjs.com/package/eslint-plugin-better-tailwindcss?activeTab=versions"><picture><source media="(prefers-color-scheme: dark)" srcset="https://img.shields.io/npm/v/eslint-plugin-better-tailwindcss?style=flat-square&labelColor=32363B&color=ffffff" /><source media="(prefers-color-scheme: light)" srcset="https://img.shields.io/npm/v/eslint-plugin-better-tailwindcss?style=flat-square&labelColor=EBEEF2&color=000000" /><img alt="eslint-plugin-better-tailwindcss logo" src="https://img.shields.io/npm/v/eslint-plugin-better-tailwindcss?style=flat-square&labelColor=EBEEF2&color=000000" /></picture></a>
17
+ <a alt="GitHub issues" href="https://github.com/schoero/eslint-plugin-better-tailwindcss/issues"><picture><source media="(prefers-color-scheme: dark)" srcset="https://img.shields.io/github/issues/schoero/eslint-plugin-better-tailwindcss?style=flat-square&labelColor=32363B&color=ffffff" /><source media="(prefers-color-scheme: light)" srcset="https://img.shields.io/github/issues/schoero/eslint-plugin-better-tailwindcss?style=flat-square&labelColor=EBEEF2&color=000000" /><img alt="eslint-plugin-better-tailwindcss logo" src="https://img.shields.io/github/issues/schoero/eslint-plugin-better-tailwindcss?style=flat-square&labelColor=EBEEF2&color=000000" /></picture></a>
18
+ <a alt="npm total downloads" href="https://www.npmjs.com/package/eslint-plugin-better-tailwindcss?activeTab=readme"><picture><source media="(prefers-color-scheme: dark)" srcset="https://img.shields.io/npm/dt/eslint-plugin-better-tailwindcss?style=flat-square&labelColor=32363B&color=ffffff" /><source media="(prefers-color-scheme: light)" srcset="https://img.shields.io/npm/dt/eslint-plugin-better-tailwindcss?style=flat-square&labelColor=EBEEF2&color=000000" /><img alt="eslint-plugin-better-tailwindcss logo" src="https://img.shields.io/npm/dt/eslint-plugin-better-tailwindcss?style=flat-square&labelColor=EBEEF2&color=000000" /></picture></a>
19
+ <a alt="GitHub repo stars" href="https://github.com/schoero/eslint-plugin-better-tailwindcss/stargazers"><picture><source media="(prefers-color-scheme: dark)" srcset="https://img.shields.io/github/stars/schoero/eslint-plugin-better-tailwindcss?style=flat-square&labelColor=32363B&color=ffffff" /><source media="(prefers-color-scheme: light)" srcset="https://img.shields.io/github/stars/schoero/eslint-plugin-better-tailwindcss?style=flat-square&labelColor=EBEEF2&color=000000" /><img alt="eslint-plugin-better-tailwindcss logo" src="https://img.shields.io/github/stars/schoero/eslint-plugin-better-tailwindcss?style=flat-square&labelColor=EBEEF2&color=000000"/></picture></a>
20
+ <a alt="GitHub sponsors" href="https://github.com/sponsors/schoero"><picture><source media="(prefers-color-scheme: dark)" srcset="https://img.shields.io/github/sponsors/schoero?style=flat-square&labelColor=32363B&color=ffffff" /><source media="(prefers-color-scheme: light)" srcset="hhttps://img.shields.io/github/sponsors/schoero?style=flat-square&labelColor=EBEEF2&color=000000" /><img alt="eslint-plugin-better-tailwindcss logo" src="https://img.shields.io/github/sponsors/schoero?style=flat-square&labelColor=EBEEF2&color=000000" /></picture></a>
21
+ </div>
22
+
23
+ <br/>
24
+ <br/>
25
+
26
+ ESLint/Oxlint plugin with formatting and linting rules to help you write cleaner, more maintainable Tailwind CSS.
27
+
28
+ The formatting rules focus on improving readability by automatically breaking up long Tailwind class strings into multiple lines and sorting/grouping them in a logical order. The linting rules enforce best practices and catch potential issues, ensuring that you're writing valid Tailwind CSS.
29
+
30
+ This plugin supports a wide range of projects, including React, Solid.js, Qwik, Svelte, Vue, Astro, Angular, HTML or plain JavaScript or TypeScript.
31
+
32
+ <br/>
33
+ <br/>
34
+
35
+ <div align="center">
36
+ <img alt="eslint-plugin-better-tailwindcss example" width="640px" src="./assets/eslint-plugin-better-tailwindcss-demo.png">
37
+ </div>
38
+
39
+ <br/>
40
+ <br/>
41
+
42
+ <div align="center">
43
+
44
+ <a href="https://github.com/sponsors/schoero">
45
+ <picture>
46
+ <source media="(prefers-color-scheme: dark)" srcset="./assets/sponsor-dark.svg">
47
+ <source media="(prefers-color-scheme: light)" srcset="./assets/sponsor-light.svg">
48
+ <img alt="eslint-plugin-better-tailwindcss logo" src="./assets/sponsor-light.svg">
49
+ </picture>
50
+ </a>
51
+
52
+ <br/>
53
+ <br/>
54
+
55
+ [Buy me a coffee](https://buymeacoffee.com/schoero) | [GitHub Sponsors](https://github.com/sponsors/schoero)
56
+
57
+ Help support this project.
58
+ If you or your company benefit from this project, please consider becoming a sponsor or making a one-time donation.
59
+ Your contribution will help me to maintain and develop the project.
60
+
61
+ </div>
62
+
63
+ <br/>
64
+ <br/>
65
+
66
+ ## Installation
67
+
68
+ ```sh
69
+ npm i -D eslint-plugin-better-tailwindcss
70
+ ```
71
+
72
+ <br/>
73
+
74
+ ## Quick start
75
+
76
+ Depending on the flavor you are using, you need to install and configure the corresponding parser:
77
+
78
+ - React: [.jsx](docs/parsers/jsx.md) · [.tsx](docs/parsers/tsx.md)
79
+ - SolidJS: [.jsx](docs/parsers/jsx.md) · [.tsx](docs/parsers/tsx.md)
80
+ - Qwik: [.jsx](docs/parsers/jsx.md) · [.tsx](docs/parsers/tsx.md)
81
+ - Svelte: [.svelte](docs/parsers/svelte.md)
82
+ - Vue: [.vue](docs/parsers/vue.md)
83
+ - Astro: [.astro](docs/parsers/astro.md)
84
+ - Angular: [.html, .ts](docs/parsers/angular.md)
85
+ - HTML: [.html](docs/parsers/html.md)
86
+ - CSS: [.css](docs/parsers/css.md)
87
+ - JavaScript: [.js](docs/parsers/javascript.md)
88
+ - TypeScript: [.ts](docs/parsers/typescript.md)
89
+
90
+ <br/>
91
+ <br/>
92
+
93
+ ### Rules
94
+
95
+ The rules are categorized into two types: `stylistic` and `correctness`.
96
+
97
+ #### Configs
98
+
99
+ The plugin offers three recommended configurations to help you get started quickly:
100
+
101
+ - `stylistic`: Enforces stylistic rules for tailwind classes.
102
+ - `correctness`: Enforces correctness rules for tailwind classes.
103
+ - `recommended`: Enforces both stylistic and correctness rules.
104
+
105
+ By default:
106
+
107
+ - `stylistic` rules are reported as warnings
108
+ - `correctness` rules are reported as errors
109
+
110
+ You can change the severity by adding a suffix to the config name:
111
+
112
+ - Use `-error` to report all rules as errors
113
+ - Use `-warn` to report all rules as warnings
114
+
115
+ For example, `recommended-warn` will report every rule as a warning and `stylistic-error` will report the formatting rules as errors.
116
+
117
+ If you still use the old .eslintrc configuration format, you can prefix the config names with `legacy-`.
118
+
119
+ For example, `legacy-recommended` or `legacy-correctness-warn`.
120
+
121
+ The table below lists all available rules, the Tailwind CSS versions they support, and whether they are enabled by default in each recommended configuration:
122
+
123
+ <br/>
124
+ <br/>
125
+
126
+ #### Stylistic rules
127
+
128
+ | Name | Description | `tw3` | `tw4` | `recommended` | autofix |
129
+ | :--- | :--- | :---: | :---: | :---: | :---: |
130
+ | [enforce-consistent-line-wrapping](docs/rules/enforce-consistent-line-wrapping.md) | Enforce consistent line wrapping for tailwind classes. | ✔ | ✔ | ✔ | ✔ |
131
+ | [enforce-consistent-class-order](docs/rules/enforce-consistent-class-order.md) | Enforce a consistent order for tailwind classes. | ✔ | ✔ | ✔ | ✔ |
132
+ | [enforce-consistent-variant-order](docs/rules/enforce-consistent-variant-order.md) | Enforce a consistent variant order for tailwind classes. | | ✔ | | ✔ |
133
+ | [enforce-consistent-variable-syntax](docs/rules/enforce-consistent-variable-syntax.md) | Enforce consistent variable syntax. | ✔ | ✔ | | ✔ |
134
+ | [enforce-consistent-important-position](docs/rules/enforce-consistent-important-position.md) | Enforce consistent position of the important modifier. | ✔ | ✔ | | ✔ |
135
+ | [enforce-shorthand-classes](docs/rules/enforce-shorthand-classes.md) | Enforce shorthand class names. | ✔ | ✔ | | ✔ |
136
+ | [enforce-logical-properties](docs/rules/enforce-logical-properties.md) | Enforce logical property class names. | ✔ | ✔ | | ✔ |
137
+ | [enforce-canonical-classes](docs/rules/enforce-canonical-classes.md) | Enforce canonical class names. | | ✔ | ✔ | ✔ |
138
+ | [no-duplicate-classes](docs/rules/no-duplicate-classes.md) | Remove duplicate classes. | ✔ | ✔ | ✔ | ✔ |
139
+ | [no-deprecated-classes](docs/rules/no-deprecated-classes.md) | Remove deprecated classes. | | ✔ | ✔ | ✔ |
140
+ | [no-unnecessary-whitespace](docs/rules/no-unnecessary-whitespace.md) | Disallow unnecessary whitespace in tailwind classes. | ✔ | ✔ | ✔ | ✔ |
141
+
142
+ #### Correctness rules
143
+
144
+ | Name | Description | `tw3` | `tw4` | `recommended` | autofix |
145
+ | :--- | :--- | :---: | :---: | :---: | :---: |
146
+ | [no-concatenated-classes](docs/rules/no-concatenated-classes.md) | Disallow concatenated classes in Tailwind CSS class strings. | ✔ | ✔ | ✔ | |
147
+ | [no-unknown-classes](docs/rules/no-unknown-classes.md) | Report classes not registered with Tailwind CSS. | ✔ | ✔ | ✔ | |
148
+ | [no-conflicting-classes](docs/rules/no-conflicting-classes.md) | Report classes that produce conflicting styles. | | ✔ | ✔ | |
149
+ | [no-restricted-classes](docs/rules/no-restricted-classes.md) | Disallow restricted classes. | ✔ | ✔ | | ✔ |
150
+
151
+ <br/>
152
+ <br/>
153
+
154
+ ### Utilities
155
+
156
+ This plugin is pre-configured to lint tailwind classes for the most popular utilities:
157
+
158
+ - [tailwind merge](https://github.com/dcastil/tailwind-merge): `twMerge` · `twJoin`
159
+ - [class variance authority](https://github.com/joe-bell/cva): `cva`
160
+ - [tailwind variants](https://github.com/nextui-org/tailwind-variants?tab=readme-ov-file): `tv`
161
+ - [shadcn](https://ui.shadcn.com/docs/installation/manual): `cn`
162
+ - [classcat](https://github.com/jorgebucaran/classcat): `cc`
163
+ - [class list builder](https://github.com/crswll/clb): `clb`
164
+ - [clsx](https://github.com/lukeed/clsx): `clsx`
165
+ - [cnbuilder](https://github.com/xobotyi/cnbuilder): `cnb`
166
+ - [classnames template literals](https://github.com/netlify/classnames-template-literals): `ctl`
167
+ - [obj str](https://github.com/lukeed/obj-str): `objstr`
168
+ - [react-twc](https://github.com/gregberge/twc): `twc` · `twx`
169
+
170
+ <br/>
171
+ <br/>
172
+
173
+ ### Advanced configuration
174
+
175
+ If an utility is not supported by default, or you want to customize the configuration, you can define which [attributes](./docs/configuration/advanced.md#attribute), [callees](./docs/configuration/advanced.md#callee), [variables](./docs/configuration/advanced.md#variable), and [tags](./docs/configuration/advanced.md#tag) should get linted.
176
+ See the [Advanced configuration guide](./docs/configuration/advanced.md) to learn how to override or extend the default settings.
177
+
178
+ <br/>
179
+ <br/>
180
+
181
+ ### Monorepo setup
182
+
183
+ In monorepos, linting is often started from the repository root while each package has its own Tailwind setup.
184
+ You can configure `settings["better-tailwindcss"].cwd` per file group so the plugin resolves `tailwindcss` and config files from the correct project directory.
185
+
186
+ ```js
187
+ // eslint.config.js
188
+ export default [
189
+ {
190
+ files: ["packages/website/**/*.{js,jsx,cjs,mjs,ts,tsx}"],
191
+ settings: {
192
+ "better-tailwindcss": {
193
+ cwd: "./packages/website"
194
+ }
195
+ }
196
+ },
197
+ {
198
+ files: ["packages/app/**/*.{js,jsx,cjs,mjs,ts,tsx}"],
199
+ settings: {
200
+ "better-tailwindcss": {
201
+ cwd: "./packages/app"
202
+ }
203
+ }
204
+ }
205
+ ];
206
+ ```
207
+
208
+ See [Settings](./docs/settings/settings.md#cwd) for more details.
209
+
210
+ <br/>
211
+ <br/>
212
+
213
+ ### Editor configuration
214
+
215
+ #### VSCode
216
+
217
+ ##### Auto-fix on save
218
+
219
+ Most rules are intended to automatically fix the tailwind classes using VSCode extensions.
220
+
221
+ ###### ESLint
222
+
223
+ For ESLint, you can install the [VSCode ESLint plugin](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint) and configure it to automatically fix the classes on save by adding the following options to your `.vscode/settings.json`:
224
+
225
+ ```jsonc
226
+ {
227
+ // enable VSCode to fix tailwind classes on save
228
+ "editor.codeActionsOnSave": {
229
+ "source.fixAll.eslint": "explicit"
230
+ }
231
+ }
232
+ ```
233
+
234
+ ###### Oxlint
235
+
236
+ For Oxlint, you can install the [VSCode Oxc plugin](https://marketplace.visualstudio.com/items?itemName=oxc.oxc-vscode) and configure it to automatically fix the classes on save by adding the following options to your `.vscode/settings.json`:
237
+
238
+ ```jsonc
239
+ {
240
+ // enable VSCode to fix tailwind classes on save
241
+ "editor.codeActionsOnSave": {
242
+ "source.fixAll.oxc": "explicit"
243
+ }
244
+ }
245
+ ```
246
+
247
+ <br/>
248
+ <br/>
@@ -0,0 +1,103 @@
1
+ import { SelectorKind } from "../types/rule.js";
2
+ /**
3
+ * @deprecated Migrate to selectors instead.
4
+ */
5
+ export declare function getDefaultCallees(): (string | [string, ({
6
+ match: import("../types/rule.js").MatcherType.String;
7
+ } | {
8
+ match: import("../types/rule.js").MatcherType.ObjectKey;
9
+ pathPattern?: string | undefined;
10
+ } | {
11
+ match: import("../types/rule.js").MatcherType.ObjectValue;
12
+ pathPattern?: string | undefined;
13
+ })[]])[];
14
+ /**
15
+ * @deprecated Migrate to selectors instead.
16
+ */
17
+ export declare function getDefaultAttributes(): (string | [string, ({
18
+ match: import("../types/rule.js").MatcherType.String;
19
+ } | {
20
+ match: import("../types/rule.js").MatcherType.ObjectKey;
21
+ pathPattern?: string | undefined;
22
+ } | {
23
+ match: import("../types/rule.js").MatcherType.ObjectValue;
24
+ pathPattern?: string | undefined;
25
+ })[]])[];
26
+ /**
27
+ * @deprecated Migrate to selectors instead.
28
+ */
29
+ export declare function getDefaultVariables(): (string | [string, ({
30
+ match: import("../types/rule.js").MatcherType.String;
31
+ } | {
32
+ match: import("../types/rule.js").MatcherType.ObjectKey;
33
+ pathPattern?: string | undefined;
34
+ } | {
35
+ match: import("../types/rule.js").MatcherType.ObjectValue;
36
+ pathPattern?: string | undefined;
37
+ })[]])[];
38
+ /**
39
+ * @deprecated Migrate to selectors instead.
40
+ */
41
+ export declare function getDefaultTags(): (string | [string, ({
42
+ match: import("../types/rule.js").MatcherType.String;
43
+ } | {
44
+ match: import("../types/rule.js").MatcherType.ObjectKey;
45
+ pathPattern?: string | undefined;
46
+ } | {
47
+ match: import("../types/rule.js").MatcherType.ObjectValue;
48
+ pathPattern?: string | undefined;
49
+ })[]])[];
50
+ export declare function getDefaultSelectors(): ({
51
+ kind: SelectorKind.Callee;
52
+ match: {
53
+ type: import("../types/rule.js").MatcherType.String;
54
+ }[];
55
+ name: string;
56
+ } | {
57
+ kind: SelectorKind.Callee;
58
+ match: {
59
+ type: import("../types/rule.js").MatcherType.ObjectKey;
60
+ }[];
61
+ name: string;
62
+ } | {
63
+ kind: SelectorKind.Callee;
64
+ match: {
65
+ path: string;
66
+ type: import("../types/rule.js").MatcherType.ObjectValue;
67
+ }[];
68
+ name: string;
69
+ } | {
70
+ kind: SelectorKind.Tag;
71
+ path: string;
72
+ } | {
73
+ kind: SelectorKind.Callee;
74
+ match: ({
75
+ type: import("../types/rule.js").MatcherType.String;
76
+ match?: never;
77
+ } | {
78
+ match: {
79
+ type: import("../types/rule.js").MatcherType.String;
80
+ }[];
81
+ type: import("../types/rule.js").MatcherType.AnonymousFunctionReturn;
82
+ })[];
83
+ path: string;
84
+ } | {
85
+ kind: SelectorKind.Attribute;
86
+ name: string;
87
+ match?: never;
88
+ } | {
89
+ kind: SelectorKind.Attribute;
90
+ match: ({
91
+ type: import("../types/rule.js").MatcherType.String;
92
+ } | {
93
+ type: import("../types/rule.js").MatcherType.ObjectKey;
94
+ })[];
95
+ name: string;
96
+ } | {
97
+ kind: SelectorKind.Variable;
98
+ match: {
99
+ type: import("../types/rule.js").MatcherType.String;
100
+ }[];
101
+ name: string;
102
+ })[];
103
+ //# sourceMappingURL=defaults.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"defaults.d.ts","sourceRoot":"","sources":["../../src/api/defaults.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAQhE;;GAEG;AACH,wBAAgB,iBAAiB;;;;;;;;SAIhC;AAED;;GAEG;AACH,wBAAgB,oBAAoB;;;;;;;;SAInC;AAED;;GAEG;AACH,wBAAgB,mBAAmB;;;;;;;;SAIlC;AAED;;GAEG;AACH,wBAAgB,cAAc;;;;;;;;SAI7B;AAED,wBAAgB,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAElC"}
@@ -0,0 +1,34 @@
1
+ /* eslint-disable eslint-plugin-jsdoc/require-returns */
2
+ /* eslint-disable eslint-plugin-jsdoc/require-description */
3
+ import { DEFAULT_SELECTORS } from "../options/default-options.js";
4
+ import { migrateFlatSelectorsToLegacySelectors } from "../options/migrate.js";
5
+ import { SelectorKind } from "../types/rule.js";
6
+ import { isSelectorKind } from "../utils/selectors.js";
7
+ /**
8
+ * @deprecated Migrate to selectors instead.
9
+ */
10
+ export function getDefaultCallees() {
11
+ return migrateFlatSelectorsToLegacySelectors(DEFAULT_SELECTORS.filter(isSelectorKind(SelectorKind.Callee))).callees ?? [];
12
+ }
13
+ /**
14
+ * @deprecated Migrate to selectors instead.
15
+ */
16
+ export function getDefaultAttributes() {
17
+ return migrateFlatSelectorsToLegacySelectors(DEFAULT_SELECTORS.filter(isSelectorKind(SelectorKind.Attribute))).attributes ?? [];
18
+ }
19
+ /**
20
+ * @deprecated Migrate to selectors instead.
21
+ */
22
+ export function getDefaultVariables() {
23
+ return migrateFlatSelectorsToLegacySelectors(DEFAULT_SELECTORS.filter(isSelectorKind(SelectorKind.Variable))).variables ?? [];
24
+ }
25
+ /**
26
+ * @deprecated Migrate to selectors instead.
27
+ */
28
+ export function getDefaultTags() {
29
+ return migrateFlatSelectorsToLegacySelectors(DEFAULT_SELECTORS.filter(isSelectorKind(SelectorKind.Tag))).tags ?? [];
30
+ }
31
+ export function getDefaultSelectors() {
32
+ return DEFAULT_SELECTORS;
33
+ }
34
+ //# sourceMappingURL=defaults.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"defaults.js","sourceRoot":"","sources":["../../src/api/defaults.ts"],"names":[],"mappings":"AAAA,wDAAwD;AACxD,4DAA4D;AAC5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;AAClF,OAAO,EAAE,qCAAqC,EAAE,MAAM,uCAAuC,CAAC;AAC9F,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAChE,OAAO,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AAOvE;;GAEG;AACH,MAAM,UAAU,iBAAiB;IAC/B,OAAO,qCAAqC,CAC1C,iBAAiB,CAAC,MAAM,CAAC,cAAc,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC,CAC9D,CAAC,OAAO,IAAI,EAAoB,CAAC;AACpC,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,oBAAoB;IAClC,OAAO,qCAAqC,CAC1C,iBAAiB,CAAC,MAAM,CAAC,cAAc,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC,CACjE,CAAC,UAAU,IAAI,EAAuB,CAAC;AAC1C,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,mBAAmB;IACjC,OAAO,qCAAqC,CAC1C,iBAAiB,CAAC,MAAM,CAAC,cAAc,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC,CAChE,CAAC,SAAS,IAAI,EAAsB,CAAC;AACxC,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,cAAc;IAC5B,OAAO,qCAAqC,CAC1C,iBAAiB,CAAC,MAAM,CAAC,cAAc,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,CAC3D,CAAC,IAAI,IAAI,EAAiB,CAAC;AAC9B,CAAC;AAED,MAAM,UAAU,mBAAmB;IACjC,OAAO,iBAAiB,CAAC;AAC3B,CAAC"}
@@ -0,0 +1,9 @@
1
+ export type { Settings } from "../options/descriptions.js";
2
+ export type { ArgumentTarget, CallTarget } from "../types/rule.js";
3
+ export { MatcherType } from "../types/rule.js";
4
+ export type { Matcher, ObjectKeyMatcher, ObjectValueMatcher, StringMatcher } from "../types/rule.js";
5
+ export { SelectorKind } from "../types/rule.js";
6
+ export type { AttributeSelector, CalleeSelector, Selector, TagSelector, VariableSelector } from "../types/rule.js";
7
+ export type { SelectorAnonymousFunctionReturnMatcher, SelectorMatcher, SelectorObjectKeyMatcher, SelectorObjectValueMatcher, SelectorStringMatcher } from "../types/rule.js";
8
+ export type { Regex, Selectors } from "../types/rule.js";
9
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/api/types.ts"],"names":[],"mappings":"AACA,YAAY,EAAE,QAAQ,EAAE,MAAM,4CAA4C,CAAC;AAG3E,YAAY,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAGnF,OAAO,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAC/D,YAAY,EAAE,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AAGrH,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAEhE,YAAY,EAAE,iBAAiB,EAAE,cAAc,EAAE,QAAQ,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACnI,YAAY,EAAE,sCAAsC,EAAE,eAAe,EAAE,wBAAwB,EAAE,0BAA0B,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AAG7L,YAAY,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC"}
@@ -0,0 +1,5 @@
1
+ /* Legacy Matchers */
2
+ export { MatcherType } from "../types/rule.js";
3
+ /* Selector */
4
+ export { SelectorKind } from "../types/rule.js";
5
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/api/types.ts"],"names":[],"mappings":"AAMA,qBAAqB;AACrB,OAAO,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAG/D,cAAc;AACd,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC"}
@@ -0,0 +1,30 @@
1
+ import type { AsyncContext } from "../utils/context.js";
2
+ interface CacheItem {
3
+ date: Date;
4
+ value: any;
5
+ }
6
+ export declare function invalidateByModifiedDate(cache: CacheItem, path: string | undefined): boolean;
7
+ export declare function withCache<Result>(key: string, path: string | undefined, callback: () => Result, invalidate?: (cache: CacheItem, path: string | undefined) => boolean): Result;
8
+ export declare function withCache<Result>(key: string, path: string | undefined, callback: () => Promise<Result>, invalidate?: (cache: CacheItem, path: string | undefined) => boolean): Promise<Result>;
9
+ /**
10
+ * Caches worker operation results.
11
+ *
12
+ * @template Operation The signature of the wrapped operation.
13
+ * @param name Unique name of the operation, used as part of the cache key.
14
+ * @param operation The operation to cache.
15
+ * @returns The wrapped operation.
16
+ */
17
+ export declare function withOperationCache<Operation extends (ctx: AsyncContext, ...args: any[]) => any>(name: string, operation: Operation): Operation;
18
+ /**
19
+ * Caches an operation that filters a class list per class.
20
+ *
21
+ * @param key Unique name of the operation, used as part of the cache key.
22
+ * @param path Path of the file to watch for changes.
23
+ * @param classes The classes to filter.
24
+ * @param filterClasses The operation, called with the classes that have no cached verdict yet.
25
+ * @returns The classes for which the operation's verdict is positive, in input order.
26
+ */
27
+ export declare function withPerClassCache(key: string, path: string | undefined, classes: string[], filterClasses: (uncachedClasses: string[]) => string[]): string[];
28
+ export declare function clearCache(): void;
29
+ export {};
30
+ //# sourceMappingURL=cache.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cache.d.ts","sourceRoot":"","sources":["../../src/async-utils/cache.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAGxD,UAAU,SAAS;IACjB,IAAI,EAAE,IAAI,CAAC;IACX,KAAK,EAAE,GAAG,CAAC;CACZ;AAkDD,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAQ5F;AAED,wBAAgB,SAAS,CAAC,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,SAAS,EAAE,QAAQ,EAAE,MAAM,MAAM,EAAE,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,GAAG,SAAS,KAAK,OAAO,GAAG,MAAM,CAAC;AAC/K,wBAAgB,SAAS,CAAC,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC,MAAM,CAAC,EAAE,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,GAAG,SAAS,KAAK,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;AAsBjM;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,SAAS,SAAS,CAAC,GAAG,EAAE,YAAY,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,GAAG,SAAS,CAM9I;AAED;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,aAAa,EAAE,CAAC,eAAe,EAAE,MAAM,EAAE,KAAK,MAAM,EAAE,GAAG,MAAM,EAAE,CAmC5J;AAED,wBAAgB,UAAU,SAGzB"}
@@ -0,0 +1,116 @@
1
+ import { getModifiedDate } from "./fs.js";
2
+ class LruCache {
3
+ constructor(maxSize) {
4
+ this.cache = new Map();
5
+ this.maxSize = maxSize;
6
+ }
7
+ get(key) {
8
+ const item = this.cache.get(key);
9
+ if (item) {
10
+ // fresh access, move to the end
11
+ this.cache.delete(key);
12
+ this.cache.set(key, item);
13
+ }
14
+ return item;
15
+ }
16
+ set(key, item) {
17
+ // fresh write, move to the end if present
18
+ this.cache.delete(key);
19
+ this.cache.set(key, item);
20
+ // size limit
21
+ if (this.cache.size > this.maxSize) {
22
+ const oldestKey = this.cache.keys().next().value;
23
+ if (oldestKey !== undefined) {
24
+ this.cache.delete(oldestKey);
25
+ }
26
+ }
27
+ }
28
+ clear() {
29
+ this.cache.clear();
30
+ }
31
+ }
32
+ // operation results and resolved configs are few but potentially large
33
+ const CACHE = new LruCache(1000);
34
+ // per-class verdicts are booleans, but every distinct class name ever seen creates an entry
35
+ const CLASS_CACHE = new LruCache(20000);
36
+ export function invalidateByModifiedDate(cache, path) {
37
+ // without a path there is no file to watch for staleness
38
+ // the entry stays cached until clearCache() or lru eviction
39
+ // this requires callers to encode everything the callback depends on in the key
40
+ if (!path) {
41
+ return false;
42
+ }
43
+ const modified = getModifiedDate(path);
44
+ return modified > cache.date;
45
+ }
46
+ export function withCache(key, path, callback, invalidate = invalidateByModifiedDate) {
47
+ const cacheKey = `${key}-${path}`;
48
+ const cached = CACHE.get(cacheKey);
49
+ if (cached && !invalidate(cached, path)) {
50
+ return cached.value;
51
+ }
52
+ const value = callback();
53
+ if (value instanceof Promise) {
54
+ return value.then(resolvedValue => {
55
+ CACHE.set(cacheKey, { date: new Date(), value: resolvedValue });
56
+ return resolvedValue;
57
+ });
58
+ }
59
+ else {
60
+ CACHE.set(cacheKey, { date: new Date(), value });
61
+ return value;
62
+ }
63
+ }
64
+ /**
65
+ * Caches worker operation results.
66
+ *
67
+ * @template Operation The signature of the wrapped operation.
68
+ * @param name Unique name of the operation, used as part of the cache key.
69
+ * @param operation The operation to cache.
70
+ * @returns The wrapped operation.
71
+ */
72
+ export function withOperationCache(name, operation) {
73
+ return ((ctx, ...args) => withCache(`${name}-${ctx.cwd}-${ctx.tsconfigPath}-${JSON.stringify(args)}`, ctx.tailwindConfigPath, () => operation(ctx, ...args)));
74
+ }
75
+ /**
76
+ * Caches an operation that filters a class list per class.
77
+ *
78
+ * @param key Unique name of the operation, used as part of the cache key.
79
+ * @param path Path of the file to watch for changes.
80
+ * @param classes The classes to filter.
81
+ * @param filterClasses The operation, called with the classes that have no cached verdict yet.
82
+ * @returns The classes for which the operation's verdict is positive, in input order.
83
+ */
84
+ export function withPerClassCache(key, path, classes, filterClasses) {
85
+ const modified = path ? getModifiedDate(path) : undefined;
86
+ const verdicts = new Map();
87
+ const uncachedClasses = [];
88
+ for (const className of classes) {
89
+ if (verdicts.has(className)) {
90
+ continue;
91
+ }
92
+ const cached = CLASS_CACHE.get(`${key}-${className}-${path}`);
93
+ if (cached && !(modified && modified > cached.date)) {
94
+ verdicts.set(className, cached.value);
95
+ }
96
+ else {
97
+ uncachedClasses.push(className);
98
+ verdicts.set(className, false);
99
+ }
100
+ }
101
+ if (uncachedClasses.length > 0) {
102
+ const matchedClasses = new Set(filterClasses(uncachedClasses));
103
+ const date = new Date();
104
+ for (const className of uncachedClasses) {
105
+ const value = matchedClasses.has(className);
106
+ verdicts.set(className, value);
107
+ CLASS_CACHE.set(`${key}-${className}-${path}`, { date, value });
108
+ }
109
+ }
110
+ return classes.filter(className => verdicts.get(className));
111
+ }
112
+ export function clearCache() {
113
+ CACHE.clear();
114
+ CLASS_CACHE.clear();
115
+ }
116
+ //# sourceMappingURL=cache.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cache.js","sourceRoot":"","sources":["../../src/async-utils/cache.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,2 @@
1
+ export declare function escapeForRegex(word: string): string;
2
+ //# sourceMappingURL=escape.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"escape.d.ts","sourceRoot":"","sources":["../../src/async-utils/escape.ts"],"names":[],"mappings":"AAGA,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,UAE1C"}
@@ -0,0 +1,5 @@
1
+ import { getCachedRegex } from "./regex.js";
2
+ export function escapeForRegex(word) {
3
+ return word.replace(getCachedRegex(/[$()*+./?[\\\]^{|}-]/g), "\\$&");
4
+ }
5
+ //# sourceMappingURL=escape.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"escape.js","sourceRoot":"","sources":["../../src/async-utils/escape.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAG5C,MAAM,UAAU,cAAc,CAAC,IAAY;IACzC,OAAO,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC,uBAAuB,CAAC,EAAE,MAAM,CAAC,CAAC;AACvE,CAAC"}
@@ -0,0 +1,3 @@
1
+ export declare function findPathRecursive(cwd: string, startDirectory: string, entries: string[]): string | undefined;
2
+ export declare function getModifiedDate(filePath: string): Date;
3
+ //# sourceMappingURL=fs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fs.d.ts","sourceRoot":"","sources":["../../src/async-utils/fs.ts"],"names":[],"mappings":"AAIA,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,MAAM,GAAG,SAAS,CAqB5G;AAED,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAOtD"}