Skip to content

Releases: AhmedBaset/eslint-plugin-rtl-friendly

0.5.0

18 May 22:03

Choose a tag to compare

0.5.0

Minor Changes

  • #57 9c85bbb Thanks @AhmedBaset! - # Add support for more className cases

    Previously the plugin only supported literal values like className="...", which lead to a big miss, Now it supports more cases:

    • className={"..."} (Auto Fixable)
    • Template Literal: className={``} (Auto Fixable)
    • Terenary Operator: className={condition ? "..." : "..."}
  • #60 affc583 Thanks @AhmedBaset! - Add auto-fixing for ternary operator

  • #61 07bbde9 Thanks @AhmedBaset! - feat: detect classes in CallExpression, ArrayExpression, ObjectExpression

  • #66 7fb8f4f Thanks @AhmedBaset! - feat: Support detecting classes in BinaryExpression "..." + "..."`

  • #67 8e6c4ca Thanks @AhmedBaset! - Support TaggedTemplate ("tw`...`")

    • tw`...` is supported but tw`... ${...}` is not yet
  • #70 c1bbde2 Thanks @AhmedBaset! - Look for Identifier decleration

    const a = "text-left";
    //         ^^^^^^^^^ This text is used later as a class name but contains physical properties such as "text-left". It's better to use logical properties like "test-start" for improved RTL support.
    return <div className={a} />;

    Or even if it's assigned to another variable

    const a = "text-left";
    //         ^^^^^^^^^
    const b = a;
    return <div className={b} />;
  • #90 f7fa50a Thanks @AhmedBaset! - Add option allowPhysicalInsetWithAbsolute to allow the use of left-1/2 with fixed -translate-x-1/2

  • Add option debug

Patch Changes

  • #54 b305432 Thanks @AhmedBaset! - Restructure the codebase:

    • Integrate Changeset to document the updates.
    • Move rule definition, its tests, and docs to a folder in src/rules instead of the horizontal structure.
  • #63 6b98d59 Thanks @AhmedBaset! - Vitest instead of Jest

Full Changelog: 0.2.3...0.5.0

0.2.3

04 Jun 21:08
d786144

Choose a tag to compare

Bug Fixes:

  • fix a bug when using media query, important, and negative modifiers together e.g. md:!-pl-2 by @AhmedBaset in #26

Full Changelog: 0.2.0...0.2.3

0.2.0 `!important` flag & `modifier:property`

08 Sep 19:57

Choose a tag to compare

Now the plugin can detect !pl-*, md:pl-*, and md:!pl-*.

pnpm add -D eslint-plugin-rtl-friendly@latest

yarn add -D eslint-plugin-rtl-friendly@latest

npm install -D eslint-plugin-rtl-friendly@latest
devDependencies:
- eslint-plugin-rtl-friendly 0.1.0
+ eslint-plugin-rtl-friendly 0.2.0

What's Changed

  • feat: detect physical properties with important flag or modifires by @A7med3bdulBaset in #1

Full Changelog: 0.1.0...0.2.0

Introducing `eslint-plugin-rtl-friendly`

24 Aug 17:18

Choose a tag to compare

Version: 1.0.0

Introducing the eslint-plugin-rtl-friendly, your go-to linter for crafting international web applications that seamlessly accommodate right-to-left (RTL) languages.

Key Highlights:

  • Rule: no-physical-properties
    This release introduces the no-physical-properties rule, designed to report tailwindcss classes to be written in logical properties.

Learn more about the plugin and its capabilities here.

Full Changelog: https://github.com/A7med3bdulBaset/eslint-plugin-rtl-friendly/commits/0.1.0