microsoft/typescript-styled-plugin

How to fail a commit to Git based on errors from ts-styled-plugin?

robicano22 opened this issue · 1 comments

I have a TS/styled-components project with a Husky pre-commit hook that runs a couple linting/code-style scripts prior to being able to commit to Git. But they don't fail on errors within styled components.

I have a line of styling code without a colon i.e.: padding 20px 15px 15px 15px;

And while it's caught in the problems tab in VSCode and displayed as an error by ts-styled-plugin, my dev was still able to commit this (and actually the browser still recognized the rule correctly).

Anyway I'm hoping there's a script I can run in the pre-commit hook that while fail the commit before it happens on errors within the css`` blocks.

Thanks

mjbvz commented

Closing as this package has been deprecated in favor of the official styled-components/typescript-styled-plugin fork