Skip to content

[BUG] Cannot resolve default tailwindcss config path. Please manually set the config option. #431

@flomSStaar

Description

@flomSStaar

Describe the bug
When i am running pnpm eslint, I am facing to the many warning message Cannot resolve default tailwindcss config path. Please manually set the config option. in my console.

To Reproduce
Steps to reproduce the behavior:

Dependencies:

  • eslint : ^9
  • eslint-plugin-tailwindcss : ^4.0.0-beta.0
  • tailwindcss : ^4

here is my eslint.config.mjs :

import { defineConfig, globalIgnores } from 'eslint/config'
import next from 'eslint-config-next'
import nextVitals from 'eslint-config-next/core-web-vitals'
import nextTs from 'eslint-config-next/typescript'
import prettier from 'eslint-config-prettier/flat'
import prettierPlugin from 'eslint-plugin-prettier/recommended'
import tailwindcss from 'eslint-plugin-tailwindcss'

const eslintConfig = defineConfig([
  ...next,
  ...nextVitals,
  ...nextTs,
  ...tailwindcss.configs['flat/recommended'],
  prettier,
  prettierPlugin,
  {
    rules: {
      'react/self-closing-comp': 'warn',
      'react/react-in-jsx-scope': 'off',
      'react/jsx-sort-props': 'warn',
      'tailwindcss/no-custom-classname': 'off',

      'no-restricted-imports': [
        'error',
        {
          patterns: ['../*', './*'],
        },
      ],
    },
  },
  // Override default ignores of eslint-config-next.
  globalIgnores([
    // Default ignores of eslint-config-next:
    '.next/**',
    'out/**',
    'build/**',
    'next-env.d.ts',
  ]),
])

export default eslintConfig
  1. Install dependencies
  2. Run pnpm eslint
  3. See error

Expected behavior
No warning message.

Environment:

  • OS: macOS
  • Softwares + version used:
    • node 22.17.1
    • pnpm 10.13.1
    • eslint : ^9
    • eslint-plugin-tailwindcss : ^4.0.0-beta.0
    • tailwindcss : ^4

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions