Enable the getter-return
, no-dupe-else-if
, and no-setter-return
ESLint rules
All of these rules can help catch errors during development. Please note that only `getter-return` required a few changes, which was limited to disabling the rule in a couple of spots; please find additional details about these rules at: - https://eslint.org/docs/rules/getter-return - https://eslint.org/docs/rules/no-dupe-else-if - https://eslint.org/docs/rules/no-setter-return
This commit is contained in:
parent
b8f0cf0bc0
commit
a965662184
@ -35,10 +35,12 @@
|
|||||||
|
|
||||||
// Possible errors
|
// Possible errors
|
||||||
"for-direction": "error",
|
"for-direction": "error",
|
||||||
|
"getter-return": "error",
|
||||||
"no-async-promise-executor": "error",
|
"no-async-promise-executor": "error",
|
||||||
"no-cond-assign": ["error", "except-parens"],
|
"no-cond-assign": ["error", "except-parens"],
|
||||||
"no-constant-condition": ["error", { "checkLoops": false, }],
|
"no-constant-condition": ["error", { "checkLoops": false, }],
|
||||||
"no-dupe-args": "error",
|
"no-dupe-args": "error",
|
||||||
|
"no-dupe-else-if": "error",
|
||||||
"no-dupe-keys": "error",
|
"no-dupe-keys": "error",
|
||||||
"no-duplicate-case": "error",
|
"no-duplicate-case": "error",
|
||||||
"no-empty": ["error", { "allowEmptyCatch": true, }],
|
"no-empty": ["error", { "allowEmptyCatch": true, }],
|
||||||
@ -51,6 +53,7 @@
|
|||||||
"no-irregular-whitespace": "error",
|
"no-irregular-whitespace": "error",
|
||||||
"no-obj-calls": "error",
|
"no-obj-calls": "error",
|
||||||
"no-regex-spaces": "error",
|
"no-regex-spaces": "error",
|
||||||
|
"no-setter-return": "error",
|
||||||
"no-sparse-arrays": "error",
|
"no-sparse-arrays": "error",
|
||||||
"no-unexpected-multiline": "error",
|
"no-unexpected-multiline": "error",
|
||||||
"no-unreachable": "error",
|
"no-unreachable": "error",
|
||||||
|
@ -394,7 +394,7 @@ class IdentityCMap extends CMap {
|
|||||||
return 0x10000;
|
return 0x10000;
|
||||||
}
|
}
|
||||||
|
|
||||||
get isIdentityCMap() {
|
get isIdentityCMap() { // eslint-disable-line getter-return
|
||||||
unreachable('should not access .isIdentityCMap');
|
unreachable('should not access .isIdentityCMap');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -106,15 +106,15 @@ class BaseFontLoader {
|
|||||||
unreachable('Abstract method `_queueLoadingCallback`.');
|
unreachable('Abstract method `_queueLoadingCallback`.');
|
||||||
}
|
}
|
||||||
|
|
||||||
get isFontLoadingAPISupported() {
|
get isFontLoadingAPISupported() { // eslint-disable-line getter-return
|
||||||
unreachable('Abstract method `isFontLoadingAPISupported`.');
|
unreachable('Abstract method `isFontLoadingAPISupported`.');
|
||||||
}
|
}
|
||||||
|
|
||||||
get isSyncFontLoadingSupported() {
|
get isSyncFontLoadingSupported() { // eslint-disable-line getter-return
|
||||||
unreachable('Abstract method `isSyncFontLoadingSupported`.');
|
unreachable('Abstract method `isSyncFontLoadingSupported`.');
|
||||||
}
|
}
|
||||||
|
|
||||||
get _loadTestFont() {
|
get _loadTestFont() { // eslint-disable-line getter-return
|
||||||
unreachable('Abstract method `_loadTestFont`.');
|
unreachable('Abstract method `_loadTestFont`.');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
/* eslint-disable getter-return */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @interface
|
* @interface
|
||||||
|
Loading…
Reference in New Issue
Block a user