diff --git a/.eslintignore b/.eslintignore index 4da9030394..e7660cd850 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,4 +1,3 @@ -**/node_modules/** client/.cache/** client/static/** client/public/** diff --git a/.eslintrc-base.json b/.eslintrc-base.json index a70e565386..70b8e9f77e 100644 --- a/.eslintrc-base.json +++ b/.eslintrc-base.json @@ -1,210 +1,210 @@ { -"rules": { - "max-len": [ - "error", - { "code": 80, "ignoreUrls": true, "ignoreTemplateLiterals": true } - ], - "block-scoped-var": 0, - "brace-style": [2, "1tbs", { "allowSingleLine": true }], - "camelcase": 2, - "comma-dangle": 2, - "comma-spacing": [2, { "before": false, "after": true }], - "comma-style": [2, "last"], - "complexity": 0, - "consistent-return": 2, - "consistent-this": 0, - "curly": 2, - "default-case": 2, - "dot-notation": 0, - "eol-last": 2, - "eqeqeq": 2, - "func-call-spacing": 2, - "func-names": 0, - "func-style": 0, - "guard-for-in": 2, - "handle-callback-err": 2, - "import/default": 2, - "import/export": 2, - "import/extensions": [0, "always"], - "import/first": 2, - "import/named": 2, - "import/namespace": 2, - "import/newline-after-import": 2, - "import/no-duplicates": 2, - "import/no-unresolved": [2, {"commonjs": true}], - "import/unambiguous": 2, - "jsx-quotes": [2, "prefer-single"], - "jsx-a11y/accessible-emoji": "error", - "jsx-a11y/alt-text": "error", - "jsx-a11y/anchor-has-content": "error", - "jsx-a11y/anchor-is-valid": "error", - "jsx-a11y/aria-activedescendant-has-tabindex": "error", - "jsx-a11y/aria-props": "error", - "jsx-a11y/aria-proptypes": "error", - "jsx-a11y/aria-role": "error", - "jsx-a11y/aria-unsupported-elements": "error", - "jsx-a11y/control-has-associated-label": "error", - "jsx-a11y/click-events-have-key-events": "error", - "jsx-a11y/heading-has-content": "error", - "jsx-a11y/html-has-lang": "error", - "jsx-a11y/iframe-has-title": "error", - "jsx-a11y/img-redundant-alt": "error", - "jsx-a11y/interactive-supports-focus": "error", - "jsx-a11y/label-has-associated-control": "error", - "jsx-a11y/lang": "error", - "jsx-a11y/media-has-caption": "error", - "jsx-a11y/mouse-events-have-key-events": "error", - "jsx-a11y/no-access-key": "error", - "jsx-a11y/no-autofocus": "error", - "jsx-a11y/no-distracting-elements": "error", - "jsx-a11y/no-interactive-element-to-noninteractive-role": "error", - "jsx-a11y/no-noninteractive-element-interactions": "error", - "jsx-a11y/no-noninteractive-element-to-interactive-role": "error", - "jsx-a11y/no-noninteractive-tabindex": "error", - "jsx-a11y/no-onchange": "error", - "jsx-a11y/no-redundant-roles": "error", - "jsx-a11y/no-static-element-interactions": "error", - "jsx-a11y/role-has-required-aria-props": "error", - "jsx-a11y/role-supports-aria-props": "error", - "jsx-a11y/scope": "error", - "jsx-a11y/tabindex-no-positive": "error", - "key-spacing": [2, { "beforeColon": false, "afterColon": true }], - "keyword-spacing": [2], - "max-depth": 0, - "max-nested-callbacks": 0, - "max-params": 0, - "max-statements": 0, - "new-cap": 0, - "new-parens": 2, - "no-alert": 2, - "no-array-constructor": 2, - "no-bitwise": 2, - "no-caller": 2, - "no-cond-assign": 2, - "no-console": 0, - "no-constant-condition": 2, - "no-control-regex": 2, - "no-debugger": 2, - "no-delete-var": 2, - "no-div-regex": 2, - "no-dupe-keys": 2, - "no-else-return": 0, - "no-empty": 2, - "no-empty-character-class": 2, - "no-eq-null": 2, - "no-eval": 2, - "no-ex-assign": 2, - "no-extend-native": 2, - "no-extra-bind": 2, - "no-extra-boolean-cast": 2, - "no-extra-parens": 0, - "no-extra-semi": 2, - "no-fallthrough": 2, - "no-floating-decimal": 2, - "no-func-assign": 2, - "no-global-assign": 2, - "no-implied-eval": 2, - "no-inline-comments": 2, - "no-inner-declarations": 2, - "no-invalid-regexp": 2, - "no-irregular-whitespace": 2, - "no-iterator": 2, - "no-label-var": 2, - "no-labels": 2, - "no-lone-blocks": 2, - "no-lonely-if": 2, - "no-loop-func": 2, - "no-mixed-requires": 0, - "no-mixed-spaces-and-tabs": 2, - "no-multi-spaces": 2, - "no-multi-str": 2, - "no-multiple-empty-lines": [2, { "max": 2 }], - "no-nested-ternary": 2, - "no-new": 2, - "no-new-func": 2, - "no-new-object": 2, - "no-new-require": 2, - "no-new-wrappers": 2, - "no-obj-calls": 2, - "no-octal": 2, - "no-octal-escape": 2, - "no-path-concat": 2, - "no-plusplus": 0, - "no-process-env": 0, - "no-process-exit": 2, - "no-proto": 2, - "no-regex-spaces": 2, - "no-reserved-keys": 0, - "no-restricted-modules": 0, - "no-return-assign": 2, - "no-script-url": 2, - "no-self-compare": 2, - "no-sequences": 2, - "no-shadow": 0, - "no-shadow-restricted-names": 2, - "no-sparse-arrays": 2, - "no-sync": 0, - "no-ternary": 0, - "no-trailing-spaces": 2, - "no-undef": 2, - "no-undef-init": 2, - "no-undefined": 2, - "no-underscore-dangle": 0, - "no-unreachable": 2, - "no-unsafe-negation": 2, - "no-unused-expressions": 2, - "no-unused-vars": 2, - "no-use-before-define": 0, - "no-void": 0, - "no-warning-comments": [2, { "terms": ["fixme"], "location": "start" }], - "no-with": 2, - "one-var": 0, - "operator-assignment": 0, - "padded-blocks": 0, - "prefer-object-spread/prefer-object-spread": 2, - "prettier/prettier": "error", - "quote-props": [2, "as-needed"], - "quotes": [2, "single", "avoid-escape"], - "radix": 2, - "react/display-name": 2, - "react/jsx-boolean-value": [2, "always"], - "react/jsx-closing-bracket-location": [ - 2, - { "selfClosing": "line-aligned", "nonEmpty": "props-aligned" } - ], - "react/jsx-no-undef": 2, - "react/jsx-sort-props": [2, { "ignoreCase": true }], - "react/jsx-uses-react": 2, - "react/jsx-uses-vars": 2, - "react/jsx-wrap-multilines": 2, - "react/no-did-mount-set-state": 2, - "react/no-did-update-set-state": 2, - "react/no-multi-comp": [2, { "ignoreStateless": true }], - "react/no-unescaped-entities": 0, - "react/no-unknown-property": 2, - "react/prop-types": 2, - "react/react-in-jsx-scope": 2, - "react/self-closing-comp": 2, - "react/sort-prop-types": 2, - "react-hooks/rules-of-hooks": "error", - "react-hooks/exhaustive-deps": "error", - "semi": [2, "always"], - "semi-spacing": [2, { "before": false, "after": true }], - "sort-vars": 0, - "space-before-blocks": [2, "always"], - "space-before-function-paren": [2, "never"], - "space-in-brackets": 0, - "space-in-parens": 0, - "space-infix-ops": 2, - "space-unary-ops": [2, { "words": true, "nonwords": false }], - "spaced-comment": [2, "always", { "exceptions": ["-"] }], - "strict": 0, - "use-isnan": 2, - "valid-jsdoc": 0, - "valid-typeof": 2, - "vars-on-top": 0, - "wrap-iife": [2, "any"], - "wrap-regex": 2, - "yoda": 0 -} + "rules": { + "max-len": [ + "error", + { "code": 80, "ignoreUrls": true, "ignoreTemplateLiterals": true } + ], + "block-scoped-var": 0, + "brace-style": [2, "1tbs", { "allowSingleLine": true }], + "camelcase": 2, + "comma-dangle": 2, + "comma-spacing": [2, { "before": false, "after": true }], + "comma-style": [2, "last"], + "complexity": 0, + "consistent-return": 2, + "consistent-this": 0, + "curly": 2, + "default-case": 2, + "dot-notation": 0, + "eol-last": 2, + "eqeqeq": 2, + "func-call-spacing": 2, + "func-names": 0, + "func-style": 0, + "guard-for-in": 2, + "handle-callback-err": 2, + "import/default": 2, + "import/export": 2, + "import/extensions": [0, "always"], + "import/first": 2, + "import/named": 2, + "import/namespace": 2, + "import/newline-after-import": 2, + "import/no-duplicates": 2, + "import/no-unresolved": [2, { "commonjs": true }], + "import/unambiguous": 2, + "jsx-quotes": [2, "prefer-single"], + "jsx-a11y/accessible-emoji": "error", + "jsx-a11y/alt-text": "error", + "jsx-a11y/anchor-has-content": "error", + "jsx-a11y/anchor-is-valid": "error", + "jsx-a11y/aria-activedescendant-has-tabindex": "error", + "jsx-a11y/aria-props": "error", + "jsx-a11y/aria-proptypes": "error", + "jsx-a11y/aria-role": "error", + "jsx-a11y/aria-unsupported-elements": "error", + "jsx-a11y/control-has-associated-label": "error", + "jsx-a11y/click-events-have-key-events": "error", + "jsx-a11y/heading-has-content": "error", + "jsx-a11y/html-has-lang": "error", + "jsx-a11y/iframe-has-title": "error", + "jsx-a11y/img-redundant-alt": "error", + "jsx-a11y/interactive-supports-focus": "error", + "jsx-a11y/label-has-associated-control": "error", + "jsx-a11y/lang": "error", + "jsx-a11y/media-has-caption": "error", + "jsx-a11y/mouse-events-have-key-events": "error", + "jsx-a11y/no-access-key": "error", + "jsx-a11y/no-autofocus": "error", + "jsx-a11y/no-distracting-elements": "error", + "jsx-a11y/no-interactive-element-to-noninteractive-role": "error", + "jsx-a11y/no-noninteractive-element-interactions": "error", + "jsx-a11y/no-noninteractive-element-to-interactive-role": "error", + "jsx-a11y/no-noninteractive-tabindex": "error", + "jsx-a11y/no-onchange": "error", + "jsx-a11y/no-redundant-roles": "error", + "jsx-a11y/no-static-element-interactions": "error", + "jsx-a11y/role-has-required-aria-props": "error", + "jsx-a11y/role-supports-aria-props": "error", + "jsx-a11y/scope": "error", + "jsx-a11y/tabindex-no-positive": "error", + "key-spacing": [2, { "beforeColon": false, "afterColon": true }], + "keyword-spacing": [2], + "max-depth": 0, + "max-nested-callbacks": 0, + "max-params": 0, + "max-statements": 0, + "new-cap": 0, + "new-parens": 2, + "no-alert": 2, + "no-array-constructor": 2, + "no-bitwise": 2, + "no-caller": 2, + "no-cond-assign": 2, + "no-console": 0, + "no-constant-condition": 2, + "no-control-regex": 2, + "no-debugger": 2, + "no-delete-var": 2, + "no-div-regex": 2, + "no-dupe-keys": 2, + "no-else-return": 0, + "no-empty": 2, + "no-empty-character-class": 2, + "no-eq-null": 2, + "no-eval": 2, + "no-ex-assign": 2, + "no-extend-native": 2, + "no-extra-bind": 2, + "no-extra-boolean-cast": 2, + "no-extra-parens": 0, + "no-extra-semi": 2, + "no-fallthrough": 2, + "no-floating-decimal": 2, + "no-func-assign": 2, + "no-global-assign": 2, + "no-implied-eval": 2, + "no-inline-comments": 2, + "no-inner-declarations": 2, + "no-invalid-regexp": 2, + "no-irregular-whitespace": 2, + "no-iterator": 2, + "no-label-var": 2, + "no-labels": 2, + "no-lone-blocks": 2, + "no-lonely-if": 2, + "no-loop-func": 2, + "no-mixed-requires": 0, + "no-mixed-spaces-and-tabs": 2, + "no-multi-spaces": 2, + "no-multi-str": 2, + "no-multiple-empty-lines": [2, { "max": 2 }], + "no-nested-ternary": 2, + "no-new": 2, + "no-new-func": 2, + "no-new-object": 2, + "no-new-require": 2, + "no-new-wrappers": 2, + "no-obj-calls": 2, + "no-octal": 2, + "no-octal-escape": 2, + "no-path-concat": 2, + "no-plusplus": 0, + "no-process-env": 0, + "no-process-exit": 2, + "no-proto": 2, + "no-regex-spaces": 2, + "no-reserved-keys": 0, + "no-restricted-modules": 0, + "no-return-assign": 2, + "no-script-url": 2, + "no-self-compare": 2, + "no-sequences": 2, + "no-shadow": 0, + "no-shadow-restricted-names": 2, + "no-sparse-arrays": 2, + "no-sync": 0, + "no-ternary": 0, + "no-trailing-spaces": 2, + "no-undef": 2, + "no-undef-init": 2, + "no-undefined": 2, + "no-underscore-dangle": 0, + "no-unreachable": 2, + "no-unsafe-negation": 2, + "no-unused-expressions": 2, + "no-unused-vars": 2, + "no-use-before-define": 0, + "no-void": 0, + "no-warning-comments": [2, { "terms": ["fixme"], "location": "start" }], + "no-with": 2, + "one-var": 0, + "operator-assignment": 0, + "padded-blocks": 0, + "prefer-object-spread/prefer-object-spread": 2, + "prettier/prettier": "error", + "quote-props": [2, "as-needed"], + "quotes": [2, "single", "avoid-escape"], + "radix": 2, + "react/display-name": 2, + "react/jsx-boolean-value": [2, "always"], + "react/jsx-closing-bracket-location": [ + 2, + { "selfClosing": "line-aligned", "nonEmpty": "props-aligned" } + ], + "react/jsx-no-undef": 2, + "react/jsx-sort-props": [2, { "ignoreCase": true }], + "react/jsx-uses-react": 2, + "react/jsx-uses-vars": 2, + "react/jsx-wrap-multilines": 2, + "react/no-did-mount-set-state": 2, + "react/no-did-update-set-state": 2, + "react/no-multi-comp": [2, { "ignoreStateless": true }], + "react/no-unescaped-entities": 0, + "react/no-unknown-property": 2, + "react/prop-types": 2, + "react/react-in-jsx-scope": 2, + "react/self-closing-comp": 2, + "react/sort-prop-types": 2, + "react-hooks/rules-of-hooks": "error", + "react-hooks/exhaustive-deps": "error", + "semi": [2, "always"], + "semi-spacing": [2, { "before": false, "after": true }], + "sort-vars": 0, + "space-before-blocks": [2, "always"], + "space-before-function-paren": [2, "never"], + "space-in-brackets": 0, + "space-in-parens": 0, + "space-infix-ops": 2, + "space-unary-ops": [2, { "words": true, "nonwords": false }], + "spaced-comment": [2, "always", { "exceptions": ["-"] }], + "strict": 0, + "use-isnan": 2, + "valid-jsdoc": 0, + "valid-typeof": 2, + "vars-on-top": 0, + "wrap-iife": [2, "any"], + "wrap-regex": 2, + "yoda": 0 + } } diff --git a/.eslintrc.json b/.eslintrc.json index ffc63dee3c..50eab4e668 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,27 +1,43 @@ { "env": { - "es6": true, - "browser": true, - "mocha": true, - "node": true + "es6": true, + "browser": true, + "mocha": true, + "node": true }, "parser": "babel-eslint", "root": true, - "extends": ["./.eslintrc-base.json", "prettier", "prettier/react"], - "plugins": ["react", "import", "prefer-object-spread", "prettier", "react-hooks", "jsx-a11y"], + "extends": [ + "./.eslintrc-base.json", + "prettier" + ], + "plugins": [ + "react", + "import", + "prefer-object-spread", + "prettier", + "react-hooks", + "jsx-a11y" + ], "globals": { - "Promise": true, - "window": true, - "$": true, - "ga": true, - "jQuery": true, - "router": true - }, + "Promise": true, + "window": true, + "$": true, + "ga": true, + "jQuery": true, + "router": true + }, "settings": { "react": { "version": "16.4.2", - "import/ignore": ["node_modules", "\\.json$"], - "import/extensions": [".js", ".jsx"] + "import/ignore": [ + "node_modules", + "\\.json$" + ], + "import/extensions": [ + ".js", + ".jsx" + ] } } -} +} \ No newline at end of file diff --git a/.prettierrc b/.prettierrc index 796d703777..2c652feab9 100644 --- a/.prettierrc +++ b/.prettierrc @@ -4,5 +4,6 @@ "singleQuote": true, "jsxSingleQuote": true, "tabWidth": 2, - "trailingComma": "none" + "trailingComma": "none", + "arrowParens": "avoid" } diff --git a/api-server/src/common/models/User-Credential.js b/api-server/src/common/models/User-Credential.js index ccacd8c359..8a6d44af60 100644 --- a/api-server/src/common/models/User-Credential.js +++ b/api-server/src/common/models/User-Credential.js @@ -8,8 +8,8 @@ import { } from '../../server/utils/auth'; const log = debug('fcc:models:UserCredential'); -module.exports = function(UserCredential) { - UserCredential.link = function( +module.exports = function (UserCredential) { + UserCredential.link = function ( userId, _provider, authScheme, diff --git a/api-server/src/common/models/User-Identity.js b/api-server/src/common/models/User-Identity.js index 9b9e0777f6..854f17ebbd 100644 --- a/api-server/src/common/models/User-Identity.js +++ b/api-server/src/common/models/User-Identity.js @@ -14,12 +14,12 @@ export function ensureLowerCaseEmail(profile) { : ''; } -export default function(UserIdent) { +export default function (UserIdent) { UserIdent.on('dataSourceAttached', () => { UserIdent.findOne$ = observeMethod(UserIdent, 'findOne'); }); - UserIdent.login = function( + UserIdent.login = function ( _provider, authScheme, profile, diff --git a/api-server/src/common/models/block.js b/api-server/src/common/models/block.js index 888082e7c1..dab6413c04 100644 --- a/api-server/src/common/models/block.js +++ b/api-server/src/common/models/block.js @@ -1,6 +1,6 @@ import { Observable } from 'rx'; -export default function(Block) { +export default function (Block) { Block.on('dataSourceAttached', () => { Block.findOne$ = Observable.fromNodeCallback(Block.findOne, Block); Block.findById$ = Observable.fromNodeCallback(Block.findById, Block); diff --git a/api-server/src/common/models/user.js b/api-server/src/common/models/user.js index 162643049d..2d6f2e4d7b 100644 --- a/api-server/src/common/models/user.js +++ b/api-server/src/common/models/user.js @@ -152,7 +152,7 @@ function populateRequiredFields(user) { return; } -export default function(User) { +export default function (User) { // set salt factor for passwords User.settings.saltWorkFactor = 5; // set user.rand to random number @@ -180,7 +180,7 @@ export default function(User) { ); }); - User.observe('before save', function(ctx) { + User.observe('before save', function (ctx) { const beforeCreate = Observable.of(ctx) .filter(({ isNewInstance }) => isNewInstance) // User.create @@ -229,7 +229,7 @@ export default function(User) { }); // remove lingering user identities before deleting user - User.observe('before delete', function(ctx, next) { + User.observe('before delete', function (ctx, next) { const UserIdentity = User.app.models.UserIdentity; const UserCredential = User.app.models.UserCredential; log('removing user', ctx.where); @@ -240,21 +240,21 @@ export default function(User) { return Observable.combineLatest( destroyAll(id, UserIdentity), destroyAll(id, UserCredential), - function(identData, credData) { + function (identData, credData) { return { identData: identData, credData: credData }; } ).subscribe( - function(data) { + function (data) { log('deleted', data); }, - function(err) { + function (err) { log('error deleting user %s stuff', id, err); next(err); }, - function() { + function () { log('user stuff deleted for user %s', id); next(); } @@ -263,7 +263,7 @@ export default function(User) { log('setting up user hooks'); // overwrite lb confirm - User.confirm = function(uid, token, redirectTo) { + User.confirm = function (uid, token, redirectTo) { return this.findById(uid).then(user => { if (!user) { throw wrapHandledError(new Error(`User not found: ${uid}`), { @@ -339,7 +339,7 @@ export default function(User) { ); }; - User.afterRemote('logout', function({ req, res }, result, next) { + User.afterRemote('logout', function ({ req, res }, result, next) { removeCookies(req, res); next(); }); @@ -802,7 +802,7 @@ export default function(User) { ...user, about: showAbout ? about : '', calendar: showHeatMap ? calendar : {}, - completedChallenges: (function() { + completedChallenges: (function () { if (showTimeLine) { return showCerts ? completedChallenges diff --git a/api-server/src/server/boot/donate.js b/api-server/src/server/boot/donate.js index 46c9bb1c66..21e5aa4f29 100644 --- a/api-server/src/server/boot/donate.js +++ b/api-server/src/server/boot/donate.js @@ -41,9 +41,9 @@ export default function donateBoot(app, done) { metadata: { /* eslint-disable camelcase */ sb_service: `freeCodeCamp.org`, - sb_tier: `${ - donationSubscriptionConfig.duration[duration] - } $${amount / 100} Donation` + sb_tier: `${donationSubscriptionConfig.duration[duration]} $${ + amount / 100 + } Donation` /* eslint-enable camelcase */ } }, @@ -68,11 +68,11 @@ export default function donateBoot(app, done) { } function connectToStripe() { - return new Promise(function(resolve) { + return new Promise(function (resolve) { // connect to stripe API stripe = Stripe(keys.stripe.secret); // parse stripe plans - stripe.plans.list({}, function(err, stripePlans) { + stripe.plans.list({}, function (err, stripePlans) { if (err) { throw err; } @@ -96,7 +96,7 @@ export default function donateBoot(app, done) { function createStripePlan(plan) { log(`Creating subscription plan: ${plan.product.name}`); - stripe.plans.create(plan, function(err) { + stripe.plans.create(plan, function (err) { if (err) { log(err); } diff --git a/api-server/src/server/boot/explorer.js b/api-server/src/server/boot/explorer.js index 97d0d17774..a78447e347 100644 --- a/api-server/src/server/boot/explorer.js +++ b/api-server/src/server/boot/explorer.js @@ -12,7 +12,7 @@ module.exports = function mountLoopBackExplorer(app) { } catch (err) { // Print the message only when the app was started via `app.listen()`. // Do not print any message when the project is used as a component. - app.once('started', function() { + app.once('started', function () { log( 'Run `npm install loopback-component-explorer` to enable ' + 'the LoopBack explorer' @@ -25,7 +25,7 @@ module.exports = function mountLoopBackExplorer(app) { const mountPath = '/explorer'; explorer(app, { basePath: restApiRoot, mountPath }); - app.once('started', function() { + app.once('started', function () { const baseUrl = app.get('url').replace(/\/$/, ''); log('Browse your REST API at %s%s', baseUrl, mountPath); diff --git a/api-server/src/server/boot/randomAPIs.js b/api-server/src/server/boot/randomAPIs.js index 13bbbbe71c..16c7b5f3f5 100644 --- a/api-server/src/server/boot/randomAPIs.js +++ b/api-server/src/server/boot/randomAPIs.js @@ -6,7 +6,7 @@ import { getRedirectParams } from '../utils/redirection'; const githubClient = process.env.GITHUB_ID; const githubSecret = process.env.GITHUB_SECRET; -module.exports = function(app) { +module.exports = function (app) { const router = app.loopback.Router(); const User = app.models.User; @@ -168,7 +168,7 @@ module.exports = function(app) { githubSecret ].join(''), githubHeaders, - function(err, status1, pulls) { + function (err, status1, pulls) { if (err) { return next(err); } @@ -185,7 +185,7 @@ module.exports = function(app) { githubSecret ].join(''), githubHeaders, - function(err, status2, issues) { + function (err, status2, issues) { if (err) { return next(err); } diff --git a/api-server/src/server/boot/settings.js b/api-server/src/server/boot/settings.js index 7b051464db..a46b298ff4 100644 --- a/api-server/src/server/boot/settings.js +++ b/api-server/src/server/boot/settings.js @@ -77,9 +77,7 @@ function refetchCompletedChallenges(req, res, next) { } const updateMyEmailValidators = [ - check('email') - .isEmail() - .withMessage('Email format is invalid.') + check('email').isEmail().withMessage('Email format is invalid.') ]; function updateMyEmail(req, res, next) { @@ -117,9 +115,7 @@ function updateMyCurrentChallenge(req, res, next) { } const updateMyThemeValidators = [ - check('theme') - .isIn(Object.keys(themes)) - .withMessage('Theme is invalid.') + check('theme').isIn(Object.keys(themes)).withMessage('Theme is invalid.') ]; function updateMyTheme(req, res, next) { diff --git a/api-server/src/server/boot/t-wiki.js b/api-server/src/server/boot/t-wiki.js index 55f9981734..b559b47759 100644 --- a/api-server/src/server/boot/t-wiki.js +++ b/api-server/src/server/boot/t-wiki.js @@ -1,4 +1,4 @@ -module.exports = function(app) { +module.exports = function (app) { var router = app.loopback.Router(); router.get('/wiki/*', showForum); diff --git a/api-server/src/server/boot/user.js b/api-server/src/server/boot/user.js index 8e567fd18f..f361aca32d 100644 --- a/api-server/src/server/boot/user.js +++ b/api-server/src/server/boot/user.js @@ -125,7 +125,7 @@ function getUnlinkSocial(req, res, next) { } }; - return user.identities(query, function(err, identities) { + return user.identities(query, function (err, identities) { if (err) { return next(err); } @@ -137,7 +137,7 @@ function getUnlinkSocial(req, res, next) { return res.redirect('/' + username); } - return identity.destroy(function(err) { + return identity.destroy(function (err) { if (err) { return next(err); } @@ -181,7 +181,7 @@ function postResetProgress(req, res, next) { isMachineLearningPyCertV7: false, completedChallenges: [] }, - function(err) { + function (err) { if (err) { return next(err); } @@ -193,7 +193,7 @@ function postResetProgress(req, res, next) { function createPostDeleteAccount(app) { const { User } = app.models; return function postDeleteAccount(req, res, next) { - return User.destroyById(req.user.id, function(err) { + return User.destroyById(req.user.id, function (err) { if (err) { return next(err); } diff --git a/api-server/src/server/boot/z-not-found.js b/api-server/src/server/boot/z-not-found.js index 2a73823f6a..310d9602cb 100644 --- a/api-server/src/server/boot/z-not-found.js +++ b/api-server/src/server/boot/z-not-found.js @@ -2,7 +2,7 @@ import accepts from 'accepts'; import { getRedirectParams } from '../utils/redirection'; export default function fourOhFour(app) { - app.all('*', function(req, res) { + app.all('*', function (req, res) { const accept = accepts(req); const type = accept.type('html', 'json', 'text'); const { path } = req; diff --git a/api-server/src/server/component-passport.js b/api-server/src/server/component-passport.js index 8634024501..8fb2e2071a 100644 --- a/api-server/src/server/component-passport.js +++ b/api-server/src/server/component-passport.js @@ -53,7 +53,7 @@ export function setupPassport(app) { configurator.init(); - Object.keys(passportProviders).map(function(strategy) { + Object.keys(passportProviders).map(function (strategy) { let config = passportProviders[strategy]; config.session = config.session !== false; diff --git a/api-server/src/server/index.js b/api-server/src/server/index.js index 94ee8d841a..a9ad7fb205 100755 --- a/api-server/src/server/index.js +++ b/api-server/src/server/index.js @@ -64,9 +64,12 @@ boot(app, __dirname, err => { setupPassport(app); const { db } = app.datasources; -db.on('connected', _.once(() => log('db connected'))); -app.start = _.once(function() { - const server = app.listen(app.get('port'), function() { +db.on( + 'connected', + _.once(() => log('db connected')) +); +app.start = _.once(function () { + const server = app.listen(app.get('port'), function () { app.emit('started'); log( 'freeCodeCamp server listening on port %d in %s', diff --git a/api-server/src/server/middlewares/constant-headers.js b/api-server/src/server/middlewares/constant-headers.js index 05fb1cfe05..07ef3132f5 100644 --- a/api-server/src/server/middlewares/constant-headers.js +++ b/api-server/src/server/middlewares/constant-headers.js @@ -2,7 +2,7 @@ import { homeLocation } from '../../../../config/env'; import { allowedOrigins } from '../../../../config/cors-settings'; export default function constantHeaders() { - return function(req, res, next) { + return function (req, res, next) { if ( req.headers && req.headers.origin && diff --git a/api-server/src/server/middlewares/csurf.js b/api-server/src/server/middlewares/csurf.js index af7ecafb09..530e17a22e 100644 --- a/api-server/src/server/middlewares/csurf.js +++ b/api-server/src/server/middlewares/csurf.js @@ -1,6 +1,6 @@ import csurf from 'csurf'; -export default function() { +export default function () { const protection = csurf({ cookie: { domain: process.env.COOKIE_DOMAIN || 'localhost', diff --git a/api-server/src/server/middlewares/error-handlers.js b/api-server/src/server/middlewares/error-handlers.js index 780e3a8a8d..03b6d6dbb5 100644 --- a/api-server/src/server/middlewares/error-handlers.js +++ b/api-server/src/server/middlewares/error-handlers.js @@ -25,7 +25,7 @@ const isDev = process.env.FREECODECAMP_NODE_ENV !== 'production'; export default function prodErrorHandler() { // error handling in production. // eslint-disable-next-line no-unused-vars - return function(err, req, res, next) { + return function (err, req, res, next) { const { origin } = getRedirectParams(req); const handled = unwrapHandledError(err); // respect handled error status diff --git a/api-server/src/server/middlewares/express-extensions.js b/api-server/src/server/middlewares/express-extensions.js index 30b523ac3c..02055b7feb 100644 --- a/api-server/src/server/middlewares/express-extensions.js +++ b/api-server/src/server/middlewares/express-extensions.js @@ -1,7 +1,7 @@ import qs from 'query-string'; // add rx methods to express -export default function() { +export default function () { return function expressExtensions(req, res, next) { res.redirectWithFlash = uri => { const flash = req.flash(); diff --git a/api-server/src/server/middlewares/flash-cheaters.js b/api-server/src/server/middlewares/flash-cheaters.js index f156ee9195..710092c9a4 100644 --- a/api-server/src/server/middlewares/flash-cheaters.js +++ b/api-server/src/server/middlewares/flash-cheaters.js @@ -10,7 +10,7 @@ const EXCLUDED_PATHS = [ ]; export default function flashCheaters() { - return function(req, res, next) { + return function (req, res, next) { if ( ALLOWED_METHODS.indexOf(req.method) !== -1 && EXCLUDED_PATHS.indexOf(req.path) === -1 && diff --git a/api-server/src/server/models/auth-token.js b/api-server/src/server/models/auth-token.js index 249ef0a8a6..fbc4b17869 100644 --- a/api-server/src/server/models/auth-token.js +++ b/api-server/src/server/models/auth-token.js @@ -1,6 +1,6 @@ import { Observable } from 'rx'; -export default function(AuthToken) { +export default function (AuthToken) { AuthToken.on('dataSourceAttached', () => { AuthToken.findOne$ = Observable.fromNodeCallback( AuthToken.findOne.bind(AuthToken) diff --git a/api-server/src/server/models/donation.js b/api-server/src/server/models/donation.js index 7fc30c3a5f..f2eb865c66 100644 --- a/api-server/src/server/models/donation.js +++ b/api-server/src/server/models/donation.js @@ -7,7 +7,7 @@ import InMemoryCache from '../utils/in-memory-cache'; const log = debug('fcc:boot:donate'); const fiveMinutes = 1000 * 60 * 5; -export default function(Donation) { +export default function (Donation) { let activeDonationUpdateInterval = null; const activeDonationCountCacheTTL = fiveMinutes; const activeDonationCountCache = InMemoryCache(0, reportError); diff --git a/api-server/src/server/utils/date-utils.js b/api-server/src/server/utils/date-utils.js index ea68a8aad0..f9e1187610 100644 --- a/api-server/src/server/utils/date-utils.js +++ b/api-server/src/server/utils/date-utils.js @@ -3,14 +3,8 @@ import moment from 'moment-timezone'; // day count between two epochs (inclusive) export function dayCount([head, tail], timezone = 'UTC') { return Math.ceil( - moment( - moment(head) - .tz(timezone) - .endOf('day') - ).diff( - moment(tail) - .tz(timezone) - .startOf('day'), + moment(moment(head).tz(timezone).endOf('day')).diff( + moment(tail).tz(timezone).startOf('day'), 'days', true ) diff --git a/api-server/src/server/utils/donation.js b/api-server/src/server/utils/donation.js index fb31254483..8928134935 100644 --- a/api-server/src/server/utils/donation.js +++ b/api-server/src/server/utils/donation.js @@ -28,7 +28,7 @@ export async function getAsyncPaypalToken() { } export function capitalizeKeys(object) { - Object.keys(object).forEach(function(key) { + Object.keys(object).forEach(function (key) { object[key.toUpperCase()] = object[key]; }); } diff --git a/api-server/src/server/utils/getDynamicPropsForUser.js b/api-server/src/server/utils/getDynamicPropsForUser.js index c292d16d53..e4700f438f 100644 --- a/api-server/src/server/utils/getDynamicPropsForUser.js +++ b/api-server/src/server/utils/getDynamicPropsForUser.js @@ -30,7 +30,7 @@ export default function populateUser(db, user) { { $match: { _id: user.id } }, { $project: { points: { $size: '$progressTimestamps' } } } ]) - .get(function(err, [{ points = 1 } = {}]) { + .get(function (err, [{ points = 1 } = {}]) { if (err) { return reject(err); } diff --git a/api-server/src/server/utils/middleware.js b/api-server/src/server/utils/middleware.js index 883b6e82c6..482f079abe 100644 --- a/api-server/src/server/utils/middleware.js +++ b/api-server/src/server/utils/middleware.js @@ -10,7 +10,7 @@ import { import { getRedirectParams } from './redirection'; export function ifNoUserRedirectHome(message, type = 'errors') { - return function(req, res, next) { + return function (req, res, next) { const { path } = req; if (req.user) { return next(); @@ -24,7 +24,7 @@ export function ifNoUserRedirectHome(message, type = 'errors') { } export function ifNoUserSend(sendThis) { - return function(req, res, next) { + return function (req, res, next) { if (req.user) { return next(); } diff --git a/api-server/src/server/utils/rx.js b/api-server/src/server/utils/rx.js index 2a5c7cade8..331a18f728 100644 --- a/api-server/src/server/utils/rx.js +++ b/api-server/src/server/utils/rx.js @@ -5,13 +5,13 @@ import debugFactory from 'debug'; const debug = debugFactory('fcc:rxUtils'); export function saveInstance(instance) { - return new Rx.Observable.create(function(observer) { + return new Rx.Observable.create(function (observer) { if (!instance || typeof instance.save !== 'function') { debug('no instance or save method'); observer.onNext(); return observer.onCompleted(); } - return instance.save(function(err, savedInstance) { + return instance.save(function (err, savedInstance) { if (err) { return observer.onError(err); } @@ -49,9 +49,7 @@ export function timeCache(time, unit) { // set new expire time in MS and create new subscription to source if (!expireCacheAt || expireCacheAt < Date.now()) { // set expire in ms; - expireCacheAt = moment() - .add(time, unit) - .valueOf(); + expireCacheAt = moment().add(time, unit).valueOf(); cache = new AsyncSubject(); source.subscribe(cache); } diff --git a/api-server/src/server/utils/user-stats.js b/api-server/src/server/utils/user-stats.js index 9880d73bc5..9e154af5a6 100644 --- a/api-server/src/server/utils/user-stats.js +++ b/api-server/src/server/utils/user-stats.js @@ -25,36 +25,23 @@ export function prepUniqueDaysByHours(cals, tz = 'UTC') { data.push(cur); prev = cur; } else if ( - moment(cur) - .tz(tz) - .diff( - moment(prev) - .tz(tz) - .startOf('day'), - 'hours' - ) >= hoursDay + moment(cur).tz(tz).diff(moment(prev).tz(tz).startOf('day'), 'hours') >= + hoursDay ) { data.push(cur); prev = cur; } }, []), sortBy(e => e), - map(ts => - moment(ts) - .tz(tz) - .startOf('hours') - .valueOf() - ) + map(ts => moment(ts).tz(tz).startOf('hours').valueOf()) )(cals); } export function calcCurrentStreak(cals, tz = 'UTC') { let prev = last(cals); if ( - moment() - .tz(tz) - .startOf('day') - .diff(moment(prev).tz(tz), 'hours') > hoursBetween + moment().tz(tz).startOf('day').diff(moment(prev).tz(tz), 'hours') > + hoursBetween ) { return 0; } @@ -62,10 +49,8 @@ export function calcCurrentStreak(cals, tz = 'UTC') { let streakContinues = true; forEachRight(cur => { if ( - moment(prev) - .tz(tz) - .startOf('day') - .diff(moment(cur).tz(tz), 'hours') <= hoursBetween + moment(prev).tz(tz).startOf('day').diff(moment(cur).tz(tz), 'hours') <= + hoursBetween ) { prev = cur; currentStreak++; @@ -86,10 +71,8 @@ export function calcLongestStreak(cals, tz = 'UTC') { const last = cals[index === 0 ? 0 : index - 1]; // is streak broken if ( - moment(head) - .tz(tz) - .startOf('day') - .diff(moment(last).tz(tz), 'hours') > hoursBetween + moment(head).tz(tz).startOf('day').diff(moment(last).tz(tz), 'hours') > + hoursBetween ) { tail = head; } diff --git a/api-server/src/server/utils/user-stats.test.js b/api-server/src/server/utils/user-stats.test.js index 8eb488f705..fd48f4a482 100644 --- a/api-server/src/server/utils/user-stats.test.js +++ b/api-server/src/server/utils/user-stats.test.js @@ -78,7 +78,7 @@ describe('user stats', () => { ); }); - describe('calcCurrentStreak', function() { + describe('calcCurrentStreak', function () { it('should return 1 day when today one challenge was completed', () => { expect( calcCurrentStreak( @@ -291,7 +291,7 @@ describe('user stats', () => { ); }); - describe('calcLongestStreak', function() { + describe('calcLongestStreak', function () { it( 'should return 1 when there is the only one one-day-long ' + 'streak available', diff --git a/client/plugins/fcc-source-challenges/create-challenge-nodes.js b/client/plugins/fcc-source-challenges/create-challenge-nodes.js index e1896062e1..e3d6f9c353 100644 --- a/client/plugins/fcc-source-challenges/create-challenge-nodes.js +++ b/client/plugins/fcc-source-challenges/create-challenge-nodes.js @@ -11,7 +11,8 @@ function createChallengeNode(challenge, reporter) { // sections. if ( typeof challenge.description !== 'string' && - (challenge.challengeType !== 11 && challenge.challengeType !== 7) + challenge.challengeType !== 11 && + challenge.challengeType !== 7 ) { reporter.warn(` diff --git a/client/src/client-only-routes/ShowCertification.js b/client/src/client-only-routes/ShowCertification.js index baaca243ea..9fd5b75b5a 100644 --- a/client/src/client-only-routes/ShowCertification.js +++ b/client/src/client-only-routes/ShowCertification.js @@ -298,8 +298,9 @@ const ShowCertification = props => { bsSize='lg' bsStyle='primary' target='_blank' - href={`https://www.linkedin.com/profile/add?startTask=CERTIFICATION_NAME&name=${certTitle}&organizationId=4831032&issueYear=${certYear}&issueMonth=${certMonth + - 1}&certUrl=${certURL}`} + href={`https://www.linkedin.com/profile/add?startTask=CERTIFICATION_NAME&name=${certTitle}&organizationId=4831032&issueYear=${certYear}&issueMonth=${ + certMonth + 1 + }&certUrl=${certURL}`} > {t('profile.add-linkedin')} @@ -399,7 +400,4 @@ const ShowCertification = props => { ShowCertification.displayName = 'ShowCertification'; ShowCertification.propTypes = propTypes; -export default connect( - mapStateToProps, - mapDispatchToProps -)(ShowCertification); +export default connect(mapStateToProps, mapDispatchToProps)(ShowCertification); diff --git a/client/src/client-only-routes/ShowSettings.js b/client/src/client-only-routes/ShowSettings.js index 785d2cf824..b47d030e4d 100644 --- a/client/src/client-only-routes/ShowSettings.js +++ b/client/src/client-only-routes/ShowSettings.js @@ -211,7 +211,4 @@ export function ShowSettings(props) { ShowSettings.displayName = 'ShowSettings'; ShowSettings.propTypes = propTypes; -export default connect( - mapStateToProps, - mapDispatchToProps -)(ShowSettings); +export default connect(mapStateToProps, mapDispatchToProps)(ShowSettings); diff --git a/client/src/client-only-routes/ShowUser.js b/client/src/client-only-routes/ShowUser.js index e04745388a..e347647d62 100644 --- a/client/src/client-only-routes/ShowUser.js +++ b/client/src/client-only-routes/ShowUser.js @@ -155,8 +155,5 @@ ShowUser.displayName = 'ShowUser'; ShowUser.propTypes = propTypes; export default withTranslation()( - connect( - mapStateToProps, - mapDispatchToProps - )(ShowUser) + connect(mapStateToProps, mapDispatchToProps)(ShowUser) ); diff --git a/client/src/client/frame-runner.js b/client/src/client/frame-runner.js index e022770b5d..15db3773ea 100644 --- a/client/src/client/frame-runner.js +++ b/client/src/client/frame-runner.js @@ -33,7 +33,7 @@ async function initTestFrame(e = { code: {} }) { // Hardcode Deep Freeze dependency const DeepFreeze = o => { Object.freeze(o); - Object.getOwnPropertyNames(o).forEach(function(prop) { + Object.getOwnPropertyNames(o).forEach(function (prop) { if ( o.hasOwnProperty(prop) && o[prop] !== null && diff --git a/client/src/client/workers/sass-compile.js b/client/src/client/workers/sass-compile.js index 701c039d76..c20cb38895 100644 --- a/client/src/client/workers/sass-compile.js +++ b/client/src/client/workers/sass-compile.js @@ -2,7 +2,7 @@ // https://github.com/medialize/sass.js/issues/96#issuecomment-424386171 if (!self.crypto) { self.crypto = { - getRandomValues: function(array) { + getRandomValues: function (array) { for (var i = 0, l = array.length; i < l; i++) { array[i] = Math.floor(Math.random() * 256); } diff --git a/client/src/components/AppMountNotifier.js b/client/src/components/AppMountNotifier.js index af32321c71..60407d072f 100644 --- a/client/src/components/AppMountNotifier.js +++ b/client/src/components/AppMountNotifier.js @@ -24,7 +24,4 @@ AppMountNotifier.propTypes = { render: PropTypes.func.isRequired }; -export default connect( - mapStateToProps, - mapDispatchToProps -)(AppMountNotifier); +export default connect(mapStateToProps, mapDispatchToProps)(AppMountNotifier); diff --git a/client/src/components/Donation/DonationModal.js b/client/src/components/Donation/DonationModal.js index 17f675708d..909c26fd87 100644 --- a/client/src/components/Donation/DonationModal.js +++ b/client/src/components/Donation/DonationModal.js @@ -163,7 +163,4 @@ function DonateModal({ DonateModal.displayName = 'DonateModal'; DonateModal.propTypes = propTypes; -export default connect( - mapStateToProps, - mapDispatchToProps -)(DonateModal); +export default connect(mapStateToProps, mapDispatchToProps)(DonateModal); diff --git a/client/src/components/Header/Header.test.js b/client/src/components/Header/Header.test.js index fb6ce97f0c..74d720b9e7 100644 --- a/client/src/components/Header/Header.test.js +++ b/client/src/components/Header/Header.test.js @@ -13,7 +13,7 @@ describe('', () => { displayMenu: false, menuButtonRef: {}, searchBarRef: {}, - toggleDisplayMenu: function() {}, + toggleDisplayMenu: function () {}, pathName: '/', fetchState: { pending: false diff --git a/client/src/components/Header/components/Login.js b/client/src/components/Header/components/Login.js index 7d055d9680..4357385a49 100644 --- a/client/src/components/Header/components/Login.js +++ b/client/src/components/Header/components/Login.js @@ -10,12 +10,9 @@ import { apiLocation, homeLocation } from '../../../../../config/env.json'; import './login.css'; -const mapStateToProps = createSelector( - isSignedInSelector, - isSignedIn => ({ - isSignedIn - }) -); +const mapStateToProps = createSelector(isSignedInSelector, isSignedIn => ({ + isSignedIn +})); function Login(props) { const { t } = useTranslation(); diff --git a/client/src/components/Header/components/NavLinks.js b/client/src/components/Header/components/NavLinks.js index 47efd8966a..2676aefee0 100644 --- a/client/src/components/Header/components/NavLinks.js +++ b/client/src/components/Header/components/NavLinks.js @@ -207,7 +207,4 @@ export class NavLinks extends Component { NavLinks.propTypes = propTypes; NavLinks.displayName = 'NavLinks'; -export default connect( - null, - mapDispatchToProps -)(withTranslation()(NavLinks)); +export default connect(null, mapDispatchToProps)(withTranslation()(NavLinks)); diff --git a/client/src/components/OfflineWarning/OfflineWarning.js b/client/src/components/OfflineWarning/OfflineWarning.js index a75df1610d..237e319b4b 100644 --- a/client/src/components/OfflineWarning/OfflineWarning.js +++ b/client/src/components/OfflineWarning/OfflineWarning.js @@ -22,7 +22,7 @@ function OfflineWarning({ isOnline, isSignedIn }) { } function timeout() { - id = setTimeout(function() { + id = setTimeout(function () { setShowWarning(true); }, delayInMilliSeconds); } diff --git a/client/src/components/createLanguageRedirect.js b/client/src/components/createLanguageRedirect.js index 94c5088063..4f2ccfe981 100644 --- a/client/src/components/createLanguageRedirect.js +++ b/client/src/components/createLanguageRedirect.js @@ -7,10 +7,7 @@ const createLanguageRedirect = ({ clientLocale, lang }) => { .filter(item => (item !== clientLocale && item !== lang ? item : '')) .join('/'); - const hostTail = window?.location?.host - .split('.') - .slice(1) - .join('.'); + const hostTail = window?.location?.host.split('.').slice(1).join('.'); const nextClient = lang !== 'chinese' ? 'www' : 'chinese'; const nextLocation = `${window?.location?.protocol}//${nextClient}.${hostTail}`; diff --git a/client/src/components/layouts/Certification.js b/client/src/components/layouts/Certification.js index 1bb2702b80..5b31a4457d 100644 --- a/client/src/components/layouts/Certification.js +++ b/client/src/components/layouts/Certification.js @@ -6,12 +6,9 @@ import { fetchUser, isSignedInSelector, executeGA } from '../../redux'; import { createSelector } from 'reselect'; import Helmet from 'react-helmet'; -const mapStateToProps = createSelector( - isSignedInSelector, - isSignedIn => ({ - isSignedIn - }) -); +const mapStateToProps = createSelector(isSignedInSelector, isSignedIn => ({ + isSignedIn +})); const mapDispatchToProps = { fetchUser, executeGA }; diff --git a/client/src/components/layouts/Learn.js b/client/src/components/layouts/Learn.js index 96b3e2d441..827826b05b 100644 --- a/client/src/components/layouts/Learn.js +++ b/client/src/components/layouts/Learn.js @@ -90,7 +90,4 @@ LearnLayout.propTypes = { }) }; -export default connect( - mapStateToProps, - mapDispatchToProps -)(LearnLayout); +export default connect(mapStateToProps, mapDispatchToProps)(LearnLayout); diff --git a/client/src/components/profile/components/TimeLine.js b/client/src/components/profile/components/TimeLine.js index 1b49baab5c..e0817762fb 100644 --- a/client/src/components/profile/components/TimeLine.js +++ b/client/src/components/profile/components/TimeLine.js @@ -336,9 +336,17 @@ function useIdToNameMap() { certPath: getPathFromID(id) }); } - edges.forEach(({ node: { id, title, fields: { slug } } }) => { - idToNameMap.set(id, { challengeTitle: title, challengePath: slug }); - }); + edges.forEach( + ({ + node: { + id, + title, + fields: { slug } + } + }) => { + idToNameMap.set(id, { challengeTitle: title, challengePath: slug }); + } + ); return idToNameMap; } diff --git a/client/src/components/settings/Certification.js b/client/src/components/settings/Certification.js index 994d12f15b..e1f2bf57c5 100644 --- a/client/src/components/settings/Certification.js +++ b/client/src/components/settings/Certification.js @@ -386,9 +386,7 @@ export class CertificationSettings extends Component { newChallengeFound = true; } - const valuesSaved = values(formChalObj) - .filter(Boolean) - .filter(isString); + const valuesSaved = values(formChalObj).filter(Boolean).filter(isString); const isProjectSectionComplete = valuesSaved.length === oldSubmissions; @@ -409,7 +407,7 @@ export class CertificationSettings extends Component { const initialObject = {}; let filledforms = 0; legacyProjectMap[certName].forEach(project => { - let completedProject = find(completedChallenges, function(challenge) { + let completedProject = find(completedChallenges, function (challenge) { return challenge['id'] === project['id']; }); if (!completedProject) { diff --git a/client/src/components/settings/Privacy.js b/client/src/components/settings/Privacy.js index f728a2d451..b0f1d745c2 100644 --- a/client/src/components/settings/Privacy.js +++ b/client/src/components/settings/Privacy.js @@ -14,12 +14,9 @@ import Spacer from '../helpers/Spacer'; import ToggleSetting from './ToggleSetting'; import SectionHeader from './SectionHeader'; -const mapStateToProps = createSelector( - userSelector, - user => ({ - user - }) -); +const mapStateToProps = createSelector(userSelector, user => ({ + user +})); const mapDispatchToProps = dispatch => bindActionCreators({ submitProfileUI }, dispatch); diff --git a/client/src/pages/search.js b/client/src/pages/search.js index 71a14f5137..7bc32ed72c 100644 --- a/client/src/pages/search.js +++ b/client/src/pages/search.js @@ -45,7 +45,4 @@ class SearchPage extends Component { SearchPage.displayName = 'SearchPage'; SearchPage.propTypes = propTypes; -export default connect( - null, - mapDispatchToProps -)(withTranslation()(SearchPage)); +export default connect(null, mapDispatchToProps)(withTranslation()(SearchPage)); diff --git a/client/src/templates/Challenges/classic/Editor.js b/client/src/templates/Challenges/classic/Editor.js index 60fca21d6a..2bcbe75c3c 100644 --- a/client/src/templates/Challenges/classic/Editor.js +++ b/client/src/templates/Challenges/classic/Editor.js @@ -971,9 +971,6 @@ Editor.propTypes = propTypes; // NOTE: withRef gets replaced by forwardRef in react-redux 6, // https://github.com/reduxjs/react-redux/releases/tag/v6.0.0 -export default connect( - mapStateToProps, - mapDispatchToProps, - null, - { withRef: true } -)(Editor); +export default connect(mapStateToProps, mapDispatchToProps, null, { + withRef: true +})(Editor); diff --git a/client/src/templates/Challenges/classic/EditorTabs.js b/client/src/templates/Challenges/classic/EditorTabs.js index 73b942d242..112b4bb6e2 100644 --- a/client/src/templates/Challenges/classic/EditorTabs.js +++ b/client/src/templates/Challenges/classic/EditorTabs.js @@ -86,7 +86,4 @@ class EditorTabs extends Component { EditorTabs.displayName = 'EditorTabs'; EditorTabs.propTypes = propTypes; -export default connect( - mapStateToProps, - mapDispatchToProps -)(EditorTabs); +export default connect(mapStateToProps, mapDispatchToProps)(EditorTabs); diff --git a/client/src/templates/Challenges/classic/MobileLayout.js b/client/src/templates/Challenges/classic/MobileLayout.js index 1bdb7d2c42..7fcf69619b 100644 --- a/client/src/templates/Challenges/classic/MobileLayout.js +++ b/client/src/templates/Challenges/classic/MobileLayout.js @@ -101,7 +101,4 @@ class MobileLayout extends Component { MobileLayout.displayName = 'MobileLayout'; MobileLayout.propTypes = propTypes; -export default connect( - mapStateToProps, - mapDispatchToProps -)(MobileLayout); +export default connect(mapStateToProps, mapDispatchToProps)(MobileLayout); diff --git a/client/src/templates/Challenges/classic/MultifileEditor.js b/client/src/templates/Challenges/classic/MultifileEditor.js index 24d4ca77bf..648afcfe67 100644 --- a/client/src/templates/Challenges/classic/MultifileEditor.js +++ b/client/src/templates/Challenges/classic/MultifileEditor.js @@ -274,9 +274,6 @@ MultifileEditor.propTypes = propTypes; // NOTE: withRef gets replaced by forwardRef in react-redux 6, // https://github.com/reduxjs/react-redux/releases/tag/v6.0.0 -export default connect( - mapStateToProps, - mapDispatchToProps, - null, - { withRef: true } -)(MultifileEditor); +export default connect(mapStateToProps, mapDispatchToProps, null, { + withRef: true +})(MultifileEditor); diff --git a/client/src/templates/Challenges/components/CompletionModal.js b/client/src/templates/Challenges/components/CompletionModal.js index 717f93b1f0..7fbfd5a543 100644 --- a/client/src/templates/Challenges/components/CompletionModal.js +++ b/client/src/templates/Challenges/components/CompletionModal.js @@ -54,7 +54,7 @@ const mapStateToProps = createSelector( }) ); -const mapDispatchToProps = function(dispatch) { +const mapDispatchToProps = function (dispatch) { const dispatchers = { close: () => dispatch(closeModal('completion')), submitChallenge: () => { diff --git a/client/src/templates/Challenges/components/Hotkeys.js b/client/src/templates/Challenges/components/Hotkeys.js index 1e93ac5433..02b135f76a 100644 --- a/client/src/templates/Challenges/components/Hotkeys.js +++ b/client/src/templates/Challenges/components/Hotkeys.js @@ -90,7 +90,4 @@ function Hotkeys({ Hotkeys.displayName = 'Hotkeys'; Hotkeys.propTypes = propTypes; -export default connect( - mapStateToProps, - mapDispatchToProps -)(Hotkeys); +export default connect(mapStateToProps, mapDispatchToProps)(Hotkeys); diff --git a/client/src/templates/Challenges/components/Preview.js b/client/src/templates/Challenges/components/Preview.js index 3586e5c9a8..869e4aa0bc 100644 --- a/client/src/templates/Challenges/components/Preview.js +++ b/client/src/templates/Challenges/components/Preview.js @@ -63,7 +63,4 @@ class Preview extends Component { Preview.displayName = 'Preview'; Preview.propTypes = propTypes; -export default connect( - null, - mapDispatchToProps -)(withTranslation()(Preview)); +export default connect(null, mapDispatchToProps)(withTranslation()(Preview)); diff --git a/client/src/templates/Challenges/components/ResetModal.js b/client/src/templates/Challenges/components/ResetModal.js index d321b7cda2..ea8b42454a 100644 --- a/client/src/templates/Challenges/components/ResetModal.js +++ b/client/src/templates/Challenges/components/ResetModal.js @@ -18,12 +18,9 @@ const propTypes = { reset: PropTypes.func.isRequired }; -const mapStateToProps = createSelector( - isResetModalOpenSelector, - isOpen => ({ - isOpen - }) -); +const mapStateToProps = createSelector(isResetModalOpenSelector, isOpen => ({ + isOpen +})); const mapDispatchToProps = dispatch => bindActionCreators( @@ -80,7 +77,4 @@ function ResetModal({ reset, close, isOpen }) { ResetModal.displayName = 'ResetModal'; ResetModal.propTypes = propTypes; -export default connect( - mapStateToProps, - mapDispatchToProps -)(ResetModal); +export default connect(mapStateToProps, mapDispatchToProps)(ResetModal); diff --git a/client/src/templates/Challenges/components/Side-Panel.js b/client/src/templates/Challenges/components/Side-Panel.js index abdeb5c0cb..f28b151e76 100644 --- a/client/src/templates/Challenges/components/Side-Panel.js +++ b/client/src/templates/Challenges/components/Side-Panel.js @@ -47,7 +47,10 @@ export class SidePanel extends Component { // users navigate from another challenge MathJax.Hub.Config({ tex2jax: { - inlineMath: [['$', '$'], ['\\(', '\\)']], + inlineMath: [ + ['$', '$'], + ['\\(', '\\)'] + ], processEscapes: true, processClass: 'rosetta-code|project-euler' } diff --git a/client/src/templates/Challenges/components/Tool-Panel.js b/client/src/templates/Challenges/components/Tool-Panel.js index f1988edbec..02cb98664e 100644 --- a/client/src/templates/Challenges/components/Tool-Panel.js +++ b/client/src/templates/Challenges/components/Tool-Panel.js @@ -105,7 +105,4 @@ function ToolPanel({ ToolPanel.displayName = 'ToolPanel'; ToolPanel.propTypes = propTypes; -export default connect( - mapStateToProps, - mapDispatchToProps -)(ToolPanel); +export default connect(mapStateToProps, mapDispatchToProps)(ToolPanel); diff --git a/client/src/templates/Challenges/rechallenge/builders.js b/client/src/templates/Challenges/rechallenge/builders.js index a419b48f38..180644b7b5 100644 --- a/client/src/templates/Challenges/rechallenge/builders.js +++ b/client/src/templates/Challenges/rechallenge/builders.js @@ -43,11 +43,7 @@ const padContentWithCssCatch = partial(compileHeadTail, cssCatch); export const jsToHtml = cond([ [ matchesProperty('ext', 'js'), - flow( - padContentWithJsCatch, - wrapInScript, - setExtToHTML - ) + flow(padContentWithJsCatch, wrapInScript, setExtToHTML) ], [stubTrue, identity] ]); @@ -55,11 +51,7 @@ export const jsToHtml = cond([ export const cssToHtml = cond([ [ matchesProperty('ext', 'css'), - flow( - padContentWithCssCatch, - wrapInStyle, - setExtToHTML - ) + flow(padContentWithCssCatch, wrapInStyle, setExtToHTML) ], [stubTrue, identity] ]); diff --git a/client/src/templates/Challenges/rechallenge/throwers.js b/client/src/templates/Challenges/rechallenge/throwers.js index 70e3c5affd..80e862ee07 100644 --- a/client/src/templates/Challenges/rechallenge/throwers.js +++ b/client/src/templates/Challenges/rechallenge/throwers.js @@ -29,7 +29,7 @@ const nestedJQCallReg = /\$\s*?\(\s*?\$\s*?\)/gi; const throwIfNestedJquery = cond([ [ testHTMLJS, - function({ contents }) { + function ({ contents }) { if (nestedJQCallReg.test(contents)) { throw new SyntaxError('Nested jQuery calls breaks browsers'); } @@ -44,7 +44,7 @@ const functionCallReg = /function\s*?\(|function\s+\w+\s*?\(/gi; const ThrowIfUnfinishedFunction = cond([ [ testHTMLJS, - function({ contents }) { + function ({ contents }) { if (functionReg.test(contents) && !functionCallReg.test(contents)) { throw new SyntaxError('Unsafe or unfinished function declaration'); } @@ -58,7 +58,7 @@ const unsafeConsoleCallReg = /if\s\(null\)\sconsole\.log\(1\);/gi; const throwIfUnsafeConsoleCall = cond([ [ testHTMLJS, - function({ contents }) { + function ({ contents }) { if (unsafeConsoleCallReg.test(contents)) { throw new SyntaxError( '`if (null) console.log(1)` detected. This will break tests' @@ -74,7 +74,7 @@ const goMixReg = /glitch\.(com|me)/gi; const throwIfGomixDetected = cond([ [ testHTMLJS, - function({ contents }) { + function ({ contents }) { if (goMixReg.test(contents)) { throw new Error('Glitch.com or Glitch.me should not be in the code'); } diff --git a/client/src/templates/Challenges/rechallenge/transformers.js b/client/src/templates/Challenges/rechallenge/transformers.js index 174f33f79b..96a87cb336 100644 --- a/client/src/templates/Challenges/rechallenge/transformers.js +++ b/client/src/templates/Challenges/rechallenge/transformers.js @@ -199,7 +199,7 @@ async function transformScript(element) { }); } -const transformHtml = async function(file) { +const transformHtml = async function (file) { const div = document.createElement('div'); div.innerHTML = file.contents; await Promise.all([transformSASS(div), transformScript(div)]); diff --git a/client/src/templates/Challenges/redux/code-lock-epic.js b/client/src/templates/Challenges/redux/code-lock-epic.js index 1140aa3ed9..e9a2e4b362 100644 --- a/client/src/templates/Challenges/redux/code-lock-epic.js +++ b/client/src/templates/Challenges/redux/code-lock-epic.js @@ -3,10 +3,7 @@ import { ofType } from 'redux-observable'; import { types, unlockCode } from './'; function codeLockEpic(action$) { - return action$.pipe( - ofType(types.updateFile), - map(unlockCode) - ); + return action$.pipe(ofType(types.updateFile), map(unlockCode)); } export default codeLockEpic; diff --git a/client/src/templates/Challenges/redux/create-question-epic.js b/client/src/templates/Challenges/redux/create-question-epic.js index 07b1e120ad..1f5159e28b 100644 --- a/client/src/templates/Challenges/redux/create-question-epic.js +++ b/client/src/templates/Challenges/redux/create-question-epic.js @@ -58,9 +58,11 @@ function createQuestionEpic(action$, state$, { window }) { ? `**Your project link(s)**\n` : `**Your code so far**` } - ${projectFormValues - ?.map(([key, val]) => `${key}: ${val}\n`) - ?.join('') || filesToMarkdown(files)} + ${ + projectFormValues + ?.map(([key, val]) => `${key}: ${val}\n`) + ?.join('') || filesToMarkdown(files) + } ${endingText}` ); diff --git a/client/src/templates/Challenges/redux/execute-challenge-saga.js b/client/src/templates/Challenges/redux/execute-challenge-saga.js index 622fbc56b9..5a5ac86044 100644 --- a/client/src/templates/Challenges/redux/execute-challenge-saga.js +++ b/client/src/templates/Challenges/redux/execute-challenge-saga.js @@ -74,9 +74,9 @@ export function* executeChallengeSaga({ yield put(initLogs()); yield put(initConsole(i18next.t('learn.running-tests'))); // reset tests to initial state - const tests = (yield select(challengeTestsSelector)).map( - ({ text, testString }) => ({ text, testString }) - ); + const tests = (yield select( + challengeTestsSelector + )).map(({ text, testString }) => ({ text, testString })); yield put(updateTests(tests)); yield fork(takeEveryLog, consoleProxy); @@ -116,7 +116,7 @@ export function* executeChallengeSaga({ function* takeEveryLog(channel) { // TODO: move all stringifying and escaping into the reducer so there is a // single place responsible for formatting the logs. - yield takeEvery(channel, function*(args) { + yield takeEvery(channel, function* (args) { yield put(updateLogs(escape(args))); }); } @@ -124,7 +124,7 @@ function* takeEveryLog(channel) { function* takeEveryConsole(channel) { // TODO: move all stringifying and escaping into the reducer so there is a // single place responsible for formatting the console output. - yield takeEvery(channel, function*(args) { + yield takeEvery(channel, function* (args) { yield put(updateConsole(escape(args))); }); } diff --git a/client/src/templates/Challenges/utils/build.js b/client/src/templates/Challenges/utils/build.js index e6bb913b59..8a8eaf4228 100644 --- a/client/src/templates/Challenges/utils/build.js +++ b/client/src/templates/Challenges/utils/build.js @@ -29,7 +29,7 @@ const globalRequires = [ ]; const applyFunction = fn => - async function(file) { + async function (file) { try { if (file.error) { return file; diff --git a/client/src/templates/Challenges/utils/frame.js b/client/src/templates/Challenges/utils/frame.js index e21e5f1771..60c44be152 100644 --- a/client/src/templates/Challenges/utils/frame.js +++ b/client/src/templates/Challenges/utils/frame.js @@ -49,7 +49,7 @@ const createHeader = (id = mainId) => ` `; -export const runTestInTestFrame = async function(document, test, timeout) { +export const runTestInTestFrame = async function (document, test, timeout) { const { contentDocument: frame } = document.getElementById(testId); return await Promise.race([ new Promise((_, reject) => setTimeout(() => reject('timeout'), timeout)), @@ -115,7 +115,7 @@ const initMainFrame = (frameReady, proxyLogger) => ctx => { // Overwriting the onerror added by createHeader to catch any errors thrown // after the frame is ready. It has to be overwritten, as proxyLogger cannot // be added as part of createHeader. - ctx.window.onerror = function(msg) { + ctx.window.onerror = function (msg) { var string = msg.toLowerCase(); if (string.includes('script error')) { msg = 'Error, open your browser console to learn more.'; diff --git a/client/src/templates/Challenges/utils/worker-executor.js b/client/src/templates/Challenges/utils/worker-executor.js index c9be9d3eb9..1c55302094 100644 --- a/client/src/templates/Challenges/utils/worker-executor.js +++ b/client/src/templates/Challenges/utils/worker-executor.js @@ -65,7 +65,7 @@ class WorkerExecutor { execute(data, timeout = 1000) { const task = eventify({}); - task._execute = function(getWorker) { + task._execute = function (getWorker) { getWorker().then( worker => { task._worker = worker; diff --git a/client/src/templates/Challenges/utils/worker-executor.test.js b/client/src/templates/Challenges/utils/worker-executor.test.js index bfc5bb7a2b..0c49360d99 100644 --- a/client/src/templates/Challenges/utils/worker-executor.test.js +++ b/client/src/templates/Challenges/utils/worker-executor.test.js @@ -3,7 +3,7 @@ import createWorker from './worker-executor'; function mockWorker({ init, postMessage, terminate } = {}) { - global.Worker = jest.fn(function() { + global.Worker = jest.fn(function () { setImmediate( (init && init(this)) || (() => @@ -12,7 +12,7 @@ function mockWorker({ init, postMessage, terminate } = {}) { this.onmessage = null; this.postMessage = postMessage || - function(data) { + function (data) { setImmediate( () => this.onmessage && this.onmessage({ data: `${data} processed` }) ); @@ -169,7 +169,7 @@ it('Worker executor should reject task', async () => { it('Worker executor should emit LOG events', async () => { mockWorker({ - postMessage: function(data) { + postMessage: function (data) { setImmediate(() => { for (let i = 0; i < 3; i++) { // eslint-disable-next-line no-unused-expressions diff --git a/client/src/templates/Introduction/components/CertChallenge.js b/client/src/templates/Introduction/components/CertChallenge.js index 341192adc2..180c79d5e8 100644 --- a/client/src/templates/Introduction/components/CertChallenge.js +++ b/client/src/templates/Introduction/components/CertChallenge.js @@ -18,12 +18,9 @@ const propTypes = { }; const mapStateToProps = state => { - return createSelector( - userSelector, - user => ({ - user - }) - )(state); + return createSelector(userSelector, user => ({ + user + }))(state); }; export class CertChallenge extends Component { diff --git a/client/src/templates/Introduction/components/Challenges.js b/client/src/templates/Introduction/components/Challenges.js index a97914efee..d182794fa6 100644 --- a/client/src/templates/Introduction/components/Challenges.js +++ b/client/src/templates/Introduction/components/Challenges.js @@ -11,12 +11,9 @@ import GreenPass from '../../../assets/icons/GreenPass'; import GreenNotCompleted from '../../../assets/icons/GreenNotCompleted'; const mapStateToProps = state => { - return createSelector( - completedChallengesSelector, - completedChallenges => ({ - completedChallenges: completedChallenges.map(({ id }) => id) - }) - )(state); + return createSelector(completedChallengesSelector, completedChallenges => ({ + completedChallenges: completedChallenges.map(({ id }) => id) + }))(state); }; const mapDispatchToProps = dispatch => diff --git a/client/utils/titleify.js b/client/utils/titleify.js index 21fdc22093..84516d322d 100644 --- a/client/utils/titleify.js +++ b/client/utils/titleify.js @@ -16,12 +16,7 @@ function prototyper(str) { .map(str => { if (prototypeRE.test(str)) { if (str.length > 9) { - return prototyper( - str - .trim() - .split('prototype') - .join('-prototype-') - ); + return prototyper(str.trim().split('prototype').join('-prototype-')); } return str; } @@ -39,12 +34,7 @@ function prototyper(str) { return `${titleify(first)}.prototype.${finalSecond}`; } if (noProto.length === 1) { - return prototyper( - noProto[0] - .toLowerCase() - .split('.') - .join('-') - ); + return prototyper(noProto[0].toLowerCase().split('.').join('-')); } return titleify(str, true); } diff --git a/config/donation-settings.js b/config/donation-settings.js index fd9684423b..2434c1c827 100644 --- a/config/donation-settings.js +++ b/config/donation-settings.js @@ -53,22 +53,22 @@ const donationSubscriptionConfig = { const paypalConfigTypes = { live: { month: { - '500': { planId: 'P-1L11422374370240ULZKX3PA' }, - '1000': { planId: 'P-61K21421WY874920PL6E36YI' }, - '2000': { planId: 'P-31999436LF709112VL6E374A' }, - '3000': { planId: 'P-1KY930839N8045117L6E4BKY' }, - '4000': { planId: 'P-0JW4843250567551AL6E4CAI' }, - '5000': { planId: 'P-0WR49877YD949401BL6E4CTA' } + 500: { planId: 'P-1L11422374370240ULZKX3PA' }, + 1000: { planId: 'P-61K21421WY874920PL6E36YI' }, + 2000: { planId: 'P-31999436LF709112VL6E374A' }, + 3000: { planId: 'P-1KY930839N8045117L6E4BKY' }, + 4000: { planId: 'P-0JW4843250567551AL6E4CAI' }, + 5000: { planId: 'P-0WR49877YD949401BL6E4CTA' } } }, staging: { month: { - '500': { planId: 'P-37N14480BW163382FLZYPVMA' }, - '1000': { planId: 'P-28B62039J8092810UL6E3FXA' }, - '2000': { planId: 'P-7HR706961M9170433L6HI5VI' }, - '3000': { planId: 'P-35V33574BU596924JL6HI6XY' }, - '4000': { planId: 'P-45M45060289267734L6HJSXA' }, - '5000': { planId: 'P-0MD70861FY4172444L6HJTUQ' } + 500: { planId: 'P-37N14480BW163382FLZYPVMA' }, + 1000: { planId: 'P-28B62039J8092810UL6E3FXA' }, + 2000: { planId: 'P-7HR706961M9170433L6HI5VI' }, + 3000: { planId: 'P-35V33574BU596924JL6HI6XY' }, + 4000: { planId: 'P-45M45060289267734L6HJSXA' }, + 5000: { planId: 'P-0MD70861FY4172444L6HJTUQ' } } } }; diff --git a/curriculum/schema/challengeSchema.js b/curriculum/schema/challengeSchema.js index 84566549fb..e46c87ae2f 100644 --- a/curriculum/schema/challengeSchema.js +++ b/curriculum/schema/challengeSchema.js @@ -25,10 +25,7 @@ const schema = Joi.object() block: Joi.string().regex(slugRE), blockId: Joi.objectId(), challengeOrder: Joi.number(), - challengeType: Joi.number() - .min(0) - .max(11) - .required(), + challengeType: Joi.number().min(0).max(11).required(), checksum: Joi.number(), // TODO: require this only for normal challenges, not certs dashedName: Joi.string().regex(slugRE), @@ -62,9 +59,7 @@ const schema = Joi.object() }), question: Joi.object().keys({ text: Joi.string().required(), - answers: Joi.array() - .items(Joi.string()) - .required(), + answers: Joi.array().items(Joi.string()).required(), solution: Joi.number().required() }), required: Joi.array().items( @@ -92,9 +87,7 @@ const schema = Joi.object() Joi.object().keys({ id: Joi.string().allow(''), text: Joi.string().required(), - testString: Joi.string() - .allow('') - .required() + testString: Joi.string().allow('').required() }), // our tests used in certification verification Joi.object().keys({ diff --git a/curriculum/test/test-challenges.js b/curriculum/test/test-challenges.js index 8c0cf41ee0..c1762e1c17 100644 --- a/curriculum/test/test-challenges.js +++ b/curriculum/test/test-challenges.js @@ -91,7 +91,7 @@ const dom = new jsdom.JSDOM(''); global.document = dom.window.document; const oldRunnerFail = Mocha.Runner.prototype.fail; -Mocha.Runner.prototype.fail = function(test, err) { +Mocha.Runner.prototype.fail = function (test, err) { if (err instanceof AssertionError) { const errMessage = String(err.message || ''); const assertIndex = errMessage.indexOf(': expected'); @@ -198,9 +198,9 @@ async function setup() { for (const challenge of challenges) { const dashedBlockName = challenge.block; if (!meta[dashedBlockName]) { - meta[dashedBlockName] = (await getMetaForBlock( - dashedBlockName - )).challengeOrder; + meta[dashedBlockName] = ( + await getMetaForBlock(dashedBlockName) + ).challengeOrder; } } return { @@ -221,8 +221,8 @@ function cleanup() { } function runTests(challengeData) { - describe('Check challenges', function() { - after(function() { + describe('Check challenges', function () { + after(function () { cleanup(); }); populateTestsForLang(challengeData); @@ -252,15 +252,15 @@ function populateTestsForLang({ lang, challenges, meta }) { const challengeTitles = new ChallengeTitles(); const validateChallenge = challengeSchemaValidator(); - describe(`Check challenges (${lang})`, function() { + describe(`Check challenges (${lang})`, function () { this.timeout(5000); challenges.forEach((challenge, id) => { const dashedBlockName = challenge.block; - describe(challenge.block || 'No block', function() { - describe(challenge.title || 'No title', function() { + describe(challenge.block || 'No block', function () { + describe(challenge.title || 'No title', function () { // Note: the title in meta.json are purely for human readability and // do not include translations, so we do not validate against them. - it('Matches an ID in meta.json', function() { + it('Matches an ID in meta.json', function () { const index = meta[dashedBlockName].findIndex( arr => arr[0] === challenge.id ); @@ -272,7 +272,7 @@ function populateTestsForLang({ lang, challenges, meta }) { } }); - it('Common checks', function() { + it('Common checks', function () { const result = validateChallenge(challenge); if (result.error) { @@ -374,9 +374,9 @@ function populateTestsForLang({ lang, challenges, meta }) { return; } - describe('Check tests syntax', function() { + describe('Check tests syntax', function () { tests.forEach(test => { - it(`Check for: ${test.text}`, function() { + it(`Check for: ${test.text}`, function () { assert.doesNotThrow(() => new vm.Script(test.testString)); }); }); @@ -393,7 +393,7 @@ function populateTestsForLang({ lang, challenges, meta }) { ? buildJSChallenge : buildDOMChallenge; - it('Test suite must fail on the initial contents', async function() { + it('Test suite must fail on the initial contents', async function () { this.timeout(5000 * tests.length + 1000); // suppress errors in the console. const oldConsoleError = console.error; @@ -473,9 +473,11 @@ function populateTestsForLang({ lang, challenges, meta }) { return; } - describe('Check tests against solutions', function() { + describe('Check tests against solutions', function () { solutions.forEach((solution, index) => { - it(`Solution ${index + 1} must pass the tests`, async function() { + it(`Solution ${ + index + 1 + } must pass the tests`, async function () { this.timeout(5000 * tests.length + 2000); const testRunner = await createTestRunner( challenge, diff --git a/cypress/integration/ShowCertification.js b/cypress/integration/ShowCertification.js index ad9673547a..141f4b16b3 100644 --- a/cypress/integration/ShowCertification.js +++ b/cypress/integration/ShowCertification.js @@ -1,7 +1,7 @@ /* global cy */ -describe('A certification,', function() { - describe('while viewing your own,', function() { +describe('A certification,', function () { + describe('while viewing your own,', function () { before(() => { cy.visit('/'); cy.contains("Get started (it's free)").click({ force: true }); @@ -51,7 +51,7 @@ describe('A certification,', function() { .click({ force: true }); }); - it('should render a LinkedIn button', function() { + it('should render a LinkedIn button', function () { cy.contains('Add this certification to my LinkedIn profile') .should('have.attr', 'href') .and( @@ -61,7 +61,7 @@ describe('A certification,', function() { ); }); - it('should render a Twitter button', function() { + it('should render a Twitter button', function () { cy.contains('Share this certification on Twitter').should( 'have.attr', 'href', @@ -78,20 +78,20 @@ describe('A certification,', function() { }); }); - describe("while viewing someone else's,", function() { + describe("while viewing someone else's,", function () { before(() => { cy.go('back'); cy.contains('Sign me out of freeCodeCamp').click({ force: true }); cy.visit('/certification/developmentuser/legacy-front-end'); }); - it('should not render a LinkedIn button', function() { + it('should not render a LinkedIn button', function () { cy.contains('Add this certification to my LinkedIn profile').should( 'not.exist' ); }); - it('should not render a Twitter button', function() { + it('should not render a Twitter button', function () { cy.contains('Share this certification on Twitter').should('not.exist'); }); }); diff --git a/cypress/integration/landing.js b/cypress/integration/landing.js index b36d94111b..8da2f6a863 100644 --- a/cypress/integration/landing.js +++ b/cypress/integration/landing.js @@ -43,43 +43,28 @@ describe('Landing page', () => { }); it('Has 5 brand logos', () => { - cy.get('.logo-row') - .children() - .its('length') - .should('eq', 5); + cy.get('.logo-row').children().its('length').should('eq', 5); }); it('Has `as seens as` section', () => { cy.contains('Build projects.').should('be.visible'); - cy.get('.big-heading') - .siblings() - .get('svg'); + cy.get('.big-heading').siblings().get('svg'); }); - it('Has a visible large image on large viewports', function() { - cy.viewport(1200, 660) - .get(selectors.landingPageImage) - .should('be.visible'); + it('Has a visible large image on large viewports', function () { + cy.viewport(1200, 660).get(selectors.landingPageImage).should('be.visible'); - cy.viewport(1199, 660) - .get(selectors.landingPageImage) - .should('not.exist'); + cy.viewport(1199, 660).get(selectors.landingPageImage).should('not.exist'); }); - it('Has links to all the certifications', function() { - cy.get(selectors.certifications) - .children() - .its('length') - .should('eq', 10); + it('Has links to all the certifications', function () { + cy.get(selectors.certifications).children().its('length').should('eq', 10); cy.wrap(certifications).each(cert => { cy.get(selectors.certifications).contains(cert); }); }); - it('Has 3 testimonial cards', function() { - cy.get(selectors.testimonials) - .children() - .its('length') - .should('eq', 3); + it('Has 3 testimonial cards', function () { + cy.get(selectors.testimonials).children().its('length').should('eq', 3); }); }); diff --git a/cypress/integration/learn/challenges/backend.js b/cypress/integration/learn/challenges/backend.js index 573369dc38..abf3454cc0 100644 --- a/cypress/integration/learn/challenges/backend.js +++ b/cypress/integration/learn/challenges/backend.js @@ -15,7 +15,7 @@ const unhandledErrorMessage = 'Something is not quite right'; const runningOutput = '// running tests'; const finishedOutput = '// tests completed'; -describe('Backend challenge', function() { +describe('Backend challenge', function () { it('renders', () => { cy.visit(locations.index); diff --git a/cypress/integration/learn/challenges/output.js b/cypress/integration/learn/challenges/output.js index 12a9a9a984..27c6f6be7d 100644 --- a/cypress/integration/learn/challenges/output.js +++ b/cypress/integration/learn/challenges/output.js @@ -23,7 +23,7 @@ const defaultOutput = ` // const runningOutput = '// running tests'; // const finishedOutput = '// tests completed'; -describe('Classic challenge', function() { +describe('Classic challenge', function () { it('renders', () => { cy.visit(locations.index); diff --git a/cypress/integration/learn/common-components/navbar.js b/cypress/integration/learn/common-components/navbar.js index abc3c5854b..db3c6ad9e3 100644 --- a/cypress/integration/learn/common-components/navbar.js +++ b/cypress/integration/learn/common-components/navbar.js @@ -12,7 +12,7 @@ const selectors = { let appHasStarted; function spyOnListener(win) { const addListener = win.EventTarget.prototype.addEventListener; - win.EventTarget.prototype.addEventListener = function(name) { + win.EventTarget.prototype.addEventListener = function (name) { if (name === 'click') { appHasStarted = true; win.EventTarget.prototype.addEventListener = addListener; @@ -68,9 +68,7 @@ describe('Navbar', () => { () => { cy.get(selectors.menuButton).click(); cy.get(selectors.navigationLinks).contains('Forum'); - cy.get(selectors.navigationLinks) - .contains('Curriculum') - .click(); + cy.get(selectors.navigationLinks).contains('Curriculum').click(); cy.url().should('include', '/learn'); cy.get(selectors.navigationLinks).contains('Curriculum'); cy.get(selectors.navigationLinks).contains('Forum'); @@ -84,9 +82,7 @@ describe('Navbar', () => { () => { cy.contains(selectors.smallCallToAction, 'Sign in'); cy.get(selectors.menuButton).click(); - cy.get(selectors.navigationLinks) - .contains('Curriculum') - .click(); + cy.get(selectors.navigationLinks).contains('Curriculum').click(); cy.contains(selectors.smallCallToAction, 'Sign in'); } ); @@ -95,9 +91,7 @@ describe('Navbar', () => { cy.login(); cy.get('a[href*="/settings"]').should('be.visible'); cy.get(selectors.menuButton).click(); - cy.get(selectors.navigationLinks) - .contains('Profile') - .click(); + cy.get(selectors.navigationLinks).contains('Profile').click(); cy.url().should('include', '/developmentuser'); }); diff --git a/cypress/integration/learn/common-components/searchBar.js b/cypress/integration/learn/common-components/searchBar.js index 6d6f110674..a66d4260ec 100644 --- a/cypress/integration/learn/common-components/searchBar.js +++ b/cypress/integration/learn/common-components/searchBar.js @@ -30,17 +30,13 @@ describe('Search bar', () => { it('Should accept input and display hits', () => { search('freeCodeCamp'); - cy.get('.ais-Hits-list') - .children() - .should('to.have.length.of.at.least', 1); + cy.get('.ais-Hits-list').children().should('to.have.length.of.at.least', 1); }); it('Should clear hits when input is cleared', () => { search('freeCodeCamp'); - cy.get('.ais-Hits-list') - .children() - .should('to.have.length.of.at.least', 1); + cy.get('.ais-Hits-list').children().should('to.have.length.of.at.least', 1); clear(); @@ -52,9 +48,7 @@ describe('Search bar', () => { search('freeCodeCamp'); - cy.get('.ais-Hits-list') - .children() - .should('to.have.length.of', 8); + cy.get('.ais-Hits-list').children().should('to.have.length.of', 8); }); it('Should show up to 5 hits when height < 768px', () => { @@ -62,17 +56,13 @@ describe('Search bar', () => { search('freeCodeCamp'); - cy.get('.ais-Hits-list') - .children() - .should('to.have.length.of', 5); + cy.get('.ais-Hits-list').children().should('to.have.length.of', 5); }); it('Should show no hits for queries that do not exist in the Algolia index', () => { search('testtttt'); - cy.get('.ais-Hits-list') - .children() - .should('to.have.length.of', 0); + cy.get('.ais-Hits-list').children().should('to.have.length.of', 0); cy.contains('No tutorials found'); }); diff --git a/cypress/integration/learn/navigation-buttons/update-my-account-settings-button.js b/cypress/integration/learn/navigation-buttons/update-my-account-settings-button.js index 5056cad2f6..235d2bfd3c 100644 --- a/cypress/integration/learn/navigation-buttons/update-my-account-settings-button.js +++ b/cypress/integration/learn/navigation-buttons/update-my-account-settings-button.js @@ -1,11 +1,11 @@ /* global cy */ -describe('The `Update my account settings` button works properly', function() { +describe('The `Update my account settings` button works properly', function () { beforeEach(() => { cy.login(); }); - it('Should take user to their account settings when clicked', function() { + it('Should take user to their account settings when clicked', function () { cy.contains('Update my account settings').click(); cy.url().should('include', '/settings'); }); diff --git a/cypress/integration/learn/redirects/challenges.js b/cypress/integration/learn/redirects/challenges.js index 9cefdd456c..3148fa6820 100644 --- a/cypress/integration/learn/redirects/challenges.js +++ b/cypress/integration/learn/redirects/challenges.js @@ -13,7 +13,7 @@ const locations = { '/learn/responsive-web-design/basic-html-and-html5/say-hello-to-html-elements' }; -describe('challenges/superblock redirect', function() { +describe('challenges/superblock redirect', function () { it('redirects to learn/superblock', () => { cy.visit(locations.chalSuper); @@ -24,7 +24,7 @@ describe('challenges/superblock redirect', function() { }); }); -describe('challenges/superblock/block redirect', function() { +describe('challenges/superblock/block redirect', function () { it('redirects to learn/superblock/block', () => { cy.visit(locations.chalBlock); @@ -35,7 +35,7 @@ describe('challenges/superblock/block redirect', function() { }); }); -describe('challenges/superblock/block/challenge redirect', function() { +describe('challenges/superblock/block/challenge redirect', function () { it('redirects to learn/superblock/block/challenge', () => { cy.visit(locations.chalChallenge); diff --git a/cypress/integration/learn/responsive-web-design/basic-css/index.js b/cypress/integration/learn/responsive-web-design/basic-css/index.js index 430ae230ad..8e2910d92a 100644 --- a/cypress/integration/learn/responsive-web-design/basic-css/index.js +++ b/cypress/integration/learn/responsive-web-design/basic-css/index.js @@ -61,7 +61,7 @@ const warningMessage = 'If the tests fail, try disabling your extensions for the most reliable ' + 'experience.'; -describe('Basic Css Introduction page', function() { +describe('Basic Css Introduction page', function () { it('renders', () => { cy.visit(locations.index); diff --git a/cypress/integration/settings/username-change.js b/cypress/integration/settings/username-change.js index 92e6554ac1..b8ad6347bc 100644 --- a/cypress/integration/settings/username-change.js +++ b/cypress/integration/settings/username-change.js @@ -96,9 +96,7 @@ describe('Username input field', () => { 'the URL to your profile and your certifications.' ).should('not.exist'); - cy.get('@usernameForm') - .contains('Save') - .should('be.disabled'); + cy.get('@usernameForm').contains('Save').should('be.disabled'); }); it('Should not show anything if user types their current name', () => { @@ -106,9 +104,7 @@ describe('Username input field', () => { .clear({ force: true }) .type('developmentuser', { force: true }); - cy.get('@usernameForm') - .contains('Save') - .should('be.disabled'); + cy.get('@usernameForm').contains('Save').should('be.disabled'); }); // eslint-disable-next-line max-len @@ -117,9 +113,7 @@ describe('Username input field', () => { .clear({ force: true }) .type('developmentuser', { force: true }); - cy.get('@usernameForm') - .contains('Save') - .should('be.disabled'); + cy.get('@usernameForm').contains('Save').should('be.disabled'); }); it('Should show warning if username includes invalid character', () => { @@ -141,9 +135,7 @@ describe('Username input field', () => { .clear({ force: true }) .type('Quincy Larson', { force: true }); - cy.get('@usernameForm') - .contains('Save') - .should('be.disabled'); + cy.get('@usernameForm').contains('Save').should('be.disabled'); }); it('Should change username if `Save` button is clicked', () => { @@ -153,9 +145,7 @@ describe('Username input field', () => { cy.contains('Username is available'); - cy.get('@usernameForm') - .contains('Save') - .click({ force: true }); + cy.get('@usernameForm').contains('Save').click({ force: true }); cy.contains('Account Settings for quincy').should('be.visible'); cy.resetUsername(); diff --git a/package-lock.json b/package-lock.json index 4d4c9137ba..6806b40346 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18,8 +18,8 @@ "cypress": "^6.6.0", "debug": "^4.3.1", "docsify-cli": "^4.4.3", - "eslint": "^5.16.0", - "eslint-config-prettier": "^6.12.0", + "eslint": "^7.21.0", + "eslint-config-prettier": "^8.1.0", "eslint-plugin-babel": "^5.3.1", "eslint-plugin-import": "^2.22.1", "eslint-plugin-jsx-a11y": "^6.4.1", @@ -39,7 +39,7 @@ "markdownlint": "^0.21.0", "npm-run-all": "^4.1.5", "ora": "^3.4.0", - "prettier": "^1.18.2", + "prettier": "^2.2.1", "prismjs": "^1.23.0", "readdirp-walk": "^1.7.0", "shx": "^0.3.3", @@ -49,11 +49,12 @@ } }, "node_modules/@babel/code-frame": { - "version": "7.0.0", + "version": "7.12.11", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.11.tgz", + "integrity": "sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/highlight": "^7.0.0" + "@babel/highlight": "^7.10.4" } }, "node_modules/@babel/core": { @@ -86,34 +87,6 @@ "url": "https://opencollective.com/babel" } }, - "node_modules/@babel/core/node_modules/@babel/code-frame": { - "version": "7.10.4", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/highlight": "^7.10.4" - } - }, - "node_modules/@babel/core/node_modules/@babel/helper-validator-identifier": { - "version": "7.10.4", - "dev": true, - "license": "MIT" - }, - "node_modules/@babel/core/node_modules/@babel/highlight": { - "version": "7.10.4", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-validator-identifier": "^7.10.4", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" - } - }, - "node_modules/@babel/core/node_modules/js-tokens": { - "version": "4.0.0", - "dev": true, - "license": "MIT" - }, "node_modules/@babel/generator": { "version": "7.11.4", "dev": true, @@ -214,9 +187,10 @@ } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.9.5", - "dev": true, - "license": "MIT" + "version": "7.12.11", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.12.11.tgz", + "integrity": "sha512-np/lG3uARFybkoHokJUmf1QfEvRVCPbmQeUQpKow5cQ3xWrV9i3rUHodKDJPQfTVX61qKi+UdYk8kik84n7XOw==", + "dev": true }, "node_modules/@babel/helpers": { "version": "7.10.4", @@ -229,20 +203,16 @@ } }, "node_modules/@babel/highlight": { - "version": "7.0.0", + "version": "7.13.10", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.13.10.tgz", + "integrity": "sha512-5aPpe5XQPzflQrFwL1/QoeHkP2MsA4JCntcXHRhEsdsfPVkvPi2w7Qix4iV7t5S/oC9OodGrggd8aco1g3SZFg==", "dev": true, - "license": "MIT", "dependencies": { + "@babel/helper-validator-identifier": "^7.12.11", "chalk": "^2.0.0", - "esutils": "^2.0.2", "js-tokens": "^4.0.0" } }, - "node_modules/@babel/highlight/node_modules/js-tokens": { - "version": "4.0.0", - "dev": true, - "license": "MIT" - }, "node_modules/@babel/parser": { "version": "7.11.4", "dev": true, @@ -297,34 +267,6 @@ "@babel/types": "^7.10.4" } }, - "node_modules/@babel/template/node_modules/@babel/code-frame": { - "version": "7.10.4", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/highlight": "^7.10.4" - } - }, - "node_modules/@babel/template/node_modules/@babel/helper-validator-identifier": { - "version": "7.10.4", - "dev": true, - "license": "MIT" - }, - "node_modules/@babel/template/node_modules/@babel/highlight": { - "version": "7.10.4", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-validator-identifier": "^7.10.4", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" - } - }, - "node_modules/@babel/template/node_modules/js-tokens": { - "version": "4.0.0", - "dev": true, - "license": "MIT" - }, "node_modules/@babel/traverse": { "version": "7.11.0", "dev": true, @@ -341,34 +283,6 @@ "lodash": "^4.17.19" } }, - "node_modules/@babel/traverse/node_modules/@babel/code-frame": { - "version": "7.10.4", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/highlight": "^7.10.4" - } - }, - "node_modules/@babel/traverse/node_modules/@babel/helper-validator-identifier": { - "version": "7.10.4", - "dev": true, - "license": "MIT" - }, - "node_modules/@babel/traverse/node_modules/@babel/highlight": { - "version": "7.10.4", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-validator-identifier": "^7.10.4", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" - } - }, - "node_modules/@babel/traverse/node_modules/js-tokens": { - "version": "4.0.0", - "dev": true, - "license": "MIT" - }, "node_modules/@babel/types": { "version": "7.11.0", "dev": true, @@ -379,11 +293,6 @@ "to-fast-properties": "^2.0.0" } }, - "node_modules/@babel/types/node_modules/@babel/helper-validator-identifier": { - "version": "7.10.4", - "dev": true, - "license": "MIT" - }, "node_modules/@cnakazawa/watch": { "version": "1.0.4", "dev": true, @@ -550,6 +459,62 @@ "dev": true, "license": "MIT" }, + "node_modules/@eslint/eslintrc": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.4.0.tgz", + "integrity": "sha512-2ZPCc+uNbjV5ERJr+aKSPRwZgKd2z11x0EgLvb1PURmUrn9QNRXFqje0Ldq454PfAVyaJYyrDvvIKSFP4NnBog==", + "dev": true, + "dependencies": { + "ajv": "^6.12.4", + "debug": "^4.1.1", + "espree": "^7.3.0", + "globals": "^12.1.0", + "ignore": "^4.0.6", + "import-fresh": "^3.2.1", + "js-yaml": "^3.13.1", + "minimatch": "^3.0.4", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/@eslint/eslintrc/node_modules/globals": { + "version": "12.4.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz", + "integrity": "sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg==", + "dev": true, + "dependencies": { + "type-fest": "^0.8.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@eslint/eslintrc/node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@eslint/eslintrc/node_modules/type-fest": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/@hapi/hoek": { "version": "9.1.1", "dev": true, @@ -4530,42 +4495,6 @@ "node": ">=10" } }, - "node_modules/@testing-library/dom/node_modules/@babel/code-frame": { - "version": "7.12.11", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/highlight": "^7.10.4" - } - }, - "node_modules/@testing-library/dom/node_modules/@babel/helper-validator-identifier": { - "version": "7.12.11", - "dev": true, - "license": "MIT" - }, - "node_modules/@testing-library/dom/node_modules/@babel/highlight": { - "version": "7.10.4", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-validator-identifier": "^7.10.4", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" - } - }, - "node_modules/@testing-library/dom/node_modules/@babel/highlight/node_modules/chalk": { - "version": "2.4.2", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/@testing-library/dom/node_modules/@babel/runtime": { "version": "7.12.5", "dev": true, @@ -4677,11 +4606,6 @@ "node": ">=8" } }, - "node_modules/@testing-library/dom/node_modules/js-tokens": { - "version": "4.0.0", - "dev": true, - "license": "MIT" - }, "node_modules/@testing-library/dom/node_modules/pretty-format": { "version": "26.6.2", "dev": true, @@ -4897,11 +4821,12 @@ } }, "node_modules/acorn-jsx": { - "version": "5.0.1", + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.1.tgz", + "integrity": "sha512-K0Ptm/47OKfQRpNQ2J/oIN/3QYiK6FwW+eJbILhsdxh2WTLdl+30o8aGdTbm5JbffpFFAg/g+zi1E+jvJha5ng==", "dev": true, - "license": "MIT", "peerDependencies": { - "acorn": "^6.0.0" + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" } }, "node_modules/acorn-walk": { @@ -5835,16 +5760,6 @@ "@babel/types": "^7.8.3" } }, - "node_modules/babel-eslint/node_modules/@babel/highlight": { - "version": "7.9.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-validator-identifier": "^7.9.0", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" - } - }, "node_modules/babel-eslint/node_modules/@babel/parser": { "version": "7.9.6", "dev": true, @@ -5866,14 +5781,6 @@ "@babel/types": "^7.8.6" } }, - "node_modules/babel-eslint/node_modules/@babel/template/node_modules/@babel/code-frame": { - "version": "7.8.3", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/highlight": "^7.8.3" - } - }, "node_modules/babel-eslint/node_modules/@babel/traverse": { "version": "7.9.6", "dev": true, @@ -5890,14 +5797,6 @@ "lodash": "^4.17.13" } }, - "node_modules/babel-eslint/node_modules/@babel/traverse/node_modules/@babel/code-frame": { - "version": "7.8.3", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/highlight": "^7.8.3" - } - }, "node_modules/babel-eslint/node_modules/@babel/types": { "version": "7.9.6", "dev": true, @@ -5908,11 +5807,6 @@ "to-fast-properties": "^2.0.0" } }, - "node_modules/babel-eslint/node_modules/js-tokens": { - "version": "4.0.0", - "dev": true, - "license": "MIT" - }, "node_modules/babel-jest": { "version": "24.9.0", "dev": true, @@ -6971,11 +6865,6 @@ "node": ">=0.10.0" } }, - "node_modules/cli-width": { - "version": "2.2.0", - "dev": true, - "license": "ISC" - }, "node_modules/clipboard": { "version": "2.0.6", "dev": true, @@ -8724,66 +8613,69 @@ } }, "node_modules/eslint": { - "version": "5.16.0", + "version": "7.21.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.21.0.tgz", + "integrity": "sha512-W2aJbXpMNofUp0ztQaF40fveSsJBjlSCSWpy//gzfTvwC+USs/nceBrKmlJOiM8r1bLwP2EuYkCqArn/6QTIgg==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/code-frame": "^7.0.0", - "ajv": "^6.9.1", - "chalk": "^2.1.0", - "cross-spawn": "^6.0.5", + "@babel/code-frame": "7.12.11", + "@eslint/eslintrc": "^0.4.0", + "ajv": "^6.10.0", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", "debug": "^4.0.1", "doctrine": "^3.0.0", - "eslint-scope": "^4.0.3", - "eslint-utils": "^1.3.1", - "eslint-visitor-keys": "^1.0.0", - "espree": "^5.0.1", - "esquery": "^1.0.1", + "enquirer": "^2.3.5", + "eslint-scope": "^5.1.1", + "eslint-utils": "^2.1.0", + "eslint-visitor-keys": "^2.0.0", + "espree": "^7.3.1", + "esquery": "^1.4.0", "esutils": "^2.0.2", - "file-entry-cache": "^5.0.1", + "file-entry-cache": "^6.0.1", "functional-red-black-tree": "^1.0.1", - "glob": "^7.1.2", - "globals": "^11.7.0", + "glob-parent": "^5.0.0", + "globals": "^12.1.0", "ignore": "^4.0.6", "import-fresh": "^3.0.0", "imurmurhash": "^0.1.4", - "inquirer": "^6.2.2", - "js-yaml": "^3.13.0", + "is-glob": "^4.0.0", + "js-yaml": "^3.13.1", "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.3.0", - "lodash": "^4.17.11", + "levn": "^0.4.1", + "lodash": "^4.17.20", "minimatch": "^3.0.4", - "mkdirp": "^0.5.1", "natural-compare": "^1.4.0", - "optionator": "^0.8.2", - "path-is-inside": "^1.0.2", + "optionator": "^0.9.1", "progress": "^2.0.0", - "regexpp": "^2.0.1", - "semver": "^5.5.1", - "strip-ansi": "^4.0.0", - "strip-json-comments": "^2.0.1", - "table": "^5.2.3", - "text-table": "^0.2.0" + "regexpp": "^3.1.0", + "semver": "^7.2.1", + "strip-ansi": "^6.0.0", + "strip-json-comments": "^3.1.0", + "table": "^6.0.4", + "text-table": "^0.2.0", + "v8-compile-cache": "^2.0.3" }, "bin": { "eslint": "bin/eslint.js" }, "engines": { - "node": "^6.14.0 || ^8.10.0 || >=9.10.0" + "node": "^10.12.0 || >=12.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, "node_modules/eslint-config-prettier": { - "version": "6.12.0", + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.1.0.tgz", + "integrity": "sha512-oKMhGv3ihGbCIimCAjqkdzx2Q+jthoqnXSP+d86M9tptwugycmTFdVR4IpLgq2c4SHifbwO90z2fQ8/Aio73yw==", "dev": true, - "license": "MIT", - "dependencies": { - "get-stdin": "^6.0.0" - }, "bin": { - "eslint-config-prettier-check": "bin/cli.js" + "eslint-config-prettier": "bin/cli.js" }, "peerDependencies": { - "eslint": ">=3.14.1" + "eslint": ">=7.0.0" } }, "node_modules/eslint-import-resolver-node": { @@ -9001,69 +8893,100 @@ } }, "node_modules/eslint-scope": { - "version": "4.0.3", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", "dev": true, - "license": "BSD-2-Clause", "dependencies": { - "esrecurse": "^4.1.0", + "esrecurse": "^4.3.0", "estraverse": "^4.1.1" }, "engines": { - "node": ">=4.0.0" + "node": ">=8.0.0" } }, "node_modules/eslint-utils": { - "version": "1.4.2", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", + "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", "dev": true, - "license": "MIT", "dependencies": { - "eslint-visitor-keys": "^1.0.0" + "eslint-visitor-keys": "^1.1.0" }, "engines": { "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/mysticatea" } }, "node_modules/eslint-visitor-keys": { - "version": "1.0.0", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", "dev": true, - "license": "Apache-2.0", "engines": { "node": ">=4" } }, - "node_modules/eslint/node_modules/@babel/code-frame": { - "version": "7.0.0", + "node_modules/eslint/node_modules/ansi-regex": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", "dev": true, - "license": "MIT", - "dependencies": { - "@babel/highlight": "^7.0.0" + "engines": { + "node": ">=8" } }, - "node_modules/eslint/node_modules/@babel/highlight": { - "version": "7.0.0", + "node_modules/eslint/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, - "license": "MIT", "dependencies": { - "chalk": "^2.0.0", - "esutils": "^2.0.2", - "js-tokens": "^4.0.0" - } - }, - "node_modules/eslint/node_modules/cross-spawn": { - "version": "6.0.5", - "dev": true, - "license": "MIT", - "dependencies": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" + "color-convert": "^2.0.1" }, "engines": { - "node": ">=4.8" + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, + "node_modules/eslint/node_modules/chalk": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", + "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/eslint/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/eslint/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, "node_modules/eslint/node_modules/doctrine": { "version": "3.0.0", "dev": true, @@ -9075,10 +8998,38 @@ "node": ">=6.0.0" } }, - "node_modules/eslint/node_modules/js-tokens": { - "version": "4.0.0", + "node_modules/eslint/node_modules/eslint-visitor-keys": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.0.0.tgz", + "integrity": "sha512-QudtT6av5WXels9WjIM7qz1XD1cWGvX4gGXvp/zBn9nXG02D0utdU3Em2m/QjTnrsk6bBjmCygl3rmj118msQQ==", "dev": true, - "license": "MIT" + "engines": { + "node": ">=10" + } + }, + "node_modules/eslint/node_modules/globals": { + "version": "12.4.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz", + "integrity": "sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg==", + "dev": true, + "dependencies": { + "type-fest": "^0.8.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } }, "node_modules/eslint/node_modules/js-yaml": { "version": "3.13.1", @@ -9092,39 +9043,154 @@ "js-yaml": "bin/js-yaml.js" } }, - "node_modules/eslint/node_modules/minimist": { - "version": "1.2.5", + "node_modules/eslint/node_modules/levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", "dev": true, - "license": "MIT" - }, - "node_modules/eslint/node_modules/mkdirp": { - "version": "0.5.4", - "dev": true, - "license": "MIT", "dependencies": { - "minimist": "^1.2.5" - }, - "bin": { - "mkdirp": "bin/cmd.js" - } - }, - "node_modules/espree": { - "version": "5.0.1", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "acorn": "^6.0.7", - "acorn-jsx": "^5.0.0", - "eslint-visitor-keys": "^1.0.0" + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" }, "engines": { - "node": ">=6.0.0" + "node": ">= 0.8.0" + } + }, + "node_modules/eslint/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/eslint/node_modules/optionator": { + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", + "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", + "dev": true, + "dependencies": { + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.3" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/eslint/node_modules/prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/eslint/node_modules/semver": { + "version": "7.3.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz", + "integrity": "sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/eslint/node_modules/strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/eslint/node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/eslint/node_modules/type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, + "dependencies": { + "prelude-ls": "^1.2.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/eslint/node_modules/type-fest": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/eslint/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, + "node_modules/espree": { + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-7.3.1.tgz", + "integrity": "sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g==", + "dev": true, + "dependencies": { + "acorn": "^7.4.0", + "acorn-jsx": "^5.3.1", + "eslint-visitor-keys": "^1.3.0" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" } }, "node_modules/espree/node_modules/acorn": { - "version": "6.4.1", + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", + "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", "dev": true, - "license": "MIT", "bin": { "acorn": "bin/acorn" }, @@ -9145,27 +9211,47 @@ } }, "node_modules/esquery": { - "version": "1.0.1", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz", + "integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==", "dev": true, - "license": "BSD-3-Clause", "dependencies": { - "estraverse": "^4.0.0" + "estraverse": "^5.1.0" }, "engines": { - "node": ">=0.6" + "node": ">=0.10" + } + }, + "node_modules/esquery/node_modules/estraverse": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", + "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", + "dev": true, + "engines": { + "node": ">=4.0" } }, "node_modules/esrecurse": { - "version": "4.2.1", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", "dev": true, - "license": "BSD-2-Clause", "dependencies": { - "estraverse": "^4.1.0" + "estraverse": "^5.2.0" }, "engines": { "node": ">=4.0" } }, + "node_modules/esrecurse/node_modules/estraverse": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", + "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", + "dev": true, + "engines": { + "node": ">=4.0" + } + }, "node_modules/estraverse": { "version": "4.2.0", "dev": true, @@ -9736,14 +9822,15 @@ } }, "node_modules/file-entry-cache": { - "version": "5.0.1", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", "dev": true, - "license": "MIT", "dependencies": { - "flat-cache": "^2.0.1" + "flat-cache": "^3.0.4" }, "engines": { - "node": ">=4" + "node": "^10.12.0 || >=12.0.0" } }, "node_modules/file-uri-to-path": { @@ -9823,33 +9910,38 @@ } }, "node_modules/flat-cache": { - "version": "2.0.1", + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", + "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", "dev": true, - "license": "MIT", "dependencies": { - "flatted": "^2.0.0", - "rimraf": "2.6.3", - "write": "1.0.3" + "flatted": "^3.1.0", + "rimraf": "^3.0.2" }, "engines": { - "node": ">=4" + "node": "^10.12.0 || >=12.0.0" } }, "node_modules/flat-cache/node_modules/rimraf": { - "version": "2.6.3", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", "dev": true, - "license": "ISC", "dependencies": { "glob": "^7.1.3" }, "bin": { "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, "node_modules/flatted": { - "version": "2.0.0", - "dev": true, - "license": "ISC" + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.1.1.tgz", + "integrity": "sha512-zAoAQiudy+r5SvnSw3KJy5os/oRJYHzrzja/tBDqrZtNhUw8bt6y8OBzMWcjWr+8liV8Eb6yOhw8WZ7VFZ5ZzA==", + "dev": true }, "node_modules/fn-name": { "version": "2.0.1", @@ -10359,14 +10451,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/get-stdin": { - "version": "6.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, "node_modules/get-stream": { "version": "4.1.0", "dev": true, @@ -11354,69 +11438,6 @@ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", "dev": true }, - "node_modules/inquirer": { - "version": "6.2.2", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-escapes": "^3.2.0", - "chalk": "^2.4.2", - "cli-cursor": "^2.1.0", - "cli-width": "^2.0.0", - "external-editor": "^3.0.3", - "figures": "^2.0.0", - "lodash": "^4.17.11", - "mute-stream": "0.0.7", - "run-async": "^2.2.0", - "rxjs": "^6.4.0", - "string-width": "^2.1.0", - "strip-ansi": "^5.0.0", - "through": "^2.3.6" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/inquirer/node_modules/ansi-escapes": { - "version": "3.2.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/inquirer/node_modules/ansi-regex": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/inquirer/node_modules/chalk": { - "version": "2.4.2", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/inquirer/node_modules/strip-ansi": { - "version": "5.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^4.1.0" - }, - "engines": { - "node": ">=6" - } - }, "node_modules/internal-slot": { "version": "1.0.2", "dev": true, @@ -12991,9 +13012,10 @@ } }, "node_modules/js-tokens": { - "version": "3.0.2", - "dev": true, - "license": "MIT" + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true }, "node_modules/js-yaml": { "version": "3.14.1", @@ -16914,14 +16936,15 @@ } }, "node_modules/prettier": { - "version": "1.18.2", + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.2.1.tgz", + "integrity": "sha512-PqyhM2yCjg/oKkFPtTGUojv7gnZAoG80ttl45O6x2Ug/rMJw4wcc9k6aaf2hibP7BGVCCM33gZoGjyvt9mm16Q==", "dev": true, - "license": "MIT", "bin": { "prettier": "bin-prettier.js" }, "engines": { - "node": ">=4" + "node": ">=10.13.0" } }, "node_modules/prettier-linter-helpers": { @@ -17655,11 +17678,15 @@ } }, "node_modules/regexpp": { - "version": "2.0.1", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.1.0.tgz", + "integrity": "sha512-ZOIzd8yVsQQA7j8GCSlPGXwg5PfmA1mrq0JP4nGhh54LaKN3xdai/vHUDu74pKwV8OxseMS65u2NImosQcSD0Q==", "dev": true, - "license": "MIT", "engines": { - "node": ">=6.5.0" + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/mysticatea" } }, "node_modules/registry-auth-token": { @@ -17795,6 +17822,15 @@ "node": ">=0.10.0" } }, + "node_modules/require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/require-main-filename": { "version": "2.0.0", "dev": true, @@ -18463,16 +18499,71 @@ } }, "node_modules/slice-ansi": { - "version": "2.1.0", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", + "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", "dev": true, - "license": "MIT", "dependencies": { - "ansi-styles": "^3.2.0", - "astral-regex": "^1.0.0", - "is-fullwidth-code-point": "^2.0.0" + "ansi-styles": "^4.0.0", + "astral-regex": "^2.0.0", + "is-fullwidth-code-point": "^3.0.0" }, "engines": { - "node": ">=6" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/slice-ansi?sponsor=1" + } + }, + "node_modules/slice-ansi/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/slice-ansi/node_modules/astral-regex": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", + "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/slice-ansi/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/slice-ansi/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/slice-ansi/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "engines": { + "node": ">=8" } }, "node_modules/slide": { @@ -19597,49 +19688,90 @@ "license": "BSD-3-Clause" }, "node_modules/table": { - "version": "5.2.3", + "version": "6.0.7", + "resolved": "https://registry.npmjs.org/table/-/table-6.0.7.tgz", + "integrity": "sha512-rxZevLGTUzWna/qBLObOe16kB2RTnnbhciwgPbMMlazz1yZGVEgnZK762xyVdVznhqxrfCeBMmMkgOOaPwjH7g==", "dev": true, - "license": "BSD-3-Clause", "dependencies": { - "ajv": "^6.9.1", - "lodash": "^4.17.11", - "slice-ansi": "^2.1.0", - "string-width": "^3.0.0" + "ajv": "^7.0.2", + "lodash": "^4.17.20", + "slice-ansi": "^4.0.0", + "string-width": "^4.2.0" }, "engines": { - "node": ">=6.0.0" + "node": ">=10.0.0" + } + }, + "node_modules/table/node_modules/ajv": { + "version": "7.2.1", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-7.2.1.tgz", + "integrity": "sha512-+nu0HDv7kNSOua9apAVc979qd932rrZeb3WOvoiD31A/p1mIE5/9bN2027pE2rOPYEdS3UHzsvof4hY+lM9/WQ==", + "dev": true, + "dependencies": { + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" } }, "node_modules/table/node_modules/ansi-regex": { - "version": "4.1.0", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", "dev": true, - "license": "MIT", "engines": { - "node": ">=6" + "node": ">=8" } }, - "node_modules/table/node_modules/string-width": { - "version": "3.1.0", + "node_modules/table/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "node_modules/table/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/table/node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "dev": true + }, + "node_modules/table/node_modules/string-width": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", + "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", "dev": true, - "license": "MIT", "dependencies": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" }, "engines": { - "node": ">=6" + "node": ">=8" } }, "node_modules/table/node_modules/strip-ansi": { - "version": "5.2.0", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", "dev": true, - "license": "MIT", "dependencies": { - "ansi-regex": "^4.1.0" + "ansi-regex": "^5.0.0" }, "engines": { - "node": ">=6" + "node": ">=8" } }, "node_modules/tar": { @@ -20538,6 +20670,12 @@ "uuid": "bin/uuid" } }, + "node_modules/v8-compile-cache": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", + "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==", + "dev": true + }, "node_modules/validate-npm-package-license": { "version": "3.0.4", "dev": true, @@ -20731,6 +20869,15 @@ "node": ">=8" } }, + "node_modules/word-wrap": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", + "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/wordwrap": { "version": "1.0.0", "dev": true, @@ -20841,17 +20988,6 @@ "dev": true, "license": "ISC" }, - "node_modules/write": { - "version": "1.0.3", - "dev": true, - "license": "MIT", - "dependencies": { - "mkdirp": "^0.5.1" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/write-file-atomic": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz", @@ -20987,22 +21123,6 @@ "node": ">=6" } }, - "node_modules/write/node_modules/minimist": { - "version": "1.2.5", - "dev": true, - "license": "MIT" - }, - "node_modules/write/node_modules/mkdirp": { - "version": "0.5.4", - "dev": true, - "license": "MIT", - "dependencies": { - "minimist": "^1.2.5" - }, - "bin": { - "mkdirp": "bin/cmd.js" - } - }, "node_modules/ws": { "version": "5.2.2", "dev": true, @@ -21265,10 +21385,12 @@ }, "dependencies": { "@babel/code-frame": { - "version": "7.0.0", + "version": "7.12.11", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.11.tgz", + "integrity": "sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw==", "dev": true, "requires": { - "@babel/highlight": "^7.0.0" + "@babel/highlight": "^7.10.4" } }, "@babel/core": { @@ -21291,32 +21413,6 @@ "resolve": "^1.3.2", "semver": "^5.4.1", "source-map": "^0.5.0" - }, - "dependencies": { - "@babel/code-frame": { - "version": "7.10.4", - "dev": true, - "requires": { - "@babel/highlight": "^7.10.4" - } - }, - "@babel/helper-validator-identifier": { - "version": "7.10.4", - "dev": true - }, - "@babel/highlight": { - "version": "7.10.4", - "dev": true, - "requires": { - "@babel/helper-validator-identifier": "^7.10.4", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" - } - }, - "js-tokens": { - "version": "4.0.0", - "dev": true - } } }, "@babel/generator": { @@ -21408,7 +21504,9 @@ } }, "@babel/helper-validator-identifier": { - "version": "7.9.5", + "version": "7.12.11", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.12.11.tgz", + "integrity": "sha512-np/lG3uARFybkoHokJUmf1QfEvRVCPbmQeUQpKow5cQ3xWrV9i3rUHodKDJPQfTVX61qKi+UdYk8kik84n7XOw==", "dev": true }, "@babel/helpers": { @@ -21421,18 +21519,14 @@ } }, "@babel/highlight": { - "version": "7.0.0", + "version": "7.13.10", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.13.10.tgz", + "integrity": "sha512-5aPpe5XQPzflQrFwL1/QoeHkP2MsA4JCntcXHRhEsdsfPVkvPi2w7Qix4iV7t5S/oC9OodGrggd8aco1g3SZFg==", "dev": true, "requires": { + "@babel/helper-validator-identifier": "^7.12.11", "chalk": "^2.0.0", - "esutils": "^2.0.2", "js-tokens": "^4.0.0" - }, - "dependencies": { - "js-tokens": { - "version": "4.0.0", - "dev": true - } } }, "@babel/parser": { @@ -21474,32 +21568,6 @@ "@babel/code-frame": "^7.10.4", "@babel/parser": "^7.10.4", "@babel/types": "^7.10.4" - }, - "dependencies": { - "@babel/code-frame": { - "version": "7.10.4", - "dev": true, - "requires": { - "@babel/highlight": "^7.10.4" - } - }, - "@babel/helper-validator-identifier": { - "version": "7.10.4", - "dev": true - }, - "@babel/highlight": { - "version": "7.10.4", - "dev": true, - "requires": { - "@babel/helper-validator-identifier": "^7.10.4", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" - } - }, - "js-tokens": { - "version": "4.0.0", - "dev": true - } } }, "@babel/traverse": { @@ -21515,32 +21583,6 @@ "debug": "^4.1.0", "globals": "^11.1.0", "lodash": "^4.17.19" - }, - "dependencies": { - "@babel/code-frame": { - "version": "7.10.4", - "dev": true, - "requires": { - "@babel/highlight": "^7.10.4" - } - }, - "@babel/helper-validator-identifier": { - "version": "7.10.4", - "dev": true - }, - "@babel/highlight": { - "version": "7.10.4", - "dev": true, - "requires": { - "@babel/helper-validator-identifier": "^7.10.4", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" - } - }, - "js-tokens": { - "version": "4.0.0", - "dev": true - } } }, "@babel/types": { @@ -21550,12 +21592,6 @@ "@babel/helper-validator-identifier": "^7.10.4", "lodash": "^4.17.19", "to-fast-properties": "^2.0.0" - }, - "dependencies": { - "@babel/helper-validator-identifier": { - "version": "7.10.4", - "dev": true - } } }, "@cnakazawa/watch": { @@ -21678,6 +21714,46 @@ } } }, + "@eslint/eslintrc": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.4.0.tgz", + "integrity": "sha512-2ZPCc+uNbjV5ERJr+aKSPRwZgKd2z11x0EgLvb1PURmUrn9QNRXFqje0Ldq454PfAVyaJYyrDvvIKSFP4NnBog==", + "dev": true, + "requires": { + "ajv": "^6.12.4", + "debug": "^4.1.1", + "espree": "^7.3.0", + "globals": "^12.1.0", + "ignore": "^4.0.6", + "import-fresh": "^3.2.1", + "js-yaml": "^3.13.1", + "minimatch": "^3.0.4", + "strip-json-comments": "^3.1.1" + }, + "dependencies": { + "globals": { + "version": "12.4.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz", + "integrity": "sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg==", + "dev": true, + "requires": { + "type-fest": "^0.8.1" + } + }, + "strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true + }, + "type-fest": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "dev": true + } + } + }, "@hapi/hoek": { "version": "9.1.1", "dev": true @@ -24579,8 +24655,7 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/@octokit/plugin-request-log/-/plugin-request-log-1.0.3.tgz", "integrity": "sha512-4RFU4li238jMJAzLgAwkBAw+4Loile5haQMQr+uhFq27BmyJXcXSKvoQKqh0agsZEiUlW6iSv3FAgvmGkur7OQ==", - "dev": true, - "requires": {} + "dev": true }, "@octokit/plugin-rest-endpoint-methods": { "version": "4.13.5", @@ -24746,37 +24821,6 @@ "pretty-format": "^26.6.2" }, "dependencies": { - "@babel/code-frame": { - "version": "7.12.11", - "dev": true, - "requires": { - "@babel/highlight": "^7.10.4" - } - }, - "@babel/helper-validator-identifier": { - "version": "7.12.11", - "dev": true - }, - "@babel/highlight": { - "version": "7.10.4", - "dev": true, - "requires": { - "@babel/helper-validator-identifier": "^7.10.4", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" - }, - "dependencies": { - "chalk": { - "version": "2.4.2", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - } - } - }, "@babel/runtime": { "version": "7.12.5", "dev": true, @@ -24852,10 +24896,6 @@ "version": "4.0.0", "dev": true }, - "js-tokens": { - "version": "4.0.0", - "dev": true - }, "pretty-format": { "version": "26.6.2", "dev": true, @@ -25029,9 +25069,10 @@ } }, "acorn-jsx": { - "version": "5.0.1", - "dev": true, - "requires": {} + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.1.tgz", + "integrity": "sha512-K0Ptm/47OKfQRpNQ2J/oIN/3QYiK6FwW+eJbILhsdxh2WTLdl+30o8aGdTbm5JbffpFFAg/g+zi1E+jvJha5ng==", + "dev": true }, "acorn-walk": { "version": "6.2.0", @@ -25625,15 +25666,6 @@ "@babel/types": "^7.8.3" } }, - "@babel/highlight": { - "version": "7.9.0", - "dev": true, - "requires": { - "@babel/helper-validator-identifier": "^7.9.0", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" - } - }, "@babel/parser": { "version": "7.9.6", "dev": true @@ -25645,15 +25677,6 @@ "@babel/code-frame": "^7.8.3", "@babel/parser": "^7.8.6", "@babel/types": "^7.8.6" - }, - "dependencies": { - "@babel/code-frame": { - "version": "7.8.3", - "dev": true, - "requires": { - "@babel/highlight": "^7.8.3" - } - } } }, "@babel/traverse": { @@ -25669,15 +25692,6 @@ "debug": "^4.1.0", "globals": "^11.1.0", "lodash": "^4.17.13" - }, - "dependencies": { - "@babel/code-frame": { - "version": "7.8.3", - "dev": true, - "requires": { - "@babel/highlight": "^7.8.3" - } - } } }, "@babel/types": { @@ -25688,10 +25702,6 @@ "lodash": "^4.17.13", "to-fast-properties": "^2.0.0" } - }, - "js-tokens": { - "version": "4.0.0", - "dev": true } } }, @@ -26412,10 +26422,6 @@ } } }, - "cli-width": { - "version": "2.2.0", - "dev": true - }, "clipboard": { "version": "2.0.6", "dev": true, @@ -27684,74 +27690,90 @@ } }, "eslint": { - "version": "5.16.0", + "version": "7.21.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.21.0.tgz", + "integrity": "sha512-W2aJbXpMNofUp0ztQaF40fveSsJBjlSCSWpy//gzfTvwC+USs/nceBrKmlJOiM8r1bLwP2EuYkCqArn/6QTIgg==", "dev": true, "requires": { - "@babel/code-frame": "^7.0.0", - "ajv": "^6.9.1", - "chalk": "^2.1.0", - "cross-spawn": "^6.0.5", + "@babel/code-frame": "7.12.11", + "@eslint/eslintrc": "^0.4.0", + "ajv": "^6.10.0", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", "debug": "^4.0.1", "doctrine": "^3.0.0", - "eslint-scope": "^4.0.3", - "eslint-utils": "^1.3.1", - "eslint-visitor-keys": "^1.0.0", - "espree": "^5.0.1", - "esquery": "^1.0.1", + "enquirer": "^2.3.5", + "eslint-scope": "^5.1.1", + "eslint-utils": "^2.1.0", + "eslint-visitor-keys": "^2.0.0", + "espree": "^7.3.1", + "esquery": "^1.4.0", "esutils": "^2.0.2", - "file-entry-cache": "^5.0.1", + "file-entry-cache": "^6.0.1", "functional-red-black-tree": "^1.0.1", - "glob": "^7.1.2", - "globals": "^11.7.0", + "glob-parent": "^5.0.0", + "globals": "^12.1.0", "ignore": "^4.0.6", "import-fresh": "^3.0.0", "imurmurhash": "^0.1.4", - "inquirer": "^6.2.2", - "js-yaml": "^3.13.0", + "is-glob": "^4.0.0", + "js-yaml": "^3.13.1", "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.3.0", - "lodash": "^4.17.11", + "levn": "^0.4.1", + "lodash": "^4.17.20", "minimatch": "^3.0.4", - "mkdirp": "^0.5.1", "natural-compare": "^1.4.0", - "optionator": "^0.8.2", - "path-is-inside": "^1.0.2", + "optionator": "^0.9.1", "progress": "^2.0.0", - "regexpp": "^2.0.1", - "semver": "^5.5.1", - "strip-ansi": "^4.0.0", - "strip-json-comments": "^2.0.1", - "table": "^5.2.3", - "text-table": "^0.2.0" + "regexpp": "^3.1.0", + "semver": "^7.2.1", + "strip-ansi": "^6.0.0", + "strip-json-comments": "^3.1.0", + "table": "^6.0.4", + "text-table": "^0.2.0", + "v8-compile-cache": "^2.0.3" }, "dependencies": { - "@babel/code-frame": { - "version": "7.0.0", + "ansi-regex": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", + "dev": true + }, + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "requires": { - "@babel/highlight": "^7.0.0" + "color-convert": "^2.0.1" } }, - "@babel/highlight": { - "version": "7.0.0", + "chalk": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", + "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", "dev": true, "requires": { - "chalk": "^2.0.0", - "esutils": "^2.0.2", - "js-tokens": "^4.0.0" + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" } }, - "cross-spawn": { - "version": "6.0.5", + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, "requires": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" + "color-name": "~1.1.4" } }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, "doctrine": { "version": "3.0.0", "dev": true, @@ -27759,8 +27781,25 @@ "esutils": "^2.0.2" } }, - "js-tokens": { + "eslint-visitor-keys": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.0.0.tgz", + "integrity": "sha512-QudtT6av5WXels9WjIM7qz1XD1cWGvX4gGXvp/zBn9nXG02D0utdU3Em2m/QjTnrsk6bBjmCygl3rmj118msQQ==", + "dev": true + }, + "globals": { + "version": "12.4.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz", + "integrity": "sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg==", + "dev": true, + "requires": { + "type-fest": "^0.8.1" + } + }, + "has-flag": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, "js-yaml": { @@ -27771,25 +27810,106 @@ "esprima": "^4.0.0" } }, - "minimist": { - "version": "1.2.5", - "dev": true - }, - "mkdirp": { - "version": "0.5.4", + "levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", "dev": true, "requires": { - "minimist": "^1.2.5" + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" } + }, + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "requires": { + "yallist": "^4.0.0" + } + }, + "optionator": { + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", + "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", + "dev": true, + "requires": { + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.3" + } + }, + "prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true + }, + "semver": { + "version": "7.3.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz", + "integrity": "sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + }, + "strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "dev": true, + "requires": { + "ansi-regex": "^5.0.0" + } + }, + "strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + }, + "type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, + "requires": { + "prelude-ls": "^1.2.1" + } + }, + "type-fest": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "dev": true + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true } } }, "eslint-config-prettier": { - "version": "6.12.0", - "dev": true, - "requires": { - "get-stdin": "^6.0.0" - } + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.1.0.tgz", + "integrity": "sha512-oKMhGv3ihGbCIimCAjqkdzx2Q+jthoqnXSP+d86M9tptwugycmTFdVR4IpLgq2c4SHifbwO90z2fQ8/Aio73yw==", + "dev": true }, "eslint-import-resolver-node": { "version": "0.3.4", @@ -27896,8 +28016,7 @@ }, "eslint-plugin-prefer-object-spread": { "version": "1.2.1", - "dev": true, - "requires": {} + "dev": true }, "eslint-plugin-prettier": { "version": "3.3.1", @@ -27938,43 +28057,52 @@ }, "eslint-plugin-react-hooks": { "version": "2.5.1", - "dev": true, - "requires": {} + "dev": true }, "eslint-rule-composer": { "version": "0.3.0", "dev": true }, "eslint-scope": { - "version": "4.0.3", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", "dev": true, "requires": { - "esrecurse": "^4.1.0", + "esrecurse": "^4.3.0", "estraverse": "^4.1.1" } }, "eslint-utils": { - "version": "1.4.2", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", + "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", "dev": true, "requires": { - "eslint-visitor-keys": "^1.0.0" + "eslint-visitor-keys": "^1.1.0" } }, "eslint-visitor-keys": { - "version": "1.0.0", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", "dev": true }, "espree": { - "version": "5.0.1", + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-7.3.1.tgz", + "integrity": "sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g==", "dev": true, "requires": { - "acorn": "^6.0.7", - "acorn-jsx": "^5.0.0", - "eslint-visitor-keys": "^1.0.0" + "acorn": "^7.4.0", + "acorn-jsx": "^5.3.1", + "eslint-visitor-keys": "^1.3.0" }, "dependencies": { "acorn": { - "version": "6.4.1", + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", + "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", "dev": true } } @@ -27984,17 +28112,37 @@ "dev": true }, "esquery": { - "version": "1.0.1", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz", + "integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==", "dev": true, "requires": { - "estraverse": "^4.0.0" + "estraverse": "^5.1.0" + }, + "dependencies": { + "estraverse": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", + "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", + "dev": true + } } }, "esrecurse": { - "version": "4.2.1", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", "dev": true, "requires": { - "estraverse": "^4.1.0" + "estraverse": "^5.2.0" + }, + "dependencies": { + "estraverse": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", + "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", + "dev": true + } } }, "estraverse": { @@ -28401,10 +28549,12 @@ } }, "file-entry-cache": { - "version": "5.0.1", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", "dev": true, "requires": { - "flat-cache": "^2.0.1" + "flat-cache": "^3.0.4" } }, "file-uri-to-path": { @@ -28467,16 +28617,19 @@ } }, "flat-cache": { - "version": "2.0.1", + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", + "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", "dev": true, "requires": { - "flatted": "^2.0.0", - "rimraf": "2.6.3", - "write": "1.0.3" + "flatted": "^3.1.0", + "rimraf": "^3.0.2" }, "dependencies": { "rimraf": { - "version": "2.6.3", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", "dev": true, "requires": { "glob": "^7.1.3" @@ -28485,7 +28638,9 @@ } }, "flatted": { - "version": "2.0.0", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.1.1.tgz", + "integrity": "sha512-zAoAQiudy+r5SvnSw3KJy5os/oRJYHzrzja/tBDqrZtNhUw8bt6y8OBzMWcjWr+8liV8Eb6yOhw8WZ7VFZ5ZzA==", "dev": true }, "fn-name": { @@ -28849,10 +29004,6 @@ "integrity": "sha512-g/Q1aTSDOxFpchXC4i8ZWvxA1lnPqx/JHqcpIw0/LX9T8x/GBbi6YnlN5nhaKIFkT8oFsscUKgDJYxfwfS6QsQ==", "dev": true }, - "get-stdin": { - "version": "6.0.0", - "dev": true - }, "get-stream": { "version": "4.1.0", "dev": true, @@ -29549,51 +29700,6 @@ } } }, - "inquirer": { - "version": "6.2.2", - "dev": true, - "requires": { - "ansi-escapes": "^3.2.0", - "chalk": "^2.4.2", - "cli-cursor": "^2.1.0", - "cli-width": "^2.0.0", - "external-editor": "^3.0.3", - "figures": "^2.0.0", - "lodash": "^4.17.11", - "mute-stream": "0.0.7", - "run-async": "^2.2.0", - "rxjs": "^6.4.0", - "string-width": "^2.1.0", - "strip-ansi": "^5.0.0", - "through": "^2.3.6" - }, - "dependencies": { - "ansi-escapes": { - "version": "3.2.0", - "dev": true - }, - "ansi-regex": { - "version": "4.1.0", - "dev": true - }, - "chalk": { - "version": "2.4.2", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "strip-ansi": { - "version": "5.2.0", - "dev": true, - "requires": { - "ansi-regex": "^4.1.0" - } - } - } - }, "internal-slot": { "version": "1.0.2", "dev": true, @@ -30385,8 +30491,7 @@ }, "jest-pnp-resolver": { "version": "1.2.2", - "dev": true, - "requires": {} + "dev": true }, "jest-regex-util": { "version": "24.9.0", @@ -30667,7 +30772,9 @@ } }, "js-tokens": { - "version": "3.0.2", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", "dev": true }, "js-yaml": { @@ -33416,7 +33523,9 @@ "dev": true }, "prettier": { - "version": "1.18.2", + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.2.1.tgz", + "integrity": "sha512-PqyhM2yCjg/oKkFPtTGUojv7gnZAoG80ttl45O6x2Ug/rMJw4wcc9k6aaf2hibP7BGVCCM33gZoGjyvt9mm16Q==", "dev": true }, "prettier-linter-helpers": { @@ -33937,7 +34046,9 @@ } }, "regexpp": { - "version": "2.0.1", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.1.0.tgz", + "integrity": "sha512-ZOIzd8yVsQQA7j8GCSlPGXwg5PfmA1mrq0JP4nGhh54LaKN3xdai/vHUDu74pKwV8OxseMS65u2NImosQcSD0Q==", "dev": true }, "registry-auth-token": { @@ -34030,6 +34141,12 @@ "version": "2.1.1", "dev": true }, + "require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "dev": true + }, "require-main-filename": { "version": "2.0.0", "dev": true @@ -34473,8 +34590,7 @@ }, "sinon-express-mock": { "version": "2.2.1", - "dev": true, - "requires": {} + "dev": true }, "sisteransi": { "version": "1.0.5", @@ -34485,12 +34601,52 @@ "dev": true }, "slice-ansi": { - "version": "2.1.0", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", + "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", "dev": true, "requires": { - "ansi-styles": "^3.2.0", - "astral-regex": "^1.0.0", - "is-fullwidth-code-point": "^2.0.0" + "ansi-styles": "^4.0.0", + "astral-regex": "^2.0.0", + "is-fullwidth-code-point": "^3.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "astral-regex": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", + "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", + "dev": true + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true + } } }, "slide": { @@ -35218,33 +35374,71 @@ "dev": true }, "table": { - "version": "5.2.3", + "version": "6.0.7", + "resolved": "https://registry.npmjs.org/table/-/table-6.0.7.tgz", + "integrity": "sha512-rxZevLGTUzWna/qBLObOe16kB2RTnnbhciwgPbMMlazz1yZGVEgnZK762xyVdVznhqxrfCeBMmMkgOOaPwjH7g==", "dev": true, "requires": { - "ajv": "^6.9.1", - "lodash": "^4.17.11", - "slice-ansi": "^2.1.0", - "string-width": "^3.0.0" + "ajv": "^7.0.2", + "lodash": "^4.17.20", + "slice-ansi": "^4.0.0", + "string-width": "^4.2.0" }, "dependencies": { + "ajv": { + "version": "7.2.1", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-7.2.1.tgz", + "integrity": "sha512-+nu0HDv7kNSOua9apAVc979qd932rrZeb3WOvoiD31A/p1mIE5/9bN2027pE2rOPYEdS3UHzsvof4hY+lM9/WQ==", + "dev": true, + "requires": { + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" + } + }, "ansi-regex": { - "version": "4.1.0", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", + "dev": true + }, + "emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true + }, + "json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", "dev": true }, "string-width": { - "version": "3.1.0", + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", + "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", "dev": true, "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" } }, "strip-ansi": { - "version": "5.2.0", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", "dev": true, "requires": { - "ansi-regex": "^4.1.0" + "ansi-regex": "^5.0.0" } } } @@ -35868,6 +36062,12 @@ "version": "3.3.2", "dev": true }, + "v8-compile-cache": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", + "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==", + "dev": true + }, "validate-npm-package-license": { "version": "3.0.4", "dev": true, @@ -36014,6 +36214,12 @@ } } }, + "word-wrap": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", + "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", + "dev": true + }, "wordwrap": { "version": "1.0.0", "dev": true @@ -36097,26 +36303,6 @@ "version": "1.0.2", "dev": true }, - "write": { - "version": "1.0.3", - "dev": true, - "requires": { - "mkdirp": "^0.5.1" - }, - "dependencies": { - "minimist": { - "version": "1.2.5", - "dev": true - }, - "mkdirp": { - "version": "0.5.4", - "dev": true, - "requires": { - "minimist": "^1.2.5" - } - } - } - }, "write-file-atomic": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz", diff --git a/package.json b/package.json index 4f534ff4cf..517ad5613d 100644 --- a/package.json +++ b/package.json @@ -71,8 +71,8 @@ "cypress": "^6.6.0", "debug": "^4.3.1", "docsify-cli": "^4.4.3", - "eslint": "^5.16.0", - "eslint-config-prettier": "^6.12.0", + "eslint": "^7.21.0", + "eslint-config-prettier": "^8.1.0", "eslint-plugin-babel": "^5.3.1", "eslint-plugin-import": "^2.22.1", "eslint-plugin-jsx-a11y": "^6.4.1", @@ -92,7 +92,7 @@ "markdownlint": "^0.21.0", "npm-run-all": "^4.1.5", "ora": "^3.4.0", - "prettier": "^1.18.2", + "prettier": "^2.2.1", "prismjs": "^1.23.0", "readdirp-walk": "^1.7.0", "shx": "^0.3.3", diff --git a/tools/challenge-helper-scripts/create-step-between.js b/tools/challenge-helper-scripts/create-step-between.js index 0d49afda43..9fde86e4a5 100644 --- a/tools/challenge-helper-scripts/create-step-between.js +++ b/tools/challenge-helper-scripts/create-step-between.js @@ -24,8 +24,10 @@ if ( start < 1 || start !== end - 1 ) { - throw 'Step not created. Steps specified must be' + - ' consecutive numbers and start step must be greater than 0.'; + throw ( + 'Step not created. Steps specified must be' + + ' consecutive numbers and start step must be greater than 0.' + ); } const existingSteps = getExistingStepNums(projectPath); diff --git a/tools/challenge-helper-scripts/utils.js b/tools/challenge-helper-scripts/utils.js index b7076fbd82..038ec46866 100644 --- a/tools/challenge-helper-scripts/utils.js +++ b/tools/challenge-helper-scripts/utils.js @@ -73,14 +73,8 @@ const reorderSteps = () => { const projectPath = getProjectPath(); const projectName = process.env.CALLING_DIR - ? process.env.CALLING_DIR.split(path.sep) - .slice(-1) - .toString() - : process - .cwd() - .split(path.sep) - .slice(-1) - .toString(); + ? process.env.CALLING_DIR.split(path.sep).slice(-1).toString() + : process.cwd().split(path.sep).slice(-1).toString(); const curriculumPath = process.env.CALLING_DIR ? '' @@ -187,8 +181,10 @@ const getExistingStepNums = projectPath => { ) { let stepNum = fileName.split('.')[0].split('-')[1]; if (!/^\d{3}$/.test(stepNum)) { - throw `Step not created. File ${fileName} has a step number containing non-digits.` + - ' Please run reorder-steps script first.'; + throw ( + `Step not created. File ${fileName} has a step number containing non-digits.` + + ' Please run reorder-steps script first.' + ); } stepNum = parseInt(stepNum, 10); stepNums.push(stepNum); diff --git a/tools/challenge-parser/parser/index.js b/tools/challenge-parser/parser/index.js index c5fc954d84..a1479ec66a 100644 --- a/tools/challenge-parser/parser/index.js +++ b/tools/challenge-parser/parser/index.js @@ -51,7 +51,7 @@ exports.parseMD = function parseMD(filename) { return new Promise((resolve, reject) => { const file = readSync(filename); const tree = processor.parse(file); - processor.run(tree, file, function(err, node, file) { + processor.run(tree, file, function (err, node, file) { if (!err) { delete file.contents; resolve(file.data); diff --git a/tools/challenge-parser/parser/plugins/add-seed.js b/tools/challenge-parser/parser/plugins/add-seed.js index 11d859976e..337d58c621 100644 --- a/tools/challenge-parser/parser/plugins/add-seed.js +++ b/tools/challenge-parser/parser/plugins/add-seed.js @@ -90,14 +90,16 @@ function validateEditableMarkers({ value, position }) { lines.forEach((line, index) => { if (line.match(twoMarkersRE)) { throw Error( - `Line ${baseLineNumber + - index} has two markers. Each line should only have one.` + `Line ${ + baseLineNumber + index + } has two markers. Each line should only have one.` ); } if (line.match(formattedMarkerRE)) { throw Error( - `Line ${baseLineNumber + - index} has a malformed marker. It should be --fcc-editable-region--` + `Line ${ + baseLineNumber + index + } has a malformed marker. It should be --fcc-editable-region--` ); } }); diff --git a/tools/challenge-parser/parser/plugins/replace-imports.js b/tools/challenge-parser/parser/plugins/replace-imports.js index 5c8191d812..1925672e8a 100644 --- a/tools/challenge-parser/parser/plugins/replace-imports.js +++ b/tools/challenge-parser/parser/plugins/replace-imports.js @@ -11,9 +11,7 @@ const { editableRegionMarker } = require('./add-seed'); const tableAndStrikeThrough = require('./table-and-strikethrough'); async function parse(file) { - return await remark() - .use(tableAndStrikeThrough) - .parse(file); + return await remark().use(tableAndStrikeThrough).parse(file); } function plugin() { diff --git a/utils/validate.js b/utils/validate.js index 8aa0dbf5b8..0ed4af896b 100644 --- a/utils/validate.js +++ b/utils/validate.js @@ -12,7 +12,7 @@ const usernameIsHttpStatusCode = { const isNumeric = num => !isNaN(num); const validCharsRE = /^[a-zA-Z0-9\-_+]*$/; const isHttpStatusCode = str => - isNumeric(str) && (parseInt(str, 10) >= 100 && parseInt(str, 10) <= 599); + isNumeric(str) && parseInt(str, 10) >= 100 && parseInt(str, 10) <= 599; const isValidUsername = str => { if (!validCharsRE.test(str)) return invalidCharError; if (str.length < 3) return usernameTooShort;