From 13e8dbe14242eadaf1102e64675e923c668078a7 Mon Sep 17 00:00:00 2001 From: Sigve Kvalsvik Date: Wed, 28 Feb 2018 14:40:22 +0100 Subject: [PATCH] Add prettier pre-commit hook --- .prettierrc | 3 +- package.json | 432 +++++++++++++++++++++++++-------------------------- 2 files changed, 217 insertions(+), 218 deletions(-) diff --git a/.prettierrc b/.prettierrc index 5fcd8a70c4..b84588d07b 100644 --- a/.prettierrc +++ b/.prettierrc @@ -1,3 +1,4 @@ { - "tabWidth": 4 + "tabWidth": 4, + "bracketSpacing": false } diff --git a/package.json b/package.json index 4afcb3992c..b735e073c7 100644 --- a/package.json +++ b/package.json @@ -1,226 +1,224 @@ { - "name": "BitShares2-light", - "version": "2.0.180215", - "description": "Advanced wallet interface for the BitShares financial blockchain.", - "homepage": "https://github.com/bitshares/bitshares-ui", - "author": "Sigve Kvalsvik ", - "contributors": [ - "James Calfee", - "Dan Larimer", - "Valentine Zavgorodnev " - ], - "license": "MIT", - "engines": { - "node": ">=7.x", - "npm": ">=4.x", - "yarn": ">=0.21.3" - }, - "repository": { - "type": "git", - "url": "git://github.com/bitshares/bitshares-ui" - }, - "main": "build/electron/index.js", - "scripts": { - "test:market": "cross-env NODE_ENV=test mocha --compilers js:babel-core/register ./app/test/marketTests --watch", - "bench:market": "cross-env NODE_ENV=test babel ./lib/common/MarketClasses.js -o ./app/test/MarketClasses.js && cross-env NODE_ENV=test node --harmony ./test/marketBenchmark", - "profile-dev": "webpack --env.dev --env.profile --profile --json > stats-dev.json", - "profile-build": "cross-env NODE_ENV=production webpack --env.prod --env.profile --profile --json > stats-prod.json", - "profile-nougly": "cross-env NODE_ENV=production webpack --env.prod --env.profile --env.noUgly --profile --json > stats-prod-nougly.json", - "start": "cross-env NODE_ENV=development node server.js", - "start-electron": "electron build/electron/index.js", - "build": "cross-env NODE_ENV=production webpack --env.prod", - "build-hash": "cross-env NODE_ENV=production webpack --env.prod --env.hash --env.baseUrl=''", - "build-hash-nougly": "cross-env NODE_ENV=production webpack --env.prod --env.hash --env.noUgly --env.baseUrl=''", - "build-github": "cross-env NODE_ENV=production webpack --env.prod --env.hash --env.deprecated --env.baseUrl='/wallet/'", - "build-electron": "cross-env NODE_ENV=production webpack --env.prod --env.electron --env.hash", - "build-electron-nougly": "cross-env NODE_ENV=production webpack --env.prod --env.electron --env.noUgly --env.hash --progress --display-error-details --colors", - "prepare-electron": "copyfiles -f resources/*.js build/electron/", - "postbuild-electron": "npm run prepare-electron", - "postbuild-electron-nougly": "npm run prepare-electron", - "build-win32": "cross-env NODE_ENV=production && webpack --env.prod --progress --colors && echo 'copying to electron/build..' && xcopy dist ..\\electron\\build /s /e /y && echo 'done.'", - "prepackage": "npm run build-electron", - "prepackage-no-ugly": "npm run build-electron-nougly", - "package": "build -p never", - "package-no-ugly": "build -p never", - "package-deb": "npm run prepackage && build -p never --linux deb", - "package-win": "npm run prepackage && build -p never --windows", - "package-mac": "npm run prepackage && build -p never --mac dmg" - }, - "jest": { - "scriptPreprocessor": "/__tests__/jest-preprocessor.js", - "testPathDirs": [ - "/__tests__" + "name": "BitShares2-light", + "version": "2.0.180215", + "description": + "Advanced wallet interface for the BitShares financial blockchain.", + "homepage": "https://github.com/bitshares/bitshares-ui", + "author": "Sigve Kvalsvik ", + "contributors": [ + "James Calfee", + "Dan Larimer", + "Valentine Zavgorodnev " ], - "unmockedModulePathPatterns": [ - "/node_modules/react", - "/node_modules/tcomb", - "/node_modules/immutable" - ], - "moduleFileExtensions": [ - "js", - "jsx", - "json", - "coffee" - ], - "testFileExtensions": [ - "js", - "jsx" - ], - "testPathIgnorePatterns": [ - "/jest-preprocessor.js", - "/node_modules/", - "/utils/" - ] - }, - "browsersList": "electron 1.7", - "build": { - "productName": "BitShares", - "appId": "org.bitshares.graphene", - "files": [ - "build/electron", - "!node_modules" - ], - "mac": { - "category": "public.app-category.finance" + "license": "MIT", + "engines": { + "node": ">=7.x", + "npm": ">=4.x", + "yarn": ">=0.21.3" }, - "dmg": { - "contents": [ - { - "x": 130, - "y": 220 - }, - { - "x": 410, - "y": 220, - "type": "link", - "path": "/Applications" - } - ] + "repository": { + "type": "git", + "url": "git://github.com/bitshares/bitshares-ui" }, - "win": { - "target": [ - { - "target": "nsis", - "arch": [ - "x64", - "ia32" - ] + "main": "build/electron/index.js", + "scripts": { + "test:market": + "cross-env NODE_ENV=test mocha --compilers js:babel-core/register ./app/test/marketTests --watch", + "bench:market": + "cross-env NODE_ENV=test babel ./lib/common/MarketClasses.js -o ./app/test/MarketClasses.js && cross-env NODE_ENV=test node --harmony ./test/marketBenchmark", + "profile-dev": + "webpack --env.dev --env.profile --profile --json > stats-dev.json", + "profile-build": + "cross-env NODE_ENV=production webpack --env.prod --env.profile --profile --json > stats-prod.json", + "profile-nougly": + "cross-env NODE_ENV=production webpack --env.prod --env.profile --env.noUgly --profile --json > stats-prod-nougly.json", + "start": "cross-env NODE_ENV=development node server.js", + "start-electron": "electron build/electron/index.js", + "build": "cross-env NODE_ENV=production webpack --env.prod", + "build-hash": + "cross-env NODE_ENV=production webpack --env.prod --env.hash --env.baseUrl=''", + "build-hash-nougly": + "cross-env NODE_ENV=production webpack --env.prod --env.hash --env.noUgly --env.baseUrl=''", + "build-github": + "cross-env NODE_ENV=production webpack --env.prod --env.hash --env.deprecated --env.baseUrl='/wallet/'", + "build-electron": + "cross-env NODE_ENV=production webpack --env.prod --env.electron --env.hash", + "build-electron-nougly": + "cross-env NODE_ENV=production webpack --env.prod --env.electron --env.noUgly --env.hash --progress --display-error-details --colors", + "prepare-electron": "copyfiles -f resources/*.js build/electron/", + "postbuild-electron": "npm run prepare-electron", + "postbuild-electron-nougly": "npm run prepare-electron", + "build-win32": + "cross-env NODE_ENV=production && webpack --env.prod --progress --colors && echo 'copying to electron/build..' && xcopy dist ..\\electron\\build /s /e /y && echo 'done.'", + "precommit": "pretty-quick --staged", + "prepackage": "npm run build-electron", + "prepackage-no-ugly": "npm run build-electron-nougly", + "package": "build -p never", + "package-no-ugly": "build -p never", + "package-deb": "npm run prepackage && build -p never --linux deb", + "package-win": "npm run prepackage && build -p never --windows", + "package-mac": "npm run prepackage && build -p never --mac dmg" + }, + "jest": { + "scriptPreprocessor": "/__tests__/jest-preprocessor.js", + "testPathDirs": ["/__tests__"], + "unmockedModulePathPatterns": [ + "/node_modules/react", + "/node_modules/tcomb", + "/node_modules/immutable" + ], + "moduleFileExtensions": ["js", "jsx", "json", "coffee"], + "testFileExtensions": ["js", "jsx"], + "testPathIgnorePatterns": [ + "/jest-preprocessor.js", + "/node_modules/", + "/utils/" + ] + }, + "browsersList": "electron 1.7", + "build": { + "productName": "BitShares", + "appId": "org.bitshares.graphene", + "files": ["build/electron", "!node_modules"], + "mac": { + "category": "public.app-category.finance" + }, + "dmg": { + "contents": [ + { + "x": 130, + "y": 220 + }, + { + "x": 410, + "y": 220, + "type": "link", + "path": "/Applications" + } + ] + }, + "win": { + "target": [ + { + "target": "nsis", + "arch": ["x64", "ia32"] + } + ] + }, + "linux": { + "category": "Finance", + "target": ["deb", "AppImage"], + "synopsis": "BitShares: Cryptocurrency and Decentralized Exchange" + }, + "directories": { + "buildResources": "resources", + "output": "build/binaries" } - ] }, - "linux": { - "category": "Finance", - "target": [ - "deb", - "AppImage" - ], - "synopsis": "BitShares: Cryptocurrency and Decentralized Exchange" + "dependencies": { + "alt": "^0.18.6", + "alt-container": "^1.0.0", + "alt-react": "0.0.1", + "bignumber.js": "^4.0.0", + "bitsharesjs": "^1.4.3", + "browser-locale": "^1.0.3", + "classnames": "^2.2.1", + "cookies-js": "^1.2.1", + "counterpart": "^0.18.5", + "event-emitter": "^0.3.4", + "file-saver": "^1.3.3", + "foundation-apps": "git+https://github.com/zurb/foundation-apps.git", + "fractional": "^1.0.0", + "highcharts": "4.2.6", + "immutable": "^3.8.1", + "indexeddbshim": "^2.2.1", + "intl": "^1.1.0", + "intro.js": "^2.8.0-alpha.1", + "jdenticon": "git+https://github.com/cryptonomex/jdenticon.git", + "js-sha256": "^0.2.3", + "lodash": "^3.10.1", + "lzma": "2.1.6", + "node-fetch": "^1.3.1", + "node-rsa": "^0.4.2", + "notifyjs": "^3.0.0", + "numeral": "2.0.4", + "object-assign": "^4.0.1", + "perfect-scrollbar": + "git+https://github.com/bitshares/perfect-scrollbar.git", + "qrcode.react": "^0.7.1", + "react": "^15.6.1", + "react-autocomplete": "^1.7.2", + "react-clipboard.js": "^1.0.1", + "react-dom": "^15.6.1", + "react-foundation-apps": + "git+https://github.com/valzav/react-foundation-apps.git", + "react-highcharts": "^12.0.0", + "react-hot-loader": "^3.0.0", + "react-interpolate-component": "^0.10.0", + "react-intl": "^2.4.0", + "react-json-inspector": "^7.0.0", + "react-notification-system": "^0.2.16", + "react-popover": "^0.4.6", + "react-responsive-mixin": "^0.4.0", + "react-router": "^3.0.2", + "react-stockcharts": "^0.6.1", + "react-tooltip": "^3.2.2", + "react-transition-group": "^1.2.0", + "react-translate-component": "^0.14.0", + "steem": "^0.7.1", + "tcomb": "2.5.2", + "whatwg-fetch": "^2.0.1", + "zxcvbn": "^4.4.2" }, - "directories": { - "buildResources": "resources", - "output": "build/binaries" + "devDependencies": { + "babel-core": "^6.21.0", + "babel-eslint": "^7.1.1", + "babel-jest": "^18.0.0", + "babel-loader": "^7.1.1", + "babel-plugin-webpack-alias": "^2.1.2", + "babel-polyfill": "^6.20.0", + "babel-preset-es2015": "^6.18.0", + "babel-preset-react": "^6.16.0", + "babel-preset-stage-0": "^6.16.0", + "benchmark": "^2.1.3", + "clean-webpack-plugin": "^0.1.3", + "coffee-loader": "^0.7.2", + "coffee-script": "^1.12.2", + "copyfiles": "^1.2.0", + "cross-env": "^5.0.5", + "css-loader": "^0.22.0", + "electron": "^1.7.10", + "electron-builder": "^19.53.0", + "es6-promise": "^3.0.2", + "eslint": "^2.11.1", + "eslint-plugin-json": "^1.2.0", + "eslint-plugin-react": "^5.2.2", + "express": "^4.14.0", + "express-history-api-fallback": "^2.1.0", + "extract-text-webpack-plugin": "^3.0.0", + "file-loader": "^0.8.4", + "git-rev-sync": "^1.9.1", + "html-loader": "^0.4.4", + "husky": "^0.14.3", + "jest-cli": "^18.1.0", + "json-loader": "^0.5.4", + "mocha": "^3.2.0", + "node-libs-browser": "^1.0.0", + "node-sass": "^4.5.3", + "postcss-loader": "^0.8.2", + "prettier": "^1.10.2", + "pretty-quick": "^1.4.1", + "react-sticky-table": "^1.2.0", + "remarkable-loader": "^0.2.1", + "sass-loader": "^6.0.6", + "script-loader": "^0.6.1", + "style-loader": "^0.13.1", + "svg-inline-loader": "^0.7.1", + "svgo-loader": "1.1.2", + "url-loader": "^0.5.7", + "webpack": "^3.10.0", + "webpack-dev-middleware": "^1.12.0", + "webpack-hot-middleware": "^2.14.0", + "worker-loader": "^1.1.0" } - }, - "dependencies": { - "alt": "^0.18.6", - "alt-container": "^1.0.0", - "alt-react": "0.0.1", - "bignumber.js": "^4.0.0", - "bitsharesjs": "^1.4.3", - "browser-locale": "^1.0.3", - "classnames": "^2.2.1", - "cookies-js": "^1.2.1", - "counterpart": "^0.18.5", - "event-emitter": "^0.3.4", - "file-saver": "^1.3.3", - "foundation-apps": "git+https://github.com/zurb/foundation-apps.git", - "fractional": "^1.0.0", - "highcharts": "4.2.6", - "immutable": "^3.8.1", - "indexeddbshim": "^2.2.1", - "intl": "^1.1.0", - "intro.js": "^2.8.0-alpha.1", - "jdenticon": "git+https://github.com/cryptonomex/jdenticon.git", - "js-sha256": "^0.2.3", - "lodash": "^3.10.1", - "lzma": "2.1.6", - "node-fetch": "^1.3.1", - "node-rsa": "^0.4.2", - "notifyjs": "^3.0.0", - "numeral": "2.0.4", - "object-assign": "^4.0.1", - "perfect-scrollbar": "git+https://github.com/bitshares/perfect-scrollbar.git", - "qrcode.react": "^0.7.1", - "react": "^15.6.1", - "react-autocomplete": "^1.7.2", - "react-clipboard.js": "^1.0.1", - "react-dom": "^15.6.1", - "react-foundation-apps": "git+https://github.com/valzav/react-foundation-apps.git", - "react-highcharts": "^12.0.0", - "react-hot-loader": "^3.0.0", - "react-interpolate-component": "^0.10.0", - "react-intl": "^2.4.0", - "react-json-inspector": "^7.0.0", - "react-notification-system": "^0.2.16", - "react-popover": "^0.4.6", - "react-responsive-mixin": "^0.4.0", - "react-router": "^3.0.2", - "react-stockcharts": "^0.6.1", - "react-tooltip": "^3.2.2", - "react-transition-group": "^1.2.0", - "react-translate-component": "^0.14.0", - "steem": "^0.7.1", - "tcomb": "2.5.2", - "whatwg-fetch": "^2.0.1", - "zxcvbn": "^4.4.2" - }, - "devDependencies": { - "babel-core": "^6.21.0", - "babel-eslint": "^7.1.1", - "babel-jest": "^18.0.0", - "babel-loader": "^7.1.1", - "babel-plugin-webpack-alias": "^2.1.2", - "babel-polyfill": "^6.20.0", - "babel-preset-es2015": "^6.18.0", - "babel-preset-react": "^6.16.0", - "babel-preset-stage-0": "^6.16.0", - "benchmark": "^2.1.3", - "clean-webpack-plugin": "^0.1.3", - "coffee-loader": "^0.7.2", - "coffee-script": "^1.12.2", - "copyfiles": "^1.2.0", - "cross-env": "^5.0.5", - "css-loader": "^0.22.0", - "electron": "^1.7.10", - "electron-builder": "^19.53.0", - "es6-promise": "^3.0.2", - "eslint": "^2.11.1", - "eslint-plugin-json": "^1.2.0", - "eslint-plugin-react": "^5.2.2", - "express": "^4.14.0", - "express-history-api-fallback": "^2.1.0", - "extract-text-webpack-plugin": "^3.0.0", - "file-loader": "^0.8.4", - "git-rev-sync": "^1.9.1", - "html-loader": "^0.4.4", - "jest-cli": "^18.1.0", - "json-loader": "^0.5.4", - "mocha": "^3.2.0", - "node-libs-browser": "^1.0.0", - "node-sass": "^4.5.3", - "postcss-loader": "^0.8.2", - "prettier": "^1.10.2", - "react-sticky-table": "^1.2.0", - "remarkable-loader": "^0.2.1", - "sass-loader": "^6.0.6", - "script-loader": "^0.6.1", - "style-loader": "^0.13.1", - "svg-inline-loader": "^0.7.1", - "svgo-loader": "1.1.2", - "url-loader": "^0.5.7", - "webpack": "^3.10.0", - "webpack-dev-middleware": "^1.12.0", - "webpack-hot-middleware": "^2.14.0", - "worker-loader": "^1.1.0" - } }