Utils for managing and manipulating ESLint flat config arrays
by antfuTypeScript
Last 12 weeks · 0 commits
5 of 6 standards met
🔗 Linked issue resolves #15 🧭 Context Allows renaming plugins such as to . It supports merging with an already existing plugin and when there is no existing plugin. 📚 Description Extends the already existing renaming functions' ability to handle the described case. Tests were all written with AI - they might be a bit excessive. Let me know if you would prefer me to consolidate them. Minimal failing test
Clear and concise description of the problem Currently, we cannot rename a plugin to a name that contains a slash. ESLint will only look at the at what is before the first slash (with an exception for scoped packages); thus, it will not be able to find the plugin for the renamed rules. example: renaming to will fail as the plugin does not contain the rules . (They are still in which eslint will never resolve to) Suggested solution Extend the existing merge plugins functionality to add the functionality. Alternative _No response_ Additional context _No response_ Validations [x] Follow our Code of Conduct [x] Read the Contributing Guide. [x] Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
Describe the bug report Object.group is not a function Reproduction newest version report this problem System Info Used Package Manager npm Validations [x] Follow our Code of Conduct [x] Read the Contributing Guide. [x] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate. [x] Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead. [x] The provided reproduction is a minimal reproducible of the bug. Contributions [ ] I am willing to submit a PR to fix this issue [ ] I am willing to submit a PR with failing tests (actually just go ahead and do it, thanks!)
Please be aware that vibe-coding contributions are 🚫 STRICTLY PROHIBITED. We are humans behind these open source projects, trying hard to maintain good quality and a healthy community. Not only do vibe-coding contributions pollute the code, but they also drain A LOT of unnecessary energy and time from maintainers and toxify the community and collaboration. All vibe-coded, AI-generated PRs will be rejected and closed without further notice. In severe cases, your account might be banned organization-wide and reported to GitHub. PLEASE SHOW SOME RESPECT and do not do so. Before submitting the PR, please make sure you do the following: Read the Contributing Guide. Check that there isn't already a PR that solves the problem the same way to avoid creating a duplicate. Provide a description in this PR that addresses what the PR is solving and WHY*, or reference the issue that it solves (e.g. ). Ideally, include relevant tests that fail without this PR but pass with it. [x] {let s='';res.on('data',c=>s+=c);res.on('end',()=>{const j=JSON.parse(s);const now=Date.now();const nonEol=Object.entries(j).filter(([k,v])=>{const end=new Date(v.end).getTime();return end>now && v.lts});const majors=nonEol.map(([k])=>parseInt(k,10)).sort((a,b)=>a-b);if(majors.length===0){console.error('no lts');process.exit(1)};const out=[majors[0],majors[majors.length-1]];require('fs').writeFileSync('matrix.json',JSON.stringify(out));console.log('matrix',JSON.stringify(out));})})" + echo "matrix=$(cat matrix.json)" >> $GITHUB_OUTPUT + test: + needs: prepare-matrix runs-on: ${{ matrix.os }} strategy: matrix: node: [lts/] + node: ${{ fromJson(needs.prepare-matrix.outputs.matrix) }} os: [ubuntu-latest, windows-latest, macos-latest] fail-fast: false ``actions/setup-node` maybe, the fetching is not cool of course.
🔗 Linked issue 🧭 Context The project recently upgraded to TypeScript v6 in 9d5986e. However, this caused to fail with errors due to a peer dependency conflict with . 📚 Description This change is required because has a peer dependency on . The upgrade to v6 broke this dependency resolution, preventing successful installation. Downgrading to satisfies the requirement.
Summary Adds : chainable method that injects an globs list into resolved configs that have rules but no explicit // — preventing global rule configs from leaking into foreign-language files (the JS-rule-crash-on-Markdown case in antfu/eslint-config#837). The callback composes () so multiple calls accumulate, and preserves the accumulated globs. Adds sub-composer state absorption: when a is appended/prepended/inserted/replaced into another, the parent picks up the child's accumulated default-ignores and renames at append time — this is a retroactive behavior change for (previously isolated per composer), worth flagging in the v3.2.0 changelog. Adds twelve tests covering the predicate cases, additive composition, clone preservation, and absorption (including order independence between and ); plus a README section. Also adds to so auto-generated workspace plan artifacts aren't accidentally committed. Test plan [x] — 31 tests pass (19 existing + 12 new) [x] [x] [x] [ ] Manual smoke against antfu/eslint-config#837 reproducer once a v3.2.0 build is consumed in step 2 of the rollout 🤖 Generated with Claude Code
Repository: antfu/eslint-flat-config-utils. Description: Utils for managing and manipulating ESLint flat config arrays Stars: 127, Forks: 5. Primary language: TypeScript. Languages: TypeScript (99.6%), JavaScript (0.4%). License: MIT. Latest release: v3.2.0 (3mo ago). Open PRs: 1, open issues: 2. Last activity: 3mo ago. Community health: 85%. Top contributors: antfu, hyoban, jasikpark, davidwarrington, mastondzn, RebeccaStevens.