Skip to content

invalidConfigPath error when passing default value for theme() function #734

Closed
@javimsevilla

Description

@javimsevilla

What version of Tailwind CSS IntelliSense are you using?

v0.9.8

What version of Tailwind CSS are you using?

v3.2.7

What package manager are you using?

npm

What operating system are you using?

macOS

Tailwind config

/** @type {import('tailwindcss').Config} */
module.exports = {
  content: ['./src/**/*.{js,jsx,ts,tsx}'],
  theme: {
    extend: {},
  },
  plugins: [],
}

VS Code settings

{
  "tailwindCSS.emmetCompletions": true
}

Reproduction URL

https://github.com/javimsevilla/tailwindcss-intellisense-theme-issue

Describe your issue

I want to pass a default value for the TailwindCSS theme() function as a second argument, but tailwindcss-intellisense shows that this is an error, but it is not, the code works as expected.

image

It doesn't matter what I pass as arguments, it always shows the error if I pass a second argument.

image

As a workaround, I can disable the "tailwindCSS.lint.invalidConfigPath" property in VS Code settings:

{
  "tailwindCSS.lint.invalidConfigPath": "ignore"
}

But, I think this is a bug because it's not the expected behavior.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions