diff --git a/eslint.config.mjs b/eslint.config.mjs index 4c259bee01a1..9f64059dbfea 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -207,6 +207,7 @@ export default tseslint.config( { commentPattern: '.*intentional fallthrough.*' }, ], 'one-var': ['error', 'never'], + 'prefer-arrow-callback': 'error', // // eslint-plugin-eslint-comment diff --git a/packages/website-eslint/src/mock/path.js b/packages/website-eslint/src/mock/path.js index abf5e0f2466c..238d8542c79f 100644 --- a/packages/website-eslint/src/mock/path.js +++ b/packages/website-eslint/src/mock/path.js @@ -82,9 +82,7 @@ export function resolve() { // Normalize the path resolvedPath = normalizeArray( - filter(resolvedPath.split('/'), function (p) { - return !!p; - }), + filter(resolvedPath.split('/'), p => !!p), !resolvedAbsolute, ).join('/'); @@ -99,9 +97,7 @@ export function normalize(path) { // Normalize the path path = normalizeArray( - filter(path.split('/'), function (p) { - return !!p; - }), + filter(path.split('/'), p => !!p), !isPathAbsolute, ).join('/'); @@ -124,7 +120,7 @@ export function isAbsolute(path) { export function join() { const paths = Array.prototype.slice.call(arguments, 0); return normalize( - filter(paths, function (p) { + filter(paths, p => { if (typeof p !== 'string') { throw new TypeError('Arguments to path.join must be strings'); }
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies: