diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 00000000..9de7154d --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,23 @@ +{ + "env": { "node": true, "jest": true }, + "parser": "@typescript-eslint/parser", + "parserOptions": { "ecmaVersion": 2020, "sourceType": "module" }, + "extends": [ + "eslint:recommended", + "plugin:@typescript-eslint/eslint-recommended", + "plugin:@typescript-eslint/recommended", + "plugin:import/errors", + "plugin:import/warnings", + "plugin:import/typescript", + "plugin:prettier/recommended", + "prettier/@typescript-eslint" + ], + "plugins": ["@typescript-eslint", "jest"], + "rules": { + "camelcase": "off", + "require-atomic-updates": "off", + "@typescript-eslint/ban-ts-ignore": "off", + "@typescript-eslint/camelcase": "off", + "@typescript-eslint/no-unused-vars": "off" + } +} \ No newline at end of file diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 774f77b7..e0ee09fd 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -17,10 +17,11 @@ Due to time constraints, you may not always get a quick response. Please do not ## Coding Guidelines -This project comes with a `.prettierrc.json` configuration file. Please run the following command to format the code before committing it. +This project comes with `.prettierrc.json` and `eslintrc.json` configuration files. Please run the following commands to format the code before committing it. ```bash $ npm run format +$ npm run lint ``` ## Using setup-php from a Git checkout @@ -47,6 +48,14 @@ After following the steps shown above, The `setup-php` tests in the `__tests__` $ npm test ``` +## Creating a release + +Create a release before you push your changes. + +```bash +$ npm run release +``` + ## Reporting issues Please submit the issue using the appropriate template provided for a bug report or a feature request: diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index bbcbbe7d..578141ba 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -8,7 +8,7 @@ assignees: '' --- **Is your feature request related to a problem? Please describe.** -A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] +A clear and concise description of what the problem is. Ex. I want to improve [...] **Describe the solution you'd like** A clear and concise description of what you want to happen. diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 73a0a734..f45c003f 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -24,6 +24,8 @@ This PR [briefly explain what it does] - [ ] I have written test cases for the changes in this pull request - [ ] I have run `npm run format` before the commit. +- [ ] I have run `npm run lint` before the commit. +- [ ] I have run `npm run release` before the commit. - [ ] `npm test` returns with no unit test errors.