chore: add eslint-plugin-readable-tailwind
This commit is contained in:
parent
a6b8bcecae
commit
5fb8c3575b
5 changed files with 126 additions and 29 deletions
|
|
@ -1,11 +1,11 @@
|
|||
import { fixupPluginRules } from "@eslint/compat";
|
||||
import eslint from '@eslint/js';
|
||||
import eslint from "@eslint/js";
|
||||
import deprecationPlugin from "eslint-plugin-deprecation";
|
||||
import eslintPluginReadableTailwind from "eslint-plugin-readable-tailwind";
|
||||
import simpleImportSortPlugin from "eslint-plugin-simple-import-sort";
|
||||
import tailwind from "eslint-plugin-tailwindcss";
|
||||
import globals from "globals";
|
||||
import tseslint from 'typescript-eslint';
|
||||
|
||||
import tseslint from "typescript-eslint";
|
||||
|
||||
export default tseslint.config(
|
||||
eslint.configs.recommended,
|
||||
|
|
@ -15,6 +15,7 @@ export default tseslint.config(
|
|||
plugins: {
|
||||
deprecation: fixupPluginRules(deprecationPlugin),
|
||||
"simple-import-sort": simpleImportSortPlugin,
|
||||
"readable-tailwind": eslintPluginReadableTailwind,
|
||||
},
|
||||
ignores: ["**/node_modules/**"],
|
||||
languageOptions: {
|
||||
|
|
@ -30,8 +31,17 @@ export default tseslint.config(
|
|||
...globals.browser,
|
||||
},
|
||||
},
|
||||
files: ["**/*.{js,mjs,cjs,tsx}"],
|
||||
files: ["**/*.{js,mjs,cjs,tsx,ts}"],
|
||||
rules: {
|
||||
...eslintPluginReadableTailwind.configs.warning.rules,
|
||||
"tailwindcss/classnames-order": "off",
|
||||
"readable-tailwind/multiline": [
|
||||
"warn",
|
||||
{
|
||||
group: "newLine",
|
||||
printWidth: 100,
|
||||
},
|
||||
],
|
||||
"tailwindcss/no-custom-classname": [
|
||||
"warn",
|
||||
{
|
||||
|
|
@ -46,4 +56,4 @@ export default tseslint.config(
|
|||
],
|
||||
},
|
||||
},
|
||||
);
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue