unicorn/no-nonstandard-builtin-properties reports Symbol.asyncDispose as a non-standard property of Symbol.
Symbol.asyncDispose is part of the ECMAScript standard as part of Explicit Resource Management, so I would expect it to be included in the rule's static list of standard built-in properties.
The rule documentation states that:
The static list tracks the latest published ECMAScript edition and selected web-standard built-ins, not runtime-specific extensions or separate proposal drafts.
Example:
const asyncDispose = Symbol.asyncDispose;
Currently reports:
`asyncDispose` is not a standard property of `Symbol`. unicorn/no-nonstandard-builtin-properties
The same issue occurs when implementing an async disposable resource in TypeScript:
type TemporaryDirectory = {
path: string;
[Symbol.asyncDispose](): Promise<void>;
};
Expected behavior: No error should be reported for Symbol.asyncDispose.
unicorn/no-nonstandard-builtin-propertiesreportsSymbol.asyncDisposeas a non-standard property ofSymbol.Symbol.asyncDisposeis part of the ECMAScript standard as part of Explicit Resource Management, so I would expect it to be included in the rule's static list of standard built-in properties.The rule documentation states that:
Example:
Currently reports:
The same issue occurs when implementing an async disposable resource in TypeScript:
Expected behavior: No error should be reported for
Symbol.asyncDispose.