diff --git a/.changeset/great-ducks-smile.md b/.changeset/great-ducks-smile.md deleted file mode 100644 index e378ad5..0000000 --- a/.changeset/great-ducks-smile.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"eslint-plugin-rtl-friendly": minor ---- - -Add auto-fixing for ternary operator diff --git a/.changeset/itchy-days-explain.md b/.changeset/itchy-days-explain.md deleted file mode 100644 index 44e8ae2..0000000 --- a/.changeset/itchy-days-explain.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"eslint-plugin-rtl-friendly": patch ---- - -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. diff --git a/.changeset/itchy-knives-teach.md b/.changeset/itchy-knives-teach.md deleted file mode 100644 index 296c1c4..0000000 --- a/.changeset/itchy-knives-teach.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"eslint-plugin-rtl-friendly": minor ---- - -feat: CallExpression, ArrayExpression, ObjectExpression diff --git a/.changeset/olive-maps-deny.md b/.changeset/olive-maps-deny.md deleted file mode 100644 index fd4be5e..0000000 --- a/.changeset/olive-maps-deny.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"eslint-plugin-rtl-friendly": patch ---- - -Vitest instead of Jest diff --git a/.changeset/quiet-toes-burn.md b/.changeset/quiet-toes-burn.md deleted file mode 100644 index c18fa61..0000000 --- a/.changeset/quiet-toes-burn.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"eslint-plugin-rtl-friendly": minor ---- - -feat: Support BinaryExpression `"..." + "..."` diff --git a/.changeset/shiny-kangaroos-hunt.md b/.changeset/shiny-kangaroos-hunt.md deleted file mode 100644 index a93f696..0000000 --- a/.changeset/shiny-kangaroos-hunt.md +++ /dev/null @@ -1,16 +0,0 @@ ---- -"eslint-plugin-rtl-friendly": minor ---- - -# Add support for extra 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 ? "..." : "..."}`: - - It reports errors on both consequent and alternate values - - But it only fixes the consequent value - - -Currently, Auto Fixing works with only literal values but the goal is to get it to fix all expressions diff --git a/.changeset/smart-lies-admire.md b/.changeset/smart-lies-admire.md deleted file mode 100644 index 8a5bb5a..0000000 --- a/.changeset/smart-lies-admire.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"eslint-plugin-rtl-friendly": minor ---- - -Support TaggedTemplate ("tw\`...`") -- tw\`...\` is supported but tw\`... ${...}\` is not yet diff --git a/.changeset/twenty-ties-boil.md b/.changeset/twenty-ties-boil.md deleted file mode 100644 index cec0466..0000000 --- a/.changeset/twenty-ties-boil.md +++ /dev/null @@ -1,19 +0,0 @@ ---- -"eslint-plugin-rtl-friendly": minor ---- - -Look for Identifier decleration - -```js -const a = "text-left"; -// ^^^^^^^^^ -return
; -``` - -Or even if it's assigned to another variable -```js -const a = "text-left"; -// ^^^^^^^^^ -const b = a; -return ; -``` diff --git a/CHANGELOG.md b/CHANGELOG.md index 84e0ee4..5e5748f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,13 +1,65 @@ -# Changelog - -## [0.2.0] - 2023-09-08 - -### Fixed - -- `no-physical-properties` rule now correctly handles classes with !important like `!pl-1` flag and modifiers like `hover:` (#1) - -## [0.1.0] - 2023-08-24 - -### Added - -- `no-physical-properties` rule +# Changelog + +## 0.4.0 + +### Minor Changes + +- [#60](https://github.com/AhmedBaset/eslint-plugin-rtl-friendly/pull/60) [`affc583`](https://github.com/AhmedBaset/eslint-plugin-rtl-friendly/commit/affc583c48778feea27ff068eaa7ae068e8920c3) Thanks [@AhmedBaset](https://github.com/AhmedBaset)! - Add auto-fixing for ternary operator + +- [#61](https://github.com/AhmedBaset/eslint-plugin-rtl-friendly/pull/61) [`07bbde9`](https://github.com/AhmedBaset/eslint-plugin-rtl-friendly/commit/07bbde9c715792954c5af91f7426bda66bea5bf7) Thanks [@AhmedBaset](https://github.com/AhmedBaset)! - feat: CallExpression, ArrayExpression, ObjectExpression + +- [#66](https://github.com/AhmedBaset/eslint-plugin-rtl-friendly/pull/66) [`7fb8f4f`](https://github.com/AhmedBaset/eslint-plugin-rtl-friendly/commit/7fb8f4f7b806c79a8e892632e4321ec6a575149b) Thanks [@AhmedBaset](https://github.com/AhmedBaset)! - feat: Support BinaryExpression `"..." + "..."` + +- [#57](https://github.com/AhmedBaset/eslint-plugin-rtl-friendly/pull/57) [`9c85bbb`](https://github.com/AhmedBaset/eslint-plugin-rtl-friendly/commit/9c85bbb0e288ade8a470282ab7a63c6f52bab613) Thanks [@AhmedBaset](https://github.com/AhmedBaset)! - # Add support for extra 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 ? "..." : "..."}`: + - It reports errors on both consequent and alternate values + - But it only fixes the consequent value + + Currently, Auto Fixing works with only literal values but the goal is to get it to fix all expressions + +- [#67](https://github.com/AhmedBaset/eslint-plugin-rtl-friendly/pull/67) [`8e6c4ca`](https://github.com/AhmedBaset/eslint-plugin-rtl-friendly/commit/8e6c4ca519e66611262732e6dbaa5179b1f30980) Thanks [@AhmedBaset](https://github.com/AhmedBaset)! - Support TaggedTemplate ("tw\`...`") + + - tw\`...\` is supported but tw\`... ${...}\` is not yet + +- [#70](https://github.com/AhmedBaset/eslint-plugin-rtl-friendly/pull/70) [`c1bbde2`](https://github.com/AhmedBaset/eslint-plugin-rtl-friendly/commit/c1bbde25668f3ff8b494a2d47a362aa6c3b717cf) Thanks [@AhmedBaset](https://github.com/AhmedBaset)! - Look for Identifier decleration + + ```js + const a = "text-left"; + // ^^^^^^^^^ + return ; + ``` + + Or even if it's assigned to another variable + + ```js + const a = "text-left"; + // ^^^^^^^^^ + const b = a; + return ; + ``` + +### Patch Changes + +- [#54](https://github.com/AhmedBaset/eslint-plugin-rtl-friendly/pull/54) [`b305432`](https://github.com/AhmedBaset/eslint-plugin-rtl-friendly/commit/b305432125e5b911085cc6c1ade88cb2ea3f8111) Thanks [@AhmedBaset](https://github.com/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](https://github.com/AhmedBaset/eslint-plugin-rtl-friendly/pull/63) [`6b98d59`](https://github.com/AhmedBaset/eslint-plugin-rtl-friendly/commit/6b98d5904908fb023c763393a3f66e0836c20700) Thanks [@AhmedBaset](https://github.com/AhmedBaset)! - Vitest instead of Jest + +## [0.2.0] - 2023-09-08 + +### Fixed + +- `no-physical-properties` rule now correctly handles classes with !important like `!pl-1` flag and modifiers like `hover:` (#1) + +## [0.1.0] - 2023-08-24 + +### Added + +- `no-physical-properties` rule diff --git a/package.json b/package.json index 5d2840b..a78339e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "eslint-plugin-rtl-friendly", - "version": "0.3.0", + "version": "0.4.0", "description": "Encourage the use of RTL-friendly styles", "author": { "name": "Ahmed Abdelbaset",