console: fix linter config (#4137)

This commit is contained in:
Aleksandra Sikora 2020-04-06 13:23:04 +02:00 committed by GitHub
parent ec56b0160b
commit 141f2afb01
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
38 changed files with 440 additions and 356 deletions

View File

@ -1,12 +1,12 @@
{
"extends": ["plugin:@typescript-eslint/recommended", "eslint-config-airbnb"],
"extends": ["airbnb", "prettier"],
"env": {
"browser": true,
"node": true,
"mocha": true,
"cypress/globals": true
},
"parser": "@typescript-eslint/parser",
"parser": "babel-eslint",
"rules": {
"allowForLoopAfterthoughts": 0,
"react/no-multi-comp": 0,
@ -22,7 +22,7 @@
"import/prefer-default-export": 0,
"comma-dangle": 0,
"id-length": [1, { "min": 1, "properties": "never" }],
"indent": [2, 2, { "SwitchCase": 1 }],
"indent": "off",
"no-console": 0,
"arrow-parens": 0,
"no-alert": 0,
@ -72,6 +72,7 @@
"react/prefer-stateless-function": 0,
"react/no-unescaped-entities": 0,
"react/sort-comp": 0,
"react/jsx-indent": 0,
"jsx-a11y/click-events-have-key-events": 0,
"jsx-a11y/no-static-element-interactions": 0,
"jsx-a11y/no-noninteractive-element-interactions": 0,
@ -83,29 +84,10 @@
"max-len": 0,
"no-continue": 0,
"eqeqeq": 0,
"no-nested-ternary": 0,
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": 2,
"@typescript-eslint/indent": 0,
"@typescript-eslint/explicit-function-return-type": 0,
"@typescript-eslint/prefer-interface": 0,
"@typescript-eslint/no-namespace": "off",
"@typescript-eslint/camelcase": 0,
"@typescript-eslint/explicit-member-accessibility": 0,
"@typescript-eslint/no-non-null-assertion": 0,
"@typescript-eslint/no-object-literal-type-assertion": "off",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/no-empty-interface": "off",
"@typescript-eslint/no-parameter-properties": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/no-useless-constructor": "error",
"@typescript-eslint/no-unused-expressions": ["error"]
"no-nested-ternary": 0
},
"plugins": ["react", "import", "cypress", "@typescript-eslint/eslint-plugin"],
"settings": {
"import/parser": "babel-eslint",
"parser": "babel-esling",
"import/resolve": {
"moduleDirectory": ["node_modules", "src"]
}
@ -122,8 +104,34 @@
},
"overrides": [
{
"extends": [
"plugin:@typescript-eslint/recommended",
"airbnb",
"prettier"
],
"parser": "@typescript-eslint/parser",
"files": ["*.ts", "*.tsx"],
"rules": {
"import/extensions": 0,
"react/prop-types": "off",
"react/jsx-filename-extension": 0,
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": 2,
"@typescript-eslint/indent": 0,
"@typescript-eslint/explicit-function-return-type": 0,
"@typescript-eslint/prefer-interface": 0,
"@typescript-eslint/no-namespace": "off",
"@typescript-eslint/camelcase": 0,
"@typescript-eslint/explicit-member-accessibility": 0,
"@typescript-eslint/no-non-null-assertion": 0,
"@typescript-eslint/no-object-literal-type-assertion": "off",
"@typescript-eslint/no-empty-interface": "off",
"@typescript-eslint/no-parameter-properties": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/no-useless-constructor": "error",
"@typescript-eslint/no-unused-expressions": ["error"],
"@typescript-eslint/no-empty-function": "off",
/**
* Disable things that are checked by Typescript
*/

1
console/.prettierignore Normal file
View File

@ -0,0 +1 @@
*.min.js

View File

@ -2987,16 +2987,6 @@
"resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz",
"integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg="
},
"array.prototype.flat": {
"version": "1.2.3",
"resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.2.3.tgz",
"integrity": "sha512-gBlRZV0VSmfPIeWfuuy56XZMvbVfbEUnOXUvt3F/eUUUSyzlgLxhEX4YAEpxNAogRGehPSnfXyPtYyKAhkzQhQ==",
"dev": true,
"requires": {
"define-properties": "^1.1.3",
"es-abstract": "^1.17.0-next.1"
}
},
"asap": {
"version": "2.0.6",
"resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz",
@ -3250,17 +3240,17 @@
}
},
"babel-eslint": {
"version": "9.0.0",
"resolved": "https://registry.npmjs.org/babel-eslint/-/babel-eslint-9.0.0.tgz",
"integrity": "sha512-itv1MwE3TMbY0QtNfeL7wzak1mV47Uy+n6HtSOO4Xd7rvmO+tsGQSgyOEEgo6Y2vHZKZphaoelNeSVj4vkLA1g==",
"version": "10.1.0",
"resolved": "https://registry.npmjs.org/babel-eslint/-/babel-eslint-10.1.0.tgz",
"integrity": "sha512-ifWaTHQ0ce+448CYop8AdrQiBsGrnC+bMgfyKFdi6EsPLTAWG+QfyDeM6OH+FmWnKvEq5NnBMLvlBUPKQZoDSg==",
"dev": true,
"requires": {
"@babel/code-frame": "^7.0.0",
"@babel/parser": "^7.0.0",
"@babel/traverse": "^7.0.0",
"@babel/types": "^7.0.0",
"eslint-scope": "3.7.1",
"eslint-visitor-keys": "^1.0.0"
"@babel/parser": "^7.7.0",
"@babel/traverse": "^7.7.0",
"@babel/types": "^7.7.0",
"eslint-visitor-keys": "^1.0.0",
"resolve": "^1.12.0"
}
},
"babel-loader": {
@ -4482,6 +4472,12 @@
}
}
},
"compare-versions": {
"version": "3.6.0",
"resolved": "https://registry.npmjs.org/compare-versions/-/compare-versions-3.6.0.tgz",
"integrity": "sha512-W6Af2Iw1z4CB7q4uU4hv646dW9GQuBM+YpC0UvUCWSD8w90SJjp+ujJuXaEMtAXBtSqGfMPuFOVn4/+FlaqfBA==",
"dev": true
},
"component-emitter": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz",
@ -5800,6 +5796,23 @@
"eslint-restricted-globals": "^0.1.1"
}
},
"eslint-config-prettier": {
"version": "6.10.0",
"resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-6.10.0.tgz",
"integrity": "sha512-AtndijGte1rPILInUdHjvKEGbIV06NuvPrqlIEaEaWtbtvJh464mDeyGMdZEQMsGvC0ZVkiex1fSNcC4HAbRGg==",
"dev": true,
"requires": {
"get-stdin": "^6.0.0"
},
"dependencies": {
"get-stdin": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-6.0.0.tgz",
"integrity": "sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g==",
"dev": true
}
}
},
"eslint-import-resolver-node": {
"version": "0.3.3",
"resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.3.tgz",
@ -5935,23 +5948,22 @@
}
},
"eslint-plugin-import": {
"version": "2.20.1",
"resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.20.1.tgz",
"integrity": "sha512-qQHgFOTjguR+LnYRoToeZWT62XM55MBVXObHM6SKFd1VzDcX/vqT1kAz8ssqigh5eMj8qXcRoXXGZpPP6RfdCw==",
"version": "2.18.2",
"resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.18.2.tgz",
"integrity": "sha512-5ohpsHAiUBRNaBWAF08izwUGlbrJoJJ+W9/TBwsGoR1MnlgfwMIKrFeSjWbt6moabiXW9xNvtFz+97KHRfI4HQ==",
"dev": true,
"requires": {
"array-includes": "^3.0.3",
"array.prototype.flat": "^1.2.1",
"contains-path": "^0.1.0",
"debug": "^2.6.9",
"doctrine": "1.5.0",
"eslint-import-resolver-node": "^0.3.2",
"eslint-module-utils": "^2.4.1",
"eslint-module-utils": "^2.4.0",
"has": "^1.0.3",
"minimatch": "^3.0.4",
"object.values": "^1.1.0",
"read-pkg-up": "^2.0.0",
"resolve": "^1.12.0"
"resolve": "^1.11.0"
},
"dependencies": {
"debug": {
@ -6132,16 +6144,6 @@
"integrity": "sha1-NfDVy8ZMLj7WLpO0saevBbp+1Nc=",
"dev": true
},
"eslint-scope": {
"version": "3.7.1",
"resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-3.7.1.tgz",
"integrity": "sha1-PWPD7f2gLgbgGkUq2IyqzHzctug=",
"dev": true,
"requires": {
"esrecurse": "^4.1.0",
"estraverse": "^4.1.1"
}
},
"eslint-utils": {
"version": "1.4.3",
"resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.4.3.tgz",
@ -6885,6 +6887,15 @@
"locate-path": "^3.0.0"
}
},
"find-versions": {
"version": "3.2.0",
"resolved": "https://registry.npmjs.org/find-versions/-/find-versions-3.2.0.tgz",
"integrity": "sha512-P8WRou2S+oe222TOCHitLy8zj+SIsVJh52VP4lvXkaFVnOFFdoWv1H1Jjvel1aI6NCFOAaeAVm8qrI0odiLcww==",
"dev": true,
"requires": {
"semver-regex": "^2.0.0"
}
},
"findup-sync": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-3.0.0.tgz",
@ -7553,7 +7564,7 @@
},
"chownr": {
"version": "1.1.3",
"resolved": false,
"resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.3.tgz",
"integrity": "sha512-i70fVHhmV3DtTl6nqvZOnIjbY0Pe4kAUjwHj8z0zAdgBtYrJyYwLKCCuRBQ5ppkyL0AkN7HKRnETdmdp1zqNXw==",
"optional": true
},
@ -7725,7 +7736,7 @@
},
"minimist": {
"version": "0.0.8",
"resolved": false,
"resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
"integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=",
"optional": true
},
@ -7750,7 +7761,7 @@
},
"mkdirp": {
"version": "0.5.1",
"resolved": false,
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz",
"integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=",
"optional": true,
"requires": {
@ -7765,7 +7776,7 @@
},
"needle": {
"version": "2.4.0",
"resolved": false,
"resolved": "https://registry.npmjs.org/needle/-/needle-2.4.0.tgz",
"integrity": "sha512-4Hnwzr3mi5L97hMYeNl8wRW/Onhy4nUKR/lVemJ8gJedxxUyBLm9kkrDColJvoSfwi0jCNhD+xCdOtiGDQiRZg==",
"optional": true,
"requires": {
@ -7794,7 +7805,7 @@
},
"nopt": {
"version": "4.0.1",
"resolved": false,
"resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.1.tgz",
"integrity": "sha1-0NRoWv1UFRk8jHUFYC0NF81kR00=",
"optional": true,
"requires": {
@ -7819,7 +7830,7 @@
},
"npm-packlist": {
"version": "1.4.7",
"resolved": false,
"resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-1.4.7.tgz",
"integrity": "sha512-vAj7dIkp5NhieaGZxBJB8fF4R0078rqsmhJcAfXZ6O7JJhjhPK96n5Ry1oZcfLXgfun0GWTZPOxaEyqv8GBykQ==",
"optional": true,
"requires": {
@ -7908,7 +7919,7 @@
"dependencies": {
"minimist": {
"version": "1.2.0",
"resolved": false,
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
"integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=",
"optional": true
}
@ -7916,7 +7927,7 @@
},
"readable-stream": {
"version": "2.3.6",
"resolved": false,
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
"integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==",
"optional": true,
"requires": {
@ -8795,21 +8806,121 @@
"dev": true
},
"husky": {
"version": "0.14.3",
"resolved": "https://registry.npmjs.org/husky/-/husky-0.14.3.tgz",
"integrity": "sha512-e21wivqHpstpoiWA/Yi8eFti8E+sQDSS53cpJsPptPs295QTOQR0ZwnHo2TXy1XOpZFD9rPOd3NpmqTK6uMLJA==",
"version": "4.2.3",
"resolved": "https://registry.npmjs.org/husky/-/husky-4.2.3.tgz",
"integrity": "sha512-VxTsSTRwYveKXN4SaH1/FefRJYCtx+wx04sSVcOpD7N2zjoHxa+cEJ07Qg5NmV3HAK+IRKOyNVpi2YBIVccIfQ==",
"dev": true,
"requires": {
"is-ci": "^1.0.10",
"normalize-path": "^1.0.0",
"strip-indent": "^2.0.0"
"chalk": "^3.0.0",
"ci-info": "^2.0.0",
"compare-versions": "^3.5.1",
"cosmiconfig": "^6.0.0",
"find-versions": "^3.2.0",
"opencollective-postinstall": "^2.0.2",
"pkg-dir": "^4.2.0",
"please-upgrade-node": "^3.2.0",
"slash": "^3.0.0",
"which-pm-runs": "^1.0.0"
},
"dependencies": {
"normalize-path": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-1.0.0.tgz",
"integrity": "sha1-MtDkcvkf80VwHBWoMRAY07CpA3k=",
"ansi-styles": {
"version": "4.2.1",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz",
"integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==",
"dev": true,
"requires": {
"@types/color-name": "^1.1.1",
"color-convert": "^2.0.1"
}
},
"chalk": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz",
"integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==",
"dev": true,
"requires": {
"ansi-styles": "^4.1.0",
"supports-color": "^7.1.0"
}
},
"ci-info": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz",
"integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==",
"dev": true
},
"color-convert": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"dev": true,
"requires": {
"color-name": "~1.1.4"
}
},
"color-name": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
"dev": true
},
"find-up": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz",
"integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==",
"dev": true,
"requires": {
"locate-path": "^5.0.0",
"path-exists": "^4.0.0"
}
},
"has-flag": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
"dev": true
},
"locate-path": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz",
"integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==",
"dev": true,
"requires": {
"p-locate": "^4.1.0"
}
},
"p-locate": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz",
"integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==",
"dev": true,
"requires": {
"p-limit": "^2.2.0"
}
},
"path-exists": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz",
"integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==",
"dev": true
},
"pkg-dir": {
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz",
"integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==",
"dev": true,
"requires": {
"find-up": "^4.0.0"
}
},
"supports-color": {
"version": "7.1.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz",
"integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==",
"dev": true,
"requires": {
"has-flag": "^4.0.0"
}
}
}
},
@ -13103,6 +13214,12 @@
"integrity": "sha1-ofeDj4MUxRbwXs78vEzP4EtO14k=",
"dev": true
},
"opencollective-postinstall": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/opencollective-postinstall/-/opencollective-postinstall-2.0.2.tgz",
"integrity": "sha512-pVOEP16TrAO2/fjej1IdOyupJY8KDUM1CvsaScRbw6oddvpQoOfGk4ywha0HKKVAD6RkW4x6Q+tNBwhf3Bgpuw==",
"dev": true
},
"opener": {
"version": "1.5.1",
"resolved": "https://registry.npmjs.org/opener/-/opener-1.5.1.tgz",
@ -13507,6 +13624,15 @@
"find-up": "^3.0.0"
}
},
"please-upgrade-node": {
"version": "3.2.0",
"resolved": "https://registry.npmjs.org/please-upgrade-node/-/please-upgrade-node-3.2.0.tgz",
"integrity": "sha512-gQR3WpIgNIKwBMVLkpMUeR3e1/E1y42bqDQZfql+kDeXd8COYfM8PQA4X6y7a8u9Ua9FHmsrrmirW2vHs45hWg==",
"dev": true,
"requires": {
"semver-compare": "^1.0.0"
}
},
"popper.js": {
"version": "1.16.1",
"resolved": "https://registry.npmjs.org/popper.js/-/popper.js-1.16.1.tgz",
@ -14245,7 +14371,8 @@
"prettier": {
"version": "1.19.1",
"resolved": "https://registry.npmjs.org/prettier/-/prettier-1.19.1.tgz",
"integrity": "sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew=="
"integrity": "sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew==",
"dev": true
},
"pretty-error": {
"version": "1.2.0",
@ -16039,6 +16166,18 @@
"resolved": "https://registry.npmjs.org/semver/-/semver-5.5.1.tgz",
"integrity": "sha512-PqpAxfrEhlSUWge8dwIp4tZnQ25DIOthpiaHNIthsjEFQD6EvqUKUDM7L8O2rShkFccYo1VjJR0coWfNkCubRw=="
},
"semver-compare": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/semver-compare/-/semver-compare-1.0.0.tgz",
"integrity": "sha1-De4hahyUGrN+nvsXiPavxf9VN/w=",
"dev": true
},
"semver-regex": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/semver-regex/-/semver-regex-2.0.0.tgz",
"integrity": "sha512-mUdIBBvdn0PLOeP3TEkMH7HHeUP3GjsXCwKarjv/kGmUFOYg1VqEemKhoQpWMu6X2I8kHeuVdGibLGkVK+/5Qw==",
"dev": true
},
"send": {
"version": "0.17.1",
"resolved": "https://registry.npmjs.org/send/-/send-0.17.1.tgz",
@ -16217,6 +16356,12 @@
"util": ">=0.10.3 <1"
}
},
"slash": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz",
"integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==",
"dev": true
},
"slice-ansi": {
"version": "0.0.4",
"resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-0.0.4.tgz",
@ -16656,12 +16801,6 @@
"integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=",
"dev": true
},
"strip-indent": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-2.0.0.tgz",
"integrity": "sha1-XvjbKV0B5u1sv3qrlpmNeCJSe2g=",
"dev": true
},
"strip-json-comments": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz",
@ -18277,6 +18416,12 @@
"resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz",
"integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho="
},
"which-pm-runs": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/which-pm-runs/-/which-pm-runs-1.0.0.tgz",
"integrity": "sha1-Zws6+8VS4LVd9rd4DKdGFfI60cs=",
"dev": true
},
"wide-align": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz",

