Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* tests: Normalize expected and actual strings to reduce noise * style: Add @ts-check and JSDoc type definitions to surface errors * tests: Add more passing tests * tests: Add failing tests for valid uses of `@at-root` * style: Rename functions and variables for clarity * rafactor: Resolve non-critical/false-positive type-checking issues * fix: Logic/typing error when handling @at-root rules * refactor: Simplify existing logic * fix: Move all preceeding comments with rule * fix: `@layer` blocks should also bubble * fix: Correctly handle `with`/`without` parameters on `@at-root` * feat: Add option `rootRuleName` to rename the custom `@at-root` rule * style: Auto formatting/linting * fix: Remove hasRootRule optimization * fix: Add back hasRootRule optimization, scoped to root node As per examples given in the postcss docs: https://github.com/postcss/postcss/blob/main/docs/writing-a-plugin.md#step-4-change-nodes * docs: Update README * style: Reformat test input * tests: Add more `@at-rule` test, some failing * fix: Failing `@at-root` edge cases * style: Fix typo in function name, remove console.log * refactor: Remove @ts-check hack code path, use type assertion instead * test: Remove comments * refactor: Use root#walkAtRules * chore: Tweak eslint rule value * refactor: Fix linting errors … Not sure how/why this didn't show up yesterday or the day before. VSCode's ESLint plugin must have silently crashed or something.
- Loading branch information