@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
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
import { ES_CONTAINER_TYPES_TO_INSERT_BRACES, ES_CONTAINER_TYPES_TO_REPLACE_QUOTES, getESMatcherFunctions, getLiteralsByESLiteralNode, hasESNodeParentExtension, isESStringLike } from "./es.js";
|
|
2
|
+
import { getLiteralNodesByMatchers } from "../utils/matchers.js";
|
|
3
|
+
import { addAttribute, deduplicateLiterals, getContent, getIndentation, getQuotes, getWhitespace, matchesName } from "../utils/utils.js";
|
|
4
|
+
export const VUE_CONTAINER_TYPES_TO_REPLACE_QUOTES = [
|
|
5
|
+
...ES_CONTAINER_TYPES_TO_REPLACE_QUOTES
|
|
6
|
+
];
|
|
7
|
+
export const VUE_CONTAINER_TYPES_TO_INSERT_BRACES = [
|
|
8
|
+
...ES_CONTAINER_TYPES_TO_INSERT_BRACES
|
|
9
|
+
];
|
|
10
|
+
export function getAttributesByVueStartTag(ctx, node) {
|
|
11
|
+
return node.attributes;
|
|
12
|
+
}
|
|
13
|
+
export function getLiteralsByVueAttribute(ctx, attribute, selectors) {
|
|
14
|
+
if (attribute.value === null) {
|
|
15
|
+
return [];
|
|
16
|
+
}
|
|
17
|
+
const name = getVueAttributeName(attribute);
|
|
18
|
+
const value = attribute.value;
|
|
19
|
+
const literals = selectors.reduce((literals, selector) => {
|
|
20
|
+
if (!matchesName(getVueBoundName(selector.name).toLowerCase(), name?.toLowerCase())) {
|
|
21
|
+
return literals;
|
|
22
|
+
}
|
|
23
|
+
if (!selector.match) {
|
|
24
|
+
literals.push(...getLiteralsByVueLiteralNode(ctx, value));
|
|
25
|
+
return literals;
|
|
26
|
+
}
|
|
27
|
+
literals.push(...getLiteralsByVueMatchers(ctx, value, selector.match));
|
|
28
|
+
return literals;
|
|
29
|
+
}, []);
|
|
30
|
+
return literals
|
|
31
|
+
.filter(deduplicateLiterals)
|
|
32
|
+
.map(addAttribute(name));
|
|
33
|
+
}
|
|
34
|
+
function getLiteralsByVueLiteralNode(ctx, node) {
|
|
35
|
+
if (!hasESNodeParentExtension(node)) {
|
|
36
|
+
return [];
|
|
37
|
+
}
|
|
38
|
+
if (isVueLiteralNode(node)) {
|
|
39
|
+
const literal = getStringLiteralByVueStringLiteral(ctx, node);
|
|
40
|
+
return [literal];
|
|
41
|
+
}
|
|
42
|
+
if (isESStringLike(node)) {
|
|
43
|
+
return getLiteralsByVueESLiteralNode(ctx, node);
|
|
44
|
+
}
|
|
45
|
+
return [];
|
|
46
|
+
}
|
|
47
|
+
function getLiteralsByVueMatchers(ctx, node, matchers) {
|
|
48
|
+
const matcherFunctions = getVueMatcherFunctions(matchers);
|
|
49
|
+
const literalNodes = getLiteralNodesByMatchers(ctx, node, matcherFunctions);
|
|
50
|
+
const literals = literalNodes.flatMap(literalNode => getLiteralsByVueLiteralNode(ctx, literalNode));
|
|
51
|
+
return literals.filter(deduplicateLiterals);
|
|
52
|
+
}
|
|
53
|
+
function getLiteralsByVueESLiteralNode(ctx, node) {
|
|
54
|
+
const literals = getLiteralsByESLiteralNode(ctx, node);
|
|
55
|
+
return literals.map(literal => {
|
|
56
|
+
const multilineQuotes = getMultilineQuotes(node);
|
|
57
|
+
return {
|
|
58
|
+
...literal,
|
|
59
|
+
...multilineQuotes
|
|
60
|
+
};
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
function getStringLiteralByVueStringLiteral(ctx, node) {
|
|
64
|
+
const raw = ctx.sourceCode.getText(node);
|
|
65
|
+
const line = ctx.sourceCode.lines[node.loc.start.line - 1];
|
|
66
|
+
const quotes = getQuotes(raw);
|
|
67
|
+
const content = getContent(raw, quotes);
|
|
68
|
+
const whitespaces = getWhitespace(content);
|
|
69
|
+
const indentation = getIndentation(line);
|
|
70
|
+
const multilineQuotes = getMultilineQuotes(node);
|
|
71
|
+
const binding = getBinding(node, quotes, content);
|
|
72
|
+
return {
|
|
73
|
+
...whitespaces,
|
|
74
|
+
...quotes,
|
|
75
|
+
...multilineQuotes,
|
|
76
|
+
...binding && { binding },
|
|
77
|
+
content,
|
|
78
|
+
indentation,
|
|
79
|
+
loc: node.loc,
|
|
80
|
+
priorLiterals: [],
|
|
81
|
+
range: [node.range[0], node.range[1]],
|
|
82
|
+
raw,
|
|
83
|
+
supportsMultiline: true,
|
|
84
|
+
type: "StringLiteral"
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
function getBinding(node, quotes, content) {
|
|
88
|
+
const attribute = node.parent;
|
|
89
|
+
// nothing to convert for empty or whitespace-only attributes
|
|
90
|
+
if (content.trim() === "") {
|
|
91
|
+
return undefined;
|
|
92
|
+
}
|
|
93
|
+
// only static attributes (`class="…"`) can be converted to a binding
|
|
94
|
+
if (attribute.type !== "VAttribute" || attribute.directive || attribute.key.type !== "VIdentifier") {
|
|
95
|
+
return undefined;
|
|
96
|
+
}
|
|
97
|
+
// skip if the element already has a binding with the same name (`:class` or `v-bind:class`) to not create a duplicate attribute
|
|
98
|
+
const hasExistingBinding = attribute.parent.attributes.some(sibling => {
|
|
99
|
+
return sibling.directive &&
|
|
100
|
+
sibling.key.name.name === "bind" &&
|
|
101
|
+
sibling.key.argument?.type === "VIdentifier" &&
|
|
102
|
+
sibling.key.argument.name.toLowerCase() === attribute.key.name.toLowerCase();
|
|
103
|
+
});
|
|
104
|
+
if (hasExistingBinding) {
|
|
105
|
+
return undefined;
|
|
106
|
+
}
|
|
107
|
+
// use the raw name to preserve the original casing (the parsed key name is lowercased)
|
|
108
|
+
const name = attribute.key.rawName;
|
|
109
|
+
const openingQuote = quotes.openingQuote ?? "\"";
|
|
110
|
+
const closingQuote = quotes.closingQuote ?? "\"";
|
|
111
|
+
return {
|
|
112
|
+
closing: closingQuote,
|
|
113
|
+
multilineQuotes: ["`"],
|
|
114
|
+
opening: `:${name}=${openingQuote}`,
|
|
115
|
+
range: [attribute.range[0], attribute.range[1]]
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
function getMultilineQuotes(node) {
|
|
119
|
+
const surroundingBraces = VUE_CONTAINER_TYPES_TO_INSERT_BRACES.includes(node.parent.type);
|
|
120
|
+
const multilineQuotes = VUE_CONTAINER_TYPES_TO_REPLACE_QUOTES.includes(node.parent.type)
|
|
121
|
+
? ["`"]
|
|
122
|
+
: [];
|
|
123
|
+
return {
|
|
124
|
+
multilineQuotes,
|
|
125
|
+
surroundingBraces
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
function getVueBoundName(name) {
|
|
129
|
+
return name.startsWith(":") ? `v-bind:${name.slice(1)}` : name;
|
|
130
|
+
}
|
|
131
|
+
function getVueAttributeName(attribute) {
|
|
132
|
+
if (isVueAttribute(attribute)) {
|
|
133
|
+
return attribute.key.name;
|
|
134
|
+
}
|
|
135
|
+
if (isVueDirective(attribute)) {
|
|
136
|
+
if (attribute.key.argument?.type === "VIdentifier") {
|
|
137
|
+
return `v-${attribute.key.name.name}:${attribute.key.argument.name}`;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
function isVueAttribute(attribute) {
|
|
142
|
+
return attribute.key.type === "VIdentifier";
|
|
143
|
+
}
|
|
144
|
+
function isVueDirective(attribute) {
|
|
145
|
+
return attribute.key.type === "VDirectiveKey";
|
|
146
|
+
}
|
|
147
|
+
function isVueLiteralNode(node) {
|
|
148
|
+
return node.type === "VLiteral";
|
|
149
|
+
}
|
|
150
|
+
function getVueMatcherFunctions(matchers) {
|
|
151
|
+
return getESMatcherFunctions(matchers, {
|
|
152
|
+
isStringLikeNode: isVueLiteralNode
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
//# sourceMappingURL=vue.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vue.js","sourceRoot":"","sources":["../../src/parsers/vue.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mCAAmC,EACnC,oCAAoC,EACpC,qBAAqB,EACrB,0BAA0B,EAC1B,wBAAwB,EACxB,cAAc,EACf,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,yBAAyB,EAAE,MAAM,sCAAsC,CAAC;AACjF,OAAO,EACL,YAAY,EACZ,mBAAmB,EACnB,UAAU,EACV,cAAc,EACd,SAAS,EACT,aAAa,EACb,WAAW,EACZ,MAAM,mCAAmC,CAAC;AAiB3C,MAAM,CAAC,MAAM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asses: {
|
|
2
|
+
category: "stylistic";
|
|
3
|
+
messages: {
|
|
4
|
+
readonly multiple: "The classes: \"{{ classNames }}\" can be simplified to \"{{canonicalClass}}\".";
|
|
5
|
+
readonly single: "The class: \"{{ className }}\" can be simplified to \"{{canonicalClass}}\".";
|
|
6
|
+
} | undefined;
|
|
7
|
+
name: "enforce-canonical-classes";
|
|
8
|
+
readonly options: {
|
|
9
|
+
cwd?: string | undefined;
|
|
10
|
+
rootFontSize?: number | undefined;
|
|
11
|
+
detectComponentClasses: boolean;
|
|
12
|
+
tsconfig?: string | undefined;
|
|
13
|
+
tailwindConfig?: string | undefined;
|
|
14
|
+
messageStyle: "visual" | "compact" | "raw";
|
|
15
|
+
entryPoint?: string | undefined;
|
|
16
|
+
tags?: (string | [string, ({
|
|
17
|
+
match: import("../types/rule.js").MatcherType.String;
|
|
18
|
+
} | {
|
|
19
|
+
match: import("../types/rule.js").MatcherType.ObjectKey;
|
|
20
|
+
pathPattern?: string | undefined;
|
|
21
|
+
} | {
|
|
22
|
+
match: import("../types/rule.js").MatcherType.ObjectValue;
|
|
23
|
+
pathPattern?: string | undefined;
|
|
24
|
+
})[]])[] | undefined;
|
|
25
|
+
variables?: (string | [string, ({
|
|
26
|
+
match: import("../types/rule.js").MatcherType.String;
|
|
27
|
+
} | {
|
|
28
|
+
match: import("../types/rule.js").MatcherType.ObjectKey;
|
|
29
|
+
pathPattern?: string | undefined;
|
|
30
|
+
} | {
|
|
31
|
+
match: import("../types/rule.js").MatcherType.ObjectValue;
|
|
32
|
+
pathPattern?: string | undefined;
|
|
33
|
+
})[]])[] | undefined;
|
|
34
|
+
attributes?: (string | [string, ({
|
|
35
|
+
match: import("../types/rule.js").MatcherType.String;
|
|
36
|
+
} | {
|
|
37
|
+
match: import("../types/rule.js").MatcherType.ObjectKey;
|
|
38
|
+
pathPattern?: string | undefined;
|
|
39
|
+
} | {
|
|
40
|
+
match: import("../types/rule.js").MatcherType.ObjectValue;
|
|
41
|
+
pathPattern?: string | undefined;
|
|
42
|
+
})[]])[] | undefined;
|
|
43
|
+
callees?: (string | [string, ({
|
|
44
|
+
match: import("../types/rule.js").MatcherType.String;
|
|
45
|
+
} | {
|
|
46
|
+
match: import("../types/rule.js").MatcherType.ObjectKey;
|
|
47
|
+
pathPattern?: string | undefined;
|
|
48
|
+
} | {
|
|
49
|
+
match: import("../types/rule.js").MatcherType.ObjectValue;
|
|
50
|
+
pathPattern?: string | undefined;
|
|
51
|
+
})[]])[] | undefined;
|
|
52
|
+
selectors: ({
|
|
53
|
+
callTarget?: number | "all" | "first" | "last" | undefined;
|
|
54
|
+
kind: import("../types/rule.js").SelectorKind.Callee;
|
|
55
|
+
match?: ({
|
|
56
|
+
type: import("../types/rule.js").MatcherType.String;
|
|
57
|
+
} | {
|
|
58
|
+
path?: string | undefined;
|
|
59
|
+
type: import("../types/rule.js").MatcherType.ObjectKey;
|
|
60
|
+
} | {
|
|
61
|
+
path?: string | undefined;
|
|
62
|
+
type: import("../types/rule.js").MatcherType.ObjectValue;
|
|
63
|
+
} | {
|
|
64
|
+
match: ({
|
|
65
|
+
type: import("../types/rule.js").MatcherType.String;
|
|
66
|
+
} | {
|
|
67
|
+
path?: string | undefined;
|
|
68
|
+
type: import("../types/rule.js").MatcherType.ObjectKey;
|
|
69
|
+
} | {
|
|
70
|
+
path?: string | undefined;
|
|
71
|
+
type: import("../types/rule.js").MatcherType.ObjectValue;
|
|
72
|
+
})[];
|
|
73
|
+
type: import("../types/rule.js").MatcherType.AnonymousFunctionReturn;
|
|
74
|
+
})[] | undefined;
|
|
75
|
+
name: string;
|
|
76
|
+
path?: string | undefined;
|
|
77
|
+
targetArgument?: number | "all" | "first" | "last" | undefined;
|
|
78
|
+
targetCall?: number | "all" | "first" | "last" | undefined;
|
|
79
|
+
} | {
|
|
80
|
+
callTarget?: number | "all" | "first" | "last" | undefined;
|
|
81
|
+
kind: import("../types/rule.js").SelectorKind.Callee;
|
|
82
|
+
match?: ({
|
|
83
|
+
type: import("../types/rule.js").MatcherType.String;
|
|
84
|
+
} | {
|
|
85
|
+
path?: string | undefined;
|
|
86
|
+
type: import("../types/rule.js").MatcherType.ObjectKey;
|
|
87
|
+
} | {
|
|
88
|
+
path?: string | undefined;
|
|
89
|
+
type: import("../types/rule.js").MatcherType.ObjectValue;
|
|
90
|
+
} | {
|
|
91
|
+
match: ({
|
|
92
|
+
type: import("../types/rule.js").MatcherType.String;
|
|
93
|
+
} | {
|
|
94
|
+
path?: string | undefined;
|
|
95
|
+
type: import("../types/rule.js").MatcherType.ObjectKey;
|
|
96
|
+
} | {
|
|
97
|
+
path?: string | undefined;
|
|
98
|
+
type: import("../types/rule.js").MatcherType.ObjectValue;
|
|
99
|
+
})[];
|
|
100
|
+
type: import("../types/rule.js").MatcherType.AnonymousFunctionReturn;
|
|
101
|
+
})[] | undefined;
|
|
102
|
+
name?: string | undefined;
|
|
103
|
+
path: string;
|
|
104
|
+
targetArgument?: number | "all" | "first" | "last" | undefined;
|
|
105
|
+
targetCall?: number | "all" | "first" | "last" | undefined;
|
|
106
|
+
} | {
|
|
107
|
+
kind: import("../types/rule.js").SelectorKind.Tag;
|
|
108
|
+
match?: ({
|
|
109
|
+
type: import("../types/rule.js").MatcherType.String;
|
|
110
|
+
} | {
|
|
111
|
+
path?: string | undefined;
|
|
112
|
+
type: import("../types/rule.js").MatcherType.ObjectKey;
|
|
113
|
+
} | {
|
|
114
|
+
path?: string | undefined;
|
|
115
|
+
type: import("../types/rule.js").MatcherType.ObjectValue;
|
|
116
|
+
} | {
|
|
117
|
+
match: ({
|
|
118
|
+
type: import("../types/rule.js").MatcherType.String;
|
|
119
|
+
} | {
|
|
120
|
+
path?: string | undefined;
|
|
121
|
+
type: import("../types/rule.js").MatcherType.ObjectKey;
|
|
122
|
+
} | {
|
|
123
|
+
path?: string | undefined;
|
|
124
|
+
type: import("../types/rule.js").MatcherType.ObjectValue;
|
|
125
|
+
})[];
|
|
126
|
+
type: import("../types/rule.js").MatcherType.AnonymousFunctionReturn;
|
|
127
|
+
})[] | undefined;
|
|
128
|
+
name: string;
|
|
129
|
+
path?: string | undefined;
|
|
130
|
+
} | {
|
|
131
|
+
kind: import("../types/rule.js").SelectorKind.Tag;
|
|
132
|
+
match?: ({
|
|
133
|
+
type: import("../types/rule.js").MatcherType.String;
|
|
134
|
+
} | {
|
|
135
|
+
path?: string | undefined;
|
|
136
|
+
type: import("../types/rule.js").MatcherType.ObjectKey;
|
|
137
|
+
} | {
|
|
138
|
+
path?: string | undefined;
|
|
139
|
+
type: import("../types/rule.js").MatcherType.ObjectValue;
|
|
140
|
+
} | {
|
|
141
|
+
match: ({
|
|
142
|
+
type: import("../types/rule.js").MatcherType.String;
|
|
143
|
+
} | {
|
|
144
|
+
path?: string | undefined;
|
|
145
|
+
type: import("../types/rule.js").MatcherType.ObjectKey;
|
|
146
|
+
} | {
|
|
147
|
+
path?: string | undefined;
|
|
148
|
+
type: import("../types/rule.js").MatcherType.ObjectValue;
|
|
149
|
+
})[];
|
|
150
|
+
type: import("../types/rule.js").MatcherType.AnonymousFunctionReturn;
|
|
151
|
+
})[] | undefined;
|
|
152
|
+
name?: string | undefined;
|
|
153
|
+
path: string;
|
|
154
|
+
} | {
|
|
155
|
+
kind: import("../types/rule.js").SelectorKind.Attribute;
|
|
156
|
+
match?: ({
|
|
157
|
+
type: import("../types/rule.js").MatcherType.String;
|
|
158
|
+
} | {
|
|
159
|
+
path?: string | undefined;
|
|
160
|
+
type: import("../types/rule.js").MatcherType.ObjectKey;
|
|
161
|
+
} | {
|
|
162
|
+
path?: string | undefined;
|
|
163
|
+
type: import("../types/rule.js").MatcherType.ObjectValue;
|
|
164
|
+
} | {
|
|
165
|
+
match: ({
|
|
166
|
+
type: import("../types/rule.js").MatcherType.String;
|
|
167
|
+
} | {
|
|
168
|
+
path?: string | undefined;
|
|
169
|
+
type: import("../types/rule.js").MatcherType.ObjectKey;
|
|
170
|
+
} | {
|
|
171
|
+
path?: string | undefined;
|
|
172
|
+
type: import("../types/rule.js").MatcherType.ObjectValue;
|
|
173
|
+
})[];
|
|
174
|
+
type: import("../types/rule.js").MatcherType.AnonymousFunctionReturn;
|
|
175
|
+
})[] | undefined;
|
|
176
|
+
name: string;
|
|
177
|
+
} | {
|
|
178
|
+
kind: import("../types/rule.js").SelectorKind.Variable;
|
|
179
|
+
match?: ({
|
|
180
|
+
type: import("../types/rule.js").MatcherType.String;
|
|
181
|
+
} | {
|
|
182
|
+
path?: string | undefined;
|
|
183
|
+
type: import("../types/rule.js").MatcherType.ObjectKey;
|
|
184
|
+
} | {
|
|
185
|
+
path?: string | undefined;
|
|
186
|
+
type: import("../types/rule.js").MatcherType.ObjectValue;
|
|
187
|
+
} | {
|
|
188
|
+
match: ({
|
|
189
|
+
type: import("../types/rule.js").MatcherType.String;
|
|
190
|
+
} | {
|
|
191
|
+
path?: string | undefined;
|
|
192
|
+
type: import("../types/rule.js").MatcherType.ObjectKey;
|
|
193
|
+
} | {
|
|
194
|
+
path?: string | undefined;
|
|
195
|
+
type: import("../types/rule.js").MatcherType.ObjectValue;
|
|
196
|
+
})[];
|
|
197
|
+
type: import("../types/rule.js").MatcherType.AnonymousFunctionReturn;
|
|
198
|
+
})[] | undefined;
|
|
199
|
+
name: string;
|
|
200
|
+
})[];
|
|
201
|
+
} & {
|
|
202
|
+
collapse: boolean;
|
|
203
|
+
ignore: string[];
|
|
204
|
+
logical: boolean;
|
|
205
|
+
};
|
|
206
|
+
recommended: true;
|
|
207
|
+
rule: {
|
|
208
|
+
create: (ctx: import("eslint").Rule.RuleContext) => import("eslint").Rule.RuleListener;
|
|
209
|
+
meta: {
|
|
210
|
+
messages?: {
|
|
211
|
+
readonly multiple: "The classes: \"{{ classNames }}\" can be simplified to \"{{canonicalClass}}\".";
|
|
212
|
+
readonly single: "The class: \"{{ className }}\" can be simplified to \"{{canonicalClass}}\".";
|
|
213
|
+
};
|
|
214
|
+
docs: {
|
|
215
|
+
description: string;
|
|
216
|
+
recommended: boolean;
|
|
217
|
+
url: string;
|
|
218
|
+
};
|
|
219
|
+
fixable: "code" | undefined;
|
|
220
|
+
schema: {
|
|
221
|
+
additionalProperties: false;
|
|
222
|
+
properties: Record<string, boolean | import("@valibot/to-json-schema").JsonSchema> | undefined;
|
|
223
|
+
type: "object";
|
|
224
|
+
}[];
|
|
225
|
+
type: "problem" | "layout";
|
|
226
|
+
};
|
|
227
|
+
};
|
|
228
|
+
};
|
|
229
|
+
//# sourceMappingURL=enforce-canonical-classes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"enforce-canonical-classes.d.ts","sourceRoot":"","sources":["../../src/rules/enforce-canonical-classes.ts"],"names":[],"mappings":"AAsBA,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6ClC,CAAC"}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { array, boolean, description, optional, pipe, strictObject, string } from "valibot";
|
|
2
|
+
import { createGetCanonicalClasses, getCanonicalClasses } from "../tailwindcss/canonical-classes.js";
|
|
3
|
+
import { createGetPrefix, getPrefix } from "../tailwindcss/prefix.js";
|
|
4
|
+
import { async } from "../utils/context.js";
|
|
5
|
+
import { lintClasses } from "../utils/lint.js";
|
|
6
|
+
import { getCachedRegex } from "../async-utils/regex.js";
|
|
7
|
+
import { createRule } from "../utils/rule.js";
|
|
8
|
+
import { deduplicateClasses, splitClasses } from "../utils/utils.js";
|
|
9
|
+
export const enforceCanonicalClasses = createRule({
|
|
10
|
+
autofix: true,
|
|
11
|
+
category: "stylistic",
|
|
12
|
+
description: "Enforce canonical class names.",
|
|
13
|
+
docs: "https://github.com/schoero/eslint-plugin-better-tailwindcss/blob/main/docs/rules/enforce-canonical-classes.md",
|
|
14
|
+
name: "enforce-canonical-classes",
|
|
15
|
+
recommended: true,
|
|
16
|
+
schema: strictObject({
|
|
17
|
+
collapse: optional(pipe(boolean(), description("Whether to collapse multiple utilities into a single utility if possible.")), true),
|
|
18
|
+
ignore: optional(pipe(array(string()), description("A list of regular expression patterns for classes that should be ignored by the rule.")), []),
|
|
19
|
+
logical: optional(pipe(boolean(), description("Whether to convert between logical and physical properties when collapsing utilities.")), true)
|
|
20
|
+
}),
|
|
21
|
+
messages: {
|
|
22
|
+
multiple: "The classes: \"{{ classNames }}\" can be simplified to \"{{canonicalClass}}\".",
|
|
23
|
+
single: "The class: \"{{ className }}\" can be simplified to \"{{canonicalClass}}\"."
|
|
24
|
+
},
|
|
25
|
+
initialize: ctx => {
|
|
26
|
+
createGetCanonicalClasses(ctx);
|
|
27
|
+
createGetPrefix(ctx);
|
|
28
|
+
},
|
|
29
|
+
lintLiterals: (ctx, literals) => lintLiterals(ctx, literals)
|
|
30
|
+
});
|
|
31
|
+
function lintLiterals(ctx, literals) {
|
|
32
|
+
const { collapse, ignore, logical, rootFontSize } = ctx.options;
|
|
33
|
+
const ignoredClassRegexes = ignore.map(ignoredClass => getCachedRegex(ignoredClass));
|
|
34
|
+
const asyncCtx = async(ctx);
|
|
35
|
+
const { prefix, suffix } = getPrefix(asyncCtx);
|
|
36
|
+
for (const literal of literals) {
|
|
37
|
+
const classes = splitClasses(literal.content);
|
|
38
|
+
const uniqueClasses = deduplicateClasses(classes);
|
|
39
|
+
const filteredUniqueClasses = uniqueClasses.filter(className => !ignoredClassRegexes.some(ignoredClassRegex => ignoredClassRegex.test(className)));
|
|
40
|
+
if (filteredUniqueClasses.length === 0) {
|
|
41
|
+
continue;
|
|
42
|
+
}
|
|
43
|
+
const { canonicalClasses, warnings } = getCanonicalClasses(asyncCtx, filteredUniqueClasses, {
|
|
44
|
+
collapse,
|
|
45
|
+
logicalToPhysical: logical,
|
|
46
|
+
rem: rootFontSize
|
|
47
|
+
});
|
|
48
|
+
lintClasses(ctx, literal, className => {
|
|
49
|
+
const canonicalClass = canonicalClasses[className];
|
|
50
|
+
if (!canonicalClass) {
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
if (typeof literal.utility === "string" &&
|
|
54
|
+
canonicalClass.output === `${prefix}${suffix}${literal.utility}`) {
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
if (canonicalClass.input.length > 1) {
|
|
58
|
+
return {
|
|
59
|
+
data: {
|
|
60
|
+
canonicalClass: canonicalClasses[className].output,
|
|
61
|
+
classNames: canonicalClass.input.join(", ")
|
|
62
|
+
},
|
|
63
|
+
fix: className === canonicalClass.input[0]
|
|
64
|
+
? canonicalClass.output
|
|
65
|
+
: "",
|
|
66
|
+
id: "multiple",
|
|
67
|
+
warnings
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
if (canonicalClass.input.length === 1 && canonicalClass.output !== className) {
|
|
71
|
+
return {
|
|
72
|
+
data: {
|
|
73
|
+
canonicalClass: canonicalClasses[className].output,
|
|
74
|
+
className: canonicalClass.input[0]
|
|
75
|
+
},
|
|
76
|
+
fix: canonicalClass.output,
|
|
77
|
+
id: "single",
|
|
78
|
+
warnings
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
//# sourceMappingURL=enforce-canonical-classes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"enforce-canonical-classes.js","sourceRoot":"","sources":["../../src/rules/enforce-canonical-classes.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,EACL,OAAO,EACP,WAAW,EACX,QAAQ,EACR,IAAI,EACJ,YAAY,EACZ,MAAM,EACP,MAAM,SAAS,CAAC;AAEjB,OAAO,EAAE,yBAAyB,EAAE,mBAAmB,EAAE,MAAM,qDAAqD,CAAC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