-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Open
Labels
bugSomething isn't workingSomething isn't workingpackage: eslint-pluginIssues related to @typescript-eslint/eslint-pluginIssues related to @typescript-eslint/eslint-plugintriageWaiting for team members to take a lookWaiting for team members to take a look
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
function myFunction(p1: string, p2: number | undefined = undefined) {
console.log(p1, p2);
}
myFunction('1');ESLint Config
module.exports = {
"rules": {"@typescript-eslint/no-useless-default-assignment": "error"}
}tsconfig
Expected Result
This use should get flagged.
Actual Result
When removing the default, typescript will reports the error 2554: Expected 2 arguments, but got 1. 5:1 - 5:11
Additional Info
No response
silverwind, reduckted, ulrichstark and jimmy-zhening-luokirkwaiblinger
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingpackage: eslint-pluginIssues related to @typescript-eslint/eslint-pluginIssues related to @typescript-eslint/eslint-plugintriageWaiting for team members to take a lookWaiting for team members to take a look
{ "compilerOptions": { "strictNullChecks": true } }