mirror of
https://github.com/overleaf/overleaf.git
synced 2025-02-18 20:01:08 +00: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": {
|
"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-callback-literal": "off",
|
||||||
"node/no-deprecated-api": "off",
|
"node/no-deprecated-api": "off",
|
||||||
"node/handle-callback-err": "off",
|
"node/handle-callback-err": "off",
|
||||||
"node/no-path-concat": "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/display-name": "off",
|
||||||
"react/no-unescaped-entities": "off",
|
"react/no-unescaped-entities": "off",
|
||||||
"react/no-unused-prop-types": "off",
|
"react/no-unused-prop-types": "off",
|
||||||
"react/jsx-no-target-blank": "off",
|
"react/jsx-no-target-blank": "off",
|
||||||
"react/jsx-handler-names": "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"
|
|
||||||
},
|
},
|
||||||
"overrides": [
|
"overrides": [
|
||||||
// NOTE: changing paths may require updating them in the Makefile too.
|
// NOTE: changing paths may require updating them in the Makefile too.
|
||||||
|
@ -128,6 +127,12 @@
|
||||||
// Prevent usage of legacy string refs
|
// Prevent usage of legacy string refs
|
||||||
"react/no-string-refs": "error",
|
"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
|
// Fix conflict between prettier & standard by overriding to prefer
|
||||||
// double quotes
|
// double quotes
|
||||||
"jsx-quotes": ["error", "prefer-double"],
|
"jsx-quotes": ["error", "prefer-double"],
|
||||||
|
|
|
@ -93,8 +93,7 @@ class TrackChangesManager {
|
||||||
}
|
}
|
||||||
|
|
||||||
onChangeScroll() {
|
onChangeScroll() {
|
||||||
if (this._scrollTimeout != null) {
|
if (this._scrollTimeout == null) {
|
||||||
} else {
|
|
||||||
return (this._scrollTimeout = setTimeout(() => {
|
return (this._scrollTimeout = setTimeout(() => {
|
||||||
this.recalculateVisibleEntries()
|
this.recalculateVisibleEntries()
|
||||||
this.$scope.$apply()
|
this.$scope.$apply()
|
||||||
|
|
Loading…
Reference in a new issue