View File

@ -18,13 +18,13 @@
"server-build": "make server-build",
"build-unused": "webpack --verbose --colors --display-error-details --config webpack/prod.config.js --json | webpack-unused -s src",
"postinstall": "webpack --display-error-details --config webpack/prod.config.js",
"lint": "eslint -c .eslintrc src api",
"lint": "eslint -c .eslintrc src --ext .js,.ts,.tsx",
"start-dev": "better-npm-run start-dev",
"watch-client": "better-npm-run watch-client",
"dev": "concurrently --kill-others \"npm run watch-client\" \"npm run start-dev\" ",
"precommit": "lint-staged",
"cypress": "cypress open",
"test": "cypress run --spec 'cypress/integration/**/**/test.js' --key $CYPRESS_KEY --parallel --record"
"test": "cypress run --spec 'cypress/integration/**/**/test.js' --key $CYPRESS_KEY --parallel --record",
"format": "prettier --write \"src/**/*.{js,jsx,ts,tsx}\""
},
"lint-staged": {
"*.{js,ts,tsx}": [
@ -32,7 +32,7 @@
"git add"
],
"*.{js,json,ts,tsx,css,md}": [
"prettier --single-quote --trailing-comma es5 --write",
"prettier --write",
"git add"
]
},
@ -52,6 +52,17 @@
"command": "node -r dotenv/config webpack/webpack-dev-server.js"
}
},
"prettier": {
"singleQuote": true,
"trailingComma": "es5",
"printWidth": 80,
"tabWidth": 2
},
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
},
"dependencies": {
"@graphql-codegen/core": "^1.11.2",
"@graphql-codegen/typescript": "^1.11.2",
@ -75,7 +86,6 @@
"match-sorter": "^2.3.0",
"multireducer": "^1.0.2",
"piping": "^0.3.2",
"prettier": "^1.16.4",
"pretty-error": "^1.2.0",
"prop-types": "^15.6.0",
"query-string": "^6.1.0",
@ -165,7 +175,7 @@
"@types/webpack-hot-middleware": "^2.25.0",
"@typescript-eslint/eslint-plugin": "^2.24.0",
"@typescript-eslint/parser": "^2.24.0",
"babel-eslint": "^9.0.0",
"babel-eslint": "^10.0.3",
"babel-loader": "^8.0.0",
"babel-plugin-istanbul": "^5.1.1",
"babel-plugin-styled-components": "^1.10.6",
@ -181,10 +191,11 @@
"dotenv": "^5.0.1",
"eslint": "^6.5.1",
"eslint-config-airbnb": "16.1.0",
"eslint-config-prettier": "^6.10.0",
"eslint-loader": "^1.0.0",
"eslint-plugin-chai-friendly": "^0.4.1",
"eslint-plugin-cypress": "^2.0.1",
"eslint-plugin-import": "^2.12.0",
"eslint-plugin-import": "^2.18.2",
"eslint-plugin-jsx-a11y": "^6.0.3",
"eslint-plugin-react": "^7.9.1",
"express": "^4.13.3",
@ -195,7 +206,7 @@
"font-awesome": "^4.7.0",
"font-awesome-webpack": "0.0.4",
"fork-ts-checker-webpack-plugin": "^4.0.2",
"husky": "^0.14.3",
"husky": "^4.2.3",
"ignore-loader": "^0.1.2",
"jquery": "^3.4.1",
"json-loader": "^0.5.4",
@ -205,6 +216,7 @@
"node-sass": "^4.13.0",
"nyc": "^13.3.0",
"optimize-css-assets-webpack-plugin": "^4.0.2",
"prettier": "1.19.1",
"react-a11y": "^0.2.6",
"react-addons-test-utils": "^15.0.3",
"react-hot-loader": "^4.6.5",

View File

@ -45,6 +45,7 @@ const onError = error => {
console.error('WebSocket Error for Events' + error);
};
// eslint-disable-next-line no-unused-vars
const onClose = () => {
try {
analyticsConnection = new WebSocket(analyticsUrl);

View File

@ -37,9 +37,7 @@ const Headers = ({ headers, setHeaders }) => {
value={name}
onChange={setHeaderKey}
placeholder="key"
className={`form-control ${styles.add_mar_right} ${
styles.headerInputWidth
}`}
className={`form-control ${styles.add_mar_right} ${styles.headerInputWidth}`}
/>
);
};

View File

@ -36,7 +36,7 @@ const defaultFoldButtonComponent = ({ header, collapsed, icon, onClick }) => {
);
};
export default (ReactTable) => {
export default ReactTable => {
const wrapper = class RTFoldableTable extends React.Component {
constructor(props, context) {
super(props, context);
@ -53,7 +53,7 @@ export default (ReactTable) => {
}
}
onResizedChange = (resized) => {
onResizedChange = resized => {
const { onResizedChange } = this.props;
if (onResizedChange) {
onResizedChange(resized);
@ -68,10 +68,10 @@ export default (ReactTable) => {
const { resized } = this.state;
if (!resized) return;
const rs = resized.find((r) => r.id === id);
const rs = resized.find(r => r.id === id);
if (!rs) return;
const newResized = resized.filter((r) => r !== rs);
const newResized = resized.filter(r => r !== rs);
this.onResizedChange(newResized);
};
@ -86,22 +86,22 @@ export default (ReactTable) => {
return this.wrappedInstance;
};
getCopiedKey = (key) => {
getCopiedKey = key => {
const { foldableOriginalKey } = this.props;
return `${foldableOriginalKey}${key}`;
};
copyOriginals = (column) => {
copyOriginals = column => {
const { FoldedColumn } = this.props;
//Stop copy if the column already copied
if (column.original_Header) return;
Object.keys(FoldedColumn).forEach((k) => {
Object.keys(FoldedColumn).forEach(k => {
const copiedKey = this.getCopiedKey(k);
if (k === 'Cell') {
column[copiedKey] = column[k] ? column[k] : (c) => c.value;
column[copiedKey] = column[k] ? column[k] : c => c.value;
} else column[copiedKey] = column[k];
});
@ -116,10 +116,10 @@ export default (ReactTable) => {
}
};
restoreToOriginal = (column) => {
restoreToOriginal = column => {
const { FoldedColumn } = this.props;
Object.keys(FoldedColumn).forEach((k) => {
Object.keys(FoldedColumn).forEach(k => {
//ignore header as handling by foldableHeaderRender
if (k === 'Header') return;
@ -136,12 +136,12 @@ export default (ReactTable) => {
return this.props.onFoldChange ? this.props.folded : this.state.folded;
};
isFolded = (col) => {
isFolded = col => {
const folded = this.getFoldedState();
return folded[col.id] === true;
};
foldingHandler = (col) => {
foldingHandler = col => {
if (!col || !col.id) return;
const { onFoldChange } = this.props;
@ -163,7 +163,7 @@ export default (ReactTable) => {
const { FoldButtonComponent, FoldIconComponent } = this.props;
const collapsed = this.isFolded(column);
const icon = <FoldIconComponent collapsed={collapsed} name={column.id} />;
const onClick = (e) => {
const onClick = e => {
e.stopPropagation();
this.foldingHandler(column);
};
@ -178,7 +178,7 @@ export default (ReactTable) => {
);
};
applyFoldableForColumn = (column) => {
applyFoldableForColumn = column => {
const collapsed = this.isFolded(column);
const { FoldedColumn } = this.props;
@ -193,7 +193,7 @@ export default (ReactTable) => {
} else this.restoreToOriginal(column);
};
applyFoldableForColumns = (columns) => {
applyFoldableForColumns = columns => {
return columns.map((col, index) => {
if (!col.foldable) return col;
@ -204,7 +204,7 @@ export default (ReactTable) => {
this.copyOriginals(col);
//Replace current header with internal header render.
col.Header = (c) => this.foldableHeaderRender(c);
col.Header = c => this.foldableHeaderRender(c);
//apply foldable
this.applyFoldableForColumn(col);
@ -227,7 +227,7 @@ export default (ReactTable) => {
<ReactTable
{...rest}
{...extra}
ref={(r) => (this.wrappedInstance = r)}
ref={r => (this.wrappedInstance = r)}
/>
);
}

View File

@ -125,20 +125,20 @@ export const deriveExistingType = (
_f.type = wrapTypename(prefixdTypename, fieldTypeMetadata.stack);
_f.arguments = f.arguments
? f.arguments.map(a => {
const _a = {
name: a.name,
description: getEntityDescription(a),
};
const _a = {
name: a.name,
description: getEntityDescription(a),
};
const argTypeMetadata = getSchemaTypeMetadata(a.type);
let prefixdArgTypename = argTypeMetadata.typename;
if (!isInbuiltType(argTypeMetadata.typename)) {
prefixdArgTypename = prefixTypename(argTypeMetadata.typename);
parentTypes.push(argTypeMetadata.typename);
}
_a.type = wrapTypename(prefixdArgTypename, argTypeMetadata.stack);
return _a;
})
const argTypeMetadata = getSchemaTypeMetadata(a.type);
let prefixdArgTypename = argTypeMetadata.typename;
if (!isInbuiltType(argTypeMetadata.typename)) {
prefixdArgTypename = prefixTypename(argTypeMetadata.typename);
parentTypes.push(argTypeMetadata.typename);
}
_a.type = wrapTypename(prefixdArgTypename, argTypeMetadata.stack);
return _a;
})
: [];
types[typename].fields.push(_f);

View File

@ -300,16 +300,12 @@ const RelationshipEditor = ({
return (
<div
className={`row ${styles.add_mar_bottom_mid} ${
styles.display_flex
}`}
className={`row ${styles.add_mar_bottom_mid} ${styles.display_flex}`}
key={`fk-col-${i}`}
>
<div className={`col-sm-4 ${styles.add_mar_right}`}>
<select
className={`form-control ${styles.select} ${
styles.wd100Percent
}`}
className={`form-control ${styles.select} ${styles.wd100Percent}`}
value={field}
onChange={setField}
data-test={`manual-relationship-lcol-${i}`}
@ -332,9 +328,7 @@ const RelationshipEditor = ({
</div>
<div className={'col-sm-4'}>
<select
className={`form-control ${styles.select} ${
styles.wd100Percent
}`}
className={`form-control ${styles.select} ${styles.wd100Percent}`}
value={refColumn}
onChange={setColumn}
disabled={!refTable}

View File

@ -25,9 +25,7 @@ const Relationships = ({
return (
<div>
<Helmet
title={`Relationships - ${
currentAction.action_name
} - Actions | Hasura`}
title={`Relationships - ${currentAction.action_name} - Actions | Hasura`}
/>
{existingRelationships}
<TypeRelationship

View File

@ -144,8 +144,8 @@ export default class QueryAnalyser extends React.Component {
{this.state.activeNode >= 0 &&
this.state.analyseData.length > 0
? this.state.analyseData[
this.state.activeNode
].plan.join('\n')
this.state.activeNode
].plan.join('\n')
: ''}
</code>
</pre>
@ -183,9 +183,9 @@ export default class QueryAnalyser extends React.Component {
if (type === 'sql') {
text = window.sqlFormatter
? window.sqlFormatter.format(
this.state.analyseData[this.state.activeNode].sql,
{ language: 'sql' }
)
this.state.analyseData[this.state.activeNode].sql,
{ language: 'sql' }
)
: this.state.analyseData[this.state.activeNode].sql;
} else {
text = this.state.analyseData[this.state.activeNode].plan.join('\n');

View File

@ -661,8 +661,8 @@ class ApiRequest extends Component {
claimData =
claimFormat === 'stringified_json'
? generateValidNameSpaceData(
JSON.parse(payload[claimNameSpace])
)
JSON.parse(payload[claimNameSpace])
)
: generateValidNameSpaceData(payload[claimNameSpace]);
} catch (e) {
console.error(e);

View File

@ -298,7 +298,7 @@ class AddTable extends Component {
}
/* eslint-disable @typescript-eslint/no-unused-vars */
isValidDefault(type, d) {
isValidDefault() {
return true;
}
/* eslint-enable @typescript-eslint/no-unused-vars */

View File

@ -715,9 +715,7 @@ const ViewRows = ({
<b className={styles.padd_small_right}>Selected:</b>
{selectedRows.length}
<button
className={`${styles.add_mar_right_small} btn btn-xs btn-default ${
styles.bulkDeleteButton
}`}
className={`${styles.add_mar_right_small} btn btn-xs btn-default ${styles.bulkDeleteButton}`}
title="Delete selected rows"
onClick={handleDeleteItems}
>

View File

@ -14,6 +14,7 @@ import ViewRows from './ViewRows';
import { NotFoundError } from '../../../Error/PageNotFound';
/*
const genHeadings = headings => {
if (headings.length === 0) {
return [];
@ -68,6 +69,7 @@ const genRow = (row, headings) => {
throw 'Incomplete pattern match'; // eslint-disable-line no-throw-literal
};
*/
class ViewTable extends Component {
constructor(props) {

View File

@ -91,17 +91,17 @@ const ManualRelationshipSelector = ({
disabled={!relAdd.relType || !relAdd.relName}
>
{// default unselected option
relAdd.rSchema === '' && (
<option value={''} disabled>
{'-- reference schema --'}
</option>
)}
relAdd.rSchema === '' && (
<option value={''} disabled>
{'-- reference schema --'}
</option>
)}
{// all reference schema options
schemaList.map((rs, j) => (
<option key={j} value={rs}>
{rs}
</option>
))}
schemaList.map((rs, j) => (
<option key={j} value={rs}>
{rs}
</option>
))}
</select>
</div>
);
@ -208,16 +208,12 @@ const ManualRelationshipSelector = ({
return (
<div
className={`row ${styles.add_mar_bottom_mid} ${
styles.display_flex
}`}
className={`row ${styles.add_mar_bottom_mid} ${styles.display_flex}`}
key={`fk-col-${_i}`}
>
<div className={`col-sm-4 ${styles.add_mar_right}`}>
<select
className={`form-control ${styles.select} ${
styles.wd100Percent
}`}
className={`form-control ${styles.select} ${styles.wd100Percent}`}
value={lc}
onChange={dispatchSetLcol}
data-test={`manual-relationship-lcol-${_i}`}
@ -242,9 +238,7 @@ const ManualRelationshipSelector = ({
</div>
<div className={'col-sm-4'}>
<select
className={`form-control ${styles.select} ${
styles.wd100Percent
}`}
className={`form-control ${styles.select} ${styles.wd100Percent}`}
value={rc}
onChange={dispatchSetRcol}
disabled={!relAdd.rTable}

View File

@ -360,9 +360,7 @@ class AddTrigger extends Component {
return (
<div
className={`${styles.addTablesBody} ${styles.clear_fix} ${
styles.padd_left
}`}
className={`${styles.addTablesBody} ${styles.clear_fix} ${styles.padd_left}`}
>
<Helmet title="Create Trigger - Events | Hasura" />
<div className={styles.subHeader}>
@ -373,9 +371,7 @@ class AddTrigger extends Component {
<div className={`container-fluid ${styles.padd_left_remove}`}>
<form onSubmit={this.submitValidation.bind(this)}>
<div
className={`${styles.addCol} col-xs-12 ${
styles.padd_left_remove
}`}
className={`${styles.addCol} col-xs-12 ${styles.padd_left_remove}`}
>
<h4 className={styles.subheading_text}>
Trigger Name &nbsp; &nbsp;
@ -522,9 +518,7 @@ class AddTrigger extends Component {
<div className={styles.retrySection}>
<div className={`col-md-3 ${styles.padd_left_remove}`}>
<label
className={`${styles.add_mar_right} ${
styles.retryLabel
}`}
className={`${styles.add_mar_right} ${styles.retryLabel}`}
>
Number of retries (default: 0)
</label>
@ -535,9 +529,7 @@ class AddTrigger extends Component {
dispatch(setRetryNum(e.target.value));
}}
data-test="no-of-retries"
className={`${styles.display_inline} form-control ${
styles.width300
}`}
className={`${styles.display_inline} form-control ${styles.width300}`}
type="text"
placeholder="no of retries"
/>
@ -546,9 +538,7 @@ class AddTrigger extends Component {
<div className={styles.retrySection}>
<div className={`col-md-3 ${styles.padd_left_remove}`}>
<label
className={`${styles.add_mar_right} ${
styles.retryLabel
}`}
className={`${styles.add_mar_right} ${styles.retryLabel}`}
>
Retry Interval in seconds (default: 10)
</label>
@ -559,9 +549,7 @@ class AddTrigger extends Component {
dispatch(setRetryInterval(e.target.value));
}}
data-test="interval-seconds"
className={`${styles.display_inline} form-control ${
styles.width300
}`}
className={`${styles.display_inline} form-control ${styles.width300}`}
type="text"
placeholder="interval time in seconds"
/>
@ -570,9 +558,7 @@ class AddTrigger extends Component {
<div className={styles.retrySection}>
<div className={`col-md-3 ${styles.padd_left_remove}`}>
<label
className={`${styles.add_mar_right} ${
styles.retryLabel
}`}
className={`${styles.add_mar_right} ${styles.retryLabel}`}
>
Timeout in seconds (default: 60)
</label>
@ -583,9 +569,7 @@ class AddTrigger extends Component {
dispatch(setRetryTimeout(e.target.value));
}}
data-test="timeout-seconds"
className={`${styles.display_inline} form-control ${
styles.width300
}`}
className={`${styles.display_inline} form-control ${styles.width300}`}
type="text"
placeholder="timeout in seconds"
/>

View File

@ -139,14 +139,10 @@ class InvokeManualTrigger extends React.Component {
getEventIdErrorText('Unable to invoke trigger');
const getEventData = () => (
<div
className={`${styles.remove_padding_left} container-fluid ${
styles.clear_fix
} ${styles.padd_right_remove}`}
className={`${styles.remove_padding_left} container-fluid ${styles.clear_fix} ${styles.padd_right_remove}`}
>
<div
className={`${styles.remove_padding_left} col-md-12 ${
styles.padd_right_remove
}`}
className={`${styles.remove_padding_left} col-md-12 ${styles.padd_right_remove}`}
>
<div className={`${styles.margin_bottom_20} `}>
Event ID - {eventInfo}

View File

@ -66,9 +66,7 @@ class EventTrigger extends Component {
return (
<div
className={`${styles.padd_left_remove} container-fluid ${
styles.padd_top
}`}
className={`${styles.padd_left_remove} container-fluid ${styles.padd_top}`}
>
<div className={styles.padd_left}>
<Helmet title="Event Triggers | Hasura" />

View File

@ -79,9 +79,7 @@ class HeadersEditor extends React.Component {
<div className={styles.modifyHeadersCollapsedContent} key={i}>
<input
type="text"
className={`${styles.input} form-control ${
styles.add_mar_right
} ${styles.modifyHeadersTextbox}`}
className={`${styles.input} form-control ${styles.add_mar_right} ${styles.modifyHeadersTextbox}`}
value={h.key}
onChange={e => {
dispatch(setHeaderKey(e.target.value, i));

View File

@ -99,9 +99,7 @@ class OperationEditor extends React.Component {
{definition.update ? (
allTableColumns.map((col, i) => (
<div
className={`${styles.opsCheckboxWrapper} ${
styles.columnListElement
} ${styles.padd_remove}`}
className={`${styles.opsCheckboxWrapper} ${styles.columnListElement} ${styles.padd_remove}`}
key={i}
>
<input
@ -139,9 +137,7 @@ class OperationEditor extends React.Component {
<div className={'col-md-12 ' + styles.padd_remove}>
{operationTypes.map((qt, i) => (
<div
className={`${styles.opsCheckboxWrapper} col-md-2 ${
styles.padd_remove
} ${styles.cursorPointer}`}
className={`${styles.opsCheckboxWrapper} col-md-2 ${styles.padd_remove} ${styles.cursorPointer}`}
key={i}
onClick={() => {
dispatch(
@ -173,9 +169,7 @@ class OperationEditor extends React.Component {
{modifyTrigger.definition.update ? (
allTableColumns.map((col, i) => (
<div
className={`${styles.opsCheckboxWrapper} ${
styles.columnListElement
} ${styles.padd_remove} ${styles.cursorPointer}`}
className={`${styles.opsCheckboxWrapper} ${styles.columnListElement} ${styles.padd_remove} ${styles.cursorPointer}`}
key={i}
onClick={() => dispatch(toggleColumn('update', col.name))}
>

View File

@ -94,9 +94,7 @@ class RetryConfEditor extends React.Component {
<input
type="text"
value={modifyTrigger.retryConf.numRetrys}
className={`${styles.input} form-control ${
styles.add_mar_right
} ${styles.modifyRetryConfTextbox}`}
className={`${styles.input} form-control ${styles.add_mar_right} ${styles.modifyRetryConfTextbox}`}
onChange={e => dispatch(setRetryNum(e.target.value))}
/>
</div>
@ -108,9 +106,7 @@ class RetryConfEditor extends React.Component {
<div className="col-md-12">
<input
type="text"
className={`${styles.input} form-control ${
styles.add_mar_right
} ${styles.modifyRetryConfTextbox}`}
className={`${styles.input} form-control ${styles.add_mar_right} ${styles.modifyRetryConfTextbox}`}
value={modifyTrigger.retryConf.retryInterval}
onChange={e => dispatch(setRetryInterval(e.target.value))}
/>
@ -123,9 +119,7 @@ class RetryConfEditor extends React.Component {
<div className="col-md-12">
<input
type="text"
className={`${styles.input} form-control ${
styles.add_mar_right
} ${styles.modifyRetryConfTextbox}`}
className={`${styles.input} form-control ${styles.add_mar_right} ${styles.modifyRetryConfTextbox}`}
value={modifyTrigger.retryConf.timeout}
onChange={e => dispatch(setRetryTimeout(e.target.value))}
/>

View File

@ -207,17 +207,13 @@ class FilterQuery extends Component {
>
<div className="">
<div
className={`${styles.queryBox} col-xs-6 ${
styles.padd_left_remove
}`}
className={`${styles.queryBox} col-xs-6 ${styles.padd_left_remove}`}
>
<span className={styles.subheading_text}>Filter</span>
{renderWheres(whereAnd, triggerSchema, dispatch)}
</div>
<div
className={`${styles.queryBox} col-xs-6 ${
styles.padd_left_remove
}`}
className={`${styles.queryBox} col-xs-6 ${styles.padd_left_remove}`}
>
<b className={styles.subheading_text}>Sort</b>
{renderSorts(orderBy, triggerSchema, dispatch)}

View File

@ -6,6 +6,7 @@ import TableHeader from '../TableCommon/TableHeader';
import ViewRows from './ViewRows';
import { NotFoundError } from '../../../Error/PageNotFound';
/*
const genHeadings = headings => {
if (headings.length === 0) {
return [];
@ -60,6 +61,7 @@ const genRow = (row, headings) => {
throw 'Incomplete pattern match'; // eslint-disable-line no-throw-literal
};
*/
class ViewTable extends Component {
constructor(props) {

View File

@ -207,17 +207,13 @@ class FilterQuery extends Component {
>
<div className="">
<div
className={`${styles.queryBox} col-xs-6 ${
styles.padd_left_remove
}`}
className={`${styles.queryBox} col-xs-6 ${styles.padd_left_remove}`}
>
<span className={styles.subheading_text}>Filter</span>
{renderWheres(whereAnd, triggerSchema, dispatch)}
</div>
<div
className={`${styles.queryBox} col-xs-6 ${
styles.padd_left_remove
}`}
className={`${styles.queryBox} col-xs-6 ${styles.padd_left_remove}`}
>
<b className={styles.subheading_text}>Sort</b>
{renderSorts(orderBy, triggerSchema, dispatch)}

View File

@ -437,26 +437,26 @@ const ViewRows = ({
>
{finalResponse.status_code
? [
'Status Code: ',
verifySuccessStatus(
finalResponse.status_code
)
? successIcon
: failureIcon,
finalResponse.status_code,
' ',
<OverlayTrigger
placement="top"
overlay={
tooltip.statusCodeDescription
}
>
<i
className="fa fa-question-circle"
aria-hidden="true"
/>
</OverlayTrigger>,
]
'Status Code: ',
verifySuccessStatus(
finalResponse.status_code
)
? successIcon
: failureIcon,
finalResponse.status_code,
' ',
<OverlayTrigger
placement="top"
overlay={
tooltip.statusCodeDescription
}
>
<i
className="fa fa-question-circle"
aria-hidden="true"
/>
</OverlayTrigger>,
]
: null}
</div>
<AceEditor

View File

@ -6,6 +6,7 @@ import TableHeader from '../TableCommon/TableHeader';
import ViewRows from './ViewRows';
import { NotFoundError } from '../../../Error/PageNotFound';
/* Functions are unused
const genHeadings = headings => {
if (headings.length === 0) {
return [];
@ -60,6 +61,7 @@ const genRow = (row, headings) => {
throw 'Incomplete pattern match'; // eslint-disable-line no-throw-literal
};
*/
class ViewTable extends Component {
constructor(props) {

View File

@ -207,17 +207,13 @@ class FilterQuery extends Component {
>
<div className="">
<div
className={`${styles.queryBox} col-xs-6 ${
styles.padd_left_remove
}`}
className={`${styles.queryBox} col-xs-6 ${styles.padd_left_remove}`}
>
<span className={styles.subheading_text}>Filter</span>
{renderWheres(whereAnd, triggerSchema, dispatch)}
</div>
<div
className={`${styles.queryBox} col-xs-6 ${
styles.padd_left_remove
}`}
className={`${styles.queryBox} col-xs-6 ${styles.padd_left_remove}`}
>
<b className={styles.subheading_text}>Sort</b>
{renderSorts(orderBy, triggerSchema, dispatch)}

View File

@ -1,11 +1,12 @@
import PropTypes from 'prop-types';
import React, { Component } from 'react';
import { vSetDefaults, vMakeRequest, vExpandHeading } from './ViewActions'; // eslint-disable-line no-unused-vars
import { vSetDefaults, vMakeRequest } from './ViewActions'; // eslint-disable-line no-unused-vars
import { setTrigger } from '../EventActions';
import TableHeader from '../TableCommon/TableHeader';
import ViewRows from './ViewRows';
import { NotFoundError } from '../../../Error/PageNotFound';
/* Functions are unused
const genHeadings = headings => {
if (headings.length === 0) {
return [];
@ -60,6 +61,7 @@ const genRow = (row, headings) => {
throw 'Incomplete pattern match'; // eslint-disable-line no-throw-literal
};
*/
class ViewTable extends Component {
constructor(props) {

View File

@ -299,32 +299,32 @@ class StreamingLogs extends Component {
>
{finalResponse.status_code
? [
'Status Code: ',
verifySuccessStatus(finalResponse.status_code) ? (
<i
className={
styles.invocationSuccess + ' fa fa-check'
}
/>
) : (
<i
className={
styles.invocationFailure + ' fa fa-times'
}
/>
),
finalResponse.status_code,
' ',
<OverlayTrigger
placement="top"
overlay={tooltip.statusCodeDescription}
>
<i
className="fa fa-question-circle"
aria-hidden="true"
/>
</OverlayTrigger>,
]
'Status Code: ',
verifySuccessStatus(finalResponse.status_code) ? (
<i
className={
styles.invocationSuccess + ' fa fa-check'
}
/>
) : (
<i
className={
styles.invocationFailure + ' fa fa-times'
}
/>
),
finalResponse.status_code,
' ',
<OverlayTrigger
placement="top"
overlay={tooltip.statusCodeDescription}
>
<i
className="fa fa-question-circle"
aria-hidden="true"
/>
</OverlayTrigger>,
]
: null}
</div>
<AceEditor

View File

@ -242,10 +242,10 @@ class RedeliverEvent extends Component {
value={
log.eventInvocations[0]
? JSON.stringify(
log.eventInvocations[0].request,
null,
4
)
log.eventInvocations[0].request,
null,
4
)
: ''
}
minLines={10}

View File

@ -39,9 +39,7 @@ class RemoteSchema extends React.Component {
return (
<div
className={`${styles.padd_left_remove} ${
styles.remoteSchemaWrapper
} container-fluid ${styles.padd_top}`}
className={`${styles.padd_left_remove} ${styles.remoteSchemaWrapper} container-fluid ${styles.padd_top}`}
>
<div className={styles.padd_left}>
<Helmet title={`${pageTitle}s | Hasura`} />

View File

@ -48,7 +48,4 @@ RemoteSchemaPageContainer.propTypes = {
};
export default (connect, mapStateToProps, mapDispatchToProps) =>
connect(
mapStateToProps,
mapDispatchToProps
)(RemoteSchemaPageContainer);
connect(mapStateToProps, mapDispatchToProps)(RemoteSchemaPageContainer);

View File

@ -22,9 +22,7 @@ class AllowedQueries extends React.Component {
return (
<div
className={`${styles.clear_fix} ${styles.padd_left} ${
styles.padd_top
} ${styles.metadata_wrapper} container-fluid`}
className={`${styles.clear_fix} ${styles.padd_left} ${styles.padd_top} ${styles.metadata_wrapper} container-fluid`}
>
<div className={styles.subHeader}>
<h2 className={`${styles.heading_text} ${styles.remove_pad_bottom}`}>

View File

@ -61,9 +61,7 @@ const MetadataOptions = props => {
return (
<div
className={`${styles.clear_fix} ${styles.padd_left} ${styles.padd_top} ${
styles.metadata_wrapper
} container-fluid`}
className={`${styles.clear_fix} ${styles.padd_left} ${styles.padd_top} ${styles.metadata_wrapper} container-fluid`}
>
<div className={styles.subHeader}>
<h2 className={`${styles.heading_text} ${styles.remove_pad_bottom}`}>

View File

@ -66,18 +66,14 @@ class ReloadMetadata extends Component {
</Button>
<label
onChange={this.toggleShouldReloadRemoteSchemas}
className={`${metaDataStyles.cursorPointer} ${
metaDataStyles.add_mar_right_small
}`}
className={`${metaDataStyles.cursorPointer} ${metaDataStyles.add_mar_right_small}`}
disabled={this.state.isReloading}
>
<input
type="checkbox"
checked={shouldReloadRemoteSchemas}
readOnly
className={`${metaDataStyles.add_mar_right_small} ${
metaDataStyles.cursorPointer
}`}
className={`${metaDataStyles.add_mar_right_small} ${metaDataStyles.cursorPointer}`}
/>
Reload all remote schemas
</label>

View File

@ -18,9 +18,7 @@ const MetadataStatus = ({ dispatch, metadata }) => {
const inconsistentObjectsTable = () => {
return (
<table
className={`${metaDataStyles.metadataStatusTable} ${
metaDataStyles.wd750
}`}
className={`${metaDataStyles.metadataStatusTable} ${metaDataStyles.wd750}`}
id="t01"
>
<thead>
@ -135,9 +133,7 @@ const MetadataStatus = ({ dispatch, metadata }) => {
</div>
<div className={styles.add}>{inconsistentObjectsTable()}</div>
<div
className={`${metaDataStyles.wd50percent} ${
metaDataStyles.add_mar_top
}`}
className={`${metaDataStyles.wd50percent} ${metaDataStyles.add_mar_top}`}
>
To resolve these inconsistencies, you can do one of the following:
<ul className={styles.add_mar_top_small}>
@ -153,9 +149,7 @@ const MetadataStatus = ({ dispatch, metadata }) => {
</ul>
</div>
<div
className={`${metaDataStyles.display_flex} ${
metaDataStyles.add_mar_top_small
}`}
className={`${metaDataStyles.display_flex} ${metaDataStyles.add_mar_top_small}`}
>
<Button
color="red"
@ -190,9 +184,7 @@ const MetadataStatus = ({ dispatch, metadata }) => {
return (
<div className={`${styles.errorBanner} alert alert-danger`}>
<i
className={`${styles.add_mar_right_small} ${
styles.fontStyleNormal
} fa fa-exclamation-circle`}
className={`${styles.add_mar_right_small} ${styles.fontStyleNormal} fa fa-exclamation-circle`}
aria-hidden="true"
/>
<strong>
@ -200,9 +192,7 @@ const MetadataStatus = ({ dispatch, metadata }) => {
inconsistent state
</strong>
<i
className={`${styles.align_right} ${styles.fontStyleNormal} ${
styles.cursorPointer
} fa fa-times`}
className={`${styles.align_right} ${styles.fontStyleNormal} ${styles.cursorPointer} fa fa-times`}
aria-hidden="true"
onClick={dismissErrorBanner}
/>
@ -214,9 +204,7 @@ const MetadataStatus = ({ dispatch, metadata }) => {
<div className={styles.add_mar_bottom}>
{banner()}
<div
className={`${styles.clear_fix} ${styles.padd_left} ${
styles.padd_top
} ${metaDataStyles.metadata_wrapper} container-fluid`}
className={`${styles.clear_fix} ${styles.padd_left} ${styles.padd_top} ${metaDataStyles.metadata_wrapper} container-fluid`}
>
<h2 className={`${styles.heading_text} ${styles.remove_pad_bottom}`}>
Hasura Metadata Status

View File

@ -8,22 +8,22 @@ export const convertListToDict = list => {
const newList = list instanceof Array ? list : [].concat(list);
return newList.length > 1
? newList.reduce((prev, next) => {
const accumulator =
const accumulator =
prev instanceof Object
? prev
: {
[prev]: 1,
};
return {
...accumulator,
...{
[next]: accumulator[next] ? accumulator[next] + 1 : 1,
},
};
})
[prev]: 1,
};
return {
...accumulator,
...{
[next]: accumulator[next] ? accumulator[next] + 1 : 1,
},
};
})
: {
[newList[0]]: 1,
};
[newList[0]]: 1,
};
};
/**
@ -37,26 +37,26 @@ export const convertListToDictUsingKV = (keyName, keyValue, list) => {
// if the list has more than one object then reduce it.
return list.length > 1
? list.reduce((prev, next, index) => {
// Initial object for the list.
if (index === 1) {
const newObj = {};
newObj[prev[keyName]] = prev[keyValue];
newObj[next[keyName]] = next[keyValue];
return newObj;
}
// Other objects for the list.
prev[next[keyName]] = next[keyValue];
return prev;
})
: (() => {
return list.length <= 0
? {}
: (() => {
// Initial object for the list.
if (index === 1) {
const newObj = {};
newObj[list[0][keyName]] = list[0][keyValue];
newObj[prev[keyName]] = prev[keyValue];
newObj[next[keyName]] = next[keyValue];
return newObj;
})();
})();
}
// Other objects for the list.
prev[next[keyName]] = next[keyValue];
return prev;
})
: (() => {
return list.length <= 0
? {}
: (() => {
const newObj = {};
newObj[list[0][keyName]] = list[0][keyValue];
return newObj;
})();
})();
};
/**
@ -79,7 +79,7 @@ const getValueFromObject = (object, name) => {
// check if the name is present ('as such') in the object.
if (object && object[name]) {
return object[name];
} else if (object && (name.includes('[') && name.includes(']'))) {
} else if (object && name.includes('[') && name.includes(']')) {
// name is consider as a key followed by array indices.
const names = name
.split(']')