Skip to content

Commit

Permalink
docs: changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
francoismassart committed May 22, 2024
1 parent 7a19f92 commit 2a1e048
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ You can can the same information on your favorite command line software as well.

## Latest changelog

- feat: [**support flat config and ESLint 9**](https://github.com/francoismassart/eslint-plugin-tailwindcss/pull/330) (by [kazupon](https://github.com/kazupon) 🙏)
- feat: new rule [**`no-unnecessary-arbitrary-value`**](docs/rules/no-unnecessary-arbitrary-value.md) 🎉
- fix: retro compatibility for older Tailwind CSS (before typescript config)
- fix: [composable touch action classnames](https://github.com/francoismassart/eslint-plugin-tailwindcss/issues/293)
Expand Down Expand Up @@ -82,7 +83,7 @@ $ npm i -D eslint eslint-plugin-tailwindcss

#### `.eslintrc`

Use .eslintrc.* file to configure rules in ESLint < v9. See also: https://eslint.org/docs/latest/use/configure/.
Use .eslintrc.\* file to configure rules in ESLint < v9. See also: https://eslint.org/docs/latest/use/configure/.

```js
module.exports = {
Expand All @@ -93,17 +94,14 @@ module.exports = {

If you would like to know about configuration, Learn more in [ESLint docs](https://eslint.org/docs/latest/use/configure/configuration-files)


#### `eslint.config.js`

Use `eslint.config.js` file to configure rules. This is the default in ESLint v9, but can be used starting from ESLint v8.57.0. See also: https://eslint.org/docs/latest/use/configure/configuration-files-new.

```js
import tailwind from "eslint-plugin-tailwindcss";

export default [
...tailwind.configs["flat/recommended"],
];
export default [...tailwind.configs["flat/recommended"]];
```

If you would like to know about configuration, Learn more in [ESLint docs](https://eslint.org/docs/latest/use/configure/configuration-files-new)
Expand Down Expand Up @@ -155,8 +153,10 @@ Our recommendations:
#### For `eslint.config.js`

- For `js[x]`, `ts[x]`:

- Install the parser: `npm i -D @eslint/js typescript-eslint`
- Assign it to your files in `eslint.config.js`:

```js
import js from "@eslint/js";
import ts from "typescript-eslint";
Expand All @@ -172,9 +172,12 @@ Our recommendations:
...tailwind.configs["flat/recommended"],
];
```

- For `vue.js`:

- Install the parser: `npm i -D eslint-plugin-vue`
- Assign it to your files in `eslint.config.js`:

```js
import vue from "eslint-plugin-vue";
import tailwind from "eslint-plugin-tailwindcss";
Expand Down Expand Up @@ -273,7 +276,7 @@ export default [
classRegex: "^class(Name)?$", // can be modified to support custom attributes. E.g. "^tw$" for `twin.macro`
},
},
}
},
];
```

Expand Down

0 comments on commit 2a1e048

Please sign in to comment.