-
-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature request] eslint settings config support multiple tailwind config #219
Comments
@Muromi-Rikka can you provide more infos: docs or links, use cases etc. ? |
@francoismassart My project is a monorepo project, which has multiple tailwind.config.js, but the configuration file can only specify a single configuration |
I guess you could define several parts inside your eslintrc file or even use different eslintrc files pointing each to its related files and tailwind config... I can give it a shot if you take the time to provide a simple demo project with 2apps and 2 configs. |
@Muromi-Rikka app-one// .eslintrc.js of app-one
const path = require('path');
module.exports = {
settings: {
tailwindcss: {
config: path.join(__dirname, "tailwind.config-one.js"),
}
}
}; // tailwind.config-one.js
/** @type {import('tailwindcss').Config} */
module.exports = {
content: ["./src/**/*.{php,html,tsx,vue}"],
theme: {
extend: {
colors: {
one: '#B4D455'
}
},
},
plugins: [],
} app-two// .eslintrc.js of app-two
const path = require('path');
module.exports = {
settings: {
tailwindcss: {
config: path.join(__dirname, "tailwind.config-two.js"),
}
}
}; // tailwind.config-two.js
/** @type {import('tailwindcss').Config} */
module.exports = {
content: ["./src/**/*.{php,html,tsx,vue}"],
theme: {
extend: {
colors: {
two: '#B4D455'
}
},
},
plugins: [],
} Clone this branch https://github.com/francoismassart/demo-eslint-plugin-tailwindcss/tree/multiple-apps
=> Notice app-one accepts I have 3 eslintrc files:
Take a look at them to see how they work together |
If this helped you out, please share the project on social medias 😉 |
Thanks, but I currently only have one eslintrc configuration, I think I may need to modify the lint detection |
Just add the additional eslintrc files is your different apps folder, eslint will "look up" for extra eslintrc files next to the current parsed file and up... The deeper the eslintrc file is, the stronger its settings are reflected. At the end, eslint merges all the rc files it found together |
eslint settings config support multiple tailwind config
The text was updated successfully, but these errors were encountered: