@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.
- package/LICENSE +21 -0
- package/README.md +247 -2
- package/lib/api/defaults.d.ts +103 -0
- package/lib/api/defaults.d.ts.map +1 -0
- package/lib/api/defaults.js +34 -0
- package/lib/api/defaults.js.map +1 -0
- package/lib/api/types.d.ts +9 -0
- package/lib/api/types.d.ts.map +1 -0
- package/lib/api/types.js +5 -0
- package/lib/api/types.js.map +1 -0
- package/lib/async-utils/cache.d.ts +30 -0
- package/lib/async-utils/cache.d.ts.map +1 -0
- package/lib/async-utils/cache.js +116 -0
- package/lib/async-utils/cache.js.map +1 -0
- package/lib/async-utils/escape.d.ts +2 -0
- package/lib/async-utils/escape.d.ts.map +1 -0
- package/lib/async-utils/escape.js +5 -0
- package/lib/async-utils/escape.js.map +1 -0
- package/lib/async-utils/fs.d.ts +3 -0
- package/lib/async-utils/fs.d.ts.map +1 -0
- package/lib/async-utils/fs.js +28 -0
- package/lib/async-utils/fs.js.map +1 -0
- package/lib/async-utils/module.d.ts +3 -0
- package/lib/async-utils/module.d.ts.map +1 -0
- package/lib/async-utils/module.js +7 -0
- package/lib/async-utils/module.js.map +1 -0
- package/lib/async-utils/operations.d.ts +23 -0
- package/lib/async-utils/operations.d.ts.map +1 -0
- package/lib/async-utils/operations.js +2 -0
- package/lib/async-utils/operations.js.map +1 -0
- package/lib/async-utils/order.d.ts +4 -0
- package/lib/async-utils/order.d.ts.map +1 -0
- package/lib/async-utils/order.js +5 -0
- package/lib/async-utils/order.js.map +1 -0
- package/lib/async-utils/path.d.ts +2 -0
- package/lib/async-utils/path.d.ts.map +1 -0
- package/lib/async-utils/path.js +7 -0
- package/lib/async-utils/path.js.map +1 -0
- package/lib/async-utils/platform.d.ts +2 -0
- package/lib/async-utils/platform.d.ts.map +1 -0
- package/lib/async-utils/platform.js +4 -0
- package/lib/async-utils/platform.js.map +1 -0
- package/lib/async-utils/regex.d.ts +3 -0
- package/lib/async-utils/regex.d.ts.map +1 -0
- package/lib/async-utils/regex.js +32 -0
- package/lib/async-utils/regex.js.map +1 -0
- package/lib/async-utils/resolvers.d.ts +7 -0
- package/lib/async-utils/resolvers.d.ts.map +1 -0
- package/lib/async-utils/resolvers.js +64 -0
- package/lib/async-utils/resolvers.js.map +1 -0
- package/lib/async-utils/segment.d.ts +2 -0
- package/lib/async-utils/segment.d.ts.map +1 -0
- package/lib/async-utils/segment.js +82 -0
- package/lib/async-utils/segment.js.map +1 -0
- package/lib/async-utils/worker.d.ts +3 -0
- package/lib/async-utils/worker.d.ts.map +1 -0
- package/lib/async-utils/worker.js +17 -0
- package/lib/async-utils/worker.js.map +1 -0
- package/lib/configs/config.d.ts +3521 -0
- package/lib/configs/config.d.ts.map +1 -0
- package/lib/configs/config.js +98 -0
- package/lib/configs/config.js.map +1 -0
- package/lib/options/callees/cc.d.ts +30 -0
- package/lib/options/callees/cc.d.ts.map +1 -0
- package/lib/options/callees/cc.js +25 -0
- package/lib/options/callees/cc.js.map +1 -0
- package/lib/options/callees/clb.d.ts +35 -0
- package/lib/options/callees/clb.d.ts.map +1 -0
- package/lib/options/callees/clb.js +39 -0
- package/lib/options/callees/clb.js.map +1 -0
- package/lib/options/callees/clsx.d.ts +30 -0
- package/lib/options/callees/clsx.d.ts.map +1 -0
- package/lib/options/callees/clsx.js +25 -0
- package/lib/options/callees/clsx.js.map +1 -0
- package/lib/options/callees/cn.d.ts +30 -0
- package/lib/options/callees/cn.d.ts.map +1 -0
- package/lib/options/callees/cn.js +25 -0
- package/lib/options/callees/cn.js.map +1 -0
- package/lib/options/callees/cnb.d.ts +30 -0
- package/lib/options/callees/cnb.d.ts.map +1 -0
- package/lib/options/callees/cnb.js +25 -0
- package/lib/options/callees/cnb.js.map +1 -0
- package/lib/options/callees/ctl.d.ts +17 -0
- package/lib/options/callees/ctl.d.ts.map +1 -0
- package/lib/options/callees/ctl.js +15 -0
- package/lib/options/callees/ctl.js.map +1 -0
- package/lib/options/callees/cva.d.ts +40 -0
- package/lib/options/callees/cva.d.ts.map +1 -0
- package/lib/options/callees/cva.js +37 -0
- package/lib/options/callees/cva.js.map +1 -0
- package/lib/options/callees/cx.d.ts +30 -0
- package/lib/options/callees/cx.d.ts.map +1 -0
- package/lib/options/callees/cx.js +25 -0
- package/lib/options/callees/cx.js.map +1 -0
- package/lib/options/callees/dcnb.d.ts +30 -0
- package/lib/options/callees/dcnb.d.ts.map +1 -0
- package/lib/options/callees/dcnb.js +25 -0
- package/lib/options/callees/dcnb.js.map +1 -0
- package/lib/options/callees/objstr.d.ts +24 -0
- package/lib/options/callees/objstr.d.ts.map +1 -0
- package/lib/options/callees/objstr.js +24 -0
- package/lib/options/callees/objstr.js.map +1 -0
- package/lib/options/callees/tv.d.ts +64 -0
- package/lib/options/callees/tv.d.ts.map +1 -0
- package/lib/options/callees/tv.js +70 -0
- package/lib/options/callees/tv.js.map +1 -0
- package/lib/options/callees/twJoin.d.ts +17 -0
- package/lib/options/callees/twJoin.d.ts.map +1 -0
- package/lib/options/callees/twJoin.js +15 -0
- package/lib/options/callees/twJoin.js.map +1 -0
- package/lib/options/callees/twMerge.d.ts +17 -0
- package/lib/options/callees/twMerge.d.ts.map +1 -0
- package/lib/options/callees/twMerge.js +15 -0
- package/lib/options/callees/twMerge.js.map +1 -0
- package/lib/options/default-options.d.ts +114 -0
- package/lib/options/default-options.d.ts.map +1 -0
- package/lib/options/default-options.js +176 -0
- package/lib/options/default-options.js.map +1 -0
- package/lib/options/descriptions.d.ts +657 -0
- package/lib/options/descriptions.d.ts.map +1 -0
- package/lib/options/descriptions.js +22 -0
- package/lib/options/descriptions.js.map +1 -0
- package/lib/options/migrate.d.ts +16 -0
- package/lib/options/migrate.d.ts.map +1 -0
- package/lib/options/migrate.js +132 -0
- package/lib/options/migrate.js.map +1 -0
- package/lib/options/schemas/attributes.d.ts +100 -0
- package/lib/options/schemas/attributes.d.ts.map +1 -0
- package/lib/options/schemas/attributes.js +19 -0
- package/lib/options/schemas/attributes.js.map +1 -0
- package/lib/options/schemas/callees.d.ts +101 -0
- package/lib/options/schemas/callees.d.ts.map +1 -0
- package/lib/options/schemas/callees.js +19 -0
- package/lib/options/schemas/callees.js.map +1 -0
- package/lib/options/schemas/common.d.ts +30 -0
- package/lib/options/schemas/common.d.ts.map +1 -0
- package/lib/options/schemas/common.js +30 -0
- package/lib/options/schemas/common.js.map +1 -0
- package/lib/options/schemas/matchers.d.ts +13 -0
- package/lib/options/schemas/matchers.d.ts.map +1 -0
- package/lib/options/schemas/matchers.js +14 -0
- package/lib/options/schemas/matchers.js.map +1 -0
- package/lib/options/schemas/selectors.d.ts +1289 -0
- package/lib/options/schemas/selectors.d.ts.map +1 -0
- package/lib/options/schemas/selectors.js +100 -0
- package/lib/options/schemas/selectors.js.map +1 -0
- package/lib/options/schemas/tags.d.ts +101 -0
- package/lib/options/schemas/tags.d.ts.map +1 -0
- package/lib/options/schemas/tags.js +19 -0
- package/lib/options/schemas/tags.js.map +1 -0
- package/lib/options/schemas/variables.d.ts +100 -0
- package/lib/options/schemas/variables.d.ts.map +1 -0
- package/lib/options/schemas/variables.js +19 -0
- package/lib/options/schemas/variables.js.map +1 -0
- package/lib/options/tags/twc.d.ts +36 -0
- package/lib/options/tags/twc.d.ts.map +1 -0
- package/lib/options/tags/twc.js +26 -0
- package/lib/options/tags/twc.js.map +1 -0
- package/lib/options/tags/twx.d.ts +36 -0
- package/lib/options/tags/twx.d.ts.map +1 -0
- package/lib/options/tags/twx.js +26 -0
- package/lib/options/tags/twx.js.map +1 -0
- package/lib/parsers/angular.d.ts +11 -0
- package/lib/parsers/angular.d.ts.map +1 -0
- package/lib/parsers/angular.js +736 -0
- package/lib/parsers/angular.js.map +1 -0
- package/lib/parsers/css.d.ts +5 -0
- package/lib/parsers/css.d.ts.map +1 -0
- package/lib/parsers/css.js +100 -0
- package/lib/parsers/css.js.map +1 -0
- package/lib/parsers/es.d.ts +49 -0
- package/lib/parsers/es.d.ts.map +1 -0
- package/lib/parsers/es.js +924 -0
- package/lib/parsers/es.js.map +1 -0
- package/lib/parsers/html.d.ts +8 -0
- package/lib/parsers/html.d.ts.map +1 -0
- package/lib/parsers/html.js +51 -0
- package/lib/parsers/html.js.map +1 -0
- package/lib/parsers/jsx.d.ts +9 -0
- package/lib/parsers/jsx.d.ts.map +1 -0
- package/lib/parsers/jsx.js +118 -0
- package/lib/parsers/jsx.js.map +1 -0
- package/lib/parsers/svelte.d.ts +11 -0
- package/lib/parsers/svelte.d.ts.map +1 -0
- package/lib/parsers/svelte.js +204 -0
- package/lib/parsers/svelte.js.map +1 -0
- package/lib/parsers/vue.d.ts +9 -0
- package/lib/parsers/vue.d.ts.map +1 -0
- package/lib/parsers/vue.js +155 -0
- package/lib/parsers/vue.js.map +1 -0
- package/lib/rules/enforce-canonical-classes.d.ts +229 -0
- package/lib/rules/enforce-canonical-classes.d.ts.map +1 -0
- package/lib/rules/enforce-canonical-classes.js +84 -0
- package/lib/rules/enforce-canonical-classes.js.map +1 -0
- package/lib/rules/enforce-consistent-class-order.d.ts +229 -0
- package/lib/rules/enforce-consistent-class-order.d.ts.map +1 -0
- package/lib/rules/enforce-consistent-class-order.js +250 -0
- package/lib/rules/enforce-consistent-class-order.js.map +1 -0
- package/lib/rules/enforce-consistent-important-position.d.ts +225 -0
- package/lib/rules/enforce-consistent-important-position.d.ts.map +1 -0
- package/lib/rules/enforce-consistent-important-position.js +68 -0
- package/lib/rules/enforce-consistent-important-position.js.map +1 -0
- package/lib/rules/enforce-consistent-line-wrapping.d.ts +235 -0
- package/lib/rules/enforce-consistent-line-wrapping.d.ts.map +1 -0
- package/lib/rules/enforce-consistent-line-wrapping.js +537 -0
- package/lib/rules/enforce-consistent-line-wrapping.js.map +1 -0
- package/lib/rules/enforce-consistent-variable-syntax.d.ts +225 -0
- package/lib/rules/enforce-consistent-variable-syntax.d.ts.map +1 -0
- package/lib/rules/enforce-consistent-variable-syntax.js +164 -0
- package/lib/rules/enforce-consistent-variable-syntax.js.map +1 -0
- package/lib/rules/enforce-consistent-variant-order.d.ts +225 -0
- package/lib/rules/enforce-consistent-variant-order.d.ts.map +1 -0
- package/lib/rules/enforce-consistent-variant-order.js +77 -0
- package/lib/rules/enforce-consistent-variant-order.js.map +1 -0
- package/lib/rules/enforce-logical-properties.d.ts +227 -0
- package/lib/rules/enforce-logical-properties.d.ts.map +1 -0
- package/lib/rules/enforce-logical-properties.js +142 -0
- package/lib/rules/enforce-logical-properties.js.map +1 -0
- package/lib/rules/enforce-shorthand-classes.d.ts +229 -0
- package/lib/rules/enforce-shorthand-classes.d.ts.map +1 -0
- package/lib/rules/enforce-shorthand-classes.js +217 -0
- package/lib/rules/enforce-shorthand-classes.js.map +1 -0
- package/lib/rules/no-concatenated-classes.d.ts +225 -0
- package/lib/rules/no-concatenated-classes.d.ts.map +1 -0
- package/lib/rules/no-concatenated-classes.js +31 -0
- package/lib/rules/no-concatenated-classes.js.map +1 -0
- package/lib/rules/no-conflicting-classes.d.ts +225 -0
- package/lib/rules/no-conflicting-classes.d.ts.map +1 -0
- package/lib/rules/no-conflicting-classes.js +60 -0
- package/lib/rules/no-conflicting-classes.js.map +1 -0
- package/lib/rules/no-deprecated-classes.d.ts +227 -0
- package/lib/rules/no-deprecated-classes.d.ts.map +1 -0
- package/lib/rules/no-deprecated-classes.js +103 -0
- package/lib/rules/no-deprecated-classes.js.map +1 -0
- package/lib/rules/no-duplicate-classes.d.ts +225 -0
- package/lib/rules/no-duplicate-classes.d.ts.map +1 -0
- package/lib/rules/no-duplicate-classes.js +52 -0
- package/lib/rules/no-duplicate-classes.js.map +1 -0
- package/lib/rules/no-restricted-classes.d.ts +225 -0
- package/lib/rules/no-restricted-classes.d.ts.map +1 -0
- package/lib/rules/no-restricted-classes.js +57 -0
- package/lib/rules/no-restricted-classes.js.map +1 -0
- package/lib/rules/no-unknown-classes.d.ts +225 -0
- package/lib/rules/no-unknown-classes.d.ts.map +1 -0
- package/lib/rules/no-unknown-classes.js +82 -0
- package/lib/rules/no-unknown-classes.js.map +1 -0
- package/lib/rules/no-unnecessary-whitespace.d.ts +225 -0
- package/lib/rules/no-unnecessary-whitespace.d.ts.map +1 -0
- package/lib/rules/no-unnecessary-whitespace.js +141 -0
- package/lib/rules/no-unnecessary-whitespace.js.map +1 -0
- package/lib/tailwindcss/canonical-classes.async.v4.d.ts +3 -0
- package/lib/tailwindcss/canonical-classes.async.v4.d.ts.map +1 -0
- package/lib/tailwindcss/canonical-classes.async.v4.js +54 -0
- package/lib/tailwindcss/canonical-classes.async.v4.js.map +1 -0
- package/lib/tailwindcss/canonical-classes.d.ts +21 -0
- package/lib/tailwindcss/canonical-classes.d.ts.map +1 -0
- package/lib/tailwindcss/canonical-classes.js +16 -0
- package/lib/tailwindcss/canonical-classes.js.map +1 -0
- package/lib/tailwindcss/class-order.async.v3.d.ts +3 -0
- package/lib/tailwindcss/class-order.async.v3.d.ts.map +1 -0
- package/lib/tailwindcss/class-order.async.v3.js +4 -0
- package/lib/tailwindcss/class-order.async.v3.js.map +1 -0
- package/lib/tailwindcss/class-order.async.v4.d.ts +3 -0
- package/lib/tailwindcss/class-order.async.v4.d.ts.map +1 -0
- package/lib/tailwindcss/class-order.async.v4.js +4 -0
- package/lib/tailwindcss/class-order.async.v4.js.map +1 -0
- package/lib/tailwindcss/class-order.d.ts +11 -0
- package/lib/tailwindcss/class-order.d.ts.map +1 -0
- package/lib/tailwindcss/class-order.js +16 -0
- package/lib/tailwindcss/class-order.js.map +1 -0
- package/lib/tailwindcss/conflicting-classes.async.v4.d.ts +35 -0
- package/lib/tailwindcss/conflicting-classes.async.v4.d.ts.map +1 -0
- package/lib/tailwindcss/conflicting-classes.async.v4.js +82 -0
- package/lib/tailwindcss/conflicting-classes.async.v4.js.map +1 -0
- package/lib/tailwindcss/conflicting-classes.d.ts +19 -0
- package/lib/tailwindcss/conflicting-classes.d.ts.map +1 -0
- package/lib/tailwindcss/conflicting-classes.js +17 -0
- package/lib/tailwindcss/conflicting-classes.js.map +1 -0
- package/lib/tailwindcss/context.async.v3.d.ts +3 -0
- package/lib/tailwindcss/context.async.v3.d.ts.map +1 -0
- package/lib/tailwindcss/context.async.v3.js +13 -0
- package/lib/tailwindcss/context.async.v3.js.map +1 -0
- package/lib/tailwindcss/context.async.v4.d.ts +3 -0
- package/lib/tailwindcss/context.async.v4.d.ts.map +1 -0
- package/lib/tailwindcss/context.async.v4.js +82 -0
- package/lib/tailwindcss/context.async.v4.js.map +1 -0
- package/lib/tailwindcss/custom-component-classes.async.v3.d.ts +4 -0
- package/lib/tailwindcss/custom-component-classes.async.v3.d.ts.map +1 -0
- package/lib/tailwindcss/custom-component-classes.async.v3.js +4 -0
- package/lib/tailwindcss/custom-component-classes.async.v3.js.map +1 -0
- package/lib/tailwindcss/custom-component-classes.async.v4.d.ts +4 -0
- package/lib/tailwindcss/custom-component-classes.async.v4.d.ts.map +1 -0
- package/lib/tailwindcss/custom-component-classes.async.v4.js +101 -0
- package/lib/tailwindcss/custom-component-classes.async.v4.js.map +1 -0
- package/lib/tailwindcss/custom-component-classes.d.ts +11 -0
- package/lib/tailwindcss/custom-component-classes.d.ts.map +1 -0
- package/lib/tailwindcss/custom-component-classes.js +16 -0
- package/lib/tailwindcss/custom-component-classes.js.map +1 -0
- package/lib/tailwindcss/dissect-classes.async.v3.d.ts +4 -0
- package/lib/tailwindcss/dissect-classes.async.v3.d.ts.map +1 -0
- package/lib/tailwindcss/dissect-classes.async.v3.js +32 -0
- package/lib/tailwindcss/dissect-classes.async.v3.js.map +1 -0
- package/lib/tailwindcss/dissect-classes.async.v4.d.ts +3 -0
- package/lib/tailwindcss/dissect-classes.async.v4.d.ts.map +1 -0
- package/lib/tailwindcss/dissect-classes.async.v4.js +39 -0
- package/lib/tailwindcss/dissect-classes.async.v4.js.map +1 -0
- package/lib/tailwindcss/dissect-classes.d.ts +23 -0
- package/lib/tailwindcss/dissect-classes.d.ts.map +1 -0
- package/lib/tailwindcss/dissect-classes.js +16 -0
- package/lib/tailwindcss/dissect-classes.js.map +1 -0
- package/lib/tailwindcss/prefix.async.v3.d.ts +4 -0
- package/lib/tailwindcss/prefix.async.v3.d.ts.map +1 -0
- package/lib/tailwindcss/prefix.async.v3.js +7 -0
- package/lib/tailwindcss/prefix.async.v3.js.map +1 -0
- package/lib/tailwindcss/prefix.async.v4.d.ts +4 -0
- package/lib/tailwindcss/prefix.async.v4.d.ts.map +1 -0
- package/lib/tailwindcss/prefix.async.v4.js +7 -0
- package/lib/tailwindcss/prefix.async.v4.js.map +1 -0
- package/lib/tailwindcss/prefix.d.ts +13 -0
- package/lib/tailwindcss/prefix.d.ts.map +1 -0
- package/lib/tailwindcss/prefix.js +15 -0
- package/lib/tailwindcss/prefix.js.map +1 -0
- package/lib/tailwindcss/tailwind.async.worker.v3.d.ts +2 -0
- package/lib/tailwindcss/tailwind.async.worker.v3.d.ts.map +1 -0
- package/lib/tailwindcss/tailwind.async.worker.v3.js +57 -0
- package/lib/tailwindcss/tailwind.async.worker.v3.js.map +1 -0
- package/lib/tailwindcss/tailwind.async.worker.v4.d.ts +2 -0
- package/lib/tailwindcss/tailwind.async.worker.v4.d.ts.map +1 -0
- package/lib/tailwindcss/tailwind.async.worker.v4.js +56 -0
- package/lib/tailwindcss/tailwind.async.worker.v4.js.map +1 -0
- package/lib/tailwindcss/unknown-classes.async.v3.d.ts +4 -0
- package/lib/tailwindcss/unknown-classes.async.v3.d.ts.map +1 -0
- package/lib/tailwindcss/unknown-classes.async.v3.js +10 -0
- package/lib/tailwindcss/unknown-classes.async.v3.js.map +1 -0
- package/lib/tailwindcss/unknown-classes.async.v4.d.ts +3 -0
- package/lib/tailwindcss/unknown-classes.async.v4.d.ts.map +1 -0
- package/lib/tailwindcss/unknown-classes.async.v4.js +5 -0
- package/lib/tailwindcss/unknown-classes.async.v4.js.map +1 -0
- package/lib/tailwindcss/unknown-classes.d.ts +11 -0
- package/lib/tailwindcss/unknown-classes.d.ts.map +1 -0
- package/lib/tailwindcss/unknown-classes.js +21 -0
- package/lib/tailwindcss/unknown-classes.js.map +1 -0
- package/lib/tailwindcss/variant-order.async.v3.d.ts +3 -0
- package/lib/tailwindcss/variant-order.async.v3.d.ts.map +1 -0
- package/lib/tailwindcss/variant-order.async.v3.js +4 -0
- package/lib/tailwindcss/variant-order.async.v3.js.map +1 -0
- package/lib/tailwindcss/variant-order.async.v4.d.ts +3 -0
- package/lib/tailwindcss/variant-order.async.v4.d.ts.map +1 -0
- package/lib/tailwindcss/variant-order.async.v4.js +34 -0
- package/lib/tailwindcss/variant-order.async.v4.js.map +1 -0
- package/lib/tailwindcss/variant-order.d.ts +11 -0
- package/lib/tailwindcss/variant-order.d.ts.map +1 -0
- package/lib/tailwindcss/variant-order.js +16 -0
- package/lib/tailwindcss/variant-order.js.map +1 -0
- package/lib/types/ast.d.ts +79 -0
- package/lib/types/ast.d.ts.map +1 -0
- package/lib/types/ast.js +2 -0
- package/lib/types/ast.js.map +1 -0
- package/lib/types/async.d.ts +7 -0
- package/lib/types/async.d.ts.map +1 -0
- package/lib/types/async.js +2 -0
- package/lib/types/async.js.map +1 -0
- package/lib/types/estree.d.ts +7 -0
- package/lib/types/estree.d.ts.map +1 -0
- package/lib/types/estree.js +2 -0
- package/lib/types/estree.js.map +1 -0
- package/lib/types/rule.d.ts +163 -0
- package/lib/types/rule.d.ts.map +1 -0
- package/lib/types/rule.js +24 -0
- package/lib/types/rule.js.map +1 -0
- package/lib/utils/ast.d.ts +4 -0
- package/lib/utils/ast.d.ts.map +1 -0
- package/lib/utils/ast.js +9 -0
- package/lib/utils/ast.js.map +1 -0
- package/lib/utils/class.d.ts +12 -0
- package/lib/utils/class.d.ts.map +1 -0
- package/lib/utils/class.js +19 -0
- package/lib/utils/class.js.map +1 -0
- package/lib/utils/context.d.ts +20 -0
- package/lib/utils/context.d.ts.map +1 -0
- package/lib/utils/context.js +91 -0
- package/lib/utils/context.js.map +1 -0
- package/lib/utils/lint.d.ts +17 -0
- package/lib/utils/lint.d.ts.map +1 -0
- package/lib/utils/lint.js +40 -0
- package/lib/utils/lint.js.map +1 -0
- package/lib/utils/matchers.d.ts +24 -0
- package/lib/utils/matchers.d.ts.map +1 -0
- package/lib/utils/matchers.js +154 -0
- package/lib/utils/matchers.js.map +1 -0
- package/lib/utils/quotes.d.ts +3 -0
- package/lib/utils/quotes.d.ts.map +1 -0
- package/lib/utils/quotes.js +9 -0
- package/lib/utils/quotes.js.map +1 -0
- package/lib/utils/rule.d.ts +31 -0
- package/lib/utils/rule.d.ts.map +1 -0
- package/lib/utils/rule.js +349 -0
- package/lib/utils/rule.js.map +1 -0
- package/lib/utils/selectors.d.ts +3 -0
- package/lib/utils/selectors.d.ts.map +1 -0
- package/lib/utils/selectors.js +4 -0
- package/lib/utils/selectors.js.map +1 -0
- package/lib/utils/utils.d.ts +49 -0
- package/lib/utils/utils.d.ts.map +1 -0
- package/lib/utils/utils.js +203 -0
- package/lib/utils/utils.js.map +1 -0
- package/lib/utils/valibot.d.ts +4 -0
- package/lib/utils/valibot.d.ts.map +1 -0
- package/lib/utils/valibot.js +12 -0
- package/lib/utils/valibot.js.map +1 -0
- package/lib/utils/version.d.ts +7 -0
- package/lib/utils/version.d.ts.map +1 -0
- package/lib/utils/version.js +6 -0
- package/lib/utils/version.js.map +1 -0
- package/lib/utils/visitedNodes.d.ts +4 -0
- package/lib/utils/visitedNodes.d.ts.map +1 -0
- package/lib/utils/visitedNodes.js +11 -0
- package/lib/utils/visitedNodes.js.map +1 -0
- package/lib/utils/warn.d.ts +2 -0
- package/lib/utils/warn.d.ts.map +1 -0
- package/lib/utils/warn.js +8 -0
- package/lib/utils/warn.js.map +1 -0
- 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
|
-
|
|
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
|
-
|
|
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"}
|
package/lib/api/types.js
ADDED
|
@@ -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 @@
|
|
|
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 @@
|
|
|
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 @@
|
|
|
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"}
|