From 0156f4cff5536c73cd1f786a748b17b87e9b7314 Mon Sep 17 00:00:00 2001 From: Victor Seiji Hariki Date: Sat, 10 Dec 2022 09:48:23 -0300 Subject: [PATCH 1/3] Create CONTRIBUTING.md This creates some contributing guidelines, based on briandk's (https://gist.github.com/briandk) template at https://gist.github.com/briandk/3d2e8b3ec8daf5a27a62. I think that code contributions should go to the testing branch, while documentation and other simple fixes can be merged directly into main. --- CONTRIBUTING.md | 53 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..7095d6a --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,53 @@ +# Contributing to OpenOutpaint +We love your input! We want to make contributing to this project as easy and transparent as possible, whether it's: + +- Reporting a bug +- Discussing the current state of the code +- Submitting a fix +- Proposing new features +- Becoming a maintainer + +## We Develop with Github +We use github to host code, to track issues and feature requests, as well as accept pull requests. + +## We Use [Github Flow](https://guides.github.com/introduction/flow/index.html), So All Code Changes Happen Through Pull Requests +Pull requests are the best way to propose changes to the codebase (we use [Github Flow](https://guides.github.com/introduction/flow/index.html)). We actively welcome your pull requests: + +1. Fork the repo and create your branch from `main` or `testing`. +2. Please add comments when reasonable, and when possible, use [JSDoc](https://jsdoc.app/) for documenting types. Lack of this will not prevent your pull being merged, but it would be nice to have. +3. If you've added code that should be tested please pull into `testing`. For documentation and smaller fixes, a pull request directly to `main` should be okay, unless it pertains to changes only present in `testing`. +4. Create a pull request with a short description of what you did. Thanks for your contribution! + +## Any contributions you make will be under the MIT Software License +In short, when you submit code changes, your submissions are understood to be under the same [MIT License](http://choosealicense.com/licenses/mit/) that covers the project. Feel free to contact the maintainers if that's a concern. + +## Report bugs using Github's [issues](https://github.com/briandk/transcriptase-atom/issues) +We use GitHub issues to track public bugs. Report a bug by [opening a new issue](https://github.com/zero01101/openOutpaint/issues); it's that easy! + +## Write bug reports with detail, background, and sample code +If possible, bug reports should have the most detail it is reasonable to have for the bug in question. If you are more versed in javascript, pointing out the issue in code, or even creating a pull request is also appreciated! + +**Great Bug Reports** tend to have: + +- A quick summary and/or background +- Steps to reproduce + - Be specific! + - Give sample code or screenshots if you can! +- What you expected would happen +- What actually happens +- Notes (possibly including why you think this might be happening, or stuff you tried that didn't work) + +We have some issue templates that are, admittedly, basically github's default templates. You can and should use that as a guide. Sometimes some fields may not be applicable to your particular report. In this case, things such as *alternative solutions* don't need to be included. + +People *love* thorough bug reports. I'm not even kidding. + +## Use a Consistent Coding Style +For styling, we are currently using prettier for linting. And that's basically it. We are currently using tabs and some other defaults defined in the [.prettierrc.json](https://github.com/zero01101/openOutpaint/blob/main/.prettierrc.json) file. We don't use npm on our project, so you would have to install prettier and prettier-eslint locally. We have a handy [lint.sh](https://github.com/zero01101/openOutpaint/blob/main/lint.sh) script you can run, but it is recommended to use an IDE with prettier support for more practical use. + +Any suggestions regarding change of styles or style guides (Airbnb, Google, or whatnot) are welcome, as the current file is quite simplistic. + +## License +By contributing, you agree that your contributions will be licensed under its MIT License. + +## References +This document was adapted from the open-source contribution guidelines for [Facebook's Draft](https://github.com/facebook/draft-js/blob/a9316a723f9e918afde44dea68b5f9f39b7d9b00/CONTRIBUTING.md) and based on [this template from briandk](https://gist.github.com/briandk/3d2e8b3ec8daf5a27a62). From 251a7191d3a51d6296e2686ced17262f9f8d54ff Mon Sep 17 00:00:00 2001 From: Victor Seiji Hariki Date: Sat, 10 Dec 2022 09:52:58 -0300 Subject: [PATCH 2/3] add simple linting script Signed-off-by: Victor Seiji Hariki --- .gitignore | 8 ++++++++ lint.sh | 21 +++++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 lint.sh diff --git a/.gitignore b/.gitignore index a3062be..e9ef3a2 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,9 @@ .vscode/* + +# NPM things +package.json +package-lock.json +node_modules/ + +# Yarn things +yarn.lock \ No newline at end of file diff --git a/lint.sh b/lint.sh new file mode 100644 index 0000000..d803fcf --- /dev/null +++ b/lint.sh @@ -0,0 +1,21 @@ +#!/usr/bin/bash + +if ! which npx 2>&1 > /dev/null; then + echo "[lint] npm/npx is not installed" + exit 1 +fi + +npx prettier > /dev/null || npm install prettier && echo "[lint] We have 'prettier'" +npx eslint > /dev/null || npm install eslint && echo "[lint] We have 'eslint'" +npx prettier-eslint > /dev/null || npm install prettier-eslint-cli && echo "[lint] We have 'prettier-eslint'" + +echo "[lint] Linting JavaScript files..." +npx prettier-eslint --write "**/*.js" +echo "[lint] Linting HTML files..." +npx prettier-eslint --write "**/*.html" +echo "[lint] Linting CSS files..." +npx prettier-eslint --write "**/*.css" +echo "[lint] Linting MarkDown files" +npx prettier-eslint --write "**/*.md" + +echo "[lint] Finished Linting." \ No newline at end of file From 9c47c1459dcb98d2de506cd6077fa72bb3133a9e Mon Sep 17 00:00:00 2001 From: Victor Seiji Hariki Date: Sat, 10 Dec 2022 09:56:38 -0300 Subject: [PATCH 3/3] prettified code Signed-off-by: Victor Seiji Hariki --- CONTRIBUTING.md | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7095d6a..e49b830 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,4 +1,5 @@ # Contributing to OpenOutpaint + We love your input! We want to make contributing to this project as easy and transparent as possible, whether it's: - Reporting a bug @@ -8,9 +9,11 @@ We love your input! We want to make contributing to this project as easy and tra - Becoming a maintainer ## We Develop with Github + We use github to host code, to track issues and feature requests, as well as accept pull requests. ## We Use [Github Flow](https://guides.github.com/introduction/flow/index.html), So All Code Changes Happen Through Pull Requests + Pull requests are the best way to propose changes to the codebase (we use [Github Flow](https://guides.github.com/introduction/flow/index.html)). We actively welcome your pull requests: 1. Fork the repo and create your branch from `main` or `testing`. @@ -19,12 +22,15 @@ Pull requests are the best way to propose changes to the codebase (we use [Githu 4. Create a pull request with a short description of what you did. Thanks for your contribution! ## Any contributions you make will be under the MIT Software License + In short, when you submit code changes, your submissions are understood to be under the same [MIT License](http://choosealicense.com/licenses/mit/) that covers the project. Feel free to contact the maintainers if that's a concern. ## Report bugs using Github's [issues](https://github.com/briandk/transcriptase-atom/issues) + We use GitHub issues to track public bugs. Report a bug by [opening a new issue](https://github.com/zero01101/openOutpaint/issues); it's that easy! ## Write bug reports with detail, background, and sample code + If possible, bug reports should have the most detail it is reasonable to have for the bug in question. If you are more versed in javascript, pointing out the issue in code, or even creating a pull request is also appreciated! **Great Bug Reports** tend to have: @@ -37,17 +43,20 @@ If possible, bug reports should have the most detail it is reasonable to have fo - What actually happens - Notes (possibly including why you think this might be happening, or stuff you tried that didn't work) -We have some issue templates that are, admittedly, basically github's default templates. You can and should use that as a guide. Sometimes some fields may not be applicable to your particular report. In this case, things such as *alternative solutions* don't need to be included. +We have some issue templates that are, admittedly, basically github's default templates. You can and should use that as a guide. Sometimes some fields may not be applicable to your particular report. In this case, things such as _alternative solutions_ don't need to be included. -People *love* thorough bug reports. I'm not even kidding. +People _love_ thorough bug reports. I'm not even kidding. ## Use a Consistent Coding Style + For styling, we are currently using prettier for linting. And that's basically it. We are currently using tabs and some other defaults defined in the [.prettierrc.json](https://github.com/zero01101/openOutpaint/blob/main/.prettierrc.json) file. We don't use npm on our project, so you would have to install prettier and prettier-eslint locally. We have a handy [lint.sh](https://github.com/zero01101/openOutpaint/blob/main/lint.sh) script you can run, but it is recommended to use an IDE with prettier support for more practical use. Any suggestions regarding change of styles or style guides (Airbnb, Google, or whatnot) are welcome, as the current file is quite simplistic. ## License + By contributing, you agree that your contributions will be licensed under its MIT License. ## References + This document was adapted from the open-source contribution guidelines for [Facebook's Draft](https://github.com/facebook/draft-js/blob/a9316a723f9e918afde44dea68b5f9f39b7d9b00/CONTRIBUTING.md) and based on [this template from briandk](https://gist.github.com/briandk/3d2e8b3ec8daf5a27a62).