2

Release 0.3 - Part 1 External Project Contribution

 2 years ago
source link: https://dev.to/pandanoxes/release-03-part-1-external-project-contribution-1oij
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client
Kevan Y

Posted on Nov 18

Release 0.3 - Part 1 External Project Contribution

For release 0.3, I started to contribute on Heptagram repo. The notice that they migrated their website into React. I found out that they do not have prettier set up for the new React project. So I created an issue and asked to be assigned to work on that issue ✨❓ Feature Request: Add Prettier config.

I first started to install prettier, and add a script for it, one for checking and the other one for writing.

 "prettier": "prettier --write \"./**/*.{md,jsx,json,html,css,js,yml}\"",
 "prettier-check": "prettier --check \"./**/*.{md,jsx,json,html,css,js,yml}\""
Enter fullscreen modeExit fullscreen mode

After that, I made .prettierrc.json and add some rules.

{
    "arrowParens": "always",
    "bracketSpacing": true,
    "embeddedLanguageFormatting": "auto",
    "endOfLine": "lf",
    "htmlWhitespaceSensitivity": "css",
    "insertPragma": false,
    "jsxSingleQuote": false,
    "proseWrap": "preserve",
    "quoteProps": "as-needed",
    "requirePragma": false,
    "singleQuote": true,
    "tabWidth": 4,
    "trailingComma": "es5",
    "useTabs": false,
    "vueIndentScriptAndStyle": false,
    "printWidth": 100
}
Enter fullscreen modeExit fullscreen mode

I committed and pushed my change to remote, then I created a PR for asking if the prettier format is ok before I run a prettier on all files which change the whole project file format.

After receiving confirmation that everything is okay. I run npm run prettier to change all the files and commit my change then after a few hours my PR got merged.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK