mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Merge pull request #3505 from overleaf/as-reenable-lint-rules
Reenable some lint rules GitOrigin-RevId: 42d891f24b7ab101308adcf8f31cccf7ac229a59
This commit is contained in:
parent
f6decd4728
commit
4faa6dde0d
2 changed files with 23 additions and 19 deletions
|
@ -39,31 +39,30 @@
|
|||
}
|
||||
},
|
||||
"rules": {
|
||||
// Swap the no-unused-expressions rule with a more chai-friendly one
|
||||
"no-unused-expressions": "off",
|
||||
"chai-friendly/no-unused-expressions": "error",
|
||||
|
||||
// Disable some rules after upgrading ESLint
|
||||
// TODO: re-enable and fix
|
||||
"no-prototype-builtins": "off",
|
||||
"no-var": "off",
|
||||
"prefer-const": "off",
|
||||
"prefer-regex-literals": "off",
|
||||
"array-callback-return": "off",
|
||||
"no-unreachable-loop": "off",
|
||||
"no-loss-of-precision": "off",
|
||||
|
||||
"node/no-callback-literal": "off",
|
||||
"node/no-deprecated-api": "off",
|
||||
"node/handle-callback-err": "off",
|
||||
"node/no-path-concat": "off",
|
||||
"no-prototype-builtins": "off",
|
||||
// Swap the no-unused-expressions rule with a more chai-friendly one
|
||||
"no-unused-expressions": "off",
|
||||
"no-unused-vars": "off",
|
||||
"no-var": "off",
|
||||
"prefer-const": "off",
|
||||
"prefer-regex-literals": "off",
|
||||
"react/jsx-curly-brace-presence": ["error", {
|
||||
"props": "never",
|
||||
"children": "never"
|
||||
}],
|
||||
|
||||
"react/display-name": "off",
|
||||
"react/no-unescaped-entities": "off",
|
||||
"react/no-unused-prop-types": "off",
|
||||
"react/jsx-no-target-blank": "off",
|
||||
"react/jsx-handler-names": "off",
|
||||
"array-callback-return": "off",
|
||||
"no-empty": "off",
|
||||
"no-unreachable-loop": "off",
|
||||
"no-loss-of-precision": "off",
|
||||
"chai-friendly/no-unused-expressions": "error"
|
||||
"react/jsx-handler-names": "off"
|
||||
},
|
||||
"overrides": [
|
||||
// NOTE: changing paths may require updating them in the Makefile too.
|
||||
|
@ -128,6 +127,12 @@
|
|||
// Prevent usage of legacy string refs
|
||||
"react/no-string-refs": "error",
|
||||
|
||||
// Prevent curly braces around strings (as they're unnecessary)
|
||||
"react/jsx-curly-brace-presence": ["error", {
|
||||
"props": "never",
|
||||
"children": "never"
|
||||
}],
|
||||
|
||||
// Fix conflict between prettier & standard by overriding to prefer
|
||||
// double quotes
|
||||
"jsx-quotes": ["error", "prefer-double"],
|
||||
|
|
|
@ -93,8 +93,7 @@ class TrackChangesManager {
|
|||
}
|
||||
|
||||
onChangeScroll() {
|
||||
if (this._scrollTimeout != null) {
|
||||
} else {
|
||||
if (this._scrollTimeout == null) {
|
||||
return (this._scrollTimeout = setTimeout(() => {
|
||||
this.recalculateVisibleEntries()
|
||||
this.$scope.$apply()
|
||||
|
|
Loading…
Reference in a new issue