Commit graph

30 commits

Author SHA1 Message Date
9263c5dd24 feat 🥁: add no-trailing-zero rule
- New rule that flags and fixes unnecessary trailing zeros in numeric values
- Handles various CSS units, negative numbers, and decimal values
- Preserves non-trailing zeros in numbers like 11.01rem and 2.05em
- Includes comprehensive test coverage for edge cases
2025-10-22 06:06:33 +03:00
24681ebad9 test : add coverage for reference-based visitor creator 2025-10-17 09:43:28 +03:00
d4bac62046 docs 📝: improve README structure and ordering rule documentation 2025-10-15 07:11:16 +03:00
Seongmin Choi
02576d923c
feat 🥁: add wrapper function support with reference tracking
- add reference tracking for wrapper functions in vanilla-extract style objects
- implement ReferenceTracker class for detecting vanilla-extract imports
- add createReferenceBasedNodeVisitors for automatic function detection
- support wrapper functions with parameter mapping enable all lint rules to work with custom wrapper functions

This commit introduces robust reference tracking and wrapper function support, enabling all lint rules to work seamlessly with custom vanilla-extract style patterns while preserving compatibility with existing usage and improving rule extensibility.
2025-06-25 16:51:36 +00:00
35875fbb31 feat 🥁: add ESLint v9 extends field support and document 8.57.0 compatibility
- confirm compatibility with ESLint 8.57.0
- add support for ESLint v9 extends field in flat config
- maintain backward compatibility with existing usage patterns
- update docs with configuration examples

This commit enhances the plugin's configuration options for ESLint v9 users while
ensuring backward compatibility. Users can now use the familiar extends syntax
with flat config, simplifying integration into existing projects. Documentation
has been updated to demonstrate proper usage with both ESLint 8 and 9.
2025-04-19 20:53:58 +03:00
f880c051ff feat 🥁: add no-unknown-unit rule
Adds a rule to disallow unknown or invalid CSS units in vanilla-extract style objects.

- Reports any usage of unrecognized units in property values
- Handles all vanilla-extract APIs (style, styleVariants, recipe, etc.)
- Ignores valid units in special contexts (e.g., CSS functions, custom properties)

No autofix is provided because replacing or removing unknown units may result in unintended or invalid CSS. Manual developer review is required to ensure correctness.
2025-04-16 09:45:33 +03:00
7dc7204749 feat 🥁: add no-zero-unit rule
This rule enforces unitless zero values in vanilla-extract style objects:
- Automatically removes unnecessary units from zero values
- Handles both positive and negative zero values
- Preserves units where required (time properties, CSS functions)
- Works with all vanilla-extract APIs
2025-04-12 20:53:34 +03:00
52d38d4477 feat 🥁: add recommended config with error-level rules
Add a recommended configuration preset that enables concentric-order and no-empty-style-blocks rules with error severity.

- Fix plugin configuration structure to work properly with ESLint 9
- Set concentric-order and no-empty-style-blocks as recommended rules
- Use error severity for recommended rules to enforce best practices
- Maintain backward compatibility with existing implementations

This change improves developer experience by providing sensible defaults while maintaining flexibility for customization.
2025-04-07 13:00:55 +03:00
175ce9aef8 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.
2025-04-06 16:34:35 +03:00
f346002fb0 chore 📝: add bug and feature request templates 2025-03-12 09:23:41 +02:00
cd4314dc53 chore 🔧: add CODEOWNERS file to enforce code review requirements 2025-03-12 08:15:21 +02:00
d7b0ca87b4 chore 📦: update project dependencies to latest versions 2025-03-12 06:46:14 +02:00
46751da51b refactor ♻️: improve code quality and test coverage
- Fix handling of missing groupOrder configuration
- Refactor negative conditions to positive ones with optional chaining
- Add comprehensive tests to achieve total coverage
2025-03-12 06:11:29 +02:00
5557409368 chore 🔧: exclude test directories from published package 2025-03-10 21:12:32 +02:00
fb77b52800 docs 📝: add demo gif to README 2025-03-10 20:06:20 +02:00
4df6af76f7 ci 👷: add GitHub Actions workflow for linting and testing
Set up comprehensive CI pipeline with three jobs:

- Lint: Runs ESLint and type checking
- Test: Executes test suite with Coveralls integration
- Build: Verifies package builds correctly

The workflow uses pnpm and caches dependencies for faster runs.
2025-03-10 15:50:28 +02:00
d2b62d3995 chore 🔧: improve GitHub Actions workflow for release creation
- Fix workflow triggers to support both manual runs and tag pushes
- Add conditional logic to handle different event types
- Skip already existing releases to prevent errors
- Add completion messages for better feedback
- Improve error handling for the release creation process
2025-03-10 13:34:18 +02:00
1092b47f1c test : add coverage for shared utility functions
Add comprehensive tests for shared utility modules to improve code coverage:

- Test property name extraction edge cases
- Test CSS property priority map with invalid groups
- Test order strategy visitor creator edge cases
- Test font face property order enforcer early returns
- Test style node processor with arrays and null values

These tests ensure all code paths in shared utilities are properly exercised,
including error handling and edge cases.
2025-03-10 09:28:51 +02:00
44eeb7be6d chore 🔧: add GitHub Action to create releases from tags 2025-03-10 09:20:43 +02:00
5f1e602dee test : add comprehensive test suite for CSS ordering rules
Add tests for all three CSS property ordering rules:

    alphabetical-order,
    concentric-order,
    custom-order,

Tests cover all implemented vanilla-extract APIs, fontFace, globalFontFace, globalKeyframes, globalStyle, keyframes, style, and styleVariants.. Each test verifies both valid and invalid cases, along with proper auto-fixing functionality.
2025-03-10 09:20:32 +02:00
3e9bad1b02 feat 🥁: implement special ordering for fontFace APIs
- Ensure 'src' property always appears first
- Sort remaining properties alphabetically
- Handle both APIs correctly despite different argument structures
- Handles font faces ordering the same in all 3 available CSS rules
- Update documentation with fontFace ordering details
2025-03-08 23:05:23 +02:00
8916be7d16 docs 📝: update milestones 2025-03-07 11:15:10 +02:00
f2ad87c882 feat 🔨: add script for versioning updates 2025-03-07 11:10:27 +02:00
dea0a328cf feat 🥁: add support for linting keyframes and globalKeyframes 2025-03-06 06:23:54 +02:00
223a81dddf chore 🔨: add .npmignore to exclude development files from npm package 2025-03-05 20:55:58 +02:00
c616fb02dc fix 🔨: improve packaging and TypeScript configuration 2025-03-05 19:55:03 +02:00
44aba9484a feat 🥁: lower minimum Node.js version to 18.18.0 2025-03-05 14:53:22 +02:00
87acd612ea docs 📝: add npm version badge and link to vanilla-extract 2025-03-04 22:18:10 +02:00
88a9d4382f chore 🔧: add sample CSS file for linting demo during development 2025-03-04 20:30:25 +02:00
d569dea1fb feat 🥁: initialize project with complete codebase 2025-03-04 20:16:50 +02:00