Skip to content

Disable eslint rules that can conflict with prettier #1421

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

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 29 additions & 29 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -42,33 +42,33 @@
"rules": {
"prettier/prettier": 2,

"flowtype/space-after-type-colon": [2, "always"],
"flowtype/space-before-type-colon": [2, "never"],
"flowtype/space-before-generic-bracket": [2, "never"],
"flowtype/union-intersection-spacing": [2, "always"],
"flowtype/space-after-type-colon": 0,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we get the same result if we just remove these lines completely? If so, it makes it a lot easier to parse the file, so let's delete them all.

If instead they default to 1, then yeah this is the way to go.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mjmahone It's useful to keep them as the reference for adding new rules.
I plan to add a bunch of new rules added in the past couple years and without having explicitly disabled ones it will make this task very hard.
Ideally, we need to check for new rules on every eslint update so I think we need to keep zeros.
And this was done previously for other rules: 40f73fd

I plan to cleanup eslint config more in a separate PR and swith to off, warn and error instead of 0,1 and 2.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good! Thanks for the context.

"flowtype/space-before-type-colon": 0,
"flowtype/space-before-generic-bracket": 0,
"flowtype/union-intersection-spacing": 0,
"flowtype/no-weak-types": [2, {"any": false}],
"flowtype/define-flow-type": 2,
"flowtype/use-flow-type": 2,
"flowtype/semi": 2,
"flowtype/semi": 0,

"arrow-parens": [2, "as-needed"],
"arrow-spacing": 2,
"arrow-parens": 0,
"arrow-spacing": 0,
"block-scoped-var": 0,
"brace-style": [2, "1tbs", {"allowSingleLine": true}],
"brace-style": 0,
"callback-return": 2,
"camelcase": [2, {"properties": "always"}],
"comma-dangle": 0,
"comma-spacing": 0,
"comma-style": [2, "last"],
"comma-style": 0,
"complexity": 0,
"computed-property-spacing": [2, "never"],
"computed-property-spacing": 0,
"consistent-return": 0,
"consistent-this": 0,
"curly": [2, "all"],
"default-case": 0,
"dot-location": [2, "property"],
"dot-location": 0,
"dot-notation": 0,
"eol-last": 2,
"eol-last": 0,
"eqeqeq": ["error", "smart"],
"func-names": 0,
"func-style": 0,
Expand All @@ -78,8 +78,8 @@
"id-match": [2, "^(?:_?[a-zA-Z0-9]*)|[_A-Z0-9]+$"],
"indent": 0,
"init-declarations": 0,
"key-spacing": [2, {"beforeColon": false, "afterColon": true}],
"keyword-spacing": 2,
"key-spacing": 0,
"keyword-spacing": 0,
"linebreak-style": 2,
"lines-around-comment": 0,
"max-depth": 0,
Expand All @@ -88,7 +88,7 @@
"max-params": 0,
"max-statements": 0,
"new-cap": 0,
"new-parens": 2,
"new-parens": 0,
"newline-after-var": 0,
"no-alert": 2,
"no-array-constructor": 2,
Expand Down Expand Up @@ -119,9 +119,9 @@
"no-extra-bind": 2,
"no-extra-boolean-cast": 2,
"no-extra-parens": 0,
"no-extra-semi": 2,
"no-extra-semi": 0,
"no-fallthrough": 2,
"no-floating-decimal": 2,
"no-floating-decimal": 0,
"no-func-assign": 2,
"no-implicit-coercion": 2,
"no-implied-eval": 2,
Expand All @@ -137,8 +137,8 @@
"no-lonely-if": 2,
"no-loop-func": 0,
"no-mixed-requires": [2, true],
"no-mixed-spaces-and-tabs": 2,
"no-multi-spaces": 2,
"no-mixed-spaces-and-tabs": 0,
"no-multi-spaces": 0,
"no-multi-str": 2,
"no-multiple-empty-lines": 0,
"no-native-reassign": 0,
Expand Down Expand Up @@ -167,18 +167,18 @@
"no-sequences": 0,
"no-shadow": 2,
"no-shadow-restricted-names": 2,
"no-spaced-func": 2,
"no-spaced-func": 0,
"no-sparse-arrays": 2,
"no-sync": 2,
"no-ternary": 0,
"no-this-before-super": 2,
"no-throw-literal": 2,
"no-trailing-spaces": 2,
"no-trailing-spaces": 0,
"no-undef": 2,
"no-undef-init": 2,
"no-undefined": 0,
"no-underscore-dangle": 0,
"no-unexpected-multiline": 2,
"no-unexpected-multiline": 0,
"no-unneeded-ternary": 2,
"no-unreachable": 2,
"no-unused-expressions": 2,
Expand All @@ -199,23 +199,23 @@
"prefer-const": 2,
"prefer-reflect": 0,
"prefer-spread": 0,
"quote-props": [2, "as-needed", {"numbers": true}],
"quote-props": 0,
"radix": 2,
"require-yield": 0,
"semi": [2, "always"],
"semi-spacing": [2, {"before": false, "after": true}],
"semi": 0,
"semi-spacing": 0,
"sort-vars": 0,
"space-before-blocks": [2, "always"],
"space-before-blocks": 0,
"space-in-parens": 0,
"space-infix-ops": [2, {"int32Hint": false}],
"space-unary-ops": [2, {"words": true, "nonwords": false}],
"space-infix-ops": 0,
"space-unary-ops": 0,
"spaced-comment": [2, "always"],
"strict": 0,
"use-isnan": 2,
"valid-jsdoc": 0,
"valid-typeof": 2,
"vars-on-top": 0,
"wrap-iife": 2,
"wrap-iife": 0,
"wrap-regex": 0,
"yoda": [2, "never", {"exceptRange": true}],

Expand Down