From 9dda8cefe6d72def739f9019a997e38e1030940f Mon Sep 17 00:00:00 2001 From: Mike Ball Date: Sun, 16 Jan 2022 06:20:06 -0500 Subject: [PATCH 1/3] remove trailing whitespace from README --- README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index fac1dd6..a6a0b11 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ Use this template to bootstrap the creation of a TypeScript action.:rocket: -This template includes compilation support, tests, a validation workflow, publishing, and versioning guidance. +This template includes compilation support, tests, a validation workflow, publishing, and versioning guidance. If you are new, there's also a simpler introduction. See the [Hello World JavaScript Action](https://github.com/actions/hello-world-javascript-action) @@ -18,7 +18,7 @@ Click the `Use this Template` and provide the new repo details for your action > First, you'll need to have a reasonably modern version of `node` handy. This won't work with versions older than 9, for instance. -Install the dependencies +Install the dependencies ```bash $ npm install ``` @@ -28,7 +28,7 @@ Build the typescript and package it for distribution $ npm run build && npm run package ``` -Run the tests :heavy_check_mark: +Run the tests :heavy_check_mark: ```bash $ npm test @@ -57,9 +57,9 @@ import * as core from '@actions/core'; ... async function run() { - try { + try { ... - } + } catch (error) { core.setFailed(error.message); } @@ -72,7 +72,7 @@ See the [toolkit documentation](https://github.com/actions/toolkit/blob/master/R ## Publish to a distribution branch -Actions are run from GitHub repos so we will checkin the packed dist folder. +Actions are run from GitHub repos so we will checkin the packed dist folder. Then run [ncc](https://github.com/zeit/ncc) and push the results: ```bash @@ -84,7 +84,7 @@ $ git push origin releases/v1 Note: We recommend using the `--license` option for ncc, which will create a license file for all of the production node modules used in your project. -Your action is now published! :rocket: +Your action is now published! :rocket: See the [versioning documentation](https://github.com/actions/toolkit/blob/master/docs/action-versioning.md) From 0f3873f0f3d42dc0d677a64eda2500adc0abe7bf Mon Sep 17 00:00:00 2001 From: Mike Ball Date: Sun, 16 Jan 2022 06:20:47 -0500 Subject: [PATCH 2/3] use consistent 2 space indentation in .eslintrc.json Previously, this file had a mix of 2 and 4 space indentation. --- .eslintrc.json | 108 ++++++++++++++++++++++++------------------------- 1 file changed, 54 insertions(+), 54 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 71ee545..2421732 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,55 +1,55 @@ { - "plugins": ["jest", "@typescript-eslint"], - "extends": ["plugin:github/recommended"], - "parser": "@typescript-eslint/parser", - "parserOptions": { - "ecmaVersion": 9, - "sourceType": "module", - "project": "./tsconfig.json" - }, - "rules": { - "i18n-text/no-en": "off", - "eslint-comments/no-use": "off", - "import/no-namespace": "off", - "no-unused-vars": "off", - "@typescript-eslint/no-unused-vars": "error", - "@typescript-eslint/explicit-member-accessibility": ["error", {"accessibility": "no-public"}], - "@typescript-eslint/no-require-imports": "error", - "@typescript-eslint/array-type": "error", - "@typescript-eslint/await-thenable": "error", - "@typescript-eslint/ban-ts-comment": "error", - "camelcase": "off", - "@typescript-eslint/consistent-type-assertions": "error", - "@typescript-eslint/explicit-function-return-type": ["error", {"allowExpressions": true}], - "@typescript-eslint/func-call-spacing": ["error", "never"], - "@typescript-eslint/no-array-constructor": "error", - "@typescript-eslint/no-empty-interface": "error", - "@typescript-eslint/no-explicit-any": "error", - "@typescript-eslint/no-extraneous-class": "error", - "@typescript-eslint/no-for-in-array": "error", - "@typescript-eslint/no-inferrable-types": "error", - "@typescript-eslint/no-misused-new": "error", - "@typescript-eslint/no-namespace": "error", - "@typescript-eslint/no-non-null-assertion": "warn", - "@typescript-eslint/no-unnecessary-qualifier": "error", - "@typescript-eslint/no-unnecessary-type-assertion": "error", - "@typescript-eslint/no-useless-constructor": "error", - "@typescript-eslint/no-var-requires": "error", - "@typescript-eslint/prefer-for-of": "warn", - "@typescript-eslint/prefer-function-type": "warn", - "@typescript-eslint/prefer-includes": "error", - "@typescript-eslint/prefer-string-starts-ends-with": "error", - "@typescript-eslint/promise-function-async": "error", - "@typescript-eslint/require-array-sort-compare": "error", - "@typescript-eslint/restrict-plus-operands": "error", - "semi": "off", - "@typescript-eslint/semi": ["error", "never"], - "@typescript-eslint/type-annotation-spacing": "error", - "@typescript-eslint/unbound-method": "error" - }, - "env": { - "node": true, - "es6": true, - "jest/globals": true - } - } \ No newline at end of file + "plugins": ["jest", "@typescript-eslint"], + "extends": ["plugin:github/recommended"], + "parser": "@typescript-eslint/parser", + "parserOptions": { + "ecmaVersion": 9, + "sourceType": "module", + "project": "./tsconfig.json" + }, + "rules": { + "i18n-text/no-en": "off", + "eslint-comments/no-use": "off", + "import/no-namespace": "off", + "no-unused-vars": "off", + "@typescript-eslint/no-unused-vars": "error", + "@typescript-eslint/explicit-member-accessibility": ["error", {"accessibility": "no-public"}], + "@typescript-eslint/no-require-imports": "error", + "@typescript-eslint/array-type": "error", + "@typescript-eslint/await-thenable": "error", + "@typescript-eslint/ban-ts-comment": "error", + "camelcase": "off", + "@typescript-eslint/consistent-type-assertions": "error", + "@typescript-eslint/explicit-function-return-type": ["error", {"allowExpressions": true}], + "@typescript-eslint/func-call-spacing": ["error", "never"], + "@typescript-eslint/no-array-constructor": "error", + "@typescript-eslint/no-empty-interface": "error", + "@typescript-eslint/no-explicit-any": "error", + "@typescript-eslint/no-extraneous-class": "error", + "@typescript-eslint/no-for-in-array": "error", + "@typescript-eslint/no-inferrable-types": "error", + "@typescript-eslint/no-misused-new": "error", + "@typescript-eslint/no-namespace": "error", + "@typescript-eslint/no-non-null-assertion": "warn", + "@typescript-eslint/no-unnecessary-qualifier": "error", + "@typescript-eslint/no-unnecessary-type-assertion": "error", + "@typescript-eslint/no-useless-constructor": "error", + "@typescript-eslint/no-var-requires": "error", + "@typescript-eslint/prefer-for-of": "warn", + "@typescript-eslint/prefer-function-type": "warn", + "@typescript-eslint/prefer-includes": "error", + "@typescript-eslint/prefer-string-starts-ends-with": "error", + "@typescript-eslint/promise-function-async": "error", + "@typescript-eslint/require-array-sort-compare": "error", + "@typescript-eslint/restrict-plus-operands": "error", + "semi": "off", + "@typescript-eslint/semi": ["error", "never"], + "@typescript-eslint/type-annotation-spacing": "error", + "@typescript-eslint/unbound-method": "error" + }, + "env": { + "node": true, + "es6": true, + "jest/globals": true + } +} From c9e591b0e24026cf32e0176e113ec8fe50544d54 Mon Sep 17 00:00:00 2001 From: Mike Ball Date: Sun, 16 Jan 2022 06:21:46 -0500 Subject: [PATCH 3/3] remove trailing whitespace from .gitattributes --- .gitattributes | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitattributes b/.gitattributes index 2e051e1..af30937 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1 +1 @@ -dist/** -diff linguist-generated=true \ No newline at end of file +dist/** -diff linguist-generated=true