gsoft-inc / wl-web-configs

Shared configurations for building web applications at Workleap.
https://gsoft-inc.github.io/wl-web-configs/
Apache License 2.0
3 stars 2 forks source link

[chore] Support prettier v3.0.0 #157

Open alexasselin008 opened 1 year ago

alexasselin008 commented 1 year ago

Currently, using stylelint-configs with prettier =>3.0.0 causes the following error:

TypeError: prettier.resolveConfig.sync is not a function

The error seems to be caused by stylelint-prettier. They don't seems to have updated their package to support prettier v3.0.0 yet.

In the meantime, products should stay on prettier v2.8.8

fraincs commented 1 year ago

https://github.com/prettier/stylelint-prettier/issues/298#issuecomment-1626867593 According to this comment they seems to have.

After some tests I have been able to use Prettier 3.0.0 with stylelint-configs.

Here's my package.json devDepencies:

"devDependencies": {
        "@hopper-ui/tokens": "workspace:*",
        "@storybook/addon-essentials": "7.5.1",
        "@storybook/addon-interactions": "7.5.1",
        "@storybook/addon-links": "7.5.1",
        "@storybook/addon-mdx-gfm": "7.5.1",
        "@storybook/blocks": "7.5.1",
        "@storybook/react": "7.5.1",
        "@storybook/react-vite": "7.5.1",
        "@storybook/testing-library": "0.2.2",
        "@workleap/eslint-plugin": "3.0.0",
        "@workleap/stylelint-configs": "2.0.0",
        "@workleap/typescript-configs": "3.0.2",
        "eslint-plugin-storybook": "0.6.15",
        "prettier": "3.0.0",
        "prop-types": "15.8.1",
        "react": "18.2.0",
        "react-dom": "18.2.0",
        "stylelint": "15.11.0",
        "vite-plugin-turbosnap": "1.0.3"
    },