mirror of
https://github.com/antebudimir/eslint-plugin-vanilla-extract.git
synced 2025-12-31 08:53:33 +00:00
feat 🥁: add no-empty-style-blocks rule
Add comprehensive rule to detect and prevent empty CSS style blocks: - Identify style objects with no properties - Flag empty style blocks as potential code quality issues - Provide auto-fix capability to remove empty blocks - Handle edge cases like comments-only blocks This rule helps maintain cleaner codebases by eliminating empty style definitions that often result from incomplete refactoring or forgotten implementations, reducing confusion and unnecessary code.
This commit is contained in:
parent
f346002fb0
commit
175ce9aef8
45 changed files with 2674 additions and 566 deletions
|
|
@ -22,12 +22,12 @@ const packageJson = JSON.parse(await fs.readFile(packageJsonPath, 'utf-8'));
|
|||
const newVersion = packageJson.version;
|
||||
|
||||
// Read src/index.ts
|
||||
let indexTsContent = await fs.readFile(indexTsPath, 'utf-8');
|
||||
const indexTsContent = await fs.readFile(indexTsPath, 'utf-8');
|
||||
|
||||
// Replace the version string in src/index.ts
|
||||
indexTsContent = indexTsContent.replace(/version: '(\d+\.\d+\.\d+)'/, `version: '${newVersion}'`);
|
||||
const updatedIndexTsContent = indexTsContent.replace(/version: '(\d+\.\d+\.\d+)'/, `version: '${newVersion}'`);
|
||||
|
||||
// Write the updated content back to src/index.ts
|
||||
await fs.writeFile(indexTsPath, indexTsContent);
|
||||
await fs.writeFile(indexTsPath, updatedIndexTsContent);
|
||||
|
||||
console.log(`Updated package.json and src/index.ts to version ${newVersion}`);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue