From 117cbaea9d2e121e8a270c3a864fb140d46fd1da Mon Sep 17 00:00:00 2001 From: nadavshlezz <104714497+nadavshlezz@users.noreply.github.com> Date: Wed, 20 Jul 2022 18:54:22 +0300 Subject: [PATCH] chore: contribution readme and eslint alignment (#356) * contribution file and eslint alignment * Specifying environments fix * eslint addons * eslint addons fix * eslint addons f * final fixes after investigation --- .eslintignore | 6 ---- .eslintrc | 22 +++++++------- .gitignore | 7 ++++- .prettierrc | 3 +- .vscode/extensions.json | 8 ++--- .vscode/settings.json | 8 ++++- CONTRIBUTING.md | 65 +++++++++++++++++++++++++++++++++++++++++ package-lock.json | 30 +++++++++++++++++++ package.json | 1 + 9 files changed, 127 insertions(+), 23 deletions(-) delete mode 100644 .eslintignore create mode 100644 CONTRIBUTING.md diff --git a/.eslintignore b/.eslintignore deleted file mode 100644 index 537b7fae..00000000 --- a/.eslintignore +++ /dev/null @@ -1,6 +0,0 @@ -# don't ever lint node_modules -node_modules -# don't lint build output (make sure it's set to your correct build folder name) -dist -# don't lint nyc coverage output -coverage diff --git a/.eslintrc b/.eslintrc index 8d07bb17..dfb21f5a 100644 --- a/.eslintrc +++ b/.eslintrc @@ -1,17 +1,15 @@ { "root": true, + "env": { + "node": true, + "es2021": true + }, "parser": "@typescript-eslint/parser", "parserOptions": { "ecmaVersion": 2019, "project": ["./tsconfig.json"] }, - "plugins": [ - "@typescript-eslint", - "unicorn", - "promise", - "prettier", - "jest" - ], + "plugins": ["@typescript-eslint", "unicorn", "promise", "prettier", "jest"], "extends": [ "eslint:recommended", "plugin:node/recommended", @@ -20,9 +18,10 @@ "plugin:import/warnings", "plugin:import/typescript", "plugin:unicorn/recommended", - "plugin:prettier/recommended", "plugin:promise/recommended", - "plugin:jest/style" + "plugin:jest/style", + "plugin:eslint-comments/recommended", + "plugin:prettier/recommended" ], "rules": { "no-process-exit": "off", @@ -43,7 +42,10 @@ "@typescript-eslint/ban-ts-comment": "off", "@typescript-eslint/explicit-module-boundary-types": "off", "@typescript-eslint/no-explicit-any": "off", - "@typescript-eslint/no-non-null-assertion": "off" + "@typescript-eslint/no-non-null-assertion": "off", + "eslint-comments/require-description": ["error", { "ignore": [] }], + "@typescript-eslint/no-unused-vars": "warn", + "@typescript-eslint/no-floating-promises": ["warn", { "ignoreVoid": true }] }, "overrides": [ { diff --git a/.gitignore b/.gitignore index 07b29665..1142605a 100644 --- a/.gitignore +++ b/.gitignore @@ -5,10 +5,15 @@ yarn-debug.log* yarn-error.log* lerna-debug.log* +# dependencies node_modules/ + *.tsbuildinfo .yarn-integrity .docker - +/coverage services/tests/blackbox/resources + +# compiled output +/dist \ No newline at end of file diff --git a/.prettierrc b/.prettierrc index dd213d72..e39eea37 100644 --- a/.prettierrc +++ b/.prettierrc @@ -1,5 +1,6 @@ { "printWidth": 120, "singleQuote": true, - "arrowParens": "avoid" + "arrowParens": "avoid", + "bracketSpacing": true } diff --git a/.vscode/extensions.json b/.vscode/extensions.json index cb510ee8..de7cce52 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -1,6 +1,6 @@ { - // List of extensions which should be recommended for users of this workspace. - "recommendations": ["esbenp.prettier-vscode", "kumar-harsh.graphql-for-vscode"], - // List of extensions recommended by VS Code that should not be recommended for users of this workspace. - "unwantedRecommendations": [] + // List of extensions which should be recommended for users of this workspace. + "recommendations": ["esbenp.prettier-vscode", "kumar-harsh.graphql-for-vscode", "dbaeumer.vscode-eslint"], + // List of extensions recommended by VS Code that should not be recommended for users of this workspace. + "unwantedRecommendations": [] } diff --git a/.vscode/settings.json b/.vscode/settings.json index 58e5c399..4d8122e2 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,3 +1,9 @@ { - "debug.node.autoAttach": "on" + "debug.node.autoAttach": "on", + "editor.defaultFormatter": "esbenp.prettier-vscode", + "eslint.onIgnoredFiles": "warn", + "eslint.options": { + "ignorePath": ".gitignore", + "extensions": [".js", ".ts"] + } } diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..c32bd2f4 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,65 @@ +# Contributing to Stitch + +Welcome, and thank you for your interest in contributing to Stitch! + +There are many ways in which you can contribute, beyond writing code. The goal of this document is to provide a high-level overview of how you can get involved. + +## Asking Questions + +Have a question? Rather than opening an issue, please ask away on [Stack Overflow](https://stackoverflow.com/) using the a related tag + +The active community will be eager to assist you. Your well-worded question will serve as a resource to others searching for help. + +## Providing Feedback + +Your comments and feedback are welcome, and the development team is available via a handful of different channels: + +- GitHub issues +- Any related slack channels or stackoverflow + +## Reporting Issues + +Have you identified a reproducible problem in Stitch? Have a feature request? We want to hear about it! Here's how you can make reporting your issue as effective as possible. + +### Look For an Existing Issue + +Before you create a new issue, please do a search in [open issues](https://github.com/Soluto/stitch/issues) to see if the issue or feature request has already been filed. + +If you cannot find an existing issue that describes your bug or feature, create a new issue using the guidelines below. + +### Writing Good Bug Reports and Feature Requests + +File a single issue per problem and feature request. Do not enumerate multiple bugs or feature requests in the same issue. + +Do not add your issue as a comment to an existing issue unless it's for the identical input. Many issues look similar, but have different causes. + +The more information you can provide, the more likely someone will be successful at reproducing the issue and finding a fix. + +Please include the following with each issue: + +- Version of Stitch +- Your operating system +- Reproducible steps (1... 2... 3...) that cause the issue +- What you expected to see, versus what you actually saw +- Images, animations, or a link to a video showing the issue occurring +- A code snippet that demonstrates the issue or a link to a code repository the developers can easily pull down to recreate the issue locally + - **Note:** Because the developers need to copy and paste the code snippet, including a code snippet as a media file (i.e. .gif) is not sufficient. + +### Final Checklist + +Please remember to do the following: + +- [ ] Search the issue repository to ensure your report is a new issue +- [ ] Simplify your code around the issue to better isolate the problem + +Don't feel bad if the developers can't reproduce the issue right away. They will simply ask for more information! + +## Contributing Fixes + +There are many ways to contribute to the Stitch project: logging bugs, submitting pull requests, reporting issues, and creating suggestions. + +After cloning and building the repo, check out the issues list. Issues labeled `help wanted` are good issues to submit a PR for. Issues labeled `good first issue` are great candidates to pick up if you are in the code for the first time. If you are contributing significant changes, or if the issue is already assigned to a specific month milestone, please discuss with the issue assignee first before starting to work on the issue + +# Thank You! + +Your contributions to open source, large or small, make great projects like this possible. Thank you for taking the time to contribute. diff --git a/package-lock.json b/package-lock.json index 67132647..e213610a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15,6 +15,7 @@ "@typescript-eslint/parser": "^4.22.0", "eslint": "^7.24.0", "eslint-config-prettier": "^8.2.0", + "eslint-plugin-eslint-comments": "^3.2.0", "eslint-plugin-import": "^2.22.1", "eslint-plugin-jest": "^24.3.5", "eslint-plugin-node": "^11.1.0", @@ -1517,6 +1518,25 @@ "node": ">=8.10.0" } }, + "node_modules/eslint-plugin-eslint-comments": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-eslint-comments/-/eslint-plugin-eslint-comments-3.2.0.tgz", + "integrity": "sha512-0jkOl0hfojIHHmEHgmNdqv4fmh7300NdpA9FFpF7zaoLvB/QeXOGNLIo86oAveJFrfB1p05kC8hpEMHM8DwWVQ==", + "dev": true, + "dependencies": { + "escape-string-regexp": "^1.0.5", + "ignore": "^5.0.5" + }, + "engines": { + "node": ">=6.5.0" + }, + "funding": { + "url": "https://github.com/sponsors/mysticatea" + }, + "peerDependencies": { + "eslint": ">=4.19.1" + } + }, "node_modules/eslint-plugin-import": { "version": "2.22.1", "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.22.1.tgz", @@ -5158,6 +5178,16 @@ "regexpp": "^3.0.0" } }, + "eslint-plugin-eslint-comments": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-eslint-comments/-/eslint-plugin-eslint-comments-3.2.0.tgz", + "integrity": "sha512-0jkOl0hfojIHHmEHgmNdqv4fmh7300NdpA9FFpF7zaoLvB/QeXOGNLIo86oAveJFrfB1p05kC8hpEMHM8DwWVQ==", + "dev": true, + "requires": { + "escape-string-regexp": "^1.0.5", + "ignore": "^5.0.5" + } + }, "eslint-plugin-import": { "version": "2.22.1", "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.22.1.tgz", diff --git a/package.json b/package.json index bc8c8d93..fb7df385 100644 --- a/package.json +++ b/package.json @@ -19,6 +19,7 @@ "@typescript-eslint/parser": "^4.22.0", "eslint": "^7.24.0", "eslint-config-prettier": "^8.2.0", + "eslint-plugin-eslint-comments": "^3.2.0", "eslint-plugin-import": "^2.22.1", "eslint-plugin-jest": "^24.3.5", "eslint-plugin-node": "^11.1.0",