Enable the unicorn/prefer-array-find
ESLint plugin rule
Please find additional information here: - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find#browser_compatibility - https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-array-find.md
This commit is contained in:
parent
14e8167df9
commit
723584dd4f
@ -49,6 +49,7 @@
|
|||||||
"unicorn/no-instanceof-array": "error",
|
"unicorn/no-instanceof-array": "error",
|
||||||
"unicorn/no-new-buffer": "error",
|
"unicorn/no-new-buffer": "error",
|
||||||
"unicorn/no-useless-spread": "error",
|
"unicorn/no-useless-spread": "error",
|
||||||
|
"unicorn/prefer-array-find": "error",
|
||||||
"unicorn/prefer-array-flat": "error",
|
"unicorn/prefer-array-flat": "error",
|
||||||
"unicorn/prefer-array-flat-map": "error",
|
"unicorn/prefer-array-flat-map": "error",
|
||||||
"unicorn/prefer-array-index-of": "error",
|
"unicorn/prefer-array-index-of": "error",
|
||||||
|
@ -1027,9 +1027,7 @@ function stopServer() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function getSession(browser) {
|
function getSession(browser) {
|
||||||
return sessions.filter(function (session) {
|
return sessions.find(session => session.name === browser);
|
||||||
return session.name === browser;
|
|
||||||
})[0];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async function closeSession(browser) {
|
async function closeSession(browser) {
|
||||||
|
Loading…
Reference in New Issue
Block a user