From a7673e4243a4952b0b1dede8688e23776d8b9b63 Mon Sep 17 00:00:00 2001 From: shmck Date: Sat, 5 Jun 2021 19:17:04 -0700 Subject: [PATCH 1/3] eslint update Signed-off-by: shmck --- .eslintrc.js | 16 +++------------- package.json | 8 ++++---- web-app/package.json | 2 +- yarn.lock | 41 +++++++++++++++++------------------------ 4 files changed, 25 insertions(+), 42 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index e849a5bd..adb79903 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,25 +1,15 @@ module.exports = { parser: '@typescript-eslint/parser', // Specifies the ESLint parser plugins: ['prettier'], - extends: [ - 'react-app', - 'plugin:@typescript-eslint/recommended', // Uses the recommended rules from the @typescript-eslint/eslint-plugin - 'prettier/@typescript-eslint', // Uses eslint-config-prettier to disable ESLint rules from @typescript-eslint/eslint-plugin that would conflict with prettier - 'plugin:prettier/recommended', - ], + extends: ['react-app', 'plugin:prettier/recommended'], parserOptions: { ecmaVersion: 2018, // Allows for the parsing of modern ECMAScript features sourceType: 'module', // Allows for the use of imports }, rules: { - // Place to specify ESLint rules. Can be used to overwrite rules specified from the extended configs - '@typescript-eslint/explicit-function-return-type': 'off', - '@typescript-eslint/no-explicit-any': 'off', - '@typescript-eslint/ban-ts-ignore': 'off', - '@typescript-eslint/no-unused-vars': 'off', - '@typescript-eslint/camelcase': 'off', - '@typescript-eslint/ban-ts-comment': 'off', // 'react/forbid-component-props': [1, { forbid: ['style'] }], // 'react/forbid-dom-props': [1, { forbid: ['style'] }], + 'space-before-function-paren': 0, + 'prettier/prettier': 'error', }, } diff --git a/package.json b/package.json index 70ca231f..ee463da0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "coderoad", - "version": "0.14.2", + "version": "0.14.3", "description": "Play interactive coding tutorials in your editor", "keywords": [ "tutorial", @@ -51,13 +51,13 @@ "@types/assert": "1.5.4", "@types/jest": "26.0.23", "@types/jsdom": "16.2.10", - "@types/node": "14.14.19", + "@types/node": "15.0.2", "@types/node-fetch": "2.5.10", "@types/semver": "7.3.5", "@typescript-eslint/eslint-plugin": "4.23.0", "@typescript-eslint/parser": "4.23.0", - "eslint-config-prettier": "^6.11.0", - "eslint-config-react-app": "^5.2.1", + "eslint-config-prettier": "8.3.0", + "eslint-config-react-app": "6.0.0", "eslint-plugin-flowtype": "5.7.2", "eslint-plugin-import": "2.22.1", "eslint-plugin-jsx-a11y": "6.4.1", diff --git a/web-app/package.json b/web-app/package.json index 3f85676f..30451ce4 100644 --- a/web-app/package.json +++ b/web-app/package.json @@ -1,6 +1,6 @@ { "name": "coderoad-app", - "version": "0.14.2", + "version": "0.14.3", "private": true, "scripts": { "build": "react-app-rewired build", diff --git a/yarn.lock b/yarn.lock index e7f8a00e..5eb3fc17 100644 --- a/yarn.lock +++ b/yarn.lock @@ -709,10 +709,10 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-13.13.0.tgz#30d2d09f623fe32cde9cb582c7a6eda2788ce4a8" integrity sha512-WE4IOAC6r/yBZss1oQGM5zs2D7RuKR6Q+w+X2SouPofnWn+LbCqClRyhO3ZE7Ix8nmFgo/oVuuE01cJT2XB13A== -"@types/node@14.14.19": - version "14.14.19" - resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.19.tgz#5135176a8330b88ece4e9ab1fdcfc0a545b4bab4" - integrity sha512-4nhBPStMK04rruRVtVc6cDqhu7S9GZai0fpXgPXrFpcPX6Xul8xnrjSdGB4KPBVYG/R5+fXWdCM8qBoiULWGPQ== +"@types/node@15.0.2": + version "15.0.2" + resolved "https://registry.yarnpkg.com/@types/node/-/node-15.0.2.tgz#51e9c0920d1b45936ea04341aa3e2e58d339fb67" + integrity sha512-p68+a+KoxpoB47015IeYZYRrdqMUcpbK8re/zpFB8Ld46LHC1lPEbp3EXgkEhAYEcPvjJF6ZO+869SQ0aH1dcA== "@types/normalize-package-data@^2.4.0": version "2.4.0" @@ -1510,10 +1510,10 @@ concat-map@0.0.1: resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= -confusing-browser-globals@^1.0.9: - version "1.0.9" - resolved "https://registry.yarnpkg.com/confusing-browser-globals/-/confusing-browser-globals-1.0.9.tgz#72bc13b483c0276801681871d4898516f8f54fdd" - integrity sha512-KbS1Y0jMtyPgIxjO7ZzMAuUpAKMt1SzCL9fsrKsX6b0zJPTaT0SiSPmewwVZg9UAO83HVIlEhZF84LIjZ0lmAw== +confusing-browser-globals@^1.0.10: + version "1.0.10" + resolved "https://registry.yarnpkg.com/confusing-browser-globals/-/confusing-browser-globals-1.0.10.tgz#30d1e7f3d1b882b25ec4933d1d1adac353d20a59" + integrity sha512-gNld/3lySHwuhaVluJUKLePYirM3QNCKzVxqAdhJII9/WXKVX5PURzMVJspS1jTslSqjeuG4KMVTSouit5YPHA== contains-path@^0.1.0: version "0.1.0" @@ -1954,19 +1954,17 @@ escodegen@^2.0.0: optionalDependencies: source-map "~0.6.1" -eslint-config-prettier@^6.11.0: - version "6.11.0" - resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-6.11.0.tgz#f6d2238c1290d01c859a8b5c1f7d352a0b0da8b1" - integrity sha512-oB8cpLWSAjOVFEJhhyMZh6NOEOtBVziaqdDQ86+qhDHFbZXoRTM7pNSvFRfW/W/L/LrQ38C99J5CGuRBBzBsdA== - dependencies: - get-stdin "^6.0.0" +eslint-config-prettier@8.3.0: + version "8.3.0" + resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-8.3.0.tgz#f7471b20b6fe8a9a9254cc684454202886a2dd7a" + integrity sha512-BgZuLUSeKzvlL/VUjx/Yb787VQ26RU3gGjA3iiFvdsp/2bMfVIWUVP7tjxtjS0e+HP409cPlPvNkQloz8C91ew== -eslint-config-react-app@^5.2.1: - version "5.2.1" - resolved "https://registry.yarnpkg.com/eslint-config-react-app/-/eslint-config-react-app-5.2.1.tgz#698bf7aeee27f0cea0139eaef261c7bf7dd623df" - integrity sha512-pGIZ8t0mFLcV+6ZirRgYK6RVqUIKRIi9MmgzUEmrIknsn3AdO0I32asO86dJgloHq+9ZPl8UIg8mYrvgP5u2wQ== +eslint-config-react-app@6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/eslint-config-react-app/-/eslint-config-react-app-6.0.0.tgz#ccff9fc8e36b322902844cbd79197982be355a0e" + integrity sha512-bpoAAC+YRfzq0dsTk+6v9aHm/uqnDwayNAXleMypGl6CpxI9oXXscVHo4fk3eJPIn+rsbtNetB4r/ZIidFIE8A== dependencies: - confusing-browser-globals "^1.0.9" + confusing-browser-globals "^1.0.10" eslint-import-resolver-node@^0.3.4: version "0.3.4" @@ -2513,11 +2511,6 @@ get-intrinsic@^1.0.2, get-intrinsic@^1.1.0, get-intrinsic@^1.1.1: has "^1.0.3" has-symbols "^1.0.1" -get-stdin@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-6.0.0.tgz#9e09bf712b360ab9225e812048f71fde9c89657b" - integrity sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g== - get-stream@^4.0.0: version "4.1.0" resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-4.1.0.tgz#c1b255575f3dc21d59bfc79cd3d2b46b1c3a54b5" From 3c8b684d9ffea53366372dc8a1cb0f51d7c7df29 Mon Sep 17 00:00:00 2001 From: shmck Date: Sat, 5 Jun 2021 19:17:35 -0700 Subject: [PATCH 2/3] package script fixes Signed-off-by: shmck --- scripts/package.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/package.sh b/scripts/package.sh index d5564570..6f3b04a9 100755 --- a/scripts/package.sh +++ b/scripts/package.sh @@ -15,7 +15,8 @@ echo "Building..." yarn build echo "Packaging Extension..." -vsce package --yarn --out ./$RELEASES_FOLDER +mkdir -p ./$RELEASES_FOLDER +npx vsce package --yarn --out ./$RELEASES_FOLDER echo "Installing Extension..." code --install-extension ./$RELEASES_FOLDER/$OUTPUT_FILE From e77f2bef71eb266a6c9c4cd543fb746dd2f59230 Mon Sep 17 00:00:00 2001 From: shmck Date: Sat, 5 Jun 2021 19:18:54 -0700 Subject: [PATCH 3/3] lint fixes Signed-off-by: shmck --- src/actions/onRunReset.ts | 1 - src/commands.ts | 1 - 2 files changed, 2 deletions(-) diff --git a/src/actions/onRunReset.ts b/src/actions/onRunReset.ts index 47c2d8a7..890b084e 100644 --- a/src/actions/onRunReset.ts +++ b/src/actions/onRunReset.ts @@ -1,7 +1,6 @@ import * as T from 'typings' import * as TT from 'typings/tutorial' import Context from '../services/context/context' -import { exec } from '../services/node' import reset from '../services/reset' import * as hooks from '../services/hooks' import getCommitHashByPosition from '../services/reset/lastHash' diff --git a/src/commands.ts b/src/commands.ts index c7f4fc4d..c7ba69a5 100644 --- a/src/commands.ts +++ b/src/commands.ts @@ -5,7 +5,6 @@ import createTestRunner from './services/testRunner' import createWebView from './services/webview' import * as hooks from './services/hooks' import logger from './services/logger' -import * as actions from './actions' import Channel from './channel' export const COMMANDS = {