Skip to content

fix CssSyntaxError type declaration - #1947

Merged
ai merged 1 commit into
postcss:mainfrom
romainmenke:fix-css-syntax-error-type--reliable-gerbil-dac5c57751
Jun 29, 2024
Merged

ai merged 1 commit into
postcss:mainfrom
romainmenke:fix-css-syntax-error-type--reliable-gerbil-dac5c57751

Conversation

@romainmenke

Copy link
Copy Markdown
Contributor

see : https://typescript-eslint.io/rules/only-throw-error/

When using TypeScript it is useful to only throw instances of Error (or subclasses thereof)

Currently we get an error for this lint rule with PostCSS on lines like these :

throw atRule.error('Rule must have valid params')

CssSyntaxError is a subclass of Error, but not declared as such in the .d.ts file.

@ai
ai merged commit 155ac57 into postcss:main Jun 29, 2024
@ai

ai commented Jun 29, 2024

Copy link
Copy Markdown
Member

Thanks. Released at 8.4.39.

@romainmenke
romainmenke deleted the fix-css-syntax-error-type--reliable-gerbil-dac5c57751 branch June 29, 2024 18:33
@romainmenke

Copy link
Copy Markdown
Contributor Author

Awesome, thank you 🙇

hanzo-dev pushed a commit to hanzoai/postcss that referenced this pull request Sep 9, 2026
…-type--reliable-gerbil-dac5c57751

fix `CssSyntaxError` type declaration
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants