eslint-plugin-tailwindcss
eslint-plugin-tailwindcss copied to clipboard
feat: support flat config
support flat config
Description
Fixes #280
This PR supports flat config. It is also compatible with existing configs.
Type of change
- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [x] This change requires a documentation update
How Has This Been Tested?
- [x] Integration Test for flat config (
tests/integrations/flat-config
) - [x] Integration Test for legacy config (
tests/integrations/legacy-config
)
Test Configuration:
- OS + version: macOS Ventura 13.2.1
- NPM version: v10.2.5
- Node version: v18.19.1
Checklist:
- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
- [x] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [x] I have added tests that prove my fix is effective or that my feature works
- [x] Any dependent changes have been merged and published in downstream modules
- [x] I have checked my code and corrected any misspellings
Is this close to being merged in and part of a new release? If there is any work that still needs to be done, I'd be willing to jump on it. I'm transitioning my projects to eslint v9 and I'll gladly help if that means this plugin can support v9 sooner.
Hi @kazupon,
thank you for contributing, I pulled your changes in a dedicated branch feat/flat-config-beta
on this repo.
I also published a new beta release which includes your changes:
npm i [email protected] -D
Do you understand why the tests are failing in the CICD ?
I get an error, also on my local machine:
FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory
@francoismassart I found out this test case was blocked in unit tests. https://github.com/francoismassart/eslint-plugin-tailwindcss/blob/4d04a962eb5df4ee4d98891f6c359d1fcdcae8e6/tests/lib/rules/no-custom-classname.js#L436-L446
I'll check to see if my changes broke any cssFiles
.
Hi! @francoismassart I've just fixed blocking issue. I believe the CI/CD issue has also been resolved.
And ESLints were outputting API compatibility warnings. So I have made compatible fixes in this commit.
Great, thank you @kazupon, I published a new beta version: npm i [email protected]
, I'll share it and wait for feedbacks then we'll be good to go
@francoismassart Thank you for your publishing! I've just tested at my day job project! That's works!