Closed vim-diesel closed 10 months ago
I may have found a fix, although I'm not sure if it is a fix or a bandaid:
To specify environments in a configuration file, use the env key and specify which environments you want to enable by setting each to true. For example, the following enables the browser, es6 and Node.js environments:
In your .eslintrc.js file ;
env: {
browser: true,
node: true, <<<<--- Add this
es6: true
},
Hey, this is a project configuration thing — especially given that these errors are coming from ESLint.
However, if you're in a Vite project I'd suggest using import
instead of require
anyway as this is the proper way to do this when using ES Modules:
import formsPlugin from '@tailwindcss/forms'
/** @type {import('tailwindcss').Config} */
export default {
content: ['./index.html', './src/**/*.{js,ts,jsx,tsx}'],
theme: {
extend: {},
},
plugins: [formsPlugin],
}
Remove this plugin install in vscode
What version of @tailwindcss/forms are you using?
10.2.3
What version of Node.js are you using?
v20.9.0
What browser are you using?
Edge
What operating system are you using?
Windows
Reproduction repository
https://github.com/vim-diesel/vite-eslint
Describe your issue
Attempting to import the plugin to tailwind.config.js throws an error: