Repository: eslint/eslint
File: tests/lib/rules/no-misleading-character-class.js (JavaScript)

Code before:
            code: String.raw`var r = new globalThis.RegExp("[👶🏻]", "u")`,
            env: { es2020: true },
            errors: [{
                messageId: "emojiModifier",
                suggestions: null
            }]
        },
        {
            code: String.raw`var r = new globalThis.RegExp("[🇯🇵]", "")`,
            env: { es2020: true },
            errors: [{
                messageId: "surrogatePairWithoutUFlag",
                suggestions: [{ messageId: "suggestUnicodeFlag", output: String.raw`var r = new globalThis.RegExp("[🇯🇵]", "u")` }]
            }]
        },
        {
            code: String.raw`var r = new globalThis.RegExp("[\\u{1F468}\\u{200D}\\u{1F469}\\u{200D}\\u{1F466}]", "u")`,
            env: { es2020: true },
            errors: [{
                messageId: "zwj",
                suggestions: null
            }]
        },
        {
            code: String.raw`/[\ud83d\u{dc4d}]/u`,
            env: { es2020: true },
            errors: [{
                messageId: "surrogatePair",
                suggestions: null
            }]
        },
        {
            code: String.raw`/[\u{d83d}\udc4d]/u`,
            env: { es2020: true },
            errors: [{
                messageId: "surrogatePair",
                suggestions: null
            }]
        },
        {
            code: String.raw`/[\u{d83d}\u{dc4d}]/u`,
            env: { es2020: true },
            errors: [{
                messageId: "surrogatePair",
                suggestions: null
            }]
        },
        {
            code: String.raw`/[\uD83D\u{DC4d}]/u`,
            env: { es2020: true },
            errors: [{

Review comment (suggestion):
```suggestion
```

This isn't necessary for this test case, so it might be confusing why it is here.

Code after:
            code: String.raw`var r = new globalThis.RegExp("[👶🏻]", "u")`,
            env: { es2020: true },
            errors: [{
                messageId: "emojiModifier",
                suggestions: null
            }]
        },
        {
            code: String.raw`var r = new globalThis.RegExp("[🇯🇵]", "")`,
            env: { es2020: true },
            errors: [{
                messageId: "surrogatePairWithoutUFlag",
                suggestions: [{ messageId: "suggestUnicodeFlag", output: String.raw`var r = new globalThis.RegExp("[🇯🇵]", "u")` }]
            }]
        },
        {
            code: String.raw`var r = new globalThis.RegExp("[\\u{1F468}\\u{200D}\\u{1F469}\\u{200D}\\u{1F466}]", "u")`,
            env: { es2020: true },
            errors: [{
                messageId: "zwj",
                suggestions: null
            }]
        },
        {
            code: String.raw`/[\ud83d\u{dc4d}]/u`,
            errors: [{
                messageId: "surrogatePair",
                suggestions: null
            }]
        },
        {
            code: String.raw`/[\u{d83d}\udc4d]/u`,
            errors: [{
                messageId: "surrogatePair",
                suggestions: null
            }]
        },
        {
            code: String.raw`/[\u{d83d}\u{dc4d}]/u`,
            errors: [{
                messageId: "surrogatePair",
                suggestions: null
            }]
        },
        {
            code: String.raw`/[\uD83D\u{DC4d}]/u`,
            errors: [{
                messageId: "surrogatePair",
                suggestions: null
            }]
        },