-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[EXPERIMENTAL] Prettier! #1629
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[EXPERIMENTAL] Prettier! #1629
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,15 +11,15 @@ | |
var Plotly = require('./core'); | ||
|
||
Plotly.register([ | ||
require('./bar'), | ||
require('./box'), | ||
require('./heatmap'), | ||
require('./histogram'), | ||
require('./histogram2d'), | ||
require('./histogram2dcontour'), | ||
require('./pie'), | ||
require('./contour'), | ||
require('./scatterternary') | ||
require('./bar'), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is it possible to configure There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
require('./box'), | ||
require('./heatmap'), | ||
require('./histogram'), | ||
require('./histogram2d'), | ||
require('./histogram2dcontour'), | ||
require('./pie'), | ||
require('./contour'), | ||
require('./scatterternary'), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👍 for comma-ending last elements (neater diffs) |
||
]); | ||
|
||
module.exports = Plotly; |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,14 +22,15 @@ | |
], | ||
"scripts": { | ||
"preprocess": "node tasks/preprocess.js", | ||
"precommit": "lint-staged", | ||
"bundle": "node tasks/bundle.js", | ||
"header": "node tasks/header.js", | ||
"stats": "node tasks/stats.js", | ||
"build": "npm run preprocess && npm run bundle && npm run header && npm run stats", | ||
"cibuild": "npm run preprocess && node tasks/cibundle.js", | ||
"watch": "node tasks/watch.js", | ||
"lint": "eslint --version && eslint .", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is If not, I think it's better to keep using There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Agreed. Asking on the gitter channel just in case since I wasn't able to find a better answer, but I think that alone might be enough for me. Seems some people run it through both, but that seems a bit annoying (though not necessarily slow if you prettier + eslint only staged files). |
||
"lint-fix": "eslint . --fix || true", | ||
"lint": "prettier-check --single-quote --trailing-comma es5 \"{src,test,tasks,lib}/**/*.js\"", | ||
"lint-fix": "prettier --single-quote --trailing-comma es5 --write \"{src,test,tasks,lib}/**/*.js\"", | ||
"docker": "node tasks/docker.js", | ||
"pretest": "node tasks/pretest.js", | ||
"test-jasmine": "karma start test/jasmine/karma.conf.js", | ||
|
@@ -111,6 +112,7 @@ | |
"glob": "^7.0.0", | ||
"glslify": "^4.0.0", | ||
"gzip-size": "^3.0.0", | ||
"husky": "^0.13.3", | ||
"image-size": "^0.5.1", | ||
"jasmine-core": "^2.4.1", | ||
"karma": "^1.5.0", | ||
|
@@ -122,18 +124,27 @@ | |
"karma-jasmine-spec-tags": "^1.0.1", | ||
"karma-spec-reporter": "0.0.30", | ||
"karma-verbose-reporter": "0.0.6", | ||
"lint-staged": "^3.4.0", | ||
"madge": "^1.6.0", | ||
"minimist": "^1.2.0", | ||
"node-sass": "^4.5.0", | ||
"npm-link-check": "^1.2.0", | ||
"open": "0.0.5", | ||
"prepend-file": "^1.3.1", | ||
"prettier": "^1.2.2", | ||
"prettier-check": "^1.0.0", | ||
"prettysize": "0.0.3", | ||
"read-last-lines": "^1.1.0", | ||
"requirejs": "^2.3.1", | ||
"through2": "^2.0.3", | ||
"uglify-js": "^2.8.12", | ||
"watchify": "^3.9.0", | ||
"xml2js": "^0.4.16" | ||
}, | ||
"lint-staged": { | ||
"{src,test,tasks,lib}/**/*.js": [ | ||
"prettier --single-quote --trailing-comma es5 --write \"{src,test,tasks,lib}/**/*.js\"", | ||
"git add" | ||
] | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is is possible to configure
prettier
to respect vertical formatting?I see the need to split long lines, but joining short one into a single line doesn't help here.