vercel / next-learn

Learn Next.js Starter Code
https://next-learn-dashboard.vercel.sh/
MIT License
3.46k stars 1.81k forks source link

Unknown at rule @tailwindcss(unknownAtRules) #679

Open momenta-zj-z opened 2 months ago

momenta-zj-z commented 2 months ago

I found something wrong in app/ui/global.css, when i use eslint, it tells me that:

image

it turn out that @tailwind is not best practice, can anyone help me about this? and this is my postcss.config.js

// postcss.config.js
module.exports = {
  plugins: {
    tailwindcss: {},
    autoprefixer: {},
  },
};

this is my .lintstagerc.json, i can't make commits when i turn "eslint --fix" on, and i think this tutorial should be a best practice

// .lintstagerc.json
{
  "./app/**/*.{js,ts,jsx,tsx,json,html,css,md}": [
    "eslint --fix",
    "prettier --write"
  ]
}
GaneshSrambikal commented 1 month ago

Hello,

This is IDE specific warning and not tutorial-dependent.

You can fix this by installing intelliSense in your IDE. If you are using VS code install this extension.

After you have installed the extension, go to your settings and find "files.associations": {...}, inside that append this: "*.css": "tailwindcss".

Thank You.