You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We should also add the camelcase rule with the {"properties": "never"} option. I've seen a few community developers defining snake-case variables in their PRs.
We previously started to dislike else statements sitting on new lines and tried to fix them in other PRs.
To put all else and catch statements inline with the closing curly braces, I suggest we use "brace-style": [2, "1tbs", {"allowSingleLine": true}], instead of "brace-style": [0, "stroustrup", {"allowSingleLine": true}], then run npm run lint -- --fix on a separate PR (possibly now that we have only a few PRs open).
We could then fix just a few edge cases where there is a comment on top of an else statement.
Hi - this issue has been sitting for a while, so as part of our effort to tidy up our public repositories I'm going to close it. If it's still a concern, we'd be grateful if you could open a new issue (with a short reproducible example if appropriate) so that we can add it to our stack. Cheers - @gvwilson
Activity
[-]Update lint style[/-][+]Update eslint rules[/+]etpinard commentedon Oct 26, 2018
We should also add the
camelcaserule with the{"properties": "never"}option. I've seen a few community developers defining snake-case variables in their PRs.Done in #3374
alexcjohnson commentedon Oct 26, 2018
etpinard commentedon Oct 26, 2018
etpinard commentedon Oct 29, 2018
One more from https://github.com/plotly/plotly.js/pull/3125/files#r227541345:
etpinard commentedon Dec 21, 2018
from #3020
consider enabling https://eslint.org/docs/rules/no-shadow - can save us from some very confusing bugs.
As @etpinard mentions in #3017:
etpinard commentedon Jan 15, 2019
Potential new rule:
/*eslint quote-props: ["error", "as-needed"]*/https://eslint.org/docs/rules/quote-props
which fits the style in most (but not all!) of our src files.
etpinard commentedon Jan 21, 2019
Potential new rule:
/*eslint padded-blocks: ["error", "never"]*/https://eslint.org/docs/rules/padded-blocks
DONE in: #3697
etpinard commentedon Jan 24, 2019
Maybe update our
no-multiple-empty-linesrule down to{"max": 1}archmoj commentedon Apr 10, 2019
We previously started to dislike

elsestatements sitting on new lines and tried to fix them in other PRs.To put all
elseandcatchstatements inline with the closing curly braces, I suggest we use"brace-style": [2, "1tbs", {"allowSingleLine": true}],instead of"brace-style": [0, "stroustrup", {"allowSingleLine": true}],then runnpm run lint -- --fixon a separate PR (possibly now that we have only a few PRs open).We could then fix just a few edge cases where there is a comment on top of an
elsestatement.DONE in: #3757
etpinard commentedon Apr 10, 2019
archmoj commentedon Apr 17, 2019
Potential rule: https://eslint.org/docs/rules/func-names
etpinard commentedon May 22, 2019
Potential rule: https://eslint.org/docs/rules/max-statements-per-line
archmoj commentedon May 22, 2019
I am a fan of it.
Also we may limit the number of characters on each line using: https://eslint.org/docs/rules/max-len.
archmoj commentedon Jun 11, 2019
Potential rule: https://eslint.org/docs/rules/object-curly-spacing
eslint object-curly-spacing: ["error", "always"]etpinard commentedon Jul 23, 2019
https://eslint.org/docs/rules/no-prototype-builtins is now turned on by default in eslint
v6, we turned it off in e61ee25 (as it madenpm run lintfail in about ~20 places) but it might be nice turn it back on at some pointarchmoj commentedon Aug 6, 2019
Potential rule: https://eslint.org/docs/rules/global-require
gvwilson commentedon Jun 11, 2024
Hi - this issue has been sitting for a while, so as part of our effort to tidy up our public repositories I'm going to close it. If it's still a concern, we'd be grateful if you could open a new issue (with a short reproducible example if appropriate) so that we can add it to our stack. Cheers - @gvwilson