eslint-plugin-sonarjs
Version:
26 lines (25 loc) • 1.21 kB
TypeScript
type Replacement = {
alternative: string;
minimumEcmaVersion: number;
reason?: string;
example?: string;
};
/**
* First-version catalog: keep high-confidence native API recommendations only.
* Included methods have a clear native API target and either a local helper API
* replacement, an object helper replacement, or an array/string receiver check.
*
* Removed or deferred because they were noisy in ruling:
* - Collection aliases: all, any, collect, detect, each, forEach, foldl, foldr, inject, select.
* - Object collection rewrites: Object.values()/Object.entries() alternatives for map/filter/reduce.
* - String coercion helpers: endsWith, padEnd, padStart, repeat, replace, split, startsWith,
* toLower, toUpper, trim.
* - Subtle semantic helpers: bind, isFinite, isNaN.
*/
declare const replacements: Record<string, Replacement>;
declare const methodNames: Set<string>;
declare const methodNamesByLowerCase: Map<string, string>;
declare const shapeDependentMethods: Set<string>;
declare const callbackCollectionMethods: Set<string>;
export { callbackCollectionMethods, methodNames, methodNamesByLowerCase, replacements, shapeDependentMethods, };
export type { Replacement };