🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

eslint-plugin-readable-tailwind

Package Overview
Dependencies
Maintainers
0
Versions
83
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-readable-tailwind - npm Package Versions

2345
9

3.0.0

Diff
schoero
published 3.0.0 •

Changelog

Source

v3.0.0

compare changes

This version adds 3 new correctness rules to the plugin. To better reflect the new scope of the plugin it was renamed from eslint-plugin-readable-tailwind to eslint-plugin-better-tailwindcss. https://github.com/schoero/eslint-plugin-readable-tailwind/issues/86#issuecomment-2855845766

The predefined configs also have been renamed to better reflect their scope.

Features

⚠️ Breaking changes

  • Plugin renamed to eslint-plugin-better-tailwindcss

  • Deprecate Regex matchers to simplify the configuration. (#98)
    Regex matchers were an early attempt to make the plugin more flexible. However, they were quickly replaced with Matchers which work on the Abstract Syntax Tree and are far more powerful. Support for Regex matchers will be removed in the next major version.

  • warning and error configs have been removed. Use recommended-warn or recommended-error instead. (#99)

Migration

  • Replace eslint-plugin-readable-tailwind with eslint-plugin-better-tailwindcss:
npm uninstall eslint-plugin-readable-tailwind
npm i -D eslint-plugin-better-tailwindcss
  • Update the imports in your config:
- import eslintPluginReadableTailwind from "eslint-plugin-readable-tailwind"; 
+ import eslintPluginBetterTailwindcss from "eslint-plugin-better-tailwindcss";
  • Migrate to the new configs
rules: {
     // enable all recommended rules to warn
-    ...eslintPluginReadableTailwind.configs.warning.rules,
+   ...eslintPluginBetterTailwindcss.configs["recommended-warn"].rules,
     // enable all recommended rules to error
-    ...eslintPluginReadableTailwind.configs.error.rules,
+    ...eslintPluginBetterTailwindcss.configs["recommended-error"].rules,

    // or configure rules individually
-    "readable-tailwind/multiline": ["warn", { printWidth: 100 }]
+    "better-tailwindcss/multiline": ["warn", { printWidth: 100 }] 
  }
schoero
published 2.1.2 •

Changelog

Source

v2.1.2

compare changes

Fixes

  • Multiline quotes (#96)

Refactors

  • Report error for each duplicate class instead of the whole class string (#91)
schoero
published 2.2.0-no-unregistered-classes.2 •
schoero
published 2.2.0-no-unregistered-classes.1 •
schoero
published 2.1.1 •

Changelog

Source

v2.1.1

compare changes

Fixes

  • Unnecessarily escaped quotes in autofixed classes (#88)
schoero
published 2.2.0-no-unregistered-classes.0 •
schoero
published 2.1.0 •

Changelog

Source

v2.1.0

compare changes

Features

  • Experimental angular support. (#85)

Fixes

  • Keep carriage return in es literals when used with vue parser (#84)
schoero
published 2.0.1 •

Changelog

Source

v2.0.1

compare changes

Fixes

  • Keep original newline characters (a564783)

Refactors

  • Display warning if plugin is misconfigured (7c532cd)

Documentation

  • Update quick start guide (e570981)
schoero
published 2.0.0 •

Changelog

Source

v2.0.0

Adds tailwindcss v4 support while keeping support for tailwindcss v3. (#78)

This version contains breaking changes. Most notably support for Node.js < 20 had to be dropped. The other breaking changes are mostly just changes of the default config, that may cause linting errors.

Migration

  • If you use tailwindcss v4, you should specify the entryPoint of the css based tailwind configuration file for the sort-classes rule or in the settings.

  • If you have customized the classAttributes option for any of the rules or via the settings, rename the option to attributes

  • If you have customized attributes, callees, variables, or tags, escape any reserved characters for regular expressions in the name as the name is now evaluated as a regular expression.

    For example:

     {
       variables: [
    -    "$MyVariable"
    +    "\\$MyVariable"
       ]
     }
    

Changes

  • Reload tailwind config automatically if a change is detected.
  • Options now correctly override settings (#66)

⚠️ Breaking Changes

  • ⚠️ Drop support for Node.js < 20 due to incompatibility of worker threads.
  • ⚠️ Add support for tailwindcss v4 (#25)
    • The official class ordering seems to have changed slightly.
    • The improved sorting order will no longer sort variants alphabetically, instead it just makes sure that identical variants are grouped together.
  • ⚠️ Regex names (#63)
    • "Names" can now be regular expressions. This is a breaking change, if you have names configured that contain reserved characters in regular expressions like $.
  • ⚠️ Enable no-duplicate-classes by default (#67)
  • ⚠️ Change default multiline grouping to newLine (#68)
  • ⚠️ Rename classAttributes to attributes (#69)
schoero
published 2.0.0-beta.4 •
2345
9