Skip to content

fix CssSyntaxError type declaration#1947

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

fix CssSyntaxError type declaration#1947
ai merged 1 commit intopostcss:mainfrom
romainmenke:fix-css-syntax-error-type--reliable-gerbil-dac5c57751

Conversation

@romainmenke
Copy link
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
Copy link
Member

ai commented Jun 29, 2024

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
Contributor Author

Awesome, thank you 🙇

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