New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extracting prettier config #10847
Extracting prettier config #10847
Conversation
.prettierrc
Outdated
| @@ -0,0 +1,5 @@ | |||
| { | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
refactor (blocking): Storybook fails to build because the webpack common js loader is unable to parse this file. Adding a .json extension will fix the issue.
WARN Unable to close preview build!
ERR! /Users/nickytonline/dev/forem/.prettierrc:2
ERR! "singleQuote": true,
ERR! ^
ERR!
ERR! SyntaxError: Unexpected token ':'
ERR! at wrapSafe (internal/modules/cjs/loader.js:1053:16)
ERR! at Module._compile (internal/modules/cjs/loader.js:1101:27)
ERR! at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10)
ERR! at Module.load (internal/modules/cjs/loader.js:985:32)
ERR! at Function.Module._load (internal/modules/cjs/loader.js:878:14)
ERR! at Module.require (internal/modules/cjs/loader.js:1025:19)
ERR! at require (internal/modules/cjs/helpers.js:72:18)
ERR! at Object.<anonymous> (/Users/nickytonline/dev/forem/app/javascript/.storybook/main.js:5:24)
ERR! at Module._compile (internal/modules/cjs/loader.js:1137:30)
ERR! at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10)
ERR! at Module.load (internal/modules/cjs/loader.js:985:32)
ERR! at Function.Module._load (internal/modules/cjs/loader.js:878:14)
ERR! at Module.require (internal/modules/cjs/loader.js:1025:19)
ERR! at require (internal/modules/cjs/helpers.js:72:18)
ERR! at interopRequireDefault (/Users/nickytonline/dev/forem/node_modules/@storybook/core/dist/server/utils/server-require.js:66:16)
ERR! at serverRequire (/Users/nickytonline/dev/forem/node_modules/@storybook/core/dist/server/utils/server-require.js:103:10)
ERR! /Users/nickytonline/dev/forem/.prettierrc:2
ERR! "singleQuote": true,
ERR! ^
ERR!
ERR! SyntaxError: Unexpected token ':'
ERR! at wrapSafe (internal/modules/cjs/loader.js:1053:16)
ERR! at Module._compile (internal/modules/cjs/loader.js:1101:27)
ERR! at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10)
ERR! at Module.load (internal/modules/cjs/loader.js:985:32)
ERR! at Function.Module._load (internal/modules/cjs/loader.js:878:14)
ERR! at Module.require (internal/modules/cjs/loader.js:1025:19)
ERR! at require (internal/modules/cjs/helpers.js:72:18)
ERR! at Object.<anonymous> (/Users/nickytonline/dev/forem/app/javascript/.storybook/main.js:5:24)
ERR! at Module._compile (internal/modules/cjs/loader.js:1137:30)
ERR! at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10)
ERR! at Module.load (internal/modules/cjs/loader.js:985:32)
ERR! at Function.Module._load (internal/modules/cjs/loader.js:878:14)
ERR! at Module.require (internal/modules/cjs/loader.js:1025:19)
ERR! at require (internal/modules/cjs/helpers.js:72:18)
ERR! at interopRequireDefault (/Users/nickytonline/dev/forem/node_modules/@storybook/core/dist/server/utils/server-require.js:66:16)
ERR! at serverRequire (/Users/nickytonline/dev/forem/node_modules/@storybook/core/dist/server/utils/server-require.js:103:10)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry. I did not double check it. Let me fix it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks so much for the PR @Rafi993 ! 🚀
Co-authored-by: Nick Taylor <nick@iamdeveloper.com>
What type of PR is this?
Description
Extracting prettier config in a common place to address comment #10765 (comment)
Related Tickets & Documents
N/A
QA Instructions, Screenshots, Recordings
Make changes and commit the file to check if prettier config works
Added tests?
Added to documentation?