Closed xeho91 closed 1 year ago
I had to install two packages:
cosmiconfig-typescript-loader
to load TypeScript configs, apparently by default cosmiconfig
doesn't support TypeScript extensions.postcss-load-config
as devDependency
, because I needed the types to add to the config. Using any
or unknown
would break with the current lint setup.I have added test cases for two config types:
postcss.config.ts
(ESM)postcss.config.cts
(CJS)Lemme know if it's enough. I have skipped the other possible patterns, e.g. postcssrc.ts
, etc.
Locally the tests for config-autoload/
pass successfully for me; however, the other tests fail- and I have no clue if they're relevant. Any guidance would be much appreciated. :pray:
Oh, there is a bug in npm, I will merge and will fix it in the other PR, thank you for the PR
Resolves #631
This PR contains a:
Motivation / Use-Case
TailwindCSS since version
^3.3.0
has support for TypeScript based configs. Including PostCSS.Hence, I've added patterns to search for config files, which end with the following extensions:
cts
mts
ts
Breaking Changes
None so far.
Additional Info
631