Skip to content

Commit

Permalink
Adding linting and cleaning up some files
Browse files Browse the repository at this point in the history
  • Loading branch information
tjayrush committed Jan 28, 2020
1 parent 7ba68a1 commit 091fea1
Show file tree
Hide file tree
Showing 6 changed files with 75 additions and 26 deletions.
1 change: 1 addition & 0 deletions frontend/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
src/pages/templates
17 changes: 17 additions & 0 deletions frontend/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
module.exports = {
parser: "babel-eslint",
parserOptions: {
sourceType: 'module', // Allows for the use of imports
ecmaFeatures: {
jsx: true // Allows for the parsing of JSX
}
},
settings: {
react: {
version: 'detect', // Tells eslint-plugin-react to automatically detect the version of React to use
},
},
"rules": {
}
};

7 changes: 6 additions & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,14 @@
"eject": "react-scripts eject",
"document": "documentation build src/components/*.js -f html -o docs/components ; open docs/components/index.html",
"precommit": "pretty-quick --staged",
"backup": "tar --exclude \"./.git\" --exclude \"./build\" --exclude \"./node_modules\" -cvf ../../trueblocks-backups/frontend.tar . ; gzip ../../trueblocks-backups/*.tar && open ../../trueblocks-backups"
"backup": "tar --exclude \"./.git\" --exclude \"./build\" --exclude \"./node_modules\" -cvf ../../trueblocks-backups/frontend.tar . ; gzip ../../trueblocks-backups/*.tar && open ../../trueblocks-backups",
"prettify": "node_modules/.bin/prettier '{src,test,mocks}/**/*.js' --write",
"lint": "eslint '{src,test,mocks}/**/*.js'",
"generate": "cd src/pages/templates ; makeClass -jav ; cd - 1>/dev/null 2>&1"
},
"devDependencies": {
"babel-eslint": "^10.0.3",
"eslint-plugin-react": "^7.18.0",
"prettier": "^1.19.1",
"react-scripts": "2.1.8",
"redux-devtools": "^3.5.0"
Expand Down
8 changes: 8 additions & 0 deletions frontend/src/components/PageHelp.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ const helpToPage = new Map([
'addresses',
() => (
<span>
<h4>Addresses Page</h4>
Monitors are per-address index caches that enable fast reteival of transaction histories for any account. Note
that the transactions/logs/receipts/traces are not downloaded until you explore an address.
</span>
Expand All @@ -24,6 +25,7 @@ const helpToPage = new Map([
'caches',
() => (
<span>
<h4>Caches Page</h4>
TrueBlocks Caches greatly speed up access to the Ethereum data; however, they take up a lot of space on your
hard drive, so you have to keep any eye on them. Clean them out periodically so they dont get too big.
</span>
Expand All @@ -33,6 +35,7 @@ const helpToPage = new Map([
'explore',
() => (
<span>
<h4>Explore Page</h4>
The Explore module allows one to view the details of every transactions for each previously monitored address.
Because TrueBlocks runs on a local machine not a server, this means that you are restricted to exploring only
addresses that youve previously monitored.
Expand All @@ -43,6 +46,7 @@ const helpToPage = new Map([
'indicies',
() => (
<span>
<h4>Indicies Page</h4>
TrueBlocks index of appearances greatly speed up access to the Ethereum data; however, they take up a lot of
space on your hard drive, so you have to keep any eye on them. Clean them out periodically so they dont get too
big.
Expand All @@ -53,6 +57,7 @@ const helpToPage = new Map([
'other',
() => (
<span>
<h4>Other Page</h4>
The Other panel allows you to configure various other items related to TrueBlocks. This panel allows for many
things including some other stuff.
</span>
Expand All @@ -62,6 +67,7 @@ const helpToPage = new Map([
'settings',
() => (
<span>
<h4>Settings Page</h4>
Monitors are per-address index caches that enable fast retreival of appearance histories for any account.
</span>
)
Expand All @@ -70,6 +76,7 @@ const helpToPage = new Map([
'signatures',
() => (
<span>
<h4>Signatures Page</h4>
TrueBlocks Signatures greatly speed up access to the Ethereum data; however, they take up a lot of space on your
hard drive, so you have to keep any eye on them. Clean them out periodically so they dont get too big.
</span>
Expand All @@ -79,6 +86,7 @@ const helpToPage = new Map([
'support',
() => (
<span>
<h4>Support Page</h4>
We provide various support options ranging from online email/forum discussions to full enterprise-level support
plans to suit your needs. Weve got you covered.
</span>
Expand Down
3 changes: 0 additions & 3 deletions frontend/src/config.json

This file was deleted.

65 changes: 43 additions & 22 deletions frontend/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1550,7 +1550,7 @@ array-flatten@^2.1.0:
resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-2.1.2.tgz#24ef80a28c1a893617e2149b0c6d0d788293b099"
integrity sha512-hNfzcOV8W4NdualtqBFPyVO+54DSJuZGY9qT4pRroB6S9e3iiido2ISIC5h9R2sPJ8H3FHCIiEnsv1lPXO3KtQ==

array-includes@^3.0.3:
array-includes@^3.0.3, array-includes@^3.1.1:
version "3.1.1"
resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.1.1.tgz#cdd67e6852bdf9c1215460786732255ed2459348"
integrity sha512-c2VXaCHl7zPsvpkFsw4nxvFie4fh1ur9bpcgsVkIjqn0H/Xwdg+7fv3n2r/isyS8EBj5b06M9kHyZuIr4El6WQ==
Expand Down Expand Up @@ -1754,6 +1754,18 @@ [email protected]:
eslint-scope "3.7.1"
eslint-visitor-keys "^1.0.0"

babel-eslint@^10.0.3:
version "10.0.3"
resolved "https://registry.yarnpkg.com/babel-eslint/-/babel-eslint-10.0.3.tgz#81a2c669be0f205e19462fed2482d33e4687a88a"
integrity sha512-z3U7eMY6r/3f3/JB9mTsLjyxrv0Yb1zb8PCWCLpguxfCzBIZUwy23R1t/XKewP+8mEN2Ck8Dtr4q20z6ce6SoA==
dependencies:
"@babel/code-frame" "^7.0.0"
"@babel/parser" "^7.0.0"
"@babel/traverse" "^7.0.0"
"@babel/types" "^7.0.0"
eslint-visitor-keys "^1.0.0"
resolve "^1.12.0"

babel-extract-comments@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/babel-extract-comments/-/babel-extract-comments-1.0.0.tgz#0a2aedf81417ed391b85e18b4614e693a0351a21"
Expand Down Expand Up @@ -3947,6 +3959,21 @@ [email protected]:
prop-types "^15.6.2"
resolve "^1.9.0"

eslint-plugin-react@^7.18.0:
version "7.18.0"
resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.18.0.tgz#2317831284d005b30aff8afb7c4e906f13fa8e7e"
integrity sha512-p+PGoGeV4SaZRDsXqdj9OWcOrOpZn8gXoGPcIQTzo2IDMbAKhNDnME9myZWqO3Ic4R3YmwAZ1lDjWl2R2hMUVQ==
dependencies:
array-includes "^3.1.1"
doctrine "^2.1.0"
has "^1.0.3"
jsx-ast-utils "^2.2.3"
object.entries "^1.1.1"
object.fromentries "^2.0.2"
object.values "^1.1.1"
prop-types "^15.7.2"
resolve "^1.14.2"

[email protected]:
version "3.7.1"
resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-3.7.1.tgz#3d63c3edfda02e06e01a452ad88caacc7cdcb6e8"
Expand Down Expand Up @@ -6317,7 +6344,7 @@ jsprim@^1.2.2:
json-schema "0.2.3"
verror "1.10.0"

jsx-ast-utils@^2.0.1:
jsx-ast-utils@^2.0.1, jsx-ast-utils@^2.2.3:
version "2.2.3"
resolved "https://registry.yarnpkg.com/jsx-ast-utils/-/jsx-ast-utils-2.2.3.tgz#8a9364e402448a3ce7f14d357738310d9248054f"
integrity sha512-EdIHFMm+1BPynpKOpdPqiOsvnIrInRGJD7bzPZdPkjitQEqpdpUuFpq4T0npZFKTiB3RhWFdGN+oqOJIdhDhQA==
Expand Down Expand Up @@ -7027,22 +7054,6 @@ node-notifier@^5.2.1:
shellwords "^0.1.1"
which "^1.3.0"

node-pre-gyp@*:
version "0.14.0"
resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.14.0.tgz#9a0596533b877289bcad4e143982ca3d904ddc83"
integrity sha512-+CvDC7ZttU/sSt9rFjix/P05iS43qHCOOGzcr3Ry99bXG7VX953+vFyEuph/tfqoYu8dttBkE86JSKBO2OzcxA==
dependencies:
detect-libc "^1.0.2"
mkdirp "^0.5.1"
needle "^2.2.1"
nopt "^4.0.1"
npm-packlist "^1.1.6"
npmlog "^4.0.2"
rc "^1.2.7"
rimraf "^2.6.1"
semver "^5.3.0"
tar "^4.4.2"

node-pre-gyp@^0.10.0:
version "0.10.3"
resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.10.3.tgz#3070040716afdc778747b61b6887bf78880b80fc"
Expand Down Expand Up @@ -7222,7 +7233,17 @@ object.assign@^4.1.0:
has-symbols "^1.0.0"
object-keys "^1.0.11"

object.fromentries@^2.0.0:
object.entries@^1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/object.entries/-/object.entries-1.1.1.tgz#ee1cf04153de02bb093fec33683900f57ce5399b"
integrity sha512-ilqR7BgdyZetJutmDPfXCDffGa0/Yzl2ivVNpbx/g4UeWrCdRnFDUBrKJGLhGieRHDATnyZXWBeCb29k9CJysQ==
dependencies:
define-properties "^1.1.3"
es-abstract "^1.17.0-next.1"
function-bind "^1.1.1"
has "^1.0.3"

object.fromentries@^2.0.0, object.fromentries@^2.0.2:
version "2.0.2"
resolved "https://registry.yarnpkg.com/object.fromentries/-/object.fromentries-2.0.2.tgz#4a09c9b9bb3843dd0f89acdb517a794d4f355ac9"
integrity sha512-r3ZiBH7MQppDJVLx6fhD618GKNG40CZYH9wgwdhKxBDDbQgjeWGGd4AtkZad84d291YxvWe7bJGuE65Anh0dxQ==
Expand Down Expand Up @@ -7255,7 +7276,7 @@ object.pick@^1.3.0:
dependencies:
isobject "^3.0.1"

object.values@^1.1.0:
object.values@^1.1.0, object.values@^1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.1.1.tgz#68a99ecde356b7e9295a3c5e0ce31dc8c953de5e"
integrity sha512-WTa54g2K8iu0kmS/us18jEmdv1a4Wi//BZ/DTVYEcH0XhLM5NYdpDHja3gt57VrZLcNAO2WGA+KpWsDBaHt6eA==
Expand Down Expand Up @@ -9150,7 +9171,7 @@ [email protected]:
dependencies:
path-parse "^1.0.6"

resolve@^1.10.0, resolve@^1.13.1, resolve@^1.3.2, resolve@^1.6.0, resolve@^1.8.1, resolve@^1.9.0:
resolve@^1.10.0, resolve@^1.12.0, resolve@^1.13.1, resolve@^1.14.2, resolve@^1.3.2, resolve@^1.6.0, resolve@^1.8.1, resolve@^1.9.0:
version "1.15.0"
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.15.0.tgz#1b7ca96073ebb52e741ffd799f6b39ea462c67f5"
integrity sha512-+hTmAldEGE80U2wJJDC1lebb5jWqvTYAfm3YZ1ckk1gBr0MnCqUKlwK1e+anaFljIl+F5tR5IoZcm4ZDA1zMQw==
Expand Down Expand Up @@ -10013,7 +10034,7 @@ tapable@^1.0.0, tapable@^1.1.0:
resolved "https://registry.yarnpkg.com/tapable/-/tapable-1.1.3.tgz#a1fccc06b58db61fd7a45da2da44f5f3a3e67ba2"
integrity sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA==

tar@^4, tar@^4.4.2:
tar@^4:
version "4.4.13"
resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.13.tgz#43b364bc52888d555298637b10d60790254ab525"
integrity sha512-w2VwSrBoHa5BsSyH+KxEqeQBAllHhccyMFVHtGtdMpF4W7IRWfZjFiQceJPChOeTsSDVUpER2T8FA93pr0L+QA==
Expand Down

0 comments on commit 091fea1

Please sign in to comment.