eslint.config.ts 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. import js from "@eslint/js";
  2. import eslintParserTypeScript from "@typescript-eslint/parser";
  3. import type { Linter } from "eslint";
  4. import eslintPluginReadableTailwind from "eslint-plugin-readable-tailwind";
  5. import simpleImportSortPlugin from "eslint-plugin-simple-import-sort";
  6. import globals from "globals";
  7. import tseslint from "typescript-eslint";
  8. export default [
  9. js.configs.recommended,
  10. ...tseslint.configs.recommended,
  11. // ...tailwind.configs["flat/recommended"],
  12. {
  13. plugins: {
  14. "simple-import-sort": simpleImportSortPlugin,
  15. "readable-tailwind": eslintPluginReadableTailwind,
  16. },
  17. ignores: ["**/node_modules/**"],
  18. languageOptions: {
  19. parser: eslintParserTypeScript,
  20. parserOptions: {
  21. project: true,
  22. ecmaFeatures: {
  23. jsx: true,
  24. },
  25. },
  26. globals: {
  27. ...globals.node,
  28. ...globals.browser,
  29. },
  30. },
  31. files: ["**/*.{js,mjs,cjs,jsx,tsx,ts}"],
  32. rules: {
  33. ...eslintPluginReadableTailwind.configs.warning.rules,
  34. // "tailwindcss/classnames-order": "off",
  35. "readable-tailwind/multiline": [
  36. "warn",
  37. {
  38. group: "newLine",
  39. printWidth: 100,
  40. },
  41. ],
  42. // "tailwindcss/no-custom-classname": [
  43. // "warn",
  44. // {
  45. // whitelist: [
  46. // "select_container",
  47. // "convert_to_popup",
  48. // "convert_to_group",
  49. // "target",
  50. // "convert_to_target",
  51. // ],
  52. // },
  53. // ],
  54. },
  55. },
  56. ] as Linter.Config[];