Closed
Description
Before You File a Bug Report Please Confirm You Have Done The Following...
- I have tried restarting my IDE and the issue persists.
- I have updated to the latest version of the packages.
- I have searched for related issues and found none that matched my issue.
- I have read the FAQ and my problem is not listed.
Playground Link
Repro Code
/// <reference lib="es2015" />
export const num_to_string = (n: number) => n.toString()
export const date_to_ms = (d: Date) => d.valueOf()
ESLint Config
module.exports = {
"parser": "@typescript-eslint/parser",
"rules": {
"@typescript-eslint/prefer-readonly-parameter-types": "error"
}
}
tsconfig
Expected Result
No complain with builtin Date
type.
Actual Result
Parameter should be a read only type.
Additional Info
No response
Versions
package | version |
---|---|
@typescript-eslint/eslint-plugin |
5.26.0 |
@typescript-eslint/parser |
5.26.0 |
TypeScript |
4.6.4 |
ESLint |
8.15.0 |
node |
web |
{ "compilerOptions": {} }