From 3e473b662303ee1e46fe99c9e51852cddba521ae Mon Sep 17 00:00:00 2001 From: Eric Heikes Date: Mon, 21 Oct 2019 09:34:37 -0700 Subject: [PATCH 1/3] style(lint): Add eslint and "lint" npm scripts --- packages/client/.eslintrc.js | 309 ++++++++++++++++++ packages/client/package.json | 2 + packages/client/src/solveLoginChallenge.js | 4 +- .../client/src/solveRegistrationChallenge.js | 2 +- packages/client/src/utils.js | 4 +- packages/client/webpack.config.js | 46 +-- packages/server/.eslintrc.js | 307 +++++++++++++++++ packages/server/package.json | 6 + .../authenticatorKey/parseFidoPackedKey.js | 3 +- packages/server/src/utils.js | 2 +- yarn.lock | 280 +++++++++++++++- 11 files changed, 928 insertions(+), 37 deletions(-) create mode 100644 packages/client/.eslintrc.js create mode 100644 packages/server/.eslintrc.js diff --git a/packages/client/.eslintrc.js b/packages/client/.eslintrc.js new file mode 100644 index 0000000..a5fc47b --- /dev/null +++ b/packages/client/.eslintrc.js @@ -0,0 +1,309 @@ +/* eslint-env node */ +module.exports = { + 'env': { + 'browser': true, + 'commonjs': true, + 'es6': true + }, + 'extends': 'eslint:recommended', + 'globals': { + 'Atomics': 'readonly', + 'SharedArrayBuffer': 'readonly' + }, + 'parserOptions': { + 'ecmaVersion': 2018, + 'sourceType': 'module' + }, + 'rules': { + 'accessor-pairs': 'error', + 'array-bracket-newline': 'error', + 'array-bracket-spacing': [ + 'error', + 'never' + ], + 'array-callback-return': 'error', + 'array-element-newline': 'off', + 'arrow-body-style': 'off', + 'arrow-parens': 'off', + 'arrow-spacing': [ + 'error', + { + 'after': true, + 'before': true + } + ], + 'block-scoped-var': 'error', + 'block-spacing': 'error', + 'brace-style': [ + 'error', + '1tbs' + ], + 'callback-return': 'error', + 'camelcase': 'off', + 'capitalized-comments': 'off', + 'class-methods-use-this': 'error', + 'comma-dangle': 'off', + 'comma-spacing': [ + 'error', + { + 'after': true, + 'before': false + } + ], + 'comma-style': [ + 'error', + 'last' + ], + 'complexity': 'error', + 'computed-property-spacing': [ + 'error', + 'never' + ], + 'consistent-return': [ + 'error', + { + 'treatUndefinedAsUnspecified': false + } + ], + 'consistent-this': 'error', + 'curly': 'error', + 'default-case': 'error', + 'default-param-last': 'error', + 'dot-location': [ + 'error', + 'property' + ], + 'dot-notation': 'error', + 'eol-last': 'error', + 'eqeqeq': 'error', + 'func-call-spacing': 'error', + 'func-name-matching': 'error', + 'func-names': 'error', + 'func-style': 'off', + 'function-call-argument-newline': [ + 'error', + 'consistent' + ], + 'function-paren-newline': ['error', 'multiline-arguments'], + 'generator-star-spacing': 'error', + 'global-require': 'off', + 'guard-for-in': 'error', + 'handle-callback-err': 'error', + 'id-blacklist': 'error', + 'id-length': 'off', + 'id-match': 'error', + 'implicit-arrow-linebreak': 'off', + 'indent': 'error', + 'indent-legacy': 'error', + 'init-declarations': 'off', + 'jsx-quotes': 'error', + 'key-spacing': 'error', + 'keyword-spacing': [ + 'error', + { + 'after': true, + 'before': true + } + ], + 'line-comment-position': 'off', + 'linebreak-style': [ + 'error', + 'unix' + ], + 'lines-around-comment': 'off', + 'lines-around-directive': 'error', + 'lines-between-class-members': 'error', + 'max-classes-per-file': 'error', + 'max-depth': 'error', + 'max-len': 'off', + 'max-lines': 'off', + 'max-lines-per-function': 'off', + 'max-nested-callbacks': 'error', + 'max-params': 'off', + 'max-statements': 'off', + 'max-statements-per-line': 'error', + 'multiline-comment-style': 'off', + 'multiline-ternary': 'error', + 'new-cap': 'error', + 'new-parens': 'error', + 'newline-after-var': 'off', + 'newline-before-return': 'off', + 'newline-per-chained-call': 'error', + 'no-alert': 'error', + 'no-array-constructor': 'error', + 'no-await-in-loop': 'error', + 'no-bitwise': 'off', + 'no-buffer-constructor': 'error', + 'no-caller': 'error', + 'no-catch-shadow': 'error', + 'no-confusing-arrow': 'error', + 'no-console': 'error', + 'no-continue': 'error', + 'no-div-regex': 'error', + 'no-duplicate-imports': 'error', + 'no-else-return': 'error', + 'no-empty-function': 'error', + 'no-eq-null': 'error', + 'no-eval': 'error', + 'no-extend-native': 'error', + 'no-extra-bind': 'error', + 'no-extra-label': 'error', + 'no-extra-parens': 'error', + 'no-floating-decimal': 'error', + 'no-implicit-globals': 'error', + 'no-implied-eval': 'error', + 'no-import-assign': 'error', + 'no-inline-comments': 'off', + 'no-invalid-this': 'error', + 'no-iterator': 'error', + 'no-label-var': 'error', + 'no-labels': 'error', + 'no-lone-blocks': 'error', + 'no-lonely-if': 'error', + 'no-loop-func': 'error', + 'no-magic-numbers': 'off', + 'no-mixed-operators': 'error', + 'no-mixed-requires': 'error', + 'no-multi-assign': 'error', + 'no-multi-spaces': 'error', + 'no-multi-str': 'error', + 'no-multiple-empty-lines': 'error', + 'no-native-reassign': 'error', + 'no-negated-condition': 'error', + 'no-negated-in-lhs': 'error', + 'no-nested-ternary': 'error', + 'no-new': 'error', + 'no-new-func': 'error', + 'no-new-object': 'error', + 'no-new-require': 'error', + 'no-new-wrappers': 'error', + 'no-octal-escape': 'error', + 'no-param-reassign': 'off', + 'no-path-concat': 'error', + 'no-plusplus': 'error', + 'no-process-env': 'error', + 'no-process-exit': 'error', + 'no-proto': 'error', + 'no-restricted-globals': 'error', + 'no-restricted-imports': 'error', + 'no-restricted-modules': 'error', + 'no-restricted-properties': 'error', + 'no-restricted-syntax': 'error', + 'no-return-assign': 'error', + 'no-return-await': 'error', + 'no-script-url': 'error', + 'no-self-compare': 'error', + 'no-sequences': 'error', + 'no-shadow': 'error', + 'no-spaced-func': 'error', + 'no-sync': 'error', + 'no-tabs': 'error', + 'no-template-curly-in-string': 'error', + 'no-ternary': 'error', + 'no-throw-literal': 'error', + 'no-undef-init': 'error', + 'no-undefined': 'off', + 'no-underscore-dangle': 'error', + 'no-unmodified-loop-condition': 'error', + 'no-unneeded-ternary': 'error', + 'no-unused-expressions': 'error', + 'no-use-before-define': 'off', + 'no-useless-call': 'error', + 'no-useless-computed-key': 'error', + 'no-useless-concat': 'error', + 'no-useless-constructor': 'error', + 'no-useless-rename': 'error', + 'no-useless-return': 'error', + 'no-var': 'error', + 'no-void': 'error', + 'no-warning-comments': 'off', + 'no-whitespace-before-property': 'error', + 'nonblock-statement-body-position': 'error', + 'object-curly-newline': 'error', + 'object-curly-spacing': [ + 'error', + 'always' + ], + 'object-property-newline': 'error', + 'object-shorthand': 'error', + 'one-var': 'off', + 'one-var-declaration-per-line': 'error', + 'operator-assignment': 'error', + 'operator-linebreak': 'error', + 'padded-blocks': 'off', + 'padding-line-between-statements': 'error', + 'prefer-arrow-callback': 'error', + 'prefer-const': 'error', + 'prefer-destructuring': 'off', + 'prefer-named-capture-group': 'off', + 'prefer-numeric-literals': 'error', + 'prefer-object-spread': 'error', + 'prefer-promise-reject-errors': 'error', + 'prefer-reflect': 'error', + 'prefer-regex-literals': 'error', + 'prefer-rest-params': 'error', + 'prefer-spread': 'error', + 'prefer-template': 'off', + 'quote-props': 'off', + 'quotes': [ + 'error', + 'single' + ], + 'radix': 'error', + 'require-await': 'off', + 'require-jsdoc': 'off', + 'require-unicode-regexp': 'off', + 'rest-spread-spacing': 'error', + 'semi': 'error', + 'semi-spacing': 'error', + 'semi-style': [ + 'error', + 'last' + ], + 'sort-imports': 'error', + 'sort-keys': 'off', + 'sort-vars': 'error', + 'space-before-blocks': 'error', + 'space-before-function-paren': [ + 'error', { + 'anonymous': 'always', + 'named': 'never', + 'asyncArrow': 'always' + } + ], + 'space-in-parens': [ + 'error', + 'never' + ], + 'space-infix-ops': 'error', + 'space-unary-ops': 'error', + 'spaced-comment': [ + 'error', + 'always' + ], + 'strict': [ + 'error', + 'never' + ], + 'switch-colon-spacing': 'error', + 'symbol-description': 'error', + 'template-curly-spacing': [ + 'error', + 'never' + ], + 'template-tag-spacing': 'error', + 'unicode-bom': [ + 'error', + 'never' + ], + 'valid-jsdoc': 'off', + 'vars-on-top': 'error', + 'wrap-iife': 'error', + 'wrap-regex': 'error', + 'yield-star-spacing': 'error', + 'yoda': [ + 'error', + 'never' + ] + } +}; diff --git a/packages/client/package.json b/packages/client/package.json index 42a9a29..e0966c6 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -10,6 +10,7 @@ }, "scripts": { "build": "webpack --mode=production", + "lint": "eslint --fix --ignore-pattern !.eslintrc.js src", "prepublish": "webpack --mode=production" }, "license": "Apache-2.0", @@ -23,6 +24,7 @@ "@babel/core": "^7.5.5", "@babel/preset-env": "^7.5.5", "babel-loader": "^8.0.6", + "eslint": "^6.5.1", "webpack-cli": "^3.3.1" } } diff --git a/packages/client/src/solveLoginChallenge.js b/packages/client/src/solveLoginChallenge.js index a747646..ff52caa 100644 --- a/packages/client/src/solveLoginChallenge.js +++ b/packages/client/src/solveLoginChallenge.js @@ -1,4 +1,4 @@ -import  { publicKeyCredentialToJSON } from './utils'; +import { publicKeyCredentialToJSON } from './utils'; const loginChallengeToPublicKey = getAssert => { const { Unibabel } = require('unibabel'); @@ -22,4 +22,4 @@ export const solveLoginChallenge = async credentialsChallengeRequest => { }); return publicKeyCredentialToJSON(credentials); -}; \ No newline at end of file +}; diff --git a/packages/client/src/solveRegistrationChallenge.js b/packages/client/src/solveRegistrationChallenge.js index 8a567a9..433d68f 100644 --- a/packages/client/src/solveRegistrationChallenge.js +++ b/packages/client/src/solveRegistrationChallenge.js @@ -24,4 +24,4 @@ export const solveRegistrationChallenge = async credentialsChallengeRequest => { }); return publicKeyCredentialToJSON(credentials); -}; \ No newline at end of file +}; diff --git a/packages/client/src/utils.js b/packages/client/src/utils.js index 3b8639c..d1930da 100644 --- a/packages/client/src/utils.js +++ b/packages/client/src/utils.js @@ -14,7 +14,7 @@ export const publicKeyCredentialToJSON = ( if (item instanceof Object) { const obj = {}; - // tslint:disable-next-line + // eslint-disable-next-line guard-for-in for (const key in item) { obj[key] = publicKeyCredentialToJSON(item[key]); } @@ -23,4 +23,4 @@ export const publicKeyCredentialToJSON = ( } return item; -}; \ No newline at end of file +}; diff --git a/packages/client/webpack.config.js b/packages/client/webpack.config.js index b493e09..deb984a 100644 --- a/packages/client/webpack.config.js +++ b/packages/client/webpack.config.js @@ -1,23 +1,29 @@ +/* eslint-env node */ module.exports = [ - { - module: { - rules: [ - { - test: /\.m?js$/, - exclude: /(node_modules|bower_components)/, - use: { - loader: 'babel-loader', - options: { - presets: [['@babel/preset-env', { useBuiltIns: 'usage', corejs: 3 }]] - } - } + { + module: { + rules: [ + { + test: /\.m?js$/, + exclude: /(node_modules|bower_components)/, + use: { + loader: 'babel-loader', + options: { + presets: [ + [ + '@babel/preset-env', { useBuiltIns: 'usage', + corejs: 3 } + ] + ] + } + } + } + ] + }, + output: { + filename: 'main.js', + libraryTarget: 'umd', + globalObject: 'this' } - ] - }, - output: { - filename: 'main.js', - libraryTarget: 'umd', - globalObject: 'this' } - } -] +]; diff --git a/packages/server/.eslintrc.js b/packages/server/.eslintrc.js new file mode 100644 index 0000000..d2ab635 --- /dev/null +++ b/packages/server/.eslintrc.js @@ -0,0 +1,307 @@ +module.exports = { + 'env': { + 'commonjs': true, + 'es6': true, + 'node': true + }, + 'extends': 'eslint:recommended', + 'globals': { + 'Atomics': 'readonly', + 'SharedArrayBuffer': 'readonly' + }, + 'parserOptions': { + 'ecmaVersion': 2018 + }, + 'rules': { + 'accessor-pairs': 'error', + 'array-bracket-newline': 'error', + 'array-bracket-spacing': [ + 'error', + 'never' + ], + 'array-callback-return': 'error', + 'array-element-newline': 'off', + 'arrow-body-style': 'off', + 'arrow-parens': 'off', + 'arrow-spacing': [ + 'error', + { + 'after': true, + 'before': true + } + ], + 'block-scoped-var': 'error', + 'block-spacing': 'error', + 'brace-style': [ + 'error', + '1tbs' + ], + 'callback-return': 'error', + 'camelcase': 'off', + 'capitalized-comments': 'off', + 'class-methods-use-this': 'error', + 'comma-dangle': 'off', + 'comma-spacing': [ + 'error', + { + 'after': true, + 'before': false + } + ], + 'comma-style': [ + 'error', + 'last' + ], + 'complexity': 'error', + 'computed-property-spacing': [ + 'error', + 'never' + ], + 'consistent-return': [ + 'error', + { + 'treatUndefinedAsUnspecified': false + } + ], + 'consistent-this': 'error', + 'curly': 'error', + 'default-case': 'error', + 'default-param-last': 'error', + 'dot-location': [ + 'error', + 'property' + ], + 'dot-notation': 'error', + 'eol-last': 'error', + 'eqeqeq': 'error', + 'func-call-spacing': 'error', + 'func-name-matching': 'error', + 'func-names': 'error', + 'func-style': 'off', + 'function-call-argument-newline': [ + 'error', + 'consistent' + ], + 'function-paren-newline': ['error', 'multiline-arguments'], + 'generator-star-spacing': 'error', + 'global-require': 'error', + 'guard-for-in': 'error', + 'handle-callback-err': 'error', + 'id-blacklist': 'error', + 'id-length': 'off', + 'id-match': 'error', + 'implicit-arrow-linebreak': 'off', + 'indent': 'error', + 'indent-legacy': 'error', + 'init-declarations': 'off', + 'jsx-quotes': 'error', + 'key-spacing': 'error', + 'keyword-spacing': [ + 'error', + { + 'after': true, + 'before': true + } + ], + 'line-comment-position': 'off', + 'linebreak-style': [ + 'error', + 'unix' + ], + 'lines-around-comment': 'off', + 'lines-around-directive': 'error', + 'lines-between-class-members': 'error', + 'max-classes-per-file': 'error', + 'max-depth': 'error', + 'max-len': 'off', + 'max-lines': 'off', + 'max-lines-per-function': 'off', + 'max-nested-callbacks': 'error', + 'max-params': 'off', + 'max-statements': 'off', + 'max-statements-per-line': 'error', + 'multiline-comment-style': 'off', + 'multiline-ternary': 'error', + 'new-cap': 'error', + 'new-parens': 'error', + 'newline-after-var': 'off', + 'newline-before-return': 'off', + 'newline-per-chained-call': 'error', + 'no-alert': 'error', + 'no-array-constructor': 'error', + 'no-await-in-loop': 'error', + 'no-bitwise': 'off', + 'no-buffer-constructor': 'error', + 'no-caller': 'error', + 'no-catch-shadow': 'error', + 'no-confusing-arrow': 'error', + 'no-console': 'error', + 'no-continue': 'error', + 'no-div-regex': 'error', + 'no-duplicate-imports': 'error', + 'no-else-return': 'error', + 'no-empty-function': 'error', + 'no-eq-null': 'error', + 'no-eval': 'error', + 'no-extend-native': 'error', + 'no-extra-bind': 'error', + 'no-extra-label': 'error', + 'no-extra-parens': 'error', + 'no-floating-decimal': 'error', + 'no-implicit-globals': 'error', + 'no-implied-eval': 'error', + 'no-import-assign': 'error', + 'no-inline-comments': 'off', + 'no-invalid-this': 'error', + 'no-iterator': 'error', + 'no-label-var': 'error', + 'no-labels': 'error', + 'no-lone-blocks': 'error', + 'no-lonely-if': 'error', + 'no-loop-func': 'error', + 'no-magic-numbers': 'off', + 'no-mixed-operators': 'error', + 'no-mixed-requires': 'error', + 'no-multi-assign': 'error', + 'no-multi-spaces': 'error', + 'no-multi-str': 'error', + 'no-multiple-empty-lines': 'error', + 'no-native-reassign': 'error', + 'no-negated-condition': 'error', + 'no-negated-in-lhs': 'error', + 'no-nested-ternary': 'error', + 'no-new': 'error', + 'no-new-func': 'error', + 'no-new-object': 'error', + 'no-new-require': 'error', + 'no-new-wrappers': 'error', + 'no-octal-escape': 'error', + 'no-param-reassign': 'off', + 'no-path-concat': 'error', + 'no-plusplus': 'error', + 'no-process-env': 'error', + 'no-process-exit': 'error', + 'no-proto': 'error', + 'no-restricted-globals': 'error', + 'no-restricted-imports': 'error', + 'no-restricted-modules': 'error', + 'no-restricted-properties': 'error', + 'no-restricted-syntax': 'error', + 'no-return-assign': 'error', + 'no-return-await': 'error', + 'no-script-url': 'error', + 'no-self-compare': 'error', + 'no-sequences': 'error', + 'no-shadow': 'error', + 'no-spaced-func': 'error', + 'no-sync': 'error', + 'no-tabs': 'error', + 'no-template-curly-in-string': 'error', + 'no-ternary': 'error', + 'no-throw-literal': 'error', + 'no-undef-init': 'error', + 'no-undefined': 'off', + 'no-underscore-dangle': 'error', + 'no-unmodified-loop-condition': 'error', + 'no-unneeded-ternary': 'error', + 'no-unused-expressions': 'error', + 'no-use-before-define': 'off', + 'no-useless-call': 'error', + 'no-useless-computed-key': 'error', + 'no-useless-concat': 'error', + 'no-useless-constructor': 'error', + 'no-useless-rename': 'error', + 'no-useless-return': 'error', + 'no-var': 'error', + 'no-void': 'error', + 'no-warning-comments': 'off', + 'no-whitespace-before-property': 'error', + 'nonblock-statement-body-position': 'error', + 'object-curly-newline': 'error', + 'object-curly-spacing': [ + 'error', + 'always' + ], + 'object-property-newline': 'error', + 'object-shorthand': 'error', + 'one-var': 'off', + 'one-var-declaration-per-line': 'error', + 'operator-assignment': 'error', + 'operator-linebreak': 'error', + 'padded-blocks': 'off', + 'padding-line-between-statements': 'error', + 'prefer-arrow-callback': 'error', + 'prefer-const': 'error', + 'prefer-destructuring': 'off', + 'prefer-named-capture-group': 'off', + 'prefer-numeric-literals': 'error', + 'prefer-object-spread': 'error', + 'prefer-promise-reject-errors': 'error', + 'prefer-reflect': 'error', + 'prefer-regex-literals': 'error', + 'prefer-rest-params': 'error', + 'prefer-spread': 'error', + 'prefer-template': 'off', + 'quote-props': 'off', + 'quotes': [ + 'error', + 'single' + ], + 'radix': 'error', + 'require-await': 'off', + 'require-jsdoc': 'off', + 'require-unicode-regexp': 'off', + 'rest-spread-spacing': 'error', + 'semi': 'error', + 'semi-spacing': 'error', + 'semi-style': [ + 'error', + 'last' + ], + 'sort-imports': 'error', + 'sort-keys': 'off', + 'sort-vars': 'error', + 'space-before-blocks': 'error', + 'space-before-function-paren': [ + 'error', { + 'anonymous': 'always', + 'named': 'never', + 'asyncArrow': 'always' + } + ], + 'space-in-parens': [ + 'error', + 'never' + ], + 'space-infix-ops': 'error', + 'space-unary-ops': 'error', + 'spaced-comment': [ + 'error', + 'always' + ], + 'strict': [ + 'error', + 'never' + ], + 'switch-colon-spacing': 'error', + 'symbol-description': 'error', + 'template-curly-spacing': [ + 'error', + 'never' + ], + 'template-tag-spacing': 'error', + 'unicode-bom': [ + 'error', + 'never' + ], + 'valid-jsdoc': 'off', + 'vars-on-top': 'error', + 'wrap-iife': 'error', + 'wrap-regex': 'error', + 'yield-star-spacing': 'error', + 'yoda': [ + 'error', + 'never' + ] + } +}; diff --git a/packages/server/package.json b/packages/server/package.json index dabc221..a71c893 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -8,11 +8,17 @@ "url": "https://github.com:wallix/webauthn.git", "directory": "packages/server" }, + "scripts": { + "lint": "eslint --fix --ignore-pattern !.eslintrc.js src" + }, "engines": { "node": ">=10 <11" }, "dependencies": { "cbor": "^5.0.1", "jsrsasign": "^8.0.12" + }, + "devDependencies": { + "eslint": "^6.5.1" } } diff --git a/packages/server/src/authenticatorKey/parseFidoPackedKey.js b/packages/server/src/authenticatorKey/parseFidoPackedKey.js index 8dfa526..eb42b14 100644 --- a/packages/server/src/authenticatorKey/parseFidoPackedKey.js +++ b/packages/server/src/authenticatorKey/parseFidoPackedKey.js @@ -123,8 +123,7 @@ exports.validateFidoPackedKey = ( ) => { const authenticatorData = parseAttestationData(authenticatorDataBuffer); - // tslint:disable-next-line - if (!(authenticatorData.flags.up)) { + if (!authenticatorData.flags.up) { throw new Error('User was NOT presented durring authentication!'); } diff --git a/packages/server/src/utils.js b/packages/server/src/utils.js index 5cd831d..a4222c2 100644 --- a/packages/server/src/utils.js +++ b/packages/server/src/utils.js @@ -68,7 +68,7 @@ exports.convertASN1toPEM = pkBuffer => { * @return {Buffer} - RAW PKCS encoded public key */ exports.convertCOSEPublicKeyToRawPKCSECDHAKey = cosePublicKey => { - /* + /* +------+-------+-------+---------+----------------------------------+ | name | key | label | type | description | | | type | | | | diff --git a/yarn.lock b/yarn.lock index edce421..b88fb19 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1647,11 +1647,21 @@ accepts@~1.3.7: mime-types "~2.1.24" negotiator "0.6.2" +acorn-jsx@^5.0.2: + version "5.1.0" + resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.1.0.tgz#294adb71b57398b0680015f0a38c563ee1db5384" + integrity sha512-tMUqwBWfLFbJbizRmEcWSLw6HnFzfdJs2sOJEOwwtVPMoH/0Ay+E703oZz78VSXZiiDcZrQ5XKjPIUQixhmgVw== + acorn@^6.2.1: version "6.3.0" resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.3.0.tgz#0087509119ffa4fc0a0041d1e93a417e68cb856e" integrity sha512-/czfa8BwS88b9gWQVhc8eknunSA2DoJpJyTQkhheIf5E48u1N0R4q/YxxsAeqRrmK9TQ/uYfgLDfZo91UlANIA== +acorn@^7.0.0: + version "7.1.0" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.1.0.tgz#949d36f2c292535da602283586c2477c57eb2d6c" + integrity sha512-kL5CuoXA/dgxlBbVrflsflzQ3PAas7RYZB52NOm/6839iVYJgKMJ3cQJD+t2i5+qFa8h3MDpEOJiS64E8JLnSQ== + agent-base@4, agent-base@^4.3.0: version "4.3.0" resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-4.3.0.tgz#8165f01c436009bccad0b1d122f05ed770efc6ee" @@ -1683,7 +1693,7 @@ ajv-keywords@^3.1.0, ajv-keywords@^3.4.1: resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.4.1.tgz#ef916e271c64ac12171fd8384eaae6b2345854da" integrity sha512-RO1ibKvd27e6FEShVFfPALuHI3WjSVNeK5FIsmme/LYRNxjKuNj+Dt7bucLa6NdSv3JcVTyMlm9kGR84z1XpaQ== -ajv@^6.1.0, ajv@^6.10.2, ajv@^6.5.5: +ajv@^6.1.0, ajv@^6.10.0, ajv@^6.10.2, ajv@^6.5.5: version "6.10.2" resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.10.2.tgz#d3cea04d6b017b2894ad69040fec8b623eb4bd52" integrity sha512-TXtUUEYHuaTEbLZWIKUr5pmBuhDLy+8KYtPYdcV8qC+pOZL+NKqYwvWSRrVXHn+ZmRRAu8vJTAznH7Oag6RVRw== @@ -1861,6 +1871,11 @@ assign-symbols@^1.0.0: resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367" integrity sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c= +astral-regex@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-1.0.0.tgz#6c8c3fb827dd43ee3918f27b82782ab7658a6fd9" + integrity sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg== + async-each@^1.0.1: version "1.0.3" resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.3.tgz#b727dbf87d7651602f06f4d4ac387f47d91b0cbf" @@ -2208,6 +2223,11 @@ callsites@^2.0.0: resolved "https://registry.yarnpkg.com/callsites/-/callsites-2.0.0.tgz#06eb84f00eea413da86affefacbffb36093b3c50" integrity sha1-BuuE8A7qQT2oav/vrL/7Ngk7PFA= +callsites@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" + integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== + camelcase-keys@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/camelcase-keys/-/camelcase-keys-2.1.0.tgz#308beeaffdf28119051efa1d932213c91b8f92e7" @@ -2263,7 +2283,7 @@ cbor@^5.0.1: bignumber.js "^9.0.0" nofilter "^1.0.3" -chalk@2.4.2, chalk@^2.0.0, chalk@^2.0.1, chalk@^2.3.1, chalk@^2.4.2: +chalk@2.4.2, chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0, chalk@^2.3.1, chalk@^2.4.2: version "2.4.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== @@ -2719,7 +2739,7 @@ create-hmac@^1.1.0, create-hmac@^1.1.2, create-hmac@^1.1.4: safe-buffer "^5.0.1" sha.js "^2.4.8" -cross-spawn@6.0.5, cross-spawn@^6.0.0: +cross-spawn@6.0.5, cross-spawn@^6.0.0, cross-spawn@^6.0.5: version "6.0.5" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4" integrity sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ== @@ -2818,7 +2838,7 @@ debug@^3.0.0, debug@^3.1.0, debug@^3.2.6: dependencies: ms "^2.1.1" -debug@^4.1.0: +debug@^4.0.1, debug@^4.1.0: version "4.1.1" resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791" integrity sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw== @@ -2858,6 +2878,11 @@ deep-extend@^0.6.0: resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac" integrity sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA== +deep-is@~0.1.3: + version "0.1.3" + resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" + integrity sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ= + defaults@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/defaults/-/defaults-1.0.3.tgz#c656051e9817d9ff08ed881477f3fe4019f3ef7d" @@ -2971,6 +2996,13 @@ dir-glob@^2.2.2: dependencies: path-type "^3.0.0" +doctrine@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-3.0.0.tgz#addebead72a6574db783639dc87a121773973961" + integrity sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w== + dependencies: + esutils "^2.0.2" + domain-browser@^1.1.1: version "1.2.0" resolved "https://registry.yarnpkg.com/domain-browser/-/domain-browser-1.2.0.tgz#3d31f50191a6749dd1375a7f522e823d42e54eda" @@ -3177,11 +3209,90 @@ eslint-scope@^4.0.3: esrecurse "^4.1.0" estraverse "^4.1.1" +eslint-scope@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.0.0.tgz#e87c8887c73e8d1ec84f1ca591645c358bfc8fb9" + integrity sha512-oYrhJW7S0bxAFDvWqzvMPRm6pcgcnWc4QnofCAqRTRfQC0JcwenzGglTtsLyIuuWFfkqDG9vz67cnttSd53djw== + dependencies: + esrecurse "^4.1.0" + estraverse "^4.1.1" + +eslint-utils@^1.4.2: + version "1.4.2" + resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-1.4.2.tgz#166a5180ef6ab7eb462f162fd0e6f2463d7309ab" + integrity sha512-eAZS2sEUMlIeCjBeubdj45dmBHQwPHWyBcT1VSYB7o9x9WRRqKxyUoiXlRjyAwzN7YEzHJlYg0NmzDRWx6GP4Q== + dependencies: + eslint-visitor-keys "^1.0.0" + +eslint-visitor-keys@^1.0.0, eslint-visitor-keys@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.1.0.tgz#e2a82cea84ff246ad6fb57f9bde5b46621459ec2" + integrity sha512-8y9YjtM1JBJU/A9Kc+SbaOV4y29sSWckBwMHa+FGtVj5gN/sbnKDf6xJUl+8g7FAij9LVaP8C24DUiH/f/2Z9A== + +eslint@^6.5.1: + version "6.5.1" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-6.5.1.tgz#828e4c469697d43bb586144be152198b91e96ed6" + integrity sha512-32h99BoLYStT1iq1v2P9uwpyznQ4M2jRiFB6acitKz52Gqn+vPaMDUTB1bYi1WN4Nquj2w+t+bimYUG83DC55A== + dependencies: + "@babel/code-frame" "^7.0.0" + ajv "^6.10.0" + chalk "^2.1.0" + cross-spawn "^6.0.5" + debug "^4.0.1" + doctrine "^3.0.0" + eslint-scope "^5.0.0" + eslint-utils "^1.4.2" + eslint-visitor-keys "^1.1.0" + espree "^6.1.1" + esquery "^1.0.1" + esutils "^2.0.2" + file-entry-cache "^5.0.1" + functional-red-black-tree "^1.0.1" + glob-parent "^5.0.0" + globals "^11.7.0" + ignore "^4.0.6" + import-fresh "^3.0.0" + imurmurhash "^0.1.4" + inquirer "^6.4.1" + 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.14" + minimatch "^3.0.4" + mkdirp "^0.5.1" + natural-compare "^1.4.0" + optionator "^0.8.2" + progress "^2.0.0" + regexpp "^2.0.1" + semver "^6.1.2" + strip-ansi "^5.2.0" + strip-json-comments "^3.0.1" + table "^5.2.3" + text-table "^0.2.0" + v8-compile-cache "^2.0.3" + +espree@^6.1.1: + version "6.1.1" + resolved "https://registry.yarnpkg.com/espree/-/espree-6.1.1.tgz#7f80e5f7257fc47db450022d723e356daeb1e5de" + integrity sha512-EYbr8XZUhWbYCqQRW0duU5LxzL5bETN6AjKBGy1302qqzPaCH10QbRg3Wvco79Z8x9WbiE8HYB4e75xl6qUYvQ== + dependencies: + acorn "^7.0.0" + acorn-jsx "^5.0.2" + eslint-visitor-keys "^1.1.0" + esprima@^4.0.0: version "4.0.1" resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== +esquery@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.0.1.tgz#406c51658b1f5991a5f9b62b1dc25b00e3e5c708" + integrity sha512-SmiyZ5zIWH9VM+SRUReLS5Q8a7GxtRdxEBVZpm98rJM7Sb+A9DVCndXfkeFUd3byderg+EbDkfnevfCwynWaNA== + dependencies: + estraverse "^4.0.0" + esrecurse@^4.1.0: version "4.2.1" resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.2.1.tgz#007a3b9fdbc2b3bb87e4879ea19c92fdbd3942cf" @@ -3189,7 +3300,7 @@ esrecurse@^4.1.0: dependencies: estraverse "^4.1.0" -estraverse@^4.1.0, estraverse@^4.1.1: +estraverse@^4.0.0, estraverse@^4.1.0, estraverse@^4.1.1: version "4.3.0" resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d" integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== @@ -3384,6 +3495,11 @@ fast-json-stable-stringify@^2.0.0: resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz#d5142c0caee6b1189f87d3a76111064f86c8bbf2" integrity sha1-1RQsDK7msRifh9OnYREGT4bIu/I= +fast-levenshtein@~2.0.4: + version "2.0.6" + resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" + integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc= + figgy-pudding@^3.4.1, figgy-pudding@^3.5.1: version "3.5.1" resolved "https://registry.yarnpkg.com/figgy-pudding/-/figgy-pudding-3.5.1.tgz#862470112901c727a0e495a80744bd5baa1d6790" @@ -3396,6 +3512,13 @@ figures@^2.0.0: dependencies: escape-string-regexp "^1.0.5" +file-entry-cache@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-5.0.1.tgz#ca0f6efa6dd3d561333fb14515065c2fafdf439c" + integrity sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g== + dependencies: + flat-cache "^2.0.1" + fill-range@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-4.0.0.tgz#d544811d428f98eb06a63dc402d2403c328c38f7" @@ -3460,6 +3583,20 @@ findup-sync@3.0.0: micromatch "^3.0.4" resolve-dir "^1.0.1" +flat-cache@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-2.0.1.tgz#5d296d6f04bda44a4630a301413bdbc2ec085ec0" + integrity sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA== + dependencies: + flatted "^2.0.0" + rimraf "2.6.3" + write "1.0.3" + +flatted@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/flatted/-/flatted-2.0.1.tgz#69e57caa8f0eacbc281d2e2cb458d46fdb449e08" + integrity sha512-a1hQMktqW9Nmqr5aktAux3JMNqaucxGcjtjWnZLHX7yyPCmlSV3M54nGYbqT8K+0GhF3NBgmJCc3ma+WOgX8Jg== + flush-write-stream@^1.0.0: version "1.1.1" resolved "https://registry.yarnpkg.com/flush-write-stream/-/flush-write-stream-1.1.1.tgz#8dd7d873a1babc207d94ead0c2e0e44276ebf2e8" @@ -3563,6 +3700,11 @@ function-bind@^1.1.1: resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== +functional-red-black-tree@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327" + integrity sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc= + gauge@~2.7.3: version "2.7.4" resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.7.4.tgz#2c03405c7538c39d7eb37b317022e325fb018bf7" @@ -3761,7 +3903,7 @@ global-prefix@^3.0.0: kind-of "^6.0.2" which "^1.3.1" -globals@^11.1.0: +globals@^11.1.0, globals@^11.7.0: version "11.12.0" resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== @@ -4057,7 +4199,7 @@ ignore-walk@^3.0.1: dependencies: minimatch "^3.0.4" -ignore@^4.0.3: +ignore@^4.0.3, ignore@^4.0.6: version "4.0.6" resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc" integrity sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg== @@ -4070,6 +4212,14 @@ import-fresh@^2.0.0: caller-path "^2.0.0" resolve-from "^3.0.0" +import-fresh@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.1.0.tgz#6d33fa1dcef6df930fae003446f33415af905118" + integrity sha512-PpuksHKGt8rXfWEr9m9EHIpgyyaltBy8+eF6GJM0QCAxMgxCfucMF3mjecK2QsJr0amJW7gTqh5/wht0z2UhEQ== + dependencies: + parent-module "^1.0.0" + resolve-from "^4.0.0" + import-lazy@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/import-lazy/-/import-lazy-2.1.0.tgz#05698e3d45c88e8d7e9d92cb0584e77f096f3e43" @@ -4147,7 +4297,7 @@ init-package-json@^1.10.3: validate-npm-package-license "^3.0.1" validate-npm-package-name "^3.0.0" -inquirer@^6.2.0: +inquirer@^6.2.0, inquirer@^6.4.1: version "6.5.2" resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-6.5.2.tgz#ad50942375d036d327ff528c08bd5fab089928ca" integrity sha512-cntlB5ghuB0iuO65Ovoi8ogLHiWGs/5yNrtUcKjFhSSiVeAIVpD7koaSU9RM8mpXw5YDi9RdYXGQMaOURB7ycQ== @@ -4534,6 +4684,11 @@ json-schema@0.2.3: resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" integrity sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM= +json-stable-stringify-without-jsonify@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" + integrity sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE= + json-stringify-safe@^5.0.1, json-stringify-safe@~5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" @@ -4641,6 +4796,14 @@ lerna@^3.14.1: import-local "^2.0.0" npmlog "^4.1.2" +levn@^0.3.0, levn@~0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" + integrity sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4= + dependencies: + prelude-ls "~1.1.2" + type-check "~0.3.2" + load-json-file@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-1.1.0.tgz#956905708d58b4bab4c2261b04f59f31c99374c0" @@ -5179,6 +5342,11 @@ nanomatch@^1.2.9: snapdragon "^0.8.1" to-regex "^3.0.1" +natural-compare@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" + integrity sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc= + needle@^2.2.1: version "2.4.0" resolved "https://registry.yarnpkg.com/needle/-/needle-2.4.0.tgz#6833e74975c444642590e15a750288c5f939b57c" @@ -5529,6 +5697,18 @@ optimist@0.6.x, optimist@^0.6.1: minimist "~0.0.1" wordwrap "~0.0.2" +optionator@^0.8.2: + version "0.8.2" + resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.2.tgz#364c5e409d3f4d6301d6c0b4c05bba50180aeb64" + integrity sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q= + dependencies: + deep-is "~0.1.3" + fast-levenshtein "~2.0.4" + levn "~0.3.0" + prelude-ls "~1.1.2" + type-check "~0.3.2" + wordwrap "~1.0.0" + os-browserify@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/os-browserify/-/os-browserify-0.3.0.tgz#854373c7f5c2315914fc9bfc6bd8238fdda1ec27" @@ -5682,6 +5862,13 @@ parallel-transform@^1.1.0: inherits "^2.0.3" readable-stream "^2.1.5" +parent-module@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/parent-module/-/parent-module-1.0.1.tgz#691d2709e78c79fae3a156622452d00762caaaa2" + integrity sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g== + dependencies: + callsites "^3.0.0" + parse-asn1@^5.0.0: version "5.1.5" resolved "https://registry.yarnpkg.com/parse-asn1/-/parse-asn1-5.1.5.tgz#003271343da58dc94cace494faef3d2147ecea0e" @@ -5874,6 +6061,11 @@ posix-character-classes@^0.1.0: resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab" integrity sha1-AerA/jta9xoqbAL+q7jB/vfgDqs= +prelude-ls@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" + integrity sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ= + prepend-http@^1.0.1: version "1.0.4" resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-1.0.4.tgz#d4f4562b0ce3696e41ac52d0e002e57a635dc6dc" @@ -5894,6 +6086,11 @@ process@^0.11.10: resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" integrity sha1-czIwDoQBYb2j5podHZGn1LwW8YI= +progress@^2.0.0: + version "2.0.3" + resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8" + integrity sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA== + promise-inflight@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/promise-inflight/-/promise-inflight-1.0.1.tgz#98472870bf228132fcbdd868129bad12c3c029e3" @@ -6244,6 +6441,11 @@ regex-not@^1.0.0, regex-not@^1.0.2: extend-shallow "^3.0.2" safe-regex "^1.1.0" +regexpp@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-2.0.1.tgz#8d19d31cf632482b589049f8281f93dbcba4d07f" + integrity sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw== + regexpu-core@^4.6.0: version "4.6.0" resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-4.6.0.tgz#2037c18b327cfce8a6fea2a4ec441f2432afb8b6" @@ -6413,6 +6615,13 @@ rimraf@2, rimraf@^2.5.4, rimraf@^2.6.1, rimraf@^2.6.2, rimraf@^2.6.3: dependencies: glob "^7.1.3" +rimraf@2.6.3: + version "2.6.3" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.3.tgz#b2d104fe0d8fb27cf9e0a1cda8262dd3833c6cab" + integrity sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA== + dependencies: + glob "^7.1.3" + ripemd160@^2.0.0, ripemd160@^2.0.1: version "2.0.2" resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-2.0.2.tgz#a1c1a6f624751577ba5d07914cbc92850585890c" @@ -6495,7 +6704,7 @@ semver-diff@^2.0.0: resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== -semver@^6.0.0, semver@^6.2.0, semver@^6.3.0: +semver@^6.0.0, semver@^6.1.2, semver@^6.2.0, semver@^6.3.0: version "6.3.0" resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== @@ -6599,6 +6808,15 @@ slash@^2.0.0: resolved "https://registry.yarnpkg.com/slash/-/slash-2.0.0.tgz#de552851a1759df3a8f206535442f5ec4ddeab44" integrity sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A== +slice-ansi@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-2.1.0.tgz#cacd7693461a637a5788d92a7dd4fba068e81636" + integrity sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ== + dependencies: + ansi-styles "^3.2.0" + astral-regex "^1.0.0" + is-fullwidth-code-point "^2.0.0" + slide@^1.1.6: version "1.1.6" resolved "https://registry.yarnpkg.com/slide/-/slide-1.1.6.tgz#56eb027d65b4d2dce6cb2e2d32c4d4afc9e1d707" @@ -6949,6 +7167,11 @@ strip-indent@^2.0.0: resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-2.0.0.tgz#5ef8db295d01e6ed6cbf7aab96998d7822527b68" integrity sha1-XvjbKV0B5u1sv3qrlpmNeCJSe2g= +strip-json-comments@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.0.1.tgz#85713975a91fb87bf1b305cca77395e40d2a64a7" + integrity sha512-VTyMAUfdm047mwKl+u79WIdrZxtFtn+nBxHeb844XBQ9uMNTuTHdx2hc5RiAJYqwTj3wc/xe5HLSdJSkJ+WfZw== + strip-json-comments@~2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" @@ -6977,6 +7200,16 @@ supports-color@^5.2.0, supports-color@^5.3.0: dependencies: has-flag "^3.0.0" +table@^5.2.3: + version "5.4.6" + resolved "https://registry.yarnpkg.com/table/-/table-5.4.6.tgz#1292d19500ce3f86053b05f0e8e7e4a3bb21079e" + integrity sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug== + dependencies: + ajv "^6.10.2" + lodash "^4.17.14" + slice-ansi "^2.1.0" + string-width "^3.0.0" + tapable@^1.0.0, tapable@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/tapable/-/tapable-1.1.3.tgz#a1fccc06b58db61fd7a45da2da44f5f3a3e67ba2" @@ -7048,6 +7281,11 @@ text-extensions@^2.0.0: resolved "https://registry.yarnpkg.com/text-extensions/-/text-extensions-2.0.0.tgz#43eabd1b495482fae4a2bf65e5f56c29f69220f6" integrity sha512-F91ZqLgvi1E0PdvmxMgp+gcf6q8fMH7mhdwWfzXnl1k+GbpQDmi8l7DzLC5JTASKbwpY3TfxajAUzAXcv2NmsQ== +text-table@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" + integrity sha1-f17oI66AUgfACvLfSoTsP8+lcLQ= + thenify-all@^1.0.0: version "1.6.0" resolved "https://registry.yarnpkg.com/thenify-all/-/thenify-all-1.6.0.tgz#1a1918d402d8fc3f98fbf234db0bcc8cc10e9726" @@ -7200,6 +7438,13 @@ tweetnacl@^0.14.3, tweetnacl@~0.14.0: resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" integrity sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q= +type-check@~0.3.2: + version "0.3.2" + resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72" + integrity sha1-WITKtRLPHTVeP7eE8wgEsrUg23I= + dependencies: + prelude-ls "~1.1.2" + type-fest@^0.3.0: version "0.3.1" resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.3.1.tgz#63d00d204e059474fe5e1b7c011112bbd1dc29e1" @@ -7438,6 +7683,11 @@ v8-compile-cache@2.0.3: resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.0.3.tgz#00f7494d2ae2b688cfe2899df6ed2c54bef91dbe" integrity sha512-CNmdbwQMBjwr9Gsmohvm0pbL954tJrNzf6gWL3K+QMQf00PF7ERGrEiLgjuU3mKreLC2MeGhUsNV9ybTbLgd3w== +v8-compile-cache@^2.0.3: + version "2.1.0" + resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.1.0.tgz#e14de37b31a6d194f5690d67efc4e7f6fc6ab30e" + integrity sha512-usZBT3PW+LOjM25wbqIlZwPeJV+3OSz3M1k1Ws8snlW39dZyYL9lOGC5FgPVHfk0jKmjiDV8Z0mIbVQPiwFs7g== + validate-npm-package-license@^3.0.1, validate-npm-package-license@^3.0.3: version "3.0.4" resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a" @@ -7601,6 +7851,11 @@ wordwrap@~0.0.2: resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107" integrity sha1-o9XabNXAvAAI03I0u68b7WMFkQc= +wordwrap@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" + integrity sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus= + worker-farm@^1.7.0: version "1.7.0" resolved "https://registry.yarnpkg.com/worker-farm/-/worker-farm-1.7.0.tgz#26a94c5391bbca926152002f69b84a4bf772e5a8" @@ -7671,6 +7926,13 @@ write-pkg@^3.1.0: sort-keys "^2.0.0" write-json-file "^2.2.0" +write@1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/write/-/write-1.0.3.tgz#0800e14523b923a387e415123c865616aae0f5c3" + integrity sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig== + dependencies: + mkdirp "^0.5.1" + xdg-basedir@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/xdg-basedir/-/xdg-basedir-3.0.0.tgz#496b2cc109eca8dbacfe2dc72b603c17c5870ad4" From 424fdf67c8a27a8d7137ed7bbe61efac91ab430f Mon Sep 17 00:00:00 2001 From: Eric Heikes Date: Fri, 15 Nov 2019 16:52:49 -0800 Subject: [PATCH 2/3] Use Prettier for code formatting --- packages/client/.eslintrc.js | 2 +- packages/client/.prettierrc | 4 + packages/client/package.json | 3 + packages/client/src/solveLoginChallenge.js | 6 +- .../client/src/solveRegistrationChallenge.js | 6 +- packages/client/src/utils.js | 4 +- packages/server/.eslintrc.js | 2 +- packages/server/.prettierrc | 4 + packages/server/package.json | 5 +- packages/server/src/authenticatorKey/index.js | 5 +- .../authenticatorKey/parseFidoPackedKey.js | 14 +- .../src/authenticatorKey/parseFidoU2FKey.js | 16 +- .../server/src/getChallengeFromClientData.js | 2 +- packages/server/src/index.js | 11 +- packages/server/src/login.js | 12 +- packages/server/src/registration.js | 30 ++- packages/server/src/utils.js | 10 +- packages/server/src/validation.js | 3 +- yarn.lock | 203 ++++++++++++++---- 19 files changed, 253 insertions(+), 89 deletions(-) create mode 100644 packages/client/.prettierrc create mode 100644 packages/server/.prettierrc diff --git a/packages/client/.eslintrc.js b/packages/client/.eslintrc.js index a5fc47b..3dbade7 100644 --- a/packages/client/.eslintrc.js +++ b/packages/client/.eslintrc.js @@ -5,7 +5,7 @@ module.exports = { 'commonjs': true, 'es6': true }, - 'extends': 'eslint:recommended', + 'extends': ['eslint:recommended', 'plugin:prettier/recommended'], 'globals': { 'Atomics': 'readonly', 'SharedArrayBuffer': 'readonly' diff --git a/packages/client/.prettierrc b/packages/client/.prettierrc new file mode 100644 index 0000000..96c36f5 --- /dev/null +++ b/packages/client/.prettierrc @@ -0,0 +1,4 @@ +{ + "singleQuote": true, + "tabWidth": 4 +} diff --git a/packages/client/package.json b/packages/client/package.json index e0966c6..6c0a185 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -25,6 +25,9 @@ "@babel/preset-env": "^7.5.5", "babel-loader": "^8.0.6", "eslint": "^6.5.1", + "eslint-config-prettier": "^6.5.0", + "eslint-plugin-prettier": "^3.1.1", + "prettier": "^1.19.1", "webpack-cli": "^3.3.1" } } diff --git a/packages/client/src/solveLoginChallenge.js b/packages/client/src/solveLoginChallenge.js index ff52caa..9fab6e8 100644 --- a/packages/client/src/solveLoginChallenge.js +++ b/packages/client/src/solveLoginChallenge.js @@ -8,8 +8,8 @@ const loginChallengeToPublicKey = getAssert => { challenge: Unibabel.base64ToBuffer(getAssert.challenge), allowCredentials: getAssert.allowCredentials.map(allowCredential => ({ ...allowCredential, - id: Unibabel.base64ToBuffer(allowCredential.id), - })), + id: Unibabel.base64ToBuffer(allowCredential.id) + })) }; }; @@ -18,7 +18,7 @@ export const solveLoginChallenge = async credentialsChallengeRequest => { // @ts-ignore const credentials = await navigator.credentials.get({ - publicKey, + publicKey }); return publicKeyCredentialToJSON(credentials); diff --git a/packages/client/src/solveRegistrationChallenge.js b/packages/client/src/solveRegistrationChallenge.js index 433d68f..3366082 100644 --- a/packages/client/src/solveRegistrationChallenge.js +++ b/packages/client/src/solveRegistrationChallenge.js @@ -10,8 +10,8 @@ const registrationChallengeToPublicKey = credentialsChallengeRequest => { ), user: { ...credentialsChallengeRequest.user, - id: Unibabel.base64ToBuffer(credentialsChallengeRequest.user.id), - }, + id: Unibabel.base64ToBuffer(credentialsChallengeRequest.user.id) + } }; }; @@ -20,7 +20,7 @@ export const solveRegistrationChallenge = async credentialsChallengeRequest => { credentialsChallengeRequest ); const credentials = await navigator.credentials.create({ - publicKey, + publicKey }); return publicKeyCredentialToJSON(credentials); diff --git a/packages/client/src/utils.js b/packages/client/src/utils.js index d1930da..5b4ec20 100644 --- a/packages/client/src/utils.js +++ b/packages/client/src/utils.js @@ -1,6 +1,4 @@ -export const publicKeyCredentialToJSON = ( - item -) => { +export const publicKeyCredentialToJSON = item => { if (item instanceof Array) { return item.map(publicKeyCredentialToJSON); } diff --git a/packages/server/.eslintrc.js b/packages/server/.eslintrc.js index d2ab635..7edbfc8 100644 --- a/packages/server/.eslintrc.js +++ b/packages/server/.eslintrc.js @@ -4,7 +4,7 @@ module.exports = { 'es6': true, 'node': true }, - 'extends': 'eslint:recommended', + 'extends': ['eslint:recommended', 'plugin:prettier/recommended'], 'globals': { 'Atomics': 'readonly', 'SharedArrayBuffer': 'readonly' diff --git a/packages/server/.prettierrc b/packages/server/.prettierrc new file mode 100644 index 0000000..96c36f5 --- /dev/null +++ b/packages/server/.prettierrc @@ -0,0 +1,4 @@ +{ + "singleQuote": true, + "tabWidth": 4 +} diff --git a/packages/server/package.json b/packages/server/package.json index a71c893..ef9ea2c 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -19,6 +19,9 @@ "jsrsasign": "^8.0.12" }, "devDependencies": { - "eslint": "^6.5.1" + "eslint": "^6.5.1", + "eslint-config-prettier": "^6.5.0", + "eslint-plugin-prettier": "^3.1.1", + "prettier": "^1.19.1" } } diff --git a/packages/server/src/authenticatorKey/index.js b/packages/server/src/authenticatorKey/index.js index faf3a5d..5074ba3 100644 --- a/packages/server/src/authenticatorKey/index.js +++ b/packages/server/src/authenticatorKey/index.js @@ -8,7 +8,10 @@ exports.getAuthenticatorKeyId = key_id => { }; exports.parseAuthenticatorKey = credentials => { - const authenticatorKeyBuffer = Buffer.from(credentials.attestationObject, 'base64'); + const authenticatorKeyBuffer = Buffer.from( + credentials.attestationObject, + 'base64' + ); const authenticatorKey = decodeAllSync(authenticatorKeyBuffer)[0]; diff --git a/packages/server/src/authenticatorKey/parseFidoPackedKey.js b/packages/server/src/authenticatorKey/parseFidoPackedKey.js index eb42b14..eae7e14 100644 --- a/packages/server/src/authenticatorKey/parseFidoPackedKey.js +++ b/packages/server/src/authenticatorKey/parseFidoPackedKey.js @@ -4,7 +4,7 @@ const { createVerify } = require('crypto'); const { hash, convertASN1toPEM, - convertCOSEPublicKeyToRawPKCSECDHAKey, + convertCOSEPublicKeyToRawPKCSECDHAKey } = require('../utils'); const getCertificateInfo = certificate => { @@ -26,7 +26,7 @@ const getCertificateInfo = certificate => { return { subject, version, - basicConstraintsCA, + basicConstraintsCA }; }; @@ -41,7 +41,7 @@ const parseAttestationData = buffer => { uv: !!(flagsInt & 0x04), at: !!(flagsInt & 0x40), ed: !!(flagsInt & 0x80), - flagsInt, + flagsInt }; const counterBuf = buffer.slice(0, 4); @@ -71,7 +71,7 @@ const parseAttestationData = buffer => { counterBuf, aaguid, credID, - COSEPublicKey, + COSEPublicKey }; }; @@ -84,7 +84,7 @@ exports.parseFidoPackedKey = (authenticatorKey, clientDataJSON) => { ); const signatureBaseBuffer = Buffer.concat([ authenticatorKey.authData, - clientDataHash, + clientDataHash ]); const signatureBuffer = authenticatorKey.attStmt.sig; @@ -111,7 +111,7 @@ exports.parseFidoPackedKey = (authenticatorKey, clientDataJSON) => { fmt: 'packed', publicKey: publicKey.toString('base64'), counter: authenticatorData.counter, - credID: authenticatorData.credID.toString('base64'), + credID: authenticatorData.credID.toString('base64') }; }; @@ -133,7 +133,7 @@ exports.validateFidoPackedKey = ( ); const signatureBaseBuffer = Buffer.concat([ authenticatorDataBuffer, - clientDataHash, + clientDataHash ]); const publicKey = convertASN1toPEM(Buffer.from(key.publicKey, 'base64')); diff --git a/packages/server/src/authenticatorKey/parseFidoU2FKey.js b/packages/server/src/authenticatorKey/parseFidoU2FKey.js index 876b038..cead898 100644 --- a/packages/server/src/authenticatorKey/parseFidoU2FKey.js +++ b/packages/server/src/authenticatorKey/parseFidoU2FKey.js @@ -3,7 +3,7 @@ const { hash, convertASN1toPEM, verifySignature, - convertCOSEPublicKeyToRawPKCSECDHAKey, + convertCOSEPublicKeyToRawPKCSECDHAKey } = require('../utils'); exports.parseFidoU2FKey = (authenticatorKey, clientDataJSON) => { @@ -26,7 +26,7 @@ exports.parseFidoU2FKey = (authenticatorKey, clientDataJSON) => { authenticatorData.rpIdHash, clientDataHash, authenticatorData.credID, - publicKey, + publicKey ]); const PEMCertificate = convertASN1toPEM(authenticatorKey.attStmt.x5c[0]); @@ -39,7 +39,7 @@ exports.parseFidoU2FKey = (authenticatorKey, clientDataJSON) => { fmt: 'fido-u2f', publicKey: publicKey.toString('base64'), counter: authenticatorData.counter, - credID: authenticatorData.credID.toString('base64'), + credID: authenticatorData.credID.toString('base64') }; } @@ -66,7 +66,7 @@ exports.validateFidoU2FKey = ( authenticatorData.rpIdHash, authenticatorData.flagsBuf, authenticatorData.counterBuf, - clientDataHash, + clientDataHash ]); const publicKey = convertASN1toPEM(Buffer.from(key.publicKey, 'base64')); @@ -75,7 +75,7 @@ exports.validateFidoU2FKey = ( return verifySignature(signature, signatureBase, publicKey); }; -const parseAttestationData = (buffer) => { +const parseAttestationData = buffer => { const rpIdHash = buffer.slice(0, 32); buffer = buffer.slice(32); const flagsBuf = buffer.slice(0, 1); @@ -101,11 +101,11 @@ const parseAttestationData = (buffer) => { counterBuf, aaguid, credID, - COSEPublicKey, + COSEPublicKey }; }; -const parseAssertionData = (buffer) => { +const parseAssertionData = buffer => { const rpIdHash = buffer.slice(0, 32); buffer = buffer.slice(32); const flagsBuf = buffer.slice(0, 1); @@ -120,6 +120,6 @@ const parseAssertionData = (buffer) => { flagsBuf, flags, counter, - counterBuf, + counterBuf }; }; diff --git a/packages/server/src/getChallengeFromClientData.js b/packages/server/src/getChallengeFromClientData.js index 34a2550..46c43d9 100644 --- a/packages/server/src/getChallengeFromClientData.js +++ b/packages/server/src/getChallengeFromClientData.js @@ -1,4 +1,4 @@ -exports.getChallengeFromClientData = (clientDataJSON) => { +exports.getChallengeFromClientData = clientDataJSON => { const clientDataBuffer = Buffer.from(clientDataJSON, 'base64'); const clientData = JSON.parse(clientDataBuffer.toString()); const challenge = Buffer.from(clientData.challenge, 'base64'); diff --git a/packages/server/src/index.js b/packages/server/src/index.js index 9b9d910..508338a 100644 --- a/packages/server/src/index.js +++ b/packages/server/src/index.js @@ -1,5 +1,12 @@ -const { generateRegistrationChallenge, parseRegisterRequest } = require('./registration'); -const { generateLoginChallenge, parseLoginRequest, verifyAuthenticatorAssertion } = require('./login'); +const { + generateRegistrationChallenge, + parseRegisterRequest +} = require('./registration'); +const { + generateLoginChallenge, + parseLoginRequest, + verifyAuthenticatorAssertion +} = require('./login'); exports.generateRegistrationChallenge = generateRegistrationChallenge; exports.generateLoginChallenge = generateLoginChallenge; diff --git a/packages/server/src/login.js b/packages/server/src/login.js index fe57776..fb35921 100644 --- a/packages/server/src/login.js +++ b/packages/server/src/login.js @@ -1,6 +1,8 @@ const { randomBase64Buffer, parseBrowserBufferString } = require('./utils'); const { getChallengeFromClientData } = require('./getChallengeFromClientData'); -const { validateFidoPackedKey } = require('./authenticatorKey/parseFidoPackedKey'); +const { + validateFidoPackedKey +} = require('./authenticatorKey/parseFidoPackedKey'); const { validateFidoU2FKey } = require('./authenticatorKey/parseFidoU2FKey'); const { validateLoginCredentials } = require('./validation'); @@ -9,16 +11,16 @@ exports.generateLoginChallenge = key => { const allowCredentials = keys.map(({ credID }) => ({ type: 'public-key', id: credID, - transports: ['usb', 'nfc', 'ble'], + transports: ['usb', 'nfc', 'ble'] })); return { challenge: randomBase64Buffer(32), - allowCredentials, + allowCredentials }; }; -exports.parseLoginRequest = (body) => { +exports.parseLoginRequest = body => { if (!validateLoginCredentials(body)) { return {}; } @@ -27,7 +29,7 @@ exports.parseLoginRequest = (body) => { return { challenge, - keyId, + keyId }; }; diff --git a/packages/server/src/registration.js b/packages/server/src/registration.js index fb39a4f..e8e8ce4 100644 --- a/packages/server/src/registration.js +++ b/packages/server/src/registration.js @@ -6,7 +6,7 @@ const { parseFidoU2FKey } = require('./authenticatorKey/parseFidoU2FKey'); const { parseFidoPackedKey } = require('./authenticatorKey/parseFidoPackedKey'); const { validateRegistrationCredentials } = require('./validation'); -const parseAuthenticatorKey = (webAuthnResponse) => { +const parseAuthenticatorKey = webAuthnResponse => { const authenticatorKeyBuffer = Buffer.from( webAuthnResponse.attestationObject, 'base64' @@ -30,7 +30,7 @@ const parseAuthenticatorKey = (webAuthnResponse) => { return undefined; }; -exports.parseRegisterRequest = (body) => { +exports.parseRegisterRequest = body => { if (!validateRegistrationCredentials(body)) { return {}; } @@ -39,17 +39,33 @@ exports.parseRegisterRequest = (body) => { return { challenge, - key, + key }; }; -exports.generateRegistrationChallenge = ({ relyingParty, user, attestation = 'direct' } = {}) => { - if (!relyingParty || !relyingParty.name || typeof relyingParty.name !== 'string') { +exports.generateRegistrationChallenge = ({ + relyingParty, + user, + attestation = 'direct' +} = {}) => { + if ( + !relyingParty || + !relyingParty.name || + typeof relyingParty.name !== 'string' + ) { throw new Error('The typeof relyingParty.name should be a string'); } - if (!user || !user.id || !user.name || typeof user.id !== 'string' || typeof user.name !== 'string') { - throw new Error('The user should have an id (string) and a name (string)'); + if ( + !user || + !user.id || + !user.name || + typeof user.id !== 'string' || + typeof user.name !== 'string' + ) { + throw new Error( + 'The user should have an id (string) and a name (string)' + ); } return { diff --git a/packages/server/src/utils.js b/packages/server/src/utils.js index a4222c2..90b5814 100644 --- a/packages/server/src/utils.js +++ b/packages/server/src/utils.js @@ -41,7 +41,7 @@ exports.convertASN1toPEM = pkBuffer => { '3059301306072a8648ce3d020106082a8648ce3d030107034200', 'hex' ), - pkBuffer, + pkBuffer ]); type = 'PUBLIC KEY'; @@ -96,11 +96,7 @@ exports.convertCOSEPublicKeyToRawPKCSECDHAKey = cosePublicKey => { /** * Takes signature, data and PEM public key and tries to verify signature */ -exports.verifySignature = ( - signature, - data, - publicKey -) => { +exports.verifySignature = (signature, data, publicKey) => { return createVerify('SHA256') .update(data) .verify(publicKey, signature); @@ -113,7 +109,7 @@ exports.randomBase64Buffer = (len = 32) => { }; // parse base64 from the browser -exports.parseBrowserBufferString = (key_id) => { +exports.parseBrowserBufferString = key_id => { const buffer = Buffer.from(key_id, 'base64'); return buffer.toString('base64'); }; diff --git a/packages/server/src/validation.js b/packages/server/src/validation.js index df2226e..598711d 100644 --- a/packages/server/src/validation.js +++ b/packages/server/src/validation.js @@ -14,7 +14,8 @@ const validateCredentials = credentials => { }; exports.validateRegistrationCredentials = credentials => - validateCredentials(credentials) && !!credentials.response.attestationObject; + validateCredentials(credentials) && + !!credentials.response.attestationObject; exports.validateLoginCredentials = credentials => validateCredentials(credentials) && credentials.response.authenticatorData; diff --git a/yarn.lock b/yarn.lock index b88fb19..22a5752 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1647,7 +1647,7 @@ accepts@~1.3.7: mime-types "~2.1.24" negotiator "0.6.2" -acorn-jsx@^5.0.2: +acorn-jsx@^5.1.0: version "5.1.0" resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.1.0.tgz#294adb71b57398b0680015f0a38c563ee1db5384" integrity sha512-tMUqwBWfLFbJbizRmEcWSLw6HnFzfdJs2sOJEOwwtVPMoH/0Ay+E703oZz78VSXZiiDcZrQ5XKjPIUQixhmgVw== @@ -1657,7 +1657,7 @@ acorn@^6.2.1: resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.3.0.tgz#0087509119ffa4fc0a0041d1e93a417e68cb856e" integrity sha512-/czfa8BwS88b9gWQVhc8eknunSA2DoJpJyTQkhheIf5E48u1N0R4q/YxxsAeqRrmK9TQ/uYfgLDfZo91UlANIA== -acorn@^7.0.0: +acorn@^7.1.0: version "7.1.0" resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.1.0.tgz#949d36f2c292535da602283586c2477c57eb2d6c" integrity sha512-kL5CuoXA/dgxlBbVrflsflzQ3PAas7RYZB52NOm/6839iVYJgKMJ3cQJD+t2i5+qFa8h3MDpEOJiS64E8JLnSQ== @@ -1715,6 +1715,13 @@ ansi-escapes@^3.2.0: resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-3.2.0.tgz#8780b98ff9dbf5638152d1f1fe5c1d7b4442976b" integrity sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ== +ansi-escapes@^4.2.1: + version "4.2.1" + resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.2.1.tgz#4dccdb846c3eee10f6d64dea66273eab90c37228" + integrity sha512-Cg3ymMAdN10wOk/VYfLV7KCQyv7EDirJ64500sU7n9UlmioEtDuU5Gd+hj73hXSU/ex7tHJSssmyftDdkMLO8Q== + dependencies: + type-fest "^0.5.2" + ansi-regex@^2.0.0: version "2.1.1" resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" @@ -1730,6 +1737,11 @@ ansi-regex@^4.1.0: resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.1.0.tgz#8b9f8f08cf1acb843756a839ca8c7e3168c51997" integrity sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg== +ansi-regex@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.0.tgz#388539f55179bf39339c81af30a654d69f87cb75" + integrity sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg== + ansi-styles@^3.2.0, ansi-styles@^3.2.1: version "3.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" @@ -2368,6 +2380,13 @@ cli-cursor@^2.1.0: dependencies: restore-cursor "^2.0.0" +cli-cursor@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-3.1.0.tgz#264305a7ae490d1d03bf0c9ba7c925d1753af307" + integrity sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw== + dependencies: + restore-cursor "^3.1.0" + cli-width@^2.0.0: version "2.2.0" resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.2.0.tgz#ff19ede8a9a5e579324147b0c11f0fbcbabed639" @@ -3088,6 +3107,11 @@ emoji-regex@^7.0.1: resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-7.0.3.tgz#933a04052860c85e83c122479c4748a8e4c72156" integrity sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA== +emoji-regex@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" + integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== + emojis-list@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-2.1.0.tgz#4daa4d9db00f9819880c79fa457ae5b09a1fd389" @@ -3201,6 +3225,20 @@ escape-string-regexp@^1.0.5: resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= +eslint-config-prettier@^6.5.0: + version "6.5.0" + resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-6.5.0.tgz#aaf9a495e2a816865e541bfdbb73a65cc162b3eb" + integrity sha512-cjXp8SbO9VFGW/Z7mbTydqS9to8Z58E5aYhj3e1+Hx7lS9s6gL5ILKNpCqZAFOVYRcSkWPFYljHrEh8QFEK5EQ== + dependencies: + get-stdin "^6.0.0" + +eslint-plugin-prettier@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-3.1.1.tgz#507b8562410d02a03f0ddc949c616f877852f2ba" + integrity sha512-A+TZuHZ0KU0cnn56/9mfR7/KjUJ9QNVXUhwvRFSR7PGPe0zQR6PTkmyqg1AtUUEOzTqeRsUwyKFh0oVZKVCrtA== + dependencies: + prettier-linter-helpers "^1.0.0" + eslint-scope@^4.0.3: version "4.0.3" resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-4.0.3.tgz#ca03833310f6889a3264781aa82e63eb9cfe7848" @@ -3217,22 +3255,22 @@ eslint-scope@^5.0.0: esrecurse "^4.1.0" estraverse "^4.1.1" -eslint-utils@^1.4.2: - version "1.4.2" - resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-1.4.2.tgz#166a5180ef6ab7eb462f162fd0e6f2463d7309ab" - integrity sha512-eAZS2sEUMlIeCjBeubdj45dmBHQwPHWyBcT1VSYB7o9x9WRRqKxyUoiXlRjyAwzN7YEzHJlYg0NmzDRWx6GP4Q== +eslint-utils@^1.4.3: + version "1.4.3" + resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-1.4.3.tgz#74fec7c54d0776b6f67e0251040b5806564e981f" + integrity sha512-fbBN5W2xdY45KulGXmLHZ3c3FHfVYmKg0IrAKGOkT/464PQsx2UeIzfz1RmEci+KLm1bBaAzZAh8+/E+XAeZ8Q== dependencies: - eslint-visitor-keys "^1.0.0" + eslint-visitor-keys "^1.1.0" -eslint-visitor-keys@^1.0.0, eslint-visitor-keys@^1.1.0: +eslint-visitor-keys@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.1.0.tgz#e2a82cea84ff246ad6fb57f9bde5b46621459ec2" integrity sha512-8y9YjtM1JBJU/A9Kc+SbaOV4y29sSWckBwMHa+FGtVj5gN/sbnKDf6xJUl+8g7FAij9LVaP8C24DUiH/f/2Z9A== eslint@^6.5.1: - version "6.5.1" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-6.5.1.tgz#828e4c469697d43bb586144be152198b91e96ed6" - integrity sha512-32h99BoLYStT1iq1v2P9uwpyznQ4M2jRiFB6acitKz52Gqn+vPaMDUTB1bYi1WN4Nquj2w+t+bimYUG83DC55A== + version "6.6.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-6.6.0.tgz#4a01a2fb48d32aacef5530ee9c5a78f11a8afd04" + integrity sha512-PpEBq7b6qY/qrOmpYQ/jTMDYfuQMELR4g4WI1M/NaSDDD/bdcMb+dj4Hgks7p41kW2caXsPsEZAEAyAgjVVC0g== dependencies: "@babel/code-frame" "^7.0.0" ajv "^6.10.0" @@ -3241,9 +3279,9 @@ eslint@^6.5.1: debug "^4.0.1" doctrine "^3.0.0" eslint-scope "^5.0.0" - eslint-utils "^1.4.2" + eslint-utils "^1.4.3" eslint-visitor-keys "^1.1.0" - espree "^6.1.1" + espree "^6.1.2" esquery "^1.0.1" esutils "^2.0.2" file-entry-cache "^5.0.1" @@ -3253,7 +3291,7 @@ eslint@^6.5.1: ignore "^4.0.6" import-fresh "^3.0.0" imurmurhash "^0.1.4" - inquirer "^6.4.1" + inquirer "^7.0.0" is-glob "^4.0.0" js-yaml "^3.13.1" json-stable-stringify-without-jsonify "^1.0.1" @@ -3272,13 +3310,13 @@ eslint@^6.5.1: text-table "^0.2.0" v8-compile-cache "^2.0.3" -espree@^6.1.1: - version "6.1.1" - resolved "https://registry.yarnpkg.com/espree/-/espree-6.1.1.tgz#7f80e5f7257fc47db450022d723e356daeb1e5de" - integrity sha512-EYbr8XZUhWbYCqQRW0duU5LxzL5bETN6AjKBGy1302qqzPaCH10QbRg3Wvco79Z8x9WbiE8HYB4e75xl6qUYvQ== +espree@^6.1.2: + version "6.1.2" + resolved "https://registry.yarnpkg.com/espree/-/espree-6.1.2.tgz#6c272650932b4f91c3714e5e7b5f5e2ecf47262d" + integrity sha512-2iUPuuPP+yW1PZaMSDM9eyVf8D5P0Hi8h83YtZ5bPc/zHYjII5khoixIUTMO794NOY8F/ThF1Bo8ncZILarUTA== dependencies: - acorn "^7.0.0" - acorn-jsx "^5.0.2" + acorn "^7.1.0" + acorn-jsx "^5.1.0" eslint-visitor-keys "^1.1.0" esprima@^4.0.0: @@ -3478,6 +3516,11 @@ fast-deep-equal@^2.0.1: resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz#7b05218ddf9667bf7f370bf7fdb2cb15fdd0aa49" integrity sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk= +fast-diff@^1.1.2: + version "1.2.0" + resolved "https://registry.yarnpkg.com/fast-diff/-/fast-diff-1.2.0.tgz#73ee11982d86caaf7959828d519cfe927fac5f03" + integrity sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w== + fast-glob@^2.2.6: version "2.2.7" resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-2.2.7.tgz#6953857c3afa475fff92ee6015d52da70a4cd39d" @@ -3495,7 +3538,7 @@ fast-json-stable-stringify@^2.0.0: resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz#d5142c0caee6b1189f87d3a76111064f86c8bbf2" integrity sha1-1RQsDK7msRifh9OnYREGT4bIu/I= -fast-levenshtein@~2.0.4: +fast-levenshtein@~2.0.6: version "2.0.6" resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc= @@ -3512,6 +3555,13 @@ figures@^2.0.0: dependencies: escape-string-regexp "^1.0.5" +figures@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/figures/-/figures-3.1.0.tgz#4b198dd07d8d71530642864af2d45dd9e459c4ec" + integrity sha512-ravh8VRXqHuMvZt/d8GblBeqDMkdJMBdv/2KntFH+ra5MXkO7nxNKpzQ3n6QD/2da1kH0aWmNISdvhM7gl2gVg== + dependencies: + escape-string-regexp "^1.0.5" + file-entry-cache@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-5.0.1.tgz#ca0f6efa6dd3d561333fb14515065c2fafdf439c" @@ -3755,6 +3805,11 @@ get-stdin@^4.0.1: resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-4.0.1.tgz#b968c6b0a04384324902e8bf1a5df32579a450fe" integrity sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4= +get-stdin@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-6.0.0.tgz#9e09bf712b360ab9225e812048f71fde9c89657b" + integrity sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g== + get-stream@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14" @@ -4213,9 +4268,9 @@ import-fresh@^2.0.0: resolve-from "^3.0.0" import-fresh@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.1.0.tgz#6d33fa1dcef6df930fae003446f33415af905118" - integrity sha512-PpuksHKGt8rXfWEr9m9EHIpgyyaltBy8+eF6GJM0QCAxMgxCfucMF3mjecK2QsJr0amJW7gTqh5/wht0z2UhEQ== + version "3.2.1" + resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.2.1.tgz#633ff618506e793af5ac91bf48b72677e15cbe66" + integrity sha512-6e1q1cnWP2RXD9/keSkxHScg508CdXqXWgWBaETNhyuBFz+kUZlKboh+ISK+bU++DmbHimVBrOz/zzPe0sZ3sQ== dependencies: parent-module "^1.0.0" resolve-from "^4.0.0" @@ -4297,7 +4352,7 @@ init-package-json@^1.10.3: validate-npm-package-license "^3.0.1" validate-npm-package-name "^3.0.0" -inquirer@^6.2.0, inquirer@^6.4.1: +inquirer@^6.2.0: version "6.5.2" resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-6.5.2.tgz#ad50942375d036d327ff528c08bd5fab089928ca" integrity sha512-cntlB5ghuB0iuO65Ovoi8ogLHiWGs/5yNrtUcKjFhSSiVeAIVpD7koaSU9RM8mpXw5YDi9RdYXGQMaOURB7ycQ== @@ -4316,6 +4371,25 @@ inquirer@^6.2.0, inquirer@^6.4.1: strip-ansi "^5.1.0" through "^2.3.6" +inquirer@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-7.0.0.tgz#9e2b032dde77da1db5db804758b8fea3a970519a" + integrity sha512-rSdC7zelHdRQFkWnhsMu2+2SO41mpv2oF2zy4tMhmiLWkcKbOAs87fWAJhVXttKVwhdZvymvnuM95EyEXg2/tQ== + dependencies: + ansi-escapes "^4.2.1" + chalk "^2.4.2" + cli-cursor "^3.1.0" + cli-width "^2.0.0" + external-editor "^3.0.3" + figures "^3.0.0" + lodash "^4.17.15" + mute-stream "0.0.8" + run-async "^2.2.0" + rxjs "^6.4.0" + string-width "^4.1.0" + strip-ansi "^5.1.0" + through "^2.3.6" + interpret@1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.2.0.tgz#d5061a6224be58e8083985f5014d844359576296" @@ -4471,6 +4545,11 @@ is-fullwidth-code-point@^2.0.0: resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" integrity sha1-o7MKXE8ZkYMWeqq5O+764937ZU8= +is-fullwidth-code-point@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" + integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== + is-glob@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-3.1.0.tgz#7ba5ae24217804ac70707b96922567486cc3e84a" @@ -4916,7 +4995,7 @@ lodash.uniq@^4.5.0: resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773" integrity sha1-0CJTc662Uq3BvILklFM5qEJ1R3M= -lodash@^4.17.12, lodash@^4.17.13, lodash@^4.17.14, lodash@^4.2.1: +lodash@^4.17.12, lodash@^4.17.13, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.2.1: version "4.17.15" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548" integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A== @@ -5161,7 +5240,7 @@ mimic-fn@^1.0.0: resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.2.0.tgz#820c86a39334640e99516928bd03fca88057d022" integrity sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ== -mimic-fn@^2.0.0: +mimic-fn@^2.0.0, mimic-fn@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== @@ -5306,7 +5385,7 @@ mute-stream@0.0.7: resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab" integrity sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s= -mute-stream@~0.0.4: +mute-stream@0.0.8, mute-stream@~0.0.4: version "0.0.8" resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.8.tgz#1630c42b2251ff81e2a283de96a5497ea92e5e0d" integrity sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA== @@ -5684,6 +5763,13 @@ onetime@^2.0.0: dependencies: mimic-fn "^1.0.0" +onetime@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/onetime/-/onetime-5.1.0.tgz#fff0f3c91617fe62bb50189636e99ac8a6df7be5" + integrity sha512-5NcSkPHhwTVFIQN+TUqXoS5+dlElHXdpAWu9I0HP20YOtIi+aZ0Ct82jdlILDxjLEAWwvm+qj1m6aEtsDVmm6Q== + dependencies: + mimic-fn "^2.1.0" + opener@~1.4.0: version "1.4.3" resolved "https://registry.yarnpkg.com/opener/-/opener-1.4.3.tgz#5c6da2c5d7e5831e8ffa3964950f8d6674ac90b8" @@ -5698,16 +5784,16 @@ optimist@0.6.x, optimist@^0.6.1: wordwrap "~0.0.2" optionator@^0.8.2: - version "0.8.2" - resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.2.tgz#364c5e409d3f4d6301d6c0b4c05bba50180aeb64" - integrity sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q= + version "0.8.3" + resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.3.tgz#84fa1d036fe9d3c7e21d99884b601167ec8fb495" + integrity sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA== dependencies: deep-is "~0.1.3" - fast-levenshtein "~2.0.4" + fast-levenshtein "~2.0.6" levn "~0.3.0" prelude-ls "~1.1.2" type-check "~0.3.2" - wordwrap "~1.0.0" + word-wrap "~1.2.3" os-browserify@^0.3.0: version "0.3.0" @@ -6071,6 +6157,18 @@ prepend-http@^1.0.1: resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-1.0.4.tgz#d4f4562b0ce3696e41ac52d0e002e57a635dc6dc" integrity sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw= +prettier-linter-helpers@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz#d23d41fe1375646de2d0104d3454a3008802cf7b" + integrity sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w== + dependencies: + fast-diff "^1.1.2" + +prettier@^1.19.1: + version "1.19.1" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.19.1.tgz#f7d7f5ff8a9cd872a7be4ca142095956a60797cb" + integrity sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew== + private@^0.1.6: version "0.1.8" resolved "https://registry.yarnpkg.com/private/-/private-0.1.8.tgz#2381edb3689f7a53d653190060fcf822d2f368ff" @@ -6598,6 +6696,14 @@ restore-cursor@^2.0.0: onetime "^2.0.0" signal-exit "^3.0.2" +restore-cursor@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-3.1.0.tgz#39f67c54b3a7a58cea5236d95cf0034239631f7e" + integrity sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA== + dependencies: + onetime "^5.1.0" + signal-exit "^3.0.2" + ret@~0.1.10: version "0.1.15" resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc" @@ -7087,6 +7193,15 @@ string-width@^3.0.0, string-width@^3.1.0: is-fullwidth-code-point "^2.0.0" strip-ansi "^5.1.0" +string-width@^4.1.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.0.tgz#952182c46cc7b2c313d1596e623992bd163b72b5" + integrity sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.0" + string.prototype.trimleft@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/string.prototype.trimleft/-/string.prototype.trimleft-2.1.0.tgz#6cc47f0d7eb8d62b0f3701611715a3954591d634" @@ -7138,6 +7253,13 @@ strip-ansi@^5.0.0, strip-ansi@^5.1.0, strip-ansi@^5.2.0: dependencies: ansi-regex "^4.1.0" +strip-ansi@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.0.tgz#0b1571dd7669ccd4f3e06e14ef1eed26225ae532" + integrity sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w== + dependencies: + ansi-regex "^5.0.0" + strip-bom@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-2.0.0.tgz#6219a85616520491f35788bdbf1447a99c7e6b0e" @@ -7450,6 +7572,11 @@ type-fest@^0.3.0: resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.3.1.tgz#63d00d204e059474fe5e1b7c011112bbd1dc29e1" integrity sha512-cUGJnCdr4STbePCgqNFbpVNCepa+kAVohJs1sLhxzdH+gnEoOd8VhbYa7pD3zZYGiURWM2xzEII3fQcRizDkYQ== +type-fest@^0.5.2: + version "0.5.2" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.5.2.tgz#d6ef42a0356c6cd45f49485c3b6281fc148e48a2" + integrity sha512-DWkS49EQKVX//Tbupb9TFa19c7+MK1XmzkrZUR8TAktmE/DizXoaoJV6TZ/tSIPXipqNiRI6CyAe7x69Jb6RSw== + type-is@~1.6.17, type-is@~1.6.18: version "1.6.18" resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.18.tgz#4e552cd05df09467dcbc4ef739de89f2cf37c131" @@ -7846,16 +7973,16 @@ windows-release@^3.1.0: dependencies: execa "^1.0.0" +word-wrap@~1.2.3: + version "1.2.3" + resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c" + integrity sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ== + wordwrap@~0.0.2: version "0.0.3" resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107" integrity sha1-o9XabNXAvAAI03I0u68b7WMFkQc= -wordwrap@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" - integrity sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus= - worker-farm@^1.7.0: version "1.7.0" resolved "https://registry.yarnpkg.com/worker-farm/-/worker-farm-1.7.0.tgz#26a94c5391bbca926152002f69b84a4bf772e5a8" From a8ef4b042d2fcfc27b15da9f7a568c49e29df59a Mon Sep 17 00:00:00 2001 From: Eric Heikes Date: Mon, 18 Nov 2019 10:31:19 -0800 Subject: [PATCH 3/3] Remove ESLint rules covered by Prettier --- packages/client/.eslintrc.js | 156 ----------------------------------- packages/server/.eslintrc.js | 156 ----------------------------------- 2 files changed, 312 deletions(-) diff --git a/packages/client/.eslintrc.js b/packages/client/.eslintrc.js index 3dbade7..8bc543f 100644 --- a/packages/client/.eslintrc.js +++ b/packages/client/.eslintrc.js @@ -16,56 +16,17 @@ module.exports = { }, 'rules': { 'accessor-pairs': 'error', - 'array-bracket-newline': 'error', - 'array-bracket-spacing': [ - 'error', - 'never' - ], 'array-callback-return': 'error', - 'array-element-newline': 'off', - 'arrow-body-style': 'off', - 'arrow-parens': 'off', - 'arrow-spacing': [ - 'error', - { - 'after': true, - 'before': true - } - ], 'block-scoped-var': 'error', - 'block-spacing': 'error', - 'brace-style': [ - 'error', - '1tbs' - ], 'callback-return': 'error', - 'camelcase': 'off', - 'capitalized-comments': 'off', 'class-methods-use-this': 'error', - 'comma-dangle': 'off', - 'comma-spacing': [ - 'error', - { - 'after': true, - 'before': false - } - ], - 'comma-style': [ - 'error', - 'last' - ], 'complexity': 'error', - 'computed-property-spacing': [ - 'error', - 'never' - ], 'consistent-return': [ 'error', { 'treatUndefinedAsUnspecified': false } ], - 'consistent-this': 'error', 'curly': 'error', 'default-case': 'error', 'default-param-last': 'error', @@ -74,71 +35,23 @@ module.exports = { 'property' ], 'dot-notation': 'error', - 'eol-last': 'error', 'eqeqeq': 'error', - 'func-call-spacing': 'error', - 'func-name-matching': 'error', - 'func-names': 'error', - 'func-style': 'off', - 'function-call-argument-newline': [ - 'error', - 'consistent' - ], - 'function-paren-newline': ['error', 'multiline-arguments'], - 'generator-star-spacing': 'error', 'global-require': 'off', 'guard-for-in': 'error', 'handle-callback-err': 'error', - 'id-blacklist': 'error', - 'id-length': 'off', - 'id-match': 'error', - 'implicit-arrow-linebreak': 'off', - 'indent': 'error', 'indent-legacy': 'error', 'init-declarations': 'off', - 'jsx-quotes': 'error', - 'key-spacing': 'error', - 'keyword-spacing': [ - 'error', - { - 'after': true, - 'before': true - } - ], - 'line-comment-position': 'off', - 'linebreak-style': [ - 'error', - 'unix' - ], - 'lines-around-comment': 'off', 'lines-around-directive': 'error', - 'lines-between-class-members': 'error', 'max-classes-per-file': 'error', - 'max-depth': 'error', - 'max-len': 'off', - 'max-lines': 'off', - 'max-lines-per-function': 'off', - 'max-nested-callbacks': 'error', - 'max-params': 'off', - 'max-statements': 'off', - 'max-statements-per-line': 'error', - 'multiline-comment-style': 'off', - 'multiline-ternary': 'error', - 'new-cap': 'error', - 'new-parens': 'error', 'newline-after-var': 'off', 'newline-before-return': 'off', - 'newline-per-chained-call': 'error', 'no-alert': 'error', - 'no-array-constructor': 'error', 'no-await-in-loop': 'error', - 'no-bitwise': 'off', 'no-buffer-constructor': 'error', 'no-caller': 'error', 'no-catch-shadow': 'error', 'no-confusing-arrow': 'error', 'no-console': 'error', - 'no-continue': 'error', 'no-div-regex': 'error', 'no-duplicate-imports': 'error', 'no-else-return': 'error', @@ -153,34 +66,24 @@ module.exports = { 'no-implicit-globals': 'error', 'no-implied-eval': 'error', 'no-import-assign': 'error', - 'no-inline-comments': 'off', 'no-invalid-this': 'error', 'no-iterator': 'error', 'no-label-var': 'error', 'no-labels': 'error', 'no-lone-blocks': 'error', - 'no-lonely-if': 'error', 'no-loop-func': 'error', 'no-magic-numbers': 'off', - 'no-mixed-operators': 'error', 'no-mixed-requires': 'error', - 'no-multi-assign': 'error', 'no-multi-spaces': 'error', 'no-multi-str': 'error', - 'no-multiple-empty-lines': 'error', - 'no-native-reassign': 'error', - 'no-negated-condition': 'error', 'no-negated-in-lhs': 'error', - 'no-nested-ternary': 'error', 'no-new': 'error', 'no-new-func': 'error', - 'no-new-object': 'error', 'no-new-require': 'error', 'no-new-wrappers': 'error', 'no-octal-escape': 'error', 'no-param-reassign': 'off', 'no-path-concat': 'error', - 'no-plusplus': 'error', 'no-process-env': 'error', 'no-process-exit': 'error', 'no-proto': 'error', @@ -188,7 +91,6 @@ module.exports = { 'no-restricted-imports': 'error', 'no-restricted-modules': 'error', 'no-restricted-properties': 'error', - 'no-restricted-syntax': 'error', 'no-return-assign': 'error', 'no-return-await': 'error', 'no-script-url': 'error', @@ -197,15 +99,11 @@ module.exports = { 'no-shadow': 'error', 'no-spaced-func': 'error', 'no-sync': 'error', - 'no-tabs': 'error', 'no-template-curly-in-string': 'error', - 'no-ternary': 'error', 'no-throw-literal': 'error', 'no-undef-init': 'error', 'no-undefined': 'off', - 'no-underscore-dangle': 'error', 'no-unmodified-loop-condition': 'error', - 'no-unneeded-ternary': 'error', 'no-unused-expressions': 'error', 'no-use-before-define': 'off', 'no-useless-call': 'error', @@ -217,90 +115,36 @@ module.exports = { 'no-var': 'error', 'no-void': 'error', 'no-warning-comments': 'off', - 'no-whitespace-before-property': 'error', 'nonblock-statement-body-position': 'error', - 'object-curly-newline': 'error', - 'object-curly-spacing': [ - 'error', - 'always' - ], - 'object-property-newline': 'error', 'object-shorthand': 'error', - 'one-var': 'off', - 'one-var-declaration-per-line': 'error', - 'operator-assignment': 'error', - 'operator-linebreak': 'error', - 'padded-blocks': 'off', - 'padding-line-between-statements': 'error', 'prefer-arrow-callback': 'error', 'prefer-const': 'error', 'prefer-destructuring': 'off', 'prefer-named-capture-group': 'off', 'prefer-numeric-literals': 'error', - 'prefer-object-spread': 'error', 'prefer-promise-reject-errors': 'error', 'prefer-reflect': 'error', 'prefer-regex-literals': 'error', 'prefer-rest-params': 'error', 'prefer-spread': 'error', 'prefer-template': 'off', - 'quote-props': 'off', - 'quotes': [ - 'error', - 'single' - ], 'radix': 'error', 'require-await': 'off', 'require-jsdoc': 'off', 'require-unicode-regexp': 'off', - 'rest-spread-spacing': 'error', - 'semi': 'error', - 'semi-spacing': 'error', - 'semi-style': [ - 'error', - 'last' - ], 'sort-imports': 'error', - 'sort-keys': 'off', - 'sort-vars': 'error', - 'space-before-blocks': 'error', - 'space-before-function-paren': [ - 'error', { - 'anonymous': 'always', - 'named': 'never', - 'asyncArrow': 'always' - } - ], - 'space-in-parens': [ - 'error', - 'never' - ], - 'space-infix-ops': 'error', - 'space-unary-ops': 'error', - 'spaced-comment': [ - 'error', - 'always' - ], 'strict': [ 'error', 'never' ], - 'switch-colon-spacing': 'error', 'symbol-description': 'error', 'template-curly-spacing': [ 'error', 'never' ], - 'template-tag-spacing': 'error', - 'unicode-bom': [ - 'error', - 'never' - ], 'valid-jsdoc': 'off', 'vars-on-top': 'error', 'wrap-iife': 'error', - 'wrap-regex': 'error', - 'yield-star-spacing': 'error', 'yoda': [ 'error', 'never' diff --git a/packages/server/.eslintrc.js b/packages/server/.eslintrc.js index 7edbfc8..3ca2ce0 100644 --- a/packages/server/.eslintrc.js +++ b/packages/server/.eslintrc.js @@ -14,56 +14,17 @@ module.exports = { }, 'rules': { 'accessor-pairs': 'error', - 'array-bracket-newline': 'error', - 'array-bracket-spacing': [ - 'error', - 'never' - ], 'array-callback-return': 'error', - 'array-element-newline': 'off', - 'arrow-body-style': 'off', - 'arrow-parens': 'off', - 'arrow-spacing': [ - 'error', - { - 'after': true, - 'before': true - } - ], 'block-scoped-var': 'error', - 'block-spacing': 'error', - 'brace-style': [ - 'error', - '1tbs' - ], 'callback-return': 'error', - 'camelcase': 'off', - 'capitalized-comments': 'off', 'class-methods-use-this': 'error', - 'comma-dangle': 'off', - 'comma-spacing': [ - 'error', - { - 'after': true, - 'before': false - } - ], - 'comma-style': [ - 'error', - 'last' - ], 'complexity': 'error', - 'computed-property-spacing': [ - 'error', - 'never' - ], 'consistent-return': [ 'error', { 'treatUndefinedAsUnspecified': false } ], - 'consistent-this': 'error', 'curly': 'error', 'default-case': 'error', 'default-param-last': 'error', @@ -72,71 +33,23 @@ module.exports = { 'property' ], 'dot-notation': 'error', - 'eol-last': 'error', 'eqeqeq': 'error', - 'func-call-spacing': 'error', - 'func-name-matching': 'error', - 'func-names': 'error', - 'func-style': 'off', - 'function-call-argument-newline': [ - 'error', - 'consistent' - ], - 'function-paren-newline': ['error', 'multiline-arguments'], - 'generator-star-spacing': 'error', 'global-require': 'error', 'guard-for-in': 'error', 'handle-callback-err': 'error', - 'id-blacklist': 'error', - 'id-length': 'off', - 'id-match': 'error', - 'implicit-arrow-linebreak': 'off', - 'indent': 'error', 'indent-legacy': 'error', 'init-declarations': 'off', - 'jsx-quotes': 'error', - 'key-spacing': 'error', - 'keyword-spacing': [ - 'error', - { - 'after': true, - 'before': true - } - ], - 'line-comment-position': 'off', - 'linebreak-style': [ - 'error', - 'unix' - ], - 'lines-around-comment': 'off', 'lines-around-directive': 'error', - 'lines-between-class-members': 'error', 'max-classes-per-file': 'error', - 'max-depth': 'error', - 'max-len': 'off', - 'max-lines': 'off', - 'max-lines-per-function': 'off', - 'max-nested-callbacks': 'error', - 'max-params': 'off', - 'max-statements': 'off', - 'max-statements-per-line': 'error', - 'multiline-comment-style': 'off', - 'multiline-ternary': 'error', - 'new-cap': 'error', - 'new-parens': 'error', 'newline-after-var': 'off', 'newline-before-return': 'off', - 'newline-per-chained-call': 'error', 'no-alert': 'error', - 'no-array-constructor': 'error', 'no-await-in-loop': 'error', - 'no-bitwise': 'off', 'no-buffer-constructor': 'error', 'no-caller': 'error', 'no-catch-shadow': 'error', 'no-confusing-arrow': 'error', 'no-console': 'error', - 'no-continue': 'error', 'no-div-regex': 'error', 'no-duplicate-imports': 'error', 'no-else-return': 'error', @@ -151,34 +64,24 @@ module.exports = { 'no-implicit-globals': 'error', 'no-implied-eval': 'error', 'no-import-assign': 'error', - 'no-inline-comments': 'off', 'no-invalid-this': 'error', 'no-iterator': 'error', 'no-label-var': 'error', 'no-labels': 'error', 'no-lone-blocks': 'error', - 'no-lonely-if': 'error', 'no-loop-func': 'error', 'no-magic-numbers': 'off', - 'no-mixed-operators': 'error', 'no-mixed-requires': 'error', - 'no-multi-assign': 'error', 'no-multi-spaces': 'error', 'no-multi-str': 'error', - 'no-multiple-empty-lines': 'error', - 'no-native-reassign': 'error', - 'no-negated-condition': 'error', 'no-negated-in-lhs': 'error', - 'no-nested-ternary': 'error', 'no-new': 'error', 'no-new-func': 'error', - 'no-new-object': 'error', 'no-new-require': 'error', 'no-new-wrappers': 'error', 'no-octal-escape': 'error', 'no-param-reassign': 'off', 'no-path-concat': 'error', - 'no-plusplus': 'error', 'no-process-env': 'error', 'no-process-exit': 'error', 'no-proto': 'error', @@ -186,7 +89,6 @@ module.exports = { 'no-restricted-imports': 'error', 'no-restricted-modules': 'error', 'no-restricted-properties': 'error', - 'no-restricted-syntax': 'error', 'no-return-assign': 'error', 'no-return-await': 'error', 'no-script-url': 'error', @@ -195,15 +97,11 @@ module.exports = { 'no-shadow': 'error', 'no-spaced-func': 'error', 'no-sync': 'error', - 'no-tabs': 'error', 'no-template-curly-in-string': 'error', - 'no-ternary': 'error', 'no-throw-literal': 'error', 'no-undef-init': 'error', 'no-undefined': 'off', - 'no-underscore-dangle': 'error', 'no-unmodified-loop-condition': 'error', - 'no-unneeded-ternary': 'error', 'no-unused-expressions': 'error', 'no-use-before-define': 'off', 'no-useless-call': 'error', @@ -215,90 +113,36 @@ module.exports = { 'no-var': 'error', 'no-void': 'error', 'no-warning-comments': 'off', - 'no-whitespace-before-property': 'error', 'nonblock-statement-body-position': 'error', - 'object-curly-newline': 'error', - 'object-curly-spacing': [ - 'error', - 'always' - ], - 'object-property-newline': 'error', 'object-shorthand': 'error', - 'one-var': 'off', - 'one-var-declaration-per-line': 'error', - 'operator-assignment': 'error', - 'operator-linebreak': 'error', - 'padded-blocks': 'off', - 'padding-line-between-statements': 'error', 'prefer-arrow-callback': 'error', 'prefer-const': 'error', 'prefer-destructuring': 'off', 'prefer-named-capture-group': 'off', 'prefer-numeric-literals': 'error', - 'prefer-object-spread': 'error', 'prefer-promise-reject-errors': 'error', 'prefer-reflect': 'error', 'prefer-regex-literals': 'error', 'prefer-rest-params': 'error', 'prefer-spread': 'error', 'prefer-template': 'off', - 'quote-props': 'off', - 'quotes': [ - 'error', - 'single' - ], 'radix': 'error', 'require-await': 'off', 'require-jsdoc': 'off', 'require-unicode-regexp': 'off', - 'rest-spread-spacing': 'error', - 'semi': 'error', - 'semi-spacing': 'error', - 'semi-style': [ - 'error', - 'last' - ], 'sort-imports': 'error', - 'sort-keys': 'off', - 'sort-vars': 'error', - 'space-before-blocks': 'error', - 'space-before-function-paren': [ - 'error', { - 'anonymous': 'always', - 'named': 'never', - 'asyncArrow': 'always' - } - ], - 'space-in-parens': [ - 'error', - 'never' - ], - 'space-infix-ops': 'error', - 'space-unary-ops': 'error', - 'spaced-comment': [ - 'error', - 'always' - ], 'strict': [ 'error', 'never' ], - 'switch-colon-spacing': 'error', 'symbol-description': 'error', 'template-curly-spacing': [ 'error', 'never' ], - 'template-tag-spacing': 'error', - 'unicode-bom': [ - 'error', - 'never' - ], 'valid-jsdoc': 'off', 'vars-on-top': 'error', 'wrap-iife': 'error', - 'wrap-regex': 'error', - 'yield-star-spacing': 'error', 'yoda': [ 'error', 'never'