Repository: eslint/eslint
File: tests/lib/rules/use-isnan.js (JavaScript)

Code before:
                        messageId: "replaceWithIsNaN",
                        output: "Number.isNaN(123);"
                    },
                    {
                        messageId: "replaceWithCastingAndIsNaN",
                        output: "Number.isNaN(Number(123));"
                    }
                ]
            }]
        },
        {
            code: "123 === NaN;",
            errors: [{
                ...comparisonError,
                suggestions: [
                    {
                        messageId: "replaceWithIsNaN",
                        output: "Number.isNaN(123);"
                    },
                    {
                        messageId: "replaceWithCastingAndIsNaN",
                        output: "Number.isNaN(Number(123));"
                    }
                ]
            }]
        },
        {
            code: "NaN === \"abc\";",
            errors: [{
                ...comparisonError,
                suggestions: [
                    {
                        messageId: "replaceWithIsNaN",
                        output: 'Number.isNaN("abc");'
                    },
                    {
                        messageId: "replaceWithCastingAndIsNaN",
                        output: 'Number.isNaN(Number("abc"));'
                    }
                ]
            }]
        },
        {
            code: "NaN == \"abc\";",
            errors: [{
                ...comparisonError,
                suggestions: [
                    {
                        messageId: "replaceWithIsNaN",
                        output: 'Number.isNaN("abc");'
                    },

Review comment (suggestion):
For `===` or `!==`, I think there should be only one suggestion (without `Number()`).

Code after:
                        messageId: "replaceWithIsNaN",
                        output: "Number.isNaN(123);"
                    },
                    {
                        messageId: "replaceWithCastingAndIsNaN",
                        output: "Number.isNaN(Number(123));"
                    }
                ]
            }]
        },
        {
            code: "123 === NaN;",
            errors: [{
                ...comparisonError,
                suggestions: [
                    {
                        messageId: "replaceWithIsNaN",
                        output: "Number.isNaN(123);"
                    }
                ]
            }]
        },
        {
            code: "NaN === \"abc\";",
            errors: [{
                ...comparisonError,
                suggestions: [
                    {
                        messageId: "replaceWithIsNaN",
                        output: 'Number.isNaN("abc");'
                    }
                ]
            }]
        },
        {
            code: "NaN == \"abc\";",
            errors: [{
                ...comparisonError,
                suggestions: [
                    {
                        messageId: "replaceWithIsNaN",
                        output: 'Number.isNaN("abc");'
                    },
                    {
                        messageId: "replaceWithCastingAndIsNaN",
                        output: 'Number.isNaN(Number("abc"));'
                    }
                ]
            }]
        },
        {