diff --git a/.github/labeler.yml b/.github/labeler.yml index 91225ade0314c..ed4f54f5ceb7f 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -32,7 +32,7 @@ A-linter: A-linter-plugins: - changed-files: - - any-glob-to-any-file: ["apps/oxlint/src-js/**", "apps/oxlint/test/**"] + - any-glob-to-any-file: ["apps/oxlint/src-js/**", "apps/oxlint/test/**", "apps/oxlint/conformance/**"] A-minifier: - changed-files: diff --git a/.github/scripts/clone-parallel.sh b/.github/scripts/clone-parallel.sh index 4c8bc68c4923c..f6b2a8ddff87a 100755 --- a/.github/scripts/clone-parallel.sh +++ b/.github/scripts/clone-parallel.sh @@ -8,11 +8,11 @@ set -euo pipefail # Submodule commit SHAs - updated automatically by .github/workflows/update_submodules.yml # NOTE: Prettier version is now pinned to v3.7.3 (not updated by workflow above), Update manually as needed -TEST262_SHA="d0994d64b07cb6c164dd9f345c94ed797a53d69f" -BABEL_SHA="7958603449cf9b17296f6bce58801a832bc55b09" -TYPESCRIPT_SHA="669c25c091ad4d32298d0f33b0e4e681d46de3ea" +TEST262_SHA="c0cf527756840ae8ba679e53e627ec20f3bbc5c8" +BABEL_SHA="3591b24edcf440a27248fc641ed37121f2db2c30" +TYPESCRIPT_SHA="c21f73fd4ee7f4566385cd7a94490a2bc9c307d5" PRETTIER_SHA="fdfa6701767f5140a85902ecc9fb6444f5b4e3f8" -ESTREE_CONFORMANCE_SHA="3e67aec6979243d43bd8ba87cb79eeefa0b55709" +ESTREE_CONFORMANCE_SHA="1f2816b2731f9a68332454c3120abfbd91f425c7" NODE_COMPAT_TABLE_SHA="499beb6f1daa36f10c26b85a7f3ec3b3448ded23" # Default values for which submodules to clone diff --git a/.github/workflows/prepare_release_apps.yml b/.github/workflows/prepare_release_apps.yml index d932c255b2e08..3297e85c4fb08 100644 --- a/.github/workflows/prepare_release_apps.yml +++ b/.github/workflows/prepare_release_apps.yml @@ -89,7 +89,7 @@ jobs: - uses: benc-uk/workflow-dispatch@e2e5e9a103e331dad343f381a29e654aea3cf8fc # v1.2.4 with: repo: oxc-project/oxc-ecosystem-ci - workflow: ci.yml + workflow: oxlint-ci.yml token: ${{ secrets.OXC_BOT_PAT }} ref: main inputs: '{ "issue-number": "${{ needs.prepare.outputs.pull-request-number }}", "comment-id": "${{ steps.comment.outputs.comment-id }}" }' diff --git a/.typos.toml b/.typos.toml index 728eec0a899cb..5e559f1943cb9 100644 --- a/.typos.toml +++ b/.typos.toml @@ -6,6 +6,7 @@ extend-exclude = [ "**/*.snap", "**/*/CHANGELOG.md", + "apps/oxlint/conformance/snapshot.md", "crates/oxc_linter/fixtures", "crates/oxc_linter/src/rules/eslint/no_unused_vars/ignored.rs", "crates/oxc_linter/src/rules/eslint/no_unused_vars/options.rs", diff --git a/Cargo.lock b/Cargo.lock index 50126c7269c44..290c70531a85d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -107,12 +107,6 @@ dependencies = [ "virtue", ] -[[package]] -name = "bitflags" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" - [[package]] name = "bitflags" version = "2.10.0" @@ -131,6 +125,12 @@ dependencies = [ "generic-array", ] +[[package]] +name = "borrow-or-share" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc0b364ead1874514c8c2855ab558056ebfeb775653e7ae45ff72f28f8f3166c" + [[package]] name = "bpaf" version = "0.9.20" @@ -691,7 +691,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" dependencies = [ "libc", - "windows-sys 0.59.0", + "windows-sys 0.61.2", ] [[package]] @@ -742,11 +742,12 @@ dependencies = [ [[package]] name = "fluent-uri" -version = "0.1.4" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17c704e9dbe1ddd863da1e6ff3567795087b1eb201ce80d8fa81162e1516500d" +checksum = "1918b65d96df47d3591bed19c5cca17e3fa5d0707318e4b5ef2eae01764df7e5" dependencies = [ - "bitflags 1.3.2", + "borrow-or-share", + "ref-cast", ] [[package]] @@ -1391,16 +1392,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34080505efa8e45a4b816c349525ebe327ceaa8559756f0356cba97ef3bf7432" [[package]] -name = "lsp-types" -version = "0.97.0" +name = "ls-types" +version = "0.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53353550a17c04ac46c585feb189c2db82154fc84b79c7a66c96c2c644f66071" +checksum = "7a7deb98ef9daaa7500324351a5bab7c80c644cfb86b4be0c4433b582af93510" dependencies = [ - "bitflags 1.3.2", + "bitflags", "fluent-uri", + "percent-encoding", "serde", "serde_json", - "serde_repr", ] [[package]] @@ -1439,11 +1440,11 @@ dependencies = [ [[package]] name = "napi" -version = "3.6.1" +version = "3.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3af30fe8e799dda3a555c496c59e960e4cff1e931b63acbaf3a3b25d9fad22b6" +checksum = "f27a163b545fd2184d2efdccf3d3df56acdb63465f2fcfebcaee0463c1e91783" dependencies = [ - "bitflags 2.10.0", + "bitflags", "ctor", "futures", "napi-build", @@ -1507,7 +1508,7 @@ version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "71e2746dc3a24dd78b3cfcb7be93368c6de9963d30f43a6a73998a9cf4b17b46" dependencies = [ - "bitflags 2.10.0", + "bitflags", "cfg-if", "cfg_aliases", "libc", @@ -1627,7 +1628,7 @@ checksum = "9c6901729fa79e91a0913333229e9ca5dc725089d1c363b2f4b4760709dc4a52" [[package]] name = "oxc" -version = "0.101.0" +version = "0.102.0" dependencies = [ "oxc_allocator", "oxc_ast", @@ -1649,9 +1650,9 @@ dependencies = [ [[package]] name = "oxc-browserslist" -version = "2.1.3" +version = "2.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f978be538ca5e2a64326d24b7991dc658cc8495132833ae387212ab3b8abd70a" +checksum = "9bd39c45e1d6bd2abfbd4b89cbcaba34bd315cd3cee23aad623fd075acc1ea01" dependencies = [ "bincode 2.0.1", "flate2", @@ -1705,7 +1706,7 @@ dependencies = [ [[package]] name = "oxc_allocator" -version = "0.101.0" +version = "0.102.0" dependencies = [ "allocator-api2", "bumpalo", @@ -1720,9 +1721,9 @@ dependencies = [ [[package]] name = "oxc_ast" -version = "0.101.0" +version = "0.102.0" dependencies = [ - "bitflags 2.10.0", + "bitflags", "oxc_allocator", "oxc_ast_macros", "oxc_data_structures", @@ -1735,7 +1736,7 @@ dependencies = [ [[package]] name = "oxc_ast_macros" -version = "0.101.0" +version = "0.102.0" dependencies = [ "phf", "proc-macro2", @@ -1747,7 +1748,7 @@ dependencies = [ name = "oxc_ast_tools" version = "0.0.0" dependencies = [ - "bitflags 2.10.0", + "bitflags", "bpaf", "convert_case", "cow-utils", @@ -1779,7 +1780,7 @@ dependencies = [ [[package]] name = "oxc_ast_visit" -version = "0.101.0" +version = "0.102.0" dependencies = [ "oxc_allocator", "oxc_ast", @@ -1814,9 +1815,9 @@ dependencies = [ [[package]] name = "oxc_cfg" -version = "0.101.0" +version = "0.102.0" dependencies = [ - "bitflags 2.10.0", + "bitflags", "itertools", "oxc_index", "oxc_syntax", @@ -1826,9 +1827,9 @@ dependencies = [ [[package]] name = "oxc_codegen" -version = "0.101.0" +version = "0.102.0" dependencies = [ - "bitflags 2.10.0", + "bitflags", "cow-utils", "dragonbox_ecma", "insta", @@ -1848,7 +1849,7 @@ dependencies = [ [[package]] name = "oxc_compat" -version = "0.101.0" +version = "0.102.0" dependencies = [ "cow-utils", "oxc-browserslist", @@ -1901,14 +1902,14 @@ dependencies = [ [[package]] name = "oxc_data_structures" -version = "0.101.0" +version = "0.102.0" dependencies = [ "ropey", ] [[package]] name = "oxc_diagnostics" -version = "0.101.0" +version = "0.102.0" dependencies = [ "cow-utils", "oxc-miette", @@ -1917,7 +1918,7 @@ dependencies = [ [[package]] name = "oxc_ecmascript" -version = "0.101.0" +version = "0.102.0" dependencies = [ "cow-utils", "num-bigint", @@ -1930,7 +1931,7 @@ dependencies = [ [[package]] name = "oxc_estree" -version = "0.101.0" +version = "0.102.0" dependencies = [ "dragonbox_ecma", "itoa", @@ -1939,7 +1940,7 @@ dependencies = [ [[package]] name = "oxc_formatter" -version = "0.16.0" +version = "0.17.0" dependencies = [ "cow-utils", "insta", @@ -1974,9 +1975,9 @@ dependencies = [ [[package]] name = "oxc_isolated_declarations" -version = "0.101.0" +version = "0.102.0" dependencies = [ - "bitflags 2.10.0", + "bitflags", "insta", "oxc_allocator", "oxc_ast", @@ -1992,7 +1993,7 @@ dependencies = [ [[package]] name = "oxc_language_server" -version = "1.31.0" +version = "1.32.0" dependencies = [ "env_logger", "futures", @@ -2015,9 +2016,9 @@ dependencies = [ [[package]] name = "oxc_linter" -version = "1.31.0" +version = "1.32.0" dependencies = [ - "bitflags 2.10.0", + "bitflags", "constcat", "convert_case", "cow-utils", @@ -2088,7 +2089,7 @@ dependencies = [ [[package]] name = "oxc_mangler" -version = "0.101.0" +version = "0.102.0" dependencies = [ "itertools", "oxc_allocator", @@ -2104,7 +2105,7 @@ dependencies = [ [[package]] name = "oxc_minifier" -version = "0.101.0" +version = "0.102.0" dependencies = [ "cow-utils", "insta", @@ -2131,7 +2132,7 @@ dependencies = [ [[package]] name = "oxc_minify_napi" -version = "0.101.0" +version = "0.102.0" dependencies = [ "mimalloc-safe", "napi", @@ -2170,7 +2171,7 @@ dependencies = [ [[package]] name = "oxc_napi" -version = "0.101.0" +version = "0.102.0" dependencies = [ "napi", "napi-build", @@ -2184,9 +2185,9 @@ dependencies = [ [[package]] name = "oxc_parser" -version = "0.101.0" +version = "0.102.0" dependencies = [ - "bitflags 2.10.0", + "bitflags", "cow-utils", "memchr", "num-bigint", @@ -2207,7 +2208,7 @@ dependencies = [ [[package]] name = "oxc_parser_napi" -version = "0.101.0" +version = "0.102.0" dependencies = [ "mimalloc-safe", "napi", @@ -2257,9 +2258,9 @@ dependencies = [ [[package]] name = "oxc_regular_expression" -version = "0.101.0" +version = "0.102.0" dependencies = [ - "bitflags 2.10.0", + "bitflags", "oxc_allocator", "oxc_ast_macros", "oxc_diagnostics", @@ -2309,7 +2310,7 @@ dependencies = [ [[package]] name = "oxc_semantic" -version = "0.101.0" +version = "0.102.0" dependencies = [ "insta", "itertools", @@ -2348,7 +2349,7 @@ dependencies = [ [[package]] name = "oxc_span" -version = "0.101.0" +version = "0.102.0" dependencies = [ "compact_str", "oxc-miette", @@ -2361,9 +2362,9 @@ dependencies = [ [[package]] name = "oxc_syntax" -version = "0.101.0" +version = "0.102.0" dependencies = [ - "bitflags 2.10.0", + "bitflags", "cow-utils", "dragonbox_ecma", "nonmax", @@ -2434,7 +2435,7 @@ dependencies = [ [[package]] name = "oxc_transform_napi" -version = "0.101.0" +version = "0.102.0" dependencies = [ "mimalloc-safe", "napi", @@ -2448,7 +2449,7 @@ dependencies = [ [[package]] name = "oxc_transformer" -version = "0.101.0" +version = "0.102.0" dependencies = [ "base64", "compact_str", @@ -2479,7 +2480,7 @@ dependencies = [ [[package]] name = "oxc_transformer_plugins" -version = "0.101.0" +version = "0.102.0" dependencies = [ "cow-utils", "insta", @@ -2506,7 +2507,7 @@ dependencies = [ [[package]] name = "oxc_traverse" -version = "0.101.0" +version = "0.102.0" dependencies = [ "itoa", "oxc_allocator", @@ -2522,11 +2523,12 @@ dependencies = [ [[package]] name = "oxfmt" -version = "0.16.0" +version = "0.17.0" dependencies = [ "bpaf", "cow-utils", "ignore", + "json-strip-comments", "mimalloc-safe", "napi", "napi-build", @@ -2540,14 +2542,17 @@ dependencies = [ "oxc_span", "phf", "rayon", + "serde_json", "simdutf8", + "sort-package-json", "tokio", + "tracing", "tracing-subscriber", ] [[package]] name = "oxlint" -version = "1.31.0" +version = "1.32.0" dependencies = [ "bpaf", "cow-utils", @@ -2564,6 +2569,7 @@ dependencies = [ "oxc_diagnostics", "oxc_language_server", "oxc_linter", + "oxc_napi", "oxc_parser", "oxc_semantic", "oxc_span", @@ -2840,7 +2846,7 @@ version = "0.5.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d" dependencies = [ - "bitflags 2.10.0", + "bitflags", ] [[package]] @@ -2954,11 +2960,11 @@ version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cd15f8a2c5551a84d56efdc1cd049089e409ac19a3072d5037a17fd70719ff3e" dependencies = [ - "bitflags 2.10.0", + "bitflags", "errno", "libc", "linux-raw-sys", - "windows-sys 0.59.0", + "windows-sys 0.61.2", ] [[package]] @@ -3053,7 +3059,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5b55fb86dfd3a2f5f76ea78310a88f96c4ea21a3031f8d212443d56123fd0521" dependencies = [ "libc", - "windows-sys 0.59.0", + "windows-sys 0.61.2", ] [[package]] @@ -3129,17 +3135,6 @@ dependencies = [ "serde_core", ] -[[package]] -name = "serde_repr" -version = "0.1.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "175ee3e80ae9982737ca543e96133087cbd9a485eecc3bc4de9c1a37b47ea59c" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "serde_spanned" version = "1.0.3" @@ -3257,6 +3252,16 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b7c388c1b5e93756d0c740965c41e8822f866621d41acbdf6336a6a168f8840c" +[[package]] +name = "sort-package-json" +version = "0.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07eac91e6c27ebf2b42a291197117005983a7f5e4e18af93e55ad1777e1c5801" +dependencies = [ + "ignore", + "serde_json", +] + [[package]] name = "stable_deref_trait" version = "1.2.1" @@ -3344,7 +3349,7 @@ dependencies = [ "getrandom 0.3.4", "once_cell", "rustix", - "windows-sys 0.59.0", + "windows-sys 0.61.2", ] [[package]] @@ -3525,17 +3530,16 @@ checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" [[package]] name = "tower-lsp-server" -version = "0.22.1" +version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88f3f8ec0dcfdda4d908bad2882fe0f89cf2b606e78d16491323e918dfa95765" +checksum = "2f0e711655c89181a6bc6a2cc348131fcd9680085f5b06b6af13427a393a6e72" dependencies = [ "bytes", "dashmap", "futures", "httparse", - "lsp-types", + "ls-types", "memchr", - "percent-encoding", "serde", "serde_json", "tokio", @@ -3552,9 +3556,9 @@ checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" [[package]] name = "tracing" -version = "0.1.41" +version = "0.1.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" +checksum = "2d15d90a0b5c19378952d479dc858407149d7bb45a14de0142f6c534b16fc647" dependencies = [ "pin-project-lite", "tracing-attributes", @@ -3563,9 +3567,9 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.30" +version = "0.1.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81383ab64e72a7a8b8e13130c49e3dab29def6d0c7d76a03087b3cf71c5c6903" +checksum = "7490cfa5ec963746568740651ac6781f701c9c5ea257c58e057f3ba8cf69e8da" dependencies = [ "proc-macro2", "quote", @@ -3574,9 +3578,9 @@ dependencies = [ [[package]] name = "tracing-core" -version = "0.1.34" +version = "0.1.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9d12581f227e93f094d3af2ae690a574abb8a2b9b7a96e7cfe9647b2b617678" +checksum = "7a04e24fab5c89c6a36eb8558c9656f30d81de51dfa4d3b45f26b21d61fa0a6c" dependencies = [ "once_cell", "valuable", @@ -3899,7 +3903,7 @@ version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" dependencies = [ - "windows-sys 0.59.0", + "windows-sys 0.61.2", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 133094aa07eee..96bc75df7f376 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -103,33 +103,33 @@ multiple_crate_versions = "allow" [workspace.dependencies] # publish = true -oxc = { version = "0.101.0", path = "crates/oxc" } # Main entry point -oxc_allocator = { version = "0.101.0", path = "crates/oxc_allocator" } # Memory management -oxc_ast = { version = "0.101.0", path = "crates/oxc_ast" } # AST definitions -oxc_ast_macros = { version = "0.101.0", path = "crates/oxc_ast_macros" } # AST proc macros -oxc_ast_visit = { version = "0.101.0", path = "crates/oxc_ast_visit" } # AST visitor pattern -oxc_cfg = { version = "0.101.0", path = "crates/oxc_cfg" } # Control flow graph -oxc_codegen = { version = "0.101.0", path = "crates/oxc_codegen" } # Code generation -oxc_compat = { version = "0.101.0", path = "crates/oxc_compat" } # Browser compatibility -oxc_data_structures = { version = "0.101.0", path = "crates/oxc_data_structures" } # Shared data structures -oxc_diagnostics = { version = "0.101.0", path = "crates/oxc_diagnostics" } # Error reporting -oxc_ecmascript = { version = "0.101.0", path = "crates/oxc_ecmascript" } # ECMAScript operations -oxc_estree = { version = "0.101.0", path = "crates/oxc_estree" } # ESTree format -oxc_isolated_declarations = { version = "0.101.0", path = "crates/oxc_isolated_declarations" } # TS declaration generation -oxc_mangler = { version = "0.101.0", path = "crates/oxc_mangler" } # Name mangling -oxc_minifier = { version = "0.101.0", path = "crates/oxc_minifier" } # Code minification -oxc_minify_napi = { version = "0.101.0", path = "napi/minify" } # Node.js minifier binding -oxc_napi = { version = "0.101.0", path = "crates/oxc_napi" } # NAPI utilities -oxc_parser = { version = "0.101.0", path = "crates/oxc_parser", features = ["regular_expression"] } # JS/TS parser -oxc_parser_napi = { version = "0.101.0", path = "napi/parser" } # Node.js parser binding -oxc_regular_expression = { version = "0.101.0", path = "crates/oxc_regular_expression" } # Regex parser -oxc_semantic = { version = "0.101.0", path = "crates/oxc_semantic" } # Semantic analysis -oxc_span = { version = "0.101.0", path = "crates/oxc_span" } # Source positions -oxc_syntax = { version = "0.101.0", path = "crates/oxc_syntax" } # Syntax utilities -oxc_transform_napi = { version = "0.101.0", path = "napi/transform" } # Node.js transformer binding -oxc_transformer = { version = "0.101.0", path = "crates/oxc_transformer" } # Code transformation -oxc_transformer_plugins = { version = "0.101.0", path = "crates/oxc_transformer_plugins" } # Transformer plugins -oxc_traverse = { version = "0.101.0", path = "crates/oxc_traverse" } # AST traversal +oxc = { version = "0.102.0", path = "crates/oxc" } # Main entry point +oxc_allocator = { version = "0.102.0", path = "crates/oxc_allocator" } # Memory management +oxc_ast = { version = "0.102.0", path = "crates/oxc_ast" } # AST definitions +oxc_ast_macros = { version = "0.102.0", path = "crates/oxc_ast_macros" } # AST proc macros +oxc_ast_visit = { version = "0.102.0", path = "crates/oxc_ast_visit" } # AST visitor pattern +oxc_cfg = { version = "0.102.0", path = "crates/oxc_cfg" } # Control flow graph +oxc_codegen = { version = "0.102.0", path = "crates/oxc_codegen" } # Code generation +oxc_compat = { version = "0.102.0", path = "crates/oxc_compat" } # Browser compatibility +oxc_data_structures = { version = "0.102.0", path = "crates/oxc_data_structures" } # Shared data structures +oxc_diagnostics = { version = "0.102.0", path = "crates/oxc_diagnostics" } # Error reporting +oxc_ecmascript = { version = "0.102.0", path = "crates/oxc_ecmascript" } # ECMAScript operations +oxc_estree = { version = "0.102.0", path = "crates/oxc_estree" } # ESTree format +oxc_isolated_declarations = { version = "0.102.0", path = "crates/oxc_isolated_declarations" } # TS declaration generation +oxc_mangler = { version = "0.102.0", path = "crates/oxc_mangler" } # Name mangling +oxc_minifier = { version = "0.102.0", path = "crates/oxc_minifier" } # Code minification +oxc_minify_napi = { version = "0.102.0", path = "napi/minify" } # Node.js minifier binding +oxc_napi = { version = "0.102.0", path = "crates/oxc_napi" } # NAPI utilities +oxc_parser = { version = "0.102.0", path = "crates/oxc_parser", features = ["regular_expression"] } # JS/TS parser +oxc_parser_napi = { version = "0.102.0", path = "napi/parser" } # Node.js parser binding +oxc_regular_expression = { version = "0.102.0", path = "crates/oxc_regular_expression" } # Regex parser +oxc_semantic = { version = "0.102.0", path = "crates/oxc_semantic" } # Semantic analysis +oxc_span = { version = "0.102.0", path = "crates/oxc_span" } # Source positions +oxc_syntax = { version = "0.102.0", path = "crates/oxc_syntax" } # Syntax utilities +oxc_transform_napi = { version = "0.102.0", path = "napi/transform" } # Node.js transformer binding +oxc_transformer = { version = "0.102.0", path = "crates/oxc_transformer" } # Code transformation +oxc_transformer_plugins = { version = "0.102.0", path = "crates/oxc_transformer_plugins" } # Transformer plugins +oxc_traverse = { version = "0.102.0", path = "crates/oxc_traverse" } # AST traversal # publish = false oxc_formatter = { path = "crates/oxc_formatter" } # Code formatting @@ -227,7 +227,8 @@ smallvec = { version = "1.15.1", features = ["union", "serde"] } # Stack-allocat tempfile = "3.23.0" # Temporary files tokio = { version = "1.48.0", default-features = false } # Async runtime toml = { version = "0.9.8" } -tower-lsp-server = "0.22.1" # LSP server framework +tower-lsp-server = "0.23.0" # LSP server framework +tracing = "0.1.43" tracing-subscriber = "0.3.20" # Tracing implementation ureq = { version = "3.1.4", default-features = false } # HTTP client url = { version = "2.5.7" } # URL parsing diff --git a/apps/oxfmt/CHANGELOG.md b/apps/oxfmt/CHANGELOG.md index e4b9009c029ef..f6b7eae8b82bf 100644 --- a/apps/oxfmt/CHANGELOG.md +++ b/apps/oxfmt/CHANGELOG.md @@ -4,6 +4,22 @@ All notable changes to this package will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0). +## [0.17.0] - 2025-12-08 + +### 🚀 Features + +- 3184f17 oxfmt: Pass filepath field to prettier formatting (#16591) (Yuji Sugiura) +- 7bb3304 oxfmt: Pass populated config to prettier formatting (#16584) (leaysgur) +- 69f84d2 oxfmt: Pass raw config to prettier formatting (#16582) (leaysgur) +- a83a2ec oxfmt: Expose `setupConfig(configJSON: string)` napi callback (#16579) (leaysgur) +- af76b0e oxfmt: Support formatting HTML, YAML, GraphQL, Handlerbars, Markdown, CSS files (#16524) (leaysgur) +- 66b64ef oxfmt: Support formatting JSON files (#16523) (leaysgur) +- 4767926 oxfmt: Prepare non-js/ts file support with prettier (#16480) (leaysgur) +- 2b4ce5d oxfmt: Use dedicated `format_by_xxx_formatter` method by `SourceType` (#16417) (leaysgur) +- 0867d2f oxfmt: Set up JS `formatFile()` function for Rust via napi (#16415) (leaysgur) +- b6feb66 oxfmt: Rename `embedded.ts` with preparing `formatFile()` function (#16414) (leaysgur) +- dd2cb62 oxfmt: Not error on explicit `--write` flag used (#16376) (leaysgur) + ## [0.16.0] - 2025-12-01 ### 🚀 Features diff --git a/apps/oxfmt/Cargo.toml b/apps/oxfmt/Cargo.toml index 62c987529d865..fb31168f0f06f 100644 --- a/apps/oxfmt/Cargo.toml +++ b/apps/oxfmt/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "oxfmt" -version = "0.16.0" +version = "0.17.0" authors.workspace = true categories.workspace = true edition.workspace = true @@ -37,11 +37,15 @@ oxc_span = { workspace = true } bpaf = { workspace = true, features = ["autocomplete", "bright-color", "derive"] } cow-utils = { workspace = true } ignore = { workspace = true, features = ["simd-accel"] } +json-strip-comments = { workspace = true } miette = { workspace = true } phf = { workspace = true, features = ["macros"] } rayon = { workspace = true } +serde_json = { workspace = true } simdutf8 = { workspace = true } +sort-package-json = "0.0.2" tokio = { workspace = true, features = ["rt-multi-thread", "io-std", "macros"] } +tracing = { workspace = true } tracing-subscriber = { workspace = true, features = [] } # Omit the `regex` feature # NAPI dependencies (conditional on napi feature) diff --git a/apps/oxfmt/package.json b/apps/oxfmt/package.json index 5c17cf8c010cb..fce9ec1d32e95 100644 --- a/apps/oxfmt/package.json +++ b/apps/oxfmt/package.json @@ -1,6 +1,6 @@ { "name": "oxfmt-app", - "version": "0.16.0", + "version": "0.17.0", "private": true, "type": "module", "main": "dist/index.js", @@ -20,7 +20,8 @@ "node": "^20.19.0 || >=22.12.0" }, "dependencies": { - "prettier": "3.7.4" + "prettier": "3.7.4", + "tinypool": "2.0.0" }, "devDependencies": { "@types/node": "catalog:", diff --git a/apps/oxfmt/src-js/bindings.d.ts b/apps/oxfmt/src-js/bindings.d.ts index 3994a3a271066..52eee40f94132 100644 --- a/apps/oxfmt/src-js/bindings.d.ts +++ b/apps/oxfmt/src-js/bindings.d.ts @@ -5,9 +5,10 @@ * * JS side passes in: * 1. `args`: Command line arguments (process.argv.slice(2)) - * 2. `format_embedded_cb`: Callback to format embedded code in templates - * 3. `format_file_cb`: Callback to format files + * 2. `setup_config_cb`: Callback to setup Prettier config + * 3. `format_embedded_cb`: Callback to format embedded code in templates + * 4. `format_file_cb`: Callback to format files * * Returns `true` if formatting succeeded without errors, `false` otherwise. */ -export declare function format(args: Array, formatEmbeddedCb: (tagName: string, code: string) => Promise, formatFileCb: (parserName: string, code: string) => Promise): Promise +export declare function format(args: Array, setupConfigCb: (configJSON: string, numThreads: number) => Promise, formatEmbeddedCb: (tagName: string, code: string) => Promise, formatFileCb: (parserName: string, fileName: string, code: string) => Promise): Promise diff --git a/apps/oxfmt/src-js/bindings.js b/apps/oxfmt/src-js/bindings.js index ec9c939a31c7a..19d9210aa778c 100644 --- a/apps/oxfmt/src-js/bindings.js +++ b/apps/oxfmt/src-js/bindings.js @@ -81,8 +81,8 @@ function requireNative() { try { const binding = require('@oxfmt/android-arm64') const bindingPackageVersion = require('@oxfmt/android-arm64/package.json').version - if (bindingPackageVersion !== '0.16.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 0.16.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '0.17.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 0.17.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -97,8 +97,8 @@ function requireNative() { try { const binding = require('@oxfmt/android-arm-eabi') const bindingPackageVersion = require('@oxfmt/android-arm-eabi/package.json').version - if (bindingPackageVersion !== '0.16.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 0.16.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '0.17.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 0.17.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -118,8 +118,8 @@ function requireNative() { try { const binding = require('@oxfmt/win32-x64-gnu') const bindingPackageVersion = require('@oxfmt/win32-x64-gnu/package.json').version - if (bindingPackageVersion !== '0.16.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 0.16.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '0.17.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 0.17.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -134,8 +134,8 @@ function requireNative() { try { const binding = require('@oxfmt/win32-x64') const bindingPackageVersion = require('@oxfmt/win32-x64/package.json').version - if (bindingPackageVersion !== '0.16.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 0.16.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '0.17.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 0.17.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -151,8 +151,8 @@ function requireNative() { try { const binding = require('@oxfmt/win32-ia32') const bindingPackageVersion = require('@oxfmt/win32-ia32/package.json').version - if (bindingPackageVersion !== '0.16.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 0.16.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '0.17.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 0.17.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -167,8 +167,8 @@ function requireNative() { try { const binding = require('@oxfmt/win32-arm64') const bindingPackageVersion = require('@oxfmt/win32-arm64/package.json').version - if (bindingPackageVersion !== '0.16.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 0.16.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '0.17.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 0.17.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -186,8 +186,8 @@ function requireNative() { try { const binding = require('@oxfmt/darwin-universal') const bindingPackageVersion = require('@oxfmt/darwin-universal/package.json').version - if (bindingPackageVersion !== '0.16.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 0.16.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '0.17.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 0.17.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -202,8 +202,8 @@ function requireNative() { try { const binding = require('@oxfmt/darwin-x64') const bindingPackageVersion = require('@oxfmt/darwin-x64/package.json').version - if (bindingPackageVersion !== '0.16.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 0.16.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '0.17.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 0.17.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -218,8 +218,8 @@ function requireNative() { try { const binding = require('@oxfmt/darwin-arm64') const bindingPackageVersion = require('@oxfmt/darwin-arm64/package.json').version - if (bindingPackageVersion !== '0.16.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 0.16.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '0.17.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 0.17.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -238,8 +238,8 @@ function requireNative() { try { const binding = require('@oxfmt/freebsd-x64') const bindingPackageVersion = require('@oxfmt/freebsd-x64/package.json').version - if (bindingPackageVersion !== '0.16.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 0.16.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '0.17.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 0.17.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -254,8 +254,8 @@ function requireNative() { try { const binding = require('@oxfmt/freebsd-arm64') const bindingPackageVersion = require('@oxfmt/freebsd-arm64/package.json').version - if (bindingPackageVersion !== '0.16.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 0.16.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '0.17.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 0.17.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -275,8 +275,8 @@ function requireNative() { try { const binding = require('@oxfmt/linux-x64-musl') const bindingPackageVersion = require('@oxfmt/linux-x64-musl/package.json').version - if (bindingPackageVersion !== '0.16.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 0.16.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '0.17.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 0.17.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -291,8 +291,8 @@ function requireNative() { try { const binding = require('@oxfmt/linux-x64-gnu') const bindingPackageVersion = require('@oxfmt/linux-x64-gnu/package.json').version - if (bindingPackageVersion !== '0.16.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 0.16.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '0.17.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 0.17.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -309,8 +309,8 @@ function requireNative() { try { const binding = require('@oxfmt/linux-arm64-musl') const bindingPackageVersion = require('@oxfmt/linux-arm64-musl/package.json').version - if (bindingPackageVersion !== '0.16.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 0.16.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '0.17.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 0.17.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -325,8 +325,8 @@ function requireNative() { try { const binding = require('@oxfmt/linux-arm64-gnu') const bindingPackageVersion = require('@oxfmt/linux-arm64-gnu/package.json').version - if (bindingPackageVersion !== '0.16.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 0.16.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '0.17.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 0.17.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -343,8 +343,8 @@ function requireNative() { try { const binding = require('@oxfmt/linux-arm-musleabihf') const bindingPackageVersion = require('@oxfmt/linux-arm-musleabihf/package.json').version - if (bindingPackageVersion !== '0.16.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 0.16.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '0.17.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 0.17.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -359,8 +359,8 @@ function requireNative() { try { const binding = require('@oxfmt/linux-arm-gnueabihf') const bindingPackageVersion = require('@oxfmt/linux-arm-gnueabihf/package.json').version - if (bindingPackageVersion !== '0.16.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 0.16.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '0.17.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 0.17.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -377,8 +377,8 @@ function requireNative() { try { const binding = require('@oxfmt/linux-loong64-musl') const bindingPackageVersion = require('@oxfmt/linux-loong64-musl/package.json').version - if (bindingPackageVersion !== '0.16.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 0.16.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '0.17.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 0.17.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -393,8 +393,8 @@ function requireNative() { try { const binding = require('@oxfmt/linux-loong64-gnu') const bindingPackageVersion = require('@oxfmt/linux-loong64-gnu/package.json').version - if (bindingPackageVersion !== '0.16.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 0.16.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '0.17.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 0.17.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -411,8 +411,8 @@ function requireNative() { try { const binding = require('@oxfmt/linux-riscv64-musl') const bindingPackageVersion = require('@oxfmt/linux-riscv64-musl/package.json').version - if (bindingPackageVersion !== '0.16.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 0.16.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '0.17.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 0.17.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -427,8 +427,8 @@ function requireNative() { try { const binding = require('@oxfmt/linux-riscv64-gnu') const bindingPackageVersion = require('@oxfmt/linux-riscv64-gnu/package.json').version - if (bindingPackageVersion !== '0.16.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 0.16.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '0.17.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 0.17.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -444,8 +444,8 @@ function requireNative() { try { const binding = require('@oxfmt/linux-ppc64-gnu') const bindingPackageVersion = require('@oxfmt/linux-ppc64-gnu/package.json').version - if (bindingPackageVersion !== '0.16.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 0.16.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '0.17.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 0.17.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -460,8 +460,8 @@ function requireNative() { try { const binding = require('@oxfmt/linux-s390x-gnu') const bindingPackageVersion = require('@oxfmt/linux-s390x-gnu/package.json').version - if (bindingPackageVersion !== '0.16.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 0.16.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '0.17.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 0.17.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -480,8 +480,8 @@ function requireNative() { try { const binding = require('@oxfmt/openharmony-arm64') const bindingPackageVersion = require('@oxfmt/openharmony-arm64/package.json').version - if (bindingPackageVersion !== '0.16.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 0.16.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '0.17.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 0.17.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -496,8 +496,8 @@ function requireNative() { try { const binding = require('@oxfmt/openharmony-x64') const bindingPackageVersion = require('@oxfmt/openharmony-x64/package.json').version - if (bindingPackageVersion !== '0.16.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 0.16.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '0.17.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 0.17.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -512,8 +512,8 @@ function requireNative() { try { const binding = require('@oxfmt/openharmony-arm') const bindingPackageVersion = require('@oxfmt/openharmony-arm/package.json').version - if (bindingPackageVersion !== '0.16.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 0.16.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '0.17.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 0.17.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { diff --git a/apps/oxfmt/src-js/cli.ts b/apps/oxfmt/src-js/cli.ts index 1585a6ccdfe51..61a806c0d3890 100644 --- a/apps/oxfmt/src-js/cli.ts +++ b/apps/oxfmt/src-js/cli.ts @@ -1,10 +1,10 @@ import { format } from "./bindings.js"; -import { formatEmbeddedCode, formatFile } from "./prettier-proxy.js"; +import { setupConfig, formatEmbeddedCode, formatFile } from "./prettier-proxy.js"; const args = process.argv.slice(2); // Call the Rust formatter with our JS callback -const success = await format(args, formatEmbeddedCode, formatFile); +const success = await format(args, setupConfig, formatEmbeddedCode, formatFile); // NOTE: It's recommended to set `process.exitCode` instead of calling `process.exit()`. // `process.exit()` kills the process immediately and `stdout` may not be flushed before process dies. diff --git a/apps/oxfmt/src-js/index.ts b/apps/oxfmt/src-js/index.ts index 8d1081d099923..a8ab01e7da50f 100644 --- a/apps/oxfmt/src-js/index.ts +++ b/apps/oxfmt/src-js/index.ts @@ -1,2 +1,2 @@ export * from "./bindings.js"; -export { formatEmbeddedCode, formatFile } from "./prettier-proxy.js"; +export { setupConfig, formatEmbeddedCode, formatFile } from "./prettier-proxy.js"; diff --git a/apps/oxfmt/src-js/prettier-proxy.ts b/apps/oxfmt/src-js/prettier-proxy.ts index e062ac9e7e460..1a4d2baf888f8 100644 --- a/apps/oxfmt/src-js/prettier-proxy.ts +++ b/apps/oxfmt/src-js/prettier-proxy.ts @@ -1,15 +1,41 @@ -// Import Prettier lazily. -// This helps to reduce initial load time if not needed. -// -// Also, this solves unknown issue described below... -// -// XXX: If import `prettier` directly here, it will add line like this to the output JS: -// ```js -// import process2 from 'process'; -// ``` -// Yes, this seems completely fine! -// But actually, this makes `oxfmt --lsp` immediately stop with `Parse error` JSON-RPC error -let prettierCache: typeof import("prettier"); +import Tinypool from "tinypool"; +import type { WorkerData, FormatEmbeddedCodeArgs, FormatFileArgs } from "./prettier-worker.ts"; + +// Worker pool for parallel Prettier formatting +let pool: Tinypool | null = null; + +// --- + +/** + * Setup Prettier configuration. + * NOTE: Called from Rust via NAPI ThreadsafeFunction with FnArgs + * @param configJSON - Prettier configuration as JSON string + * @param numThreads - Number of worker threads to use (same as Rayon thread count) + * @returns Array of loaded plugin's `languages` info + * */ +export async function setupConfig(configJSON: string, numThreads: number): Promise { + const workerData: WorkerData = { + // SAFETY: Always valid JSON constructed by Rust side + prettierConfig: JSON.parse(configJSON), + }; + + if (pool) throw new Error("`setupConfig()` has already been called"); + + // Initialize worker pool for parallel Prettier formatting + // Pass config via workerData so all workers get it on initialization + pool = new Tinypool({ + filename: new URL("./prettier-worker.js", import.meta.url).href, + minThreads: numThreads, + maxThreads: numThreads, + workerData, + }); + + // TODO: Plugins support + // - Read `plugins` field + // - Load plugins dynamically and parse `languages` field + // - Map file extensions and filenames to Prettier parsers + return []; +} // --- @@ -18,14 +44,11 @@ const TAG_TO_PARSER: Record = { // CSS css: "css", styled: "css", - // GraphQL gql: "graphql", graphql: "graphql", - // HTML html: "html", - // Markdown md: "markdown", markdown: "markdown", @@ -41,42 +64,32 @@ const TAG_TO_PARSER: Record = { export async function formatEmbeddedCode(tagName: string, code: string): Promise { const parser = TAG_TO_PARSER[tagName]; + // Unknown tag, return original code if (!parser) { - // Unknown tag, return original code return code; } - if (!prettierCache) { - prettierCache = await import("prettier"); - } - - return prettierCache - .format(code, { - parser, - // TODO: Read config - printWidth: 80, - tabWidth: 2, - semi: true, - singleQuote: false, - }) - .then((formatted) => formatted.trimEnd()) - .catch(() => code); + return pool!.run({ parser, code } satisfies FormatEmbeddedCodeArgs, { + name: "formatEmbeddedCode", + }); } +// --- + /** * Format whole file content using Prettier. * NOTE: Called from Rust via NAPI ThreadsafeFunction with FnArgs * @param parserName - The parser name + * @param fileName - The file name (e.g., "package.json") * @param code - The code to format * @returns Formatted code */ -export async function formatFile(parserName: string, code: string): Promise { - if (!prettierCache) { - prettierCache = await import("prettier"); - } - - return prettierCache.format(code, { - parser: parserName, - // TODO: Read config +export async function formatFile( + parserName: string, + fileName: string, + code: string, +): Promise { + return pool!.run({ parserName, fileName, code } satisfies FormatFileArgs, { + name: "formatFile", }); } diff --git a/apps/oxfmt/src-js/prettier-worker.ts b/apps/oxfmt/src-js/prettier-worker.ts new file mode 100644 index 0000000000000..8ebcdd744723f --- /dev/null +++ b/apps/oxfmt/src-js/prettier-worker.ts @@ -0,0 +1,61 @@ +import { workerData } from "node:worker_threads"; +import type { Options } from "prettier"; + +// Lazy load Prettier in each worker thread +// +// NOTE: In the past, statically importing caused issues with `oxfmt --lsp` not starting. +// However, this issue has not been observed recently, possibly due to changes in the bundling configuration. +// Nevertheless, we will keep it as lazy loading just in case. +let prettierCache: typeof import("prettier"); + +export type WorkerData = { + prettierConfig: Options; +}; + +// Initialize config from `workerData` (passed during pool creation) +// NOTE: The 1st element is thread id, passed by `tinypool` +const [, { prettierConfig }] = workerData satisfies [unknown, WorkerData]; + +// --- + +export type FormatEmbeddedCodeArgs = { + parser: string; + code: string; +}; + +export async function formatEmbeddedCode({ + parser, + code, +}: FormatEmbeddedCodeArgs): Promise { + if (!prettierCache) { + prettierCache = await import("prettier"); + } + + return prettierCache + .format(code, { + ...prettierConfig, + parser, + }) + .then((formatted) => formatted.trimEnd()) + .catch(() => code); +} + +// --- + +export type FormatFileArgs = { + parserName: string; + fileName: string; + code: string; +}; + +export async function formatFile({ parserName, fileName, code }: FormatFileArgs): Promise { + if (!prettierCache) { + prettierCache = await import("prettier"); + } + + return prettierCache.format(code, { + ...prettierConfig, + parser: parserName, + filepath: fileName, + }); +} diff --git a/apps/oxfmt/src/cli/format.rs b/apps/oxfmt/src/cli/format.rs index 2a7a719d0ad5a..ab8b4342d9994 100644 --- a/apps/oxfmt/src/cli/format.rs +++ b/apps/oxfmt/src/cli/format.rs @@ -6,8 +6,10 @@ use std::{ time::Instant, }; +use serde_json::Value; + use oxc_diagnostics::DiagnosticService; -use oxc_formatter::Oxfmtrc; +use oxc_formatter::{FormatOptions, OxfmtOptions, Oxfmtrc}; use super::{ command::{FormatCommand, OutputOptions}, @@ -16,7 +18,7 @@ use super::{ service::{FormatService, SuccessResult}, walk::Walk, }; -use crate::core::SourceFormatter; +use crate::core::{SourceFormatter, utils}; #[derive(Debug)] pub struct FormatRunner { @@ -50,42 +52,74 @@ impl FormatRunner { self } + /// # Panics + /// Panics if `napi` feature is enabled but external_formatter is not set. pub fn run(self, stdout: &mut dyn Write, stderr: &mut dyn Write) -> CliRunResult { let start_time = Instant::now(); let cwd = self.cwd; let FormatCommand { paths, output_options, basic_options, ignore_options, misc_options } = self.options; + let num_of_threads = rayon::current_num_threads(); - // Find and load config + // Find config file // NOTE: Currently, we only load single config file. // - from `--config` if specified // - else, search nearest for the nearest `.oxfmtrc.json` from cwd upwards - let config = match load_config(&cwd, basic_options.config.as_deref()) { - Ok(config) => config, - Err(err) => { - print_and_flush(stderr, &format!("Failed to load configuration file.\n{err}\n")); - return CliRunResult::InvalidOptionConfig; - } - }; + let config_path = load_config_path(&cwd, basic_options.config.as_deref()); + // Load and parse config file + // - `format_options`: Parsed formatting options used by `oxc_formatter` + // - `external_config`: JSON value used by `external_formatter`, populated with `format_options` + let (format_options, oxfmt_options, external_config) = + match load_config(config_path.as_deref()) { + Ok(c) => c, + Err(err) => { + print_and_flush( + stderr, + &format!("Failed to load configuration file.\n{err}\n"), + ); + return CliRunResult::InvalidOptionConfig; + } + }; - let ignore_patterns = config.ignore_patterns.clone().unwrap_or_default(); - let format_options = match config.into_format_options() { - Ok(options) => options, - Err(err) => { - print_and_flush(stderr, &format!("Failed to parse configuration.\n{err}\n")); - return CliRunResult::InvalidOptionConfig; - } - }; + // TODO: Plugins support + // - Parse returned `languages` + // - Allow its `extensions` and `filenames` in `walk.rs` + // - Pass `parser` to `SourceFormatter` + #[cfg(feature = "napi")] + if let Err(err) = self + .external_formatter + .as_ref() + .expect("External formatter must be set when `napi` feature is enabled") + .setup_config(&external_config.to_string(), num_of_threads) + { + print_and_flush( + stderr, + &format!("Failed to setup external formatter config.\n{err}\n"), + ); + return CliRunResult::InvalidOptionConfig; + } + + #[cfg(not(feature = "napi"))] + let _ = (external_config, oxfmt_options.sort_package_json); let walker = match Walk::build( &cwd, &paths, &ignore_options.ignore_path, ignore_options.with_node_modules, - &ignore_patterns, + &oxfmt_options.ignore_patterns, ) { - Ok(walker) => walker, + Ok(Some(walker)) => walker, + // All target paths are ignored + Ok(None) => { + if misc_options.no_error_on_unmatched_pattern { + print_and_flush(stderr, "No files found matching the given patterns.\n"); + return CliRunResult::None; + } + print_and_flush(stderr, "Expected at least one target file\n"); + return CliRunResult::NoFilesFound; + } Err(err) => { print_and_flush( stderr, @@ -108,12 +142,11 @@ impl FormatRunner { print_and_flush(stdout, "\n"); } - let num_of_threads = rayon::current_num_threads(); - // Create `SourceFormatter` instance let source_formatter = SourceFormatter::new(num_of_threads, format_options); #[cfg(feature = "napi")] - let source_formatter = source_formatter.with_external_formatter(self.external_formatter); + let source_formatter = source_formatter + .with_external_formatter(self.external_formatter, oxfmt_options.sort_package_json); let output_options_clone = output_options.clone(); @@ -212,38 +245,68 @@ impl FormatRunner { } } -/// # Errors -/// -/// Returns error if: -/// - Config file is specified but not found or invalid -/// - Config file parsing fails -fn load_config(cwd: &Path, config_path: Option<&Path>) -> Result { - let config_path = if let Some(config_path) = config_path { - // If `--config` is explicitly specified, use that path - Some(if config_path.is_absolute() { +// --- + +/// Resolve config file path from cwd and optional explicit path. +fn load_config_path(cwd: &Path, config_path: Option<&Path>) -> Option { + // If `--config` is explicitly specified, use that path + if let Some(config_path) = config_path { + return Some(if config_path.is_absolute() { config_path.to_path_buf() } else { cwd.join(config_path) - }) - } else { - // If `--config` is not specified, search the nearest config file from cwd upwards - // Support both `.json` and `.jsonc`, but prefer `.json` if both exist - cwd.ancestors().find_map(|dir| { - for filename in [".oxfmtrc.json", ".oxfmtrc.jsonc"] { - let config_path = dir.join(filename); - if config_path.exists() { - return Some(config_path); - } + }); + } + + // If `--config` is not specified, search the nearest config file from cwd upwards + // Support both `.json` and `.jsonc`, but prefer `.json` if both exist + cwd.ancestors().find_map(|dir| { + for filename in [".oxfmtrc.json", ".oxfmtrc.jsonc"] { + let config_path = dir.join(filename); + if config_path.exists() { + return Some(config_path); } - None - }) + } + None + }) +} + +/// # Errors +/// Returns error if: +/// - Config file is specified but not found or invalid +/// - Config file parsing fails +fn load_config(config_path: Option<&Path>) -> Result<(FormatOptions, OxfmtOptions, Value), String> { + // Read and parse config file, or use empty JSON if not found + let json_string = match config_path { + Some(path) => { + let mut json_string = utils::read_to_string(path) + // Do not include OS error, it differs between platforms + .map_err(|_| format!("Failed to read config {}: File not found", path.display()))?; + // Strip comments (JSONC support) + json_strip_comments::strip(&mut json_string).map_err(|err| { + format!("Failed to strip comments from {}: {err}", path.display()) + })?; + json_string + } + None => "{}".to_string(), }; - match config_path { - Some(ref path) => Oxfmtrc::from_file(path), - // Default if not specified and not found - None => Ok(Oxfmtrc::default()), - } + // Parse as raw JSON value (to pass to external formatter) + let mut raw_config: Value = serde_json::from_str(&json_string) + .map_err(|err| format!("Failed to parse config: {err}"))?; + + // NOTE: Field validation for `enum` are done here + let oxfmtrc: Oxfmtrc = serde_json::from_str(&json_string) + .map_err(|err| format!("Failed to deserialize config: {err}"))?; + + // NOTE: Other validation based on it's field values are done here + let (format_options, oxfmt_options) = + oxfmtrc.into_options().map_err(|err| format!("Failed to parse configuration.\n{err}"))?; + + // Populate `raw_config` with resolved options to apply our defaults + Oxfmtrc::populate_prettier_config(&format_options, &mut raw_config); + + Ok((format_options, oxfmt_options, raw_config)) } fn print_and_flush(writer: &mut dyn Write, message: &str) { diff --git a/apps/oxfmt/src/cli/service.rs b/apps/oxfmt/src/cli/service.rs index ec2b51ef993fd..2b79b53b13887 100644 --- a/apps/oxfmt/src/cli/service.rs +++ b/apps/oxfmt/src/cli/service.rs @@ -1,4 +1,4 @@ -use std::{fs, io, path::Path, sync::mpsc, time::Instant}; +use std::{fs, path::Path, sync::mpsc, time::Instant}; use cow_utils::CowUtils; use rayon::prelude::*; @@ -6,7 +6,7 @@ use rayon::prelude::*; use oxc_diagnostics::{DiagnosticSender, DiagnosticService}; use super::command::OutputOptions; -use crate::core::{FormatFileSource, FormatResult, SourceFormatter}; +use crate::core::{FormatFileStrategy, FormatResult, SourceFormatter, utils}; pub enum SuccessResult { Changed(String), @@ -30,15 +30,15 @@ impl FormatService { /// Process entries as they are received from the channel pub fn run_streaming( &self, - rx_entry: mpsc::Receiver, + rx_entry: mpsc::Receiver, tx_error: &DiagnosticSender, tx_success: &mpsc::Sender, ) { rx_entry.into_iter().par_bridge().for_each(|entry| { - let start_time = Instant::now(); + let start_time = matches!(self.output_options, OutputOptions::Check).then(Instant::now); let path = entry.path(); - let Ok(source_text) = read_to_string(path) else { + let Ok(source_text) = utils::read_to_string(path) else { // This happens if binary file is attempted to be formatted // e.g. `.ts` for MPEG-TS video file let diagnostics = DiagnosticService::wrap_diagnostics( @@ -57,6 +57,7 @@ impl FormatService { return; }; + tracing::debug!("Format {}", path.strip_prefix(&self.cwd).unwrap().display()); let (code, is_changed) = match self.formatter.format(&entry, &source_text) { FormatResult::Success { code, is_changed } => (code, is_changed), FormatResult::Error(diagnostics) => { @@ -71,8 +72,6 @@ impl FormatService { } }; - let elapsed = start_time.elapsed(); - // Write back if needed if matches!(self.output_options, OutputOptions::Write) && is_changed { fs::write(path, code) @@ -91,9 +90,9 @@ impl FormatService { // Normalize path separators for consistent output across platforms .cow_replace('\\', "/") .to_string(); - let elapsed = elapsed.as_millis(); if matches!(self.output_options, OutputOptions::Check) { + let elapsed = start_time.unwrap().elapsed().as_millis(); SuccessResult::Changed(format!("{display_path} ({elapsed}ms)")) } else { SuccessResult::Changed(display_path) @@ -105,19 +104,3 @@ impl FormatService { }); } } - -// --- - -fn read_to_string(path: &Path) -> io::Result { - // `simdutf8` is faster than `std::str::from_utf8` which `fs::read_to_string` uses internally - let bytes = fs::read(path)?; - if simdutf8::basic::from_utf8(&bytes).is_err() { - // Same error as `fs::read_to_string` produces (using `io::ErrorKind::InvalidData`) - return Err(io::Error::new( - io::ErrorKind::InvalidData, - "stream did not contain valid UTF-8", - )); - } - // SAFETY: `simdutf8` has ensured it's a valid UTF-8 string - Ok(unsafe { String::from_utf8_unchecked(bytes) }) -} diff --git a/apps/oxfmt/src/cli/walk.rs b/apps/oxfmt/src/cli/walk.rs index 0ee725990b4a0..7b3449f059a4d 100644 --- a/apps/oxfmt/src/cli/walk.rs +++ b/apps/oxfmt/src/cli/walk.rs @@ -3,9 +3,9 @@ use std::{ sync::mpsc, }; -use ignore::{gitignore::GitignoreBuilder, overrides::OverrideBuilder}; +use ignore::gitignore::GitignoreBuilder; -use crate::core::FormatFileSource; +use crate::core::FormatFileStrategy; pub struct Walk { inner: ignore::WalkParallel, @@ -18,38 +18,49 @@ impl Walk { ignore_paths: &[PathBuf], with_node_modules: bool, ignore_patterns: &[String], - ) -> Result { - let (target_paths, exclude_patterns) = normalize_paths(cwd, paths); - - // Add all non-`!` prefixed paths to the walker base - let mut inner = ignore::WalkBuilder::new( - target_paths - .first() - .expect("`target_paths` never be empty, should have at least `cwd`"), - ); - if let Some(paths) = target_paths.get(1..) { - for path in paths { - inner.add(path); + ) -> Result, String> { + // + // Classify and normalize specified paths + // + let mut target_paths = vec![]; + let mut exclude_patterns = vec![]; + for path in paths { + let path_str = path.to_string_lossy(); + + // Instead of `oxlint`'s `--ignore-pattern=PAT`, + // `oxfmt` supports `!` prefix in paths like Prettier. + if path_str.starts_with('!') { + exclude_patterns.push(path_str.to_string()); + continue; } - } - // NOTE: We are using `OverrideBuilder` only for exclusion. - // This means there is no way to "re-include" a file once ignored. + // Otherwise, treat as target path - // Treat all `!` prefixed patterns as overrides to exclude - if !exclude_patterns.is_empty() { - let mut builder = OverrideBuilder::new(cwd); - for pattern_str in exclude_patterns { - builder - .add(&pattern_str) - .map_err(|_| format!("{pattern_str} is not a valid glob for override."))?; + if path.is_absolute() { + target_paths.push(path.clone()); + continue; } - let overrides = builder.build().map_err(|_| "Failed to build overrides".to_string())?; - inner.overrides(overrides); + + // NOTE: `.` and cwd behave differently, need to normalize + let path = if path_str == "." { + cwd.to_path_buf() + } else if let Some(stripped) = path_str.strip_prefix("./") { + cwd.join(stripped) + } else { + cwd.join(path) + }; + target_paths.push(path); + } + // Default to cwd if no target paths are provided + if target_paths.is_empty() { + target_paths.push(cwd.to_path_buf()); } - // Handle ignore files + // + // Build ignores + // let mut builder = GitignoreBuilder::new(cwd); + // Handle ignore files for ignore_path in &load_ignore_paths(cwd, ignore_paths) { if builder.add(ignore_path).is_some() { return Err(format!("Failed to add ignore file: {}", ignore_path.display())); @@ -58,11 +69,47 @@ impl Walk { // Handle `config.ignorePatterns` for pattern in ignore_patterns { if builder.add_line(None, pattern).is_err() { - return Err(format!("Failed to add ignore pattern `{pattern}`")); + return Err(format!( + "Failed to add ignore pattern `{pattern}` from `.ignorePatterns`" + )); + } + } + // Handle `!` prefixed paths as ignore patterns too + for pattern in &exclude_patterns { + // Remove the leading `!` because `GitignoreBuilder` uses `!` as negation + let pattern = + pattern.strip_prefix('!').expect("There should be a `!` prefix, already checked"); + if builder.add_line(None, pattern).is_err() { + return Err(format!("Failed to add ignore pattern `{pattern}` from `!` prefix")); } } let ignores = builder.build().map_err(|_| "Failed to build ignores".to_string())?; + // + // Filter paths by ignores + // + // NOTE: Base paths passed to `WalkBuilder` are not filtered by `filter_entry()`, + // so we need to filter them here before passing to the walker. + let target_paths: Vec<_> = target_paths + .into_iter() + .filter(|path| { + let matched = ignores.matched(path, path.is_dir()); + !matched.is_ignore() || matched.is_whitelist() + }) + .collect(); + + // If no target paths remain after filtering, return `None`. + // Not an error, but nothing to format, leave it to the caller how to handle. + let Some(first_path) = target_paths.first() else { + return Ok(None); + }; + + // Add all non-`!` prefixed paths to the walker base + let mut inner = ignore::WalkBuilder::new(first_path); + for path in target_paths.iter().skip(1) { + inner.add(path); + } + // NOTE: If return `false` here, it will not be `visit()`ed at all inner.filter_entry(move |entry| { let Some(file_type) = entry.file_type() else { @@ -115,12 +162,12 @@ impl Walk { .git_ignore(false) .git_exclude(false) .build_parallel(); - Ok(Self { inner }) + Ok(Some(Self { inner })) } /// Stream entries through a channel as they are discovered - pub fn stream_entries(self) -> mpsc::Receiver { - let (sender, receiver) = mpsc::channel::(); + pub fn stream_entries(self) -> mpsc::Receiver { + let (sender, receiver) = mpsc::channel::(); // Spawn the walk operation in a separate thread rayon::spawn(move || { @@ -133,49 +180,6 @@ impl Walk { } } -/// Normalize user input paths into `target_paths` and `exclude_patterns`. -/// - `target_paths`: Absolute paths to format -/// - `exclude_patterns`: Pattern strings to exclude (with `!` prefix) -fn normalize_paths(cwd: &Path, input_paths: &[PathBuf]) -> (Vec, Vec) { - let mut target_paths = vec![]; - let mut exclude_patterns = vec![]; - - for path in input_paths { - let path_str = path.to_string_lossy(); - - // Instead of `oxlint`'s `--ignore-pattern=PAT`, - // `oxfmt` supports `!` prefix in paths like Prettier. - if path_str.starts_with('!') { - exclude_patterns.push(path_str.to_string()); - continue; - } - - // Otherwise, treat as target path - - if path.is_absolute() { - target_paths.push(path.clone()); - continue; - } - - // NOTE: `.` and cwd behaves differently, need to normalize - let path = if path_str == "." { - cwd.to_path_buf() - } else if let Some(stripped) = path_str.strip_prefix("./") { - cwd.join(stripped) - } else { - cwd.join(path) - }; - target_paths.push(path); - } - - // Default to cwd if no `target_paths` are provided - if target_paths.is_empty() { - target_paths.push(cwd.into()); - } - - (target_paths, exclude_patterns) -} - fn load_ignore_paths(cwd: &Path, ignore_paths: &[PathBuf]) -> Vec { // If specified, just resolves absolute paths if !ignore_paths.is_empty() { @@ -187,18 +191,18 @@ fn load_ignore_paths(cwd: &Path, ignore_paths: &[PathBuf]) -> Vec { // Else, search for default ignore files in cwd [".gitignore", ".prettierignore"] - .iter() + .into_iter() .filter_map(|file_name| { let path = cwd.join(file_name); - if path.exists() { Some(path) } else { None } + path.exists().then_some(path) }) - .collect::>() + .collect() } // --- struct WalkBuilder { - sender: mpsc::Sender, + sender: mpsc::Sender, } impl<'s> ignore::ParallelVisitorBuilder<'s> for WalkBuilder { @@ -208,7 +212,7 @@ impl<'s> ignore::ParallelVisitorBuilder<'s> for WalkBuilder { } struct WalkVisitor { - sender: mpsc::Sender, + sender: mpsc::Sender, } impl ignore::ParallelVisitor for WalkVisitor { @@ -227,13 +231,13 @@ impl ignore::ParallelVisitor for WalkVisitor { // Tier 2 = `.html`, `.json`, etc: Other files supported by Prettier // (Tier 3 = `.astro`, `.svelte`, etc: Other files supported by Prettier plugins) // Tier 4 = everything else: Not handled - let Ok(format_file_source) = FormatFileSource::try_from(entry.into_path()) + let Ok(format_file_source) = FormatFileStrategy::try_from(entry.into_path()) else { return ignore::WalkState::Continue; }; #[cfg(not(feature = "napi"))] - if matches!(format_file_source, FormatFileSource::ExternalFormatter { .. }) { + if !matches!(format_file_source, FormatFileStrategy::OxcFormatter { .. }) { return ignore::WalkState::Continue; } diff --git a/apps/oxfmt/src/core/external_formatter.rs b/apps/oxfmt/src/core/external_formatter.rs index 0a72b5da51dcd..bb655ac60fe91 100644 --- a/apps/oxfmt/src/core/external_formatter.rs +++ b/apps/oxfmt/src/core/external_formatter.rs @@ -5,8 +5,25 @@ use napi::{ bindgen_prelude::{FnArgs, Promise, block_on}, threadsafe_function::ThreadsafeFunction, }; +use tokio::task::block_in_place; + use oxc_formatter::EmbeddedFormatterCallback; +/// Type alias for the setup config callback function signature. +/// Takes (config_json, num_threads) as arguments and returns plugin languages. +pub type JsSetupConfigCb = ThreadsafeFunction< + // Input arguments + FnArgs<(String, u32)>, // (config_json, num_threads) + // Return type (what JS function returns) + Promise>, + // Arguments (repeated) + FnArgs<(String, u32)>, + // Error status + Status, + // CalleeHandled + false, +>; + /// Type alias for the callback function signature. /// Takes (tag_name, code) as separate arguments and returns formatted code. pub type JsFormatEmbeddedCb = ThreadsafeFunction< @@ -23,14 +40,14 @@ pub type JsFormatEmbeddedCb = ThreadsafeFunction< >; /// Type alias for the callback function signature. -/// Takes (parser_name, code) as separate arguments and returns formatted code. +/// Takes (parser_name, file_name, code) as separate arguments and returns formatted code. pub type JsFormatFileCb = ThreadsafeFunction< // Input arguments - FnArgs<(String, String)>, // (parser_name, code) as separate arguments + FnArgs<(String, String, String)>, // (parser_name, file_name, code) as separate arguments // Return type (what JS function returns) Promise, // Arguments (repeated) - FnArgs<(String, String)>, + FnArgs<(String, String, String)>, // Error status Status, // CalleeHandled @@ -38,19 +55,25 @@ pub type JsFormatFileCb = ThreadsafeFunction< >; /// Callback function type for formatting files. -/// Takes (parser_name, code) and returns formatted code or an error. -type FileFormatterCallback = Arc Result + Send + Sync>; +/// Takes (parser_name, file_name, code) and returns formatted code or an error. +type FormatFileCallback = Arc Result + Send + Sync>; + +/// Callback function type for setup config. +/// Takes (config_json, num_threads) and returns plugin languages. +type SetupConfigCallback = Arc Result, String> + Send + Sync>; /// External formatter that wraps a JS callback. #[derive(Clone)] pub struct ExternalFormatter { + pub setup_config: SetupConfigCallback, pub format_embedded: EmbeddedFormatterCallback, - pub format_file: FileFormatterCallback, + pub format_file: FormatFileCallback, } impl std::fmt::Debug for ExternalFormatter { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { f.debug_struct("ExternalFormatter") + .field("setup_config", &"") .field("format_embedded", &"") .field("format_file", &"") .finish() @@ -59,10 +82,28 @@ impl std::fmt::Debug for ExternalFormatter { impl ExternalFormatter { /// Create an [`ExternalFormatter`] from JS callbacks. - pub fn new(format_embedded_cb: JsFormatEmbeddedCb, format_file_cb: JsFormatFileCb) -> Self { + pub fn new( + setup_config_cb: JsSetupConfigCb, + format_embedded_cb: JsFormatEmbeddedCb, + format_file_cb: JsFormatFileCb, + ) -> Self { + let rust_setup_config = wrap_setup_config(setup_config_cb); let rust_format_embedded = wrap_format_embedded(format_embedded_cb); let rust_format_file = wrap_format_file(format_file_cb); - Self { format_embedded: rust_format_embedded, format_file: rust_format_file } + Self { + setup_config: rust_setup_config, + format_embedded: rust_format_embedded, + format_file: rust_format_file, + } + } + + /// Setup Prettier config using the JS callback. + pub fn setup_config( + &self, + config_json: &str, + num_threads: usize, + ) -> Result, String> { + (self.setup_config)(config_json, num_threads) } /// Convert this external formatter to the oxc_formatter::EmbeddedFormatter type @@ -73,11 +114,40 @@ impl ExternalFormatter { } /// Format non-js file using the JS callback. - pub fn format_file(&self, parser_name: &str, code: &str) -> Result { - (self.format_file)(parser_name, code) + pub fn format_file( + &self, + parser_name: &str, + file_name: &str, + code: &str, + ) -> Result { + (self.format_file)(parser_name, file_name, code) } } +// --- + +/// Wrap JS `setupConfig` callback as a normal Rust function. +// NOTE: Use `block_in_place()` because this is called from a sync context, unlike the others +fn wrap_setup_config(cb: JsSetupConfigCb) -> SetupConfigCallback { + Arc::new(move |config_json: &str, num_threads: usize| { + block_in_place(|| { + tokio::runtime::Handle::current().block_on(async { + #[expect(clippy::cast_possible_truncation)] + let status = cb + .call_async(FnArgs::from((config_json.to_string(), num_threads as u32))) + .await; + match status { + Ok(promise) => match promise.await { + Ok(languages) => Ok(languages), + Err(err) => Err(format!("JS setupConfig promise rejected: {err}")), + }, + Err(err) => Err(format!("Failed to call JS setupConfig callback: {err}")), + } + }) + }) + }) +} + /// Wrap JS `formatEmbeddedCode` callback as a normal Rust function. fn wrap_format_embedded(cb: JsFormatEmbeddedCb) -> EmbeddedFormatterCallback { Arc::new(move |tag_name: &str, code: &str| { @@ -100,20 +170,25 @@ fn wrap_format_embedded(cb: JsFormatEmbeddedCb) -> EmbeddedFormatterCallback { } /// Wrap JS `formatFile` callback as a normal Rust function. -fn wrap_format_file(cb: JsFormatFileCb) -> EmbeddedFormatterCallback { - Arc::new(move |parser_name: &str, code: &str| { +fn wrap_format_file(cb: JsFormatFileCb) -> FormatFileCallback { + Arc::new(move |parser_name: &str, file_name: &str, code: &str| { block_on(async { - let status = - cb.call_async(FnArgs::from((parser_name.to_string(), code.to_string()))).await; + let status = cb + .call_async(FnArgs::from(( + parser_name.to_string(), + file_name.to_string(), + code.to_string(), + ))) + .await; match status { Ok(promise) => match promise.await { Ok(formatted_code) => Ok(formatted_code), Err(err) => Err(format!( - "JS formatter promise rejected for file '{parser_name}': {err}" + "JS formatFile promise rejected for file: '{file_name}', parser: '{parser_name}': {err}" )), }, Err(err) => Err(format!( - "Failed to call JS formatting callback for file '{parser_name}': {err}" + "Failed to call JS formatFile callback for file: '{file_name}', parser: '{parser_name}': {err}" )), } }) diff --git a/apps/oxfmt/src/core/format.rs b/apps/oxfmt/src/core/format.rs index aceab04a20554..2474549410b57 100644 --- a/apps/oxfmt/src/core/format.rs +++ b/apps/oxfmt/src/core/format.rs @@ -1,3 +1,5 @@ +#[cfg(feature = "napi")] +use std::borrow::Cow; use std::path::Path; use oxc_allocator::AllocatorPool; @@ -6,7 +8,7 @@ use oxc_formatter::{FormatOptions, Formatter, enable_jsx_source_type, get_parse_ use oxc_parser::Parser; use oxc_span::SourceType; -use super::FormatFileSource; +use super::FormatFileStrategy; pub enum FormatResult { Success { is_changed: bool, code: String }, @@ -17,6 +19,8 @@ pub struct SourceFormatter { allocator_pool: AllocatorPool, format_options: FormatOptions, #[cfg(feature = "napi")] + pub is_sort_package_json: bool, + #[cfg(feature = "napi")] external_formatter: Option, } @@ -26,6 +30,8 @@ impl SourceFormatter { allocator_pool: AllocatorPool::new(num_of_threads), format_options, #[cfg(feature = "napi")] + is_sort_package_json: false, + #[cfg(feature = "napi")] external_formatter: None, } } @@ -35,25 +41,37 @@ impl SourceFormatter { pub fn with_external_formatter( mut self, external_formatter: Option, + sort_package_json: bool, ) -> Self { self.external_formatter = external_formatter; + self.is_sort_package_json = sort_package_json; self } /// Format a file based on its source type. - pub fn format(&self, entry: &FormatFileSource, source_text: &str) -> FormatResult { - match entry { - FormatFileSource::OxcFormatter { path, source_type } => { + pub fn format(&self, entry: &FormatFileStrategy, source_text: &str) -> FormatResult { + let result = match entry { + FormatFileStrategy::OxcFormatter { path, source_type } => { self.format_by_oxc_formatter(source_text, path, *source_type) } #[cfg(feature = "napi")] - FormatFileSource::ExternalFormatter { path, parser_name } => { + FormatFileStrategy::ExternalFormatter { path, parser_name } => { self.format_by_external_formatter(source_text, path, parser_name) } + #[cfg(feature = "napi")] + FormatFileStrategy::ExternalFormatterPackageJson { path, parser_name } => { + self.format_by_external_formatter_package_json(source_text, path, parser_name) + } #[cfg(not(feature = "napi"))] - FormatFileSource::ExternalFormatter { .. } => { + FormatFileStrategy::ExternalFormatter { .. } + | FormatFileStrategy::ExternalFormatterPackageJson { .. } => { unreachable!("If `napi` feature is disabled, this should not be passed here") } + }; + + match result { + Ok(code) => FormatResult::Success { is_changed: source_text != code, code }, + Err(err) => FormatResult::Error(vec![err]), } } @@ -63,7 +81,7 @@ impl SourceFormatter { source_text: &str, path: &Path, source_type: SourceType, - ) -> FormatResult { + ) -> Result { let source_type = enable_jsx_source_type(source_type); let allocator = self.allocator_pool.get(); @@ -71,7 +89,8 @@ impl SourceFormatter { .with_options(get_parse_options()) .parse(); if !ret.errors.is_empty() { - return FormatResult::Error(ret.errors); + // Return the first error for simplicity + return Err(ret.errors.into_iter().next().unwrap()); } let base_formatter = Formatter::new(&allocator, self.format_options.clone()); @@ -92,25 +111,23 @@ impl SourceFormatter { #[cfg(not(feature = "napi"))] let formatted = base_formatter.format(&ret.program); - let code = match formatted.print() { - Ok(printed) => printed.into_code(), - Err(err) => { - return FormatResult::Error(vec![OxcDiagnostic::error(format!( - "Failed to print formatted code: {}\n{err}", - path.display() - ))]); - } - }; + let code = formatted.print().map_err(|err| { + OxcDiagnostic::error(format!( + "Failed to print formatted code: {}\n{err}", + path.display() + )) + })?; #[cfg(feature = "detect_code_removal")] { - if let Some(diff) = oxc_formatter::detect_code_removal(source_text, &code, source_type) + if let Some(diff) = + oxc_formatter::detect_code_removal(source_text, code.as_code(), source_type) { unreachable!("Code removal detected in `{}`:\n{diff}", path.to_string_lossy()); } } - FormatResult::Success { is_changed: source_text != code, code } + Ok(code.into_code()) } /// Format non-JS/TS file using external formatter (Prettier). @@ -120,18 +137,49 @@ impl SourceFormatter { source_text: &str, path: &Path, parser_name: &str, - ) -> FormatResult { + ) -> Result { let external_formatter = self .external_formatter .as_ref() .expect("`external_formatter` must exist when `napi` feature is enabled"); - match external_formatter.format_file(parser_name, source_text) { - Ok(code) => FormatResult::Success { is_changed: source_text != code, code }, - Err(err) => FormatResult::Error(vec![OxcDiagnostic::error(format!( + // NOTE: To call Prettier, we need to either infer the parser from `filepath` or specify the `parser`. + // + // We are specifying the `parser`, so `filepath` is not actually necessary, + // but since some plugins might depend on `filepath`, we pass the actual file name as well. + // + // In that sense, it might be OK to just pass `filepath` without specifying `parser`, + // but considering cases like treating `tsconfig.json` as `jsonc`, we need to specify `parser` as well. + // (without supporting `overrides` in config file) + let file_name = path.file_name().and_then(|s| s.to_str()).unwrap_or(""); + + external_formatter.format_file(parser_name, file_name, source_text).map_err(|err| { + OxcDiagnostic::error(format!( "Failed to format file with external formatter: {}\n{err}", path.display() - ))]), - } + )) + }) + } + + /// Format `package.json`: optionally sort then format by external formatter. + #[cfg(feature = "napi")] + fn format_by_external_formatter_package_json( + &self, + source_text: &str, + path: &Path, + parser_name: &str, + ) -> Result { + let source_text: Cow<'_, str> = if self.is_sort_package_json { + Cow::Owned(sort_package_json::sort_package_json(source_text).map_err(|err| { + OxcDiagnostic::error(format!( + "Failed to sort package.json: {}\n{err}", + path.display() + )) + })?) + } else { + Cow::Borrowed(source_text) + }; + + self.format_by_external_formatter(&source_text, path, parser_name) } } diff --git a/apps/oxfmt/src/core/mod.rs b/apps/oxfmt/src/core/mod.rs index 7f8116360e0de..96a9840b90561 100644 --- a/apps/oxfmt/src/core/mod.rs +++ b/apps/oxfmt/src/core/mod.rs @@ -1,11 +1,14 @@ mod format; mod support; +pub mod utils; #[cfg(feature = "napi")] mod external_formatter; pub use format::{FormatResult, SourceFormatter}; -pub use support::FormatFileSource; +pub use support::FormatFileStrategy; #[cfg(feature = "napi")] -pub use external_formatter::{ExternalFormatter, JsFormatEmbeddedCb, JsFormatFileCb}; +pub use external_formatter::{ + ExternalFormatter, JsFormatEmbeddedCb, JsFormatFileCb, JsSetupConfigCb, +}; diff --git a/apps/oxfmt/src/core/support.rs b/apps/oxfmt/src/core/support.rs index d0d0d617880a1..c2b64cd86abaa 100644 --- a/apps/oxfmt/src/core/support.rs +++ b/apps/oxfmt/src/core/support.rs @@ -5,7 +5,7 @@ use phf::phf_set; use oxc_formatter::get_supported_source_type; use oxc_span::SourceType; -pub enum FormatFileSource { +pub enum FormatFileStrategy { OxcFormatter { path: PathBuf, source_type: SourceType, @@ -15,9 +15,15 @@ pub enum FormatFileSource { #[cfg_attr(not(feature = "napi"), expect(dead_code))] parser_name: &'static str, }, + /// `package.json` is special: sorted by `sort-package-json` then formatted by external formatter. + ExternalFormatterPackageJson { + path: PathBuf, + #[cfg_attr(not(feature = "napi"), expect(dead_code))] + parser_name: &'static str, + }, } -impl TryFrom for FormatFileSource { +impl TryFrom for FormatFileStrategy { type Error = (); fn try_from(path: PathBuf) -> Result { @@ -26,131 +32,158 @@ impl TryFrom for FormatFileSource { return Ok(Self::OxcFormatter { path, source_type }); } - if let Some(parser_name) = get_external_parser_name(&path) { - return Ok(Self::ExternalFormatter { path, parser_name }); + if let Some(source) = get_external_format_source(path) { + return Ok(source); } Err(()) } } -impl FormatFileSource { +impl FormatFileStrategy { pub fn path(&self) -> &Path { match self { - Self::OxcFormatter { path, .. } | Self::ExternalFormatter { path, .. } => path, + Self::OxcFormatter { path, .. } + | Self::ExternalFormatter { path, .. } + | Self::ExternalFormatterPackageJson { path, .. } => path, } } } // --- -/// Returns the Prettier parser name for file at `path`, if supported. +/// Returns `FormatFileSource` for external formatter, if supported. /// See also `prettier --support-info | jq '.languages[]'` /// NOTE: The order matters: more specific matches (like `package.json`) must come before generic ones. -fn get_external_parser_name(path: &Path) -> Option<&'static str> { +fn get_external_format_source(path: PathBuf) -> Option { let file_name = path.file_name()?.to_str()?; let extension = path.extension().and_then(|ext| ext.to_str()); + // Excluded files like lock files + if EXCLUDE_FILENAMES.contains(file_name) { + return None; + } + // JSON and variants + // `package.json` is special case + if file_name == "package.json" { + return Some(FormatFileStrategy::ExternalFormatterPackageJson { + path, + parser_name: "json-stringify", + }); + } if JSON_STRINGIFY_FILENAMES.contains(file_name) || extension == Some("importmap") { - return Some("json-stringify"); + return Some(FormatFileStrategy::ExternalFormatter { path, parser_name: "json-stringify" }); } if JSON_FILENAMES.contains(file_name) { - return Some("json"); + return Some(FormatFileStrategy::ExternalFormatter { path, parser_name: "json" }); } // Must be checked before generic JSON/JSONC if (file_name.starts_with("tsconfig.") || file_name.starts_with("jsconfig.")) && extension == Some("json") { - return Some("jsonc"); + return Some(FormatFileStrategy::ExternalFormatter { path, parser_name: "jsonc" }); } if let Some(ext) = extension && JSON_EXTENSIONS.contains(ext) { - return Some("json"); + return Some(FormatFileStrategy::ExternalFormatter { path, parser_name: "json" }); } if let Some(ext) = extension && JSONC_EXTENSIONS.contains(ext) { - return Some("jsonc"); + return Some(FormatFileStrategy::ExternalFormatter { path, parser_name: "jsonc" }); } if extension == Some("json5") { - return Some("json5"); + return Some(FormatFileStrategy::ExternalFormatter { path, parser_name: "json5" }); } // YAML if YAML_FILENAMES.contains(file_name) { - return Some("yaml"); + return Some(FormatFileStrategy::ExternalFormatter { path, parser_name: "yaml" }); } if let Some(ext) = extension && YAML_EXTENSIONS.contains(ext) { - return Some("yaml"); + return Some(FormatFileStrategy::ExternalFormatter { path, parser_name: "yaml" }); } // Markdown and variants if MARKDOWN_FILENAMES.contains(file_name) { - return Some("markdown"); + return Some(FormatFileStrategy::ExternalFormatter { path, parser_name: "markdown" }); } if let Some(ext) = extension && MARKDOWN_EXTENSIONS.contains(ext) { - return Some("markdown"); + return Some(FormatFileStrategy::ExternalFormatter { path, parser_name: "markdown" }); } if extension == Some("mdx") { - return Some("mdx"); + return Some(FormatFileStrategy::ExternalFormatter { path, parser_name: "mdx" }); } // HTML and variants // Must be checked before generic HTML if file_name.ends_with(".component.html") { - return Some("angular"); + return Some(FormatFileStrategy::ExternalFormatter { path, parser_name: "angular" }); } if let Some(ext) = extension && HTML_EXTENSIONS.contains(ext) { - return Some("html"); + return Some(FormatFileStrategy::ExternalFormatter { path, parser_name: "html" }); } if extension == Some("vue") { - return Some("vue"); + return Some(FormatFileStrategy::ExternalFormatter { path, parser_name: "vue" }); } if extension == Some("mjml") { - return Some("mjml"); + return Some(FormatFileStrategy::ExternalFormatter { path, parser_name: "mjml" }); } // CSS and variants if let Some(ext) = extension && CSS_EXTENSIONS.contains(ext) { - return Some("css"); + return Some(FormatFileStrategy::ExternalFormatter { path, parser_name: "css" }); } if extension == Some("less") { - return Some("less"); + return Some(FormatFileStrategy::ExternalFormatter { path, parser_name: "less" }); } if extension == Some("scss") { - return Some("scss"); + return Some(FormatFileStrategy::ExternalFormatter { path, parser_name: "scss" }); } // GraphQL if let Some(ext) = extension && GRAPHQL_EXTENSIONS.contains(ext) { - return Some("graphql"); + return Some(FormatFileStrategy::ExternalFormatter { path, parser_name: "graphql" }); } // Handlebars if let Some(ext) = extension && HANDLEBARS_EXTENSIONS.contains(ext) { - return Some("glimmer"); + return Some(FormatFileStrategy::ExternalFormatter { path, parser_name: "glimmer" }); } None } -static JSON_STRINGIFY_FILENAMES: phf::Set<&'static str> = phf_set! { - "package.json", +static EXCLUDE_FILENAMES: phf::Set<&'static str> = phf_set! { "package-lock.json", + "pnpm-lock.yaml", + "yarn.lock", + "MODULE.bazel.lock", + "bun.lock", + "deno.lock", + "composer.lock", + "Package.resolved", + "Pipfile.lock", + "flake.lock", + "mcmod.info", +}; + +static JSON_STRINGIFY_FILENAMES: phf::Set<&'static str> = phf_set! { + // NOTE: `package.json` is handled separately as `ExternalFormatterPackageJson` "composer.json", }; @@ -290,14 +323,22 @@ static YAML_EXTENSIONS: phf::Set<&'static str> = phf_set! { #[cfg(test)] mod tests { use super::*; - use std::path::Path; + + fn get_parser_name(file_name: &str) -> Option<&'static str> { + match get_external_format_source(PathBuf::from(file_name)) { + Some( + FormatFileStrategy::ExternalFormatter { parser_name, .. } + | FormatFileStrategy::ExternalFormatterPackageJson { parser_name, .. }, + ) => Some(parser_name), + _ => None, + } + } #[test] - fn test_get_external_parser_name() { + fn test_get_external_format_source() { let test_cases = vec![ // JSON ("package.json", Some("json-stringify")), - ("package-lock.json", Some("json-stringify")), ("config.importmap", Some("json-stringify")), ("tsconfig.json", Some("jsonc")), ("jsconfig.dev.json", Some("jsonc")), @@ -342,6 +383,10 @@ mod tests { ("config.yml", Some("yaml")), ("settings.yaml", Some("yaml")), ("grammar.sublime-syntax", Some("yaml")), + // Excluded lock files + ("package-lock.json", None), + ("pnpm-lock.yaml", None), + ("yarn.lock", None), // Unknown ("unknown.txt", None), ("prof.png", None), @@ -349,8 +394,17 @@ mod tests { ]; for (file_name, expected) in test_cases { - let result = get_external_parser_name(Path::new(file_name)); + let result = get_parser_name(file_name); assert_eq!(result, expected, "`{file_name}` should be parsed as {expected:?}"); } } + + #[test] + fn test_package_json_is_special() { + let source = get_external_format_source(PathBuf::from("package.json")).unwrap(); + assert!(matches!(source, FormatFileStrategy::ExternalFormatterPackageJson { .. })); + + let source = get_external_format_source(PathBuf::from("composer.json")).unwrap(); + assert!(matches!(source, FormatFileStrategy::ExternalFormatter { .. })); + } } diff --git a/apps/oxfmt/src/core/utils.rs b/apps/oxfmt/src/core/utils.rs new file mode 100644 index 0000000000000..72d23021af147 --- /dev/null +++ b/apps/oxfmt/src/core/utils.rs @@ -0,0 +1,15 @@ +use std::{fs, io, path::Path}; + +pub fn read_to_string(path: &Path) -> io::Result { + // `simdutf8` is faster than `std::str::from_utf8` which `fs::read_to_string` uses internally + let bytes = fs::read(path)?; + if simdutf8::basic::from_utf8(&bytes).is_err() { + // Same error as `fs::read_to_string` produces (using `io::ErrorKind::InvalidData`) + return Err(io::Error::new( + io::ErrorKind::InvalidData, + "stream did not contain valid UTF-8", + )); + } + // SAFETY: `simdutf8` has ensured it's a valid UTF-8 string + Ok(unsafe { String::from_utf8_unchecked(bytes) }) +} diff --git a/apps/oxfmt/src/main_napi.rs b/apps/oxfmt/src/main_napi.rs index 0e70de39ae998..c3a0997334d3b 100644 --- a/apps/oxfmt/src/main_napi.rs +++ b/apps/oxfmt/src/main_napi.rs @@ -8,7 +8,7 @@ use napi_derive::napi; use crate::{ cli::{CliRunResult, FormatRunner, format_command, init_miette, init_tracing}, - core::{ExternalFormatter, JsFormatEmbeddedCb, JsFormatFileCb}, + core::{ExternalFormatter, JsFormatEmbeddedCb, JsFormatFileCb, JsSetupConfigCb}, lsp::run_lsp, }; @@ -19,8 +19,9 @@ use crate::{ /// /// JS side passes in: /// 1. `args`: Command line arguments (process.argv.slice(2)) -/// 2. `format_embedded_cb`: Callback to format embedded code in templates -/// 3. `format_file_cb`: Callback to format files +/// 2. `setup_config_cb`: Callback to setup Prettier config +/// 3. `format_embedded_cb`: Callback to format embedded code in templates +/// 4. `format_file_cb`: Callback to format files /// /// Returns `true` if formatting succeeded without errors, `false` otherwise. #[expect(clippy::allow_attributes)] @@ -28,17 +29,23 @@ use crate::{ #[napi] pub async fn format( args: Vec, + #[napi(ts_arg_type = "(configJSON: string, numThreads: number) => Promise")] + setup_config_cb: JsSetupConfigCb, #[napi(ts_arg_type = "(tagName: string, code: string) => Promise")] format_embedded_cb: JsFormatEmbeddedCb, - #[napi(ts_arg_type = "(parserName: string, code: string) => Promise")] + #[napi( + ts_arg_type = "(parserName: string, fileName: string, code: string) => Promise" + )] format_file_cb: JsFormatFileCb, ) -> bool { - format_impl(args, format_embedded_cb, format_file_cb).await.report() == ExitCode::SUCCESS + format_impl(args, setup_config_cb, format_embedded_cb, format_file_cb).await.report() + == ExitCode::SUCCESS } /// Run the formatter. async fn format_impl( args: Vec, + setup_config_cb: JsSetupConfigCb, format_embedded_cb: JsFormatEmbeddedCb, format_file_cb: JsFormatFileCb, ) -> CliRunResult { @@ -71,7 +78,8 @@ async fn format_impl( command.handle_threads(); // Create external formatter from JS callback - let external_formatter = ExternalFormatter::new(format_embedded_cb, format_file_cb); + let external_formatter = + ExternalFormatter::new(setup_config_cb, format_embedded_cb, format_file_cb); // stdio is blocked by LineWriter, use a BufWriter to reduce syscalls. // See `https://github.com/rust-lang/rust/issues/60673`. diff --git a/apps/oxfmt/test/__snapshots__/external_formatter.test.ts.snap b/apps/oxfmt/test/__snapshots__/external_formatter.test.ts.snap index 9ec37bf618aa4..59a5a2941e3fb 100644 --- a/apps/oxfmt/test/__snapshots__/external_formatter.test.ts.snap +++ b/apps/oxfmt/test/__snapshots__/external_formatter.test.ts.snap @@ -46,15 +46,15 @@ package.json "build-js": "node scripts/build.js", "test": "tsc && vitest --dir test run" }, - "engines": { - "node": "^20.19.0 || >=22.12.0" - }, "dependencies": { "prettier": "3.7.4" }, "devDependencies": { "@types/node": "catalog:", "execa": "^9.6.0" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" } } diff --git a/apps/oxfmt/test/__snapshots__/external_formatter_with_config.test.ts.snap b/apps/oxfmt/test/__snapshots__/external_formatter_with_config.test.ts.snap new file mode 100644 index 0000000000000..e6e27c06a23ba --- /dev/null +++ b/apps/oxfmt/test/__snapshots__/external_formatter_with_config.test.ts.snap @@ -0,0 +1,45 @@ +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html + +exports[`external_formatter_with_config > should pass config options to prettier 1`] = ` +"--- FILE ----------- +test.vue +--- BEFORE --------- + + + + + + +--- AFTER ---------- + + + + + + +--------------------" +`; diff --git a/apps/oxfmt/test/__snapshots__/ignore_and_override.test.ts.snap b/apps/oxfmt/test/__snapshots__/ignore_and_override.test.ts.snap index 8164d1fbb1ca8..ee3512e251679 100644 --- a/apps/oxfmt/test/__snapshots__/ignore_and_override.test.ts.snap +++ b/apps/oxfmt/test/__snapshots__/ignore_and_override.test.ts.snap @@ -30,6 +30,24 @@ arguments: --check --ignore-path ignore1 should_format/ok.js working directory: fixtures/ignore_and_override exit code: 1 --- STDOUT --------- + +--- STDERR --------- +Expected at least one target file +-------------------- +-------------------- +arguments: --check --ignore-path ignore1 should_format/ok.js --no-error-on-unmatched-pattern +working directory: fixtures/ignore_and_override +exit code: 0 +--- STDOUT --------- + +--- STDERR --------- +No files found matching the given patterns. +-------------------- +-------------------- +arguments: --check --ignore-path ignore2 +working directory: fixtures/ignore_and_override +exit code: 1 +--- STDOUT --------- Checking formatting... should_format/ok.js (ms) @@ -40,7 +58,7 @@ Finished in ms on 1 files using 1 threads. -------------------- -------------------- -arguments: --check --ignore-path ignore2 +arguments: --check --ignore-path ignore2 should_format/ok.js working directory: fixtures/ignore_and_override exit code: 1 --- STDOUT --------- diff --git a/apps/oxfmt/test/external_formatter_with_config.test.ts b/apps/oxfmt/test/external_formatter_with_config.test.ts new file mode 100644 index 0000000000000..7e29f6c8db1f2 --- /dev/null +++ b/apps/oxfmt/test/external_formatter_with_config.test.ts @@ -0,0 +1,12 @@ +import { describe, expect, it } from "vitest"; +import { join } from "node:path"; +import { runWriteModeAndSnapshot } from "./utils"; + +const fixturesDir = join(__dirname, "fixtures", "external_formatter_with_config"); + +describe("external_formatter_with_config", () => { + it("should pass config options to prettier", async () => { + const snapshot = await runWriteModeAndSnapshot(fixturesDir, ["test.vue"]); + expect(snapshot).toMatchSnapshot(); + }); +}); diff --git a/apps/oxfmt/test/fixtures/external_formatter_with_config/.oxfmtrc.json b/apps/oxfmt/test/fixtures/external_formatter_with_config/.oxfmtrc.json new file mode 100644 index 0000000000000..d5ca6842b8179 --- /dev/null +++ b/apps/oxfmt/test/fixtures/external_formatter_with_config/.oxfmtrc.json @@ -0,0 +1,6 @@ +{ + "printWidth": 40, + "useTabs": true, + "singleQuote": true, + "embeddedLanguageFormatting": "auto" +} diff --git a/apps/oxfmt/test/fixtures/external_formatter_with_config/test.vue b/apps/oxfmt/test/fixtures/external_formatter_with_config/test.vue new file mode 100644 index 0000000000000..57337ec3ca6c9 --- /dev/null +++ b/apps/oxfmt/test/fixtures/external_formatter_with_config/test.vue @@ -0,0 +1,13 @@ + + + + + diff --git a/apps/oxfmt/test/ignore_and_override.test.ts b/apps/oxfmt/test/ignore_and_override.test.ts index f2fb866065347..b8756b0c0a727 100644 --- a/apps/oxfmt/test/ignore_and_override.test.ts +++ b/apps/oxfmt/test/ignore_and_override.test.ts @@ -8,10 +8,24 @@ describe("ignore_and_override", () => { it("should handle ignore files with overrides", async () => { const cwd = join(fixturesDir, "ignore_and_override"); const testCases = [ + // Exclude `err.js` via `!` pattern, format `ok.js` only ["--check", "!**/err.js"], + // `ignore1` excludes all files -> no files found error ["--check", "--ignore-path", "ignore1"], + // Explicitly specified file is also excluded by `ignore1` -> no files found error ["--check", "--ignore-path", "ignore1", "should_format/ok.js"], + // Same as above, but suppress error with `--no-error-on-unmatched-pattern` + [ + "--check", + "--ignore-path", + "ignore1", + "should_format/ok.js", + "--no-error-on-unmatched-pattern", + ], + // `ignore2` has `!should_format/ok.js` (whitelist), so `ok.js` is formatted ["--check", "--ignore-path", "ignore2"], + // Whitelist + explicit file: `ok.js` is whitelisted in `ignore2` and explicitly specified + ["--check", "--ignore-path", "ignore2", "should_format/ok.js"], ]; const snapshot = await runAndSnapshot(cwd, testCases); diff --git a/apps/oxfmt/tsdown.config.ts b/apps/oxfmt/tsdown.config.ts index c7a09226a5d08..3f8446e5b5a41 100644 --- a/apps/oxfmt/tsdown.config.ts +++ b/apps/oxfmt/tsdown.config.ts @@ -1,7 +1,8 @@ import { defineConfig } from "tsdown"; export default defineConfig({ - entry: ["src-js/index.ts", "src-js/cli.ts"], + // Build all entry points together to share Prettier chunks + entry: ["src-js/index.ts", "src-js/cli.ts", "src-js/prettier-worker.ts"], format: "esm", platform: "node", target: "node20", @@ -10,5 +11,11 @@ export default defineConfig({ outDir: "dist", shims: false, fixedExtension: false, - noExternal: ["prettier"], + noExternal: [ + // Bundle it to control version + "prettier", + // Cannot bundle: worker.js runs in separate thread and can't resolve bundled chunks + // Be sure to add it to "dependencies" in `npm/oxfmt/package.json`! + // "tinypool", + ], }); diff --git a/apps/oxlint/CHANGELOG.md b/apps/oxlint/CHANGELOG.md index 29acab9c4d208..c027647eb6f28 100644 --- a/apps/oxlint/CHANGELOG.md +++ b/apps/oxlint/CHANGELOG.md @@ -4,6 +4,43 @@ All notable changes to this package will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0). +## [1.32.0] - 2025-12-08 + +### 🚀 Features + +- 5c62c16 linter/plugins: Allow JS plugins to access `globals` (#16512) (Arsh) +- 7584938 linter/plugins: Add ESLint compat mode to `RuleTester` (#16538) (overlookmotel) +- b38c2d0 linter/plugins: Add `SourceCode#lineStartIndices` getter (#16510) (overlookmotel) +- ba93ffc linter/plugins: Add `SourceCode#tokensAndComments` getter (#16503) (overlookmotel) +- d2ca540 linter/plugins: Add `SourceCode#isESTree` property (#16499) (overlookmotel) +- 9001234 linter: Add fix support for tsgolint diagnostics (#16344) (camc314) +- 0ec454c linter/plugins: Merge default options into options (#16358) (overlookmotel) + +### 🐛 Bug Fixes + +- a806d74 linter: Use import type for ESTree in visitor.d.ts (#16472) (camc314) +- 1a69b06 linter: Junit support for multiple files/errors/diagnostics (#16568) (Shrey Sudhir) +- fd84dcc linter/plugins: `RuleTester` parser catch fatal errors (#16558) (overlookmotel) +- ab4deb0 linter/plugins: Improve safety of options merging (#16549) (overlookmotel) +- f7751cc linter/plugins: Fix TS types for `RuleTester` (#16546) (overlookmotel) +- 6d33320 linter/plugins: Prevent user modifying the default config (#16545) (overlookmotel) +- b4483c5 linter/plugins: Add config support skeleton to `RuleTester` (#16537) (overlookmotel) +- 3a49158 linter/plugins: Improve TS types for tokens (#16502) (overlookmotel) +- 2d3217e linter/plugins: Remove panics from `lint_file` and `setup_configs` (#16453) (overlookmotel) + +### ⚡ Performance + +- 793b989 linter/plugins: Move result-processing work off main JS thread (#16456) (overlookmotel) +- 44dff7b linter/plugins: Skip serialization overhead when no errors (#16443) (overlookmotel) +- 1aa2409 linter/plugins: Do not remove `messageId` field from `DiagnosticReport` before sending to Rust (#16442) (overlookmotel) + +### 📚 Documentation + +- e24aabd linter/plugins: Correct comment (#16559) (overlookmotel) +- 8c85e08 linter/plugins: Add TODO comment (#16511) (overlookmotel) +- a9b9298 linter/plugins: Add JSDoc comments to `SourceCode` properties (#16497) (overlookmotel) +- 467cc1a linter/plugins: Improve comment on error branch (#16464) (overlookmotel) + ## [1.31.0] - 2025-12-01 ### 💥 BREAKING CHANGES diff --git a/apps/oxlint/Cargo.toml b/apps/oxlint/Cargo.toml index 5e2bc28d4cef7..d48d2b929a035 100644 --- a/apps/oxlint/Cargo.toml +++ b/apps/oxlint/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "oxlint" -version = "1.31.0" +version = "1.32.0" authors.workspace = true categories.workspace = true edition.workspace = true @@ -32,6 +32,7 @@ oxc_ast_visit = { workspace = true, features = ["serialize"] } oxc_diagnostics = { workspace = true } oxc_language_server = { workspace = true, features = ["linter"] } oxc_linter = { workspace = true } +oxc_napi = { workspace = true } oxc_parser = { workspace = true } oxc_semantic = { workspace = true } oxc_span = { workspace = true } diff --git a/apps/oxlint/conformance/.gitignore b/apps/oxlint/conformance/.gitignore new file mode 100644 index 0000000000000..f08b620e68a78 --- /dev/null +++ b/apps/oxlint/conformance/.gitignore @@ -0,0 +1 @@ +submodules diff --git a/apps/oxlint/conformance/README.md b/apps/oxlint/conformance/README.md new file mode 100644 index 0000000000000..64483369ac20b --- /dev/null +++ b/apps/oxlint/conformance/README.md @@ -0,0 +1,29 @@ +# Oxlint JS plugins conformance tests + +Conformance tests run all ESLint's tests for its built-in rules as Oxlint JS plugins. + +They do this by substituting ESLint's `RuleTester` for Oxlint's version, and then `require()`ing the ESLint test files +to run the tests. + +The results are saved in `conformance/snapshot.md`. + +## Setup + +Build Oxlint in debug mode: + +```sh +cd apps/oxlint +pnpm run build-test +``` + +Initialize ESLint submodule: + +```sh +pnpm run init-conformance +``` + +## Run conformance tests + +```sh +pnpm run conformance +``` diff --git a/apps/oxlint/conformance/init.sh b/apps/oxlint/conformance/init.sh new file mode 100755 index 0000000000000..cd11b9c4e4e86 --- /dev/null +++ b/apps/oxlint/conformance/init.sh @@ -0,0 +1,25 @@ +#!/bin/bash +set -e + +ESLINT_SHA="e593aa0fd29f51edea787815ffc847aa723ef1f8" + +# Delete existing `submodules` directory +rm -rf submodules + +# Clone ESLint repo into `submodules/eslint` +git clone --single-branch --depth 1 https://github.com/eslint/eslint.git submodules/eslint +cd submodules/eslint +git fetch --depth 1 origin "$ESLINT_SHA" +git reset --hard "$ESLINT_SHA" +git clean -f -q + +# Install dependencies +pnpm install --ignore-workspace + +# Copy TS-ESLint parser shim into `node_modules/@typescript-eslint/parser` +rm node_modules/@typescript-eslint/parser +cp -r tools/typescript-eslint-parser node_modules/@typescript-eslint/parser +cd node_modules/@typescript-eslint/parser + +# Install dependencies of TS-ESLint parser shim +pnpm install --ignore-workspace diff --git a/apps/oxlint/conformance/snapshot.md b/apps/oxlint/conformance/snapshot.md new file mode 100644 index 0000000000000..20da7822b9d17 --- /dev/null +++ b/apps/oxlint/conformance/snapshot.md @@ -0,0 +1,311462 @@ +# ESLint Rule Tester Conformance Results + +## Summary + +### Rules + +| Status | Count | +| ----------------- | ----- | +| Total rules | 292 | +| Fully passing | 166 | +| Partially passing | 121 | +| Fully failing | 5 | +| Load errors | 0 | +| No tests run | 0 | + +### Tests + +| Status | Count | +| ----------- | ----- | +| Total tests | 33090 | +| Passing | 26802 | +| Failing | 6288 | + +## Fully Passing Rules + +- `array-element-newline` (155 tests) +- `arrow-body-style` (87 tests) +- `block-spacing` (101 tests) +- `callback-return` (78 tests) +- `capitalized-comments` (178 tests) +- `comma-spacing` (173 tests) +- `comma-style` (96 tests) +- `curly` (216 tests) +- `default-case-last` (37 tests) +- `default-case` (23 tests) +- `eqeqeq` (68 tests) +- `for-direction` (72 tests) +- `func-names` (109 tests) +- `function-call-argument-newline` (58 tests) +- `generator-star-spacing` (201 tests) +- `global-require` (22 tests) +- `guard-for-in` (12 tests) +- `handle-callback-err` (45 tests) +- `id-length` (181 tests) +- `id-match` (98 tests) +- `implicit-arrow-linebreak` (62 tests) +- `jsx-quotes` (18 tests) +- `key-spacing` (153 tests) +- `line-comment-position` (38 tests) +- `linebreak-style` (12 tests) +- `lines-between-class-members` (112 tests) +- `max-classes-per-file` (17 tests) +- `max-depth` (25 tests) +- `max-len` (108 tests) +- `max-lines-per-function` (43 tests) +- `max-lines` (47 tests) +- `max-nested-callbacks` (14 tests) +- `max-statements-per-line` (96 tests) +- `max-statements` (42 tests) +- `multiline-ternary` (144 tests) +- `new-cap` (80 tests) +- `newline-after-var` (117 tests) +- `newline-before-return` (93 tests) +- `newline-per-chained-call` (37 tests) +- `no-async-promise-executor` (6 tests) +- `no-await-in-loop` (37 tests) +- `no-bitwise` (26 tests) +- `no-buffer-constructor` (13 tests) +- `no-caller` (6 tests) +- `no-case-declarations` (19 tests) +- `no-class-assign` (18 tests) +- `no-compare-neg-zero` (39 tests) +- `no-cond-assign` (45 tests) +- `no-confusing-arrow` (30 tests) +- `no-console` (44 tests) +- `no-const-assign` (33 tests) +- `no-continue` (6 tests) +- `no-control-regex` (36 tests) +- `no-debugger` (2 tests) +- `no-delete-var` (2 tests) +- `no-div-regex` (3 tests) +- `no-dupe-args` (13 tests) +- `no-dupe-else-if` (89 tests) +- `no-dupe-keys` (50 tests) +- `no-duplicate-case` (29 tests) +- `no-else-return` (91 tests) +- `no-empty-character-class` (42 tests) +- `no-empty-pattern` (31 tests) +- `no-empty-static-block` (10 tests) +- `no-empty` (35 tests) +- `no-eq-null` (5 tests) +- `no-ex-assign` (8 tests) +- `no-extend-native` (40 tests) +- `no-extra-bind` (43 tests) +- `no-extra-label` (34 tests) +- `no-extra-semi` (53 tests) +- `no-floating-decimal` (8 tests) +- `no-func-assign` (15 tests) +- `no-implicit-coercion` (134 tests) +- `no-import-assign` (116 tests) +- `no-inline-comments` (49 tests) +- `no-invalid-regexp` (108 tests) +- `no-iterator` (9 tests) +- `no-label-var` (5 tests) +- `no-lonely-if` (17 tests) +- `no-loss-of-precision` (125 tests) +- `no-mixed-requires` (23 tests) +- `no-mixed-spaces-and-tabs` (61 tests) +- `no-multi-assign` (31 tests) +- `no-multi-spaces` (130 tests) +- `no-multi-str` (7 tests) +- `no-negated-condition` (19 tests) +- `no-negated-in-lhs` (3 tests) +- `no-nested-ternary` (4 tests) +- `no-new-func` (23 tests) +- `no-new-object` (10 tests) +- `no-new-require` (5 tests) +- `no-new` (3 tests) +- `no-nonoctal-decimal-escape` (84 tests) +- `no-octal-escape` (94 tests) +- `no-octal` (17 tests) +- `no-param-reassign` (78 tests) +- `no-path-concat` (8 tests) +- `no-plusplus` (23 tests) +- `no-process-env` (7 tests) +- `no-process-exit` (6 tests) +- `no-proto` (9 tests) +- `no-prototype-builtins` (47 tests) +- `no-regex-spaces` (73 tests) +- `no-restricted-exports` (183 tests) +- `no-restricted-modules` (44 tests) +- `no-restricted-properties` (89 tests) +- `no-restricted-syntax` (32 tests) +- `no-return-assign` (30 tests) +- `no-return-await` (71 tests) +- `no-script-url` (10 tests) +- `no-self-compare` (21 tests) +- `no-sequences` (42 tests) +- `no-sparse-arrays` (6 tests) +- `no-template-curly-in-string` (22 tests) +- `no-ternary` (4 tests) +- `no-throw-literal` (41 tests) +- `no-undef-init` (28 tests) +- `no-underscore-dangle` (116 tests) +- `no-unmodified-loop-condition` (37 tests) +- `no-unsafe-finally` (28 tests) +- `no-unsafe-negation` (29 tests) +- `no-unsafe-optional-chaining` (187 tests) +- `no-unused-labels` (26 tests) +- `no-unused-private-class-members` (39 tests) +- `no-useless-call` (44 tests) +- `no-useless-catch` (16 tests) +- `no-useless-escape` (288 tests) +- `no-void` (12 tests) +- `no-warning-comments` (61 tests) +- `no-with` (2 tests) +- `nonblock-statement-body-position` (48 tests) +- `one-var-declaration-per-line` (38 tests) +- `one-var` (296 tests) +- `operator-assignment` (119 tests) +- `operator-linebreak` (104 tests) +- `prefer-destructuring` (103 tests) +- `prefer-numeric-literals` (87 tests) +- `prefer-promise-reject-errors` (65 tests) +- `prefer-reflect` (49 tests) +- `prefer-rest-params` (11 tests) +- `prefer-spread` (33 tests) +- `prefer-template` (78 tests) +- `preserve-caught-error` (49 tests) +- `quote-props` (104 tests) +- `quotes` (113 tests) +- `require-await` (38 tests) +- `require-yield` (15 tests) +- `rest-spread-spacing` (82 tests) +- `semi-spacing` (62 tests) +- `semi-style` (81 tests) +- `sort-imports` (61 tests) +- `sort-keys` (215 tests) +- `sort-vars` (61 tests) +- `space-in-parens` (139 tests) +- `space-unary-ops` (112 tests) +- `spaced-comment` (99 tests) +- `switch-colon-spacing` (46 tests) +- `template-curly-spacing` (57 tests) +- `template-tag-spacing` (63 tests) +- `use-isnan` (214 tests) +- `vars-on-top` (61 tests) +- `wrap-iife` (128 tests) +- `wrap-regex` (8 tests) +- `yield-star-spacing` (48 tests) +- `yoda` (156 tests) + +## Rules with Failures + +### `accessor-pairs` + +Pass: 277 / 302 (91.7%) +Fail: 25 / 302 (8.3%) + +#### accessor-pairs > invalid + +```js +class A { get a() {} static set a(foo) {} } +``` + +```json +{ + "options": [ + { + "setWithoutGet": true, + "getWithoutSet": true, + "enforceForClassMembers": true + } + ], + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "message": "Setter is not present for class getter 'a'.", + "column": 11 + }, + { + "message": "Getter is not present for class static setter 'a'.", + "column": 22 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Expected values to be strictly equal: ++ actual - expected + ++ "Getter is not present for class static setter 'a'." +- "Setter is not present for class getter 'a'." + + at assertMessageMatches (apps/oxlint/dist/index.js) + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### accessor-pairs > invalid + +```js +class A { set [a](foo) {} static get [a]() {} } +``` + +```json +{ + "options": [ + { + "setWithoutGet": true, + "getWithoutSet": true, + "enforceForClassMembers": true + } + ], + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "message": "Getter is not present for class setter.", + "column": 11 + }, + { + "message": "Setter is not present for class static getter.", + "column": 27 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Expected values to be strictly equal: ++ actual - expected + ++ 'Setter is not present for class static getter.' +- 'Getter is not present for class setter.' + + at assertMessageMatches (apps/oxlint/dist/index.js) + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### accessor-pairs > invalid + +```js +class A { static get a() {} set b(foo) {} static set c(bar) {} get d() {} } +``` + +```json +{ + "options": [ + { + "setWithoutGet": true, + "getWithoutSet": true, + "enforceForClassMembers": true + } + ], + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "message": "Setter is not present for class static getter 'a'.", + "column": 11 + }, + { + "message": "Getter is not present for class setter 'b'.", + "column": 29 + }, + { + "message": "Getter is not present for class static setter 'c'.", + "column": 43 + }, + { + "message": "Setter is not present for class getter 'd'.", + "column": 64 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Expected values to be strictly equal: ++ actual - expected + ++ "Getter is not present for class static setter 'c'." +- "Getter is not present for class setter 'b'." + ^ + + at assertMessageMatches (apps/oxlint/dist/index.js) + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### accessor-pairs > invalid + +```js +class A { get [v1](){} static set i1(foo){} static set v2(bar){} get [i2](){} static get i3(){} set [v1](baz){} static get v2(){} set i4(quux){} } +``` + +```json +{ + "options": [ + { + "setWithoutGet": true, + "getWithoutSet": true, + "enforceForClassMembers": true + } + ], + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "message": "Getter is not present for class static setter 'i1'.", + "column": 24 + }, + { + "message": "Setter is not present for class getter.", + "column": 66 + }, + { + "message": "Setter is not present for class static getter 'i3'.", + "column": 79 + }, + { + "message": "Getter is not present for class setter 'i4'.", + "column": 131 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Expected values to be strictly equal: ++ actual - expected + ++ "Setter is not present for class static getter 'i3'." +- 'Setter is not present for class getter.' + + at assertMessageMatches (apps/oxlint/dist/index.js) + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### accessor-pairs > valid + +```js +interface I { get prop(): any } +``` + +```json +{} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### accessor-pairs > valid + +```js +type T = { set prop(value: any): void } +``` + +```json +{} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### accessor-pairs > valid + +```js +interface I { get prop(): any, set prop(value: any): void } +``` + +```json +{ + "options": [ + { + "enforceForTSTypes": true + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### accessor-pairs > valid + +```js +type T = { get prop(): any, set prop(value: any): void } +``` + +```json +{ + "options": [ + { + "enforceForTSTypes": true + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### accessor-pairs > valid + +```js +interface I { get prop(): any, between: true, set prop(value: any): void } +``` + +```json +{ + "options": [ + { + "enforceForTSTypes": true + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### accessor-pairs > valid + +```js +interface I { set prop(value: any): void, get prop(): any } +``` + +```json +{ + "options": [ + { + "enforceForTSTypes": true + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### accessor-pairs > valid + +```js +interface I { set prop(value: any): void, get 'prop'(): any } +``` + +```json +{ + "options": [ + { + "enforceForTSTypes": true + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### accessor-pairs > valid + +```js +interface I {} +``` + +```json +{ + "options": [ + { + "enforceForTSTypes": true + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### accessor-pairs > valid + +```js +interface I { (...args): void } +``` + +```json +{ + "options": [ + { + "enforceForTSTypes": true + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### accessor-pairs > valid + +```js +interface I { new(...args): unknown } +``` + +```json +{ + "options": [ + { + "enforceForTSTypes": true + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### accessor-pairs > valid + +```js +interface I { prop: () => any } +``` + +```json +{ + "options": [ + { + "enforceForTSTypes": true + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### accessor-pairs > valid + +```js +interface I { method(): any } +``` + +```json +{ + "options": [ + { + "enforceForTSTypes": true + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### accessor-pairs > valid + +```js +type T = { get prop(): any } +``` + +```json +{ + "options": [ + { + "enforceForTSTypes": true + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### accessor-pairs > invalid + +```js +interface I { set prop(value: any): any } +``` + +```json +{ + "options": [ + { + "enforceForTSTypes": true + } + ], + "errors": [ + { + "message": "Getter is not present for type setter 'prop'." + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### accessor-pairs > invalid + +```js +interface I { set prop(value: any): any, get other(): any } +``` + +```json +{ + "options": [ + { + "enforceForTSTypes": true + } + ], + "errors": [ + { + "message": "Getter is not present for type setter 'prop'." + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### accessor-pairs > invalid + +```js +interface I { set prop(value: any): any, prop(): any } +``` + +```json +{ + "options": [ + { + "enforceForTSTypes": true + } + ], + "errors": [ + { + "message": "Getter is not present for type setter 'prop'." + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### accessor-pairs > invalid + +```js +interface I { set [prop](value: any): any } +``` + +```json +{ + "options": [ + { + "enforceForTSTypes": true + } + ], + "errors": [ + { + "message": "Getter is not present for type setter 'null'." + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### accessor-pairs > invalid + +```js +interface I { get prop(): any } interface J { set prop(value: any): void } +``` + +```json +{ + "options": [ + { + "enforceForTSTypes": true + } + ], + "errors": [ + { + "message": "Getter is not present for type setter 'prop'." + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### accessor-pairs > invalid + +```js +type T = { set prop(value: any): any } +``` + +```json +{ + "options": [ + { + "enforceForTSTypes": true + } + ], + "errors": [ + { + "message": "Getter is not present for type setter 'prop'." + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### accessor-pairs > invalid + +```js +function fn(): { set prop(value: any): any } +``` + +```json +{ + "options": [ + { + "enforceForTSTypes": true + } + ], + "errors": [ + { + "message": "Getter is not present for type setter 'prop'." + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### accessor-pairs > invalid + +```js +type T = { get prop(): any } +``` + +```json +{ + "options": [ + { + "enforceForTSTypes": true, + "getWithoutSet": true + } + ], + "errors": [ + { + "message": "Setter is not present for type getter 'prop'." + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +### `array-bracket-newline` + +Pass: 207 / 209 (99.0%) +Fail: 2 / 209 (1.0%) + +#### array-bracket-newline > invalid + +```js +var foo = [[2, +3]] +``` + +```json +{ + "output": "var foo = [\n[\n2,\n3\n]\n]", + "errors": [ + { + "line": 1, + "column": 11, + "messageId": "missingOpeningLinebreak", + "endLine": 1, + "endColumn": 12 + }, + { + "line": 1, + "column": 12, + "messageId": "missingOpeningLinebreak", + "endLine": 1, + "endColumn": 13 + }, + { + "line": 2, + "column": 2, + "messageId": "missingClosingLinebreak", + "endLine": 2, + "endColumn": 3 + }, + { + "line": 2, + "column": 3, + "messageId": "missingClosingLinebreak", + "endLine": 2, + "endColumn": 4 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: messageId 'missingClosingLinebreak' does not match expected messageId 'missingOpeningLinebreak' ++ actual - expected + ++ 'missingClosingLinebreak' +- 'missingOpeningLinebreak' + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### array-bracket-newline > invalid + +```js +var foo = [[1,2]] +``` + +```json +{ + "output": "var foo = [\n[\n1,2\n]\n]", + "options": [ + "always" + ], + "errors": [ + { + "line": 1, + "column": 11, + "messageId": "missingOpeningLinebreak", + "endLine": 1, + "endColumn": 12 + }, + { + "line": 1, + "column": 12, + "messageId": "missingOpeningLinebreak", + "endLine": 1, + "endColumn": 13 + }, + { + "line": 1, + "column": 16, + "messageId": "missingClosingLinebreak", + "endLine": 1, + "endColumn": 17 + }, + { + "line": 1, + "column": 17, + "messageId": "missingClosingLinebreak", + "endLine": 1, + "endColumn": 18 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: messageId 'missingClosingLinebreak' does not match expected messageId 'missingOpeningLinebreak' ++ actual - expected + ++ 'missingClosingLinebreak' +- 'missingOpeningLinebreak' + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +### `array-bracket-spacing` + +Pass: 137 / 143 (95.8%) +Fail: 6 / 143 (4.2%) + +#### array-bracket-spacing > valid + +```js +([ a, b ]: Array) => {} +``` + +```json +{ + "options": [ + "always" + ], + "languageOptions": { + "ecmaVersion": 6, + "parser": {} + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### array-bracket-spacing > valid + +```js +([a, b]: Array< any >) => {} +``` + +```json +{ + "options": [ + "never" + ], + "languageOptions": { + "ecmaVersion": 6, + "parser": {} + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### array-bracket-spacing > invalid + +```js +var arr = [[1 ], 2, 3, 4 ]; +``` + +```json +{ + "output": "var arr = [[1], 2, 3, 4];", + "options": [ + "never" + ], + "errors": [ + { + "messageId": "unexpectedSpaceBefore", + "data": { + "tokenValue": "]" + }, + "line": 1, + "column": 14, + "endLine": 1, + "endColumn": 15 + }, + { + "messageId": "unexpectedSpaceBefore", + "data": { + "tokenValue": "]" + }, + "line": 1, + "column": 25, + "endLine": 1, + "endColumn": 26 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Actual error location does not match expected error location. ++ actual - expected + + { ++ column: 25, ++ endColumn: 26, +- column: 14, +- endColumn: 15, + endLine: 1, + line: 1 + } + + at assertInvalidTestCaseLocationIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### array-bracket-spacing > invalid + +```js +([ a, b ]: Array) => {} +``` + +```json +{ + "output": "([a, b]: Array) => {}", + "options": [ + "never" + ], + "languageOptions": { + "ecmaVersion": 6, + "parser": {} + }, + "errors": [ + { + "messageId": "unexpectedSpaceAfter", + "data": { + "tokenValue": "[" + }, + "line": 1, + "column": 3, + "endLine": 1, + "endColumn": 4 + }, + { + "messageId": "unexpectedSpaceBefore", + "data": { + "tokenValue": "]" + }, + "line": 1, + "column": 8, + "endLine": 1, + "endColumn": 9 + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### array-bracket-spacing > invalid + +```js +([a, b]: Array< any >) => {} +``` + +```json +{ + "output": "([ a, b ]: Array< any >) => {}", + "options": [ + "always" + ], + "languageOptions": { + "parser": {}, + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "missingSpaceAfter", + "data": { + "tokenValue": "[" + }, + "line": 1, + "column": 2, + "endLine": 1, + "endColumn": 3 + }, + { + "messageId": "missingSpaceBefore", + "data": { + "tokenValue": "]" + }, + "line": 1, + "column": 7, + "endLine": 1, + "endColumn": 8 + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### array-bracket-spacing > invalid + +```js +var arr = [ 1, [ 2, 3 ] ]; +``` + +```json +{ + "output": "var arr = [1, [2, 3]];", + "options": [ + "never" + ], + "errors": [ + { + "messageId": "unexpectedSpaceAfter", + "data": { + "tokenValue": "[" + }, + "line": 1, + "column": 12, + "endLine": 1, + "endColumn": 14 + }, + { + "messageId": "unexpectedSpaceAfter", + "data": { + "tokenValue": "[" + }, + "line": 1, + "column": 18, + "endLine": 1, + "endColumn": 19 + }, + { + "messageId": "unexpectedSpaceBefore", + "data": { + "tokenValue": "]" + }, + "line": 1, + "column": 23, + "endLine": 1, + "endColumn": 25 + }, + { + "messageId": "unexpectedSpaceBefore", + "data": { + "tokenValue": "]" + }, + "line": 1, + "column": 26, + "endLine": 1, + "endColumn": 27 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: messageId 'unexpectedSpaceBefore' does not match expected messageId 'unexpectedSpaceAfter' ++ actual - expected + ++ 'unexpectedSpaceBefore' +- 'unexpectedSpaceAfter' + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +### `array-callback-return` + +Pass: 90 / 216 (41.7%) +Fail: 126 / 216 (58.3%) + +#### array-callback-return > invalid + +```js +Array.from(x, function() {}) +``` + +```json +{ + "errors": [ + { + "messageId": "expectedInside", + "data": { + "name": "function", + "arrayMethodName": "Array.from" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### array-callback-return > invalid + +```js +Array.from(x, function foo() {}) +``` + +```json +{ + "errors": [ + { + "messageId": "expectedInside", + "data": { + "name": "function 'foo'", + "arrayMethodName": "Array.from" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### array-callback-return > invalid + +```js +Int32Array.from(x, function() {}) +``` + +```json +{ + "errors": [ + { + "messageId": "expectedInside", + "data": { + "name": "function", + "arrayMethodName": "Array.from" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### array-callback-return > invalid + +```js +Int32Array.from(x, function foo() {}) +``` + +```json +{ + "errors": [ + { + "messageId": "expectedInside", + "data": { + "name": "function 'foo'", + "arrayMethodName": "Array.from" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### array-callback-return > invalid + +```js +foo.every(function() {}) +``` + +```json +{ + "errors": [ + { + "messageId": "expectedInside", + "data": { + "name": "function", + "arrayMethodName": "Array.prototype.every" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### array-callback-return > invalid + +```js +foo.every(function foo() {}) +``` + +```json +{ + "errors": [ + { + "messageId": "expectedInside", + "data": { + "name": "function 'foo'", + "arrayMethodName": "Array.prototype.every" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### array-callback-return > invalid + +```js +foo.filter(function() {}) +``` + +```json +{ + "errors": [ + { + "messageId": "expectedInside", + "data": { + "name": "function", + "arrayMethodName": "Array.prototype.filter" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### array-callback-return > invalid + +```js +foo.filter(function foo() {}) +``` + +```json +{ + "errors": [ + { + "messageId": "expectedInside", + "data": { + "name": "function 'foo'", + "arrayMethodName": "Array.prototype.filter" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### array-callback-return > invalid + +```js +foo.find(function() {}) +``` + +```json +{ + "errors": [ + { + "messageId": "expectedInside", + "data": { + "name": "function", + "arrayMethodName": "Array.prototype.find" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### array-callback-return > invalid + +```js +foo.find(function foo() {}) +``` + +```json +{ + "errors": [ + { + "messageId": "expectedInside", + "data": { + "name": "function 'foo'", + "arrayMethodName": "Array.prototype.find" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### array-callback-return > invalid + +```js +foo.findLast(function() {}) +``` + +```json +{ + "errors": [ + { + "messageId": "expectedInside", + "data": { + "name": "function", + "arrayMethodName": "Array.prototype.findLast" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### array-callback-return > invalid + +```js +foo.findLast(function foo() {}) +``` + +```json +{ + "errors": [ + { + "messageId": "expectedInside", + "data": { + "name": "function 'foo'", + "arrayMethodName": "Array.prototype.findLast" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### array-callback-return > invalid + +```js +foo.findIndex(function() {}) +``` + +```json +{ + "errors": [ + { + "messageId": "expectedInside", + "data": { + "name": "function", + "arrayMethodName": "Array.prototype.findIndex" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### array-callback-return > invalid + +```js +foo.findIndex(function foo() {}) +``` + +```json +{ + "errors": [ + { + "messageId": "expectedInside", + "data": { + "name": "function 'foo'", + "arrayMethodName": "Array.prototype.findIndex" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### array-callback-return > invalid + +```js +foo.findLastIndex(function() {}) +``` + +```json +{ + "errors": [ + { + "messageId": "expectedInside", + "data": { + "name": "function", + "arrayMethodName": "Array.prototype.findLastIndex" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### array-callback-return > invalid + +```js +foo.findLastIndex(function foo() {}) +``` + +```json +{ + "errors": [ + { + "messageId": "expectedInside", + "data": { + "name": "function 'foo'", + "arrayMethodName": "Array.prototype.findLastIndex" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### array-callback-return > invalid + +```js +foo.flatMap(function() {}) +``` + +```json +{ + "errors": [ + { + "messageId": "expectedInside", + "data": { + "name": "function", + "arrayMethodName": "Array.prototype.flatMap" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### array-callback-return > invalid + +```js +foo.flatMap(function foo() {}) +``` + +```json +{ + "errors": [ + { + "messageId": "expectedInside", + "data": { + "name": "function 'foo'", + "arrayMethodName": "Array.prototype.flatMap" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### array-callback-return > invalid + +```js +foo.map(function() {}) +``` + +```json +{ + "errors": [ + { + "messageId": "expectedInside", + "data": { + "name": "function", + "arrayMethodName": "Array.prototype.map" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### array-callback-return > invalid + +```js +foo.map(function foo() {}) +``` + +```json +{ + "errors": [ + { + "messageId": "expectedInside", + "data": { + "name": "function 'foo'", + "arrayMethodName": "Array.prototype.map" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### array-callback-return > invalid + +```js +foo.reduce(function() {}) +``` + +```json +{ + "errors": [ + { + "messageId": "expectedInside", + "data": { + "name": "function", + "arrayMethodName": "Array.prototype.reduce" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### array-callback-return > invalid + +```js +foo.reduce(function foo() {}) +``` + +```json +{ + "errors": [ + { + "messageId": "expectedInside", + "data": { + "name": "function 'foo'", + "arrayMethodName": "Array.prototype.reduce" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### array-callback-return > invalid + +```js +foo.reduceRight(function() {}) +``` + +```json +{ + "errors": [ + { + "messageId": "expectedInside", + "data": { + "name": "function", + "arrayMethodName": "Array.prototype.reduceRight" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### array-callback-return > invalid + +```js +foo.reduceRight(function foo() {}) +``` + +```json +{ + "errors": [ + { + "messageId": "expectedInside", + "data": { + "name": "function 'foo'", + "arrayMethodName": "Array.prototype.reduceRight" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### array-callback-return > invalid + +```js +foo.some(function() {}) +``` + +```json +{ + "errors": [ + { + "messageId": "expectedInside", + "data": { + "name": "function", + "arrayMethodName": "Array.prototype.some" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### array-callback-return > invalid + +```js +foo.some(function foo() {}) +``` + +```json +{ + "errors": [ + { + "messageId": "expectedInside", + "data": { + "name": "function 'foo'", + "arrayMethodName": "Array.prototype.some" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### array-callback-return > invalid + +```js +foo.sort(function() {}) +``` + +```json +{ + "errors": [ + { + "messageId": "expectedInside", + "data": { + "name": "function", + "arrayMethodName": "Array.prototype.sort" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### array-callback-return > invalid + +```js +foo.sort(function foo() {}) +``` + +```json +{ + "errors": [ + { + "messageId": "expectedInside", + "data": { + "name": "function 'foo'", + "arrayMethodName": "Array.prototype.sort" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### array-callback-return > invalid + +```js +foo.toSorted(function() {}) +``` + +```json +{ + "errors": [ + { + "messageId": "expectedInside", + "data": { + "name": "function", + "arrayMethodName": "Array.prototype.toSorted" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### array-callback-return > invalid + +```js +foo.toSorted(function foo() {}) +``` + +```json +{ + "errors": [ + { + "messageId": "expectedInside", + "data": { + "name": "function 'foo'", + "arrayMethodName": "Array.prototype.toSorted" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### array-callback-return > invalid + +```js +foo.bar.baz.every(function() {}) +``` + +```json +{ + "errors": [ + { + "messageId": "expectedInside", + "data": { + "name": "function", + "arrayMethodName": "Array.prototype.every" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### array-callback-return > invalid + +```js +foo.bar.baz.every(function foo() {}) +``` + +```json +{ + "errors": [ + { + "messageId": "expectedInside", + "data": { + "name": "function 'foo'", + "arrayMethodName": "Array.prototype.every" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### array-callback-return > invalid + +```js +foo["every"](function() {}) +``` + +```json +{ + "errors": [ + { + "messageId": "expectedInside", + "data": { + "name": "function", + "arrayMethodName": "Array.prototype.every" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### array-callback-return > invalid + +```js +foo["every"](function foo() {}) +``` + +```json +{ + "errors": [ + { + "messageId": "expectedInside", + "data": { + "name": "function 'foo'", + "arrayMethodName": "Array.prototype.every" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### array-callback-return > invalid + +```js +foo[`every`](function() {}) +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "expectedInside", + "data": { + "name": "function", + "arrayMethodName": "Array.prototype.every" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### array-callback-return > invalid + +```js +foo[`every`](function foo() {}) +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "expectedInside", + "data": { + "name": "function 'foo'", + "arrayMethodName": "Array.prototype.every" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### array-callback-return > invalid + +```js +foo.every(() => {}) +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "message": "Array.prototype.every() expects a return value from arrow function.", + "column": 14 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### array-callback-return > invalid + +```js +foo.every(function() { if (a) return true; }) +``` + +```json +{ + "errors": [ + { + "message": "Array.prototype.every() expects a value to be returned at the end of function.", + "column": 11 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### array-callback-return > invalid + +```js +foo.every(function cb() { if (a) return true; }) +``` + +```json +{ + "errors": [ + { + "message": "Array.prototype.every() expects a value to be returned at the end of function 'cb'.", + "column": 11 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### array-callback-return > invalid + +```js +foo.every(function() { switch (a) { case 0: break; default: return true; } }) +``` + +```json +{ + "errors": [ + { + "messageId": "expectedAtEnd", + "data": { + "name": "function", + "arrayMethodName": "Array.prototype.every" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### array-callback-return > invalid + +```js +foo.every(function foo() { switch (a) { case 0: break; default: return true; } }) +``` + +```json +{ + "errors": [ + { + "messageId": "expectedAtEnd", + "data": { + "name": "function 'foo'", + "arrayMethodName": "Array.prototype.every" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### array-callback-return > invalid + +```js +foo.every(function() { try { bar(); } catch (err) { return true; } }) +``` + +```json +{ + "errors": [ + { + "messageId": "expectedAtEnd", + "data": { + "name": "function", + "arrayMethodName": "Array.prototype.every" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### array-callback-return > invalid + +```js +foo.every(function foo() { try { bar(); } catch (err) { return true; } }) +``` + +```json +{ + "errors": [ + { + "messageId": "expectedAtEnd", + "data": { + "name": "function 'foo'", + "arrayMethodName": "Array.prototype.every" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### array-callback-return > invalid + +```js +foo.every(function() { return; }) +``` + +```json +{ + "errors": [ + { + "messageId": "expectedReturnValue", + "data": { + "name": "function", + "arrayMethodName": "Array.prototype.every" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### array-callback-return > invalid + +```js +foo.every(function foo() { return; }) +``` + +```json +{ + "errors": [ + { + "messageId": "expectedReturnValue", + "data": { + "name": "function 'foo'", + "arrayMethodName": "Array.prototype.every" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### array-callback-return > invalid + +```js +foo.every(function() { if (a) return; }) +``` + +```json +{ + "errors": [ + "Array.prototype.every() expects a value to be returned at the end of function.", + { + "messageId": "expectedReturnValue", + "data": { + "name": "function", + "arrayMethodName": "Array.prototype.every" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 2 errors but had 0: [] + +0 !== 2 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### array-callback-return > invalid + +```js +foo.every(function foo() { if (a) return; }) +``` + +```json +{ + "errors": [ + "Array.prototype.every() expects a value to be returned at the end of function 'foo'.", + { + "messageId": "expectedReturnValue", + "data": { + "name": "function 'foo'", + "arrayMethodName": "Array.prototype.every" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 2 errors but had 0: [] + +0 !== 2 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### array-callback-return > invalid + +```js +foo.every(function() { if (a) return; else return; }) +``` + +```json +{ + "errors": [ + { + "messageId": "expectedReturnValue", + "data": { + "name": "function", + "arrayMethodName": "Array.prototype.every" + } + }, + { + "messageId": "expectedReturnValue", + "data": { + "name": "function", + "arrayMethodName": "Array.prototype.every" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 2 errors but had 0: [] + +0 !== 2 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### array-callback-return > invalid + +```js +foo.every(function foo() { if (a) return; else return; }) +``` + +```json +{ + "errors": [ + { + "messageId": "expectedReturnValue", + "data": { + "name": "function 'foo'", + "arrayMethodName": "Array.prototype.every" + } + }, + { + "messageId": "expectedReturnValue", + "data": { + "name": "function 'foo'", + "arrayMethodName": "Array.prototype.every" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 2 errors but had 0: [] + +0 !== 2 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### array-callback-return > invalid + +```js +foo.every(cb || function() {}) +``` + +```json +{ + "errors": [ + "Array.prototype.every() expects a return value from function." + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### array-callback-return > invalid + +```js +foo.every(cb || function foo() {}) +``` + +```json +{ + "errors": [ + "Array.prototype.every() expects a return value from function 'foo'." + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### array-callback-return > invalid + +```js +foo.every(a ? function() {} : function() {}) +``` + +```json +{ + "errors": [ + "Array.prototype.every() expects a return value from function.", + "Array.prototype.every() expects a return value from function." + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 2 errors but had 0: [] + +0 !== 2 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### array-callback-return > invalid + +```js +foo.every(a ? function foo() {} : function bar() {}) +``` + +```json +{ + "errors": [ + "Array.prototype.every() expects a return value from function 'foo'.", + "Array.prototype.every() expects a return value from function 'bar'." + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 2 errors but had 0: [] + +0 !== 2 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### array-callback-return > invalid + +```js +foo.every(function(){ return function() {}; }()) +``` + +```json +{ + "errors": [ + { + "message": "Array.prototype.every() expects a return value from function.", + "column": 30 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### array-callback-return > invalid + +```js +foo.every(function(){ return function foo() {}; }()) +``` + +```json +{ + "errors": [ + { + "message": "Array.prototype.every() expects a return value from function 'foo'.", + "column": 30 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### array-callback-return > invalid + +```js +foo.every(() => {}) +``` + +```json +{ + "options": [ + { + "allowImplicit": false + } + ], + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "message": "Array.prototype.every() expects a return value from arrow function." + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### array-callback-return > invalid + +```js +foo.every(() => {}) +``` + +```json +{ + "options": [ + { + "allowImplicit": true + } + ], + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "message": "Array.prototype.every() expects a return value from arrow function." + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### array-callback-return > invalid + +```js +Array.from(x, function() {}) +``` + +```json +{ + "options": [ + { + "allowImplicit": true + } + ], + "errors": [ + { + "messageId": "expectedInside", + "data": { + "name": "function", + "arrayMethodName": "Array.from" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### array-callback-return > invalid + +```js +foo.every(function() {}) +``` + +```json +{ + "options": [ + { + "allowImplicit": true + } + ], + "errors": [ + { + "messageId": "expectedInside", + "data": { + "name": "function", + "arrayMethodName": "Array.prototype.every" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### array-callback-return > invalid + +```js +foo.filter(function foo() {}) +``` + +```json +{ + "options": [ + { + "allowImplicit": true + } + ], + "errors": [ + { + "messageId": "expectedInside", + "data": { + "name": "function 'foo'", + "arrayMethodName": "Array.prototype.filter" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### array-callback-return > invalid + +```js +foo.find(function foo() {}) +``` + +```json +{ + "options": [ + { + "allowImplicit": true + } + ], + "errors": [ + { + "messageId": "expectedInside", + "data": { + "name": "function 'foo'", + "arrayMethodName": "Array.prototype.find" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### array-callback-return > invalid + +```js +foo.map(function() {}) +``` + +```json +{ + "options": [ + { + "allowImplicit": true + } + ], + "errors": [ + { + "messageId": "expectedInside", + "data": { + "name": "function", + "arrayMethodName": "Array.prototype.map" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### array-callback-return > invalid + +```js +foo.reduce(function() {}) +``` + +```json +{ + "options": [ + { + "allowImplicit": true + } + ], + "errors": [ + { + "messageId": "expectedInside", + "data": { + "name": "function", + "arrayMethodName": "Array.prototype.reduce" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### array-callback-return > invalid + +```js +foo.reduceRight(function() {}) +``` + +```json +{ + "options": [ + { + "allowImplicit": true + } + ], + "errors": [ + { + "messageId": "expectedInside", + "data": { + "name": "function", + "arrayMethodName": "Array.prototype.reduceRight" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### array-callback-return > invalid + +```js +foo.bar.baz.every(function foo() {}) +``` + +```json +{ + "options": [ + { + "allowImplicit": true + } + ], + "errors": [ + { + "messageId": "expectedInside", + "data": { + "name": "function 'foo'", + "arrayMethodName": "Array.prototype.every" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### array-callback-return > invalid + +```js +foo.every(cb || function() {}) +``` + +```json +{ + "options": [ + { + "allowImplicit": true + } + ], + "errors": [ + "Array.prototype.every() expects a return value from function." + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### array-callback-return > invalid + +```js +["foo","bar"].sort(function foo() {}) +``` + +```json +{ + "options": [ + { + "allowImplicit": true + } + ], + "errors": [ + { + "messageId": "expectedInside", + "data": { + "name": "function 'foo'", + "arrayMethodName": "Array.prototype.sort" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### array-callback-return > invalid + +```js +["foo","bar"].toSorted(function foo() {}) +``` + +```json +{ + "options": [ + { + "allowImplicit": true + } + ], + "errors": [ + { + "messageId": "expectedInside", + "data": { + "name": "function 'foo'", + "arrayMethodName": "Array.prototype.toSorted" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### array-callback-return > invalid + +```js +foo.forEach(x => x) +``` + +```json +{ + "options": [ + { + "allowImplicit": true, + "checkForEach": true + } + ], + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "expectedNoReturnValue", + "data": { + "name": "arrow function", + "arrayMethodName": "Array.prototype.forEach" + }, + "suggestions": [ + { + "messageId": "wrapBraces", + "output": "foo.forEach(x => {x})" + } + ] + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### array-callback-return > invalid + +```js +foo.forEach(function(x) { if (a == b) {return x;}}) +``` + +```json +{ + "options": [ + { + "allowImplicit": true, + "checkForEach": true + } + ], + "errors": [ + { + "messageId": "expectedNoReturnValue", + "data": { + "name": "function", + "arrayMethodName": "Array.prototype.forEach" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### array-callback-return > invalid + +```js +foo.forEach(function bar(x) { return x;}) +``` + +```json +{ + "options": [ + { + "allowImplicit": true, + "checkForEach": true + } + ], + "errors": [ + { + "messageId": "expectedNoReturnValue", + "data": { + "name": "function 'bar'", + "arrayMethodName": "Array.prototype.forEach" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### array-callback-return > invalid + +```js +foo.forEach(x => x) +``` + +```json +{ + "options": [ + { + "checkForEach": true + } + ], + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "expectedNoReturnValue", + "data": { + "name": "arrow function", + "arrayMethodName": "Array.prototype.forEach" + }, + "suggestions": [ + { + "output": "foo.forEach(x => {x})", + "messageId": "wrapBraces" + } + ] + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### array-callback-return > invalid + +```js +foo.forEach(x => (x)) +``` + +```json +{ + "options": [ + { + "checkForEach": true + } + ], + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "expectedNoReturnValue", + "data": { + "name": "arrow function", + "arrayMethodName": "Array.prototype.forEach" + }, + "suggestions": [ + { + "output": "foo.forEach(x => {(x)})", + "messageId": "wrapBraces" + } + ] + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### array-callback-return > invalid + +```js +foo.forEach(val => y += val) +``` + +```json +{ + "options": [ + { + "checkForEach": true + } + ], + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "expectedNoReturnValue", + "data": { + "name": "arrow function", + "arrayMethodName": "Array.prototype.forEach" + }, + "suggestions": [ + { + "output": "foo.forEach(val => {y += val})", + "messageId": "wrapBraces" + } + ] + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### array-callback-return > invalid + +```js +["foo","bar"].forEach(x => ++x) +``` + +```json +{ + "options": [ + { + "checkForEach": true + } + ], + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "expectedNoReturnValue", + "data": { + "name": "arrow function", + "arrayMethodName": "Array.prototype.forEach" + }, + "suggestions": [ + { + "output": "[\"foo\",\"bar\"].forEach(x => {++x})", + "messageId": "wrapBraces" + } + ] + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### array-callback-return > invalid + +```js +foo.bar().forEach(x => x === y) +``` + +```json +{ + "options": [ + { + "checkForEach": true + } + ], + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "expectedNoReturnValue", + "data": { + "name": "arrow function", + "arrayMethodName": "Array.prototype.forEach" + }, + "suggestions": [ + { + "output": "foo.bar().forEach(x => {x === y})", + "messageId": "wrapBraces" + } + ] + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### array-callback-return > invalid + +```js +foo.forEach(function() {return function() { if (a == b) { return a; }}}()) +``` + +```json +{ + "options": [ + { + "checkForEach": true + } + ], + "errors": [ + { + "messageId": "expectedNoReturnValue", + "data": { + "name": "function", + "arrayMethodName": "Array.prototype.forEach" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### array-callback-return > invalid + +```js +foo.forEach(function(x) { if (a == b) {return x;}}) +``` + +```json +{ + "options": [ + { + "checkForEach": true + } + ], + "errors": [ + { + "messageId": "expectedNoReturnValue", + "data": { + "name": "function", + "arrayMethodName": "Array.prototype.forEach" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### array-callback-return > invalid + +```js +foo.forEach(function(x) { if (a == b) {return undefined;}}) +``` + +```json +{ + "options": [ + { + "checkForEach": true + } + ], + "errors": [ + { + "messageId": "expectedNoReturnValue", + "data": { + "name": "function", + "arrayMethodName": "Array.prototype.forEach" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### array-callback-return > invalid + +```js +foo.forEach(function bar(x) { return x;}) +``` + +```json +{ + "options": [ + { + "checkForEach": true + } + ], + "errors": [ + { + "messageId": "expectedNoReturnValue", + "data": { + "name": "function 'bar'", + "arrayMethodName": "Array.prototype.forEach" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### array-callback-return > invalid + +```js +foo.bar().forEach(function bar(x) { return x;}) +``` + +```json +{ + "options": [ + { + "checkForEach": true + } + ], + "errors": [ + { + "messageId": "expectedNoReturnValue", + "data": { + "name": "function 'bar'", + "arrayMethodName": "Array.prototype.forEach" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### array-callback-return > invalid + +```js +["foo","bar"].forEach(function bar(x) { return x;}) +``` + +```json +{ + "options": [ + { + "checkForEach": true + } + ], + "errors": [ + { + "messageId": "expectedNoReturnValue", + "data": { + "name": "function 'bar'", + "arrayMethodName": "Array.prototype.forEach" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### array-callback-return > invalid + +```js +foo.forEach((x) => { return x;}) +``` + +```json +{ + "options": [ + { + "checkForEach": true + } + ], + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "expectedNoReturnValue", + "data": { + "name": "arrow function", + "arrayMethodName": "Array.prototype.forEach" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### array-callback-return > invalid + +```js +Array.from(x, function() {}) +``` + +```json +{ + "options": [ + { + "checkForEach": true + } + ], + "errors": [ + { + "messageId": "expectedInside", + "data": { + "name": "function", + "arrayMethodName": "Array.from" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### array-callback-return > invalid + +```js +foo.every(function() {}) +``` + +```json +{ + "options": [ + { + "checkForEach": true + } + ], + "errors": [ + { + "messageId": "expectedInside", + "data": { + "name": "function", + "arrayMethodName": "Array.prototype.every" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### array-callback-return > invalid + +```js +foo.filter(function foo() {}) +``` + +```json +{ + "options": [ + { + "checkForEach": true + } + ], + "errors": [ + { + "messageId": "expectedInside", + "data": { + "name": "function 'foo'", + "arrayMethodName": "Array.prototype.filter" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### array-callback-return > invalid + +```js +foo.filter(function foo() { return; }) +``` + +```json +{ + "options": [ + { + "checkForEach": true + } + ], + "errors": [ + { + "messageId": "expectedReturnValue", + "data": { + "name": "function 'foo'", + "arrayMethodName": "Array.prototype.filter" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### array-callback-return > invalid + +```js +foo.every(cb || function() {}) +``` + +```json +{ + "options": [ + { + "checkForEach": true + } + ], + "errors": [ + "Array.prototype.every() expects a return value from function." + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### array-callback-return > invalid + +```js +foo.forEach((x) => void x) +``` + +```json +{ + "options": [ + { + "checkForEach": true + } + ], + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "expectedNoReturnValue", + "data": { + "name": "arrow function", + "arrayMethodName": "Array.prototype.forEach" + }, + "suggestions": [ + { + "messageId": "wrapBraces", + "output": "foo.forEach((x) => {void x})" + } + ] + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### array-callback-return > invalid + +```js +foo.forEach((x) => void bar(x)) +``` + +```json +{ + "options": [ + { + "checkForEach": true + } + ], + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "expectedNoReturnValue", + "data": { + "name": "arrow function", + "arrayMethodName": "Array.prototype.forEach" + }, + "suggestions": [ + { + "messageId": "wrapBraces", + "output": "foo.forEach((x) => {void bar(x)})" + } + ] + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### array-callback-return > invalid + +```js +foo.forEach((x) => { return void bar(x); }) +``` + +```json +{ + "options": [ + { + "checkForEach": true + } + ], + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "expectedNoReturnValue", + "data": { + "name": "arrow function", + "arrayMethodName": "Array.prototype.forEach" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### array-callback-return > invalid + +```js +foo.forEach((x) => { if (a === b) { return void a; } bar(x) }) +``` + +```json +{ + "options": [ + { + "checkForEach": true + } + ], + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "expectedNoReturnValue", + "data": { + "name": "arrow function", + "arrayMethodName": "Array.prototype.forEach" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### array-callback-return > invalid + +```js +foo.forEach(x => x) +``` + +```json +{ + "options": [ + { + "checkForEach": true, + "allowVoid": true + } + ], + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "expectedNoReturnValue", + "data": { + "name": "arrow function", + "arrayMethodName": "Array.prototype.forEach" + }, + "suggestions": [ + { + "output": "foo.forEach(x => {x})", + "messageId": "wrapBraces" + }, + { + "output": "foo.forEach(x => void x)", + "messageId": "prependVoid" + } + ] + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### array-callback-return > invalid + +```js +foo.forEach(x => !x) +``` + +```json +{ + "options": [ + { + "checkForEach": true, + "allowVoid": true + } + ], + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "expectedNoReturnValue", + "data": { + "name": "arrow function", + "arrayMethodName": "Array.prototype.forEach" + }, + "suggestions": [ + { + "output": "foo.forEach(x => {!x})", + "messageId": "wrapBraces" + }, + { + "output": "foo.forEach(x => void !x)", + "messageId": "prependVoid" + } + ] + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### array-callback-return > invalid + +```js +foo.forEach(x => (x)) +``` + +```json +{ + "options": [ + { + "checkForEach": true, + "allowVoid": true + } + ], + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "expectedNoReturnValue", + "data": { + "name": "arrow function", + "arrayMethodName": "Array.prototype.forEach" + }, + "suggestions": [ + { + "output": "foo.forEach(x => {(x)})", + "messageId": "wrapBraces" + }, + { + "output": "foo.forEach(x => void (x))", + "messageId": "prependVoid" + } + ] + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### array-callback-return > invalid + +```js +foo.forEach((x) => { return x; }) +``` + +```json +{ + "options": [ + { + "checkForEach": true, + "allowVoid": true + } + ], + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "expectedNoReturnValue", + "data": { + "name": "arrow function", + "arrayMethodName": "Array.prototype.forEach" + }, + "suggestions": [ + { + "output": "foo.forEach((x) => { return void x; })", + "messageId": "prependVoid" + } + ] + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### array-callback-return > invalid + +```js +foo.forEach((x) => { return !x; }) +``` + +```json +{ + "options": [ + { + "checkForEach": true, + "allowVoid": true + } + ], + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "expectedNoReturnValue", + "data": { + "name": "arrow function", + "arrayMethodName": "Array.prototype.forEach" + }, + "suggestions": [ + { + "output": "foo.forEach((x) => { return void !x; })", + "messageId": "prependVoid" + } + ] + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### array-callback-return > invalid + +```js +foo.forEach((x) => { return(x); }) +``` + +```json +{ + "options": [ + { + "checkForEach": true, + "allowVoid": true + } + ], + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "expectedNoReturnValue", + "data": { + "name": "arrow function", + "arrayMethodName": "Array.prototype.forEach" + }, + "suggestions": [ + { + "output": "foo.forEach((x) => { return void (x); })", + "messageId": "prependVoid" + } + ] + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### array-callback-return > invalid + +```js +foo.forEach((x) => { return (x + 1); }) +``` + +```json +{ + "options": [ + { + "checkForEach": true, + "allowVoid": true + } + ], + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "expectedNoReturnValue", + "data": { + "name": "arrow function", + "arrayMethodName": "Array.prototype.forEach" + }, + "suggestions": [ + { + "output": "foo.forEach((x) => { return void (x + 1); })", + "messageId": "prependVoid" + } + ] + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### array-callback-return > invalid + +```js +foo.forEach((x) => { if (a === b) { return x; } }) +``` + +```json +{ + "options": [ + { + "checkForEach": true, + "allowVoid": true + } + ], + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "expectedNoReturnValue", + "data": { + "name": "arrow function", + "arrayMethodName": "Array.prototype.forEach" + }, + "suggestions": [ + { + "output": "foo.forEach((x) => { if (a === b) { return void x; } })", + "messageId": "prependVoid" + } + ] + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### array-callback-return > invalid + +```js +foo.forEach((x) => { if (a === b) { return !x; } }) +``` + +```json +{ + "options": [ + { + "checkForEach": true, + "allowVoid": true + } + ], + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "expectedNoReturnValue", + "data": { + "name": "arrow function", + "arrayMethodName": "Array.prototype.forEach" + }, + "suggestions": [ + { + "output": "foo.forEach((x) => { if (a === b) { return void !x; } })", + "messageId": "prependVoid" + } + ] + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### array-callback-return > invalid + +```js +foo.forEach((x) => { if (a === b) { return (x + a); } }) +``` + +```json +{ + "options": [ + { + "checkForEach": true, + "allowVoid": true + } + ], + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "expectedNoReturnValue", + "data": { + "name": "arrow function", + "arrayMethodName": "Array.prototype.forEach" + }, + "suggestions": [ + { + "output": "foo.forEach((x) => { if (a === b) { return void (x + a); } })", + "messageId": "prependVoid" + } + ] + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### array-callback-return > invalid + +```js +foo.filter(bar => { baz(); } ) +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "expectedInside", + "data": { + "name": "arrow function", + "arrayMethodName": "Array.prototype.filter" + }, + "line": 1, + "column": 16, + "endLine": 1, + "endColumn": 18 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### array-callback-return > invalid + +```js +foo.filter( +() => {} ) +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "expectedInside", + "data": { + "name": "arrow function", + "arrayMethodName": "Array.prototype.filter" + }, + "line": 2, + "column": 4, + "endLine": 2, + "endColumn": 6 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### array-callback-return > invalid + +```js +foo.filter(bar || ((baz) => {}) ) +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "expectedInside", + "data": { + "name": "arrow function", + "arrayMethodName": "Array.prototype.filter" + }, + "line": 1, + "column": 26, + "endLine": 1, + "endColumn": 28 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### array-callback-return > invalid + +```js +foo.filter(bar => { return; }) +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "expectedReturnValue", + "data": { + "name": "arrow function", + "arrayMethodName": "Array.prototype.filter" + }, + "line": 1, + "column": 21, + "endLine": 1, + "endColumn": 28 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### array-callback-return > invalid + +```js +Array.from(foo, bar => { bar }) +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "expectedInside", + "data": { + "name": "arrow function", + "arrayMethodName": "Array.from" + }, + "line": 1, + "column": 21, + "endLine": 1, + "endColumn": 23 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### array-callback-return > invalid + +```js +foo.forEach(bar => bar) +``` + +```json +{ + "options": [ + { + "checkForEach": true + } + ], + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "expectedNoReturnValue", + "data": { + "name": "arrow function", + "arrayMethodName": "Array.prototype.forEach" + }, + "line": 1, + "column": 17, + "endLine": 1, + "endColumn": 19, + "suggestions": [ + { + "messageId": "wrapBraces", + "output": "foo.forEach(bar => {bar})" + } + ] + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### array-callback-return > invalid + +```js +foo.forEach((function () { return (bar) => bar; })()) +``` + +```json +{ + "options": [ + { + "checkForEach": true + } + ], + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "expectedNoReturnValue", + "data": { + "name": "arrow function", + "arrayMethodName": "Array.prototype.forEach" + }, + "line": 1, + "column": 41, + "endLine": 1, + "endColumn": 43, + "suggestions": [ + { + "messageId": "wrapBraces", + "output": "foo.forEach((function () { return (bar) => {bar}; })())" + } + ] + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### array-callback-return > invalid + +```js +foo.forEach((() => { + return bar => bar; })()) +``` + +```json +{ + "options": [ + { + "checkForEach": true + } + ], + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "expectedNoReturnValue", + "data": { + "name": "arrow function", + "arrayMethodName": "Array.prototype.forEach" + }, + "line": 2, + "column": 13, + "endLine": 2, + "endColumn": 15, + "suggestions": [ + { + "messageId": "wrapBraces", + "output": "foo.forEach((() => {\n return bar => {bar}; })())" + } + ] + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### array-callback-return > invalid + +```js +foo.forEach((bar) => { if (bar) { return; } else { return bar ; } }) +``` + +```json +{ + "options": [ + { + "checkForEach": true + } + ], + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "expectedNoReturnValue", + "data": { + "name": "arrow function", + "arrayMethodName": "Array.prototype.forEach" + }, + "line": 1, + "column": 52, + "endLine": 1, + "endColumn": 64 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### array-callback-return > invalid + +```js +foo.filter(function(){}) +``` + +```json +{ + "errors": [ + { + "messageId": "expectedInside", + "data": { + "name": "function", + "arrayMethodName": "Array.prototype.filter" + }, + "line": 1, + "column": 12, + "endLine": 1, + "endColumn": 20 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### array-callback-return > invalid + +```js +foo.filter(function (){}) +``` + +```json +{ + "errors": [ + { + "messageId": "expectedInside", + "data": { + "name": "function", + "arrayMethodName": "Array.prototype.filter" + }, + "line": 1, + "column": 12, + "endLine": 1, + "endColumn": 21 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### array-callback-return > invalid + +```js +foo.filter(function +(){}) +``` + +```json +{ + "errors": [ + { + "messageId": "expectedInside", + "data": { + "name": "function", + "arrayMethodName": "Array.prototype.filter" + }, + "line": 1, + "column": 12, + "endLine": 2, + "endColumn": 1 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### array-callback-return > invalid + +```js +foo.filter(function bar(){}) +``` + +```json +{ + "errors": [ + { + "messageId": "expectedInside", + "data": { + "name": "function 'bar'", + "arrayMethodName": "Array.prototype.filter" + }, + "line": 1, + "column": 12, + "endLine": 1, + "endColumn": 24 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### array-callback-return > invalid + +```js +foo.filter(function bar (){}) +``` + +```json +{ + "errors": [ + { + "messageId": "expectedInside", + "data": { + "name": "function 'bar'", + "arrayMethodName": "Array.prototype.filter" + }, + "line": 1, + "column": 12, + "endLine": 1, + "endColumn": 26 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### array-callback-return > invalid + +```js +foo.filter(function + bar() {}) +``` + +```json +{ + "errors": [ + { + "messageId": "expectedInside", + "data": { + "name": "function 'bar'", + "arrayMethodName": "Array.prototype.filter" + }, + "line": 1, + "column": 12, + "endLine": 2, + "endColumn": 5 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### array-callback-return > invalid + +```js +Array.from(foo, function bar(){}) +``` + +```json +{ + "errors": [ + { + "messageId": "expectedInside", + "data": { + "name": "function 'bar'", + "arrayMethodName": "Array.from" + }, + "line": 1, + "column": 17, + "endLine": 1, + "endColumn": 29 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### array-callback-return > invalid + +```js +Array.from(foo, bar ? function (){} : baz) +``` + +```json +{ + "errors": [ + { + "messageId": "expectedInside", + "data": { + "name": "function", + "arrayMethodName": "Array.from" + }, + "line": 1, + "column": 23, + "endLine": 1, + "endColumn": 32 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### array-callback-return > invalid + +```js +foo.filter(function bar() { return + }) +``` + +```json +{ + "errors": [ + { + "messageId": "expectedReturnValue", + "data": { + "name": "function 'bar'", + "arrayMethodName": "Array.prototype.filter" + }, + "line": 1, + "column": 29, + "endLine": 1, + "endColumn": 35 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### array-callback-return > invalid + +```js +foo.forEach(function () { +if (baz) return bar +else return + }) +``` + +```json +{ + "options": [ + { + "checkForEach": true + } + ], + "errors": [ + { + "messageId": "expectedNoReturnValue", + "data": { + "name": "function", + "arrayMethodName": "Array.prototype.forEach" + }, + "line": 2, + "column": 10, + "endLine": 2, + "endColumn": 20 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### array-callback-return > invalid + +```js +foo?.filter(() => { console.log('hello') }) +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2020 + }, + "errors": [ + { + "messageId": "expectedInside", + "data": { + "name": "arrow function", + "arrayMethodName": "Array.prototype.filter" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### array-callback-return > invalid + +```js +(foo?.filter)(() => { console.log('hello') }) +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2020 + }, + "errors": [ + { + "messageId": "expectedInside", + "data": { + "name": "arrow function", + "arrayMethodName": "Array.prototype.filter" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### array-callback-return > invalid + +```js +Array?.from([], () => { console.log('hello') }) +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2020 + }, + "errors": [ + { + "messageId": "expectedInside", + "data": { + "name": "arrow function", + "arrayMethodName": "Array.from" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### array-callback-return > invalid + +```js +(Array?.from)([], () => { console.log('hello') }) +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2020 + }, + "errors": [ + { + "messageId": "expectedInside", + "data": { + "name": "arrow function", + "arrayMethodName": "Array.from" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### array-callback-return > invalid + +```js +foo?.filter((function() { return () => { console.log('hello') } })?.()) +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2020 + }, + "errors": [ + { + "messageId": "expectedInside", + "data": { + "name": "arrow function", + "arrayMethodName": "Array.prototype.filter" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +### `arrow-parens` + +Pass: 88 / 109 (80.7%) +Fail: 21 / 109 (19.3%) + +#### arrow-parens > valid + +```js +(a: T) => a +``` + +```json +{ + "options": [ + "always" + ], + "languageOptions": { + "parser": {} + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### arrow-parens > valid + +```js +(a): T => a +``` + +```json +{ + "options": [ + "always" + ], + "languageOptions": { + "parser": {} + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### arrow-parens > valid + +```js +(a: T) => a +``` + +```json +{ + "options": [ + "as-needed" + ], + "languageOptions": { + "parser": {} + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### arrow-parens > valid + +```js +(a): T => a +``` + +```json +{ + "options": [ + "as-needed" + ], + "languageOptions": { + "parser": {} + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### arrow-parens > valid + +```js +(a: T) => a +``` + +```json +{ + "options": [ + "as-needed", + { + "requireForBlockBody": true + } + ], + "languageOptions": { + "parser": {} + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### arrow-parens > valid + +```js +(a): T => a +``` + +```json +{ + "options": [ + "as-needed", + { + "requireForBlockBody": true + } + ], + "languageOptions": { + "parser": {} + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### arrow-parens > valid + +```js +(a) => b +``` + +```json +{ + "options": [ + "always" + ], + "languageOptions": { + "parser": {} + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### arrow-parens > valid + +```js +(a) => b +``` + +```json +{ + "options": [ + "as-needed" + ], + "languageOptions": { + "parser": {} + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### arrow-parens > valid + +```js +(a) => b +``` + +```json +{ + "options": [ + "as-needed", + { + "requireForBlockBody": true + } + ], + "languageOptions": { + "parser": {} + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### arrow-parens > valid + +```js +async (a) => b +``` + +```json +{ + "options": [ + "always" + ], + "languageOptions": { + "parser": {} + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### arrow-parens > valid + +```js +async (a) => b +``` + +```json +{ + "options": [ + "as-needed" + ], + "languageOptions": { + "parser": {} + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### arrow-parens > valid + +```js +async (a) => b +``` + +```json +{ + "options": [ + "as-needed", + { + "requireForBlockBody": true + } + ], + "languageOptions": { + "parser": {} + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### arrow-parens > valid + +```js +() => b +``` + +```json +{ + "options": [ + "always" + ], + "languageOptions": { + "parser": {} + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### arrow-parens > valid + +```js +() => b +``` + +```json +{ + "options": [ + "as-needed" + ], + "languageOptions": { + "parser": {} + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### arrow-parens > valid + +```js +() => b +``` + +```json +{ + "options": [ + "as-needed", + { + "requireForBlockBody": true + } + ], + "languageOptions": { + "parser": {} + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### arrow-parens > valid + +```js +(a) => b +``` + +```json +{ + "options": [ + "always" + ], + "languageOptions": { + "parser": {} + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### arrow-parens > valid + +```js +(a) => b +``` + +```json +{ + "options": [ + "as-needed" + ], + "languageOptions": { + "parser": {} + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### arrow-parens > valid + +```js +(a) => b +``` + +```json +{ + "options": [ + "as-needed", + { + "requireForBlockBody": true + } + ], + "languageOptions": { + "parser": {} + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### arrow-parens > valid + +```js +(a) => b +``` + +```json +{ + "options": [ + "always" + ], + "languageOptions": { + "parser": {} + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### arrow-parens > valid + +```js +(a) => b +``` + +```json +{ + "options": [ + "as-needed" + ], + "languageOptions": { + "parser": {} + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### arrow-parens > valid + +```js +(a) => b +``` + +```json +{ + "options": [ + "as-needed", + { + "requireForBlockBody": true + } + ], + "languageOptions": { + "parser": {} + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +### `arrow-spacing` + +Pass: 40 / 42 (95.2%) +Fail: 2 / 42 (4.8%) + +#### arrow-spacing > invalid + +```js +(a = ()=>0)=>1 +``` + +```json +{ + "output": "(a = () => 0) => 1", + "errors": [ + { + "column": 7, + "line": 1, + "messageId": "expectedBefore" + }, + { + "column": 10, + "line": 1, + "messageId": "expectedAfter" + }, + { + "column": 11, + "line": 1, + "messageId": "expectedBefore" + }, + { + "column": 14, + "line": 1, + "messageId": "expectedAfter" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Actual error location does not match expected error location. ++ actual - expected + + { ++ column: 11, +- column: 7, + line: 1 + } + + at assertInvalidTestCaseLocationIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### arrow-spacing > invalid + +```js +(a = ()=>0)=>(1) +``` + +```json +{ + "output": "(a = () => 0) => (1)", + "errors": [ + { + "column": 7, + "line": 1, + "messageId": "expectedBefore" + }, + { + "column": 10, + "line": 1, + "messageId": "expectedAfter" + }, + { + "column": 11, + "line": 1, + "messageId": "expectedBefore" + }, + { + "column": 14, + "line": 1, + "messageId": "expectedAfter" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Actual error location does not match expected error location. ++ actual - expected + + { ++ column: 11, +- column: 7, + line: 1 + } + + at assertInvalidTestCaseLocationIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +### `block-scoped-var` + +Pass: 97 / 106 (91.5%) +Fail: 9 / 106 (8.5%) + +#### block-scoped-var > invalid + +```js +for (var a = 0;;) {} a; +``` + +```json +{ + "errors": [ + { + "messageId": "outOfScope", + "data": { + "name": "a", + "definitionLine": 1, + "definitionColumn": 10 + }, + "line": 1, + "column": 22 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### block-scoped-var > invalid + +```js +for (var a in []) {} a; +``` + +```json +{ + "errors": [ + { + "messageId": "outOfScope", + "data": { + "name": "a", + "definitionLine": 1, + "definitionColumn": 10 + }, + "line": 1, + "column": 22 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### block-scoped-var > invalid + +```js +for (var a of []) {} a; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "outOfScope", + "data": { + "name": "a", + "definitionLine": 1, + "definitionColumn": 10 + }, + "line": 1, + "column": 22 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### block-scoped-var > invalid + +```js +if (true) { var a; } a; +``` + +```json +{ + "errors": [ + { + "messageId": "outOfScope", + "data": { + "name": "a", + "definitionLine": 1, + "definitionColumn": 17 + }, + "line": 1, + "column": 22 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### block-scoped-var > invalid + +```js +if (true) { var a = 1; } else { var a = 2; } +``` + +```json +{ + "errors": [ + { + "messageId": "outOfScope", + "data": { + "name": "a", + "definitionLine": 1, + "definitionColumn": 37 + }, + "line": 1, + "column": 17 + }, + { + "messageId": "outOfScope", + "data": { + "name": "a", + "definitionLine": 1, + "definitionColumn": 17 + }, + "line": 1, + "column": 37 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 2 errors but had 0: [] + +0 !== 2 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### block-scoped-var > invalid + +```js +for (var i = 0;;) {} for(var i = 0;;) {} +``` + +```json +{ + "errors": [ + { + "messageId": "outOfScope", + "data": { + "name": "i", + "definitionLine": 1, + "definitionColumn": 30 + }, + "line": 1, + "column": 10 + }, + { + "messageId": "outOfScope", + "data": { + "name": "i", + "definitionLine": 1, + "definitionColumn": 10 + }, + "line": 1, + "column": 30 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 2 errors but had 0: [] + +0 !== 2 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### block-scoped-var > invalid + +```js +{ var foo, + bar; } bar; +``` + +```json +{ + "errors": [ + { + "messageId": "outOfScope", + "data": { + "name": "bar", + "definitionLine": 2, + "definitionColumn": 3 + }, + "line": 2, + "column": 10 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### block-scoped-var > invalid + +```js +{ var { foo, + bar } = baz; } bar; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "outOfScope", + "data": { + "name": "bar", + "definitionLine": 2, + "definitionColumn": 3 + }, + "line": 2, + "column": 18 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### block-scoped-var > invalid + +```js +if (foo) { var a = 1; } else if (bar) { var a = 2; } else { var a = 3; } +``` + +```json +{ + "errors": [ + { + "messageId": "outOfScope", + "data": { + "name": "a", + "definitionLine": 1, + "definitionColumn": 45 + }, + "line": 1, + "column": 16 + }, + { + "messageId": "outOfScope", + "data": { + "name": "a", + "definitionLine": 1, + "definitionColumn": 65 + }, + "line": 1, + "column": 16 + }, + { + "messageId": "outOfScope", + "data": { + "name": "a", + "definitionLine": 1, + "definitionColumn": 16 + }, + "line": 1, + "column": 45 + }, + { + "messageId": "outOfScope", + "data": { + "name": "a", + "definitionLine": 1, + "definitionColumn": 65 + }, + "line": 1, + "column": 45 + }, + { + "messageId": "outOfScope", + "data": { + "name": "a", + "definitionLine": 1, + "definitionColumn": 16 + }, + "line": 1, + "column": 65 + }, + { + "messageId": "outOfScope", + "data": { + "name": "a", + "definitionLine": 1, + "definitionColumn": 45 + }, + "line": 1, + "column": 65 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 6 errors but had 0: [] + +0 !== 6 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +### `brace-style` + +Pass: 163 / 168 (97.0%) +Fail: 5 / 168 (3.0%) + +#### brace-style > invalid + +```js +if (a) { +b(); + } else { +c(); + } +``` + +```json +{ + "output": "if (a) \n{ \nb();\n }\n else \n{ \nc();\n }", + "options": [ + "allman" + ], + "errors": [ + { + "messageId": "sameLineOpen" + }, + { + "messageId": "sameLineClose" + }, + { + "messageId": "sameLineOpen" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: messageId 'sameLineClose' does not match expected messageId 'sameLineOpen' ++ actual - expected + ++ 'sameLineClose' +- 'sameLineOpen' + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### brace-style > invalid + +```js +if (foo) { +baz(); +} else if (bar) { +baz(); +} +else { +qux(); +} +``` + +```json +{ + "output": "if (foo) \n{\nbaz();\n}\n else if (bar) \n{\nbaz();\n}\nelse \n{\nqux();\n}", + "options": [ + "allman" + ], + "errors": [ + { + "messageId": "sameLineOpen" + }, + { + "messageId": "sameLineClose" + }, + { + "messageId": "sameLineOpen" + }, + { + "messageId": "sameLineOpen" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: messageId 'sameLineClose' does not match expected messageId 'sameLineOpen' ++ actual - expected + ++ 'sameLineClose' +- 'sameLineOpen' + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### brace-style > invalid + +```js +if (foo) +{ poop(); +} +else if (bar) { +baz(); +} else if (thing) { +boom(); +} +else { +qux(); +} +``` + +```json +{ + "output": "if (foo)\n{\n poop();\n} \nelse if (bar) \n{\nbaz();\n}\n else if (thing) \n{\nboom();\n}\nelse \n{\nqux();\n}", + "options": [ + "allman" + ], + "errors": [ + { + "messageId": "blockSameLine" + }, + { + "messageId": "sameLineOpen" + }, + { + "messageId": "sameLineClose" + }, + { + "messageId": "sameLineOpen" + }, + { + "messageId": "sameLineOpen" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: messageId 'sameLineClose' does not match expected messageId 'sameLineOpen' ++ actual - expected + ++ 'sameLineClose' +- 'sameLineOpen' + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### brace-style > invalid + +```js +if (foo) +{ poop(); +} +else if (bar) { +baz(); +} else if (thing) { +boom(); +} +else { +qux(); +} +``` + +```json +{ + "output": "if (foo)\n{\n poop();\n} \nelse if (bar) \n{\nbaz();\n}\n else if (thing) \n{\nboom();\n}\nelse \n{\nqux();\n}", + "options": [ + "allman", + { + "allowSingleLine": true + } + ], + "errors": [ + { + "messageId": "blockSameLine" + }, + { + "messageId": "sameLineOpen" + }, + { + "messageId": "sameLineClose" + }, + { + "messageId": "sameLineOpen" + }, + { + "messageId": "sameLineOpen" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: messageId 'sameLineClose' does not match expected messageId 'sameLineOpen' ++ actual - expected + ++ 'sameLineClose' +- 'sameLineOpen' + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### brace-style > invalid + +```js + + if (foo) + { + bar + } + else { + baz + } + +``` + +```json +{ + "output": "\n if (foo) {\n bar\n } else {\n baz\n }\n ", + "errors": [ + { + "messageId": "nextLineOpen" + }, + { + "messageId": "nextLineClose" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: messageId 'nextLineClose' does not match expected messageId 'nextLineOpen' ++ actual - expected + ++ 'nextLineClose' +- 'nextLineOpen' + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +### `camelcase` + +Pass: 187 / 204 (91.7%) +Fail: 17 / 204 (8.3%) + +#### camelcase > valid + +```js +var camelCased = a_global_variable +``` + +```json +{ + "options": [ + { + "ignoreGlobals": true + } + ], + "languageOptions": { + "globals": { + "a_global_variable": "readonly" + } + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/camelcase', + message: "Identifier 'a_global_variable' is not in camel case.", + messageId: 'notCamelCase', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 17, + endLine: 1, + endColumn: 34, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### camelcase > valid + +```js +a_global_variable.foo() +``` + +```json +{ + "options": [ + { + "ignoreGlobals": true + } + ], + "languageOptions": { + "globals": { + "a_global_variable": "readonly" + } + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/camelcase', + message: "Identifier 'a_global_variable' is not in camel case.", + messageId: 'notCamelCase', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 0, + endLine: 1, + endColumn: 17, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### camelcase > valid + +```js +a_global_variable[undefined] +``` + +```json +{ + "options": [ + { + "ignoreGlobals": true + } + ], + "languageOptions": { + "globals": { + "a_global_variable": "readonly" + } + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/camelcase', + message: "Identifier 'a_global_variable' is not in camel case.", + messageId: 'notCamelCase', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 0, + endLine: 1, + endColumn: 17, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### camelcase > valid + +```js +var foo = a_global_variable.bar +``` + +```json +{ + "options": [ + { + "ignoreGlobals": true + } + ], + "languageOptions": { + "globals": { + "a_global_variable": "readonly" + } + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/camelcase', + message: "Identifier 'a_global_variable' is not in camel case.", + messageId: 'notCamelCase', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 10, + endLine: 1, + endColumn: 27, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### camelcase > valid + +```js +a_global_variable.foo = bar +``` + +```json +{ + "options": [ + { + "ignoreGlobals": true + } + ], + "languageOptions": { + "globals": { + "a_global_variable": "readonly" + } + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/camelcase', + message: "Identifier 'a_global_variable' is not in camel case.", + messageId: 'notCamelCase', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 0, + endLine: 1, + endColumn: 17, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### camelcase > valid + +```js +( { foo: a_global_variable.bar } = baz ) +``` + +```json +{ + "options": [ + { + "ignoreGlobals": true + } + ], + "languageOptions": { + "ecmaVersion": 6, + "globals": { + "a_global_variable": "readonly" + } + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/camelcase', + message: "Identifier 'a_global_variable' is not in camel case.", + messageId: 'notCamelCase', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 9, + endLine: 1, + endColumn: 26, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### camelcase > valid + +```js +a_global_variable = foo +``` + +```json +{ + "options": [ + { + "ignoreGlobals": true + } + ], + "languageOptions": { + "globals": { + "a_global_variable": "writable" + } + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/camelcase', + message: "Identifier 'a_global_variable' is not in camel case.", + messageId: 'notCamelCase', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 0, + endLine: 1, + endColumn: 17, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### camelcase > valid + +```js +a_global_variable = foo +``` + +```json +{ + "options": [ + { + "ignoreGlobals": true + } + ], + "languageOptions": { + "globals": { + "a_global_variable": "readonly" + } + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/camelcase', + message: "Identifier 'a_global_variable' is not in camel case.", + messageId: 'notCamelCase', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 0, + endLine: 1, + endColumn: 17, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### camelcase > valid + +```js +({ a_global_variable } = foo) +``` + +```json +{ + "options": [ + { + "ignoreGlobals": true + } + ], + "languageOptions": { + "ecmaVersion": 6, + "globals": { + "a_global_variable": "writable" + } + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/camelcase', + message: "Identifier 'a_global_variable' is not in camel case.", + messageId: 'notCamelCase', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 3, + endLine: 1, + endColumn: 20, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### camelcase > valid + +```js +({ snake_cased: a_global_variable } = foo) +``` + +```json +{ + "options": [ + { + "ignoreGlobals": true + } + ], + "languageOptions": { + "ecmaVersion": 6, + "globals": { + "a_global_variable": "writable" + } + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/camelcase', + message: "Identifier 'a_global_variable' is not in camel case.", + messageId: 'notCamelCase', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 16, + endLine: 1, + endColumn: 33, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### camelcase > valid + +```js +({ snake_cased: a_global_variable = foo } = bar) +``` + +```json +{ + "options": [ + { + "ignoreGlobals": true + } + ], + "languageOptions": { + "ecmaVersion": 6, + "globals": { + "a_global_variable": "writable" + } + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/camelcase', + message: "Identifier 'a_global_variable' is not in camel case.", + messageId: 'notCamelCase', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 16, + endLine: 1, + endColumn: 33, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### camelcase > valid + +```js +[a_global_variable] = bar +``` + +```json +{ + "options": [ + { + "ignoreGlobals": true + } + ], + "languageOptions": { + "ecmaVersion": 6, + "globals": { + "a_global_variable": "writable" + } + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/camelcase', + message: "Identifier 'a_global_variable' is not in camel case.", + messageId: 'notCamelCase', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 1, + endLine: 1, + endColumn: 18, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### camelcase > valid + +```js +[a_global_variable = foo] = bar +``` + +```json +{ + "options": [ + { + "ignoreGlobals": true + } + ], + "languageOptions": { + "ecmaVersion": 6, + "globals": { + "a_global_variable": "writable" + } + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/camelcase', + message: "Identifier 'a_global_variable' is not in camel case.", + messageId: 'notCamelCase', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 1, + endLine: 1, + endColumn: 18, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### camelcase > valid + +```js +foo[a_global_variable] = bar +``` + +```json +{ + "options": [ + { + "ignoreGlobals": true + } + ], + "languageOptions": { + "globals": { + "a_global_variable": "readonly" + } + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/camelcase', + message: "Identifier 'a_global_variable' is not in camel case.", + messageId: 'notCamelCase', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 4, + endLine: 1, + endColumn: 21, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### camelcase > valid + +```js +var foo = { [a_global_variable]: bar } +``` + +```json +{ + "options": [ + { + "ignoreGlobals": true + } + ], + "languageOptions": { + "ecmaVersion": 6, + "globals": { + "a_global_variable": "readonly" + } + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/camelcase', + message: "Identifier 'a_global_variable' is not in camel case.", + messageId: 'notCamelCase', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 13, + endLine: 1, + endColumn: 30, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### camelcase > valid + +```js +var { [a_global_variable]: foo } = bar +``` + +```json +{ + "options": [ + { + "ignoreGlobals": true + } + ], + "languageOptions": { + "ecmaVersion": 6, + "globals": { + "a_global_variable": "readonly" + } + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/camelcase', + message: "Identifier 'a_global_variable' is not in camel case.", + messageId: 'notCamelCase', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 7, + endLine: 1, + endColumn: 24, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### camelcase > invalid + +```js +var foo = { a_global_variable: a_global_variable } +``` + +```json +{ + "options": [ + { + "ignoreGlobals": true + } + ], + "languageOptions": { + "globals": { + "a_global_variable": "writable" + } + }, + "errors": [ + { + "messageId": "notCamelCase", + "data": { + "name": "a_global_variable" + }, + "column": 13 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 2: [ + { + ruleId: 'rule-to-test/camelcase', + message: "Identifier 'a_global_variable' is not in camel case.", + messageId: 'notCamelCase', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 31, + endLine: 1, + endColumn: 48, + suggestions: null + }, + { + ruleId: 'rule-to-test/camelcase', + message: "Identifier 'a_global_variable' is not in camel case.", + messageId: 'notCamelCase', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 12, + endLine: 1, + endColumn: 29, + suggestions: null + } +] + +2 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +### `class-methods-use-this` + +Pass: 122 / 156 (78.2%) +Fail: 34 / 156 (21.8%) + +#### class-methods-use-this > valid + +```js +class Foo { override get getter(): number {} } +``` + +```json +{ + "options": [ + { + "ignoreOverrideMethods": true + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### class-methods-use-this > valid + +```js +class Foo { private override get getter(): number {} } +``` + +```json +{ + "options": [ + { + "ignoreOverrideMethods": true + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### class-methods-use-this > valid + +```js +class Foo { protected override get getter(): number {} } +``` + +```json +{ + "options": [ + { + "ignoreOverrideMethods": true + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### class-methods-use-this > valid + +```js +class Foo { override set setter(v: number) {} } +``` + +```json +{ + "options": [ + { + "ignoreOverrideMethods": true + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### class-methods-use-this > valid + +```js +class Foo { private override set setter(v: number) {} } +``` + +```json +{ + "options": [ + { + "ignoreOverrideMethods": true + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### class-methods-use-this > valid + +```js +class Foo { protected override set setter(v: number) {} } +``` + +```json +{ + "options": [ + { + "ignoreOverrideMethods": true + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### class-methods-use-this > valid + +```js +class Foo implements Bar { override get getter(): number {} } +``` + +```json +{ + "options": [ + { + "ignoreOverrideMethods": true, + "ignoreClassesWithImplements": "all" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### class-methods-use-this > valid + +```js +class Foo implements Bar { private override get getter(): number {} } +``` + +```json +{ + "options": [ + { + "ignoreOverrideMethods": true, + "ignoreClassesWithImplements": "public-fields" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### class-methods-use-this > valid + +```js +class Foo implements Bar { protected override get getter(): number {} } +``` + +```json +{ + "options": [ + { + "ignoreOverrideMethods": true, + "ignoreClassesWithImplements": "public-fields" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### class-methods-use-this > valid + +```js +class Foo implements Bar { override set setter(v: number) {} } +``` + +```json +{ + "options": [ + { + "ignoreOverrideMethods": true, + "ignoreClassesWithImplements": "all" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### class-methods-use-this > valid + +```js +class Foo implements Bar { private override set setter(v: number) {} } +``` + +```json +{ + "options": [ + { + "ignoreOverrideMethods": true, + "ignoreClassesWithImplements": "public-fields" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### class-methods-use-this > valid + +```js +class Foo implements Bar { protected override set setter(v: number) {} } +``` + +```json +{ + "options": [ + { + "ignoreOverrideMethods": true, + "ignoreClassesWithImplements": "public-fields" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### class-methods-use-this > valid + +```js +class Foo implements Bar { set setter() {} } +``` + +```json +{ + "options": [ + { + "ignoreClassesWithImplements": "all" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### class-methods-use-this > invalid + +```js + + class Foo { + get getter(): number {} + } + +``` + +```json +{ + "errors": [ + { + "messageId": "missingThis" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### class-methods-use-this > invalid + +```js + + class Foo { + private get getter(): number {} + } + +``` + +```json +{ + "errors": [ + { + "messageId": "missingThis" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### class-methods-use-this > invalid + +```js + + class Foo { + protected get getter(): number {} + } + +``` + +```json +{ + "errors": [ + { + "messageId": "missingThis" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### class-methods-use-this > invalid + +```js + + class Foo { + get #getter(): number {} + } + +``` + +```json +{ + "errors": [ + { + "messageId": "missingThis" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### class-methods-use-this > invalid + +```js + + class Foo { + private set setter(b: number) {} + } + +``` + +```json +{ + "errors": [ + { + "messageId": "missingThis" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### class-methods-use-this > invalid + +```js + + class Foo { + protected set setter(b: number) {} + } + +``` + +```json +{ + "errors": [ + { + "messageId": "missingThis" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### class-methods-use-this > invalid + +```js + + class Foo { + set #setter(b: number) {} + } + +``` + +```json +{ + "errors": [ + { + "messageId": "missingThis" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### class-methods-use-this > invalid + +```js + + class Foo { + override get getter(): number {} + } + +``` + +```json +{ + "errors": [ + { + "messageId": "missingThis" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### class-methods-use-this > invalid + +```js + + class Foo { + override set setter(v: number) {} + } + +``` + +```json +{ + "errors": [ + { + "messageId": "missingThis" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### class-methods-use-this > invalid + +```js + + class Foo implements Bar { + override get getter(): number {} + } + +``` + +```json +{ + "errors": [ + { + "messageId": "missingThis" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### class-methods-use-this > invalid + +```js + + class Foo implements Bar { + override set setter(v: number) {} + } + +``` + +```json +{ + "errors": [ + { + "messageId": "missingThis" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### class-methods-use-this > invalid + +```js + + class Foo implements Bar { + get getter(): number {} + } + +``` + +```json +{ + "errors": [ + { + "messageId": "missingThis" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### class-methods-use-this > invalid + +```js + + class Foo implements Bar { + get #getter(): number {} + } + +``` + +```json +{ + "errors": [ + { + "messageId": "missingThis" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### class-methods-use-this > invalid + +```js + + class Foo implements Bar { + get #getter(): number {} + } + +``` + +```json +{ + "options": [ + { + "ignoreClassesWithImplements": "public-fields" + } + ], + "errors": [ + { + "messageId": "missingThis" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### class-methods-use-this > invalid + +```js + + class Foo implements Bar { + private get getter(): number {} + } + +``` + +```json +{ + "options": [ + { + "ignoreClassesWithImplements": "public-fields" + } + ], + "errors": [ + { + "messageId": "missingThis" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### class-methods-use-this > invalid + +```js + + class Foo implements Bar { + protected get getter(): number {} + } + +``` + +```json +{ + "options": [ + { + "ignoreClassesWithImplements": "public-fields" + } + ], + "errors": [ + { + "messageId": "missingThis" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### class-methods-use-this > invalid + +```js + + class Foo implements Bar { + set setter(v: number) {} + } + +``` + +```json +{ + "errors": [ + { + "messageId": "missingThis" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### class-methods-use-this > invalid + +```js + + class Foo implements Bar { + set #setter(v: number) {} + } + +``` + +```json +{ + "errors": [ + { + "messageId": "missingThis" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### class-methods-use-this > invalid + +```js + + class Foo implements Bar { + set #setter(v: number) {} + } + +``` + +```json +{ + "options": [ + { + "ignoreClassesWithImplements": "public-fields" + } + ], + "errors": [ + { + "messageId": "missingThis" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### class-methods-use-this > invalid + +```js + + class Foo implements Bar { + private set setter(v: number) {} + } + +``` + +```json +{ + "options": [ + { + "ignoreClassesWithImplements": "public-fields" + } + ], + "errors": [ + { + "messageId": "missingThis" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### class-methods-use-this > invalid + +```js + + class Foo implements Bar { + protected set setter(v: number) {} + } + +``` + +```json +{ + "options": [ + { + "ignoreClassesWithImplements": "public-fields" + } + ], + "errors": [ + { + "messageId": "missingThis" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +### `comma-dangle` + +Pass: 243 / 267 (91.0%) +Fail: 24 / 267 (9.0%) + +#### comma-dangle > valid + +```js +function foo(a) {} +``` + +```json +{ + "options": [ + "always" + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/comma-dangle', + message: 'Missing trailing comma.', + messageId: 'missing', + severity: 1, + nodeType: 'FunctionDeclaration', + line: 1, + column: 14, + endLine: 1, + endColumn: 15, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### comma-dangle > valid + +```js +foo(a) +``` + +```json +{ + "options": [ + "always" + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/comma-dangle', + message: 'Missing trailing comma.', + messageId: 'missing', + severity: 1, + nodeType: 'CallExpression', + line: 1, + column: 5, + endLine: 1, + endColumn: 6, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### comma-dangle > valid + +```js +foo(a, +b +) +``` + +```json +{ + "options": [ + "always-multiline" + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/comma-dangle', + message: 'Missing trailing comma.', + messageId: 'missing', + severity: 1, + nodeType: 'CallExpression', + line: 2, + column: 1, + endLine: 3, + endColumn: 0, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### comma-dangle > valid + +```js +function foo(a, +b +) {} +``` + +```json +{ + "options": [ + "always-multiline" + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/comma-dangle', + message: 'Missing trailing comma.', + messageId: 'missing', + severity: 1, + nodeType: 'FunctionDeclaration', + line: 2, + column: 1, + endLine: 3, + endColumn: 0, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### comma-dangle > valid + +```js +function foo(a) {} +``` + +```json +{ + "options": [ + "always" + ], + "languageOptions": { + "ecmaVersion": 7 + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/comma-dangle', + message: 'Missing trailing comma.', + messageId: 'missing', + severity: 1, + nodeType: 'FunctionDeclaration', + line: 1, + column: 14, + endLine: 1, + endColumn: 15, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### comma-dangle > valid + +```js +foo(a) +``` + +```json +{ + "options": [ + "always" + ], + "languageOptions": { + "ecmaVersion": 7 + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/comma-dangle', + message: 'Missing trailing comma.', + messageId: 'missing', + severity: 1, + nodeType: 'CallExpression', + line: 1, + column: 5, + endLine: 1, + endColumn: 6, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### comma-dangle > valid + +```js +function foo(a, +b +) {} +``` + +```json +{ + "options": [ + "always-multiline" + ], + "languageOptions": { + "ecmaVersion": 7 + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/comma-dangle', + message: 'Missing trailing comma.', + messageId: 'missing', + severity: 1, + nodeType: 'FunctionDeclaration', + line: 2, + column: 1, + endLine: 3, + endColumn: 0, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### comma-dangle > valid + +```js +foo(a, +b +) +``` + +```json +{ + "options": [ + "always-multiline" + ], + "languageOptions": { + "ecmaVersion": 7 + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/comma-dangle', + message: 'Missing trailing comma.', + messageId: 'missing', + severity: 1, + nodeType: 'CallExpression', + line: 2, + column: 1, + endLine: 3, + endColumn: 0, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### comma-dangle > valid + +```js +function foo({a}: {a: string,}) {} +``` + +```json +{ + "options": [ + "never" + ], + "languageOptions": { + "parser": {} + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### comma-dangle > valid + +```js +function foo({a,}: {a: string}) {} +``` + +```json +{ + "options": [ + "always" + ], + "languageOptions": { + "parser": {} + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### comma-dangle > valid + +```js +function foo(a): {b: boolean,} {} +``` + +```json +{ + "options": [ + { + "functions": "never" + } + ], + "languageOptions": { + "parser": {} + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### comma-dangle > valid + +```js +function foo(a,): {b: boolean} {} +``` + +```json +{ + "options": [ + { + "functions": "always" + } + ], + "languageOptions": { + "parser": {} + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### comma-dangle > valid + +```js +function f( + a, + b +) {} +``` + +```json +{ + "options": [ + "always-multiline" + ], + "languageOptions": { + "ecmaVersion": 5, + "sourceType": "script" + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/comma-dangle', + message: 'Missing trailing comma.', + messageId: 'missing', + severity: 1, + nodeType: 'FunctionDeclaration', + line: 3, + column: 2, + endLine: 4, + endColumn: 0, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### comma-dangle > valid + +```js +f( + a, + b +); +``` + +```json +{ + "options": [ + "always-multiline" + ], + "languageOptions": { + "ecmaVersion": 5, + "sourceType": "script" + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/comma-dangle', + message: 'Missing trailing comma.', + messageId: 'missing', + severity: 1, + nodeType: 'CallExpression', + line: 3, + column: 2, + endLine: 4, + endColumn: 0, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### comma-dangle > valid + +```js +function f( + a, + b +) {} +``` + +```json +{ + "options": [ + "always-multiline" + ], + "languageOptions": { + "ecmaVersion": 2016 + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/comma-dangle', + message: 'Missing trailing comma.', + messageId: 'missing', + severity: 1, + nodeType: 'FunctionDeclaration', + line: 3, + column: 2, + endLine: 4, + endColumn: 0, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### comma-dangle > valid + +```js +f( + a, + b +); +``` + +```json +{ + "options": [ + "always-multiline" + ], + "languageOptions": { + "ecmaVersion": 2016 + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/comma-dangle', + message: 'Missing trailing comma.', + messageId: 'missing', + severity: 1, + nodeType: 'CallExpression', + line: 3, + column: 2, + endLine: 4, + endColumn: 0, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### comma-dangle > invalid + +```js +foo({ bar: 'baz', qux: 'quux' }); +``` + +```json +{ + "output": "foo({ bar: 'baz', qux: 'quux', });", + "options": [ + "always" + ], + "errors": [ + { + "messageId": "missing", + "line": 1, + "column": 30, + "endLine": 1, + "endColumn": 31 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 2: [ + { + ruleId: 'rule-to-test/comma-dangle', + message: 'Missing trailing comma.', + messageId: 'missing', + severity: 1, + nodeType: 'CallExpression', + line: 1, + column: 31, + endLine: 1, + endColumn: 32, + suggestions: null + }, + { + ruleId: 'rule-to-test/comma-dangle', + message: 'Missing trailing comma.', + messageId: 'missing', + severity: 1, + nodeType: 'ObjectExpression', + line: 1, + column: 29, + endLine: 1, + endColumn: 30, + suggestions: null + } +] + +2 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### comma-dangle > invalid + +```js +foo({ +bar: 'baz', +qux: 'quux' +}); +``` + +```json +{ + "output": "foo({\nbar: 'baz',\nqux: 'quux',\n});", + "options": [ + "always" + ], + "errors": [ + { + "messageId": "missing", + "line": 3, + "column": 12, + "endLine": 4, + "endColumn": 1 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 2: [ + { + ruleId: 'rule-to-test/comma-dangle', + message: 'Missing trailing comma.', + messageId: 'missing', + severity: 1, + nodeType: 'CallExpression', + line: 4, + column: 1, + endLine: 4, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/comma-dangle', + message: 'Missing trailing comma.', + messageId: 'missing', + severity: 1, + nodeType: 'ObjectExpression', + line: 3, + column: 11, + endLine: 4, + endColumn: 0, + suggestions: null + } +] + +2 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### comma-dangle > invalid + +```js +function foo({a}: {a: string,}) {} +``` + +```json +{ + "output": "function foo({a,}: {a: string,}) {}", + "options": [ + "always" + ], + "languageOptions": { + "parser": {} + }, + "errors": [ + { + "messageId": "missing" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### comma-dangle > invalid + +```js +function foo({a,}: {a: string}) {} +``` + +```json +{ + "output": "function foo({a}: {a: string}) {}", + "options": [ + "never" + ], + "languageOptions": { + "parser": {} + }, + "errors": [ + { + "messageId": "unexpected" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### comma-dangle > invalid + +```js +function foo(a): {b: boolean,} {} +``` + +```json +{ + "output": "function foo(a,): {b: boolean,} {}", + "options": [ + { + "functions": "always" + } + ], + "languageOptions": { + "parser": {} + }, + "errors": [ + { + "messageId": "missing" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### comma-dangle > invalid + +```js +function foo(a,): {b: boolean} {} +``` + +```json +{ + "output": "function foo(a): {b: boolean} {}", + "options": [ + { + "functions": "never" + } + ], + "languageOptions": { + "parser": {} + }, + "errors": [ + { + "messageId": "unexpected" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### comma-dangle > invalid + +```js +/*eslint custom/add-named-import:1*/ +import { + StyleSheet, + View, + TextInput, + ImageBackground, + Image, + TouchableOpacity, + SafeAreaView +} from 'react-native'; +``` + +```json +{ + "output": "/*eslint custom/add-named-import:1*/\nimport {\n StyleSheet,\n View,\n TextInput,\n ImageBackground,\n Image,\n TouchableOpacity,\n SafeAreaView,\n} from 'react-native';", + "options": [ + { + "imports": "always-multiline" + } + ], + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + }, + "errors": 2 +} +``` + +AssertionError [ERR_ASSERTION]: Should have 2 errors but had 1: [ + { + ruleId: 'rule-to-test/comma-dangle', + message: 'Missing trailing comma.', + messageId: 'missing', + severity: 1, + nodeType: 'ImportDeclaration', + line: 9, + column: 16, + endLine: 10, + endColumn: 0, + suggestions: null + } +] + +1 !== 2 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### comma-dangle > invalid + +```js +/*eslint custom/add-named-import:1*/ +import { + StyleSheet, + View, + TextInput, + ImageBackground, + Image, + TouchableOpacity, + SafeAreaView, +} from 'react-native'; +``` + +```json +{ + "output": "/*eslint custom/add-named-import:1*/\nimport {\n StyleSheet,\n View,\n TextInput,\n ImageBackground,\n Image,\n TouchableOpacity,\n SafeAreaView\n} from 'react-native';", + "options": [ + { + "imports": "never" + } + ], + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + }, + "errors": 2 +} +``` + +AssertionError [ERR_ASSERTION]: Should have 2 errors but had 1: [ + { + ruleId: 'rule-to-test/comma-dangle', + message: 'Unexpected trailing comma.', + messageId: 'unexpected', + severity: 1, + nodeType: 'ImportDeclaration', + line: 9, + column: 16, + endLine: 9, + endColumn: 17, + suggestions: null + } +] + +1 !== 2 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +### `complexity` + +Pass: 69 / 165 (41.8%) +Fail: 96 / 165 (58.2%) + +#### complexity > invalid + +```js +function a(x) {} +``` + +```json +{ + "options": [ + 0 + ], + "errors": [ + { + "messageId": "complex", + "data": { + "name": "Function 'a'", + "complexity": 1, + "max": 0 + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### complexity > invalid + +```js +function foo(x) {if (x > 10) {return 'x is greater than 10';} else if (x > 5) {return 'x is greater than 5';} else {return 'x is less than 5';}} +``` + +```json +{ + "options": [ + 2 + ], + "errors": [ + { + "messageId": "complex", + "data": { + "name": "Function 'foo'", + "complexity": 3, + "max": 2 + }, + "column": 1, + "endColumn": 13 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### complexity > invalid + +```js +var func = function () {} +``` + +```json +{ + "options": [ + 0 + ], + "errors": [ + { + "messageId": "complex", + "data": { + "name": "Function", + "complexity": 1, + "max": 0 + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### complexity > invalid + +```js +var obj = { a(x) {} } +``` + +```json +{ + "options": [ + 0 + ], + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "complex", + "data": { + "name": "Method 'a'", + "complexity": 1, + "max": 0 + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### complexity > invalid + +```js +class Test { a(x) {} } +``` + +```json +{ + "options": [ + 0 + ], + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "complex", + "data": { + "name": "Method 'a'", + "complexity": 1, + "max": 0 + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### complexity > invalid + +```js +var a = (x) => {if (true) {return x;}} +``` + +```json +{ + "options": [ + 1 + ], + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": 1 +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### complexity > invalid + +```js +function a(x) {if (true) {return x;}} +``` + +```json +{ + "options": [ + 1 + ], + "errors": 1 +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### complexity > invalid + +```js +function a(x) {if (true) {return x;} else {return x+1;}} +``` + +```json +{ + "options": [ + 1 + ], + "errors": 1 +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### complexity > invalid + +```js +function a(x) {if (true) {return x;} else if (false) {return x+1;} else {return 4;}} +``` + +```json +{ + "options": [ + 2 + ], + "errors": 1 +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### complexity > invalid + +```js +function a(x) {for(var i = 0; i < 5; i ++) {x ++;} return x;} +``` + +```json +{ + "options": [ + 1 + ], + "errors": 1 +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### complexity > invalid + +```js +function a(obj) {for(var i in obj) {obj[i] = 3;}} +``` + +```json +{ + "options": [ + 1 + ], + "errors": 1 +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### complexity > invalid + +```js +function a(obj) {for(var i of obj) {obj[i] = 3;}} +``` + +```json +{ + "options": [ + 1 + ], + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": 1 +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### complexity > invalid + +```js +function a(x) {for(var i = 0; i < 5; i ++) {if(i % 2 === 0) {x ++;}} return x;} +``` + +```json +{ + "options": [ + 2 + ], + "errors": 1 +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### complexity > invalid + +```js +function a(obj) {if(obj){ for(var x in obj) {try {x.getThis();} catch (e) {x.getThat();}}} else {return false;}} +``` + +```json +{ + "options": [ + 3 + ], + "errors": 1 +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### complexity > invalid + +```js +function a(x) {try {x.getThis();} catch (e) {x.getThat();}} +``` + +```json +{ + "options": [ + 1 + ], + "errors": 1 +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### complexity > invalid + +```js +function a(x) {return x === 4 ? 3 : 5;} +``` + +```json +{ + "options": [ + 1 + ], + "errors": 1 +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### complexity > invalid + +```js +function a(x) {return x === 4 ? 3 : (x === 3 ? 2 : 1);} +``` + +```json +{ + "options": [ + 2 + ], + "errors": 1 +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### complexity > invalid + +```js +function a(x) {return x || 4;} +``` + +```json +{ + "options": [ + 1 + ], + "errors": 1 +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### complexity > invalid + +```js +function a(x) {x && 4;} +``` + +```json +{ + "options": [ + 1 + ], + "errors": 1 +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### complexity > invalid + +```js +function a(x) {x ?? 4;} +``` + +```json +{ + "options": [ + 1 + ], + "errors": 1 +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### complexity > invalid + +```js +function a(x) {x ||= 4;} +``` + +```json +{ + "options": [ + 1 + ], + "errors": 1 +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### complexity > invalid + +```js +function a(x) {x &&= 4;} +``` + +```json +{ + "options": [ + 1 + ], + "errors": 1 +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### complexity > invalid + +```js +function a(x) {x ??= 4;} +``` + +```json +{ + "options": [ + 1 + ], + "errors": 1 +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### complexity > invalid + +```js +function a(x) {switch(x){case 1: 1; break; case 2: 2; break; default: 3;}} +``` + +```json +{ + "options": [ + 2 + ], + "errors": 1 +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### complexity > invalid + +```js +function a(x) {switch(x){case 1: 1; break; case 2: 2; break; default: if(x == 'foo') {5;};}} +``` + +```json +{ + "options": [ + 3 + ], + "errors": 1 +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### complexity > invalid + +```js +function a(x) {while(true) {'foo';}} +``` + +```json +{ + "options": [ + 1 + ], + "errors": 1 +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### complexity > invalid + +```js +function a(x) {do {'foo';} while (true)} +``` + +```json +{ + "options": [ + 1 + ], + "errors": 1 +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### complexity > invalid + +```js +function a(x) {(function() {while(true){'foo';}})(); (function() {while(true){'bar';}})();} +``` + +```json +{ + "options": [ + 1 + ], + "errors": 2 +} +``` + +AssertionError [ERR_ASSERTION]: Should have 2 errors but had 0: [] + +0 !== 2 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### complexity > invalid + +```js +function a(x) {(function() {while(true){'foo';}})(); (function() {'bar';})();} +``` + +```json +{ + "options": [ + 1 + ], + "errors": 1 +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### complexity > invalid + +```js +var obj = { a(x) { return x ? 0 : 1; } }; +``` + +```json +{ + "options": [ + 1 + ], + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "complex", + "data": { + "name": "Method 'a'", + "complexity": 2, + "max": 1 + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### complexity > invalid + +```js +var obj = { a: function b(x) { return x ? 0 : 1; } }; +``` + +```json +{ + "options": [ + 1 + ], + "errors": [ + { + "messageId": "complex", + "data": { + "name": "Method 'a'", + "complexity": 2, + "max": 1 + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### complexity > invalid + +```js +function test (a) { if (a === 1) {} else if (a === 2) {} else if (a === 3) {} else if (a === 4) {} else if (a === 5) {} else if (a === 6) {} else if (a === 7) {} else if (a === 8) {} else if (a === 9) {} else if (a === 10) {} else if (a === 11) {} else if (a === 12) {} else if (a === 13) {} else if (a === 14) {} else if (a === 15) {} else if (a === 16) {} else if (a === 17) {} else if (a === 18) {} else if (a === 19) {} else if (a === 20) {} }; +``` + +```json +{ + "errors": [ + { + "messageId": "complex", + "data": { + "name": "Function 'test'", + "complexity": 21, + "max": 20 + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### complexity > invalid + +```js +function test (a) { if (a === 1) {} else if (a === 2) {} else if (a === 3) {} else if (a === 4) {} else if (a === 5) {} else if (a === 6) {} else if (a === 7) {} else if (a === 8) {} else if (a === 9) {} else if (a === 10) {} else if (a === 11) {} else if (a === 12) {} else if (a === 13) {} else if (a === 14) {} else if (a === 15) {} else if (a === 16) {} else if (a === 17) {} else if (a === 18) {} else if (a === 19) {} else if (a === 20) {} }; +``` + +```json +{ + "options": [ + {} + ], + "errors": [ + { + "messageId": "complex", + "data": { + "name": "Function 'test'", + "complexity": 21, + "max": 20 + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### complexity > invalid + +```js +function a(x) {switch(x){case 1: 1; break; case 2: 2; break; default: 3;}} +``` + +```json +{ + "options": [ + { + "max": 1, + "variant": "modified" + } + ], + "errors": [ + { + "messageId": "complex", + "data": { + "name": "Function 'a'", + "complexity": 2, + "max": 1 + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### complexity > invalid + +```js +function a(x) {switch(x){case 1: 1; break; case 2: 2; break; default: if(x == 'foo') {5;};}} +``` + +```json +{ + "options": [ + { + "max": 2, + "variant": "modified" + } + ], + "errors": [ + { + "messageId": "complex", + "data": { + "name": "Function 'a'", + "complexity": 3, + "max": 2 + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### complexity > invalid + +```js +function foo () { a || b; class C { x; } c || d; } +``` + +```json +{ + "options": [ + 2 + ], + "languageOptions": { + "ecmaVersion": 2022 + }, + "errors": [ + { + "messageId": "complex", + "data": { + "name": "Function 'foo'", + "complexity": 3, + "max": 2 + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### complexity > invalid + +```js +function foo () { a || b; class C { x = c; } d || e; } +``` + +```json +{ + "options": [ + 2 + ], + "languageOptions": { + "ecmaVersion": 2022 + }, + "errors": [ + { + "messageId": "complex", + "data": { + "name": "Function 'foo'", + "complexity": 3, + "max": 2 + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### complexity > invalid + +```js +function foo () { a || b; class C { [x || y]; } } +``` + +```json +{ + "options": [ + 2 + ], + "languageOptions": { + "ecmaVersion": 2022 + }, + "errors": [ + { + "messageId": "complex", + "data": { + "name": "Function 'foo'", + "complexity": 3, + "max": 2 + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### complexity > invalid + +```js +function foo () { a || b; class C { [x || y] = c; } } +``` + +```json +{ + "options": [ + 2 + ], + "languageOptions": { + "ecmaVersion": 2022 + }, + "errors": [ + { + "messageId": "complex", + "data": { + "name": "Function 'foo'", + "complexity": 3, + "max": 2 + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### complexity > invalid + +```js +function foo () { class C { [x || y]; } a || b; } +``` + +```json +{ + "options": [ + 2 + ], + "languageOptions": { + "ecmaVersion": 2022 + }, + "errors": [ + { + "messageId": "complex", + "data": { + "name": "Function 'foo'", + "complexity": 3, + "max": 2 + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### complexity > invalid + +```js +function foo () { class C { [x || y] = a; } b || c; } +``` + +```json +{ + "options": [ + 2 + ], + "languageOptions": { + "ecmaVersion": 2022 + }, + "errors": [ + { + "messageId": "complex", + "data": { + "name": "Function 'foo'", + "complexity": 3, + "max": 2 + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### complexity > invalid + +```js +function foo () { class C { [x || y]; [z || q]; } } +``` + +```json +{ + "options": [ + 2 + ], + "languageOptions": { + "ecmaVersion": 2022 + }, + "errors": [ + { + "messageId": "complex", + "data": { + "name": "Function 'foo'", + "complexity": 3, + "max": 2 + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### complexity > invalid + +```js +function foo () { class C { [x || y] = a; [z || q] = b; } } +``` + +```json +{ + "options": [ + 2 + ], + "languageOptions": { + "ecmaVersion": 2022 + }, + "errors": [ + { + "messageId": "complex", + "data": { + "name": "Function 'foo'", + "complexity": 3, + "max": 2 + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### complexity > invalid + +```js +function foo () { a || b; class C { x = c || d; } e || f; } +``` + +```json +{ + "options": [ + 2 + ], + "languageOptions": { + "ecmaVersion": 2022 + }, + "errors": [ + { + "messageId": "complex", + "data": { + "name": "Function 'foo'", + "complexity": 3, + "max": 2 + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### complexity > invalid + +```js +class C { x(){ a || b; } y = c || d || e; z() { f || g; } } +``` + +```json +{ + "options": [ + 2 + ], + "languageOptions": { + "ecmaVersion": 2022 + }, + "errors": [ + { + "messageId": "complex", + "data": { + "name": "Class field initializer", + "complexity": 3, + "max": 2 + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### complexity > invalid + +```js +class C { x = a || b; y() { c || d || e; } z = f || g; } +``` + +```json +{ + "options": [ + 2 + ], + "languageOptions": { + "ecmaVersion": 2022 + }, + "errors": [ + { + "messageId": "complex", + "data": { + "name": "Method 'y'", + "complexity": 3, + "max": 2 + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### complexity > invalid + +```js +class C { x; y() { c || d || e; } z; } +``` + +```json +{ + "options": [ + 2 + ], + "languageOptions": { + "ecmaVersion": 2022 + }, + "errors": [ + { + "messageId": "complex", + "data": { + "name": "Method 'y'", + "complexity": 3, + "max": 2 + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### complexity > invalid + +```js +class C { x = a || b; } +``` + +```json +{ + "options": [ + 1 + ], + "languageOptions": { + "ecmaVersion": 2022 + }, + "errors": [ + { + "messageId": "complex", + "data": { + "name": "Class field initializer", + "complexity": 2, + "max": 1 + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### complexity > invalid + +```js +(class { x = a || b; }) +``` + +```json +{ + "options": [ + 1 + ], + "languageOptions": { + "ecmaVersion": 2022 + }, + "errors": [ + { + "messageId": "complex", + "data": { + "name": "Class field initializer", + "complexity": 2, + "max": 1 + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### complexity > invalid + +```js +class C { static x = a || b; } +``` + +```json +{ + "options": [ + 1 + ], + "languageOptions": { + "ecmaVersion": 2022 + }, + "errors": [ + { + "messageId": "complex", + "data": { + "name": "Class field initializer", + "complexity": 2, + "max": 1 + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### complexity > invalid + +```js +(class { x = a ? b : c; }) +``` + +```json +{ + "options": [ + 1 + ], + "languageOptions": { + "ecmaVersion": 2022 + }, + "errors": [ + { + "messageId": "complex", + "data": { + "name": "Class field initializer", + "complexity": 2, + "max": 1 + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### complexity > invalid + +```js +class C { x = a || b || c; } +``` + +```json +{ + "options": [ + 2 + ], + "languageOptions": { + "ecmaVersion": 2022 + }, + "errors": [ + { + "messageId": "complex", + "data": { + "name": "Class field initializer", + "complexity": 3, + "max": 2 + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### complexity > invalid + +```js +class C { x = a || b; y = b || c || d; z = e || f; } +``` + +```json +{ + "options": [ + 2 + ], + "languageOptions": { + "ecmaVersion": 2022 + }, + "errors": [ + { + "messageId": "complex", + "data": { + "name": "Class field initializer", + "complexity": 3, + "max": 2 + }, + "line": 1, + "column": 27, + "endLine": 1, + "endColumn": 38 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### complexity > invalid + +```js +class C { x = a || b || c; y = d || e; z = f || g || h; } +``` + +```json +{ + "options": [ + 2 + ], + "languageOptions": { + "ecmaVersion": 2022 + }, + "errors": [ + { + "messageId": "complex", + "data": { + "name": "Class field initializer", + "complexity": 3, + "max": 2 + }, + "line": 1, + "column": 15, + "endLine": 1, + "endColumn": 26 + }, + { + "messageId": "complex", + "data": { + "name": "Class field initializer", + "complexity": 3, + "max": 2 + }, + "line": 1, + "column": 44, + "endLine": 1, + "endColumn": 55 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 2 errors but had 0: [] + +0 !== 2 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### complexity > invalid + +```js +class C { x = () => a || b || c; } +``` + +```json +{ + "options": [ + 2 + ], + "languageOptions": { + "ecmaVersion": 2022 + }, + "errors": [ + { + "messageId": "complex", + "data": { + "name": "Method 'x'", + "complexity": 3, + "max": 2 + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### complexity > invalid + +```js +class C { x = (() => a || b || c) || d; } +``` + +```json +{ + "options": [ + 2 + ], + "languageOptions": { + "ecmaVersion": 2022 + }, + "errors": [ + { + "messageId": "complex", + "data": { + "name": "Arrow function", + "complexity": 3, + "max": 2 + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### complexity > invalid + +```js +class C { x = () => a || b || c; y = d || e; } +``` + +```json +{ + "options": [ + 2 + ], + "languageOptions": { + "ecmaVersion": 2022 + }, + "errors": [ + { + "messageId": "complex", + "data": { + "name": "Method 'x'", + "complexity": 3, + "max": 2 + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### complexity > invalid + +```js +class C { x = () => a || b || c; y = d || e || f; } +``` + +```json +{ + "options": [ + 2 + ], + "languageOptions": { + "ecmaVersion": 2022 + }, + "errors": [ + { + "messageId": "complex", + "data": { + "name": "Method 'x'", + "complexity": 3, + "max": 2 + } + }, + { + "messageId": "complex", + "data": { + "name": "Class field initializer", + "complexity": 3, + "max": 2 + }, + "line": 1, + "column": 38, + "endLine": 1, + "endColumn": 49 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 2 errors but had 0: [] + +0 !== 2 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### complexity > invalid + +```js +class C { x = function () { a || b }; y = function () { c || d }; } +``` + +```json +{ + "options": [ + 1 + ], + "languageOptions": { + "ecmaVersion": 2022 + }, + "errors": [ + { + "messageId": "complex", + "data": { + "name": "Method 'x'", + "complexity": 2, + "max": 1 + } + }, + { + "messageId": "complex", + "data": { + "name": "Method 'y'", + "complexity": 2, + "max": 1 + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 2 errors but had 0: [] + +0 !== 2 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### complexity > invalid + +```js +class C { x = class { [y || z]; }; } +``` + +```json +{ + "options": [ + 1 + ], + "languageOptions": { + "ecmaVersion": 2022 + }, + "errors": [ + { + "messageId": "complex", + "data": { + "name": "Class field initializer", + "complexity": 2, + "max": 1 + }, + "line": 1, + "column": 15, + "endLine": 1, + "endColumn": 34 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### complexity > invalid + +```js +class C { x = class { [y || z] = a; }; } +``` + +```json +{ + "options": [ + 1 + ], + "languageOptions": { + "ecmaVersion": 2022 + }, + "errors": [ + { + "messageId": "complex", + "data": { + "name": "Class field initializer", + "complexity": 2, + "max": 1 + }, + "line": 1, + "column": 15, + "endLine": 1, + "endColumn": 38 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### complexity > invalid + +```js +class C { x = class { y = a || b; }; } +``` + +```json +{ + "options": [ + 1 + ], + "languageOptions": { + "ecmaVersion": 2022 + }, + "errors": [ + { + "messageId": "complex", + "data": { + "name": "Class field initializer", + "complexity": 2, + "max": 1 + }, + "line": 1, + "column": 27, + "endLine": 1, + "endColumn": 33 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### complexity > invalid + +```js +function foo () { a || b; class C { static {} } c || d; } +``` + +```json +{ + "options": [ + 2 + ], + "languageOptions": { + "ecmaVersion": 2022 + }, + "errors": [ + { + "messageId": "complex", + "data": { + "name": "Function 'foo'", + "complexity": 3, + "max": 2 + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### complexity > invalid + +```js +function foo () { a || b; class C { static { c || d; } } e || f; } +``` + +```json +{ + "options": [ + 2 + ], + "languageOptions": { + "ecmaVersion": 2022 + }, + "errors": [ + { + "messageId": "complex", + "data": { + "name": "Function 'foo'", + "complexity": 3, + "max": 2 + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### complexity > invalid + +```js +class C { static { a || b; } } +``` + +```json +{ + "options": [ + 1 + ], + "languageOptions": { + "ecmaVersion": 2022 + }, + "errors": [ + { + "messageId": "complex", + "data": { + "name": "Class static block", + "complexity": 2, + "max": 1 + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### complexity > invalid + +```js +class C { static { a || b || c; } } +``` + +```json +{ + "options": [ + 2 + ], + "languageOptions": { + "ecmaVersion": 2022 + }, + "errors": [ + { + "messageId": "complex", + "data": { + "name": "Class static block", + "complexity": 3, + "max": 2 + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### complexity > invalid + +```js +class C { static { a || b; c || d; } } +``` + +```json +{ + "options": [ + 2 + ], + "languageOptions": { + "ecmaVersion": 2022 + }, + "errors": [ + { + "messageId": "complex", + "data": { + "name": "Class static block", + "complexity": 3, + "max": 2 + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### complexity > invalid + +```js +class C { static { a || b; c || d; e || f; } } +``` + +```json +{ + "options": [ + 3 + ], + "languageOptions": { + "ecmaVersion": 2022 + }, + "errors": [ + { + "messageId": "complex", + "data": { + "name": "Class static block", + "complexity": 4, + "max": 3 + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### complexity > invalid + +```js +class C { static { a || b; c || d; { e || f; } } } +``` + +```json +{ + "options": [ + 3 + ], + "languageOptions": { + "ecmaVersion": 2022 + }, + "errors": [ + { + "messageId": "complex", + "data": { + "name": "Class static block", + "complexity": 4, + "max": 3 + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### complexity > invalid + +```js +class C { static { if (a || b) c = d || e; } } +``` + +```json +{ + "options": [ + 3 + ], + "languageOptions": { + "ecmaVersion": 2022 + }, + "errors": [ + { + "messageId": "complex", + "data": { + "name": "Class static block", + "complexity": 4, + "max": 3 + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### complexity > invalid + +```js +class C { static { if (a || b) c = (d => e || f)() || (g => h || i)(); } } +``` + +```json +{ + "options": [ + 3 + ], + "languageOptions": { + "ecmaVersion": 2022 + }, + "errors": [ + { + "messageId": "complex", + "data": { + "name": "Class static block", + "complexity": 4, + "max": 3 + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### complexity > invalid + +```js +class C { x(){ a || b; } static { c || d || e; } z() { f || g; } } +``` + +```json +{ + "options": [ + 2 + ], + "languageOptions": { + "ecmaVersion": 2022 + }, + "errors": [ + { + "messageId": "complex", + "data": { + "name": "Class static block", + "complexity": 3, + "max": 2 + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### complexity > invalid + +```js +class C { x = a || b; static { c || d || e; } y = f || g; } +``` + +```json +{ + "options": [ + 2 + ], + "languageOptions": { + "ecmaVersion": 2022 + }, + "errors": [ + { + "messageId": "complex", + "data": { + "name": "Class static block", + "complexity": 3, + "max": 2 + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### complexity > invalid + +```js +class C { static x = a || b; static { c || d || e; } static y = f || g; } +``` + +```json +{ + "options": [ + 2 + ], + "languageOptions": { + "ecmaVersion": 2022 + }, + "errors": [ + { + "messageId": "complex", + "data": { + "name": "Class static block", + "complexity": 3, + "max": 2 + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### complexity > invalid + +```js +class C { static { a || b; } static(){ c || d || e; } static { f || g; } } +``` + +```json +{ + "options": [ + 2 + ], + "languageOptions": { + "ecmaVersion": 2022 + }, + "errors": [ + { + "messageId": "complex", + "data": { + "name": "Method 'static'", + "complexity": 3, + "max": 2 + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### complexity > invalid + +```js +class C { static { a || b; } static static(){ c || d || e; } static { f || g; } } +``` + +```json +{ + "options": [ + 2 + ], + "languageOptions": { + "ecmaVersion": 2022 + }, + "errors": [ + { + "messageId": "complex", + "data": { + "name": "Static method 'static'", + "complexity": 3, + "max": 2 + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### complexity > invalid + +```js +class C { static { a || b; } static x = c || d || e; static { f || g; } } +``` + +```json +{ + "options": [ + 2 + ], + "languageOptions": { + "ecmaVersion": 2022 + }, + "errors": [ + { + "messageId": "complex", + "data": { + "name": "Class field initializer", + "complexity": 3, + "max": 2 + }, + "column": 41, + "endColumn": 52 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### complexity > invalid + +```js +class C { static { a || b || c || d; } static { e || f || g; } } +``` + +```json +{ + "options": [ + 3 + ], + "languageOptions": { + "ecmaVersion": 2022 + }, + "errors": [ + { + "messageId": "complex", + "data": { + "name": "Class static block", + "complexity": 4, + "max": 3 + }, + "column": 11, + "endColumn": 17 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### complexity > invalid + +```js +class C { static { a || b || c; } static { d || e || f || g; } } +``` + +```json +{ + "options": [ + 3 + ], + "languageOptions": { + "ecmaVersion": 2022 + }, + "errors": [ + { + "messageId": "complex", + "data": { + "name": "Class static block", + "complexity": 4, + "max": 3 + }, + "column": 35, + "endColumn": 41 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### complexity > invalid + +```js +class C { static { a || b || c || d; } static { e || f || g || h; } } +``` + +```json +{ + "options": [ + 3 + ], + "languageOptions": { + "ecmaVersion": 2022 + }, + "errors": [ + { + "messageId": "complex", + "data": { + "name": "Class static block", + "complexity": 4, + "max": 3 + }, + "column": 11, + "endColumn": 17 + }, + { + "messageId": "complex", + "data": { + "name": "Class static block", + "complexity": 4, + "max": 3 + }, + "column": 40, + "endColumn": 46 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 2 errors but had 0: [] + +0 !== 2 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### complexity > invalid + +```js +class C { x = () => a || b || c; y = f || g || h; } +``` + +```json +{ + "options": [ + 2 + ], + "languageOptions": { + "ecmaVersion": 2022 + }, + "errors": [ + { + "messageId": "complex", + "data": { + "name": "Method 'x'", + "complexity": 3, + "max": 2 + }, + "column": 11, + "endColumn": 15 + }, + { + "messageId": "complex", + "data": { + "name": "Class field initializer", + "complexity": 3, + "max": 2 + }, + "column": 38, + "endColumn": 49 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 2 errors but had 0: [] + +0 !== 2 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### complexity > invalid + +```js +function a(x) {} +``` + +```json +{ + "options": [ + { + "max": 0 + } + ], + "errors": [ + { + "messageId": "complex", + "data": { + "name": "Function 'a'", + "complexity": 1, + "max": 0 + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### complexity > invalid + +```js +const obj = { b: (a) => a?.b?.c, c: function (a) { return a?.b?.c; } }; +``` + +```json +{ + "options": [ + { + "max": 2 + } + ], + "errors": [ + { + "messageId": "complex", + "data": { + "name": "Method 'b'", + "complexity": 3, + "max": 2 + }, + "column": 15, + "endColumn": 18 + }, + { + "messageId": "complex", + "data": { + "name": "Method 'c'", + "complexity": 3, + "max": 2 + }, + "column": 34, + "endColumn": 46 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 2 errors but had 0: [] + +0 !== 2 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### complexity > invalid + +```js +function a(b) { b?.c; } +``` + +```json +{ + "options": [ + { + "max": 1 + } + ], + "errors": [ + { + "messageId": "complex", + "data": { + "name": "Function 'a'", + "complexity": 2, + "max": 1 + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### complexity > invalid + +```js +function a(b) { b?.['c']; } +``` + +```json +{ + "options": [ + { + "max": 1 + } + ], + "errors": [ + { + "messageId": "complex", + "data": { + "name": "Function 'a'", + "complexity": 2, + "max": 1 + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### complexity > invalid + +```js +function a(b) { b?.c; d || e; } +``` + +```json +{ + "options": [ + { + "max": 2 + } + ], + "errors": [ + { + "messageId": "complex", + "data": { + "name": "Function 'a'", + "complexity": 3, + "max": 2 + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### complexity > invalid + +```js +function a(b) { b?.c?.d; } +``` + +```json +{ + "options": [ + { + "max": 2 + } + ], + "errors": [ + { + "messageId": "complex", + "data": { + "name": "Function 'a'", + "complexity": 3, + "max": 2 + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### complexity > invalid + +```js +function a(b) { b?.['c']?.['d']; } +``` + +```json +{ + "options": [ + { + "max": 2 + } + ], + "errors": [ + { + "messageId": "complex", + "data": { + "name": "Function 'a'", + "complexity": 3, + "max": 2 + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### complexity > invalid + +```js +function a(b) { b?.c?.['d']; } +``` + +```json +{ + "options": [ + { + "max": 2 + } + ], + "errors": [ + { + "messageId": "complex", + "data": { + "name": "Function 'a'", + "complexity": 3, + "max": 2 + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### complexity > invalid + +```js +function a(b) { b?.c.d?.e; } +``` + +```json +{ + "options": [ + { + "max": 2 + } + ], + "errors": [ + { + "messageId": "complex", + "data": { + "name": "Function 'a'", + "complexity": 3, + "max": 2 + }, + "column": 1, + "endColumn": 11 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### complexity > invalid + +```js +function a(b) { b?.c?.(); } +``` + +```json +{ + "options": [ + { + "max": 2 + } + ], + "errors": [ + { + "messageId": "complex", + "data": { + "name": "Function 'a'", + "complexity": 3, + "max": 2 + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### complexity > invalid + +```js +function a(b) { b?.c?.()?.(); } +``` + +```json +{ + "options": [ + { + "max": 3 + } + ], + "errors": [ + { + "messageId": "complex", + "data": { + "name": "Function 'a'", + "complexity": 4, + "max": 3 + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### complexity > invalid + +```js +function a(b = '') {} +``` + +```json +{ + "options": [ + { + "max": 1 + } + ], + "errors": [ + { + "messageId": "complex", + "data": { + "name": "Function 'a'", + "complexity": 2, + "max": 1 + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### complexity > invalid + +```js +function a(b) { const { c = '' } = b; } +``` + +```json +{ + "options": [ + { + "max": 1 + } + ], + "errors": [ + { + "messageId": "complex", + "data": { + "name": "Function 'a'", + "complexity": 2, + "max": 1 + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### complexity > invalid + +```js +function a(b) { const [ c = '' ] = b; } +``` + +```json +{ + "options": [ + { + "max": 1 + } + ], + "errors": [ + { + "messageId": "complex", + "data": { + "name": "Function 'a'", + "complexity": 2, + "max": 1 + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### complexity > invalid + +```js +function a(b) { const [ { c: d = '' } = {} ] = b; } +``` + +```json +{ + "options": [ + { + "max": 1 + } + ], + "errors": [ + { + "messageId": "complex", + "data": { + "name": "Function 'a'", + "complexity": 3, + "max": 1 + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +### `computed-property-spacing` + +Pass: 120 / 125 (96.0%) +Fail: 5 / 125 (4.0%) + +#### computed-property-spacing > invalid + +```js +A = class { [ a ](){} get [ b ](){} set [ c ](foo){} static [ d ](){} static get [ e ](){} static set [ f ](bar){} } +``` + +```json +{ + "output": "A = class { [a](){} get [b](){} set [c](foo){} static [d](){} static get [e](){} static set [f](bar){} }", + "options": [ + "never", + {} + ], + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "unexpectedSpaceAfter", + "data": { + "tokenValue": "[" + }, + "line": 1, + "column": 14, + "endLine": 1, + "endColumn": 15 + }, + { + "messageId": "unexpectedSpaceBefore", + "data": { + "tokenValue": "]" + }, + "line": 1, + "column": 16, + "endLine": 1, + "endColumn": 17 + }, + { + "messageId": "unexpectedSpaceAfter", + "data": { + "tokenValue": "[" + }, + "line": 1, + "column": 28, + "endLine": 1, + "endColumn": 29 + }, + { + "messageId": "unexpectedSpaceBefore", + "data": { + "tokenValue": "]" + }, + "line": 1, + "column": 30, + "endLine": 1, + "endColumn": 31 + }, + { + "messageId": "unexpectedSpaceAfter", + "data": { + "tokenValue": "[" + }, + "line": 1, + "column": 42, + "endLine": 1, + "endColumn": 43 + }, + { + "messageId": "unexpectedSpaceBefore", + "data": { + "tokenValue": "]" + }, + "line": 1, + "column": 44, + "endLine": 1, + "endColumn": 45 + }, + { + "messageId": "unexpectedSpaceAfter", + "data": { + "tokenValue": "[" + }, + "line": 1, + "column": 62, + "endLine": 1, + "endColumn": 63 + }, + { + "messageId": "unexpectedSpaceBefore", + "data": { + "tokenValue": "]" + }, + "line": 1, + "column": 64, + "endLine": 1, + "endColumn": 65 + }, + { + "messageId": "unexpectedSpaceAfter", + "data": { + "tokenValue": "[" + }, + "line": 1, + "column": 83, + "endLine": 1, + "endColumn": 84 + }, + { + "messageId": "unexpectedSpaceBefore", + "data": { + "tokenValue": "]" + }, + "line": 1, + "column": 85, + "endLine": 1, + "endColumn": 86 + }, + { + "messageId": "unexpectedSpaceAfter", + "data": { + "tokenValue": "[" + }, + "line": 1, + "column": 104, + "endLine": 1, + "endColumn": 105 + }, + { + "messageId": "unexpectedSpaceBefore", + "data": { + "tokenValue": "]" + }, + "line": 1, + "column": 106, + "endLine": 1, + "endColumn": 107 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 12 errors but had 0: [] + +0 !== 12 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### computed-property-spacing > invalid + +```js +class A { [a](){} get [b](){} set [c](foo){} static [d](){} static get [e](){} static set [f](bar){} } +``` + +```json +{ + "output": "class A { [ a ](){} get [ b ](){} set [ c ](foo){} static [ d ](){} static get [ e ](){} static set [ f ](bar){} }", + "options": [ + "always", + {} + ], + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "missingSpaceAfter", + "data": { + "tokenValue": "[" + }, + "line": 1, + "column": 11, + "endLine": 1, + "endColumn": 12 + }, + { + "messageId": "missingSpaceBefore", + "data": { + "tokenValue": "]" + }, + "line": 1, + "column": 13, + "endLine": 1, + "endColumn": 14 + }, + { + "messageId": "missingSpaceAfter", + "data": { + "tokenValue": "[" + }, + "line": 1, + "column": 23, + "endLine": 1, + "endColumn": 24 + }, + { + "messageId": "missingSpaceBefore", + "data": { + "tokenValue": "]" + }, + "line": 1, + "column": 25, + "endLine": 1, + "endColumn": 26 + }, + { + "messageId": "missingSpaceAfter", + "data": { + "tokenValue": "[" + }, + "line": 1, + "column": 35, + "endLine": 1, + "endColumn": 36 + }, + { + "messageId": "missingSpaceBefore", + "data": { + "tokenValue": "]" + }, + "line": 1, + "column": 37, + "endLine": 1, + "endColumn": 38 + }, + { + "messageId": "missingSpaceAfter", + "data": { + "tokenValue": "[" + }, + "line": 1, + "column": 53, + "endLine": 1, + "endColumn": 54 + }, + { + "messageId": "missingSpaceBefore", + "data": { + "tokenValue": "]" + }, + "line": 1, + "column": 55, + "endLine": 1, + "endColumn": 56 + }, + { + "messageId": "missingSpaceAfter", + "data": { + "tokenValue": "[" + }, + "line": 1, + "column": 72, + "endLine": 1, + "endColumn": 73 + }, + { + "messageId": "missingSpaceBefore", + "data": { + "tokenValue": "]" + }, + "line": 1, + "column": 74, + "endLine": 1, + "endColumn": 75 + }, + { + "messageId": "missingSpaceAfter", + "data": { + "tokenValue": "[" + }, + "line": 1, + "column": 91, + "endLine": 1, + "endColumn": 92 + }, + { + "messageId": "missingSpaceBefore", + "data": { + "tokenValue": "]" + }, + "line": 1, + "column": 93, + "endLine": 1, + "endColumn": 94 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 12 errors but had 0: [] + +0 !== 12 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### computed-property-spacing > invalid + +```js +const foo = { + [a[b]]: 1 +} +``` + +```json +{ + "output": "const foo = {\n [ a[ b ] ]: 1\n}", + "options": [ + "always" + ], + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "missingSpaceAfter", + "data": { + "tokenValue": "[" + }, + "line": 2, + "column": 3, + "endLine": 2, + "endColumn": 4 + }, + { + "messageId": "missingSpaceAfter", + "data": { + "tokenValue": "[" + }, + "line": 2, + "column": 5, + "endLine": 2, + "endColumn": 6 + }, + { + "messageId": "missingSpaceBefore", + "data": { + "tokenValue": "]" + }, + "line": 2, + "column": 7, + "endLine": 2, + "endColumn": 8 + }, + { + "messageId": "missingSpaceBefore", + "data": { + "tokenValue": "]" + }, + "line": 2, + "column": 8, + "endLine": 2, + "endColumn": 9 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: messageId 'missingSpaceBefore' does not match expected messageId 'missingSpaceAfter' ++ actual - expected + ++ 'missingSpaceBefore' +- 'missingSpaceAfter' + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### computed-property-spacing > invalid + +```js +const foo = { + [ a[ b ] ]: 1 +} +``` + +```json +{ + "output": "const foo = {\n [a[b]]: 1\n}", + "options": [ + "never" + ], + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "unexpectedSpaceAfter", + "data": { + "tokenValue": "[" + }, + "line": 2, + "column": 4, + "endLine": 2, + "endColumn": 5 + }, + { + "messageId": "unexpectedSpaceAfter", + "data": { + "tokenValue": "[" + }, + "line": 2, + "column": 7, + "endLine": 2, + "endColumn": 8 + }, + { + "messageId": "unexpectedSpaceBefore", + "data": { + "tokenValue": "]" + }, + "line": 2, + "column": 9, + "endLine": 2, + "endColumn": 10 + }, + { + "messageId": "unexpectedSpaceBefore", + "data": { + "tokenValue": "]" + }, + "line": 2, + "column": 11, + "endLine": 2, + "endColumn": 12 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: messageId 'unexpectedSpaceBefore' does not match expected messageId 'unexpectedSpaceAfter' ++ actual - expected + ++ 'unexpectedSpaceBefore' +- 'unexpectedSpaceAfter' + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### computed-property-spacing > invalid + +```js +const foo = { + [a[/**/ b ]/**/]: 1 +} +``` + +```json +{ + "output": "const foo = {\n [ a[ /**/ b ]/**/ ]: 1\n}", + "options": [ + "always" + ], + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "missingSpaceAfter", + "data": { + "tokenValue": "[" + }, + "line": 2, + "column": 3, + "endLine": 2, + "endColumn": 4 + }, + { + "messageId": "missingSpaceAfter", + "data": { + "tokenValue": "[" + }, + "line": 2, + "column": 5, + "endLine": 2, + "endColumn": 6 + }, + { + "messageId": "missingSpaceBefore", + "data": { + "tokenValue": "]" + }, + "line": 2, + "column": 18, + "endLine": 2, + "endColumn": 19 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: messageId 'missingSpaceBefore' does not match expected messageId 'missingSpaceAfter' ++ actual - expected + ++ 'missingSpaceBefore' +- 'missingSpaceAfter' + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +### `consistent-return` + +Pass: 0 / 44 (0.0%) +Fail: 44 / 44 (100.0%) + +#### consistent-return > valid + +```js +function foo() { return; } +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'hasReturn') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/consistent-return.js:189:19) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### consistent-return > valid + +```js +function foo() { if (true) return; } +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'hasReturn') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/consistent-return.js:189:19) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkIfStatement (apps/oxlint/dist/lint.js) + + +#### consistent-return > valid + +```js +function foo() { if (true) return; else return; } +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'hasReturn') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/consistent-return.js:189:19) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkIfStatement (apps/oxlint/dist/lint.js) + + +#### consistent-return > valid + +```js +function foo() { if (true) return true; else return false; } +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'hasReturn') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/consistent-return.js:189:19) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkIfStatement (apps/oxlint/dist/lint.js) + + +#### consistent-return > valid + +```js +f(function() { return; }) +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'hasReturn') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/consistent-return.js:189:19) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### consistent-return > valid + +```js +f(function() { if (true) return; }) +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'hasReturn') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/consistent-return.js:189:19) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkIfStatement (apps/oxlint/dist/lint.js) + + +#### consistent-return > valid + +```js +f(function() { if (true) return; else return; }) +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'hasReturn') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/consistent-return.js:189:19) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkIfStatement (apps/oxlint/dist/lint.js) + + +#### consistent-return > valid + +```js +f(function() { if (true) return true; else return false; }) +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'hasReturn') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/consistent-return.js:189:19) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkIfStatement (apps/oxlint/dist/lint.js) + + +#### consistent-return > valid + +```js +function foo() { function bar() { return true; } return; } +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'hasReturn') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/consistent-return.js:189:19) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### consistent-return > valid + +```js +function foo() { function bar() { return; } return false; } +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'hasReturn') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/consistent-return.js:189:19) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### consistent-return > valid + +```js +function Foo() { if (!(this instanceof Foo)) return new Foo(); } +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'hasReturn') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/consistent-return.js:189:19) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkIfStatement (apps/oxlint/dist/lint.js) + + +#### consistent-return > valid + +```js +function foo() { if (true) return 5; else return undefined; } +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'hasReturn') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/consistent-return.js:189:19) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkIfStatement (apps/oxlint/dist/lint.js) + + +#### consistent-return > valid + +```js +function foo() { if (true) return 5; else return void 0; } +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'hasReturn') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/consistent-return.js:189:19) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkIfStatement (apps/oxlint/dist/lint.js) + + +#### consistent-return > valid + +```js +function foo() { if (true) return; else return undefined; } +``` + +```json +{ + "options": [ + { + "treatUndefinedAsUnspecified": true + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'hasReturn') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/consistent-return.js:189:19) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkIfStatement (apps/oxlint/dist/lint.js) + + +#### consistent-return > valid + +```js +function foo() { if (true) return; else return void 0; } +``` + +```json +{ + "options": [ + { + "treatUndefinedAsUnspecified": true + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'hasReturn') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/consistent-return.js:189:19) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkIfStatement (apps/oxlint/dist/lint.js) + + +#### consistent-return > valid + +```js +function foo() { if (true) return undefined; else return; } +``` + +```json +{ + "options": [ + { + "treatUndefinedAsUnspecified": true + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'hasReturn') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/consistent-return.js:189:19) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkIfStatement (apps/oxlint/dist/lint.js) + + +#### consistent-return > valid + +```js +function foo() { if (true) return undefined; else return void 0; } +``` + +```json +{ + "options": [ + { + "treatUndefinedAsUnspecified": true + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'hasReturn') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/consistent-return.js:189:19) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkIfStatement (apps/oxlint/dist/lint.js) + + +#### consistent-return > valid + +```js +function foo() { if (true) return void 0; else return; } +``` + +```json +{ + "options": [ + { + "treatUndefinedAsUnspecified": true + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'hasReturn') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/consistent-return.js:189:19) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkIfStatement (apps/oxlint/dist/lint.js) + + +#### consistent-return > valid + +```js +function foo() { if (true) return void 0; else return undefined; } +``` + +```json +{ + "options": [ + { + "treatUndefinedAsUnspecified": true + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'hasReturn') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/consistent-return.js:189:19) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkIfStatement (apps/oxlint/dist/lint.js) + + +#### consistent-return > valid + +```js +var x = () => { return {}; }; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +TypeError: Cannot read properties of null (reading 'hasReturn') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/consistent-return.js:189:19) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### consistent-return > valid + +```js +if (true) { return 1; } return 0; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "parserOptions": { + "ecmaFeatures": { + "globalReturn": true + } + } + } +} +``` + +TypeError: Cannot read properties of null (reading 'hasReturn') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/consistent-return.js:189:19) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### consistent-return > valid + +```js +class Foo { constructor() { if (true) return foo; } } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +TypeError: Cannot read properties of null (reading 'hasReturn') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/consistent-return.js:189:19) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkIfStatement (apps/oxlint/dist/lint.js) + + +#### consistent-return > valid + +```js +var Foo = class { constructor() { if (true) return foo; } } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +TypeError: Cannot read properties of null (reading 'hasReturn') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/consistent-return.js:189:19) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkIfStatement (apps/oxlint/dist/lint.js) + + +#### consistent-return > invalid + +```js +function foo() { if (true) return true; else return; } +``` + +```json +{ + "errors": [ + { + "messageId": "missingReturnValue", + "data": { + "name": "Function 'foo'" + }, + "line": 1, + "column": 46, + "endLine": 1, + "endColumn": 53 + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'hasReturn') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/consistent-return.js:189:19) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkIfStatement (apps/oxlint/dist/lint.js) + + +#### consistent-return > invalid + +```js +var foo = () => { if (true) return true; else return; } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "missingReturnValue", + "data": { + "name": "Arrow function" + }, + "line": 1, + "column": 47, + "endLine": 1, + "endColumn": 54 + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'hasReturn') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/consistent-return.js:189:19) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkIfStatement (apps/oxlint/dist/lint.js) + + +#### consistent-return > invalid + +```js +function foo() { if (true) return; else return false; } +``` + +```json +{ + "errors": [ + { + "messageId": "unexpectedReturnValue", + "data": { + "name": "Function 'foo'" + }, + "line": 1, + "column": 41, + "endLine": 1, + "endColumn": 54 + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'hasReturn') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/consistent-return.js:189:19) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkIfStatement (apps/oxlint/dist/lint.js) + + +#### consistent-return > invalid + +```js +f(function() { if (true) return true; else return; }) +``` + +```json +{ + "errors": [ + { + "messageId": "missingReturnValue", + "data": { + "name": "Function" + }, + "line": 1, + "column": 44, + "endLine": 1, + "endColumn": 51 + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'hasReturn') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/consistent-return.js:189:19) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkIfStatement (apps/oxlint/dist/lint.js) + + +#### consistent-return > invalid + +```js +f(function() { if (true) return; else return false; }) +``` + +```json +{ + "errors": [ + { + "messageId": "unexpectedReturnValue", + "data": { + "name": "Function" + }, + "line": 1, + "column": 39, + "endLine": 1, + "endColumn": 52 + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'hasReturn') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/consistent-return.js:189:19) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkIfStatement (apps/oxlint/dist/lint.js) + + +#### consistent-return > invalid + +```js +f(a => { if (true) return; else return false; }) +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "unexpectedReturnValue", + "data": { + "name": "Arrow function" + }, + "line": 1, + "column": 33, + "endLine": 1, + "endColumn": 46 + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'hasReturn') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/consistent-return.js:189:19) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkIfStatement (apps/oxlint/dist/lint.js) + + +#### consistent-return > invalid + +```js +function foo() { if (true) return true; return undefined; } +``` + +```json +{ + "options": [ + { + "treatUndefinedAsUnspecified": true + } + ], + "errors": [ + { + "messageId": "missingReturnValue", + "data": { + "name": "Function 'foo'" + }, + "line": 1, + "column": 41, + "endLine": 1, + "endColumn": 58 + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'hasReturn') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/consistent-return.js:189:19) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkIfStatement (apps/oxlint/dist/lint.js) + + +#### consistent-return > invalid + +```js +function foo() { if (true) return true; return void 0; } +``` + +```json +{ + "options": [ + { + "treatUndefinedAsUnspecified": true + } + ], + "errors": [ + { + "messageId": "missingReturnValue", + "data": { + "name": "Function 'foo'" + }, + "line": 1, + "column": 41, + "endLine": 1, + "endColumn": 55 + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'hasReturn') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/consistent-return.js:189:19) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkIfStatement (apps/oxlint/dist/lint.js) + + +#### consistent-return > invalid + +```js +function foo() { if (true) return undefined; return true; } +``` + +```json +{ + "options": [ + { + "treatUndefinedAsUnspecified": true + } + ], + "errors": [ + { + "messageId": "unexpectedReturnValue", + "data": { + "name": "Function 'foo'" + }, + "line": 1, + "column": 46, + "endLine": 1, + "endColumn": 58 + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'hasReturn') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/consistent-return.js:189:19) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkIfStatement (apps/oxlint/dist/lint.js) + + +#### consistent-return > invalid + +```js +function foo() { if (true) return void 0; return true; } +``` + +```json +{ + "options": [ + { + "treatUndefinedAsUnspecified": true + } + ], + "errors": [ + { + "messageId": "unexpectedReturnValue", + "data": { + "name": "Function 'foo'" + }, + "line": 1, + "column": 43, + "endLine": 1, + "endColumn": 55 + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'hasReturn') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/consistent-return.js:189:19) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkIfStatement (apps/oxlint/dist/lint.js) + + +#### consistent-return > invalid + +```js +if (true) { return 1; } return; +``` + +```json +{ + "languageOptions": { + "parserOptions": { + "ecmaFeatures": { + "globalReturn": true + } + } + }, + "errors": [ + { + "messageId": "missingReturnValue", + "data": { + "name": "Program" + }, + "line": 1, + "column": 25, + "endLine": 1, + "endColumn": 32 + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'hasReturn') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/consistent-return.js:189:19) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### consistent-return > invalid + +```js +function foo() { if (a) return true; } +``` + +```json +{ + "errors": [ + { + "messageId": "missingReturn", + "data": { + "name": "function 'foo'" + }, + "line": 1, + "column": 10, + "endLine": 1, + "endColumn": 13 + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'hasReturn') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/consistent-return.js:189:19) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkIfStatement (apps/oxlint/dist/lint.js) + + +#### consistent-return > invalid + +```js +function _foo() { if (a) return true; } +``` + +```json +{ + "errors": [ + { + "messageId": "missingReturn", + "data": { + "name": "function '_foo'" + }, + "line": 1, + "column": 10, + "endLine": 1, + "endColumn": 14 + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'hasReturn') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/consistent-return.js:189:19) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkIfStatement (apps/oxlint/dist/lint.js) + + +#### consistent-return > invalid + +```js +f(function foo() { if (a) return true; }); +``` + +```json +{ + "errors": [ + { + "messageId": "missingReturn", + "data": { + "name": "function 'foo'" + }, + "line": 1, + "column": 12, + "endLine": 1, + "endColumn": 15 + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'hasReturn') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/consistent-return.js:189:19) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkIfStatement (apps/oxlint/dist/lint.js) + + +#### consistent-return > invalid + +```js +f(function() { if (a) return true; }); +``` + +```json +{ + "errors": [ + { + "messageId": "missingReturn", + "data": { + "name": "function" + }, + "line": 1, + "column": 3, + "endLine": 1, + "endColumn": 11 + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'hasReturn') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/consistent-return.js:189:19) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkIfStatement (apps/oxlint/dist/lint.js) + + +#### consistent-return > invalid + +```js +f(() => { if (a) return true; }); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "missingReturn", + "data": { + "name": "arrow function" + }, + "line": 1, + "column": 6, + "endLine": 1, + "endColumn": 8 + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'hasReturn') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/consistent-return.js:189:19) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkIfStatement (apps/oxlint/dist/lint.js) + + +#### consistent-return > invalid + +```js +var obj = {foo() { if (a) return true; }}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "missingReturn", + "data": { + "name": "method 'foo'" + }, + "line": 1, + "column": 12, + "endLine": 1, + "endColumn": 15 + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'hasReturn') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/consistent-return.js:189:19) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkIfStatement (apps/oxlint/dist/lint.js) + + +#### consistent-return > invalid + +```js +class A {foo() { if (a) return true; }}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "missingReturn", + "data": { + "name": "method 'foo'" + }, + "line": 1, + "column": 10, + "endLine": 1, + "endColumn": 13 + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'hasReturn') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/consistent-return.js:189:19) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkIfStatement (apps/oxlint/dist/lint.js) + + +#### consistent-return > invalid + +```js +if (a) return true; +``` + +```json +{ + "languageOptions": { + "parserOptions": { + "ecmaFeatures": { + "globalReturn": true + } + } + }, + "errors": [ + { + "messageId": "missingReturn", + "data": { + "name": "program" + }, + "line": 1, + "column": 1 + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'hasReturn') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/consistent-return.js:189:19) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkIfStatement (apps/oxlint/dist/lint.js) + + +#### consistent-return > invalid + +```js +class A { CapitalizedFunction() { if (a) return true; } } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "missingReturn", + "data": { + "name": "method 'CapitalizedFunction'" + }, + "line": 1, + "column": 11, + "endLine": 1, + "endColumn": 30 + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'hasReturn') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/consistent-return.js:189:19) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkIfStatement (apps/oxlint/dist/lint.js) + + +#### consistent-return > invalid + +```js +({ constructor() { if (a) return true; } }); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "missingReturn", + "data": { + "name": "method 'constructor'" + }, + "line": 1, + "column": 4, + "endLine": 1, + "endColumn": 15 + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'hasReturn') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/consistent-return.js:189:19) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkIfStatement (apps/oxlint/dist/lint.js) + + +### `consistent-this` + +Pass: 23 / 26 (88.5%) +Fail: 3 / 26 (11.5%) + +#### consistent-this > valid + +```js +var self; self = this +``` + +```json +{ + "options": [ + "self" + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/consistent-this', + message: "Designated alias 'self' is not assigned to 'this'.", + messageId: 'aliasNotAssignedToThis', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 4, + endLine: 1, + endColumn: 8, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### consistent-this > valid + +```js +var foo, self; self = this +``` + +```json +{ + "options": [ + "self" + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/consistent-this', + message: "Designated alias 'self' is not assigned to 'this'.", + messageId: 'aliasNotAssignedToThis', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 9, + endLine: 1, + endColumn: 13, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### consistent-this > valid + +```js +var foo, self; foo = 42; self = this +``` + +```json +{ + "options": [ + "self" + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/consistent-this', + message: "Designated alias 'self' is not assigned to 'this'.", + messageId: 'aliasNotAssignedToThis', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 9, + endLine: 1, + endColumn: 13, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +### `constructor-super` + +Pass: 4 / 82 (4.9%) +Fail: 78 / 82 (95.1%) + +#### constructor-super > valid + +```js +class A extends B { constructor() { super(); } } +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'isConstructor') + at CallExpression:exit (apps/oxlint/conformance/submodules/eslint/lib/rules/constructor-super.js:385:20) + at walkCallExpression (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkExpressionStatement (apps/oxlint/dist/lint.js) + + +#### constructor-super > valid + +```js +class A extends B { constructor() { if (true) { super(); } else { super(); } } } +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'isConstructor') + at CallExpression:exit (apps/oxlint/conformance/submodules/eslint/lib/rules/constructor-super.js:385:20) + at walkCallExpression (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkExpressionStatement (apps/oxlint/dist/lint.js) + + +#### constructor-super > valid + +```js +class A extends (class B {}) { constructor() { super(); } } +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'isConstructor') + at CallExpression:exit (apps/oxlint/conformance/submodules/eslint/lib/rules/constructor-super.js:385:20) + at walkCallExpression (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkExpressionStatement (apps/oxlint/dist/lint.js) + + +#### constructor-super > valid + +```js +class A extends (B = C) { constructor() { super(); } } +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'isConstructor') + at CallExpression:exit (apps/oxlint/conformance/submodules/eslint/lib/rules/constructor-super.js:385:20) + at walkCallExpression (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkExpressionStatement (apps/oxlint/dist/lint.js) + + +#### constructor-super > valid + +```js +class A extends (B &&= C) { constructor() { super(); } } +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'isConstructor') + at CallExpression:exit (apps/oxlint/conformance/submodules/eslint/lib/rules/constructor-super.js:385:20) + at walkCallExpression (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkExpressionStatement (apps/oxlint/dist/lint.js) + + +#### constructor-super > valid + +```js +class A extends (B ||= C) { constructor() { super(); } } +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'isConstructor') + at CallExpression:exit (apps/oxlint/conformance/submodules/eslint/lib/rules/constructor-super.js:385:20) + at walkCallExpression (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkExpressionStatement (apps/oxlint/dist/lint.js) + + +#### constructor-super > valid + +```js +class A extends (B ??= C) { constructor() { super(); } } +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'isConstructor') + at CallExpression:exit (apps/oxlint/conformance/submodules/eslint/lib/rules/constructor-super.js:385:20) + at walkCallExpression (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkExpressionStatement (apps/oxlint/dist/lint.js) + + +#### constructor-super > valid + +```js +class A extends (B ||= 5) { constructor() { super(); } } +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'isConstructor') + at CallExpression:exit (apps/oxlint/conformance/submodules/eslint/lib/rules/constructor-super.js:385:20) + at walkCallExpression (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkExpressionStatement (apps/oxlint/dist/lint.js) + + +#### constructor-super > valid + +```js +class A extends (B ??= 5) { constructor() { super(); } } +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'isConstructor') + at CallExpression:exit (apps/oxlint/conformance/submodules/eslint/lib/rules/constructor-super.js:385:20) + at walkCallExpression (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkExpressionStatement (apps/oxlint/dist/lint.js) + + +#### constructor-super > valid + +```js +class A extends (B || C) { constructor() { super(); } } +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'isConstructor') + at CallExpression:exit (apps/oxlint/conformance/submodules/eslint/lib/rules/constructor-super.js:385:20) + at walkCallExpression (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkExpressionStatement (apps/oxlint/dist/lint.js) + + +#### constructor-super > valid + +```js +class A extends (5 && B) { constructor() { super(); } } +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'isConstructor') + at CallExpression:exit (apps/oxlint/conformance/submodules/eslint/lib/rules/constructor-super.js:385:20) + at walkCallExpression (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkExpressionStatement (apps/oxlint/dist/lint.js) + + +#### constructor-super > valid + +```js +class A extends (false && B) { constructor() { super(); } } +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'isConstructor') + at CallExpression:exit (apps/oxlint/conformance/submodules/eslint/lib/rules/constructor-super.js:385:20) + at walkCallExpression (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkExpressionStatement (apps/oxlint/dist/lint.js) + + +#### constructor-super > valid + +```js +class A extends (B || 5) { constructor() { super(); } } +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'isConstructor') + at CallExpression:exit (apps/oxlint/conformance/submodules/eslint/lib/rules/constructor-super.js:385:20) + at walkCallExpression (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkExpressionStatement (apps/oxlint/dist/lint.js) + + +#### constructor-super > valid + +```js +class A extends (B ?? 5) { constructor() { super(); } } +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'isConstructor') + at CallExpression:exit (apps/oxlint/conformance/submodules/eslint/lib/rules/constructor-super.js:385:20) + at walkCallExpression (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkExpressionStatement (apps/oxlint/dist/lint.js) + + +#### constructor-super > valid + +```js +class A extends (a ? B : C) { constructor() { super(); } } +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'isConstructor') + at CallExpression:exit (apps/oxlint/conformance/submodules/eslint/lib/rules/constructor-super.js:385:20) + at walkCallExpression (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkExpressionStatement (apps/oxlint/dist/lint.js) + + +#### constructor-super > valid + +```js +class A extends (B, C) { constructor() { super(); } } +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'isConstructor') + at CallExpression:exit (apps/oxlint/conformance/submodules/eslint/lib/rules/constructor-super.js:385:20) + at walkCallExpression (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkExpressionStatement (apps/oxlint/dist/lint.js) + + +#### constructor-super > valid + +```js +class A { constructor() { class B extends C { constructor() { super(); } } } } +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'isConstructor') + at CallExpression:exit (apps/oxlint/conformance/submodules/eslint/lib/rules/constructor-super.js:385:20) + at walkCallExpression (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkExpressionStatement (apps/oxlint/dist/lint.js) + + +#### constructor-super > valid + +```js +class A extends B { constructor() { super(); class C extends D { constructor() { super(); } } } } +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'isConstructor') + at CallExpression:exit (apps/oxlint/conformance/submodules/eslint/lib/rules/constructor-super.js:385:20) + at walkCallExpression (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkExpressionStatement (apps/oxlint/dist/lint.js) + + +#### constructor-super > valid + +```js +class A extends B { constructor() { super(); class C { constructor() { } } } } +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'isConstructor') + at CallExpression:exit (apps/oxlint/conformance/submodules/eslint/lib/rules/constructor-super.js:385:20) + at walkCallExpression (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkExpressionStatement (apps/oxlint/dist/lint.js) + + +#### constructor-super > valid + +```js +class A extends B { constructor() { a ? super() : super(); } } +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'isConstructor') + at CallExpression:exit (apps/oxlint/conformance/submodules/eslint/lib/rules/constructor-super.js:385:20) + at walkCallExpression (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkConditionalExpression (apps/oxlint/dist/lint.js) + + +#### constructor-super > valid + +```js +class A extends B { constructor() { if (a) super(); else super(); } } +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'isConstructor') + at CallExpression:exit (apps/oxlint/conformance/submodules/eslint/lib/rules/constructor-super.js:385:20) + at walkCallExpression (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkExpressionStatement (apps/oxlint/dist/lint.js) + + +#### constructor-super > valid + +```js +class A extends B { constructor() { switch (a) { case 0: super(); break; default: super(); } } } +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'isConstructor') + at CallExpression:exit (apps/oxlint/conformance/submodules/eslint/lib/rules/constructor-super.js:385:20) + at walkCallExpression (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkExpressionStatement (apps/oxlint/dist/lint.js) + + +#### constructor-super > valid + +```js +class A extends B { constructor() { try {} finally { super(); } } } +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'isConstructor') + at CallExpression:exit (apps/oxlint/conformance/submodules/eslint/lib/rules/constructor-super.js:385:20) + at walkCallExpression (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkExpressionStatement (apps/oxlint/dist/lint.js) + + +#### constructor-super > valid + +```js +class A extends B { constructor() { if (a) throw Error(); super(); } } +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'isConstructor') + at CallExpression:exit (apps/oxlint/conformance/submodules/eslint/lib/rules/constructor-super.js:385:20) + at walkCallExpression (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkThrowStatement (apps/oxlint/dist/lint.js) + + +#### constructor-super > valid + +```js +class A extends B { constructor() { if (true) return a; super(); } } +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'isConstructor') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/constructor-super.js:431:20) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkIfStatement (apps/oxlint/dist/lint.js) + + +#### constructor-super > valid + +```js +class A extends null { constructor() { return a; } } +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'isConstructor') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/constructor-super.js:431:20) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### constructor-super > valid + +```js +class A { constructor() { return a; } } +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'isConstructor') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/constructor-super.js:431:20) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### constructor-super > valid + +```js +class A extends B { constructor(a) { super(); for (const b of a) { this.a(); } } } +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'isConstructor') + at CallExpression:exit (apps/oxlint/conformance/submodules/eslint/lib/rules/constructor-super.js:385:20) + at walkCallExpression (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkExpressionStatement (apps/oxlint/dist/lint.js) + + +#### constructor-super > valid + +```js +class A extends B { constructor(a) { super(); for (b in a) ( foo(b) ); } } +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'isConstructor') + at CallExpression:exit (apps/oxlint/conformance/submodules/eslint/lib/rules/constructor-super.js:385:20) + at walkCallExpression (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkExpressionStatement (apps/oxlint/dist/lint.js) + + +#### constructor-super > valid + +```js +class Foo extends Object { constructor(method) { super(); this.method = method || function() {}; } } +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'isConstructor') + at CallExpression:exit (apps/oxlint/conformance/submodules/eslint/lib/rules/constructor-super.js:385:20) + at walkCallExpression (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkExpressionStatement (apps/oxlint/dist/lint.js) + + +#### constructor-super > valid + +```js +class A extends Object { + constructor() { + super(); + for (let i = 0; i < 0; i++); + } +} +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'isConstructor') + at CallExpression:exit (apps/oxlint/conformance/submodules/eslint/lib/rules/constructor-super.js:385:20) + at walkCallExpression (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkExpressionStatement (apps/oxlint/dist/lint.js) + + +#### constructor-super > valid + +```js +class A extends Object { + constructor() { + super(); + for (; i < 0; i++); + } +} +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'isConstructor') + at CallExpression:exit (apps/oxlint/conformance/submodules/eslint/lib/rules/constructor-super.js:385:20) + at walkCallExpression (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkExpressionStatement (apps/oxlint/dist/lint.js) + + +#### constructor-super > valid + +```js +class A extends Object { + constructor() { + super(); + for (let i = 0;; i++) { + if (foo) break; + } + } +} +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'isConstructor') + at CallExpression:exit (apps/oxlint/conformance/submodules/eslint/lib/rules/constructor-super.js:385:20) + at walkCallExpression (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkExpressionStatement (apps/oxlint/dist/lint.js) + + +#### constructor-super > valid + +```js +class A extends Object { + constructor() { + super(); + for (let i = 0; i < 0;); + } +} +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'isConstructor') + at CallExpression:exit (apps/oxlint/conformance/submodules/eslint/lib/rules/constructor-super.js:385:20) + at walkCallExpression (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkExpressionStatement (apps/oxlint/dist/lint.js) + + +#### constructor-super > valid + +```js +class A extends Object { + constructor() { + super(); + for (let i = 0;;) { + if (foo) break; + } + } +} +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'isConstructor') + at CallExpression:exit (apps/oxlint/conformance/submodules/eslint/lib/rules/constructor-super.js:385:20) + at walkCallExpression (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkExpressionStatement (apps/oxlint/dist/lint.js) + + +#### constructor-super > valid + +```js + + class A extends B { + constructor(props) { + super(props); + + try { + let arr = []; + for (let a of arr) { + } + } catch (err) { + } + } + } + +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'isConstructor') + at CallExpression:exit (apps/oxlint/conformance/submodules/eslint/lib/rules/constructor-super.js:385:20) + at walkCallExpression (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkExpressionStatement (apps/oxlint/dist/lint.js) + + +#### constructor-super > valid + +```js +class A extends obj?.prop { constructor() { super(); } } +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'isConstructor') + at CallExpression:exit (apps/oxlint/conformance/submodules/eslint/lib/rules/constructor-super.js:385:20) + at walkCallExpression (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkExpressionStatement (apps/oxlint/dist/lint.js) + + +#### constructor-super > valid + +```js + + class A extends Base { + constructor(list) { + for (const a of list) { + if (a.foo) { + super(a); + return; + } + } + super(); + } + } + +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'isConstructor') + at CallExpression:exit (apps/oxlint/conformance/submodules/eslint/lib/rules/constructor-super.js:385:20) + at walkCallExpression (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkExpressionStatement (apps/oxlint/dist/lint.js) + + +#### constructor-super > invalid + +```js +class A extends null { constructor() { super(); } } +``` + +```json +{ + "errors": [ + { + "messageId": "badSuper" + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'isConstructor') + at CallExpression:exit (apps/oxlint/conformance/submodules/eslint/lib/rules/constructor-super.js:385:20) + at walkCallExpression (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkExpressionStatement (apps/oxlint/dist/lint.js) + + +#### constructor-super > invalid + +```js +class A extends null { constructor() { } } +``` + +```json +{ + "errors": [ + { + "messageId": "missingAll" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### constructor-super > invalid + +```js +class A extends 100 { constructor() { super(); } } +``` + +```json +{ + "errors": [ + { + "messageId": "badSuper" + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'isConstructor') + at CallExpression:exit (apps/oxlint/conformance/submodules/eslint/lib/rules/constructor-super.js:385:20) + at walkCallExpression (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkExpressionStatement (apps/oxlint/dist/lint.js) + + +#### constructor-super > invalid + +```js +class A extends 'test' { constructor() { super(); } } +``` + +```json +{ + "errors": [ + { + "messageId": "badSuper" + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'isConstructor') + at CallExpression:exit (apps/oxlint/conformance/submodules/eslint/lib/rules/constructor-super.js:385:20) + at walkCallExpression (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkExpressionStatement (apps/oxlint/dist/lint.js) + + +#### constructor-super > invalid + +```js +class A extends (B = 5) { constructor() { super(); } } +``` + +```json +{ + "errors": [ + { + "messageId": "badSuper" + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'isConstructor') + at CallExpression:exit (apps/oxlint/conformance/submodules/eslint/lib/rules/constructor-super.js:385:20) + at walkCallExpression (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkExpressionStatement (apps/oxlint/dist/lint.js) + + +#### constructor-super > invalid + +```js +class A extends (B && 5) { constructor() { super(); } } +``` + +```json +{ + "errors": [ + { + "messageId": "badSuper" + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'isConstructor') + at CallExpression:exit (apps/oxlint/conformance/submodules/eslint/lib/rules/constructor-super.js:385:20) + at walkCallExpression (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkExpressionStatement (apps/oxlint/dist/lint.js) + + +#### constructor-super > invalid + +```js +class A extends (B &&= 5) { constructor() { super(); } } +``` + +```json +{ + "errors": [ + { + "messageId": "badSuper" + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'isConstructor') + at CallExpression:exit (apps/oxlint/conformance/submodules/eslint/lib/rules/constructor-super.js:385:20) + at walkCallExpression (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkExpressionStatement (apps/oxlint/dist/lint.js) + + +#### constructor-super > invalid + +```js +class A extends (B += C) { constructor() { super(); } } +``` + +```json +{ + "errors": [ + { + "messageId": "badSuper" + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'isConstructor') + at CallExpression:exit (apps/oxlint/conformance/submodules/eslint/lib/rules/constructor-super.js:385:20) + at walkCallExpression (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkExpressionStatement (apps/oxlint/dist/lint.js) + + +#### constructor-super > invalid + +```js +class A extends (B -= C) { constructor() { super(); } } +``` + +```json +{ + "errors": [ + { + "messageId": "badSuper" + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'isConstructor') + at CallExpression:exit (apps/oxlint/conformance/submodules/eslint/lib/rules/constructor-super.js:385:20) + at walkCallExpression (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkExpressionStatement (apps/oxlint/dist/lint.js) + + +#### constructor-super > invalid + +```js +class A extends (B **= C) { constructor() { super(); } } +``` + +```json +{ + "errors": [ + { + "messageId": "badSuper" + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'isConstructor') + at CallExpression:exit (apps/oxlint/conformance/submodules/eslint/lib/rules/constructor-super.js:385:20) + at walkCallExpression (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkExpressionStatement (apps/oxlint/dist/lint.js) + + +#### constructor-super > invalid + +```js +class A extends (B |= C) { constructor() { super(); } } +``` + +```json +{ + "errors": [ + { + "messageId": "badSuper" + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'isConstructor') + at CallExpression:exit (apps/oxlint/conformance/submodules/eslint/lib/rules/constructor-super.js:385:20) + at walkCallExpression (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkExpressionStatement (apps/oxlint/dist/lint.js) + + +#### constructor-super > invalid + +```js +class A extends (B &= C) { constructor() { super(); } } +``` + +```json +{ + "errors": [ + { + "messageId": "badSuper" + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'isConstructor') + at CallExpression:exit (apps/oxlint/conformance/submodules/eslint/lib/rules/constructor-super.js:385:20) + at walkCallExpression (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkExpressionStatement (apps/oxlint/dist/lint.js) + + +#### constructor-super > invalid + +```js +class A extends B { constructor() { } } +``` + +```json +{ + "errors": [ + { + "messageId": "missingAll" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### constructor-super > invalid + +```js +class A extends B { constructor() { for (var a of b) super.foo(); } } +``` + +```json +{ + "errors": [ + { + "messageId": "missingAll" + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'isConstructor') + at CallExpression:exit (apps/oxlint/conformance/submodules/eslint/lib/rules/constructor-super.js:385:20) + at walkCallExpression (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkExpressionStatement (apps/oxlint/dist/lint.js) + + +#### constructor-super > invalid + +```js +class A extends B { constructor() { for (var i = 1; i < 10; i++) super.foo(); } } +``` + +```json +{ + "errors": [ + { + "messageId": "missingAll" + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'isConstructor') + at CallExpression:exit (apps/oxlint/conformance/submodules/eslint/lib/rules/constructor-super.js:385:20) + at walkCallExpression (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkExpressionStatement (apps/oxlint/dist/lint.js) + + +#### constructor-super > invalid + +```js +class A extends B { constructor() { var c = class extends D { constructor() { super(); } } } } +``` + +```json +{ + "errors": [ + { + "messageId": "missingAll" + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'isConstructor') + at CallExpression:exit (apps/oxlint/conformance/submodules/eslint/lib/rules/constructor-super.js:385:20) + at walkCallExpression (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkExpressionStatement (apps/oxlint/dist/lint.js) + + +#### constructor-super > invalid + +```js +class A extends B { constructor() { var c = () => super(); } } +``` + +```json +{ + "errors": [ + { + "messageId": "missingAll" + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'isConstructor') + at CallExpression:exit (apps/oxlint/conformance/submodules/eslint/lib/rules/constructor-super.js:385:20) + at walkCallExpression (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkArrowFunctionExpression (apps/oxlint/dist/lint.js) + + +#### constructor-super > invalid + +```js +class A extends B { constructor() { class C extends D { constructor() { super(); } } } } +``` + +```json +{ + "errors": [ + { + "messageId": "missingAll", + "column": 21 + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'isConstructor') + at CallExpression:exit (apps/oxlint/conformance/submodules/eslint/lib/rules/constructor-super.js:385:20) + at walkCallExpression (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkExpressionStatement (apps/oxlint/dist/lint.js) + + +#### constructor-super > invalid + +```js +class A extends B { constructor() { var C = class extends D { constructor() { super(); } } } } +``` + +```json +{ + "errors": [ + { + "messageId": "missingAll", + "column": 21 + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'isConstructor') + at CallExpression:exit (apps/oxlint/conformance/submodules/eslint/lib/rules/constructor-super.js:385:20) + at walkCallExpression (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkExpressionStatement (apps/oxlint/dist/lint.js) + + +#### constructor-super > invalid + +```js +class A extends B { constructor() { super(); class C extends D { constructor() { } } } } +``` + +```json +{ + "errors": [ + { + "messageId": "missingAll", + "column": 66 + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'isConstructor') + at CallExpression:exit (apps/oxlint/conformance/submodules/eslint/lib/rules/constructor-super.js:385:20) + at walkCallExpression (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkExpressionStatement (apps/oxlint/dist/lint.js) + + +#### constructor-super > invalid + +```js +class A extends B { constructor() { super(); var C = class extends D { constructor() { } } } } +``` + +```json +{ + "errors": [ + { + "messageId": "missingAll", + "column": 72 + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'isConstructor') + at CallExpression:exit (apps/oxlint/conformance/submodules/eslint/lib/rules/constructor-super.js:385:20) + at walkCallExpression (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkExpressionStatement (apps/oxlint/dist/lint.js) + + +#### constructor-super > invalid + +```js +class A extends B { constructor() { if (a) super(); } } +``` + +```json +{ + "errors": [ + { + "messageId": "missingSome" + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'isConstructor') + at CallExpression:exit (apps/oxlint/conformance/submodules/eslint/lib/rules/constructor-super.js:385:20) + at walkCallExpression (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkExpressionStatement (apps/oxlint/dist/lint.js) + + +#### constructor-super > invalid + +```js +class A extends B { constructor() { if (a); else super(); } } +``` + +```json +{ + "errors": [ + { + "messageId": "missingSome" + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'isConstructor') + at CallExpression:exit (apps/oxlint/conformance/submodules/eslint/lib/rules/constructor-super.js:385:20) + at walkCallExpression (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkExpressionStatement (apps/oxlint/dist/lint.js) + + +#### constructor-super > invalid + +```js +class A extends B { constructor() { a && super(); } } +``` + +```json +{ + "errors": [ + { + "messageId": "missingSome" + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'isConstructor') + at CallExpression:exit (apps/oxlint/conformance/submodules/eslint/lib/rules/constructor-super.js:385:20) + at walkCallExpression (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkLogicalExpression (apps/oxlint/dist/lint.js) + + +#### constructor-super > invalid + +```js +class A extends B { constructor() { switch (a) { case 0: super(); } } } +``` + +```json +{ + "errors": [ + { + "messageId": "missingSome" + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'isConstructor') + at CallExpression:exit (apps/oxlint/conformance/submodules/eslint/lib/rules/constructor-super.js:385:20) + at walkCallExpression (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkExpressionStatement (apps/oxlint/dist/lint.js) + + +#### constructor-super > invalid + +```js +class A extends B { constructor() { switch (a) { case 0: break; default: super(); } } } +``` + +```json +{ + "errors": [ + { + "messageId": "missingSome" + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'isConstructor') + at CallExpression:exit (apps/oxlint/conformance/submodules/eslint/lib/rules/constructor-super.js:385:20) + at walkCallExpression (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkExpressionStatement (apps/oxlint/dist/lint.js) + + +#### constructor-super > invalid + +```js +class A extends B { constructor() { try { super(); } catch (err) {} } } +``` + +```json +{ + "errors": [ + { + "messageId": "missingSome" + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'isConstructor') + at CallExpression:exit (apps/oxlint/conformance/submodules/eslint/lib/rules/constructor-super.js:385:20) + at walkCallExpression (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkExpressionStatement (apps/oxlint/dist/lint.js) + + +#### constructor-super > invalid + +```js +class A extends B { constructor() { try { a; } catch (err) { super(); } } } +``` + +```json +{ + "errors": [ + { + "messageId": "missingSome" + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'isConstructor') + at CallExpression:exit (apps/oxlint/conformance/submodules/eslint/lib/rules/constructor-super.js:385:20) + at walkCallExpression (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkExpressionStatement (apps/oxlint/dist/lint.js) + + +#### constructor-super > invalid + +```js +class A extends B { constructor() { if (a) return; super(); } } +``` + +```json +{ + "errors": [ + { + "messageId": "missingSome" + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'isConstructor') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/constructor-super.js:431:20) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkIfStatement (apps/oxlint/dist/lint.js) + + +#### constructor-super > invalid + +```js +class A extends B { constructor() { super(); super(); } } +``` + +```json +{ + "errors": [ + { + "messageId": "duplicate", + "column": 46 + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'isConstructor') + at CallExpression:exit (apps/oxlint/conformance/submodules/eslint/lib/rules/constructor-super.js:385:20) + at walkCallExpression (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkExpressionStatement (apps/oxlint/dist/lint.js) + + +#### constructor-super > invalid + +```js +class A extends B { constructor() { super() || super(); } } +``` + +```json +{ + "errors": [ + { + "messageId": "duplicate", + "column": 48 + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'isConstructor') + at CallExpression:exit (apps/oxlint/conformance/submodules/eslint/lib/rules/constructor-super.js:385:20) + at walkCallExpression (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkLogicalExpression (apps/oxlint/dist/lint.js) + + +#### constructor-super > invalid + +```js +class A extends B { constructor() { if (a) super(); super(); } } +``` + +```json +{ + "errors": [ + { + "messageId": "duplicate", + "column": 53 + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'isConstructor') + at CallExpression:exit (apps/oxlint/conformance/submodules/eslint/lib/rules/constructor-super.js:385:20) + at walkCallExpression (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkExpressionStatement (apps/oxlint/dist/lint.js) + + +#### constructor-super > invalid + +```js +class A extends B { constructor() { switch (a) { case 0: super(); default: super(); } } } +``` + +```json +{ + "errors": [ + { + "messageId": "duplicate", + "column": 76 + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'isConstructor') + at CallExpression:exit (apps/oxlint/conformance/submodules/eslint/lib/rules/constructor-super.js:385:20) + at walkCallExpression (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkExpressionStatement (apps/oxlint/dist/lint.js) + + +#### constructor-super > invalid + +```js +class A extends B { constructor(a) { while (a) super(); } } +``` + +```json +{ + "errors": [ + { + "messageId": "missingSome" + }, + { + "messageId": "duplicate", + "column": 48 + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'isConstructor') + at CallExpression:exit (apps/oxlint/conformance/submodules/eslint/lib/rules/constructor-super.js:385:20) + at walkCallExpression (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkExpressionStatement (apps/oxlint/dist/lint.js) + + +#### constructor-super > invalid + +```js +class A extends B { constructor() { return; super(); } } +``` + +```json +{ + "errors": [ + { + "messageId": "missingAll" + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'isConstructor') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/constructor-super.js:431:20) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### constructor-super > invalid + +```js +class Foo extends Bar { + constructor() { + for (a in b) for (c in d); + } + } +``` + +```json +{ + "errors": [ + { + "messageId": "missingAll" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### constructor-super > invalid + +```js +class C extends D { + + constructor() { + do { + something(); + } while (foo); + } + + } +``` + +```json +{ + "errors": [ + { + "messageId": "missingAll" + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'isConstructor') + at CallExpression:exit (apps/oxlint/conformance/submodules/eslint/lib/rules/constructor-super.js:385:20) + at walkCallExpression (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkExpressionStatement (apps/oxlint/dist/lint.js) + + +#### constructor-super > invalid + +```js +class C extends D { + + constructor() { + for (let i = 1;;i++) { + if (bar) { + break; + } + } + } + + } +``` + +```json +{ + "errors": [ + { + "messageId": "missingAll" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### constructor-super > invalid + +```js +class C extends D { + + constructor() { + do { + super(); + } while (foo); + } + + } +``` + +```json +{ + "errors": [ + { + "messageId": "duplicate" + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'isConstructor') + at CallExpression:exit (apps/oxlint/conformance/submodules/eslint/lib/rules/constructor-super.js:385:20) + at walkCallExpression (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkExpressionStatement (apps/oxlint/dist/lint.js) + + +#### constructor-super > invalid + +```js +class C extends D { + + constructor() { + while (foo) { + if (bar) { + super(); + break; + } + } + } + + } +``` + +```json +{ + "errors": [ + { + "messageId": "missingSome" + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'isConstructor') + at CallExpression:exit (apps/oxlint/conformance/submodules/eslint/lib/rules/constructor-super.js:385:20) + at walkCallExpression (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkExpressionStatement (apps/oxlint/dist/lint.js) + + +### `default-param-last` + +Pass: 29 / 96 (30.2%) +Fail: 67 / 96 (69.8%) + +#### default-param-last > invalid + +```js +function f(a = 5, b = 6, c) {} +``` + +```json +{ + "errors": [ + { + "messageId": "shouldBeLast", + "column": 12, + "endColumn": 17 + }, + { + "messageId": "shouldBeLast", + "column": 19, + "endColumn": 24 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Actual error location does not match expected error location. ++ actual - expected + + { ++ column: 19, ++ endColumn: 24 +- column: 12, +- endColumn: 17 + } + + at assertInvalidTestCaseLocationIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### default-param-last > valid + +```js +function foo(a: number) {} +``` + +```json +{} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### default-param-last > valid + +```js +function foo(a?: number) {} +``` + +```json +{} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### default-param-last > valid + +```js +function foo(a: number, b: number) {} +``` + +```json +{} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### default-param-last > valid + +```js +function foo(a: number, b: number, c?: number) {} +``` + +```json +{} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### default-param-last > valid + +```js +function foo(a: number, b = 1) {} +``` + +```json +{} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### default-param-last > valid + +```js +function foo(a: number, b = 1, c = 1) {} +``` + +```json +{} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### default-param-last > valid + +```js +function foo(a: number, b = 1, c?: number) {} +``` + +```json +{} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### default-param-last > valid + +```js +function foo(a: number, b?: number, c = 1) {} +``` + +```json +{} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### default-param-last > valid + +```js +function foo(a: number, b = 1, ...c) {} +``` + +```json +{} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### default-param-last > valid + +```js +const foo = function (a: number) {}; +``` + +```json +{} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### default-param-last > valid + +```js +const foo = function (a?: number) {}; +``` + +```json +{} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### default-param-last > valid + +```js +const foo = function (a: number, b: number) {}; +``` + +```json +{} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### default-param-last > valid + +```js +const foo = function (a: number, b: number, c?: number) {}; +``` + +```json +{} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### default-param-last > valid + +```js +const foo = function (a: number, b = 1) {}; +``` + +```json +{} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### default-param-last > valid + +```js +const foo = function (a: number, b = 1, c = 1) {}; +``` + +```json +{} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### default-param-last > valid + +```js +const foo = function (a: number, b = 1, c?: number) {}; +``` + +```json +{} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### default-param-last > valid + +```js +const foo = function (a: number, b?: number, c = 1) {}; +``` + +```json +{} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### default-param-last > valid + +```js +const foo = function (a: number, b = 1, ...c) {}; +``` + +```json +{} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### default-param-last > valid + +```js +const foo = (a: number) => {}; +``` + +```json +{} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### default-param-last > valid + +```js +const foo = (a?: number) => {}; +``` + +```json +{} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### default-param-last > valid + +```js +const foo = (a: number, b: number) => {}; +``` + +```json +{} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### default-param-last > valid + +```js +const foo = (a: number, b: number, c?: number) => {}; +``` + +```json +{} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### default-param-last > valid + +```js +const foo = (a: number, b = 1) => {}; +``` + +```json +{} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### default-param-last > valid + +```js +const foo = (a: number, b = 1, c = 1) => {}; +``` + +```json +{} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### default-param-last > valid + +```js +const foo = (a: number, b = 1, c?: number) => {}; +``` + +```json +{} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### default-param-last > valid + +```js +const foo = (a: number, b?: number, c = 1) => {}; +``` + +```json +{} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### default-param-last > valid + +```js +const foo = (a: number, b = 1, ...c) => {}; +``` + +```json +{} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### default-param-last > valid + +```js + + class Foo { + constructor(a: number, b: number, c: number) {} + } + +``` + +```json +{} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### default-param-last > valid + +```js + + class Foo { + constructor(a: number, b?: number, c = 1) {} + } + +``` + +```json +{} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### default-param-last > valid + +```js + + class Foo { + constructor(a: number, b = 1, c?: number) {} + } + +``` + +```json +{} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### default-param-last > valid + +```js + + class Foo { + constructor( + public a: number, + protected b: number, + private c: number, + ) {} + } + +``` + +```json +{} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### default-param-last > valid + +```js + + class Foo { + constructor( + public a: number, + protected b?: number, + private c = 10, + ) {} + } + +``` + +```json +{} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### default-param-last > valid + +```js + + class Foo { + constructor( + public a: number, + protected b = 10, + private c?: number, + ) {} + } + +``` + +```json +{} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### default-param-last > valid + +```js + + class Foo { + constructor( + a: number, + protected b?: number, + private c = 0, + ) {} + } + +``` + +```json +{} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### default-param-last > valid + +```js + + class Foo { + constructor( + a: number, + b?: number, + private c = 0, + ) {} + } + +``` + +```json +{} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### default-param-last > valid + +```js + + class Foo { + constructor( + a: number, + private b?: number, + c = 0, + ) {} + } + +``` + +```json +{} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### default-param-last > invalid + +```js +function foo(a = 1, b: number) {} +``` + +```json +{ + "errors": [ + { + "messageId": "shouldBeLast", + "line": 1, + "column": 14, + "endColumn": 19 + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### default-param-last > invalid + +```js +function foo(a = 1, b = 2, c: number) {} +``` + +```json +{ + "errors": [ + { + "messageId": "shouldBeLast", + "line": 1, + "column": 14, + "endColumn": 19 + }, + { + "messageId": "shouldBeLast", + "line": 1, + "column": 21, + "endColumn": 26 + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### default-param-last > invalid + +```js +function foo(a = 1, b: number, c = 2, d: number) {} +``` + +```json +{ + "errors": [ + { + "messageId": "shouldBeLast", + "line": 1, + "column": 14, + "endColumn": 19 + }, + { + "messageId": "shouldBeLast", + "line": 1, + "column": 32, + "endColumn": 37 + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### default-param-last > invalid + +```js +function foo(a = 1, b: number, c = 2) {} +``` + +```json +{ + "errors": [ + { + "messageId": "shouldBeLast", + "line": 1, + "column": 14, + "endColumn": 19 + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### default-param-last > invalid + +```js +function foo(a = 1, b: number, ...c) {} +``` + +```json +{ + "errors": [ + { + "messageId": "shouldBeLast", + "line": 1, + "column": 14, + "endColumn": 19 + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### default-param-last > invalid + +```js +function foo(a?: number, b: number) {} +``` + +```json +{ + "errors": [ + { + "messageId": "shouldBeLast", + "line": 1, + "column": 14, + "endColumn": 24 + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### default-param-last > invalid + +```js +function foo(a: number, b?: number, c: number) {} +``` + +```json +{ + "errors": [ + { + "messageId": "shouldBeLast", + "line": 1, + "column": 25, + "endColumn": 35 + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### default-param-last > invalid + +```js +function foo(a = 1, b?: number, c: number) {} +``` + +```json +{ + "errors": [ + { + "messageId": "shouldBeLast", + "line": 1, + "column": 14, + "endColumn": 19 + }, + { + "messageId": "shouldBeLast", + "line": 1, + "column": 21, + "endColumn": 31 + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### default-param-last > invalid + +```js +const foo = function (a = 1, b: number) {}; +``` + +```json +{ + "errors": [ + { + "messageId": "shouldBeLast", + "line": 1, + "column": 23, + "endColumn": 28 + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### default-param-last > invalid + +```js +const foo = function (a = 1, b = 2, c: number) {}; +``` + +```json +{ + "errors": [ + { + "messageId": "shouldBeLast", + "line": 1, + "column": 23, + "endColumn": 28 + }, + { + "messageId": "shouldBeLast", + "line": 1, + "column": 30, + "endColumn": 35 + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### default-param-last > invalid + +```js +const foo = function (a = 1, b: number, c = 2, d: number) {}; +``` + +```json +{ + "errors": [ + { + "messageId": "shouldBeLast", + "line": 1, + "column": 23, + "endColumn": 28 + }, + { + "messageId": "shouldBeLast", + "line": 1, + "column": 41, + "endColumn": 46 + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### default-param-last > invalid + +```js +const foo = function (a = 1, b: number, c = 2) {}; +``` + +```json +{ + "errors": [ + { + "messageId": "shouldBeLast", + "line": 1, + "column": 23, + "endColumn": 28 + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### default-param-last > invalid + +```js +const foo = function (a = 1, b: number, ...c) {}; +``` + +```json +{ + "errors": [ + { + "messageId": "shouldBeLast", + "line": 1, + "column": 23, + "endColumn": 28 + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### default-param-last > invalid + +```js +const foo = function (a?: number, b: number) {}; +``` + +```json +{ + "errors": [ + { + "messageId": "shouldBeLast", + "line": 1, + "column": 23, + "endColumn": 33 + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### default-param-last > invalid + +```js +const foo = function (a: number, b?: number, c: number) {}; +``` + +```json +{ + "errors": [ + { + "messageId": "shouldBeLast", + "line": 1, + "column": 34, + "endColumn": 44 + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### default-param-last > invalid + +```js +const foo = function (a = 1, b?: number, c: number) {}; +``` + +```json +{ + "errors": [ + { + "messageId": "shouldBeLast", + "line": 1, + "column": 23, + "endColumn": 28 + }, + { + "messageId": "shouldBeLast", + "line": 1, + "column": 30, + "endColumn": 40 + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### default-param-last > invalid + +```js +const foo = (a = 1, b: number) => {}; +``` + +```json +{ + "errors": [ + { + "messageId": "shouldBeLast", + "line": 1, + "column": 14, + "endColumn": 19 + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### default-param-last > invalid + +```js +const foo = (a = 1, b = 2, c: number) => {}; +``` + +```json +{ + "errors": [ + { + "messageId": "shouldBeLast", + "line": 1, + "column": 14, + "endColumn": 19 + }, + { + "messageId": "shouldBeLast", + "line": 1, + "column": 21, + "endColumn": 26 + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### default-param-last > invalid + +```js +const foo = (a = 1, b: number, c = 2, d: number) => {}; +``` + +```json +{ + "errors": [ + { + "messageId": "shouldBeLast", + "line": 1, + "column": 14, + "endColumn": 19 + }, + { + "messageId": "shouldBeLast", + "line": 1, + "column": 32, + "endColumn": 37 + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### default-param-last > invalid + +```js +const foo = (a = 1, b: number, c = 2) => {}; +``` + +```json +{ + "errors": [ + { + "messageId": "shouldBeLast", + "line": 1, + "column": 14, + "endColumn": 19 + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### default-param-last > invalid + +```js +const foo = (a = 1, b: number, ...c) => {}; +``` + +```json +{ + "errors": [ + { + "messageId": "shouldBeLast", + "line": 1, + "column": 14, + "endColumn": 19 + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### default-param-last > invalid + +```js +const foo = (a?: number, b: number) => {}; +``` + +```json +{ + "errors": [ + { + "messageId": "shouldBeLast", + "line": 1, + "column": 14, + "endColumn": 24 + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### default-param-last > invalid + +```js +const foo = (a: number, b?: number, c: number) => {}; +``` + +```json +{ + "errors": [ + { + "messageId": "shouldBeLast", + "line": 1, + "column": 25, + "endColumn": 35 + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### default-param-last > invalid + +```js +const foo = (a = 1, b?: number, c: number) => {}; +``` + +```json +{ + "errors": [ + { + "messageId": "shouldBeLast", + "line": 1, + "column": 14, + "endColumn": 19 + }, + { + "messageId": "shouldBeLast", + "line": 1, + "column": 21, + "endColumn": 31 + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### default-param-last > invalid + +```js + + class Foo { + constructor( + public a: number, + protected b?: number, + private c: number, + ) {} + } + +``` + +```json +{ + "errors": [ + { + "messageId": "shouldBeLast", + "line": 5, + "column": 9, + "endColumn": 29 + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### default-param-last > invalid + +```js + + class Foo { + constructor( + public a: number, + protected b = 0, + private c: number, + ) {} + } + +``` + +```json +{ + "errors": [ + { + "messageId": "shouldBeLast", + "line": 5, + "column": 9, + "endColumn": 24 + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### default-param-last > invalid + +```js + + class Foo { + constructor( + public a?: number, + private b: number, + ) {} + } + +``` + +```json +{ + "errors": [ + { + "messageId": "shouldBeLast", + "line": 4, + "column": 9, + "endColumn": 26 + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### default-param-last > invalid + +```js + + class Foo { + constructor( + public a = 0, + private b: number, + ) {} + } + +``` + +```json +{ + "errors": [ + { + "messageId": "shouldBeLast", + "line": 4, + "column": 9, + "endColumn": 21 + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### default-param-last > invalid + +```js + + class Foo { + constructor(a = 0, b: number) {} + } + +``` + +```json +{ + "errors": [ + { + "messageId": "shouldBeLast", + "line": 3, + "column": 19, + "endColumn": 24 + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### default-param-last > invalid + +```js + + class Foo { + constructor(a?: number, b: number) {} + } + +``` + +```json +{ + "errors": [ + { + "messageId": "shouldBeLast", + "line": 3, + "column": 19, + "endColumn": 29 + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +### `dot-location` + +Pass: 75 / 78 (96.2%) +Fail: 3 / 78 (3.8%) + +#### dot-location > invalid + +```js +01 +.toExponential() +``` + +```json +{ + "output": "01.\ntoExponential()", + "options": [ + "object" + ], + "errors": [ + { + "messageId": "expectedDotAfterObject", + "line": 2, + "column": 1 + } + ] +} +``` + +TSError: Octal literals are not allowed. Use the syntax '0o1'. + at B (apps/oxlint/dist/ts_eslint.cjs) + at d (apps/oxlint/dist/ts_eslint.cjs) + at a (apps/oxlint/dist/ts_eslint.cjs) + at C (apps/oxlint/dist/ts_eslint.cjs) + + +#### dot-location > invalid + +```js +08 +.toExponential() +``` + +```json +{ + "output": "08 .\ntoExponential()", + "options": [ + "object" + ], + "errors": [ + { + "messageId": "expectedDotAfterObject", + "line": 2, + "column": 1 + } + ] +} +``` + +TSError: Decimals with leading zeros are not allowed. + at B (apps/oxlint/dist/ts_eslint.cjs) + at d (apps/oxlint/dist/ts_eslint.cjs) + at a (apps/oxlint/dist/ts_eslint.cjs) + at C (apps/oxlint/dist/ts_eslint.cjs) + + +#### dot-location > invalid + +```js +0190 +.toExponential() +``` + +```json +{ + "output": "0190 .\ntoExponential()", + "options": [ + "object" + ], + "errors": [ + { + "messageId": "expectedDotAfterObject", + "line": 2, + "column": 1 + } + ] +} +``` + +TSError: Decimals with leading zeros are not allowed. + at B (apps/oxlint/dist/ts_eslint.cjs) + at d (apps/oxlint/dist/ts_eslint.cjs) + at a (apps/oxlint/dist/ts_eslint.cjs) + at C (apps/oxlint/dist/ts_eslint.cjs) + + +### `dot-notation` + +Pass: 62 / 69 (89.9%) +Fail: 7 / 69 (10.1%) + +#### dot-notation > invalid + +```js +getResource() + .then(function(){}) + ["catch"](function(){}) + .then(function(){}) + ["catch"](function(){}); +``` + +```json +{ + "output": "getResource()\n .then(function(){})\n .catch(function(){})\n .then(function(){})\n .catch(function(){});", + "errors": [ + { + "messageId": "useDot", + "data": { + "key": "\"catch\"" + }, + "line": 3, + "column": 6 + }, + { + "messageId": "useDot", + "data": { + "key": "\"catch\"" + }, + "line": 5, + "column": 6 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Actual error location does not match expected error location. ++ actual - expected + + { + column: 6, ++ line: 5 +- line: 3 + } + + at assertInvalidTestCaseLocationIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### dot-notation > invalid + +```js +01['prop'] +``` + +```json +{ + "output": "01.prop", + "errors": [ + { + "messageId": "useDot", + "data": { + "key": "\"prop\"" + } + } + ] +} +``` + +TSError: Octal literals are not allowed. Use the syntax '0o1'. + at B (apps/oxlint/dist/ts_eslint.cjs) + at d (apps/oxlint/dist/ts_eslint.cjs) + at a (apps/oxlint/dist/ts_eslint.cjs) + at C (apps/oxlint/dist/ts_eslint.cjs) + + +#### dot-notation > invalid + +```js +01234567['prop'] +``` + +```json +{ + "output": "01234567.prop", + "errors": [ + { + "messageId": "useDot", + "data": { + "key": "\"prop\"" + } + } + ] +} +``` + +TSError: Octal literals are not allowed. Use the syntax '0o1234567'. + at B (apps/oxlint/dist/ts_eslint.cjs) + at d (apps/oxlint/dist/ts_eslint.cjs) + at a (apps/oxlint/dist/ts_eslint.cjs) + at C (apps/oxlint/dist/ts_eslint.cjs) + + +#### dot-notation > invalid + +```js +08['prop'] +``` + +```json +{ + "output": "08 .prop", + "errors": [ + { + "messageId": "useDot", + "data": { + "key": "\"prop\"" + } + } + ] +} +``` + +TSError: Decimals with leading zeros are not allowed. + at B (apps/oxlint/dist/ts_eslint.cjs) + at d (apps/oxlint/dist/ts_eslint.cjs) + at a (apps/oxlint/dist/ts_eslint.cjs) + at C (apps/oxlint/dist/ts_eslint.cjs) + + +#### dot-notation > invalid + +```js +090['prop'] +``` + +```json +{ + "output": "090 .prop", + "errors": [ + { + "messageId": "useDot", + "data": { + "key": "\"prop\"" + } + } + ] +} +``` + +TSError: Decimals with leading zeros are not allowed. + at B (apps/oxlint/dist/ts_eslint.cjs) + at d (apps/oxlint/dist/ts_eslint.cjs) + at a (apps/oxlint/dist/ts_eslint.cjs) + at C (apps/oxlint/dist/ts_eslint.cjs) + + +#### dot-notation > invalid + +```js +018['prop'] +``` + +```json +{ + "output": "018 .prop", + "errors": [ + { + "messageId": "useDot", + "data": { + "key": "\"prop\"" + } + } + ] +} +``` + +TSError: Decimals with leading zeros are not allowed. + at B (apps/oxlint/dist/ts_eslint.cjs) + at d (apps/oxlint/dist/ts_eslint.cjs) + at a (apps/oxlint/dist/ts_eslint.cjs) + at C (apps/oxlint/dist/ts_eslint.cjs) + + +#### dot-notation > invalid + +```js +let?.true +``` + +```json +{ + "output": "let?.[\"true\"]", + "options": [ + { + "allowKeywords": false + } + ], + "languageOptions": { + "ecmaVersion": 2020 + }, + "errors": [ + { + "messageId": "useBrackets", + "data": { + "key": "true" + } + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +### `eol-last` + +Pass: 29 / 35 (82.9%) +Fail: 6 / 35 (17.1%) + +#### eol-last > invalid + +```js +var a = 123; +``` + +```json +{ + "output": "var a = 123;\n", + "errors": [ + { + "messageId": "missing", + "line": 1, + "column": 13 + } + ] +} +``` + +TypeError: Expected `loc` to be an object with integer `line` and `column` properties. + at getOffsetFromLineColumn (apps/oxlint/dist/lint.js) + at report (apps/oxlint/dist/lint.js) + at Object.report (apps/oxlint/dist/lint.js) + at checkBadEOF (apps/oxlint/conformance/submodules/eslint/lib/rules/eol-last.js:97:14) + + +#### eol-last > invalid + +```js +var a = 123; + +``` + +```json +{ + "output": "var a = 123;\n \n", + "errors": [ + { + "messageId": "missing", + "line": 2, + "column": 4 + } + ] +} +``` + +TypeError: Expected `loc` to be an object with integer `line` and `column` properties. + at getOffsetFromLineColumn (apps/oxlint/dist/lint.js) + at report (apps/oxlint/dist/lint.js) + at Object.report (apps/oxlint/dist/lint.js) + at checkBadEOF (apps/oxlint/conformance/submodules/eslint/lib/rules/eol-last.js:97:14) + + +#### eol-last > invalid + +```js +var a = 123; +``` + +```json +{ + "output": "var a = 123;\n", + "options": [ + "unix" + ], + "errors": [ + { + "messageId": "missing", + "line": 1, + "column": 13 + } + ] +} +``` + +TypeError: Expected `loc` to be an object with integer `line` and `column` properties. + at getOffsetFromLineColumn (apps/oxlint/dist/lint.js) + at report (apps/oxlint/dist/lint.js) + at Object.report (apps/oxlint/dist/lint.js) + at checkBadEOF (apps/oxlint/conformance/submodules/eslint/lib/rules/eol-last.js:97:14) + + +#### eol-last > invalid + +```js +var a = 123; + +``` + +```json +{ + "output": "var a = 123;\n \n", + "options": [ + "unix" + ], + "errors": [ + { + "messageId": "missing", + "line": 2, + "column": 4 + } + ] +} +``` + +TypeError: Expected `loc` to be an object with integer `line` and `column` properties. + at getOffsetFromLineColumn (apps/oxlint/dist/lint.js) + at report (apps/oxlint/dist/lint.js) + at Object.report (apps/oxlint/dist/lint.js) + at checkBadEOF (apps/oxlint/conformance/submodules/eslint/lib/rules/eol-last.js:97:14) + + +#### eol-last > invalid + +```js +var a = 123; +``` + +```json +{ + "output": "var a = 123;\r\n", + "options": [ + "windows" + ], + "errors": [ + { + "messageId": "missing", + "line": 1, + "column": 13 + } + ] +} +``` + +TypeError: Expected `loc` to be an object with integer `line` and `column` properties. + at getOffsetFromLineColumn (apps/oxlint/dist/lint.js) + at report (apps/oxlint/dist/lint.js) + at Object.report (apps/oxlint/dist/lint.js) + at checkBadEOF (apps/oxlint/conformance/submodules/eslint/lib/rules/eol-last.js:97:14) + + +#### eol-last > invalid + +```js +var a = 123;\u000d + +``` + +```json +{ + "code": "var a = 123;\r\n ", + "output": "var a = 123;\r\n \r\n", + "options": [ + "windows" + ], + "errors": [ + { + "messageId": "missing", + "line": 2, + "column": 4 + } + ] +} +``` + +TypeError: Expected `loc` to be an object with integer `line` and `column` properties. + at getOffsetFromLineColumn (apps/oxlint/dist/lint.js) + at report (apps/oxlint/dist/lint.js) + at Object.report (apps/oxlint/dist/lint.js) + at checkBadEOF (apps/oxlint/conformance/submodules/eslint/lib/rules/eol-last.js:97:14) + + +### `func-call-spacing` + +Pass: 136 / 151 (90.1%) +Fail: 15 / 151 (9.9%) + +#### func-call-spacing > invalid + +```js +f +(); +``` + +```json +{ + "output": null, + "errors": [ + { + "messageId": "unexpectedWhitespace" + } + ] +} +``` + +RangeError: Invalid column number (column -1 requested). + at getOffsetFromLineColumn (apps/oxlint/dist/lint.js) + at report (apps/oxlint/dist/lint.js) + at Object.report (apps/oxlint/dist/lint.js) + at checkSpacing (apps/oxlint/conformance/submodules/eslint/lib/rules/func-call-spacing.js:146:13) + + +#### func-call-spacing > invalid + +```js +f\u000d(); +``` + +```json +{ + "code": "f\r();", + "output": null, + "errors": [ + { + "messageId": "unexpectedWhitespace" + } + ] +} +``` + +RangeError: Invalid column number (column -1 requested). + at getOffsetFromLineColumn (apps/oxlint/dist/lint.js) + at report (apps/oxlint/dist/lint.js) + at Object.report (apps/oxlint/dist/lint.js) + at checkSpacing (apps/oxlint/conformance/submodules/eslint/lib/rules/func-call-spacing.js:146:13) + + +#### func-call-spacing > invalid + +```js +f
(); +``` + +```json +{ + "output": null, + "errors": [ + { + "messageId": "unexpectedWhitespace" + } + ] +} +``` + +RangeError: Invalid column number (column -1 requested). + at getOffsetFromLineColumn (apps/oxlint/dist/lint.js) + at report (apps/oxlint/dist/lint.js) + at Object.report (apps/oxlint/dist/lint.js) + at checkSpacing (apps/oxlint/conformance/submodules/eslint/lib/rules/func-call-spacing.js:146:13) + + +#### func-call-spacing > invalid + +```js +f
(); +``` + +```json +{ + "output": null, + "errors": [ + { + "messageId": "unexpectedWhitespace" + } + ] +} +``` + +RangeError: Invalid column number (column -1 requested). + at getOffsetFromLineColumn (apps/oxlint/dist/lint.js) + at report (apps/oxlint/dist/lint.js) + at Object.report (apps/oxlint/dist/lint.js) + at checkSpacing (apps/oxlint/conformance/submodules/eslint/lib/rules/func-call-spacing.js:146:13) + + +#### func-call-spacing > invalid + +```js +f\u000d +(); +``` + +```json +{ + "code": "f\r\n();", + "output": null, + "errors": [ + { + "messageId": "unexpectedWhitespace" + } + ] +} +``` + +RangeError: Invalid column number (column -1 requested). + at getOffsetFromLineColumn (apps/oxlint/dist/lint.js) + at report (apps/oxlint/dist/lint.js) + at Object.report (apps/oxlint/dist/lint.js) + at checkSpacing (apps/oxlint/conformance/submodules/eslint/lib/rules/func-call-spacing.js:146:13) + + +#### func-call-spacing > invalid + +```js +import +(source); +``` + +```json +{ + "output": null, + "languageOptions": { + "ecmaVersion": 2020 + }, + "errors": [ + { + "messageId": "unexpectedWhitespace" + } + ] +} +``` + +RangeError: Invalid column number (column -1 requested). + at getOffsetFromLineColumn (apps/oxlint/dist/lint.js) + at report (apps/oxlint/dist/lint.js) + at Object.report (apps/oxlint/dist/lint.js) + at checkSpacing (apps/oxlint/conformance/submodules/eslint/lib/rules/func-call-spacing.js:146:13) + + +#### func-call-spacing > invalid + +```js +f +(); +``` + +```json +{ + "output": null, + "options": [ + "never" + ], + "errors": [ + { + "messageId": "unexpectedWhitespace", + "line": 1, + "column": 2, + "endLine": 2, + "endColumn": 0 + } + ] +} +``` + +RangeError: Invalid column number (column -1 requested). + at getOffsetFromLineColumn (apps/oxlint/dist/lint.js) + at report (apps/oxlint/dist/lint.js) + at Object.report (apps/oxlint/dist/lint.js) + at checkSpacing (apps/oxlint/conformance/submodules/eslint/lib/rules/func-call-spacing.js:146:13) + + +#### func-call-spacing > invalid + +```js +this.cancelled.add(request) +this.decrement(request) +(0, request.reject)(new api.Cancel()) +``` + +```json +{ + "output": null, + "options": [ + "never" + ], + "errors": [ + { + "messageId": "unexpectedWhitespace", + "line": 2, + "column": 24, + "endLine": 3, + "endColumn": 0 + } + ] +} +``` + +RangeError: Invalid column number (column -1 requested). + at getOffsetFromLineColumn (apps/oxlint/dist/lint.js) + at report (apps/oxlint/dist/lint.js) + at Object.report (apps/oxlint/dist/lint.js) + at checkSpacing (apps/oxlint/conformance/submodules/eslint/lib/rules/func-call-spacing.js:146:13) + + +#### func-call-spacing > invalid + +```js +var a = foo +(function(global) {}(this)); +``` + +```json +{ + "output": null, + "options": [ + "never" + ], + "errors": [ + { + "messageId": "unexpectedWhitespace", + "line": 1, + "column": 12, + "endLine": 2, + "endColumn": 0 + } + ] +} +``` + +RangeError: Invalid column number (column -1 requested). + at getOffsetFromLineColumn (apps/oxlint/dist/lint.js) + at report (apps/oxlint/dist/lint.js) + at Object.report (apps/oxlint/dist/lint.js) + at checkSpacing (apps/oxlint/conformance/submodules/eslint/lib/rules/func-call-spacing.js:146:13) + + +#### func-call-spacing > invalid + +```js +var a = foo +(0, baz()) +``` + +```json +{ + "output": null, + "options": [ + "never" + ], + "errors": [ + { + "messageId": "unexpectedWhitespace", + "line": 1, + "column": 12, + "endColumn": 0, + "endLine": 2 + } + ] +} +``` + +RangeError: Invalid column number (column -1 requested). + at getOffsetFromLineColumn (apps/oxlint/dist/lint.js) + at report (apps/oxlint/dist/lint.js) + at Object.report (apps/oxlint/dist/lint.js) + at checkSpacing (apps/oxlint/conformance/submodules/eslint/lib/rules/func-call-spacing.js:146:13) + + +#### func-call-spacing > invalid + +```js +f\u000d(); +``` + +```json +{ + "code": "f\r();", + "output": null, + "options": [ + "never" + ], + "errors": [ + { + "messageId": "unexpectedWhitespace" + } + ] +} +``` + +RangeError: Invalid column number (column -1 requested). + at getOffsetFromLineColumn (apps/oxlint/dist/lint.js) + at report (apps/oxlint/dist/lint.js) + at Object.report (apps/oxlint/dist/lint.js) + at checkSpacing (apps/oxlint/conformance/submodules/eslint/lib/rules/func-call-spacing.js:146:13) + + +#### func-call-spacing > invalid + +```js +f
(); +``` + +```json +{ + "output": null, + "options": [ + "never" + ], + "errors": [ + { + "messageId": "unexpectedWhitespace" + } + ] +} +``` + +RangeError: Invalid column number (column -1 requested). + at getOffsetFromLineColumn (apps/oxlint/dist/lint.js) + at report (apps/oxlint/dist/lint.js) + at Object.report (apps/oxlint/dist/lint.js) + at checkSpacing (apps/oxlint/conformance/submodules/eslint/lib/rules/func-call-spacing.js:146:13) + + +#### func-call-spacing > invalid + +```js +f
(); +``` + +```json +{ + "output": null, + "options": [ + "never" + ], + "errors": [ + { + "messageId": "unexpectedWhitespace" + } + ] +} +``` + +RangeError: Invalid column number (column -1 requested). + at getOffsetFromLineColumn (apps/oxlint/dist/lint.js) + at report (apps/oxlint/dist/lint.js) + at Object.report (apps/oxlint/dist/lint.js) + at checkSpacing (apps/oxlint/conformance/submodules/eslint/lib/rules/func-call-spacing.js:146:13) + + +#### func-call-spacing > invalid + +```js +f\u000d +(); +``` + +```json +{ + "code": "f\r\n();", + "output": null, + "options": [ + "never" + ], + "errors": [ + { + "messageId": "unexpectedWhitespace" + } + ] +} +``` + +RangeError: Invalid column number (column -1 requested). + at getOffsetFromLineColumn (apps/oxlint/dist/lint.js) + at report (apps/oxlint/dist/lint.js) + at Object.report (apps/oxlint/dist/lint.js) + at checkSpacing (apps/oxlint/conformance/submodules/eslint/lib/rules/func-call-spacing.js:146:13) + + +#### func-call-spacing > invalid + +```js +f +()() +``` + +```json +{ + "output": "f\n() ()", + "options": [ + "always" + ], + "errors": [ + { + "messageId": "unexpectedNewline" + }, + { + "messageId": "missing" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: messageId 'missing' does not match expected messageId 'unexpectedNewline' ++ actual - expected + ++ 'missing' +- 'unexpectedNewline' + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +### `func-name-matching` + +Pass: 192 / 193 (99.5%) +Fail: 1 / 193 (0.5%) + +#### func-name-matching > valid + +```js +var obj = { '\u1885': function foo() {} }; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 5, + "sourceType": "script" + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/func-name-matching', + message: 'Function name `foo` should match property name `ᢅ`.', + messageId: 'matchProperty', + severity: 1, + nodeType: 'Literal', + line: 1, + column: 12, + endLine: 1, + endColumn: 39, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +### `func-style` + +Pass: 59 / 120 (49.2%) +Fail: 61 / 120 (50.8%) + +#### func-style > valid + +```js +function foo(): void {} + function bar(): void {} +``` + +```json +{ + "options": [ + "declaration" + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### func-style > valid + +```js +(function(): void { /* code */ }()); +``` + +```json +{ + "options": [ + "declaration" + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### func-style > valid + +```js +const module = (function(): { [key: string]: any } { return {}; }()); +``` + +```json +{ + "options": [ + "declaration" + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### func-style > valid + +```js +const object: { foo: () => void } = { foo: function(): void {} }; +``` + +```json +{ + "options": [ + "declaration" + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### func-style > valid + +```js +Array.prototype.foo = function(): void {}; +``` + +```json +{ + "options": [ + "declaration" + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### func-style > valid + +```js +const foo: () => void = function(): void {}; + const bar: () => void = function(): void {}; +``` + +```json +{ + "options": [ + "expression" + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### func-style > valid + +```js +const foo: () => void = (): void => {}; + const bar: () => void = (): void => {} +``` + +```json +{ + "options": [ + "expression" + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### func-style > valid + +```js +const foo: () => void = function(): void { this; }.bind(this); +``` + +```json +{ + "options": [ + "declaration" + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### func-style > valid + +```js +const foo: () => void = (): void => { this; }; +``` + +```json +{ + "options": [ + "declaration" + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### func-style > valid + +```js +class C extends D { foo(): void { const bar: () => void = (): void => { super.baz(); }; } } +``` + +```json +{ + "options": [ + "declaration" + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### func-style > valid + +```js +const obj: { foo(): void } = { foo(): void { const bar: () => void = (): void => super.baz; } } +``` + +```json +{ + "options": [ + "declaration" + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### func-style > valid + +```js +const foo: () => void = (): void => {}; +``` + +```json +{ + "options": [ + "declaration", + { + "allowArrowFunctions": true + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### func-style > valid + +```js +const foo: () => void = (): void => { function foo(): void { this; } }; +``` + +```json +{ + "options": [ + "declaration", + { + "allowArrowFunctions": true + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### func-style > valid + +```js +const foo: () => { bar(): void } = (): { bar(): void } => ({ bar(): void { super.baz(); } }); +``` + +```json +{ + "options": [ + "declaration", + { + "allowArrowFunctions": true + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### func-style > valid + +```js +export function foo(): void {}; +``` + +```json +{ + "options": [ + "declaration" + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### func-style > valid + +```js +export function foo(): void {}; +``` + +```json +{ + "options": [ + "expression", + { + "overrides": { + "namedExports": "declaration" + } + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### func-style > valid + +```js +export function foo(): void {}; +``` + +```json +{ + "options": [ + "declaration", + { + "overrides": { + "namedExports": "declaration" + } + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### func-style > valid + +```js +export function foo(): void {}; +``` + +```json +{ + "options": [ + "expression", + { + "overrides": { + "namedExports": "ignore" + } + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### func-style > valid + +```js +export function foo(): void {}; +``` + +```json +{ + "options": [ + "declaration", + { + "overrides": { + "namedExports": "ignore" + } + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### func-style > valid + +```js +export const foo: () => void = function(): void {}; +``` + +```json +{ + "options": [ + "expression" + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### func-style > valid + +```js +export const foo: () => void = function(): void {}; +``` + +```json +{ + "options": [ + "declaration", + { + "overrides": { + "namedExports": "expression" + } + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### func-style > valid + +```js +export const foo: () => void = function(): void {}; +``` + +```json +{ + "options": [ + "expression", + { + "overrides": { + "namedExports": "expression" + } + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### func-style > valid + +```js +export const foo: () => void = function(): void {}; +``` + +```json +{ + "options": [ + "declaration", + { + "overrides": { + "namedExports": "ignore" + } + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### func-style > valid + +```js +export const foo: () => void = function(): void {}; +``` + +```json +{ + "options": [ + "expression", + { + "overrides": { + "namedExports": "ignore" + } + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### func-style > valid + +```js +const expression: Fn = function () {} +``` + +```json +{ + "options": [ + "declaration", + { + "allowTypeAnnotation": true + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### func-style > valid + +```js +const arrow: Fn = () => {} +``` + +```json +{ + "options": [ + "declaration", + { + "allowTypeAnnotation": true + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### func-style > valid + +```js +export const expression: Fn = function () {} +``` + +```json +{ + "options": [ + "declaration", + { + "allowTypeAnnotation": true + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### func-style > valid + +```js +export const arrow: Fn = () => {} +``` + +```json +{ + "options": [ + "declaration", + { + "allowTypeAnnotation": true + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### func-style > valid + +```js +export const expression: Fn = function () {} +``` + +```json +{ + "options": [ + "expression", + { + "allowTypeAnnotation": true, + "overrides": { + "namedExports": "declaration" + } + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### func-style > valid + +```js +export const arrow: Fn = () => {} +``` + +```json +{ + "options": [ + "expression", + { + "allowTypeAnnotation": true, + "overrides": { + "namedExports": "declaration" + } + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### func-style > valid + +```js +$1: function $2(): void { } +``` + +```json +{ + "options": [ + "declaration" + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### func-style > valid + +```js +switch ($0) { case $1: function $2(): void { } } +``` + +```json +{ + "options": [ + "declaration" + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### func-style > valid + +```js + +\u0009\u0009function test(a: string): string; +\u0009\u0009function test(a: number): number; +\u0009\u0009function test(a: unknown) { +\u0009\u0009 return a; +\u0009\u0009} +\u0009\u0009 +``` + +```json +{ + "code": "\n\t\tfunction test(a: string): string;\n\t\tfunction test(a: number): number;\n\t\tfunction test(a: unknown) {\n\t\t return a;\n\t\t}\n\t\t" +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### func-style > valid + +```js + +\u0009\u0009export function test(a: string): string; +\u0009\u0009export function test(a: number): number; +\u0009\u0009export function test(a: unknown) { +\u0009\u0009 return a; +\u0009\u0009} +\u0009\u0009 +``` + +```json +{ + "code": "\n\t\texport function test(a: string): string;\n\t\texport function test(a: number): number;\n\t\texport function test(a: unknown) {\n\t\t return a;\n\t\t}\n\t\t" +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### func-style > valid + +```js + +\u0009\u0009\u0009export function test(a: string): string; +\u0009\u0009 export function test(a: number): number; +\u0009\u0009 export function test(a: unknown) { +\u0009\u0009 return a; +\u0009\u0009 } +\u0009\u0009\u0009 +``` + +```json +{ + "code": "\n\t\t\texport function test(a: string): string;\n\t\t export function test(a: number): number;\n\t\t export function test(a: unknown) {\n\t\t return a;\n\t\t }\n\t\t\t", + "options": [ + "expression", + { + "overrides": { + "namedExports": "expression" + } + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### func-style > valid + +```js + +\u0009\u0009switch ($0) { +\u0009\u0009\u0009case $1: +\u0009\u0009\u0009function test(a: string): string; +\u0009\u0009\u0009function test(a: number): number; +\u0009\u0009\u0009function test(a: unknown) { +\u0009\u0009\u0009return a; +\u0009\u0009\u0009} +\u0009\u0009} +\u0009\u0009 +``` + +```json +{ + "code": "\n\t\tswitch ($0) {\n\t\t\tcase $1:\n\t\t\tfunction test(a: string): string;\n\t\t\tfunction test(a: number): number;\n\t\t\tfunction test(a: unknown) {\n\t\t\treturn a;\n\t\t\t}\n\t\t}\n\t\t" +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### func-style > valid + +```js + +\u0009\u0009switch ($0) { +\u0009\u0009\u0009case $1: +\u0009\u0009\u0009function test(a: string): string; +\u0009\u0009\u0009break; +\u0009\u0009\u0009case $2: +\u0009\u0009\u0009function test(a: unknown) { +\u0009\u0009\u0009return a; +\u0009\u0009\u0009} +\u0009\u0009} +\u0009\u0009 +``` + +```json +{ + "code": "\n\t\tswitch ($0) {\n\t\t\tcase $1:\n\t\t\tfunction test(a: string): string;\n\t\t\tbreak;\n\t\t\tcase $2:\n\t\t\tfunction test(a: unknown) {\n\t\t\treturn a;\n\t\t\t}\n\t\t}\n\t\t" +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### func-style > invalid + +```js +const foo: () => void = function(): void {}; +``` + +```json +{ + "options": [ + "declaration" + ], + "errors": [ + { + "messageId": "declaration" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### func-style > invalid + +```js +const foo: () => void = (): void => {}; +``` + +```json +{ + "options": [ + "declaration" + ], + "errors": [ + { + "messageId": "declaration" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### func-style > invalid + +```js +const foo: () => void = (): void => { function foo(): void { this; } }; +``` + +```json +{ + "options": [ + "declaration" + ], + "errors": [ + { + "messageId": "declaration" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### func-style > invalid + +```js +const foo: () => { bar(): void } = (): { bar(): void } => ({ bar(): void { super.baz(); } }); +``` + +```json +{ + "options": [ + "declaration" + ], + "errors": [ + { + "messageId": "declaration" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### func-style > invalid + +```js +function foo(): void {} +``` + +```json +{ + "options": [ + "expression" + ], + "errors": [ + { + "messageId": "expression" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### func-style > invalid + +```js +export function foo(): void {} +``` + +```json +{ + "options": [ + "expression" + ], + "errors": [ + { + "messageId": "expression" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### func-style > invalid + +```js +export function foo(): void {}; +``` + +```json +{ + "options": [ + "declaration", + { + "overrides": { + "namedExports": "expression" + } + } + ], + "errors": [ + { + "messageId": "expression" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### func-style > invalid + +```js +export function foo(): void {}; +``` + +```json +{ + "options": [ + "expression", + { + "overrides": { + "namedExports": "expression" + } + } + ], + "errors": [ + { + "messageId": "expression" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### func-style > invalid + +```js +export const foo: () => void = function(): void {}; +``` + +```json +{ + "options": [ + "declaration" + ], + "errors": [ + { + "messageId": "declaration" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### func-style > invalid + +```js +export const foo: () => void = function(): void {}; +``` + +```json +{ + "options": [ + "expression", + { + "overrides": { + "namedExports": "declaration" + } + } + ], + "errors": [ + { + "messageId": "declaration" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### func-style > invalid + +```js +export const foo: () => void = function(): void {}; +``` + +```json +{ + "options": [ + "declaration", + { + "overrides": { + "namedExports": "declaration" + } + } + ], + "errors": [ + { + "messageId": "declaration" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### func-style > invalid + +```js +export const foo: () => void = (): void => {}; +``` + +```json +{ + "options": [ + "declaration" + ], + "errors": [ + { + "messageId": "declaration" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### func-style > invalid + +```js +export const b: () => void = (): void => {}; +``` + +```json +{ + "options": [ + "expression", + { + "overrides": { + "namedExports": "declaration" + } + } + ], + "errors": [ + { + "messageId": "declaration" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### func-style > invalid + +```js +export const c: () => void = (): void => {}; +``` + +```json +{ + "options": [ + "declaration", + { + "overrides": { + "namedExports": "declaration" + } + } + ], + "errors": [ + { + "messageId": "declaration" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### func-style > invalid + +```js +function foo(): void {}; +``` + +```json +{ + "options": [ + "expression", + { + "overrides": { + "namedExports": "declaration" + } + } + ], + "errors": [ + { + "messageId": "expression" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### func-style > invalid + +```js +const foo: () => void = function(): void {}; +``` + +```json +{ + "options": [ + "declaration", + { + "overrides": { + "namedExports": "expression" + } + } + ], + "errors": [ + { + "messageId": "declaration" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### func-style > invalid + +```js +const foo: () => void = (): void => {}; +``` + +```json +{ + "options": [ + "declaration", + { + "overrides": { + "namedExports": "expression" + } + } + ], + "errors": [ + { + "messageId": "declaration" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### func-style > invalid + +```js +$1: function $2(): void { } +``` + +```json +{ + "errors": [ + { + "messageId": "expression" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### func-style > invalid + +```js +if (foo) function bar(): string {} +``` + +```json +{ + "errors": [ + { + "messageId": "expression" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### func-style > invalid + +```js + +\u0009\u0009\u0009function test1(a: string): string; +\u0009\u0009\u0009function test2(a: number): number; +\u0009\u0009\u0009function test3(a: unknown) { +\u0009\u0009\u0009 return a; +\u0009\u0009\u0009} +``` + +```json +{ + "code": "\n\t\t\tfunction test1(a: string): string;\n\t\t\tfunction test2(a: number): number;\n\t\t\tfunction test3(a: unknown) {\n\t\t\t return a;\n\t\t\t}", + "errors": [ + { + "messageId": "expression" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### func-style > invalid + +```js + +\u0009\u0009\u0009export function test1(a: string): string; +\u0009\u0009\u0009export function test2(a: number): number; +\u0009\u0009\u0009export function test3(a: unknown) { +\u0009\u0009\u0009 return a; +\u0009\u0009\u0009} +``` + +```json +{ + "code": "\n\t\t\texport function test1(a: string): string;\n\t\t\texport function test2(a: number): number;\n\t\t\texport function test3(a: unknown) {\n\t\t\t return a;\n\t\t\t}", + "errors": [ + { + "messageId": "expression" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### func-style > invalid + +```js + +\u0009\u0009\u0009export function test1(a: string): string; +\u0009\u0009 export function test2(a: number): number; +\u0009\u0009 export function test3(a: unknown) { +\u0009\u0009 return a; +\u0009\u0009 } +\u0009\u0009\u0009 +``` + +```json +{ + "code": "\n\t\t\texport function test1(a: string): string;\n\t\t export function test2(a: number): number;\n\t\t export function test3(a: unknown) {\n\t\t return a;\n\t\t }\n\t\t\t", + "options": [ + "expression", + { + "overrides": { + "namedExports": "expression" + } + } + ], + "errors": [ + { + "messageId": "expression" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### func-style > invalid + +```js + +\u0009\u0009\u0009switch ($0) { +\u0009\u0009\u0009\u0009case $1: +\u0009\u0009\u0009\u0009function test1(a: string): string; +\u0009\u0009\u0009\u0009function test2(a: number): number; +\u0009\u0009\u0009\u0009function test3(a: unknown) { +\u0009\u0009\u0009\u0009\u0009return a; +\u0009\u0009\u0009\u0009} +\u0009\u0009\u0009} +\u0009\u0009\u0009 +``` + +```json +{ + "code": "\n\t\t\tswitch ($0) {\n\t\t\t\tcase $1:\n\t\t\t\tfunction test1(a: string): string;\n\t\t\t\tfunction test2(a: number): number;\n\t\t\t\tfunction test3(a: unknown) {\n\t\t\t\t\treturn a;\n\t\t\t\t}\n\t\t\t}\n\t\t\t", + "errors": [ + { + "messageId": "expression" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### func-style > invalid + +```js + +\u0009\u0009\u0009switch ($0) { +\u0009\u0009\u0009\u0009case $1: +\u0009\u0009\u0009\u0009function test1(a: string): string; +\u0009\u0009\u0009\u0009break; +\u0009\u0009\u0009\u0009case $2: +\u0009\u0009\u0009\u0009function test2(a: unknown) { +\u0009\u0009\u0009\u0009return a; +\u0009\u0009\u0009\u0009} +\u0009\u0009\u0009} +\u0009\u0009\u0009 +``` + +```json +{ + "code": "\n\t\t\tswitch ($0) {\n\t\t\t\tcase $1:\n\t\t\t\tfunction test1(a: string): string;\n\t\t\t\tbreak;\n\t\t\t\tcase $2:\n\t\t\t\tfunction test2(a: unknown) {\n\t\t\t\treturn a;\n\t\t\t\t}\n\t\t\t}\n\t\t\t", + "errors": [ + { + "messageId": "expression" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +### `function-paren-newline` + +Pass: 174 / 177 (98.3%) +Fail: 3 / 177 (1.7%) + +#### function-paren-newline > valid + +```js +const method6 = ( + abc: number, + def: () => void, +): [ + string, + () => void +] => [`a${abc}`, def]; +method6(3, () => {}); +``` + +```json +{ + "options": [ + "multiline" + ], + "languageOptions": { + "parser": {} + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### function-paren-newline > invalid + +```js + + function baz(qwe, foo, + bar) {} + +``` + +```json +{ + "output": "\n function baz(\nqwe, \nfoo,\n bar\n) {}\n ", + "options": [ + "multiline-arguments" + ], + "errors": [ + { + "messageId": "expectedAfter" + }, + { + "messageId": "expectedBetween" + }, + { + "messageId": "expectedBefore" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: messageId 'expectedBefore' does not match expected messageId 'expectedBetween' ++ actual - expected + ++ 'expectedBefore' +- 'expectedBetween' + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### function-paren-newline > invalid + +```js +const method6 = ( + abc: number, + def: () => void, +): [ + string, + () => void +] => [`a${abc}`, def]; +method6(3, () => {}); +``` + +```json +{ + "output": "const method6 = (abc: number,\n def: () => void,): [\n string,\n () => void\n] => [`a${abc}`, def];\nmethod6(3, () => {});", + "options": [ + "never" + ], + "languageOptions": { + "parser": {} + }, + "errors": [ + { + "messageId": "unexpectedAfter" + }, + { + "messageId": "unexpectedBefore" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +### `getter-return` + +Pass: 36 / 70 (51.4%) +Fail: 34 / 70 (48.6%) + +#### getter-return > invalid + +```js +var foo = { get bar() {} }; +``` + +```json +{ + "errors": [ + { + "messageId": "expected", + "data": { + "name": "getter 'bar'" + }, + "line": 1, + "column": 13, + "endLine": 1, + "endColumn": 20 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### getter-return > invalid + +```js +var foo = { get + bar () {} }; +``` + +```json +{ + "errors": [ + { + "messageId": "expected", + "data": { + "name": "getter 'bar'" + }, + "line": 1, + "column": 13, + "endLine": 2, + "endColumn": 6 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### getter-return > invalid + +```js +var foo = { get bar(){if(baz) {return true;}} }; +``` + +```json +{ + "errors": [ + { + "messageId": "expectedAlways", + "data": { + "name": "getter 'bar'" + }, + "line": 1, + "column": 13, + "endLine": 1, + "endColumn": 20 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### getter-return > invalid + +```js +var foo = { get bar() { ~function () {return true;}} }; +``` + +```json +{ + "errors": [ + { + "messageId": "expected", + "data": { + "name": "getter 'bar'" + }, + "line": 1, + "column": 13, + "endLine": 1, + "endColumn": 20 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### getter-return > invalid + +```js +var foo = { get bar() { return; } }; +``` + +```json +{ + "errors": [ + { + "messageId": "expected", + "data": { + "name": "getter 'bar'" + }, + "line": 1, + "column": 25, + "endLine": 1, + "endColumn": 32 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### getter-return > invalid + +```js +var foo = { get bar() {} }; +``` + +```json +{ + "options": [ + { + "allowImplicit": true + } + ], + "errors": [ + { + "messageId": "expected", + "data": { + "name": "getter 'bar'" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### getter-return > invalid + +```js +var foo = { get bar() {if (baz) {return;}} }; +``` + +```json +{ + "options": [ + { + "allowImplicit": true + } + ], + "errors": [ + { + "messageId": "expectedAlways", + "data": { + "name": "getter 'bar'" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### getter-return > invalid + +```js +class foo { get bar(){} } +``` + +```json +{ + "errors": [ + { + "messageId": "expected", + "data": { + "name": "getter 'bar'" + }, + "line": 1, + "column": 13, + "endLine": 1, + "endColumn": 20 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### getter-return > invalid + +```js +var foo = class { + static get +bar(){} } +``` + +```json +{ + "errors": [ + { + "messageId": "expected", + "data": { + "name": "static getter 'bar'" + }, + "line": 2, + "column": 3, + "endLine": 3, + "endColumn": 4 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### getter-return > invalid + +```js +class foo { get bar(){ if (baz) { return true; }}} +``` + +```json +{ + "errors": [ + { + "messageId": "expectedAlways", + "data": { + "name": "getter 'bar'" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### getter-return > invalid + +```js +class foo { get bar(){ ~function () { return true; }()}} +``` + +```json +{ + "errors": [ + { + "messageId": "expected", + "data": { + "name": "getter 'bar'" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### getter-return > invalid + +```js +class foo { get bar(){} } +``` + +```json +{ + "options": [ + { + "allowImplicit": true + } + ], + "errors": [ + { + "messageId": "expected", + "data": { + "name": "getter 'bar'" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### getter-return > invalid + +```js +class foo { get bar(){if (baz) {return true;} } } +``` + +```json +{ + "options": [ + { + "allowImplicit": true + } + ], + "errors": [ + { + "messageId": "expectedAlways", + "data": { + "name": "getter 'bar'" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### getter-return > invalid + +```js +Object.defineProperty(foo, 'bar', { get: function (){}}); +``` + +```json +{ + "errors": [ + { + "messageId": "expected", + "data": { + "name": "method 'get'" + }, + "line": 1, + "column": 37, + "endLine": 1, + "endColumn": 51 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### getter-return > invalid + +```js +Object.defineProperty(foo, 'bar', { get: function getfoo (){}}); +``` + +```json +{ + "errors": [ + { + "messageId": "expected", + "data": { + "name": "method 'get'" + }, + "line": 1, + "column": 37, + "endLine": 1, + "endColumn": 58 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### getter-return > invalid + +```js +Object.defineProperty(foo, 'bar', { get(){} }); +``` + +```json +{ + "errors": [ + { + "messageId": "expected", + "data": { + "name": "method 'get'" + }, + "line": 1, + "column": 37, + "endLine": 1, + "endColumn": 40 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### getter-return > invalid + +```js +Object.defineProperty(foo, 'bar', { get: () => {}}); +``` + +```json +{ + "errors": [ + { + "messageId": "expected", + "data": { + "name": "method 'get'" + }, + "line": 1, + "column": 37, + "endLine": 1, + "endColumn": 42 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### getter-return > invalid + +```js +Object.defineProperty(foo, "bar", { get: function (){if(bar) {return true;}}}); +``` + +```json +{ + "errors": [ + { + "messageId": "expectedAlways" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### getter-return > invalid + +```js +Object.defineProperty(foo, "bar", { get: function (){ ~function () { return true; }()}}); +``` + +```json +{ + "errors": [ + { + "messageId": "expected" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### getter-return > invalid + +```js +Reflect.defineProperty(foo, 'bar', { get: function (){}}); +``` + +```json +{ + "errors": [ + { + "messageId": "expected", + "data": { + "name": "method 'get'" + }, + "line": 1, + "column": 38, + "endLine": 1, + "endColumn": 52 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### getter-return > invalid + +```js +Object.create(foo, { bar: { get: function() {} } }) +``` + +```json +{ + "errors": [ + { + "messageId": "expected", + "data": { + "name": "method 'get'" + }, + "line": 1, + "column": 29, + "endLine": 1, + "endColumn": 42 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### getter-return > invalid + +```js +Object.create(foo, { bar: { get() {} } }) +``` + +```json +{ + "errors": [ + { + "messageId": "expected", + "data": { + "name": "method 'get'" + }, + "line": 1, + "column": 29, + "endLine": 1, + "endColumn": 32 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### getter-return > invalid + +```js +Object.create(foo, { bar: { get: () => {} } }) +``` + +```json +{ + "errors": [ + { + "messageId": "expected", + "data": { + "name": "method 'get'" + }, + "line": 1, + "column": 29, + "endLine": 1, + "endColumn": 34 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### getter-return > invalid + +```js +Object.defineProperties(foo, { bar: { get: function () {}} }); +``` + +```json +{ + "options": [ + { + "allowImplicit": true + } + ], + "errors": [ + { + "messageId": "expected" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### getter-return > invalid + +```js +Object.defineProperties(foo, { bar: { get: function (){if(bar) {return true;}}}}); +``` + +```json +{ + "options": [ + { + "allowImplicit": true + } + ], + "errors": [ + { + "messageId": "expectedAlways" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### getter-return > invalid + +```js +Object.defineProperties(foo, { bar: { get: function () {~function () { return true; }()}} }); +``` + +```json +{ + "options": [ + { + "allowImplicit": true + } + ], + "errors": [ + { + "messageId": "expected" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### getter-return > invalid + +```js +Object.defineProperty(foo, "bar", { get: function (){}}); +``` + +```json +{ + "options": [ + { + "allowImplicit": true + } + ], + "errors": [ + { + "messageId": "expected" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### getter-return > invalid + +```js +Object.create(foo, { bar: { get: function (){} } }); +``` + +```json +{ + "options": [ + { + "allowImplicit": true + } + ], + "errors": [ + { + "messageId": "expected" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### getter-return > invalid + +```js +Reflect.defineProperty(foo, "bar", { get: function (){}}); +``` + +```json +{ + "options": [ + { + "allowImplicit": true + } + ], + "errors": [ + { + "messageId": "expected" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### getter-return > invalid + +```js +Object?.defineProperty(foo, 'bar', { get: function (){} }); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2020 + }, + "errors": [ + { + "messageId": "expected", + "data": { + "name": "method 'get'" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### getter-return > invalid + +```js +(Object?.defineProperty)(foo, 'bar', { get: function (){} }); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2020 + }, + "errors": [ + { + "messageId": "expected", + "data": { + "name": "method 'get'" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### getter-return > invalid + +```js +Object?.defineProperty(foo, 'bar', { get: function (){} }); +``` + +```json +{ + "options": [ + { + "allowImplicit": true + } + ], + "languageOptions": { + "ecmaVersion": 2020 + }, + "errors": [ + { + "messageId": "expected", + "data": { + "name": "method 'get'" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### getter-return > invalid + +```js +(Object?.defineProperty)(foo, 'bar', { get: function (){} }); +``` + +```json +{ + "options": [ + { + "allowImplicit": true + } + ], + "languageOptions": { + "ecmaVersion": 2020 + }, + "errors": [ + { + "messageId": "expected", + "data": { + "name": "method 'get'" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### getter-return > invalid + +```js +(Object?.create)(foo, { bar: { get: function (){} } }); +``` + +```json +{ + "options": [ + { + "allowImplicit": true + } + ], + "languageOptions": { + "ecmaVersion": 2020 + }, + "errors": [ + { + "messageId": "expected", + "data": { + "name": "method 'get'" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +### `grouped-accessor-pairs` + +Pass: 136 / 150 (90.7%) +Fail: 14 / 150 (9.3%) + +#### grouped-accessor-pairs > valid + +```js +interface I { get prop(): any, between: true, set prop(value: any): void } +``` + +```json +{} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### grouped-accessor-pairs > valid + +```js +type T = { get prop(): any, between: true, set prop(value: any): void } +``` + +```json +{} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### grouped-accessor-pairs > valid + +```js +interface I { get prop(): any, set prop(value: any): void } +``` + +```json +{ + "options": [ + "anyOrder", + { + "enforceForTSTypes": true + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### grouped-accessor-pairs > valid + +```js +interface I { set prop(value: any): void, get prop(): any } +``` + +```json +{ + "options": [ + "anyOrder", + { + "enforceForTSTypes": true + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### grouped-accessor-pairs > valid + +```js +interface I { get a(): any, between: true, set b(value: any): void } +``` + +```json +{ + "options": [ + "anyOrder", + { + "enforceForTSTypes": true + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### grouped-accessor-pairs > valid + +```js +interface I { before: true, get prop(): any, set prop(value: any): void, after: true } +``` + +```json +{ + "options": [ + "getBeforeSet", + { + "enforceForTSTypes": true + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### grouped-accessor-pairs > valid + +```js +interface I { set prop(value: any): void, get prop(): any } +``` + +```json +{ + "options": [ + "setBeforeGet", + { + "enforceForTSTypes": true + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### grouped-accessor-pairs > valid + +```js +type T = { get prop(): any, set prop(value: any): void } +``` + +```json +{ + "options": [ + "anyOrder", + { + "enforceForTSTypes": true + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### grouped-accessor-pairs > valid + +```js +type T = { set prop(value: any): void, get prop(): any } +``` + +```json +{ + "options": [ + "setBeforeGet", + { + "enforceForTSTypes": true + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### grouped-accessor-pairs > invalid + +```js +interface I { get a(): any, between: true, set a(value: any): void } +``` + +```json +{ + "options": [ + "anyOrder", + { + "enforceForTSTypes": true + } + ], + "errors": [ + { + "messageId": "notGrouped", + "data": { + "formerName": "getter 'a'", + "latterName": "setter 'a'" + }, + "column": 44 + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### grouped-accessor-pairs > invalid + +```js +interface I { get a(): any, set a(value: any): void } +``` + +```json +{ + "options": [ + "setBeforeGet", + { + "enforceForTSTypes": true + } + ], + "errors": [ + { + "messageId": "invalidOrder", + "data": { + "formerName": "getter 'a'", + "latterName": "setter 'a'" + }, + "column": 29 + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### grouped-accessor-pairs > invalid + +```js +interface I { set a(value: any): void, get a(): any } +``` + +```json +{ + "options": [ + "getBeforeSet", + { + "enforceForTSTypes": true + } + ], + "errors": [ + { + "messageId": "invalidOrder", + "data": { + "formerName": "setter 'a'", + "latterName": "getter 'a'" + }, + "column": 40 + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### grouped-accessor-pairs > invalid + +```js +type T = { get a(): any, between: true, set a(value: any): void } +``` + +```json +{ + "options": [ + "anyOrder", + { + "enforceForTSTypes": true + } + ], + "errors": [ + { + "messageId": "notGrouped", + "data": { + "formerName": "getter 'a'", + "latterName": "setter 'a'" + }, + "column": 41 + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### grouped-accessor-pairs > invalid + +```js +type T = { get a(): any, set a(value: any): void } +``` + +```json +{ + "options": [ + "setBeforeGet", + { + "enforceForTSTypes": true + } + ], + "errors": [ + { + "messageId": "invalidOrder", + "data": { + "formerName": "getter 'a'", + "latterName": "setter 'a'" + }, + "column": 26 + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +### `id-blacklist` + +Pass: 120 / 131 (91.6%) +Fail: 11 / 131 (8.4%) + +#### id-blacklist > valid + +```js +var foo = undefined; +``` + +```json +{ + "options": [ + "undefined" + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/id-blacklist', + message: "Identifier 'undefined' is restricted.", + messageId: 'restricted', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 10, + endLine: 1, + endColumn: 19, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### id-blacklist > valid + +```js +if (foo === undefined); +``` + +```json +{ + "options": [ + "undefined" + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/id-blacklist', + message: "Identifier 'undefined' is restricted.", + messageId: 'restricted', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 12, + endLine: 1, + endColumn: 21, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### id-blacklist > valid + +```js +obj[undefined] = 5; +``` + +```json +{ + "options": [ + "undefined" + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/id-blacklist', + message: "Identifier 'undefined' is restricted.", + messageId: 'restricted', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 4, + endLine: 1, + endColumn: 13, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### id-blacklist > valid + +```js +foo = { [myGlobal]: 1 }; +``` + +```json +{ + "options": [ + "myGlobal" + ], + "languageOptions": { + "ecmaVersion": 6, + "globals": { + "myGlobal": "readonly" + } + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/id-blacklist', + message: "Identifier 'myGlobal' is restricted.", + messageId: 'restricted', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 9, + endLine: 1, + endColumn: 17, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### id-blacklist > valid + +```js +({ myGlobal } = foo); +``` + +```json +{ + "options": [ + "myGlobal" + ], + "languageOptions": { + "ecmaVersion": 6, + "globals": { + "myGlobal": "writable" + } + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/id-blacklist', + message: "Identifier 'myGlobal' is restricted.", + messageId: 'restricted', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 3, + endLine: 1, + endColumn: 11, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### id-blacklist > valid + +```js +/* global myGlobal: readonly */ myGlobal = 5; +``` + +```json +{ + "options": [ + "myGlobal" + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/id-blacklist', + message: "Identifier 'myGlobal' is restricted.", + messageId: 'restricted', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 32, + endLine: 1, + endColumn: 40, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### id-blacklist > valid + +```js +var foo = { bar: window.baz }; +``` + +```json +{ + "options": [ + "window" + ], + "languageOptions": { + "globals": { + "window": "readonly" + } + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/id-blacklist', + message: "Identifier 'window' is restricted.", + messageId: 'restricted', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 17, + endLine: 1, + endColumn: 23, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### id-blacklist > invalid + +```js +var foo = { undefined: undefined }; +``` + +```json +{ + "options": [ + "undefined" + ], + "errors": [ + { + "messageId": "restricted", + "data": { + "name": "undefined" + }, + "column": 13 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 2: [ + { + ruleId: 'rule-to-test/id-blacklist', + message: "Identifier 'undefined' is restricted.", + messageId: 'restricted', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 12, + endLine: 1, + endColumn: 21, + suggestions: null + }, + { + ruleId: 'rule-to-test/id-blacklist', + message: "Identifier 'undefined' is restricted.", + messageId: 'restricted', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 23, + endLine: 1, + endColumn: 32, + suggestions: null + } +] + +2 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### id-blacklist > invalid + +```js +/* globals myGlobal */ window.myGlobal = 5; foo = myGlobal; +``` + +```json +{ + "options": [ + "myGlobal" + ], + "languageOptions": { + "globals": { + "window": "readonly" + } + }, + "errors": [ + { + "messageId": "restricted", + "data": { + "name": "myGlobal" + }, + "column": 31 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 2: [ + { + ruleId: 'rule-to-test/id-blacklist', + message: "Identifier 'myGlobal' is restricted.", + messageId: 'restricted', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 30, + endLine: 1, + endColumn: 38, + suggestions: null + }, + { + ruleId: 'rule-to-test/id-blacklist', + message: "Identifier 'myGlobal' is restricted.", + messageId: 'restricted', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 50, + endLine: 1, + endColumn: 58, + suggestions: null + } +] + +2 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### id-blacklist > invalid + +```js +/* globals Number: off */ Number.parseInt() +``` + +```json +{ + "options": [ + "Number" + ], + "errors": [ + { + "messageId": "restricted", + "data": { + "name": "Number" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### id-blacklist > invalid + +```js +var foo = [Map]; +``` + +```json +{ + "options": [ + "Map" + ], + "errors": [ + { + "messageId": "restricted", + "data": { + "name": "Map" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +### `id-denylist` + +Pass: 132 / 143 (92.3%) +Fail: 11 / 143 (7.7%) + +#### id-denylist > valid + +```js +var foo = undefined; +``` + +```json +{ + "options": [ + "undefined" + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/id-denylist', + message: "Identifier 'undefined' is restricted.", + messageId: 'restricted', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 10, + endLine: 1, + endColumn: 19, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### id-denylist > valid + +```js +if (foo === undefined); +``` + +```json +{ + "options": [ + "undefined" + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/id-denylist', + message: "Identifier 'undefined' is restricted.", + messageId: 'restricted', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 12, + endLine: 1, + endColumn: 21, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### id-denylist > valid + +```js +obj[undefined] = 5; +``` + +```json +{ + "options": [ + "undefined" + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/id-denylist', + message: "Identifier 'undefined' is restricted.", + messageId: 'restricted', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 4, + endLine: 1, + endColumn: 13, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### id-denylist > valid + +```js +foo = { [myGlobal]: 1 }; +``` + +```json +{ + "options": [ + "myGlobal" + ], + "languageOptions": { + "ecmaVersion": 6, + "globals": { + "myGlobal": "readonly" + } + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/id-denylist', + message: "Identifier 'myGlobal' is restricted.", + messageId: 'restricted', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 9, + endLine: 1, + endColumn: 17, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### id-denylist > valid + +```js +({ myGlobal } = foo); +``` + +```json +{ + "options": [ + "myGlobal" + ], + "languageOptions": { + "ecmaVersion": 6, + "globals": { + "myGlobal": "writable" + } + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/id-denylist', + message: "Identifier 'myGlobal' is restricted.", + messageId: 'restricted', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 3, + endLine: 1, + endColumn: 11, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### id-denylist > valid + +```js +/* global myGlobal: readonly */ myGlobal = 5; +``` + +```json +{ + "options": [ + "myGlobal" + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/id-denylist', + message: "Identifier 'myGlobal' is restricted.", + messageId: 'restricted', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 32, + endLine: 1, + endColumn: 40, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### id-denylist > valid + +```js +var foo = { bar: window.baz }; +``` + +```json +{ + "options": [ + "window" + ], + "languageOptions": { + "globals": { + "window": "readonly" + } + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/id-denylist', + message: "Identifier 'window' is restricted.", + messageId: 'restricted', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 17, + endLine: 1, + endColumn: 23, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### id-denylist > invalid + +```js +var foo = { undefined: undefined }; +``` + +```json +{ + "options": [ + "undefined" + ], + "errors": [ + { + "messageId": "restricted", + "data": { + "name": "undefined" + }, + "column": 13 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 2: [ + { + ruleId: 'rule-to-test/id-denylist', + message: "Identifier 'undefined' is restricted.", + messageId: 'restricted', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 12, + endLine: 1, + endColumn: 21, + suggestions: null + }, + { + ruleId: 'rule-to-test/id-denylist', + message: "Identifier 'undefined' is restricted.", + messageId: 'restricted', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 23, + endLine: 1, + endColumn: 32, + suggestions: null + } +] + +2 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### id-denylist > invalid + +```js +/* globals myGlobal */ window.myGlobal = 5; foo = myGlobal; +``` + +```json +{ + "options": [ + "myGlobal" + ], + "languageOptions": { + "globals": { + "window": "readonly" + } + }, + "errors": [ + { + "messageId": "restricted", + "data": { + "name": "myGlobal" + }, + "column": 31 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 2: [ + { + ruleId: 'rule-to-test/id-denylist', + message: "Identifier 'myGlobal' is restricted.", + messageId: 'restricted', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 30, + endLine: 1, + endColumn: 38, + suggestions: null + }, + { + ruleId: 'rule-to-test/id-denylist', + message: "Identifier 'myGlobal' is restricted.", + messageId: 'restricted', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 50, + endLine: 1, + endColumn: 58, + suggestions: null + } +] + +2 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### id-denylist > invalid + +```js +/* globals Number: off */ Number.parseInt() +``` + +```json +{ + "options": [ + "Number" + ], + "errors": [ + { + "messageId": "restricted", + "data": { + "name": "Number" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### id-denylist > invalid + +```js +var foo = [Map]; +``` + +```json +{ + "options": [ + "Map" + ], + "errors": [ + { + "messageId": "restricted", + "data": { + "name": "Map" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +### `indent-legacy` + +Pass: 294 / 317 (92.7%) +Fail: 23 / 317 (7.3%) + +#### indent-legacy > invalid + +```js +if (a) { + var b = c; + var d = e + * f; + var e = f; // <- +// NO ERROR: DON'T VALIDATE EMPTY OR COMMENT ONLY LINES + function g() { + if (h) { + var i = j; + } // <- + } // <- + + while (k) l++; + while (m) { + n--; // -> + } // <- + + do { + o = p + + q; // NO ERROR: DON'T VALIDATE MULTILINE STATEMENTS + o = p + + q; + } while(r); // <- + + for (var s in t) { + u++; + } + + for (;;) { // <- Fix this when issue #3737 gets resolved + v++; // <- + } + + if ( w ) { + x++; + } else if (y) { + z++; // <- + aa++; + } else { // <- + bb++; // -> +} // -> +} + +/**/var b; // NO ERROR: single line multi-line comments followed by code is OK +/* + * + */ var b; // ERROR: multi-line comments followed by code is not OK + +var arr = [ + a, + b, + c, + function (){ + d + }, // <- + {}, + { + a: b, + c: d, + d: e + }, + [ + f, + g, + h, + i + ], + [j] +]; + +var obj = { + a: { + b: { + c: d, + e: f, + g: h + + i // NO ERROR: DON'T VALIDATE MULTILINE STATEMENTS + } + }, + g: [ + h, + i, + j, + k + ] +}; + +var arrObject = {a:[ + a, + b, // NO ERROR: INDENT ONCE WHEN MULTIPLE INDENTED EXPRESSIONS ARE ON SAME LINE + c +]}; + +var objArray = [{ + a: b, + b: c, // NO ERROR: INDENT ONCE WHEN MULTIPLE INDENTED EXPRESSIONS ARE ON SAME LINE + c: d +}]; + +var arrArray = [[ + a, + b, // NO ERROR: INDENT ONCE WHEN MULTIPLE INDENTED EXPRESSIONS ARE ON SAME LINE + c +]]; + +var objObject = {a:{ + a: b, + b: c, // NO ERROR: INDENT ONCE WHEN MULTIPLE INDENTED EXPRESSIONS ARE ON SAME LINE + c: d +}}; + + +switch (a) { + case 'a': + var a = 'b'; // -> + break; + case 'b': + var a = 'b'; + break; + case 'c': + var a = 'b'; // <- + break; + case 'd': + var a = 'b'; + break; // -> + case 'f': + var a = 'b'; + break; + case 'g': { + var a = 'b'; + break; + } + case 'z': + default: + break; // <- +} + +a.b('hi') + .c(a.b()) // <- + .d(); // <- + +if ( a ) { + if ( b ) { +d.e(f) // -> + .g() // NO ERROR: DON'T VALIDATE MULTILINE STATEMENTS + .h(); // NO ERROR: DON'T VALIDATE MULTILINE STATEMENTS + + i.j(m) + .k() // NO ERROR: DON'T VALIDATE MULTILINE STATEMENTS + .l(); // NO ERROR: DON'T VALIDATE MULTILINE STATEMENTS + + n.o(p) // <- + .q() // NO ERROR: DON'T VALIDATE MULTILINE STATEMENTS + .r(); // NO ERROR: DON'T VALIDATE MULTILINE STATEMENTS + } +} + +var a = b, + c = function () { + h = i; // -> + j = k; + l = m; // <- + }, + e = { + f: g, + n: o, + p: q + }, + r = [ + s, + t, + u + ]; + +var a = function () { +b = c; // -> + d = e; + f = g; // <- +}; + +function c(a, b) { + if (a || (a && + b)) { // NO ERROR: DON'T VALIDATE MULTILINE STATEMENTS + return d; + } +} + +if ( a + || b ) { +var x; // -> + var c, + d = function(a, + b) { + a; // -> + b; + c; // <- + } +} + + +a({ + d: 1 +}); + +a( +1 +); + +a( + b({ + d: 1 + }) +); + +a( + b( + c({ + d: 1, + e: 1, + f: 1 + }) + ) +); + +a({ d: 1 }); + +aa( + b({ // NO ERROR: aligned with previous opening paren + c: d, + e: f, + f: g + }) +); + +aaaaaa( + b, + c, + { + d: a + } +); + +a(b, c, + d, e, + f, g // NO ERROR: alignment of arguments of callExpression not checked + ); // NO ERROR: this has nothing to do with indentation, this is CallExpression spacing + +a( + ); // NO ERROR: this has nothing to do with indentation, this is CallExpression spacing + +aaaaaa( + b, + c, { + d: a + }, { + e: f + } +); + +a.b() + .c(function(){ + var a; + }).d.e; + +if (a == 'b') { + if (c && d) e = f + else g('h').i('j') +} + +a = function (b, c) { + return a(function () { + var d = e + var f = g + var h = i + + if (!j) k('l', (m = n)) + if (o) p + else if (q) r + }) +} + +var a = function() { + "b" + .replace(/a/, "a") + .replace(/bc?/, function(e) { + return "b" + (e.f === 2 ? "c" : "f"); + }) + .replace(/d/, "d"); +}; + +$(b) + .on('a', 'b', function() { $(c).e('f'); }) + .on('g', 'h', function() { $(i).j('k'); }); + +a + .b('c', + 'd'); // NO ERROR: this has nothing to do with indentation, this is CallExpression spacing + +a + .b('c', [ 'd', function(e) { + e++; + }]); + +var a = function() { + a++; + b++; // <- + c++; // <- + }, + b; + +var b = [ + a, + b, + c + ], + c; + +var c = { + a: 1, + b: 2, + c: 3 + }, + d; + +// holes in arrays indentation +x = [ + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1 +]; + +try { + a++; + b++; // <- +c++; // -> +} catch (d) { + e++; + f++; // <- +g++; // -> +} finally { + h++; + i++; // <- +j++; // -> +} + +if (array.some(function(){ + return true; +})) { +a++; // -> + b++; + c++; // <- +} + +var a = b.c(function() { + d++; + }), + e; + +switch (true) { + case (a + && b): +case (c // -> +&& d): + case (e // <- + && f): + case (g +&& h): + var i = j; // <- + var k = l; + var m = n; // -> +} + +if (a) { + b(); +} +else { +c(); // -> + d(); + e(); // <- +} + +if (a) b(); +else { +c(); // -> + d(); + e(); // <- +} + +if (a) { + b(); +} else c(); + +if (a) { + b(); +} +else c(); + +a(); + +if( "very very long multi line" + + "with weird indentation" ) { + b(); +a(); // -> + c(); // <- +} + +a( "very very long multi line" + + "with weird indentation", function() { + b(); +a(); // -> + c(); // <- +}); + +a = function(content, dom) { + b(); + c(); // <- +d(); // -> +}; + +a = function(content, dom) { + b(); + c(); // <- + d(); // -> + }; + +a = function(content, dom) { + b(); // -> + }; + +a = function(content, dom) { +b(); // -> + }; + +a('This is a terribly long description youll ' + + 'have to read', function () { + b(); + c(); +}); + +if ( + array.some(function(){ + return true; + }) +) { +a++; // -> + b++; + c++; // <- +} + +function c(d) { + return { + e: function(f, g) { + } + }; +} + +function a(b) { + switch(x) { + case 1: + if (foo) { + return 5; + } + } +} + +function a(b) { + switch(x) { + case 1: + c; + } +} + +function a(b) { + switch(x) { + case 1: c; + } +} + +function test() { + var a = 1; + { + a(); + } +} + +{ + a(); +} + +function a(b) { + switch(x) { + case 1: + { + a(); + } + break; + default: + { + b(); + } + } +} + +switch (a) { + default: + if (b) + c(); +} + +function test(x) { + switch (x) { + case 1: + return function() { + var a = 5; + return a; + }; + } +} + +switch (a) { + default: + if (b) + c(); +} + +``` + +```json +{ + "output": "if (a) {\n var b = c;\n var d = e\n * f;\n var e = f; // <-\n// NO ERROR: DON'T VALIDATE EMPTY OR COMMENT ONLY LINES\n function g() {\n if (h) {\n var i = j;\n } // <-\n } // <-\n\n while (k) l++;\n while (m) {\n n--; // ->\n } // <-\n\n do {\n o = p +\n q; // NO ERROR: DON'T VALIDATE MULTILINE STATEMENTS\n o = p +\n q;\n } while(r); // <-\n\n for (var s in t) {\n u++;\n }\n\n for (;;) { // <- Fix this when issue #3737 gets resolved\n v++; // <-\n }\n\n if ( w ) {\n x++;\n } else if (y) {\n z++; // <-\n aa++;\n } else { // <-\n bb++; // ->\n } // ->\n}\n\n/**/var b; // NO ERROR: single line multi-line comments followed by code is OK\n/*\n *\n*/ var b; // ERROR: multi-line comments followed by code is not OK\n\nvar arr = [\n a,\n b,\n c,\n function (){\n d\n }, // <-\n {},\n {\n a: b,\n c: d,\n d: e\n },\n [\n f,\n g,\n h,\n i\n ],\n [j]\n];\n\nvar obj = {\n a: {\n b: {\n c: d,\n e: f,\n g: h +\n i // NO ERROR: DON'T VALIDATE MULTILINE STATEMENTS\n }\n },\n g: [\n h,\n i,\n j,\n k\n ]\n};\n\nvar arrObject = {a:[\n a,\n b, // NO ERROR: INDENT ONCE WHEN MULTIPLE INDENTED EXPRESSIONS ARE ON SAME LINE\n c\n]};\n\nvar objArray = [{\n a: b,\n b: c, // NO ERROR: INDENT ONCE WHEN MULTIPLE INDENTED EXPRESSIONS ARE ON SAME LINE\n c: d\n}];\n\nvar arrArray = [[\n a,\n b, // NO ERROR: INDENT ONCE WHEN MULTIPLE INDENTED EXPRESSIONS ARE ON SAME LINE\n c\n]];\n\nvar objObject = {a:{\n a: b,\n b: c, // NO ERROR: INDENT ONCE WHEN MULTIPLE INDENTED EXPRESSIONS ARE ON SAME LINE\n c: d\n}};\n\n\nswitch (a) {\n case 'a':\n var a = 'b'; // ->\n break;\n case 'b':\n var a = 'b';\n break;\n case 'c':\n var a = 'b'; // <-\n break;\n case 'd':\n var a = 'b';\n break; // ->\n case 'f':\n var a = 'b';\n break;\n case 'g': {\n var a = 'b';\n break;\n }\n case 'z':\n default:\n break; // <-\n}\n\na.b('hi')\n .c(a.b()) // <-\n .d(); // <-\n\nif ( a ) {\n if ( b ) {\n d.e(f) // ->\n .g() // NO ERROR: DON'T VALIDATE MULTILINE STATEMENTS\n .h(); // NO ERROR: DON'T VALIDATE MULTILINE STATEMENTS\n\n i.j(m)\n .k() // NO ERROR: DON'T VALIDATE MULTILINE STATEMENTS\n .l(); // NO ERROR: DON'T VALIDATE MULTILINE STATEMENTS\n\n n.o(p) // <-\n .q() // NO ERROR: DON'T VALIDATE MULTILINE STATEMENTS\n .r(); // NO ERROR: DON'T VALIDATE MULTILINE STATEMENTS\n }\n}\n\nvar a = b,\n c = function () {\n h = i; // ->\n j = k;\n l = m; // <-\n },\n e = {\n f: g,\n n: o,\n p: q\n },\n r = [\n s,\n t,\n u\n ];\n\nvar a = function () {\n b = c; // ->\n d = e;\n f = g; // <-\n};\n\nfunction c(a, b) {\n if (a || (a &&\n b)) { // NO ERROR: DON'T VALIDATE MULTILINE STATEMENTS\n return d;\n }\n}\n\nif ( a\n || b ) {\n var x; // ->\n var c,\n d = function(a,\n b) {\n a; // ->\n b;\n c; // <-\n }\n}\n\n\na({\n d: 1\n});\n\na(\n1\n);\n\na(\n b({\n d: 1\n })\n);\n\na(\n b(\n c({\n d: 1,\n e: 1,\n f: 1\n })\n )\n);\n\na({ d: 1 });\n\naa(\n b({ // NO ERROR: aligned with previous opening paren\n c: d,\n e: f,\n f: g\n })\n);\n\naaaaaa(\n b,\n c,\n {\n d: a\n }\n);\n\na(b, c,\n d, e,\n f, g // NO ERROR: alignment of arguments of callExpression not checked\n ); // NO ERROR: this has nothing to do with indentation, this is CallExpression spacing\n\na(\n ); // NO ERROR: this has nothing to do with indentation, this is CallExpression spacing\n\naaaaaa(\n b,\n c, {\n d: a\n }, {\n e: f\n }\n);\n\na.b()\n .c(function(){\n var a;\n }).d.e;\n\nif (a == 'b') {\n if (c && d) e = f\n else g('h').i('j')\n}\n\na = function (b, c) {\n return a(function () {\n var d = e\n var f = g\n var h = i\n\n if (!j) k('l', (m = n))\n if (o) p\n else if (q) r\n })\n}\n\nvar a = function() {\n \"b\"\n .replace(/a/, \"a\")\n .replace(/bc?/, function(e) {\n return \"b\" + (e.f === 2 ? \"c\" : \"f\");\n })\n .replace(/d/, \"d\");\n};\n\n$(b)\n .on('a', 'b', function() { $(c).e('f'); })\n .on('g', 'h', function() { $(i).j('k'); });\n\na\n .b('c',\n 'd'); // NO ERROR: this has nothing to do with indentation, this is CallExpression spacing\n\na\n .b('c', [ 'd', function(e) {\n e++;\n }]);\n\nvar a = function() {\n a++;\n b++; // <-\n c++; // <-\n },\n b;\n\nvar b = [\n a,\n b,\n c\n ],\n c;\n\nvar c = {\n a: 1,\n b: 2,\n c: 3\n },\n d;\n\n// holes in arrays indentation\nx = [\n 1,\n 1,\n 1,\n 1,\n 1,\n 1,\n 1,\n 1,\n 1,\n 1\n];\n\ntry {\n a++;\n b++; // <-\n c++; // ->\n} catch (d) {\n e++;\n f++; // <-\n g++; // ->\n} finally {\n h++;\n i++; // <-\n j++; // ->\n}\n\nif (array.some(function(){\n return true;\n})) {\n a++; // ->\n b++;\n c++; // <-\n}\n\nvar a = b.c(function() {\n d++;\n }),\n e;\n\nswitch (true) {\n case (a\n && b):\n case (c // ->\n&& d):\n case (e // <-\n && f):\n case (g\n&& h):\n var i = j; // <-\n var k = l;\n var m = n; // ->\n}\n\nif (a) {\n b();\n}\nelse {\n c(); // ->\n d();\n e(); // <-\n}\n\nif (a) b();\nelse {\n c(); // ->\n d();\n e(); // <-\n}\n\nif (a) {\n b();\n} else c();\n\nif (a) {\n b();\n}\nelse c();\n\na();\n\nif( \"very very long multi line\" +\n \"with weird indentation\" ) {\n b();\n a(); // ->\n c(); // <-\n}\n\na( \"very very long multi line\" +\n \"with weird indentation\", function() {\n b();\n a(); // ->\n c(); // <-\n});\n\na = function(content, dom) {\n b();\n c(); // <-\n d(); // ->\n};\n\na = function(content, dom) {\n b();\n c(); // <-\n d(); // ->\n};\n\na = function(content, dom) {\n b(); // ->\n};\n\na = function(content, dom) {\n b(); // ->\n};\n\na('This is a terribly long description youll ' +\n 'have to read', function () {\n b();\n c();\n});\n\nif (\n array.some(function(){\n return true;\n })\n) {\n a++; // ->\n b++;\n c++; // <-\n}\n\nfunction c(d) {\n return {\n e: function(f, g) {\n }\n };\n}\n\nfunction a(b) {\n switch(x) {\n case 1:\n if (foo) {\n return 5;\n }\n }\n}\n\nfunction a(b) {\n switch(x) {\n case 1:\n c;\n }\n}\n\nfunction a(b) {\n switch(x) {\n case 1: c;\n }\n}\n\nfunction test() {\n var a = 1;\n {\n a();\n }\n}\n\n{\n a();\n}\n\nfunction a(b) {\n switch(x) {\n case 1:\n {\n a();\n }\n break;\n default:\n {\n b();\n }\n }\n}\n\nswitch (a) {\n default:\n if (b)\n c();\n}\n\nfunction test(x) {\n switch (x) {\n case 1:\n return function() {\n var a = 5;\n return a;\n };\n }\n}\n\nswitch (a) {\n default:\n if (b)\n c();\n}\n", + "options": [ + 2, + { + "SwitchCase": 1, + "MemberExpression": 1 + } + ], + "errors": [ + { + "messageId": "expected", + "data": { + "expected": "2 spaces", + "actual": 4 + }, + "line": 5 + }, + { + "messageId": "expected", + "data": { + "expected": "4 spaces", + "actual": 6 + }, + "line": 10 + }, + { + "messageId": "expected", + "data": { + "expected": "2 spaces", + "actual": 4 + }, + "line": 11 + }, + { + "messageId": "expected", + "data": { + "expected": "4 spaces", + "actual": 2 + }, + "line": 15 + }, + { + "messageId": "expected", + "data": { + "expected": "2 spaces", + "actual": 4 + }, + "line": 16 + }, + { + "messageId": "expected", + "data": { + "expected": "2 spaces", + "actual": 4 + }, + "line": 23 + }, + { + "messageId": "expected", + "data": { + "expected": "2 spaces", + "actual": 4 + }, + "line": 29 + }, + { + "messageId": "expected", + "data": { + "expected": "4 spaces", + "actual": 2 + }, + "line": 31 + }, + { + "messageId": "expected", + "data": { + "expected": "4 spaces", + "actual": 6 + }, + "line": 36 + }, + { + "messageId": "expected", + "data": { + "expected": "2 spaces", + "actual": 4 + }, + "line": 38 + }, + { + "messageId": "expected", + "data": { + "expected": "4 spaces", + "actual": 2 + }, + "line": 39 + }, + { + "messageId": "expected", + "data": { + "expected": "2 spaces", + "actual": 0 + }, + "line": 40 + }, + { + "messageId": "expected", + "data": { + "expected": "0 spaces", + "actual": 1 + }, + "line": 46 + }, + { + "messageId": "expected", + "data": { + "expected": "2 spaces", + "actual": 4 + }, + "line": 54 + }, + { + "messageId": "expected", + "data": { + "expected": "4 spaces", + "actual": 2 + }, + "line": 114 + }, + { + "messageId": "expected", + "data": { + "expected": "4 spaces", + "actual": 6 + }, + "line": 120 + }, + { + "messageId": "expected", + "data": { + "expected": "4 spaces", + "actual": 2 + }, + "line": 124 + }, + { + "messageId": "expected", + "data": { + "expected": "4 spaces", + "actual": 6 + }, + "line": 134 + }, + { + "messageId": "expected", + "data": { + "expected": "2 spaces", + "actual": 3 + }, + "line": 138 + }, + { + "messageId": "expected", + "data": { + "expected": "2 spaces", + "actual": 3 + }, + "line": 139 + }, + { + "messageId": "expected", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 143 + }, + { + "messageId": "expected", + "data": { + "expected": "4 spaces", + "actual": 6 + }, + "line": 151 + }, + { + "messageId": "expected", + "data": { + "expected": "4 spaces", + "actual": 2 + }, + "line": 159 + }, + { + "messageId": "expected", + "data": { + "expected": "4 spaces", + "actual": 6 + }, + "line": 161 + }, + { + "messageId": "expected", + "data": { + "expected": "2 spaces", + "actual": 0 + }, + "line": 175 + }, + { + "messageId": "expected", + "data": { + "expected": "2 spaces", + "actual": 4 + }, + "line": 177 + }, + { + "messageId": "expected", + "data": { + "expected": "2 spaces", + "actual": 0 + }, + "line": 189 + }, + { + "messageId": "expected", + "data": { + "expected": "6 spaces", + "actual": 4 + }, + "line": 193 + }, + { + "messageId": "expected", + "data": { + "expected": "6 spaces", + "actual": 8 + }, + "line": 195 + }, + { + "messageId": "expected", + "data": { + "expected": "4 spaces", + "actual": 6 + }, + "line": 304 + }, + { + "messageId": "expected", + "data": { + "expected": "4 spaces", + "actual": 8 + }, + "line": 306 + }, + { + "messageId": "expected", + "data": { + "expected": "2 spaces", + "actual": 4 + }, + "line": 307 + }, + { + "messageId": "expected", + "data": { + "expected": "2 spaces", + "actual": 4 + }, + "line": 308 + }, + { + "messageId": "expected", + "data": { + "expected": "4 spaces", + "actual": 6 + }, + "line": 311 + }, + { + "messageId": "expected", + "data": { + "expected": "4 spaces", + "actual": 6 + }, + "line": 312 + }, + { + "messageId": "expected", + "data": { + "expected": "4 spaces", + "actual": 6 + }, + "line": 313 + }, + { + "messageId": "expected", + "data": { + "expected": "2 spaces", + "actual": 4 + }, + "line": 314 + }, + { + "messageId": "expected", + "data": { + "expected": "2 spaces", + "actual": 4 + }, + "line": 315 + }, + { + "messageId": "expected", + "data": { + "expected": "4 spaces", + "actual": 6 + }, + "line": 318 + }, + { + "messageId": "expected", + "data": { + "expected": "4 spaces", + "actual": 6 + }, + "line": 319 + }, + { + "messageId": "expected", + "data": { + "expected": "4 spaces", + "actual": 6 + }, + "line": 320 + }, + { + "messageId": "expected", + "data": { + "expected": "2 spaces", + "actual": 4 + }, + "line": 321 + }, + { + "messageId": "expected", + "data": { + "expected": "2 spaces", + "actual": 4 + }, + "line": 322 + }, + { + "messageId": "expected", + "data": { + "expected": "2 spaces", + "actual": 1 + }, + "line": 326 + }, + { + "messageId": "expected", + "data": { + "expected": "2 spaces", + "actual": 1 + }, + "line": 327 + }, + { + "messageId": "expected", + "data": { + "expected": "2 spaces", + "actual": 1 + }, + "line": 328 + }, + { + "messageId": "expected", + "data": { + "expected": "2 spaces", + "actual": 1 + }, + "line": 329 + }, + { + "messageId": "expected", + "data": { + "expected": "2 spaces", + "actual": 1 + }, + "line": 330 + }, + { + "messageId": "expected", + "data": { + "expected": "2 spaces", + "actual": 1 + }, + "line": 331 + }, + { + "messageId": "expected", + "data": { + "expected": "2 spaces", + "actual": 1 + }, + "line": 332 + }, + { + "messageId": "expected", + "data": { + "expected": "2 spaces", + "actual": 1 + }, + "line": 333 + }, + { + "messageId": "expected", + "data": { + "expected": "2 spaces", + "actual": 1 + }, + "line": 334 + }, + { + "messageId": "expected", + "data": { + "expected": "2 spaces", + "actual": 1 + }, + "line": 335 + }, + { + "messageId": "expected", + "data": { + "expected": "2 spaces", + "actual": 4 + }, + "line": 340 + }, + { + "messageId": "expected", + "data": { + "expected": "2 spaces", + "actual": 0 + }, + "line": 341 + }, + { + "messageId": "expected", + "data": { + "expected": "2 spaces", + "actual": 4 + }, + "line": 344 + }, + { + "messageId": "expected", + "data": { + "expected": "2 spaces", + "actual": 0 + }, + "line": 345 + }, + { + "messageId": "expected", + "data": { + "expected": "2 spaces", + "actual": 4 + }, + "line": 348 + }, + { + "messageId": "expected", + "data": { + "expected": "2 spaces", + "actual": 0 + }, + "line": 349 + }, + { + "messageId": "expected", + "data": { + "expected": "2 spaces", + "actual": 0 + }, + "line": 355 + }, + { + "messageId": "expected", + "data": { + "expected": "2 spaces", + "actual": 4 + }, + "line": 357 + }, + { + "messageId": "expected", + "data": { + "expected": "4 spaces", + "actual": 6 + }, + "line": 361 + }, + { + "messageId": "expected", + "data": { + "expected": "2 spaces", + "actual": 4 + }, + "line": 362 + }, + { + "messageId": "expected", + "data": { + "expected": "2 spaces", + "actual": 4 + }, + "line": 363 + }, + { + "messageId": "expected", + "data": { + "expected": "2 spaces", + "actual": 0 + }, + "line": 368 + }, + { + "messageId": "expected", + "data": { + "expected": "2 spaces", + "actual": 4 + }, + "line": 370 + }, + { + "messageId": "expected", + "data": { + "expected": "4 spaces", + "actual": 6 + }, + "line": 374 + }, + { + "messageId": "expected", + "data": { + "expected": "4 spaces", + "actual": 2 + }, + "line": 376 + }, + { + "messageId": "expected", + "data": { + "expected": "2 spaces", + "actual": 0 + }, + "line": 383 + }, + { + "messageId": "expected", + "data": { + "expected": "2 spaces", + "actual": 4 + }, + "line": 385 + }, + { + "messageId": "expected", + "data": { + "expected": "2 spaces", + "actual": 0 + }, + "line": 390 + }, + { + "messageId": "expected", + "data": { + "expected": "2 spaces", + "actual": 4 + }, + "line": 392 + }, + { + "messageId": "expected", + "data": { + "expected": "2 spaces", + "actual": 0 + }, + "line": 409 + }, + { + "messageId": "expected", + "data": { + "expected": "2 spaces", + "actual": 4 + }, + "line": 410 + }, + { + "messageId": "expected", + "data": { + "expected": "2 spaces", + "actual": 0 + }, + "line": 416 + }, + { + "messageId": "expected", + "data": { + "expected": "2 spaces", + "actual": 4 + }, + "line": 417 + }, + { + "messageId": "expected", + "data": { + "expected": "2 spaces", + "actual": 4 + }, + "line": 422 + }, + { + "messageId": "expected", + "data": { + "expected": "2 spaces", + "actual": 0 + }, + "line": 423 + }, + { + "messageId": "expected", + "data": { + "expected": "2 spaces", + "actual": 6 + }, + "line": 427 + }, + { + "messageId": "expected", + "data": { + "expected": "2 spaces", + "actual": 8 + }, + "line": 428 + }, + { + "messageId": "expected", + "data": { + "expected": "2 spaces", + "actual": 4 + }, + "line": 429 + }, + { + "messageId": "expected", + "data": { + "expected": "0 spaces", + "actual": 4 + }, + "line": 430 + }, + { + "messageId": "expected", + "data": { + "expected": "2 spaces", + "actual": 4 + }, + "line": 433 + }, + { + "messageId": "expected", + "data": { + "expected": "0 spaces", + "actual": 4 + }, + "line": 434 + }, + { + "messageId": "expected", + "data": { + "expected": "2 spaces", + "actual": 0 + }, + "line": 437 + }, + { + "messageId": "expected", + "data": { + "expected": "0 spaces", + "actual": 4 + }, + "line": 438 + }, + { + "messageId": "expected", + "data": { + "expected": "2 spaces", + "actual": 0 + }, + "line": 451 + }, + { + "messageId": "expected", + "data": { + "expected": "2 spaces", + "actual": 4 + }, + "line": 453 + }, + { + "messageId": "expected", + "data": { + "expected": "6 spaces", + "actual": 8 + }, + "line": 499 + }, + { + "messageId": "expected", + "data": { + "expected": "10 spaces", + "actual": 8 + }, + "line": 500 + }, + { + "messageId": "expected", + "data": { + "expected": "8 spaces", + "actual": 6 + }, + "line": 501 + }, + { + "messageId": "expected", + "data": { + "expected": "6 spaces", + "actual": 8 + }, + "line": 506 + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### indent-legacy > invalid + +```js +switch(value){ +case "1": + a(); + break; + case "2": + break; + default: + break; +} +``` + +```json +{ + "output": "switch(value){\ncase \"1\":\n a();\n break;\ncase \"2\":\n break;\ndefault:\n break;\n}", + "options": [ + 4 + ], + "errors": [ + { + "messageId": "expected", + "data": { + "expected": "4 spaces", + "actual": 8 + }, + "line": 3 + }, + { + "messageId": "expected", + "data": { + "expected": "4 spaces", + "actual": 8 + }, + "line": 4 + }, + { + "messageId": "expected", + "data": { + "expected": "0 spaces", + "actual": 4 + }, + "line": 5 + }, + { + "messageId": "expected", + "data": { + "expected": "4 spaces", + "actual": 8 + }, + "line": 6 + }, + { + "messageId": "expected", + "data": { + "expected": "0 spaces", + "actual": 4 + }, + "line": 7 + }, + { + "messageId": "expected", + "data": { + "expected": "4 spaces", + "actual": 8 + }, + "line": 8 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Hydrated message "Expected indentation of 4 spaces but found 8." does not match "Expected indentation of 0 spaces but found 4." ++ actual - expected + ++ 'Expected indentation of 0 spaces but found 4.' +- 'Expected indentation of 4 spaces but found 8.' + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent-legacy > invalid + +```js +switch (a) { +case '1': +b(); +break; +default: +c(); +break; +} + +``` + +```json +{ + "output": "switch (a) {\n case '1':\n b();\n break;\n default:\n c();\n break;\n}\n", + "options": [ + 4, + { + "SwitchCase": 1 + } + ], + "errors": [ + { + "messageId": "expected", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 2 + }, + { + "messageId": "expected", + "data": { + "expected": "8 spaces", + "actual": 0 + }, + "line": 3 + }, + { + "messageId": "expected", + "data": { + "expected": "8 spaces", + "actual": 0 + }, + "line": 4 + }, + { + "messageId": "expected", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 5 + }, + { + "messageId": "expected", + "data": { + "expected": "8 spaces", + "actual": 0 + }, + "line": 6 + }, + { + "messageId": "expected", + "data": { + "expected": "8 spaces", + "actual": 0 + }, + "line": 7 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Hydrated message "Expected indentation of 8 spaces but found 0." does not match "Expected indentation of 4 spaces but found 0." ++ actual - expected + ++ 'Expected indentation of 4 spaces but found 0.' +- 'Expected indentation of 8 spaces but found 0.' + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent-legacy > invalid + +```js +var test = { + a: 1, + b: 2 + }; + +``` + +```json +{ + "output": "var test = {\n a: 1,\n b: 2\n};\n", + "options": [ + 2 + ], + "errors": [ + { + "messageId": "expected", + "data": { + "expected": "2 spaces", + "actual": 6 + }, + "line": 2 + }, + { + "messageId": "expected", + "data": { + "expected": "2 spaces", + "actual": 4 + }, + "line": 3 + }, + { + "messageId": "expected", + "data": { + "expected": "0 spaces", + "actual": 4 + }, + "line": 4 + } + ] +} +``` + +TypeError: Expected `loc` to be an object with integer `line` and `column` properties. + at getOffsetFromLineColumn (apps/oxlint/dist/lint.js) + at report (apps/oxlint/dist/lint.js) + at Object.report (apps/oxlint/dist/lint.js) + at report (apps/oxlint/conformance/submodules/eslint/lib/rules/indent-legacy.js:389:12) + + +#### indent-legacy > invalid + +```js +var x = [ + 'a', + 'b', + 'c' + ]; +``` + +```json +{ + "output": "var x = [\n 'a',\n 'b',\n 'c'\n];", + "options": [ + 4 + ], + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "expected", + "data": { + "expected": "4 spaces", + "actual": 9 + }, + "line": 2 + }, + { + "messageId": "expected", + "data": { + "expected": "4 spaces", + "actual": 9 + }, + "line": 3 + }, + { + "messageId": "expected", + "data": { + "expected": "4 spaces", + "actual": 9 + }, + "line": 4 + }, + { + "messageId": "expected", + "data": { + "expected": "0 spaces", + "actual": 2 + }, + "line": 5 + } + ] +} +``` + +TypeError: Expected `loc` to be an object with integer `line` and `column` properties. + at getOffsetFromLineColumn (apps/oxlint/dist/lint.js) + at report (apps/oxlint/dist/lint.js) + at Object.report (apps/oxlint/dist/lint.js) + at report (apps/oxlint/conformance/submodules/eslint/lib/rules/indent-legacy.js:389:12) + + +#### indent-legacy > invalid + +```js +while (1 < 2) +console.log('foo') + console.log('bar') +``` + +```json +{ + "output": "while (1 < 2)\n console.log('foo')\nconsole.log('bar')", + "options": [ + 2 + ], + "errors": [ + { + "messageId": "expected", + "data": { + "expected": "2 spaces", + "actual": 0 + }, + "line": 2 + }, + { + "messageId": "expected", + "data": { + "expected": "0 spaces", + "actual": 2 + }, + "line": 3 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Hydrated message "Expected indentation of 2 spaces but found 0." does not match "Expected indentation of 0 spaces but found 2." ++ actual - expected + ++ 'Expected indentation of 0 spaces but found 2.' +- 'Expected indentation of 2 spaces but found 0.' + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent-legacy > invalid + +```js +switch (a) { +case '1': +b(); +break; +default: +c(); +break; +} + +``` + +```json +{ + "output": "switch (a) {\n case '1':\n b();\n break;\n default:\n c();\n break;\n}\n", + "options": [ + 4, + { + "SwitchCase": 2 + } + ], + "errors": [ + { + "messageId": "expected", + "data": { + "expected": "8 spaces", + "actual": 0 + }, + "line": 2 + }, + { + "messageId": "expected", + "data": { + "expected": "12 spaces", + "actual": 0 + }, + "line": 3 + }, + { + "messageId": "expected", + "data": { + "expected": "12 spaces", + "actual": 0 + }, + "line": 4 + }, + { + "messageId": "expected", + "data": { + "expected": "8 spaces", + "actual": 0 + }, + "line": 5 + }, + { + "messageId": "expected", + "data": { + "expected": "12 spaces", + "actual": 0 + }, + "line": 6 + }, + { + "messageId": "expected", + "data": { + "expected": "12 spaces", + "actual": 0 + }, + "line": 7 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Hydrated message "Expected indentation of 12 spaces but found 0." does not match "Expected indentation of 8 spaces but found 0." ++ actual - expected + ++ 'Expected indentation of 8 spaces but found 0.' +- 'Expected indentation of 12 spaces but found 0.' + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent-legacy > invalid + +```js +var a = new Test({ + a: 1 + }), + b = 4; + +``` + +```json +{ + "output": "var a = new Test({\n a: 1\n }),\n b = 4;\n", + "options": [ + 4 + ], + "errors": [ + { + "messageId": "expected", + "data": { + "expected": "8 spaces", + "actual": 6 + }, + "line": 2 + }, + { + "messageId": "expected", + "data": { + "expected": "4 spaces", + "actual": 2 + }, + "line": 3 + } + ] +} +``` + +TypeError: Expected `loc` to be an object with integer `line` and `column` properties. + at getOffsetFromLineColumn (apps/oxlint/dist/lint.js) + at report (apps/oxlint/dist/lint.js) + at Object.report (apps/oxlint/dist/lint.js) + at report (apps/oxlint/conformance/submodules/eslint/lib/rules/indent-legacy.js:389:12) + + +#### indent-legacy > invalid + +```js +var a = new Test({ + a: 1 + }), + b = 4; +const c = new Test({ + a: 1 + }), + d = 4; + +``` + +```json +{ + "output": "var a = new Test({\n a: 1\n }),\n b = 4;\nconst c = new Test({\n a: 1\n }),\n d = 4;\n", + "options": [ + 2, + { + "VariableDeclarator": { + "var": 2 + } + } + ], + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "expected", + "data": { + "expected": "4 spaces", + "actual": 6 + }, + "line": 6 + }, + { + "messageId": "expected", + "data": { + "expected": "2 spaces", + "actual": 4 + }, + "line": 7 + }, + { + "messageId": "expected", + "data": { + "expected": "2 spaces", + "actual": 4 + }, + "line": 8 + } + ] +} +``` + +TypeError: Expected `loc` to be an object with integer `line` and `column` properties. + at getOffsetFromLineColumn (apps/oxlint/dist/lint.js) + at report (apps/oxlint/dist/lint.js) + at Object.report (apps/oxlint/dist/lint.js) + at report (apps/oxlint/conformance/submodules/eslint/lib/rules/indent-legacy.js:389:12) + + +#### indent-legacy > invalid + +```js +var abc = 5, + c = 2, + xyz = + { + a: 1, + b: 2 + }; +``` + +```json +{ + "output": "var abc = 5,\n c = 2,\n xyz = \n {\n a: 1,\n b: 2\n };", + "options": [ + 2, + { + "VariableDeclarator": 2, + "SwitchCase": 1 + } + ], + "errors": [ + { + "messageId": "expected", + "data": { + "expected": "4 spaces", + "actual": 5 + }, + "line": 4 + }, + { + "messageId": "expected", + "data": { + "expected": "6 spaces", + "actual": 7 + }, + "line": 5 + }, + { + "messageId": "expected", + "data": { + "expected": "6 spaces", + "actual": 8 + }, + "line": 6 + }, + { + "messageId": "expected", + "data": { + "expected": "4 spaces", + "actual": 5 + }, + "line": 7 + } + ] +} +``` + +TypeError: Expected `loc` to be an object with integer `line` and `column` properties. + at getOffsetFromLineColumn (apps/oxlint/dist/lint.js) + at report (apps/oxlint/dist/lint.js) + at Object.report (apps/oxlint/dist/lint.js) + at report (apps/oxlint/conformance/submodules/eslint/lib/rules/indent-legacy.js:389:12) + + +#### indent-legacy > invalid + +```js +var abc = + { + a: 1, + b: 2 + }; +``` + +```json +{ + "output": "var abc = \n {\n a: 1,\n b: 2\n };", + "options": [ + 2, + { + "VariableDeclarator": 2, + "SwitchCase": 1 + } + ], + "errors": [ + { + "messageId": "expected", + "data": { + "expected": "4 spaces", + "actual": 5 + }, + "line": 2 + }, + { + "messageId": "expected", + "data": { + "expected": "6 spaces", + "actual": 7 + }, + "line": 3 + }, + { + "messageId": "expected", + "data": { + "expected": "6 spaces", + "actual": 8 + }, + "line": 4 + }, + { + "messageId": "expected", + "data": { + "expected": "4 spaces", + "actual": 5 + }, + "line": 5 + } + ] +} +``` + +TypeError: Expected `loc` to be an object with integer `line` and `column` properties. + at getOffsetFromLineColumn (apps/oxlint/dist/lint.js) + at report (apps/oxlint/dist/lint.js) + at Object.report (apps/oxlint/dist/lint.js) + at report (apps/oxlint/conformance/submodules/eslint/lib/rules/indent-legacy.js:389:12) + + +#### indent-legacy > invalid + +```js +var path = require('path') + , crypto = require('crypto') +; + +``` + +```json +{ + "output": "var path = require('path')\n , crypto = require('crypto')\n ;\n", + "options": [ + 2 + ], + "errors": [ + { + "messageId": "expected", + "data": { + "expected": "1 space", + "actual": 0 + }, + "line": 3 + } + ] +} +``` + +TypeError: Expected `loc` to be an object with integer `line` and `column` properties. + at getOffsetFromLineColumn (apps/oxlint/dist/lint.js) + at report (apps/oxlint/dist/lint.js) + at Object.report (apps/oxlint/dist/lint.js) + at report (apps/oxlint/conformance/submodules/eslint/lib/rules/indent-legacy.js:389:12) + + +#### indent-legacy > invalid + +```js +var a = 1 + ,b = 2 +; +``` + +```json +{ + "output": "var a = 1\n ,b = 2\n ;", + "errors": [ + { + "messageId": "expected", + "data": { + "expected": "3 spaces", + "actual": 0 + }, + "line": 3 + } + ] +} +``` + +TypeError: Expected `loc` to be an object with integer `line` and `column` properties. + at getOffsetFromLineColumn (apps/oxlint/dist/lint.js) + at report (apps/oxlint/dist/lint.js) + at Object.report (apps/oxlint/dist/lint.js) + at report (apps/oxlint/conformance/submodules/eslint/lib/rules/indent-legacy.js:389:12) + + +#### indent-legacy > invalid + +```js +Buffer + .foo + .bar +``` + +```json +{ + "output": "Buffer\n .foo\n .bar", + "options": [ + 2, + { + "MemberExpression": 2 + } + ], + "errors": [ + { + "messageId": "expected", + "data": { + "expected": "4 spaces", + "actual": 2 + }, + "line": 2 + }, + { + "messageId": "expected", + "data": { + "expected": "4 spaces", + "actual": 2 + }, + "line": 3 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Actual error location does not match expected error location. ++ actual - expected + + { ++ line: 3 +- line: 2 + } + + at assertInvalidTestCaseLocationIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent-legacy > invalid + +```js +if (foo) bar(); +else if (baz) { + foobar(); + } else if (boop) { + qux(); + } +``` + +```json +{ + "output": "if (foo) bar();\nelse if (baz) {\n foobar();\n} else if (boop) {\n qux();\n }", + "options": [ + 2 + ], + "errors": [ + { + "messageId": "expected", + "data": { + "expected": "2 spaces", + "actual": 4 + }, + "line": 3 + }, + { + "messageId": "expected", + "data": { + "expected": "0 spaces", + "actual": 5 + }, + "line": 4 + } + ] +} +``` + +TypeError: Expected `loc` to be an object with integer `line` and `column` properties. + at getOffsetFromLineColumn (apps/oxlint/dist/lint.js) + at report (apps/oxlint/dist/lint.js) + at Object.report (apps/oxlint/dist/lint.js) + at report (apps/oxlint/conformance/submodules/eslint/lib/rules/indent-legacy.js:389:12) + + +#### indent-legacy > invalid + +```js +function foo() { + bar(); +\u0009\u0009} +``` + +```json +{ + "code": "function foo() {\n bar();\n\t\t}", + "output": "function foo() {\n bar();\n}", + "options": [ + 2 + ], + "errors": [ + { + "messageId": "expected", + "data": { + "expected": "0 spaces", + "actual": "2 tabs" + }, + "line": 3 + } + ] +} +``` + +TypeError: Expected `loc` to be an object with integer `line` and `column` properties. + at getOffsetFromLineColumn (apps/oxlint/dist/lint.js) + at report (apps/oxlint/dist/lint.js) + at Object.report (apps/oxlint/dist/lint.js) + at report (apps/oxlint/conformance/submodules/eslint/lib/rules/indent-legacy.js:389:12) + + +#### indent-legacy > invalid + +```js +function foo() { + return ( + 1 + ) +} +``` + +```json +{ + "output": "function foo() {\n return (\n 1\n )\n}", + "options": [ + 2 + ], + "errors": [ + { + "messageId": "expected", + "data": { + "expected": "2 spaces", + "actual": "4" + }, + "line": 4 + } + ] +} +``` + +TypeError: Expected `loc` to be an object with integer `line` and `column` properties. + at getOffsetFromLineColumn (apps/oxlint/dist/lint.js) + at report (apps/oxlint/dist/lint.js) + at Object.report (apps/oxlint/dist/lint.js) + at report (apps/oxlint/conformance/submodules/eslint/lib/rules/indent-legacy.js:389:12) + + +#### indent-legacy > invalid + +```js +function foo() { + return ( + 1 + ); +} +``` + +```json +{ + "output": "function foo() {\n return (\n 1\n );\n}", + "options": [ + 2 + ], + "errors": [ + { + "messageId": "expected", + "data": { + "expected": "2 spaces", + "actual": "4" + }, + "line": 4 + } + ] +} +``` + +TypeError: Expected `loc` to be an object with integer `line` and `column` properties. + at getOffsetFromLineColumn (apps/oxlint/dist/lint.js) + at report (apps/oxlint/dist/lint.js) + at Object.report (apps/oxlint/dist/lint.js) + at report (apps/oxlint/conformance/submodules/eslint/lib/rules/indent-legacy.js:389:12) + + +#### indent-legacy > invalid + +```js +return ( + foo + ); +``` + +```json +{ + "output": "return (\n foo\n);", + "languageOptions": { + "parserOptions": { + "ecmaFeatures": { + "globalReturn": true + } + } + }, + "errors": [ + { + "messageId": "expected", + "data": { + "expected": "0 spaces", + "actual": 4 + }, + "line": 3 + } + ] +} +``` + +TypeError: Expected `loc` to be an object with integer `line` and `column` properties. + at getOffsetFromLineColumn (apps/oxlint/dist/lint.js) + at report (apps/oxlint/dist/lint.js) + at Object.report (apps/oxlint/dist/lint.js) + at report (apps/oxlint/conformance/submodules/eslint/lib/rules/indent-legacy.js:389:12) + + +#### indent-legacy > invalid + +```js +return ( + foo + ) +``` + +```json +{ + "output": "return (\n foo\n)", + "languageOptions": { + "parserOptions": { + "ecmaFeatures": { + "globalReturn": true + } + } + }, + "errors": [ + { + "messageId": "expected", + "data": { + "expected": "0 spaces", + "actual": 4 + }, + "line": 3 + } + ] +} +``` + +TypeError: Expected `loc` to be an object with integer `line` and `column` properties. + at getOffsetFromLineColumn (apps/oxlint/dist/lint.js) + at report (apps/oxlint/dist/lint.js) + at Object.report (apps/oxlint/dist/lint.js) + at report (apps/oxlint/conformance/submodules/eslint/lib/rules/indent-legacy.js:389:12) + + +#### indent-legacy > invalid + +```js +foo('bar', + /** comment */{ + ok: true }); +``` + +```json +{ + "output": "foo('bar',\n /** comment */{\n ok: true });", + "errors": [ + { + "messageId": "expected", + "data": { + "expected": "4 spaces", + "actual": 8 + }, + "line": 2 + } + ] +} +``` + +TypeError: Expected `loc` to be an object with integer `line` and `column` properties. + at getOffsetFromLineColumn (apps/oxlint/dist/lint.js) + at report (apps/oxlint/dist/lint.js) + at Object.report (apps/oxlint/dist/lint.js) + at report (apps/oxlint/conformance/submodules/eslint/lib/rules/indent-legacy.js:389:12) + + +#### indent-legacy > invalid + +```js +var foo = [ + bar, + baz + ] +``` + +```json +{ + "output": "var foo = [\n bar,\n baz\n]", + "errors": [ + { + "messageId": "expected", + "data": { + "expected": "4 spaces", + "actual": 11 + }, + "line": 2 + }, + { + "messageId": "expected", + "data": { + "expected": "4 spaces", + "actual": 2 + }, + "line": 3 + }, + { + "messageId": "expected", + "data": { + "expected": "0 spaces", + "actual": 10 + }, + "line": 4 + } + ] +} +``` + +TypeError: Expected `loc` to be an object with integer `line` and `column` properties. + at getOffsetFromLineColumn (apps/oxlint/dist/lint.js) + at report (apps/oxlint/dist/lint.js) + at Object.report (apps/oxlint/dist/lint.js) + at report (apps/oxlint/conformance/submodules/eslint/lib/rules/indent-legacy.js:389:12) + + +#### indent-legacy > invalid + +```js +echo = spawn('cmd.exe', + ['foo', 'bar', + 'baz']); +``` + +```json +{ + "output": "echo = spawn('cmd.exe',\n ['foo', 'bar',\n 'baz']);", + "options": [ + 2, + { + "ArrayExpression": "first", + "CallExpression": { + "arguments": "first" + } + } + ], + "errors": [ + { + "messageId": "expected", + "data": { + "expected": "13 spaces", + "actual": 12 + }, + "line": 2 + } + ] +} +``` + +TypeError: Expected `loc` to be an object with integer `line` and `column` properties. + at getOffsetFromLineColumn (apps/oxlint/dist/lint.js) + at report (apps/oxlint/dist/lint.js) + at Object.report (apps/oxlint/dist/lint.js) + at report (apps/oxlint/conformance/submodules/eslint/lib/rules/indent-legacy.js:389:12) + + +### `indent` + +Pass: 188 / 1090 (17.2%) +Fail: 902 / 1090 (82.8%) + +#### indent > valid + +```js +bridge.callHandler( + 'getAppVersion', 'test23', function(responseData) { + window.ah.mobileAppVersion = responseData; + } +); +``` + +```json +{ + "options": [ + 2 + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'CallExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 4, + column: 0, + endLine: 4, + endColumn: 2, + suggestions: null + } +] + +3 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +bridge.callHandler( + 'getAppVersion', 'test23', function(responseData) { + window.ah.mobileAppVersion = responseData; + }); +``` + +```json +{ + "options": [ + 2 + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'CallExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 4, + column: 0, + endLine: 4, + endColumn: 2, + suggestions: null + } +] + +3 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +bridge.callHandler( + 'getAppVersion', + null, + function responseCallback(responseData) { + window.ah.mobileAppVersion = responseData; + } +); +``` + +```json +{ + "options": [ + 2 + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 5: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'CallExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'CallExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'CallExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 5, + column: 0, + endLine: 5, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 6, + column: 0, + endLine: 6, + endColumn: 2, + suggestions: null + } +] + +5 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +bridge.callHandler( + 'getAppVersion', + null, + function responseCallback(responseData) { + window.ah.mobileAppVersion = responseData; + }); +``` + +```json +{ + "options": [ + 2 + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 5: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'CallExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'CallExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'CallExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 5, + column: 0, + endLine: 5, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 6, + column: 0, + endLine: 6, + endColumn: 2, + suggestions: null + } +] + +5 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +function doStuff(keys) { + _.forEach( + keys, + key => { + doSomething(key); + } + ); +} +``` + +```json +{ + "options": [ + 4 + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 6: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'CallExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'CallExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 12.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 5, + column: 0, + endLine: 5, + endColumn: 12, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 6, + column: 0, + endLine: 6, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'CallExpression', + line: 7, + column: 0, + endLine: 7, + endColumn: 4, + suggestions: null + } +] + +6 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +example( + function () { + console.log('example'); + } +); +``` + +```json +{ + "options": [ + 4 + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'CallExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + } +] + +3 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +let foo = somethingList + .filter(x => { + return x; + }) + .map(x => { + return 100 * x; + }); +``` + +```json +{ + "options": [ + 4 + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 6: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'MemberExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'MemberExpression', + line: 5, + column: 0, + endLine: 5, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 6, + column: 0, + endLine: 6, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 7, + column: 0, + endLine: 7, + endColumn: 4, + suggestions: null + } +] + +6 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +var x = 0 && + { + a: 1, + b: 2 + }; +``` + +```json +{ + "options": [ + 4 + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 4 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 4 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 8, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +var x = 0 && +\u0009{ +\u0009\u0009a: 1, +\u0009\u0009b: 2 +\u0009}; +``` + +```json +{ + "code": "var x = 0 &&\n\t{\n\t\ta: 1,\n\t\tb: 2\n\t};", + "options": [ + "tab" + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 1 tab but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 1 tab but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 2, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +var x = 0 && + { + a: 1, + b: 2 + }|| + { + c: 3, + d: 4 + }; +``` + +```json +{ + "options": [ + 4 + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 4: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 4 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 4 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 4 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 7, + column: 0, + endLine: 7, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 4 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 8, + column: 0, + endLine: 8, + endColumn: 8, + suggestions: null + } +] + +4 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +var x = [ + 'a', + 'b', + 'c' +]; +``` + +```json +{ + "options": [ + 4 + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrayExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrayExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrayExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + } +] + +3 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +var x = ['a', + 'b', + 'c', +]; +``` + +```json +{ + "options": [ + 4 + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrayExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrayExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +require('http').request({hostname: 'localhost', + port: 80}, function(res) { + res.end(); +}); +``` + +```json +{ + "options": [ + 2 + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 2, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +function test() { + return client.signUp(email, PASSWORD, { preVerified: true }) + .then(function (result) { + // hi + }) + .then(function () { + return FunctionalHelpers.clearBrowserState(self, { + contentServer: true, + contentServer1: true + }); + }); +} +``` + +```json +{ + "options": [ + 2 + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 10: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'MemberExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 6.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 4, + column: 0, + endLine: 4, + endColumn: 6, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 5, + column: 0, + endLine: 5, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'MemberExpression', + line: 6, + column: 0, + endLine: 6, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 6.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 7, + column: 0, + endLine: 7, + endColumn: 6, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 8, + column: 0, + endLine: 8, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 9, + column: 0, + endLine: 9, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 6.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 10, + column: 0, + endLine: 10, + endColumn: 6, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 11, + column: 0, + endLine: 11, + endColumn: 4, + suggestions: null + } +] + +10 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +it('should... some lengthy test description that is forced to be' + + 'wrapped into two lines since the line length limit is set', () => { + expect(true).toBe(true); +}); +``` + +```json +{ + "options": [ + 2 + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 2, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +function test() { + return client.signUp(email, PASSWORD, { preVerified: true }) + .then(function (result) { + var x = 1; + var y = 1; + }, function(err){ + var o = 1 - 2; + var y = 1 - 2; + return true; + }) +} +``` + +```json +{ + "options": [ + 4 + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 9: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'MemberExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 12.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 4, + column: 0, + endLine: 4, + endColumn: 12, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 12.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 5, + column: 0, + endLine: 5, + endColumn: 12, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 6, + column: 0, + endLine: 6, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 12.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 7, + column: 0, + endLine: 7, + endColumn: 12, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 12.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 8, + column: 0, + endLine: 8, + endColumn: 12, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 12.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 9, + column: 0, + endLine: 9, + endColumn: 12, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 10, + column: 0, + endLine: 10, + endColumn: 8, + suggestions: null + } +] + +9 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +function test() { + return client.signUp(email, PASSWORD, { preVerified: true }) + .then(function (result) { + var x = 1; + var y = 1; + }, function(err){ + var o = 1 - 2; + var y = 1 - 2; + return true; + }); +} +``` + +```json +{ + "options": [ + 4, + { + "MemberExpression": 0 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 9: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'MemberExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 4, + column: 0, + endLine: 4, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 5, + column: 0, + endLine: 5, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 6, + column: 0, + endLine: 6, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 7, + column: 0, + endLine: 7, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 8, + column: 0, + endLine: 8, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 9, + column: 0, + endLine: 9, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 10, + column: 0, + endLine: 10, + endColumn: 4, + suggestions: null + } +] + +9 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +var Command = function() { + var fileList = [], + files = [] + + files.concat(fileList) +}; +``` + +```json +{ + "options": [ + 2, + { + "VariableDeclarator": { + "var": 2, + "let": 2, + "const": 3 + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 6.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'VariableDeclaration', + line: 3, + column: 0, + endLine: 3, + endColumn: 6, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 5, + column: 0, + endLine: 5, + endColumn: 2, + suggestions: null + } +] + +3 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +if(data) { + console.log('hi'); + b = true;}; +``` + +```json +{ + "options": [ + 2, + { + "VariableDeclarator": 1, + "SwitchCase": 1 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 2, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +foo = () => { + console.log('hi'); + return true;}; +``` + +```json +{ + "options": [ + 2, + { + "VariableDeclarator": 1, + "SwitchCase": 1 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 2, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +function test(data) { + console.log('hi'); + return true;}; +``` + +```json +{ + "options": [ + 2, + { + "VariableDeclarator": 1, + "SwitchCase": 1 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 2, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +var test = function(data) { + console.log('hi'); +}; +``` + +```json +{ + "options": [ + 2, + { + "VariableDeclarator": 1, + "SwitchCase": 1 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +arr.forEach(function(data) { + otherdata.forEach(function(zero) { + console.log('hi'); + }) }); +``` + +```json +{ + "options": [ + 2, + { + "VariableDeclarator": 1, + "SwitchCase": 1 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 4, + column: 0, + endLine: 4, + endColumn: 2, + suggestions: null + } +] + +3 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +a = [ + ,3 +] +``` + +```json +{ + "options": [ + 4, + { + "VariableDeclarator": 1, + "SwitchCase": 1 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrayExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +[ + ['gzip', 'gunzip'], + ['gzip', 'unzip'], + ['deflate', 'inflate'], + ['deflateRaw', 'inflateRaw'], +].forEach(function(method) { + console.log(method); +}); +``` + +```json +{ + "options": [ + 2, + { + "SwitchCase": 1, + "VariableDeclarator": 2 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 5: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrayExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrayExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrayExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrayExpression', + line: 5, + column: 0, + endLine: 5, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 7, + column: 0, + endLine: 7, + endColumn: 2, + suggestions: null + } +] + +5 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +test(123, { + bye: { + hi: [1, + { + b: 2 + } + ] + } +}); +``` + +```json +{ + "options": [ + 4, + { + "VariableDeclarator": 1, + "SwitchCase": 1 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 7: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 12.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrayExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 12, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 16.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 5, + column: 0, + endLine: 5, + endColumn: 16, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 12.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 6, + column: 0, + endLine: 6, + endColumn: 12, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrayExpression', + line: 7, + column: 0, + endLine: 7, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 8, + column: 0, + endLine: 8, + endColumn: 4, + suggestions: null + } +] + +7 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +var xyz = 2, + lmn = [ + { + a: 1 + } + ]; +``` + +```json +{ + "options": [ + 4, + { + "VariableDeclarator": 1, + "SwitchCase": 1 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 5: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'VariableDeclaration', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrayExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 12.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 12, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 5, + column: 0, + endLine: 5, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrayExpression', + line: 6, + column: 0, + endLine: 6, + endColumn: 4, + suggestions: null + } +] + +5 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +lmnn = [{ + a: 1 +}, +{ + b: 2 +}, { + x: 2 +}]; +``` + +```json +{ + "options": [ + 4, + { + "VariableDeclarator": 1, + "SwitchCase": 1 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 5, + column: 0, + endLine: 5, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 7, + column: 0, + endLine: 7, + endColumn: 4, + suggestions: null + } +] + +3 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +[{ + foo: 1 +}, { + foo: 2 +}, { + foo: 3 +}] +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 6, + column: 0, + endLine: 6, + endColumn: 4, + suggestions: null + } +] + +3 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +foo([ + bar +], [ + baz +], [ + qux +]); +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrayExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrayExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrayExpression', + line: 6, + column: 0, + endLine: 6, + endColumn: 4, + suggestions: null + } +] + +3 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +abc({ + test: [ + [ + c, + xyz, + 2 + ].join(',') + ] +}); +``` + +```json +{ + "options": [ + 4, + { + "VariableDeclarator": 1, + "SwitchCase": 1 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 7: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrayExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 12.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrayExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 12, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 12.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrayExpression', + line: 5, + column: 0, + endLine: 5, + endColumn: 12, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 12.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrayExpression', + line: 6, + column: 0, + endLine: 6, + endColumn: 12, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrayExpression', + line: 7, + column: 0, + endLine: 7, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrayExpression', + line: 8, + column: 0, + endLine: 8, + endColumn: 4, + suggestions: null + } +] + +7 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +abc = { + test: [ + [ + c, + xyz, + 2 + ] + ] +}; +``` + +```json +{ + "options": [ + 2, + { + "VariableDeclarator": 1, + "SwitchCase": 1 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 7: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrayExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 6.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrayExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 6, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 6.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrayExpression', + line: 5, + column: 0, + endLine: 5, + endColumn: 6, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 6.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrayExpression', + line: 6, + column: 0, + endLine: 6, + endColumn: 6, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrayExpression', + line: 7, + column: 0, + endLine: 7, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrayExpression', + line: 8, + column: 0, + endLine: 8, + endColumn: 2, + suggestions: null + } +] + +7 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +abc( + { + a: 1, + b: 2 + } +); +``` + +```json +{ + "options": [ + 2, + { + "VariableDeclarator": 1, + "SwitchCase": 1 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 4: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'CallExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 5, + column: 0, + endLine: 5, + endColumn: 2, + suggestions: null + } +] + +4 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +abc({ + a: 1, + b: 2 +}); +``` + +```json +{ + "options": [ + 4, + { + "VariableDeclarator": 1, + "SwitchCase": 1 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +var abc = + [ + c, + xyz, + { + a: 1, + b: 2 + } + ]; +``` + +```json +{ + "options": [ + 2, + { + "VariableDeclarator": 1, + "SwitchCase": 1 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 6: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 2 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrayExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 2 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrayExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 2 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrayExpression', + line: 5, + column: 0, + endLine: 5, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 2 spaces but found 6.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 6, + column: 0, + endLine: 6, + endColumn: 6, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 2 spaces but found 6.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 7, + column: 0, + endLine: 7, + endColumn: 6, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 2 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 8, + column: 0, + endLine: 8, + endColumn: 4, + suggestions: null + } +] + +6 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +var abc = [ + c, + xyz, + { + a: 1, + b: 2 + } +]; +``` + +```json +{ + "options": [ + 2, + { + "VariableDeclarator": 1, + "SwitchCase": 1 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 6: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrayExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrayExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrayExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 5, + column: 0, + endLine: 5, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 6, + column: 0, + endLine: 6, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 7, + column: 0, + endLine: 7, + endColumn: 2, + suggestions: null + } +] + +6 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +var abc = 5, + c = 2, + xyz = + { + a: 1, + b: 2 + }; +``` + +```json +{ + "options": [ + 2, + { + "VariableDeclarator": 2, + "SwitchCase": 1 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 4: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'VariableDeclaration', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'VariableDeclaration', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 4 spaces but found 6.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 5, + column: 0, + endLine: 5, + endColumn: 6, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 4 spaces but found 6.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 6, + column: 0, + endLine: 6, + endColumn: 6, + suggestions: null + } +] + +4 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +var + x = { + a: 1, + }, + y = { + b: 2 + } +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 6: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'VariableDeclaration', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'VariableDeclaration', + line: 5, + column: 0, + endLine: 5, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 6, + column: 0, + endLine: 6, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 7, + column: 0, + endLine: 7, + endColumn: 4, + suggestions: null + } +] + +6 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +const + x = { + a: 1, + }, + y = { + b: 2 + } +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 6: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'VariableDeclaration', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'VariableDeclaration', + line: 5, + column: 0, + endLine: 5, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 6, + column: 0, + endLine: 6, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 7, + column: 0, + endLine: 7, + endColumn: 4, + suggestions: null + } +] + +6 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +let + x = { + a: 1, + }, + y = { + b: 2 + } +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 6: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'VariableDeclaration', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'VariableDeclaration', + line: 5, + column: 0, + endLine: 5, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 6, + column: 0, + endLine: 6, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 7, + column: 0, + endLine: 7, + endColumn: 4, + suggestions: null + } +] + +6 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +var foo = { a: 1 }, bar = { + b: 2 +}; +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +var foo = { a: 1 }, bar = { + b: 2 + }, + baz = { + c: 3 + } +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 5: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'VariableDeclaration', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 5, + column: 0, + endLine: 5, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 6, + column: 0, + endLine: 6, + endColumn: 4, + suggestions: null + } +] + +5 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +const { + foo + } = 1, + bar = 2 +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectPattern', + line: 2, + column: 0, + endLine: 2, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectPattern', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'VariableDeclaration', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + } +] + +3 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +var foo = 1, + bar = + 2 +``` + +```json +{ + "options": [ + 2, + { + "VariableDeclarator": 1 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'VariableDeclaration', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +var foo = 1, + bar + = 2 +``` + +```json +{ + "options": [ + 2, + { + "VariableDeclarator": 1 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'VariableDeclaration', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +var foo + = 1, + bar + = 2 +``` + +```json +{ + "options": [ + 2, + { + "VariableDeclarator": 1 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'VariableDeclaration', + line: 3, + column: 0, + endLine: 3, + endColumn: 2, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +var foo + = + 1, + bar + = + 2 +``` + +```json +{ + "options": [ + 2, + { + "VariableDeclarator": 1 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'VariableDeclaration', + line: 4, + column: 0, + endLine: 4, + endColumn: 2, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +var foo + = (1), + bar + = (2) +``` + +```json +{ + "options": [ + 2, + { + "VariableDeclarator": 1 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'VariableDeclaration', + line: 3, + column: 0, + endLine: 3, + endColumn: 2, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +var foo = 1, + bar = 2, + baz = 3 +; +``` + +```json +{ + "options": [ + 2, + { + "VariableDeclarator": { + "var": 2 + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'VariableDeclaration', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'VariableDeclaration', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +var foo = 1, + bar = 2, + baz = 3 + ; +``` + +```json +{ + "options": [ + 2, + { + "VariableDeclarator": { + "var": 2 + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'VariableDeclaration', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'VariableDeclaration', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +let + foo +``` + +```json +{ + "options": [ + 4, + { + "VariableDeclarator": "first" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'VariableDeclaration', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +var abc = + { + a: 1, + b: 2 + }; +``` + +```json +{ + "options": [ + 2, + { + "VariableDeclarator": 2, + "SwitchCase": 1 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 4 spaces but found 6.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 6, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 4 spaces but found 6.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 6, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +var a = new abc({ + a: 1, + b: 2 + }), + b = 2; +``` + +```json +{ + "options": [ + 4, + { + "VariableDeclarator": 1, + "SwitchCase": 1 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 4: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'VariableDeclaration', + line: 5, + column: 0, + endLine: 5, + endColumn: 4, + suggestions: null + } +] + +4 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +var a = 2, + c = { + a: 1, + b: 2 + }, + b = 2; +``` + +```json +{ + "options": [ + 2, + { + "VariableDeclarator": 1, + "SwitchCase": 1 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 5: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'VariableDeclaration', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 5, + column: 0, + endLine: 5, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'VariableDeclaration', + line: 6, + column: 0, + endLine: 6, + endColumn: 2, + suggestions: null + } +] + +5 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +var x = 2, + y = { + a: 1, + b: 2 + }, + b = 2; +``` + +```json +{ + "options": [ + 2, + { + "VariableDeclarator": 2, + "SwitchCase": 1 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 5: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'VariableDeclaration', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 6.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 6, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 6.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 6, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 5, + column: 0, + endLine: 5, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'VariableDeclaration', + line: 6, + column: 0, + endLine: 6, + endColumn: 4, + suggestions: null + } +] + +5 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +var e = { + a: 1, + b: 2 + }, + b = 2; +``` + +```json +{ + "options": [ + 2, + { + "VariableDeclarator": 2, + "SwitchCase": 1 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 4: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 6.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 6, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 6.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 6, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'VariableDeclaration', + line: 5, + column: 0, + endLine: 5, + endColumn: 4, + suggestions: null + } +] + +4 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +var a = { + a: 1, + b: 2 +}; +``` + +```json +{ + "options": [ + 2, + { + "VariableDeclarator": 2, + "SwitchCase": 1 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 2, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +function test() { + if (true || + false){ + console.log(val); + } +} +``` + +```json +{ + "options": [ + 2, + { + "VariableDeclarator": 2, + "SwitchCase": 1 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 5, + column: 0, + endLine: 5, + endColumn: 2, + suggestions: null + } +] + +3 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +for (var val in obj) + if (true) + console.log(val); +``` + +```json +{ + "options": [ + 2, + { + "VariableDeclarator": 2, + "SwitchCase": 1 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ForInStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +with (a) + b(); +``` + +```json +{ + "options": [ + 4 + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'WithStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +with (a) + b(); +c(); +``` + +```json +{ + "options": [ + 4 + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'WithStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +if(true) + if (true) + if (true) + console.log(val); +``` + +```json +{ + "options": [ + 2, + { + "VariableDeclarator": 2, + "SwitchCase": 1 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 6.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 4, + column: 0, + endLine: 4, + endColumn: 6, + suggestions: null + } +] + +3 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +function hi(){ var a = 1; + y++; x++; +} +``` + +```json +{ + "options": [ + 2, + { + "VariableDeclarator": 2, + "SwitchCase": 1 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +for(;length > index; index++)if(NO_HOLES || index in self){ + x++; +} +``` + +```json +{ + "options": [ + 2, + { + "VariableDeclarator": 2, + "SwitchCase": 1 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +function test(){ + switch(length){ + case 1: return function(a){ + return fn.call(that, a); + }; + } +} +``` + +```json +{ + "options": [ + 2, + { + "VariableDeclarator": 2, + "SwitchCase": 1 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 5: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'SwitchStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 6.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 4, + column: 0, + endLine: 4, + endColumn: 6, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 5, + column: 0, + endLine: 5, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'SwitchStatement', + line: 6, + column: 0, + endLine: 6, + endColumn: 2, + suggestions: null + } +] + +5 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +var geometry, + rotate; +``` + +```json +{ + "options": [ + 4, + { + "VariableDeclarator": 1 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'VariableDeclaration', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +var geometry, +\u0009rotate; +``` + +```json +{ + "code": "var geometry,\n\trotate;", + "options": [ + "tab", + { + "VariableDeclarator": 1 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 tabs but found 1.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'VariableDeclaration', + line: 2, + column: 0, + endLine: 2, + endColumn: 1, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +var geometry, + rotate; +``` + +```json +{ + "options": [ + 2, + { + "VariableDeclarator": 1 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'VariableDeclaration', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +var geometry, + rotate; +``` + +```json +{ + "options": [ + 2, + { + "VariableDeclarator": 2 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'VariableDeclaration', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +let geometry, + rotate; +``` + +```json +{ + "options": [ + 2, + { + "VariableDeclarator": 2 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'VariableDeclaration', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +const geometry = 2, + rotate = 3; +``` + +```json +{ + "options": [ + 2, + { + "VariableDeclarator": 2 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'VariableDeclaration', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +var geometry, box, face1, face2, colorT, colorB, sprite, padding, maxWidth, + height, rotate; +``` + +```json +{ + "options": [ + 2, + { + "SwitchCase": 1 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'VariableDeclaration', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +while (1 < 2){ + //hi sd +} +``` + +```json +{ + "options": [ + 2 + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +[a, boop, + c].forEach((index) => { + index; +}); +``` + +```json +{ + "options": [ + 4 + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrayExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +[a, b, + c].forEach(function(index){ + return index; +}); +``` + +```json +{ + "options": [ + 4 + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrayExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +[a, b, c].forEach((index) => { + index; +}); +``` + +```json +{ + "options": [ + 4 + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +[a, b, c].forEach(function(index){ + return index; +}); +``` + +```json +{ + "options": [ + 4 + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +(foo) + .bar([ + baz + ]); +``` + +```json +{ + "options": [ + 4, + { + "MemberExpression": 1 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'MemberExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrayExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrayExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + } +] + +3 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +switch (x) { + case "foo": + a(); + break; + case "bar": + switch (y) { + case "1": + break; + case "2": + a = 6; + break; + } + case "test": + break; +} +``` + +```json +{ + "options": [ + 4, + { + "SwitchCase": 1 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 13: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'SwitchStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'SwitchCase', + line: 3, + column: 0, + endLine: 3, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'SwitchCase', + line: 4, + column: 0, + endLine: 4, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'SwitchStatement', + line: 5, + column: 0, + endLine: 5, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'SwitchCase', + line: 6, + column: 0, + endLine: 6, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 12.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'SwitchStatement', + line: 7, + column: 0, + endLine: 7, + endColumn: 12, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 16.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'SwitchCase', + line: 8, + column: 0, + endLine: 8, + endColumn: 16, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 12.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'SwitchStatement', + line: 9, + column: 0, + endLine: 9, + endColumn: 12, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 16.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'SwitchCase', + line: 10, + column: 0, + endLine: 10, + endColumn: 16, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 16.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'SwitchCase', + line: 11, + column: 0, + endLine: 11, + endColumn: 16, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'SwitchStatement', + line: 12, + column: 0, + endLine: 12, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'SwitchStatement', + line: 13, + column: 0, + endLine: 13, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'SwitchCase', + line: 14, + column: 0, + endLine: 14, + endColumn: 8, + suggestions: null + } +] + +13 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +switch (x) { + case "foo": + a(); + break; + case "bar": + switch (y) { + case "1": + break; + case "2": + a = 6; + break; + } + case "test": + break; +} +``` + +```json +{ + "options": [ + 4, + { + "SwitchCase": 2 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 13: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'SwitchStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 12.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'SwitchCase', + line: 3, + column: 0, + endLine: 3, + endColumn: 12, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 12.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'SwitchCase', + line: 4, + column: 0, + endLine: 4, + endColumn: 12, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'SwitchStatement', + line: 5, + column: 0, + endLine: 5, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 12.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'SwitchCase', + line: 6, + column: 0, + endLine: 6, + endColumn: 12, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 20.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'SwitchStatement', + line: 7, + column: 0, + endLine: 7, + endColumn: 20, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 24.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'SwitchCase', + line: 8, + column: 0, + endLine: 8, + endColumn: 24, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 20.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'SwitchStatement', + line: 9, + column: 0, + endLine: 9, + endColumn: 20, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 24.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'SwitchCase', + line: 10, + column: 0, + endLine: 10, + endColumn: 24, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 24.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'SwitchCase', + line: 11, + column: 0, + endLine: 11, + endColumn: 24, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 12.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'SwitchStatement', + line: 12, + column: 0, + endLine: 12, + endColumn: 12, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'SwitchStatement', + line: 13, + column: 0, + endLine: 13, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 12.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'SwitchCase', + line: 14, + column: 0, + endLine: 14, + endColumn: 12, + suggestions: null + } +] + +13 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +switch (a) { +case "foo": + a(); + break; +case "bar": + switch(x){ + case '1': + break; + case '2': + a = 6; + break; + } +} +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 9: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'SwitchCase', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'SwitchCase', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'SwitchCase', + line: 6, + column: 0, + endLine: 6, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'SwitchStatement', + line: 7, + column: 0, + endLine: 7, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'SwitchCase', + line: 8, + column: 0, + endLine: 8, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'SwitchStatement', + line: 9, + column: 0, + endLine: 9, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'SwitchCase', + line: 10, + column: 0, + endLine: 10, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'SwitchCase', + line: 11, + column: 0, + endLine: 11, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'SwitchStatement', + line: 12, + column: 0, + endLine: 12, + endColumn: 4, + suggestions: null + } +] + +9 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +switch (a) { +case "foo": + a(); + break; +case "bar": + if(x){ + a = 2; + } + else{ + a = 6; + } +} +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 8: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'SwitchCase', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'SwitchCase', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'SwitchCase', + line: 6, + column: 0, + endLine: 6, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 7, + column: 0, + endLine: 7, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 8, + column: 0, + endLine: 8, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 9, + column: 0, + endLine: 9, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 10, + column: 0, + endLine: 10, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 11, + column: 0, + endLine: 11, + endColumn: 4, + suggestions: null + } +] + +8 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +switch (a) { +case "foo": + a(); + break; +case "bar": + if(x){ + a = 2; + } + else + a = 6; +} +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 7: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'SwitchCase', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'SwitchCase', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'SwitchCase', + line: 6, + column: 0, + endLine: 6, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 7, + column: 0, + endLine: 7, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 8, + column: 0, + endLine: 8, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 9, + column: 0, + endLine: 9, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 10, + column: 0, + endLine: 10, + endColumn: 8, + suggestions: null + } +] + +7 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +switch (a) { +case "foo": + a(); + break; +case "bar": + a(); break; +case "baz": + a(); break; +} +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 4: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'SwitchCase', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'SwitchCase', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'SwitchCase', + line: 6, + column: 0, + endLine: 6, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'SwitchCase', + line: 8, + column: 0, + endLine: 8, + endColumn: 4, + suggestions: null + } +] + +4 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +function foo() { + var a = "a"; + switch(a) { + case "a": + return "A"; + case "b": + return "B"; + } +} +foo(); +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 7: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'SwitchStatement', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'SwitchCase', + line: 5, + column: 0, + endLine: 5, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'SwitchStatement', + line: 6, + column: 0, + endLine: 6, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'SwitchCase', + line: 7, + column: 0, + endLine: 7, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'SwitchStatement', + line: 8, + column: 0, + endLine: 8, + endColumn: 4, + suggestions: null + } +] + +7 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +switch(value){ + case "1": + case "2": + a(); + break; + default: + a(); + break; +} +switch(value){ + case "1": + a(); + break; + case "2": + break; + default: + break; +} +``` + +```json +{ + "options": [ + 4, + { + "SwitchCase": 1 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 14: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'SwitchStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'SwitchStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'SwitchCase', + line: 4, + column: 0, + endLine: 4, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'SwitchCase', + line: 5, + column: 0, + endLine: 5, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'SwitchStatement', + line: 6, + column: 0, + endLine: 6, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'SwitchCase', + line: 7, + column: 0, + endLine: 7, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'SwitchCase', + line: 8, + column: 0, + endLine: 8, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'SwitchStatement', + line: 11, + column: 0, + endLine: 11, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'SwitchCase', + line: 12, + column: 0, + endLine: 12, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'SwitchCase', + line: 13, + column: 0, + endLine: 13, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'SwitchStatement', + line: 14, + column: 0, + endLine: 14, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'SwitchCase', + line: 15, + column: 0, + endLine: 15, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'SwitchStatement', + line: 16, + column: 0, + endLine: 16, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'SwitchCase', + line: 17, + column: 0, + endLine: 17, + endColumn: 8, + suggestions: null + } +] + +14 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +var obj = {foo: 1, bar: 2}; +with (obj) { + console.log(foo + bar); +} +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +if (a) { + (1 + 2 + 3); // no error on this line +} +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +import { + foo, + bar, + baz +} from 'qux'; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ImportDeclaration', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ImportDeclaration', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ImportDeclaration', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + } +] + +3 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +var foo = 0, bar = 0; baz = 0; +export { + foo, + bar, + baz +} from 'qux'; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ExportNamedDeclaration', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ExportNamedDeclaration', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ExportNamedDeclaration', + line: 5, + column: 0, + endLine: 5, + endColumn: 4, + suggestions: null + } +] + +3 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +var a = 1, + b = 2, + c = 3; +``` + +```json +{ + "options": [ + 4 + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'VariableDeclaration', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'VariableDeclaration', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +var a = 1 + ,b = 2 + ,c = 3; +``` + +```json +{ + "options": [ + 4 + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'VariableDeclaration', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'VariableDeclaration', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +function salutation () { + switch (1) { + case 0: return console.log('hi') + case 1: return console.log('hey') + } +} +``` + +```json +{ + "options": [ + 2, + { + "SwitchCase": 1 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 4: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'SwitchStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'SwitchStatement', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'SwitchStatement', + line: 5, + column: 0, + endLine: 5, + endColumn: 2, + suggestions: null + } +] + +4 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +var items = [ + { + foo: 'bar' + } +]; +``` + +```json +{ + "options": [ + 2, + { + "VariableDeclarator": 2 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrayExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 2, + suggestions: null + } +] + +3 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +const a = 1, + b = 2; +const items1 = [ + { + foo: 'bar' + } +]; +const items2 = Items( + { + foo: 'bar' + } +); +``` + +```json +{ + "options": [ + 2, + { + "VariableDeclarator": 3 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 7: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 6.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'VariableDeclaration', + line: 2, + column: 0, + endLine: 2, + endColumn: 6, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrayExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 5, + column: 0, + endLine: 5, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 6, + column: 0, + endLine: 6, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'CallExpression', + line: 9, + column: 0, + endLine: 9, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 10, + column: 0, + endLine: 10, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 11, + column: 0, + endLine: 11, + endColumn: 2, + suggestions: null + } +] + +7 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +const geometry = 2, + rotate = 3; +var a = 1, + b = 2; +let light = true, + shadow = false; +``` + +```json +{ + "options": [ + 2, + { + "VariableDeclarator": { + "const": 3, + "let": 2 + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 6.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'VariableDeclaration', + line: 2, + column: 0, + endLine: 2, + endColumn: 6, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'VariableDeclaration', + line: 4, + column: 0, + endLine: 4, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'VariableDeclaration', + line: 6, + column: 0, + endLine: 6, + endColumn: 4, + suggestions: null + } +] + +3 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +const abc = 5, + c = 2, + xyz = + { + a: 1, + b: 2 + }; +let abc2 = 5, + c2 = 2, + xyz2 = + { + a: 1, + b: 2 + }; +var abc3 = 5, + c3 = 2, + xyz3 = + { + a: 1, + b: 2 + }; +``` + +```json +{ + "options": [ + 2, + { + "VariableDeclarator": { + "var": 2, + "const": 3 + }, + "SwitchCase": 1 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 12: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 6.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'VariableDeclaration', + line: 2, + column: 0, + endLine: 2, + endColumn: 6, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 6.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'VariableDeclaration', + line: 3, + column: 0, + endLine: 3, + endColumn: 6, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 6 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 5, + column: 0, + endLine: 5, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 6 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 6, + column: 0, + endLine: 6, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'VariableDeclaration', + line: 9, + column: 0, + endLine: 9, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'VariableDeclaration', + line: 10, + column: 0, + endLine: 10, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 2 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 12, + column: 0, + endLine: 12, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 2 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 13, + column: 0, + endLine: 13, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'VariableDeclaration', + line: 16, + column: 0, + endLine: 16, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'VariableDeclaration', + line: 17, + column: 0, + endLine: 17, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 4 spaces but found 6.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 19, + column: 0, + endLine: 19, + endColumn: 6, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 4 spaces but found 6.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 20, + column: 0, + endLine: 20, + endColumn: 6, + suggestions: null + } +] + +12 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +module.exports = { + 'Unit tests': + { + rootPath: './', + environment: 'node', + tests: + [ + 'test/test-*.js' + ], + sources: + [ + '*.js', + 'test/**.js' + ] + } +}; +``` + +```json +{ + "options": [ + 2 + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 8: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 2 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 2 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 5, + column: 0, + endLine: 5, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 2 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 6, + column: 0, + endLine: 6, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 4 spaces but found 6.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrayExpression', + line: 8, + column: 0, + endLine: 8, + endColumn: 6, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 2 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 10, + column: 0, + endLine: 10, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 4 spaces but found 6.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrayExpression', + line: 12, + column: 0, + endLine: 12, + endColumn: 6, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 4 spaces but found 6.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrayExpression', + line: 13, + column: 0, + endLine: 13, + endColumn: 6, + suggestions: null + } +] + +8 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +var path = require('path') + , crypto = require('crypto') + ; +``` + +```json +{ + "options": [ + 2 + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'VariableDeclaration', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +var a = 1 + ,b = 2 + ; +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'VariableDeclaration', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +export function create (some, + argument) { + return Object.create({ + a: some, + b: argument + }); +}; +``` + +```json +{ + "options": [ + 2, + { + "FunctionDeclaration": { + "parameters": "first" + } + } + ], + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 4: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 5, + column: 0, + endLine: 5, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 6, + column: 0, + endLine: 6, + endColumn: 2, + suggestions: null + } +] + +4 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +export function create (id, xfilter, rawType, + width=defaultWidth, height=defaultHeight, + footerHeight=defaultFooterHeight, + padding=defaultPadding) { + // ... function body, indented two spaces +} +``` + +```json +{ + "options": [ + 2, + { + "FunctionDeclaration": { + "parameters": "first" + } + } + ], + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 5, + column: 0, + endLine: 5, + endColumn: 2, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +var obj = { + foo: function () { + return new p() + .then(function (ok) { + return ok; + }, function () { + // ignore things + }); + } +}; +``` + +```json +{ + "options": [ + 2 + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 8: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 6.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'MemberExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 6, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 5, + column: 0, + endLine: 5, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 6.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 6, + column: 0, + endLine: 6, + endColumn: 6, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 7, + column: 0, + endLine: 7, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 6.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 8, + column: 0, + endLine: 8, + endColumn: 6, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 9, + column: 0, + endLine: 9, + endColumn: 2, + suggestions: null + } +] + +8 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +a.b() + .c(function(){ + var a; + }).d.e; +``` + +```json +{ + "options": [ + 2 + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'MemberExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 4, + column: 0, + endLine: 4, + endColumn: 2, + suggestions: null + } +] + +3 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +const YO = 'bah', + TE = 'mah' + +var res, + a = 5, + b = 4 +``` + +```json +{ + "options": [ + 2, + { + "VariableDeclarator": { + "var": 2, + "let": 2, + "const": 3 + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 6.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'VariableDeclaration', + line: 2, + column: 0, + endLine: 2, + endColumn: 6, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'VariableDeclaration', + line: 5, + column: 0, + endLine: 5, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'VariableDeclaration', + line: 6, + column: 0, + endLine: 6, + endColumn: 4, + suggestions: null + } +] + +3 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +const YO = 'bah', + TE = 'mah' + +var res, + a = 5, + b = 4 + +if (YO) console.log(TE) +``` + +```json +{ + "options": [ + 2, + { + "VariableDeclarator": { + "var": 2, + "let": 2, + "const": 3 + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 6.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'VariableDeclaration', + line: 2, + column: 0, + endLine: 2, + endColumn: 6, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'VariableDeclaration', + line: 5, + column: 0, + endLine: 5, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'VariableDeclaration', + line: 6, + column: 0, + endLine: 6, + endColumn: 4, + suggestions: null + } +] + +3 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +var foo = 'foo', + bar = 'bar', + baz = function() { + + } + +function hello () { + +} +``` + +```json +{ + "options": [ + 2 + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'VariableDeclaration', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'VariableDeclaration', + line: 3, + column: 0, + endLine: 3, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 5, + column: 0, + endLine: 5, + endColumn: 2, + suggestions: null + } +] + +3 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +var obj = { + send: function () { + return P.resolve({ + type: 'POST' + }) + .then(function () { + return true; + }, function () { + return false; + }); + } +}; +``` + +```json +{ + "options": [ + 2 + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 10: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 6.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 6, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 5, + column: 0, + endLine: 5, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 6.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'MemberExpression', + line: 6, + column: 0, + endLine: 6, + endColumn: 6, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 7, + column: 0, + endLine: 7, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 6.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 8, + column: 0, + endLine: 8, + endColumn: 6, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 9, + column: 0, + endLine: 9, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 6.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 10, + column: 0, + endLine: 10, + endColumn: 6, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 11, + column: 0, + endLine: 11, + endColumn: 2, + suggestions: null + } +] + +10 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +var obj = { + send: function () { + return P.resolve({ + type: 'POST' + }) + .then(function () { + return true; + }, function () { + return false; + }); + } +}; +``` + +```json +{ + "options": [ + 2, + { + "MemberExpression": 0 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 10: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 6.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 6, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 5, + column: 0, + endLine: 5, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'MemberExpression', + line: 6, + column: 0, + endLine: 6, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 6.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 7, + column: 0, + endLine: 7, + endColumn: 6, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 8, + column: 0, + endLine: 8, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 6.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 9, + column: 0, + endLine: 9, + endColumn: 6, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 10, + column: 0, + endLine: 10, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 11, + column: 0, + endLine: 11, + endColumn: 2, + suggestions: null + } +] + +10 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +const someOtherFunction = argument => { + console.log(argument); + }, + someOtherValue = 'someOtherValue'; +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'VariableDeclaration', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + } +] + +3 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +[ + 'a', + 'b' +].sort().should.deepEqual([ + 'x', + 'y' +]); +``` + +```json +{ + "options": [ + 2 + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 4: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrayExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrayExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrayExpression', + line: 5, + column: 0, + endLine: 5, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrayExpression', + line: 6, + column: 0, + endLine: 6, + endColumn: 2, + suggestions: null + } +] + +4 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +var a = 1, + B = class { + constructor(){} + a(){} + get b(){} + }; +``` + +```json +{ + "options": [ + 2, + { + "VariableDeclarator": 2, + "SwitchCase": 1 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 5: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'VariableDeclaration', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 6.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ClassBody', + line: 3, + column: 0, + endLine: 3, + endColumn: 6, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 6.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ClassBody', + line: 4, + column: 0, + endLine: 4, + endColumn: 6, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 6.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ClassBody', + line: 5, + column: 0, + endLine: 5, + endColumn: 6, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ClassBody', + line: 6, + column: 0, + endLine: 6, + endColumn: 4, + suggestions: null + } +] + +5 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +var a = 1, + B = + class { + constructor(){} + a(){} + get b(){} + }, + c = 3; +``` + +```json +{ + "options": [ + 2, + { + "VariableDeclarator": 2, + "SwitchCase": 1 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 5: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'VariableDeclaration', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 4 spaces but found 6.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ClassBody', + line: 4, + column: 0, + endLine: 4, + endColumn: 6, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 4 spaces but found 6.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ClassBody', + line: 5, + column: 0, + endLine: 5, + endColumn: 6, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 4 spaces but found 6.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ClassBody', + line: 6, + column: 0, + endLine: 6, + endColumn: 6, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'VariableDeclaration', + line: 8, + column: 0, + endLine: 8, + endColumn: 4, + suggestions: null + } +] + +5 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +class A{ + constructor(){} + a(){} + get b(){} +} +``` + +```json +{ + "options": [ + 4, + { + "VariableDeclarator": 1, + "SwitchCase": 1 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ClassBody', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ClassBody', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ClassBody', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + } +] + +3 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +var A = class { + constructor(){} + a(){} + get b(){} +} +``` + +```json +{ + "options": [ + 4, + { + "VariableDeclarator": 1, + "SwitchCase": 1 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ClassBody', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ClassBody', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ClassBody', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + } +] + +3 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +var a = { + some: 1 + , name: 2 +}; +``` + +```json +{ + "options": [ + 2 + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 2, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +a.c = { + aa: function() { + 'test1'; + return 'aa'; + } + , bb: function() { + return this.bb(); + } +}; +``` + +```json +{ + "options": [ + 4 + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 7: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 4, + column: 0, + endLine: 4, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 5, + column: 0, + endLine: 5, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 6, + column: 0, + endLine: 6, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 7, + column: 0, + endLine: 7, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 8, + column: 0, + endLine: 8, + endColumn: 4, + suggestions: null + } +] + +7 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +var a = +{ + actions: + [ + { + name: 'compile' + } + ] +}; +``` + +```json +{ + "options": [ + 4, + { + "VariableDeclarator": 0, + "SwitchCase": 1 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 4: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 4 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrayExpression', + line: 5, + column: 0, + endLine: 5, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 4 spaces but found 12.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 6, + column: 0, + endLine: 6, + endColumn: 12, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 4 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 7, + column: 0, + endLine: 7, + endColumn: 8, + suggestions: null + } +] + +4 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +var a = +[ + { + name: 'compile' + } +]; +``` + +```json +{ + "options": [ + 4, + { + "VariableDeclarator": 0, + "SwitchCase": 1 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrayExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 5, + column: 0, + endLine: 5, + endColumn: 4, + suggestions: null + } +] + +3 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +[[ +], function( + foo +) {} +] +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'FunctionExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +define([ + 'foo' +], function( + bar +) { + baz; +} +) +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrayExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'FunctionExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 6, + column: 0, + endLine: 6, + endColumn: 4, + suggestions: null + } +] + +3 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +const func = function (opts) { + return Promise.resolve() + .then(() => { + [ + 'ONE', 'TWO' + ].forEach(command => { doSomething(); }); + }); +}; +``` + +```json +{ + "options": [ + 4, + { + "MemberExpression": 0 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 6: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'MemberExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 4, + column: 0, + endLine: 4, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 12.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrayExpression', + line: 5, + column: 0, + endLine: 5, + endColumn: 12, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrayExpression', + line: 6, + column: 0, + endLine: 6, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 7, + column: 0, + endLine: 7, + endColumn: 4, + suggestions: null + } +] + +6 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +const func = function (opts) { + return Promise.resolve() + .then(() => { + [ + 'ONE', 'TWO' + ].forEach(command => { doSomething(); }); + }); +}; +``` + +```json +{ + "options": [ + 4 + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 6: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'MemberExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 12.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 4, + column: 0, + endLine: 4, + endColumn: 12, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 16.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrayExpression', + line: 5, + column: 0, + endLine: 5, + endColumn: 16, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 12.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrayExpression', + line: 6, + column: 0, + endLine: 6, + endColumn: 12, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 7, + column: 0, + endLine: 7, + endColumn: 8, + suggestions: null + } +] + +6 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +var haveFun = function () { + SillyFunction( + { + value: true, + }, + { + _id: true, + } + ); +}; +``` + +```json +{ + "options": [ + 4 + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 8: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'CallExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 12.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 12, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 5, + column: 0, + endLine: 5, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'CallExpression', + line: 6, + column: 0, + endLine: 6, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 12.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 7, + column: 0, + endLine: 7, + endColumn: 12, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 8, + column: 0, + endLine: 8, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'CallExpression', + line: 9, + column: 0, + endLine: 9, + endColumn: 4, + suggestions: null + } +] + +8 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +var haveFun = function () { + new SillyFunction( + { + value: true, + }, + { + _id: true, + } + ); +}; +``` + +```json +{ + "options": [ + 4 + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 8: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'NewExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 12.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 12, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 5, + column: 0, + endLine: 5, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'NewExpression', + line: 6, + column: 0, + endLine: 6, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 12.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 7, + column: 0, + endLine: 7, + endColumn: 12, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 8, + column: 0, + endLine: 8, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'NewExpression', + line: 9, + column: 0, + endLine: 9, + endColumn: 4, + suggestions: null + } +] + +8 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +let object1 = { + doThing() { + return _.chain([]) + .map(v => ( + { + value: true, + } + )) + .value(); + } +}; +``` + +```json +{ + "options": [ + 2 + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 9: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 6.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'MemberExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 6, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 2 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrowFunctionExpression', + line: 5, + column: 0, + endLine: 5, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 2 spaces but found 10.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 6, + column: 0, + endLine: 6, + endColumn: 10, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 2 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 7, + column: 0, + endLine: 7, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 6.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrowFunctionExpression', + line: 8, + column: 0, + endLine: 8, + endColumn: 6, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 6.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'MemberExpression', + line: 9, + column: 0, + endLine: 9, + endColumn: 6, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 10, + column: 0, + endLine: 10, + endColumn: 2, + suggestions: null + } +] + +9 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +var foo = { + bar: 1, + baz: { + qux: 2 + } + }, + bar = 1; +``` + +```json +{ + "options": [ + 2 + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 6: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 6.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 6, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 5, + column: 0, + endLine: 5, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 6, + column: 0, + endLine: 6, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'VariableDeclaration', + line: 7, + column: 0, + endLine: 7, + endColumn: 2, + suggestions: null + } +] + +6 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +class Foo + extends Bar { + baz() {} +} +``` + +```json +{ + "options": [ + 2 + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ClassDeclaration', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ClassBody', + line: 3, + column: 0, + endLine: 3, + endColumn: 2, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +class Foo extends + Bar { + baz() {} +} +``` + +```json +{ + "options": [ + 2 + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ClassDeclaration', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ClassBody', + line: 3, + column: 0, + endLine: 3, + endColumn: 2, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +class Foo extends + ( + Bar + ) { + baz() {} +} +``` + +```json +{ + "options": [ + 2 + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 4: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ClassDeclaration', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 2 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ClassDeclaration', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ClassDeclaration', + line: 4, + column: 0, + endLine: 4, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ClassBody', + line: 5, + column: 0, + endLine: 5, + endColumn: 2, + suggestions: null + } +] + +4 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +fs.readdirSync(path.join(__dirname, '../rules')).forEach(name => { + files[name] = foo; +}); +``` + +```json +{ + "options": [ + 2, + { + "outerIIFEBody": 0 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +(function(){ +function foo(x) { + return x + 1; +} +})(); +``` + +```json +{ + "options": [ + 2, + { + "outerIIFEBody": 0 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 2, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +(function(){ + function foo(x) { + return x + 1; + } +})(); +``` + +```json +{ + "options": [ + 4, + { + "outerIIFEBody": 2 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 12.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 12, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 4, + column: 0, + endLine: 4, + endColumn: 8, + suggestions: null + } +] + +3 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +(function(x, y){ +function foo(x) { + return x + 1; +} +})(1, 2); +``` + +```json +{ + "options": [ + 2, + { + "outerIIFEBody": 0 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 2, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +(function(){ +function foo(x) { + return x + 1; +} +}()); +``` + +```json +{ + "options": [ + 2, + { + "outerIIFEBody": 0 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 2, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +!function(){ +function foo(x) { + return x + 1; +} +}(); +``` + +```json +{ + "options": [ + 2, + { + "outerIIFEBody": 0 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 2, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +!function(){ +\u0009\u0009\u0009function foo(x) { +\u0009\u0009\u0009\u0009return x + 1; +\u0009\u0009\u0009} +}(); +``` + +```json +{ + "code": "!function(){\n\t\t\tfunction foo(x) {\n\t\t\t\treturn x + 1;\n\t\t\t}\n}();", + "options": [ + "tab", + { + "outerIIFEBody": 3 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 tabs but found 3.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 3, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 tabs but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 tabs but found 3.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 4, + column: 0, + endLine: 4, + endColumn: 3, + suggestions: null + } +] + +3 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +var out = function(){ + function fooVar(x) { + return x + 1; + } +}; +``` + +```json +{ + "options": [ + 2, + { + "outerIIFEBody": 0 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 4, + column: 0, + endLine: 4, + endColumn: 2, + suggestions: null + } +] + +3 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +var ns = function(){ +function fooVar(x) { + return x + 1; +} +}(); +``` + +```json +{ + "options": [ + 2, + { + "outerIIFEBody": 0 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 2, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +ns = function(){ +function fooVar(x) { + return x + 1; +} +}(); +``` + +```json +{ + "options": [ + 2, + { + "outerIIFEBody": 0 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 2, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +var ns = (function(){ +function fooVar(x) { + return x + 1; +} +}(x)); +``` + +```json +{ + "options": [ + 2, + { + "outerIIFEBody": 0 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 2, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +var ns = (function(){ + function fooVar(x) { + return x + 1; + } +}(x)); +``` + +```json +{ + "options": [ + 4, + { + "outerIIFEBody": 2 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 12.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 12, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 4, + column: 0, + endLine: 4, + endColumn: 8, + suggestions: null + } +] + +3 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +var obj = { + foo: function() { + return true; + } +}; +``` + +```json +{ + "options": [ + 2, + { + "outerIIFEBody": 0 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 4, + column: 0, + endLine: 4, + endColumn: 2, + suggestions: null + } +] + +3 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +while ( + function() { + return true; + }()) { + + x = x + 1; +}; +``` + +```json +{ + "options": [ + 2, + { + "outerIIFEBody": 20 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 2 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 6, + column: 0, + endLine: 6, + endColumn: 2, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +(() => { +function foo(x) { + return x + 1; +} +})(); +``` + +```json +{ + "options": [ + 2, + { + "outerIIFEBody": 0 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 2, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +;(() => { +function foo(x) { + return x + 1; +} +})(); +``` + +```json +{ + "options": [ + 2, + { + "outerIIFEBody": 0 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 2, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +if(data) { + console.log('hi'); +} +``` + +```json +{ + "options": [ + 2, + { + "outerIIFEBody": 0 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +;(() => { + function x(y) { + return y + 1; + } +})(); +``` + +```json +{ + "options": [ + 4, + { + "outerIIFEBody": "off" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 4 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 8, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +;(() => { +function x(y) { + return y + 1; +} +})(); +``` + +```json +{ + "options": [ + 4, + { + "outerIIFEBody": "off" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +Buffer + .indexOf('a') + .toString() +``` + +```json +{ + "options": [ + 4, + { + "MemberExpression": 1 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'MemberExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'MemberExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +Buffer. + length +``` + +```json +{ + "options": [ + 4, + { + "MemberExpression": 1 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'MemberExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +Buffer + .foo + .bar +``` + +```json +{ + "options": [ + 4, + { + "MemberExpression": 1 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'MemberExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'MemberExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +Buffer +\u0009.foo +\u0009.bar +``` + +```json +{ + "code": "Buffer\n\t.foo\n\t.bar", + "options": [ + "tab", + { + "MemberExpression": 1 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 tabs but found 1.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'MemberExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 1, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 tabs but found 1.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'MemberExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 1, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +Buffer + .foo + .bar +``` + +```json +{ + "options": [ + 2, + { + "MemberExpression": 2 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'MemberExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'MemberExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +( + foo + .bar +) +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 4 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'MemberExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 8, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +( + ( + foo + .bar + ) +) +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 8 spaces but found 12.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'MemberExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 12, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +( + foo +) + .bar +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'MemberExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +( + ( + foo + ) + .bar +) +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 4 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'MemberExpression', + line: 5, + column: 0, + endLine: 5, + endColumn: 8, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +( + ( + foo + ) + [ + ( + bar + ) + ] +) +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 5: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 4 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'MemberExpression', + line: 5, + column: 0, + endLine: 5, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 4 spaces but found 12.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'MemberExpression', + line: 6, + column: 0, + endLine: 6, + endColumn: 12, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 8 spaces but found 16.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'MemberExpression', + line: 7, + column: 0, + endLine: 7, + endColumn: 16, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 4 spaces but found 12.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'MemberExpression', + line: 8, + column: 0, + endLine: 8, + endColumn: 12, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 4 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'MemberExpression', + line: 9, + column: 0, + endLine: 9, + endColumn: 8, + suggestions: null + } +] + +5 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +( + foo[bar] +) + .baz +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'MemberExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +( + (foo.bar) +) + .baz +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'MemberExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +foo = bar.baz() + .bip(); +``` + +```json +{ + "options": [ + 4, + { + "MemberExpression": 1 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'MemberExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +function foo() { + new + .target +} +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'MetaProperty', + line: 3, + column: 0, + endLine: 3, + endColumn: 8, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +function foo() { + new. + target +} +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'MetaProperty', + line: 3, + column: 0, + endLine: 3, + endColumn: 8, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +if (foo) { + bar(); +} else if (baz) { + foobar(); +} else if (qux) { + qux(); +} +``` + +```json +{ + "options": [ + 2 + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 4, + column: 0, + endLine: 4, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 6, + column: 0, + endLine: 6, + endColumn: 2, + suggestions: null + } +] + +3 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +function foo(aaa, + bbb, ccc, ddd) { + bar(); +} +``` + +```json +{ + "options": [ + 2, + { + "FunctionDeclaration": { + "parameters": 1, + "body": 2 + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'FunctionDeclaration', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +function foo(aaa, bbb, + ccc, ddd) { + bar(); +} +``` + +```json +{ + "options": [ + 2, + { + "FunctionDeclaration": { + "parameters": 3, + "body": 1 + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 6.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'FunctionDeclaration', + line: 2, + column: 0, + endLine: 2, + endColumn: 6, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 2, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +function foo(aaa, + bbb, + ccc) { + bar(); +} +``` + +```json +{ + "options": [ + 4, + { + "FunctionDeclaration": { + "parameters": 1, + "body": 3 + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'FunctionDeclaration', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'FunctionDeclaration', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 12.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 4, + column: 0, + endLine: 4, + endColumn: 12, + suggestions: null + } +] + +3 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +function foo(aaa, + bbb, ccc, + ddd, eee, fff) { + bar(); +} +``` + +```json +{ + "options": [ + 2, + { + "FunctionDeclaration": { + "parameters": "first", + "body": 1 + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 4, + column: 0, + endLine: 4, + endColumn: 2, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +function foo(aaa, bbb) +{ + bar(); +} +``` + +```json +{ + "options": [ + 2, + { + "FunctionDeclaration": { + "body": 3 + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 6.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 6, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +function foo( + aaa, + bbb) { + bar(); +} +``` + +```json +{ + "options": [ + 2, + { + "FunctionDeclaration": { + "parameters": "first", + "body": 2 + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'FunctionDeclaration', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'FunctionDeclaration', + line: 3, + column: 0, + endLine: 3, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + } +] + +3 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +var foo = function(aaa, + bbb, + ccc, + ddd) { +bar(); +} +``` + +```json +{ + "options": [ + 2, + { + "FunctionExpression": { + "parameters": 2, + "body": 0 + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'FunctionExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'FunctionExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'FunctionExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + } +] + +3 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +var foo = function(aaa, + bbb, + ccc) { + bar(); +} +``` + +```json +{ + "options": [ + 2, + { + "FunctionExpression": { + "parameters": 1, + "body": 10 + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'FunctionExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'FunctionExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 20.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 4, + column: 0, + endLine: 4, + endColumn: 20, + suggestions: null + } +] + +3 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +var foo = function(aaa, + bbb, ccc, ddd, + eee, fff) { + bar(); +} +``` + +```json +{ + "options": [ + 4, + { + "FunctionExpression": { + "parameters": "first", + "body": 1 + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +var foo = function( + aaa, bbb, ccc, + ddd, eee) { + bar(); +} +``` + +```json +{ + "options": [ + 2, + { + "FunctionExpression": { + "parameters": "first", + "body": 3 + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'FunctionExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'FunctionExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 6.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 4, + column: 0, + endLine: 4, + endColumn: 6, + suggestions: null + } +] + +3 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +foo.bar( + baz, qux, function() { + qux; + } +); +``` + +```json +{ + "options": [ + 2, + { + "FunctionExpression": { + "body": 3 + }, + "CallExpression": { + "arguments": 3 + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 6.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'CallExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 6, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 12.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 12, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 6.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 4, + column: 0, + endLine: 4, + endColumn: 6, + suggestions: null + } +] + +3 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +function foo() { + bar(); + \u0009baz(); +\u0009 \u0009\u0009\u0009 \u0009\u0009\u0009 \u0009 \u0009qux(); +} +``` + +```json +{ + "code": "function foo() {\n bar();\n \tbaz();\n\t \t\t\t \t\t\t \t \tqux();\n}", + "options": [ + 2 + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +function foo() { + function bar() { + baz(); + } +} +``` + +```json +{ + "options": [ + 2, + { + "FunctionDeclaration": { + "body": 1 + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 4, + column: 0, + endLine: 4, + endColumn: 2, + suggestions: null + } +] + +3 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +function foo() { + bar(); + \u0009\u0009} +``` + +```json +{ + "code": "function foo() {\n bar();\n \t\t}", + "options": [ + 2 + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +function foo() { + function bar(baz, + qux) { + foobar(); + } +} +``` + +```json +{ + "options": [ + 2, + { + "FunctionDeclaration": { + "body": 1, + "parameters": 2 + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 4: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 6.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'FunctionDeclaration', + line: 3, + column: 0, + endLine: 3, + endColumn: 6, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 5, + column: 0, + endLine: 5, + endColumn: 2, + suggestions: null + } +] + +4 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +foo + ? bar + : baz +``` + +```json +{ + "options": [ + 2 + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 2, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +foo = (bar ? + baz : + qux +); +``` + +```json +{ + "options": [ + 2 + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 2, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +condition + ? () => { + return true + } + : condition2 + ? () => { + return true + } + : () => { + return false + } +``` + +```json +{ + "options": [ + 2 + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 10: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 4, + column: 0, + endLine: 4, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 5, + column: 0, + endLine: 5, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 6, + column: 0, + endLine: 6, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 6.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 7, + column: 0, + endLine: 7, + endColumn: 6, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 8, + column: 0, + endLine: 8, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 9, + column: 0, + endLine: 9, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 6.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 10, + column: 0, + endLine: 10, + endColumn: 6, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 11, + column: 0, + endLine: 11, + endColumn: 4, + suggestions: null + } +] + +10 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +condition + ? () => { + return true + } + : condition2 + ? () => { + return true + } + : () => { + return false + } +``` + +```json +{ + "options": [ + 2, + { + "offsetTernaryExpressions": false + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 10: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 4, + column: 0, + endLine: 4, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 5, + column: 0, + endLine: 5, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 6, + column: 0, + endLine: 6, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 6.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 7, + column: 0, + endLine: 7, + endColumn: 6, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 8, + column: 0, + endLine: 8, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 9, + column: 0, + endLine: 9, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 6.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 10, + column: 0, + endLine: 10, + endColumn: 6, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 11, + column: 0, + endLine: 11, + endColumn: 4, + suggestions: null + } +] + +10 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +condition + ? () => { + return true + } + : condition2 + ? () => { + return true + } + : () => { + return false + } +``` + +```json +{ + "options": [ + 2, + { + "offsetTernaryExpressions": true + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 10: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 6.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 6, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 5, + column: 0, + endLine: 5, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 6, + column: 0, + endLine: 6, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 7, + column: 0, + endLine: 7, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 6.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 8, + column: 0, + endLine: 8, + endColumn: 6, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 9, + column: 0, + endLine: 9, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 10, + column: 0, + endLine: 10, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 6.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 11, + column: 0, + endLine: 11, + endColumn: 6, + suggestions: null + } +] + +10 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +condition + ? () => { + return true + } + : condition2 + ? () => { + return true + } + : () => { + return false + } +``` + +```json +{ + "options": [ + 4, + { + "offsetTernaryExpressions": true + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 10: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 12.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 12, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 4, + column: 0, + endLine: 4, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 5, + column: 0, + endLine: 5, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 6, + column: 0, + endLine: 6, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 16.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 7, + column: 0, + endLine: 7, + endColumn: 16, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 12.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 8, + column: 0, + endLine: 8, + endColumn: 12, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 9, + column: 0, + endLine: 9, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 16.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 10, + column: 0, + endLine: 10, + endColumn: 16, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 12.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 11, + column: 0, + endLine: 11, + endColumn: 12, + suggestions: null + } +] + +10 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +condition1 + ? condition2 + ? Promise.resolve(1) + : Promise.resolve(2) + : Promise.resolve(3) +``` + +```json +{ + "options": [ + 2, + { + "offsetTernaryExpressions": true + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 4: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 5, + column: 0, + endLine: 5, + endColumn: 2, + suggestions: null + } +] + +4 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +condition1 + ? Promise.resolve(1) + : condition2 + ? Promise.resolve(2) + : Promise.resolve(3) +``` + +```json +{ + "options": [ + 2, + { + "offsetTernaryExpressions": true + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 4: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 5, + column: 0, + endLine: 5, + endColumn: 4, + suggestions: null + } +] + +4 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +condition +\u0009? () => { +\u0009\u0009\u0009return true +\u0009\u0009} +\u0009: condition2 +\u0009\u0009? () => { +\u0009\u0009\u0009\u0009return true +\u0009\u0009\u0009} +\u0009\u0009: () => { +\u0009\u0009\u0009\u0009return false +\u0009\u0009\u0009} +``` + +```json +{ + "code": "condition\n\t? () => {\n\t\t\treturn true\n\t\t}\n\t: condition2\n\t\t? () => {\n\t\t\t\treturn true\n\t\t\t}\n\t\t: () => {\n\t\t\t\treturn false\n\t\t\t}", + "options": [ + "tab", + { + "offsetTernaryExpressions": true + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 10: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 tabs but found 1.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 1, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 tabs but found 3.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 3, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 tabs but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 4, + column: 0, + endLine: 4, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 tabs but found 1.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 5, + column: 0, + endLine: 5, + endColumn: 1, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 tabs but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 6, + column: 0, + endLine: 6, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 tabs but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 7, + column: 0, + endLine: 7, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 tabs but found 3.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 8, + column: 0, + endLine: 8, + endColumn: 3, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 tabs but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 9, + column: 0, + endLine: 9, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 tabs but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 10, + column: 0, + endLine: 10, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 tabs but found 3.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 11, + column: 0, + endLine: 11, + endColumn: 3, + suggestions: null + } +] + +10 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +[ + foo ? + bar : + baz, + qux +]; +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 4: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrayExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrayExpression', + line: 5, + column: 0, + endLine: 5, + endColumn: 4, + suggestions: null + } +] + +4 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +switch (foo) { + case bar: + baz(); + // call the baz function +} +``` + +```json +{ + "options": [ + 2, + { + "SwitchCase": 1 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'SwitchStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'SwitchCase', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +switch (foo) { + case bar: + baz(); + // no default +} +``` + +```json +{ + "options": [ + 2, + { + "SwitchCase": 1 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'SwitchStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'SwitchCase', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +[ + // no elements +] +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrayExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +var { + foo, + bar, + baz: qux, + foobar: baz = foobar +} = qux; +``` + +```json +{ + "options": [ + 2 + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 4: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectPattern', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectPattern', + line: 3, + column: 0, + endLine: 3, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectPattern', + line: 4, + column: 0, + endLine: 4, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectPattern', + line: 5, + column: 0, + endLine: 5, + endColumn: 2, + suggestions: null + } +] + +4 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +var [ + foo, + bar, + baz, + foobar = baz +] = qux; +``` + +```json +{ + "options": [ + 2 + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 4: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrayPattern', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrayPattern', + line: 3, + column: 0, + endLine: 3, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrayPattern', + line: 4, + column: 0, + endLine: 4, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrayPattern', + line: 5, + column: 0, + endLine: 5, + endColumn: 2, + suggestions: null + } +] + +4 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +const { + a +} += +{ + a: 1 +} +``` + +```json +{ + "options": [ + 2 + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectPattern', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 6, + column: 0, + endLine: 6, + endColumn: 2, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +const { + a +} = { + a: 1 +} +``` + +```json +{ + "options": [ + 2 + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectPattern', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 2, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +const + { + a + } = { + a: 1 + }; +``` + +```json +{ + "options": [ + 2 + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 5: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'VariableDeclaration', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectPattern', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectPattern', + line: 4, + column: 0, + endLine: 4, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 5, + column: 0, + endLine: 5, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 6, + column: 0, + endLine: 6, + endColumn: 2, + suggestions: null + } +] + +5 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +const + foo = { + bar: 1 + } +``` + +```json +{ + "options": [ + 2 + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'VariableDeclaration', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 2, + suggestions: null + } +] + +3 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +const [ + a +] = [ + 1 +] +``` + +```json +{ + "options": [ + 2 + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrayPattern', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrayExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 2, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +var folder = filePath + .foo() + .bar; +``` + +```json +{ + "options": [ + 2, + { + "MemberExpression": 2 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'MemberExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'MemberExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +for (const foo of bar) + baz(); +``` + +```json +{ + "options": [ + 2 + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ForOfStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +var x = () => + 5; +``` + +```json +{ + "options": [ + 2 + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrowFunctionExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +( + foo +)( + bar +) +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'CallExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +(() => + foo +)( + bar +) +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrowFunctionExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'CallExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +(() => { + foo(); +})( + bar +) +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'CallExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +({ + foo: + bar +}) +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +({ + [foo]: + bar +}) +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +switch (foo) { + // comment + case study: + // comment + bar(); + case closed: + /* multiline comment + */ +} +``` + +```json +{ + "options": [ + 2, + { + "SwitchCase": 1 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 5: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'SwitchStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'SwitchStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'SwitchCase', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'SwitchCase', + line: 5, + column: 0, + endLine: 5, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'SwitchStatement', + line: 6, + column: 0, + endLine: 6, + endColumn: 2, + suggestions: null + } +] + +5 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +switch (foo) { + // comment + case study: + // the comment can also be here + case closed: +} +``` + +```json +{ + "options": [ + 2, + { + "SwitchCase": 1 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'SwitchStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'SwitchStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'SwitchStatement', + line: 5, + column: 0, + endLine: 5, + endColumn: 2, + suggestions: null + } +] + +3 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +foo && + ![].map(() => { + bar(); + }) +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 4 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 8, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +function foo() { + var bar = function(baz, + qux) { + foobar(); + }; +} +``` + +```json +{ + "options": [ + 2, + { + "FunctionExpression": { + "parameters": 3 + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 4: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'FunctionExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 5, + column: 0, + endLine: 5, + endColumn: 2, + suggestions: null + } +] + +4 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +function foo() { + return (bar === 1 || bar === 2 && + (/Function/.test(grandparent.type))) && + directives(parent).indexOf(node) >= 0; +} +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +function foo() { + return (foo === bar || ( + baz === qux && ( + foo === foo || + bar === bar || + baz === baz + ) + )) +} +``` + +```json +{ + "options": [ + 4 + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 5: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 4 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'LogicalExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 8 spaces but found 12.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'LogicalExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 12, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 4 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'LogicalExpression', + line: 7, + column: 0, + endLine: 7, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'LogicalExpression', + line: 8, + column: 0, + endLine: 8, + endColumn: 4, + suggestions: null + } +] + +5 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +function foo() { + return (bar === 1 || bar === 2) && + (z === 3 || z === 4); +} +``` + +```json +{ + "options": [ + 2 + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +/* comment */ if (foo) { + bar(); +} +``` + +```json +{ + "options": [ + 2 + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +if (foo) { + bar(); +// Otherwise, if foo is false, do baz. +// baz is very important. +} else { + baz(); +} +``` + +```json +{ + "options": [ + 2 + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 6, + column: 0, + endLine: 6, + endColumn: 2, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +function foo() { + return ((bar === 1 || bar === 2) && + (z === 3 || z === 4)); +} +``` + +```json +{ + "options": [ + 2 + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +foo( + bar, + baz, + qux +); +``` + +```json +{ + "options": [ + 2, + { + "CallExpression": { + "arguments": 1 + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'CallExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'CallExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'CallExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 2, + suggestions: null + } +] + +3 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +foo( +\u0009bar, +\u0009baz, +\u0009qux +); +``` + +```json +{ + "code": "foo(\n\tbar,\n\tbaz,\n\tqux\n);", + "options": [ + "tab", + { + "CallExpression": { + "arguments": 1 + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 tabs but found 1.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'CallExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 1, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 tabs but found 1.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'CallExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 1, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 tabs but found 1.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'CallExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 1, + suggestions: null + } +] + +3 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +foo(bar, + baz, + qux); +``` + +```json +{ + "options": [ + 4, + { + "CallExpression": { + "arguments": 2 + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'CallExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'CallExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 8, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +foo(bar, + 1 + 2, + !baz, + new Car('!') +); +``` + +```json +{ + "options": [ + 2, + { + "CallExpression": { + "arguments": 4 + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'CallExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'CallExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'CallExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 8, + suggestions: null + } +] + +3 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +foo( + (bar) +); +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'CallExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +foo( + (bar) +); +``` + +```json +{ + "options": [ + 4, + { + "CallExpression": { + "arguments": 1 + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'CallExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +var foo = function() { + return bar( + [{ + }].concat(baz) + ); +}; +``` + +```json +{ + "options": [ + 2 + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 4: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'CallExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'CallExpression', + line: 5, + column: 0, + endLine: 5, + endColumn: 2, + suggestions: null + } +] + +4 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +var foo = [ + bar, + baz +] +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrayExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrayExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +var foo = [bar, + baz, + qux +] +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrayExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrayExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +var foo = [bar, + baz, + qux +] +``` + +```json +{ + "options": [ + 2, + { + "ArrayExpression": 8 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 16.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrayExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 16, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 16.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrayExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 16, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +var foo = [ + { bar: 1, + baz: 2 }, + { bar: 3, + baz: 4 } +] +``` + +```json +{ + "options": [ + 4, + { + "ArrayExpression": 2, + "ObjectExpression": "first" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 4: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrayExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 2 spaces but found 10.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 10, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrayExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 2 spaces but found 10.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 5, + column: 0, + endLine: 5, + endColumn: 10, + suggestions: null + } +] + +4 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +var foo = [ + { + foo: 1 + } +] +``` + +```json +{ + "options": [ + 4, + { + "ArrayExpression": 2 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrayExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 12.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 12, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 8, + suggestions: null + } +] + +3 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +function foo() { + [ + foo + ] +} +``` + +```json +{ + "options": [ + 2, + { + "ArrayExpression": 4 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 10.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrayExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 10, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrayExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 2, + suggestions: null + } +] + +3 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +var foo = [ + [ + 1 + ] +] +``` + +```json +{ + "options": [ + 2, + { + "ArrayExpression": "first" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrayExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrayExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrayExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 2, + suggestions: null + } +] + +3 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +var foo = [ 1, + [ + 2 + ] +]; +``` + +```json +{ + "options": [ + 2, + { + "ArrayExpression": "first" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 12 spaces but found 14.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrayExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 14, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +const lambda = foo => { + Object.assign({}, + filterName, + { + display + } + ); +} +``` + +```json +{ + "options": [ + 2, + { + "ObjectExpression": 1 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 6: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'CallExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'CallExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 6.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 5, + column: 0, + endLine: 5, + endColumn: 6, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 6, + column: 0, + endLine: 6, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'CallExpression', + line: 7, + column: 0, + endLine: 7, + endColumn: 2, + suggestions: null + } +] + +6 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +const lambda = foo => { + Object.assign({}, + filterName, + { + display + } + ); +} +``` + +```json +{ + "options": [ + 2, + { + "ObjectExpression": "first" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 6: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'CallExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'CallExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 6.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 5, + column: 0, + endLine: 5, + endColumn: 6, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 6, + column: 0, + endLine: 6, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'CallExpression', + line: 7, + column: 0, + endLine: 7, + endColumn: 2, + suggestions: null + } +] + +6 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +var foo = function() { +\u0009window.foo('foo', +\u0009\u0009{ +\u0009\u0009\u0009foo: 'bar', +\u0009\u0009\u0009bar: { +\u0009\u0009\u0009\u0009foo: 'bar' +\u0009\u0009\u0009} +\u0009\u0009} +\u0009); +} +``` + +```json +{ + "code": "var foo = function() {\n\twindow.foo('foo',\n\t\t{\n\t\t\tfoo: 'bar',\n\t\t\tbar: {\n\t\t\t\tfoo: 'bar'\n\t\t\t}\n\t\t}\n\t);\n}", + "options": [ + "tab" + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 8: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 tabs but found 1.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 1, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 tabs but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'CallExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 tabs but found 3.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 3, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 tabs but found 3.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 5, + column: 0, + endLine: 5, + endColumn: 3, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 tabs but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 6, + column: 0, + endLine: 6, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 tabs but found 3.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 7, + column: 0, + endLine: 7, + endColumn: 3, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 tabs but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 8, + column: 0, + endLine: 8, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 tabs but found 1.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'CallExpression', + line: 9, + column: 0, + endLine: 9, + endColumn: 1, + suggestions: null + } +] + +8 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +if (foo) + bar(); +// Otherwise, if foo is false, do baz. +// baz is very important. +else { + baz(); +} +``` + +```json +{ + "options": [ + 2 + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 6, + column: 0, + endLine: 6, + endColumn: 2, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +if ( + foo && bar || + baz && qux // This line is ignored because BinaryExpressions are not checked. +) { + qux(); +} +``` + +```json +{ + "options": [ + 4 + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 5, + column: 0, + endLine: 5, + endColumn: 4, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +foo + || ( + bar + ) +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 4 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'LogicalExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'LogicalExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +foo + || ( + bar + ) +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 4 spaces but found 20.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'LogicalExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 20, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 16.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'LogicalExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 16, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +var foo = 1, + bar = + 2; +``` + +```json +{ + "options": [ + 4 + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'VariableDeclaration', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +switch (foo) { + case bar: + { + baz(); + } +} +``` + +```json +{ + "options": [ + 2, + { + "SwitchCase": 1 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 4: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'SwitchStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'SwitchCase', + line: 3, + column: 0, + endLine: 3, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 5, + column: 0, + endLine: 5, + endColumn: 2, + suggestions: null + } +] + +4 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +`foo${ + bar}` +``` + +```json +{ + "options": [ + 2 + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'TemplateLiteral', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +`foo${ + `bar${ + baz}`}` +``` + +```json +{ + "options": [ + 2 + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'TemplateLiteral', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'TemplateLiteral', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +`foo${ + `bar${ + baz + }` +}` +``` + +```json +{ + "options": [ + 2 + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'TemplateLiteral', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'TemplateLiteral', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'TemplateLiteral', + line: 4, + column: 0, + endLine: 4, + endColumn: 2, + suggestions: null + } +] + +3 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +`foo${ + ( + bar + ) +}` +``` + +```json +{ + "options": [ + 2 + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'TemplateLiteral', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 2 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'TemplateLiteral', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'TemplateLiteral', + line: 4, + column: 0, + endLine: 4, + endColumn: 2, + suggestions: null + } +] + +3 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +foo(` + bar +`, { + baz: 1 +}); +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +function foo() { + `foo${bar}baz${ + qux}foo${ + bar}baz` +} +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'TemplateLiteral', + line: 3, + column: 0, + endLine: 3, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'TemplateLiteral', + line: 4, + column: 0, + endLine: 4, + endColumn: 8, + suggestions: null + } +] + +3 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +JSON + .stringify( + { + ok: true + } + ); +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 5: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'MemberExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'CallExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 12.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 12, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 5, + column: 0, + endLine: 5, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'CallExpression', + line: 6, + column: 0, + endLine: 6, + endColumn: 4, + suggestions: null + } +] + +5 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +function foo() { + const template = `this indentation is not checked +because it's part of a template literal.`; +} +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +function foo() { + const template = `the indentation of a ${ + node.type + } node is checked.`; +} +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'TemplateLiteral', + line: 3, + column: 0, + endLine: 3, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'TemplateLiteral', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + } +] + +3 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +JSON + .stringify( + { + test: 'test' + } + ); +``` + +```json +{ + "options": [ + 4, + { + "CallExpression": { + "arguments": 1 + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 5: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'MemberExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'CallExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 12.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 12, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 5, + column: 0, + endLine: 5, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'CallExpression', + line: 6, + column: 0, + endLine: 6, + endColumn: 4, + suggestions: null + } +] + +5 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +[ + foo, + // comment + // another comment + bar +] +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 4: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrayExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrayExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrayExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrayExpression', + line: 5, + column: 0, + endLine: 5, + endColumn: 4, + suggestions: null + } +] + +4 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +if (foo) { + /* comment */ bar(); +} +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +function foo() { + return ( + 1 + ); +} +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 4 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ReturnStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ReturnStatement', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + } +] + +3 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +function foo() { + return ( + 1 + ) +} +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 4 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ReturnStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ReturnStatement', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + } +] + +3 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +var abc = [ + ( + '' + ), + def, +] +``` + +```json +{ + "options": [ + 2 + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 4: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrayExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 2 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrayExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrayExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrayExpression', + line: 5, + column: 0, + endLine: 5, + endColumn: 2, + suggestions: null + } +] + +4 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +var abc = [ + ( + '' + ), + ( + 'bar' + ) +] +``` + +```json +{ + "options": [ + 2 + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 6: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrayExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 2 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrayExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrayExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrayExpression', + line: 5, + column: 0, + endLine: 5, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 2 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrayExpression', + line: 6, + column: 0, + endLine: 6, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrayExpression', + line: 7, + column: 0, + endLine: 7, + endColumn: 2, + suggestions: null + } +] + +6 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +function f() { + return asyncCall() + .then( + 'some string', + [ + 1, + 2, + 3 + ] + ); +} +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 9: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'MemberExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 12.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'CallExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 12, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 12.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'CallExpression', + line: 5, + column: 0, + endLine: 5, + endColumn: 12, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 16.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrayExpression', + line: 6, + column: 0, + endLine: 6, + endColumn: 16, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 16.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrayExpression', + line: 7, + column: 0, + endLine: 7, + endColumn: 16, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 16.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrayExpression', + line: 8, + column: 0, + endLine: 8, + endColumn: 16, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 12.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrayExpression', + line: 9, + column: 0, + endLine: 9, + endColumn: 12, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'CallExpression', + line: 10, + column: 0, + endLine: 10, + endColumn: 8, + suggestions: null + } +] + +9 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +function f() { + return asyncCall() + .then( + 'some string', + [ + 1, + 2, + 3 + ] + ); +} +``` + +```json +{ + "options": [ + 4, + { + "MemberExpression": 1 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 9: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'MemberExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 12.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'CallExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 12, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 12.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'CallExpression', + line: 5, + column: 0, + endLine: 5, + endColumn: 12, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 16.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrayExpression', + line: 6, + column: 0, + endLine: 6, + endColumn: 16, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 16.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrayExpression', + line: 7, + column: 0, + endLine: 7, + endColumn: 16, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 16.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrayExpression', + line: 8, + column: 0, + endLine: 8, + endColumn: 16, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 12.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrayExpression', + line: 9, + column: 0, + endLine: 9, + endColumn: 12, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'CallExpression', + line: 10, + column: 0, + endLine: 10, + endColumn: 8, + suggestions: null + } +] + +9 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +var x = [ + [1], + [2] +] +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrayExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrayExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +var y = [ + {a: 1}, + {b: 2} +] +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrayExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrayExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +foo( + bar, + { + baz: 1 + } +) +``` + +```json +{ + "options": [ + 4, + { + "CallExpression": { + "arguments": "first" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 4: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'CallExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'CallExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 5, + column: 0, + endLine: 5, + endColumn: 4, + suggestions: null + } +] + +4 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +if (Foo) { + new Foo +} +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +var foo = 0, bar = 0, baz = 0; +export { + foo, + bar, + baz +} +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ExportNamedDeclaration', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ExportNamedDeclaration', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ExportNamedDeclaration', + line: 5, + column: 0, + endLine: 5, + endColumn: 4, + suggestions: null + } +] + +3 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +foo + ? bar + : baz +``` + +```json +{ + "options": [ + 4, + { + "flatTernaryExpressions": true + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +foo ? + bar : + baz +``` + +```json +{ + "options": [ + 4, + { + "flatTernaryExpressions": true + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +foo ? + bar + : baz +``` + +```json +{ + "options": [ + 4, + { + "flatTernaryExpressions": true + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +foo + ? bar : + baz +``` + +```json +{ + "options": [ + 4, + { + "flatTernaryExpressions": true + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +foo + ? bar + : baz + ? qux + : foobar + ? boop + : beep +``` + +```json +{ + "options": [ + 4, + { + "flatTernaryExpressions": true + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 6: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 5, + column: 0, + endLine: 5, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 12.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 6, + column: 0, + endLine: 6, + endColumn: 12, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 12.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 7, + column: 0, + endLine: 7, + endColumn: 12, + suggestions: null + } +] + +6 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +foo ? + bar : + baz ? + qux : + foobar ? + boop : + beep +``` + +```json +{ + "options": [ + 4, + { + "flatTernaryExpressions": true + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 6: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 5, + column: 0, + endLine: 5, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 12.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 6, + column: 0, + endLine: 6, + endColumn: 12, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 12.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 7, + column: 0, + endLine: 7, + endColumn: 12, + suggestions: null + } +] + +6 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +var a = foo + ? bar + : baz +``` + +```json +{ + "options": [ + 4, + { + "flatTernaryExpressions": true + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +var a = + foo + ? bar + : baz +``` + +```json +{ + "options": [ + 4, + { + "flatTernaryExpressions": true + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 4 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 4 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 8, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +a = foo + ? bar + : baz +``` + +```json +{ + "options": [ + 4, + { + "flatTernaryExpressions": true + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +a = + foo + ? bar + : baz +``` + +```json +{ + "options": [ + 4, + { + "flatTernaryExpressions": true + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 4 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 4 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 8, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +foo( + foo ? bar : + baz ? qux : + foobar ? boop : + /*else*/ beep +) +``` + +```json +{ + "options": [ + 4, + { + "flatTernaryExpressions": true + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 4: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'CallExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 5, + column: 0, + endLine: 5, + endColumn: 4, + suggestions: null + } +] + +4 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +function wrap() { + return ( + foo ? bar : + baz ? qux : + foobar ? boop : + /*else*/ beep + ) +} +``` + +```json +{ + "options": [ + 4, + { + "flatTernaryExpressions": true + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 6: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 4 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ReturnStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 4 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 4 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 5, + column: 0, + endLine: 5, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 4 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 6, + column: 0, + endLine: 6, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ReturnStatement', + line: 7, + column: 0, + endLine: 7, + endColumn: 4, + suggestions: null + } +] + +6 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +function wrap() { + return foo + ? bar + : baz +} +``` + +```json +{ + "options": [ + 4, + { + "flatTernaryExpressions": true + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 8, + suggestions: null + } +] + +3 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +function wrap() { + return ( + foo + ? bar + : baz + ) +} +``` + +```json +{ + "options": [ + 4, + { + "flatTernaryExpressions": true + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 5: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 4 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ReturnStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 4 spaces but found 12.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 12, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 4 spaces but found 12.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 5, + column: 0, + endLine: 5, + endColumn: 12, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ReturnStatement', + line: 6, + column: 0, + endLine: 6, + endColumn: 4, + suggestions: null + } +] + +5 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +foo( + foo + ? bar + : baz +) +``` + +```json +{ + "options": [ + 4, + { + "flatTernaryExpressions": true + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'CallExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 8, + suggestions: null + } +] + +3 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +foo(foo + ? bar + : baz +) +``` + +```json +{ + "options": [ + 4, + { + "flatTernaryExpressions": true + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +foo + ? bar + : baz + ? qux + : foobar + ? boop + : beep +``` + +```json +{ + "options": [ + 4, + { + "flatTernaryExpressions": false + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 6: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 5, + column: 0, + endLine: 5, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 12.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 6, + column: 0, + endLine: 6, + endColumn: 12, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 12.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 7, + column: 0, + endLine: 7, + endColumn: 12, + suggestions: null + } +] + +6 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +foo ? + bar : + baz ? + qux : + foobar ? + boop : + beep +``` + +```json +{ + "options": [ + 4, + { + "flatTernaryExpressions": false + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 6: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 5, + column: 0, + endLine: 5, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 12.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 6, + column: 0, + endLine: 6, + endColumn: 12, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 12.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 7, + column: 0, + endLine: 7, + endColumn: 12, + suggestions: null + } +] + +6 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +[ + , + foo +] +``` + +```json +{ + "options": [ + 4, + { + "ArrayExpression": "first" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrayExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrayExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +foo.bar('baz', function(err) { + qux; +}); +``` + +```json +{ + "options": [ + 2, + { + "CallExpression": { + "arguments": "first" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +foo.bar(function() { + cookies; +}).baz(function() { + cookies; +}); +``` + +```json +{ + "options": [ + 2, + { + "MemberExpression": 1 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 4, + column: 0, + endLine: 4, + endColumn: 2, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +foo.bar().baz(function() { + cookies; +}).qux(function() { + cookies; +}); +``` + +```json +{ + "options": [ + 2, + { + "MemberExpression": 1 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 4, + column: 0, + endLine: 4, + endColumn: 2, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +( + { + foo: 1, + baz: 2 + } +); +``` + +```json +{ + "options": [ + 2, + { + "ObjectExpression": "first" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 2 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 2 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +foo(() => { + bar; +}, () => { + baz; +}) +``` + +```json +{ + "options": [ + 4, + { + "CallExpression": { + "arguments": "first" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +[ foo, + bar ].forEach(function() { + baz; +}) +``` + +```json +{ + "options": [ + 2, + { + "ArrayExpression": "first", + "MemberExpression": 1 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 2, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +foo = bar[ + baz +]; +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'MemberExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +foo[ + bar +]; +``` + +```json +{ + "options": [ + 4, + { + "MemberExpression": 1 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'MemberExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +foo[ + ( + bar + ) +]; +``` + +```json +{ + "options": [ + 4, + { + "MemberExpression": 1 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'MemberExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 4 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'MemberExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'MemberExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + } +] + +3 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +if (foo) + bar; +else if (baz) + qux; +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +if (foo) + ; +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +import {foo} + from 'bar'; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ImportDeclaration', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +import { foo, + bar, + baz, +} from 'qux'; +``` + +```json +{ + "options": [ + 4, + { + "ImportDeclaration": 1 + } + ], + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ImportDeclaration', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ImportDeclaration', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +import { + foo, + bar, + baz, +} from 'qux'; +``` + +```json +{ + "options": [ + 4, + { + "ImportDeclaration": 1 + } + ], + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ImportDeclaration', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ImportDeclaration', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ImportDeclaration', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + } +] + +3 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +( + a +) => b => { + c +} +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrowFunctionExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +( + a +) => b => c => d => { + e +} +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrowFunctionExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +( + a +) => + ( + b + ) => { + c + } +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 6: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrowFunctionExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrowFunctionExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrowFunctionExpression', + line: 5, + column: 0, + endLine: 5, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrowFunctionExpression', + line: 6, + column: 0, + endLine: 6, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 7, + column: 0, + endLine: 7, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 8, + column: 0, + endLine: 8, + endColumn: 4, + suggestions: null + } +] + +6 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +if ( + foo +) bar( + baz +); +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'CallExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +if (foo) +{ + bar(); +} +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +function foo(bar) +{ + baz(); +} +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +() => + ({}) +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrowFunctionExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +() => + (({})) +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrowFunctionExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +( + () => + ({}) +) +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 4 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrowFunctionExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 8, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +var x = function foop(bar) +{ + baz(); +} +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +var x = (bar) => +{ + baz(); +} +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +class Foo +{ + constructor() + { + foo(); + } + + bar() + { + baz(); + } +} +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 8: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ClassBody', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'FunctionExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 5, + column: 0, + endLine: 5, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 6, + column: 0, + endLine: 6, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ClassBody', + line: 8, + column: 0, + endLine: 8, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'FunctionExpression', + line: 9, + column: 0, + endLine: 9, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 10, + column: 0, + endLine: 10, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 11, + column: 0, + endLine: 11, + endColumn: 4, + suggestions: null + } +] + +8 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +class Foo + extends Bar +{ + constructor() + { + foo(); + } + + bar() + { + baz(); + } +} +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 9: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ClassDeclaration', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ClassBody', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'FunctionExpression', + line: 5, + column: 0, + endLine: 5, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 6, + column: 0, + endLine: 6, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 7, + column: 0, + endLine: 7, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ClassBody', + line: 9, + column: 0, + endLine: 9, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'FunctionExpression', + line: 10, + column: 0, + endLine: 10, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 11, + column: 0, + endLine: 11, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 12, + column: 0, + endLine: 12, + endColumn: 4, + suggestions: null + } +] + +9 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +( + class Foo + { + constructor() + { + foo(); + } + + bar() + { + baz(); + } + } +) +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 8: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 4 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ClassBody', + line: 4, + column: 0, + endLine: 4, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 4 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'FunctionExpression', + line: 5, + column: 0, + endLine: 5, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 4 spaces but found 12.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 6, + column: 0, + endLine: 6, + endColumn: 12, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 4 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 7, + column: 0, + endLine: 7, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 4 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ClassBody', + line: 9, + column: 0, + endLine: 9, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 4 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'FunctionExpression', + line: 10, + column: 0, + endLine: 10, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 4 spaces but found 12.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 11, + column: 0, + endLine: 11, + endColumn: 12, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 4 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 12, + column: 0, + endLine: 12, + endColumn: 8, + suggestions: null + } +] + +8 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +switch (foo) +{ + case 1: + bar(); +} +``` + +```json +{ + "options": [ + 4, + { + "SwitchCase": 1 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'SwitchStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'SwitchCase', + line: 4, + column: 0, + endLine: 4, + endColumn: 8, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +foo + .bar(function() { + baz + }) +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'MemberExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + } +] + +3 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +foo + .bar(function() { + baz + }) +``` + +```json +{ + "options": [ + 4, + { + "MemberExpression": 2 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'MemberExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 12.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 12, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 4, + column: 0, + endLine: 4, + endColumn: 8, + suggestions: null + } +] + +3 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +foo + [bar](function() { + baz + }) +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'MemberExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + } +] + +3 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +foo. + bar. + baz +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'MemberExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'MemberExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +foo + .bar(function() { + baz + }) +``` + +```json +{ + "options": [ + 4, + { + "MemberExpression": "off" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +foo + .bar(function() { + baz + }) +``` + +```json +{ + "options": [ + 4, + { + "MemberExpression": "off" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 20.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 20, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 16.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 4, + column: 0, + endLine: 4, + endColumn: 16, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +foo + [bar](function() { + baz + }) +``` + +```json +{ + "options": [ + 4, + { + "MemberExpression": "off" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 20.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 20, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 16.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 4, + column: 0, + endLine: 4, + endColumn: 16, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +foo[ + bar ? baz : + qux +] +``` + +```json +{ + "options": [ + 4, + { + "flatTernaryExpressions": true + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'MemberExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +function foo() { + return foo ? bar : + baz +} +``` + +```json +{ + "options": [ + 4, + { + "flatTernaryExpressions": true + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 8, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +throw foo ? bar : + baz +``` + +```json +{ + "options": [ + 4, + { + "flatTernaryExpressions": true + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +foo( + bar +) ? baz : + qux +``` + +```json +{ + "options": [ + 4, + { + "flatTernaryExpressions": true + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'CallExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +foo + [ + bar + ] + .baz(function() { + quz(); + }) +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 6: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'MemberExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'MemberExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'MemberExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'MemberExpression', + line: 5, + column: 0, + endLine: 5, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 6, + column: 0, + endLine: 6, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 7, + column: 0, + endLine: 7, + endColumn: 4, + suggestions: null + } +] + +6 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +[ + foo +][ + "map"](function() { + qux(); +}) +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrayExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'MemberExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 5, + column: 0, + endLine: 5, + endColumn: 4, + suggestions: null + } +] + +3 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +( + a.b(function() { + c; + }) +) +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 4 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 8, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +( + foo +).bar(function() { + baz(); +}) +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +new Foo( + bar + .baz + .qux +) +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'NewExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'MemberExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'MemberExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 8, + suggestions: null + } +] + +3 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +const foo = a.b(), + longName = + (baz( + 'bar', + 'bar' + )); +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'VariableDeclaration', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 8 spaces but found 12.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'CallExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 12, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 8 spaces but found 12.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'CallExpression', + line: 5, + column: 0, + endLine: 5, + endColumn: 12, + suggestions: null + } +] + +3 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +const foo = a.b(), + longName = + (baz( + 'bar', + 'bar' + )); +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'VariableDeclaration', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 4 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'CallExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 4 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'CallExpression', + line: 5, + column: 0, + endLine: 5, + endColumn: 8, + suggestions: null + } +] + +3 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +const foo = a.b(), + longName = + baz( + 'bar', + 'bar' + ); +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'VariableDeclaration', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 8 spaces but found 12.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'CallExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 12, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 8 spaces but found 12.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'CallExpression', + line: 5, + column: 0, + endLine: 5, + endColumn: 12, + suggestions: null + } +] + +3 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +const foo = a.b(), + longName = + baz( + 'bar', + 'bar' + ); +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'VariableDeclaration', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 4 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'CallExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 4 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'CallExpression', + line: 5, + column: 0, + endLine: 5, + endColumn: 8, + suggestions: null + } +] + +3 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +const foo = a.b(), + longName + = baz( + 'bar', + 'bar' + ); +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 4: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'VariableDeclaration', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 12.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'CallExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 12, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 12.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'CallExpression', + line: 5, + column: 0, + endLine: 5, + endColumn: 12, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'CallExpression', + line: 6, + column: 0, + endLine: 6, + endColumn: 8, + suggestions: null + } +] + +4 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +const foo = a.b(), + longName + = baz( + 'bar', + 'bar' + ); +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 4: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'VariableDeclaration', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'CallExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'CallExpression', + line: 5, + column: 0, + endLine: 5, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'CallExpression', + line: 6, + column: 0, + endLine: 6, + endColumn: 4, + suggestions: null + } +] + +4 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +const foo = a.b(), + longName = + ('fff'); +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'VariableDeclaration', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +const foo = a.b(), + longName = + ('fff'); +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'VariableDeclaration', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +const foo = a.b(), + longName + = ('fff'); +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'VariableDeclaration', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +const foo = a.b(), + longName + = ('fff'); +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'VariableDeclaration', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +const foo = a.b(), + longName = + ( + 'fff' + ); +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'VariableDeclaration', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +const foo = a.b(), + longName = + ( + 'fff' + ); +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'VariableDeclaration', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +const foo = a.b(), + longName + =( + 'fff' + ); +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'VariableDeclaration', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 4 spaces but found 12.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'VariableDeclarator', + line: 4, + column: 0, + endLine: 4, + endColumn: 12, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'VariableDeclarator', + line: 5, + column: 0, + endLine: 5, + endColumn: 8, + suggestions: null + } +] + +3 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +const foo = a.b(), + longName + =( + 'fff' + ); +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'VariableDeclaration', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 4 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'VariableDeclarator', + line: 4, + column: 0, + endLine: 4, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'VariableDeclarator', + line: 5, + column: 0, + endLine: 5, + endColumn: 4, + suggestions: null + } +] + +3 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +interface Foo { + bar: string; + baz: number; +} +``` + +```json +{ + "languageOptions": { + "parser": {} + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### indent > valid + +```js +namespace Foo { + const bar = 3, + baz = 2; + + if (true) { + const bax = 3; + } +} +``` + +```json +{ + "languageOptions": { + "parser": {} + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### indent > valid + +```js +abstract class Foo { + public bar() { + let aaa = 4, + boo; + + if (true) { + boo = 3; + } + + boo = 3 + 2; + } +} +``` + +```json +{ + "languageOptions": { + "parser": {} + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### indent > valid + +```js +function foo() { + function bar() { + abstract class X { + public baz() { + if (true) { + qux(); + } + } + } + } +} +``` + +```json +{ + "languageOptions": { + "parser": {} + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### indent > valid + +```js +namespace Unknown { + function foo() { + function bar() { + abstract class X { + public baz() { + if (true) { + qux(); + } + } + } + } + } +} +``` + +```json +{ + "languageOptions": { + "parser": {} + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### indent > valid + +```js +type httpMethod = 'GET' + | 'POST' + | 'PUT'; +``` + +```json +{ + "options": [ + 2, + { + "VariableDeclarator": 0 + } + ], + "languageOptions": { + "parser": {} + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### indent > valid + +```js +type httpMethod = 'GET' +| 'POST' +| 'PUT'; +``` + +```json +{ + "options": [ + 2, + { + "VariableDeclarator": 1 + } + ], + "languageOptions": { + "parser": {} + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### indent > valid + +```js +foo(`foo + `, { + ok: true +}, +{ + ok: false +}) +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 6, + column: 0, + endLine: 6, + endColumn: 4, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +foo(tag`foo + `, { + ok: true +}, +{ + ok: false +} +) +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 6, + column: 0, + endLine: 6, + endColumn: 4, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +async function test() { + const { + foo, + bar, + } = await doSomethingAsync( + 1, + 2, + 3, + ); +} +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 8: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectPattern', + line: 3, + column: 0, + endLine: 3, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectPattern', + line: 4, + column: 0, + endLine: 4, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectPattern', + line: 5, + column: 0, + endLine: 5, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'CallExpression', + line: 6, + column: 0, + endLine: 6, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'CallExpression', + line: 7, + column: 0, + endLine: 7, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'CallExpression', + line: 8, + column: 0, + endLine: 8, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'CallExpression', + line: 9, + column: 0, + endLine: 9, + endColumn: 4, + suggestions: null + } +] + +8 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +function* test() { + const { + foo, + bar, + } = yield doSomethingAsync( + 1, + 2, + 3, + ); +} +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 8: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectPattern', + line: 3, + column: 0, + endLine: 3, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectPattern', + line: 4, + column: 0, + endLine: 4, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectPattern', + line: 5, + column: 0, + endLine: 5, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'CallExpression', + line: 6, + column: 0, + endLine: 6, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'CallExpression', + line: 7, + column: 0, + endLine: 7, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'CallExpression', + line: 8, + column: 0, + endLine: 8, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'CallExpression', + line: 9, + column: 0, + endLine: 9, + endColumn: 4, + suggestions: null + } +] + +8 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +({ + a: b +} = +foo( + bar +)); +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectPattern', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'CallExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +const { + foo, + bar, +} = typeof foo( + 1, + 2, + 3, +); +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 5: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectPattern', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectPattern', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'CallExpression', + line: 5, + column: 0, + endLine: 5, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'CallExpression', + line: 6, + column: 0, + endLine: 6, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'CallExpression', + line: 7, + column: 0, + endLine: 7, + endColumn: 4, + suggestions: null + } +] + +5 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +const { + foo, + bar, +} = +( + foo +); +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectPattern', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectPattern', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +; +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXOpeningElement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXOpeningElement', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +var foo = ; +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXOpeningElement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXOpeningElement', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +var foo = (); +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXOpeningElement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXOpeningElement', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +var foo = ( + +); +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 4 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXOpeningElement', + line: 3, + column: 0, + endLine: 3, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 4 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXOpeningElement', + line: 4, + column: 0, + endLine: 4, + endColumn: 8, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +< + Foo + a="b" + c="d" +/>; +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXOpeningElement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXOpeningElement', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXOpeningElement', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + } +] + +3 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +; +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXOpeningElement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXOpeningElement', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +< + Foo + a="b" + c="d"/>; +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXOpeningElement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXOpeningElement', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXOpeningElement', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + } +] + +3 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js + + bar +; +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXOpeningElement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js + + bar +; +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXOpeningElement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +< + a + href="foo"> + bar +; +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXOpeningElement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXOpeningElement', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js + + bar +; +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXOpeningElement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXClosingElement', + line: 5, + column: 0, + endLine: 5, + endColumn: 4, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js + + bar +; +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXOpeningElement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +var foo = + baz +; +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXOpeningElement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +var foo = + baz +; +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXOpeningElement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +var foo = < + a + href="bar"> + baz +; +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXOpeningElement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXOpeningElement', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +var foo = + baz +; +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXOpeningElement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXClosingElement', + line: 5, + column: 0, + endLine: 5, + endColumn: 4, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +var foo = + baz + +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXOpeningElement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +var foo = ( + baz +); +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXOpeningElement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +var foo = ( + + baz + +); +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 4 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXOpeningElement', + line: 3, + column: 0, + endLine: 3, + endColumn: 8, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js + + { + } + +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXText', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXEmptyExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js + + { + foo + } + +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXText', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXExpressionContainer', + line: 3, + column: 0, + endLine: 3, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXExpressionContainer', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + } +] + +3 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +function foo() { + return ( + + { + b.forEach(() => { + // comment + a = c + .d() + .e(); + }) + } + + ); +} +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 12: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 4 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ReturnStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 4 spaces but found 12.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXText', + line: 4, + column: 0, + endLine: 4, + endColumn: 12, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 4 spaces but found 16.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXExpressionContainer', + line: 5, + column: 0, + endLine: 5, + endColumn: 16, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 4 spaces but found 20.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 6, + column: 0, + endLine: 6, + endColumn: 20, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 4 spaces but found 20.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 7, + column: 0, + endLine: 7, + endColumn: 20, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 4 spaces but found 24.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'MemberExpression', + line: 8, + column: 0, + endLine: 8, + endColumn: 24, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 4 spaces but found 24.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'MemberExpression', + line: 9, + column: 0, + endLine: 9, + endColumn: 24, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 4 spaces but found 16.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 10, + column: 0, + endLine: 10, + endColumn: 16, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 4 spaces but found 12.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXExpressionContainer', + line: 11, + column: 0, + endLine: 11, + endColumn: 12, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 4 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXText', + line: 12, + column: 0, + endLine: 12, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ReturnStatement', + line: 13, + column: 0, + endLine: 13, + endColumn: 4, + suggestions: null + } +] + +12 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js + + + +``` + +```json +{ + "options": [ + 2 + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXText', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js + +\u0009 + +``` + +```json +{ + "code": "\n\t\n", + "options": [ + "tab" + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 tabs but found 1.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXText', + line: 2, + column: 0, + endLine: 2, + endColumn: 1, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +function App() { + return + + ; +} +``` + +```json +{ + "options": [ + 2 + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXText', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXText', + line: 4, + column: 0, + endLine: 4, + endColumn: 2, + suggestions: null + } +] + +3 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +function App() { + return ( + + ); +} +``` + +```json +{ + "options": [ + 2 + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXText', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXText', + line: 4, + column: 0, + endLine: 4, + endColumn: 2, + suggestions: null + } +] + +3 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +function App() { + return ( + + + + ); +} +``` + +```json +{ + "options": [ + 2 + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 5: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 2 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ReturnStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 2 spaces but found 6.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXText', + line: 4, + column: 0, + endLine: 4, + endColumn: 6, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 2 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXText', + line: 5, + column: 0, + endLine: 5, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ReturnStatement', + line: 6, + column: 0, + endLine: 6, + endColumn: 2, + suggestions: null + } +] + +5 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +it( + ( +
+ +
+ ) +) +``` + +```json +{ + "options": [ + 2 + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 5: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'CallExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 2 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'CallExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 2 spaces but found 6.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXText', + line: 4, + column: 0, + endLine: 4, + endColumn: 6, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 2 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXText', + line: 5, + column: 0, + endLine: 5, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'CallExpression', + line: 6, + column: 0, + endLine: 6, + endColumn: 2, + suggestions: null + } +] + +5 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +it( + (
+ + + +
) +) +``` + +```json +{ + "options": [ + 2 + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 5: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'CallExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXText', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXText', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXText', + line: 5, + column: 0, + endLine: 5, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXText', + line: 6, + column: 0, + endLine: 6, + endColumn: 2, + suggestions: null + } +] + +5 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +( +
+ +
+) +``` + +```json +{ + "options": [ + 2 + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 2 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXText', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +{ + head.title && +

+ {head.title} +

+} +``` + +```json +{ + "options": [ + 2 + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 2 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXText', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +{ + head.title && +

+ {head.title} +

+} +``` + +```json +{ + "options": [ + 2 + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 4 spaces but found 6.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXText', + line: 4, + column: 0, + endLine: 4, + endColumn: 6, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +{ + head.title && ( +

+ {head.title} +

) +} +``` + +```json +{ + "options": [ + 2 + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 4: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 2 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'LogicalExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 2 spaces but found 6.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXText', + line: 4, + column: 0, + endLine: 4, + endColumn: 6, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 2 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXText', + line: 5, + column: 0, + endLine: 5, + endColumn: 4, + suggestions: null + } +] + +4 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +{ + head.title && ( +

+ {head.title} +

+ ) +} +``` + +```json +{ + "options": [ + 2 + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 5: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 2 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'LogicalExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 2 spaces but found 6.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXText', + line: 4, + column: 0, + endLine: 4, + endColumn: 6, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 2 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXText', + line: 5, + column: 0, + endLine: 5, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'LogicalExpression', + line: 6, + column: 0, + endLine: 6, + endColumn: 2, + suggestions: null + } +] + +5 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +[ +
, +
+] +``` + +```json +{ + "options": [ + 2 + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrayExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrayExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 2, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +
+ { + [ + , + + ] + } +
+``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 6: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXText', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXExpressionContainer', + line: 3, + column: 0, + endLine: 3, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 12.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrayExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 12, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 12.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrayExpression', + line: 5, + column: 0, + endLine: 5, + endColumn: 12, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrayExpression', + line: 6, + column: 0, + endLine: 6, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXExpressionContainer', + line: 7, + column: 0, + endLine: 7, + endColumn: 4, + suggestions: null + } +] + +6 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +
+ {foo && + [ + , + + ] + } +
+``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 4: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXText', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 8 spaces but found 12.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrayExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 12, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 8 spaces but found 12.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrayExpression', + line: 5, + column: 0, + endLine: 5, + endColumn: 12, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXExpressionContainer', + line: 7, + column: 0, + endLine: 7, + endColumn: 4, + suggestions: null + } +] + +4 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +foo ? + : + +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +foo ? + + : +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +foo ? + + : + +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + } +] + +3 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +
+ {!foo ? + + : + + } +
+``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 9: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXText', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 12.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXOpeningElement', + line: 4, + column: 0, + endLine: 4, + endColumn: 12, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXOpeningElement', + line: 5, + column: 0, + endLine: 5, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 6, + column: 0, + endLine: 6, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 7, + column: 0, + endLine: 7, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 12.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXOpeningElement', + line: 8, + column: 0, + endLine: 8, + endColumn: 12, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXOpeningElement', + line: 9, + column: 0, + endLine: 9, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXExpressionContainer', + line: 10, + column: 0, + endLine: 10, + endColumn: 4, + suggestions: null + } +] + +9 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js + + {condition ? + : + + } + +``` + +```json +{ + "options": [ + 2 + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 6: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXText', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 6.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXOpeningElement', + line: 4, + column: 0, + endLine: 4, + endColumn: 6, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXOpeningElement', + line: 5, + column: 0, + endLine: 5, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 6, + column: 0, + endLine: 6, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXExpressionContainer', + line: 7, + column: 0, + endLine: 7, + endColumn: 2, + suggestions: null + } +] + +6 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js + + {condition ? + : + + } + +``` + +```json +{ + "options": [ + 2 + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 6: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXText', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 6.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXOpeningElement', + line: 4, + column: 0, + endLine: 4, + endColumn: 6, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXOpeningElement', + line: 5, + column: 0, + endLine: 5, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 6, + column: 0, + endLine: 6, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXExpressionContainer', + line: 7, + column: 0, + endLine: 7, + endColumn: 2, + suggestions: null + } +] + +6 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +function foo() { + + {condition ? + : + + } + +} +``` + +```json +{ + "options": [ + 2 + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 8: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXText', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 6.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 6, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXOpeningElement', + line: 5, + column: 0, + endLine: 5, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 6.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXOpeningElement', + line: 6, + column: 0, + endLine: 6, + endColumn: 6, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 6.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 7, + column: 0, + endLine: 7, + endColumn: 6, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXExpressionContainer', + line: 8, + column: 0, + endLine: 8, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXText', + line: 9, + column: 0, + endLine: 9, + endColumn: 2, + suggestions: null + } +] + +8 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js + +``` + +```json +{ + "options": [ + 2 + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXOpeningElement', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js + +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXOpeningElement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js + +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXOpeningElement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js + +``` + +```json +{ + "options": [ + 2 + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXOpeningElement', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 4, + column: 0, + endLine: 4, + endColumn: 2, + suggestions: null + } +] + +3 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js + +``` + +```json +{ + "options": [ + 2 + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +var x = function() { + return +} +``` + +```json +{ + "options": [ + 2 + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 5: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXOpeningElement', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 6.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 4, + column: 0, + endLine: 4, + endColumn: 6, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 5, + column: 0, + endLine: 5, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXOpeningElement', + line: 6, + column: 0, + endLine: 6, + endColumn: 2, + suggestions: null + } +] + +5 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +var x = +``` + +```json +{ + "options": [ + 2 + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXOpeningElement', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 4, + column: 0, + endLine: 4, + endColumn: 2, + suggestions: null + } +] + +3 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js + + + +``` + +```json +{ + "options": [ + 2 + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 6: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXOpeningElement', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXText', + line: 4, + column: 0, + endLine: 4, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXOpeningElement', + line: 5, + column: 0, + endLine: 5, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 6.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 6, + column: 0, + endLine: 6, + endColumn: 6, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 7, + column: 0, + endLine: 7, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXOpeningElement', + line: 8, + column: 0, + endLine: 8, + endColumn: 2, + suggestions: null + } +] + +6 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js + + {baz && } + +``` + +```json +{ + "options": [ + 2 + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 6: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXOpeningElement', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXText', + line: 4, + column: 0, + endLine: 4, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXOpeningElement', + line: 5, + column: 0, + endLine: 5, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 6.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 6, + column: 0, + endLine: 6, + endColumn: 6, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 7, + column: 0, + endLine: 7, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXOpeningElement', + line: 8, + column: 0, + endLine: 8, + endColumn: 2, + suggestions: null + } +] + +6 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js + +``` + +```json +{ + "code": "", + "options": [ + "tab" + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 tabs but found 1.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXOpeningElement', + line: 2, + column: 0, + endLine: 2, + endColumn: 1, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js + +``` + +```json +{ + "code": "", + "options": [ + "tab" + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 tabs but found 1.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXOpeningElement', + line: 2, + column: 0, + endLine: 2, + endColumn: 1, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js + +``` + +```json +{ + "code": "", + "options": [ + "tab" + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 tabs but found 1.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 1, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +var x = +``` + +```json +{ + "code": "var x = ", + "options": [ + "tab" + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 tabs but found 1.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXOpeningElement', + line: 2, + column: 0, + endLine: 2, + endColumn: 1, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 tabs but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 tabs but found 1.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 4, + column: 0, + endLine: 4, + endColumn: 1, + suggestions: null + } +] + +3 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js + +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXOpeningElement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +
+ unrelated{ + foo + } +
+``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXExpressionContainer', + line: 3, + column: 0, + endLine: 3, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXExpressionContainer', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +
unrelated{ + foo +} +
+``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXExpressionContainer', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +< + foo + .bar + .baz +> + foo + +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 6: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXOpeningElement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXMemberExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXMemberExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXClosingElement', + line: 8, + column: 0, + endLine: 8, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXMemberExpression', + line: 9, + column: 0, + endLine: 9, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXMemberExpression', + line: 10, + column: 0, + endLine: 10, + endColumn: 8, + suggestions: null + } +] + +6 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +< + input + type= + "number" +/> +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXOpeningElement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXOpeningElement', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXAttribute', + line: 4, + column: 0, + endLine: 4, + endColumn: 8, + suggestions: null + } +] + +3 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +< + input + type= + {'number'} +/> +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXOpeningElement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXOpeningElement', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXAttribute', + line: 4, + column: 0, + endLine: 4, + endColumn: 8, + suggestions: null + } +] + +3 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +< + input + type + ="number" +/> +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXOpeningElement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXOpeningElement', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXAttribute', + line: 4, + column: 0, + endLine: 4, + endColumn: 8, + suggestions: null + } +] + +3 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +
+ { + /* foo */ + } +
+``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXText', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXEmptyExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXEmptyExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + } +] + +3 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +<> + + +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXText', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +< +> + + +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXText', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +<> + +< +/> +``` + +```json +{} +``` + +TSError: Identifier expected. + at B (apps/oxlint/dist/ts_eslint.cjs) + at d (apps/oxlint/dist/ts_eslint.cjs) + at a (apps/oxlint/dist/ts_eslint.cjs) + at C (apps/oxlint/dist/ts_eslint.cjs) + + +#### indent > valid + +```js +<> + + +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXText', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +< +> + + +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXText', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +< +> + +< +/> +``` + +```json +{} +``` + +TSError: Identifier expected. + at B (apps/oxlint/dist/ts_eslint.cjs) + at d (apps/oxlint/dist/ts_eslint.cjs) + at a (apps/oxlint/dist/ts_eslint.cjs) + at C (apps/oxlint/dist/ts_eslint.cjs) + + +#### indent > valid + +```js +< // Comment +> + + +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXText', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +< + // Comment +> + + +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXText', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +< +// Comment +> + + +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXText', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +<> + +< // Comment +/> +``` + +```json +{} +``` + +TSError: Identifier expected. + at B (apps/oxlint/dist/ts_eslint.cjs) + at d (apps/oxlint/dist/ts_eslint.cjs) + at a (apps/oxlint/dist/ts_eslint.cjs) + at C (apps/oxlint/dist/ts_eslint.cjs) + + +#### indent > valid + +```js +<> + +< + // Comment +/> +``` + +```json +{} +``` + +TSError: Identifier expected. + at B (apps/oxlint/dist/ts_eslint.cjs) + at d (apps/oxlint/dist/ts_eslint.cjs) + at a (apps/oxlint/dist/ts_eslint.cjs) + at C (apps/oxlint/dist/ts_eslint.cjs) + + +#### indent > valid + +```js +<> + +< +// Comment +/> +``` + +```json +{} +``` + +TSError: Identifier expected. + at B (apps/oxlint/dist/ts_eslint.cjs) + at d (apps/oxlint/dist/ts_eslint.cjs) + at a (apps/oxlint/dist/ts_eslint.cjs) + at C (apps/oxlint/dist/ts_eslint.cjs) + + +#### indent > valid + +```js +<> + + +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXText', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +<> + + +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXText', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +<> + + +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXText', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +< /* Comment */ +> + + +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXText', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +< + /* Comment */ +> + + +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXText', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +< +/* Comment */ +> + + +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXText', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +< + /* + * Comment + */ +> + + +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXText', + line: 6, + column: 0, + endLine: 6, + endColumn: 4, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +< +/* + * Comment + */ +> + + +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXText', + line: 6, + column: 0, + endLine: 6, + endColumn: 4, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +<> + +< /* Comment */ +/> +``` + +```json +{} +``` + +TSError: Identifier expected. + at B (apps/oxlint/dist/ts_eslint.cjs) + at d (apps/oxlint/dist/ts_eslint.cjs) + at a (apps/oxlint/dist/ts_eslint.cjs) + at C (apps/oxlint/dist/ts_eslint.cjs) + + +#### indent > valid + +```js +<> + +< + /* Comment */ /> +``` + +```json +{} +``` + +TSError: Identifier expected. + at B (apps/oxlint/dist/ts_eslint.cjs) + at d (apps/oxlint/dist/ts_eslint.cjs) + at a (apps/oxlint/dist/ts_eslint.cjs) + at C (apps/oxlint/dist/ts_eslint.cjs) + + +#### indent > valid + +```js +<> + +< +/* Comment */ /> +``` + +```json +{} +``` + +TSError: Identifier expected. + at B (apps/oxlint/dist/ts_eslint.cjs) + at d (apps/oxlint/dist/ts_eslint.cjs) + at a (apps/oxlint/dist/ts_eslint.cjs) + at C (apps/oxlint/dist/ts_eslint.cjs) + + +#### indent > valid + +```js +<> + +< + /* Comment */ +/> +``` + +```json +{} +``` + +TSError: Identifier expected. + at B (apps/oxlint/dist/ts_eslint.cjs) + at d (apps/oxlint/dist/ts_eslint.cjs) + at a (apps/oxlint/dist/ts_eslint.cjs) + at C (apps/oxlint/dist/ts_eslint.cjs) + + +#### indent > valid + +```js +<> + +< +/* Comment */ +/> +``` + +```json +{} +``` + +TSError: Identifier expected. + at B (apps/oxlint/dist/ts_eslint.cjs) + at d (apps/oxlint/dist/ts_eslint.cjs) + at a (apps/oxlint/dist/ts_eslint.cjs) + at C (apps/oxlint/dist/ts_eslint.cjs) + + +#### indent > valid + +```js +<> + + +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXText', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +<> + + +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXText', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +<> + + +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXText', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +<> + + +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXText', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +<> + + +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXText', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +
+ { + ( + 1 + ) + } +
+``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 5: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXText', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXExpressionContainer', + line: 3, + column: 0, + endLine: 3, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 4 spaces but found 12.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXExpressionContainer', + line: 4, + column: 0, + endLine: 4, + endColumn: 12, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXExpressionContainer', + line: 5, + column: 0, + endLine: 5, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXExpressionContainer', + line: 6, + column: 0, + endLine: 6, + endColumn: 4, + suggestions: null + } +] + +5 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +function A() { + return ( +
+ { + b && ( +
+
+ ) + } +
+ ); +} +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 10: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 4 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ReturnStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 4 spaces but found 12.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXText', + line: 4, + column: 0, + endLine: 4, + endColumn: 12, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 4 spaces but found 16.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXExpressionContainer', + line: 5, + column: 0, + endLine: 5, + endColumn: 16, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 8 spaces but found 20.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'LogicalExpression', + line: 6, + column: 0, + endLine: 6, + endColumn: 20, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 8 spaces but found 20.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXText', + line: 7, + column: 0, + endLine: 7, + endColumn: 20, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 4 spaces but found 16.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'LogicalExpression', + line: 8, + column: 0, + endLine: 8, + endColumn: 16, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 4 spaces but found 12.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXExpressionContainer', + line: 9, + column: 0, + endLine: 9, + endColumn: 12, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 4 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXText', + line: 10, + column: 0, + endLine: 10, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ReturnStatement', + line: 11, + column: 0, + endLine: 11, + endColumn: 4, + suggestions: null + } +] + +10 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +
foo +
bar
+
+``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXText', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +Foo bar  +
baz qux. + +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXText', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +
+``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXOpeningElement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +
+``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXOpeningElement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXSpreadAttribute', + line: 3, + column: 0, + endLine: 3, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXSpreadAttribute', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + } +] + +3 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +a(b + , c +) +``` + +```json +{ + "options": [ + 2, + { + "CallExpression": { + "arguments": "off" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'CallExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +a( + new B({ + c, + }) +); +``` + +```json +{ + "options": [ + 2, + { + "CallExpression": { + "arguments": "off" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 2 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +class Foo { +foo() { + bar(); +} +} +``` + +```json +{ + "options": [ + 4, + { + "ignoredNodes": [ + "ClassBody" + ] + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +(function($) { +$(function() { + foo; +}); +}()) +``` + +```json +{ + "options": [ + 4, + { + "ignoredNodes": [ + "ExpressionStatement > CallExpression > FunctionExpression.callee > BlockStatement" + ] + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +var a = 0, b = 0, c = 0; +export default foo( + a, + b, { + c + } +) +``` + +```json +{ + "options": [ + 4, + { + "ignoredNodes": [ + "ExportDefaultDeclaration > CallExpression > ObjectExpression" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'CallExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'CallExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +{ +\u0009var x = 1, +\u0009 y = 2; +} +``` + +```json +{ + "code": "{\n\tvar x = 1,\n\t y = 2;\n}", + "options": [ + "tab" + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 tabs but found 1.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 1, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +if (foo) { + doSomething(); + +// Intentionally unindented comment + doSomethingElse(); +} +``` + +```json +{ + "options": [ + 4, + { + "ignoreComments": true + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 5, + column: 0, + endLine: 5, + endColumn: 4, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +if (foo) { + doSomething(); + +/* Intentionally unindented comment */ + doSomethingElse(); +} +``` + +```json +{ + "options": [ + 4, + { + "ignoreComments": true + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 5, + column: 0, + endLine: 5, + endColumn: 4, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +const obj = { + foo () { + return condition ? // comment + 1 : + 2 + } +} +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 5: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 12.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 12, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 12.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 5, + column: 0, + endLine: 5, + endColumn: 12, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 6, + column: 0, + endLine: 6, + endColumn: 4, + suggestions: null + } +] + +5 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +if (foo) { +// Comment can align with code immediately above even if "incorrect" alignment + doSomething(); +} +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +if (foo) { + doSomething(); +// Comment can align with code immediately below even if "incorrect" alignment +} +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +if (foo) { + // Comment can be in correct alignment even if not aligned with code above/below +} +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +if (foo) { + + // Comment can be in correct alignment even if gaps between (and not aligned with) code above/below + +} +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +[{ + foo +}, + +// Comment between nodes + +{ + bar +}]; +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 8, + column: 0, + endLine: 8, + endColumn: 4, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +[{ + foo +}, + +// Comment between nodes + +{ // comment + bar +}]; +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 8, + column: 0, + endLine: 8, + endColumn: 4, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +let foo + + /* comment */; + +(async () => {})() +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'VariableDeclaration', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +let foo + /* comment */; + +(async () => {})() +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'VariableDeclaration', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +let foo + + /* comment */; +(async () => {})() +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'VariableDeclaration', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +let foo + /* comment */; +(async () => {})() +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'VariableDeclaration', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +{ + let foo + + // comment + + ;(async () => {})() +} +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'VariableDeclaration', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +{ + let foo + // comment + ;(async () => {})() +} +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'VariableDeclaration', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +{ + // comment + + ;(async () => {})() +} +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +{ + // comment + ;(async () => {})() +} +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +const foo = 1 +const bar = foo + + /* comment */; + +[1, 2, 3].forEach(() => {}) +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'VariableDeclaration', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +const foo = 1 +const bar = foo + /* comment */; + +[1, 2, 3].forEach(() => {}) +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'VariableDeclaration', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +const foo = 1 +const bar = foo + + /* comment */; +[1, 2, 3].forEach(() => {}) +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'VariableDeclaration', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +const foo = 1 +const bar = foo + /* comment */; +[1, 2, 3].forEach(() => {}) +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'VariableDeclaration', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +{ + const foo = 1 + const bar = foo + + /* comment */ + + ;[1, 2, 3].forEach(() => {}) +} +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'VariableDeclaration', + line: 5, + column: 0, + endLine: 5, + endColumn: 4, + suggestions: null + } +] + +3 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +{ + const foo = 1 + const bar = foo + /* comment */ + ;[1, 2, 3].forEach(() => {}) +} +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'VariableDeclaration', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + } +] + +3 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +{ + /* comment */ + + ;[1, 2, 3].forEach(() => {}) +} +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +{ + /* comment */ + ;[1, 2, 3].forEach(() => {}) +} +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +import( + // before + source + // after +) +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2020 + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ImportExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ImportExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ImportExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + } +] + +3 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +foo(() => { + tag` + multiline + template + literal + `(() => { + bar(); + }); +}); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2015 + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 7, + column: 0, + endLine: 7, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 8, + column: 0, + endLine: 8, + endColumn: 4, + suggestions: null + } +] + +3 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +{ + tag` + multiline + template + ${a} ${b} + literal + `(() => { + bar(); + }); +} +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2015 + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 8, + column: 0, + endLine: 8, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 9, + column: 0, + endLine: 9, + endColumn: 4, + suggestions: null + } +] + +3 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +foo(() => { + tagOne` + multiline + template + literal + ${a} ${b} + `(() => { + tagTwo` + multiline + template + literal + `(() => { + bar(); + }); + + baz(); + }); +}); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2015 + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 6: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 8, + column: 0, + endLine: 8, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 12.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 13, + column: 0, + endLine: 13, + endColumn: 12, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 14, + column: 0, + endLine: 14, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 16, + column: 0, + endLine: 16, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 17, + column: 0, + endLine: 17, + endColumn: 4, + suggestions: null + } +] + +6 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +{ + tagOne` + ${a} ${b} + multiline + template + literal + `(() => { + tagTwo` + multiline + template + literal + `(() => { + bar(); + }); + + baz(); + }); +}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2015 + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 6: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 8, + column: 0, + endLine: 8, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 12.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 13, + column: 0, + endLine: 13, + endColumn: 12, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 14, + column: 0, + endLine: 14, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 16, + column: 0, + endLine: 16, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 17, + column: 0, + endLine: 17, + endColumn: 4, + suggestions: null + } +] + +6 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +tagOne`multiline + ${a} ${b} + template + literal + `(() => { + foo(); + + tagTwo`multiline + template + literal + `({ + bar: 1, + baz: 2 + }); +}); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2015 + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 5: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 6, + column: 0, + endLine: 6, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 8, + column: 0, + endLine: 8, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 12, + column: 0, + endLine: 12, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 13, + column: 0, + endLine: 13, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 14, + column: 0, + endLine: 14, + endColumn: 4, + suggestions: null + } +] + +5 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +tagOne`multiline + template + literal + ${a} ${b}`({ + foo: 1, + bar: tagTwo`multiline + template + literal`(() => { + + baz(); + }) +}); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2015 + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 4: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 5, + column: 0, + endLine: 5, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 6, + column: 0, + endLine: 6, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 10, + column: 0, + endLine: 10, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 11, + column: 0, + endLine: 11, + endColumn: 4, + suggestions: null + } +] + +4 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +foo.bar` template literal `(() => { + baz(); +}) +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2015 + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +foo.bar.baz` template literal `(() => { + baz(); +}) +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2015 + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +foo + .bar` template + literal `(() => { + baz(); + }) +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2015 + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'MemberExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 4, + column: 0, + endLine: 4, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 5, + column: 0, + endLine: 5, + endColumn: 4, + suggestions: null + } +] + +3 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +foo + .bar + .baz` template + literal `(() => { + baz(); + }) +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2015 + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 4: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'MemberExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'MemberExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 5, + column: 0, + endLine: 5, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 6, + column: 0, + endLine: 6, + endColumn: 4, + suggestions: null + } +] + +4 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +foo.bar` + ${a} ${b} + `(() => { + baz(); +}) +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2015 + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +foo.bar1.bar2` + ${a} ${b} + `(() => { + baz(); +}) +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2015 + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +foo + .bar1 + .bar2` + ${a} ${b} + `(() => { + baz(); + }) +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2015 + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 4: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'MemberExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'MemberExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 6, + column: 0, + endLine: 6, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 7, + column: 0, + endLine: 7, + endColumn: 4, + suggestions: null + } +] + +4 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +foo + .bar` + ${a} ${b} + `(() => { + baz(); + }) +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2015 + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'MemberExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 5, + column: 0, + endLine: 5, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 6, + column: 0, + endLine: 6, + endColumn: 4, + suggestions: null + } +] + +3 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +foo +.test` + ${a} ${b} + `(() => { + baz(); +}) +``` + +```json +{ + "options": [ + 4, + { + "MemberExpression": 0 + } + ], + "languageOptions": { + "ecmaVersion": 2015 + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 5, + column: 0, + endLine: 5, + endColumn: 4, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +foo + .test` + ${a} ${b} + `(() => { + baz(); + }) +``` + +```json +{ + "options": [ + 4, + { + "MemberExpression": 2 + } + ], + "languageOptions": { + "ecmaVersion": 2015 + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'MemberExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 12.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 5, + column: 0, + endLine: 5, + endColumn: 12, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 6, + column: 0, + endLine: 6, + endColumn: 8, + suggestions: null + } +] + +3 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +const foo = async (arg1, + arg2) => +{ + return arg1 + arg2; +} +``` + +```json +{ + "options": [ + 2, + { + "FunctionDeclaration": { + "parameters": "first" + }, + "FunctionExpression": { + "parameters": "first" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 4, + column: 0, + endLine: 4, + endColumn: 2, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +const foo = async /* some comments */(arg1, + arg2) => +{ + return arg1 + arg2; +} +``` + +```json +{ + "options": [ + 2, + { + "FunctionDeclaration": { + "parameters": "first" + }, + "FunctionExpression": { + "parameters": "first" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 4, + column: 0, + endLine: 4, + endColumn: 2, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +const foo = (arg1, + arg2) => async (arr1, + arr2) => +{ + return arg1 + arg2; +} +``` + +```json +{ + "options": [ + 2, + { + "FunctionDeclaration": { + "parameters": "first" + }, + "FunctionExpression": { + "parameters": "first" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 5, + column: 0, + endLine: 5, + endColumn: 2, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +const foo = async (arg1, + arg2) => +{ + return arg1 + arg2; +} +``` + +```json +{ + "options": [ + 2 + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrowFunctionExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 4, + column: 0, + endLine: 4, + endColumn: 2, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +const foo = async /*comments*/(arg1, + arg2) => +{ + return arg1 + arg2; +} +``` + +```json +{ + "options": [ + 2 + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrowFunctionExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 4, + column: 0, + endLine: 4, + endColumn: 2, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +const foo = async (arg1, + arg2) => +{ + return arg1 + arg2; +} +``` + +```json +{ + "options": [ + 2, + { + "FunctionDeclaration": { + "parameters": 4 + }, + "FunctionExpression": { + "parameters": 4 + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrowFunctionExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 4, + column: 0, + endLine: 4, + endColumn: 2, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +const foo = (arg1, + arg2) => +{ + return arg1 + arg2; +} +``` + +```json +{ + "options": [ + 2, + { + "FunctionDeclaration": { + "parameters": 4 + }, + "FunctionExpression": { + "parameters": 4 + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrowFunctionExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 4, + column: 0, + endLine: 4, + endColumn: 2, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +class C { + static { + foo(); + bar(); + } +} +``` + +```json +{ + "options": [ + 2 + ], + "languageOptions": { + "ecmaVersion": 2022 + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 4: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ClassBody', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'StaticBlock', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'StaticBlock', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'StaticBlock', + line: 5, + column: 0, + endLine: 5, + endColumn: 2, + suggestions: null + } +] + +4 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +class C { + static { + foo(); + bar(); + } +} +``` + +```json +{ + "options": [ + 4 + ], + "languageOptions": { + "ecmaVersion": 2022 + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 4: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ClassBody', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'StaticBlock', + line: 3, + column: 0, + endLine: 3, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'StaticBlock', + line: 4, + column: 0, + endLine: 4, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'StaticBlock', + line: 5, + column: 0, + endLine: 5, + endColumn: 4, + suggestions: null + } +] + +4 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +class C { + static { + foo(); + bar(); + } +} +``` + +```json +{ + "options": [ + 4, + { + "StaticBlock": { + "body": 2 + } + } + ], + "languageOptions": { + "ecmaVersion": 2022 + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 4: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ClassBody', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 12.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'StaticBlock', + line: 3, + column: 0, + endLine: 3, + endColumn: 12, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 12.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'StaticBlock', + line: 4, + column: 0, + endLine: 4, + endColumn: 12, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'StaticBlock', + line: 5, + column: 0, + endLine: 5, + endColumn: 4, + suggestions: null + } +] + +4 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +class C { + static { + foo(); + bar(); + } +} +``` + +```json +{ + "options": [ + 4, + { + "StaticBlock": { + "body": 0 + } + } + ], + "languageOptions": { + "ecmaVersion": 2022 + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 4: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ClassBody', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'StaticBlock', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'StaticBlock', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'StaticBlock', + line: 5, + column: 0, + endLine: 5, + endColumn: 4, + suggestions: null + } +] + +4 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +class C { +\u0009static { +\u0009\u0009foo(); +\u0009\u0009bar(); +\u0009} +} +``` + +```json +{ + "code": "class C {\n\tstatic {\n\t\tfoo();\n\t\tbar();\n\t}\n}", + "options": [ + "tab" + ], + "languageOptions": { + "ecmaVersion": 2022 + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 4: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 tabs but found 1.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ClassBody', + line: 2, + column: 0, + endLine: 2, + endColumn: 1, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 tabs but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'StaticBlock', + line: 3, + column: 0, + endLine: 3, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 tabs but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'StaticBlock', + line: 4, + column: 0, + endLine: 4, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 tabs but found 1.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'StaticBlock', + line: 5, + column: 0, + endLine: 5, + endColumn: 1, + suggestions: null + } +] + +4 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +class C { +\u0009static { +\u0009\u0009\u0009foo(); +\u0009\u0009\u0009bar(); +\u0009} +} +``` + +```json +{ + "code": "class C {\n\tstatic {\n\t\t\tfoo();\n\t\t\tbar();\n\t}\n}", + "options": [ + "tab", + { + "StaticBlock": { + "body": 2 + } + } + ], + "languageOptions": { + "ecmaVersion": 2022 + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 4: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 tabs but found 1.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ClassBody', + line: 2, + column: 0, + endLine: 2, + endColumn: 1, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 tabs but found 3.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'StaticBlock', + line: 3, + column: 0, + endLine: 3, + endColumn: 3, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 tabs but found 3.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'StaticBlock', + line: 4, + column: 0, + endLine: 4, + endColumn: 3, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 tabs but found 1.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'StaticBlock', + line: 5, + column: 0, + endLine: 5, + endColumn: 1, + suggestions: null + } +] + +4 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +class C { + static + { + foo(); + bar(); + } +} +``` + +```json +{ + "options": [ + 4 + ], + "languageOptions": { + "ecmaVersion": 2022 + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 5: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ClassBody', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'StaticBlock', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'StaticBlock', + line: 4, + column: 0, + endLine: 4, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'StaticBlock', + line: 5, + column: 0, + endLine: 5, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'StaticBlock', + line: 6, + column: 0, + endLine: 6, + endColumn: 4, + suggestions: null + } +] + +5 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +class C { + static { + var x, + y; + } +} +``` + +```json +{ + "options": [ + 4 + ], + "languageOptions": { + "ecmaVersion": 2022 + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 4: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ClassBody', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'StaticBlock', + line: 3, + column: 0, + endLine: 3, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 12.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'VariableDeclaration', + line: 4, + column: 0, + endLine: 4, + endColumn: 12, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'StaticBlock', + line: 5, + column: 0, + endLine: 5, + endColumn: 4, + suggestions: null + } +] + +4 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +class C { + static + { + var x, + y; + } +} +``` + +```json +{ + "options": [ + 4 + ], + "languageOptions": { + "ecmaVersion": 2022 + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 5: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ClassBody', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'StaticBlock', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'StaticBlock', + line: 4, + column: 0, + endLine: 4, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 12.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'VariableDeclaration', + line: 5, + column: 0, + endLine: 5, + endColumn: 12, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'StaticBlock', + line: 6, + column: 0, + endLine: 6, + endColumn: 4, + suggestions: null + } +] + +5 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +class C { + static { + if (foo) { + bar; + } + } +} +``` + +```json +{ + "options": [ + 4 + ], + "languageOptions": { + "ecmaVersion": 2022 + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 5: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ClassBody', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'StaticBlock', + line: 3, + column: 0, + endLine: 3, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 12.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 4, + column: 0, + endLine: 4, + endColumn: 12, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 5, + column: 0, + endLine: 5, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'StaticBlock', + line: 6, + column: 0, + endLine: 6, + endColumn: 4, + suggestions: null + } +] + +5 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +class C { + static { + { + bar; + } + } +} +``` + +```json +{ + "options": [ + 4 + ], + "languageOptions": { + "ecmaVersion": 2022 + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 5: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ClassBody', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'StaticBlock', + line: 3, + column: 0, + endLine: 3, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 12.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 4, + column: 0, + endLine: 4, + endColumn: 12, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 5, + column: 0, + endLine: 5, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'StaticBlock', + line: 6, + column: 0, + endLine: 6, + endColumn: 4, + suggestions: null + } +] + +5 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +class C { + static {} + + static { + } + + static + { + } +} +``` + +```json +{ + "options": [ + 4 + ], + "languageOptions": { + "ecmaVersion": 2022 + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 6: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ClassBody', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ClassBody', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'StaticBlock', + line: 5, + column: 0, + endLine: 5, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ClassBody', + line: 7, + column: 0, + endLine: 7, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'StaticBlock', + line: 8, + column: 0, + endLine: 8, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'StaticBlock', + line: 9, + column: 0, + endLine: 9, + endColumn: 4, + suggestions: null + } +] + +6 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +class C { + + static { + foo; + } + + static { + bar; + } + +} +``` + +```json +{ + "options": [ + 4 + ], + "languageOptions": { + "ecmaVersion": 2022 + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 6: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ClassBody', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'StaticBlock', + line: 4, + column: 0, + endLine: 4, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'StaticBlock', + line: 5, + column: 0, + endLine: 5, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ClassBody', + line: 7, + column: 0, + endLine: 7, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'StaticBlock', + line: 8, + column: 0, + endLine: 8, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'StaticBlock', + line: 9, + column: 0, + endLine: 9, + endColumn: 4, + suggestions: null + } +] + +6 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +class C { + + x = 1; + + static { + foo; + } + + y = 2; + +} +``` + +```json +{ + "options": [ + 4 + ], + "languageOptions": { + "ecmaVersion": 2022 + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 5: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ClassBody', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ClassBody', + line: 5, + column: 0, + endLine: 5, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'StaticBlock', + line: 6, + column: 0, + endLine: 6, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'StaticBlock', + line: 7, + column: 0, + endLine: 7, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ClassBody', + line: 9, + column: 0, + endLine: 9, + endColumn: 4, + suggestions: null + } +] + +5 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +class C { + + method1(param) { + foo; + } + + static { + bar; + } + + method2(param) { + foo; + } + +} +``` + +```json +{ + "options": [ + 4 + ], + "languageOptions": { + "ecmaVersion": 2022 + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 9: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ClassBody', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 4, + column: 0, + endLine: 4, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 5, + column: 0, + endLine: 5, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ClassBody', + line: 7, + column: 0, + endLine: 7, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'StaticBlock', + line: 8, + column: 0, + endLine: 8, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'StaticBlock', + line: 9, + column: 0, + endLine: 9, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ClassBody', + line: 11, + column: 0, + endLine: 11, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 12, + column: 0, + endLine: 12, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 13, + column: 0, + endLine: 13, + endColumn: 4, + suggestions: null + } +] + +9 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +function f() { + class C { + static { + foo(); + bar(); + } + } +} +``` + +```json +{ + "options": [ + 4 + ], + "languageOptions": { + "ecmaVersion": 2022 + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 6: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ClassBody', + line: 3, + column: 0, + endLine: 3, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 12.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'StaticBlock', + line: 4, + column: 0, + endLine: 4, + endColumn: 12, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 12.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'StaticBlock', + line: 5, + column: 0, + endLine: 5, + endColumn: 12, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'StaticBlock', + line: 6, + column: 0, + endLine: 6, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ClassBody', + line: 7, + column: 0, + endLine: 7, + endColumn: 4, + suggestions: null + } +] + +6 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +class C { + method() { + foo; + } + static { + bar; + } +} +``` + +```json +{ + "options": [ + 4, + { + "FunctionExpression": { + "body": 2 + }, + "StaticBlock": { + "body": 2 + } + } + ], + "languageOptions": { + "ecmaVersion": 2022 + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 6: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ClassBody', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 12.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 12, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ClassBody', + line: 5, + column: 0, + endLine: 5, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 12.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'StaticBlock', + line: 6, + column: 0, + endLine: 6, + endColumn: 12, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'StaticBlock', + line: 7, + column: 0, + endLine: 7, + endColumn: 4, + suggestions: null + } +] + +6 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +if (2 > 1) +\u0009console.log('a') +;[1, 2, 3].forEach(x=>console.log(x)) +``` + +```json +{ + "code": "if (2 > 1)\n\tconsole.log('a')\n;[1, 2, 3].forEach(x=>console.log(x))", + "options": [ + "tab" + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 tabs but found 1.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 1, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +if (2 > 1) + console.log('a') +;[1, 2, 3].forEach(x=>console.log(x)) +``` + +```json +{ + "options": [ + 4 + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +if (foo) + bar(); +baz(); +``` + +```json +{ + "options": [ + 4 + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +if (foo) + bar() +; baz() +``` + +```json +{ + "options": [ + 4 + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +if (foo) + bar() +;baz() +qux() +``` + +```json +{ + "options": [ + 4 + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +if (foo) + bar() +;else + baz() +``` + +```json +{ + "options": [ + 4 + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +if (foo) + bar() +else + baz() +;qux() +``` + +```json +{ + "options": [ + 4 + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +if (foo) + if (bar) + baz() +;qux() +``` + +```json +{ + "options": [ + 4 + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 8, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +if (foo) + bar() +else if (baz) + qux() +;quux() +``` + +```json +{ + "options": [ + 4 + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +if (foo) + if (bar) + baz() + else + qux() +;quux() +``` + +```json +{ + "options": [ + 4 + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 4: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 5, + column: 0, + endLine: 5, + endColumn: 8, + suggestions: null + } +] + +4 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +if (foo) + bar() + ; +baz() +``` + +```json +{ + "options": [ + 4 + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ExpressionStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +if (foo) + ; +baz() +``` + +```json +{ + "options": [ + 4 + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +if (foo); +else + baz() +``` + +```json +{ + "options": [ + 4 + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +if (foo) + ; +else + baz() +``` + +```json +{ + "options": [ + 4 + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +if (foo) +;else + baz() +``` + +```json +{ + "options": [ + 4 + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +do + foo(); +while (bar) +``` + +```json +{ + "options": [ + 4 + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'DoWhileStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +do + foo() +;while (bar) +``` + +```json +{ + "options": [ + 4 + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'DoWhileStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +do + ; +while (foo) +``` + +```json +{ + "options": [ + 4 + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'DoWhileStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +while (2 > 1) + console.log('a') +;[1, 2, 3].forEach(x=>console.log(x)) +``` + +```json +{ + "options": [ + 4 + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'WhileStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +for (;;) + console.log('a') +;[1, 2, 3].forEach(x=>console.log(x)) +``` + +```json +{ + "options": [ + 4 + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ForStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +for (a in b) + console.log('a') +;[1, 2, 3].forEach(x=>console.log(x)) +``` + +```json +{ + "options": [ + 4 + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ForInStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +for (a of b) + console.log('a') +;[1, 2, 3].forEach(x=>console.log(x)) +``` + +```json +{ + "options": [ + 4 + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ForOfStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +with (a) + console.log(b) +;[1, 2, 3].forEach(x=>console.log(x)) +``` + +```json +{ + "options": [ + 4 + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'WithStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +label: for (a of b) + console.log('a') +;[1, 2, 3].forEach(x=>console.log(x)) +``` + +```json +{ + "options": [ + 4 + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ForOfStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +label: +for (a of b) + console.log('a') +;[1, 2, 3].forEach(x=>console.log(x)) +``` + +```json +{ + "options": [ + 4 + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ForOfStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +if (foo) +\u0009if (bar) doSomething(); +\u0009else doSomething(); +else +\u0009if (bar) doSomething(); +\u0009else doSomething(); +``` + +```json +{ + "code": "if (foo)\n\tif (bar) doSomething();\n\telse doSomething();\nelse\n\tif (bar) doSomething();\n\telse doSomething();", + "options": [ + "tab" + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 4: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 tabs but found 1.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 1, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 tabs but found 1.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 1, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 tabs but found 1.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 5, + column: 0, + endLine: 5, + endColumn: 1, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 tabs but found 1.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 6, + column: 0, + endLine: 6, + endColumn: 1, + suggestions: null + } +] + +4 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +if (foo) + if (bar) doSomething(); + else doSomething(); +else + if (bar) doSomething(); + else doSomething(); +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 4: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 5, + column: 0, + endLine: 5, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 6, + column: 0, + endLine: 6, + endColumn: 4, + suggestions: null + } +] + +4 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +if (foo) + if (bar) doSomething(); + else doSomething(); +else + if (bar) + doSomething(); + else doSomething(); +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 5: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 5, + column: 0, + endLine: 5, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 6, + column: 0, + endLine: 6, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 7, + column: 0, + endLine: 7, + endColumn: 4, + suggestions: null + } +] + +5 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +if (foo) + if (bar) doSomething(); + else doSomething(); +else + if (bar) doSomething(); + else + doSomething(); +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 5: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 5, + column: 0, + endLine: 5, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 6, + column: 0, + endLine: 6, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 7, + column: 0, + endLine: 7, + endColumn: 8, + suggestions: null + } +] + +5 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +if (foo) + if (bar) doSomething(); + else doSomething(); +else + if (bar) + doSomething(); + else + doSomething(); +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 6: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 5, + column: 0, + endLine: 5, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 6, + column: 0, + endLine: 6, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 7, + column: 0, + endLine: 7, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 8, + column: 0, + endLine: 8, + endColumn: 8, + suggestions: null + } +] + +6 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +if (foo) + if (bar) doSomething(); + else doSomething(); +else if (bar) doSomething(); +else doSomething(); +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +if (foo) + if (bar) doSomething(); + else doSomething(); +else if (bar) + doSomething(); +else doSomething(); +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 5, + column: 0, + endLine: 5, + endColumn: 4, + suggestions: null + } +] + +3 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +if (foo) + if (bar) doSomething(); + else doSomething(); +else if (bar) doSomething(); +else + doSomething(); +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 6, + column: 0, + endLine: 6, + endColumn: 4, + suggestions: null + } +] + +3 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +if (foo) + if (bar) doSomething(); + else doSomething(); +else if (bar) + doSomething(); +else + doSomething(); +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 4: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 5, + column: 0, + endLine: 5, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 7, + column: 0, + endLine: 7, + endColumn: 4, + suggestions: null + } +] + +4 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +if (foo) + if (bar) doSomething(); + else doSomething(); +else + if (foo) + if (bar) doSomething(); + else doSomething(); + else + if (bar) doSomething(); + else doSomething(); +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 8: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 5, + column: 0, + endLine: 5, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 6, + column: 0, + endLine: 6, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 7, + column: 0, + endLine: 7, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 8, + column: 0, + endLine: 8, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 9, + column: 0, + endLine: 9, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 10, + column: 0, + endLine: 10, + endColumn: 8, + suggestions: null + } +] + +8 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +if (foo) + if (bar) doSomething(); + else doSomething(); +else + if (foo) + if (bar) doSomething(); + else + if (bar) doSomething(); + else doSomething(); + else doSomething(); +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 8: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 5, + column: 0, + endLine: 5, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 6, + column: 0, + endLine: 6, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 7, + column: 0, + endLine: 7, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 12.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 8, + column: 0, + endLine: 8, + endColumn: 12, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 12.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 9, + column: 0, + endLine: 9, + endColumn: 12, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 10, + column: 0, + endLine: 10, + endColumn: 4, + suggestions: null + } +] + +8 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +if (foo) + if (bar) doSomething(); + else doSomething(); +else if (foo) doSomething(); +else doSomething(); +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +if (foo) + if (bar) doSomething(); + else doSomething(); +else if (foo) { + doSomething(); +} +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 5, + column: 0, + endLine: 5, + endColumn: 4, + suggestions: null + } +] + +3 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +if (foo) + if (bar) doSomething(); + else doSomething(); +else if (foo) +{ + doSomething(); +} +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 6, + column: 0, + endLine: 6, + endColumn: 4, + suggestions: null + } +] + +3 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +if (foo) + if (bar) doSomething(); + else doSomething(); +else + if (foo) { + doSomething(); + } +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 5: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 5, + column: 0, + endLine: 5, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 6, + column: 0, + endLine: 6, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 7, + column: 0, + endLine: 7, + endColumn: 4, + suggestions: null + } +] + +5 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > valid + +```js +if (foo) + if (bar) doSomething(); + else doSomething(); +else + if (foo) + { + doSomething(); + } +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 6: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 5, + column: 0, + endLine: 5, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 6, + column: 0, + endLine: 6, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 7, + column: 0, + endLine: 7, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 8, + column: 0, + endLine: 8, + endColumn: 4, + suggestions: null + } +] + +6 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +var a = b; +if (a) { +b(); +} +``` + +```json +{ + "output": "var a = b;\nif (a) {\n b();\n}", + "options": [ + 2 + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 0 + }, + "line": 3 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +require('http').request({hostname: 'localhost', + port: 80}, function(res) { + res.end(); + }); +``` + +```json +{ + "output": "require('http').request({hostname: 'localhost',\n port: 80}, function(res) {\n res.end();\n});", + "options": [ + 2 + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 18 + }, + "line": 2 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 4 + }, + "line": 3 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "0 spaces", + "actual": 2 + }, + "line": 4 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Hydrated message "Expected indentation of 2 spaces but found 18." does not match "Expected indentation of 0 spaces but found 18." ++ actual - expected + ++ 'Expected indentation of 0 spaces but found 18.' +- 'Expected indentation of 2 spaces but found 18.' + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +if (array.some(function(){ + return true; +})) { +a++; // -> + b++; + c++; // <- +} +``` + +```json +{ + "output": "if (array.some(function(){\n return true;\n})) {\n a++; // ->\n b++;\n c++; // <-\n}", + "options": [ + 2 + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 0 + }, + "line": 4 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 4 + }, + "line": 6 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 2 errors but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 5, + column: 0, + endLine: 5, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 6, + column: 0, + endLine: 6, + endColumn: 4, + suggestions: null + } +] + +3 !== 2 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +if (a){ +\u0009b=c; +\u0009\u0009c=d; +e=f; +} +``` + +```json +{ + "code": "if (a){\n\tb=c;\n\t\tc=d;\ne=f;\n}", + "output": "if (a){\n\tb=c;\n\tc=d;\n\te=f;\n}", + "options": [ + "tab" + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "1 tab", + "actual": 2 + }, + "line": 3 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "1 tab", + "actual": 0 + }, + "line": 4 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Hydrated message "Expected indentation of 1 tab but found 2." does not match "Expected indentation of 0 tabs but found 1." ++ actual - expected + ++ 'Expected indentation of 0 tabs but found 1.' +- 'Expected indentation of 1 tab but found 2.' + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +if (a){ + b=c; + c=d; + e=f; +} +``` + +```json +{ + "output": "if (a){\n b=c;\n c=d;\n e=f;\n}", + "options": [ + 4 + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 6 + }, + "line": 3 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 1 + }, + "line": 4 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 2 errors but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 6.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 6, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 1.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 4, + column: 0, + endLine: 4, + endColumn: 1, + suggestions: null + } +] + +3 !== 2 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +if (a) { + var b = c; + var d = e + * f; + var e = f; // <- +// -> + function g() { + if (h) { + var i = j; + } // <- + } // <- + + while (k) l++; + while (m) { + n--; // -> + } // <- + + do { + o = p + + q; // NO ERROR: DON'T VALIDATE MULTILINE STATEMENTS + o = p + + q; + } while(r); // <- + + for (var s in t) { + u++; + } + + for (;;) { + v++; // <- + } + + if ( w ) { + x++; + } else if (y) { + z++; // <- + aa++; + } else { // <- + bb++; // -> +} // -> +} + +/**/var b; // NO ERROR: single line multi-line comments followed by code is OK +/* + * + */ var b; // NO ERROR: multi-line comments followed by code is OK + +var arr = [ + a, + b, + c, + function (){ + d + }, // <- + {}, + { + a: b, + c: d, + d: e + }, + [ + f, + g, + h, + i + ], + [j] +]; + +var obj = { + a: { + b: { + c: d, + e: f, + g: h + + i // NO ERROR: DON'T VALIDATE MULTILINE STATEMENTS + } + }, + g: [ + h, + i, + j, + k + ] +}; + +var arrObject = {a:[ + a, + b, // NO ERROR: INDENT ONCE WHEN MULTIPLE INDENTED EXPRESSIONS ARE ON SAME LINE + c +]}; + +var objArray = [{ + a: b, + b: c, // NO ERROR: INDENT ONCE WHEN MULTIPLE INDENTED EXPRESSIONS ARE ON SAME LINE + c: d +}]; + +var arrArray = [[ + a, + b, // NO ERROR: INDENT ONCE WHEN MULTIPLE INDENTED EXPRESSIONS ARE ON SAME LINE + c +]]; + +var objObject = {a:{ + a: b, + b: c, // NO ERROR: INDENT ONCE WHEN MULTIPLE INDENTED EXPRESSIONS ARE ON SAME LINE + c: d +}}; + + +switch (a) { + case 'a': + var a = 'b'; // -> + break; + case 'b': + var a = 'b'; + break; + case 'c': + var a = 'b'; // <- + break; + case 'd': + var a = 'b'; + break; // -> + case 'f': + var a = 'b'; + break; + case 'g': { + var a = 'b'; + break; + } + case 'z': + default: + break; // <- +} + +a.b('hi') + .c(a.b()) // <- + .d(); // <- + +if ( a ) { + if ( b ) { +d.e(f) // -> + .g() // -> + .h(); // -> + + i.j(m) + .k() // NO ERROR: DON'T VALIDATE MULTILINE STATEMENTS + .l(); // NO ERROR: DON'T VALIDATE MULTILINE STATEMENTS + + n.o(p) // <- + .q() // <- + .r(); // <- + } +} + +var a = b, + c = function () { + h = i; // -> + j = k; + l = m; // <- + }, + e = { + f: g, + n: o, + p: q + }, + r = [ + s, + t, + u + ]; + +var a = function () { +b = c; // -> + d = e; + f = g; // <- +}; + +function c(a, b) { + if (a || (a && + b)) { // NO ERROR: DON'T VALIDATE MULTILINE STATEMENTS + return d; + } +} + +if ( a + || b ) { +var x; // -> + var c, + d = function(a, + b) { // <- + a; // -> + b; + c; // <- + } +} + + +a({ + d: 1 +}); + +a( +1 +); + +a( + b({ + d: 1 + }) +); + +a( + b( + c({ + d: 1, + e: 1, + f: 1 + }) + ) +); + +a({ d: 1 }); + +aa( + b({ // NO ERROR: CallExpression args not linted by default + c: d, // -> + e: f, + f: g + }) // -> +); + +aaaaaa( + b, + c, + { + d: a + } +); + +a(b, c, + d, e, + f, g // NO ERROR: alignment of arguments of callExpression not checked + ); // <- + +a( + ); // <- + +aaaaaa( + b, + c, { + d: a + }, { + e: f + } +); + +a.b() + .c(function(){ + var a; + }).d.e; + +if (a == 'b') { + if (c && d) e = f + else g('h').i('j') +} + +a = function (b, c) { + return a(function () { + var d = e + var f = g + var h = i + + if (!j) k('l', (m = n)) + if (o) p + else if (q) r + }) +} + +var a = function() { + "b" + .replace(/a/, "a") + .replace(/bc?/, function(e) { + return "b" + (e.f === 2 ? "c" : "f"); + }) + .replace(/d/, "d"); +}; + +$(b) + .on('a', 'b', function() { $(c).e('f'); }) + .on('g', 'h', function() { $(i).j('k'); }); + +a + .b('c', + 'd'); // NO ERROR: CallExpression args not linted by default + +a + .b('c', [ 'd', function(e) { + e++; + }]); + +var a = function() { + a++; + b++; // <- + c++; // <- + }, + b; + +var b = [ + a, + b, + c + ], + c; + +var c = { + a: 1, + b: 2, + c: 3 + }, + d; + +// holes in arrays indentation +x = [ + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1 +]; + +try { + a++; + b++; // <- +c++; // -> +} catch (d) { + e++; + f++; // <- +g++; // -> +} finally { + h++; + i++; // <- +j++; // -> +} + +if (array.some(function(){ + return true; +})) { +a++; // -> + b++; + c++; // <- +} + +var a = b.c(function() { + d++; + }), + e; + +switch (true) { + case (a + && b): +case (c // -> +&& d): + case (e // <- + && f): + case (g +&& h): + var i = j; // <- + var k = l; + var m = n; // -> +} + +if (a) { + b(); +} +else { +c(); // -> + d(); + e(); // <- +} + +if (a) b(); +else { +c(); // -> + d(); + e(); // <- +} + +if (a) { + b(); +} else c(); + +if (a) { + b(); +} +else c(); + +a(); + +if( "very very long multi line" + + "with weird indentation" ) { + b(); +a(); // -> + c(); // <- +} + +a( "very very long multi line" + + "with weird indentation", function() { + b(); +a(); // -> + c(); // <- + }); // <- + +a = function(content, dom) { + b(); + c(); // <- +d(); // -> +}; + +a = function(content, dom) { + b(); + c(); // <- + d(); // -> + }; + +a = function(content, dom) { + b(); // -> + }; + +a = function(content, dom) { +b(); // -> + }; + +a('This is a terribly long description youll ' + + 'have to read', function () { + b(); // <- + c(); // <- + }); // <- + +if ( + array.some(function(){ + return true; + }) +) { +a++; // -> + b++; + c++; // <- +} + +function c(d) { + return { + e: function(f, g) { + } + }; +} + +function a(b) { + switch(x) { + case 1: + if (foo) { + return 5; + } + } +} + +function a(b) { + switch(x) { + case 1: + c; + } +} + +function a(b) { + switch(x) { + case 1: c; + } +} + +function test() { + var a = 1; + { + a(); + } +} + +{ + a(); +} + +function a(b) { + switch(x) { + case 1: + { // <- + a(); // -> + } + break; + default: + { + b(); + } + } +} + +switch (a) { + default: + if (b) + c(); +} + +function test(x) { + switch (x) { + case 1: + return function() { + var a = 5; + return a; + }; + } +} + +switch (a) { + default: + if (b) + c(); +} + +``` + +```json +{ + "output": "if (a) {\n var b = c;\n var d = e\n * f;\n var e = f; // <-\n // ->\n function g() {\n if (h) {\n var i = j;\n } // <-\n } // <-\n\n while (k) l++;\n while (m) {\n n--; // ->\n } // <-\n\n do {\n o = p +\n q; // NO ERROR: DON'T VALIDATE MULTILINE STATEMENTS\n o = p +\n q;\n } while(r); // <-\n\n for (var s in t) {\n u++;\n }\n\n for (;;) {\n v++; // <-\n }\n\n if ( w ) {\n x++;\n } else if (y) {\n z++; // <-\n aa++;\n } else { // <-\n bb++; // ->\n } // ->\n}\n\n/**/var b; // NO ERROR: single line multi-line comments followed by code is OK\n/*\n *\n */ var b; // NO ERROR: multi-line comments followed by code is OK\n\nvar arr = [\n a,\n b,\n c,\n function (){\n d\n }, // <-\n {},\n {\n a: b,\n c: d,\n d: e\n },\n [\n f,\n g,\n h,\n i\n ],\n [j]\n];\n\nvar obj = {\n a: {\n b: {\n c: d,\n e: f,\n g: h +\n i // NO ERROR: DON'T VALIDATE MULTILINE STATEMENTS\n }\n },\n g: [\n h,\n i,\n j,\n k\n ]\n};\n\nvar arrObject = {a:[\n a,\n b, // NO ERROR: INDENT ONCE WHEN MULTIPLE INDENTED EXPRESSIONS ARE ON SAME LINE\n c\n]};\n\nvar objArray = [{\n a: b,\n b: c, // NO ERROR: INDENT ONCE WHEN MULTIPLE INDENTED EXPRESSIONS ARE ON SAME LINE\n c: d\n}];\n\nvar arrArray = [[\n a,\n b, // NO ERROR: INDENT ONCE WHEN MULTIPLE INDENTED EXPRESSIONS ARE ON SAME LINE\n c\n]];\n\nvar objObject = {a:{\n a: b,\n b: c, // NO ERROR: INDENT ONCE WHEN MULTIPLE INDENTED EXPRESSIONS ARE ON SAME LINE\n c: d\n}};\n\n\nswitch (a) {\n case 'a':\n var a = 'b'; // ->\n break;\n case 'b':\n var a = 'b';\n break;\n case 'c':\n var a = 'b'; // <-\n break;\n case 'd':\n var a = 'b';\n break; // ->\n case 'f':\n var a = 'b';\n break;\n case 'g': {\n var a = 'b';\n break;\n }\n case 'z':\n default:\n break; // <-\n}\n\na.b('hi')\n .c(a.b()) // <-\n .d(); // <-\n\nif ( a ) {\n if ( b ) {\n d.e(f) // ->\n .g() // ->\n .h(); // ->\n\n i.j(m)\n .k() // NO ERROR: DON'T VALIDATE MULTILINE STATEMENTS\n .l(); // NO ERROR: DON'T VALIDATE MULTILINE STATEMENTS\n\n n.o(p) // <-\n .q() // <-\n .r(); // <-\n }\n}\n\nvar a = b,\n c = function () {\n h = i; // ->\n j = k;\n l = m; // <-\n },\n e = {\n f: g,\n n: o,\n p: q\n },\n r = [\n s,\n t,\n u\n ];\n\nvar a = function () {\n b = c; // ->\n d = e;\n f = g; // <-\n};\n\nfunction c(a, b) {\n if (a || (a &&\n b)) { // NO ERROR: DON'T VALIDATE MULTILINE STATEMENTS\n return d;\n }\n}\n\nif ( a\n || b ) {\n var x; // ->\n var c,\n d = function(a,\n b) { // <-\n a; // ->\n b;\n c; // <-\n }\n}\n\n\na({\n d: 1\n});\n\na(\n1\n);\n\na(\n b({\n d: 1\n })\n);\n\na(\n b(\n c({\n d: 1,\n e: 1,\n f: 1\n })\n )\n);\n\na({ d: 1 });\n\naa(\n b({ // NO ERROR: CallExpression args not linted by default\n c: d, // ->\n e: f,\n f: g\n }) // ->\n);\n\naaaaaa(\n b,\n c,\n {\n d: a\n }\n);\n\na(b, c,\n d, e,\n f, g // NO ERROR: alignment of arguments of callExpression not checked\n); // <-\n\na(\n); // <-\n\naaaaaa(\n b,\n c, {\n d: a\n }, {\n e: f\n }\n);\n\na.b()\n .c(function(){\n var a;\n }).d.e;\n\nif (a == 'b') {\n if (c && d) e = f\n else g('h').i('j')\n}\n\na = function (b, c) {\n return a(function () {\n var d = e\n var f = g\n var h = i\n\n if (!j) k('l', (m = n))\n if (o) p\n else if (q) r\n })\n}\n\nvar a = function() {\n \"b\"\n .replace(/a/, \"a\")\n .replace(/bc?/, function(e) {\n return \"b\" + (e.f === 2 ? \"c\" : \"f\");\n })\n .replace(/d/, \"d\");\n};\n\n$(b)\n .on('a', 'b', function() { $(c).e('f'); })\n .on('g', 'h', function() { $(i).j('k'); });\n\na\n .b('c',\n 'd'); // NO ERROR: CallExpression args not linted by default\n\na\n .b('c', [ 'd', function(e) {\n e++;\n }]);\n\nvar a = function() {\n a++;\n b++; // <-\n c++; // <-\n },\n b;\n\nvar b = [\n a,\n b,\n c\n ],\n c;\n\nvar c = {\n a: 1,\n b: 2,\n c: 3\n },\n d;\n\n// holes in arrays indentation\nx = [\n 1,\n 1,\n 1,\n 1,\n 1,\n 1,\n 1,\n 1,\n 1,\n 1\n];\n\ntry {\n a++;\n b++; // <-\n c++; // ->\n} catch (d) {\n e++;\n f++; // <-\n g++; // ->\n} finally {\n h++;\n i++; // <-\n j++; // ->\n}\n\nif (array.some(function(){\n return true;\n})) {\n a++; // ->\n b++;\n c++; // <-\n}\n\nvar a = b.c(function() {\n d++;\n }),\n e;\n\nswitch (true) {\n case (a\n && b):\n case (c // ->\n&& d):\n case (e // <-\n && f):\n case (g\n&& h):\n var i = j; // <-\n var k = l;\n var m = n; // ->\n}\n\nif (a) {\n b();\n}\nelse {\n c(); // ->\n d();\n e(); // <-\n}\n\nif (a) b();\nelse {\n c(); // ->\n d();\n e(); // <-\n}\n\nif (a) {\n b();\n} else c();\n\nif (a) {\n b();\n}\nelse c();\n\na();\n\nif( \"very very long multi line\" +\n \"with weird indentation\" ) {\n b();\n a(); // ->\n c(); // <-\n}\n\na( \"very very long multi line\" +\n \"with weird indentation\", function() {\n b();\n a(); // ->\n c(); // <-\n}); // <-\n\na = function(content, dom) {\n b();\n c(); // <-\n d(); // ->\n};\n\na = function(content, dom) {\n b();\n c(); // <-\n d(); // ->\n};\n\na = function(content, dom) {\n b(); // ->\n};\n\na = function(content, dom) {\n b(); // ->\n};\n\na('This is a terribly long description youll ' +\n 'have to read', function () {\n b(); // <-\n c(); // <-\n}); // <-\n\nif (\n array.some(function(){\n return true;\n })\n) {\n a++; // ->\n b++;\n c++; // <-\n}\n\nfunction c(d) {\n return {\n e: function(f, g) {\n }\n };\n}\n\nfunction a(b) {\n switch(x) {\n case 1:\n if (foo) {\n return 5;\n }\n }\n}\n\nfunction a(b) {\n switch(x) {\n case 1:\n c;\n }\n}\n\nfunction a(b) {\n switch(x) {\n case 1: c;\n }\n}\n\nfunction test() {\n var a = 1;\n {\n a();\n }\n}\n\n{\n a();\n}\n\nfunction a(b) {\n switch(x) {\n case 1:\n { // <-\n a(); // ->\n }\n break;\n default:\n {\n b();\n }\n }\n}\n\nswitch (a) {\n default:\n if (b)\n c();\n}\n\nfunction test(x) {\n switch (x) {\n case 1:\n return function() {\n var a = 5;\n return a;\n };\n }\n}\n\nswitch (a) {\n default:\n if (b)\n c();\n}\n", + "options": [ + 2, + { + "SwitchCase": 1, + "MemberExpression": 1, + "CallExpression": { + "arguments": "off" + } + } + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 4 + }, + "line": 5 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 0 + }, + "line": 6 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 6 + }, + "line": 10 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 4 + }, + "line": 11 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 2 + }, + "line": 15 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 4 + }, + "line": 16 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 4 + }, + "line": 23 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 4 + }, + "line": 29 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 6 + }, + "line": 30 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 6 + }, + "line": 36 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 4 + }, + "line": 38 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 2 + }, + "line": 39 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 0 + }, + "line": 40 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 4 + }, + "line": 54 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 2 + }, + "line": 114 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 6 + }, + "line": 120 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 2 + }, + "line": 124 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 6 + }, + "line": 134 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 3 + }, + "line": 138 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 3 + }, + "line": 139 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 143 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "6 spaces", + "actual": 2 + }, + "line": 144 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "6 spaces", + "actual": 2 + }, + "line": 145 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 6 + }, + "line": 151 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "6 spaces", + "actual": 8 + }, + "line": 152 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "6 spaces", + "actual": 8 + }, + "line": 153 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 2 + }, + "line": 159 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 6 + }, + "line": 161 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 0 + }, + "line": 175 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 4 + }, + "line": 177 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 0 + }, + "line": 189 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "6 spaces", + "actual": 18 + }, + "line": 192 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "6 spaces", + "actual": 4 + }, + "line": 193 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "6 spaces", + "actual": 8 + }, + "line": 195 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "5 spaces", + "actual": 4 + }, + "line": 228 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "3 spaces", + "actual": 2 + }, + "line": 231 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "0 spaces", + "actual": 2 + }, + "line": 245 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "0 spaces", + "actual": 2 + }, + "line": 248 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 6 + }, + "line": 304 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 8 + }, + "line": 306 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 4 + }, + "line": 307 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 4 + }, + "line": 308 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 6 + }, + "line": 311 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 6 + }, + "line": 312 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 6 + }, + "line": 313 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 4 + }, + "line": 314 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 4 + }, + "line": 315 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 6 + }, + "line": 318 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 6 + }, + "line": 319 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 6 + }, + "line": 320 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 4 + }, + "line": 321 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 4 + }, + "line": 322 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 1 + }, + "line": 326 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 1 + }, + "line": 327 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 1 + }, + "line": 328 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 1 + }, + "line": 329 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 1 + }, + "line": 330 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 1 + }, + "line": 331 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 1 + }, + "line": 332 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 1 + }, + "line": 333 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 1 + }, + "line": 334 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 1 + }, + "line": 335 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 4 + }, + "line": 340 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 0 + }, + "line": 341 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 4 + }, + "line": 344 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 0 + }, + "line": 345 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 4 + }, + "line": 348 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 0 + }, + "line": 349 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 0 + }, + "line": 355 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 4 + }, + "line": 357 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 6 + }, + "line": 361 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 4 + }, + "line": 362 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 4 + }, + "line": 363 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 0 + }, + "line": 368 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 4 + }, + "line": 370 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 6 + }, + "line": 374 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 2 + }, + "line": 376 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 0 + }, + "line": 383 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 4 + }, + "line": 385 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 0 + }, + "line": 390 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 4 + }, + "line": 392 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 0 + }, + "line": 409 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 4 + }, + "line": 410 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 0 + }, + "line": 416 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 4 + }, + "line": 417 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "0 spaces", + "actual": 4 + }, + "line": 418 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 4 + }, + "line": 422 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 0 + }, + "line": 423 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 6 + }, + "line": 427 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 8 + }, + "line": 428 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 4 + }, + "line": 429 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "0 spaces", + "actual": 4 + }, + "line": 430 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 4 + }, + "line": 433 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "0 spaces", + "actual": 4 + }, + "line": 434 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 0 + }, + "line": 437 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "0 spaces", + "actual": 4 + }, + "line": 438 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 4 + }, + "line": 442 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 4 + }, + "line": 443 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "0 spaces", + "actual": 2 + }, + "line": 444 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 0 + }, + "line": 451 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 4 + }, + "line": 453 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "6 spaces", + "actual": 8 + }, + "line": 499 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "8 spaces", + "actual": 6 + }, + "line": 500 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 6 + }, + "line": 504 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "6 spaces", + "actual": 8 + }, + "line": 505 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 8 + }, + "line": 506 + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### indent > invalid + +```js +switch(value){ + case "1": + a(); + break; + case "2": + a(); + break; + default: + a(); + break; +} +``` + +```json +{ + "output": "switch(value){\n case \"1\":\n a();\n break;\n case \"2\":\n a();\n break;\n default:\n a();\n break;\n}", + "options": [ + 4, + { + "SwitchCase": 1 + } + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "8 spaces", + "actual": 4 + }, + "line": 4 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "8 spaces", + "actual": 4 + }, + "line": 7 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 2 errors but had 9: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'SwitchStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'SwitchCase', + line: 3, + column: 0, + endLine: 3, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'SwitchCase', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'SwitchStatement', + line: 5, + column: 0, + endLine: 5, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'SwitchCase', + line: 6, + column: 0, + endLine: 6, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'SwitchCase', + line: 7, + column: 0, + endLine: 7, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'SwitchStatement', + line: 8, + column: 0, + endLine: 8, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'SwitchCase', + line: 9, + column: 0, + endLine: 9, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'SwitchCase', + line: 10, + column: 0, + endLine: 10, + endColumn: 8, + suggestions: null + } +] + +9 !== 2 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +var x = 0 && + { + a: 1, + b: 2 + }; +``` + +```json +{ + "output": "var x = 0 &&\n {\n a: 1,\n b: 2\n };", + "options": [ + 4 + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "8 spaces", + "actual": 7 + }, + "line": 3 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "8 spaces", + "actual": 10 + }, + "line": 4 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Hydrated message "Expected indentation of 8 spaces but found 7." does not match "Expected indentation of 4 spaces but found 7." ++ actual - expected + ++ 'Expected indentation of 4 spaces but found 7.' +- 'Expected indentation of 8 spaces but found 7.' + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +switch(value){ + case "1": + a(); + break; + case "2": + a(); + break; + default: + break; +} +``` + +```json +{ + "output": "switch(value){\n case \"1\":\n a();\n break;\n case \"2\":\n a();\n break;\n default:\n break;\n}", + "options": [ + 4, + { + "SwitchCase": 1 + } + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "8 spaces", + "actual": 4 + }, + "line": 9 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 8: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'SwitchStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'SwitchCase', + line: 3, + column: 0, + endLine: 3, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'SwitchCase', + line: 4, + column: 0, + endLine: 4, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'SwitchStatement', + line: 5, + column: 0, + endLine: 5, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'SwitchCase', + line: 6, + column: 0, + endLine: 6, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'SwitchCase', + line: 7, + column: 0, + endLine: 7, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'SwitchStatement', + line: 8, + column: 0, + endLine: 8, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'SwitchCase', + line: 9, + column: 0, + endLine: 9, + endColumn: 4, + suggestions: null + } +] + +8 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +switch(value){ + case "1": + case "2": + a(); + break; + default: + break; +} +switch(value){ + case "1": + break; + case "2": + a(); + break; + default: + a(); + break; +} +``` + +```json +{ + "output": "switch(value){\n case \"1\":\n case \"2\":\n a();\n break;\n default:\n break;\n}\nswitch(value){\n case \"1\":\n break;\n case \"2\":\n a();\n break;\n default:\n a();\n break;\n}", + "options": [ + 4, + { + "SwitchCase": 1 + } + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "8 spaces", + "actual": 4 + }, + "line": 11 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "8 spaces", + "actual": 4 + }, + "line": 14 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "8 spaces", + "actual": 4 + }, + "line": 17 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 3 errors but had 14: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'SwitchStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'SwitchStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'SwitchCase', + line: 4, + column: 0, + endLine: 4, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'SwitchCase', + line: 5, + column: 0, + endLine: 5, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'SwitchStatement', + line: 6, + column: 0, + endLine: 6, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'SwitchCase', + line: 7, + column: 0, + endLine: 7, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'SwitchStatement', + line: 10, + column: 0, + endLine: 10, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'SwitchCase', + line: 11, + column: 0, + endLine: 11, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'SwitchStatement', + line: 12, + column: 0, + endLine: 12, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'SwitchCase', + line: 13, + column: 0, + endLine: 13, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'SwitchCase', + line: 14, + column: 0, + endLine: 14, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'SwitchStatement', + line: 15, + column: 0, + endLine: 15, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'SwitchCase', + line: 16, + column: 0, + endLine: 16, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'SwitchCase', + line: 17, + column: 0, + endLine: 17, + endColumn: 4, + suggestions: null + } +] + +14 !== 3 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +switch(value){ +case "1": + a(); + break; + case "2": + break; + default: + break; +} +``` + +```json +{ + "output": "switch(value){\ncase \"1\":\n a();\n break;\ncase \"2\":\n break;\ndefault:\n break;\n}", + "options": [ + 4 + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 8 + }, + "line": 3 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 8 + }, + "line": 4 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "0 spaces", + "actual": 4 + }, + "line": 5 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 8 + }, + "line": 6 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "0 spaces", + "actual": 4 + }, + "line": 7 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 8 + }, + "line": 8 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Hydrated message "Expected indentation of 4 spaces but found 8." does not match "Expected indentation of 0 spaces but found 8." ++ actual - expected + ++ 'Expected indentation of 0 spaces but found 8.' +- 'Expected indentation of 4 spaces but found 8.' + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +var obj = {foo: 1, bar: 2}; +with (obj) { +console.log(foo + bar); +} +``` + +```json +{ + "output": "var obj = {foo: 1, bar: 2};\nwith (obj) {\n console.log(foo + bar);\n}", + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 3 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +switch (a) { +case '1': +b(); +break; +default: +c(); +break; +} +``` + +```json +{ + "output": "switch (a) {\n case '1':\n b();\n break;\n default:\n c();\n break;\n}", + "options": [ + 4, + { + "SwitchCase": 1 + } + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 2 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "8 spaces", + "actual": 0 + }, + "line": 3 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "8 spaces", + "actual": 0 + }, + "line": 4 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 5 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "8 spaces", + "actual": 0 + }, + "line": 6 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "8 spaces", + "actual": 0 + }, + "line": 7 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 6 errors but had 0: [] + +0 !== 6 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +var foo = function(){ + foo + .bar +} +``` + +```json +{ + "output": "var foo = function(){\n foo\n .bar\n}", + "options": [ + 4, + { + "MemberExpression": 1 + } + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "8 spaces", + "actual": 10 + }, + "line": 3 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 10.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'MemberExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 10, + suggestions: null + } +] + +2 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +( + foo + .bar +) +``` + +```json +{ + "output": "(\n foo\n .bar\n)", + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "8 spaces", + "actual": 4 + }, + "line": 3 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +var foo = function(){ + foo + .bar +} +``` + +```json +{ + "output": "var foo = function(){\n foo\n .bar\n}", + "options": [ + 4, + { + "MemberExpression": 2 + } + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "12 spaces", + "actual": 13 + }, + "line": 3 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 13.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'MemberExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 13, + suggestions: null + } +] + +2 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +var foo = () => { + foo + .bar +} +``` + +```json +{ + "output": "var foo = () => {\n foo\n .bar\n}", + "options": [ + 4, + { + "MemberExpression": 2 + } + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "12 spaces", + "actual": 13 + }, + "line": 3 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 13.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'MemberExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 13, + suggestions: null + } +] + +2 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +TestClass.prototype.method = function () { + return Promise.resolve(3) + .then(function (x) { + return x; + }); +}; +``` + +```json +{ + "output": "TestClass.prototype.method = function () {\n return Promise.resolve(3)\n .then(function (x) {\n return x;\n });\n};", + "options": [ + 2, + { + "MemberExpression": 1 + } + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 6 + }, + "line": 3 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 4: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 6.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'MemberExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 6, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 6.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 4, + column: 0, + endLine: 4, + endColumn: 6, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 5, + column: 0, + endLine: 5, + endColumn: 4, + suggestions: null + } +] + +4 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +while (a) +b(); +``` + +```json +{ + "output": "while (a)\n b();", + "options": [ + 4 + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 2 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +lmn = [{ + a: 1 + }, + { + b: 2 + }, + { + x: 2 +}]; +``` + +```json +{ + "output": "lmn = [{\n a: 1\n},\n{\n b: 2\n},\n{\n x: 2\n}];", + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 8 + }, + "line": 2 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "0 spaces", + "actual": 4 + }, + "line": 3 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "0 spaces", + "actual": 4 + }, + "line": 4 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 8 + }, + "line": 5 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "0 spaces", + "actual": 4 + }, + "line": 6 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "0 spaces", + "actual": 4 + }, + "line": 7 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 8 + }, + "line": 8 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Hydrated message "Expected indentation of 4 spaces but found 8." does not match "Expected indentation of 0 spaces but found 8." ++ actual - expected + ++ 'Expected indentation of 0 spaces but found 8.' +- 'Expected indentation of 4 spaces but found 8.' + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +for (;;) +b(); +``` + +```json +{ + "output": "for (;;)\n b();", + "options": [ + 4 + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 2 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +for (a in x) +b(); +``` + +```json +{ + "output": "for (a in x)\n b();", + "options": [ + 4 + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 2 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +do +b(); +while(true) +``` + +```json +{ + "output": "do\n b();\nwhile(true)", + "options": [ + 4 + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 2 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +with(a) +b(); +``` + +```json +{ + "output": "with(a)\n b();", + "options": [ + 4 + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 2 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +if(true) +b(); +``` + +```json +{ + "output": "if(true)\n b();", + "options": [ + 4 + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 2 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +var test = { + a: 1, + b: 2 + }; +``` + +```json +{ + "output": "var test = {\n a: 1,\n b: 2\n};", + "options": [ + 2 + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 6 + }, + "line": 2 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 4 + }, + "line": 3 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "0 spaces", + "actual": 4 + }, + "line": 4 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Hydrated message "Expected indentation of 2 spaces but found 6." does not match "Expected indentation of 0 spaces but found 6." ++ actual - expected + ++ 'Expected indentation of 0 spaces but found 6.' +- 'Expected indentation of 2 spaces but found 6.' + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +var a = function() { + a++; + b++; + c++; + }, + b; +``` + +```json +{ + "output": "var a = function() {\n a++;\n b++;\n c++;\n },\n b;", + "options": [ + 4 + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "8 spaces", + "actual": 6 + }, + "line": 2 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "8 spaces", + "actual": 4 + }, + "line": 3 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "8 spaces", + "actual": 10 + }, + "line": 4 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 3 errors but had 5: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 6.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 6, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 10.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 4, + column: 0, + endLine: 4, + endColumn: 10, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 5, + column: 0, + endLine: 5, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'VariableDeclaration', + line: 6, + column: 0, + endLine: 6, + endColumn: 4, + suggestions: null + } +] + +5 !== 3 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +var a = 1, +b = 2, +c = 3; +``` + +```json +{ + "output": "var a = 1,\n b = 2,\n c = 3;", + "options": [ + 4 + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 2 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 3 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 2 errors but had 0: [] + +0 !== 2 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +[a, b, + c].forEach((index) => { + index; + }); +``` + +```json +{ + "output": "[a, b,\n c].forEach((index) => {\n index;\n});", + "options": [ + 4 + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 8 + }, + "line": 3 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "0 spaces", + "actual": 4 + }, + "line": 4 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 2 errors but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrayExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + } +] + +3 !== 2 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +[a, b, +c].forEach(function(index){ + return index; +}); +``` + +```json +{ + "output": "[a, b,\n c].forEach(function(index){\n return index;\n});", + "options": [ + 4 + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 2 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 2 + }, + "line": 3 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 2 errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 2, + suggestions: null + } +] + +1 !== 2 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +[a, b, c].forEach(function(index){ + return index; +}); +``` + +```json +{ + "output": "[a, b, c].forEach(function(index){\n return index;\n});", + "options": [ + 4 + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 2 + }, + "line": 2 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Hydrated message "Expected indentation of 4 spaces but found 2." does not match "Expected indentation of 0 spaces but found 2." ++ actual - expected + ++ 'Expected indentation of 0 spaces but found 2.' +- 'Expected indentation of 4 spaces but found 2.' + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +(foo) + .bar([ + baz +]); +``` + +```json +{ + "output": "(foo)\n .bar([\n baz\n ]);", + "options": [ + 4, + { + "MemberExpression": 1 + } + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "8 spaces", + "actual": 4 + }, + "line": 3 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 4 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Hydrated message "Expected indentation of 8 spaces but found 4." does not match "Expected indentation of 0 spaces but found 4." ++ actual - expected + ++ 'Expected indentation of 0 spaces but found 4.' +- 'Expected indentation of 8 spaces but found 4.' + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +var x = ['a', + 'b', + 'c' +]; +``` + +```json +{ + "output": "var x = ['a',\n 'b',\n 'c'\n];", + "options": [ + 4 + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 9 + }, + "line": 2 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 9 + }, + "line": 3 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Hydrated message "Expected indentation of 4 spaces but found 9." does not match "Expected indentation of 0 spaces but found 9." ++ actual - expected + ++ 'Expected indentation of 0 spaces but found 9.' +- 'Expected indentation of 4 spaces but found 9.' + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +var x = [ + 'a', + 'b', + 'c' +]; +``` + +```json +{ + "output": "var x = [\n 'a',\n 'b',\n 'c'\n];", + "options": [ + 4 + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 9 + }, + "line": 2 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 9 + }, + "line": 3 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 9 + }, + "line": 4 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Hydrated message "Expected indentation of 4 spaces but found 9." does not match "Expected indentation of 0 spaces but found 9." ++ actual - expected + ++ 'Expected indentation of 0 spaces but found 9.' +- 'Expected indentation of 4 spaces but found 9.' + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +var x = [ + 'a', + 'b', + 'c', +'d']; +``` + +```json +{ + "output": "var x = [\n 'a',\n 'b',\n 'c',\n 'd'];", + "options": [ + 4 + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 9 + }, + "line": 2 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 9 + }, + "line": 3 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 9 + }, + "line": 4 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 5 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 4 errors but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 9.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrayExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 9, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 9.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrayExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 9, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 9.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrayExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 9, + suggestions: null + } +] + +3 !== 4 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +var x = [ + 'a', + 'b', + 'c' + ]; +``` + +```json +{ + "output": "var x = [\n 'a',\n 'b',\n 'c'\n];", + "options": [ + 4 + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 9 + }, + "line": 2 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 9 + }, + "line": 3 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 9 + }, + "line": 4 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "0 spaces", + "actual": 2 + }, + "line": 5 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Hydrated message "Expected indentation of 4 spaces but found 9." does not match "Expected indentation of 0 spaces but found 9." ++ actual - expected + ++ 'Expected indentation of 0 spaces but found 9.' +- 'Expected indentation of 4 spaces but found 9.' + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +[[ +], function( + foo + ) {} +] +``` + +```json +{ + "output": "[[\n], function(\n foo\n) {}\n]", + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 8 + }, + "line": 3 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "0 spaces", + "actual": 4 + }, + "line": 4 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Hydrated message "Expected indentation of 4 spaces but found 8." does not match "Expected indentation of 0 spaces but found 8." ++ actual - expected + ++ 'Expected indentation of 0 spaces but found 8.' +- 'Expected indentation of 4 spaces but found 8.' + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +define([ + 'foo' +], function( + bar + ) { + baz; +} +) +``` + +```json +{ + "output": "define([\n 'foo'\n], function(\n bar\n) {\n baz;\n}\n)", + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 8 + }, + "line": 4 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "0 spaces", + "actual": 4 + }, + "line": 5 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 2 errors but had 4: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrayExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'FunctionExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'FunctionExpression', + line: 5, + column: 0, + endLine: 5, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 6, + column: 0, + endLine: 6, + endColumn: 4, + suggestions: null + } +] + +4 !== 2 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +while (1 < 2) +console.log('foo') + console.log('bar') +``` + +```json +{ + "output": "while (1 < 2)\n console.log('foo')\nconsole.log('bar')", + "options": [ + 2 + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 0 + }, + "line": 2 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "0 spaces", + "actual": 2 + }, + "line": 3 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 2 errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'Program', + line: 3, + column: 0, + endLine: 3, + endColumn: 2, + suggestions: null + } +] + +1 !== 2 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +function salutation () { + switch (1) { + case 0: return console.log('hi') + case 1: return console.log('hey') + } +} +``` + +```json +{ + "output": "function salutation () {\n switch (1) {\n case 0: return console.log('hi')\n case 1: return console.log('hey')\n }\n}", + "options": [ + 2, + { + "SwitchCase": 1 + } + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 2 + }, + "line": 3 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 4: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'SwitchStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'SwitchStatement', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'SwitchStatement', + line: 5, + column: 0, + endLine: 5, + endColumn: 2, + suggestions: null + } +] + +4 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +var geometry, box, face1, face2, colorT, colorB, sprite, padding, maxWidth, +height, rotate; +``` + +```json +{ + "output": "var geometry, box, face1, face2, colorT, colorB, sprite, padding, maxWidth,\n height, rotate;", + "options": [ + 2, + { + "SwitchCase": 1 + } + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 0 + }, + "line": 2 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +switch (a) { +case '1': +b(); +break; +default: +c(); +break; +} +``` + +```json +{ + "output": "switch (a) {\n case '1':\n b();\n break;\n default:\n c();\n break;\n}", + "options": [ + 4, + { + "SwitchCase": 2 + } + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "8 spaces", + "actual": 0 + }, + "line": 2 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "12 spaces", + "actual": 0 + }, + "line": 3 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "12 spaces", + "actual": 0 + }, + "line": 4 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "8 spaces", + "actual": 0 + }, + "line": 5 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "12 spaces", + "actual": 0 + }, + "line": 6 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "12 spaces", + "actual": 0 + }, + "line": 7 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 6 errors but had 0: [] + +0 !== 6 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +var geometry, +rotate; +``` + +```json +{ + "output": "var geometry,\n rotate;", + "options": [ + 2, + { + "VariableDeclarator": 1 + } + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 0 + }, + "line": 2 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +var geometry, + rotate; +``` + +```json +{ + "output": "var geometry,\n rotate;", + "options": [ + 2, + { + "VariableDeclarator": 2 + } + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 2 + }, + "line": 2 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Hydrated message "Expected indentation of 4 spaces but found 2." does not match "Expected indentation of 0 spaces but found 2." ++ actual - expected + ++ 'Expected indentation of 0 spaces but found 2.' +- 'Expected indentation of 4 spaces but found 2.' + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +var geometry, +\u0009rotate; +``` + +```json +{ + "code": "var geometry,\n\trotate;", + "output": "var geometry,\n\t\trotate;", + "options": [ + "tab", + { + "VariableDeclarator": 2 + } + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 tabs", + "actual": 1 + }, + "line": 2 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Hydrated message "Expected indentation of 2 tabs but found 1." does not match "Expected indentation of 0 tabs but found 1." ++ actual - expected + ++ 'Expected indentation of 0 tabs but found 1.' +- 'Expected indentation of 2 tabs but found 1.' + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +let geometry, + rotate; +``` + +```json +{ + "output": "let geometry,\n rotate;", + "options": [ + 2, + { + "VariableDeclarator": 2 + } + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 2 + }, + "line": 2 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Hydrated message "Expected indentation of 4 spaces but found 2." does not match "Expected indentation of 0 spaces but found 2." ++ actual - expected + ++ 'Expected indentation of 0 spaces but found 2.' +- 'Expected indentation of 4 spaces but found 2.' + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +if(true) + if (true) + if (true) + console.log(val); +``` + +```json +{ + "output": "if(true)\n if (true)\n if (true)\n console.log(val);", + "options": [ + 2, + { + "VariableDeclarator": 2, + "SwitchCase": 1 + } + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "6 spaces", + "actual": 4 + }, + "line": 4 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + } +] + +3 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +var a = { + a: 1, + b: 2 +} +``` + +```json +{ + "output": "var a = {\n a: 1,\n b: 2\n}", + "options": [ + 2, + { + "VariableDeclarator": 2, + "SwitchCase": 1 + } + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 4 + }, + "line": 2 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 4 + }, + "line": 3 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Hydrated message "Expected indentation of 2 spaces but found 4." does not match "Expected indentation of 0 spaces but found 4." ++ actual - expected + ++ 'Expected indentation of 0 spaces but found 4.' +- 'Expected indentation of 2 spaces but found 4.' + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +var a = [ + a, + b +] +``` + +```json +{ + "output": "var a = [\n a,\n b\n]", + "options": [ + 2, + { + "VariableDeclarator": 2, + "SwitchCase": 1 + } + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 4 + }, + "line": 2 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 4 + }, + "line": 3 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Hydrated message "Expected indentation of 2 spaces but found 4." does not match "Expected indentation of 0 spaces but found 4." ++ actual - expected + ++ 'Expected indentation of 0 spaces but found 4.' +- 'Expected indentation of 2 spaces but found 4.' + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +let a = [ + a, + b +] +``` + +```json +{ + "output": "let a = [\n a,\n b\n]", + "options": [ + 2, + { + "VariableDeclarator": { + "let": 2 + }, + "SwitchCase": 1 + } + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 4 + }, + "line": 2 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 4 + }, + "line": 3 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Hydrated message "Expected indentation of 2 spaces but found 4." does not match "Expected indentation of 0 spaces but found 4." ++ actual - expected + ++ 'Expected indentation of 0 spaces but found 4.' +- 'Expected indentation of 2 spaces but found 4.' + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +var a = new Test({ + a: 1 + }), + b = 4; +``` + +```json +{ + "output": "var a = new Test({\n a: 1\n }),\n b = 4;", + "options": [ + 4 + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "8 spaces", + "actual": 6 + }, + "line": 2 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 2 + }, + "line": 3 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 2 errors but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 6.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 6, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'VariableDeclaration', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + } +] + +3 !== 2 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +var a = new Test({ + a: 1 + }), + b = 4; +const c = new Test({ + a: 1 + }), + d = 4; +``` + +```json +{ + "output": "var a = new Test({\n a: 1\n }),\n b = 4;\nconst c = new Test({\n a: 1\n }),\n d = 4;", + "options": [ + 2, + { + "VariableDeclarator": { + "var": 2 + } + } + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 6 + }, + "line": 6 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 4 + }, + "line": 7 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 4 + }, + "line": 8 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 3 errors but had 6: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 6.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 6, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'VariableDeclaration', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 6.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 6, + column: 0, + endLine: 6, + endColumn: 6, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 7, + column: 0, + endLine: 7, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'VariableDeclaration', + line: 8, + column: 0, + endLine: 8, + endColumn: 4, + suggestions: null + } +] + +6 !== 3 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +var abc = 5, + c = 2, + xyz = + { + a: 1, + b: 2 + }; +``` + +```json +{ + "output": "var abc = 5,\n c = 2,\n xyz =\n {\n a: 1,\n b: 2\n };", + "options": [ + 2, + { + "VariableDeclarator": 2, + "SwitchCase": 1 + } + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "6 spaces", + "actual": 7 + }, + "line": 6 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 4: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'VariableDeclaration', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'VariableDeclaration', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 4 spaces but found 6.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 5, + column: 0, + endLine: 5, + endColumn: 6, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 4 spaces but found 7.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 6, + column: 0, + endLine: 6, + endColumn: 7, + suggestions: null + } +] + +4 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +var abc = + { + a: 1, + b: 2 + }; +``` + +```json +{ + "output": "var abc =\n {\n a: 1,\n b: 2\n };", + "options": [ + 2, + { + "VariableDeclarator": 2, + "SwitchCase": 1 + } + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "7 spaces", + "actual": 8 + }, + "line": 4 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 5 spaces but found 7.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 7, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 5 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 8, + suggestions: null + } +] + +2 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +var foo = { + bar: 1, + baz: { + qux: 2 + } + }, + bar = 1; +``` + +```json +{ + "output": "var foo = {\n bar: 1,\n baz: {\n qux: 2\n }\n },\n bar = 1;", + "options": [ + 2 + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "6 spaces", + "actual": 8 + }, + "line": 4 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 6 + }, + "line": 5 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 2 errors but had 6: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 6.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 5, + column: 0, + endLine: 5, + endColumn: 6, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 6, + column: 0, + endLine: 6, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'VariableDeclaration', + line: 7, + column: 0, + endLine: 7, + endColumn: 2, + suggestions: null + } +] + +6 !== 2 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +var path = require('path') + , crypto = require('crypto') +; +``` + +```json +{ + "output": "var path = require('path')\n , crypto = require('crypto')\n;", + "options": [ + 2 + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 1 + }, + "line": 2 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Hydrated message "Expected indentation of 2 spaces but found 1." does not match "Expected indentation of 0 spaces but found 1." ++ actual - expected + ++ 'Expected indentation of 0 spaces but found 1.' +- 'Expected indentation of 2 spaces but found 1.' + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +var a = 1 + ,b = 2 +; +``` + +```json +{ + "output": "var a = 1\n ,b = 2\n;", + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 3 + }, + "line": 2 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Hydrated message "Expected indentation of 4 spaces but found 3." does not match "Expected indentation of 0 spaces but found 3." ++ actual - expected + ++ 'Expected indentation of 0 spaces but found 3.' +- 'Expected indentation of 4 spaces but found 3.' + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +class A{ + constructor(){} + a(){} + get b(){} +} +``` + +```json +{ + "output": "class A{\n constructor(){}\n a(){}\n get b(){}\n}", + "options": [ + 4, + { + "VariableDeclarator": 1, + "SwitchCase": 1 + } + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 2 + }, + "line": 2 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ClassBody', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ClassBody', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ClassBody', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + } +] + +3 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +var A = class { + constructor(){} + a(){} + get b(){} +}; +``` + +```json +{ + "output": "var A = class {\n constructor(){}\n a(){}\n get b(){}\n};", + "options": [ + 4, + { + "VariableDeclarator": 1, + "SwitchCase": 1 + } + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 2 + }, + "line": 2 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 2 + }, + "line": 4 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 2 errors but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ClassBody', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ClassBody', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ClassBody', + line: 4, + column: 0, + endLine: 4, + endColumn: 2, + suggestions: null + } +] + +3 !== 2 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +var a = 1, + B = class { + constructor(){} + a(){} + get b(){} + }; +``` + +```json +{ + "output": "var a = 1,\n B = class {\n constructor(){}\n a(){}\n get b(){}\n };", + "options": [ + 2, + { + "VariableDeclarator": 2, + "SwitchCase": 1 + } + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "6 spaces", + "actual": 4 + }, + "line": 3 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 5: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'VariableDeclaration', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ClassBody', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 6.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ClassBody', + line: 4, + column: 0, + endLine: 4, + endColumn: 6, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 6.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ClassBody', + line: 5, + column: 0, + endLine: 5, + endColumn: 6, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ClassBody', + line: 6, + column: 0, + endLine: 6, + endColumn: 4, + suggestions: null + } +] + +5 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +{ + if(a){ + foo(); + } + else{ + bar(); + } +} +``` + +```json +{ + "output": "{\n if(a){\n foo();\n }\n else{\n bar();\n }\n}", + "options": [ + 4 + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 2 + }, + "line": 5 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 6: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 5, + column: 0, + endLine: 5, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 6, + column: 0, + endLine: 6, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 7, + column: 0, + endLine: 7, + endColumn: 4, + suggestions: null + } +] + +6 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +{ + if(a){ + foo(); + } + else + bar(); + +} +``` + +```json +{ + "output": "{\n if(a){\n foo();\n }\n else\n bar();\n\n}", + "options": [ + 4 + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 2 + }, + "line": 5 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 5: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 5, + column: 0, + endLine: 5, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 6, + column: 0, + endLine: 6, + endColumn: 8, + suggestions: null + } +] + +5 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +{ + if(a) + foo(); + else + bar(); +} +``` + +```json +{ + "output": "{\n if(a)\n foo();\n else\n bar();\n}", + "options": [ + 4 + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 2 + }, + "line": 4 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 4: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 4, + column: 0, + endLine: 4, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 5, + column: 0, + endLine: 5, + endColumn: 8, + suggestions: null + } +] + +4 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +(function(){ + function foo(x) { + return x + 1; + } +})(); +``` + +```json +{ + "output": "(function(){\nfunction foo(x) {\n return x + 1;\n}\n})();", + "options": [ + 2, + { + "outerIIFEBody": 0 + } + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "0 spaces", + "actual": 2 + }, + "line": 2 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 4 + }, + "line": 3 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "0 spaces", + "actual": 2 + }, + "line": 4 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Hydrated message "Expected indentation of 2 spaces but found 4." does not match "Expected indentation of 0 spaces but found 4." ++ actual - expected + ++ 'Expected indentation of 0 spaces but found 4.' +- 'Expected indentation of 2 spaces but found 4.' + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +(function(){ + function foo(x) { + return x + 1; + } +})(); +``` + +```json +{ + "output": "(function(){\n function foo(x) {\n return x + 1;\n }\n})();", + "options": [ + 4, + { + "outerIIFEBody": 2 + } + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "8 spaces", + "actual": 4 + }, + "line": 2 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "12 spaces", + "actual": 8 + }, + "line": 3 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "8 spaces", + "actual": 4 + }, + "line": 4 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Hydrated message "Expected indentation of 8 spaces but found 4." does not match "Expected indentation of 0 spaces but found 4." ++ actual - expected + ++ 'Expected indentation of 0 spaces but found 4.' +- 'Expected indentation of 8 spaces but found 4.' + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +if(data) { +console.log('hi'); +} +``` + +```json +{ + "output": "if(data) {\n console.log('hi');\n}", + "options": [ + 2, + { + "outerIIFEBody": 0 + } + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 0 + }, + "line": 2 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +var ns = function(){ + function fooVar(x) { + return x + 1; + } +}(x); +``` + +```json +{ + "output": "var ns = function(){\n function fooVar(x) {\n return x + 1;\n }\n}(x);", + "options": [ + 4, + { + "outerIIFEBody": 2 + } + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "8 spaces", + "actual": 4 + }, + "line": 2 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "12 spaces", + "actual": 8 + }, + "line": 3 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "8 spaces", + "actual": 4 + }, + "line": 4 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Hydrated message "Expected indentation of 8 spaces but found 4." does not match "Expected indentation of 0 spaces but found 4." ++ actual - expected + ++ 'Expected indentation of 0 spaces but found 4.' +- 'Expected indentation of 8 spaces but found 4.' + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +var obj = { + foo: function() { + return true; + }() +}; +``` + +```json +{ + "output": "var obj = {\n foo: function() {\n return true;\n }()\n};", + "options": [ + 2, + { + "outerIIFEBody": 0 + } + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 2 + }, + "line": 3 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 4, + column: 0, + endLine: 4, + endColumn: 2, + suggestions: null + } +] + +3 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +typeof function() { + function fooVar(x) { + return x + 1; + } +}(); +``` + +```json +{ + "output": "typeof function() {\n function fooVar(x) {\n return x + 1;\n }\n}();", + "options": [ + 2, + { + "outerIIFEBody": 2 + } + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 4 + }, + "line": 2 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 6 + }, + "line": 3 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 4 + }, + "line": 4 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Hydrated message "Expected indentation of 2 spaces but found 4." does not match "Expected indentation of 0 spaces but found 4." ++ actual - expected + ++ 'Expected indentation of 0 spaces but found 4.' +- 'Expected indentation of 2 spaces but found 4.' + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +{ +\u0009!function(x) { +\u0009\u0009\u0009\u0009return x + 1; +\u0009}() +}; +``` + +```json +{ + "code": "{\n\t!function(x) {\n\t\t\t\treturn x + 1;\n\t}()\n};", + "output": "{\n\t!function(x) {\n\t\treturn x + 1;\n\t}()\n};", + "options": [ + "tab", + { + "outerIIFEBody": 3 + } + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 tabs", + "actual": 4 + }, + "line": 3 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 tabs but found 1.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 1, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 tabs but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 tabs but found 1.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 4, + column: 0, + endLine: 4, + endColumn: 1, + suggestions: null + } +] + +3 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +(function(){ + function foo(x) { + return x + 1; + } +})(); +``` + +```json +{ + "output": "(function(){\n function foo(x) {\n return x + 1;\n }\n})();", + "options": [ + 4, + { + "outerIIFEBody": "off" + } + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "8 spaces", + "actual": 4 + }, + "line": 3 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +(function(){ +function foo(x) { +return x + 1; +} +})(); +``` + +```json +{ + "output": "(function(){\nfunction foo(x) {\n return x + 1;\n}\n})();", + "options": [ + 4, + { + "outerIIFEBody": "off" + } + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 3 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +(() => { + function foo(x) { + return x + 1; + } +})(); +``` + +```json +{ + "output": "(() => {\n function foo(x) {\n return x + 1;\n }\n})();", + "options": [ + 4, + { + "outerIIFEBody": "off" + } + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "8 spaces", + "actual": 4 + }, + "line": 3 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +(() => { +function foo(x) { +return x + 1; +} +})(); +``` + +```json +{ + "output": "(() => {\nfunction foo(x) {\n return x + 1;\n}\n})();", + "options": [ + 4, + { + "outerIIFEBody": "off" + } + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 3 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +Buffer +.toString() +``` + +```json +{ + "output": "Buffer\n .toString()", + "options": [ + 4, + { + "MemberExpression": 1 + } + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 2 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +Buffer + .indexOf('a') +.toString() +``` + +```json +{ + "output": "Buffer\n .indexOf('a')\n .toString()", + "options": [ + 4, + { + "MemberExpression": 1 + } + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 3 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Hydrated message "Expected indentation of 4 spaces but found 0." does not match "Expected indentation of 0 spaces but found 4." ++ actual - expected + ++ 'Expected indentation of 0 spaces but found 4.' +- 'Expected indentation of 4 spaces but found 0.' + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +Buffer. +length +``` + +```json +{ + "output": "Buffer.\n length", + "options": [ + 4, + { + "MemberExpression": 1 + } + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 2 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +Buffer. +\u0009\u0009length +``` + +```json +{ + "code": "Buffer.\n\t\tlength", + "output": "Buffer.\n\tlength", + "options": [ + "tab", + { + "MemberExpression": 1 + } + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "1 tab", + "actual": 2 + }, + "line": 2 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Hydrated message "Expected indentation of 1 tab but found 2." does not match "Expected indentation of 0 tabs but found 2." ++ actual - expected + ++ 'Expected indentation of 0 tabs but found 2.' +- 'Expected indentation of 1 tab but found 2.' + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +Buffer + .foo + .bar +``` + +```json +{ + "output": "Buffer\n .foo\n .bar", + "options": [ + 2, + { + "MemberExpression": 2 + } + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 2 + }, + "line": 2 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 2 + }, + "line": 3 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Hydrated message "Expected indentation of 4 spaces but found 2." does not match "Expected indentation of 0 spaces but found 2." ++ actual - expected + ++ 'Expected indentation of 0 spaces but found 2.' +- 'Expected indentation of 4 spaces but found 2.' + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +function foo() { + new + .target +} +``` + +```json +{ + "output": "function foo() {\n new\n .target\n}", + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "8 spaces", + "actual": 4 + }, + "line": 3 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'MetaProperty', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + } +] + +2 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +function foo() { + new. + target +} +``` + +```json +{ + "output": "function foo() {\n new.\n target\n}", + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "8 spaces", + "actual": 4 + }, + "line": 3 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'MetaProperty', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + } +] + +2 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +if (foo) bar(); +else if (baz) foobar(); + else if (bip) { + qux(); + } +``` + +```json +{ + "output": "if (foo) bar();\nelse if (baz) foobar();\nelse if (bip) {\n qux();\n}", + "options": [ + 2 + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "0 spaces", + "actual": 5 + }, + "line": 3 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 7 + }, + "line": 4 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "0 spaces", + "actual": 5 + }, + "line": 5 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Hydrated message "Expected indentation of 2 spaces but found 7." does not match "Expected indentation of 0 spaces but found 7." ++ actual - expected + ++ 'Expected indentation of 0 spaces but found 7.' +- 'Expected indentation of 2 spaces but found 7.' + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +if (foo) bar(); +else if (baz) { + foobar(); + } else if (boop) { + qux(); + } +``` + +```json +{ + "output": "if (foo) bar();\nelse if (baz) {\n foobar();\n} else if (boop) {\n qux();\n}", + "options": [ + 2 + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 4 + }, + "line": 3 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "0 spaces", + "actual": 5 + }, + "line": 4 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 7 + }, + "line": 5 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "0 spaces", + "actual": 5 + }, + "line": 6 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Hydrated message "Expected indentation of 2 spaces but found 4." does not match "Expected indentation of 0 spaces but found 4." ++ actual - expected + ++ 'Expected indentation of 0 spaces but found 4.' +- 'Expected indentation of 2 spaces but found 4.' + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +function foo(aaa, + bbb, ccc, ddd) { + bar(); +} +``` + +```json +{ + "output": "function foo(aaa,\n bbb, ccc, ddd) {\n bar();\n}", + "options": [ + 2, + { + "FunctionDeclaration": { + "parameters": 1, + "body": 2 + } + } + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 4 + }, + "line": 2 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 6 + }, + "line": 3 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Hydrated message "Expected indentation of 2 spaces but found 4." does not match "Expected indentation of 0 spaces but found 4." ++ actual - expected + ++ 'Expected indentation of 0 spaces but found 4.' +- 'Expected indentation of 2 spaces but found 4.' + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +function foo(aaa, bbb, + ccc, ddd) { +bar(); +} +``` + +```json +{ + "output": "function foo(aaa, bbb,\n ccc, ddd) {\n bar();\n}", + "options": [ + 2, + { + "FunctionDeclaration": { + "parameters": 3, + "body": 1 + } + } + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "6 spaces", + "actual": 2 + }, + "line": 2 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 0 + }, + "line": 3 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 2 errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'FunctionDeclaration', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + } +] + +1 !== 2 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +function foo(aaa, + bbb, + ccc) { + bar(); +} +``` + +```json +{ + "output": "function foo(aaa,\n bbb,\n ccc) {\n bar();\n}", + "options": [ + 4, + { + "FunctionDeclaration": { + "parameters": 1, + "body": 3 + } + } + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 8 + }, + "line": 2 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 2 + }, + "line": 3 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "12 spaces", + "actual": 6 + }, + "line": 4 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Hydrated message "Expected indentation of 4 spaces but found 8." does not match "Expected indentation of 0 spaces but found 8." ++ actual - expected + ++ 'Expected indentation of 0 spaces but found 8.' +- 'Expected indentation of 4 spaces but found 8.' + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +function foo(aaa, + bbb, ccc, + ddd, eee, fff) { + bar(); +} +``` + +```json +{ + "output": "function foo(aaa,\n bbb, ccc,\n ddd, eee, fff) {\n bar();\n}", + "options": [ + 2, + { + "FunctionDeclaration": { + "parameters": "first", + "body": 1 + } + } + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "13 spaces", + "actual": 2 + }, + "line": 2 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "13 spaces", + "actual": 19 + }, + "line": 3 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 3 + }, + "line": 4 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Hydrated message "Expected indentation of 2 spaces but found 3." does not match "Expected indentation of 0 spaces but found 3." ++ actual - expected + ++ 'Expected indentation of 0 spaces but found 3.' +- 'Expected indentation of 2 spaces but found 3.' + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +function foo(aaa, bbb) +{ +bar(); +} +``` + +```json +{ + "output": "function foo(aaa, bbb)\n{\n bar();\n}", + "options": [ + 2, + { + "FunctionDeclaration": { + "body": 3 + } + } + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "6 spaces", + "actual": 0 + }, + "line": 3 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +function foo( +aaa, + bbb) { +bar(); +} +``` + +```json +{ + "output": "function foo(\n aaa,\n bbb) {\n bar();\n}", + "options": [ + 2, + { + "FunctionDeclaration": { + "parameters": "first", + "body": 2 + } + } + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 0 + }, + "line": 2 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 4 + }, + "line": 3 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 4 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 3 errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'FunctionDeclaration', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + } +] + +1 !== 3 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +var foo = function(aaa, + bbb, + ccc, + ddd) { + bar(); +} +``` + +```json +{ + "output": "var foo = function(aaa,\n bbb,\n ccc,\n ddd) {\nbar();\n}", + "options": [ + 2, + { + "FunctionExpression": { + "parameters": 2, + "body": 0 + } + } + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 2 + }, + "line": 2 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 6 + }, + "line": 4 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "0 spaces", + "actual": 2 + }, + "line": 5 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 3 errors but had 4: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'FunctionExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'FunctionExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 6.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'FunctionExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 6, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 5, + column: 0, + endLine: 5, + endColumn: 2, + suggestions: null + } +] + +4 !== 3 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +var foo = function(aaa, + bbb, + ccc) { + bar(); +} +``` + +```json +{ + "output": "var foo = function(aaa,\n bbb,\n ccc) {\n bar();\n}", + "options": [ + 2, + { + "FunctionExpression": { + "parameters": 1, + "body": 10 + } + } + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 3 + }, + "line": 2 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 1 + }, + "line": 3 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "20 spaces", + "actual": 2 + }, + "line": 4 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Hydrated message "Expected indentation of 2 spaces but found 3." does not match "Expected indentation of 0 spaces but found 3." ++ actual - expected + ++ 'Expected indentation of 0 spaces but found 3.' +- 'Expected indentation of 2 spaces but found 3.' + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +var foo = function(aaa, + bbb, ccc, ddd, + eee, fff) { + bar(); +} +``` + +```json +{ + "output": "var foo = function(aaa,\n bbb, ccc, ddd,\n eee, fff) {\n bar();\n}", + "options": [ + 4, + { + "FunctionExpression": { + "parameters": "first", + "body": 1 + } + } + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "19 spaces", + "actual": 2 + }, + "line": 2 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "19 spaces", + "actual": 24 + }, + "line": 3 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 8 + }, + "line": 4 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Hydrated message "Expected indentation of 4 spaces but found 8." does not match "Expected indentation of 0 spaces but found 8." ++ actual - expected + ++ 'Expected indentation of 0 spaces but found 8.' +- 'Expected indentation of 4 spaces but found 8.' + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +var foo = function( +aaa, bbb, ccc, + ddd, eee) { + bar(); +} +``` + +```json +{ + "output": "var foo = function(\n aaa, bbb, ccc,\n ddd, eee) {\n bar();\n}", + "options": [ + 2, + { + "FunctionExpression": { + "parameters": "first", + "body": 3 + } + } + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 0 + }, + "line": 2 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 4 + }, + "line": 3 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "6 spaces", + "actual": 2 + }, + "line": 4 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 3 errors but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'FunctionExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 4, + column: 0, + endLine: 4, + endColumn: 2, + suggestions: null + } +] + +2 !== 3 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +function foo() { +\u0009bar(); + baz(); + qux(); +} +``` + +```json +{ + "code": "function foo() {\n\tbar();\n baz();\n qux();\n}", + "output": "function foo() {\n\tbar();\n\tbaz();\n\tqux();\n}", + "options": [ + "tab" + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "1 tab", + "actual": "2 spaces" + }, + "line": 3 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "1 tab", + "actual": "14 spaces" + }, + "line": 4 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 2 errors but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 tabs but found 1.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 1, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 tabs but found 2 spaces.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 tabs but found 14 spaces.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 4, + column: 0, + endLine: 4, + endColumn: 14, + suggestions: null + } +] + +3 !== 2 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +function foo() { + bar(); +\u0009\u0009} +``` + +```json +{ + "code": "function foo() {\n bar();\n\t\t}", + "output": "function foo() {\n bar();\n}", + "options": [ + 2 + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "0 spaces", + "actual": "2 tabs" + }, + "line": 3 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2 tabs.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 2, + suggestions: null + } +] + +2 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +function foo() { + function bar() { + baz(); + } +} +``` + +```json +{ + "output": "function foo() {\n function bar() {\n baz();\n }\n}", + "options": [ + 2, + { + "FunctionDeclaration": { + "body": 1 + } + } + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 8 + }, + "line": 3 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 4, + column: 0, + endLine: 4, + endColumn: 2, + suggestions: null + } +] + +3 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +function foo() { + function bar(baz, + qux) { + foobar(); + } +} +``` + +```json +{ + "output": "function foo() {\n function bar(baz,\n qux) {\n foobar();\n }\n}", + "options": [ + 2, + { + "FunctionDeclaration": { + "body": 1, + "parameters": 2 + } + } + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "6 spaces", + "actual": 4 + }, + "line": 3 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 4: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'FunctionDeclaration', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 5, + column: 0, + endLine: 5, + endColumn: 2, + suggestions: null + } +] + +4 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +function foo() { + var bar = function(baz, + qux) { + foobar(); + }; +} +``` + +```json +{ + "output": "function foo() {\n var bar = function(baz,\n qux) {\n foobar();\n };\n}", + "options": [ + 2, + { + "FunctionExpression": { + "parameters": 3 + } + } + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "8 spaces", + "actual": 10 + }, + "line": 3 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 4: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 10.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'FunctionExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 10, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 5, + column: 0, + endLine: 5, + endColumn: 2, + suggestions: null + } +] + +4 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +foo.bar( + baz, qux, function() { + qux; + } +); +``` + +```json +{ + "output": "foo.bar(\n baz, qux, function() {\n qux;\n }\n);", + "options": [ + 2, + { + "FunctionExpression": { + "body": 3 + }, + "CallExpression": { + "arguments": 3 + } + } + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "12 spaces", + "actual": 8 + }, + "line": 3 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 6.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'CallExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 6, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 6.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 4, + column: 0, + endLine: 4, + endColumn: 6, + suggestions: null + } +] + +3 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +{ + try { + } +catch (err) { + } +finally { + } +} +``` + +```json +{ + "output": "{\n try {\n }\n catch (err) {\n }\n finally {\n }\n}", + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 4 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 6 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 2 errors but had 4: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 5, + column: 0, + endLine: 5, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 7, + column: 0, + endLine: 7, + endColumn: 4, + suggestions: null + } +] + +4 !== 2 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +{ + do { + } +while (true) +} +``` + +```json +{ + "output": "{\n do {\n }\n while (true)\n}", + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 4 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + } +] + +2 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +function foo() { + return ( + 1 + ) +} +``` + +```json +{ + "output": "function foo() {\n return (\n 1\n )\n}", + "options": [ + 2 + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 4 + }, + "line": 4 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 2 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ReturnStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ReturnStatement', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + } +] + +3 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +function foo() { + return ( + 1 + ); +} +``` + +```json +{ + "output": "function foo() {\n return (\n 1\n );\n}", + "options": [ + 2 + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 4 + }, + "line": 4 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 2 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ReturnStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ReturnStatement', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + } +] + +3 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +function test(){ + switch(length){ + case 1: return function(a){ + return fn.call(that, a); + }; + } +} +``` + +```json +{ + "output": "function test(){\n switch(length){\n case 1: return function(a){\n return fn.call(that, a);\n };\n }\n}", + "options": [ + 2, + { + "VariableDeclarator": 2, + "SwitchCase": 1 + } + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "6 spaces", + "actual": 4 + }, + "line": 4 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 5: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'SwitchStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 5, + column: 0, + endLine: 5, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'SwitchStatement', + line: 6, + column: 0, + endLine: 6, + endColumn: 2, + suggestions: null + } +] + +5 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +function foo() { + return 1 +} +``` + +```json +{ + "output": "function foo() {\n return 1\n}", + "options": [ + 2 + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 3 + }, + "line": 2 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Hydrated message "Expected indentation of 2 spaces but found 3." does not match "Expected indentation of 0 spaces but found 3." ++ actual - expected + ++ 'Expected indentation of 0 spaces but found 3.' +- 'Expected indentation of 2 spaces but found 3.' + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +foo( +bar, + baz, + qux); +``` + +```json +{ + "output": "foo(\n bar,\n baz,\n qux);", + "options": [ + 2, + { + "CallExpression": { + "arguments": 1 + } + } + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 0 + }, + "line": 2 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 4 + }, + "line": 4 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Hydrated message "Expected indentation of 2 spaces but found 0." does not match "Expected indentation of 0 spaces but found 2." ++ actual - expected + ++ 'Expected indentation of 0 spaces but found 2.' +- 'Expected indentation of 2 spaces but found 0.' + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +foo( +\u0009bar, +\u0009baz); +``` + +```json +{ + "code": "foo(\n\tbar,\n\tbaz);", + "output": "foo(\n bar,\n baz);", + "options": [ + 2, + { + "CallExpression": { + "arguments": 2 + } + } + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": "1 tab" + }, + "line": 2 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": "1 tab" + }, + "line": 3 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Hydrated message "Expected indentation of 4 spaces but found 1 tab." does not match "Expected indentation of 0 spaces but found 1 tab." ++ actual - expected + ++ 'Expected indentation of 0 spaces but found 1 tab.' +- 'Expected indentation of 4 spaces but found 1 tab.' + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +foo(bar, +\u0009\u0009baz, +\u0009\u0009qux); +``` + +```json +{ + "code": "foo(bar,\n\t\tbaz,\n\t\tqux);", + "output": "foo(bar,\n\tbaz,\n\tqux);", + "options": [ + "tab", + { + "CallExpression": { + "arguments": 1 + } + } + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "1 tab", + "actual": 2 + }, + "line": 2 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "1 tab", + "actual": 2 + }, + "line": 3 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Hydrated message "Expected indentation of 1 tab but found 2." does not match "Expected indentation of 0 tabs but found 2." ++ actual - expected + ++ 'Expected indentation of 0 tabs but found 2.' +- 'Expected indentation of 1 tab but found 2.' + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +foo( + bar, + baz); +``` + +```json +{ + "output": "foo(\n bar,\n baz);", + "options": [ + 2, + { + "CallExpression": { + "arguments": "first" + } + } + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 10 + }, + "line": 2 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 4 + }, + "line": 3 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Hydrated message "Expected indentation of 2 spaces but found 10." does not match "Expected indentation of 0 spaces but found 10." ++ actual - expected + ++ 'Expected indentation of 0 spaces but found 10.' +- 'Expected indentation of 2 spaces but found 10.' + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +foo(bar, + 1 + 2, + !baz, + new Car('!') +); +``` + +```json +{ + "output": "foo(bar,\n 1 + 2,\n !baz,\n new Car('!')\n);", + "options": [ + 2, + { + "CallExpression": { + "arguments": 3 + } + } + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "6 spaces", + "actual": 2 + }, + "line": 2 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "6 spaces", + "actual": 14 + }, + "line": 3 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "6 spaces", + "actual": 8 + }, + "line": 4 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Hydrated message "Expected indentation of 6 spaces but found 2." does not match "Expected indentation of 0 spaces but found 2." ++ actual - expected + ++ 'Expected indentation of 0 spaces but found 2.' +- 'Expected indentation of 6 spaces but found 2.' + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +if (foo) { + /* comment */bar(); +} +``` + +```json +{ + "output": "if (foo) {\n /* comment */bar();\n}", + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 8 + }, + "line": 2 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Hydrated message "Expected indentation of 4 spaces but found 8." does not match "Expected indentation of 0 spaces but found 8." ++ actual - expected + ++ 'Expected indentation of 0 spaces but found 8.' +- 'Expected indentation of 4 spaces but found 8.' + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +foo('bar', + /** comment */{ + ok: true + }); +``` + +```json +{ + "output": "foo('bar',\n /** comment */{\n ok: true\n });", + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 8 + }, + "line": 2 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'CallExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + } +] + +3 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +foo( +(bar) +); +``` + +```json +{ + "output": "foo(\n (bar)\n);", + "options": [ + 4, + { + "CallExpression": { + "arguments": 1 + } + } + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 2 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +foo +? bar + : baz +``` + +```json +{ + "output": "foo\n ? bar\n : baz", + "options": [ + 2 + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 0 + }, + "line": 2 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 4 + }, + "line": 3 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 2 errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + } +] + +1 !== 2 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +[ + foo ? + bar : + baz, + qux +] +``` + +```json +{ + "output": "[\n foo ?\n bar :\n baz,\n qux\n]", + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 8 + }, + "line": 5 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 4: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrayExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrayExpression', + line: 5, + column: 0, + endLine: 5, + endColumn: 8, + suggestions: null + } +] + +4 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +condition +? () => { +return true +} +: condition2 +? () => { +return true +} +: () => { +return false +} +``` + +```json +{ + "output": "condition\n ? () => {\n return true\n }\n : condition2\n ? () => {\n return true\n }\n : () => {\n return false\n }", + "options": [ + 2, + { + "offsetTernaryExpressions": true + } + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 0 + }, + "line": 2 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "6 spaces", + "actual": 0 + }, + "line": 3 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 4 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 0 + }, + "line": 5 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 6 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "8 spaces", + "actual": 0 + }, + "line": 7 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "6 spaces", + "actual": 0 + }, + "line": 8 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 9 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "8 spaces", + "actual": 0 + }, + "line": 10 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "6 spaces", + "actual": 0 + }, + "line": 11 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 10 errors but had 0: [] + +0 !== 10 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +condition +? () => { +return true +} +: condition2 +? () => { +return true +} +: () => { +return false +} +``` + +```json +{ + "output": "condition\n ? () => {\n return true\n }\n : condition2\n ? () => {\n return true\n }\n : () => {\n return false\n }", + "options": [ + 2, + { + "offsetTernaryExpressions": false + } + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 0 + }, + "line": 2 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 3 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 0 + }, + "line": 4 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 0 + }, + "line": 5 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 6 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "6 spaces", + "actual": 0 + }, + "line": 7 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 8 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 9 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "6 spaces", + "actual": 0 + }, + "line": 10 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 11 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 10 errors but had 0: [] + +0 !== 10 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +[ + // no elements +] +``` + +```json +{ + "output": "[\n // no elements\n]", + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 8 + }, + "line": 2 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Hydrated message "Expected indentation of 4 spaces but found 8." does not match "Expected indentation of 0 spaces but found 8." ++ actual - expected + ++ 'Expected indentation of 0 spaces but found 8.' +- 'Expected indentation of 4 spaces but found 8.' + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +var { +foo, + bar, + baz: qux, + foobar: baz = foobar + } = qux; +``` + +```json +{ + "output": "var {\n foo,\n bar,\n baz: qux,\n foobar: baz = foobar\n} = qux;", + "options": [ + 2 + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 0 + }, + "line": 2 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 4 + }, + "line": 4 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 6 + }, + "line": 5 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "0 spaces", + "actual": 2 + }, + "line": 6 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Hydrated message "Expected indentation of 2 spaces but found 0." does not match "Expected indentation of 0 spaces but found 2." ++ actual - expected + ++ 'Expected indentation of 0 spaces but found 2.' +- 'Expected indentation of 2 spaces but found 0.' + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +const { + a +} = { + a: 1 + } +``` + +```json +{ + "output": "const {\n a\n} = {\n a: 1\n}", + "options": [ + 2 + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 4 + }, + "line": 4 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "0 spaces", + "actual": 2 + }, + "line": 5 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 2 errors but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectPattern', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 5, + column: 0, + endLine: 5, + endColumn: 2, + suggestions: null + } +] + +3 !== 2 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +var foo = [ + bar, + baz + ] +``` + +```json +{ + "output": "var foo = [\n bar,\n baz\n]", + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 11 + }, + "line": 2 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 2 + }, + "line": 3 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "0 spaces", + "actual": 10 + }, + "line": 4 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Hydrated message "Expected indentation of 4 spaces but found 11." does not match "Expected indentation of 0 spaces but found 11." ++ actual - expected + ++ 'Expected indentation of 0 spaces but found 11.' +- 'Expected indentation of 4 spaces but found 11.' + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +var foo = [bar, +baz, + qux +] +``` + +```json +{ + "output": "var foo = [bar,\n baz,\n qux\n]", + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 2 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Hydrated message "Expected indentation of 4 spaces but found 0." does not match "Expected indentation of 0 spaces but found 4." ++ actual - expected + ++ 'Expected indentation of 0 spaces but found 4.' +- 'Expected indentation of 4 spaces but found 0.' + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +var foo = [bar, + baz, + qux +] +``` + +```json +{ + "output": "var foo = [bar,\n baz,\n qux\n]", + "options": [ + 2, + { + "ArrayExpression": 8 + } + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "16 spaces", + "actual": 2 + }, + "line": 2 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "16 spaces", + "actual": 2 + }, + "line": 3 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Hydrated message "Expected indentation of 16 spaces but found 2." does not match "Expected indentation of 0 spaces but found 2." ++ actual - expected + ++ 'Expected indentation of 0 spaces but found 2.' +- 'Expected indentation of 16 spaces but found 2.' + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +var foo = [ + { bar: 1, + baz: 2 }, + { bar: 3, + qux: 4 } +] +``` + +```json +{ + "output": "var foo = [\n { bar: 1,\n baz: 2 },\n { bar: 3,\n qux: 4 }\n]", + "options": [ + 4, + { + "ArrayExpression": 2, + "ObjectExpression": "first" + } + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "10 spaces", + "actual": 12 + }, + "line": 3 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "10 spaces", + "actual": 12 + }, + "line": 5 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 2 errors but had 4: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrayExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 2 spaces but found 12.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 12, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrayExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 2 spaces but found 12.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 5, + column: 0, + endLine: 5, + endColumn: 12, + suggestions: null + } +] + +4 !== 2 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +function foo() { + [ + foo + ] +} +``` + +```json +{ + "output": "function foo() {\n [\n foo\n ]\n}", + "options": [ + 2, + { + "ArrayExpression": 4 + } + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 4 + }, + "line": 2 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "10 spaces", + "actual": 12 + }, + "line": 3 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 4 + }, + "line": 4 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Hydrated message "Expected indentation of 2 spaces but found 4." does not match "Expected indentation of 0 spaces but found 4." ++ actual - expected + ++ 'Expected indentation of 0 spaces but found 4.' +- 'Expected indentation of 2 spaces but found 4.' + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +var [ +foo, + bar, + baz, + foobar = baz + ] = qux; +``` + +```json +{ + "output": "var [\n foo,\n bar,\n baz,\n foobar = baz\n] = qux;", + "options": [ + 2 + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 0 + }, + "line": 2 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 4 + }, + "line": 4 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 6 + }, + "line": 5 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "0 spaces", + "actual": 2 + }, + "line": 6 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Hydrated message "Expected indentation of 2 spaces but found 0." does not match "Expected indentation of 0 spaces but found 2." ++ actual - expected + ++ 'Expected indentation of 0 spaces but found 2.' +- 'Expected indentation of 2 spaces but found 0.' + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +import { +foo, + bar, + baz +} from 'qux'; +``` + +```json +{ + "output": "import {\n foo,\n bar,\n baz\n} from 'qux';", + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + }, + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 2 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 2 + }, + "line": 3 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Hydrated message "Expected indentation of 4 spaces but found 0." does not match "Expected indentation of 0 spaces but found 2." ++ actual - expected + ++ 'Expected indentation of 0 spaces but found 2.' +- 'Expected indentation of 4 spaces but found 0.' + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +import { foo, + bar, + baz, +} from 'qux'; +``` + +```json +{ + "output": "import { foo,\n bar,\n baz,\n} from 'qux';", + "options": [ + 2, + { + "ImportDeclaration": 2 + } + ], + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + }, + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 5 + }, + "line": 3 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ImportDeclaration', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 5.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ImportDeclaration', + line: 3, + column: 0, + endLine: 3, + endColumn: 5, + suggestions: null + } +] + +2 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +var foo = 0, bar = 0, baz = 0; +export { +foo, + bar, + baz +}; +``` + +```json +{ + "output": "var foo = 0, bar = 0, baz = 0;\nexport {\n foo,\n bar,\n baz\n};", + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + }, + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 3 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 2 + }, + "line": 4 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Hydrated message "Expected indentation of 4 spaces but found 0." does not match "Expected indentation of 0 spaces but found 2." ++ actual - expected + ++ 'Expected indentation of 0 spaces but found 2.' +- 'Expected indentation of 4 spaces but found 0.' + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +var foo = 0, bar = 0, baz = 0; +export { +foo, + bar, + baz +} from 'qux'; +``` + +```json +{ + "output": "var foo = 0, bar = 0, baz = 0;\nexport {\n foo,\n bar,\n baz\n} from 'qux';", + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + }, + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 3 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 2 + }, + "line": 4 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Hydrated message "Expected indentation of 4 spaces but found 0." does not match "Expected indentation of 0 spaces but found 2." ++ actual - expected + ++ 'Expected indentation of 0 spaces but found 2.' +- 'Expected indentation of 4 spaces but found 0.' + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +var folder = filePath + .foo() + .bar; +``` + +```json +{ + "output": "var folder = filePath\n .foo()\n .bar;", + "options": [ + 2, + { + "MemberExpression": 2 + } + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 2 + }, + "line": 2 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 6 + }, + "line": 3 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Hydrated message "Expected indentation of 4 spaces but found 2." does not match "Expected indentation of 0 spaces but found 2." ++ actual - expected + ++ 'Expected indentation of 0 spaces but found 2.' +- 'Expected indentation of 4 spaces but found 2.' + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +for (const foo of bar) + baz(); +``` + +```json +{ + "output": "for (const foo of bar)\n baz();", + "options": [ + 2 + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 4 + }, + "line": 2 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Hydrated message "Expected indentation of 2 spaces but found 4." does not match "Expected indentation of 0 spaces but found 4." ++ actual - expected + ++ 'Expected indentation of 0 spaces but found 4.' +- 'Expected indentation of 2 spaces but found 4.' + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +var x = () => + 5; +``` + +```json +{ + "output": "var x = () =>\n 5;", + "options": [ + 2 + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 4 + }, + "line": 2 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Hydrated message "Expected indentation of 2 spaces but found 4." does not match "Expected indentation of 0 spaces but found 4." ++ actual - expected + ++ 'Expected indentation of 0 spaces but found 4.' +- 'Expected indentation of 2 spaces but found 4.' + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +foo && + ![].map(() => { + bar(); +}) +``` + +```json +{ + "output": "foo &&\n ![].map(() => {\n bar();\n })", + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "8 spaces", + "actual": 4 + }, + "line": 3 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 4 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 2 errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 4 spaces but found 0.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 4, + column: 0, + endLine: 4, + endColumn: 0, + suggestions: null + } +] + +1 !== 2 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +foo + || ( + bar + ) +``` + +```json +{ + "output": "foo\n || (\n bar\n )", + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "12 spaces", + "actual": 16 + }, + "line": 3 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "8 spaces", + "actual": 12 + }, + "line": 4 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Hydrated message "Expected indentation of 12 spaces but found 16." does not match "Expected indentation of 4 spaces but found 16." ++ actual - expected + ++ 'Expected indentation of 4 spaces but found 16.' +- 'Expected indentation of 12 spaces but found 16.' + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +`foo${ +bar}` +``` + +```json +{ + "output": "`foo${\n bar}`", + "options": [ + 2 + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 0 + }, + "line": 2 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +`foo${ + `bar${ +baz}`}` +``` + +```json +{ + "output": "`foo${\n `bar${\n baz}`}`", + "options": [ + 2 + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 4 + }, + "line": 2 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 3 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 2 errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'TemplateLiteral', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + } +] + +1 !== 2 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +`foo${ + `bar${ + baz + }` + }` +``` + +```json +{ + "output": "`foo${\n `bar${\n baz\n }`\n}`", + "options": [ + 2 + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 4 + }, + "line": 2 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 2 + }, + "line": 3 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 4 + }, + "line": 4 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "0 spaces", + "actual": 2 + }, + "line": 5 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Hydrated message "Expected indentation of 2 spaces but found 4." does not match "Expected indentation of 0 spaces but found 4." ++ actual - expected + ++ 'Expected indentation of 0 spaces but found 4.' +- 'Expected indentation of 2 spaces but found 4.' + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +`foo${ +( + bar +) +}` +``` + +```json +{ + "output": "`foo${\n (\n bar\n )\n}`", + "options": [ + 2 + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 0 + }, + "line": 2 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 2 + }, + "line": 3 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 0 + }, + "line": 4 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 3 errors but had 0: [] + +0 !== 3 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +function foo() { + `foo${bar}baz${ +qux}foo${ + bar}baz` +} +``` + +```json +{ + "output": "function foo() {\n `foo${bar}baz${\n qux}foo${\n bar}baz`\n}", + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "8 spaces", + "actual": 0 + }, + "line": 3 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "8 spaces", + "actual": 2 + }, + "line": 4 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Hydrated message "Expected indentation of 8 spaces but found 0." does not match "Expected indentation of 0 spaces but found 4." ++ actual - expected + ++ 'Expected indentation of 0 spaces but found 4.' +- 'Expected indentation of 8 spaces but found 0.' + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +function foo() { + const template = `the indentation of +a curly element in a ${ + node.type + } node is checked.`; +} +``` + +```json +{ + "output": "function foo() {\n const template = `the indentation of\na curly element in a ${\n node.type\n} node is checked.`;\n}", + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 8 + }, + "line": 4 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "0 spaces", + "actual": 4 + }, + "line": 5 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 2 errors but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'TemplateLiteral', + line: 4, + column: 0, + endLine: 4, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'TemplateLiteral', + line: 5, + column: 0, + endLine: 5, + endColumn: 4, + suggestions: null + } +] + +3 !== 2 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +function foo() { + const template = `this time the +closing curly is at the end of the line ${ + foo} + so the spaces before this line aren't removed.`; +} +``` + +```json +{ + "output": "function foo() {\n const template = `this time the\nclosing curly is at the end of the line ${\n foo}\n so the spaces before this line aren't removed.`;\n}", + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 12 + }, + "line": 4 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 12.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'TemplateLiteral', + line: 4, + column: 0, + endLine: 4, + endColumn: 12, + suggestions: null + } +] + +2 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +if (true) { + a = ( +1 + + 2); +} +``` + +```json +{ + "output": "if (true) {\n a = (\n 1 +\n 2);\n}", + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "8 spaces", + "actual": 0 + }, + "line": 3 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 4 spaces but found 0.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'Literal', + line: 3, + column: 0, + endLine: 3, + endColumn: 0, + suggestions: null + } +] + +2 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +if (true) { + for (;;) { + b(); + } +} +``` + +```json +{ + "output": "if (true) {\n for (;;) {\n b();\n }\n}", + "options": [ + 2 + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 4 + }, + "line": 2 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 6 + }, + "line": 3 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 2 errors but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 6.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 6, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 4, + column: 0, + endLine: 4, + endColumn: 2, + suggestions: null + } +] + +3 !== 2 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +function f() { + return asyncCall() + .then( + 'some string', + [ + 1, + 2, + 3 + ] +); + } +``` + +```json +{ + "output": "function f() {\n return asyncCall()\n .then(\n 'some string',\n [\n 1,\n 2,\n 3\n ]\n );\n}", + "options": [ + 4, + { + "MemberExpression": 1, + "CallExpression": { + "arguments": 1 + } + } + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "8 spaces", + "actual": 4 + }, + "line": 3 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "12 spaces", + "actual": 15 + }, + "line": 4 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "12 spaces", + "actual": 14 + }, + "line": 5 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "16 spaces", + "actual": 14 + }, + "line": 6 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "16 spaces", + "actual": 9 + }, + "line": 7 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "16 spaces", + "actual": 35 + }, + "line": 8 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "12 spaces", + "actual": 22 + }, + "line": 9 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "8 spaces", + "actual": 0 + }, + "line": 10 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "0 spaces", + "actual": 1 + }, + "line": 11 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Hydrated message "Expected indentation of 8 spaces but found 4." does not match "Expected indentation of 0 spaces but found 4." ++ actual - expected + ++ 'Expected indentation of 0 spaces but found 4.' +- 'Expected indentation of 8 spaces but found 4.' + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +var x = [ + [1], + [2] +] +``` + +```json +{ + "output": "var x = [\n [1],\n [2]\n]", + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 6 + }, + "line": 2 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 2 + }, + "line": 3 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Hydrated message "Expected indentation of 4 spaces but found 6." does not match "Expected indentation of 0 spaces but found 6." ++ actual - expected + ++ 'Expected indentation of 0 spaces but found 6.' +- 'Expected indentation of 4 spaces but found 6.' + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +var y = [ + {a: 1}, + {b: 2} +] +``` + +```json +{ + "output": "var y = [\n {a: 1},\n {b: 2}\n]", + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 6 + }, + "line": 2 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 2 + }, + "line": 3 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Hydrated message "Expected indentation of 4 spaces but found 6." does not match "Expected indentation of 0 spaces but found 6." ++ actual - expected + ++ 'Expected indentation of 0 spaces but found 6.' +- 'Expected indentation of 4 spaces but found 6.' + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +foo( + bar, + { + baz: 1 + } +) +``` + +```json +{ + "output": "foo(\n bar,\n {\n baz: 1\n }\n)", + "options": [ + 4, + { + "CallExpression": { + "arguments": "first" + } + } + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 8 + }, + "line": 2 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 4: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'CallExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'CallExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 5, + column: 0, + endLine: 5, + endColumn: 4, + suggestions: null + } +] + +4 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +var foo = 0, bar = 0, baz = 0; +export { +foo, + bar, + baz +} +``` + +```json +{ + "output": "var foo = 0, bar = 0, baz = 0;\nexport {\n foo,\n bar,\n baz\n}", + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + }, + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 3 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 8 + }, + "line": 4 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 2 + }, + "line": 5 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 3 errors but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ExportNamedDeclaration', + line: 4, + column: 0, + endLine: 4, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ExportNamedDeclaration', + line: 5, + column: 0, + endLine: 5, + endColumn: 2, + suggestions: null + } +] + +2 !== 3 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +foo + ? bar +: baz +``` + +```json +{ + "output": "foo\n ? bar\n : baz", + "options": [ + 4, + { + "flatTernaryExpressions": true + } + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 3 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Hydrated message "Expected indentation of 4 spaces but found 0." does not match "Expected indentation of 0 spaces but found 4." ++ actual - expected + ++ 'Expected indentation of 0 spaces but found 4.' +- 'Expected indentation of 4 spaces but found 0.' + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +foo ? + bar : +baz +``` + +```json +{ + "output": "foo ?\n bar :\n baz", + "options": [ + 4, + { + "flatTernaryExpressions": true + } + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 3 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Hydrated message "Expected indentation of 4 spaces but found 0." does not match "Expected indentation of 0 spaces but found 4." ++ actual - expected + ++ 'Expected indentation of 0 spaces but found 4.' +- 'Expected indentation of 4 spaces but found 0.' + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +foo ? + bar + : baz +``` + +```json +{ + "output": "foo ?\n bar\n : baz", + "options": [ + 4, + { + "flatTernaryExpressions": true + } + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 2 + }, + "line": 3 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 2, + suggestions: null + } +] + +2 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +foo + ? bar : +baz +``` + +```json +{ + "output": "foo\n ? bar :\n baz", + "options": [ + 4, + { + "flatTernaryExpressions": true + } + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 3 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Hydrated message "Expected indentation of 4 spaces but found 0." does not match "Expected indentation of 0 spaces but found 4." ++ actual - expected + ++ 'Expected indentation of 0 spaces but found 4.' +- 'Expected indentation of 4 spaces but found 0.' + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +foo ? bar + : baz ? qux + : foobar ? boop + : beep +``` + +```json +{ + "output": "foo ? bar\n : baz ? qux\n : foobar ? boop\n : beep", + "options": [ + 4, + { + "flatTernaryExpressions": true + } + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 8 + }, + "line": 3 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 12 + }, + "line": 4 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 2 errors but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 12.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 12, + suggestions: null + } +] + +3 !== 2 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +foo ? bar : + baz ? qux : + foobar ? boop : + beep +``` + +```json +{ + "output": "foo ? bar :\n baz ? qux :\n foobar ? boop :\n beep", + "options": [ + 4, + { + "flatTernaryExpressions": true + } + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 8 + }, + "line": 3 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 12 + }, + "line": 4 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 2 errors but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 12.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 12, + suggestions: null + } +] + +3 !== 2 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +var a = + foo + ? bar + : baz +``` + +```json +{ + "output": "var a =\n foo\n ? bar\n : baz", + "options": [ + 4, + { + "flatTernaryExpressions": true + } + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "8 spaces", + "actual": 4 + }, + "line": 3 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "8 spaces", + "actual": 4 + }, + "line": 4 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 2 errors but had 0: [] + +0 !== 2 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +foo ? bar + : baz ? qux + : foobar ? boop + : beep +``` + +```json +{ + "output": "foo ? bar\n : baz ? qux\n : foobar ? boop\n : beep", + "options": [ + 4, + { + "flatTernaryExpressions": false + } + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "8 spaces", + "actual": 4 + }, + "line": 3 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "12 spaces", + "actual": 4 + }, + "line": 4 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 2 errors but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + } +] + +3 !== 2 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +foo ? bar : + baz ? qux : + foobar ? boop : + beep +``` + +```json +{ + "output": "foo ? bar :\n baz ? qux :\n foobar ? boop :\n beep", + "options": [ + 4, + { + "flatTernaryExpressions": false + } + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "8 spaces", + "actual": 4 + }, + "line": 3 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "12 spaces", + "actual": 4 + }, + "line": 4 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 2 errors but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + } +] + +3 !== 2 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +foo + ? bar + : baz + ? qux + : foobar + ? boop + : beep +``` + +```json +{ + "output": "foo\n ? bar\n : baz\n ? qux\n : foobar\n ? boop\n : beep", + "options": [ + 4, + { + "flatTernaryExpressions": false + } + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "8 spaces", + "actual": 4 + }, + "line": 4 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "8 spaces", + "actual": 4 + }, + "line": 5 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "12 spaces", + "actual": 4 + }, + "line": 6 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "12 spaces", + "actual": 4 + }, + "line": 7 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 4 errors but had 6: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 5, + column: 0, + endLine: 5, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 6, + column: 0, + endLine: 6, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 7, + column: 0, + endLine: 7, + endColumn: 4, + suggestions: null + } +] + +6 !== 4 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +foo ? + bar : + baz ? + qux : + foobar ? + boop : + beep +``` + +```json +{ + "output": "foo ?\n bar :\n baz ?\n qux :\n foobar ?\n boop :\n beep", + "options": [ + 4, + { + "flatTernaryExpressions": false + } + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "8 spaces", + "actual": 4 + }, + "line": 4 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "8 spaces", + "actual": 4 + }, + "line": 5 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "12 spaces", + "actual": 4 + }, + "line": 6 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "12 spaces", + "actual": 4 + }, + "line": 7 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 4 errors but had 6: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 5, + column: 0, + endLine: 5, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 6, + column: 0, + endLine: 6, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 7, + column: 0, + endLine: 7, + endColumn: 4, + suggestions: null + } +] + +6 !== 4 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +foo.bar('baz', function(err) { + qux; +}); +``` + +```json +{ + "output": "foo.bar('baz', function(err) {\n qux;\n});", + "options": [ + 2, + { + "CallExpression": { + "arguments": "first" + } + } + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 10 + }, + "line": 2 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Hydrated message "Expected indentation of 2 spaces but found 10." does not match "Expected indentation of 0 spaces but found 10." ++ actual - expected + ++ 'Expected indentation of 0 spaces but found 10.' +- 'Expected indentation of 2 spaces but found 10.' + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +foo.bar(function() { + cookies; +}).baz(function() { + cookies; + }); +``` + +```json +{ + "output": "foo.bar(function() {\n cookies;\n}).baz(function() {\n cookies;\n});", + "options": [ + 2, + { + "MemberExpression": 1 + } + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 4 + }, + "line": 4 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "0 spaces", + "actual": 2 + }, + "line": 5 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 2 errors but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 5, + column: 0, + endLine: 5, + endColumn: 2, + suggestions: null + } +] + +3 !== 2 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +foo.bar().baz(function() { + cookies; +}).qux(function() { + cookies; + }); +``` + +```json +{ + "output": "foo.bar().baz(function() {\n cookies;\n}).qux(function() {\n cookies;\n});", + "options": [ + 2, + { + "MemberExpression": 1 + } + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 4 + }, + "line": 4 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "0 spaces", + "actual": 2 + }, + "line": 5 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 2 errors but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 5, + column: 0, + endLine: 5, + endColumn: 2, + suggestions: null + } +] + +3 !== 2 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +[ foo, + bar ].forEach(function() { + baz; + }) +``` + +```json +{ + "output": "[ foo,\n bar ].forEach(function() {\n baz;\n})", + "options": [ + 2, + { + "ArrayExpression": "first", + "MemberExpression": 1 + } + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 4 + }, + "line": 3 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "0 spaces", + "actual": 2 + }, + "line": 4 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Hydrated message "Expected indentation of 2 spaces but found 4." does not match "Expected indentation of 0 spaces but found 4." ++ actual - expected + ++ 'Expected indentation of 0 spaces but found 4.' +- 'Expected indentation of 2 spaces but found 4.' + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +foo[ + bar + ]; +``` + +```json +{ + "output": "foo[\n bar\n];", + "options": [ + 4, + { + "MemberExpression": 1 + } + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "0 spaces", + "actual": 4 + }, + "line": 3 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'MemberExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'MemberExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + } +] + +2 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +foo({ +bar: 1, +baz: 2 +}) +``` + +```json +{ + "output": "foo({\n bar: 1,\n baz: 2\n})", + "options": [ + 4, + { + "ObjectExpression": "first" + } + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 2 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 3 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 2 errors but had 0: [] + +0 !== 2 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +foo( + bar, baz, + qux); +``` + +```json +{ + "output": "foo(\n bar, baz,\n qux);", + "options": [ + 2, + { + "CallExpression": { + "arguments": "first" + } + } + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 24 + }, + "line": 2 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 24 + }, + "line": 3 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Hydrated message "Expected indentation of 2 spaces but found 24." does not match "Expected indentation of 0 spaces but found 24." ++ actual - expected + ++ 'Expected indentation of 0 spaces but found 24.' +- 'Expected indentation of 2 spaces but found 24.' + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +if (foo) +; +``` + +```json +{ + "output": "if (foo)\n ;", + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 2 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +import {foo} +from 'bar'; +``` + +```json +{ + "output": "import {foo}\n from 'bar';", + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + }, + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 2 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +export {foo} +from 'bar'; +``` + +```json +{ + "output": "export {foo}\n from 'bar';", + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + }, + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 2 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +( + a +) => b => { + c + } +``` + +```json +{ + "output": "(\n a\n) => b => {\n c\n}", + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 8 + }, + "line": 4 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "0 spaces", + "actual": 4 + }, + "line": 5 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 2 errors but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrowFunctionExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 4, + column: 0, + endLine: 4, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 5, + column: 0, + endLine: 5, + endColumn: 4, + suggestions: null + } +] + +3 !== 2 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +( + a +) => b => c => d => { + e + } +``` + +```json +{ + "output": "(\n a\n) => b => c => d => {\n e\n}", + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 8 + }, + "line": 4 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "0 spaces", + "actual": 4 + }, + "line": 5 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 2 errors but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrowFunctionExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 4, + column: 0, + endLine: 4, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 5, + column: 0, + endLine: 5, + endColumn: 4, + suggestions: null + } +] + +3 !== 2 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +if ( + foo +) bar( + baz + ); +``` + +```json +{ + "output": "if (\n foo\n) bar(\n baz\n);", + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 8 + }, + "line": 4 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "0 spaces", + "actual": 4 + }, + "line": 5 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Hydrated message "Expected indentation of 4 spaces but found 8." does not match "Expected indentation of 0 spaces but found 8." ++ actual - expected + ++ 'Expected indentation of 0 spaces but found 8.' +- 'Expected indentation of 4 spaces but found 8.' + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +( + foo +)( + bar + ) +``` + +```json +{ + "output": "(\n foo\n)(\n bar\n)", + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 8 + }, + "line": 4 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "0 spaces", + "actual": 4 + }, + "line": 5 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Hydrated message "Expected indentation of 4 spaces but found 8." does not match "Expected indentation of 0 spaces but found 8." ++ actual - expected + ++ 'Expected indentation of 0 spaces but found 8.' +- 'Expected indentation of 4 spaces but found 8.' + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +(() => + foo +)( + bar + ) +``` + +```json +{ + "output": "(() =>\n foo\n)(\n bar\n)", + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 8 + }, + "line": 4 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "0 spaces", + "actual": 4 + }, + "line": 5 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 2 errors but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrowFunctionExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'CallExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'CallExpression', + line: 5, + column: 0, + endLine: 5, + endColumn: 4, + suggestions: null + } +] + +3 !== 2 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +(() => { + foo(); +})( + bar + ) +``` + +```json +{ + "output": "(() => {\n foo();\n})(\n bar\n)", + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 8 + }, + "line": 4 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "0 spaces", + "actual": 4 + }, + "line": 5 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 2 errors but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'CallExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'CallExpression', + line: 5, + column: 0, + endLine: 5, + endColumn: 4, + suggestions: null + } +] + +3 !== 2 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +foo. + bar. + baz +``` + +```json +{ + "output": "foo.\n bar.\n baz", + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 2 + }, + "line": 2 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 6 + }, + "line": 3 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Hydrated message "Expected indentation of 4 spaces but found 2." does not match "Expected indentation of 0 spaces but found 2." ++ actual - expected + ++ 'Expected indentation of 0 spaces but found 2.' +- 'Expected indentation of 4 spaces but found 2.' + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +const foo = a.b(), + longName + = (baz( + 'bar', + 'bar' + )); +``` + +```json +{ + "output": "const foo = a.b(),\n longName\n = (baz(\n 'bar',\n 'bar'\n ));", + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "8 spaces", + "actual": 12 + }, + "line": 4 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "8 spaces", + "actual": 12 + }, + "line": 5 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 8 + }, + "line": 6 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 3 errors but had 4: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'VariableDeclaration', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 12.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'CallExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 12, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 12.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'CallExpression', + line: 5, + column: 0, + endLine: 5, + endColumn: 12, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'CallExpression', + line: 6, + column: 0, + endLine: 6, + endColumn: 8, + suggestions: null + } +] + +4 !== 3 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +const foo = a.b(), + longName = + (baz( + 'bar', + 'bar' + )); +``` + +```json +{ + "output": "const foo = a.b(),\n longName =\n (baz(\n 'bar',\n 'bar'\n ));", + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "8 spaces", + "actual": 12 + }, + "line": 4 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "8 spaces", + "actual": 12 + }, + "line": 5 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 8 + }, + "line": 6 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 3 errors but had 4: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'VariableDeclaration', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 4 spaces but found 12.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'CallExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 12, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 4 spaces but found 12.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'CallExpression', + line: 5, + column: 0, + endLine: 5, + endColumn: 12, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 4 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'CallExpression', + line: 6, + column: 0, + endLine: 6, + endColumn: 8, + suggestions: null + } +] + +4 !== 3 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +const foo = a.b(), + longName + =baz( + 'bar', + 'bar' + ); +``` + +```json +{ + "output": "const foo = a.b(),\n longName\n =baz(\n 'bar',\n 'bar'\n );", + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "8 spaces", + "actual": 4 + }, + "line": 6 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 4: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'VariableDeclaration', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 12.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'CallExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 12, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 12.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'CallExpression', + line: 5, + column: 0, + endLine: 5, + endColumn: 12, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'CallExpression', + line: 6, + column: 0, + endLine: 6, + endColumn: 4, + suggestions: null + } +] + +4 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +const foo = a.b(), + longName + =( + 'fff' + ); +``` + +```json +{ + "output": "const foo = a.b(),\n longName\n =(\n 'fff'\n );", + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "12 spaces", + "actual": 8 + }, + "line": 4 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'VariableDeclaration', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 4 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'VariableDeclarator', + line: 4, + column: 0, + endLine: 4, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'VariableDeclarator', + line: 5, + column: 0, + endLine: 5, + endColumn: 8, + suggestions: null + } +] + +3 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +namespace Foo { + const bar = 3, + baz = 2; + + if (true) { + const bax = 3; + } +} +``` + +```json +{ + "output": "namespace Foo {\n const bar = 3,\n baz = 2;\n\n if (true) {\n const bax = 3;\n }\n}", + "languageOptions": { + "parser": {} + }, + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "8 spaces", + "actual": 4 + }, + "line": 3 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "8 spaces", + "actual": 4 + }, + "line": 6 + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### indent > invalid + +```js +abstract class Foo { + public bar() { + let aaa = 4, + boo; + + if (true) { + boo = 3; + } + + boo = 3 + 2; + } +} +``` + +```json +{ + "output": "abstract class Foo {\n public bar() {\n let aaa = 4,\n boo;\n\n if (true) {\n boo = 3;\n }\n\n boo = 3 + 2;\n }\n}", + "languageOptions": { + "parser": {} + }, + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "12 spaces", + "actual": 8 + }, + "line": 4 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "12 spaces", + "actual": 8 + }, + "line": 7 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "8 spaces", + "actual": 4 + }, + "line": 10 + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### indent > invalid + +```js +function foo() { + function bar() { + abstract class X { + public baz() { + if (true) { + qux(); + } + } + } + } +} +``` + +```json +{ + "output": "function foo() {\n function bar() {\n abstract class X {\n public baz() {\n if (true) {\n qux();\n }\n }\n }\n }\n}", + "languageOptions": { + "parser": {} + }, + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "12 spaces", + "actual": 8 + }, + "line": 4 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "16 spaces", + "actual": 8 + }, + "line": 5 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "20 spaces", + "actual": 8 + }, + "line": 6 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "16 spaces", + "actual": 8 + }, + "line": 7 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "12 spaces", + "actual": 8 + }, + "line": 8 + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### indent > invalid + +```js +namespace Unknown { + function foo() { + function bar() { + abstract class X { + public baz() { + if (true) { + qux(); + } + } + } + } + } +} +``` + +```json +{ + "output": "namespace Unknown {\n function foo() {\n function bar() {\n abstract class X {\n public baz() {\n if (true) {\n qux();\n }\n }\n }\n }\n }\n}", + "languageOptions": { + "parser": {} + }, + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "8 spaces", + "actual": 4 + }, + "line": 3 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "24 spaces", + "actual": 20 + }, + "line": 7 + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### indent > invalid + +```js + + + +``` + +```json +{ + "output": "\n \n", + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 2 + }, + "line": 2 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Hydrated message "Expected indentation of 4 spaces but found 2." does not match "Expected indentation of 0 spaces but found 2." ++ actual - expected + ++ 'Expected indentation of 0 spaces but found 2.' +- 'Expected indentation of 4 spaces but found 2.' + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js + + + +``` + +```json +{ + "output": "\n \n", + "options": [ + 2 + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 4 + }, + "line": 2 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Hydrated message "Expected indentation of 2 spaces but found 4." does not match "Expected indentation of 0 spaces but found 4." ++ actual - expected + ++ 'Expected indentation of 0 spaces but found 4.' +- 'Expected indentation of 2 spaces but found 4.' + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js + + + +``` + +```json +{ + "output": "\n\t\n", + "options": [ + "tab" + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "1 tab", + "actual": "4 spaces" + }, + "line": 2 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Hydrated message "Expected indentation of 1 tab but found 4 spaces." does not match "Expected indentation of 0 tabs but found 4 spaces." ++ actual - expected + ++ 'Expected indentation of 0 tabs but found 4 spaces.' +- 'Expected indentation of 1 tab but found 4 spaces.' + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +function App() { + return + + ; +} +``` + +```json +{ + "output": "function App() {\n return \n \n ;\n}", + "options": [ + 2 + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 9 + }, + "line": 4 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXText', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 9.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXText', + line: 4, + column: 0, + endLine: 4, + endColumn: 9, + suggestions: null + } +] + +3 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +function App() { + return ( + + ); +} +``` + +```json +{ + "output": "function App() {\n return (\n \n );\n}", + "options": [ + 2 + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 4 + }, + "line": 4 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXText', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXText', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + } +] + +3 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +function App() { + return ( + + + + ); +} +``` + +```json +{ + "output": "function App() {\n return (\n \n \n \n );\n}", + "options": [ + 2 + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 3 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "6 spaces", + "actual": 2 + }, + "line": 4 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 5 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 3 errors but had 4: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 2 spaces but found 0.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXOpeningElement', + line: 3, + column: 0, + endLine: 3, + endColumn: 0, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 2 spaces but found 0.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXClosingElement', + line: 5, + column: 0, + endLine: 5, + endColumn: 0, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ReturnStatement', + line: 6, + column: 0, + endLine: 6, + endColumn: 2, + suggestions: null + } +] + +4 !== 3 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js + + {test} + +``` + +```json +{ + "output": "\n {test}\n", + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 1 + }, + "line": 2 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Hydrated message "Expected indentation of 4 spaces but found 1." does not match "Expected indentation of 0 spaces but found 1." ++ actual - expected + ++ 'Expected indentation of 0 spaces but found 1.' +- 'Expected indentation of 4 spaces but found 1.' + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js + + {options.map((option, index) => ( + + ))} + +``` + +```json +{ + "output": "\n {options.map((option, index) => (\n \n ))}\n", + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "12 spaces", + "actual": 11 + }, + "line": 4 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 5: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXText', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 4 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrowFunctionExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 4 spaces but found 11.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXText', + line: 4, + column: 0, + endLine: 4, + endColumn: 11, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 4 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXText', + line: 5, + column: 0, + endLine: 5, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrowFunctionExpression', + line: 6, + column: 0, + endLine: 6, + endColumn: 4, + suggestions: null + } +] + +5 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +[ +
, +
+] +``` + +```json +{ + "output": "[\n
,\n
\n]", + "options": [ + 2 + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 4 + }, + "line": 3 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrayExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrayExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + } +] + +2 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js + + + + + +``` + +```json +{ + "output": "\n\n\t\n\n", + "options": [ + "tab" + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "1 tab", + "actual": "1 space" + }, + "line": 3 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Hydrated message "Expected indentation of 1 tab but found 1 space." does not match "Expected indentation of 0 tabs but found 1 space." ++ actual - expected + ++ 'Expected indentation of 0 tabs but found 1 space.' +- 'Expected indentation of 1 tab but found 1 space.' + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +foo ? + : + +``` + +```json +{ + "output": "foo ?\n :\n ", + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 3 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Hydrated message "Expected indentation of 4 spaces but found 0." does not match "Expected indentation of 0 spaces but found 4." ++ actual - expected + ++ 'Expected indentation of 0 spaces but found 4.' +- 'Expected indentation of 4 spaces but found 0.' + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +foo ? + +: + +``` + +```json +{ + "output": "foo ?\n \n :\n ", + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 3 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 4 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 2 errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + } +] + +1 !== 2 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +foo ? ( + +) : + +``` + +```json +{ + "output": "foo ? (\n \n) :\n ", + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 4 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js + +``` + +```json +{ + "output": "", + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 2 + }, + "line": 2 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Hydrated message "Expected indentation of 4 spaces but found 2." does not match "Expected indentation of 0 spaces but found 2." ++ actual - expected + ++ 'Expected indentation of 0 spaces but found 2.' +- 'Expected indentation of 4 spaces but found 2.' + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js + +``` + +```json +{ + "output": "", + "options": [ + 2 + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "0 spaces", + "actual": 2 + }, + "line": 3 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXOpeningElement', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXOpeningElement', + line: 3, + column: 0, + endLine: 3, + endColumn: 2, + suggestions: null + } +] + +2 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js + +``` + +```json +{ + "output": "", + "options": [ + 2 + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "0 spaces", + "actual": 2 + }, + "line": 3 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXOpeningElement', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXOpeningElement', + line: 3, + column: 0, + endLine: 3, + endColumn: 2, + suggestions: null + } +] + +2 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +const Button = function(props) { + return ( + + ); +}; +``` + +```json +{ + "output": "const Button = function(props) {\n return (\n \n Button Text\n \n );\n};", + "options": [ + 2 + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 36 + }, + "line": 6 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 7: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 2 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ReturnStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 2 spaces but found 6.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXOpeningElement', + line: 4, + column: 0, + endLine: 4, + endColumn: 6, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 2 spaces but found 6.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXOpeningElement', + line: 5, + column: 0, + endLine: 5, + endColumn: 6, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 2 spaces but found 36.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXOpeningElement', + line: 6, + column: 0, + endLine: 6, + endColumn: 36, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 2 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXText', + line: 8, + column: 0, + endLine: 8, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ReturnStatement', + line: 9, + column: 0, + endLine: 9, + endColumn: 2, + suggestions: null + } +] + +7 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +var x = function() { + return +} +``` + +```json +{ + "output": "var x = function() {\n return \n}", + "options": [ + 2 + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 9 + }, + "line": 4 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXOpeningElement', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 9.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXOpeningElement', + line: 4, + column: 0, + endLine: 4, + endColumn: 9, + suggestions: null + } +] + +3 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +var x = +``` + +```json +{ + "output": "var x = ", + "options": [ + 2 + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "0 spaces", + "actual": 8 + }, + "line": 3 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXOpeningElement', + line: 2, + column: 0, + endLine: 2, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXOpeningElement', + line: 3, + column: 0, + endLine: 3, + endColumn: 8, + suggestions: null + } +] + +2 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js + +``` + +```json +{ + "code": "", + "output": "", + "options": [ + "tab" + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "0 tabs", + "actual": 1 + }, + "line": 3 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 tabs but found 1.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXOpeningElement', + line: 2, + column: 0, + endLine: 2, + endColumn: 1, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 tabs but found 1.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXOpeningElement', + line: 3, + column: 0, + endLine: 3, + endColumn: 1, + suggestions: null + } +] + +2 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js + +``` + +```json +{ + "code": "", + "output": "", + "options": [ + "tab" + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "0 tabs", + "actual": 1 + }, + "line": 3 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 tabs but found 1.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXOpeningElement', + line: 2, + column: 0, + endLine: 2, + endColumn: 1, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 tabs but found 1.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXOpeningElement', + line: 3, + column: 0, + endLine: 3, + endColumn: 1, + suggestions: null + } +] + +2 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +< + foo + .bar + .baz +> + foo + +``` + +```json +{ + "output": "<\n foo\n .bar\n .baz\n>\n foo\n", + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "8 spaces", + "actual": 4 + }, + "line": 3 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "8 spaces", + "actual": 4 + }, + "line": 4 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "8 spaces", + "actual": 4 + }, + "line": 9 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "8 spaces", + "actual": 4 + }, + "line": 10 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 4 errors but had 6: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXOpeningElement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXMemberExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXMemberExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXClosingElement', + line: 8, + column: 0, + endLine: 8, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXMemberExpression', + line: 9, + column: 0, + endLine: 9, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXMemberExpression', + line: 10, + column: 0, + endLine: 10, + endColumn: 4, + suggestions: null + } +] + +6 !== 4 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +< + input + type= + "number" +/> +``` + +```json +{ + "output": "<\n input\n type=\n \"number\"\n/>", + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "8 spaces", + "actual": 4 + }, + "line": 4 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXOpeningElement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXOpeningElement', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXAttribute', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + } +] + +3 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +< + input + type= + {'number'} +/> +``` + +```json +{ + "output": "<\n input\n type=\n {'number'}\n/>", + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "8 spaces", + "actual": 4 + }, + "line": 4 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXOpeningElement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXOpeningElement', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXAttribute', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + } +] + +3 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +< + input + type + ="number" +/> +``` + +```json +{ + "output": "<\n input\n type\n =\"number\"\n/>", + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "8 spaces", + "actual": 4 + }, + "line": 4 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXOpeningElement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXOpeningElement', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXAttribute', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + } +] + +3 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +
+ { + ( + 1 + ) + } +
+``` + +```json +{ + "output": "
\n {\n (\n 1\n )\n }\n
", + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "8 spaces", + "actual": 4 + }, + "line": 3 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "12 spaces", + "actual": 8 + }, + "line": 4 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "8 spaces", + "actual": 4 + }, + "line": 5 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 3 errors but had 5: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXText', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXExpressionContainer', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 4 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXExpressionContainer', + line: 4, + column: 0, + endLine: 4, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXExpressionContainer', + line: 5, + column: 0, + endLine: 5, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXExpressionContainer', + line: 6, + column: 0, + endLine: 6, + endColumn: 4, + suggestions: null + } +] + +5 !== 3 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +
+ { + /* foo */ + } +
+``` + +```json +{ + "output": "
\n {\n /* foo */\n }\n
", + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "8 spaces", + "actual": 6 + }, + "line": 3 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXText', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 6.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXEmptyExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 6, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXEmptyExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + } +] + +3 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +
+``` + +```json +{ + "output": "", + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 2 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +
+``` + +```json +{ + "output": "", + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "8 spaces", + "actual": 6 + }, + "line": 3 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXOpeningElement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 6.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXSpreadAttribute', + line: 3, + column: 0, + endLine: 3, + endColumn: 6, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXSpreadAttribute', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + } +] + +3 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +
foo +
bar
+
+``` + +```json +{ + "output": "
foo\n
bar
\n
", + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 2 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +Foo bar  +baz qux. + +``` + +```json +{ + "output": "Foo bar \n baz qux.\n", + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 2 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +<> + + +``` + +```json +{ + "output": "<>\n \n", + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 2 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +< + > + + +``` + +```json +{ + "output": "<\n>\n \n", + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "0 spaces", + "actual": 4 + }, + "line": 2 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXOpeningFragment', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXText', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + } +] + +2 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +<> + +< + /> +``` + +```json +{ + "output": "<>\n \n<\n/>", + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "0 spaces", + "actual": 4 + }, + "line": 4 + } + ] +} +``` + +TSError: Identifier expected. + at B (apps/oxlint/dist/ts_eslint.cjs) + at d (apps/oxlint/dist/ts_eslint.cjs) + at a (apps/oxlint/dist/ts_eslint.cjs) + at C (apps/oxlint/dist/ts_eslint.cjs) + + +#### indent > invalid + +```js +<> + + +``` + +```json +{ + "output": "<>\n \n", + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "0 spaces", + "actual": 4 + }, + "line": 4 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXText', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXClosingFragment', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + } +] + +2 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +< + > + + +``` + +```json +{ + "output": "<\n>\n \n", + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "0 spaces", + "actual": 4 + }, + "line": 2 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "0 spaces", + "actual": 4 + }, + "line": 5 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 2 errors but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXOpeningFragment', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXText', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXClosingFragment', + line: 5, + column: 0, + endLine: 5, + endColumn: 4, + suggestions: null + } +] + +3 !== 2 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +< + > + +< + /> +``` + +```json +{ + "output": "<\n>\n \n<\n/>", + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "0 spaces", + "actual": 4 + }, + "line": 2 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "0 spaces", + "actual": 4 + }, + "line": 5 + } + ] +} +``` + +TSError: Identifier expected. + at B (apps/oxlint/dist/ts_eslint.cjs) + at d (apps/oxlint/dist/ts_eslint.cjs) + at a (apps/oxlint/dist/ts_eslint.cjs) + at C (apps/oxlint/dist/ts_eslint.cjs) + + +#### indent > invalid + +```js +< // Comment + > + + +``` + +```json +{ + "output": "< // Comment\n>\n \n", + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "0 spaces", + "actual": 4 + }, + "line": 2 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXOpeningFragment', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXText', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + } +] + +2 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +<> + +< // Comment + /> +``` + +```json +{ + "output": "<>\n \n< // Comment\n/>", + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "0 spaces", + "actual": 4 + }, + "line": 4 + } + ] +} +``` + +TSError: Identifier expected. + at B (apps/oxlint/dist/ts_eslint.cjs) + at d (apps/oxlint/dist/ts_eslint.cjs) + at a (apps/oxlint/dist/ts_eslint.cjs) + at C (apps/oxlint/dist/ts_eslint.cjs) + + +#### indent > invalid + +```js +<> + + +``` + +```json +{ + "output": "<>\n \n", + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "0 spaces", + "actual": 4 + }, + "line": 4 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXText', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXClosingFragment', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + } +] + +2 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +< /* Comment */ + > + + +``` + +```json +{ + "output": "< /* Comment */\n>\n \n", + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "0 spaces", + "actual": 4 + }, + "line": 2 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXOpeningFragment', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXText', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + } +] + +2 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +<> + +< /* Comment */ + /> +``` + +```json +{ + "output": "<>\n \n< /* Comment */\n/>", + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "0 spaces", + "actual": 4 + }, + "line": 4 + } + ] +} +``` + +TSError: Identifier expected. + at B (apps/oxlint/dist/ts_eslint.cjs) + at d (apps/oxlint/dist/ts_eslint.cjs) + at a (apps/oxlint/dist/ts_eslint.cjs) + at C (apps/oxlint/dist/ts_eslint.cjs) + + +#### indent > invalid + +```js +<> + + +``` + +```json +{ + "output": "<>\n \n", + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "0 spaces", + "actual": 4 + }, + "line": 4 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXText', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'JSXClosingFragment', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + } +] + +2 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +({ + foo + }: bar) => baz +``` + +```json +{ + "output": "({\n foo\n}: bar) => baz", + "languageOptions": { + "parser": {} + }, + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "0 spaces", + "actual": 4 + }, + "line": 3 + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### indent > invalid + +```js +([ + foo + ]: bar) => baz +``` + +```json +{ + "output": "([\n foo\n]: bar) => baz", + "languageOptions": { + "parser": {} + }, + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "0 spaces", + "actual": 4 + }, + "line": 3 + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### indent > invalid + +```js +({ + foo + }: {}) => baz +``` + +```json +{ + "output": "({\n foo\n}: {}) => baz", + "languageOptions": { + "parser": {} + }, + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "0 spaces", + "actual": 4 + }, + "line": 3 + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### indent > invalid + +```js +class Foo { +foo() { +bar(); +} +} +``` + +```json +{ + "output": "class Foo {\nfoo() {\n bar();\n}\n}", + "options": [ + 4, + { + "ignoredNodes": [ + "ClassBody" + ] + } + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 3 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +$(function() { + +foo(); +bar(); + +foo(function() { +baz(); +}); + +}); +``` + +```json +{ + "output": "$(function() {\n\nfoo();\nbar();\n\nfoo(function() {\n baz();\n});\n\n});", + "options": [ + 4, + { + "ignoredNodes": [ + "ExpressionStatement > CallExpression[callee.name='$'] > FunctionExpression > BlockStatement" + ] + } + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 7 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +(function($) { +$(function() { +foo; +}); +})() +``` + +```json +{ + "output": "(function($) {\n$(function() {\n foo;\n});\n})()", + "options": [ + 4, + { + "ignoredNodes": [ + "ExpressionStatement > CallExpression > FunctionExpression.callee > BlockStatement" + ] + } + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 3 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +if (foo) { + doSomething(); + +// Intentionally unindented comment + doSomethingElse(); +} +``` + +```json +{ + "output": "if (foo) {\n doSomething();\n\n // Intentionally unindented comment\n doSomethingElse();\n}", + "options": [ + 4, + { + "ignoreComments": false + } + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 4 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 5, + column: 0, + endLine: 5, + endColumn: 4, + suggestions: null + } +] + +2 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +if (foo) { + doSomething(); + +/* Intentionally unindented comment */ + doSomethingElse(); +} +``` + +```json +{ + "output": "if (foo) {\n doSomething();\n\n /* Intentionally unindented comment */\n doSomethingElse();\n}", + "options": [ + 4, + { + "ignoreComments": false + } + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 4 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 5, + column: 0, + endLine: 5, + endColumn: 4, + suggestions: null + } +] + +2 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +const obj = { + foo () { + return condition ? // comment + 1 : + 2 + } +} +``` + +```json +{ + "output": "const obj = {\n foo () {\n return condition ? // comment\n 1 :\n 2\n }\n}", + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "12 spaces", + "actual": 8 + }, + "line": 4 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 5: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 12.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ConditionalExpression', + line: 5, + column: 0, + endLine: 5, + endColumn: 12, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 6, + column: 0, + endLine: 6, + endColumn: 4, + suggestions: null + } +] + +5 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +if (foo) { + +// Comment cannot align with code immediately above if there is a whitespace gap + doSomething(); +} +``` + +```json +{ + "output": "if (foo) {\n\n // Comment cannot align with code immediately above if there is a whitespace gap\n doSomething();\n}", + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 3 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Hydrated message "Expected indentation of 4 spaces but found 0." does not match "Expected indentation of 0 spaces but found 4." ++ actual - expected + ++ 'Expected indentation of 0 spaces but found 4.' +- 'Expected indentation of 4 spaces but found 0.' + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +if (foo) { + foo( + bar); +// Comment cannot align with code immediately below if there is a whitespace gap + +} +``` + +```json +{ + "output": "if (foo) {\n foo(\n bar);\n // Comment cannot align with code immediately below if there is a whitespace gap\n\n}", + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 4 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'CallExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 8, + suggestions: null + } +] + +2 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +[{ + foo +}, + + // Comment between nodes + +{ + bar +}]; +``` + +```json +{ + "output": "[{\n foo\n},\n\n// Comment between nodes\n\n{\n bar\n}];", + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "0 spaces", + "actual": 4 + }, + "line": 5 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrayExpression', + line: 5, + column: 0, + endLine: 5, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 8, + column: 0, + endLine: 8, + endColumn: 4, + suggestions: null + } +] + +3 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +let foo + +/* comment */; + +(async () => {})() +``` + +```json +{ + "output": "let foo\n\n /* comment */;\n\n(async () => {})()", + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 3 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +{ + let foo + + // comment + + ;(async () => {})() + +} +``` + +```json +{ + "output": "{\n let foo\n\n // comment\n\n ;(async () => {})()\n\n}", + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 8 + }, + "line": 4 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'VariableDeclaration', + line: 4, + column: 0, + endLine: 4, + endColumn: 8, + suggestions: null + } +] + +2 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +{ + let foo + // comment + ;(async () => {})() + +} +``` + +```json +{ + "output": "{\n let foo\n // comment\n ;(async () => {})()\n\n}", + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 8 + }, + "line": 3 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'VariableDeclaration', + line: 3, + column: 0, + endLine: 3, + endColumn: 8, + suggestions: null + } +] + +2 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +{ + let foo + + /* comment */; + + (async () => {})() + +} +``` + +```json +{ + "output": "{\n let foo\n\n /* comment */;\n\n (async () => {})()\n\n}", + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "8 spaces", + "actual": 4 + }, + "line": 4 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'VariableDeclaration', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 6, + column: 0, + endLine: 6, + endColumn: 4, + suggestions: null + } +] + +3 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +const foo = 1 +const bar = foo + +/* comment */; + +[1, 2, 3].forEach(() => {}) +``` + +```json +{ + "output": "const foo = 1\nconst bar = foo\n\n /* comment */;\n\n[1, 2, 3].forEach(() => {})", + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 4 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +{ + const foo = 1 + const bar = foo + + /* comment */ + + ;[1, 2, 3].forEach(() => {}) + +} +``` + +```json +{ + "output": "{\n const foo = 1\n const bar = foo\n\n /* comment */\n\n ;[1, 2, 3].forEach(() => {})\n\n}", + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 8 + }, + "line": 5 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'VariableDeclaration', + line: 5, + column: 0, + endLine: 5, + endColumn: 8, + suggestions: null + } +] + +3 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +{ + const foo = 1 + const bar = foo + /* comment */ + ;[1, 2, 3].forEach(() => {}) + +} +``` + +```json +{ + "output": "{\n const foo = 1\n const bar = foo\n /* comment */\n ;[1, 2, 3].forEach(() => {})\n\n}", + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 8 + }, + "line": 4 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'VariableDeclaration', + line: 4, + column: 0, + endLine: 4, + endColumn: 8, + suggestions: null + } +] + +3 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +{ + const foo = 1 + const bar = foo + + /* comment */; + + [1, 2, 3].forEach(() => {}) + +} +``` + +```json +{ + "output": "{\n const foo = 1\n const bar = foo\n\n /* comment */;\n\n [1, 2, 3].forEach(() => {})\n\n}", + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "8 spaces", + "actual": 4 + }, + "line": 5 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 4: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'VariableDeclaration', + line: 5, + column: 0, + endLine: 5, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 7, + column: 0, + endLine: 7, + endColumn: 4, + suggestions: null + } +] + +4 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +import( +source + ) +``` + +```json +{ + "output": "import(\n source\n)", + "languageOptions": { + "ecmaVersion": 2020 + }, + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 2 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "0 spaces", + "actual": 4 + }, + "line": 3 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 2 errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ImportExpression', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + } +] + +1 !== 2 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +foo(() => { + tag` + multiline + template${a} ${b} + literal + `(() => { + bar(); + }); +}); +``` + +```json +{ + "output": "foo(() => {\n tag`\n multiline\n template${a} ${b}\n literal\n `(() => {\n bar();\n });\n});", + "languageOptions": { + "ecmaVersion": 2015 + }, + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "8 spaces", + "actual": 4 + }, + "line": 7 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 7, + column: 0, + endLine: 7, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 8, + column: 0, + endLine: 8, + endColumn: 4, + suggestions: null + } +] + +3 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +{ + tag` + multiline + template + literal + ${a} ${b}`(() => { + bar(); + }); +} +``` + +```json +{ + "output": "{\n tag`\n multiline\n template\n literal\n ${a} ${b}`(() => {\n bar();\n });\n}", + "languageOptions": { + "ecmaVersion": 2015 + }, + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 8 + }, + "line": 2 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "8 spaces", + "actual": 12 + }, + "line": 7 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 8 + }, + "line": 8 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Hydrated message "Expected indentation of 4 spaces but found 8." does not match "Expected indentation of 0 spaces but found 8." ++ actual - expected + ++ 'Expected indentation of 0 spaces but found 8.' +- 'Expected indentation of 4 spaces but found 8.' + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +foo(() => { + tagOne`${a} ${b} + multiline + template + literal + `(() => { + tagTwo` + multiline + template + literal + `(() => { + bar(); + }); + + baz(); +}); +}); +``` + +```json +{ + "output": "foo(() => {\n tagOne`${a} ${b}\n multiline\n template\n literal\n `(() => {\n tagTwo`\n multiline\n template\n literal\n `(() => {\n bar();\n });\n\n baz();\n });\n});", + "languageOptions": { + "ecmaVersion": 2015 + }, + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "8 spaces", + "actual": 12 + }, + "line": 7 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "8 spaces", + "actual": 12 + }, + "line": 15 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 16 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 3 errors but had 5: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 12.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 7, + column: 0, + endLine: 7, + endColumn: 12, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 12.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 12, + column: 0, + endLine: 12, + endColumn: 12, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 13, + column: 0, + endLine: 13, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 12.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 15, + column: 0, + endLine: 15, + endColumn: 12, + suggestions: null + } +] + +5 !== 3 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +{ + tagOne` + multiline + template + literal + ${a} ${b}`(() => { + tagTwo` + multiline + template + literal + `(() => { + bar(); + }); + + baz(); +}); +} +``` + +```json +{ + "output": "{\n tagOne`\n multiline\n template\n literal\n ${a} ${b}`(() => {\n tagTwo`\n multiline\n template\n literal\n `(() => {\n bar();\n });\n\n baz();\n });\n}", + "languageOptions": { + "ecmaVersion": 2015 + }, + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "8 spaces", + "actual": 12 + }, + "line": 7 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "8 spaces", + "actual": 12 + }, + "line": 15 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 16 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 3 errors but had 5: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 12.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 7, + column: 0, + endLine: 7, + endColumn: 12, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 12.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 12, + column: 0, + endLine: 12, + endColumn: 12, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 13, + column: 0, + endLine: 13, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 12.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 15, + column: 0, + endLine: 15, + endColumn: 12, + suggestions: null + } +] + +5 !== 3 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +tagOne`multiline ${a} ${b} + template + literal + `(() => { +foo(); + + tagTwo`multiline + template + literal + `({ + bar: 1, + baz: 2 + }); +}); +``` + +```json +{ + "output": "tagOne`multiline ${a} ${b}\n template\n literal\n `(() => {\n foo();\n\n tagTwo`multiline\n template\n literal\n `({\n bar: 1,\n baz: 2\n });\n});", + "languageOptions": { + "ecmaVersion": 2015 + }, + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 5 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "8 spaces", + "actual": 4 + }, + "line": 11 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 2 errors but had 4: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 7, + column: 0, + endLine: 7, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 11, + column: 0, + endLine: 11, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 12, + column: 0, + endLine: 12, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 13, + column: 0, + endLine: 13, + endColumn: 4, + suggestions: null + } +] + +4 !== 2 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +tagOne`multiline + template ${a} ${b} + literal`({ + foo: 1, +bar: tagTwo`multiline + template + literal`(() => { + +baz(); + }) +}); +``` + +```json +{ + "output": "tagOne`multiline\n template ${a} ${b}\n literal`({\n foo: 1,\n bar: tagTwo`multiline\n template\n literal`(() => {\n\n baz();\n })\n});", + "languageOptions": { + "ecmaVersion": 2015 + }, + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 8 + }, + "line": 4 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 5 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "8 spaces", + "actual": 0 + }, + "line": 9 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 3 errors but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ObjectExpression', + line: 4, + column: 0, + endLine: 4, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 10, + column: 0, + endLine: 10, + endColumn: 4, + suggestions: null + } +] + +2 !== 3 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +foo.bar` template literal `(() => { + baz(); +}) +``` + +```json +{ + "output": "foo.bar` template literal `(() => {\n baz();\n})", + "languageOptions": { + "ecmaVersion": 2015 + }, + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 8 + }, + "line": 2 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Hydrated message "Expected indentation of 4 spaces but found 8." does not match "Expected indentation of 0 spaces but found 8." ++ actual - expected + ++ 'Expected indentation of 0 spaces but found 8.' +- 'Expected indentation of 4 spaces but found 8.' + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +foo.bar.baz` template literal `(() => { +baz(); + }) +``` + +```json +{ + "output": "foo.bar.baz` template literal `(() => {\n baz();\n})", + "languageOptions": { + "ecmaVersion": 2015 + }, + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 2 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "0 spaces", + "actual": 4 + }, + "line": 3 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 2 errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + } +] + +1 !== 2 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +foo + .bar` template + literal `(() => { + baz(); +}) +``` + +```json +{ + "output": "foo\n .bar` template\n literal `(() => {\n baz();\n })", + "languageOptions": { + "ecmaVersion": 2015 + }, + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 5 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'MemberExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 4, + column: 0, + endLine: 4, + endColumn: 8, + suggestions: null + } +] + +2 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +foo + .test` + ${a} ${b} + `(() => { +bar(); + }) +``` + +```json +{ + "output": "foo\n .test`\n ${a} ${b}\n `(() => {\n bar();\n })", + "languageOptions": { + "ecmaVersion": 2015 + }, + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "8 spaces", + "actual": 0 + }, + "line": 5 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'MemberExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 6, + column: 0, + endLine: 6, + endColumn: 4, + suggestions: null + } +] + +2 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +foo + .test` + ${a} ${b} + `(() => { +bar(); + }) +``` + +```json +{ + "output": "foo\n.test`\n ${a} ${b}\n `(() => {\n bar();\n})", + "options": [ + 4, + { + "MemberExpression": 0 + } + ], + "languageOptions": { + "ecmaVersion": 2015 + }, + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "0 spaces", + "actual": 4 + }, + "line": 2 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 5 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "0 spaces", + "actual": 4 + }, + "line": 6 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 3 errors but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'MemberExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 6, + column: 0, + endLine: 6, + endColumn: 4, + suggestions: null + } +] + +2 !== 3 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +obj +?.prop +?.[key] +?. +[key] +``` + +```json +{ + "output": "obj\n ?.prop\n ?.[key]\n ?.\n [key]", + "options": [ + 4 + ], + "languageOptions": { + "ecmaVersion": 2020 + }, + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 2 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 3 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 4 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "8 spaces", + "actual": 0 + }, + "line": 5 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 4 errors but had 0: [] + +0 !== 4 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +( + longSomething + ?.prop + ?.[key] +) +?.prop +?.[key] +``` + +```json +{ + "output": "(\n longSomething\n ?.prop\n ?.[key]\n)\n ?.prop\n ?.[key]", + "options": [ + 4 + ], + "languageOptions": { + "ecmaVersion": 2020 + }, + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 6 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 7 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Hydrated message "Expected indentation of 4 spaces but found 0." does not match "Expected indentation of 4 spaces but found 8." ++ actual - expected + ++ 'Expected indentation of 4 spaces but found 8.' +- 'Expected indentation of 4 spaces but found 0.' + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +obj +?.(arg) +?. +(arg) +``` + +```json +{ + "output": "obj\n ?.(arg)\n ?.\n (arg)", + "options": [ + 4 + ], + "languageOptions": { + "ecmaVersion": 2020 + }, + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 2 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 3 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 4 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 3 errors but had 0: [] + +0 !== 3 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +( + longSomething + ?.(arg) + ?.(arg) +) +?.(arg) +?.(arg) +``` + +```json +{ + "output": "(\n longSomething\n ?.(arg)\n ?.(arg)\n)\n ?.(arg)\n ?.(arg)", + "options": [ + 4 + ], + "languageOptions": { + "ecmaVersion": 2020 + }, + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 6 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 7 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Hydrated message "Expected indentation of 4 spaces but found 0." does not match "Expected indentation of 4 spaces but found 8." ++ actual - expected + ++ 'Expected indentation of 4 spaces but found 8.' +- 'Expected indentation of 4 spaces but found 0.' + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +const foo = async (arg1, + arg2) => +{ + return arg1 + arg2; +} +``` + +```json +{ + "output": "const foo = async (arg1,\n arg2) =>\n{\n return arg1 + arg2;\n}", + "options": [ + 2, + { + "FunctionDeclaration": { + "parameters": "first" + }, + "FunctionExpression": { + "parameters": "first" + } + } + ], + "languageOptions": { + "ecmaVersion": 2020 + }, + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "19 spaces", + "actual": 20 + }, + "line": 2 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 19 spaces but found 20.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ArrowFunctionExpression', + line: 2, + column: 0, + endLine: 2, + endColumn: 20, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 4, + column: 0, + endLine: 4, + endColumn: 2, + suggestions: null + } +] + +2 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +class C { +field1; +static field2; +} +``` + +```json +{ + "output": "class C {\n field1;\n static field2;\n}", + "options": [ + 4 + ], + "languageOptions": { + "ecmaVersion": 2022 + }, + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 2 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 3 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 2 errors but had 0: [] + +0 !== 2 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +class C { +field1 += +0 +; +static +field2 += +0 +; +} +``` + +```json +{ + "output": "class C {\n field1\n =\n 0\n ;\n static\n field2\n =\n 0\n ;\n}", + "options": [ + 4 + ], + "languageOptions": { + "ecmaVersion": 2022 + }, + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 2 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "8 spaces", + "actual": 0 + }, + "line": 3 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "12 spaces", + "actual": 0 + }, + "line": 4 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "12 spaces", + "actual": 0 + }, + "line": 5 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 6 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "8 spaces", + "actual": 0 + }, + "line": 7 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "12 spaces", + "actual": 0 + }, + "line": 8 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "16 spaces", + "actual": 0 + }, + "line": 9 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "16 spaces", + "actual": 0 + }, + "line": 10 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 9 errors but had 0: [] + +0 !== 9 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +class C { +[ +field1 +] += +0 +; +static +[ +field2 +] += +0 +; +[ +field3 +] = +0; +[field4] = +0; +} +``` + +```json +{ + "output": "class C {\n [\n field1\n ]\n =\n 0\n ;\n static\n [\n field2\n ]\n =\n 0\n ;\n [\n field3\n ] =\n 0;\n [field4] =\n 0;\n}", + "options": [ + 4 + ], + "languageOptions": { + "ecmaVersion": 2022 + }, + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 2 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "8 spaces", + "actual": 0 + }, + "line": 3 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 4 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "8 spaces", + "actual": 0 + }, + "line": 5 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "12 spaces", + "actual": 0 + }, + "line": 6 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "12 spaces", + "actual": 0 + }, + "line": 7 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 8 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 9 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "8 spaces", + "actual": 0 + }, + "line": 10 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 11 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "8 spaces", + "actual": 0 + }, + "line": 12 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "12 spaces", + "actual": 0 + }, + "line": 13 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "12 spaces", + "actual": 0 + }, + "line": 14 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 15 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "8 spaces", + "actual": 0 + }, + "line": 16 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 17 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "8 spaces", + "actual": 0 + }, + "line": 18 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 19 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "8 spaces", + "actual": 0 + }, + "line": 20 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 19 errors but had 0: [] + +0 !== 19 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +class C { +field1 = ( +foo ++ bar +); +} +``` + +```json +{ + "output": "class C {\n field1 = (\n foo\n+ bar\n );\n}", + "options": [ + 4 + ], + "languageOptions": { + "ecmaVersion": 2022 + }, + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 2 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "8 spaces", + "actual": 0 + }, + "line": 3 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 5 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 3 errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 4 spaces but found 0.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'Identifier', + line: 3, + column: 0, + endLine: 3, + endColumn: 0, + suggestions: null + } +] + +1 !== 3 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +class C { +#aaa +foo() { +return this.#aaa +} +} +``` + +```json +{ + "output": "class C {\n #aaa\n foo() {\n return this.#aaa\n }\n}", + "options": [ + 4 + ], + "languageOptions": { + "ecmaVersion": 2022 + }, + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 2 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 3 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "8 spaces", + "actual": 0 + }, + "line": 4 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 5 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 4 errors but had 0: [] + +0 !== 4 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +class C { +static { +foo(); +bar(); +} +} +``` + +```json +{ + "output": "class C {\n static {\n foo();\n bar();\n }\n}", + "options": [ + 2 + ], + "languageOptions": { + "ecmaVersion": 2022 + }, + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 0 + }, + "line": 2 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 3 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 4 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 spaces", + "actual": 0 + }, + "line": 5 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 4 errors but had 0: [] + +0 !== 4 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +class C { +static { +foo(); +bar(); +} +} +``` + +```json +{ + "output": "class C {\n static {\n foo();\n bar();\n }\n}", + "options": [ + 4 + ], + "languageOptions": { + "ecmaVersion": 2022 + }, + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 2 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "8 spaces", + "actual": 0 + }, + "line": 3 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "8 spaces", + "actual": 0 + }, + "line": 4 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 5 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 4 errors but had 0: [] + +0 !== 4 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +class C { + static { + foo(); +bar(); + } +} +``` + +```json +{ + "output": "class C {\n static {\n foo();\n bar();\n }\n}", + "options": [ + 4 + ], + "languageOptions": { + "ecmaVersion": 2022 + }, + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 8 + }, + "line": 2 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "8 spaces", + "actual": 4 + }, + "line": 3 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "8 spaces", + "actual": 0 + }, + "line": 4 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 8 + }, + "line": 5 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 4 errors but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ClassBody', + line: 2, + column: 0, + endLine: 2, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'StaticBlock', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'StaticBlock', + line: 5, + column: 0, + endLine: 5, + endColumn: 8, + suggestions: null + } +] + +3 !== 4 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +class C { +static { +foo(); +bar(); +} +} +``` + +```json +{ + "output": "class C {\n static {\n foo();\n bar();\n }\n}", + "options": [ + 4, + { + "StaticBlock": { + "body": 2 + } + } + ], + "languageOptions": { + "ecmaVersion": 2022 + }, + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 2 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "12 spaces", + "actual": 0 + }, + "line": 3 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "12 spaces", + "actual": 0 + }, + "line": 4 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 5 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 4 errors but had 0: [] + +0 !== 4 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +class C { +static { +foo(); +bar(); +} +} +``` + +```json +{ + "output": "class C {\n static {\n foo();\n bar();\n }\n}", + "options": [ + 4, + { + "StaticBlock": { + "body": 0 + } + } + ], + "languageOptions": { + "ecmaVersion": 2022 + }, + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 2 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 3 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 4 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 5 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 4 errors but had 0: [] + +0 !== 4 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +class C { +static { +foo(); +bar(); +} +} +``` + +```json +{ + "output": "class C {\n\tstatic {\n\t\tfoo();\n\t\tbar();\n\t}\n}", + "options": [ + "tab" + ], + "languageOptions": { + "ecmaVersion": 2022 + }, + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "1 tab", + "actual": 0 + }, + "line": 2 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 tabs", + "actual": 0 + }, + "line": 3 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "2 tabs", + "actual": 0 + }, + "line": 4 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "1 tab", + "actual": 0 + }, + "line": 5 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 4 errors but had 0: [] + +0 !== 4 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +class C { +static { +foo(); +bar(); +} +} +``` + +```json +{ + "output": "class C {\n\tstatic {\n\t\t\tfoo();\n\t\t\tbar();\n\t}\n}", + "options": [ + "tab", + { + "StaticBlock": { + "body": 2 + } + } + ], + "languageOptions": { + "ecmaVersion": 2022 + }, + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "1 tab", + "actual": 0 + }, + "line": 2 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "3 tabs", + "actual": 0 + }, + "line": 3 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "3 tabs", + "actual": 0 + }, + "line": 4 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "1 tab", + "actual": 0 + }, + "line": 5 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 4 errors but had 0: [] + +0 !== 4 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +class C { +static +{ +foo(); +bar(); +} +} +``` + +```json +{ + "output": "class C {\n static\n {\n foo();\n bar();\n }\n}", + "options": [ + 4 + ], + "languageOptions": { + "ecmaVersion": 2022 + }, + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 2 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 3 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "8 spaces", + "actual": 0 + }, + "line": 4 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "8 spaces", + "actual": 0 + }, + "line": 5 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 6 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 5 errors but had 0: [] + +0 !== 5 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +class C { + static + { + foo(); + bar(); + } +} +``` + +```json +{ + "output": "class C {\n static\n {\n foo();\n bar();\n }\n}", + "options": [ + 4 + ], + "languageOptions": { + "ecmaVersion": 2022 + }, + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 8 + }, + "line": 3 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 8 + }, + "line": 6 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 2 errors but had 5: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ClassBody', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'StaticBlock', + line: 3, + column: 0, + endLine: 3, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'StaticBlock', + line: 4, + column: 0, + endLine: 4, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'StaticBlock', + line: 5, + column: 0, + endLine: 5, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'StaticBlock', + line: 6, + column: 0, + endLine: 6, + endColumn: 8, + suggestions: null + } +] + +5 !== 2 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +class C { +static { +var x, +y; +} +} +``` + +```json +{ + "output": "class C {\n static {\n var x,\n y;\n }\n}", + "options": [ + 4 + ], + "languageOptions": { + "ecmaVersion": 2022 + }, + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 2 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "8 spaces", + "actual": 0 + }, + "line": 3 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "12 spaces", + "actual": 0 + }, + "line": 4 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 5 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 4 errors but had 0: [] + +0 !== 4 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +class C { +static +{ +var x, +y; +} +} +``` + +```json +{ + "output": "class C {\n static\n {\n var x,\n y;\n }\n}", + "options": [ + 4 + ], + "languageOptions": { + "ecmaVersion": 2022 + }, + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 2 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 3 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "8 spaces", + "actual": 0 + }, + "line": 4 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "12 spaces", + "actual": 0 + }, + "line": 5 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 6 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 5 errors but had 0: [] + +0 !== 5 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +class C { +static { +if (foo) { +bar; +} +} +} +``` + +```json +{ + "output": "class C {\n static {\n if (foo) {\n bar;\n }\n }\n}", + "options": [ + 4 + ], + "languageOptions": { + "ecmaVersion": 2022 + }, + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 2 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "8 spaces", + "actual": 0 + }, + "line": 3 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "12 spaces", + "actual": 0 + }, + "line": 4 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "8 spaces", + "actual": 0 + }, + "line": 5 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 6 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 5 errors but had 0: [] + +0 !== 5 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +class C { +static { +{ +bar; +} +} +} +``` + +```json +{ + "output": "class C {\n static {\n {\n bar;\n }\n }\n}", + "options": [ + 4 + ], + "languageOptions": { + "ecmaVersion": 2022 + }, + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 2 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "8 spaces", + "actual": 0 + }, + "line": 3 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "12 spaces", + "actual": 0 + }, + "line": 4 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "8 spaces", + "actual": 0 + }, + "line": 5 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 6 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 5 errors but had 0: [] + +0 !== 5 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +class C { +static {} + +static { +} + +static +{ +} +} +``` + +```json +{ + "output": "class C {\n static {}\n\n static {\n }\n\n static\n {\n }\n}", + "options": [ + 4 + ], + "languageOptions": { + "ecmaVersion": 2022 + }, + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 2 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 4 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 5 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 7 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 8 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 9 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 6 errors but had 0: [] + +0 !== 6 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +class C { + +static { + foo; +} + +static { + bar; +} + +} +``` + +```json +{ + "output": "class C {\n\n static {\n foo;\n }\n\n static {\n bar;\n }\n\n}", + "options": [ + 4 + ], + "languageOptions": { + "ecmaVersion": 2022 + }, + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 3 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "8 spaces", + "actual": 4 + }, + "line": 4 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 5 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 7 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "8 spaces", + "actual": 4 + }, + "line": 8 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 9 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 6 errors but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'StaticBlock', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'StaticBlock', + line: 8, + column: 0, + endLine: 8, + endColumn: 4, + suggestions: null + } +] + +2 !== 6 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +class C { + +x = 1; + +static { + foo; +} + +y = 2; + +} +``` + +```json +{ + "output": "class C {\n\n x = 1;\n\n static {\n foo;\n }\n\n y = 2;\n\n}", + "options": [ + 4 + ], + "languageOptions": { + "ecmaVersion": 2022 + }, + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 3 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 5 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "8 spaces", + "actual": 4 + }, + "line": 6 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 7 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 9 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 5 errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'StaticBlock', + line: 6, + column: 0, + endLine: 6, + endColumn: 4, + suggestions: null + } +] + +1 !== 5 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +class C { + +method1(param) { + foo; +} + +static { + bar; +} + +method2(param) { + foo; +} + +} +``` + +```json +{ + "output": "class C {\n\n method1(param) {\n foo;\n }\n\n static {\n bar;\n }\n\n method2(param) {\n foo;\n }\n\n}", + "options": [ + 4 + ], + "languageOptions": { + "ecmaVersion": 2022 + }, + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 3 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "8 spaces", + "actual": 4 + }, + "line": 4 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 5 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 7 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "8 spaces", + "actual": 4 + }, + "line": 8 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 9 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 11 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "8 spaces", + "actual": 4 + }, + "line": 12 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 13 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 9 errors but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'StaticBlock', + line: 8, + column: 0, + endLine: 8, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 12, + column: 0, + endLine: 12, + endColumn: 4, + suggestions: null + } +] + +3 !== 9 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +function f() { +class C { +static { +foo(); +bar(); +} +} +} +``` + +```json +{ + "output": "function f() {\n class C {\n static {\n foo();\n bar();\n }\n }\n}", + "options": [ + 4 + ], + "languageOptions": { + "ecmaVersion": 2022 + }, + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 2 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "8 spaces", + "actual": 0 + }, + "line": 3 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "12 spaces", + "actual": 0 + }, + "line": 4 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "12 spaces", + "actual": 0 + }, + "line": 5 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "8 spaces", + "actual": 0 + }, + "line": 6 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 7 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 6 errors but had 0: [] + +0 !== 6 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +class C { +method() { +foo; +} +static { +bar; +} +} +``` + +```json +{ + "output": "class C {\n method() {\n foo;\n }\n static {\n bar;\n }\n}", + "options": [ + 4, + { + "FunctionExpression": { + "body": 2 + }, + "StaticBlock": { + "body": 2 + } + } + ], + "languageOptions": { + "ecmaVersion": 2022 + }, + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 2 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "12 spaces", + "actual": 0 + }, + "line": 3 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 4 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 5 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "12 spaces", + "actual": 0 + }, + "line": 6 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 7 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 6 errors but had 0: [] + +0 !== 6 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +if (2 > 1) +\u0009console.log('a') +\u0009;[1, 2, 3].forEach(x=>console.log(x)) +``` + +```json +{ + "code": "if (2 > 1)\n\tconsole.log('a')\n\t;[1, 2, 3].forEach(x=>console.log(x))", + "output": "if (2 > 1)\n\tconsole.log('a')\n;[1, 2, 3].forEach(x=>console.log(x))", + "options": [ + "tab" + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "0 tabs", + "actual": 1 + }, + "line": 3 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 tabs but found 1.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 1, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 tabs but found 1.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ExpressionStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 1, + suggestions: null + } +] + +2 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +if (2 > 1) + console.log('a') + ;[1, 2, 3].forEach(x=>console.log(x)) +``` + +```json +{ + "output": "if (2 > 1)\n console.log('a')\n;[1, 2, 3].forEach(x=>console.log(x))", + "options": [ + 4 + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "0 spaces", + "actual": 4 + }, + "line": 3 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ExpressionStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + } +] + +2 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +if (foo) + bar(); + baz(); +``` + +```json +{ + "output": "if (foo)\n bar();\nbaz();", + "options": [ + 4 + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "0 spaces", + "actual": 4 + }, + "line": 3 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'Program', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + } +] + +2 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +if (foo) + bar() + ; baz() +``` + +```json +{ + "output": "if (foo)\n bar()\n; baz()", + "options": [ + 4 + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "0 spaces", + "actual": 4 + }, + "line": 3 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ExpressionStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + } +] + +2 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +if (foo) + bar() + ;baz() + qux() +``` + +```json +{ + "output": "if (foo)\n bar()\n;baz()\nqux()", + "options": [ + 4 + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "0 spaces", + "actual": 4 + }, + "line": 3 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "0 spaces", + "actual": 4 + }, + "line": 4 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 2 errors but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ExpressionStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'Program', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + } +] + +3 !== 2 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +if (foo) + bar() + ;else + baz() +``` + +```json +{ + "output": "if (foo)\n bar()\n;else\n baz()", + "options": [ + 4 + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "0 spaces", + "actual": 4 + }, + "line": 3 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ExpressionStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + } +] + +3 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +if (foo) + bar() +else + baz() + ;qux() +``` + +```json +{ + "output": "if (foo)\n bar()\nelse\n baz()\n;qux()", + "options": [ + 4 + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "0 spaces", + "actual": 4 + }, + "line": 5 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ExpressionStatement', + line: 5, + column: 0, + endLine: 5, + endColumn: 4, + suggestions: null + } +] + +3 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +if (foo) + if (bar) + baz() + ;qux() +``` + +```json +{ + "output": "if (foo)\n if (bar)\n baz()\n;qux()", + "options": [ + 4 + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "0 spaces", + "actual": 4 + }, + "line": 4 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ExpressionStatement', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + } +] + +3 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +if (foo) + bar() +else if (baz) + qux() + ;quux() +``` + +```json +{ + "output": "if (foo)\n bar()\nelse if (baz)\n qux()\n;quux()", + "options": [ + 4 + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "0 spaces", + "actual": 4 + }, + "line": 5 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ExpressionStatement', + line: 5, + column: 0, + endLine: 5, + endColumn: 4, + suggestions: null + } +] + +3 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +if (foo) + if (bar) + baz() + else + qux() + ;quux() +``` + +```json +{ + "output": "if (foo)\n if (bar)\n baz()\n else\n qux()\n;quux()", + "options": [ + 4 + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "0 spaces", + "actual": 4 + }, + "line": 6 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 5: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 5, + column: 0, + endLine: 5, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ExpressionStatement', + line: 6, + column: 0, + endLine: 6, + endColumn: 4, + suggestions: null + } +] + +5 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +if (foo) + bar() +; +baz() +``` + +```json +{ + "output": "if (foo)\n bar()\n ;\nbaz()", + "options": [ + 4 + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 3 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Hydrated message "Expected indentation of 4 spaces but found 0." does not match "Expected indentation of 0 spaces but found 4." ++ actual - expected + ++ 'Expected indentation of 0 spaces but found 4.' +- 'Expected indentation of 4 spaces but found 0.' + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +if (foo) +; +baz() +``` + +```json +{ + "output": "if (foo)\n ;\nbaz()", + "options": [ + 4 + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 2 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +if (foo); + else + baz() +``` + +```json +{ + "output": "if (foo);\nelse\n baz()", + "options": [ + 4 + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "0 spaces", + "actual": 4 + }, + "line": 2 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + } +] + +2 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +if (foo) +; +else + baz() +``` + +```json +{ + "output": "if (foo)\n ;\nelse\n baz()", + "options": [ + 4 + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 2 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Hydrated message "Expected indentation of 4 spaces but found 0." does not match "Expected indentation of 0 spaces but found 4." ++ actual - expected + ++ 'Expected indentation of 0 spaces but found 4.' +- 'Expected indentation of 4 spaces but found 0.' + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +if (foo) + ;else + baz() +``` + +```json +{ + "output": "if (foo)\n;else\n baz()", + "options": [ + 4 + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "0 spaces", + "actual": 4 + }, + "line": 2 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + } +] + +2 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +do + foo(); + while (bar) +``` + +```json +{ + "output": "do\n foo();\nwhile (bar)", + "options": [ + 4 + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "0 spaces", + "actual": 4 + }, + "line": 3 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'DoWhileStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'DoWhileStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + } +] + +2 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +do + foo() + ;while (bar) +``` + +```json +{ + "output": "do\n foo()\n;while (bar)", + "options": [ + 4 + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "0 spaces", + "actual": 4 + }, + "line": 3 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'DoWhileStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ExpressionStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + } +] + +2 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +do +; +while (foo) +``` + +```json +{ + "output": "do\n ;\nwhile (foo)", + "options": [ + 4 + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 2 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +while (2 > 1) + console.log('a') + ;[1, 2, 3].forEach(x=>console.log(x)) +``` + +```json +{ + "output": "while (2 > 1)\n console.log('a')\n;[1, 2, 3].forEach(x=>console.log(x))", + "options": [ + 4 + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "0 spaces", + "actual": 4 + }, + "line": 3 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'WhileStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ExpressionStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + } +] + +2 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +for (;;) + console.log('a') + ;[1, 2, 3].forEach(x=>console.log(x)) +``` + +```json +{ + "output": "for (;;)\n console.log('a')\n;[1, 2, 3].forEach(x=>console.log(x))", + "options": [ + 4 + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "0 spaces", + "actual": 4 + }, + "line": 3 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ForStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ExpressionStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + } +] + +2 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +for (a in b) + console.log('a') + ;[1, 2, 3].forEach(x=>console.log(x)) +``` + +```json +{ + "output": "for (a in b)\n console.log('a')\n;[1, 2, 3].forEach(x=>console.log(x))", + "options": [ + 4 + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "0 spaces", + "actual": 4 + }, + "line": 3 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ForInStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ExpressionStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + } +] + +2 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +for (a of b) + console.log('a') + ;[1, 2, 3].forEach(x=>console.log(x)) +``` + +```json +{ + "output": "for (a of b)\n console.log('a')\n;[1, 2, 3].forEach(x=>console.log(x))", + "options": [ + 4 + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "0 spaces", + "actual": 4 + }, + "line": 3 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ForOfStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ExpressionStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + } +] + +2 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +with (a) + console.log(b) + ;[1, 2, 3].forEach(x=>console.log(x)) +``` + +```json +{ + "output": "with (a)\n console.log(b)\n;[1, 2, 3].forEach(x=>console.log(x))", + "options": [ + 4 + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "0 spaces", + "actual": 4 + }, + "line": 3 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'WithStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ExpressionStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + } +] + +2 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +label: for (a of b) + console.log('a') + ;[1, 2, 3].forEach(x=>console.log(x)) +``` + +```json +{ + "output": "label: for (a of b)\n console.log('a')\n;[1, 2, 3].forEach(x=>console.log(x))", + "options": [ + 4 + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "0 spaces", + "actual": 4 + }, + "line": 3 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ForOfStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ExpressionStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + } +] + +2 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +label: +for (a of b) + console.log('a') + ;[1, 2, 3].forEach(x=>console.log(x)) +``` + +```json +{ + "output": "label:\nfor (a of b)\n console.log('a')\n;[1, 2, 3].forEach(x=>console.log(x))", + "options": [ + 4 + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "0 spaces", + "actual": 4 + }, + "line": 4 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ForOfStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'ExpressionStatement', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + } +] + +2 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +if (foo) +\u0009if (bar) doSomething(); +\u0009else doSomething(); +else +if (bar) doSomething(); +else doSomething(); +``` + +```json +{ + "code": "if (foo)\n\tif (bar) doSomething();\n\telse doSomething();\nelse\nif (bar) doSomething();\nelse doSomething();", + "output": "if (foo)\n\tif (bar) doSomething();\n\telse doSomething();\nelse\n\tif (bar) doSomething();\n\telse doSomething();", + "options": [ + "tab" + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "1 tab", + "actual": 0 + }, + "line": 5 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "1 tab", + "actual": 0 + }, + "line": 6 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Hydrated message "Expected indentation of 1 tab but found 0." does not match "Expected indentation of 0 tabs but found 1." ++ actual - expected + ++ 'Expected indentation of 0 tabs but found 1.' +- 'Expected indentation of 1 tab but found 0.' + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +if (foo) +\u0009if (bar) doSomething(); +\u0009else doSomething(); +else +\u0009\u0009if (bar) doSomething(); +\u0009\u0009else doSomething(); +``` + +```json +{ + "code": "if (foo)\n\tif (bar) doSomething();\n\telse doSomething();\nelse\n\t\tif (bar) doSomething();\n\t\telse doSomething();", + "output": "if (foo)\n\tif (bar) doSomething();\n\telse doSomething();\nelse\n\tif (bar) doSomething();\n\telse doSomething();", + "options": [ + "tab" + ], + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "1 tab", + "actual": 2 + }, + "line": 5 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "1 tab", + "actual": 2 + }, + "line": 6 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 2 errors but had 4: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 tabs but found 1.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 1, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 tabs but found 1.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 1, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 tabs but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 5, + column: 0, + endLine: 5, + endColumn: 2, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 tabs but found 2.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 6, + column: 0, + endLine: 6, + endColumn: 2, + suggestions: null + } +] + +4 !== 2 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +if (foo) + if (bar) doSomething(); + else doSomething(); +else +if (bar) doSomething(); +else doSomething(); +``` + +```json +{ + "output": "if (foo)\n if (bar) doSomething();\n else doSomething();\nelse\n if (bar) doSomething();\n else doSomething();", + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 5 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 6 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Hydrated message "Expected indentation of 4 spaces but found 0." does not match "Expected indentation of 0 spaces but found 4." ++ actual - expected + ++ 'Expected indentation of 0 spaces but found 4.' +- 'Expected indentation of 4 spaces but found 0.' + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +if (foo) + if (bar) doSomething(); + else doSomething(); +else +if (bar) +doSomething(); +else doSomething(); +``` + +```json +{ + "output": "if (foo)\n if (bar) doSomething();\n else doSomething();\nelse\n if (bar)\n doSomething();\n else doSomething();", + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 5 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "8 spaces", + "actual": 0 + }, + "line": 6 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 7 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 3 errors but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + } +] + +2 !== 3 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +if (foo) + if (bar) doSomething(); + else doSomething(); +else +if (bar) doSomething(); +else +doSomething(); +``` + +```json +{ + "output": "if (foo)\n if (bar) doSomething();\n else doSomething();\nelse\n if (bar) doSomething();\n else\n doSomething();", + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 5 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 6 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "8 spaces", + "actual": 0 + }, + "line": 7 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 3 errors but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + } +] + +2 !== 3 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +if (foo) + if (bar) doSomething(); + else doSomething(); +else +if (bar) + doSomething(); +else +doSomething(); +``` + +```json +{ + "output": "if (foo)\n if (bar) doSomething();\n else doSomething();\nelse\n if (bar)\n doSomething();\n else\n doSomething();", + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 5 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "8 spaces", + "actual": 4 + }, + "line": 6 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 7 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "8 spaces", + "actual": 0 + }, + "line": 8 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 4 errors but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 6, + column: 0, + endLine: 6, + endColumn: 4, + suggestions: null + } +] + +3 !== 4 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +if (foo) + if (bar) doSomething(); + else doSomething(); +else if (bar) doSomething(); + else doSomething(); +``` + +```json +{ + "output": "if (foo)\n if (bar) doSomething();\n else doSomething();\nelse if (bar) doSomething();\nelse doSomething();", + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "0 spaces", + "actual": 4 + }, + "line": 5 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 5, + column: 0, + endLine: 5, + endColumn: 4, + suggestions: null + } +] + +3 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +if (foo) + if (bar) doSomething(); + else doSomething(); + else if (bar) + doSomething(); + else doSomething(); +``` + +```json +{ + "output": "if (foo)\n if (bar) doSomething();\n else doSomething();\nelse if (bar)\n doSomething();\nelse doSomething();", + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "0 spaces", + "actual": 4 + }, + "line": 4 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 8 + }, + "line": 5 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "0 spaces", + "actual": 4 + }, + "line": 6 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 3 errors but had 5: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 4, + column: 0, + endLine: 4, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 5, + column: 0, + endLine: 5, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 6, + column: 0, + endLine: 6, + endColumn: 4, + suggestions: null + } +] + +5 !== 3 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +if (foo) + if (bar) doSomething(); + else doSomething(); +else if (bar) doSomething(); + else + doSomething(); +``` + +```json +{ + "output": "if (foo)\n if (bar) doSomething();\n else doSomething();\nelse if (bar) doSomething();\nelse\n doSomething();", + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "0 spaces", + "actual": 5 + }, + "line": 5 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 9 + }, + "line": 6 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 2 errors but had 4: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 5.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 5, + column: 0, + endLine: 5, + endColumn: 5, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 9.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 6, + column: 0, + endLine: 6, + endColumn: 9, + suggestions: null + } +] + +4 !== 2 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +if (foo) + if (bar) doSomething(); + else doSomething(); +else if (bar) +doSomething(); +else +doSomething(); +``` + +```json +{ + "output": "if (foo)\n if (bar) doSomething();\n else doSomething();\nelse if (bar)\n doSomething();\nelse\n doSomething();", + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 5 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 7 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Hydrated message "Expected indentation of 4 spaces but found 0." does not match "Expected indentation of 0 spaces but found 4." ++ actual - expected + ++ 'Expected indentation of 0 spaces but found 4.' +- 'Expected indentation of 4 spaces but found 0.' + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +if (foo) + if (bar) doSomething(); + else doSomething(); +else +if (foo) + if (bar) doSomething(); + else doSomething(); +else + if (bar) doSomething(); + else doSomething(); +``` + +```json +{ + "output": "if (foo)\n if (bar) doSomething();\n else doSomething();\nelse\n if (foo)\n if (bar) doSomething();\n else doSomething();\n else\n if (bar) doSomething();\n else doSomething();", + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 5 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "8 spaces", + "actual": 4 + }, + "line": 6 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "8 spaces", + "actual": 4 + }, + "line": 7 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 8 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "8 spaces", + "actual": 4 + }, + "line": 9 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "8 spaces", + "actual": 4 + }, + "line": 10 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Hydrated message "Expected indentation of 4 spaces but found 0." does not match "Expected indentation of 0 spaces but found 4." ++ actual - expected + ++ 'Expected indentation of 0 spaces but found 4.' +- 'Expected indentation of 4 spaces but found 0.' + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +if (foo) + if (bar) doSomething(); + else doSomething(); +else +if (foo) +if (bar) doSomething(); +else +if (bar) doSomething(); +else doSomething(); +else doSomething(); +``` + +```json +{ + "output": "if (foo)\n if (bar) doSomething();\n else doSomething();\nelse\n if (foo)\n if (bar) doSomething();\n else\n if (bar) doSomething();\n else doSomething();\n else doSomething();", + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 5 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "8 spaces", + "actual": 0 + }, + "line": 6 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "8 spaces", + "actual": 0 + }, + "line": 7 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "12 spaces", + "actual": 0 + }, + "line": 8 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "12 spaces", + "actual": 0 + }, + "line": 9 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 10 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 6 errors but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + } +] + +2 !== 6 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +if (foo) +if (bar) doSomething(); +else doSomething(); +else if (foo) doSomething(); + else doSomething(); +``` + +```json +{ + "output": "if (foo)\n if (bar) doSomething();\n else doSomething();\nelse if (foo) doSomething();\nelse doSomething();", + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 2 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 3 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "0 spaces", + "actual": 4 + }, + "line": 5 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 3 errors but had 1: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 5, + column: 0, + endLine: 5, + endColumn: 4, + suggestions: null + } +] + +1 !== 3 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +if (foo) + if (bar) doSomething(); + else doSomething(); +else if (foo) { +doSomething(); +} +``` + +```json +{ + "output": "if (foo)\n if (bar) doSomething();\n else doSomething();\nelse if (foo) {\n doSomething();\n}", + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 5 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 2: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + } +] + +2 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +if (foo) + if (bar) doSomething(); + else doSomething(); +else if (foo) + { + doSomething(); + } +``` + +```json +{ + "output": "if (foo)\n if (bar) doSomething();\n else doSomething();\nelse if (foo)\n{\n doSomething();\n}", + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "0 spaces", + "actual": 4 + }, + "line": 5 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 8 + }, + "line": 6 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "0 spaces", + "actual": 4 + }, + "line": 7 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 3 errors but had 5: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 5, + column: 0, + endLine: 5, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 8.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 6, + column: 0, + endLine: 6, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 7, + column: 0, + endLine: 7, + endColumn: 4, + suggestions: null + } +] + +5 !== 3 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +if (foo) + if (bar) doSomething(); + else doSomething(); +else +if (foo) { + doSomething(); +} +``` + +```json +{ + "output": "if (foo)\n if (bar) doSomething();\n else doSomething();\nelse\n if (foo) {\n doSomething();\n }", + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 5 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "8 spaces", + "actual": 4 + }, + "line": 6 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 7 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Hydrated message "Expected indentation of 4 spaces but found 0." does not match "Expected indentation of 0 spaces but found 4." ++ actual - expected + ++ 'Expected indentation of 0 spaces but found 4.' +- 'Expected indentation of 4 spaces but found 0.' + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### indent > invalid + +```js +if (foo) + if (bar) doSomething(); + else doSomething(); +else +if (foo) +{ + doSomething(); +} +``` + +```json +{ + "output": "if (foo)\n if (bar) doSomething();\n else doSomething();\nelse\n if (foo)\n {\n doSomething();\n }", + "errors": [ + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 5 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 6 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "8 spaces", + "actual": 4 + }, + "line": 7 + }, + { + "messageId": "wrongIndentation", + "data": { + "expected": "4 spaces", + "actual": 0 + }, + "line": 8 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 4 errors but had 3: [ + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 2, + column: 0, + endLine: 2, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'IfStatement', + line: 3, + column: 0, + endLine: 3, + endColumn: 4, + suggestions: null + }, + { + ruleId: 'rule-to-test/indent', + message: 'Expected indentation of 0 spaces but found 4.', + messageId: 'wrongIndentation', + severity: 1, + nodeType: 'BlockStatement', + line: 7, + column: 0, + endLine: 7, + endColumn: 4, + suggestions: null + } +] + +3 !== 4 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +### `init-declarations` + +Pass: 47 / 81 (58.0%) +Fail: 34 / 81 (42.0%) + +#### init-declarations > valid + +```js +declare const foo: number; +``` + +```json +{ + "options": [ + "always" + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### init-declarations > valid + +```js +declare const foo: number; +``` + +```json +{ + "options": [ + "never" + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### init-declarations > valid + +```js + +\u0009 declare namespace myLib { +\u0009\u0009let numberOfGreetings: number; +\u0009 } +\u0009\u0009\u0009 +``` + +```json +{ + "code": "\n\t declare namespace myLib {\n\t\tlet numberOfGreetings: number;\n\t }\n\t\t\t", + "options": [ + "always" + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### init-declarations > valid + +```js + +\u0009 declare namespace myLib { +\u0009\u0009let numberOfGreetings: number; +\u0009 } +\u0009\u0009\u0009 +``` + +```json +{ + "code": "\n\t declare namespace myLib {\n\t\tlet numberOfGreetings: number;\n\t }\n\t\t\t", + "options": [ + "never" + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### init-declarations > valid + +```js + +\u0009 declare namespace myLib { +\u0009\u0009let valueInside: number; +\u0009 } +\u0009\u0009let valueOutside: number; +\u0009\u0009\u0009 +``` + +```json +{ + "code": "\n\t declare namespace myLib {\n\t\tlet valueInside: number;\n\t }\n\t\tlet valueOutside: number;\n\t\t\t", + "options": [ + "never" + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### init-declarations > valid + +```js + +\u0009 interface GreetingSettings { +\u0009\u0009greeting: string; +\u0009\u0009duration?: number; +\u0009\u0009color?: string; +\u0009 } +\u0009\u0009\u0009 +``` + +```json +{ + "code": "\n\t interface GreetingSettings {\n\t\tgreeting: string;\n\t\tduration?: number;\n\t\tcolor?: string;\n\t }\n\t\t\t" +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### init-declarations > valid + +```js + +\u0009 interface GreetingSettings { +\u0009\u0009greeting: string; +\u0009\u0009duration?: number; +\u0009\u0009color?: string; +\u0009 } +\u0009\u0009\u0009 +``` + +```json +{ + "code": "\n\t interface GreetingSettings {\n\t\tgreeting: string;\n\t\tduration?: number;\n\t\tcolor?: string;\n\t }\n\t\t\t", + "options": [ + "never" + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### init-declarations > valid + +```js +type GreetingLike = string | (() => string) | Greeter; +``` + +```json +{} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### init-declarations > valid + +```js +type GreetingLike = string | (() => string) | Greeter; +``` + +```json +{ + "options": [ + "never" + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### init-declarations > valid + +```js + +\u0009 function foo() { +\u0009\u0009var bar: string; +\u0009 } +\u0009\u0009\u0009 +``` + +```json +{ + "code": "\n\t function foo() {\n\t\tvar bar: string;\n\t }\n\t\t\t", + "options": [ + "never" + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### init-declarations > valid + +```js +var bar: string; +``` + +```json +{ + "options": [ + "never" + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### init-declarations > valid + +```js + +\u0009 var bar: string = function (): string { +\u0009\u0009return 'string'; +\u0009 }; +\u0009\u0009\u0009 +``` + +```json +{ + "code": "\n\t var bar: string = function (): string {\n\t\treturn 'string';\n\t };\n\t\t\t", + "options": [ + "always" + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### init-declarations > valid + +```js + +\u0009 var bar: string = function (arg1: string): string { +\u0009\u0009return 'string'; +\u0009 }; +\u0009\u0009\u0009 +``` + +```json +{ + "code": "\n\t var bar: string = function (arg1: string): string {\n\t\treturn 'string';\n\t };\n\t\t\t", + "options": [ + "always" + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### init-declarations > valid + +```js +function foo(arg1: string = 'string'): void {} +``` + +```json +{ + "options": [ + "never" + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### init-declarations > valid + +```js +const foo: string = 'hello'; +``` + +```json +{ + "options": [ + "never" + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### init-declarations > valid + +```js + +\u0009 const class1 = class NAME { +\u0009\u0009constructor() { +\u0009\u0009 var name1: string = 'hello'; +\u0009\u0009} +\u0009 }; +\u0009\u0009\u0009 +``` + +```json +{ + "code": "\n\t const class1 = class NAME {\n\t\tconstructor() {\n\t\t var name1: string = 'hello';\n\t\t}\n\t };\n\t\t\t" +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### init-declarations > valid + +```js + +\u0009 const class1 = class NAME { +\u0009\u0009static pi: number = 3.14; +\u0009 }; +\u0009\u0009\u0009 +``` + +```json +{ + "code": "\n\t const class1 = class NAME {\n\t\tstatic pi: number = 3.14;\n\t };\n\t\t\t" +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### init-declarations > valid + +```js + +\u0009 const class1 = class NAME { +\u0009\u0009static pi: number = 3.14; +\u0009 }; +\u0009\u0009\u0009 +``` + +```json +{ + "code": "\n\t const class1 = class NAME {\n\t\tstatic pi: number = 3.14;\n\t };\n\t\t\t", + "options": [ + "never" + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### init-declarations > valid + +```js + +\u0009 interface IEmployee { +\u0009\u0009empCode: number; +\u0009\u0009empName: string; +\u0009\u0009getSalary: (number) => number; // arrow function +\u0009\u0009getManagerName(number): string; +\u0009 } +\u0009\u0009\u0009 +``` + +```json +{ + "code": "\n\t interface IEmployee {\n\t\tempCode: number;\n\t\tempName: string;\n\t\tgetSalary: (number) => number; // arrow function\n\t\tgetManagerName(number): string;\n\t }\n\t\t\t" +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### init-declarations > valid + +```js + +\u0009 interface IEmployee { +\u0009\u0009empCode: number; +\u0009\u0009empName: string; +\u0009\u0009getSalary: (number) => number; // arrow function +\u0009\u0009getManagerName(number): string; +\u0009 } +\u0009\u0009\u0009 +``` + +```json +{ + "code": "\n\t interface IEmployee {\n\t\tempCode: number;\n\t\tempName: string;\n\t\tgetSalary: (number) => number; // arrow function\n\t\tgetManagerName(number): string;\n\t }\n\t\t\t", + "options": [ + "never" + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### init-declarations > valid + +```js +const foo: number = 'asd'; +``` + +```json +{ + "options": [ + "always" + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### init-declarations > valid + +```js +const foo: number; +``` + +```json +{ + "options": [ + "never" + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### init-declarations > valid + +```js + +\u0009 namespace myLib { +\u0009\u0009let numberOfGreetings: number; +\u0009 } +\u0009\u0009\u0009 +``` + +```json +{ + "code": "\n\t namespace myLib {\n\t\tlet numberOfGreetings: number;\n\t }\n\t\t\t", + "options": [ + "never" + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### init-declarations > valid + +```js + +\u0009 namespace myLib { +\u0009\u0009let numberOfGreetings: number = 2; +\u0009 } +\u0009\u0009\u0009 +``` + +```json +{ + "code": "\n\t namespace myLib {\n\t\tlet numberOfGreetings: number = 2;\n\t }\n\t\t\t", + "options": [ + "always" + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### init-declarations > valid + +```js + +\u0009 declare namespace myLib1 { +\u0009\u0009const foo: number; +\u0009\u0009namespace myLib2 { +\u0009\u0009 let bar: string; +\u0009\u0009 namespace myLib3 { +\u0009\u0009\u0009let baz: object; +\u0009\u0009 } +\u0009\u0009} +\u0009 } +\u0009\u0009\u0009 +``` + +```json +{ + "code": "\n\t declare namespace myLib1 {\n\t\tconst foo: number;\n\t\tnamespace myLib2 {\n\t\t let bar: string;\n\t\t namespace myLib3 {\n\t\t\tlet baz: object;\n\t\t }\n\t\t}\n\t }\n\t\t\t", + "options": [ + "always" + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### init-declarations > valid + +```js + +\u0009 declare namespace myLib1 { +\u0009\u0009const foo: number; +\u0009\u0009namespace myLib2 { +\u0009\u0009 let bar: string; +\u0009\u0009 namespace myLib3 { +\u0009\u0009\u0009let baz: object; +\u0009\u0009 } +\u0009\u0009} +\u0009 } +\u0009\u0009\u0009 +``` + +```json +{ + "code": "\n\t declare namespace myLib1 {\n\t\tconst foo: number;\n\t\tnamespace myLib2 {\n\t\t let bar: string;\n\t\t namespace myLib3 {\n\t\t\tlet baz: object;\n\t\t }\n\t\t}\n\t }\n\t\t\t", + "options": [ + "never" + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### init-declarations > invalid + +```js +let arr: string[] = ['arr', 'ar']; +``` + +```json +{ + "options": [ + "never" + ], + "errors": [ + { + "column": 5, + "data": { + "idName": "arr" + }, + "endColumn": 34, + "endLine": 1, + "line": 1, + "messageId": "notInitialized" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### init-declarations > invalid + +```js +let arr: string = function () {}; +``` + +```json +{ + "options": [ + "never" + ], + "errors": [ + { + "column": 5, + "data": { + "idName": "arr" + }, + "endColumn": 33, + "endLine": 1, + "line": 1, + "messageId": "notInitialized" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### init-declarations > invalid + +```js + +\u0009 const class1 = class NAME { +\u0009\u0009constructor() { +\u0009\u0009 var name1: string = 'hello'; +\u0009\u0009} +\u0009 }; +\u0009\u0009\u0009 +``` + +```json +{ + "code": "\n\t const class1 = class NAME {\n\t\tconstructor() {\n\t\t var name1: string = 'hello';\n\t\t}\n\t };\n\t\t\t", + "options": [ + "never" + ], + "errors": [ + { + "column": 9, + "data": { + "idName": "name1" + }, + "endColumn": 32, + "endLine": 4, + "line": 4, + "messageId": "notInitialized" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### init-declarations > invalid + +```js +let arr: string; +``` + +```json +{ + "options": [ + "always" + ], + "errors": [ + { + "column": 5, + "data": { + "idName": "arr" + }, + "endColumn": 16, + "endLine": 1, + "line": 1, + "messageId": "initialized" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### init-declarations > invalid + +```js + +\u0009 namespace myLib { +\u0009\u0009let numberOfGreetings: number; +\u0009 } +\u0009\u0009\u0009 +``` + +```json +{ + "code": "\n\t namespace myLib {\n\t\tlet numberOfGreetings: number;\n\t }\n\t\t\t", + "options": [ + "always" + ], + "errors": [ + { + "column": 7, + "data": { + "idName": "numberOfGreetings" + }, + "endColumn": 32, + "endLine": 3, + "line": 3, + "messageId": "initialized" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### init-declarations > invalid + +```js + +\u0009 namespace myLib { +\u0009\u0009let numberOfGreetings: number = 2; +\u0009 } +\u0009\u0009\u0009 +``` + +```json +{ + "code": "\n\t namespace myLib {\n\t\tlet numberOfGreetings: number = 2;\n\t }\n\t\t\t", + "options": [ + "never" + ], + "errors": [ + { + "column": 7, + "data": { + "idName": "numberOfGreetings" + }, + "endColumn": 36, + "endLine": 3, + "line": 3, + "messageId": "notInitialized" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### init-declarations > invalid + +```js + +\u0009\u0009namespace myLib1 { +\u0009\u0009 const foo: number; +\u0009\u0009\u0009namespace myLib2 { +\u0009\u0009\u0009 let bar: string; +\u0009\u0009\u0009 namespace myLib3 { +\u0009\u0009\u0009\u0009let baz: object; +\u0009\u0009\u0009 } +\u0009\u0009 } +\u0009\u0009} +\u0009\u0009\u0009 +``` + +```json +{ + "code": "\n\t\tnamespace myLib1 {\n\t\t const foo: number;\n\t\t\tnamespace myLib2 {\n\t\t\t let bar: string;\n\t\t\t namespace myLib3 {\n\t\t\t\tlet baz: object;\n\t\t\t }\n\t\t }\n\t\t}\n\t\t\t", + "options": [ + "always" + ], + "errors": [ + { + "column": 11, + "data": { + "idName": "foo" + }, + "endColumn": 22, + "endLine": 3, + "line": 3, + "messageId": "initialized" + }, + { + "column": 10, + "data": { + "idName": "bar" + }, + "endColumn": 21, + "endLine": 5, + "line": 5, + "messageId": "initialized" + }, + { + "column": 9, + "data": { + "idName": "baz" + }, + "endColumn": 20, + "endLine": 7, + "line": 7, + "messageId": "initialized" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### init-declarations > invalid + +```js + +\u0009 declare namespace myLib { +\u0009\u0009let valueInside: number; +\u0009 } +\u0009\u0009let valueOutside: number; +\u0009\u0009\u0009 +``` + +```json +{ + "code": "\n\t declare namespace myLib {\n\t\tlet valueInside: number;\n\t }\n\t\tlet valueOutside: number;\n\t\t\t", + "options": [ + "always" + ], + "errors": [ + { + "column": 7, + "data": { + "idName": "valueOutside" + }, + "endColumn": 27, + "endLine": 5, + "line": 5, + "messageId": "initialized" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +### `keyword-spacing` + +Pass: 1072 / 1078 (99.4%) +Fail: 6 / 1078 (0.6%) + +#### keyword-spacing > valid + +```js + this.blah +``` + +```json +{ + "languageOptions": { + "parser": {} + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### keyword-spacing > valid + +```js +this.blah +``` + +```json +{ + "options": [ + { + "before": true, + "after": false, + "overrides": { + "this": { + "before": false + } + } + } + ], + "languageOptions": { + "parser": {} + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### keyword-spacing > valid + +```js +class Foo { @dec get bar() {} @dec set baz() {} @dec async baw() {} } +``` + +```json +{ + "languageOptions": { + "parser": {} + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### keyword-spacing > valid + +```js +class Foo { @dec static qux() {} @dec static get bar() {} @dec static set baz() {} @dec static async baw() {} } +``` + +```json +{ + "languageOptions": { + "parser": {} + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### keyword-spacing > invalid + +```js + this.blah +``` + +```json +{ + "output": "this.blah", + "options": [ + { + "before": true, + "after": false, + "overrides": { + "this": { + "before": false + } + } + } + ], + "languageOptions": { + "parser": {} + }, + "errors": [ + { + "messageId": "unexpectedBefore", + "data": { + "value": "this" + } + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### keyword-spacing > invalid + +```js +this.blah +``` + +```json +{ + "output": " this.blah", + "languageOptions": { + "parser": {} + }, + "errors": [ + { + "messageId": "expectedBefore", + "data": { + "value": "this" + } + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +### `lines-around-comment` + +Pass: 198 / 199 (99.5%) +Fail: 1 / 199 (0.5%) + +#### lines-around-comment > invalid + +```js +#!foo +var a = 1; +``` + +```json +{ + "output": "#!foo\n\nvar a = 1;", + "options": [ + { + "afterHashbangComment": true + } + ], + "errors": [ + { + "messageId": "after" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +### `lines-around-directive` + +Pass: 231 / 239 (96.7%) +Fail: 8 / 239 (3.3%) + +#### lines-around-directive > valid + +```js +#!/usr/bin/env node +'use strict'; +var foo; +``` + +```json +{ + "options": [ + "never" + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/lines-around-directive', + message: 'Unexpected newline before "use strict" directive.', + messageId: 'unexpected', + severity: 1, + nodeType: 'Literal', + line: 2, + column: 0, + endLine: 2, + endColumn: 13, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### lines-around-directive > valid + +```js +#!/usr/bin/env node +'use strict'; +'use asm'; +var foo; +``` + +```json +{ + "options": [ + "never" + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/lines-around-directive', + message: 'Unexpected newline before "use strict" directive.', + messageId: 'unexpected', + severity: 1, + nodeType: 'Literal', + line: 2, + column: 0, + endLine: 2, + endColumn: 13, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### lines-around-directive > valid + +```js +#!/usr/bin/env node +'use strict'; + +var foo; +``` + +```json +{ + "options": [ + { + "before": "never", + "after": "always" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/lines-around-directive', + message: 'Unexpected newline before "use strict" directive.', + messageId: 'unexpected', + severity: 1, + nodeType: 'Literal', + line: 2, + column: 0, + endLine: 2, + endColumn: 13, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### lines-around-directive > valid + +```js +#!/usr/bin/env node +'use strict'; +'use asm'; + +var foo; +``` + +```json +{ + "options": [ + { + "before": "never", + "after": "always" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/lines-around-directive', + message: 'Unexpected newline before "use strict" directive.', + messageId: 'unexpected', + severity: 1, + nodeType: 'Literal', + line: 2, + column: 0, + endLine: 2, + endColumn: 13, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### lines-around-directive > invalid + +```js +#!/usr/bin/env node +'use strict'; +var foo; +``` + +```json +{ + "output": "#!/usr/bin/env node\n\n'use strict';\n\nvar foo;", + "options": [ + "always" + ], + "errors": [ + { + "messageId": "expected", + "data": { + "location": "before", + "value": "use strict" + } + }, + { + "messageId": "expected", + "data": { + "location": "after", + "value": "use strict" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 2 errors but had 1: [ + { + ruleId: 'rule-to-test/lines-around-directive', + message: 'Expected newline after "use strict" directive.', + messageId: 'expected', + severity: 1, + nodeType: 'Literal', + line: 2, + column: 0, + endLine: 2, + endColumn: 13, + suggestions: null + } +] + +1 !== 2 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### lines-around-directive > invalid + +```js +#!/usr/bin/env node +'use strict'; +'use asm'; +var foo; +``` + +```json +{ + "output": "#!/usr/bin/env node\n\n'use strict';\n'use asm';\n\nvar foo;", + "options": [ + "always" + ], + "errors": [ + { + "messageId": "expected", + "data": { + "location": "before", + "value": "use strict" + } + }, + { + "messageId": "expected", + "data": { + "location": "after", + "value": "use asm" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 2 errors but had 1: [ + { + ruleId: 'rule-to-test/lines-around-directive', + message: 'Expected newline after "use asm" directive.', + messageId: 'expected', + severity: 1, + nodeType: 'Literal', + line: 3, + column: 0, + endLine: 3, + endColumn: 10, + suggestions: null + } +] + +1 !== 2 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### lines-around-directive > invalid + +```js +#!/usr/bin/env node +'use strict'; + +var foo; +``` + +```json +{ + "output": "#!/usr/bin/env node\n\n'use strict';\nvar foo;", + "options": [ + { + "before": "always", + "after": "never" + } + ], + "errors": [ + { + "messageId": "expected", + "data": { + "location": "before", + "value": "use strict" + } + }, + { + "messageId": "unexpected", + "data": { + "location": "after", + "value": "use strict" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 2 errors but had 1: [ + { + ruleId: 'rule-to-test/lines-around-directive', + message: 'Unexpected newline after "use strict" directive.', + messageId: 'unexpected', + severity: 1, + nodeType: 'Literal', + line: 2, + column: 0, + endLine: 2, + endColumn: 13, + suggestions: null + } +] + +1 !== 2 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### lines-around-directive > invalid + +```js +#!/usr/bin/env node +'use strict'; +'use asm'; + +var foo; +``` + +```json +{ + "output": "#!/usr/bin/env node\n\n'use strict';\n'use asm';\nvar foo;", + "options": [ + { + "before": "always", + "after": "never" + } + ], + "errors": [ + { + "messageId": "expected", + "data": { + "location": "before", + "value": "use strict" + } + }, + { + "messageId": "unexpected", + "data": { + "location": "after", + "value": "use asm" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 2 errors but had 1: [ + { + ruleId: 'rule-to-test/lines-around-directive', + message: 'Unexpected newline after "use asm" directive.', + messageId: 'unexpected', + severity: 1, + nodeType: 'Literal', + line: 3, + column: 0, + endLine: 3, + endColumn: 10, + suggestions: null + } +] + +1 !== 2 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +### `logical-assignment-operators` + +Pass: 272 / 304 (89.5%) +Fail: 32 / 304 (10.5%) + +#### logical-assignment-operators > valid + +```js +if (a) { a = b } else {} +``` + +```json +{ + "options": [ + "always", + { + "enforceForIfStatements": true + } + ] +} +``` + +TypeError: Cannot convert object to primitive value + at Array.A$1 (apps/oxlint/dist/lint.js) + at apps/oxlint/dist/lint.js + at A.matches (apps/oxlint/dist/lint.js) + at apps/oxlint/dist/lint.js + + +#### logical-assignment-operators > valid + +```js +if (a) { a = b } else if (a) {} +``` + +```json +{ + "options": [ + "always", + { + "enforceForIfStatements": true + } + ] +} +``` + +TypeError: Cannot convert object to primitive value + at Array.A$1 (apps/oxlint/dist/lint.js) + at apps/oxlint/dist/lint.js + at A.matches (apps/oxlint/dist/lint.js) + at apps/oxlint/dist/lint.js + + +#### logical-assignment-operators > valid + +```js +if (unrelated) {} else if (a) a = b; else {} +``` + +```json +{ + "options": [ + "always", + { + "enforceForIfStatements": true + } + ] +} +``` + +TypeError: Cannot convert object to primitive value + at Array.A$1 (apps/oxlint/dist/lint.js) + at apps/oxlint/dist/lint.js + at A.matches (apps/oxlint/dist/lint.js) + at apps/oxlint/dist/lint.js + + +#### logical-assignment-operators > valid + +```js +if (unrelated) {} else if (a) a = b; else if (unrelated) {} +``` + +```json +{ + "options": [ + "always", + { + "enforceForIfStatements": true + } + ] +} +``` + +TypeError: Cannot convert object to primitive value + at Array.A$1 (apps/oxlint/dist/lint.js) + at apps/oxlint/dist/lint.js + at A.matches (apps/oxlint/dist/lint.js) + at apps/oxlint/dist/lint.js + + +#### logical-assignment-operators > invalid + +```js +if (a == undefined) a = b +``` + +```json +{ + "output": "a ??= b", + "options": [ + "always", + { + "enforceForIfStatements": true + } + ], + "errors": [ + { + "messageId": "if", + "data": { + "operator": "??=" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### logical-assignment-operators > invalid + +```js +if (a === null || a === undefined) a = b +``` + +```json +{ + "output": "a ??= b", + "options": [ + "always", + { + "enforceForIfStatements": true + } + ], + "errors": [ + { + "messageId": "if", + "data": { + "operator": "??=" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### logical-assignment-operators > invalid + +```js +if (a === undefined || a === null) a = b +``` + +```json +{ + "output": "a ??= b", + "options": [ + "always", + { + "enforceForIfStatements": true + } + ], + "errors": [ + { + "messageId": "if", + "data": { + "operator": "??=" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### logical-assignment-operators > invalid + +```js +{ const undefined = 0; } +if (a == undefined) a = b +``` + +```json +{ + "output": "{ const undefined = 0; }\na ??= b", + "options": [ + "always", + { + "enforceForIfStatements": true + } + ], + "errors": [ + { + "messageId": "if", + "data": { + "operator": "??=" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### logical-assignment-operators > invalid + +```js +if (a == undefined) a = b +{ const undefined = 0; } +``` + +```json +{ + "output": "a ??= b\n{ const undefined = 0; }", + "options": [ + "always", + { + "enforceForIfStatements": true + } + ], + "errors": [ + { + "messageId": "if", + "data": { + "operator": "??=" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### logical-assignment-operators > invalid + +```js +if (undefined == a) a = b +``` + +```json +{ + "output": "a ??= b", + "options": [ + "always", + { + "enforceForIfStatements": true + } + ], + "errors": [ + { + "messageId": "if", + "data": { + "operator": "??=" + }, + "suggestions": [] + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### logical-assignment-operators > invalid + +```js +if (undefined === a || a === null) a = b +``` + +```json +{ + "output": "a ??= b", + "options": [ + "always", + { + "enforceForIfStatements": true + } + ], + "errors": [ + { + "messageId": "if", + "data": { + "operator": "??=" + }, + "suggestions": [] + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### logical-assignment-operators > invalid + +```js +if (a === undefined || null === a) a = b +``` + +```json +{ + "output": "a ??= b", + "options": [ + "always", + { + "enforceForIfStatements": true + } + ], + "errors": [ + { + "messageId": "if", + "data": { + "operator": "??=" + }, + "suggestions": [] + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### logical-assignment-operators > invalid + +```js +if (undefined === a || null === a) a = b +``` + +```json +{ + "output": "a ??= b", + "options": [ + "always", + { + "enforceForIfStatements": true + } + ], + "errors": [ + { + "messageId": "if", + "data": { + "operator": "??=" + }, + "suggestions": [] + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### logical-assignment-operators > invalid + +```js +if (null === a || a === undefined) a = b +``` + +```json +{ + "output": "a ??= b", + "options": [ + "always", + { + "enforceForIfStatements": true + } + ], + "errors": [ + { + "messageId": "if", + "data": { + "operator": "??=" + }, + "suggestions": [] + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### logical-assignment-operators > invalid + +```js +if (a === null || undefined === a) a = b +``` + +```json +{ + "output": "a ??= b", + "options": [ + "always", + { + "enforceForIfStatements": true + } + ], + "errors": [ + { + "messageId": "if", + "data": { + "operator": "??=" + }, + "suggestions": [] + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### logical-assignment-operators > invalid + +```js +if (null === a || undefined === a) a = b +``` + +```json +{ + "output": "a ??= b", + "options": [ + "always", + { + "enforceForIfStatements": true + } + ], + "errors": [ + { + "messageId": "if", + "data": { + "operator": "??=" + }, + "suggestions": [] + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### logical-assignment-operators > invalid + +```js +if (a.b === undefined || a.b === null) a.b = c +``` + +```json +{ + "output": null, + "options": [ + "always", + { + "enforceForIfStatements": true + } + ], + "errors": [ + { + "messageId": "if", + "data": { + "operator": "??=" + }, + "suggestions": [ + { + "messageId": "convertIf", + "data": { + "operator": "??=" + }, + "output": "a.b ??= c" + } + ] + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### logical-assignment-operators > invalid + +```js +if (unrelated) {} else if (a) a = b; +``` + +```json +{ + "output": "if (unrelated) {} else a &&= b;", + "options": [ + "always", + { + "enforceForIfStatements": true + } + ], + "errors": [ + { + "messageId": "if", + "data": { + "operator": "&&=" + } + } + ] +} +``` + +TypeError: Cannot convert object to primitive value + at Array.A$1 (apps/oxlint/dist/lint.js) + at apps/oxlint/dist/lint.js + at A.matches (apps/oxlint/dist/lint.js) + at apps/oxlint/dist/lint.js + + +#### logical-assignment-operators > invalid + +```js +if (a) {} else if (b) {} else if (a) a = b; +``` + +```json +{ + "output": "if (a) {} else if (b) {} else a &&= b;", + "options": [ + "always", + { + "enforceForIfStatements": true + } + ], + "errors": [ + { + "messageId": "if", + "data": { + "operator": "&&=" + } + } + ] +} +``` + +TypeError: Cannot convert object to primitive value + at Array.A$1 (apps/oxlint/dist/lint.js) + at apps/oxlint/dist/lint.js + at A.matches (apps/oxlint/dist/lint.js) + at apps/oxlint/dist/lint.js + + +#### logical-assignment-operators > invalid + +```js +if (unrelated) {} else +if (a) a = b; +``` + +```json +{ + "output": "if (unrelated) {} else\na &&= b;", + "options": [ + "always", + { + "enforceForIfStatements": true + } + ], + "errors": [ + { + "messageId": "if", + "data": { + "operator": "&&=" + } + } + ] +} +``` + +TypeError: Cannot convert object to primitive value + at Array.A$1 (apps/oxlint/dist/lint.js) + at apps/oxlint/dist/lint.js + at A.matches (apps/oxlint/dist/lint.js) + at apps/oxlint/dist/lint.js + + +#### logical-assignment-operators > invalid + +```js +if (unrelated) { +} +else if (a) { +a = b; +} +``` + +```json +{ + "output": "if (unrelated) {\n}\nelse a &&= b;", + "options": [ + "always", + { + "enforceForIfStatements": true + } + ], + "errors": [ + { + "messageId": "if", + "data": { + "operator": "&&=" + } + } + ] +} +``` + +TypeError: Cannot convert object to primitive value + at Array.A$1 (apps/oxlint/dist/lint.js) + at apps/oxlint/dist/lint.js + at A.matches (apps/oxlint/dist/lint.js) + at apps/oxlint/dist/lint.js + + +#### logical-assignment-operators > invalid + +```js +if (unrelated) statement; else if (a) a = b; +``` + +```json +{ + "output": "if (unrelated) statement; else a &&= b;", + "options": [ + "always", + { + "enforceForIfStatements": true + } + ], + "errors": [ + { + "messageId": "if", + "data": { + "operator": "&&=" + } + } + ] +} +``` + +TypeError: Cannot convert object to primitive value + at Array.A$1 (apps/oxlint/dist/lint.js) + at apps/oxlint/dist/lint.js + at A.matches (apps/oxlint/dist/lint.js) + at apps/oxlint/dist/lint.js + + +#### logical-assignment-operators > invalid + +```js +if (unrelated) id +else if (a) (a) = b +``` + +```json +{ + "output": null, + "options": [ + "always", + { + "enforceForIfStatements": true + } + ], + "errors": [ + { + "messageId": "if", + "data": { + "operator": "&&=" + } + } + ] +} +``` + +TypeError: Cannot convert object to primitive value + at Array.A$1 (apps/oxlint/dist/lint.js) + at apps/oxlint/dist/lint.js + at A.matches (apps/oxlint/dist/lint.js) + at apps/oxlint/dist/lint.js + + +#### logical-assignment-operators > invalid + +```js +if (unrelated) {} else if (a) a = b; else if (c) c = d +``` + +```json +{ + "output": "if (unrelated) {} else if (a) a = b; else c &&= d", + "options": [ + "always", + { + "enforceForIfStatements": true + } + ], + "errors": [ + { + "messageId": "if", + "data": { + "operator": "&&=" + } + } + ] +} +``` + +TypeError: Cannot convert object to primitive value + at Array.A$1 (apps/oxlint/dist/lint.js) + at apps/oxlint/dist/lint.js + at A.matches (apps/oxlint/dist/lint.js) + at apps/oxlint/dist/lint.js + + +#### logical-assignment-operators > invalid + +```js +if (unrelated) { /* body */ } else if (a) a = b; +``` + +```json +{ + "output": "if (unrelated) { /* body */ } else a &&= b;", + "options": [ + "always", + { + "enforceForIfStatements": true + } + ], + "errors": [ + { + "messageId": "if", + "data": { + "operator": "&&=" + } + } + ] +} +``` + +TypeError: Cannot convert object to primitive value + at Array.A$1 (apps/oxlint/dist/lint.js) + at apps/oxlint/dist/lint.js + at A.matches (apps/oxlint/dist/lint.js) + at apps/oxlint/dist/lint.js + + +#### logical-assignment-operators > invalid + +```js +if (unrelated) {} /* before else */ else if (a) a = b; +``` + +```json +{ + "output": "if (unrelated) {} /* before else */ else a &&= b;", + "options": [ + "always", + { + "enforceForIfStatements": true + } + ], + "errors": [ + { + "messageId": "if", + "data": { + "operator": "&&=" + } + } + ] +} +``` + +TypeError: Cannot convert object to primitive value + at Array.A$1 (apps/oxlint/dist/lint.js) + at apps/oxlint/dist/lint.js + at A.matches (apps/oxlint/dist/lint.js) + at apps/oxlint/dist/lint.js + + +#### logical-assignment-operators > invalid + +```js +if (unrelated) {} else // Line +if (a) a = b; +``` + +```json +{ + "output": "if (unrelated) {} else // Line\na &&= b;", + "options": [ + "always", + { + "enforceForIfStatements": true + } + ], + "errors": [ + { + "messageId": "if", + "data": { + "operator": "&&=" + } + } + ] +} +``` + +TypeError: Cannot convert object to primitive value + at Array.A$1 (apps/oxlint/dist/lint.js) + at apps/oxlint/dist/lint.js + at A.matches (apps/oxlint/dist/lint.js) + at apps/oxlint/dist/lint.js + + +#### logical-assignment-operators > invalid + +```js +if (unrelated) {} else /* Block */ if (a) a = b; +``` + +```json +{ + "output": "if (unrelated) {} else /* Block */ a &&= b;", + "options": [ + "always", + { + "enforceForIfStatements": true + } + ], + "errors": [ + { + "messageId": "if", + "data": { + "operator": "&&=" + } + } + ] +} +``` + +TypeError: Cannot convert object to primitive value + at Array.A$1 (apps/oxlint/dist/lint.js) + at apps/oxlint/dist/lint.js + at A.matches (apps/oxlint/dist/lint.js) + at apps/oxlint/dist/lint.js + + +#### logical-assignment-operators > invalid + +```js +a ||= b as number; +``` + +```json +{ + "output": "a = a || (b as number);", + "options": [ + "never" + ], + "languageOptions": { + "parser": {} + }, + "errors": [ + { + "messageId": "unexpected", + "data": { + "operator": "||=" + } + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### logical-assignment-operators > invalid + +```js +a.b.c || (a.b.c = d as number) +``` + +```json +{ + "output": null, + "languageOptions": { + "parser": {} + }, + "errors": [ + { + "messageId": "logical", + "data": { + "operator": "||=" + }, + "suggestions": [ + { + "messageId": "convertLogical", + "data": { + "operator": "||=" + }, + "output": "a.b.c ||= d as number" + } + ] + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### logical-assignment-operators > invalid + +```js +a.b.c || (a.b.c = (d as number)) +``` + +```json +{ + "output": null, + "languageOptions": { + "parser": {} + }, + "errors": [ + { + "messageId": "logical", + "data": { + "operator": "||=" + }, + "suggestions": [ + { + "messageId": "convertLogical", + "data": { + "operator": "||=" + }, + "output": "a.b.c ||= (d as number)" + } + ] + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### logical-assignment-operators > invalid + +```js +(a.b.c || (a.b.c = d)) as number +``` + +```json +{ + "output": null, + "languageOptions": { + "parser": {} + }, + "errors": [ + { + "messageId": "logical", + "data": { + "operator": "||=" + }, + "suggestions": [ + { + "messageId": "convertLogical", + "data": { + "operator": "||=" + }, + "output": "(a.b.c ||= d) as number" + } + ] + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +### `max-params` + +Pass: 26 / 45 (57.8%) +Fail: 19 / 45 (42.2%) + +#### max-params > valid + +```js + + class Foo { +\u0009method(this: void, a, b, c) {} + } +\u0009 +``` + +```json +{ + "code": "\n class Foo {\n\tmethod(this: void, a, b, c) {}\n }\n\t " +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### max-params > valid + +```js + + class Foo { +\u0009method(this: Foo, a, b) {} + } +\u0009 +``` + +```json +{ + "code": "\n class Foo {\n\tmethod(this: Foo, a, b) {}\n }\n\t " +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### max-params > valid + +```js + + class Foo { +\u0009method(this: void) {} + } +\u0009\u0009 +``` + +```json +{ + "code": "\n class Foo {\n\tmethod(this: void) {}\n }\n\t\t", + "options": [ + { + "max": 0 + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### max-params > valid + +```js + + class Foo { +\u0009method(this: void, a) {} + } +\u0009\u0009 +``` + +```json +{ + "code": "\n class Foo {\n\tmethod(this: void, a) {}\n }\n\t\t", + "options": [ + { + "max": 1 + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### max-params > valid + +```js + + class Foo { +\u0009method(this: void, a) {} + } +\u0009\u0009 +``` + +```json +{ + "code": "\n class Foo {\n\tmethod(this: void, a) {}\n }\n\t\t", + "options": [ + { + "countVoidThis": true, + "max": 2 + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### max-params > valid + +```js +function testD(this: void, a) {} +``` + +```json +{ + "options": [ + { + "max": 1 + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### max-params > valid + +```js +function testD(this: void, a) {} +``` + +```json +{ + "options": [ + { + "countVoidThis": true, + "max": 2 + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### max-params > valid + +```js +const testE = function (this: void, a) {} +``` + +```json +{ + "options": [ + { + "max": 1 + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### max-params > valid + +```js +const testE = function (this: void, a) {} +``` + +```json +{ + "options": [ + { + "countVoidThis": true, + "max": 2 + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### max-params > valid + +```js + + declare function makeDate(m: number, d: number, y: number): Date; +\u0009\u0009 +``` + +```json +{ + "code": "\n declare function makeDate(m: number, d: number, y: number): Date;\n\t\t", + "options": [ + { + "max": 3 + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### max-params > valid + +```js + + type sum = (a: number, b: number) => number; +\u0009\u0009 +``` + +```json +{ + "code": "\n type sum = (a: number, b: number) => number;\n\t\t", + "options": [ + { + "max": 2 + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### max-params > invalid + +```js + + class Foo { +\u0009method(this: void, a, b, c, d) {} + } +\u0009\u0009 +``` + +```json +{ + "code": "\n class Foo {\n\tmethod(this: void, a, b, c, d) {}\n }\n\t\t", + "errors": [ + { + "messageId": "exceed" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### max-params > invalid + +```js + + class Foo { +\u0009method(this: void, a) {} + } +\u0009\u0009 +``` + +```json +{ + "code": "\n class Foo {\n\tmethod(this: void, a) {}\n }\n\t\t", + "options": [ + { + "countVoidThis": true, + "max": 1 + } + ], + "errors": [ + { + "messageId": "exceed" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### max-params > invalid + +```js +function testD(this: void, a) {} +``` + +```json +{ + "options": [ + { + "countVoidThis": true, + "max": 1 + } + ], + "errors": [ + { + "messageId": "exceed" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### max-params > invalid + +```js +const testE = function (this: void, a) {} +``` + +```json +{ + "options": [ + { + "countVoidThis": true, + "max": 1 + } + ], + "errors": [ + { + "messageId": "exceed" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### max-params > invalid + +```js +function testFunction(test: void, a: number) {} +``` + +```json +{ + "options": [ + { + "countVoidThis": false, + "max": 1 + } + ], + "errors": [ + { + "messageId": "exceed" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### max-params > invalid + +```js + + class Foo { +\u0009method(this: Foo, a, b, c) {} + } +\u0009\u0009 +``` + +```json +{ + "code": "\n class Foo {\n\tmethod(this: Foo, a, b, c) {}\n }\n\t\t", + "errors": [ + { + "messageId": "exceed" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### max-params > invalid + +```js + + declare function makeDate(m: number, d: number, y: number): Date; +\u0009\u0009 +``` + +```json +{ + "code": "\n declare function makeDate(m: number, d: number, y: number): Date;\n\t\t", + "options": [ + { + "max": 1 + } + ], + "errors": [ + { + "messageId": "exceed" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### max-params > invalid + +```js + + type sum = (a: number, b: number) => number; +\u0009\u0009 +``` + +```json +{ + "code": "\n type sum = (a: number, b: number) => number;\n\t\t", + "options": [ + { + "max": 1 + } + ], + "errors": [ + { + "messageId": "exceed" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +### `multiline-comment-style` + +Pass: 88 / 110 (80.0%) +Fail: 22 / 110 (20.0%) + +#### multiline-comment-style > invalid + +```js + + // these are + // line comments + +``` + +```json +{ + "output": "\n /*\n * these are\n * line comments\n */\n ", + "errors": [ + { + "messageId": "expectedBlock", + "line": 2 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### multiline-comment-style > invalid + +```js + + //foo + ///bar + +``` + +```json +{ + "output": null, + "errors": [ + { + "messageId": "expectedBlock", + "line": 2 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### multiline-comment-style > invalid + +```js + + // foo + // bar + + // baz + // qux + +``` + +```json +{ + "output": "\n /*\n * foo\n * bar\n */\n\n /*\n * baz\n * qux\n */\n ", + "errors": [ + { + "messageId": "expectedBlock", + "line": 2 + }, + { + "messageId": "expectedBlock", + "line": 5 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 2 errors but had 0: [] + +0 !== 2 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### multiline-comment-style > invalid + +```js + + // foo + // bar + // baz + // qux + +``` + +```json +{ + "output": "\n /*\n * foo\n * bar\n * baz\n * qux\n */\n ", + "errors": [ + { + "messageId": "expectedBlock", + "line": 2 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### multiline-comment-style > invalid + +```js + + // foo + // + // baz + // qux + +``` + +```json +{ + "output": "\n /*\n * foo\n * \n * baz\n * qux\n */\n ", + "errors": [ + { + "messageId": "expectedBlock", + "line": 2 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### multiline-comment-style > invalid + +```js + + // foo + // bar + // baz + // qux + +``` + +```json +{ + "output": "\n /*\n * foo\n * bar\n * baz\n * qux\n */\n ", + "errors": [ + { + "messageId": "expectedBlock", + "line": 2 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### multiline-comment-style > invalid + +```js + + // foo + // bar + +``` + +```json +{ + "output": "\n /* foo\n bar */\n ", + "options": [ + "bare-block" + ], + "errors": [ + { + "messageId": "expectedBlock", + "line": 2 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### multiline-comment-style > invalid + +```js + + // foo + // + // bar + +``` + +```json +{ + "output": "\n /* foo\n \n bar */\n ", + "options": [ + "bare-block" + ], + "errors": [ + { + "messageId": "expectedBlock", + "line": 2 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### multiline-comment-style > invalid + +```js + + //foo + //bar + +``` + +```json +{ + "output": "\n /* foo\n bar */\n ", + "options": [ + "bare-block" + ], + "errors": [ + { + "messageId": "expectedBlock", + "line": 2 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### multiline-comment-style > invalid + +```js + + // foo + // bar + +``` + +```json +{ + "output": "\n /* foo\n bar */\n ", + "options": [ + "bare-block" + ], + "errors": [ + { + "messageId": "expectedBlock", + "line": 2 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### multiline-comment-style > invalid + +```js + + // foo + // bar + +``` + +```json +{ + "output": "\n /* foo\n bar */\n ", + "options": [ + "bare-block" + ], + "errors": [ + { + "messageId": "expectedBlock", + "line": 2 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### multiline-comment-style > invalid + +```js + + // foo + // bar + // baz + // qux + +``` + +```json +{ + "output": "\n /* foo\n bar\n baz\n qux */\n ", + "options": [ + "bare-block" + ], + "errors": [ + { + "messageId": "expectedBlock", + "line": 2 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### multiline-comment-style > invalid + +```js + + //{ + // "foo": 1, + // "bar": 2 + //} + +``` + +```json +{ + "output": "\n /*\n * {\n * \"foo\": 1,\n * \"bar\": 2\n * }\n */\n ", + "errors": [ + { + "messageId": "expectedBlock", + "line": 2 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### multiline-comment-style > invalid + +```js + + // foo + // + // bar + +``` + +```json +{ + "output": "\n /*\n * foo\n * \n * bar\n */\n ", + "options": [ + "starred-block" + ], + "errors": [ + { + "messageId": "expectedBlock", + "line": 2 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### multiline-comment-style > invalid + +```js + + // foo + // + // bar + +``` + +```json +{ + "output": "\n /*\n * foo\n * \n * bar\n */\n ", + "options": [ + "starred-block" + ], + "errors": [ + { + "messageId": "expectedBlock", + "line": 2 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### multiline-comment-style > invalid + +```js + + // foo + // + // bar + +``` + +```json +{ + "output": "\n /* foo\n \n bar */\n ", + "options": [ + "bare-block" + ], + "errors": [ + { + "messageId": "expectedBlock", + "line": 2 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### multiline-comment-style > invalid + +```js + + /* foo + + bar */ + +``` + +```json +{ + "output": "\n /*\n * foo\n * \n * bar \n */\n ", + "options": [ + "starred-block" + ], + "errors": [ + { + "messageId": "startNewline", + "line": 2 + }, + { + "messageId": "missingStar", + "line": 3 + }, + { + "messageId": "missingStar", + "line": 4 + }, + { + "messageId": "endNewline", + "line": 4 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: messageId 'endNewline' does not match expected messageId 'missingStar' ++ actual - expected + ++ 'endNewline' +- 'missingStar' + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### multiline-comment-style > invalid + +```js + + /* foo + + bar */ + +``` + +```json +{ + "output": "\n /*\n * foo\n * \n * bar \n */\n ", + "options": [ + "starred-block" + ], + "errors": [ + { + "messageId": "startNewline", + "line": 2 + }, + { + "messageId": "missingStar", + "line": 3 + }, + { + "messageId": "missingStar", + "line": 4 + }, + { + "messageId": "endNewline", + "line": 4 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: messageId 'endNewline' does not match expected messageId 'missingStar' ++ actual - expected + ++ 'endNewline' +- 'missingStar' + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### multiline-comment-style > invalid + +```js + + /*foo + + bar */ + +``` + +```json +{ + "output": "\n /*\n *foo\n *\n *bar \n */\n ", + "options": [ + "starred-block" + ], + "errors": [ + { + "messageId": "startNewline", + "line": 2 + }, + { + "messageId": "missingStar", + "line": 3 + }, + { + "messageId": "missingStar", + "line": 4 + }, + { + "messageId": "endNewline", + "line": 4 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: messageId 'endNewline' does not match expected messageId 'missingStar' ++ actual - expected + ++ 'endNewline' +- 'missingStar' + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### multiline-comment-style > invalid + +```js + + /*foo + + bar */ + +``` + +```json +{ + "output": "\n /*\n *foo\n * \n *bar \n */\n ", + "options": [ + "starred-block" + ], + "errors": [ + { + "messageId": "startNewline", + "line": 2 + }, + { + "messageId": "missingStar", + "line": 3 + }, + { + "messageId": "missingStar", + "line": 4 + }, + { + "messageId": "endNewline", + "line": 4 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: messageId 'endNewline' does not match expected messageId 'missingStar' ++ actual - expected + ++ 'endNewline' +- 'missingStar' + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### multiline-comment-style > invalid + +```js + + ////This comment is in + //`separate-lines` format. + +``` + +```json +{ + "output": null, + "options": [ + "starred-block" + ], + "errors": [ + { + "messageId": "expectedBlock", + "line": 2 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### multiline-comment-style > invalid + +```js + + // // This comment is in + // `separate-lines` format. + +``` + +```json +{ + "output": null, + "options": [ + "starred-block" + ], + "errors": [ + { + "messageId": "expectedBlock", + "line": 2 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +### `new-parens` + +Pass: 41 / 42 (97.6%) +Fail: 1 / 42 (2.4%) + +#### new-parens > valid + +```js +new Storage('state'); +``` + +```json +{ + "languageOptions": { + "parser": {} + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/new-parens', + message: "Missing '()' invoking a constructor.", + messageId: 'missing', + severity: 1, + nodeType: 'NewExpression', + line: 1, + column: 0, + endLine: 1, + endColumn: 11, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +### `no-alert` + +Pass: 36 / 42 (85.7%) +Fail: 6 / 42 (14.3%) + +#### no-alert > valid + +```js +var alert = function() {}; alert(); +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-alert', + message: 'Unexpected alert.', + messageId: 'unexpected', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 27, + endLine: 1, + endColumn: 34, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-alert > valid + +```js +var alert = function() {}; function test() { alert(); } +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-alert', + message: 'Unexpected alert.', + messageId: 'unexpected', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 45, + endLine: 1, + endColumn: 52, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-alert > valid + +```js +var globalThis = foo; globalThis.alert(); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2020 + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-alert', + message: 'Unexpected alert.', + messageId: 'unexpected', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 22, + endLine: 1, + endColumn: 40, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-alert > invalid + +```js +globalThis['alert'](foo) +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2020 + }, + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "alert" + }, + "line": 1, + "column": 1 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-alert > invalid + +```js +globalThis.alert(); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2020 + }, + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "alert" + }, + "line": 1, + "column": 1 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-alert > invalid + +```js +function foo() { var globalThis = bar; globalThis.alert(); } +globalThis.alert(); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2020 + }, + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "alert" + }, + "line": 2, + "column": 1 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +### `no-array-constructor` + +Pass: 121 / 146 (82.9%) +Fail: 25 / 146 (17.1%) + +#### no-array-constructor > valid + +```js +new Array() +``` + +```json +{ + "languageOptions": { + "globals": { + "Array": "off" + } + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-array-constructor', + message: 'The array literal notation [] is preferable.', + messageId: 'preferLiteral', + severity: 1, + nodeType: 'NewExpression', + line: 1, + column: 0, + endLine: 1, + endColumn: 11, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-array-constructor > valid + +```js +new Array(1, 2, 3); +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-array-constructor', + message: 'The array literal notation [] is preferable.', + messageId: 'preferLiteral', + severity: 1, + nodeType: 'NewExpression', + line: 1, + column: 0, + endLine: 1, + endColumn: 9, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-array-constructor > valid + +```js +new Array(); +``` + +```json +{} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-array-constructor > valid + +```js +Array(); +``` + +```json +{} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-array-constructor > valid + +```js +Array?.(1, 2, 3); +``` + +```json +{} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-array-constructor > valid + +```js +Array?.(); +``` + +```json +{} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-array-constructor > invalid + +```js +type T = Foo +Array(0, 1) +``` + +```json +{ + "output": "type T = Foo\n[0, 1]", + "errors": [ + { + "messageId": "preferLiteral" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-array-constructor > invalid + +```js +type T = Foo +Array(0, 1) +``` + +```json +{ + "output": "type T = Foo\n[0, 1]", + "errors": [ + { + "messageId": "preferLiteral" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-array-constructor > invalid + +```js +type T = (A | B) +Array(0, 1) +``` + +```json +{ + "output": "type T = (A | B)\n[0, 1]", + "errors": [ + { + "messageId": "preferLiteral" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-array-constructor > invalid + +```js +type T = -1 +Array(0, 1) +``` + +```json +{ + "output": "type T = -1\n[0, 1]", + "errors": [ + { + "messageId": "preferLiteral" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-array-constructor > invalid + +```js +type T = 'foo' +Array(0, 1) +``` + +```json +{ + "output": "type T = 'foo'\n[0, 1]", + "errors": [ + { + "messageId": "preferLiteral" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-array-constructor > invalid + +```js +const foo +Array(0, 1) +``` + +```json +{ + "output": "const foo\n[0, 1]", + "errors": [ + { + "messageId": "preferLiteral" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-array-constructor > invalid + +```js +declare const foo +Array(0, 1) +``` + +```json +{ + "output": "declare const foo\n[0, 1]", + "errors": [ + { + "messageId": "preferLiteral" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-array-constructor > invalid + +```js +function foo() +Array(0, 1) +``` + +```json +{ + "output": "function foo()\n[0, 1]", + "errors": [ + { + "messageId": "preferLiteral" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-array-constructor > invalid + +```js +declare function foo() +Array(0, 1) +``` + +```json +{ + "output": "declare function foo()\n[0, 1]", + "errors": [ + { + "messageId": "preferLiteral" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-array-constructor > invalid + +```js +function foo(): [] +Array(0, 1) +``` + +```json +{ + "output": "function foo(): []\n[0, 1]", + "errors": [ + { + "messageId": "preferLiteral" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-array-constructor > invalid + +```js +declare function foo(): [] +Array(0, 1) +``` + +```json +{ + "output": "declare function foo(): []\n[0, 1]", + "errors": [ + { + "messageId": "preferLiteral" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-array-constructor > invalid + +```js +function foo(): (Foo) +Array(0, 1) +``` + +```json +{ + "output": "function foo(): (Foo)\n[0, 1]", + "errors": [ + { + "messageId": "preferLiteral" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-array-constructor > invalid + +```js +declare function foo(): (Foo) +Array(0, 1) +``` + +```json +{ + "output": "declare function foo(): (Foo)\n[0, 1]", + "errors": [ + { + "messageId": "preferLiteral" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-array-constructor > invalid + +```js +let foo: bar +Array(0, 1) +``` + +```json +{ + "output": "let foo: bar\n[0, 1]", + "errors": [ + { + "messageId": "preferLiteral" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-array-constructor > invalid + +```js +import Foo = require('foo') +Array(0, 1) +``` + +```json +{ + "output": "import Foo = require('foo')\n[0, 1]", + "errors": [ + { + "messageId": "preferLiteral" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-array-constructor > invalid + +```js +import Foo = Bar +Array(0, 1) +``` + +```json +{ + "output": "import Foo = Bar\n[0, 1]", + "errors": [ + { + "messageId": "preferLiteral" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-array-constructor > invalid + +```js +import Foo = Bar.Baz.Qux +Array(0, 1) +``` + +```json +{ + "output": "import Foo = Bar.Baz.Qux\n[0, 1]", + "errors": [ + { + "messageId": "preferLiteral" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-array-constructor > invalid + +```js + +\u0009\u0009\u0009(function () { +\u0009\u0009\u0009\u0009Fn +\u0009\u0009\u0009\u0009Array() // ";" required +\u0009\u0009\u0009}) as Fn +\u0009\u0009\u0009Array() // ";" not required +\u0009\u0009\u0009 +``` + +```json +{ + "code": "\n\t\t\t(function () {\n\t\t\t\tFn\n\t\t\t\tArray() // \";\" required\n\t\t\t}) as Fn\n\t\t\tArray() // \";\" not required\n\t\t\t", + "output": "\n\t\t\t(function () {\n\t\t\t\tFn\n\t\t\t\t;[] // \";\" required\n\t\t\t}) as Fn\n\t\t\t[] // \";\" not required\n\t\t\t", + "errors": [ + { + "messageId": "preferLiteral" + }, + { + "messageId": "preferLiteral" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-array-constructor > invalid + +```js + +\u0009\u0009\u0009({ +\u0009\u0009\u0009\u0009foo() { +\u0009\u0009\u0009\u0009\u0009Object +\u0009\u0009\u0009\u0009\u0009Array() // ";" required +\u0009\u0009\u0009\u0009} +\u0009\u0009\u0009}) as Object +\u0009\u0009\u0009Array() // ";" not required +\u0009\u0009\u0009 +``` + +```json +{ + "code": "\n\t\t\t({\n\t\t\t\tfoo() {\n\t\t\t\t\tObject\n\t\t\t\t\tArray() // \";\" required\n\t\t\t\t}\n\t\t\t}) as Object\n\t\t\tArray() // \";\" not required\n\t\t\t", + "output": "\n\t\t\t({\n\t\t\t\tfoo() {\n\t\t\t\t\tObject\n\t\t\t\t\t;[] // \";\" required\n\t\t\t\t}\n\t\t\t}) as Object\n\t\t\t[] // \";\" not required\n\t\t\t", + "errors": [ + { + "messageId": "preferLiteral" + }, + { + "messageId": "preferLiteral" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +### `no-catch-shadow` + +Pass: 1 / 8 (12.5%) +Fail: 7 / 8 (87.5%) + +#### no-catch-shadow > valid + +```js +var foo = 1; try { bar(); } catch(baz) { } +``` + +```json +{} +``` + +TypeError: Cannot convert object to primitive value + at Array. (apps/oxlint/dist/lint.js) + at apps/oxlint/dist/lint.js + at A.matches (apps/oxlint/dist/lint.js) + at apps/oxlint/dist/lint.js + + +#### no-catch-shadow > valid + +```js +'use strict'; + +function broken() { + try { + throw new Error(); + } catch (e) { + // + } +} + +module.exports = broken; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +TypeError: Cannot convert object to primitive value + at Array. (apps/oxlint/dist/lint.js) + at apps/oxlint/dist/lint.js + at A.matches (apps/oxlint/dist/lint.js) + at apps/oxlint/dist/lint.js + + +#### no-catch-shadow > valid + +```js +try {} catch (error) {} +``` + +```json +{} +``` + +TypeError: Cannot convert object to primitive value + at Array. (apps/oxlint/dist/lint.js) + at apps/oxlint/dist/lint.js + at A.matches (apps/oxlint/dist/lint.js) + at apps/oxlint/dist/lint.js + + +#### no-catch-shadow > invalid + +```js +var foo = 1; try { bar(); } catch(foo) { } +``` + +```json +{ + "errors": [ + { + "messageId": "mutable", + "data": { + "name": "foo" + } + } + ] +} +``` + +TypeError: Cannot convert object to primitive value + at Array. (apps/oxlint/dist/lint.js) + at apps/oxlint/dist/lint.js + at A.matches (apps/oxlint/dist/lint.js) + at apps/oxlint/dist/lint.js + + +#### no-catch-shadow > invalid + +```js +function foo(){} try { bar(); } catch(foo) { } +``` + +```json +{ + "errors": [ + { + "messageId": "mutable", + "data": { + "name": "foo" + } + } + ] +} +``` + +TypeError: Cannot convert object to primitive value + at Array. (apps/oxlint/dist/lint.js) + at apps/oxlint/dist/lint.js + at A.matches (apps/oxlint/dist/lint.js) + at apps/oxlint/dist/lint.js + + +#### no-catch-shadow > invalid + +```js +function foo(){ try { bar(); } catch(foo) { } } +``` + +```json +{ + "errors": [ + { + "messageId": "mutable", + "data": { + "name": "foo" + } + } + ] +} +``` + +TypeError: Cannot convert object to primitive value + at Array. (apps/oxlint/dist/lint.js) + at apps/oxlint/dist/lint.js + at A.matches (apps/oxlint/dist/lint.js) + at apps/oxlint/dist/lint.js + + +#### no-catch-shadow > invalid + +```js +var foo = function(){ try { bar(); } catch(foo) { } }; +``` + +```json +{ + "errors": [ + { + "messageId": "mutable", + "data": { + "name": "foo" + } + } + ] +} +``` + +TypeError: Cannot convert object to primitive value + at Array. (apps/oxlint/dist/lint.js) + at apps/oxlint/dist/lint.js + at A.matches (apps/oxlint/dist/lint.js) + at apps/oxlint/dist/lint.js + + +### `no-constant-binary-expression` + +Pass: 225 / 260 (86.5%) +Fail: 35 / 260 (13.5%) + +#### no-constant-binary-expression > invalid + +```js +undefined && foo +``` + +```json +{ + "errors": [ + { + "messageId": "constantShortCircuit" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-constant-binary-expression > invalid + +```js +undefined ?? foo +``` + +```json +{ + "errors": [ + { + "messageId": "constantShortCircuit" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-constant-binary-expression > invalid + +```js +({}) == undefined +``` + +```json +{ + "errors": [ + { + "messageId": "constantBinaryOperand" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-constant-binary-expression > invalid + +```js +undefined == ({}) +``` + +```json +{ + "errors": [ + { + "messageId": "constantBinaryOperand" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-constant-binary-expression > invalid + +```js +undefined == true +``` + +```json +{ + "errors": [ + { + "messageId": "constantBinaryOperand" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-constant-binary-expression > invalid + +```js +true == undefined +``` + +```json +{ + "errors": [ + { + "messageId": "constantBinaryOperand" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-constant-binary-expression > invalid + +```js +undefined === true +``` + +```json +{ + "errors": [ + { + "messageId": "constantBinaryOperand" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-constant-binary-expression > invalid + +```js +undefined === null +``` + +```json +{ + "errors": [ + { + "messageId": "constantBinaryOperand" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-constant-binary-expression > invalid + +```js +({}) !== undefined +``` + +```json +{ + "errors": [ + { + "messageId": "constantBinaryOperand" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: messageId 'alwaysNew' does not match expected messageId 'constantBinaryOperand' ++ actual - expected + ++ 'alwaysNew' +- 'constantBinaryOperand' + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-constant-binary-expression > invalid + +```js +({}) === undefined +``` + +```json +{ + "errors": [ + { + "messageId": "constantBinaryOperand" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: messageId 'alwaysNew' does not match expected messageId 'constantBinaryOperand' ++ actual - expected + ++ 'alwaysNew' +- 'constantBinaryOperand' + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-constant-binary-expression > invalid + +```js +([]) === undefined +``` + +```json +{ + "errors": [ + { + "messageId": "constantBinaryOperand" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: messageId 'alwaysNew' does not match expected messageId 'constantBinaryOperand' ++ actual - expected + ++ 'alwaysNew' +- 'constantBinaryOperand' + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-constant-binary-expression > invalid + +```js +(() => {}) === undefined +``` + +```json +{ + "errors": [ + { + "messageId": "constantBinaryOperand" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: messageId 'alwaysNew' does not match expected messageId 'constantBinaryOperand' ++ actual - expected + ++ 'alwaysNew' +- 'constantBinaryOperand' + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-constant-binary-expression > invalid + +```js +(function() {}) === undefined +``` + +```json +{ + "errors": [ + { + "messageId": "constantBinaryOperand" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: messageId 'alwaysNew' does not match expected messageId 'constantBinaryOperand' ++ actual - expected + ++ 'alwaysNew' +- 'constantBinaryOperand' + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-constant-binary-expression > invalid + +```js +(class {}) === undefined +``` + +```json +{ + "errors": [ + { + "messageId": "constantBinaryOperand" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: messageId 'alwaysNew' does not match expected messageId 'constantBinaryOperand' ++ actual - expected + ++ 'alwaysNew' +- 'constantBinaryOperand' + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-constant-binary-expression > invalid + +```js +new Foo() === undefined +``` + +```json +{ + "errors": [ + { + "messageId": "constantBinaryOperand" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-constant-binary-expression > invalid + +```js +`` === undefined +``` + +```json +{ + "errors": [ + { + "messageId": "constantBinaryOperand" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-constant-binary-expression > invalid + +```js +1 === undefined +``` + +```json +{ + "errors": [ + { + "messageId": "constantBinaryOperand" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-constant-binary-expression > invalid + +```js +'hello' === undefined +``` + +```json +{ + "errors": [ + { + "messageId": "constantBinaryOperand" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-constant-binary-expression > invalid + +```js +/[a-z]/ === undefined +``` + +```json +{ + "errors": [ + { + "messageId": "constantBinaryOperand" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: messageId 'alwaysNew' does not match expected messageId 'constantBinaryOperand' ++ actual - expected + ++ 'alwaysNew' +- 'constantBinaryOperand' + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-constant-binary-expression > invalid + +```js +true === undefined +``` + +```json +{ + "errors": [ + { + "messageId": "constantBinaryOperand" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-constant-binary-expression > invalid + +```js +null === undefined +``` + +```json +{ + "errors": [ + { + "messageId": "constantBinaryOperand" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-constant-binary-expression > invalid + +```js +a++ === undefined +``` + +```json +{ + "errors": [ + { + "messageId": "constantBinaryOperand" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-constant-binary-expression > invalid + +```js +++a === undefined +``` + +```json +{ + "errors": [ + { + "messageId": "constantBinaryOperand" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-constant-binary-expression > invalid + +```js +--a === undefined +``` + +```json +{ + "errors": [ + { + "messageId": "constantBinaryOperand" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-constant-binary-expression > invalid + +```js +a-- === undefined +``` + +```json +{ + "errors": [ + { + "messageId": "constantBinaryOperand" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-constant-binary-expression > invalid + +```js +!a === undefined +``` + +```json +{ + "errors": [ + { + "messageId": "constantBinaryOperand" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-constant-binary-expression > invalid + +```js +typeof a === undefined +``` + +```json +{ + "errors": [ + { + "messageId": "constantBinaryOperand" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-constant-binary-expression > invalid + +```js +delete a === undefined +``` + +```json +{ + "errors": [ + { + "messageId": "constantBinaryOperand" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-constant-binary-expression > invalid + +```js +void a === undefined +``` + +```json +{ + "errors": [ + { + "messageId": "constantBinaryOperand" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-constant-binary-expression > invalid + +```js +undefined === undefined +``` + +```json +{ + "errors": [ + { + "messageId": "constantBinaryOperand" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-constant-binary-expression > invalid + +```js +(x = {}) === undefined +``` + +```json +{ + "errors": [ + { + "messageId": "constantBinaryOperand" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: messageId 'alwaysNew' does not match expected messageId 'constantBinaryOperand' ++ actual - expected + ++ 'alwaysNew' +- 'constantBinaryOperand' + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-constant-binary-expression > invalid + +```js +(x += y) === undefined +``` + +```json +{ + "errors": [ + { + "messageId": "constantBinaryOperand" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-constant-binary-expression > invalid + +```js +(x -= y) === undefined +``` + +```json +{ + "errors": [ + { + "messageId": "constantBinaryOperand" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-constant-binary-expression > invalid + +```js +(a, b, {}) === undefined +``` + +```json +{ + "errors": [ + { + "messageId": "constantBinaryOperand" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: messageId 'alwaysNew' does not match expected messageId 'constantBinaryOperand' ++ actual - expected + ++ 'alwaysNew' +- 'constantBinaryOperand' + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-constant-binary-expression > invalid + +```js +x === new Promise() +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "alwaysNew" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +### `no-constant-condition` + +Pass: 305 / 307 (99.3%) +Fail: 2 / 307 (0.7%) + +#### no-constant-condition > valid + +```js +if (Boolean()) {} +``` + +```json +{ + "languageOptions": { + "globals": { + "Boolean": "off" + } + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-constant-condition', + message: 'Unexpected constant condition.', + messageId: 'unexpected', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 4, + endLine: 1, + endColumn: 13, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-constant-condition > invalid + +```js +if (undefined) {} +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +### `no-constructor-return` + +Pass: 3 / 20 (15.0%) +Fail: 17 / 20 (85.0%) + +#### no-constructor-return > valid + +```js +function fn() { return } +``` + +```json +{} +``` + +TypeError: Cannot read properties of undefined (reading 'parent') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/no-constructor-return.js:45:15) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-constructor-return > valid + +```js +function fn(kumiko) { if (kumiko) { return kumiko } } +``` + +```json +{} +``` + +TypeError: Cannot read properties of undefined (reading 'parent') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/no-constructor-return.js:45:15) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-constructor-return > valid + +```js +const fn = function () { return } +``` + +```json +{} +``` + +TypeError: Cannot read properties of undefined (reading 'parent') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/no-constructor-return.js:45:15) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-constructor-return > valid + +```js +const fn = function () { if (kumiko) { return kumiko } } +``` + +```json +{} +``` + +TypeError: Cannot read properties of undefined (reading 'parent') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/no-constructor-return.js:45:15) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-constructor-return > valid + +```js +const fn = () => { return } +``` + +```json +{} +``` + +TypeError: Cannot read properties of undefined (reading 'parent') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/no-constructor-return.js:45:15) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-constructor-return > valid + +```js +const fn = () => { if (kumiko) { return kumiko } } +``` + +```json +{} +``` + +TypeError: Cannot read properties of undefined (reading 'parent') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/no-constructor-return.js:45:15) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-constructor-return > valid + +```js +return 'Kumiko Oumae' +``` + +```json +{ + "languageOptions": { + "parserOptions": { + "ecmaFeatures": { + "globalReturn": true + } + } + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'parent') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/no-constructor-return.js:45:15) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-constructor-return > valid + +```js +class C { method() { return '' } } +``` + +```json +{} +``` + +TypeError: Cannot read properties of undefined (reading 'parent') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/no-constructor-return.js:45:15) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-constructor-return > valid + +```js +class C { get value() { return '' } } +``` + +```json +{} +``` + +TypeError: Cannot read properties of undefined (reading 'parent') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/no-constructor-return.js:45:15) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-constructor-return > valid + +```js +class C { constructor(a) { if (!a) { return } else { a() } } } +``` + +```json +{} +``` + +TypeError: Cannot read properties of undefined (reading 'parent') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/no-constructor-return.js:45:15) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-constructor-return > valid + +```js +class C { constructor() { function fn() { return true } } } +``` + +```json +{} +``` + +TypeError: Cannot read properties of undefined (reading 'parent') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/no-constructor-return.js:45:15) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-constructor-return > valid + +```js +class C { constructor() { this.fn = function () { return true } } } +``` + +```json +{} +``` + +TypeError: Cannot read properties of undefined (reading 'parent') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/no-constructor-return.js:45:15) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-constructor-return > valid + +```js +class C { constructor() { this.fn = () => { return true } } } +``` + +```json +{} +``` + +TypeError: Cannot read properties of undefined (reading 'parent') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/no-constructor-return.js:45:15) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-constructor-return > valid + +```js +class C { constructor() { return } } +``` + +```json +{} +``` + +TypeError: Cannot read properties of undefined (reading 'parent') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/no-constructor-return.js:45:15) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-constructor-return > valid + +```js +class C { constructor() { { return } } } +``` + +```json +{} +``` + +TypeError: Cannot read properties of undefined (reading 'parent') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/no-constructor-return.js:45:15) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-constructor-return > invalid + +```js +class C { constructor() { return '' } } +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'parent') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/no-constructor-return.js:45:15) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-constructor-return > invalid + +```js +class C { constructor(a) { if (!a) { return '' } else { a() } } } +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'parent') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/no-constructor-return.js:45:15) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +### `no-dupe-class-members` + +Pass: 77 / 78 (98.7%) +Fail: 1 / 78 (1.3%) + +#### no-dupe-class-members > valid + +```js + +\u0009\u0009class Foo { +\u0009\u0009 foo(a: string): string; +\u0009\u0009 foo(a: number): number; +\u0009\u0009 foo(a: any): any {} +\u0009\u0009} +\u0009 +``` + +```json +{ + "code": "\n\t\tclass Foo {\n\t\t foo(a: string): string;\n\t\t foo(a: number): number;\n\t\t foo(a: any): any {}\n\t\t}\n\t " +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +### `no-duplicate-imports` + +Pass: 34 / 85 (40.0%) +Fail: 51 / 85 (60.0%) + +#### no-duplicate-imports > valid + +```js +import type { Os } from "os"; +import type { Fs } from "fs"; +``` + +```json +{} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-duplicate-imports > valid + +```js +import { type Os } from "os"; +import type { Fs } from "fs"; +``` + +```json +{} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-duplicate-imports > valid + +```js +import type { Merge } from "lodash-es"; +``` + +```json +{} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-duplicate-imports > valid + +```js +import _, { type Merge } from "lodash-es"; +``` + +```json +{} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-duplicate-imports > valid + +```js +import type * as Foobar from "async"; +``` + +```json +{} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-duplicate-imports > valid + +```js +import type Os from "os"; +export type { Something } from "os"; +``` + +```json +{} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-duplicate-imports > valid + +```js +import type Os from "os"; +export { type Something } from "os"; +``` + +```json +{} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-duplicate-imports > valid + +```js +import type * as Bar from "os"; +import { type Baz } from "os"; +``` + +```json +{} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-duplicate-imports > valid + +```js +import foo, * as bar from "os"; +import { type Baz } from "os"; +``` + +```json +{} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-duplicate-imports > valid + +```js +import foo, { type bar } from "os"; +import type * as Baz from "os"; +``` + +```json +{} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-duplicate-imports > valid + +```js +import type { Merge } from "lodash-es"; +import type _ from "lodash-es"; +``` + +```json +{} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-duplicate-imports > valid + +```js +import type Os from "os"; +export { type Hello } from "hello"; +``` + +```json +{ + "options": [ + { + "includeExports": true + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-duplicate-imports > valid + +```js +import type Os from "os"; +export type * from "hello"; +``` + +```json +{ + "options": [ + { + "includeExports": true + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-duplicate-imports > valid + +```js +import type Os from "os"; +export { type Hello as Hi } from "hello"; +``` + +```json +{ + "options": [ + { + "includeExports": true + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-duplicate-imports > valid + +```js +import type Os from "os"; +export default function(){}; +``` + +```json +{ + "options": [ + { + "includeExports": true + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-duplicate-imports > valid + +```js +import { type Merge } from "lodash-es"; +export { Merge as lodashMerge } +``` + +```json +{ + "options": [ + { + "includeExports": true + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-duplicate-imports > valid + +```js +export type { Something } from "os"; +export * as os from "os"; +``` + +```json +{ + "options": [ + { + "includeExports": true + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-duplicate-imports > valid + +```js +import { type Something } from "os"; +export * as os from "os"; +``` + +```json +{ + "options": [ + { + "includeExports": true + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-duplicate-imports > valid + +```js +import type * as Os from "os"; +export { something } from "os"; +``` + +```json +{ + "options": [ + { + "includeExports": true + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-duplicate-imports > valid + +```js +import type Os from "os"; +export * from "os"; +``` + +```json +{ + "options": [ + { + "includeExports": true + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-duplicate-imports > valid + +```js +import type Os from "os"; +export type { Something } from "os"; +``` + +```json +{ + "options": [ + { + "includeExports": true + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-duplicate-imports > valid + +```js +export type { Something } from "os"; +export * from "os"; +``` + +```json +{ + "options": [ + { + "includeExports": true + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-duplicate-imports > valid + +```js +import { foo, type Bar } from "module"; +``` + +```json +{ + "options": [ + { + "allowSeparateTypeImports": true + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-duplicate-imports > valid + +```js +import { foo } from "module"; +import type { Bar } from "module"; +``` + +```json +{ + "options": [ + { + "allowSeparateTypeImports": true + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-duplicate-imports > valid + +```js +import { type Foo } from "module"; +import type { Bar } from "module"; +``` + +```json +{ + "options": [ + { + "allowSeparateTypeImports": true + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-duplicate-imports > valid + +```js +import { foo, type Bar } from "module"; +export { type Baz } from "module2"; +``` + +```json +{ + "options": [ + { + "allowSeparateTypeImports": true, + "includeExports": true + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-duplicate-imports > valid + +```js +import type { Foo } from "module"; +export { bar, type Baz } from "module"; +``` + +```json +{ + "options": [ + { + "allowSeparateTypeImports": true, + "includeExports": true + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-duplicate-imports > valid + +```js +import { type Foo } from "module"; +export type { Bar } from "module"; +``` + +```json +{ + "options": [ + { + "allowSeparateTypeImports": true, + "includeExports": true + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-duplicate-imports > valid + +```js +import type * as Foo from "module"; +export { type Bar } from "module"; +``` + +```json +{ + "options": [ + { + "allowSeparateTypeImports": true, + "includeExports": true + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-duplicate-imports > valid + +```js +import { type Foo } from "module"; +export type * as Bar from "module"; +``` + +```json +{ + "options": [ + { + "allowSeparateTypeImports": true, + "includeExports": true + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-duplicate-imports > invalid + +```js +import { type Merge } from "lodash-es"; +import { type Find } from "lodash-es"; +``` + +```json +{ + "errors": [ + { + "messageId": "import", + "data": { + "module": "lodash-es" + } + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-duplicate-imports > invalid + +```js +import { type Merge } from "lodash-es"; +import type { Find } from "lodash-es"; +``` + +```json +{ + "errors": [ + { + "messageId": "import", + "data": { + "module": "lodash-es" + } + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-duplicate-imports > invalid + +```js +import type { Merge } from "lodash-es"; +import type { Find } from "lodash-es"; +``` + +```json +{ + "errors": [ + { + "messageId": "import", + "data": { + "module": "lodash-es" + } + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-duplicate-imports > invalid + +```js +import type Os from "os"; +import type { Something } from "os"; +import type * as Foobar from "os"; +``` + +```json +{ + "errors": [ + { + "messageId": "import", + "data": { + "module": "os" + } + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-duplicate-imports > invalid + +```js +import type * as Modns from "lodash-es"; +import type { Merge } from "lodash-es"; +import type { Baz } from "lodash-es"; +``` + +```json +{ + "errors": [ + { + "messageId": "import", + "data": { + "module": "lodash-es" + } + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-duplicate-imports > invalid + +```js +import { type Foo } from "module"; +export type { Bar } from "module"; +``` + +```json +{ + "options": [ + { + "includeExports": true + } + ], + "errors": [ + { + "messageId": "exportAs", + "data": { + "module": "module" + } + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-duplicate-imports > invalid + +```js +export { os } from "os"; +export type { Something } from "os"; +``` + +```json +{ + "options": [ + { + "includeExports": true + } + ], + "errors": [ + { + "messageId": "export", + "data": { + "module": "os" + } + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-duplicate-imports > invalid + +```js +export type { Os } from "os"; +export type { Something } from "os"; +``` + +```json +{ + "options": [ + { + "includeExports": true + } + ], + "errors": [ + { + "messageId": "export", + "data": { + "module": "os" + } + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-duplicate-imports > invalid + +```js +import type { Os } from "os"; +export type { Os as Foobar } from "os"; +export type { Something } from "os"; +``` + +```json +{ + "options": [ + { + "includeExports": true + } + ], + "errors": [ + { + "messageId": "exportAs", + "data": { + "module": "os" + } + }, + { + "messageId": "export", + "data": { + "module": "os" + } + }, + { + "messageId": "exportAs", + "data": { + "module": "os" + } + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-duplicate-imports > invalid + +```js +import type { Os } from "os"; +export type { Something } from "os"; +``` + +```json +{ + "options": [ + { + "includeExports": true + } + ], + "errors": [ + { + "messageId": "exportAs", + "data": { + "module": "os" + } + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-duplicate-imports > invalid + +```js +import type Os from "os"; +export type * as Os from "os"; +``` + +```json +{ + "options": [ + { + "includeExports": true + } + ], + "errors": [ + { + "messageId": "exportAs", + "data": { + "module": "os" + } + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-duplicate-imports > invalid + +```js +import type * as Modns from "mod"; +export type * as Modns from "mod"; +``` + +```json +{ + "options": [ + { + "includeExports": true + } + ], + "errors": [ + { + "messageId": "exportAs", + "data": { + "module": "mod" + } + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-duplicate-imports > invalid + +```js +export type * from "os"; +export type * from "os"; +``` + +```json +{ + "options": [ + { + "includeExports": true + } + ], + "errors": [ + { + "messageId": "export", + "data": { + "module": "os" + } + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-duplicate-imports > invalid + +```js +import "os"; +export type { Os } from "os"; +``` + +```json +{ + "options": [ + { + "includeExports": true + } + ], + "errors": [ + { + "messageId": "exportAs", + "data": { + "module": "os" + } + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-duplicate-imports > invalid + +```js +import type { Merge } from "lodash-es"; +import type { Find } from "lodash-es"; +``` + +```json +{ + "options": [ + { + "allowSeparateTypeImports": true + } + ], + "errors": [ + { + "messageId": "import", + "data": { + "module": "lodash-es" + } + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-duplicate-imports > invalid + +```js +import { someValue, type Foo } from 'module'; +import type { SomeType } from 'module'; +import type { AnotherType } from 'module'; +``` + +```json +{ + "options": [ + { + "allowSeparateTypeImports": true + } + ], + "errors": [ + { + "messageId": "import", + "data": { + "module": "module" + } + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-duplicate-imports > invalid + +```js +import { type Foo } from 'module'; +import { type Bar } from 'module'; +``` + +```json +{ + "options": [ + { + "allowSeparateTypeImports": true + } + ], + "errors": [ + { + "messageId": "import", + "data": { + "module": "module" + } + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-duplicate-imports > invalid + +```js +export type { Foo } from "module"; +export type { Bar } from "module"; +``` + +```json +{ + "options": [ + { + "allowSeparateTypeImports": true, + "includeExports": true + } + ], + "errors": [ + { + "messageId": "export", + "data": { + "module": "module" + } + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-duplicate-imports > invalid + +```js +import { type Foo } from "module"; +export { type Bar } from "module"; +export { type Baz } from "module"; +``` + +```json +{ + "options": [ + { + "allowSeparateTypeImports": true, + "includeExports": true + } + ], + "errors": [ + { + "messageId": "exportAs", + "data": { + "module": "module" + } + }, + { + "messageId": "export", + "data": { + "module": "module" + } + }, + { + "messageId": "exportAs", + "data": { + "module": "module" + } + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-duplicate-imports > invalid + +```js +import { type Foo } from "module"; +export { type Bar } from "module"; +export { regular } from "module"; +``` + +```json +{ + "options": [ + { + "allowSeparateTypeImports": true, + "includeExports": true + } + ], + "errors": [ + { + "messageId": "exportAs", + "data": { + "module": "module" + } + }, + { + "messageId": "export", + "data": { + "module": "module" + } + }, + { + "messageId": "exportAs", + "data": { + "module": "module" + } + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-duplicate-imports > invalid + +```js +import { type Foo } from "module"; +import { regular } from "module"; +export { type Bar } from "module"; +export { regular as other } from "module"; +``` + +```json +{ + "options": [ + { + "allowSeparateTypeImports": true, + "includeExports": true + } + ], + "errors": [ + { + "messageId": "import", + "data": { + "module": "module" + } + }, + { + "messageId": "exportAs", + "data": { + "module": "module" + } + }, + { + "messageId": "export", + "data": { + "module": "module" + } + }, + { + "messageId": "exportAs", + "data": { + "module": "module" + } + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +### `no-empty-function` + +Pass: 1086 / 2332 (46.6%) +Fail: 1246 / 2332 (53.4%) + +#### no-empty-function > valid + +```js +class A { constructor(public param: string) {} } +``` + +```json +{} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class A { constructor(private param: string) {} } +``` + +```json +{} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class A { constructor(protected param: string) {} } +``` + +```json +{} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class A { constructor(readonly param: string) {} } +``` + +```json +{} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const foo = function(param: string) { bar(); }; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const foo = function(param: string) { /* empty */ }; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const foo = function(param: string) { + // empty +}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const foo = function(param: string) {}; // allow: functions +``` + +```json +{ + "options": [ + { + "allow": [ + "functions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const obj = {foo: function(param: string) { bar(); }}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const obj = {foo: function(param: string) { /* empty */ }}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const obj = {foo: function(param: string) { + // empty +}}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const obj = {foo: function(param: string) {}}; // allow: functions +``` + +```json +{ + "options": [ + { + "allow": [ + "functions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const foo = (param: string) => { bar(); }; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const foo = (param: string) => { /* empty */ }; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const foo = (param: string) => { + // empty +}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const foo = (param: string) => {}; // allow: arrowFunctions +``` + +```json +{ + "options": [ + { + "allow": [ + "arrowFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +function* foo(param: string) { bar(); } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +function* foo(param: string) { /* empty */ } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +function* foo(param: string) { + // empty +} +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +function* foo(param: string) {} // allow: generatorFunctions +``` + +```json +{ + "options": [ + { + "allow": [ + "generatorFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const foo = function*(param: string) { bar(); }; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const foo = function*(param: string) { /* empty */ }; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const foo = function*(param: string) { + // empty +}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const foo = function*(param: string) {}; // allow: generatorFunctions +``` + +```json +{ + "options": [ + { + "allow": [ + "generatorFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const obj = {foo: function*(param: string) { bar(); }}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const obj = {foo: function*(param: string) { /* empty */ }}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const obj = {foo: function*(param: string) { + // empty +}}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const obj = {foo: function*(param: string) {}}; // allow: generatorFunctions +``` + +```json +{ + "options": [ + { + "allow": [ + "generatorFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const obj = {foo(param: string) { bar(); }}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const obj = {foo(param: string) { /* empty */ }}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const obj = {foo(param: string) { + // empty +}}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const obj = {foo(param: string) {}}; // allow: methods +``` + +```json +{ + "options": [ + { + "allow": [ + "methods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class A { foo(param: string) { bar(); } } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class A { foo(param: string) { /* empty */ } } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class A { foo(param: string) { + // empty +} } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class A { foo(param: string) {} } // allow: methods +``` + +```json +{ + "options": [ + { + "allow": [ + "methods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class A { static foo(param: string) { bar(); } } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class A { static foo(param: string) { /* empty */ } } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class A { static foo(param: string) { + // empty +} } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class A { static foo(param: string) {} } // allow: methods +``` + +```json +{ + "options": [ + { + "allow": [ + "methods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const A = class {foo(param: string) { bar(); }}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const A = class {foo(param: string) { /* empty */ }}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const A = class {foo(param: string) { + // empty +}}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const A = class {foo(param: string) {}}; // allow: methods +``` + +```json +{ + "options": [ + { + "allow": [ + "methods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const A = class {static foo(param: string) { bar(); }}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const A = class {static foo(param: string) { /* empty */ }}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const A = class {static foo(param: string) { + // empty +}}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const A = class {static foo(param: string) {}}; // allow: methods +``` + +```json +{ + "options": [ + { + "allow": [ + "methods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const obj = {*foo(param: string) { bar(); }}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const obj = {*foo(param: string) { /* empty */ }}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const obj = {*foo(param: string) { + // empty +}}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const obj = {*foo(param: string) {}}; // allow: generatorMethods +``` + +```json +{ + "options": [ + { + "allow": [ + "generatorMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class A { *foo(param: string) { bar(); } } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class A { *foo(param: string) { /* empty */ } } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class A { *foo(param: string) { + // empty +} } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class A { *foo(param: string) {} } // allow: generatorMethods +``` + +```json +{ + "options": [ + { + "allow": [ + "generatorMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class A {static *foo(param: string) { bar(); }} +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class A {static *foo(param: string) { /* empty */ }} +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class A {static *foo(param: string) { + // empty +}} +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class A {static *foo(param: string) {}} // allow: generatorMethods +``` + +```json +{ + "options": [ + { + "allow": [ + "generatorMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const A = class {*foo(param: string) { bar(); }}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const A = class {*foo(param: string) { /* empty */ }}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const A = class {*foo(param: string) { + // empty +}}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const A = class {*foo(param: string) {}}; // allow: generatorMethods +``` + +```json +{ + "options": [ + { + "allow": [ + "generatorMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const A = class {static *foo(param: string) { bar(); }}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const A = class {static *foo(param: string) { /* empty */ }}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const A = class {static *foo(param: string) { + // empty +}}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const A = class {static *foo(param: string) {}}; // allow: generatorMethods +``` + +```json +{ + "options": [ + { + "allow": [ + "generatorMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const obj = {get foo(): string { bar(); }}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const obj = {get foo(): string { /* empty */ }}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const obj = {get foo(): string { + // empty +}}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const obj = {get foo(): string {}}; // allow: getters +``` + +```json +{ + "options": [ + { + "allow": [ + "getters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class A {get foo(): string { bar(); }} +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class A {get foo(): string { /* empty */ }} +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class A {get foo(): string { + // empty +}} +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class A {get foo(): string {}} // allow: getters +``` + +```json +{ + "options": [ + { + "allow": [ + "getters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class A {static get foo(): string { bar(); }} +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class A {static get foo(): string { /* empty */ }} +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class A {static get foo(): string { + // empty +}} +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class A {static get foo(): string {}} // allow: getters +``` + +```json +{ + "options": [ + { + "allow": [ + "getters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const A = class {get foo(): string { bar(); }}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const A = class {get foo(): string { /* empty */ }}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const A = class {get foo(): string { + // empty +}}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const A = class {get foo(): string {}}; // allow: getters +``` + +```json +{ + "options": [ + { + "allow": [ + "getters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const A = class {static get foo(): string { bar(); }}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const A = class {static get foo(): string { /* empty */ }}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const A = class {static get foo(): string { + // empty +}}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const A = class {static get foo(): string {}}; // allow: getters +``` + +```json +{ + "options": [ + { + "allow": [ + "getters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class A {@decorator() get foo(): string { bar(); }} +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class A {@decorator() get foo(): string { /* empty */ }} +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class A {@decorator() get foo(): string { + // empty +}} +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class A {@decorator() get foo(): string {}} // allow: getters +``` + +```json +{ + "options": [ + { + "allow": [ + "getters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class A {@decorator() get foo(): string {}} // allow: decoratedFunctions +``` + +```json +{ + "options": [ + { + "allow": [ + "decoratedFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class A {@decorator() static get foo(): string { bar(); }} +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class A {@decorator() static get foo(): string { /* empty */ }} +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class A {@decorator() static get foo(): string { + // empty +}} +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class A {@decorator() static get foo(): string {}} // allow: getters +``` + +```json +{ + "options": [ + { + "allow": [ + "getters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class A {@decorator() static get foo(): string {}} // allow: decoratedFunctions +``` + +```json +{ + "options": [ + { + "allow": [ + "decoratedFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const A = class {@decorator() get foo(): string { bar(); }}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const A = class {@decorator() get foo(): string { /* empty */ }}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const A = class {@decorator() get foo(): string { + // empty +}}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const A = class {@decorator() get foo(): string {}}; // allow: getters +``` + +```json +{ + "options": [ + { + "allow": [ + "getters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const A = class {@decorator() get foo(): string {}}; // allow: decoratedFunctions +``` + +```json +{ + "options": [ + { + "allow": [ + "decoratedFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const A = class {@decorator() static get foo(): string { bar(); }}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const A = class {@decorator() static get foo(): string { /* empty */ }}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const A = class {@decorator() static get foo(): string { + // empty +}}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const A = class {@decorator() static get foo(): string {}}; // allow: getters +``` + +```json +{ + "options": [ + { + "allow": [ + "getters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const A = class {@decorator() static get foo(): string {}}; // allow: decoratedFunctions +``` + +```json +{ + "options": [ + { + "allow": [ + "decoratedFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class A extends B {override get foo(): string { bar(); }} +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class A extends B {override get foo(): string { /* empty */ }} +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class A extends B {override get foo(): string { + // empty +}} +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class A extends B {override get foo(): string {}} // allow: getters +``` + +```json +{ + "options": [ + { + "allow": [ + "getters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class A extends B {override get foo(): string {}} // allow: overrideMethods +``` + +```json +{ + "options": [ + { + "allow": [ + "overrideMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class A extends B {static override get foo(): string { bar(); }} +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class A extends B {static override get foo(): string { /* empty */ }} +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class A extends B {static override get foo(): string { + // empty +}} +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class A extends B {static override get foo(): string {}} // allow: getters +``` + +```json +{ + "options": [ + { + "allow": [ + "getters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class A extends B {static override get foo(): string {}} // allow: overrideMethods +``` + +```json +{ + "options": [ + { + "allow": [ + "overrideMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const A = class extends B {override get foo(): string { bar(); }}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const A = class extends B {override get foo(): string { /* empty */ }}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const A = class extends B {override get foo(): string { + // empty +}}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const A = class extends B {override get foo(): string {}}; // allow: getters +``` + +```json +{ + "options": [ + { + "allow": [ + "getters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const A = class extends B {override get foo(): string {}}; // allow: overrideMethods +``` + +```json +{ + "options": [ + { + "allow": [ + "overrideMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const A = class extends B {static override get foo(): string { bar(); }}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const A = class extends B {static override get foo(): string { /* empty */ }}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const A = class extends B {static override get foo(): string { + // empty +}}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const A = class extends B {static override get foo(): string {}}; // allow: getters +``` + +```json +{ + "options": [ + { + "allow": [ + "getters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const A = class extends B {static override get foo(): string {}}; // allow: overrideMethods +``` + +```json +{ + "options": [ + { + "allow": [ + "overrideMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const obj = {set foo(value: string) { bar(); }}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const obj = {set foo(value: string) { /* empty */ }}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const obj = {set foo(value: string) { + // empty +}}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const obj = {set foo(value: string) {}}; // allow: setters +``` + +```json +{ + "options": [ + { + "allow": [ + "setters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class A {set foo(value: string) { bar(); }} +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class A {set foo(value: string) { /* empty */ }} +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class A {set foo(value: string) { + // empty +}} +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class A {set foo(value: string) {}} // allow: setters +``` + +```json +{ + "options": [ + { + "allow": [ + "setters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class A {static set foo(value: string) { bar(); }} +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class A {static set foo(value: string) { /* empty */ }} +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class A {static set foo(value: string) { + // empty +}} +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class A {static set foo(value: string) {}} // allow: setters +``` + +```json +{ + "options": [ + { + "allow": [ + "setters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const A = class {set foo(value: string) { bar(); }}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const A = class {set foo(value: string) { /* empty */ }}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const A = class {set foo(value: string) { + // empty +}}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const A = class {set foo(value: string) {}}; // allow: setters +``` + +```json +{ + "options": [ + { + "allow": [ + "setters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const A = class {static set foo(value: string) { bar(); }}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const A = class {static set foo(value: string) { /* empty */ }}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const A = class {static set foo(value: string) { + // empty +}}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const A = class {static set foo(value: string) {}}; // allow: setters +``` + +```json +{ + "options": [ + { + "allow": [ + "setters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class A {@decorator() set foo(value: string) { bar(); }} +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class A {@decorator() set foo(value: string) { /* empty */ }} +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class A {@decorator() set foo(value: string) { + // empty +}} +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class A {@decorator() set foo(value: string) {}} // allow: setters +``` + +```json +{ + "options": [ + { + "allow": [ + "setters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class A {@decorator() set foo(value: string) {}} // allow: decoratedFunctions +``` + +```json +{ + "options": [ + { + "allow": [ + "decoratedFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class A {@decorator() static set foo(value: string) { bar(); }} +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class A {@decorator() static set foo(value: string) { /* empty */ }} +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class A {@decorator() static set foo(value: string) { + // empty +}} +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class A {@decorator() static set foo(value: string) {}} // allow: setters +``` + +```json +{ + "options": [ + { + "allow": [ + "setters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class A {@decorator() static set foo(value: string) {}} // allow: decoratedFunctions +``` + +```json +{ + "options": [ + { + "allow": [ + "decoratedFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const A = class {@decorator() set foo(value: string) { bar(); }}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const A = class {@decorator() set foo(value: string) { /* empty */ }}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const A = class {@decorator() set foo(value: string) { + // empty +}}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const A = class {@decorator() set foo(value: string) {}}; // allow: setters +``` + +```json +{ + "options": [ + { + "allow": [ + "setters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const A = class {@decorator() set foo(value: string) {}}; // allow: decoratedFunctions +``` + +```json +{ + "options": [ + { + "allow": [ + "decoratedFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const A = class {@decorator() static set foo(value: string) { bar(); }}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const A = class {@decorator() static set foo(value: string) { /* empty */ }}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const A = class {@decorator() static set foo(value: string) { + // empty +}}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const A = class {@decorator() static set foo(value: string) {}}; // allow: setters +``` + +```json +{ + "options": [ + { + "allow": [ + "setters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const A = class {@decorator() static set foo(value: string) {}}; // allow: decoratedFunctions +``` + +```json +{ + "options": [ + { + "allow": [ + "decoratedFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class A extends B {override set foo(value: string) { bar(); }} +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class A extends B {override set foo(value: string) { /* empty */ }} +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class A extends B {override set foo(value: string) { + // empty +}} +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class A extends B {override set foo(value: string) {}} // allow: setters +``` + +```json +{ + "options": [ + { + "allow": [ + "setters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class A extends B {override set foo(value: string) {}} // allow: overrideMethods +``` + +```json +{ + "options": [ + { + "allow": [ + "overrideMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class A extends B {static override set foo(value: string) { bar(); }} +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class A extends B {static override set foo(value: string) { /* empty */ }} +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class A extends B {static override set foo(value: string) { + // empty +}} +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class A extends B {static override set foo(value: string) {}} // allow: setters +``` + +```json +{ + "options": [ + { + "allow": [ + "setters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class A extends B {static override set foo(value: string) {}} // allow: overrideMethods +``` + +```json +{ + "options": [ + { + "allow": [ + "overrideMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const A = class extends B {override set foo(value: string) { bar(); }}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const A = class extends B {override set foo(value: string) { /* empty */ }}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const A = class extends B {override set foo(value: string) { + // empty +}}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const A = class extends B {override set foo(value: string) {}}; // allow: setters +``` + +```json +{ + "options": [ + { + "allow": [ + "setters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const A = class extends B {override set foo(value: string) {}}; // allow: overrideMethods +``` + +```json +{ + "options": [ + { + "allow": [ + "overrideMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const A = class extends B {static override set foo(value: string) { bar(); }}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const A = class extends B {static override set foo(value: string) { /* empty */ }}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const A = class extends B {static override set foo(value: string) { + // empty +}}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const A = class extends B {static override set foo(value: string) {}}; // allow: setters +``` + +```json +{ + "options": [ + { + "allow": [ + "setters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const A = class extends B {static override set foo(value: string) {}}; // allow: overrideMethods +``` + +```json +{ + "options": [ + { + "allow": [ + "overrideMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class A { constructor(param: string) { bar(); } } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class A { constructor(param: string) { /* empty */ } } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class A { constructor(param: string) { + // empty +} } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class A { constructor(param: string) {} } // allow: constructors +``` + +```json +{ + "options": [ + { + "allow": [ + "constructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const A = class {constructor(param: string) { bar(); }}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const A = class {constructor(param: string) { /* empty */ }}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const A = class {constructor(param: string) { + // empty +}}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const A = class {constructor(param: string) {}}; // allow: constructors +``` + +```json +{ + "options": [ + { + "allow": [ + "constructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const foo = { async method(param: string) { bar(); } } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const foo = { async method(param: string) { /* empty */ } } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const foo = { async method(param: string) { + // empty +} } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const foo = { async method(param: string) {} } // allow: asyncMethods +``` + +```json +{ + "options": [ + { + "allow": [ + "asyncMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +async function a(param: string){ bar(); } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +async function a(param: string){ /* empty */ } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +async function a(param: string){ + // empty +} +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +async function a(param: string){} // allow: asyncFunctions +``` + +```json +{ + "options": [ + { + "allow": [ + "asyncFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const foo = async function(param: string) { bar(); } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const foo = async function(param: string) { /* empty */ } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const foo = async function(param: string) { + // empty +} +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const foo = async function(param: string) {} // allow: asyncFunctions +``` + +```json +{ + "options": [ + { + "allow": [ + "asyncFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class A { async foo(param: string) { bar(); } } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class A { async foo(param: string) { /* empty */ } } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class A { async foo(param: string) { + // empty +} } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class A { async foo(param: string) {} } // allow: asyncMethods +``` + +```json +{ + "options": [ + { + "allow": [ + "asyncMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class A { @decorator() async foo(param: string) { bar(); } } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class A { @decorator() async foo(param: string) { /* empty */ } } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class A { @decorator() async foo(param: string) { + // empty +} } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class A { @decorator() async foo(param: string) {} } // allow: asyncMethods +``` + +```json +{ + "options": [ + { + "allow": [ + "asyncMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class A { @decorator() async foo(param: string) {} } // allow: decoratedFunctions +``` + +```json +{ + "options": [ + { + "allow": [ + "decoratedFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class A extends B { override async foo(param: string) { bar(); } } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class A extends B { override async foo(param: string) { /* empty */ } } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class A extends B { override async foo(param: string) { + // empty +} } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class A extends B { override async foo(param: string) {} } // allow: asyncMethods +``` + +```json +{ + "options": [ + { + "allow": [ + "asyncMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class A extends B { override async foo(param: string) {} } // allow: overrideMethods +``` + +```json +{ + "options": [ + { + "allow": [ + "overrideMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const foo = async (): Promise => { bar(); }; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const foo = async (): Promise => { /* empty */ }; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const foo = async (): Promise => { + // empty +}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const foo = async (): Promise => {}; // allow: arrowFunctions +``` + +```json +{ + "options": [ + { + "allow": [ + "arrowFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class B {@decorator() get foo(): string { bar(); }} +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class B {@decorator() get foo(): string { /* empty */ }} +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class B {@decorator() get foo(): string { + // empty +}} +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class B {@decorator() get foo(): string {}} // allow: decoratedFunctions +``` + +```json +{ + "options": [ + { + "allow": [ + "decoratedFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class B {@decorator() get foo(): string {}} // allow: getters +``` + +```json +{ + "options": [ + { + "allow": [ + "getters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class B {@decorator() static get foo(): string { bar(); }} +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class B {@decorator() static get foo(): string { /* empty */ }} +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class B {@decorator() static get foo(): string { + // empty +}} +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class B {@decorator() static get foo(): string {}} // allow: decoratedFunctions +``` + +```json +{ + "options": [ + { + "allow": [ + "decoratedFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class B {@decorator() static get foo(): string {}} // allow: getters +``` + +```json +{ + "options": [ + { + "allow": [ + "getters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const B = class {@decorator() get foo(): string { bar(); }}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const B = class {@decorator() get foo(): string { /* empty */ }}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const B = class {@decorator() get foo(): string { + // empty +}}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const B = class {@decorator() get foo(): string {}}; // allow: decoratedFunctions +``` + +```json +{ + "options": [ + { + "allow": [ + "decoratedFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const B = class {@decorator() get foo(): string {}}; // allow: getters +``` + +```json +{ + "options": [ + { + "allow": [ + "getters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const B = class {@decorator() static get foo(): string { bar(); }}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const B = class {@decorator() static get foo(): string { /* empty */ }}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const B = class {@decorator() static get foo(): string { + // empty +}}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const B = class {@decorator() static get foo(): string {}}; // allow: decoratedFunctions +``` + +```json +{ + "options": [ + { + "allow": [ + "decoratedFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const B = class {@decorator() static get foo(): string {}}; // allow: getters +``` + +```json +{ + "options": [ + { + "allow": [ + "getters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class B {@decorator() set foo(value: string) { bar(); }} +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class B {@decorator() set foo(value: string) { /* empty */ }} +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class B {@decorator() set foo(value: string) { + // empty +}} +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class B {@decorator() set foo(value: string) {}} // allow: decoratedFunctions +``` + +```json +{ + "options": [ + { + "allow": [ + "decoratedFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class B {@decorator() set foo(value: string) {}} // allow: setters +``` + +```json +{ + "options": [ + { + "allow": [ + "setters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class B {@decorator() static set foo(value: string) { bar(); }} +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class B {@decorator() static set foo(value: string) { /* empty */ }} +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class B {@decorator() static set foo(value: string) { + // empty +}} +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class B {@decorator() static set foo(value: string) {}} // allow: decoratedFunctions +``` + +```json +{ + "options": [ + { + "allow": [ + "decoratedFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class B {@decorator() static set foo(value: string) {}} // allow: setters +``` + +```json +{ + "options": [ + { + "allow": [ + "setters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const B = class {@decorator() set foo(value: string) { bar(); }}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const B = class {@decorator() set foo(value: string) { /* empty */ }}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const B = class {@decorator() set foo(value: string) { + // empty +}}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const B = class {@decorator() set foo(value: string) {}}; // allow: decoratedFunctions +``` + +```json +{ + "options": [ + { + "allow": [ + "decoratedFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const B = class {@decorator() set foo(value: string) {}}; // allow: setters +``` + +```json +{ + "options": [ + { + "allow": [ + "setters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const B = class {@decorator() static set foo(value: string) { bar(); }}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const B = class {@decorator() static set foo(value: string) { /* empty */ }}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const B = class {@decorator() static set foo(value: string) { + // empty +}}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const B = class {@decorator() static set foo(value: string) {}}; // allow: decoratedFunctions +``` + +```json +{ + "options": [ + { + "allow": [ + "decoratedFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const B = class {@decorator() static set foo(value: string) {}}; // allow: setters +``` + +```json +{ + "options": [ + { + "allow": [ + "setters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class B { @decorator() async foo(param: string) { bar(); } } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class B { @decorator() async foo(param: string) { /* empty */ } } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class B { @decorator() async foo(param: string) { + // empty +} } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class B { @decorator() async foo(param: string) {} } // allow: decoratedFunctions +``` + +```json +{ + "options": [ + { + "allow": [ + "decoratedFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class B { @decorator() async foo(param: string) {} } // allow: asyncMethods +``` + +```json +{ + "options": [ + { + "allow": [ + "asyncMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class B extends C {override get foo(): string { bar(); }} +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class B extends C {override get foo(): string { /* empty */ }} +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class B extends C {override get foo(): string { + // empty +}} +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class B extends C {override get foo(): string {}} // allow: overrideMethods +``` + +```json +{ + "options": [ + { + "allow": [ + "overrideMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class B extends C {override get foo(): string {}} // allow: getters +``` + +```json +{ + "options": [ + { + "allow": [ + "getters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class B extends C {static override get foo(): string { bar(); }} +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class B extends C {static override get foo(): string { /* empty */ }} +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class B extends C {static override get foo(): string { + // empty +}} +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class B extends C {static override get foo(): string {}} // allow: overrideMethods +``` + +```json +{ + "options": [ + { + "allow": [ + "overrideMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class B extends C {static override get foo(): string {}} // allow: getters +``` + +```json +{ + "options": [ + { + "allow": [ + "getters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const B = class extends C {override get foo(): string { bar(); }}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const B = class extends C {override get foo(): string { /* empty */ }}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const B = class extends C {override get foo(): string { + // empty +}}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const B = class extends C {override get foo(): string {}}; // allow: overrideMethods +``` + +```json +{ + "options": [ + { + "allow": [ + "overrideMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const B = class extends C {override get foo(): string {}}; // allow: getters +``` + +```json +{ + "options": [ + { + "allow": [ + "getters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const B = class extends C {static override get foo(): string { bar(); }}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const B = class extends C {static override get foo(): string { /* empty */ }}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const B = class extends C {static override get foo(): string { + // empty +}}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const B = class extends C {static override get foo(): string {}}; // allow: overrideMethods +``` + +```json +{ + "options": [ + { + "allow": [ + "overrideMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const B = class extends C {static override get foo(): string {}}; // allow: getters +``` + +```json +{ + "options": [ + { + "allow": [ + "getters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class B extends C {override set foo(value: string) { bar(); }} +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class B extends C {override set foo(value: string) { /* empty */ }} +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class B extends C {override set foo(value: string) { + // empty +}} +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class B extends C {override set foo(value: string) {}} // allow: overrideMethods +``` + +```json +{ + "options": [ + { + "allow": [ + "overrideMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class B extends C {override set foo(value: string) {}} // allow: setters +``` + +```json +{ + "options": [ + { + "allow": [ + "setters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class B extends C {static override set foo(value: string) { bar(); }} +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class B extends C {static override set foo(value: string) { /* empty */ }} +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class B extends C {static override set foo(value: string) { + // empty +}} +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class B extends C {static override set foo(value: string) {}} // allow: overrideMethods +``` + +```json +{ + "options": [ + { + "allow": [ + "overrideMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class B extends C {static override set foo(value: string) {}} // allow: setters +``` + +```json +{ + "options": [ + { + "allow": [ + "setters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const B = class extends C {override set foo(value: string) { bar(); }}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const B = class extends C {override set foo(value: string) { /* empty */ }}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const B = class extends C {override set foo(value: string) { + // empty +}}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const B = class extends C {override set foo(value: string) {}}; // allow: overrideMethods +``` + +```json +{ + "options": [ + { + "allow": [ + "overrideMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const B = class extends C {override set foo(value: string) {}}; // allow: setters +``` + +```json +{ + "options": [ + { + "allow": [ + "setters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const B = class extends C {static override set foo(value: string) { bar(); }}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const B = class extends C {static override set foo(value: string) { /* empty */ }}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const B = class extends C {static override set foo(value: string) { + // empty +}}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const B = class extends C {static override set foo(value: string) {}}; // allow: overrideMethods +``` + +```json +{ + "options": [ + { + "allow": [ + "overrideMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +const B = class extends C {static override set foo(value: string) {}}; // allow: setters +``` + +```json +{ + "options": [ + { + "allow": [ + "setters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class B extends C { override async foo(param: string) { bar(); } } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class B extends C { override async foo(param: string) { /* empty */ } } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class B extends C { override async foo(param: string) { + // empty +} } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class B extends C { override async foo(param: string) {} } // allow: overrideMethods +``` + +```json +{ + "options": [ + { + "allow": [ + "overrideMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > valid + +```js +class B extends C { override async foo(param: string) {} } // allow: asyncMethods +``` + +```json +{ + "options": [ + { + "allow": [ + "asyncMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const foo = function(param: string) {}; +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "function" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "function" + }, + "output": "const foo = function(param: string) { /* empty */ };" + } + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const foo = function(param: string) {}; // allow: arrowFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "function" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "function" + }, + "output": "const foo = function(param: string) { /* empty */ }; // allow: arrowFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "arrowFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const foo = function(param: string) {}; // allow: generatorFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "function" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "function" + }, + "output": "const foo = function(param: string) { /* empty */ }; // allow: generatorFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const foo = function(param: string) {}; // allow: methods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "function" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "function" + }, + "output": "const foo = function(param: string) { /* empty */ }; // allow: methods" + } + ] + } + ], + "options": [ + { + "allow": [ + "methods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const foo = function(param: string) {}; // allow: generatorMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "function" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "function" + }, + "output": "const foo = function(param: string) { /* empty */ }; // allow: generatorMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const foo = function(param: string) {}; // allow: getters +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "function" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "function" + }, + "output": "const foo = function(param: string) { /* empty */ }; // allow: getters" + } + ] + } + ], + "options": [ + { + "allow": [ + "getters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const foo = function(param: string) {}; // allow: setters +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "function" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "function" + }, + "output": "const foo = function(param: string) { /* empty */ }; // allow: setters" + } + ] + } + ], + "options": [ + { + "allow": [ + "setters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const foo = function(param: string) {}; // allow: constructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "function" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "function" + }, + "output": "const foo = function(param: string) { /* empty */ }; // allow: constructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "constructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const foo = function(param: string) {}; // allow: asyncFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "function" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "function" + }, + "output": "const foo = function(param: string) { /* empty */ }; // allow: asyncFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const foo = function(param: string) {}; // allow: asyncMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "function" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "function" + }, + "output": "const foo = function(param: string) { /* empty */ }; // allow: asyncMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const foo = function(param: string) {}; // allow: privateConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "function" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "function" + }, + "output": "const foo = function(param: string) { /* empty */ }; // allow: privateConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "privateConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const foo = function(param: string) {}; // allow: protectedConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "function" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "function" + }, + "output": "const foo = function(param: string) { /* empty */ }; // allow: protectedConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "protectedConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const foo = function(param: string) {}; // allow: decoratedFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "function" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "function" + }, + "output": "const foo = function(param: string) { /* empty */ }; // allow: decoratedFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "decoratedFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const foo = function(param: string) {}; // allow: overrideMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "function" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "function" + }, + "output": "const foo = function(param: string) { /* empty */ }; // allow: overrideMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "overrideMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const obj = {foo: function(param: string) {}}; +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "method 'foo'" + }, + "output": "const obj = {foo: function(param: string) { /* empty */ }};" + } + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const obj = {foo: function(param: string) {}}; // allow: arrowFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "method 'foo'" + }, + "output": "const obj = {foo: function(param: string) { /* empty */ }}; // allow: arrowFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "arrowFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const obj = {foo: function(param: string) {}}; // allow: generatorFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "method 'foo'" + }, + "output": "const obj = {foo: function(param: string) { /* empty */ }}; // allow: generatorFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const obj = {foo: function(param: string) {}}; // allow: methods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "method 'foo'" + }, + "output": "const obj = {foo: function(param: string) { /* empty */ }}; // allow: methods" + } + ] + } + ], + "options": [ + { + "allow": [ + "methods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const obj = {foo: function(param: string) {}}; // allow: generatorMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "method 'foo'" + }, + "output": "const obj = {foo: function(param: string) { /* empty */ }}; // allow: generatorMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const obj = {foo: function(param: string) {}}; // allow: getters +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "method 'foo'" + }, + "output": "const obj = {foo: function(param: string) { /* empty */ }}; // allow: getters" + } + ] + } + ], + "options": [ + { + "allow": [ + "getters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const obj = {foo: function(param: string) {}}; // allow: setters +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "method 'foo'" + }, + "output": "const obj = {foo: function(param: string) { /* empty */ }}; // allow: setters" + } + ] + } + ], + "options": [ + { + "allow": [ + "setters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const obj = {foo: function(param: string) {}}; // allow: constructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "method 'foo'" + }, + "output": "const obj = {foo: function(param: string) { /* empty */ }}; // allow: constructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "constructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const obj = {foo: function(param: string) {}}; // allow: asyncFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "method 'foo'" + }, + "output": "const obj = {foo: function(param: string) { /* empty */ }}; // allow: asyncFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const obj = {foo: function(param: string) {}}; // allow: asyncMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "method 'foo'" + }, + "output": "const obj = {foo: function(param: string) { /* empty */ }}; // allow: asyncMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const obj = {foo: function(param: string) {}}; // allow: privateConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "method 'foo'" + }, + "output": "const obj = {foo: function(param: string) { /* empty */ }}; // allow: privateConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "privateConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const obj = {foo: function(param: string) {}}; // allow: protectedConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "method 'foo'" + }, + "output": "const obj = {foo: function(param: string) { /* empty */ }}; // allow: protectedConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "protectedConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const obj = {foo: function(param: string) {}}; // allow: decoratedFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "method 'foo'" + }, + "output": "const obj = {foo: function(param: string) { /* empty */ }}; // allow: decoratedFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "decoratedFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const obj = {foo: function(param: string) {}}; // allow: overrideMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "method 'foo'" + }, + "output": "const obj = {foo: function(param: string) { /* empty */ }}; // allow: overrideMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "overrideMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const foo = (param: string) => {}; +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "arrow function" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "arrow function" + }, + "output": "const foo = (param: string) => { /* empty */ };" + } + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const foo = (param: string) => {}; // allow: functions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "arrow function" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "arrow function" + }, + "output": "const foo = (param: string) => { /* empty */ }; // allow: functions" + } + ] + } + ], + "options": [ + { + "allow": [ + "functions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const foo = (param: string) => {}; // allow: generatorFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "arrow function" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "arrow function" + }, + "output": "const foo = (param: string) => { /* empty */ }; // allow: generatorFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const foo = (param: string) => {}; // allow: methods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "arrow function" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "arrow function" + }, + "output": "const foo = (param: string) => { /* empty */ }; // allow: methods" + } + ] + } + ], + "options": [ + { + "allow": [ + "methods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const foo = (param: string) => {}; // allow: generatorMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "arrow function" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "arrow function" + }, + "output": "const foo = (param: string) => { /* empty */ }; // allow: generatorMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const foo = (param: string) => {}; // allow: getters +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "arrow function" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "arrow function" + }, + "output": "const foo = (param: string) => { /* empty */ }; // allow: getters" + } + ] + } + ], + "options": [ + { + "allow": [ + "getters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const foo = (param: string) => {}; // allow: setters +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "arrow function" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "arrow function" + }, + "output": "const foo = (param: string) => { /* empty */ }; // allow: setters" + } + ] + } + ], + "options": [ + { + "allow": [ + "setters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const foo = (param: string) => {}; // allow: constructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "arrow function" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "arrow function" + }, + "output": "const foo = (param: string) => { /* empty */ }; // allow: constructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "constructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const foo = (param: string) => {}; // allow: asyncFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "arrow function" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "arrow function" + }, + "output": "const foo = (param: string) => { /* empty */ }; // allow: asyncFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const foo = (param: string) => {}; // allow: asyncMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "arrow function" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "arrow function" + }, + "output": "const foo = (param: string) => { /* empty */ }; // allow: asyncMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const foo = (param: string) => {}; // allow: privateConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "arrow function" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "arrow function" + }, + "output": "const foo = (param: string) => { /* empty */ }; // allow: privateConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "privateConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const foo = (param: string) => {}; // allow: protectedConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "arrow function" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "arrow function" + }, + "output": "const foo = (param: string) => { /* empty */ }; // allow: protectedConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "protectedConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const foo = (param: string) => {}; // allow: decoratedFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "arrow function" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "arrow function" + }, + "output": "const foo = (param: string) => { /* empty */ }; // allow: decoratedFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "decoratedFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const foo = (param: string) => {}; // allow: overrideMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "arrow function" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "arrow function" + }, + "output": "const foo = (param: string) => { /* empty */ }; // allow: overrideMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "overrideMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +function* foo(param: string) {} +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "generator function 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "generator function 'foo'" + }, + "output": "function* foo(param: string) { /* empty */ }" + } + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +function* foo(param: string) {} // allow: functions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "generator function 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "generator function 'foo'" + }, + "output": "function* foo(param: string) { /* empty */ } // allow: functions" + } + ] + } + ], + "options": [ + { + "allow": [ + "functions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +function* foo(param: string) {} // allow: arrowFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "generator function 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "generator function 'foo'" + }, + "output": "function* foo(param: string) { /* empty */ } // allow: arrowFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "arrowFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +function* foo(param: string) {} // allow: methods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "generator function 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "generator function 'foo'" + }, + "output": "function* foo(param: string) { /* empty */ } // allow: methods" + } + ] + } + ], + "options": [ + { + "allow": [ + "methods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +function* foo(param: string) {} // allow: generatorMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "generator function 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "generator function 'foo'" + }, + "output": "function* foo(param: string) { /* empty */ } // allow: generatorMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +function* foo(param: string) {} // allow: getters +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "generator function 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "generator function 'foo'" + }, + "output": "function* foo(param: string) { /* empty */ } // allow: getters" + } + ] + } + ], + "options": [ + { + "allow": [ + "getters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +function* foo(param: string) {} // allow: setters +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "generator function 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "generator function 'foo'" + }, + "output": "function* foo(param: string) { /* empty */ } // allow: setters" + } + ] + } + ], + "options": [ + { + "allow": [ + "setters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +function* foo(param: string) {} // allow: constructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "generator function 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "generator function 'foo'" + }, + "output": "function* foo(param: string) { /* empty */ } // allow: constructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "constructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +function* foo(param: string) {} // allow: asyncFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "generator function 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "generator function 'foo'" + }, + "output": "function* foo(param: string) { /* empty */ } // allow: asyncFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +function* foo(param: string) {} // allow: asyncMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "generator function 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "generator function 'foo'" + }, + "output": "function* foo(param: string) { /* empty */ } // allow: asyncMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +function* foo(param: string) {} // allow: privateConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "generator function 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "generator function 'foo'" + }, + "output": "function* foo(param: string) { /* empty */ } // allow: privateConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "privateConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +function* foo(param: string) {} // allow: protectedConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "generator function 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "generator function 'foo'" + }, + "output": "function* foo(param: string) { /* empty */ } // allow: protectedConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "protectedConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +function* foo(param: string) {} // allow: decoratedFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "generator function 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "generator function 'foo'" + }, + "output": "function* foo(param: string) { /* empty */ } // allow: decoratedFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "decoratedFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +function* foo(param: string) {} // allow: overrideMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "generator function 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "generator function 'foo'" + }, + "output": "function* foo(param: string) { /* empty */ } // allow: overrideMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "overrideMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const foo = function*(param: string) {}; +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "generator function" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "generator function" + }, + "output": "const foo = function*(param: string) { /* empty */ };" + } + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const foo = function*(param: string) {}; // allow: functions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "generator function" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "generator function" + }, + "output": "const foo = function*(param: string) { /* empty */ }; // allow: functions" + } + ] + } + ], + "options": [ + { + "allow": [ + "functions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const foo = function*(param: string) {}; // allow: arrowFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "generator function" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "generator function" + }, + "output": "const foo = function*(param: string) { /* empty */ }; // allow: arrowFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "arrowFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const foo = function*(param: string) {}; // allow: methods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "generator function" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "generator function" + }, + "output": "const foo = function*(param: string) { /* empty */ }; // allow: methods" + } + ] + } + ], + "options": [ + { + "allow": [ + "methods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const foo = function*(param: string) {}; // allow: generatorMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "generator function" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "generator function" + }, + "output": "const foo = function*(param: string) { /* empty */ }; // allow: generatorMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const foo = function*(param: string) {}; // allow: getters +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "generator function" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "generator function" + }, + "output": "const foo = function*(param: string) { /* empty */ }; // allow: getters" + } + ] + } + ], + "options": [ + { + "allow": [ + "getters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const foo = function*(param: string) {}; // allow: setters +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "generator function" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "generator function" + }, + "output": "const foo = function*(param: string) { /* empty */ }; // allow: setters" + } + ] + } + ], + "options": [ + { + "allow": [ + "setters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const foo = function*(param: string) {}; // allow: constructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "generator function" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "generator function" + }, + "output": "const foo = function*(param: string) { /* empty */ }; // allow: constructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "constructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const foo = function*(param: string) {}; // allow: asyncFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "generator function" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "generator function" + }, + "output": "const foo = function*(param: string) { /* empty */ }; // allow: asyncFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const foo = function*(param: string) {}; // allow: asyncMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "generator function" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "generator function" + }, + "output": "const foo = function*(param: string) { /* empty */ }; // allow: asyncMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const foo = function*(param: string) {}; // allow: privateConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "generator function" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "generator function" + }, + "output": "const foo = function*(param: string) { /* empty */ }; // allow: privateConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "privateConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const foo = function*(param: string) {}; // allow: protectedConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "generator function" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "generator function" + }, + "output": "const foo = function*(param: string) { /* empty */ }; // allow: protectedConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "protectedConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const foo = function*(param: string) {}; // allow: decoratedFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "generator function" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "generator function" + }, + "output": "const foo = function*(param: string) { /* empty */ }; // allow: decoratedFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "decoratedFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const foo = function*(param: string) {}; // allow: overrideMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "generator function" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "generator function" + }, + "output": "const foo = function*(param: string) { /* empty */ }; // allow: overrideMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "overrideMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const obj = {foo: function*(param: string) {}}; +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "generator method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "generator method 'foo'" + }, + "output": "const obj = {foo: function*(param: string) { /* empty */ }};" + } + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const obj = {foo: function*(param: string) {}}; // allow: functions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "generator method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "generator method 'foo'" + }, + "output": "const obj = {foo: function*(param: string) { /* empty */ }}; // allow: functions" + } + ] + } + ], + "options": [ + { + "allow": [ + "functions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const obj = {foo: function*(param: string) {}}; // allow: arrowFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "generator method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "generator method 'foo'" + }, + "output": "const obj = {foo: function*(param: string) { /* empty */ }}; // allow: arrowFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "arrowFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const obj = {foo: function*(param: string) {}}; // allow: methods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "generator method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "generator method 'foo'" + }, + "output": "const obj = {foo: function*(param: string) { /* empty */ }}; // allow: methods" + } + ] + } + ], + "options": [ + { + "allow": [ + "methods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const obj = {foo: function*(param: string) {}}; // allow: generatorMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "generator method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "generator method 'foo'" + }, + "output": "const obj = {foo: function*(param: string) { /* empty */ }}; // allow: generatorMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const obj = {foo: function*(param: string) {}}; // allow: getters +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "generator method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "generator method 'foo'" + }, + "output": "const obj = {foo: function*(param: string) { /* empty */ }}; // allow: getters" + } + ] + } + ], + "options": [ + { + "allow": [ + "getters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const obj = {foo: function*(param: string) {}}; // allow: setters +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "generator method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "generator method 'foo'" + }, + "output": "const obj = {foo: function*(param: string) { /* empty */ }}; // allow: setters" + } + ] + } + ], + "options": [ + { + "allow": [ + "setters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const obj = {foo: function*(param: string) {}}; // allow: constructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "generator method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "generator method 'foo'" + }, + "output": "const obj = {foo: function*(param: string) { /* empty */ }}; // allow: constructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "constructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const obj = {foo: function*(param: string) {}}; // allow: asyncFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "generator method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "generator method 'foo'" + }, + "output": "const obj = {foo: function*(param: string) { /* empty */ }}; // allow: asyncFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const obj = {foo: function*(param: string) {}}; // allow: asyncMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "generator method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "generator method 'foo'" + }, + "output": "const obj = {foo: function*(param: string) { /* empty */ }}; // allow: asyncMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const obj = {foo: function*(param: string) {}}; // allow: privateConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "generator method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "generator method 'foo'" + }, + "output": "const obj = {foo: function*(param: string) { /* empty */ }}; // allow: privateConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "privateConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const obj = {foo: function*(param: string) {}}; // allow: protectedConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "generator method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "generator method 'foo'" + }, + "output": "const obj = {foo: function*(param: string) { /* empty */ }}; // allow: protectedConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "protectedConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const obj = {foo: function*(param: string) {}}; // allow: decoratedFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "generator method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "generator method 'foo'" + }, + "output": "const obj = {foo: function*(param: string) { /* empty */ }}; // allow: decoratedFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "decoratedFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const obj = {foo: function*(param: string) {}}; // allow: overrideMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "generator method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "generator method 'foo'" + }, + "output": "const obj = {foo: function*(param: string) { /* empty */ }}; // allow: overrideMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "overrideMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const obj = {foo(param: string) {}}; +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "method 'foo'" + }, + "output": "const obj = {foo(param: string) { /* empty */ }};" + } + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const obj = {foo(param: string) {}}; // allow: functions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "method 'foo'" + }, + "output": "const obj = {foo(param: string) { /* empty */ }}; // allow: functions" + } + ] + } + ], + "options": [ + { + "allow": [ + "functions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const obj = {foo(param: string) {}}; // allow: arrowFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "method 'foo'" + }, + "output": "const obj = {foo(param: string) { /* empty */ }}; // allow: arrowFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "arrowFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const obj = {foo(param: string) {}}; // allow: generatorFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "method 'foo'" + }, + "output": "const obj = {foo(param: string) { /* empty */ }}; // allow: generatorFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const obj = {foo(param: string) {}}; // allow: generatorMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "method 'foo'" + }, + "output": "const obj = {foo(param: string) { /* empty */ }}; // allow: generatorMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const obj = {foo(param: string) {}}; // allow: getters +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "method 'foo'" + }, + "output": "const obj = {foo(param: string) { /* empty */ }}; // allow: getters" + } + ] + } + ], + "options": [ + { + "allow": [ + "getters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const obj = {foo(param: string) {}}; // allow: setters +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "method 'foo'" + }, + "output": "const obj = {foo(param: string) { /* empty */ }}; // allow: setters" + } + ] + } + ], + "options": [ + { + "allow": [ + "setters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const obj = {foo(param: string) {}}; // allow: constructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "method 'foo'" + }, + "output": "const obj = {foo(param: string) { /* empty */ }}; // allow: constructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "constructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const obj = {foo(param: string) {}}; // allow: asyncFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "method 'foo'" + }, + "output": "const obj = {foo(param: string) { /* empty */ }}; // allow: asyncFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const obj = {foo(param: string) {}}; // allow: asyncMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "method 'foo'" + }, + "output": "const obj = {foo(param: string) { /* empty */ }}; // allow: asyncMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const obj = {foo(param: string) {}}; // allow: privateConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "method 'foo'" + }, + "output": "const obj = {foo(param: string) { /* empty */ }}; // allow: privateConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "privateConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const obj = {foo(param: string) {}}; // allow: protectedConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "method 'foo'" + }, + "output": "const obj = {foo(param: string) { /* empty */ }}; // allow: protectedConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "protectedConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const obj = {foo(param: string) {}}; // allow: decoratedFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "method 'foo'" + }, + "output": "const obj = {foo(param: string) { /* empty */ }}; // allow: decoratedFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "decoratedFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const obj = {foo(param: string) {}}; // allow: overrideMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "method 'foo'" + }, + "output": "const obj = {foo(param: string) { /* empty */ }}; // allow: overrideMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "overrideMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A { foo(param: string) {} } +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "method 'foo'" + }, + "output": "class A { foo(param: string) { /* empty */ } }" + } + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A { foo(param: string) {} } // allow: functions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "method 'foo'" + }, + "output": "class A { foo(param: string) { /* empty */ } } // allow: functions" + } + ] + } + ], + "options": [ + { + "allow": [ + "functions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A { foo(param: string) {} } // allow: arrowFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "method 'foo'" + }, + "output": "class A { foo(param: string) { /* empty */ } } // allow: arrowFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "arrowFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A { foo(param: string) {} } // allow: generatorFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "method 'foo'" + }, + "output": "class A { foo(param: string) { /* empty */ } } // allow: generatorFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A { foo(param: string) {} } // allow: generatorMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "method 'foo'" + }, + "output": "class A { foo(param: string) { /* empty */ } } // allow: generatorMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A { foo(param: string) {} } // allow: getters +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "method 'foo'" + }, + "output": "class A { foo(param: string) { /* empty */ } } // allow: getters" + } + ] + } + ], + "options": [ + { + "allow": [ + "getters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A { foo(param: string) {} } // allow: setters +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "method 'foo'" + }, + "output": "class A { foo(param: string) { /* empty */ } } // allow: setters" + } + ] + } + ], + "options": [ + { + "allow": [ + "setters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A { foo(param: string) {} } // allow: constructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "method 'foo'" + }, + "output": "class A { foo(param: string) { /* empty */ } } // allow: constructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "constructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A { foo(param: string) {} } // allow: asyncFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "method 'foo'" + }, + "output": "class A { foo(param: string) { /* empty */ } } // allow: asyncFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A { foo(param: string) {} } // allow: asyncMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "method 'foo'" + }, + "output": "class A { foo(param: string) { /* empty */ } } // allow: asyncMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A { foo(param: string) {} } // allow: privateConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "method 'foo'" + }, + "output": "class A { foo(param: string) { /* empty */ } } // allow: privateConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "privateConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A { foo(param: string) {} } // allow: protectedConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "method 'foo'" + }, + "output": "class A { foo(param: string) { /* empty */ } } // allow: protectedConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "protectedConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A { foo(param: string) {} } // allow: decoratedFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "method 'foo'" + }, + "output": "class A { foo(param: string) { /* empty */ } } // allow: decoratedFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "decoratedFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A { foo(param: string) {} } // allow: overrideMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "method 'foo'" + }, + "output": "class A { foo(param: string) { /* empty */ } } // allow: overrideMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "overrideMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A { static foo(param: string) {} } +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static method 'foo'" + }, + "output": "class A { static foo(param: string) { /* empty */ } }" + } + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A { static foo(param: string) {} } // allow: functions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static method 'foo'" + }, + "output": "class A { static foo(param: string) { /* empty */ } } // allow: functions" + } + ] + } + ], + "options": [ + { + "allow": [ + "functions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A { static foo(param: string) {} } // allow: arrowFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static method 'foo'" + }, + "output": "class A { static foo(param: string) { /* empty */ } } // allow: arrowFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "arrowFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A { static foo(param: string) {} } // allow: generatorFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static method 'foo'" + }, + "output": "class A { static foo(param: string) { /* empty */ } } // allow: generatorFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A { static foo(param: string) {} } // allow: generatorMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static method 'foo'" + }, + "output": "class A { static foo(param: string) { /* empty */ } } // allow: generatorMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A { static foo(param: string) {} } // allow: getters +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static method 'foo'" + }, + "output": "class A { static foo(param: string) { /* empty */ } } // allow: getters" + } + ] + } + ], + "options": [ + { + "allow": [ + "getters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A { static foo(param: string) {} } // allow: setters +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static method 'foo'" + }, + "output": "class A { static foo(param: string) { /* empty */ } } // allow: setters" + } + ] + } + ], + "options": [ + { + "allow": [ + "setters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A { static foo(param: string) {} } // allow: constructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static method 'foo'" + }, + "output": "class A { static foo(param: string) { /* empty */ } } // allow: constructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "constructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A { static foo(param: string) {} } // allow: asyncFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static method 'foo'" + }, + "output": "class A { static foo(param: string) { /* empty */ } } // allow: asyncFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A { static foo(param: string) {} } // allow: asyncMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static method 'foo'" + }, + "output": "class A { static foo(param: string) { /* empty */ } } // allow: asyncMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A { static foo(param: string) {} } // allow: privateConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static method 'foo'" + }, + "output": "class A { static foo(param: string) { /* empty */ } } // allow: privateConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "privateConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A { static foo(param: string) {} } // allow: protectedConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static method 'foo'" + }, + "output": "class A { static foo(param: string) { /* empty */ } } // allow: protectedConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "protectedConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A { static foo(param: string) {} } // allow: decoratedFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static method 'foo'" + }, + "output": "class A { static foo(param: string) { /* empty */ } } // allow: decoratedFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "decoratedFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A { static foo(param: string) {} } // allow: overrideMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static method 'foo'" + }, + "output": "class A { static foo(param: string) { /* empty */ } } // allow: overrideMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "overrideMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {foo(param: string) {}}; +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "method 'foo'" + }, + "output": "const A = class {foo(param: string) { /* empty */ }};" + } + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {foo(param: string) {}}; // allow: functions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "method 'foo'" + }, + "output": "const A = class {foo(param: string) { /* empty */ }}; // allow: functions" + } + ] + } + ], + "options": [ + { + "allow": [ + "functions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {foo(param: string) {}}; // allow: arrowFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "method 'foo'" + }, + "output": "const A = class {foo(param: string) { /* empty */ }}; // allow: arrowFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "arrowFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {foo(param: string) {}}; // allow: generatorFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "method 'foo'" + }, + "output": "const A = class {foo(param: string) { /* empty */ }}; // allow: generatorFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {foo(param: string) {}}; // allow: generatorMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "method 'foo'" + }, + "output": "const A = class {foo(param: string) { /* empty */ }}; // allow: generatorMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {foo(param: string) {}}; // allow: getters +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "method 'foo'" + }, + "output": "const A = class {foo(param: string) { /* empty */ }}; // allow: getters" + } + ] + } + ], + "options": [ + { + "allow": [ + "getters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {foo(param: string) {}}; // allow: setters +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "method 'foo'" + }, + "output": "const A = class {foo(param: string) { /* empty */ }}; // allow: setters" + } + ] + } + ], + "options": [ + { + "allow": [ + "setters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {foo(param: string) {}}; // allow: constructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "method 'foo'" + }, + "output": "const A = class {foo(param: string) { /* empty */ }}; // allow: constructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "constructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {foo(param: string) {}}; // allow: asyncFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "method 'foo'" + }, + "output": "const A = class {foo(param: string) { /* empty */ }}; // allow: asyncFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {foo(param: string) {}}; // allow: asyncMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "method 'foo'" + }, + "output": "const A = class {foo(param: string) { /* empty */ }}; // allow: asyncMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {foo(param: string) {}}; // allow: privateConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "method 'foo'" + }, + "output": "const A = class {foo(param: string) { /* empty */ }}; // allow: privateConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "privateConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {foo(param: string) {}}; // allow: protectedConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "method 'foo'" + }, + "output": "const A = class {foo(param: string) { /* empty */ }}; // allow: protectedConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "protectedConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {foo(param: string) {}}; // allow: decoratedFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "method 'foo'" + }, + "output": "const A = class {foo(param: string) { /* empty */ }}; // allow: decoratedFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "decoratedFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {foo(param: string) {}}; // allow: overrideMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "method 'foo'" + }, + "output": "const A = class {foo(param: string) { /* empty */ }}; // allow: overrideMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "overrideMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {static foo(param: string) {}}; +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static method 'foo'" + }, + "output": "const A = class {static foo(param: string) { /* empty */ }};" + } + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {static foo(param: string) {}}; // allow: functions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static method 'foo'" + }, + "output": "const A = class {static foo(param: string) { /* empty */ }}; // allow: functions" + } + ] + } + ], + "options": [ + { + "allow": [ + "functions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {static foo(param: string) {}}; // allow: arrowFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static method 'foo'" + }, + "output": "const A = class {static foo(param: string) { /* empty */ }}; // allow: arrowFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "arrowFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {static foo(param: string) {}}; // allow: generatorFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static method 'foo'" + }, + "output": "const A = class {static foo(param: string) { /* empty */ }}; // allow: generatorFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {static foo(param: string) {}}; // allow: generatorMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static method 'foo'" + }, + "output": "const A = class {static foo(param: string) { /* empty */ }}; // allow: generatorMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {static foo(param: string) {}}; // allow: getters +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static method 'foo'" + }, + "output": "const A = class {static foo(param: string) { /* empty */ }}; // allow: getters" + } + ] + } + ], + "options": [ + { + "allow": [ + "getters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {static foo(param: string) {}}; // allow: setters +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static method 'foo'" + }, + "output": "const A = class {static foo(param: string) { /* empty */ }}; // allow: setters" + } + ] + } + ], + "options": [ + { + "allow": [ + "setters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {static foo(param: string) {}}; // allow: constructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static method 'foo'" + }, + "output": "const A = class {static foo(param: string) { /* empty */ }}; // allow: constructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "constructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {static foo(param: string) {}}; // allow: asyncFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static method 'foo'" + }, + "output": "const A = class {static foo(param: string) { /* empty */ }}; // allow: asyncFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {static foo(param: string) {}}; // allow: asyncMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static method 'foo'" + }, + "output": "const A = class {static foo(param: string) { /* empty */ }}; // allow: asyncMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {static foo(param: string) {}}; // allow: privateConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static method 'foo'" + }, + "output": "const A = class {static foo(param: string) { /* empty */ }}; // allow: privateConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "privateConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {static foo(param: string) {}}; // allow: protectedConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static method 'foo'" + }, + "output": "const A = class {static foo(param: string) { /* empty */ }}; // allow: protectedConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "protectedConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {static foo(param: string) {}}; // allow: decoratedFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static method 'foo'" + }, + "output": "const A = class {static foo(param: string) { /* empty */ }}; // allow: decoratedFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "decoratedFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {static foo(param: string) {}}; // allow: overrideMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static method 'foo'" + }, + "output": "const A = class {static foo(param: string) { /* empty */ }}; // allow: overrideMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "overrideMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const obj = {*foo(param: string) {}}; +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "generator method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "generator method 'foo'" + }, + "output": "const obj = {*foo(param: string) { /* empty */ }};" + } + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const obj = {*foo(param: string) {}}; // allow: functions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "generator method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "generator method 'foo'" + }, + "output": "const obj = {*foo(param: string) { /* empty */ }}; // allow: functions" + } + ] + } + ], + "options": [ + { + "allow": [ + "functions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const obj = {*foo(param: string) {}}; // allow: arrowFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "generator method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "generator method 'foo'" + }, + "output": "const obj = {*foo(param: string) { /* empty */ }}; // allow: arrowFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "arrowFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const obj = {*foo(param: string) {}}; // allow: generatorFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "generator method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "generator method 'foo'" + }, + "output": "const obj = {*foo(param: string) { /* empty */ }}; // allow: generatorFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const obj = {*foo(param: string) {}}; // allow: methods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "generator method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "generator method 'foo'" + }, + "output": "const obj = {*foo(param: string) { /* empty */ }}; // allow: methods" + } + ] + } + ], + "options": [ + { + "allow": [ + "methods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const obj = {*foo(param: string) {}}; // allow: getters +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "generator method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "generator method 'foo'" + }, + "output": "const obj = {*foo(param: string) { /* empty */ }}; // allow: getters" + } + ] + } + ], + "options": [ + { + "allow": [ + "getters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const obj = {*foo(param: string) {}}; // allow: setters +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "generator method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "generator method 'foo'" + }, + "output": "const obj = {*foo(param: string) { /* empty */ }}; // allow: setters" + } + ] + } + ], + "options": [ + { + "allow": [ + "setters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const obj = {*foo(param: string) {}}; // allow: constructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "generator method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "generator method 'foo'" + }, + "output": "const obj = {*foo(param: string) { /* empty */ }}; // allow: constructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "constructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const obj = {*foo(param: string) {}}; // allow: asyncFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "generator method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "generator method 'foo'" + }, + "output": "const obj = {*foo(param: string) { /* empty */ }}; // allow: asyncFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const obj = {*foo(param: string) {}}; // allow: asyncMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "generator method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "generator method 'foo'" + }, + "output": "const obj = {*foo(param: string) { /* empty */ }}; // allow: asyncMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const obj = {*foo(param: string) {}}; // allow: privateConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "generator method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "generator method 'foo'" + }, + "output": "const obj = {*foo(param: string) { /* empty */ }}; // allow: privateConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "privateConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const obj = {*foo(param: string) {}}; // allow: protectedConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "generator method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "generator method 'foo'" + }, + "output": "const obj = {*foo(param: string) { /* empty */ }}; // allow: protectedConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "protectedConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const obj = {*foo(param: string) {}}; // allow: decoratedFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "generator method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "generator method 'foo'" + }, + "output": "const obj = {*foo(param: string) { /* empty */ }}; // allow: decoratedFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "decoratedFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const obj = {*foo(param: string) {}}; // allow: overrideMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "generator method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "generator method 'foo'" + }, + "output": "const obj = {*foo(param: string) { /* empty */ }}; // allow: overrideMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "overrideMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A { *foo(param: string) {} } +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "generator method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "generator method 'foo'" + }, + "output": "class A { *foo(param: string) { /* empty */ } }" + } + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A { *foo(param: string) {} } // allow: functions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "generator method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "generator method 'foo'" + }, + "output": "class A { *foo(param: string) { /* empty */ } } // allow: functions" + } + ] + } + ], + "options": [ + { + "allow": [ + "functions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A { *foo(param: string) {} } // allow: arrowFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "generator method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "generator method 'foo'" + }, + "output": "class A { *foo(param: string) { /* empty */ } } // allow: arrowFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "arrowFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A { *foo(param: string) {} } // allow: generatorFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "generator method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "generator method 'foo'" + }, + "output": "class A { *foo(param: string) { /* empty */ } } // allow: generatorFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A { *foo(param: string) {} } // allow: methods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "generator method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "generator method 'foo'" + }, + "output": "class A { *foo(param: string) { /* empty */ } } // allow: methods" + } + ] + } + ], + "options": [ + { + "allow": [ + "methods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A { *foo(param: string) {} } // allow: getters +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "generator method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "generator method 'foo'" + }, + "output": "class A { *foo(param: string) { /* empty */ } } // allow: getters" + } + ] + } + ], + "options": [ + { + "allow": [ + "getters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A { *foo(param: string) {} } // allow: setters +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "generator method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "generator method 'foo'" + }, + "output": "class A { *foo(param: string) { /* empty */ } } // allow: setters" + } + ] + } + ], + "options": [ + { + "allow": [ + "setters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A { *foo(param: string) {} } // allow: constructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "generator method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "generator method 'foo'" + }, + "output": "class A { *foo(param: string) { /* empty */ } } // allow: constructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "constructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A { *foo(param: string) {} } // allow: asyncFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "generator method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "generator method 'foo'" + }, + "output": "class A { *foo(param: string) { /* empty */ } } // allow: asyncFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A { *foo(param: string) {} } // allow: asyncMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "generator method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "generator method 'foo'" + }, + "output": "class A { *foo(param: string) { /* empty */ } } // allow: asyncMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A { *foo(param: string) {} } // allow: privateConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "generator method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "generator method 'foo'" + }, + "output": "class A { *foo(param: string) { /* empty */ } } // allow: privateConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "privateConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A { *foo(param: string) {} } // allow: protectedConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "generator method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "generator method 'foo'" + }, + "output": "class A { *foo(param: string) { /* empty */ } } // allow: protectedConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "protectedConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A { *foo(param: string) {} } // allow: decoratedFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "generator method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "generator method 'foo'" + }, + "output": "class A { *foo(param: string) { /* empty */ } } // allow: decoratedFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "decoratedFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A { *foo(param: string) {} } // allow: overrideMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "generator method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "generator method 'foo'" + }, + "output": "class A { *foo(param: string) { /* empty */ } } // allow: overrideMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "overrideMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A {static *foo(param: string) {}} +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static generator method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static generator method 'foo'" + }, + "output": "class A {static *foo(param: string) { /* empty */ }}" + } + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A {static *foo(param: string) {}} // allow: functions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static generator method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static generator method 'foo'" + }, + "output": "class A {static *foo(param: string) { /* empty */ }} // allow: functions" + } + ] + } + ], + "options": [ + { + "allow": [ + "functions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A {static *foo(param: string) {}} // allow: arrowFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static generator method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static generator method 'foo'" + }, + "output": "class A {static *foo(param: string) { /* empty */ }} // allow: arrowFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "arrowFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A {static *foo(param: string) {}} // allow: generatorFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static generator method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static generator method 'foo'" + }, + "output": "class A {static *foo(param: string) { /* empty */ }} // allow: generatorFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A {static *foo(param: string) {}} // allow: methods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static generator method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static generator method 'foo'" + }, + "output": "class A {static *foo(param: string) { /* empty */ }} // allow: methods" + } + ] + } + ], + "options": [ + { + "allow": [ + "methods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A {static *foo(param: string) {}} // allow: getters +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static generator method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static generator method 'foo'" + }, + "output": "class A {static *foo(param: string) { /* empty */ }} // allow: getters" + } + ] + } + ], + "options": [ + { + "allow": [ + "getters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A {static *foo(param: string) {}} // allow: setters +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static generator method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static generator method 'foo'" + }, + "output": "class A {static *foo(param: string) { /* empty */ }} // allow: setters" + } + ] + } + ], + "options": [ + { + "allow": [ + "setters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A {static *foo(param: string) {}} // allow: constructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static generator method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static generator method 'foo'" + }, + "output": "class A {static *foo(param: string) { /* empty */ }} // allow: constructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "constructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A {static *foo(param: string) {}} // allow: asyncFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static generator method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static generator method 'foo'" + }, + "output": "class A {static *foo(param: string) { /* empty */ }} // allow: asyncFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A {static *foo(param: string) {}} // allow: asyncMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static generator method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static generator method 'foo'" + }, + "output": "class A {static *foo(param: string) { /* empty */ }} // allow: asyncMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A {static *foo(param: string) {}} // allow: privateConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static generator method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static generator method 'foo'" + }, + "output": "class A {static *foo(param: string) { /* empty */ }} // allow: privateConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "privateConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A {static *foo(param: string) {}} // allow: protectedConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static generator method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static generator method 'foo'" + }, + "output": "class A {static *foo(param: string) { /* empty */ }} // allow: protectedConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "protectedConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A {static *foo(param: string) {}} // allow: decoratedFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static generator method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static generator method 'foo'" + }, + "output": "class A {static *foo(param: string) { /* empty */ }} // allow: decoratedFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "decoratedFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A {static *foo(param: string) {}} // allow: overrideMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static generator method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static generator method 'foo'" + }, + "output": "class A {static *foo(param: string) { /* empty */ }} // allow: overrideMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "overrideMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {*foo(param: string) {}}; +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "generator method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "generator method 'foo'" + }, + "output": "const A = class {*foo(param: string) { /* empty */ }};" + } + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {*foo(param: string) {}}; // allow: functions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "generator method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "generator method 'foo'" + }, + "output": "const A = class {*foo(param: string) { /* empty */ }}; // allow: functions" + } + ] + } + ], + "options": [ + { + "allow": [ + "functions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {*foo(param: string) {}}; // allow: arrowFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "generator method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "generator method 'foo'" + }, + "output": "const A = class {*foo(param: string) { /* empty */ }}; // allow: arrowFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "arrowFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {*foo(param: string) {}}; // allow: generatorFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "generator method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "generator method 'foo'" + }, + "output": "const A = class {*foo(param: string) { /* empty */ }}; // allow: generatorFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {*foo(param: string) {}}; // allow: methods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "generator method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "generator method 'foo'" + }, + "output": "const A = class {*foo(param: string) { /* empty */ }}; // allow: methods" + } + ] + } + ], + "options": [ + { + "allow": [ + "methods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {*foo(param: string) {}}; // allow: getters +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "generator method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "generator method 'foo'" + }, + "output": "const A = class {*foo(param: string) { /* empty */ }}; // allow: getters" + } + ] + } + ], + "options": [ + { + "allow": [ + "getters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {*foo(param: string) {}}; // allow: setters +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "generator method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "generator method 'foo'" + }, + "output": "const A = class {*foo(param: string) { /* empty */ }}; // allow: setters" + } + ] + } + ], + "options": [ + { + "allow": [ + "setters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {*foo(param: string) {}}; // allow: constructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "generator method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "generator method 'foo'" + }, + "output": "const A = class {*foo(param: string) { /* empty */ }}; // allow: constructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "constructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {*foo(param: string) {}}; // allow: asyncFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "generator method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "generator method 'foo'" + }, + "output": "const A = class {*foo(param: string) { /* empty */ }}; // allow: asyncFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {*foo(param: string) {}}; // allow: asyncMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "generator method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "generator method 'foo'" + }, + "output": "const A = class {*foo(param: string) { /* empty */ }}; // allow: asyncMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {*foo(param: string) {}}; // allow: privateConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "generator method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "generator method 'foo'" + }, + "output": "const A = class {*foo(param: string) { /* empty */ }}; // allow: privateConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "privateConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {*foo(param: string) {}}; // allow: protectedConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "generator method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "generator method 'foo'" + }, + "output": "const A = class {*foo(param: string) { /* empty */ }}; // allow: protectedConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "protectedConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {*foo(param: string) {}}; // allow: decoratedFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "generator method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "generator method 'foo'" + }, + "output": "const A = class {*foo(param: string) { /* empty */ }}; // allow: decoratedFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "decoratedFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {*foo(param: string) {}}; // allow: overrideMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "generator method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "generator method 'foo'" + }, + "output": "const A = class {*foo(param: string) { /* empty */ }}; // allow: overrideMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "overrideMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {static *foo(param: string) {}}; +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static generator method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static generator method 'foo'" + }, + "output": "const A = class {static *foo(param: string) { /* empty */ }};" + } + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {static *foo(param: string) {}}; // allow: functions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static generator method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static generator method 'foo'" + }, + "output": "const A = class {static *foo(param: string) { /* empty */ }}; // allow: functions" + } + ] + } + ], + "options": [ + { + "allow": [ + "functions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {static *foo(param: string) {}}; // allow: arrowFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static generator method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static generator method 'foo'" + }, + "output": "const A = class {static *foo(param: string) { /* empty */ }}; // allow: arrowFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "arrowFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {static *foo(param: string) {}}; // allow: generatorFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static generator method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static generator method 'foo'" + }, + "output": "const A = class {static *foo(param: string) { /* empty */ }}; // allow: generatorFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {static *foo(param: string) {}}; // allow: methods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static generator method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static generator method 'foo'" + }, + "output": "const A = class {static *foo(param: string) { /* empty */ }}; // allow: methods" + } + ] + } + ], + "options": [ + { + "allow": [ + "methods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {static *foo(param: string) {}}; // allow: getters +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static generator method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static generator method 'foo'" + }, + "output": "const A = class {static *foo(param: string) { /* empty */ }}; // allow: getters" + } + ] + } + ], + "options": [ + { + "allow": [ + "getters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {static *foo(param: string) {}}; // allow: setters +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static generator method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static generator method 'foo'" + }, + "output": "const A = class {static *foo(param: string) { /* empty */ }}; // allow: setters" + } + ] + } + ], + "options": [ + { + "allow": [ + "setters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {static *foo(param: string) {}}; // allow: constructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static generator method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static generator method 'foo'" + }, + "output": "const A = class {static *foo(param: string) { /* empty */ }}; // allow: constructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "constructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {static *foo(param: string) {}}; // allow: asyncFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static generator method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static generator method 'foo'" + }, + "output": "const A = class {static *foo(param: string) { /* empty */ }}; // allow: asyncFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {static *foo(param: string) {}}; // allow: asyncMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static generator method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static generator method 'foo'" + }, + "output": "const A = class {static *foo(param: string) { /* empty */ }}; // allow: asyncMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {static *foo(param: string) {}}; // allow: privateConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static generator method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static generator method 'foo'" + }, + "output": "const A = class {static *foo(param: string) { /* empty */ }}; // allow: privateConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "privateConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {static *foo(param: string) {}}; // allow: protectedConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static generator method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static generator method 'foo'" + }, + "output": "const A = class {static *foo(param: string) { /* empty */ }}; // allow: protectedConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "protectedConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {static *foo(param: string) {}}; // allow: decoratedFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static generator method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static generator method 'foo'" + }, + "output": "const A = class {static *foo(param: string) { /* empty */ }}; // allow: decoratedFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "decoratedFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {static *foo(param: string) {}}; // allow: overrideMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static generator method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static generator method 'foo'" + }, + "output": "const A = class {static *foo(param: string) { /* empty */ }}; // allow: overrideMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "overrideMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const obj = {get foo(): string {}}; +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "const obj = {get foo(): string { /* empty */ }};" + } + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const obj = {get foo(): string {}}; // allow: functions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "const obj = {get foo(): string { /* empty */ }}; // allow: functions" + } + ] + } + ], + "options": [ + { + "allow": [ + "functions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const obj = {get foo(): string {}}; // allow: arrowFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "const obj = {get foo(): string { /* empty */ }}; // allow: arrowFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "arrowFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const obj = {get foo(): string {}}; // allow: generatorFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "const obj = {get foo(): string { /* empty */ }}; // allow: generatorFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const obj = {get foo(): string {}}; // allow: methods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "const obj = {get foo(): string { /* empty */ }}; // allow: methods" + } + ] + } + ], + "options": [ + { + "allow": [ + "methods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const obj = {get foo(): string {}}; // allow: generatorMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "const obj = {get foo(): string { /* empty */ }}; // allow: generatorMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const obj = {get foo(): string {}}; // allow: setters +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "const obj = {get foo(): string { /* empty */ }}; // allow: setters" + } + ] + } + ], + "options": [ + { + "allow": [ + "setters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const obj = {get foo(): string {}}; // allow: constructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "const obj = {get foo(): string { /* empty */ }}; // allow: constructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "constructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const obj = {get foo(): string {}}; // allow: asyncFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "const obj = {get foo(): string { /* empty */ }}; // allow: asyncFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const obj = {get foo(): string {}}; // allow: asyncMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "const obj = {get foo(): string { /* empty */ }}; // allow: asyncMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const obj = {get foo(): string {}}; // allow: privateConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "const obj = {get foo(): string { /* empty */ }}; // allow: privateConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "privateConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const obj = {get foo(): string {}}; // allow: protectedConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "const obj = {get foo(): string { /* empty */ }}; // allow: protectedConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "protectedConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const obj = {get foo(): string {}}; // allow: decoratedFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "const obj = {get foo(): string { /* empty */ }}; // allow: decoratedFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "decoratedFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const obj = {get foo(): string {}}; // allow: overrideMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "const obj = {get foo(): string { /* empty */ }}; // allow: overrideMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "overrideMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A {get foo(): string {}} +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "class A {get foo(): string { /* empty */ }}" + } + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A {get foo(): string {}} // allow: functions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "class A {get foo(): string { /* empty */ }} // allow: functions" + } + ] + } + ], + "options": [ + { + "allow": [ + "functions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A {get foo(): string {}} // allow: arrowFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "class A {get foo(): string { /* empty */ }} // allow: arrowFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "arrowFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A {get foo(): string {}} // allow: generatorFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "class A {get foo(): string { /* empty */ }} // allow: generatorFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A {get foo(): string {}} // allow: methods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "class A {get foo(): string { /* empty */ }} // allow: methods" + } + ] + } + ], + "options": [ + { + "allow": [ + "methods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A {get foo(): string {}} // allow: generatorMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "class A {get foo(): string { /* empty */ }} // allow: generatorMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A {get foo(): string {}} // allow: setters +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "class A {get foo(): string { /* empty */ }} // allow: setters" + } + ] + } + ], + "options": [ + { + "allow": [ + "setters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A {get foo(): string {}} // allow: constructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "class A {get foo(): string { /* empty */ }} // allow: constructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "constructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A {get foo(): string {}} // allow: asyncFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "class A {get foo(): string { /* empty */ }} // allow: asyncFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A {get foo(): string {}} // allow: asyncMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "class A {get foo(): string { /* empty */ }} // allow: asyncMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A {get foo(): string {}} // allow: privateConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "class A {get foo(): string { /* empty */ }} // allow: privateConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "privateConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A {get foo(): string {}} // allow: protectedConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "class A {get foo(): string { /* empty */ }} // allow: protectedConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "protectedConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A {get foo(): string {}} // allow: decoratedFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "class A {get foo(): string { /* empty */ }} // allow: decoratedFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "decoratedFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A {get foo(): string {}} // allow: overrideMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "class A {get foo(): string { /* empty */ }} // allow: overrideMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "overrideMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A {static get foo(): string {}} +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "class A {static get foo(): string { /* empty */ }}" + } + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A {static get foo(): string {}} // allow: functions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "class A {static get foo(): string { /* empty */ }} // allow: functions" + } + ] + } + ], + "options": [ + { + "allow": [ + "functions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A {static get foo(): string {}} // allow: arrowFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "class A {static get foo(): string { /* empty */ }} // allow: arrowFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "arrowFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A {static get foo(): string {}} // allow: generatorFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "class A {static get foo(): string { /* empty */ }} // allow: generatorFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A {static get foo(): string {}} // allow: methods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "class A {static get foo(): string { /* empty */ }} // allow: methods" + } + ] + } + ], + "options": [ + { + "allow": [ + "methods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A {static get foo(): string {}} // allow: generatorMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "class A {static get foo(): string { /* empty */ }} // allow: generatorMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A {static get foo(): string {}} // allow: setters +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "class A {static get foo(): string { /* empty */ }} // allow: setters" + } + ] + } + ], + "options": [ + { + "allow": [ + "setters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A {static get foo(): string {}} // allow: constructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "class A {static get foo(): string { /* empty */ }} // allow: constructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "constructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A {static get foo(): string {}} // allow: asyncFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "class A {static get foo(): string { /* empty */ }} // allow: asyncFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A {static get foo(): string {}} // allow: asyncMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "class A {static get foo(): string { /* empty */ }} // allow: asyncMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A {static get foo(): string {}} // allow: privateConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "class A {static get foo(): string { /* empty */ }} // allow: privateConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "privateConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A {static get foo(): string {}} // allow: protectedConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "class A {static get foo(): string { /* empty */ }} // allow: protectedConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "protectedConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A {static get foo(): string {}} // allow: decoratedFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "class A {static get foo(): string { /* empty */ }} // allow: decoratedFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "decoratedFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A {static get foo(): string {}} // allow: overrideMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "class A {static get foo(): string { /* empty */ }} // allow: overrideMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "overrideMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {get foo(): string {}}; +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "const A = class {get foo(): string { /* empty */ }};" + } + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {get foo(): string {}}; // allow: functions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "const A = class {get foo(): string { /* empty */ }}; // allow: functions" + } + ] + } + ], + "options": [ + { + "allow": [ + "functions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {get foo(): string {}}; // allow: arrowFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "const A = class {get foo(): string { /* empty */ }}; // allow: arrowFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "arrowFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {get foo(): string {}}; // allow: generatorFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "const A = class {get foo(): string { /* empty */ }}; // allow: generatorFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {get foo(): string {}}; // allow: methods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "const A = class {get foo(): string { /* empty */ }}; // allow: methods" + } + ] + } + ], + "options": [ + { + "allow": [ + "methods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {get foo(): string {}}; // allow: generatorMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "const A = class {get foo(): string { /* empty */ }}; // allow: generatorMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {get foo(): string {}}; // allow: setters +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "const A = class {get foo(): string { /* empty */ }}; // allow: setters" + } + ] + } + ], + "options": [ + { + "allow": [ + "setters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {get foo(): string {}}; // allow: constructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "const A = class {get foo(): string { /* empty */ }}; // allow: constructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "constructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {get foo(): string {}}; // allow: asyncFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "const A = class {get foo(): string { /* empty */ }}; // allow: asyncFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {get foo(): string {}}; // allow: asyncMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "const A = class {get foo(): string { /* empty */ }}; // allow: asyncMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {get foo(): string {}}; // allow: privateConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "const A = class {get foo(): string { /* empty */ }}; // allow: privateConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "privateConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {get foo(): string {}}; // allow: protectedConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "const A = class {get foo(): string { /* empty */ }}; // allow: protectedConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "protectedConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {get foo(): string {}}; // allow: decoratedFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "const A = class {get foo(): string { /* empty */ }}; // allow: decoratedFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "decoratedFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {get foo(): string {}}; // allow: overrideMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "const A = class {get foo(): string { /* empty */ }}; // allow: overrideMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "overrideMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {static get foo(): string {}}; +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "const A = class {static get foo(): string { /* empty */ }};" + } + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {static get foo(): string {}}; // allow: functions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "const A = class {static get foo(): string { /* empty */ }}; // allow: functions" + } + ] + } + ], + "options": [ + { + "allow": [ + "functions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {static get foo(): string {}}; // allow: arrowFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "const A = class {static get foo(): string { /* empty */ }}; // allow: arrowFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "arrowFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {static get foo(): string {}}; // allow: generatorFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "const A = class {static get foo(): string { /* empty */ }}; // allow: generatorFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {static get foo(): string {}}; // allow: methods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "const A = class {static get foo(): string { /* empty */ }}; // allow: methods" + } + ] + } + ], + "options": [ + { + "allow": [ + "methods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {static get foo(): string {}}; // allow: generatorMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "const A = class {static get foo(): string { /* empty */ }}; // allow: generatorMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {static get foo(): string {}}; // allow: setters +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "const A = class {static get foo(): string { /* empty */ }}; // allow: setters" + } + ] + } + ], + "options": [ + { + "allow": [ + "setters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {static get foo(): string {}}; // allow: constructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "const A = class {static get foo(): string { /* empty */ }}; // allow: constructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "constructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {static get foo(): string {}}; // allow: asyncFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "const A = class {static get foo(): string { /* empty */ }}; // allow: asyncFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {static get foo(): string {}}; // allow: asyncMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "const A = class {static get foo(): string { /* empty */ }}; // allow: asyncMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {static get foo(): string {}}; // allow: privateConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "const A = class {static get foo(): string { /* empty */ }}; // allow: privateConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "privateConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {static get foo(): string {}}; // allow: protectedConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "const A = class {static get foo(): string { /* empty */ }}; // allow: protectedConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "protectedConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {static get foo(): string {}}; // allow: decoratedFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "const A = class {static get foo(): string { /* empty */ }}; // allow: decoratedFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "decoratedFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {static get foo(): string {}}; // allow: overrideMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "const A = class {static get foo(): string { /* empty */ }}; // allow: overrideMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "overrideMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A {@decorator() get foo(): string {}} +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "class A {@decorator() get foo(): string { /* empty */ }}" + } + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A {@decorator() get foo(): string {}} // allow: functions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "class A {@decorator() get foo(): string { /* empty */ }} // allow: functions" + } + ] + } + ], + "options": [ + { + "allow": [ + "functions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A {@decorator() get foo(): string {}} // allow: arrowFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "class A {@decorator() get foo(): string { /* empty */ }} // allow: arrowFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "arrowFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A {@decorator() get foo(): string {}} // allow: generatorFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "class A {@decorator() get foo(): string { /* empty */ }} // allow: generatorFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A {@decorator() get foo(): string {}} // allow: methods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "class A {@decorator() get foo(): string { /* empty */ }} // allow: methods" + } + ] + } + ], + "options": [ + { + "allow": [ + "methods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A {@decorator() get foo(): string {}} // allow: generatorMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "class A {@decorator() get foo(): string { /* empty */ }} // allow: generatorMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A {@decorator() get foo(): string {}} // allow: setters +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "class A {@decorator() get foo(): string { /* empty */ }} // allow: setters" + } + ] + } + ], + "options": [ + { + "allow": [ + "setters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A {@decorator() get foo(): string {}} // allow: constructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "class A {@decorator() get foo(): string { /* empty */ }} // allow: constructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "constructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A {@decorator() get foo(): string {}} // allow: asyncFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "class A {@decorator() get foo(): string { /* empty */ }} // allow: asyncFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A {@decorator() get foo(): string {}} // allow: asyncMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "class A {@decorator() get foo(): string { /* empty */ }} // allow: asyncMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A {@decorator() get foo(): string {}} // allow: privateConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "class A {@decorator() get foo(): string { /* empty */ }} // allow: privateConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "privateConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A {@decorator() get foo(): string {}} // allow: protectedConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "class A {@decorator() get foo(): string { /* empty */ }} // allow: protectedConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "protectedConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A {@decorator() get foo(): string {}} // allow: overrideMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "class A {@decorator() get foo(): string { /* empty */ }} // allow: overrideMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "overrideMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A {@decorator() static get foo(): string {}} +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "class A {@decorator() static get foo(): string { /* empty */ }}" + } + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A {@decorator() static get foo(): string {}} // allow: functions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "class A {@decorator() static get foo(): string { /* empty */ }} // allow: functions" + } + ] + } + ], + "options": [ + { + "allow": [ + "functions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A {@decorator() static get foo(): string {}} // allow: arrowFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "class A {@decorator() static get foo(): string { /* empty */ }} // allow: arrowFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "arrowFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A {@decorator() static get foo(): string {}} // allow: generatorFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "class A {@decorator() static get foo(): string { /* empty */ }} // allow: generatorFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A {@decorator() static get foo(): string {}} // allow: methods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "class A {@decorator() static get foo(): string { /* empty */ }} // allow: methods" + } + ] + } + ], + "options": [ + { + "allow": [ + "methods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A {@decorator() static get foo(): string {}} // allow: generatorMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "class A {@decorator() static get foo(): string { /* empty */ }} // allow: generatorMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A {@decorator() static get foo(): string {}} // allow: setters +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "class A {@decorator() static get foo(): string { /* empty */ }} // allow: setters" + } + ] + } + ], + "options": [ + { + "allow": [ + "setters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A {@decorator() static get foo(): string {}} // allow: constructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "class A {@decorator() static get foo(): string { /* empty */ }} // allow: constructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "constructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A {@decorator() static get foo(): string {}} // allow: asyncFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "class A {@decorator() static get foo(): string { /* empty */ }} // allow: asyncFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A {@decorator() static get foo(): string {}} // allow: asyncMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "class A {@decorator() static get foo(): string { /* empty */ }} // allow: asyncMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A {@decorator() static get foo(): string {}} // allow: privateConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "class A {@decorator() static get foo(): string { /* empty */ }} // allow: privateConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "privateConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A {@decorator() static get foo(): string {}} // allow: protectedConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "class A {@decorator() static get foo(): string { /* empty */ }} // allow: protectedConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "protectedConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A {@decorator() static get foo(): string {}} // allow: overrideMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "class A {@decorator() static get foo(): string { /* empty */ }} // allow: overrideMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "overrideMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {@decorator() get foo(): string {}}; +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "const A = class {@decorator() get foo(): string { /* empty */ }};" + } + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {@decorator() get foo(): string {}}; // allow: functions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "const A = class {@decorator() get foo(): string { /* empty */ }}; // allow: functions" + } + ] + } + ], + "options": [ + { + "allow": [ + "functions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {@decorator() get foo(): string {}}; // allow: arrowFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "const A = class {@decorator() get foo(): string { /* empty */ }}; // allow: arrowFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "arrowFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {@decorator() get foo(): string {}}; // allow: generatorFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "const A = class {@decorator() get foo(): string { /* empty */ }}; // allow: generatorFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {@decorator() get foo(): string {}}; // allow: methods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "const A = class {@decorator() get foo(): string { /* empty */ }}; // allow: methods" + } + ] + } + ], + "options": [ + { + "allow": [ + "methods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {@decorator() get foo(): string {}}; // allow: generatorMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "const A = class {@decorator() get foo(): string { /* empty */ }}; // allow: generatorMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {@decorator() get foo(): string {}}; // allow: setters +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "const A = class {@decorator() get foo(): string { /* empty */ }}; // allow: setters" + } + ] + } + ], + "options": [ + { + "allow": [ + "setters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {@decorator() get foo(): string {}}; // allow: constructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "const A = class {@decorator() get foo(): string { /* empty */ }}; // allow: constructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "constructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {@decorator() get foo(): string {}}; // allow: asyncFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "const A = class {@decorator() get foo(): string { /* empty */ }}; // allow: asyncFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {@decorator() get foo(): string {}}; // allow: asyncMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "const A = class {@decorator() get foo(): string { /* empty */ }}; // allow: asyncMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {@decorator() get foo(): string {}}; // allow: privateConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "const A = class {@decorator() get foo(): string { /* empty */ }}; // allow: privateConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "privateConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {@decorator() get foo(): string {}}; // allow: protectedConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "const A = class {@decorator() get foo(): string { /* empty */ }}; // allow: protectedConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "protectedConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {@decorator() get foo(): string {}}; // allow: overrideMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "const A = class {@decorator() get foo(): string { /* empty */ }}; // allow: overrideMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "overrideMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {@decorator() static get foo(): string {}}; +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "const A = class {@decorator() static get foo(): string { /* empty */ }};" + } + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {@decorator() static get foo(): string {}}; // allow: functions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "const A = class {@decorator() static get foo(): string { /* empty */ }}; // allow: functions" + } + ] + } + ], + "options": [ + { + "allow": [ + "functions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {@decorator() static get foo(): string {}}; // allow: arrowFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "const A = class {@decorator() static get foo(): string { /* empty */ }}; // allow: arrowFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "arrowFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {@decorator() static get foo(): string {}}; // allow: generatorFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "const A = class {@decorator() static get foo(): string { /* empty */ }}; // allow: generatorFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {@decorator() static get foo(): string {}}; // allow: methods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "const A = class {@decorator() static get foo(): string { /* empty */ }}; // allow: methods" + } + ] + } + ], + "options": [ + { + "allow": [ + "methods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {@decorator() static get foo(): string {}}; // allow: generatorMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "const A = class {@decorator() static get foo(): string { /* empty */ }}; // allow: generatorMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {@decorator() static get foo(): string {}}; // allow: setters +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "const A = class {@decorator() static get foo(): string { /* empty */ }}; // allow: setters" + } + ] + } + ], + "options": [ + { + "allow": [ + "setters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {@decorator() static get foo(): string {}}; // allow: constructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "const A = class {@decorator() static get foo(): string { /* empty */ }}; // allow: constructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "constructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {@decorator() static get foo(): string {}}; // allow: asyncFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "const A = class {@decorator() static get foo(): string { /* empty */ }}; // allow: asyncFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {@decorator() static get foo(): string {}}; // allow: asyncMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "const A = class {@decorator() static get foo(): string { /* empty */ }}; // allow: asyncMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {@decorator() static get foo(): string {}}; // allow: privateConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "const A = class {@decorator() static get foo(): string { /* empty */ }}; // allow: privateConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "privateConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {@decorator() static get foo(): string {}}; // allow: protectedConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "const A = class {@decorator() static get foo(): string { /* empty */ }}; // allow: protectedConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "protectedConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {@decorator() static get foo(): string {}}; // allow: overrideMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "const A = class {@decorator() static get foo(): string { /* empty */ }}; // allow: overrideMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "overrideMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A extends B {override get foo(): string {}} +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "class A extends B {override get foo(): string { /* empty */ }}" + } + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A extends B {override get foo(): string {}} // allow: functions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "class A extends B {override get foo(): string { /* empty */ }} // allow: functions" + } + ] + } + ], + "options": [ + { + "allow": [ + "functions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A extends B {override get foo(): string {}} // allow: arrowFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "class A extends B {override get foo(): string { /* empty */ }} // allow: arrowFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "arrowFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A extends B {override get foo(): string {}} // allow: generatorFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "class A extends B {override get foo(): string { /* empty */ }} // allow: generatorFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A extends B {override get foo(): string {}} // allow: methods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "class A extends B {override get foo(): string { /* empty */ }} // allow: methods" + } + ] + } + ], + "options": [ + { + "allow": [ + "methods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A extends B {override get foo(): string {}} // allow: generatorMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "class A extends B {override get foo(): string { /* empty */ }} // allow: generatorMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A extends B {override get foo(): string {}} // allow: setters +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "class A extends B {override get foo(): string { /* empty */ }} // allow: setters" + } + ] + } + ], + "options": [ + { + "allow": [ + "setters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A extends B {override get foo(): string {}} // allow: constructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "class A extends B {override get foo(): string { /* empty */ }} // allow: constructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "constructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A extends B {override get foo(): string {}} // allow: asyncFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "class A extends B {override get foo(): string { /* empty */ }} // allow: asyncFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A extends B {override get foo(): string {}} // allow: asyncMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "class A extends B {override get foo(): string { /* empty */ }} // allow: asyncMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A extends B {override get foo(): string {}} // allow: privateConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "class A extends B {override get foo(): string { /* empty */ }} // allow: privateConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "privateConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A extends B {override get foo(): string {}} // allow: protectedConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "class A extends B {override get foo(): string { /* empty */ }} // allow: protectedConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "protectedConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A extends B {override get foo(): string {}} // allow: decoratedFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "class A extends B {override get foo(): string { /* empty */ }} // allow: decoratedFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "decoratedFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A extends B {static override get foo(): string {}} +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "class A extends B {static override get foo(): string { /* empty */ }}" + } + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A extends B {static override get foo(): string {}} // allow: functions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "class A extends B {static override get foo(): string { /* empty */ }} // allow: functions" + } + ] + } + ], + "options": [ + { + "allow": [ + "functions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A extends B {static override get foo(): string {}} // allow: arrowFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "class A extends B {static override get foo(): string { /* empty */ }} // allow: arrowFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "arrowFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A extends B {static override get foo(): string {}} // allow: generatorFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "class A extends B {static override get foo(): string { /* empty */ }} // allow: generatorFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A extends B {static override get foo(): string {}} // allow: methods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "class A extends B {static override get foo(): string { /* empty */ }} // allow: methods" + } + ] + } + ], + "options": [ + { + "allow": [ + "methods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A extends B {static override get foo(): string {}} // allow: generatorMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "class A extends B {static override get foo(): string { /* empty */ }} // allow: generatorMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A extends B {static override get foo(): string {}} // allow: setters +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "class A extends B {static override get foo(): string { /* empty */ }} // allow: setters" + } + ] + } + ], + "options": [ + { + "allow": [ + "setters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A extends B {static override get foo(): string {}} // allow: constructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "class A extends B {static override get foo(): string { /* empty */ }} // allow: constructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "constructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A extends B {static override get foo(): string {}} // allow: asyncFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "class A extends B {static override get foo(): string { /* empty */ }} // allow: asyncFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A extends B {static override get foo(): string {}} // allow: asyncMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "class A extends B {static override get foo(): string { /* empty */ }} // allow: asyncMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A extends B {static override get foo(): string {}} // allow: privateConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "class A extends B {static override get foo(): string { /* empty */ }} // allow: privateConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "privateConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A extends B {static override get foo(): string {}} // allow: protectedConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "class A extends B {static override get foo(): string { /* empty */ }} // allow: protectedConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "protectedConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A extends B {static override get foo(): string {}} // allow: decoratedFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "class A extends B {static override get foo(): string { /* empty */ }} // allow: decoratedFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "decoratedFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class extends B {override get foo(): string {}}; +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "const A = class extends B {override get foo(): string { /* empty */ }};" + } + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class extends B {override get foo(): string {}}; // allow: functions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "const A = class extends B {override get foo(): string { /* empty */ }}; // allow: functions" + } + ] + } + ], + "options": [ + { + "allow": [ + "functions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class extends B {override get foo(): string {}}; // allow: arrowFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "const A = class extends B {override get foo(): string { /* empty */ }}; // allow: arrowFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "arrowFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class extends B {override get foo(): string {}}; // allow: generatorFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "const A = class extends B {override get foo(): string { /* empty */ }}; // allow: generatorFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class extends B {override get foo(): string {}}; // allow: methods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "const A = class extends B {override get foo(): string { /* empty */ }}; // allow: methods" + } + ] + } + ], + "options": [ + { + "allow": [ + "methods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class extends B {override get foo(): string {}}; // allow: generatorMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "const A = class extends B {override get foo(): string { /* empty */ }}; // allow: generatorMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class extends B {override get foo(): string {}}; // allow: setters +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "const A = class extends B {override get foo(): string { /* empty */ }}; // allow: setters" + } + ] + } + ], + "options": [ + { + "allow": [ + "setters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class extends B {override get foo(): string {}}; // allow: constructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "const A = class extends B {override get foo(): string { /* empty */ }}; // allow: constructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "constructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class extends B {override get foo(): string {}}; // allow: asyncFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "const A = class extends B {override get foo(): string { /* empty */ }}; // allow: asyncFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class extends B {override get foo(): string {}}; // allow: asyncMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "const A = class extends B {override get foo(): string { /* empty */ }}; // allow: asyncMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class extends B {override get foo(): string {}}; // allow: privateConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "const A = class extends B {override get foo(): string { /* empty */ }}; // allow: privateConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "privateConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class extends B {override get foo(): string {}}; // allow: protectedConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "const A = class extends B {override get foo(): string { /* empty */ }}; // allow: protectedConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "protectedConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class extends B {override get foo(): string {}}; // allow: decoratedFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "const A = class extends B {override get foo(): string { /* empty */ }}; // allow: decoratedFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "decoratedFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class extends B {static override get foo(): string {}}; +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "const A = class extends B {static override get foo(): string { /* empty */ }};" + } + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class extends B {static override get foo(): string {}}; // allow: functions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "const A = class extends B {static override get foo(): string { /* empty */ }}; // allow: functions" + } + ] + } + ], + "options": [ + { + "allow": [ + "functions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class extends B {static override get foo(): string {}}; // allow: arrowFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "const A = class extends B {static override get foo(): string { /* empty */ }}; // allow: arrowFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "arrowFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class extends B {static override get foo(): string {}}; // allow: generatorFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "const A = class extends B {static override get foo(): string { /* empty */ }}; // allow: generatorFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class extends B {static override get foo(): string {}}; // allow: methods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "const A = class extends B {static override get foo(): string { /* empty */ }}; // allow: methods" + } + ] + } + ], + "options": [ + { + "allow": [ + "methods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class extends B {static override get foo(): string {}}; // allow: generatorMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "const A = class extends B {static override get foo(): string { /* empty */ }}; // allow: generatorMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class extends B {static override get foo(): string {}}; // allow: setters +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "const A = class extends B {static override get foo(): string { /* empty */ }}; // allow: setters" + } + ] + } + ], + "options": [ + { + "allow": [ + "setters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class extends B {static override get foo(): string {}}; // allow: constructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "const A = class extends B {static override get foo(): string { /* empty */ }}; // allow: constructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "constructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class extends B {static override get foo(): string {}}; // allow: asyncFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "const A = class extends B {static override get foo(): string { /* empty */ }}; // allow: asyncFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class extends B {static override get foo(): string {}}; // allow: asyncMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "const A = class extends B {static override get foo(): string { /* empty */ }}; // allow: asyncMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class extends B {static override get foo(): string {}}; // allow: privateConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "const A = class extends B {static override get foo(): string { /* empty */ }}; // allow: privateConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "privateConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class extends B {static override get foo(): string {}}; // allow: protectedConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "const A = class extends B {static override get foo(): string { /* empty */ }}; // allow: protectedConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "protectedConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class extends B {static override get foo(): string {}}; // allow: decoratedFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "const A = class extends B {static override get foo(): string { /* empty */ }}; // allow: decoratedFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "decoratedFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const obj = {set foo(value: string) {}}; +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "const obj = {set foo(value: string) { /* empty */ }};" + } + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const obj = {set foo(value: string) {}}; // allow: functions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "const obj = {set foo(value: string) { /* empty */ }}; // allow: functions" + } + ] + } + ], + "options": [ + { + "allow": [ + "functions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const obj = {set foo(value: string) {}}; // allow: arrowFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "const obj = {set foo(value: string) { /* empty */ }}; // allow: arrowFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "arrowFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const obj = {set foo(value: string) {}}; // allow: generatorFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "const obj = {set foo(value: string) { /* empty */ }}; // allow: generatorFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const obj = {set foo(value: string) {}}; // allow: methods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "const obj = {set foo(value: string) { /* empty */ }}; // allow: methods" + } + ] + } + ], + "options": [ + { + "allow": [ + "methods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const obj = {set foo(value: string) {}}; // allow: generatorMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "const obj = {set foo(value: string) { /* empty */ }}; // allow: generatorMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const obj = {set foo(value: string) {}}; // allow: getters +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "const obj = {set foo(value: string) { /* empty */ }}; // allow: getters" + } + ] + } + ], + "options": [ + { + "allow": [ + "getters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const obj = {set foo(value: string) {}}; // allow: constructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "const obj = {set foo(value: string) { /* empty */ }}; // allow: constructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "constructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const obj = {set foo(value: string) {}}; // allow: asyncFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "const obj = {set foo(value: string) { /* empty */ }}; // allow: asyncFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const obj = {set foo(value: string) {}}; // allow: asyncMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "const obj = {set foo(value: string) { /* empty */ }}; // allow: asyncMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const obj = {set foo(value: string) {}}; // allow: privateConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "const obj = {set foo(value: string) { /* empty */ }}; // allow: privateConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "privateConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const obj = {set foo(value: string) {}}; // allow: protectedConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "const obj = {set foo(value: string) { /* empty */ }}; // allow: protectedConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "protectedConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const obj = {set foo(value: string) {}}; // allow: decoratedFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "const obj = {set foo(value: string) { /* empty */ }}; // allow: decoratedFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "decoratedFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const obj = {set foo(value: string) {}}; // allow: overrideMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "const obj = {set foo(value: string) { /* empty */ }}; // allow: overrideMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "overrideMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A {set foo(value: string) {}} +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "class A {set foo(value: string) { /* empty */ }}" + } + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A {set foo(value: string) {}} // allow: functions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "class A {set foo(value: string) { /* empty */ }} // allow: functions" + } + ] + } + ], + "options": [ + { + "allow": [ + "functions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A {set foo(value: string) {}} // allow: arrowFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "class A {set foo(value: string) { /* empty */ }} // allow: arrowFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "arrowFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A {set foo(value: string) {}} // allow: generatorFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "class A {set foo(value: string) { /* empty */ }} // allow: generatorFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A {set foo(value: string) {}} // allow: methods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "class A {set foo(value: string) { /* empty */ }} // allow: methods" + } + ] + } + ], + "options": [ + { + "allow": [ + "methods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A {set foo(value: string) {}} // allow: generatorMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "class A {set foo(value: string) { /* empty */ }} // allow: generatorMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A {set foo(value: string) {}} // allow: getters +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "class A {set foo(value: string) { /* empty */ }} // allow: getters" + } + ] + } + ], + "options": [ + { + "allow": [ + "getters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A {set foo(value: string) {}} // allow: constructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "class A {set foo(value: string) { /* empty */ }} // allow: constructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "constructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A {set foo(value: string) {}} // allow: asyncFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "class A {set foo(value: string) { /* empty */ }} // allow: asyncFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A {set foo(value: string) {}} // allow: asyncMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "class A {set foo(value: string) { /* empty */ }} // allow: asyncMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A {set foo(value: string) {}} // allow: privateConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "class A {set foo(value: string) { /* empty */ }} // allow: privateConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "privateConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A {set foo(value: string) {}} // allow: protectedConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "class A {set foo(value: string) { /* empty */ }} // allow: protectedConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "protectedConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A {set foo(value: string) {}} // allow: decoratedFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "class A {set foo(value: string) { /* empty */ }} // allow: decoratedFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "decoratedFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A {set foo(value: string) {}} // allow: overrideMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "class A {set foo(value: string) { /* empty */ }} // allow: overrideMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "overrideMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A {static set foo(value: string) {}} +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "class A {static set foo(value: string) { /* empty */ }}" + } + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A {static set foo(value: string) {}} // allow: functions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "class A {static set foo(value: string) { /* empty */ }} // allow: functions" + } + ] + } + ], + "options": [ + { + "allow": [ + "functions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A {static set foo(value: string) {}} // allow: arrowFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "class A {static set foo(value: string) { /* empty */ }} // allow: arrowFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "arrowFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A {static set foo(value: string) {}} // allow: generatorFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "class A {static set foo(value: string) { /* empty */ }} // allow: generatorFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A {static set foo(value: string) {}} // allow: methods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "class A {static set foo(value: string) { /* empty */ }} // allow: methods" + } + ] + } + ], + "options": [ + { + "allow": [ + "methods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A {static set foo(value: string) {}} // allow: generatorMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "class A {static set foo(value: string) { /* empty */ }} // allow: generatorMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A {static set foo(value: string) {}} // allow: getters +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "class A {static set foo(value: string) { /* empty */ }} // allow: getters" + } + ] + } + ], + "options": [ + { + "allow": [ + "getters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A {static set foo(value: string) {}} // allow: constructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "class A {static set foo(value: string) { /* empty */ }} // allow: constructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "constructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A {static set foo(value: string) {}} // allow: asyncFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "class A {static set foo(value: string) { /* empty */ }} // allow: asyncFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A {static set foo(value: string) {}} // allow: asyncMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "class A {static set foo(value: string) { /* empty */ }} // allow: asyncMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A {static set foo(value: string) {}} // allow: privateConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "class A {static set foo(value: string) { /* empty */ }} // allow: privateConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "privateConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A {static set foo(value: string) {}} // allow: protectedConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "class A {static set foo(value: string) { /* empty */ }} // allow: protectedConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "protectedConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A {static set foo(value: string) {}} // allow: decoratedFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "class A {static set foo(value: string) { /* empty */ }} // allow: decoratedFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "decoratedFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A {static set foo(value: string) {}} // allow: overrideMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "class A {static set foo(value: string) { /* empty */ }} // allow: overrideMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "overrideMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {set foo(value: string) {}}; +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "const A = class {set foo(value: string) { /* empty */ }};" + } + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {set foo(value: string) {}}; // allow: functions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "const A = class {set foo(value: string) { /* empty */ }}; // allow: functions" + } + ] + } + ], + "options": [ + { + "allow": [ + "functions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {set foo(value: string) {}}; // allow: arrowFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "const A = class {set foo(value: string) { /* empty */ }}; // allow: arrowFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "arrowFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {set foo(value: string) {}}; // allow: generatorFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "const A = class {set foo(value: string) { /* empty */ }}; // allow: generatorFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {set foo(value: string) {}}; // allow: methods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "const A = class {set foo(value: string) { /* empty */ }}; // allow: methods" + } + ] + } + ], + "options": [ + { + "allow": [ + "methods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {set foo(value: string) {}}; // allow: generatorMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "const A = class {set foo(value: string) { /* empty */ }}; // allow: generatorMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {set foo(value: string) {}}; // allow: getters +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "const A = class {set foo(value: string) { /* empty */ }}; // allow: getters" + } + ] + } + ], + "options": [ + { + "allow": [ + "getters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {set foo(value: string) {}}; // allow: constructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "const A = class {set foo(value: string) { /* empty */ }}; // allow: constructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "constructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {set foo(value: string) {}}; // allow: asyncFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "const A = class {set foo(value: string) { /* empty */ }}; // allow: asyncFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {set foo(value: string) {}}; // allow: asyncMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "const A = class {set foo(value: string) { /* empty */ }}; // allow: asyncMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {set foo(value: string) {}}; // allow: privateConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "const A = class {set foo(value: string) { /* empty */ }}; // allow: privateConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "privateConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {set foo(value: string) {}}; // allow: protectedConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "const A = class {set foo(value: string) { /* empty */ }}; // allow: protectedConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "protectedConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {set foo(value: string) {}}; // allow: decoratedFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "const A = class {set foo(value: string) { /* empty */ }}; // allow: decoratedFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "decoratedFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {set foo(value: string) {}}; // allow: overrideMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "const A = class {set foo(value: string) { /* empty */ }}; // allow: overrideMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "overrideMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {static set foo(value: string) {}}; +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "const A = class {static set foo(value: string) { /* empty */ }};" + } + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {static set foo(value: string) {}}; // allow: functions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "const A = class {static set foo(value: string) { /* empty */ }}; // allow: functions" + } + ] + } + ], + "options": [ + { + "allow": [ + "functions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {static set foo(value: string) {}}; // allow: arrowFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "const A = class {static set foo(value: string) { /* empty */ }}; // allow: arrowFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "arrowFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {static set foo(value: string) {}}; // allow: generatorFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "const A = class {static set foo(value: string) { /* empty */ }}; // allow: generatorFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {static set foo(value: string) {}}; // allow: methods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "const A = class {static set foo(value: string) { /* empty */ }}; // allow: methods" + } + ] + } + ], + "options": [ + { + "allow": [ + "methods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {static set foo(value: string) {}}; // allow: generatorMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "const A = class {static set foo(value: string) { /* empty */ }}; // allow: generatorMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {static set foo(value: string) {}}; // allow: getters +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "const A = class {static set foo(value: string) { /* empty */ }}; // allow: getters" + } + ] + } + ], + "options": [ + { + "allow": [ + "getters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {static set foo(value: string) {}}; // allow: constructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "const A = class {static set foo(value: string) { /* empty */ }}; // allow: constructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "constructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {static set foo(value: string) {}}; // allow: asyncFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "const A = class {static set foo(value: string) { /* empty */ }}; // allow: asyncFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {static set foo(value: string) {}}; // allow: asyncMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "const A = class {static set foo(value: string) { /* empty */ }}; // allow: asyncMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {static set foo(value: string) {}}; // allow: privateConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "const A = class {static set foo(value: string) { /* empty */ }}; // allow: privateConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "privateConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {static set foo(value: string) {}}; // allow: protectedConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "const A = class {static set foo(value: string) { /* empty */ }}; // allow: protectedConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "protectedConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {static set foo(value: string) {}}; // allow: decoratedFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "const A = class {static set foo(value: string) { /* empty */ }}; // allow: decoratedFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "decoratedFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {static set foo(value: string) {}}; // allow: overrideMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "const A = class {static set foo(value: string) { /* empty */ }}; // allow: overrideMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "overrideMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A {@decorator() set foo(value: string) {}} +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "class A {@decorator() set foo(value: string) { /* empty */ }}" + } + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A {@decorator() set foo(value: string) {}} // allow: functions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "class A {@decorator() set foo(value: string) { /* empty */ }} // allow: functions" + } + ] + } + ], + "options": [ + { + "allow": [ + "functions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A {@decorator() set foo(value: string) {}} // allow: arrowFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "class A {@decorator() set foo(value: string) { /* empty */ }} // allow: arrowFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "arrowFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A {@decorator() set foo(value: string) {}} // allow: generatorFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "class A {@decorator() set foo(value: string) { /* empty */ }} // allow: generatorFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A {@decorator() set foo(value: string) {}} // allow: methods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "class A {@decorator() set foo(value: string) { /* empty */ }} // allow: methods" + } + ] + } + ], + "options": [ + { + "allow": [ + "methods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A {@decorator() set foo(value: string) {}} // allow: generatorMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "class A {@decorator() set foo(value: string) { /* empty */ }} // allow: generatorMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A {@decorator() set foo(value: string) {}} // allow: getters +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "class A {@decorator() set foo(value: string) { /* empty */ }} // allow: getters" + } + ] + } + ], + "options": [ + { + "allow": [ + "getters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A {@decorator() set foo(value: string) {}} // allow: constructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "class A {@decorator() set foo(value: string) { /* empty */ }} // allow: constructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "constructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A {@decorator() set foo(value: string) {}} // allow: asyncFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "class A {@decorator() set foo(value: string) { /* empty */ }} // allow: asyncFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A {@decorator() set foo(value: string) {}} // allow: asyncMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "class A {@decorator() set foo(value: string) { /* empty */ }} // allow: asyncMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A {@decorator() set foo(value: string) {}} // allow: privateConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "class A {@decorator() set foo(value: string) { /* empty */ }} // allow: privateConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "privateConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A {@decorator() set foo(value: string) {}} // allow: protectedConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "class A {@decorator() set foo(value: string) { /* empty */ }} // allow: protectedConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "protectedConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A {@decorator() set foo(value: string) {}} // allow: overrideMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "class A {@decorator() set foo(value: string) { /* empty */ }} // allow: overrideMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "overrideMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A {@decorator() static set foo(value: string) {}} +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "class A {@decorator() static set foo(value: string) { /* empty */ }}" + } + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A {@decorator() static set foo(value: string) {}} // allow: functions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "class A {@decorator() static set foo(value: string) { /* empty */ }} // allow: functions" + } + ] + } + ], + "options": [ + { + "allow": [ + "functions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A {@decorator() static set foo(value: string) {}} // allow: arrowFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "class A {@decorator() static set foo(value: string) { /* empty */ }} // allow: arrowFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "arrowFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A {@decorator() static set foo(value: string) {}} // allow: generatorFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "class A {@decorator() static set foo(value: string) { /* empty */ }} // allow: generatorFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A {@decorator() static set foo(value: string) {}} // allow: methods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "class A {@decorator() static set foo(value: string) { /* empty */ }} // allow: methods" + } + ] + } + ], + "options": [ + { + "allow": [ + "methods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A {@decorator() static set foo(value: string) {}} // allow: generatorMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "class A {@decorator() static set foo(value: string) { /* empty */ }} // allow: generatorMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A {@decorator() static set foo(value: string) {}} // allow: getters +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "class A {@decorator() static set foo(value: string) { /* empty */ }} // allow: getters" + } + ] + } + ], + "options": [ + { + "allow": [ + "getters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A {@decorator() static set foo(value: string) {}} // allow: constructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "class A {@decorator() static set foo(value: string) { /* empty */ }} // allow: constructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "constructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A {@decorator() static set foo(value: string) {}} // allow: asyncFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "class A {@decorator() static set foo(value: string) { /* empty */ }} // allow: asyncFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A {@decorator() static set foo(value: string) {}} // allow: asyncMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "class A {@decorator() static set foo(value: string) { /* empty */ }} // allow: asyncMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A {@decorator() static set foo(value: string) {}} // allow: privateConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "class A {@decorator() static set foo(value: string) { /* empty */ }} // allow: privateConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "privateConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A {@decorator() static set foo(value: string) {}} // allow: protectedConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "class A {@decorator() static set foo(value: string) { /* empty */ }} // allow: protectedConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "protectedConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A {@decorator() static set foo(value: string) {}} // allow: overrideMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "class A {@decorator() static set foo(value: string) { /* empty */ }} // allow: overrideMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "overrideMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {@decorator() set foo(value: string) {}}; +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "const A = class {@decorator() set foo(value: string) { /* empty */ }};" + } + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {@decorator() set foo(value: string) {}}; // allow: functions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "const A = class {@decorator() set foo(value: string) { /* empty */ }}; // allow: functions" + } + ] + } + ], + "options": [ + { + "allow": [ + "functions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {@decorator() set foo(value: string) {}}; // allow: arrowFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "const A = class {@decorator() set foo(value: string) { /* empty */ }}; // allow: arrowFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "arrowFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {@decorator() set foo(value: string) {}}; // allow: generatorFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "const A = class {@decorator() set foo(value: string) { /* empty */ }}; // allow: generatorFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {@decorator() set foo(value: string) {}}; // allow: methods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "const A = class {@decorator() set foo(value: string) { /* empty */ }}; // allow: methods" + } + ] + } + ], + "options": [ + { + "allow": [ + "methods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {@decorator() set foo(value: string) {}}; // allow: generatorMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "const A = class {@decorator() set foo(value: string) { /* empty */ }}; // allow: generatorMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {@decorator() set foo(value: string) {}}; // allow: getters +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "const A = class {@decorator() set foo(value: string) { /* empty */ }}; // allow: getters" + } + ] + } + ], + "options": [ + { + "allow": [ + "getters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {@decorator() set foo(value: string) {}}; // allow: constructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "const A = class {@decorator() set foo(value: string) { /* empty */ }}; // allow: constructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "constructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {@decorator() set foo(value: string) {}}; // allow: asyncFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "const A = class {@decorator() set foo(value: string) { /* empty */ }}; // allow: asyncFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {@decorator() set foo(value: string) {}}; // allow: asyncMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "const A = class {@decorator() set foo(value: string) { /* empty */ }}; // allow: asyncMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {@decorator() set foo(value: string) {}}; // allow: privateConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "const A = class {@decorator() set foo(value: string) { /* empty */ }}; // allow: privateConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "privateConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {@decorator() set foo(value: string) {}}; // allow: protectedConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "const A = class {@decorator() set foo(value: string) { /* empty */ }}; // allow: protectedConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "protectedConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {@decorator() set foo(value: string) {}}; // allow: overrideMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "const A = class {@decorator() set foo(value: string) { /* empty */ }}; // allow: overrideMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "overrideMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {@decorator() static set foo(value: string) {}}; +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "const A = class {@decorator() static set foo(value: string) { /* empty */ }};" + } + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {@decorator() static set foo(value: string) {}}; // allow: functions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "const A = class {@decorator() static set foo(value: string) { /* empty */ }}; // allow: functions" + } + ] + } + ], + "options": [ + { + "allow": [ + "functions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {@decorator() static set foo(value: string) {}}; // allow: arrowFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "const A = class {@decorator() static set foo(value: string) { /* empty */ }}; // allow: arrowFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "arrowFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {@decorator() static set foo(value: string) {}}; // allow: generatorFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "const A = class {@decorator() static set foo(value: string) { /* empty */ }}; // allow: generatorFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {@decorator() static set foo(value: string) {}}; // allow: methods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "const A = class {@decorator() static set foo(value: string) { /* empty */ }}; // allow: methods" + } + ] + } + ], + "options": [ + { + "allow": [ + "methods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {@decorator() static set foo(value: string) {}}; // allow: generatorMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "const A = class {@decorator() static set foo(value: string) { /* empty */ }}; // allow: generatorMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {@decorator() static set foo(value: string) {}}; // allow: getters +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "const A = class {@decorator() static set foo(value: string) { /* empty */ }}; // allow: getters" + } + ] + } + ], + "options": [ + { + "allow": [ + "getters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {@decorator() static set foo(value: string) {}}; // allow: constructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "const A = class {@decorator() static set foo(value: string) { /* empty */ }}; // allow: constructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "constructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {@decorator() static set foo(value: string) {}}; // allow: asyncFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "const A = class {@decorator() static set foo(value: string) { /* empty */ }}; // allow: asyncFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {@decorator() static set foo(value: string) {}}; // allow: asyncMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "const A = class {@decorator() static set foo(value: string) { /* empty */ }}; // allow: asyncMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {@decorator() static set foo(value: string) {}}; // allow: privateConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "const A = class {@decorator() static set foo(value: string) { /* empty */ }}; // allow: privateConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "privateConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {@decorator() static set foo(value: string) {}}; // allow: protectedConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "const A = class {@decorator() static set foo(value: string) { /* empty */ }}; // allow: protectedConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "protectedConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {@decorator() static set foo(value: string) {}}; // allow: overrideMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "const A = class {@decorator() static set foo(value: string) { /* empty */ }}; // allow: overrideMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "overrideMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A extends B {override set foo(value: string) {}} +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "class A extends B {override set foo(value: string) { /* empty */ }}" + } + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A extends B {override set foo(value: string) {}} // allow: functions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "class A extends B {override set foo(value: string) { /* empty */ }} // allow: functions" + } + ] + } + ], + "options": [ + { + "allow": [ + "functions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A extends B {override set foo(value: string) {}} // allow: arrowFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "class A extends B {override set foo(value: string) { /* empty */ }} // allow: arrowFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "arrowFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A extends B {override set foo(value: string) {}} // allow: generatorFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "class A extends B {override set foo(value: string) { /* empty */ }} // allow: generatorFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A extends B {override set foo(value: string) {}} // allow: methods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "class A extends B {override set foo(value: string) { /* empty */ }} // allow: methods" + } + ] + } + ], + "options": [ + { + "allow": [ + "methods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A extends B {override set foo(value: string) {}} // allow: generatorMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "class A extends B {override set foo(value: string) { /* empty */ }} // allow: generatorMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A extends B {override set foo(value: string) {}} // allow: getters +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "class A extends B {override set foo(value: string) { /* empty */ }} // allow: getters" + } + ] + } + ], + "options": [ + { + "allow": [ + "getters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A extends B {override set foo(value: string) {}} // allow: constructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "class A extends B {override set foo(value: string) { /* empty */ }} // allow: constructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "constructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A extends B {override set foo(value: string) {}} // allow: asyncFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "class A extends B {override set foo(value: string) { /* empty */ }} // allow: asyncFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A extends B {override set foo(value: string) {}} // allow: asyncMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "class A extends B {override set foo(value: string) { /* empty */ }} // allow: asyncMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A extends B {override set foo(value: string) {}} // allow: privateConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "class A extends B {override set foo(value: string) { /* empty */ }} // allow: privateConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "privateConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A extends B {override set foo(value: string) {}} // allow: protectedConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "class A extends B {override set foo(value: string) { /* empty */ }} // allow: protectedConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "protectedConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A extends B {override set foo(value: string) {}} // allow: decoratedFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "class A extends B {override set foo(value: string) { /* empty */ }} // allow: decoratedFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "decoratedFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A extends B {static override set foo(value: string) {}} +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "class A extends B {static override set foo(value: string) { /* empty */ }}" + } + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A extends B {static override set foo(value: string) {}} // allow: functions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "class A extends B {static override set foo(value: string) { /* empty */ }} // allow: functions" + } + ] + } + ], + "options": [ + { + "allow": [ + "functions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A extends B {static override set foo(value: string) {}} // allow: arrowFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "class A extends B {static override set foo(value: string) { /* empty */ }} // allow: arrowFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "arrowFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A extends B {static override set foo(value: string) {}} // allow: generatorFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "class A extends B {static override set foo(value: string) { /* empty */ }} // allow: generatorFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A extends B {static override set foo(value: string) {}} // allow: methods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "class A extends B {static override set foo(value: string) { /* empty */ }} // allow: methods" + } + ] + } + ], + "options": [ + { + "allow": [ + "methods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A extends B {static override set foo(value: string) {}} // allow: generatorMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "class A extends B {static override set foo(value: string) { /* empty */ }} // allow: generatorMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A extends B {static override set foo(value: string) {}} // allow: getters +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "class A extends B {static override set foo(value: string) { /* empty */ }} // allow: getters" + } + ] + } + ], + "options": [ + { + "allow": [ + "getters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A extends B {static override set foo(value: string) {}} // allow: constructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "class A extends B {static override set foo(value: string) { /* empty */ }} // allow: constructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "constructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A extends B {static override set foo(value: string) {}} // allow: asyncFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "class A extends B {static override set foo(value: string) { /* empty */ }} // allow: asyncFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A extends B {static override set foo(value: string) {}} // allow: asyncMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "class A extends B {static override set foo(value: string) { /* empty */ }} // allow: asyncMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A extends B {static override set foo(value: string) {}} // allow: privateConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "class A extends B {static override set foo(value: string) { /* empty */ }} // allow: privateConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "privateConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A extends B {static override set foo(value: string) {}} // allow: protectedConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "class A extends B {static override set foo(value: string) { /* empty */ }} // allow: protectedConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "protectedConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A extends B {static override set foo(value: string) {}} // allow: decoratedFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "class A extends B {static override set foo(value: string) { /* empty */ }} // allow: decoratedFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "decoratedFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class extends B {override set foo(value: string) {}}; +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "const A = class extends B {override set foo(value: string) { /* empty */ }};" + } + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class extends B {override set foo(value: string) {}}; // allow: functions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "const A = class extends B {override set foo(value: string) { /* empty */ }}; // allow: functions" + } + ] + } + ], + "options": [ + { + "allow": [ + "functions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class extends B {override set foo(value: string) {}}; // allow: arrowFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "const A = class extends B {override set foo(value: string) { /* empty */ }}; // allow: arrowFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "arrowFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class extends B {override set foo(value: string) {}}; // allow: generatorFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "const A = class extends B {override set foo(value: string) { /* empty */ }}; // allow: generatorFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class extends B {override set foo(value: string) {}}; // allow: methods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "const A = class extends B {override set foo(value: string) { /* empty */ }}; // allow: methods" + } + ] + } + ], + "options": [ + { + "allow": [ + "methods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class extends B {override set foo(value: string) {}}; // allow: generatorMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "const A = class extends B {override set foo(value: string) { /* empty */ }}; // allow: generatorMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class extends B {override set foo(value: string) {}}; // allow: getters +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "const A = class extends B {override set foo(value: string) { /* empty */ }}; // allow: getters" + } + ] + } + ], + "options": [ + { + "allow": [ + "getters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class extends B {override set foo(value: string) {}}; // allow: constructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "const A = class extends B {override set foo(value: string) { /* empty */ }}; // allow: constructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "constructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class extends B {override set foo(value: string) {}}; // allow: asyncFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "const A = class extends B {override set foo(value: string) { /* empty */ }}; // allow: asyncFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class extends B {override set foo(value: string) {}}; // allow: asyncMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "const A = class extends B {override set foo(value: string) { /* empty */ }}; // allow: asyncMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class extends B {override set foo(value: string) {}}; // allow: privateConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "const A = class extends B {override set foo(value: string) { /* empty */ }}; // allow: privateConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "privateConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class extends B {override set foo(value: string) {}}; // allow: protectedConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "const A = class extends B {override set foo(value: string) { /* empty */ }}; // allow: protectedConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "protectedConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class extends B {override set foo(value: string) {}}; // allow: decoratedFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "const A = class extends B {override set foo(value: string) { /* empty */ }}; // allow: decoratedFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "decoratedFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class extends B {static override set foo(value: string) {}}; +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "const A = class extends B {static override set foo(value: string) { /* empty */ }};" + } + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class extends B {static override set foo(value: string) {}}; // allow: functions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "const A = class extends B {static override set foo(value: string) { /* empty */ }}; // allow: functions" + } + ] + } + ], + "options": [ + { + "allow": [ + "functions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class extends B {static override set foo(value: string) {}}; // allow: arrowFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "const A = class extends B {static override set foo(value: string) { /* empty */ }}; // allow: arrowFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "arrowFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class extends B {static override set foo(value: string) {}}; // allow: generatorFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "const A = class extends B {static override set foo(value: string) { /* empty */ }}; // allow: generatorFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class extends B {static override set foo(value: string) {}}; // allow: methods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "const A = class extends B {static override set foo(value: string) { /* empty */ }}; // allow: methods" + } + ] + } + ], + "options": [ + { + "allow": [ + "methods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class extends B {static override set foo(value: string) {}}; // allow: generatorMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "const A = class extends B {static override set foo(value: string) { /* empty */ }}; // allow: generatorMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class extends B {static override set foo(value: string) {}}; // allow: getters +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "const A = class extends B {static override set foo(value: string) { /* empty */ }}; // allow: getters" + } + ] + } + ], + "options": [ + { + "allow": [ + "getters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class extends B {static override set foo(value: string) {}}; // allow: constructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "const A = class extends B {static override set foo(value: string) { /* empty */ }}; // allow: constructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "constructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class extends B {static override set foo(value: string) {}}; // allow: asyncFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "const A = class extends B {static override set foo(value: string) { /* empty */ }}; // allow: asyncFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class extends B {static override set foo(value: string) {}}; // allow: asyncMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "const A = class extends B {static override set foo(value: string) { /* empty */ }}; // allow: asyncMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class extends B {static override set foo(value: string) {}}; // allow: privateConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "const A = class extends B {static override set foo(value: string) { /* empty */ }}; // allow: privateConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "privateConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class extends B {static override set foo(value: string) {}}; // allow: protectedConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "const A = class extends B {static override set foo(value: string) { /* empty */ }}; // allow: protectedConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "protectedConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class extends B {static override set foo(value: string) {}}; // allow: decoratedFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "const A = class extends B {static override set foo(value: string) { /* empty */ }}; // allow: decoratedFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "decoratedFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A { constructor(param: string) {} } +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "constructor" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "constructor" + }, + "output": "class A { constructor(param: string) { /* empty */ } }" + } + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A { constructor(param: string) {} } // allow: functions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "constructor" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "constructor" + }, + "output": "class A { constructor(param: string) { /* empty */ } } // allow: functions" + } + ] + } + ], + "options": [ + { + "allow": [ + "functions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A { constructor(param: string) {} } // allow: arrowFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "constructor" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "constructor" + }, + "output": "class A { constructor(param: string) { /* empty */ } } // allow: arrowFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "arrowFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A { constructor(param: string) {} } // allow: generatorFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "constructor" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "constructor" + }, + "output": "class A { constructor(param: string) { /* empty */ } } // allow: generatorFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A { constructor(param: string) {} } // allow: methods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "constructor" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "constructor" + }, + "output": "class A { constructor(param: string) { /* empty */ } } // allow: methods" + } + ] + } + ], + "options": [ + { + "allow": [ + "methods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A { constructor(param: string) {} } // allow: generatorMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "constructor" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "constructor" + }, + "output": "class A { constructor(param: string) { /* empty */ } } // allow: generatorMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A { constructor(param: string) {} } // allow: getters +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "constructor" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "constructor" + }, + "output": "class A { constructor(param: string) { /* empty */ } } // allow: getters" + } + ] + } + ], + "options": [ + { + "allow": [ + "getters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A { constructor(param: string) {} } // allow: setters +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "constructor" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "constructor" + }, + "output": "class A { constructor(param: string) { /* empty */ } } // allow: setters" + } + ] + } + ], + "options": [ + { + "allow": [ + "setters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A { constructor(param: string) {} } // allow: asyncFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "constructor" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "constructor" + }, + "output": "class A { constructor(param: string) { /* empty */ } } // allow: asyncFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A { constructor(param: string) {} } // allow: asyncMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "constructor" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "constructor" + }, + "output": "class A { constructor(param: string) { /* empty */ } } // allow: asyncMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A { constructor(param: string) {} } // allow: privateConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "constructor" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "constructor" + }, + "output": "class A { constructor(param: string) { /* empty */ } } // allow: privateConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "privateConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A { constructor(param: string) {} } // allow: protectedConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "constructor" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "constructor" + }, + "output": "class A { constructor(param: string) { /* empty */ } } // allow: protectedConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "protectedConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A { constructor(param: string) {} } // allow: decoratedFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "constructor" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "constructor" + }, + "output": "class A { constructor(param: string) { /* empty */ } } // allow: decoratedFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "decoratedFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A { constructor(param: string) {} } // allow: overrideMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "constructor" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "constructor" + }, + "output": "class A { constructor(param: string) { /* empty */ } } // allow: overrideMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "overrideMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {constructor(param: string) {}}; +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "constructor" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "constructor" + }, + "output": "const A = class {constructor(param: string) { /* empty */ }};" + } + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {constructor(param: string) {}}; // allow: functions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "constructor" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "constructor" + }, + "output": "const A = class {constructor(param: string) { /* empty */ }}; // allow: functions" + } + ] + } + ], + "options": [ + { + "allow": [ + "functions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {constructor(param: string) {}}; // allow: arrowFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "constructor" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "constructor" + }, + "output": "const A = class {constructor(param: string) { /* empty */ }}; // allow: arrowFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "arrowFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {constructor(param: string) {}}; // allow: generatorFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "constructor" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "constructor" + }, + "output": "const A = class {constructor(param: string) { /* empty */ }}; // allow: generatorFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {constructor(param: string) {}}; // allow: methods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "constructor" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "constructor" + }, + "output": "const A = class {constructor(param: string) { /* empty */ }}; // allow: methods" + } + ] + } + ], + "options": [ + { + "allow": [ + "methods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {constructor(param: string) {}}; // allow: generatorMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "constructor" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "constructor" + }, + "output": "const A = class {constructor(param: string) { /* empty */ }}; // allow: generatorMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {constructor(param: string) {}}; // allow: getters +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "constructor" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "constructor" + }, + "output": "const A = class {constructor(param: string) { /* empty */ }}; // allow: getters" + } + ] + } + ], + "options": [ + { + "allow": [ + "getters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {constructor(param: string) {}}; // allow: setters +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "constructor" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "constructor" + }, + "output": "const A = class {constructor(param: string) { /* empty */ }}; // allow: setters" + } + ] + } + ], + "options": [ + { + "allow": [ + "setters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {constructor(param: string) {}}; // allow: asyncFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "constructor" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "constructor" + }, + "output": "const A = class {constructor(param: string) { /* empty */ }}; // allow: asyncFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {constructor(param: string) {}}; // allow: asyncMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "constructor" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "constructor" + }, + "output": "const A = class {constructor(param: string) { /* empty */ }}; // allow: asyncMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {constructor(param: string) {}}; // allow: privateConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "constructor" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "constructor" + }, + "output": "const A = class {constructor(param: string) { /* empty */ }}; // allow: privateConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "privateConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {constructor(param: string) {}}; // allow: protectedConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "constructor" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "constructor" + }, + "output": "const A = class {constructor(param: string) { /* empty */ }}; // allow: protectedConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "protectedConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {constructor(param: string) {}}; // allow: decoratedFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "constructor" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "constructor" + }, + "output": "const A = class {constructor(param: string) { /* empty */ }}; // allow: decoratedFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "decoratedFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const A = class {constructor(param: string) {}}; // allow: overrideMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "constructor" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "constructor" + }, + "output": "const A = class {constructor(param: string) { /* empty */ }}; // allow: overrideMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "overrideMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const foo = { async method(param: string) {} } +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "async method 'method'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "async method 'method'" + }, + "output": "const foo = { async method(param: string) { /* empty */ } }" + } + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const foo = { async method(param: string) {} } // allow: functions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "async method 'method'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "async method 'method'" + }, + "output": "const foo = { async method(param: string) { /* empty */ } } // allow: functions" + } + ] + } + ], + "options": [ + { + "allow": [ + "functions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const foo = { async method(param: string) {} } // allow: arrowFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "async method 'method'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "async method 'method'" + }, + "output": "const foo = { async method(param: string) { /* empty */ } } // allow: arrowFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "arrowFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const foo = { async method(param: string) {} } // allow: generatorFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "async method 'method'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "async method 'method'" + }, + "output": "const foo = { async method(param: string) { /* empty */ } } // allow: generatorFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const foo = { async method(param: string) {} } // allow: methods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "async method 'method'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "async method 'method'" + }, + "output": "const foo = { async method(param: string) { /* empty */ } } // allow: methods" + } + ] + } + ], + "options": [ + { + "allow": [ + "methods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const foo = { async method(param: string) {} } // allow: generatorMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "async method 'method'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "async method 'method'" + }, + "output": "const foo = { async method(param: string) { /* empty */ } } // allow: generatorMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const foo = { async method(param: string) {} } // allow: getters +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "async method 'method'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "async method 'method'" + }, + "output": "const foo = { async method(param: string) { /* empty */ } } // allow: getters" + } + ] + } + ], + "options": [ + { + "allow": [ + "getters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const foo = { async method(param: string) {} } // allow: setters +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "async method 'method'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "async method 'method'" + }, + "output": "const foo = { async method(param: string) { /* empty */ } } // allow: setters" + } + ] + } + ], + "options": [ + { + "allow": [ + "setters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const foo = { async method(param: string) {} } // allow: constructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "async method 'method'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "async method 'method'" + }, + "output": "const foo = { async method(param: string) { /* empty */ } } // allow: constructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "constructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const foo = { async method(param: string) {} } // allow: asyncFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "async method 'method'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "async method 'method'" + }, + "output": "const foo = { async method(param: string) { /* empty */ } } // allow: asyncFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const foo = { async method(param: string) {} } // allow: privateConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "async method 'method'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "async method 'method'" + }, + "output": "const foo = { async method(param: string) { /* empty */ } } // allow: privateConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "privateConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const foo = { async method(param: string) {} } // allow: protectedConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "async method 'method'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "async method 'method'" + }, + "output": "const foo = { async method(param: string) { /* empty */ } } // allow: protectedConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "protectedConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const foo = { async method(param: string) {} } // allow: decoratedFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "async method 'method'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "async method 'method'" + }, + "output": "const foo = { async method(param: string) { /* empty */ } } // allow: decoratedFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "decoratedFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const foo = { async method(param: string) {} } // allow: overrideMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "async method 'method'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "async method 'method'" + }, + "output": "const foo = { async method(param: string) { /* empty */ } } // allow: overrideMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "overrideMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +async function a(param: string){} +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "async function 'a'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "async function 'a'" + }, + "output": "async function a(param: string){ /* empty */ }" + } + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +async function a(param: string){} // allow: functions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "async function 'a'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "async function 'a'" + }, + "output": "async function a(param: string){ /* empty */ } // allow: functions" + } + ] + } + ], + "options": [ + { + "allow": [ + "functions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +async function a(param: string){} // allow: arrowFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "async function 'a'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "async function 'a'" + }, + "output": "async function a(param: string){ /* empty */ } // allow: arrowFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "arrowFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +async function a(param: string){} // allow: generatorFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "async function 'a'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "async function 'a'" + }, + "output": "async function a(param: string){ /* empty */ } // allow: generatorFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +async function a(param: string){} // allow: methods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "async function 'a'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "async function 'a'" + }, + "output": "async function a(param: string){ /* empty */ } // allow: methods" + } + ] + } + ], + "options": [ + { + "allow": [ + "methods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +async function a(param: string){} // allow: generatorMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "async function 'a'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "async function 'a'" + }, + "output": "async function a(param: string){ /* empty */ } // allow: generatorMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +async function a(param: string){} // allow: getters +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "async function 'a'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "async function 'a'" + }, + "output": "async function a(param: string){ /* empty */ } // allow: getters" + } + ] + } + ], + "options": [ + { + "allow": [ + "getters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +async function a(param: string){} // allow: setters +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "async function 'a'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "async function 'a'" + }, + "output": "async function a(param: string){ /* empty */ } // allow: setters" + } + ] + } + ], + "options": [ + { + "allow": [ + "setters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +async function a(param: string){} // allow: constructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "async function 'a'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "async function 'a'" + }, + "output": "async function a(param: string){ /* empty */ } // allow: constructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "constructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +async function a(param: string){} // allow: asyncMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "async function 'a'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "async function 'a'" + }, + "output": "async function a(param: string){ /* empty */ } // allow: asyncMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +async function a(param: string){} // allow: privateConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "async function 'a'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "async function 'a'" + }, + "output": "async function a(param: string){ /* empty */ } // allow: privateConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "privateConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +async function a(param: string){} // allow: protectedConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "async function 'a'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "async function 'a'" + }, + "output": "async function a(param: string){ /* empty */ } // allow: protectedConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "protectedConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +async function a(param: string){} // allow: decoratedFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "async function 'a'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "async function 'a'" + }, + "output": "async function a(param: string){ /* empty */ } // allow: decoratedFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "decoratedFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +async function a(param: string){} // allow: overrideMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "async function 'a'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "async function 'a'" + }, + "output": "async function a(param: string){ /* empty */ } // allow: overrideMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "overrideMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const foo = async function(param: string) {} +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "async function" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "async function" + }, + "output": "const foo = async function(param: string) { /* empty */ }" + } + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const foo = async function(param: string) {} // allow: functions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "async function" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "async function" + }, + "output": "const foo = async function(param: string) { /* empty */ } // allow: functions" + } + ] + } + ], + "options": [ + { + "allow": [ + "functions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const foo = async function(param: string) {} // allow: arrowFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "async function" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "async function" + }, + "output": "const foo = async function(param: string) { /* empty */ } // allow: arrowFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "arrowFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const foo = async function(param: string) {} // allow: generatorFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "async function" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "async function" + }, + "output": "const foo = async function(param: string) { /* empty */ } // allow: generatorFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const foo = async function(param: string) {} // allow: methods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "async function" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "async function" + }, + "output": "const foo = async function(param: string) { /* empty */ } // allow: methods" + } + ] + } + ], + "options": [ + { + "allow": [ + "methods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const foo = async function(param: string) {} // allow: generatorMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "async function" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "async function" + }, + "output": "const foo = async function(param: string) { /* empty */ } // allow: generatorMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const foo = async function(param: string) {} // allow: getters +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "async function" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "async function" + }, + "output": "const foo = async function(param: string) { /* empty */ } // allow: getters" + } + ] + } + ], + "options": [ + { + "allow": [ + "getters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const foo = async function(param: string) {} // allow: setters +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "async function" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "async function" + }, + "output": "const foo = async function(param: string) { /* empty */ } // allow: setters" + } + ] + } + ], + "options": [ + { + "allow": [ + "setters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const foo = async function(param: string) {} // allow: constructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "async function" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "async function" + }, + "output": "const foo = async function(param: string) { /* empty */ } // allow: constructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "constructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const foo = async function(param: string) {} // allow: asyncMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "async function" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "async function" + }, + "output": "const foo = async function(param: string) { /* empty */ } // allow: asyncMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const foo = async function(param: string) {} // allow: privateConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "async function" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "async function" + }, + "output": "const foo = async function(param: string) { /* empty */ } // allow: privateConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "privateConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const foo = async function(param: string) {} // allow: protectedConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "async function" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "async function" + }, + "output": "const foo = async function(param: string) { /* empty */ } // allow: protectedConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "protectedConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const foo = async function(param: string) {} // allow: decoratedFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "async function" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "async function" + }, + "output": "const foo = async function(param: string) { /* empty */ } // allow: decoratedFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "decoratedFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const foo = async function(param: string) {} // allow: overrideMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "async function" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "async function" + }, + "output": "const foo = async function(param: string) { /* empty */ } // allow: overrideMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "overrideMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A { async foo(param: string) {} } +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "async method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "async method 'foo'" + }, + "output": "class A { async foo(param: string) { /* empty */ } }" + } + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A { async foo(param: string) {} } // allow: functions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "async method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "async method 'foo'" + }, + "output": "class A { async foo(param: string) { /* empty */ } } // allow: functions" + } + ] + } + ], + "options": [ + { + "allow": [ + "functions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A { async foo(param: string) {} } // allow: arrowFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "async method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "async method 'foo'" + }, + "output": "class A { async foo(param: string) { /* empty */ } } // allow: arrowFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "arrowFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A { async foo(param: string) {} } // allow: generatorFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "async method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "async method 'foo'" + }, + "output": "class A { async foo(param: string) { /* empty */ } } // allow: generatorFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A { async foo(param: string) {} } // allow: methods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "async method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "async method 'foo'" + }, + "output": "class A { async foo(param: string) { /* empty */ } } // allow: methods" + } + ] + } + ], + "options": [ + { + "allow": [ + "methods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A { async foo(param: string) {} } // allow: generatorMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "async method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "async method 'foo'" + }, + "output": "class A { async foo(param: string) { /* empty */ } } // allow: generatorMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A { async foo(param: string) {} } // allow: getters +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "async method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "async method 'foo'" + }, + "output": "class A { async foo(param: string) { /* empty */ } } // allow: getters" + } + ] + } + ], + "options": [ + { + "allow": [ + "getters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A { async foo(param: string) {} } // allow: setters +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "async method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "async method 'foo'" + }, + "output": "class A { async foo(param: string) { /* empty */ } } // allow: setters" + } + ] + } + ], + "options": [ + { + "allow": [ + "setters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A { async foo(param: string) {} } // allow: constructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "async method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "async method 'foo'" + }, + "output": "class A { async foo(param: string) { /* empty */ } } // allow: constructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "constructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A { async foo(param: string) {} } // allow: asyncFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "async method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "async method 'foo'" + }, + "output": "class A { async foo(param: string) { /* empty */ } } // allow: asyncFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A { async foo(param: string) {} } // allow: privateConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "async method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "async method 'foo'" + }, + "output": "class A { async foo(param: string) { /* empty */ } } // allow: privateConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "privateConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A { async foo(param: string) {} } // allow: protectedConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "async method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "async method 'foo'" + }, + "output": "class A { async foo(param: string) { /* empty */ } } // allow: protectedConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "protectedConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A { async foo(param: string) {} } // allow: decoratedFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "async method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "async method 'foo'" + }, + "output": "class A { async foo(param: string) { /* empty */ } } // allow: decoratedFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "decoratedFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A { async foo(param: string) {} } // allow: overrideMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "async method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "async method 'foo'" + }, + "output": "class A { async foo(param: string) { /* empty */ } } // allow: overrideMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "overrideMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A { @decorator() async foo(param: string) {} } +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "async method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "async method 'foo'" + }, + "output": "class A { @decorator() async foo(param: string) { /* empty */ } }" + } + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A { @decorator() async foo(param: string) {} } // allow: functions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "async method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "async method 'foo'" + }, + "output": "class A { @decorator() async foo(param: string) { /* empty */ } } // allow: functions" + } + ] + } + ], + "options": [ + { + "allow": [ + "functions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A { @decorator() async foo(param: string) {} } // allow: arrowFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "async method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "async method 'foo'" + }, + "output": "class A { @decorator() async foo(param: string) { /* empty */ } } // allow: arrowFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "arrowFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A { @decorator() async foo(param: string) {} } // allow: generatorFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "async method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "async method 'foo'" + }, + "output": "class A { @decorator() async foo(param: string) { /* empty */ } } // allow: generatorFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A { @decorator() async foo(param: string) {} } // allow: methods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "async method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "async method 'foo'" + }, + "output": "class A { @decorator() async foo(param: string) { /* empty */ } } // allow: methods" + } + ] + } + ], + "options": [ + { + "allow": [ + "methods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A { @decorator() async foo(param: string) {} } // allow: generatorMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "async method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "async method 'foo'" + }, + "output": "class A { @decorator() async foo(param: string) { /* empty */ } } // allow: generatorMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A { @decorator() async foo(param: string) {} } // allow: getters +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "async method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "async method 'foo'" + }, + "output": "class A { @decorator() async foo(param: string) { /* empty */ } } // allow: getters" + } + ] + } + ], + "options": [ + { + "allow": [ + "getters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A { @decorator() async foo(param: string) {} } // allow: setters +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "async method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "async method 'foo'" + }, + "output": "class A { @decorator() async foo(param: string) { /* empty */ } } // allow: setters" + } + ] + } + ], + "options": [ + { + "allow": [ + "setters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A { @decorator() async foo(param: string) {} } // allow: constructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "async method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "async method 'foo'" + }, + "output": "class A { @decorator() async foo(param: string) { /* empty */ } } // allow: constructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "constructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A { @decorator() async foo(param: string) {} } // allow: asyncFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "async method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "async method 'foo'" + }, + "output": "class A { @decorator() async foo(param: string) { /* empty */ } } // allow: asyncFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A { @decorator() async foo(param: string) {} } // allow: privateConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "async method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "async method 'foo'" + }, + "output": "class A { @decorator() async foo(param: string) { /* empty */ } } // allow: privateConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "privateConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A { @decorator() async foo(param: string) {} } // allow: protectedConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "async method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "async method 'foo'" + }, + "output": "class A { @decorator() async foo(param: string) { /* empty */ } } // allow: protectedConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "protectedConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A { @decorator() async foo(param: string) {} } // allow: overrideMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "async method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "async method 'foo'" + }, + "output": "class A { @decorator() async foo(param: string) { /* empty */ } } // allow: overrideMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "overrideMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A extends B { override async foo(param: string) {} } +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "async method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "async method 'foo'" + }, + "output": "class A extends B { override async foo(param: string) { /* empty */ } }" + } + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A extends B { override async foo(param: string) {} } // allow: functions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "async method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "async method 'foo'" + }, + "output": "class A extends B { override async foo(param: string) { /* empty */ } } // allow: functions" + } + ] + } + ], + "options": [ + { + "allow": [ + "functions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A extends B { override async foo(param: string) {} } // allow: arrowFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "async method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "async method 'foo'" + }, + "output": "class A extends B { override async foo(param: string) { /* empty */ } } // allow: arrowFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "arrowFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A extends B { override async foo(param: string) {} } // allow: generatorFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "async method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "async method 'foo'" + }, + "output": "class A extends B { override async foo(param: string) { /* empty */ } } // allow: generatorFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A extends B { override async foo(param: string) {} } // allow: methods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "async method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "async method 'foo'" + }, + "output": "class A extends B { override async foo(param: string) { /* empty */ } } // allow: methods" + } + ] + } + ], + "options": [ + { + "allow": [ + "methods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A extends B { override async foo(param: string) {} } // allow: generatorMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "async method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "async method 'foo'" + }, + "output": "class A extends B { override async foo(param: string) { /* empty */ } } // allow: generatorMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A extends B { override async foo(param: string) {} } // allow: getters +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "async method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "async method 'foo'" + }, + "output": "class A extends B { override async foo(param: string) { /* empty */ } } // allow: getters" + } + ] + } + ], + "options": [ + { + "allow": [ + "getters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A extends B { override async foo(param: string) {} } // allow: setters +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "async method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "async method 'foo'" + }, + "output": "class A extends B { override async foo(param: string) { /* empty */ } } // allow: setters" + } + ] + } + ], + "options": [ + { + "allow": [ + "setters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A extends B { override async foo(param: string) {} } // allow: constructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "async method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "async method 'foo'" + }, + "output": "class A extends B { override async foo(param: string) { /* empty */ } } // allow: constructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "constructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A extends B { override async foo(param: string) {} } // allow: asyncFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "async method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "async method 'foo'" + }, + "output": "class A extends B { override async foo(param: string) { /* empty */ } } // allow: asyncFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A extends B { override async foo(param: string) {} } // allow: privateConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "async method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "async method 'foo'" + }, + "output": "class A extends B { override async foo(param: string) { /* empty */ } } // allow: privateConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "privateConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A extends B { override async foo(param: string) {} } // allow: protectedConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "async method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "async method 'foo'" + }, + "output": "class A extends B { override async foo(param: string) { /* empty */ } } // allow: protectedConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "protectedConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class A extends B { override async foo(param: string) {} } // allow: decoratedFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "async method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "async method 'foo'" + }, + "output": "class A extends B { override async foo(param: string) { /* empty */ } } // allow: decoratedFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "decoratedFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const foo = async (): Promise => {}; +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "async arrow function" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "async arrow function" + }, + "output": "const foo = async (): Promise => { /* empty */ };" + } + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const foo = async (): Promise => {}; // allow: functions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "async arrow function" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "async arrow function" + }, + "output": "const foo = async (): Promise => { /* empty */ }; // allow: functions" + } + ] + } + ], + "options": [ + { + "allow": [ + "functions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const foo = async (): Promise => {}; // allow: generatorFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "async arrow function" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "async arrow function" + }, + "output": "const foo = async (): Promise => { /* empty */ }; // allow: generatorFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const foo = async (): Promise => {}; // allow: methods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "async arrow function" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "async arrow function" + }, + "output": "const foo = async (): Promise => { /* empty */ }; // allow: methods" + } + ] + } + ], + "options": [ + { + "allow": [ + "methods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const foo = async (): Promise => {}; // allow: generatorMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "async arrow function" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "async arrow function" + }, + "output": "const foo = async (): Promise => { /* empty */ }; // allow: generatorMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const foo = async (): Promise => {}; // allow: getters +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "async arrow function" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "async arrow function" + }, + "output": "const foo = async (): Promise => { /* empty */ }; // allow: getters" + } + ] + } + ], + "options": [ + { + "allow": [ + "getters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const foo = async (): Promise => {}; // allow: setters +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "async arrow function" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "async arrow function" + }, + "output": "const foo = async (): Promise => { /* empty */ }; // allow: setters" + } + ] + } + ], + "options": [ + { + "allow": [ + "setters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const foo = async (): Promise => {}; // allow: constructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "async arrow function" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "async arrow function" + }, + "output": "const foo = async (): Promise => { /* empty */ }; // allow: constructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "constructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const foo = async (): Promise => {}; // allow: asyncFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "async arrow function" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "async arrow function" + }, + "output": "const foo = async (): Promise => { /* empty */ }; // allow: asyncFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const foo = async (): Promise => {}; // allow: asyncMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "async arrow function" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "async arrow function" + }, + "output": "const foo = async (): Promise => { /* empty */ }; // allow: asyncMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const foo = async (): Promise => {}; // allow: privateConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "async arrow function" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "async arrow function" + }, + "output": "const foo = async (): Promise => { /* empty */ }; // allow: privateConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "privateConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const foo = async (): Promise => {}; // allow: protectedConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "async arrow function" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "async arrow function" + }, + "output": "const foo = async (): Promise => { /* empty */ }; // allow: protectedConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "protectedConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const foo = async (): Promise => {}; // allow: decoratedFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "async arrow function" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "async arrow function" + }, + "output": "const foo = async (): Promise => { /* empty */ }; // allow: decoratedFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "decoratedFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const foo = async (): Promise => {}; // allow: overrideMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "async arrow function" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "async arrow function" + }, + "output": "const foo = async (): Promise => { /* empty */ }; // allow: overrideMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "overrideMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B {@decorator() get foo(): string {}} +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "class B {@decorator() get foo(): string { /* empty */ }}" + } + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B {@decorator() get foo(): string {}} // allow: functions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "class B {@decorator() get foo(): string { /* empty */ }} // allow: functions" + } + ] + } + ], + "options": [ + { + "allow": [ + "functions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B {@decorator() get foo(): string {}} // allow: arrowFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "class B {@decorator() get foo(): string { /* empty */ }} // allow: arrowFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "arrowFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B {@decorator() get foo(): string {}} // allow: generatorFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "class B {@decorator() get foo(): string { /* empty */ }} // allow: generatorFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B {@decorator() get foo(): string {}} // allow: methods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "class B {@decorator() get foo(): string { /* empty */ }} // allow: methods" + } + ] + } + ], + "options": [ + { + "allow": [ + "methods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B {@decorator() get foo(): string {}} // allow: generatorMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "class B {@decorator() get foo(): string { /* empty */ }} // allow: generatorMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B {@decorator() get foo(): string {}} // allow: setters +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "class B {@decorator() get foo(): string { /* empty */ }} // allow: setters" + } + ] + } + ], + "options": [ + { + "allow": [ + "setters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B {@decorator() get foo(): string {}} // allow: constructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "class B {@decorator() get foo(): string { /* empty */ }} // allow: constructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "constructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B {@decorator() get foo(): string {}} // allow: asyncFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "class B {@decorator() get foo(): string { /* empty */ }} // allow: asyncFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B {@decorator() get foo(): string {}} // allow: asyncMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "class B {@decorator() get foo(): string { /* empty */ }} // allow: asyncMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B {@decorator() get foo(): string {}} // allow: privateConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "class B {@decorator() get foo(): string { /* empty */ }} // allow: privateConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "privateConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B {@decorator() get foo(): string {}} // allow: protectedConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "class B {@decorator() get foo(): string { /* empty */ }} // allow: protectedConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "protectedConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B {@decorator() get foo(): string {}} // allow: overrideMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "class B {@decorator() get foo(): string { /* empty */ }} // allow: overrideMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "overrideMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B {@decorator() static get foo(): string {}} +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "class B {@decorator() static get foo(): string { /* empty */ }}" + } + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B {@decorator() static get foo(): string {}} // allow: functions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "class B {@decorator() static get foo(): string { /* empty */ }} // allow: functions" + } + ] + } + ], + "options": [ + { + "allow": [ + "functions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B {@decorator() static get foo(): string {}} // allow: arrowFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "class B {@decorator() static get foo(): string { /* empty */ }} // allow: arrowFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "arrowFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B {@decorator() static get foo(): string {}} // allow: generatorFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "class B {@decorator() static get foo(): string { /* empty */ }} // allow: generatorFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B {@decorator() static get foo(): string {}} // allow: methods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "class B {@decorator() static get foo(): string { /* empty */ }} // allow: methods" + } + ] + } + ], + "options": [ + { + "allow": [ + "methods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B {@decorator() static get foo(): string {}} // allow: generatorMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "class B {@decorator() static get foo(): string { /* empty */ }} // allow: generatorMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B {@decorator() static get foo(): string {}} // allow: setters +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "class B {@decorator() static get foo(): string { /* empty */ }} // allow: setters" + } + ] + } + ], + "options": [ + { + "allow": [ + "setters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B {@decorator() static get foo(): string {}} // allow: constructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "class B {@decorator() static get foo(): string { /* empty */ }} // allow: constructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "constructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B {@decorator() static get foo(): string {}} // allow: asyncFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "class B {@decorator() static get foo(): string { /* empty */ }} // allow: asyncFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B {@decorator() static get foo(): string {}} // allow: asyncMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "class B {@decorator() static get foo(): string { /* empty */ }} // allow: asyncMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B {@decorator() static get foo(): string {}} // allow: privateConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "class B {@decorator() static get foo(): string { /* empty */ }} // allow: privateConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "privateConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B {@decorator() static get foo(): string {}} // allow: protectedConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "class B {@decorator() static get foo(): string { /* empty */ }} // allow: protectedConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "protectedConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B {@decorator() static get foo(): string {}} // allow: overrideMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "class B {@decorator() static get foo(): string { /* empty */ }} // allow: overrideMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "overrideMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const B = class {@decorator() get foo(): string {}}; +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "const B = class {@decorator() get foo(): string { /* empty */ }};" + } + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const B = class {@decorator() get foo(): string {}}; // allow: functions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "const B = class {@decorator() get foo(): string { /* empty */ }}; // allow: functions" + } + ] + } + ], + "options": [ + { + "allow": [ + "functions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const B = class {@decorator() get foo(): string {}}; // allow: arrowFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "const B = class {@decorator() get foo(): string { /* empty */ }}; // allow: arrowFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "arrowFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const B = class {@decorator() get foo(): string {}}; // allow: generatorFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "const B = class {@decorator() get foo(): string { /* empty */ }}; // allow: generatorFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const B = class {@decorator() get foo(): string {}}; // allow: methods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "const B = class {@decorator() get foo(): string { /* empty */ }}; // allow: methods" + } + ] + } + ], + "options": [ + { + "allow": [ + "methods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const B = class {@decorator() get foo(): string {}}; // allow: generatorMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "const B = class {@decorator() get foo(): string { /* empty */ }}; // allow: generatorMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const B = class {@decorator() get foo(): string {}}; // allow: setters +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "const B = class {@decorator() get foo(): string { /* empty */ }}; // allow: setters" + } + ] + } + ], + "options": [ + { + "allow": [ + "setters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const B = class {@decorator() get foo(): string {}}; // allow: constructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "const B = class {@decorator() get foo(): string { /* empty */ }}; // allow: constructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "constructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const B = class {@decorator() get foo(): string {}}; // allow: asyncFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "const B = class {@decorator() get foo(): string { /* empty */ }}; // allow: asyncFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const B = class {@decorator() get foo(): string {}}; // allow: asyncMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "const B = class {@decorator() get foo(): string { /* empty */ }}; // allow: asyncMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const B = class {@decorator() get foo(): string {}}; // allow: privateConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "const B = class {@decorator() get foo(): string { /* empty */ }}; // allow: privateConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "privateConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const B = class {@decorator() get foo(): string {}}; // allow: protectedConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "const B = class {@decorator() get foo(): string { /* empty */ }}; // allow: protectedConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "protectedConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const B = class {@decorator() get foo(): string {}}; // allow: overrideMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "const B = class {@decorator() get foo(): string { /* empty */ }}; // allow: overrideMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "overrideMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const B = class {@decorator() static get foo(): string {}}; +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "const B = class {@decorator() static get foo(): string { /* empty */ }};" + } + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const B = class {@decorator() static get foo(): string {}}; // allow: functions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "const B = class {@decorator() static get foo(): string { /* empty */ }}; // allow: functions" + } + ] + } + ], + "options": [ + { + "allow": [ + "functions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const B = class {@decorator() static get foo(): string {}}; // allow: arrowFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "const B = class {@decorator() static get foo(): string { /* empty */ }}; // allow: arrowFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "arrowFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const B = class {@decorator() static get foo(): string {}}; // allow: generatorFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "const B = class {@decorator() static get foo(): string { /* empty */ }}; // allow: generatorFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const B = class {@decorator() static get foo(): string {}}; // allow: methods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "const B = class {@decorator() static get foo(): string { /* empty */ }}; // allow: methods" + } + ] + } + ], + "options": [ + { + "allow": [ + "methods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const B = class {@decorator() static get foo(): string {}}; // allow: generatorMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "const B = class {@decorator() static get foo(): string { /* empty */ }}; // allow: generatorMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const B = class {@decorator() static get foo(): string {}}; // allow: setters +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "const B = class {@decorator() static get foo(): string { /* empty */ }}; // allow: setters" + } + ] + } + ], + "options": [ + { + "allow": [ + "setters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const B = class {@decorator() static get foo(): string {}}; // allow: constructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "const B = class {@decorator() static get foo(): string { /* empty */ }}; // allow: constructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "constructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const B = class {@decorator() static get foo(): string {}}; // allow: asyncFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "const B = class {@decorator() static get foo(): string { /* empty */ }}; // allow: asyncFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const B = class {@decorator() static get foo(): string {}}; // allow: asyncMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "const B = class {@decorator() static get foo(): string { /* empty */ }}; // allow: asyncMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const B = class {@decorator() static get foo(): string {}}; // allow: privateConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "const B = class {@decorator() static get foo(): string { /* empty */ }}; // allow: privateConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "privateConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const B = class {@decorator() static get foo(): string {}}; // allow: protectedConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "const B = class {@decorator() static get foo(): string { /* empty */ }}; // allow: protectedConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "protectedConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const B = class {@decorator() static get foo(): string {}}; // allow: overrideMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "const B = class {@decorator() static get foo(): string { /* empty */ }}; // allow: overrideMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "overrideMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B {@decorator() set foo(value: string) {}} +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "class B {@decorator() set foo(value: string) { /* empty */ }}" + } + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B {@decorator() set foo(value: string) {}} // allow: functions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "class B {@decorator() set foo(value: string) { /* empty */ }} // allow: functions" + } + ] + } + ], + "options": [ + { + "allow": [ + "functions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B {@decorator() set foo(value: string) {}} // allow: arrowFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "class B {@decorator() set foo(value: string) { /* empty */ }} // allow: arrowFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "arrowFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B {@decorator() set foo(value: string) {}} // allow: generatorFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "class B {@decorator() set foo(value: string) { /* empty */ }} // allow: generatorFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B {@decorator() set foo(value: string) {}} // allow: methods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "class B {@decorator() set foo(value: string) { /* empty */ }} // allow: methods" + } + ] + } + ], + "options": [ + { + "allow": [ + "methods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B {@decorator() set foo(value: string) {}} // allow: generatorMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "class B {@decorator() set foo(value: string) { /* empty */ }} // allow: generatorMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B {@decorator() set foo(value: string) {}} // allow: getters +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "class B {@decorator() set foo(value: string) { /* empty */ }} // allow: getters" + } + ] + } + ], + "options": [ + { + "allow": [ + "getters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B {@decorator() set foo(value: string) {}} // allow: constructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "class B {@decorator() set foo(value: string) { /* empty */ }} // allow: constructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "constructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B {@decorator() set foo(value: string) {}} // allow: asyncFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "class B {@decorator() set foo(value: string) { /* empty */ }} // allow: asyncFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B {@decorator() set foo(value: string) {}} // allow: asyncMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "class B {@decorator() set foo(value: string) { /* empty */ }} // allow: asyncMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B {@decorator() set foo(value: string) {}} // allow: privateConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "class B {@decorator() set foo(value: string) { /* empty */ }} // allow: privateConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "privateConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B {@decorator() set foo(value: string) {}} // allow: protectedConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "class B {@decorator() set foo(value: string) { /* empty */ }} // allow: protectedConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "protectedConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B {@decorator() set foo(value: string) {}} // allow: overrideMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "class B {@decorator() set foo(value: string) { /* empty */ }} // allow: overrideMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "overrideMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B {@decorator() static set foo(value: string) {}} +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "class B {@decorator() static set foo(value: string) { /* empty */ }}" + } + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B {@decorator() static set foo(value: string) {}} // allow: functions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "class B {@decorator() static set foo(value: string) { /* empty */ }} // allow: functions" + } + ] + } + ], + "options": [ + { + "allow": [ + "functions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B {@decorator() static set foo(value: string) {}} // allow: arrowFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "class B {@decorator() static set foo(value: string) { /* empty */ }} // allow: arrowFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "arrowFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B {@decorator() static set foo(value: string) {}} // allow: generatorFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "class B {@decorator() static set foo(value: string) { /* empty */ }} // allow: generatorFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B {@decorator() static set foo(value: string) {}} // allow: methods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "class B {@decorator() static set foo(value: string) { /* empty */ }} // allow: methods" + } + ] + } + ], + "options": [ + { + "allow": [ + "methods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B {@decorator() static set foo(value: string) {}} // allow: generatorMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "class B {@decorator() static set foo(value: string) { /* empty */ }} // allow: generatorMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B {@decorator() static set foo(value: string) {}} // allow: getters +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "class B {@decorator() static set foo(value: string) { /* empty */ }} // allow: getters" + } + ] + } + ], + "options": [ + { + "allow": [ + "getters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B {@decorator() static set foo(value: string) {}} // allow: constructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "class B {@decorator() static set foo(value: string) { /* empty */ }} // allow: constructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "constructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B {@decorator() static set foo(value: string) {}} // allow: asyncFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "class B {@decorator() static set foo(value: string) { /* empty */ }} // allow: asyncFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B {@decorator() static set foo(value: string) {}} // allow: asyncMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "class B {@decorator() static set foo(value: string) { /* empty */ }} // allow: asyncMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B {@decorator() static set foo(value: string) {}} // allow: privateConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "class B {@decorator() static set foo(value: string) { /* empty */ }} // allow: privateConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "privateConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B {@decorator() static set foo(value: string) {}} // allow: protectedConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "class B {@decorator() static set foo(value: string) { /* empty */ }} // allow: protectedConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "protectedConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B {@decorator() static set foo(value: string) {}} // allow: overrideMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "class B {@decorator() static set foo(value: string) { /* empty */ }} // allow: overrideMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "overrideMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const B = class {@decorator() set foo(value: string) {}}; +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "const B = class {@decorator() set foo(value: string) { /* empty */ }};" + } + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const B = class {@decorator() set foo(value: string) {}}; // allow: functions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "const B = class {@decorator() set foo(value: string) { /* empty */ }}; // allow: functions" + } + ] + } + ], + "options": [ + { + "allow": [ + "functions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const B = class {@decorator() set foo(value: string) {}}; // allow: arrowFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "const B = class {@decorator() set foo(value: string) { /* empty */ }}; // allow: arrowFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "arrowFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const B = class {@decorator() set foo(value: string) {}}; // allow: generatorFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "const B = class {@decorator() set foo(value: string) { /* empty */ }}; // allow: generatorFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const B = class {@decorator() set foo(value: string) {}}; // allow: methods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "const B = class {@decorator() set foo(value: string) { /* empty */ }}; // allow: methods" + } + ] + } + ], + "options": [ + { + "allow": [ + "methods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const B = class {@decorator() set foo(value: string) {}}; // allow: generatorMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "const B = class {@decorator() set foo(value: string) { /* empty */ }}; // allow: generatorMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const B = class {@decorator() set foo(value: string) {}}; // allow: getters +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "const B = class {@decorator() set foo(value: string) { /* empty */ }}; // allow: getters" + } + ] + } + ], + "options": [ + { + "allow": [ + "getters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const B = class {@decorator() set foo(value: string) {}}; // allow: constructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "const B = class {@decorator() set foo(value: string) { /* empty */ }}; // allow: constructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "constructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const B = class {@decorator() set foo(value: string) {}}; // allow: asyncFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "const B = class {@decorator() set foo(value: string) { /* empty */ }}; // allow: asyncFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const B = class {@decorator() set foo(value: string) {}}; // allow: asyncMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "const B = class {@decorator() set foo(value: string) { /* empty */ }}; // allow: asyncMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const B = class {@decorator() set foo(value: string) {}}; // allow: privateConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "const B = class {@decorator() set foo(value: string) { /* empty */ }}; // allow: privateConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "privateConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const B = class {@decorator() set foo(value: string) {}}; // allow: protectedConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "const B = class {@decorator() set foo(value: string) { /* empty */ }}; // allow: protectedConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "protectedConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const B = class {@decorator() set foo(value: string) {}}; // allow: overrideMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "const B = class {@decorator() set foo(value: string) { /* empty */ }}; // allow: overrideMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "overrideMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const B = class {@decorator() static set foo(value: string) {}}; +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "const B = class {@decorator() static set foo(value: string) { /* empty */ }};" + } + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const B = class {@decorator() static set foo(value: string) {}}; // allow: functions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "const B = class {@decorator() static set foo(value: string) { /* empty */ }}; // allow: functions" + } + ] + } + ], + "options": [ + { + "allow": [ + "functions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const B = class {@decorator() static set foo(value: string) {}}; // allow: arrowFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "const B = class {@decorator() static set foo(value: string) { /* empty */ }}; // allow: arrowFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "arrowFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const B = class {@decorator() static set foo(value: string) {}}; // allow: generatorFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "const B = class {@decorator() static set foo(value: string) { /* empty */ }}; // allow: generatorFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const B = class {@decorator() static set foo(value: string) {}}; // allow: methods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "const B = class {@decorator() static set foo(value: string) { /* empty */ }}; // allow: methods" + } + ] + } + ], + "options": [ + { + "allow": [ + "methods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const B = class {@decorator() static set foo(value: string) {}}; // allow: generatorMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "const B = class {@decorator() static set foo(value: string) { /* empty */ }}; // allow: generatorMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const B = class {@decorator() static set foo(value: string) {}}; // allow: getters +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "const B = class {@decorator() static set foo(value: string) { /* empty */ }}; // allow: getters" + } + ] + } + ], + "options": [ + { + "allow": [ + "getters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const B = class {@decorator() static set foo(value: string) {}}; // allow: constructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "const B = class {@decorator() static set foo(value: string) { /* empty */ }}; // allow: constructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "constructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const B = class {@decorator() static set foo(value: string) {}}; // allow: asyncFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "const B = class {@decorator() static set foo(value: string) { /* empty */ }}; // allow: asyncFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const B = class {@decorator() static set foo(value: string) {}}; // allow: asyncMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "const B = class {@decorator() static set foo(value: string) { /* empty */ }}; // allow: asyncMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const B = class {@decorator() static set foo(value: string) {}}; // allow: privateConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "const B = class {@decorator() static set foo(value: string) { /* empty */ }}; // allow: privateConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "privateConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const B = class {@decorator() static set foo(value: string) {}}; // allow: protectedConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "const B = class {@decorator() static set foo(value: string) { /* empty */ }}; // allow: protectedConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "protectedConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const B = class {@decorator() static set foo(value: string) {}}; // allow: overrideMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "const B = class {@decorator() static set foo(value: string) { /* empty */ }}; // allow: overrideMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "overrideMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B { @decorator() async foo(param: string) {} } +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "async method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "async method 'foo'" + }, + "output": "class B { @decorator() async foo(param: string) { /* empty */ } }" + } + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B { @decorator() async foo(param: string) {} } // allow: functions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "async method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "async method 'foo'" + }, + "output": "class B { @decorator() async foo(param: string) { /* empty */ } } // allow: functions" + } + ] + } + ], + "options": [ + { + "allow": [ + "functions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B { @decorator() async foo(param: string) {} } // allow: arrowFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "async method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "async method 'foo'" + }, + "output": "class B { @decorator() async foo(param: string) { /* empty */ } } // allow: arrowFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "arrowFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B { @decorator() async foo(param: string) {} } // allow: generatorFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "async method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "async method 'foo'" + }, + "output": "class B { @decorator() async foo(param: string) { /* empty */ } } // allow: generatorFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B { @decorator() async foo(param: string) {} } // allow: methods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "async method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "async method 'foo'" + }, + "output": "class B { @decorator() async foo(param: string) { /* empty */ } } // allow: methods" + } + ] + } + ], + "options": [ + { + "allow": [ + "methods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B { @decorator() async foo(param: string) {} } // allow: generatorMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "async method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "async method 'foo'" + }, + "output": "class B { @decorator() async foo(param: string) { /* empty */ } } // allow: generatorMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B { @decorator() async foo(param: string) {} } // allow: getters +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "async method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "async method 'foo'" + }, + "output": "class B { @decorator() async foo(param: string) { /* empty */ } } // allow: getters" + } + ] + } + ], + "options": [ + { + "allow": [ + "getters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B { @decorator() async foo(param: string) {} } // allow: setters +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "async method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "async method 'foo'" + }, + "output": "class B { @decorator() async foo(param: string) { /* empty */ } } // allow: setters" + } + ] + } + ], + "options": [ + { + "allow": [ + "setters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B { @decorator() async foo(param: string) {} } // allow: constructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "async method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "async method 'foo'" + }, + "output": "class B { @decorator() async foo(param: string) { /* empty */ } } // allow: constructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "constructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B { @decorator() async foo(param: string) {} } // allow: asyncFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "async method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "async method 'foo'" + }, + "output": "class B { @decorator() async foo(param: string) { /* empty */ } } // allow: asyncFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B { @decorator() async foo(param: string) {} } // allow: privateConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "async method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "async method 'foo'" + }, + "output": "class B { @decorator() async foo(param: string) { /* empty */ } } // allow: privateConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "privateConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B { @decorator() async foo(param: string) {} } // allow: protectedConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "async method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "async method 'foo'" + }, + "output": "class B { @decorator() async foo(param: string) { /* empty */ } } // allow: protectedConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "protectedConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B { @decorator() async foo(param: string) {} } // allow: overrideMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "async method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "async method 'foo'" + }, + "output": "class B { @decorator() async foo(param: string) { /* empty */ } } // allow: overrideMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "overrideMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B extends C {override get foo(): string {}} +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "class B extends C {override get foo(): string { /* empty */ }}" + } + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B extends C {override get foo(): string {}} // allow: functions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "class B extends C {override get foo(): string { /* empty */ }} // allow: functions" + } + ] + } + ], + "options": [ + { + "allow": [ + "functions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B extends C {override get foo(): string {}} // allow: arrowFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "class B extends C {override get foo(): string { /* empty */ }} // allow: arrowFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "arrowFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B extends C {override get foo(): string {}} // allow: generatorFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "class B extends C {override get foo(): string { /* empty */ }} // allow: generatorFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B extends C {override get foo(): string {}} // allow: methods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "class B extends C {override get foo(): string { /* empty */ }} // allow: methods" + } + ] + } + ], + "options": [ + { + "allow": [ + "methods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B extends C {override get foo(): string {}} // allow: generatorMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "class B extends C {override get foo(): string { /* empty */ }} // allow: generatorMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B extends C {override get foo(): string {}} // allow: setters +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "class B extends C {override get foo(): string { /* empty */ }} // allow: setters" + } + ] + } + ], + "options": [ + { + "allow": [ + "setters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B extends C {override get foo(): string {}} // allow: constructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "class B extends C {override get foo(): string { /* empty */ }} // allow: constructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "constructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B extends C {override get foo(): string {}} // allow: asyncFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "class B extends C {override get foo(): string { /* empty */ }} // allow: asyncFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B extends C {override get foo(): string {}} // allow: asyncMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "class B extends C {override get foo(): string { /* empty */ }} // allow: asyncMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B extends C {override get foo(): string {}} // allow: privateConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "class B extends C {override get foo(): string { /* empty */ }} // allow: privateConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "privateConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B extends C {override get foo(): string {}} // allow: protectedConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "class B extends C {override get foo(): string { /* empty */ }} // allow: protectedConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "protectedConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B extends C {override get foo(): string {}} // allow: decoratedFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "class B extends C {override get foo(): string { /* empty */ }} // allow: decoratedFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "decoratedFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B extends C {static override get foo(): string {}} +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "class B extends C {static override get foo(): string { /* empty */ }}" + } + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B extends C {static override get foo(): string {}} // allow: functions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "class B extends C {static override get foo(): string { /* empty */ }} // allow: functions" + } + ] + } + ], + "options": [ + { + "allow": [ + "functions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B extends C {static override get foo(): string {}} // allow: arrowFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "class B extends C {static override get foo(): string { /* empty */ }} // allow: arrowFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "arrowFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B extends C {static override get foo(): string {}} // allow: generatorFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "class B extends C {static override get foo(): string { /* empty */ }} // allow: generatorFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B extends C {static override get foo(): string {}} // allow: methods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "class B extends C {static override get foo(): string { /* empty */ }} // allow: methods" + } + ] + } + ], + "options": [ + { + "allow": [ + "methods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B extends C {static override get foo(): string {}} // allow: generatorMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "class B extends C {static override get foo(): string { /* empty */ }} // allow: generatorMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B extends C {static override get foo(): string {}} // allow: setters +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "class B extends C {static override get foo(): string { /* empty */ }} // allow: setters" + } + ] + } + ], + "options": [ + { + "allow": [ + "setters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B extends C {static override get foo(): string {}} // allow: constructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "class B extends C {static override get foo(): string { /* empty */ }} // allow: constructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "constructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B extends C {static override get foo(): string {}} // allow: asyncFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "class B extends C {static override get foo(): string { /* empty */ }} // allow: asyncFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B extends C {static override get foo(): string {}} // allow: asyncMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "class B extends C {static override get foo(): string { /* empty */ }} // allow: asyncMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B extends C {static override get foo(): string {}} // allow: privateConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "class B extends C {static override get foo(): string { /* empty */ }} // allow: privateConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "privateConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B extends C {static override get foo(): string {}} // allow: protectedConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "class B extends C {static override get foo(): string { /* empty */ }} // allow: protectedConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "protectedConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B extends C {static override get foo(): string {}} // allow: decoratedFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "class B extends C {static override get foo(): string { /* empty */ }} // allow: decoratedFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "decoratedFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const B = class extends C {override get foo(): string {}}; +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "const B = class extends C {override get foo(): string { /* empty */ }};" + } + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const B = class extends C {override get foo(): string {}}; // allow: functions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "const B = class extends C {override get foo(): string { /* empty */ }}; // allow: functions" + } + ] + } + ], + "options": [ + { + "allow": [ + "functions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const B = class extends C {override get foo(): string {}}; // allow: arrowFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "const B = class extends C {override get foo(): string { /* empty */ }}; // allow: arrowFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "arrowFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const B = class extends C {override get foo(): string {}}; // allow: generatorFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "const B = class extends C {override get foo(): string { /* empty */ }}; // allow: generatorFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const B = class extends C {override get foo(): string {}}; // allow: methods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "const B = class extends C {override get foo(): string { /* empty */ }}; // allow: methods" + } + ] + } + ], + "options": [ + { + "allow": [ + "methods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const B = class extends C {override get foo(): string {}}; // allow: generatorMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "const B = class extends C {override get foo(): string { /* empty */ }}; // allow: generatorMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const B = class extends C {override get foo(): string {}}; // allow: setters +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "const B = class extends C {override get foo(): string { /* empty */ }}; // allow: setters" + } + ] + } + ], + "options": [ + { + "allow": [ + "setters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const B = class extends C {override get foo(): string {}}; // allow: constructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "const B = class extends C {override get foo(): string { /* empty */ }}; // allow: constructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "constructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const B = class extends C {override get foo(): string {}}; // allow: asyncFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "const B = class extends C {override get foo(): string { /* empty */ }}; // allow: asyncFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const B = class extends C {override get foo(): string {}}; // allow: asyncMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "const B = class extends C {override get foo(): string { /* empty */ }}; // allow: asyncMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const B = class extends C {override get foo(): string {}}; // allow: privateConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "const B = class extends C {override get foo(): string { /* empty */ }}; // allow: privateConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "privateConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const B = class extends C {override get foo(): string {}}; // allow: protectedConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "const B = class extends C {override get foo(): string { /* empty */ }}; // allow: protectedConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "protectedConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const B = class extends C {override get foo(): string {}}; // allow: decoratedFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "getter 'foo'" + }, + "output": "const B = class extends C {override get foo(): string { /* empty */ }}; // allow: decoratedFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "decoratedFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const B = class extends C {static override get foo(): string {}}; +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "const B = class extends C {static override get foo(): string { /* empty */ }};" + } + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const B = class extends C {static override get foo(): string {}}; // allow: functions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "const B = class extends C {static override get foo(): string { /* empty */ }}; // allow: functions" + } + ] + } + ], + "options": [ + { + "allow": [ + "functions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const B = class extends C {static override get foo(): string {}}; // allow: arrowFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "const B = class extends C {static override get foo(): string { /* empty */ }}; // allow: arrowFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "arrowFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const B = class extends C {static override get foo(): string {}}; // allow: generatorFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "const B = class extends C {static override get foo(): string { /* empty */ }}; // allow: generatorFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const B = class extends C {static override get foo(): string {}}; // allow: methods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "const B = class extends C {static override get foo(): string { /* empty */ }}; // allow: methods" + } + ] + } + ], + "options": [ + { + "allow": [ + "methods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const B = class extends C {static override get foo(): string {}}; // allow: generatorMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "const B = class extends C {static override get foo(): string { /* empty */ }}; // allow: generatorMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const B = class extends C {static override get foo(): string {}}; // allow: setters +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "const B = class extends C {static override get foo(): string { /* empty */ }}; // allow: setters" + } + ] + } + ], + "options": [ + { + "allow": [ + "setters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const B = class extends C {static override get foo(): string {}}; // allow: constructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "const B = class extends C {static override get foo(): string { /* empty */ }}; // allow: constructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "constructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const B = class extends C {static override get foo(): string {}}; // allow: asyncFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "const B = class extends C {static override get foo(): string { /* empty */ }}; // allow: asyncFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const B = class extends C {static override get foo(): string {}}; // allow: asyncMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "const B = class extends C {static override get foo(): string { /* empty */ }}; // allow: asyncMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const B = class extends C {static override get foo(): string {}}; // allow: privateConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "const B = class extends C {static override get foo(): string { /* empty */ }}; // allow: privateConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "privateConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const B = class extends C {static override get foo(): string {}}; // allow: protectedConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "const B = class extends C {static override get foo(): string { /* empty */ }}; // allow: protectedConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "protectedConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const B = class extends C {static override get foo(): string {}}; // allow: decoratedFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static getter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static getter 'foo'" + }, + "output": "const B = class extends C {static override get foo(): string { /* empty */ }}; // allow: decoratedFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "decoratedFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B extends C {override set foo(value: string) {}} +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "class B extends C {override set foo(value: string) { /* empty */ }}" + } + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B extends C {override set foo(value: string) {}} // allow: functions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "class B extends C {override set foo(value: string) { /* empty */ }} // allow: functions" + } + ] + } + ], + "options": [ + { + "allow": [ + "functions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B extends C {override set foo(value: string) {}} // allow: arrowFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "class B extends C {override set foo(value: string) { /* empty */ }} // allow: arrowFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "arrowFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B extends C {override set foo(value: string) {}} // allow: generatorFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "class B extends C {override set foo(value: string) { /* empty */ }} // allow: generatorFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B extends C {override set foo(value: string) {}} // allow: methods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "class B extends C {override set foo(value: string) { /* empty */ }} // allow: methods" + } + ] + } + ], + "options": [ + { + "allow": [ + "methods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B extends C {override set foo(value: string) {}} // allow: generatorMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "class B extends C {override set foo(value: string) { /* empty */ }} // allow: generatorMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B extends C {override set foo(value: string) {}} // allow: getters +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "class B extends C {override set foo(value: string) { /* empty */ }} // allow: getters" + } + ] + } + ], + "options": [ + { + "allow": [ + "getters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B extends C {override set foo(value: string) {}} // allow: constructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "class B extends C {override set foo(value: string) { /* empty */ }} // allow: constructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "constructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B extends C {override set foo(value: string) {}} // allow: asyncFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "class B extends C {override set foo(value: string) { /* empty */ }} // allow: asyncFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B extends C {override set foo(value: string) {}} // allow: asyncMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "class B extends C {override set foo(value: string) { /* empty */ }} // allow: asyncMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B extends C {override set foo(value: string) {}} // allow: privateConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "class B extends C {override set foo(value: string) { /* empty */ }} // allow: privateConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "privateConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B extends C {override set foo(value: string) {}} // allow: protectedConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "class B extends C {override set foo(value: string) { /* empty */ }} // allow: protectedConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "protectedConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B extends C {override set foo(value: string) {}} // allow: decoratedFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "class B extends C {override set foo(value: string) { /* empty */ }} // allow: decoratedFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "decoratedFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B extends C {static override set foo(value: string) {}} +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "class B extends C {static override set foo(value: string) { /* empty */ }}" + } + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B extends C {static override set foo(value: string) {}} // allow: functions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "class B extends C {static override set foo(value: string) { /* empty */ }} // allow: functions" + } + ] + } + ], + "options": [ + { + "allow": [ + "functions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B extends C {static override set foo(value: string) {}} // allow: arrowFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "class B extends C {static override set foo(value: string) { /* empty */ }} // allow: arrowFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "arrowFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B extends C {static override set foo(value: string) {}} // allow: generatorFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "class B extends C {static override set foo(value: string) { /* empty */ }} // allow: generatorFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B extends C {static override set foo(value: string) {}} // allow: methods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "class B extends C {static override set foo(value: string) { /* empty */ }} // allow: methods" + } + ] + } + ], + "options": [ + { + "allow": [ + "methods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B extends C {static override set foo(value: string) {}} // allow: generatorMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "class B extends C {static override set foo(value: string) { /* empty */ }} // allow: generatorMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B extends C {static override set foo(value: string) {}} // allow: getters +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "class B extends C {static override set foo(value: string) { /* empty */ }} // allow: getters" + } + ] + } + ], + "options": [ + { + "allow": [ + "getters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B extends C {static override set foo(value: string) {}} // allow: constructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "class B extends C {static override set foo(value: string) { /* empty */ }} // allow: constructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "constructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B extends C {static override set foo(value: string) {}} // allow: asyncFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "class B extends C {static override set foo(value: string) { /* empty */ }} // allow: asyncFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B extends C {static override set foo(value: string) {}} // allow: asyncMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "class B extends C {static override set foo(value: string) { /* empty */ }} // allow: asyncMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B extends C {static override set foo(value: string) {}} // allow: privateConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "class B extends C {static override set foo(value: string) { /* empty */ }} // allow: privateConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "privateConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B extends C {static override set foo(value: string) {}} // allow: protectedConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "class B extends C {static override set foo(value: string) { /* empty */ }} // allow: protectedConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "protectedConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B extends C {static override set foo(value: string) {}} // allow: decoratedFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "class B extends C {static override set foo(value: string) { /* empty */ }} // allow: decoratedFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "decoratedFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const B = class extends C {override set foo(value: string) {}}; +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "const B = class extends C {override set foo(value: string) { /* empty */ }};" + } + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const B = class extends C {override set foo(value: string) {}}; // allow: functions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "const B = class extends C {override set foo(value: string) { /* empty */ }}; // allow: functions" + } + ] + } + ], + "options": [ + { + "allow": [ + "functions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const B = class extends C {override set foo(value: string) {}}; // allow: arrowFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "const B = class extends C {override set foo(value: string) { /* empty */ }}; // allow: arrowFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "arrowFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const B = class extends C {override set foo(value: string) {}}; // allow: generatorFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "const B = class extends C {override set foo(value: string) { /* empty */ }}; // allow: generatorFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const B = class extends C {override set foo(value: string) {}}; // allow: methods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "const B = class extends C {override set foo(value: string) { /* empty */ }}; // allow: methods" + } + ] + } + ], + "options": [ + { + "allow": [ + "methods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const B = class extends C {override set foo(value: string) {}}; // allow: generatorMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "const B = class extends C {override set foo(value: string) { /* empty */ }}; // allow: generatorMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const B = class extends C {override set foo(value: string) {}}; // allow: getters +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "const B = class extends C {override set foo(value: string) { /* empty */ }}; // allow: getters" + } + ] + } + ], + "options": [ + { + "allow": [ + "getters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const B = class extends C {override set foo(value: string) {}}; // allow: constructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "const B = class extends C {override set foo(value: string) { /* empty */ }}; // allow: constructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "constructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const B = class extends C {override set foo(value: string) {}}; // allow: asyncFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "const B = class extends C {override set foo(value: string) { /* empty */ }}; // allow: asyncFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const B = class extends C {override set foo(value: string) {}}; // allow: asyncMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "const B = class extends C {override set foo(value: string) { /* empty */ }}; // allow: asyncMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const B = class extends C {override set foo(value: string) {}}; // allow: privateConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "const B = class extends C {override set foo(value: string) { /* empty */ }}; // allow: privateConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "privateConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const B = class extends C {override set foo(value: string) {}}; // allow: protectedConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "const B = class extends C {override set foo(value: string) { /* empty */ }}; // allow: protectedConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "protectedConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const B = class extends C {override set foo(value: string) {}}; // allow: decoratedFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "setter 'foo'" + }, + "output": "const B = class extends C {override set foo(value: string) { /* empty */ }}; // allow: decoratedFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "decoratedFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const B = class extends C {static override set foo(value: string) {}}; +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "const B = class extends C {static override set foo(value: string) { /* empty */ }};" + } + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const B = class extends C {static override set foo(value: string) {}}; // allow: functions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "const B = class extends C {static override set foo(value: string) { /* empty */ }}; // allow: functions" + } + ] + } + ], + "options": [ + { + "allow": [ + "functions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const B = class extends C {static override set foo(value: string) {}}; // allow: arrowFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "const B = class extends C {static override set foo(value: string) { /* empty */ }}; // allow: arrowFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "arrowFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const B = class extends C {static override set foo(value: string) {}}; // allow: generatorFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "const B = class extends C {static override set foo(value: string) { /* empty */ }}; // allow: generatorFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const B = class extends C {static override set foo(value: string) {}}; // allow: methods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "const B = class extends C {static override set foo(value: string) { /* empty */ }}; // allow: methods" + } + ] + } + ], + "options": [ + { + "allow": [ + "methods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const B = class extends C {static override set foo(value: string) {}}; // allow: generatorMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "const B = class extends C {static override set foo(value: string) { /* empty */ }}; // allow: generatorMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const B = class extends C {static override set foo(value: string) {}}; // allow: getters +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "const B = class extends C {static override set foo(value: string) { /* empty */ }}; // allow: getters" + } + ] + } + ], + "options": [ + { + "allow": [ + "getters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const B = class extends C {static override set foo(value: string) {}}; // allow: constructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "const B = class extends C {static override set foo(value: string) { /* empty */ }}; // allow: constructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "constructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const B = class extends C {static override set foo(value: string) {}}; // allow: asyncFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "const B = class extends C {static override set foo(value: string) { /* empty */ }}; // allow: asyncFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const B = class extends C {static override set foo(value: string) {}}; // allow: asyncMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "const B = class extends C {static override set foo(value: string) { /* empty */ }}; // allow: asyncMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const B = class extends C {static override set foo(value: string) {}}; // allow: privateConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "const B = class extends C {static override set foo(value: string) { /* empty */ }}; // allow: privateConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "privateConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const B = class extends C {static override set foo(value: string) {}}; // allow: protectedConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "const B = class extends C {static override set foo(value: string) { /* empty */ }}; // allow: protectedConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "protectedConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +const B = class extends C {static override set foo(value: string) {}}; // allow: decoratedFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "static setter 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "static setter 'foo'" + }, + "output": "const B = class extends C {static override set foo(value: string) { /* empty */ }}; // allow: decoratedFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "decoratedFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B extends C { override async foo(param: string) {} } +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "async method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "async method 'foo'" + }, + "output": "class B extends C { override async foo(param: string) { /* empty */ } }" + } + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B extends C { override async foo(param: string) {} } // allow: functions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "async method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "async method 'foo'" + }, + "output": "class B extends C { override async foo(param: string) { /* empty */ } } // allow: functions" + } + ] + } + ], + "options": [ + { + "allow": [ + "functions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B extends C { override async foo(param: string) {} } // allow: arrowFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "async method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "async method 'foo'" + }, + "output": "class B extends C { override async foo(param: string) { /* empty */ } } // allow: arrowFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "arrowFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B extends C { override async foo(param: string) {} } // allow: generatorFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "async method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "async method 'foo'" + }, + "output": "class B extends C { override async foo(param: string) { /* empty */ } } // allow: generatorFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B extends C { override async foo(param: string) {} } // allow: methods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "async method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "async method 'foo'" + }, + "output": "class B extends C { override async foo(param: string) { /* empty */ } } // allow: methods" + } + ] + } + ], + "options": [ + { + "allow": [ + "methods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B extends C { override async foo(param: string) {} } // allow: generatorMethods +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "async method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "async method 'foo'" + }, + "output": "class B extends C { override async foo(param: string) { /* empty */ } } // allow: generatorMethods" + } + ] + } + ], + "options": [ + { + "allow": [ + "generatorMethods" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B extends C { override async foo(param: string) {} } // allow: getters +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "async method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "async method 'foo'" + }, + "output": "class B extends C { override async foo(param: string) { /* empty */ } } // allow: getters" + } + ] + } + ], + "options": [ + { + "allow": [ + "getters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B extends C { override async foo(param: string) {} } // allow: setters +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "async method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "async method 'foo'" + }, + "output": "class B extends C { override async foo(param: string) { /* empty */ } } // allow: setters" + } + ] + } + ], + "options": [ + { + "allow": [ + "setters" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B extends C { override async foo(param: string) {} } // allow: constructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "async method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "async method 'foo'" + }, + "output": "class B extends C { override async foo(param: string) { /* empty */ } } // allow: constructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "constructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B extends C { override async foo(param: string) {} } // allow: asyncFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "async method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "async method 'foo'" + }, + "output": "class B extends C { override async foo(param: string) { /* empty */ } } // allow: asyncFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "asyncFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B extends C { override async foo(param: string) {} } // allow: privateConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "async method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "async method 'foo'" + }, + "output": "class B extends C { override async foo(param: string) { /* empty */ } } // allow: privateConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "privateConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B extends C { override async foo(param: string) {} } // allow: protectedConstructors +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "async method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "async method 'foo'" + }, + "output": "class B extends C { override async foo(param: string) { /* empty */ } } // allow: protectedConstructors" + } + ] + } + ], + "options": [ + { + "allow": [ + "protectedConstructors" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-empty-function > invalid + +```js +class B extends C { override async foo(param: string) {} } // allow: decoratedFunctions +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "data": { + "name": "async method 'foo'" + }, + "suggestions": [ + { + "messageId": "suggestComment", + "data": { + "name": "async method 'foo'" + }, + "output": "class B extends C { override async foo(param: string) { /* empty */ } } // allow: decoratedFunctions" + } + ] + } + ], + "options": [ + { + "allow": [ + "decoratedFunctions" + ] + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +### `no-eval` + +Pass: 76 / 101 (75.2%) +Fail: 25 / 101 (24.8%) + +#### no-eval > valid + +```js +'use strict'; this.eval('foo'); +``` + +```json +{ + "languageOptions": { + "parserOptions": { + "ecmaFeatures": { + "globalReturn": true + } + } + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-eval', + message: '`eval` can be harmful.', + messageId: 'unexpected', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 19, + endLine: 1, + endColumn: 23, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-eval > valid + +```js +function foo() { this.eval('foo'); } +``` + +```json +{ + "languageOptions": { + "parserOptions": { + "ecmaFeatures": { + "impliedStrict": true + } + } + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-eval', + message: '`eval` can be harmful.', + messageId: 'unexpected', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 22, + endLine: 1, + endColumn: 26, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-eval > invalid + +```js +(0, eval)('foo') +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "column": 5, + "endColumn": 9 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-eval > invalid + +```js +(0, window.eval)('foo') +``` + +```json +{ + "languageOptions": { + "globals": { + "window": "readonly" + } + }, + "errors": [ + { + "messageId": "unexpected", + "column": 12, + "endColumn": 16 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-eval > invalid + +```js +(0, window['eval'])('foo') +``` + +```json +{ + "languageOptions": { + "globals": { + "window": "readonly" + } + }, + "errors": [ + { + "messageId": "unexpected", + "column": 12, + "endColumn": 18 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-eval > invalid + +```js +var EVAL = eval; EVAL('foo') +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "column": 12, + "endColumn": 16 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-eval > invalid + +```js +function foo() { ('use strict'); this.eval; } +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "column": 39, + "endColumn": 43 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-eval > invalid + +```js +(function(exe){ exe('foo') })(eval); +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected", + "column": 31, + "endColumn": 35 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-eval > invalid + +```js +window.eval('foo') +``` + +```json +{ + "languageOptions": { + "globals": { + "window": "readonly" + } + }, + "errors": [ + { + "messageId": "unexpected", + "column": 8, + "endColumn": 12 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-eval > invalid + +```js +window.window.eval('foo') +``` + +```json +{ + "languageOptions": { + "globals": { + "window": "readonly" + } + }, + "errors": [ + { + "messageId": "unexpected", + "column": 15, + "endColumn": 19 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-eval > invalid + +```js +window.window['eval']('foo') +``` + +```json +{ + "languageOptions": { + "globals": { + "window": "readonly" + } + }, + "errors": [ + { + "messageId": "unexpected", + "column": 15, + "endColumn": 21 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-eval > invalid + +```js +global.eval('foo') +``` + +```json +{ + "languageOptions": { + "sourceType": "commonjs" + }, + "errors": [ + { + "messageId": "unexpected", + "column": 8, + "endColumn": 12 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-eval > invalid + +```js +global.global.eval('foo') +``` + +```json +{ + "languageOptions": { + "sourceType": "commonjs" + }, + "errors": [ + { + "messageId": "unexpected", + "column": 15, + "endColumn": 19 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-eval > invalid + +```js +global.global[`eval`]('foo') +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "commonjs" + }, + "errors": [ + { + "messageId": "unexpected", + "column": 15, + "endColumn": 21 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-eval > invalid + +```js +var EVAL = globalThis.eval; EVAL('foo') +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2020 + }, + "errors": [ + { + "messageId": "unexpected", + "column": 23, + "endColumn": 27 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-eval > invalid + +```js +globalThis.eval('foo') +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2020 + }, + "errors": [ + { + "messageId": "unexpected", + "column": 12, + "endColumn": 16 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-eval > invalid + +```js +globalThis.globalThis.eval('foo') +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2020 + }, + "errors": [ + { + "messageId": "unexpected", + "column": 23, + "endColumn": 27 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-eval > invalid + +```js +globalThis.globalThis['eval']('foo') +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2020 + }, + "errors": [ + { + "messageId": "unexpected", + "column": 23, + "endColumn": 29 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-eval > invalid + +```js +(0, globalThis.eval)('foo') +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2020 + }, + "errors": [ + { + "messageId": "unexpected", + "column": 16, + "endColumn": 20 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-eval > invalid + +```js +(0, globalThis['eval'])('foo') +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2020 + }, + "errors": [ + { + "messageId": "unexpected", + "column": 16, + "endColumn": 22 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-eval > invalid + +```js +window?.eval('foo') +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2020, + "globals": { + "window": "readonly" + } + }, + "errors": [ + { + "messageId": "unexpected" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-eval > invalid + +```js +(window?.eval)('foo') +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2020, + "globals": { + "window": "readonly" + } + }, + "errors": [ + { + "messageId": "unexpected" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-eval > invalid + +```js +(window?.window).eval('foo') +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2020, + "globals": { + "window": "readonly" + } + }, + "errors": [ + { + "messageId": "unexpected" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-eval > invalid + +```js +function foo() { 'use strict'; this.eval(); } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 3 + }, + "errors": [ + { + "messageId": "unexpected" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-eval > invalid + +```js +callbacks.findLastIndex(function (cb) { return cb(eval); }, this); +``` + +```json +{ + "errors": [ + { + "messageId": "unexpected" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +### `no-extra-boolean-cast` + +Pass: 500 / 501 (99.8%) +Fail: 1 / 501 (0.2%) + +#### no-extra-boolean-cast > invalid + +```js +if (!Boolean(a as any)) { } +``` + +```json +{ + "output": "if (!(a as any)) { }", + "languageOptions": { + "parser": {}, + "ecmaVersion": 2020 + }, + "errors": [ + { + "messageId": "unexpectedCall" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +### `no-extra-parens` + +Pass: 1060 / 1072 (98.9%) +Fail: 12 / 1072 (1.1%) + +#### no-extra-parens > valid + +```js +(let[a] = b); +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-extra-parens', + message: 'Unnecessary parentheses around expression.', + messageId: 'unexpected', + severity: 1, + nodeType: 'ExpressionStatement', + line: 1, + column: 0, + endLine: 1, + endColumn: 1, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-extra-parens > valid + +```js +(08).a +``` + +```json +{} +``` + +TSError: Decimals with leading zeros are not allowed. + at B (apps/oxlint/dist/ts_eslint.cjs) + at d (apps/oxlint/dist/ts_eslint.cjs) + at a (apps/oxlint/dist/ts_eslint.cjs) + at C (apps/oxlint/dist/ts_eslint.cjs) + + +#### no-extra-parens > valid + +```js +(09).a +``` + +```json +{} +``` + +TSError: Decimals with leading zeros are not allowed. + at B (apps/oxlint/dist/ts_eslint.cjs) + at d (apps/oxlint/dist/ts_eslint.cjs) + at a (apps/oxlint/dist/ts_eslint.cjs) + at C (apps/oxlint/dist/ts_eslint.cjs) + + +#### no-extra-parens > valid + +```js +(018).a +``` + +```json +{} +``` + +TSError: Decimals with leading zeros are not allowed. + at B (apps/oxlint/dist/ts_eslint.cjs) + at d (apps/oxlint/dist/ts_eslint.cjs) + at a (apps/oxlint/dist/ts_eslint.cjs) + at C (apps/oxlint/dist/ts_eslint.cjs) + + +#### no-extra-parens > valid + +```js +(012934).a +``` + +```json +{} +``` + +TSError: Decimals with leading zeros are not allowed. + at B (apps/oxlint/dist/ts_eslint.cjs) + at d (apps/oxlint/dist/ts_eslint.cjs) + at a (apps/oxlint/dist/ts_eslint.cjs) + at C (apps/oxlint/dist/ts_eslint.cjs) + + +#### no-extra-parens > valid + +```js +(let) +foo +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-extra-parens', + message: 'Unnecessary parentheses around expression.', + messageId: 'unexpected', + severity: 1, + nodeType: 'ExpressionStatement', + line: 1, + column: 0, + endLine: 1, + endColumn: 1, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-extra-parens > valid + +```js +(let[foo]) = 1 +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-extra-parens', + message: 'Unnecessary parentheses around expression.', + messageId: 'unexpected', + severity: 1, + nodeType: 'AssignmentExpression', + line: 1, + column: 0, + endLine: 1, + endColumn: 1, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-extra-parens > valid + +```js +(let)[foo] +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-extra-parens', + message: 'Unnecessary parentheses around expression.', + messageId: 'unexpected', + severity: 1, + nodeType: 'MemberExpression', + line: 1, + column: 0, + endLine: 1, + endColumn: 1, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-extra-parens > valid + +```js +const x = (1 satisfies number).toFixed(); +``` + +```json +{ + "languageOptions": { + "parser": {} + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-extra-parens > invalid + +```js +(0123).a +``` + +```json +{ + "output": "0123.a", + "languageOptions": {}, + "errors": [ + { + "messageId": "unexpected" + } + ], + "options": [] +} +``` + +TSError: Octal literals are not allowed. Use the syntax '0o123'. + at B (apps/oxlint/dist/ts_eslint.cjs) + at d (apps/oxlint/dist/ts_eslint.cjs) + at a (apps/oxlint/dist/ts_eslint.cjs) + at C (apps/oxlint/dist/ts_eslint.cjs) + + +#### no-extra-parens > invalid + +```js +(08.1).a +``` + +```json +{ + "output": "08.1.a", + "languageOptions": {}, + "errors": [ + { + "messageId": "unexpected" + } + ], + "options": [] +} +``` + +TSError: Decimals with leading zeros are not allowed. + at B (apps/oxlint/dist/ts_eslint.cjs) + at d (apps/oxlint/dist/ts_eslint.cjs) + at a (apps/oxlint/dist/ts_eslint.cjs) + at C (apps/oxlint/dist/ts_eslint.cjs) + + +#### no-extra-parens > invalid + +```js +(09.).a +``` + +```json +{ + "output": "09..a", + "languageOptions": {}, + "errors": [ + { + "messageId": "unexpected" + } + ], + "options": [] +} +``` + +TSError: Decimals with leading zeros are not allowed. + at B (apps/oxlint/dist/ts_eslint.cjs) + at d (apps/oxlint/dist/ts_eslint.cjs) + at a (apps/oxlint/dist/ts_eslint.cjs) + at C (apps/oxlint/dist/ts_eslint.cjs) + + +### `no-fallthrough` + +Pass: 61 / 87 (70.1%) +Fail: 26 / 87 (29.9%) + +#### no-fallthrough > valid + +```js + +switch(foo){ + case 1: + doSomething(); + // falls through + case 2: doSomething(); +} + +``` + +```json +{ + "options": [ + { + "reportUnusedFallthroughComment": true + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-fallthrough', + message: 'Found a comment that would permit fallthrough, but case cannot fall through.', + messageId: 'unusedFallthroughComment', + severity: 1, + nodeType: 'SwitchStatement', + line: 5, + column: 8, + endLine: 5, + endColumn: 24, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-fallthrough > invalid + +```js +switch(foo) { case 0: a(); +case 1: b() } +``` + +```json +{ + "errors": [ + { + "messageId": "case", + "line": 2, + "column": 1 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-fallthrough > invalid + +```js +switch(foo) { case 0: a(); +default: b() } +``` + +```json +{ + "errors": [ + { + "messageId": "default", + "line": 2, + "column": 1 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-fallthrough > invalid + +```js +switch(foo) { case 0: a(); default: b() } +``` + +```json +{ + "errors": [ + { + "messageId": "default" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-fallthrough > invalid + +```js +switch(foo) { case 0: if (a) { break; } default: b() } +``` + +```json +{ + "errors": [ + { + "messageId": "default" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-fallthrough > invalid + +```js +switch(foo) { case 0: try { throw 0; } catch (err) {} default: b() } +``` + +```json +{ + "errors": [ + { + "messageId": "default" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-fallthrough > invalid + +```js +switch(foo) { case 0: while (a) { break; } default: b() } +``` + +```json +{ + "errors": [ + { + "messageId": "default" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-fallthrough > invalid + +```js +switch(foo) { case 0: do { break; } while (a); default: b() } +``` + +```json +{ + "errors": [ + { + "messageId": "default" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-fallthrough > invalid + +```js +switch(foo) { case 0: + + default: b() } +``` + +```json +{ + "errors": [ + { + "messageId": "default" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-fallthrough > invalid + +```js +switch(foo) { case 0: {} default: b() } +``` + +```json +{ + "errors": [ + { + "messageId": "default" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-fallthrough > invalid + +```js +switch(foo) { case 0: a(); { /* falls through */ } default: b() } +``` + +```json +{ + "errors": [ + { + "messageId": "default" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-fallthrough > invalid + +```js +switch(foo) { case 0: { /* falls through */ } a(); default: b() } +``` + +```json +{ + "errors": [ + { + "messageId": "default" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-fallthrough > invalid + +```js +switch(foo) { case 0: if (a) { /* falls through */ } default: b() } +``` + +```json +{ + "errors": [ + { + "messageId": "default" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-fallthrough > invalid + +```js +switch(foo) { case 0: { { /* falls through */ } } default: b() } +``` + +```json +{ + "errors": [ + { + "messageId": "default" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-fallthrough > invalid + +```js +switch(foo) { case 0: { /* comment */ } default: b() } +``` + +```json +{ + "errors": [ + { + "messageId": "default" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-fallthrough > invalid + +```js +switch(foo) { case 0: + // comment + default: b() } +``` + +```json +{ + "errors": [ + { + "messageId": "default" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-fallthrough > invalid + +```js +switch(foo) { case 0: a(); /* falling through */ default: b() } +``` + +```json +{ + "errors": [ + { + "messageId": "default" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-fallthrough > invalid + +```js +switch(foo) { case 0: a(); +/* no break */ +case 1: b(); } +``` + +```json +{ + "options": [ + { + "commentPattern": "break omitted" + } + ], + "errors": [ + { + "messageId": "case", + "line": 3, + "column": 1 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-fallthrough > invalid + +```js +switch(foo) { case 0: a(); +/* no break */ +/* todo: fix readability */ +default: b() } +``` + +```json +{ + "options": [ + { + "commentPattern": "no break" + } + ], + "errors": [ + { + "messageId": "default", + "line": 4, + "column": 1 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-fallthrough > invalid + +```js +switch(foo) { case 0: { a(); +/* no break */ +/* todo: fix readability */ } +default: b() } +``` + +```json +{ + "options": [ + { + "commentPattern": "no break" + } + ], + "errors": [ + { + "messageId": "default", + "line": 4, + "column": 1 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-fallthrough > invalid + +```js +switch(foo) { case 0: + /* with comments */ +case 1: b(); } +``` + +```json +{ + "errors": [ + { + "messageId": "case", + "line": 3, + "column": 1 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-fallthrough > invalid + +```js +switch(foo) { case 0: + +case 1: b(); } +``` + +```json +{ + "options": [ + { + "allowEmptyCase": false + } + ], + "errors": [ + { + "messageId": "case", + "line": 3, + "column": 1 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-fallthrough > invalid + +```js +switch(foo) { case 0: + +case 1: b(); } +``` + +```json +{ + "options": [ + {} + ], + "errors": [ + { + "messageId": "case", + "line": 3, + "column": 1 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-fallthrough > invalid + +```js +switch (a) { case 1: + ; case 2: } +``` + +```json +{ + "options": [ + { + "allowEmptyCase": false + } + ], + "errors": [ + { + "messageId": "case", + "line": 2, + "column": 4 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-fallthrough > invalid + +```js +switch (a) { case 1: ; case 2: ; case 3: } +``` + +```json +{ + "options": [ + { + "allowEmptyCase": true + } + ], + "errors": [ + { + "messageId": "case", + "line": 1, + "column": 24 + }, + { + "messageId": "case", + "line": 1, + "column": 34 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 2 errors but had 0: [] + +0 !== 2 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-fallthrough > invalid + +```js +switch (foo) { case 0: a(); +// eslint-enable no-fallthrough + case 1: } +``` + +```json +{ + "options": [ + {} + ], + "errors": [ + { + "messageId": "case", + "line": 3, + "column": 2 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +### `no-global-assign` + +Pass: 11 / 18 (61.1%) +Fail: 7 / 18 (38.9%) + +#### no-global-assign > invalid + +```js +({Object = 0, String = 0} = {}); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "globalShouldNotBeModified", + "data": { + "name": "Object" + } + }, + { + "messageId": "globalShouldNotBeModified", + "data": { + "name": "String" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Hydrated message "Read-only global 'Object' should not be modified." does not match "Read-only global 'String' should not be modified." ++ actual - expected + ++ "Read-only global 'String' should not be modified." +- "Read-only global 'Object' should not be modified." + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-global-assign > invalid + +```js +top = 0; +``` + +```json +{ + "languageOptions": { + "globals": { + "AbortController": false, + "AbortSignal": false, + "AbsoluteOrientationSensor": false, + "AbstractRange": false, + "Accelerometer": false, + "addEventListener": false, + "ai": false, + "AI": false, + "AICreateMonitor": false, + "AITextSession": false, + "alert": false, + "AnalyserNode": false, + "Animation": false, + "AnimationEffect": false, + "AnimationEvent": false, + "AnimationPlaybackEvent": false, + "AnimationTimeline": false, + "AsyncDisposableStack": false, + "atob": false, + "Attr": false, + "Audio": false, + "AudioBuffer": false, + "AudioBufferSourceNode": false, + "AudioContext": false, + "AudioData": false, + "AudioDecoder": false, + "AudioDestinationNode": false, + "AudioEncoder": false, + "AudioListener": false, + "AudioNode": false, + "AudioParam": false, + "AudioParamMap": false, + "AudioProcessingEvent": false, + "AudioScheduledSourceNode": false, + "AudioSinkInfo": false, + "AudioWorklet": false, + "AudioWorkletGlobalScope": false, + "AudioWorkletNode": false, + "AudioWorkletProcessor": false, + "AuthenticatorAssertionResponse": false, + "AuthenticatorAttestationResponse": false, + "AuthenticatorResponse": false, + "BackgroundFetchManager": false, + "BackgroundFetchRecord": false, + "BackgroundFetchRegistration": false, + "BarcodeDetector": false, + "BarProp": false, + "BaseAudioContext": false, + "BatteryManager": false, + "BeforeUnloadEvent": false, + "BiquadFilterNode": false, + "Blob": false, + "BlobEvent": false, + "Bluetooth": false, + "BluetoothCharacteristicProperties": false, + "BluetoothDevice": false, + "BluetoothRemoteGATTCharacteristic": false, + "BluetoothRemoteGATTDescriptor": false, + "BluetoothRemoteGATTServer": false, + "BluetoothRemoteGATTService": false, + "BluetoothUUID": false, + "blur": false, + "BroadcastChannel": false, + "BrowserCaptureMediaStreamTrack": false, + "btoa": false, + "ByteLengthQueuingStrategy": false, + "Cache": false, + "caches": false, + "CacheStorage": false, + "cancelAnimationFrame": false, + "cancelIdleCallback": false, + "CanvasCaptureMediaStream": false, + "CanvasCaptureMediaStreamTrack": false, + "CanvasGradient": false, + "CanvasPattern": false, + "CanvasRenderingContext2D": false, + "CaptureController": false, + "CaretPosition": false, + "CDATASection": false, + "ChannelMergerNode": false, + "ChannelSplitterNode": false, + "ChapterInformation": false, + "CharacterBoundsUpdateEvent": false, + "CharacterData": false, + "clearInterval": false, + "clearTimeout": false, + "clientInformation": false, + "Clipboard": false, + "ClipboardChangeEvent": false, + "ClipboardEvent": false, + "ClipboardItem": false, + "close": false, + "closed": false, + "CloseEvent": false, + "CloseWatcher": false, + "CommandEvent": false, + "Comment": false, + "CompositionEvent": false, + "CompressionStream": false, + "confirm": false, + "console": false, + "ConstantSourceNode": false, + "ContentVisibilityAutoStateChangeEvent": false, + "ConvolverNode": false, + "CookieChangeEvent": false, + "CookieDeprecationLabel": false, + "cookieStore": false, + "CookieStore": false, + "CookieStoreManager": false, + "CountQueuingStrategy": false, + "createImageBitmap": false, + "CreateMonitor": false, + "Credential": false, + "credentialless": false, + "CredentialsContainer": false, + "CropTarget": false, + "crossOriginIsolated": false, + "crypto": false, + "Crypto": false, + "CryptoKey": false, + "CSPViolationReportBody": false, + "CSS": false, + "CSSAnimation": false, + "CSSConditionRule": false, + "CSSContainerRule": false, + "CSSCounterStyleRule": false, + "CSSFontFaceRule": false, + "CSSFontFeatureValuesRule": false, + "CSSFontPaletteValuesRule": false, + "CSSFunctionDeclarations": false, + "CSSFunctionDescriptors": false, + "CSSFunctionRule": false, + "CSSGroupingRule": false, + "CSSImageValue": false, + "CSSImportRule": false, + "CSSKeyframeRule": false, + "CSSKeyframesRule": false, + "CSSKeywordValue": false, + "CSSLayerBlockRule": false, + "CSSLayerStatementRule": false, + "CSSMarginRule": false, + "CSSMathClamp": false, + "CSSMathInvert": false, + "CSSMathMax": false, + "CSSMathMin": false, + "CSSMathNegate": false, + "CSSMathProduct": false, + "CSSMathSum": false, + "CSSMathValue": false, + "CSSMatrixComponent": false, + "CSSMediaRule": false, + "CSSNamespaceRule": false, + "CSSNestedDeclarations": false, + "CSSNumericArray": false, + "CSSNumericValue": false, + "CSSPageDescriptors": false, + "CSSPageRule": false, + "CSSPerspective": false, + "CSSPositionTryDescriptors": false, + "CSSPositionTryRule": false, + "CSSPositionValue": false, + "CSSPropertyRule": false, + "CSSRotate": false, + "CSSRule": false, + "CSSRuleList": false, + "CSSScale": false, + "CSSScopeRule": false, + "CSSSkew": false, + "CSSSkewX": false, + "CSSSkewY": false, + "CSSStartingStyleRule": false, + "CSSStyleDeclaration": false, + "CSSStyleRule": false, + "CSSStyleSheet": false, + "CSSStyleValue": false, + "CSSSupportsRule": false, + "CSSTransformComponent": false, + "CSSTransformValue": false, + "CSSTransition": false, + "CSSTranslate": false, + "CSSUnitValue": false, + "CSSUnparsedValue": false, + "CSSVariableReferenceValue": false, + "CSSViewTransitionRule": false, + "currentFrame": false, + "currentTime": false, + "CustomElementRegistry": false, + "customElements": false, + "CustomEvent": false, + "CustomStateSet": false, + "DataTransfer": false, + "DataTransferItem": false, + "DataTransferItemList": false, + "DecompressionStream": false, + "DelayNode": false, + "DelegatedInkTrailPresenter": false, + "DeviceMotionEvent": false, + "DeviceMotionEventAcceleration": false, + "DeviceMotionEventRotationRate": false, + "DeviceOrientationEvent": false, + "devicePixelRatio": false, + "DevicePosture": false, + "DigitalCredential": false, + "dispatchEvent": false, + "DisposableStack": false, + "document": false, + "Document": false, + "DocumentFragment": false, + "documentPictureInPicture": false, + "DocumentPictureInPicture": false, + "DocumentPictureInPictureEvent": false, + "DocumentTimeline": false, + "DocumentType": false, + "DOMError": false, + "DOMException": false, + "DOMImplementation": false, + "DOMMatrix": false, + "DOMMatrixReadOnly": false, + "DOMParser": false, + "DOMPoint": false, + "DOMPointReadOnly": false, + "DOMQuad": false, + "DOMRect": false, + "DOMRectList": false, + "DOMRectReadOnly": false, + "DOMStringList": false, + "DOMStringMap": false, + "DOMTokenList": false, + "DragEvent": false, + "DynamicsCompressorNode": false, + "EditContext": false, + "Element": false, + "ElementInternals": false, + "EncodedAudioChunk": false, + "EncodedVideoChunk": false, + "ErrorEvent": false, + "event": false, + "Event": false, + "EventCounts": false, + "EventSource": false, + "EventTarget": false, + "external": false, + "External": false, + "EyeDropper": false, + "FeaturePolicy": false, + "FederatedCredential": false, + "fence": false, + "Fence": false, + "FencedFrameConfig": false, + "fetch": false, + "fetchLater": false, + "FetchLaterResult": false, + "File": false, + "FileList": false, + "FileReader": false, + "FileSystem": false, + "FileSystemDirectoryEntry": false, + "FileSystemDirectoryHandle": false, + "FileSystemDirectoryReader": false, + "FileSystemEntry": false, + "FileSystemFileEntry": false, + "FileSystemFileHandle": false, + "FileSystemHandle": false, + "FileSystemObserver": false, + "FileSystemWritableFileStream": false, + "find": false, + "focus": false, + "FocusEvent": false, + "FontData": false, + "FontFace": false, + "FontFaceSet": false, + "FontFaceSetLoadEvent": false, + "FormData": false, + "FormDataEvent": false, + "FragmentDirective": false, + "frameElement": false, + "frames": false, + "GainNode": false, + "Gamepad": false, + "GamepadAxisMoveEvent": false, + "GamepadButton": false, + "GamepadButtonEvent": false, + "GamepadEvent": false, + "GamepadHapticActuator": false, + "GamepadPose": false, + "Geolocation": false, + "GeolocationCoordinates": false, + "GeolocationPosition": false, + "GeolocationPositionError": false, + "getComputedStyle": false, + "getScreenDetails": false, + "getSelection": false, + "GPU": false, + "GPUAdapter": false, + "GPUAdapterInfo": false, + "GPUBindGroup": false, + "GPUBindGroupLayout": false, + "GPUBuffer": false, + "GPUBufferUsage": false, + "GPUCanvasContext": false, + "GPUColorWrite": false, + "GPUCommandBuffer": false, + "GPUCommandEncoder": false, + "GPUCompilationInfo": false, + "GPUCompilationMessage": false, + "GPUComputePassEncoder": false, + "GPUComputePipeline": false, + "GPUDevice": false, + "GPUDeviceLostInfo": false, + "GPUError": false, + "GPUExternalTexture": false, + "GPUInternalError": false, + "GPUMapMode": false, + "GPUOutOfMemoryError": false, + "GPUPipelineError": false, + "GPUPipelineLayout": false, + "GPUQuerySet": false, + "GPUQueue": false, + "GPURenderBundle": false, + "GPURenderBundleEncoder": false, + "GPURenderPassEncoder": false, + "GPURenderPipeline": false, + "GPUSampler": false, + "GPUShaderModule": false, + "GPUShaderStage": false, + "GPUSupportedFeatures": false, + "GPUSupportedLimits": false, + "GPUTexture": false, + "GPUTextureUsage": false, + "GPUTextureView": false, + "GPUUncapturedErrorEvent": false, + "GPUValidationError": false, + "GravitySensor": false, + "Gyroscope": false, + "HashChangeEvent": false, + "Headers": false, + "HID": false, + "HIDConnectionEvent": false, + "HIDDevice": false, + "HIDInputReportEvent": false, + "Highlight": false, + "HighlightRegistry": false, + "history": false, + "History": false, + "HTMLAllCollection": false, + "HTMLAnchorElement": false, + "HTMLAreaElement": false, + "HTMLAudioElement": false, + "HTMLBaseElement": false, + "HTMLBodyElement": false, + "HTMLBRElement": false, + "HTMLButtonElement": false, + "HTMLCanvasElement": false, + "HTMLCollection": false, + "HTMLDataElement": false, + "HTMLDataListElement": false, + "HTMLDetailsElement": false, + "HTMLDialogElement": false, + "HTMLDirectoryElement": false, + "HTMLDivElement": false, + "HTMLDListElement": false, + "HTMLDocument": false, + "HTMLElement": false, + "HTMLEmbedElement": false, + "HTMLFencedFrameElement": false, + "HTMLFieldSetElement": false, + "HTMLFontElement": false, + "HTMLFormControlsCollection": false, + "HTMLFormElement": false, + "HTMLFrameElement": false, + "HTMLFrameSetElement": false, + "HTMLHeadElement": false, + "HTMLHeadingElement": false, + "HTMLHRElement": false, + "HTMLHtmlElement": false, + "HTMLIFrameElement": false, + "HTMLImageElement": false, + "HTMLInputElement": false, + "HTMLLabelElement": false, + "HTMLLegendElement": false, + "HTMLLIElement": false, + "HTMLLinkElement": false, + "HTMLMapElement": false, + "HTMLMarqueeElement": false, + "HTMLMediaElement": false, + "HTMLMenuElement": false, + "HTMLMetaElement": false, + "HTMLMeterElement": false, + "HTMLModElement": false, + "HTMLObjectElement": false, + "HTMLOListElement": false, + "HTMLOptGroupElement": false, + "HTMLOptionElement": false, + "HTMLOptionsCollection": false, + "HTMLOutputElement": false, + "HTMLParagraphElement": false, + "HTMLParamElement": false, + "HTMLPictureElement": false, + "HTMLPreElement": false, + "HTMLProgressElement": false, + "HTMLQuoteElement": false, + "HTMLScriptElement": false, + "HTMLSelectedContentElement": false, + "HTMLSelectElement": false, + "HTMLSlotElement": false, + "HTMLSourceElement": false, + "HTMLSpanElement": false, + "HTMLStyleElement": false, + "HTMLTableCaptionElement": false, + "HTMLTableCellElement": false, + "HTMLTableColElement": false, + "HTMLTableElement": false, + "HTMLTableRowElement": false, + "HTMLTableSectionElement": false, + "HTMLTemplateElement": false, + "HTMLTextAreaElement": false, + "HTMLTimeElement": false, + "HTMLTitleElement": false, + "HTMLTrackElement": false, + "HTMLUListElement": false, + "HTMLUnknownElement": false, + "HTMLVideoElement": false, + "IDBCursor": false, + "IDBCursorWithValue": false, + "IDBDatabase": false, + "IDBFactory": false, + "IDBIndex": false, + "IDBKeyRange": false, + "IDBObjectStore": false, + "IDBOpenDBRequest": false, + "IDBRecord": false, + "IDBRequest": false, + "IDBTransaction": false, + "IDBVersionChangeEvent": false, + "IdentityCredential": false, + "IdentityCredentialError": false, + "IdentityProvider": false, + "IdleDeadline": false, + "IdleDetector": false, + "IIRFilterNode": false, + "Image": false, + "ImageBitmap": false, + "ImageBitmapRenderingContext": false, + "ImageCapture": false, + "ImageData": false, + "ImageDecoder": false, + "ImageTrack": false, + "ImageTrackList": false, + "indexedDB": false, + "Ink": false, + "innerHeight": false, + "innerWidth": false, + "InputDeviceCapabilities": false, + "InputDeviceInfo": false, + "InputEvent": false, + "IntegrityViolationReportBody": false, + "InterestEvent": false, + "IntersectionObserver": false, + "IntersectionObserverEntry": false, + "isSecureContext": false, + "Keyboard": false, + "KeyboardEvent": false, + "KeyboardLayoutMap": false, + "KeyframeEffect": false, + "LanguageDetector": false, + "LargestContentfulPaint": false, + "LaunchParams": false, + "launchQueue": false, + "LaunchQueue": false, + "LayoutShift": false, + "LayoutShiftAttribution": false, + "length": false, + "LinearAccelerationSensor": false, + "localStorage": false, + "location": true, + "Location": false, + "locationbar": false, + "Lock": false, + "LockManager": false, + "matchMedia": false, + "MathMLElement": false, + "MediaCapabilities": false, + "MediaCapabilitiesInfo": false, + "MediaDeviceInfo": false, + "MediaDevices": false, + "MediaElementAudioSourceNode": false, + "MediaEncryptedEvent": false, + "MediaError": false, + "MediaKeyError": false, + "MediaKeyMessageEvent": false, + "MediaKeys": false, + "MediaKeySession": false, + "MediaKeyStatusMap": false, + "MediaKeySystemAccess": false, + "MediaList": false, + "MediaMetadata": false, + "MediaQueryList": false, + "MediaQueryListEvent": false, + "MediaRecorder": false, + "MediaRecorderErrorEvent": false, + "MediaSession": false, + "MediaSource": false, + "MediaSourceHandle": false, + "MediaStream": false, + "MediaStreamAudioDestinationNode": false, + "MediaStreamAudioSourceNode": false, + "MediaStreamEvent": false, + "MediaStreamTrack": false, + "MediaStreamTrackAudioSourceNode": false, + "MediaStreamTrackAudioStats": false, + "MediaStreamTrackEvent": false, + "MediaStreamTrackGenerator": false, + "MediaStreamTrackProcessor": false, + "MediaStreamTrackVideoStats": false, + "menubar": false, + "MessageChannel": false, + "MessageEvent": false, + "MessagePort": false, + "MIDIAccess": false, + "MIDIConnectionEvent": false, + "MIDIInput": false, + "MIDIInputMap": false, + "MIDIMessageEvent": false, + "MIDIOutput": false, + "MIDIOutputMap": false, + "MIDIPort": false, + "MimeType": false, + "MimeTypeArray": false, + "model": false, + "ModelGenericSession": false, + "ModelManager": false, + "MouseEvent": false, + "moveBy": false, + "moveTo": false, + "MutationEvent": false, + "MutationObserver": false, + "MutationRecord": false, + "name": false, + "NamedNodeMap": false, + "NavigateEvent": false, + "navigation": false, + "Navigation": false, + "NavigationActivation": false, + "NavigationCurrentEntryChangeEvent": false, + "NavigationDestination": false, + "NavigationHistoryEntry": false, + "NavigationPrecommitController": false, + "NavigationPreloadManager": false, + "NavigationTransition": false, + "navigator": false, + "Navigator": false, + "NavigatorLogin": false, + "NavigatorManagedData": false, + "NavigatorUAData": false, + "NetworkInformation": false, + "Node": false, + "NodeFilter": false, + "NodeIterator": false, + "NodeList": false, + "Notification": false, + "NotifyPaintEvent": false, + "NotRestoredReasonDetails": false, + "NotRestoredReasons": false, + "Observable": false, + "OfflineAudioCompletionEvent": false, + "OfflineAudioContext": false, + "offscreenBuffering": false, + "OffscreenCanvas": false, + "OffscreenCanvasRenderingContext2D": false, + "onabort": true, + "onafterprint": true, + "onanimationcancel": true, + "onanimationend": true, + "onanimationiteration": true, + "onanimationstart": true, + "onappinstalled": true, + "onauxclick": true, + "onbeforeinput": true, + "onbeforeinstallprompt": true, + "onbeforematch": true, + "onbeforeprint": true, + "onbeforetoggle": true, + "onbeforeunload": true, + "onbeforexrselect": true, + "onblur": true, + "oncancel": true, + "oncanplay": true, + "oncanplaythrough": true, + "onchange": true, + "onclick": true, + "onclose": true, + "oncommand": true, + "oncontentvisibilityautostatechange": true, + "oncontextlost": true, + "oncontextmenu": true, + "oncontextrestored": true, + "oncopy": true, + "oncuechange": true, + "oncut": true, + "ondblclick": true, + "ondevicemotion": true, + "ondeviceorientation": true, + "ondeviceorientationabsolute": true, + "ondrag": true, + "ondragend": true, + "ondragenter": true, + "ondragleave": true, + "ondragover": true, + "ondragstart": true, + "ondrop": true, + "ondurationchange": true, + "onemptied": true, + "onended": true, + "onerror": true, + "onfocus": true, + "onformdata": true, + "ongamepadconnected": true, + "ongamepaddisconnected": true, + "ongotpointercapture": true, + "onhashchange": true, + "oninput": true, + "oninvalid": true, + "onkeydown": true, + "onkeypress": true, + "onkeyup": true, + "onlanguagechange": true, + "onload": true, + "onloadeddata": true, + "onloadedmetadata": true, + "onloadstart": true, + "onlostpointercapture": true, + "onmessage": true, + "onmessageerror": true, + "onmousedown": true, + "onmouseenter": true, + "onmouseleave": true, + "onmousemove": true, + "onmouseout": true, + "onmouseover": true, + "onmouseup": true, + "onmousewheel": true, + "onoffline": true, + "ononline": true, + "onpagehide": true, + "onpagereveal": true, + "onpageshow": true, + "onpageswap": true, + "onpaste": true, + "onpause": true, + "onplay": true, + "onplaying": true, + "onpointercancel": true, + "onpointerdown": true, + "onpointerenter": true, + "onpointerleave": true, + "onpointermove": true, + "onpointerout": true, + "onpointerover": true, + "onpointerrawupdate": true, + "onpointerup": true, + "onpopstate": true, + "onprogress": true, + "onratechange": true, + "onrejectionhandled": true, + "onreset": true, + "onresize": true, + "onscroll": true, + "onscrollend": true, + "onscrollsnapchange": true, + "onscrollsnapchanging": true, + "onsearch": true, + "onsecuritypolicyviolation": true, + "onseeked": true, + "onseeking": true, + "onselect": true, + "onselectionchange": true, + "onselectstart": true, + "onslotchange": true, + "onstalled": true, + "onstorage": true, + "onsubmit": true, + "onsuspend": true, + "ontimeupdate": true, + "ontoggle": true, + "ontransitioncancel": true, + "ontransitionend": true, + "ontransitionrun": true, + "ontransitionstart": true, + "onunhandledrejection": true, + "onunload": true, + "onvolumechange": true, + "onwaiting": true, + "onwheel": true, + "open": false, + "opener": false, + "Option": false, + "OrientationSensor": false, + "origin": false, + "originAgentCluster": false, + "OscillatorNode": false, + "OTPCredential": false, + "outerHeight": false, + "outerWidth": false, + "OverconstrainedError": false, + "PageRevealEvent": false, + "PageSwapEvent": false, + "PageTransitionEvent": false, + "pageXOffset": false, + "pageYOffset": false, + "PannerNode": false, + "parent": false, + "PasswordCredential": false, + "Path2D": false, + "PaymentAddress": false, + "PaymentManager": false, + "PaymentMethodChangeEvent": false, + "PaymentRequest": false, + "PaymentRequestUpdateEvent": false, + "PaymentResponse": false, + "performance": false, + "Performance": false, + "PerformanceElementTiming": false, + "PerformanceEntry": false, + "PerformanceEventTiming": false, + "PerformanceLongAnimationFrameTiming": false, + "PerformanceLongTaskTiming": false, + "PerformanceMark": false, + "PerformanceMeasure": false, + "PerformanceNavigation": false, + "PerformanceNavigationTiming": false, + "PerformanceObserver": false, + "PerformanceObserverEntryList": false, + "PerformancePaintTiming": false, + "PerformanceResourceTiming": false, + "PerformanceScriptTiming": false, + "PerformanceServerTiming": false, + "PerformanceTiming": false, + "PeriodicSyncManager": false, + "PeriodicWave": false, + "Permissions": false, + "PermissionStatus": false, + "PERSISTENT": false, + "personalbar": false, + "PictureInPictureEvent": false, + "PictureInPictureWindow": false, + "Plugin": false, + "PluginArray": false, + "PointerEvent": false, + "PopStateEvent": false, + "postMessage": false, + "Presentation": false, + "PresentationAvailability": false, + "PresentationConnection": false, + "PresentationConnectionAvailableEvent": false, + "PresentationConnectionCloseEvent": false, + "PresentationConnectionList": false, + "PresentationReceiver": false, + "PresentationRequest": false, + "PressureObserver": false, + "PressureRecord": false, + "print": false, + "ProcessingInstruction": false, + "Profiler": false, + "ProgressEvent": false, + "PromiseRejectionEvent": false, + "prompt": false, + "ProtectedAudience": false, + "PublicKeyCredential": false, + "PushManager": false, + "PushSubscription": false, + "PushSubscriptionOptions": false, + "queryLocalFonts": false, + "queueMicrotask": false, + "QuotaExceededError": false, + "RadioNodeList": false, + "Range": false, + "ReadableByteStreamController": false, + "ReadableStream": false, + "ReadableStreamBYOBReader": false, + "ReadableStreamBYOBRequest": false, + "ReadableStreamDefaultController": false, + "ReadableStreamDefaultReader": false, + "registerProcessor": false, + "RelativeOrientationSensor": false, + "RemotePlayback": false, + "removeEventListener": false, + "ReportBody": false, + "reportError": false, + "ReportingObserver": false, + "Request": false, + "requestAnimationFrame": false, + "requestIdleCallback": false, + "resizeBy": false, + "ResizeObserver": false, + "ResizeObserverEntry": false, + "ResizeObserverSize": false, + "resizeTo": false, + "Response": false, + "RestrictionTarget": false, + "RTCCertificate": false, + "RTCDataChannel": false, + "RTCDataChannelEvent": false, + "RTCDtlsTransport": false, + "RTCDTMFSender": false, + "RTCDTMFToneChangeEvent": false, + "RTCEncodedAudioFrame": false, + "RTCEncodedVideoFrame": false, + "RTCError": false, + "RTCErrorEvent": false, + "RTCIceCandidate": false, + "RTCIceTransport": false, + "RTCPeerConnection": false, + "RTCPeerConnectionIceErrorEvent": false, + "RTCPeerConnectionIceEvent": false, + "RTCRtpReceiver": false, + "RTCRtpScriptTransform": false, + "RTCRtpSender": false, + "RTCRtpTransceiver": false, + "RTCSctpTransport": false, + "RTCSessionDescription": false, + "RTCStatsReport": false, + "RTCTrackEvent": false, + "sampleRate": false, + "scheduler": false, + "Scheduler": false, + "Scheduling": false, + "screen": false, + "Screen": false, + "ScreenDetailed": false, + "ScreenDetails": false, + "screenLeft": false, + "ScreenOrientation": false, + "screenTop": false, + "screenX": false, + "screenY": false, + "ScriptProcessorNode": false, + "scroll": false, + "scrollbars": false, + "scrollBy": false, + "ScrollTimeline": false, + "scrollTo": false, + "scrollX": false, + "scrollY": false, + "SecurityPolicyViolationEvent": false, + "Selection": false, + "self": false, + "Sensor": false, + "SensorErrorEvent": false, + "Serial": false, + "SerialPort": false, + "ServiceWorker": false, + "ServiceWorkerContainer": false, + "ServiceWorkerRegistration": false, + "sessionStorage": false, + "setInterval": false, + "setTimeout": false, + "ShadowRoot": false, + "sharedStorage": false, + "SharedStorage": false, + "SharedStorageAppendMethod": false, + "SharedStorageClearMethod": false, + "SharedStorageDeleteMethod": false, + "SharedStorageModifierMethod": false, + "SharedStorageSetMethod": false, + "SharedStorageWorklet": false, + "SharedWorker": false, + "showDirectoryPicker": false, + "showOpenFilePicker": false, + "showSaveFilePicker": false, + "SnapEvent": false, + "SourceBuffer": false, + "SourceBufferList": false, + "SpeechGrammar": false, + "SpeechGrammarList": false, + "SpeechRecognition": false, + "SpeechRecognitionErrorEvent": false, + "SpeechRecognitionEvent": false, + "SpeechRecognitionPhrase": false, + "speechSynthesis": false, + "SpeechSynthesis": false, + "SpeechSynthesisErrorEvent": false, + "SpeechSynthesisEvent": false, + "SpeechSynthesisUtterance": false, + "SpeechSynthesisVoice": false, + "StaticRange": false, + "status": false, + "statusbar": false, + "StereoPannerNode": false, + "stop": false, + "Storage": false, + "StorageBucket": false, + "StorageBucketManager": false, + "StorageEvent": false, + "StorageManager": false, + "structuredClone": false, + "styleMedia": false, + "StylePropertyMap": false, + "StylePropertyMapReadOnly": false, + "StyleSheet": false, + "StyleSheetList": false, + "SubmitEvent": false, + "Subscriber": false, + "SubtleCrypto": false, + "Summarizer": false, + "SuppressedError": false, + "SVGAElement": false, + "SVGAngle": false, + "SVGAnimatedAngle": false, + "SVGAnimatedBoolean": false, + "SVGAnimatedEnumeration": false, + "SVGAnimatedInteger": false, + "SVGAnimatedLength": false, + "SVGAnimatedLengthList": false, + "SVGAnimatedNumber": false, + "SVGAnimatedNumberList": false, + "SVGAnimatedPreserveAspectRatio": false, + "SVGAnimatedRect": false, + "SVGAnimatedString": false, + "SVGAnimatedTransformList": false, + "SVGAnimateElement": false, + "SVGAnimateMotionElement": false, + "SVGAnimateTransformElement": false, + "SVGAnimationElement": false, + "SVGCircleElement": false, + "SVGClipPathElement": false, + "SVGComponentTransferFunctionElement": false, + "SVGDefsElement": false, + "SVGDescElement": false, + "SVGElement": false, + "SVGEllipseElement": false, + "SVGFEBlendElement": false, + "SVGFEColorMatrixElement": false, + "SVGFEComponentTransferElement": false, + "SVGFECompositeElement": false, + "SVGFEConvolveMatrixElement": false, + "SVGFEDiffuseLightingElement": false, + "SVGFEDisplacementMapElement": false, + "SVGFEDistantLightElement": false, + "SVGFEDropShadowElement": false, + "SVGFEFloodElement": false, + "SVGFEFuncAElement": false, + "SVGFEFuncBElement": false, + "SVGFEFuncGElement": false, + "SVGFEFuncRElement": false, + "SVGFEGaussianBlurElement": false, + "SVGFEImageElement": false, + "SVGFEMergeElement": false, + "SVGFEMergeNodeElement": false, + "SVGFEMorphologyElement": false, + "SVGFEOffsetElement": false, + "SVGFEPointLightElement": false, + "SVGFESpecularLightingElement": false, + "SVGFESpotLightElement": false, + "SVGFETileElement": false, + "SVGFETurbulenceElement": false, + "SVGFilterElement": false, + "SVGForeignObjectElement": false, + "SVGGElement": false, + "SVGGeometryElement": false, + "SVGGradientElement": false, + "SVGGraphicsElement": false, + "SVGImageElement": false, + "SVGLength": false, + "SVGLengthList": false, + "SVGLinearGradientElement": false, + "SVGLineElement": false, + "SVGMarkerElement": false, + "SVGMaskElement": false, + "SVGMatrix": false, + "SVGMetadataElement": false, + "SVGMPathElement": false, + "SVGNumber": false, + "SVGNumberList": false, + "SVGPathElement": false, + "SVGPatternElement": false, + "SVGPoint": false, + "SVGPointList": false, + "SVGPolygonElement": false, + "SVGPolylineElement": false, + "SVGPreserveAspectRatio": false, + "SVGRadialGradientElement": false, + "SVGRect": false, + "SVGRectElement": false, + "SVGScriptElement": false, + "SVGSetElement": false, + "SVGStopElement": false, + "SVGStringList": false, + "SVGStyleElement": false, + "SVGSVGElement": false, + "SVGSwitchElement": false, + "SVGSymbolElement": false, + "SVGTextContentElement": false, + "SVGTextElement": false, + "SVGTextPathElement": false, + "SVGTextPositioningElement": false, + "SVGTitleElement": false, + "SVGTransform": false, + "SVGTransformList": false, + "SVGTSpanElement": false, + "SVGUnitTypes": false, + "SVGUseElement": false, + "SVGViewElement": false, + "SyncManager": false, + "TaskAttributionTiming": false, + "TaskController": false, + "TaskPriorityChangeEvent": false, + "TaskSignal": false, + "TEMPORARY": false, + "Text": false, + "TextDecoder": false, + "TextDecoderStream": false, + "TextEncoder": false, + "TextEncoderStream": false, + "TextEvent": false, + "TextFormat": false, + "TextFormatUpdateEvent": false, + "TextMetrics": false, + "TextTrack": false, + "TextTrackCue": false, + "TextTrackCueList": false, + "TextTrackList": false, + "TextUpdateEvent": false, + "TimeEvent": false, + "TimeRanges": false, + "ToggleEvent": false, + "toolbar": false, + "top": false, + "Touch": false, + "TouchEvent": false, + "TouchList": false, + "TrackEvent": false, + "TransformStream": false, + "TransformStreamDefaultController": false, + "TransitionEvent": false, + "Translator": false, + "TreeWalker": false, + "TrustedHTML": false, + "TrustedScript": false, + "TrustedScriptURL": false, + "TrustedTypePolicy": false, + "TrustedTypePolicyFactory": false, + "trustedTypes": false, + "UIEvent": false, + "URL": false, + "URLPattern": false, + "URLSearchParams": false, + "USB": false, + "USBAlternateInterface": false, + "USBConfiguration": false, + "USBConnectionEvent": false, + "USBDevice": false, + "USBEndpoint": false, + "USBInterface": false, + "USBInTransferResult": false, + "USBIsochronousInTransferPacket": false, + "USBIsochronousInTransferResult": false, + "USBIsochronousOutTransferPacket": false, + "USBIsochronousOutTransferResult": false, + "USBOutTransferResult": false, + "UserActivation": false, + "ValidityState": false, + "VideoColorSpace": false, + "VideoDecoder": false, + "VideoEncoder": false, + "VideoFrame": false, + "VideoPlaybackQuality": false, + "viewport": false, + "Viewport": false, + "ViewTimeline": false, + "ViewTransition": false, + "ViewTransitionTypeSet": false, + "VirtualKeyboard": false, + "VirtualKeyboardGeometryChangeEvent": false, + "VisibilityStateEntry": false, + "visualViewport": false, + "VisualViewport": false, + "VTTCue": false, + "VTTRegion": false, + "WakeLock": false, + "WakeLockSentinel": false, + "WaveShaperNode": false, + "WebAssembly": false, + "WebGL2RenderingContext": false, + "WebGLActiveInfo": false, + "WebGLBuffer": false, + "WebGLContextEvent": false, + "WebGLFramebuffer": false, + "WebGLObject": false, + "WebGLProgram": false, + "WebGLQuery": false, + "WebGLRenderbuffer": false, + "WebGLRenderingContext": false, + "WebGLSampler": false, + "WebGLShader": false, + "WebGLShaderPrecisionFormat": false, + "WebGLSync": false, + "WebGLTexture": false, + "WebGLTransformFeedback": false, + "WebGLUniformLocation": false, + "WebGLVertexArrayObject": false, + "WebSocket": false, + "WebSocketError": false, + "WebSocketStream": false, + "WebTransport": false, + "WebTransportBidirectionalStream": false, + "WebTransportDatagramDuplexStream": false, + "WebTransportError": false, + "WebTransportReceiveStream": false, + "WebTransportSendStream": false, + "WGSLLanguageFeatures": false, + "WheelEvent": false, + "when": false, + "window": false, + "Window": false, + "WindowControlsOverlay": false, + "WindowControlsOverlayGeometryChangeEvent": false, + "Worker": false, + "Worklet": false, + "WorkletGlobalScope": false, + "WritableStream": false, + "WritableStreamDefaultController": false, + "WritableStreamDefaultWriter": false, + "XMLDocument": false, + "XMLHttpRequest": false, + "XMLHttpRequestEventTarget": false, + "XMLHttpRequestUpload": false, + "XMLSerializer": false, + "XPathEvaluator": false, + "XPathExpression": false, + "XPathResult": false, + "XRAnchor": false, + "XRAnchorSet": false, + "XRBoundedReferenceSpace": false, + "XRCamera": false, + "XRCPUDepthInformation": false, + "XRDepthInformation": false, + "XRDOMOverlayState": false, + "XRFrame": false, + "XRHand": false, + "XRHitTestResult": false, + "XRHitTestSource": false, + "XRInputSource": false, + "XRInputSourceArray": false, + "XRInputSourceEvent": false, + "XRInputSourcesChangeEvent": false, + "XRJointPose": false, + "XRJointSpace": false, + "XRLayer": false, + "XRLightEstimate": false, + "XRLightProbe": false, + "XRPose": false, + "XRRay": false, + "XRReferenceSpace": false, + "XRReferenceSpaceEvent": false, + "XRRenderState": false, + "XRRigidTransform": false, + "XRSession": false, + "XRSessionEvent": false, + "XRSpace": false, + "XRSystem": false, + "XRTransientInputHitTestResult": false, + "XRTransientInputHitTestSource": false, + "XRView": false, + "XRViewerPose": false, + "XRViewport": false, + "XRWebGLBinding": false, + "XRWebGLDepthInformation": false, + "XRWebGLLayer": false, + "XSLTProcessor": false + } + }, + "errors": [ + { + "messageId": "globalShouldNotBeModified", + "data": { + "name": "top" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-global-assign > invalid + +```js +require = 0; +``` + +```json +{ + "languageOptions": { + "sourceType": "commonjs" + }, + "errors": [ + { + "messageId": "globalShouldNotBeModified", + "data": { + "name": "require" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-global-assign > invalid + +```js +/*global b:false*/ function f() { b = 1; } +``` + +```json +{ + "errors": [ + { + "messageId": "globalShouldNotBeModified", + "data": { + "name": "b" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-global-assign > invalid + +```js +function f() { b = 1; } +``` + +```json +{ + "languageOptions": { + "globals": { + "b": false + } + }, + "errors": [ + { + "messageId": "globalShouldNotBeModified", + "data": { + "name": "b" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-global-assign > invalid + +```js +/*global b:false*/ function f() { b++; } +``` + +```json +{ + "errors": [ + { + "messageId": "globalShouldNotBeModified", + "data": { + "name": "b" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-global-assign > invalid + +```js +/*global b*/ b = 1; +``` + +```json +{ + "errors": [ + { + "messageId": "globalShouldNotBeModified", + "data": { + "name": "b" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +### `no-implicit-globals` + +Pass: 152 / 245 (62.0%) +Fail: 93 / 245 (38.0%) + +#### no-implicit-globals > valid + +```js +var foo = 1; +``` + +```json +{ + "languageOptions": { + "parserOptions": { + "ecmaFeatures": { + "globalReturn": true + } + } + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-implicit-globals', + message: "Unexpected 'var' declaration in the global scope, wrap in an IIFE for a local variable, assign as global property for a global variable.", + messageId: 'globalNonLexicalBinding', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 4, + endLine: 1, + endColumn: 11, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-implicit-globals > valid + +```js +function foo() {} +``` + +```json +{ + "languageOptions": { + "parserOptions": { + "ecmaFeatures": { + "globalReturn": true + } + } + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-implicit-globals', + message: 'Unexpected function declaration in the global scope, wrap in an IIFE for a local variable, assign as global property for a global variable.', + messageId: 'globalNonLexicalBinding', + severity: 1, + nodeType: 'FunctionDeclaration', + line: 1, + column: 0, + endLine: 1, + endColumn: 17, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-implicit-globals > valid + +```js +var foo = 1; +``` + +```json +{ + "languageOptions": { + "sourceType": "commonjs" + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-implicit-globals', + message: "Unexpected 'var' declaration in the global scope, wrap in an IIFE for a local variable, assign as global property for a global variable.", + messageId: 'globalNonLexicalBinding', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 4, + endLine: 1, + endColumn: 11, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-implicit-globals > valid + +```js +function foo() {} +``` + +```json +{ + "languageOptions": { + "sourceType": "commonjs" + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-implicit-globals', + message: 'Unexpected function declaration in the global scope, wrap in an IIFE for a local variable, assign as global property for a global variable.', + messageId: 'globalNonLexicalBinding', + severity: 1, + nodeType: 'FunctionDeclaration', + line: 1, + column: 0, + endLine: 1, + endColumn: 17, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-implicit-globals > valid + +```js +/* global foo: writable*/ foo = bar +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-implicit-globals', + message: 'Global variable leak, declare the variable if it is intended to be local.', + messageId: 'globalVariableLeak', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 26, + endLine: 1, + endColumn: 35, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-implicit-globals > valid + +```js +foo = 1; +``` + +```json +{ + "languageOptions": { + "globals": { + "foo": "writable" + } + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-implicit-globals', + message: 'Global variable leak, declare the variable if it is intended to be local.', + messageId: 'globalVariableLeak', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 0, + endLine: 1, + endColumn: 7, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-implicit-globals > valid + +```js +/*global foo:writable*/ var foo = 1; +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-implicit-globals', + message: "Unexpected 'var' declaration in the global scope, wrap in an IIFE for a local variable, assign as global property for a global variable.", + messageId: 'globalNonLexicalBinding', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 28, + endLine: 1, + endColumn: 35, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-implicit-globals > valid + +```js +function foo() {} +``` + +```json +{ + "languageOptions": { + "globals": { + "foo": "writable" + } + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-implicit-globals', + message: 'Unexpected function declaration in the global scope, wrap in an IIFE for a local variable, assign as global property for a global variable.', + messageId: 'globalNonLexicalBinding', + severity: 1, + nodeType: 'FunctionDeclaration', + line: 1, + column: 0, + endLine: 1, + endColumn: 17, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-implicit-globals > valid + +```js +/*global foo:writable*/ function *foo() {} +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2015 + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-implicit-globals', + message: 'Unexpected function declaration in the global scope, wrap in an IIFE for a local variable, assign as global property for a global variable.', + messageId: 'globalNonLexicalBinding', + severity: 1, + nodeType: 'FunctionDeclaration', + line: 1, + column: 24, + endLine: 1, + endColumn: 42, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-implicit-globals > valid + +```js +/*global foo:writable*/ const foo = 1; +``` + +```json +{ + "options": [ + { + "lexicalBindings": true + } + ], + "languageOptions": { + "ecmaVersion": 2015 + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-implicit-globals', + message: "Unexpected 'const' declaration in the global scope, wrap in a block or in an IIFE.", + messageId: 'globalLexicalBinding', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 30, + endLine: 1, + endColumn: 37, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-implicit-globals > valid + +```js +/*global foo:writable*/ let foo; +``` + +```json +{ + "options": [ + { + "lexicalBindings": true + } + ], + "languageOptions": { + "ecmaVersion": 2015 + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-implicit-globals', + message: "Unexpected 'let' declaration in the global scope, wrap in a block or in an IIFE.", + messageId: 'globalLexicalBinding', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 28, + endLine: 1, + endColumn: 31, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-implicit-globals > valid + +```js +/*global Foo:writable*/ class Foo {} +``` + +```json +{ + "options": [ + { + "lexicalBindings": true + } + ], + "languageOptions": { + "ecmaVersion": 2015 + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-implicit-globals', + message: 'Unexpected class declaration in the global scope, wrap in a block or in an IIFE.', + messageId: 'globalLexicalBinding', + severity: 1, + nodeType: 'ClassDeclaration', + line: 1, + column: 24, + endLine: 1, + endColumn: 36, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-implicit-globals > valid + +```js +/*global foo:writable*/ foo = 1; +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-implicit-globals', + message: 'Global variable leak, declare the variable if it is intended to be local.', + messageId: 'globalVariableLeak', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 24, + endLine: 1, + endColumn: 31, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-implicit-globals > valid + +```js +foo = 1 +``` + +```json +{ + "languageOptions": { + "globals": { + "foo": "writable" + } + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-implicit-globals', + message: 'Global variable leak, declare the variable if it is intended to be local.', + messageId: 'globalVariableLeak', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 0, + endLine: 1, + endColumn: 7, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-implicit-globals > valid + +```js +/* exported foo */ var foo = 'foo'; +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-implicit-globals', + message: "Unexpected 'var' declaration in the global scope, wrap in an IIFE for a local variable, assign as global property for a global variable.", + messageId: 'globalNonLexicalBinding', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 23, + endLine: 1, + endColumn: 34, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-implicit-globals > valid + +```js +/* exported foo */ function foo() {} +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-implicit-globals', + message: 'Unexpected function declaration in the global scope, wrap in an IIFE for a local variable, assign as global property for a global variable.', + messageId: 'globalNonLexicalBinding', + severity: 1, + nodeType: 'FunctionDeclaration', + line: 1, + column: 19, + endLine: 1, + endColumn: 36, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-implicit-globals > valid + +```js +/* exported foo */ function *foo() {} +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2015 + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-implicit-globals', + message: 'Unexpected function declaration in the global scope, wrap in an IIFE for a local variable, assign as global property for a global variable.', + messageId: 'globalNonLexicalBinding', + severity: 1, + nodeType: 'FunctionDeclaration', + line: 1, + column: 19, + endLine: 1, + endColumn: 37, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-implicit-globals > valid + +```js +/* exported foo */ async function foo() {} +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2017 + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-implicit-globals', + message: 'Unexpected function declaration in the global scope, wrap in an IIFE for a local variable, assign as global property for a global variable.', + messageId: 'globalNonLexicalBinding', + severity: 1, + nodeType: 'FunctionDeclaration', + line: 1, + column: 19, + endLine: 1, + endColumn: 42, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-implicit-globals > valid + +```js +/* exported foo */ async function *foo() {} +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2018 + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-implicit-globals', + message: 'Unexpected function declaration in the global scope, wrap in an IIFE for a local variable, assign as global property for a global variable.', + messageId: 'globalNonLexicalBinding', + severity: 1, + nodeType: 'FunctionDeclaration', + line: 1, + column: 19, + endLine: 1, + endColumn: 43, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-implicit-globals > valid + +```js +/* exported foo */ var foo = function() {}; +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-implicit-globals', + message: "Unexpected 'var' declaration in the global scope, wrap in an IIFE for a local variable, assign as global property for a global variable.", + messageId: 'globalNonLexicalBinding', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 23, + endLine: 1, + endColumn: 42, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-implicit-globals > valid + +```js +/* exported foo */ var foo = function foo() {}; +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-implicit-globals', + message: "Unexpected 'var' declaration in the global scope, wrap in an IIFE for a local variable, assign as global property for a global variable.", + messageId: 'globalNonLexicalBinding', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 23, + endLine: 1, + endColumn: 46, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-implicit-globals > valid + +```js +/* exported foo */ var foo = function*() {}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2015 + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-implicit-globals', + message: "Unexpected 'var' declaration in the global scope, wrap in an IIFE for a local variable, assign as global property for a global variable.", + messageId: 'globalNonLexicalBinding', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 23, + endLine: 1, + endColumn: 43, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-implicit-globals > valid + +```js +/* exported foo */ var foo = function *foo() {}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2015 + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-implicit-globals', + message: "Unexpected 'var' declaration in the global scope, wrap in an IIFE for a local variable, assign as global property for a global variable.", + messageId: 'globalNonLexicalBinding', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 23, + endLine: 1, + endColumn: 47, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-implicit-globals > valid + +```js +/* exported foo, bar */ var foo = 1, bar = 2; +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/no-implicit-globals', + message: "Unexpected 'var' declaration in the global scope, wrap in an IIFE for a local variable, assign as global property for a global variable.", + messageId: 'globalNonLexicalBinding', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 28, + endLine: 1, + endColumn: 35, + suggestions: null + }, + { + ruleId: 'rule-to-test/no-implicit-globals', + message: "Unexpected 'var' declaration in the global scope, wrap in an IIFE for a local variable, assign as global property for a global variable.", + messageId: 'globalNonLexicalBinding', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 37, + endLine: 1, + endColumn: 44, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-implicit-globals > valid + +```js +/* exported a */ const a = 1; +``` + +```json +{ + "options": [ + { + "lexicalBindings": true + } + ], + "languageOptions": { + "ecmaVersion": 2015 + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-implicit-globals', + message: "Unexpected 'const' declaration in the global scope, wrap in a block or in an IIFE.", + messageId: 'globalLexicalBinding', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 23, + endLine: 1, + endColumn: 28, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-implicit-globals > valid + +```js +/* exported a */ let a; +``` + +```json +{ + "options": [ + { + "lexicalBindings": true + } + ], + "languageOptions": { + "ecmaVersion": 2015 + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-implicit-globals', + message: "Unexpected 'let' declaration in the global scope, wrap in a block or in an IIFE.", + messageId: 'globalLexicalBinding', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 21, + endLine: 1, + endColumn: 22, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-implicit-globals > valid + +```js +/* exported a */ let a = 1; +``` + +```json +{ + "options": [ + { + "lexicalBindings": true + } + ], + "languageOptions": { + "ecmaVersion": 2015 + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-implicit-globals', + message: "Unexpected 'let' declaration in the global scope, wrap in a block or in an IIFE.", + messageId: 'globalLexicalBinding', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 21, + endLine: 1, + endColumn: 26, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-implicit-globals > valid + +```js +/* exported A */ class A {} +``` + +```json +{ + "options": [ + { + "lexicalBindings": true + } + ], + "languageOptions": { + "ecmaVersion": 2015 + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-implicit-globals', + message: 'Unexpected class declaration in the global scope, wrap in a block or in an IIFE.', + messageId: 'globalLexicalBinding', + severity: 1, + nodeType: 'ClassDeclaration', + line: 1, + column: 17, + endLine: 1, + endColumn: 27, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-implicit-globals > valid + +```js +/* exported a, b */ const a = 1; const b = 2; +``` + +```json +{ + "options": [ + { + "lexicalBindings": true + } + ], + "languageOptions": { + "ecmaVersion": 2015 + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/no-implicit-globals', + message: "Unexpected 'const' declaration in the global scope, wrap in a block or in an IIFE.", + messageId: 'globalLexicalBinding', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 26, + endLine: 1, + endColumn: 31, + suggestions: null + }, + { + ruleId: 'rule-to-test/no-implicit-globals', + message: "Unexpected 'const' declaration in the global scope, wrap in a block or in an IIFE.", + messageId: 'globalLexicalBinding', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 39, + endLine: 1, + endColumn: 44, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-implicit-globals > valid + +```js +/* exported a, b */ const a = 1, b = 2; +``` + +```json +{ + "options": [ + { + "lexicalBindings": true + } + ], + "languageOptions": { + "ecmaVersion": 2015 + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/no-implicit-globals', + message: "Unexpected 'const' declaration in the global scope, wrap in a block or in an IIFE.", + messageId: 'globalLexicalBinding', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 26, + endLine: 1, + endColumn: 31, + suggestions: null + }, + { + ruleId: 'rule-to-test/no-implicit-globals', + message: "Unexpected 'const' declaration in the global scope, wrap in a block or in an IIFE.", + messageId: 'globalLexicalBinding', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 33, + endLine: 1, + endColumn: 38, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-implicit-globals > valid + +```js +/* exported a, b */ let a, b = 1; +``` + +```json +{ + "options": [ + { + "lexicalBindings": true + } + ], + "languageOptions": { + "ecmaVersion": 2015 + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/no-implicit-globals', + message: "Unexpected 'let' declaration in the global scope, wrap in a block or in an IIFE.", + messageId: 'globalLexicalBinding', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 24, + endLine: 1, + endColumn: 25, + suggestions: null + }, + { + ruleId: 'rule-to-test/no-implicit-globals', + message: "Unexpected 'let' declaration in the global scope, wrap in a block or in an IIFE.", + messageId: 'globalLexicalBinding', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 27, + endLine: 1, + endColumn: 32, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-implicit-globals > valid + +```js +/* exported a, b, C */ const a = 1; let b; class C {} +``` + +```json +{ + "options": [ + { + "lexicalBindings": true + } + ], + "languageOptions": { + "ecmaVersion": 2015 + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 3: [ + { + ruleId: 'rule-to-test/no-implicit-globals', + message: "Unexpected 'const' declaration in the global scope, wrap in a block or in an IIFE.", + messageId: 'globalLexicalBinding', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 29, + endLine: 1, + endColumn: 34, + suggestions: null + }, + { + ruleId: 'rule-to-test/no-implicit-globals', + message: "Unexpected 'let' declaration in the global scope, wrap in a block or in an IIFE.", + messageId: 'globalLexicalBinding', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 40, + endLine: 1, + endColumn: 41, + suggestions: null + }, + { + ruleId: 'rule-to-test/no-implicit-globals', + message: 'Unexpected class declaration in the global scope, wrap in a block or in an IIFE.', + messageId: 'globalLexicalBinding', + severity: 1, + nodeType: 'ClassDeclaration', + line: 1, + column: 43, + endLine: 1, + endColumn: 53, + suggestions: null + } +] + +3 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-implicit-globals > valid + +```js +/* exported a, b, c */ const [a, b, ...c] = []; +``` + +```json +{ + "options": [ + { + "lexicalBindings": true + } + ], + "languageOptions": { + "ecmaVersion": 2015 + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 3: [ + { + ruleId: 'rule-to-test/no-implicit-globals', + message: "Unexpected 'const' declaration in the global scope, wrap in a block or in an IIFE.", + messageId: 'globalLexicalBinding', + severity: 1, + nodeType: 'ArrayPattern', + line: 1, + column: 29, + endLine: 1, + endColumn: 46, + suggestions: null + }, + { + ruleId: 'rule-to-test/no-implicit-globals', + message: "Unexpected 'const' declaration in the global scope, wrap in a block or in an IIFE.", + messageId: 'globalLexicalBinding', + severity: 1, + nodeType: 'ArrayPattern', + line: 1, + column: 29, + endLine: 1, + endColumn: 46, + suggestions: null + }, + { + ruleId: 'rule-to-test/no-implicit-globals', + message: "Unexpected 'const' declaration in the global scope, wrap in a block or in an IIFE.", + messageId: 'globalLexicalBinding', + severity: 1, + nodeType: 'ArrayPattern', + line: 1, + column: 29, + endLine: 1, + endColumn: 46, + suggestions: null + } +] + +3 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-implicit-globals > valid + +```js +/* exported a, b, c */ let { a, foo: b, bar: { c } } = {}; +``` + +```json +{ + "options": [ + { + "lexicalBindings": true + } + ], + "languageOptions": { + "ecmaVersion": 2015 + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 3: [ + { + ruleId: 'rule-to-test/no-implicit-globals', + message: "Unexpected 'let' declaration in the global scope, wrap in a block or in an IIFE.", + messageId: 'globalLexicalBinding', + severity: 1, + nodeType: 'ObjectPattern', + line: 1, + column: 27, + endLine: 1, + endColumn: 57, + suggestions: null + }, + { + ruleId: 'rule-to-test/no-implicit-globals', + message: "Unexpected 'let' declaration in the global scope, wrap in a block or in an IIFE.", + messageId: 'globalLexicalBinding', + severity: 1, + nodeType: 'ObjectPattern', + line: 1, + column: 27, + endLine: 1, + endColumn: 57, + suggestions: null + }, + { + ruleId: 'rule-to-test/no-implicit-globals', + message: "Unexpected 'let' declaration in the global scope, wrap in a block or in an IIFE.", + messageId: 'globalLexicalBinding', + severity: 1, + nodeType: 'ObjectPattern', + line: 1, + column: 27, + endLine: 1, + endColumn: 57, + suggestions: null + } +] + +3 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-implicit-globals > invalid + +```js +/*global foo:writable*/ foo = bar = 1 +``` + +```json +{ + "errors": [ + { + "message": "Global variable leak, declare the variable if it is intended to be local.", + "column": 31 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 2: [ + { + ruleId: 'rule-to-test/no-implicit-globals', + message: 'Global variable leak, declare the variable if it is intended to be local.', + messageId: 'globalVariableLeak', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 24, + endLine: 1, + endColumn: 37, + suggestions: null + }, + { + ruleId: 'rule-to-test/no-implicit-globals', + message: 'Global variable leak, declare the variable if it is intended to be local.', + messageId: 'globalVariableLeak', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 30, + endLine: 1, + endColumn: 37, + suggestions: null + } +] + +2 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-implicit-globals > invalid + +```js +/*global bar:writable*/ foo = bar = 1 +``` + +```json +{ + "errors": [ + { + "message": "Global variable leak, declare the variable if it is intended to be local.", + "column": 25 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 2: [ + { + ruleId: 'rule-to-test/no-implicit-globals', + message: 'Global variable leak, declare the variable if it is intended to be local.', + messageId: 'globalVariableLeak', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 24, + endLine: 1, + endColumn: 37, + suggestions: null + }, + { + ruleId: 'rule-to-test/no-implicit-globals', + message: 'Global variable leak, declare the variable if it is intended to be local.', + messageId: 'globalVariableLeak', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 30, + endLine: 1, + endColumn: 37, + suggestions: null + } +] + +2 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-implicit-globals > invalid + +```js +foo = 1; var bar; +``` + +```json +{ + "errors": [ + { + "message": "Global variable leak, declare the variable if it is intended to be local." + }, + { + "message": "Unexpected 'var' declaration in the global scope, wrap in an IIFE for a local variable, assign as global property for a global variable." + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Expected values to be strictly equal: ++ actual - expected + ++ "Unexpected 'var' declaration in the global scope, wrap in an IIFE for a local variable, assign as global property for a global variable." +- 'Global variable leak, declare the variable if it is intended to be local.' + + at assertMessageMatches (apps/oxlint/dist/index.js) + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-implicit-globals > invalid + +```js +/*global foo:writable*/ var foo = bar = 1; +``` + +```json +{ + "errors": [ + { + "message": "Global variable leak, declare the variable if it is intended to be local.", + "column": 35 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 2: [ + { + ruleId: 'rule-to-test/no-implicit-globals', + message: "Unexpected 'var' declaration in the global scope, wrap in an IIFE for a local variable, assign as global property for a global variable.", + messageId: 'globalNonLexicalBinding', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 28, + endLine: 1, + endColumn: 41, + suggestions: null + }, + { + ruleId: 'rule-to-test/no-implicit-globals', + message: 'Global variable leak, declare the variable if it is intended to be local.', + messageId: 'globalVariableLeak', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 34, + endLine: 1, + endColumn: 41, + suggestions: null + } +] + +2 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-implicit-globals > invalid + +```js +/*global bar:writable*/ var foo = bar = 1; +``` + +```json +{ + "errors": [ + { + "message": "Unexpected 'var' declaration in the global scope, wrap in an IIFE for a local variable, assign as global property for a global variable." + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 2: [ + { + ruleId: 'rule-to-test/no-implicit-globals', + message: "Unexpected 'var' declaration in the global scope, wrap in an IIFE for a local variable, assign as global property for a global variable.", + messageId: 'globalNonLexicalBinding', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 28, + endLine: 1, + endColumn: 41, + suggestions: null + }, + { + ruleId: 'rule-to-test/no-implicit-globals', + message: 'Global variable leak, declare the variable if it is intended to be local.', + messageId: 'globalVariableLeak', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 34, + endLine: 1, + endColumn: 41, + suggestions: null + } +] + +2 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-implicit-globals > invalid + +```js +/*global foo:writable*/ [foo, bar] = []; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2015 + }, + "errors": [ + { + "message": "Global variable leak, declare the variable if it is intended to be local.", + "column": 25 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 2: [ + { + ruleId: 'rule-to-test/no-implicit-globals', + message: 'Global variable leak, declare the variable if it is intended to be local.', + messageId: 'globalVariableLeak', + severity: 1, + nodeType: 'ArrayPattern', + line: 1, + column: 24, + endLine: 1, + endColumn: 39, + suggestions: null + }, + { + ruleId: 'rule-to-test/no-implicit-globals', + message: 'Global variable leak, declare the variable if it is intended to be local.', + messageId: 'globalVariableLeak', + severity: 1, + nodeType: 'ArrayPattern', + line: 1, + column: 24, + endLine: 1, + endColumn: 39, + suggestions: null + } +] + +2 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-implicit-globals > invalid + +```js +/*global bar:writable*/ [foo, bar] = []; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2015 + }, + "errors": [ + { + "message": "Global variable leak, declare the variable if it is intended to be local.", + "column": 25 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 2: [ + { + ruleId: 'rule-to-test/no-implicit-globals', + message: 'Global variable leak, declare the variable if it is intended to be local.', + messageId: 'globalVariableLeak', + severity: 1, + nodeType: 'ArrayPattern', + line: 1, + column: 24, + endLine: 1, + endColumn: 39, + suggestions: null + }, + { + ruleId: 'rule-to-test/no-implicit-globals', + message: 'Global variable leak, declare the variable if it is intended to be local.', + messageId: 'globalVariableLeak', + severity: 1, + nodeType: 'ArrayPattern', + line: 1, + column: 24, + endLine: 1, + endColumn: 39, + suggestions: null + } +] + +2 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-implicit-globals > invalid + +```js +window = 1; +``` + +```json +{ + "languageOptions": { + "globals": { + "AbortController": false, + "AbortSignal": false, + "AbsoluteOrientationSensor": false, + "AbstractRange": false, + "Accelerometer": false, + "addEventListener": false, + "ai": false, + "AI": false, + "AICreateMonitor": false, + "AITextSession": false, + "alert": false, + "AnalyserNode": false, + "Animation": false, + "AnimationEffect": false, + "AnimationEvent": false, + "AnimationPlaybackEvent": false, + "AnimationTimeline": false, + "AsyncDisposableStack": false, + "atob": false, + "Attr": false, + "Audio": false, + "AudioBuffer": false, + "AudioBufferSourceNode": false, + "AudioContext": false, + "AudioData": false, + "AudioDecoder": false, + "AudioDestinationNode": false, + "AudioEncoder": false, + "AudioListener": false, + "AudioNode": false, + "AudioParam": false, + "AudioParamMap": false, + "AudioProcessingEvent": false, + "AudioScheduledSourceNode": false, + "AudioSinkInfo": false, + "AudioWorklet": false, + "AudioWorkletGlobalScope": false, + "AudioWorkletNode": false, + "AudioWorkletProcessor": false, + "AuthenticatorAssertionResponse": false, + "AuthenticatorAttestationResponse": false, + "AuthenticatorResponse": false, + "BackgroundFetchManager": false, + "BackgroundFetchRecord": false, + "BackgroundFetchRegistration": false, + "BarcodeDetector": false, + "BarProp": false, + "BaseAudioContext": false, + "BatteryManager": false, + "BeforeUnloadEvent": false, + "BiquadFilterNode": false, + "Blob": false, + "BlobEvent": false, + "Bluetooth": false, + "BluetoothCharacteristicProperties": false, + "BluetoothDevice": false, + "BluetoothRemoteGATTCharacteristic": false, + "BluetoothRemoteGATTDescriptor": false, + "BluetoothRemoteGATTServer": false, + "BluetoothRemoteGATTService": false, + "BluetoothUUID": false, + "blur": false, + "BroadcastChannel": false, + "BrowserCaptureMediaStreamTrack": false, + "btoa": false, + "ByteLengthQueuingStrategy": false, + "Cache": false, + "caches": false, + "CacheStorage": false, + "cancelAnimationFrame": false, + "cancelIdleCallback": false, + "CanvasCaptureMediaStream": false, + "CanvasCaptureMediaStreamTrack": false, + "CanvasGradient": false, + "CanvasPattern": false, + "CanvasRenderingContext2D": false, + "CaptureController": false, + "CaretPosition": false, + "CDATASection": false, + "ChannelMergerNode": false, + "ChannelSplitterNode": false, + "ChapterInformation": false, + "CharacterBoundsUpdateEvent": false, + "CharacterData": false, + "clearInterval": false, + "clearTimeout": false, + "clientInformation": false, + "Clipboard": false, + "ClipboardChangeEvent": false, + "ClipboardEvent": false, + "ClipboardItem": false, + "close": false, + "closed": false, + "CloseEvent": false, + "CloseWatcher": false, + "CommandEvent": false, + "Comment": false, + "CompositionEvent": false, + "CompressionStream": false, + "confirm": false, + "console": false, + "ConstantSourceNode": false, + "ContentVisibilityAutoStateChangeEvent": false, + "ConvolverNode": false, + "CookieChangeEvent": false, + "CookieDeprecationLabel": false, + "cookieStore": false, + "CookieStore": false, + "CookieStoreManager": false, + "CountQueuingStrategy": false, + "createImageBitmap": false, + "CreateMonitor": false, + "Credential": false, + "credentialless": false, + "CredentialsContainer": false, + "CropTarget": false, + "crossOriginIsolated": false, + "crypto": false, + "Crypto": false, + "CryptoKey": false, + "CSPViolationReportBody": false, + "CSS": false, + "CSSAnimation": false, + "CSSConditionRule": false, + "CSSContainerRule": false, + "CSSCounterStyleRule": false, + "CSSFontFaceRule": false, + "CSSFontFeatureValuesRule": false, + "CSSFontPaletteValuesRule": false, + "CSSFunctionDeclarations": false, + "CSSFunctionDescriptors": false, + "CSSFunctionRule": false, + "CSSGroupingRule": false, + "CSSImageValue": false, + "CSSImportRule": false, + "CSSKeyframeRule": false, + "CSSKeyframesRule": false, + "CSSKeywordValue": false, + "CSSLayerBlockRule": false, + "CSSLayerStatementRule": false, + "CSSMarginRule": false, + "CSSMathClamp": false, + "CSSMathInvert": false, + "CSSMathMax": false, + "CSSMathMin": false, + "CSSMathNegate": false, + "CSSMathProduct": false, + "CSSMathSum": false, + "CSSMathValue": false, + "CSSMatrixComponent": false, + "CSSMediaRule": false, + "CSSNamespaceRule": false, + "CSSNestedDeclarations": false, + "CSSNumericArray": false, + "CSSNumericValue": false, + "CSSPageDescriptors": false, + "CSSPageRule": false, + "CSSPerspective": false, + "CSSPositionTryDescriptors": false, + "CSSPositionTryRule": false, + "CSSPositionValue": false, + "CSSPropertyRule": false, + "CSSRotate": false, + "CSSRule": false, + "CSSRuleList": false, + "CSSScale": false, + "CSSScopeRule": false, + "CSSSkew": false, + "CSSSkewX": false, + "CSSSkewY": false, + "CSSStartingStyleRule": false, + "CSSStyleDeclaration": false, + "CSSStyleRule": false, + "CSSStyleSheet": false, + "CSSStyleValue": false, + "CSSSupportsRule": false, + "CSSTransformComponent": false, + "CSSTransformValue": false, + "CSSTransition": false, + "CSSTranslate": false, + "CSSUnitValue": false, + "CSSUnparsedValue": false, + "CSSVariableReferenceValue": false, + "CSSViewTransitionRule": false, + "currentFrame": false, + "currentTime": false, + "CustomElementRegistry": false, + "customElements": false, + "CustomEvent": false, + "CustomStateSet": false, + "DataTransfer": false, + "DataTransferItem": false, + "DataTransferItemList": false, + "DecompressionStream": false, + "DelayNode": false, + "DelegatedInkTrailPresenter": false, + "DeviceMotionEvent": false, + "DeviceMotionEventAcceleration": false, + "DeviceMotionEventRotationRate": false, + "DeviceOrientationEvent": false, + "devicePixelRatio": false, + "DevicePosture": false, + "DigitalCredential": false, + "dispatchEvent": false, + "DisposableStack": false, + "document": false, + "Document": false, + "DocumentFragment": false, + "documentPictureInPicture": false, + "DocumentPictureInPicture": false, + "DocumentPictureInPictureEvent": false, + "DocumentTimeline": false, + "DocumentType": false, + "DOMError": false, + "DOMException": false, + "DOMImplementation": false, + "DOMMatrix": false, + "DOMMatrixReadOnly": false, + "DOMParser": false, + "DOMPoint": false, + "DOMPointReadOnly": false, + "DOMQuad": false, + "DOMRect": false, + "DOMRectList": false, + "DOMRectReadOnly": false, + "DOMStringList": false, + "DOMStringMap": false, + "DOMTokenList": false, + "DragEvent": false, + "DynamicsCompressorNode": false, + "EditContext": false, + "Element": false, + "ElementInternals": false, + "EncodedAudioChunk": false, + "EncodedVideoChunk": false, + "ErrorEvent": false, + "event": false, + "Event": false, + "EventCounts": false, + "EventSource": false, + "EventTarget": false, + "external": false, + "External": false, + "EyeDropper": false, + "FeaturePolicy": false, + "FederatedCredential": false, + "fence": false, + "Fence": false, + "FencedFrameConfig": false, + "fetch": false, + "fetchLater": false, + "FetchLaterResult": false, + "File": false, + "FileList": false, + "FileReader": false, + "FileSystem": false, + "FileSystemDirectoryEntry": false, + "FileSystemDirectoryHandle": false, + "FileSystemDirectoryReader": false, + "FileSystemEntry": false, + "FileSystemFileEntry": false, + "FileSystemFileHandle": false, + "FileSystemHandle": false, + "FileSystemObserver": false, + "FileSystemWritableFileStream": false, + "find": false, + "focus": false, + "FocusEvent": false, + "FontData": false, + "FontFace": false, + "FontFaceSet": false, + "FontFaceSetLoadEvent": false, + "FormData": false, + "FormDataEvent": false, + "FragmentDirective": false, + "frameElement": false, + "frames": false, + "GainNode": false, + "Gamepad": false, + "GamepadAxisMoveEvent": false, + "GamepadButton": false, + "GamepadButtonEvent": false, + "GamepadEvent": false, + "GamepadHapticActuator": false, + "GamepadPose": false, + "Geolocation": false, + "GeolocationCoordinates": false, + "GeolocationPosition": false, + "GeolocationPositionError": false, + "getComputedStyle": false, + "getScreenDetails": false, + "getSelection": false, + "GPU": false, + "GPUAdapter": false, + "GPUAdapterInfo": false, + "GPUBindGroup": false, + "GPUBindGroupLayout": false, + "GPUBuffer": false, + "GPUBufferUsage": false, + "GPUCanvasContext": false, + "GPUColorWrite": false, + "GPUCommandBuffer": false, + "GPUCommandEncoder": false, + "GPUCompilationInfo": false, + "GPUCompilationMessage": false, + "GPUComputePassEncoder": false, + "GPUComputePipeline": false, + "GPUDevice": false, + "GPUDeviceLostInfo": false, + "GPUError": false, + "GPUExternalTexture": false, + "GPUInternalError": false, + "GPUMapMode": false, + "GPUOutOfMemoryError": false, + "GPUPipelineError": false, + "GPUPipelineLayout": false, + "GPUQuerySet": false, + "GPUQueue": false, + "GPURenderBundle": false, + "GPURenderBundleEncoder": false, + "GPURenderPassEncoder": false, + "GPURenderPipeline": false, + "GPUSampler": false, + "GPUShaderModule": false, + "GPUShaderStage": false, + "GPUSupportedFeatures": false, + "GPUSupportedLimits": false, + "GPUTexture": false, + "GPUTextureUsage": false, + "GPUTextureView": false, + "GPUUncapturedErrorEvent": false, + "GPUValidationError": false, + "GravitySensor": false, + "Gyroscope": false, + "HashChangeEvent": false, + "Headers": false, + "HID": false, + "HIDConnectionEvent": false, + "HIDDevice": false, + "HIDInputReportEvent": false, + "Highlight": false, + "HighlightRegistry": false, + "history": false, + "History": false, + "HTMLAllCollection": false, + "HTMLAnchorElement": false, + "HTMLAreaElement": false, + "HTMLAudioElement": false, + "HTMLBaseElement": false, + "HTMLBodyElement": false, + "HTMLBRElement": false, + "HTMLButtonElement": false, + "HTMLCanvasElement": false, + "HTMLCollection": false, + "HTMLDataElement": false, + "HTMLDataListElement": false, + "HTMLDetailsElement": false, + "HTMLDialogElement": false, + "HTMLDirectoryElement": false, + "HTMLDivElement": false, + "HTMLDListElement": false, + "HTMLDocument": false, + "HTMLElement": false, + "HTMLEmbedElement": false, + "HTMLFencedFrameElement": false, + "HTMLFieldSetElement": false, + "HTMLFontElement": false, + "HTMLFormControlsCollection": false, + "HTMLFormElement": false, + "HTMLFrameElement": false, + "HTMLFrameSetElement": false, + "HTMLHeadElement": false, + "HTMLHeadingElement": false, + "HTMLHRElement": false, + "HTMLHtmlElement": false, + "HTMLIFrameElement": false, + "HTMLImageElement": false, + "HTMLInputElement": false, + "HTMLLabelElement": false, + "HTMLLegendElement": false, + "HTMLLIElement": false, + "HTMLLinkElement": false, + "HTMLMapElement": false, + "HTMLMarqueeElement": false, + "HTMLMediaElement": false, + "HTMLMenuElement": false, + "HTMLMetaElement": false, + "HTMLMeterElement": false, + "HTMLModElement": false, + "HTMLObjectElement": false, + "HTMLOListElement": false, + "HTMLOptGroupElement": false, + "HTMLOptionElement": false, + "HTMLOptionsCollection": false, + "HTMLOutputElement": false, + "HTMLParagraphElement": false, + "HTMLParamElement": false, + "HTMLPictureElement": false, + "HTMLPreElement": false, + "HTMLProgressElement": false, + "HTMLQuoteElement": false, + "HTMLScriptElement": false, + "HTMLSelectedContentElement": false, + "HTMLSelectElement": false, + "HTMLSlotElement": false, + "HTMLSourceElement": false, + "HTMLSpanElement": false, + "HTMLStyleElement": false, + "HTMLTableCaptionElement": false, + "HTMLTableCellElement": false, + "HTMLTableColElement": false, + "HTMLTableElement": false, + "HTMLTableRowElement": false, + "HTMLTableSectionElement": false, + "HTMLTemplateElement": false, + "HTMLTextAreaElement": false, + "HTMLTimeElement": false, + "HTMLTitleElement": false, + "HTMLTrackElement": false, + "HTMLUListElement": false, + "HTMLUnknownElement": false, + "HTMLVideoElement": false, + "IDBCursor": false, + "IDBCursorWithValue": false, + "IDBDatabase": false, + "IDBFactory": false, + "IDBIndex": false, + "IDBKeyRange": false, + "IDBObjectStore": false, + "IDBOpenDBRequest": false, + "IDBRecord": false, + "IDBRequest": false, + "IDBTransaction": false, + "IDBVersionChangeEvent": false, + "IdentityCredential": false, + "IdentityCredentialError": false, + "IdentityProvider": false, + "IdleDeadline": false, + "IdleDetector": false, + "IIRFilterNode": false, + "Image": false, + "ImageBitmap": false, + "ImageBitmapRenderingContext": false, + "ImageCapture": false, + "ImageData": false, + "ImageDecoder": false, + "ImageTrack": false, + "ImageTrackList": false, + "indexedDB": false, + "Ink": false, + "innerHeight": false, + "innerWidth": false, + "InputDeviceCapabilities": false, + "InputDeviceInfo": false, + "InputEvent": false, + "IntegrityViolationReportBody": false, + "InterestEvent": false, + "IntersectionObserver": false, + "IntersectionObserverEntry": false, + "isSecureContext": false, + "Keyboard": false, + "KeyboardEvent": false, + "KeyboardLayoutMap": false, + "KeyframeEffect": false, + "LanguageDetector": false, + "LargestContentfulPaint": false, + "LaunchParams": false, + "launchQueue": false, + "LaunchQueue": false, + "LayoutShift": false, + "LayoutShiftAttribution": false, + "length": false, + "LinearAccelerationSensor": false, + "localStorage": false, + "location": true, + "Location": false, + "locationbar": false, + "Lock": false, + "LockManager": false, + "matchMedia": false, + "MathMLElement": false, + "MediaCapabilities": false, + "MediaCapabilitiesInfo": false, + "MediaDeviceInfo": false, + "MediaDevices": false, + "MediaElementAudioSourceNode": false, + "MediaEncryptedEvent": false, + "MediaError": false, + "MediaKeyError": false, + "MediaKeyMessageEvent": false, + "MediaKeys": false, + "MediaKeySession": false, + "MediaKeyStatusMap": false, + "MediaKeySystemAccess": false, + "MediaList": false, + "MediaMetadata": false, + "MediaQueryList": false, + "MediaQueryListEvent": false, + "MediaRecorder": false, + "MediaRecorderErrorEvent": false, + "MediaSession": false, + "MediaSource": false, + "MediaSourceHandle": false, + "MediaStream": false, + "MediaStreamAudioDestinationNode": false, + "MediaStreamAudioSourceNode": false, + "MediaStreamEvent": false, + "MediaStreamTrack": false, + "MediaStreamTrackAudioSourceNode": false, + "MediaStreamTrackAudioStats": false, + "MediaStreamTrackEvent": false, + "MediaStreamTrackGenerator": false, + "MediaStreamTrackProcessor": false, + "MediaStreamTrackVideoStats": false, + "menubar": false, + "MessageChannel": false, + "MessageEvent": false, + "MessagePort": false, + "MIDIAccess": false, + "MIDIConnectionEvent": false, + "MIDIInput": false, + "MIDIInputMap": false, + "MIDIMessageEvent": false, + "MIDIOutput": false, + "MIDIOutputMap": false, + "MIDIPort": false, + "MimeType": false, + "MimeTypeArray": false, + "model": false, + "ModelGenericSession": false, + "ModelManager": false, + "MouseEvent": false, + "moveBy": false, + "moveTo": false, + "MutationEvent": false, + "MutationObserver": false, + "MutationRecord": false, + "name": false, + "NamedNodeMap": false, + "NavigateEvent": false, + "navigation": false, + "Navigation": false, + "NavigationActivation": false, + "NavigationCurrentEntryChangeEvent": false, + "NavigationDestination": false, + "NavigationHistoryEntry": false, + "NavigationPrecommitController": false, + "NavigationPreloadManager": false, + "NavigationTransition": false, + "navigator": false, + "Navigator": false, + "NavigatorLogin": false, + "NavigatorManagedData": false, + "NavigatorUAData": false, + "NetworkInformation": false, + "Node": false, + "NodeFilter": false, + "NodeIterator": false, + "NodeList": false, + "Notification": false, + "NotifyPaintEvent": false, + "NotRestoredReasonDetails": false, + "NotRestoredReasons": false, + "Observable": false, + "OfflineAudioCompletionEvent": false, + "OfflineAudioContext": false, + "offscreenBuffering": false, + "OffscreenCanvas": false, + "OffscreenCanvasRenderingContext2D": false, + "onabort": true, + "onafterprint": true, + "onanimationcancel": true, + "onanimationend": true, + "onanimationiteration": true, + "onanimationstart": true, + "onappinstalled": true, + "onauxclick": true, + "onbeforeinput": true, + "onbeforeinstallprompt": true, + "onbeforematch": true, + "onbeforeprint": true, + "onbeforetoggle": true, + "onbeforeunload": true, + "onbeforexrselect": true, + "onblur": true, + "oncancel": true, + "oncanplay": true, + "oncanplaythrough": true, + "onchange": true, + "onclick": true, + "onclose": true, + "oncommand": true, + "oncontentvisibilityautostatechange": true, + "oncontextlost": true, + "oncontextmenu": true, + "oncontextrestored": true, + "oncopy": true, + "oncuechange": true, + "oncut": true, + "ondblclick": true, + "ondevicemotion": true, + "ondeviceorientation": true, + "ondeviceorientationabsolute": true, + "ondrag": true, + "ondragend": true, + "ondragenter": true, + "ondragleave": true, + "ondragover": true, + "ondragstart": true, + "ondrop": true, + "ondurationchange": true, + "onemptied": true, + "onended": true, + "onerror": true, + "onfocus": true, + "onformdata": true, + "ongamepadconnected": true, + "ongamepaddisconnected": true, + "ongotpointercapture": true, + "onhashchange": true, + "oninput": true, + "oninvalid": true, + "onkeydown": true, + "onkeypress": true, + "onkeyup": true, + "onlanguagechange": true, + "onload": true, + "onloadeddata": true, + "onloadedmetadata": true, + "onloadstart": true, + "onlostpointercapture": true, + "onmessage": true, + "onmessageerror": true, + "onmousedown": true, + "onmouseenter": true, + "onmouseleave": true, + "onmousemove": true, + "onmouseout": true, + "onmouseover": true, + "onmouseup": true, + "onmousewheel": true, + "onoffline": true, + "ononline": true, + "onpagehide": true, + "onpagereveal": true, + "onpageshow": true, + "onpageswap": true, + "onpaste": true, + "onpause": true, + "onplay": true, + "onplaying": true, + "onpointercancel": true, + "onpointerdown": true, + "onpointerenter": true, + "onpointerleave": true, + "onpointermove": true, + "onpointerout": true, + "onpointerover": true, + "onpointerrawupdate": true, + "onpointerup": true, + "onpopstate": true, + "onprogress": true, + "onratechange": true, + "onrejectionhandled": true, + "onreset": true, + "onresize": true, + "onscroll": true, + "onscrollend": true, + "onscrollsnapchange": true, + "onscrollsnapchanging": true, + "onsearch": true, + "onsecuritypolicyviolation": true, + "onseeked": true, + "onseeking": true, + "onselect": true, + "onselectionchange": true, + "onselectstart": true, + "onslotchange": true, + "onstalled": true, + "onstorage": true, + "onsubmit": true, + "onsuspend": true, + "ontimeupdate": true, + "ontoggle": true, + "ontransitioncancel": true, + "ontransitionend": true, + "ontransitionrun": true, + "ontransitionstart": true, + "onunhandledrejection": true, + "onunload": true, + "onvolumechange": true, + "onwaiting": true, + "onwheel": true, + "open": false, + "opener": false, + "Option": false, + "OrientationSensor": false, + "origin": false, + "originAgentCluster": false, + "OscillatorNode": false, + "OTPCredential": false, + "outerHeight": false, + "outerWidth": false, + "OverconstrainedError": false, + "PageRevealEvent": false, + "PageSwapEvent": false, + "PageTransitionEvent": false, + "pageXOffset": false, + "pageYOffset": false, + "PannerNode": false, + "parent": false, + "PasswordCredential": false, + "Path2D": false, + "PaymentAddress": false, + "PaymentManager": false, + "PaymentMethodChangeEvent": false, + "PaymentRequest": false, + "PaymentRequestUpdateEvent": false, + "PaymentResponse": false, + "performance": false, + "Performance": false, + "PerformanceElementTiming": false, + "PerformanceEntry": false, + "PerformanceEventTiming": false, + "PerformanceLongAnimationFrameTiming": false, + "PerformanceLongTaskTiming": false, + "PerformanceMark": false, + "PerformanceMeasure": false, + "PerformanceNavigation": false, + "PerformanceNavigationTiming": false, + "PerformanceObserver": false, + "PerformanceObserverEntryList": false, + "PerformancePaintTiming": false, + "PerformanceResourceTiming": false, + "PerformanceScriptTiming": false, + "PerformanceServerTiming": false, + "PerformanceTiming": false, + "PeriodicSyncManager": false, + "PeriodicWave": false, + "Permissions": false, + "PermissionStatus": false, + "PERSISTENT": false, + "personalbar": false, + "PictureInPictureEvent": false, + "PictureInPictureWindow": false, + "Plugin": false, + "PluginArray": false, + "PointerEvent": false, + "PopStateEvent": false, + "postMessage": false, + "Presentation": false, + "PresentationAvailability": false, + "PresentationConnection": false, + "PresentationConnectionAvailableEvent": false, + "PresentationConnectionCloseEvent": false, + "PresentationConnectionList": false, + "PresentationReceiver": false, + "PresentationRequest": false, + "PressureObserver": false, + "PressureRecord": false, + "print": false, + "ProcessingInstruction": false, + "Profiler": false, + "ProgressEvent": false, + "PromiseRejectionEvent": false, + "prompt": false, + "ProtectedAudience": false, + "PublicKeyCredential": false, + "PushManager": false, + "PushSubscription": false, + "PushSubscriptionOptions": false, + "queryLocalFonts": false, + "queueMicrotask": false, + "QuotaExceededError": false, + "RadioNodeList": false, + "Range": false, + "ReadableByteStreamController": false, + "ReadableStream": false, + "ReadableStreamBYOBReader": false, + "ReadableStreamBYOBRequest": false, + "ReadableStreamDefaultController": false, + "ReadableStreamDefaultReader": false, + "registerProcessor": false, + "RelativeOrientationSensor": false, + "RemotePlayback": false, + "removeEventListener": false, + "ReportBody": false, + "reportError": false, + "ReportingObserver": false, + "Request": false, + "requestAnimationFrame": false, + "requestIdleCallback": false, + "resizeBy": false, + "ResizeObserver": false, + "ResizeObserverEntry": false, + "ResizeObserverSize": false, + "resizeTo": false, + "Response": false, + "RestrictionTarget": false, + "RTCCertificate": false, + "RTCDataChannel": false, + "RTCDataChannelEvent": false, + "RTCDtlsTransport": false, + "RTCDTMFSender": false, + "RTCDTMFToneChangeEvent": false, + "RTCEncodedAudioFrame": false, + "RTCEncodedVideoFrame": false, + "RTCError": false, + "RTCErrorEvent": false, + "RTCIceCandidate": false, + "RTCIceTransport": false, + "RTCPeerConnection": false, + "RTCPeerConnectionIceErrorEvent": false, + "RTCPeerConnectionIceEvent": false, + "RTCRtpReceiver": false, + "RTCRtpScriptTransform": false, + "RTCRtpSender": false, + "RTCRtpTransceiver": false, + "RTCSctpTransport": false, + "RTCSessionDescription": false, + "RTCStatsReport": false, + "RTCTrackEvent": false, + "sampleRate": false, + "scheduler": false, + "Scheduler": false, + "Scheduling": false, + "screen": false, + "Screen": false, + "ScreenDetailed": false, + "ScreenDetails": false, + "screenLeft": false, + "ScreenOrientation": false, + "screenTop": false, + "screenX": false, + "screenY": false, + "ScriptProcessorNode": false, + "scroll": false, + "scrollbars": false, + "scrollBy": false, + "ScrollTimeline": false, + "scrollTo": false, + "scrollX": false, + "scrollY": false, + "SecurityPolicyViolationEvent": false, + "Selection": false, + "self": false, + "Sensor": false, + "SensorErrorEvent": false, + "Serial": false, + "SerialPort": false, + "ServiceWorker": false, + "ServiceWorkerContainer": false, + "ServiceWorkerRegistration": false, + "sessionStorage": false, + "setInterval": false, + "setTimeout": false, + "ShadowRoot": false, + "sharedStorage": false, + "SharedStorage": false, + "SharedStorageAppendMethod": false, + "SharedStorageClearMethod": false, + "SharedStorageDeleteMethod": false, + "SharedStorageModifierMethod": false, + "SharedStorageSetMethod": false, + "SharedStorageWorklet": false, + "SharedWorker": false, + "showDirectoryPicker": false, + "showOpenFilePicker": false, + "showSaveFilePicker": false, + "SnapEvent": false, + "SourceBuffer": false, + "SourceBufferList": false, + "SpeechGrammar": false, + "SpeechGrammarList": false, + "SpeechRecognition": false, + "SpeechRecognitionErrorEvent": false, + "SpeechRecognitionEvent": false, + "SpeechRecognitionPhrase": false, + "speechSynthesis": false, + "SpeechSynthesis": false, + "SpeechSynthesisErrorEvent": false, + "SpeechSynthesisEvent": false, + "SpeechSynthesisUtterance": false, + "SpeechSynthesisVoice": false, + "StaticRange": false, + "status": false, + "statusbar": false, + "StereoPannerNode": false, + "stop": false, + "Storage": false, + "StorageBucket": false, + "StorageBucketManager": false, + "StorageEvent": false, + "StorageManager": false, + "structuredClone": false, + "styleMedia": false, + "StylePropertyMap": false, + "StylePropertyMapReadOnly": false, + "StyleSheet": false, + "StyleSheetList": false, + "SubmitEvent": false, + "Subscriber": false, + "SubtleCrypto": false, + "Summarizer": false, + "SuppressedError": false, + "SVGAElement": false, + "SVGAngle": false, + "SVGAnimatedAngle": false, + "SVGAnimatedBoolean": false, + "SVGAnimatedEnumeration": false, + "SVGAnimatedInteger": false, + "SVGAnimatedLength": false, + "SVGAnimatedLengthList": false, + "SVGAnimatedNumber": false, + "SVGAnimatedNumberList": false, + "SVGAnimatedPreserveAspectRatio": false, + "SVGAnimatedRect": false, + "SVGAnimatedString": false, + "SVGAnimatedTransformList": false, + "SVGAnimateElement": false, + "SVGAnimateMotionElement": false, + "SVGAnimateTransformElement": false, + "SVGAnimationElement": false, + "SVGCircleElement": false, + "SVGClipPathElement": false, + "SVGComponentTransferFunctionElement": false, + "SVGDefsElement": false, + "SVGDescElement": false, + "SVGElement": false, + "SVGEllipseElement": false, + "SVGFEBlendElement": false, + "SVGFEColorMatrixElement": false, + "SVGFEComponentTransferElement": false, + "SVGFECompositeElement": false, + "SVGFEConvolveMatrixElement": false, + "SVGFEDiffuseLightingElement": false, + "SVGFEDisplacementMapElement": false, + "SVGFEDistantLightElement": false, + "SVGFEDropShadowElement": false, + "SVGFEFloodElement": false, + "SVGFEFuncAElement": false, + "SVGFEFuncBElement": false, + "SVGFEFuncGElement": false, + "SVGFEFuncRElement": false, + "SVGFEGaussianBlurElement": false, + "SVGFEImageElement": false, + "SVGFEMergeElement": false, + "SVGFEMergeNodeElement": false, + "SVGFEMorphologyElement": false, + "SVGFEOffsetElement": false, + "SVGFEPointLightElement": false, + "SVGFESpecularLightingElement": false, + "SVGFESpotLightElement": false, + "SVGFETileElement": false, + "SVGFETurbulenceElement": false, + "SVGFilterElement": false, + "SVGForeignObjectElement": false, + "SVGGElement": false, + "SVGGeometryElement": false, + "SVGGradientElement": false, + "SVGGraphicsElement": false, + "SVGImageElement": false, + "SVGLength": false, + "SVGLengthList": false, + "SVGLinearGradientElement": false, + "SVGLineElement": false, + "SVGMarkerElement": false, + "SVGMaskElement": false, + "SVGMatrix": false, + "SVGMetadataElement": false, + "SVGMPathElement": false, + "SVGNumber": false, + "SVGNumberList": false, + "SVGPathElement": false, + "SVGPatternElement": false, + "SVGPoint": false, + "SVGPointList": false, + "SVGPolygonElement": false, + "SVGPolylineElement": false, + "SVGPreserveAspectRatio": false, + "SVGRadialGradientElement": false, + "SVGRect": false, + "SVGRectElement": false, + "SVGScriptElement": false, + "SVGSetElement": false, + "SVGStopElement": false, + "SVGStringList": false, + "SVGStyleElement": false, + "SVGSVGElement": false, + "SVGSwitchElement": false, + "SVGSymbolElement": false, + "SVGTextContentElement": false, + "SVGTextElement": false, + "SVGTextPathElement": false, + "SVGTextPositioningElement": false, + "SVGTitleElement": false, + "SVGTransform": false, + "SVGTransformList": false, + "SVGTSpanElement": false, + "SVGUnitTypes": false, + "SVGUseElement": false, + "SVGViewElement": false, + "SyncManager": false, + "TaskAttributionTiming": false, + "TaskController": false, + "TaskPriorityChangeEvent": false, + "TaskSignal": false, + "TEMPORARY": false, + "Text": false, + "TextDecoder": false, + "TextDecoderStream": false, + "TextEncoder": false, + "TextEncoderStream": false, + "TextEvent": false, + "TextFormat": false, + "TextFormatUpdateEvent": false, + "TextMetrics": false, + "TextTrack": false, + "TextTrackCue": false, + "TextTrackCueList": false, + "TextTrackList": false, + "TextUpdateEvent": false, + "TimeEvent": false, + "TimeRanges": false, + "ToggleEvent": false, + "toolbar": false, + "top": false, + "Touch": false, + "TouchEvent": false, + "TouchList": false, + "TrackEvent": false, + "TransformStream": false, + "TransformStreamDefaultController": false, + "TransitionEvent": false, + "Translator": false, + "TreeWalker": false, + "TrustedHTML": false, + "TrustedScript": false, + "TrustedScriptURL": false, + "TrustedTypePolicy": false, + "TrustedTypePolicyFactory": false, + "trustedTypes": false, + "UIEvent": false, + "URL": false, + "URLPattern": false, + "URLSearchParams": false, + "USB": false, + "USBAlternateInterface": false, + "USBConfiguration": false, + "USBConnectionEvent": false, + "USBDevice": false, + "USBEndpoint": false, + "USBInterface": false, + "USBInTransferResult": false, + "USBIsochronousInTransferPacket": false, + "USBIsochronousInTransferResult": false, + "USBIsochronousOutTransferPacket": false, + "USBIsochronousOutTransferResult": false, + "USBOutTransferResult": false, + "UserActivation": false, + "ValidityState": false, + "VideoColorSpace": false, + "VideoDecoder": false, + "VideoEncoder": false, + "VideoFrame": false, + "VideoPlaybackQuality": false, + "viewport": false, + "Viewport": false, + "ViewTimeline": false, + "ViewTransition": false, + "ViewTransitionTypeSet": false, + "VirtualKeyboard": false, + "VirtualKeyboardGeometryChangeEvent": false, + "VisibilityStateEntry": false, + "visualViewport": false, + "VisualViewport": false, + "VTTCue": false, + "VTTRegion": false, + "WakeLock": false, + "WakeLockSentinel": false, + "WaveShaperNode": false, + "WebAssembly": false, + "WebGL2RenderingContext": false, + "WebGLActiveInfo": false, + "WebGLBuffer": false, + "WebGLContextEvent": false, + "WebGLFramebuffer": false, + "WebGLObject": false, + "WebGLProgram": false, + "WebGLQuery": false, + "WebGLRenderbuffer": false, + "WebGLRenderingContext": false, + "WebGLSampler": false, + "WebGLShader": false, + "WebGLShaderPrecisionFormat": false, + "WebGLSync": false, + "WebGLTexture": false, + "WebGLTransformFeedback": false, + "WebGLUniformLocation": false, + "WebGLVertexArrayObject": false, + "WebSocket": false, + "WebSocketError": false, + "WebSocketStream": false, + "WebTransport": false, + "WebTransportBidirectionalStream": false, + "WebTransportDatagramDuplexStream": false, + "WebTransportError": false, + "WebTransportReceiveStream": false, + "WebTransportSendStream": false, + "WGSLLanguageFeatures": false, + "WheelEvent": false, + "when": false, + "window": false, + "Window": false, + "WindowControlsOverlay": false, + "WindowControlsOverlayGeometryChangeEvent": false, + "Worker": false, + "Worklet": false, + "WorkletGlobalScope": false, + "WritableStream": false, + "WritableStreamDefaultController": false, + "WritableStreamDefaultWriter": false, + "XMLDocument": false, + "XMLHttpRequest": false, + "XMLHttpRequestEventTarget": false, + "XMLHttpRequestUpload": false, + "XMLSerializer": false, + "XPathEvaluator": false, + "XPathExpression": false, + "XPathResult": false, + "XRAnchor": false, + "XRAnchorSet": false, + "XRBoundedReferenceSpace": false, + "XRCamera": false, + "XRCPUDepthInformation": false, + "XRDepthInformation": false, + "XRDOMOverlayState": false, + "XRFrame": false, + "XRHand": false, + "XRHitTestResult": false, + "XRHitTestSource": false, + "XRInputSource": false, + "XRInputSourceArray": false, + "XRInputSourceEvent": false, + "XRInputSourcesChangeEvent": false, + "XRJointPose": false, + "XRJointSpace": false, + "XRLayer": false, + "XRLightEstimate": false, + "XRLightProbe": false, + "XRPose": false, + "XRRay": false, + "XRReferenceSpace": false, + "XRReferenceSpaceEvent": false, + "XRRenderState": false, + "XRRigidTransform": false, + "XRSession": false, + "XRSessionEvent": false, + "XRSpace": false, + "XRSystem": false, + "XRTransientInputHitTestResult": false, + "XRTransientInputHitTestSource": false, + "XRView": false, + "XRViewerPose": false, + "XRViewport": false, + "XRWebGLBinding": false, + "XRWebGLDepthInformation": false, + "XRWebGLLayer": false, + "XSLTProcessor": false + } + }, + "errors": [ + { + "message": "Unexpected assignment to read-only global variable." + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Expected values to be strictly equal: ++ actual - expected + ++ 'Global variable leak, declare the variable if it is intended to be local.' +- 'Unexpected assignment to read-only global variable.' + + at assertMessageMatches (apps/oxlint/dist/index.js) + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-implicit-globals > invalid + +```js +/*global foo:readonly*/ foo = 1 +``` + +```json +{ + "errors": [ + { + "message": "Unexpected assignment to read-only global variable." + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Expected values to be strictly equal: ++ actual - expected + ++ 'Global variable leak, declare the variable if it is intended to be local.' +- 'Unexpected assignment to read-only global variable.' + + at assertMessageMatches (apps/oxlint/dist/index.js) + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-implicit-globals > invalid + +```js +foo = 1; +``` + +```json +{ + "languageOptions": { + "globals": { + "foo": "readonly" + } + }, + "errors": [ + { + "message": "Unexpected assignment to read-only global variable." + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Expected values to be strictly equal: ++ actual - expected + ++ 'Global variable leak, declare the variable if it is intended to be local.' +- 'Unexpected assignment to read-only global variable.' + + at assertMessageMatches (apps/oxlint/dist/index.js) + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-implicit-globals > invalid + +```js +/*global foo:readonly*/ for (foo in {}); +``` + +```json +{ + "errors": [ + { + "message": "Unexpected assignment to read-only global variable." + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Expected values to be strictly equal: ++ actual - expected + ++ 'Global variable leak, declare the variable if it is intended to be local.' +- 'Unexpected assignment to read-only global variable.' + + at assertMessageMatches (apps/oxlint/dist/index.js) + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-implicit-globals > invalid + +```js +/*global foo:readonly*/ for (foo of []); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2015 + }, + "errors": [ + { + "message": "Unexpected assignment to read-only global variable." + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Expected values to be strictly equal: ++ actual - expected + ++ 'Global variable leak, declare the variable if it is intended to be local.' +- 'Unexpected assignment to read-only global variable.' + + at assertMessageMatches (apps/oxlint/dist/index.js) + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-implicit-globals > invalid + +```js +/*global foo:readonly*/ var foo +``` + +```json +{ + "errors": [ + { + "message": "Unexpected redeclaration of read-only global variable." + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Expected values to be strictly equal: ++ actual - expected + ++ "Unexpected 'var' declaration in the global scope, wrap in an IIFE for a local variable, assign as global property for a global variable." +- 'Unexpected redeclaration of read-only global variable.' + + at assertMessageMatches (apps/oxlint/dist/index.js) + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-implicit-globals > invalid + +```js +/*global foo:readonly*/ var foo = 1 +``` + +```json +{ + "errors": [ + { + "message": "Unexpected redeclaration of read-only global variable." + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Expected values to be strictly equal: ++ actual - expected + ++ "Unexpected 'var' declaration in the global scope, wrap in an IIFE for a local variable, assign as global property for a global variable." +- 'Unexpected redeclaration of read-only global variable.' + + at assertMessageMatches (apps/oxlint/dist/index.js) + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-implicit-globals > invalid + +```js +/*global foo:readonly*/ var foo; foo = 1; +``` + +```json +{ + "errors": [ + { + "message": "Unexpected redeclaration of read-only global variable." + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Expected values to be strictly equal: ++ actual - expected + ++ "Unexpected 'var' declaration in the global scope, wrap in an IIFE for a local variable, assign as global property for a global variable." +- 'Unexpected redeclaration of read-only global variable.' + + at assertMessageMatches (apps/oxlint/dist/index.js) + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-implicit-globals > invalid + +```js +/*global foo:readonly*/ for (var foo in obj); +``` + +```json +{ + "errors": [ + { + "message": "Unexpected redeclaration of read-only global variable." + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Expected values to be strictly equal: ++ actual - expected + ++ "Unexpected 'var' declaration in the global scope, wrap in an IIFE for a local variable, assign as global property for a global variable." +- 'Unexpected redeclaration of read-only global variable.' + + at assertMessageMatches (apps/oxlint/dist/index.js) + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-implicit-globals > invalid + +```js +/*global foo:readonly*/ for (var foo in obj); foo = 1; +``` + +```json +{ + "errors": [ + { + "message": "Unexpected redeclaration of read-only global variable." + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Expected values to be strictly equal: ++ actual - expected + ++ "Unexpected 'var' declaration in the global scope, wrap in an IIFE for a local variable, assign as global property for a global variable." +- 'Unexpected redeclaration of read-only global variable.' + + at assertMessageMatches (apps/oxlint/dist/index.js) + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-implicit-globals > invalid + +```js +/*global foo:readonly*/ for (var foo of arr); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2015 + }, + "errors": [ + { + "message": "Unexpected redeclaration of read-only global variable." + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Expected values to be strictly equal: ++ actual - expected + ++ "Unexpected 'var' declaration in the global scope, wrap in an IIFE for a local variable, assign as global property for a global variable." +- 'Unexpected redeclaration of read-only global variable.' + + at assertMessageMatches (apps/oxlint/dist/index.js) + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-implicit-globals > invalid + +```js +/*global foo:readonly*/ for (var foo of arr); foo = 1; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2015 + }, + "errors": [ + { + "message": "Unexpected redeclaration of read-only global variable." + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Expected values to be strictly equal: ++ actual - expected + ++ "Unexpected 'var' declaration in the global scope, wrap in an IIFE for a local variable, assign as global property for a global variable." +- 'Unexpected redeclaration of read-only global variable.' + + at assertMessageMatches (apps/oxlint/dist/index.js) + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-implicit-globals > invalid + +```js +/*global foo:readonly*/ function foo() {} +``` + +```json +{ + "errors": [ + { + "message": "Unexpected redeclaration of read-only global variable." + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Expected values to be strictly equal: ++ actual - expected + ++ 'Unexpected function declaration in the global scope, wrap in an IIFE for a local variable, assign as global property for a global variable.' +- 'Unexpected redeclaration of read-only global variable.' + + at assertMessageMatches (apps/oxlint/dist/index.js) + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-implicit-globals > invalid + +```js +/*global foo:readonly*/ const foo = 1 +``` + +```json +{ + "options": [ + { + "lexicalBindings": true + } + ], + "languageOptions": { + "ecmaVersion": 2015 + }, + "errors": [ + { + "message": "Unexpected redeclaration of read-only global variable." + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Expected values to be strictly equal: ++ actual - expected + ++ "Unexpected 'const' declaration in the global scope, wrap in a block or in an IIFE." +- 'Unexpected redeclaration of read-only global variable.' + + at assertMessageMatches (apps/oxlint/dist/index.js) + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-implicit-globals > invalid + +```js +/*global foo:readonly*/ const foo = 1; foo = 2; +``` + +```json +{ + "options": [ + { + "lexicalBindings": true + } + ], + "languageOptions": { + "ecmaVersion": 2015 + }, + "errors": [ + { + "message": "Unexpected redeclaration of read-only global variable." + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Expected values to be strictly equal: ++ actual - expected + ++ "Unexpected 'const' declaration in the global scope, wrap in a block or in an IIFE." +- 'Unexpected redeclaration of read-only global variable.' + + at assertMessageMatches (apps/oxlint/dist/index.js) + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-implicit-globals > invalid + +```js +/*global foo:readonly*/ let foo +``` + +```json +{ + "options": [ + { + "lexicalBindings": true + } + ], + "languageOptions": { + "ecmaVersion": 2015 + }, + "errors": [ + { + "message": "Unexpected redeclaration of read-only global variable." + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Expected values to be strictly equal: ++ actual - expected + ++ "Unexpected 'let' declaration in the global scope, wrap in a block or in an IIFE." +- 'Unexpected redeclaration of read-only global variable.' + + at assertMessageMatches (apps/oxlint/dist/index.js) + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-implicit-globals > invalid + +```js +/*global foo:readonly*/ let foo = 1 +``` + +```json +{ + "options": [ + { + "lexicalBindings": true + } + ], + "languageOptions": { + "ecmaVersion": 2015 + }, + "errors": [ + { + "message": "Unexpected redeclaration of read-only global variable." + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Expected values to be strictly equal: ++ actual - expected + ++ "Unexpected 'let' declaration in the global scope, wrap in a block or in an IIFE." +- 'Unexpected redeclaration of read-only global variable.' + + at assertMessageMatches (apps/oxlint/dist/index.js) + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-implicit-globals > invalid + +```js +/*global foo:readonly*/ let foo; foo = 1; +``` + +```json +{ + "options": [ + { + "lexicalBindings": true + } + ], + "languageOptions": { + "ecmaVersion": 2015 + }, + "errors": [ + { + "message": "Unexpected redeclaration of read-only global variable." + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Expected values to be strictly equal: ++ actual - expected + ++ "Unexpected 'let' declaration in the global scope, wrap in a block or in an IIFE." +- 'Unexpected redeclaration of read-only global variable.' + + at assertMessageMatches (apps/oxlint/dist/index.js) + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-implicit-globals > invalid + +```js +/*global Foo:readonly*/ class Foo {} +``` + +```json +{ + "options": [ + { + "lexicalBindings": true + } + ], + "languageOptions": { + "ecmaVersion": 2015 + }, + "errors": [ + { + "message": "Unexpected redeclaration of read-only global variable." + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Expected values to be strictly equal: ++ actual - expected + ++ 'Unexpected class declaration in the global scope, wrap in a block or in an IIFE.' +- 'Unexpected redeclaration of read-only global variable.' + + at assertMessageMatches (apps/oxlint/dist/index.js) + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-implicit-globals > invalid + +```js +/*global foo:readonly, bar: readonly*/ foo = bar = 1 +``` + +```json +{ + "errors": [ + { + "message": "Unexpected assignment to read-only global variable.", + "column": 40 + }, + { + "message": "Unexpected assignment to read-only global variable.", + "column": 46 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Expected values to be strictly equal: ++ actual - expected + ++ 'Global variable leak, declare the variable if it is intended to be local.' +- 'Unexpected assignment to read-only global variable.' + + at assertMessageMatches (apps/oxlint/dist/index.js) + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-implicit-globals > invalid + +```js +/*global foo:writable, bar: readonly*/ foo = bar = 1 +``` + +```json +{ + "errors": [ + { + "message": "Unexpected assignment to read-only global variable.", + "column": 46 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 2: [ + { + ruleId: 'rule-to-test/no-implicit-globals', + message: 'Global variable leak, declare the variable if it is intended to be local.', + messageId: 'globalVariableLeak', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 39, + endLine: 1, + endColumn: 52, + suggestions: null + }, + { + ruleId: 'rule-to-test/no-implicit-globals', + message: 'Global variable leak, declare the variable if it is intended to be local.', + messageId: 'globalVariableLeak', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 45, + endLine: 1, + endColumn: 52, + suggestions: null + } +] + +2 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-implicit-globals > invalid + +```js +/*global foo:readonly, bar: writable*/ foo = bar = 1 +``` + +```json +{ + "errors": [ + { + "message": "Unexpected assignment to read-only global variable.", + "column": 40 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 2: [ + { + ruleId: 'rule-to-test/no-implicit-globals', + message: 'Global variable leak, declare the variable if it is intended to be local.', + messageId: 'globalVariableLeak', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 39, + endLine: 1, + endColumn: 52, + suggestions: null + }, + { + ruleId: 'rule-to-test/no-implicit-globals', + message: 'Global variable leak, declare the variable if it is intended to be local.', + messageId: 'globalVariableLeak', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 45, + endLine: 1, + endColumn: 52, + suggestions: null + } +] + +2 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-implicit-globals > invalid + +```js +/*global foo: readonly*/ foo = bar = 1 +``` + +```json +{ + "errors": [ + { + "message": "Unexpected assignment to read-only global variable.", + "column": 26 + }, + { + "message": "Global variable leak, declare the variable if it is intended to be local.", + "column": 32 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Expected values to be strictly equal: ++ actual - expected + ++ 'Global variable leak, declare the variable if it is intended to be local.' +- 'Unexpected assignment to read-only global variable.' + + at assertMessageMatches (apps/oxlint/dist/index.js) + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-implicit-globals > invalid + +```js +/*global bar: readonly*/ foo = bar = 1 +``` + +```json +{ + "errors": [ + { + "message": "Global variable leak, declare the variable if it is intended to be local.", + "column": 26 + }, + { + "message": "Unexpected assignment to read-only global variable.", + "column": 32 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Expected values to be strictly equal: ++ actual - expected + ++ 'Global variable leak, declare the variable if it is intended to be local.' +- 'Unexpected assignment to read-only global variable.' + + at assertMessageMatches (apps/oxlint/dist/index.js) + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-implicit-globals > invalid + +```js +/*global foo*/ [foo] = arr +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2015 + }, + "errors": [ + { + "message": "Unexpected assignment to read-only global variable.", + "column": 16 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Expected values to be strictly equal: ++ actual - expected + ++ 'Global variable leak, declare the variable if it is intended to be local.' +- 'Unexpected assignment to read-only global variable.' + + at assertMessageMatches (apps/oxlint/dist/index.js) + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-implicit-globals > invalid + +```js +/*global foo, bar: readonly*/ [foo, bar] = arr +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2015 + }, + "errors": [ + { + "message": "Unexpected assignment to read-only global variable.", + "column": 31 + }, + { + "message": "Unexpected assignment to read-only global variable.", + "column": 31 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Expected values to be strictly equal: ++ actual - expected + ++ 'Global variable leak, declare the variable if it is intended to be local.' +- 'Unexpected assignment to read-only global variable.' + + at assertMessageMatches (apps/oxlint/dist/index.js) + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-implicit-globals > invalid + +```js +/*global foo: readonly*/ ({ foo } = obj) +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2015 + }, + "errors": [ + { + "message": "Unexpected assignment to read-only global variable.", + "column": 27 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Expected values to be strictly equal: ++ actual - expected + ++ 'Global variable leak, declare the variable if it is intended to be local.' +- 'Unexpected assignment to read-only global variable.' + + at assertMessageMatches (apps/oxlint/dist/index.js) + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-implicit-globals > invalid + +```js +/*global foo: readonly*/ ({ 'a': foo } = obj) +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2015 + }, + "errors": [ + { + "message": "Unexpected assignment to read-only global variable.", + "column": 27 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Expected values to be strictly equal: ++ actual - expected + ++ 'Global variable leak, declare the variable if it is intended to be local.' +- 'Unexpected assignment to read-only global variable.' + + at assertMessageMatches (apps/oxlint/dist/index.js) + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-implicit-globals > invalid + +```js +/*global foo: readonly*/ ({ 'a': { 'b': [foo] } } = obj) +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2015 + }, + "errors": [ + { + "message": "Unexpected assignment to read-only global variable.", + "column": 27 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Expected values to be strictly equal: ++ actual - expected + ++ 'Global variable leak, declare the variable if it is intended to be local.' +- 'Unexpected assignment to read-only global variable.' + + at assertMessageMatches (apps/oxlint/dist/index.js) + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-implicit-globals > invalid + +```js +/*global foo, bar: readonly*/ ({ foo, 'a': bar } = obj) +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2015 + }, + "errors": [ + { + "message": "Unexpected assignment to read-only global variable.", + "column": 32 + }, + { + "message": "Unexpected assignment to read-only global variable.", + "column": 32 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Expected values to be strictly equal: ++ actual - expected + ++ 'Global variable leak, declare the variable if it is intended to be local.' +- 'Unexpected assignment to read-only global variable.' + + at assertMessageMatches (apps/oxlint/dist/index.js) + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-implicit-globals > invalid + +```js +/*global foo:readonly, bar: readonly*/ var foo, bar; +``` + +```json +{ + "errors": [ + { + "message": "Unexpected redeclaration of read-only global variable." + }, + { + "message": "Unexpected redeclaration of read-only global variable." + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Expected values to be strictly equal: ++ actual - expected + ++ "Unexpected 'var' declaration in the global scope, wrap in an IIFE for a local variable, assign as global property for a global variable." +- 'Unexpected redeclaration of read-only global variable.' + + at assertMessageMatches (apps/oxlint/dist/index.js) + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-implicit-globals > invalid + +```js +/*global foo:writable, bar: readonly*/ var foo, bar; +``` + +```json +{ + "errors": [ + { + "message": "Unexpected redeclaration of read-only global variable." + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 2: [ + { + ruleId: 'rule-to-test/no-implicit-globals', + message: "Unexpected 'var' declaration in the global scope, wrap in an IIFE for a local variable, assign as global property for a global variable.", + messageId: 'globalNonLexicalBinding', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 43, + endLine: 1, + endColumn: 46, + suggestions: null + }, + { + ruleId: 'rule-to-test/no-implicit-globals', + message: "Unexpected 'var' declaration in the global scope, wrap in an IIFE for a local variable, assign as global property for a global variable.", + messageId: 'globalNonLexicalBinding', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 48, + endLine: 1, + endColumn: 51, + suggestions: null + } +] + +2 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-implicit-globals > invalid + +```js +/*global foo:readonly, bar: writable*/ var foo, bar; +``` + +```json +{ + "errors": [ + { + "message": "Unexpected redeclaration of read-only global variable." + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 2: [ + { + ruleId: 'rule-to-test/no-implicit-globals', + message: "Unexpected 'var' declaration in the global scope, wrap in an IIFE for a local variable, assign as global property for a global variable.", + messageId: 'globalNonLexicalBinding', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 43, + endLine: 1, + endColumn: 46, + suggestions: null + }, + { + ruleId: 'rule-to-test/no-implicit-globals', + message: "Unexpected 'var' declaration in the global scope, wrap in an IIFE for a local variable, assign as global property for a global variable.", + messageId: 'globalNonLexicalBinding', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 48, + endLine: 1, + endColumn: 51, + suggestions: null + } +] + +2 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-implicit-globals > invalid + +```js +/*global foo:readonly*/ var foo, bar; +``` + +```json +{ + "errors": [ + { + "message": "Unexpected redeclaration of read-only global variable." + }, + { + "message": "Unexpected 'var' declaration in the global scope, wrap in an IIFE for a local variable, assign as global property for a global variable." + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Expected values to be strictly equal: ++ actual - expected + ++ "Unexpected 'var' declaration in the global scope, wrap in an IIFE for a local variable, assign as global property for a global variable." +- 'Unexpected redeclaration of read-only global variable.' + + at assertMessageMatches (apps/oxlint/dist/index.js) + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-implicit-globals > invalid + +```js +/*global bar: readonly*/ var foo, bar; +``` + +```json +{ + "errors": [ + { + "message": "Unexpected 'var' declaration in the global scope, wrap in an IIFE for a local variable, assign as global property for a global variable." + }, + { + "message": "Unexpected redeclaration of read-only global variable." + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Expected values to be strictly equal: ++ actual - expected + ++ "Unexpected 'var' declaration in the global scope, wrap in an IIFE for a local variable, assign as global property for a global variable." +- 'Unexpected redeclaration of read-only global variable.' + + at assertMessageMatches (apps/oxlint/dist/index.js) + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-implicit-globals > invalid + +```js +/*global foo:readonly, bar: readonly*/ const foo = 1, bar = 2; +``` + +```json +{ + "options": [ + { + "lexicalBindings": true + } + ], + "languageOptions": { + "ecmaVersion": 2015 + }, + "errors": [ + { + "message": "Unexpected redeclaration of read-only global variable." + }, + { + "message": "Unexpected redeclaration of read-only global variable." + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Expected values to be strictly equal: ++ actual - expected + ++ "Unexpected 'const' declaration in the global scope, wrap in a block or in an IIFE." +- 'Unexpected redeclaration of read-only global variable.' + + at assertMessageMatches (apps/oxlint/dist/index.js) + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-implicit-globals > invalid + +```js +/*global foo:writable, bar: readonly*/ const foo = 1, bar = 2; +``` + +```json +{ + "options": [ + { + "lexicalBindings": true + } + ], + "languageOptions": { + "ecmaVersion": 2015 + }, + "errors": [ + { + "message": "Unexpected redeclaration of read-only global variable." + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 2: [ + { + ruleId: 'rule-to-test/no-implicit-globals', + message: "Unexpected 'const' declaration in the global scope, wrap in a block or in an IIFE.", + messageId: 'globalLexicalBinding', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 45, + endLine: 1, + endColumn: 52, + suggestions: null + }, + { + ruleId: 'rule-to-test/no-implicit-globals', + message: "Unexpected 'const' declaration in the global scope, wrap in a block or in an IIFE.", + messageId: 'globalLexicalBinding', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 54, + endLine: 1, + endColumn: 61, + suggestions: null + } +] + +2 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-implicit-globals > invalid + +```js +/*global foo:readonly, bar: writable*/ const foo = 1, bar = 2; +``` + +```json +{ + "options": [ + { + "lexicalBindings": true + } + ], + "languageOptions": { + "ecmaVersion": 2015 + }, + "errors": [ + { + "message": "Unexpected redeclaration of read-only global variable." + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 2: [ + { + ruleId: 'rule-to-test/no-implicit-globals', + message: "Unexpected 'const' declaration in the global scope, wrap in a block or in an IIFE.", + messageId: 'globalLexicalBinding', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 45, + endLine: 1, + endColumn: 52, + suggestions: null + }, + { + ruleId: 'rule-to-test/no-implicit-globals', + message: "Unexpected 'const' declaration in the global scope, wrap in a block or in an IIFE.", + messageId: 'globalLexicalBinding', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 54, + endLine: 1, + endColumn: 61, + suggestions: null + } +] + +2 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-implicit-globals > invalid + +```js +/*global foo:readonly*/ const foo = 1, bar = 2; +``` + +```json +{ + "options": [ + { + "lexicalBindings": true + } + ], + "languageOptions": { + "ecmaVersion": 2015 + }, + "errors": [ + { + "message": "Unexpected redeclaration of read-only global variable." + }, + { + "message": "Unexpected 'const' declaration in the global scope, wrap in a block or in an IIFE." + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Expected values to be strictly equal: ++ actual - expected + ++ "Unexpected 'const' declaration in the global scope, wrap in a block or in an IIFE." +- 'Unexpected redeclaration of read-only global variable.' + + at assertMessageMatches (apps/oxlint/dist/index.js) + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-implicit-globals > invalid + +```js +/*global bar: readonly*/ const foo = 1, bar = 2; +``` + +```json +{ + "options": [ + { + "lexicalBindings": true + } + ], + "languageOptions": { + "ecmaVersion": 2015 + }, + "errors": [ + { + "message": "Unexpected 'const' declaration in the global scope, wrap in a block or in an IIFE." + }, + { + "message": "Unexpected redeclaration of read-only global variable." + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Expected values to be strictly equal: ++ actual - expected + ++ "Unexpected 'const' declaration in the global scope, wrap in a block or in an IIFE." +- 'Unexpected redeclaration of read-only global variable.' + + at assertMessageMatches (apps/oxlint/dist/index.js) + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-implicit-globals > invalid + +```js +/*global foo:readonly, bar: readonly*/ let foo, bar; +``` + +```json +{ + "options": [ + { + "lexicalBindings": true + } + ], + "languageOptions": { + "ecmaVersion": 2015 + }, + "errors": [ + { + "message": "Unexpected redeclaration of read-only global variable." + }, + { + "message": "Unexpected redeclaration of read-only global variable." + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Expected values to be strictly equal: ++ actual - expected + ++ "Unexpected 'let' declaration in the global scope, wrap in a block or in an IIFE." +- 'Unexpected redeclaration of read-only global variable.' + + at assertMessageMatches (apps/oxlint/dist/index.js) + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-implicit-globals > invalid + +```js +/*global foo:writable, bar: readonly*/ let foo, bar; +``` + +```json +{ + "options": [ + { + "lexicalBindings": true + } + ], + "languageOptions": { + "ecmaVersion": 2015 + }, + "errors": [ + { + "message": "Unexpected redeclaration of read-only global variable." + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 2: [ + { + ruleId: 'rule-to-test/no-implicit-globals', + message: "Unexpected 'let' declaration in the global scope, wrap in a block or in an IIFE.", + messageId: 'globalLexicalBinding', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 43, + endLine: 1, + endColumn: 46, + suggestions: null + }, + { + ruleId: 'rule-to-test/no-implicit-globals', + message: "Unexpected 'let' declaration in the global scope, wrap in a block or in an IIFE.", + messageId: 'globalLexicalBinding', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 48, + endLine: 1, + endColumn: 51, + suggestions: null + } +] + +2 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-implicit-globals > invalid + +```js +/*global foo:readonly, bar: writable*/ let foo, bar; +``` + +```json +{ + "options": [ + { + "lexicalBindings": true + } + ], + "languageOptions": { + "ecmaVersion": 2015 + }, + "errors": [ + { + "message": "Unexpected redeclaration of read-only global variable." + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 2: [ + { + ruleId: 'rule-to-test/no-implicit-globals', + message: "Unexpected 'let' declaration in the global scope, wrap in a block or in an IIFE.", + messageId: 'globalLexicalBinding', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 43, + endLine: 1, + endColumn: 46, + suggestions: null + }, + { + ruleId: 'rule-to-test/no-implicit-globals', + message: "Unexpected 'let' declaration in the global scope, wrap in a block or in an IIFE.", + messageId: 'globalLexicalBinding', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 48, + endLine: 1, + endColumn: 51, + suggestions: null + } +] + +2 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-implicit-globals > invalid + +```js +/*global foo:readonly*/ let foo, bar; +``` + +```json +{ + "options": [ + { + "lexicalBindings": true + } + ], + "languageOptions": { + "ecmaVersion": 2015 + }, + "errors": [ + { + "message": "Unexpected redeclaration of read-only global variable." + }, + { + "message": "Unexpected 'let' declaration in the global scope, wrap in a block or in an IIFE." + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Expected values to be strictly equal: ++ actual - expected + ++ "Unexpected 'let' declaration in the global scope, wrap in a block or in an IIFE." +- 'Unexpected redeclaration of read-only global variable.' + + at assertMessageMatches (apps/oxlint/dist/index.js) + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-implicit-globals > invalid + +```js +/*global bar: readonly*/ let foo, bar; +``` + +```json +{ + "options": [ + { + "lexicalBindings": true + } + ], + "languageOptions": { + "ecmaVersion": 2015 + }, + "errors": [ + { + "message": "Unexpected 'let' declaration in the global scope, wrap in a block or in an IIFE." + }, + { + "message": "Unexpected redeclaration of read-only global variable." + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Expected values to be strictly equal: ++ actual - expected + ++ "Unexpected 'let' declaration in the global scope, wrap in a block or in an IIFE." +- 'Unexpected redeclaration of read-only global variable.' + + at assertMessageMatches (apps/oxlint/dist/index.js) + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-implicit-globals > invalid + +```js +/* exported bar */ var foo = 1, bar = 2; +``` + +```json +{ + "errors": [ + { + "message": "Unexpected 'var' declaration in the global scope, wrap in an IIFE for a local variable, assign as global property for a global variable." + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 2: [ + { + ruleId: 'rule-to-test/no-implicit-globals', + message: "Unexpected 'var' declaration in the global scope, wrap in an IIFE for a local variable, assign as global property for a global variable.", + messageId: 'globalNonLexicalBinding', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 23, + endLine: 1, + endColumn: 30, + suggestions: null + }, + { + ruleId: 'rule-to-test/no-implicit-globals', + message: "Unexpected 'var' declaration in the global scope, wrap in an IIFE for a local variable, assign as global property for a global variable.", + messageId: 'globalNonLexicalBinding', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 32, + endLine: 1, + endColumn: 39, + suggestions: null + } +] + +2 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-implicit-globals > invalid + +```js +/* exported a */ const a = 1; const b = 2; +``` + +```json +{ + "options": [ + { + "lexicalBindings": true + } + ], + "languageOptions": { + "ecmaVersion": 2015 + }, + "errors": [ + { + "message": "Unexpected 'const' declaration in the global scope, wrap in a block or in an IIFE." + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 2: [ + { + ruleId: 'rule-to-test/no-implicit-globals', + message: "Unexpected 'const' declaration in the global scope, wrap in a block or in an IIFE.", + messageId: 'globalLexicalBinding', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 23, + endLine: 1, + endColumn: 28, + suggestions: null + }, + { + ruleId: 'rule-to-test/no-implicit-globals', + message: "Unexpected 'const' declaration in the global scope, wrap in a block or in an IIFE.", + messageId: 'globalLexicalBinding', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 36, + endLine: 1, + endColumn: 41, + suggestions: null + } +] + +2 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-implicit-globals > invalid + +```js +/* exported a */ const a = 1, b = 2; +``` + +```json +{ + "options": [ + { + "lexicalBindings": true + } + ], + "languageOptions": { + "ecmaVersion": 2015 + }, + "errors": [ + { + "message": "Unexpected 'const' declaration in the global scope, wrap in a block or in an IIFE." + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 2: [ + { + ruleId: 'rule-to-test/no-implicit-globals', + message: "Unexpected 'const' declaration in the global scope, wrap in a block or in an IIFE.", + messageId: 'globalLexicalBinding', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 23, + endLine: 1, + endColumn: 28, + suggestions: null + }, + { + ruleId: 'rule-to-test/no-implicit-globals', + message: "Unexpected 'const' declaration in the global scope, wrap in a block or in an IIFE.", + messageId: 'globalLexicalBinding', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 30, + endLine: 1, + endColumn: 35, + suggestions: null + } +] + +2 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-implicit-globals > invalid + +```js +/* exported a */ let a, b = 1; +``` + +```json +{ + "options": [ + { + "lexicalBindings": true + } + ], + "languageOptions": { + "ecmaVersion": 2015 + }, + "errors": [ + { + "message": "Unexpected 'let' declaration in the global scope, wrap in a block or in an IIFE." + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 2: [ + { + ruleId: 'rule-to-test/no-implicit-globals', + message: "Unexpected 'let' declaration in the global scope, wrap in a block or in an IIFE.", + messageId: 'globalLexicalBinding', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 21, + endLine: 1, + endColumn: 22, + suggestions: null + }, + { + ruleId: 'rule-to-test/no-implicit-globals', + message: "Unexpected 'let' declaration in the global scope, wrap in a block or in an IIFE.", + messageId: 'globalLexicalBinding', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 24, + endLine: 1, + endColumn: 29, + suggestions: null + } +] + +2 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-implicit-globals > invalid + +```js +/* exported a */ const a = 1; let b; class C {} +``` + +```json +{ + "options": [ + { + "lexicalBindings": true + } + ], + "languageOptions": { + "ecmaVersion": 2015 + }, + "errors": [ + { + "message": "Unexpected 'let' declaration in the global scope, wrap in a block or in an IIFE." + }, + { + "message": "Unexpected class declaration in the global scope, wrap in a block or in an IIFE." + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 2 errors but had 3: [ + { + ruleId: 'rule-to-test/no-implicit-globals', + message: "Unexpected 'const' declaration in the global scope, wrap in a block or in an IIFE.", + messageId: 'globalLexicalBinding', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 23, + endLine: 1, + endColumn: 28, + suggestions: null + }, + { + ruleId: 'rule-to-test/no-implicit-globals', + message: "Unexpected 'let' declaration in the global scope, wrap in a block or in an IIFE.", + messageId: 'globalLexicalBinding', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 34, + endLine: 1, + endColumn: 35, + suggestions: null + }, + { + ruleId: 'rule-to-test/no-implicit-globals', + message: 'Unexpected class declaration in the global scope, wrap in a block or in an IIFE.', + messageId: 'globalLexicalBinding', + severity: 1, + nodeType: 'ClassDeclaration', + line: 1, + column: 37, + endLine: 1, + endColumn: 47, + suggestions: null + } +] + +3 !== 2 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-implicit-globals > invalid + +```js +/* exported a */ const [a, b, ...c] = []; +``` + +```json +{ + "options": [ + { + "lexicalBindings": true + } + ], + "languageOptions": { + "ecmaVersion": 2015 + }, + "errors": [ + { + "message": "Unexpected 'const' declaration in the global scope, wrap in a block or in an IIFE." + }, + { + "message": "Unexpected 'const' declaration in the global scope, wrap in a block or in an IIFE." + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 2 errors but had 3: [ + { + ruleId: 'rule-to-test/no-implicit-globals', + message: "Unexpected 'const' declaration in the global scope, wrap in a block or in an IIFE.", + messageId: 'globalLexicalBinding', + severity: 1, + nodeType: 'ArrayPattern', + line: 1, + column: 23, + endLine: 1, + endColumn: 40, + suggestions: null + }, + { + ruleId: 'rule-to-test/no-implicit-globals', + message: "Unexpected 'const' declaration in the global scope, wrap in a block or in an IIFE.", + messageId: 'globalLexicalBinding', + severity: 1, + nodeType: 'ArrayPattern', + line: 1, + column: 23, + endLine: 1, + endColumn: 40, + suggestions: null + }, + { + ruleId: 'rule-to-test/no-implicit-globals', + message: "Unexpected 'const' declaration in the global scope, wrap in a block or in an IIFE.", + messageId: 'globalLexicalBinding', + severity: 1, + nodeType: 'ArrayPattern', + line: 1, + column: 23, + endLine: 1, + endColumn: 40, + suggestions: null + } +] + +3 !== 2 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-implicit-globals > invalid + +```js +/* exported a */ let { a, foo: b, bar: { c } } = {}; +``` + +```json +{ + "options": [ + { + "lexicalBindings": true + } + ], + "languageOptions": { + "ecmaVersion": 2015 + }, + "errors": [ + { + "message": "Unexpected 'let' declaration in the global scope, wrap in a block or in an IIFE." + }, + { + "message": "Unexpected 'let' declaration in the global scope, wrap in a block or in an IIFE." + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 2 errors but had 3: [ + { + ruleId: 'rule-to-test/no-implicit-globals', + message: "Unexpected 'let' declaration in the global scope, wrap in a block or in an IIFE.", + messageId: 'globalLexicalBinding', + severity: 1, + nodeType: 'ObjectPattern', + line: 1, + column: 21, + endLine: 1, + endColumn: 51, + suggestions: null + }, + { + ruleId: 'rule-to-test/no-implicit-globals', + message: "Unexpected 'let' declaration in the global scope, wrap in a block or in an IIFE.", + messageId: 'globalLexicalBinding', + severity: 1, + nodeType: 'ObjectPattern', + line: 1, + column: 21, + endLine: 1, + endColumn: 51, + suggestions: null + }, + { + ruleId: 'rule-to-test/no-implicit-globals', + message: "Unexpected 'let' declaration in the global scope, wrap in a block or in an IIFE.", + messageId: 'globalLexicalBinding', + severity: 1, + nodeType: 'ObjectPattern', + line: 1, + column: 21, + endLine: 1, + endColumn: 51, + suggestions: null + } +] + +3 !== 2 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +### `no-implied-eval` + +Pass: 83 / 138 (60.1%) +Fail: 55 / 138 (39.9%) + +#### no-implied-eval > invalid + +```js +setTimeout("x = 1;"); +``` + +```json +{ + "languageOptions": { + "globals": { + "AbortController": false, + "AbortSignal": false, + "AbsoluteOrientationSensor": false, + "AbstractRange": false, + "Accelerometer": false, + "addEventListener": false, + "ai": false, + "AI": false, + "AICreateMonitor": false, + "AITextSession": false, + "alert": false, + "AnalyserNode": false, + "Animation": false, + "AnimationEffect": false, + "AnimationEvent": false, + "AnimationPlaybackEvent": false, + "AnimationTimeline": false, + "AsyncDisposableStack": false, + "atob": false, + "Attr": false, + "Audio": false, + "AudioBuffer": false, + "AudioBufferSourceNode": false, + "AudioContext": false, + "AudioData": false, + "AudioDecoder": false, + "AudioDestinationNode": false, + "AudioEncoder": false, + "AudioListener": false, + "AudioNode": false, + "AudioParam": false, + "AudioParamMap": false, + "AudioProcessingEvent": false, + "AudioScheduledSourceNode": false, + "AudioSinkInfo": false, + "AudioWorklet": false, + "AudioWorkletGlobalScope": false, + "AudioWorkletNode": false, + "AudioWorkletProcessor": false, + "AuthenticatorAssertionResponse": false, + "AuthenticatorAttestationResponse": false, + "AuthenticatorResponse": false, + "BackgroundFetchManager": false, + "BackgroundFetchRecord": false, + "BackgroundFetchRegistration": false, + "BarcodeDetector": false, + "BarProp": false, + "BaseAudioContext": false, + "BatteryManager": false, + "BeforeUnloadEvent": false, + "BiquadFilterNode": false, + "Blob": false, + "BlobEvent": false, + "Bluetooth": false, + "BluetoothCharacteristicProperties": false, + "BluetoothDevice": false, + "BluetoothRemoteGATTCharacteristic": false, + "BluetoothRemoteGATTDescriptor": false, + "BluetoothRemoteGATTServer": false, + "BluetoothRemoteGATTService": false, + "BluetoothUUID": false, + "blur": false, + "BroadcastChannel": false, + "BrowserCaptureMediaStreamTrack": false, + "btoa": false, + "ByteLengthQueuingStrategy": false, + "Cache": false, + "caches": false, + "CacheStorage": false, + "cancelAnimationFrame": false, + "cancelIdleCallback": false, + "CanvasCaptureMediaStream": false, + "CanvasCaptureMediaStreamTrack": false, + "CanvasGradient": false, + "CanvasPattern": false, + "CanvasRenderingContext2D": false, + "CaptureController": false, + "CaretPosition": false, + "CDATASection": false, + "ChannelMergerNode": false, + "ChannelSplitterNode": false, + "ChapterInformation": false, + "CharacterBoundsUpdateEvent": false, + "CharacterData": false, + "clearInterval": false, + "clearTimeout": false, + "clientInformation": false, + "Clipboard": false, + "ClipboardChangeEvent": false, + "ClipboardEvent": false, + "ClipboardItem": false, + "close": false, + "closed": false, + "CloseEvent": false, + "CloseWatcher": false, + "CommandEvent": false, + "Comment": false, + "CompositionEvent": false, + "CompressionStream": false, + "confirm": false, + "console": false, + "ConstantSourceNode": false, + "ContentVisibilityAutoStateChangeEvent": false, + "ConvolverNode": false, + "CookieChangeEvent": false, + "CookieDeprecationLabel": false, + "cookieStore": false, + "CookieStore": false, + "CookieStoreManager": false, + "CountQueuingStrategy": false, + "createImageBitmap": false, + "CreateMonitor": false, + "Credential": false, + "credentialless": false, + "CredentialsContainer": false, + "CropTarget": false, + "crossOriginIsolated": false, + "crypto": false, + "Crypto": false, + "CryptoKey": false, + "CSPViolationReportBody": false, + "CSS": false, + "CSSAnimation": false, + "CSSConditionRule": false, + "CSSContainerRule": false, + "CSSCounterStyleRule": false, + "CSSFontFaceRule": false, + "CSSFontFeatureValuesRule": false, + "CSSFontPaletteValuesRule": false, + "CSSFunctionDeclarations": false, + "CSSFunctionDescriptors": false, + "CSSFunctionRule": false, + "CSSGroupingRule": false, + "CSSImageValue": false, + "CSSImportRule": false, + "CSSKeyframeRule": false, + "CSSKeyframesRule": false, + "CSSKeywordValue": false, + "CSSLayerBlockRule": false, + "CSSLayerStatementRule": false, + "CSSMarginRule": false, + "CSSMathClamp": false, + "CSSMathInvert": false, + "CSSMathMax": false, + "CSSMathMin": false, + "CSSMathNegate": false, + "CSSMathProduct": false, + "CSSMathSum": false, + "CSSMathValue": false, + "CSSMatrixComponent": false, + "CSSMediaRule": false, + "CSSNamespaceRule": false, + "CSSNestedDeclarations": false, + "CSSNumericArray": false, + "CSSNumericValue": false, + "CSSPageDescriptors": false, + "CSSPageRule": false, + "CSSPerspective": false, + "CSSPositionTryDescriptors": false, + "CSSPositionTryRule": false, + "CSSPositionValue": false, + "CSSPropertyRule": false, + "CSSRotate": false, + "CSSRule": false, + "CSSRuleList": false, + "CSSScale": false, + "CSSScopeRule": false, + "CSSSkew": false, + "CSSSkewX": false, + "CSSSkewY": false, + "CSSStartingStyleRule": false, + "CSSStyleDeclaration": false, + "CSSStyleRule": false, + "CSSStyleSheet": false, + "CSSStyleValue": false, + "CSSSupportsRule": false, + "CSSTransformComponent": false, + "CSSTransformValue": false, + "CSSTransition": false, + "CSSTranslate": false, + "CSSUnitValue": false, + "CSSUnparsedValue": false, + "CSSVariableReferenceValue": false, + "CSSViewTransitionRule": false, + "currentFrame": false, + "currentTime": false, + "CustomElementRegistry": false, + "customElements": false, + "CustomEvent": false, + "CustomStateSet": false, + "DataTransfer": false, + "DataTransferItem": false, + "DataTransferItemList": false, + "DecompressionStream": false, + "DelayNode": false, + "DelegatedInkTrailPresenter": false, + "DeviceMotionEvent": false, + "DeviceMotionEventAcceleration": false, + "DeviceMotionEventRotationRate": false, + "DeviceOrientationEvent": false, + "devicePixelRatio": false, + "DevicePosture": false, + "DigitalCredential": false, + "dispatchEvent": false, + "DisposableStack": false, + "document": false, + "Document": false, + "DocumentFragment": false, + "documentPictureInPicture": false, + "DocumentPictureInPicture": false, + "DocumentPictureInPictureEvent": false, + "DocumentTimeline": false, + "DocumentType": false, + "DOMError": false, + "DOMException": false, + "DOMImplementation": false, + "DOMMatrix": false, + "DOMMatrixReadOnly": false, + "DOMParser": false, + "DOMPoint": false, + "DOMPointReadOnly": false, + "DOMQuad": false, + "DOMRect": false, + "DOMRectList": false, + "DOMRectReadOnly": false, + "DOMStringList": false, + "DOMStringMap": false, + "DOMTokenList": false, + "DragEvent": false, + "DynamicsCompressorNode": false, + "EditContext": false, + "Element": false, + "ElementInternals": false, + "EncodedAudioChunk": false, + "EncodedVideoChunk": false, + "ErrorEvent": false, + "event": false, + "Event": false, + "EventCounts": false, + "EventSource": false, + "EventTarget": false, + "external": false, + "External": false, + "EyeDropper": false, + "FeaturePolicy": false, + "FederatedCredential": false, + "fence": false, + "Fence": false, + "FencedFrameConfig": false, + "fetch": false, + "fetchLater": false, + "FetchLaterResult": false, + "File": false, + "FileList": false, + "FileReader": false, + "FileSystem": false, + "FileSystemDirectoryEntry": false, + "FileSystemDirectoryHandle": false, + "FileSystemDirectoryReader": false, + "FileSystemEntry": false, + "FileSystemFileEntry": false, + "FileSystemFileHandle": false, + "FileSystemHandle": false, + "FileSystemObserver": false, + "FileSystemWritableFileStream": false, + "find": false, + "focus": false, + "FocusEvent": false, + "FontData": false, + "FontFace": false, + "FontFaceSet": false, + "FontFaceSetLoadEvent": false, + "FormData": false, + "FormDataEvent": false, + "FragmentDirective": false, + "frameElement": false, + "frames": false, + "GainNode": false, + "Gamepad": false, + "GamepadAxisMoveEvent": false, + "GamepadButton": false, + "GamepadButtonEvent": false, + "GamepadEvent": false, + "GamepadHapticActuator": false, + "GamepadPose": false, + "Geolocation": false, + "GeolocationCoordinates": false, + "GeolocationPosition": false, + "GeolocationPositionError": false, + "getComputedStyle": false, + "getScreenDetails": false, + "getSelection": false, + "GPU": false, + "GPUAdapter": false, + "GPUAdapterInfo": false, + "GPUBindGroup": false, + "GPUBindGroupLayout": false, + "GPUBuffer": false, + "GPUBufferUsage": false, + "GPUCanvasContext": false, + "GPUColorWrite": false, + "GPUCommandBuffer": false, + "GPUCommandEncoder": false, + "GPUCompilationInfo": false, + "GPUCompilationMessage": false, + "GPUComputePassEncoder": false, + "GPUComputePipeline": false, + "GPUDevice": false, + "GPUDeviceLostInfo": false, + "GPUError": false, + "GPUExternalTexture": false, + "GPUInternalError": false, + "GPUMapMode": false, + "GPUOutOfMemoryError": false, + "GPUPipelineError": false, + "GPUPipelineLayout": false, + "GPUQuerySet": false, + "GPUQueue": false, + "GPURenderBundle": false, + "GPURenderBundleEncoder": false, + "GPURenderPassEncoder": false, + "GPURenderPipeline": false, + "GPUSampler": false, + "GPUShaderModule": false, + "GPUShaderStage": false, + "GPUSupportedFeatures": false, + "GPUSupportedLimits": false, + "GPUTexture": false, + "GPUTextureUsage": false, + "GPUTextureView": false, + "GPUUncapturedErrorEvent": false, + "GPUValidationError": false, + "GravitySensor": false, + "Gyroscope": false, + "HashChangeEvent": false, + "Headers": false, + "HID": false, + "HIDConnectionEvent": false, + "HIDDevice": false, + "HIDInputReportEvent": false, + "Highlight": false, + "HighlightRegistry": false, + "history": false, + "History": false, + "HTMLAllCollection": false, + "HTMLAnchorElement": false, + "HTMLAreaElement": false, + "HTMLAudioElement": false, + "HTMLBaseElement": false, + "HTMLBodyElement": false, + "HTMLBRElement": false, + "HTMLButtonElement": false, + "HTMLCanvasElement": false, + "HTMLCollection": false, + "HTMLDataElement": false, + "HTMLDataListElement": false, + "HTMLDetailsElement": false, + "HTMLDialogElement": false, + "HTMLDirectoryElement": false, + "HTMLDivElement": false, + "HTMLDListElement": false, + "HTMLDocument": false, + "HTMLElement": false, + "HTMLEmbedElement": false, + "HTMLFencedFrameElement": false, + "HTMLFieldSetElement": false, + "HTMLFontElement": false, + "HTMLFormControlsCollection": false, + "HTMLFormElement": false, + "HTMLFrameElement": false, + "HTMLFrameSetElement": false, + "HTMLHeadElement": false, + "HTMLHeadingElement": false, + "HTMLHRElement": false, + "HTMLHtmlElement": false, + "HTMLIFrameElement": false, + "HTMLImageElement": false, + "HTMLInputElement": false, + "HTMLLabelElement": false, + "HTMLLegendElement": false, + "HTMLLIElement": false, + "HTMLLinkElement": false, + "HTMLMapElement": false, + "HTMLMarqueeElement": false, + "HTMLMediaElement": false, + "HTMLMenuElement": false, + "HTMLMetaElement": false, + "HTMLMeterElement": false, + "HTMLModElement": false, + "HTMLObjectElement": false, + "HTMLOListElement": false, + "HTMLOptGroupElement": false, + "HTMLOptionElement": false, + "HTMLOptionsCollection": false, + "HTMLOutputElement": false, + "HTMLParagraphElement": false, + "HTMLParamElement": false, + "HTMLPictureElement": false, + "HTMLPreElement": false, + "HTMLProgressElement": false, + "HTMLQuoteElement": false, + "HTMLScriptElement": false, + "HTMLSelectedContentElement": false, + "HTMLSelectElement": false, + "HTMLSlotElement": false, + "HTMLSourceElement": false, + "HTMLSpanElement": false, + "HTMLStyleElement": false, + "HTMLTableCaptionElement": false, + "HTMLTableCellElement": false, + "HTMLTableColElement": false, + "HTMLTableElement": false, + "HTMLTableRowElement": false, + "HTMLTableSectionElement": false, + "HTMLTemplateElement": false, + "HTMLTextAreaElement": false, + "HTMLTimeElement": false, + "HTMLTitleElement": false, + "HTMLTrackElement": false, + "HTMLUListElement": false, + "HTMLUnknownElement": false, + "HTMLVideoElement": false, + "IDBCursor": false, + "IDBCursorWithValue": false, + "IDBDatabase": false, + "IDBFactory": false, + "IDBIndex": false, + "IDBKeyRange": false, + "IDBObjectStore": false, + "IDBOpenDBRequest": false, + "IDBRecord": false, + "IDBRequest": false, + "IDBTransaction": false, + "IDBVersionChangeEvent": false, + "IdentityCredential": false, + "IdentityCredentialError": false, + "IdentityProvider": false, + "IdleDeadline": false, + "IdleDetector": false, + "IIRFilterNode": false, + "Image": false, + "ImageBitmap": false, + "ImageBitmapRenderingContext": false, + "ImageCapture": false, + "ImageData": false, + "ImageDecoder": false, + "ImageTrack": false, + "ImageTrackList": false, + "indexedDB": false, + "Ink": false, + "innerHeight": false, + "innerWidth": false, + "InputDeviceCapabilities": false, + "InputDeviceInfo": false, + "InputEvent": false, + "IntegrityViolationReportBody": false, + "InterestEvent": false, + "IntersectionObserver": false, + "IntersectionObserverEntry": false, + "isSecureContext": false, + "Keyboard": false, + "KeyboardEvent": false, + "KeyboardLayoutMap": false, + "KeyframeEffect": false, + "LanguageDetector": false, + "LargestContentfulPaint": false, + "LaunchParams": false, + "launchQueue": false, + "LaunchQueue": false, + "LayoutShift": false, + "LayoutShiftAttribution": false, + "length": false, + "LinearAccelerationSensor": false, + "localStorage": false, + "location": true, + "Location": false, + "locationbar": false, + "Lock": false, + "LockManager": false, + "matchMedia": false, + "MathMLElement": false, + "MediaCapabilities": false, + "MediaCapabilitiesInfo": false, + "MediaDeviceInfo": false, + "MediaDevices": false, + "MediaElementAudioSourceNode": false, + "MediaEncryptedEvent": false, + "MediaError": false, + "MediaKeyError": false, + "MediaKeyMessageEvent": false, + "MediaKeys": false, + "MediaKeySession": false, + "MediaKeyStatusMap": false, + "MediaKeySystemAccess": false, + "MediaList": false, + "MediaMetadata": false, + "MediaQueryList": false, + "MediaQueryListEvent": false, + "MediaRecorder": false, + "MediaRecorderErrorEvent": false, + "MediaSession": false, + "MediaSource": false, + "MediaSourceHandle": false, + "MediaStream": false, + "MediaStreamAudioDestinationNode": false, + "MediaStreamAudioSourceNode": false, + "MediaStreamEvent": false, + "MediaStreamTrack": false, + "MediaStreamTrackAudioSourceNode": false, + "MediaStreamTrackAudioStats": false, + "MediaStreamTrackEvent": false, + "MediaStreamTrackGenerator": false, + "MediaStreamTrackProcessor": false, + "MediaStreamTrackVideoStats": false, + "menubar": false, + "MessageChannel": false, + "MessageEvent": false, + "MessagePort": false, + "MIDIAccess": false, + "MIDIConnectionEvent": false, + "MIDIInput": false, + "MIDIInputMap": false, + "MIDIMessageEvent": false, + "MIDIOutput": false, + "MIDIOutputMap": false, + "MIDIPort": false, + "MimeType": false, + "MimeTypeArray": false, + "model": false, + "ModelGenericSession": false, + "ModelManager": false, + "MouseEvent": false, + "moveBy": false, + "moveTo": false, + "MutationEvent": false, + "MutationObserver": false, + "MutationRecord": false, + "name": false, + "NamedNodeMap": false, + "NavigateEvent": false, + "navigation": false, + "Navigation": false, + "NavigationActivation": false, + "NavigationCurrentEntryChangeEvent": false, + "NavigationDestination": false, + "NavigationHistoryEntry": false, + "NavigationPrecommitController": false, + "NavigationPreloadManager": false, + "NavigationTransition": false, + "navigator": false, + "Navigator": false, + "NavigatorLogin": false, + "NavigatorManagedData": false, + "NavigatorUAData": false, + "NetworkInformation": false, + "Node": false, + "NodeFilter": false, + "NodeIterator": false, + "NodeList": false, + "Notification": false, + "NotifyPaintEvent": false, + "NotRestoredReasonDetails": false, + "NotRestoredReasons": false, + "Observable": false, + "OfflineAudioCompletionEvent": false, + "OfflineAudioContext": false, + "offscreenBuffering": false, + "OffscreenCanvas": false, + "OffscreenCanvasRenderingContext2D": false, + "onabort": true, + "onafterprint": true, + "onanimationcancel": true, + "onanimationend": true, + "onanimationiteration": true, + "onanimationstart": true, + "onappinstalled": true, + "onauxclick": true, + "onbeforeinput": true, + "onbeforeinstallprompt": true, + "onbeforematch": true, + "onbeforeprint": true, + "onbeforetoggle": true, + "onbeforeunload": true, + "onbeforexrselect": true, + "onblur": true, + "oncancel": true, + "oncanplay": true, + "oncanplaythrough": true, + "onchange": true, + "onclick": true, + "onclose": true, + "oncommand": true, + "oncontentvisibilityautostatechange": true, + "oncontextlost": true, + "oncontextmenu": true, + "oncontextrestored": true, + "oncopy": true, + "oncuechange": true, + "oncut": true, + "ondblclick": true, + "ondevicemotion": true, + "ondeviceorientation": true, + "ondeviceorientationabsolute": true, + "ondrag": true, + "ondragend": true, + "ondragenter": true, + "ondragleave": true, + "ondragover": true, + "ondragstart": true, + "ondrop": true, + "ondurationchange": true, + "onemptied": true, + "onended": true, + "onerror": true, + "onfocus": true, + "onformdata": true, + "ongamepadconnected": true, + "ongamepaddisconnected": true, + "ongotpointercapture": true, + "onhashchange": true, + "oninput": true, + "oninvalid": true, + "onkeydown": true, + "onkeypress": true, + "onkeyup": true, + "onlanguagechange": true, + "onload": true, + "onloadeddata": true, + "onloadedmetadata": true, + "onloadstart": true, + "onlostpointercapture": true, + "onmessage": true, + "onmessageerror": true, + "onmousedown": true, + "onmouseenter": true, + "onmouseleave": true, + "onmousemove": true, + "onmouseout": true, + "onmouseover": true, + "onmouseup": true, + "onmousewheel": true, + "onoffline": true, + "ononline": true, + "onpagehide": true, + "onpagereveal": true, + "onpageshow": true, + "onpageswap": true, + "onpaste": true, + "onpause": true, + "onplay": true, + "onplaying": true, + "onpointercancel": true, + "onpointerdown": true, + "onpointerenter": true, + "onpointerleave": true, + "onpointermove": true, + "onpointerout": true, + "onpointerover": true, + "onpointerrawupdate": true, + "onpointerup": true, + "onpopstate": true, + "onprogress": true, + "onratechange": true, + "onrejectionhandled": true, + "onreset": true, + "onresize": true, + "onscroll": true, + "onscrollend": true, + "onscrollsnapchange": true, + "onscrollsnapchanging": true, + "onsearch": true, + "onsecuritypolicyviolation": true, + "onseeked": true, + "onseeking": true, + "onselect": true, + "onselectionchange": true, + "onselectstart": true, + "onslotchange": true, + "onstalled": true, + "onstorage": true, + "onsubmit": true, + "onsuspend": true, + "ontimeupdate": true, + "ontoggle": true, + "ontransitioncancel": true, + "ontransitionend": true, + "ontransitionrun": true, + "ontransitionstart": true, + "onunhandledrejection": true, + "onunload": true, + "onvolumechange": true, + "onwaiting": true, + "onwheel": true, + "open": false, + "opener": false, + "Option": false, + "OrientationSensor": false, + "origin": false, + "originAgentCluster": false, + "OscillatorNode": false, + "OTPCredential": false, + "outerHeight": false, + "outerWidth": false, + "OverconstrainedError": false, + "PageRevealEvent": false, + "PageSwapEvent": false, + "PageTransitionEvent": false, + "pageXOffset": false, + "pageYOffset": false, + "PannerNode": false, + "parent": false, + "PasswordCredential": false, + "Path2D": false, + "PaymentAddress": false, + "PaymentManager": false, + "PaymentMethodChangeEvent": false, + "PaymentRequest": false, + "PaymentRequestUpdateEvent": false, + "PaymentResponse": false, + "performance": false, + "Performance": false, + "PerformanceElementTiming": false, + "PerformanceEntry": false, + "PerformanceEventTiming": false, + "PerformanceLongAnimationFrameTiming": false, + "PerformanceLongTaskTiming": false, + "PerformanceMark": false, + "PerformanceMeasure": false, + "PerformanceNavigation": false, + "PerformanceNavigationTiming": false, + "PerformanceObserver": false, + "PerformanceObserverEntryList": false, + "PerformancePaintTiming": false, + "PerformanceResourceTiming": false, + "PerformanceScriptTiming": false, + "PerformanceServerTiming": false, + "PerformanceTiming": false, + "PeriodicSyncManager": false, + "PeriodicWave": false, + "Permissions": false, + "PermissionStatus": false, + "PERSISTENT": false, + "personalbar": false, + "PictureInPictureEvent": false, + "PictureInPictureWindow": false, + "Plugin": false, + "PluginArray": false, + "PointerEvent": false, + "PopStateEvent": false, + "postMessage": false, + "Presentation": false, + "PresentationAvailability": false, + "PresentationConnection": false, + "PresentationConnectionAvailableEvent": false, + "PresentationConnectionCloseEvent": false, + "PresentationConnectionList": false, + "PresentationReceiver": false, + "PresentationRequest": false, + "PressureObserver": false, + "PressureRecord": false, + "print": false, + "ProcessingInstruction": false, + "Profiler": false, + "ProgressEvent": false, + "PromiseRejectionEvent": false, + "prompt": false, + "ProtectedAudience": false, + "PublicKeyCredential": false, + "PushManager": false, + "PushSubscription": false, + "PushSubscriptionOptions": false, + "queryLocalFonts": false, + "queueMicrotask": false, + "QuotaExceededError": false, + "RadioNodeList": false, + "Range": false, + "ReadableByteStreamController": false, + "ReadableStream": false, + "ReadableStreamBYOBReader": false, + "ReadableStreamBYOBRequest": false, + "ReadableStreamDefaultController": false, + "ReadableStreamDefaultReader": false, + "registerProcessor": false, + "RelativeOrientationSensor": false, + "RemotePlayback": false, + "removeEventListener": false, + "ReportBody": false, + "reportError": false, + "ReportingObserver": false, + "Request": false, + "requestAnimationFrame": false, + "requestIdleCallback": false, + "resizeBy": false, + "ResizeObserver": false, + "ResizeObserverEntry": false, + "ResizeObserverSize": false, + "resizeTo": false, + "Response": false, + "RestrictionTarget": false, + "RTCCertificate": false, + "RTCDataChannel": false, + "RTCDataChannelEvent": false, + "RTCDtlsTransport": false, + "RTCDTMFSender": false, + "RTCDTMFToneChangeEvent": false, + "RTCEncodedAudioFrame": false, + "RTCEncodedVideoFrame": false, + "RTCError": false, + "RTCErrorEvent": false, + "RTCIceCandidate": false, + "RTCIceTransport": false, + "RTCPeerConnection": false, + "RTCPeerConnectionIceErrorEvent": false, + "RTCPeerConnectionIceEvent": false, + "RTCRtpReceiver": false, + "RTCRtpScriptTransform": false, + "RTCRtpSender": false, + "RTCRtpTransceiver": false, + "RTCSctpTransport": false, + "RTCSessionDescription": false, + "RTCStatsReport": false, + "RTCTrackEvent": false, + "sampleRate": false, + "scheduler": false, + "Scheduler": false, + "Scheduling": false, + "screen": false, + "Screen": false, + "ScreenDetailed": false, + "ScreenDetails": false, + "screenLeft": false, + "ScreenOrientation": false, + "screenTop": false, + "screenX": false, + "screenY": false, + "ScriptProcessorNode": false, + "scroll": false, + "scrollbars": false, + "scrollBy": false, + "ScrollTimeline": false, + "scrollTo": false, + "scrollX": false, + "scrollY": false, + "SecurityPolicyViolationEvent": false, + "Selection": false, + "self": false, + "Sensor": false, + "SensorErrorEvent": false, + "Serial": false, + "SerialPort": false, + "ServiceWorker": false, + "ServiceWorkerContainer": false, + "ServiceWorkerRegistration": false, + "sessionStorage": false, + "setInterval": false, + "setTimeout": false, + "ShadowRoot": false, + "sharedStorage": false, + "SharedStorage": false, + "SharedStorageAppendMethod": false, + "SharedStorageClearMethod": false, + "SharedStorageDeleteMethod": false, + "SharedStorageModifierMethod": false, + "SharedStorageSetMethod": false, + "SharedStorageWorklet": false, + "SharedWorker": false, + "showDirectoryPicker": false, + "showOpenFilePicker": false, + "showSaveFilePicker": false, + "SnapEvent": false, + "SourceBuffer": false, + "SourceBufferList": false, + "SpeechGrammar": false, + "SpeechGrammarList": false, + "SpeechRecognition": false, + "SpeechRecognitionErrorEvent": false, + "SpeechRecognitionEvent": false, + "SpeechRecognitionPhrase": false, + "speechSynthesis": false, + "SpeechSynthesis": false, + "SpeechSynthesisErrorEvent": false, + "SpeechSynthesisEvent": false, + "SpeechSynthesisUtterance": false, + "SpeechSynthesisVoice": false, + "StaticRange": false, + "status": false, + "statusbar": false, + "StereoPannerNode": false, + "stop": false, + "Storage": false, + "StorageBucket": false, + "StorageBucketManager": false, + "StorageEvent": false, + "StorageManager": false, + "structuredClone": false, + "styleMedia": false, + "StylePropertyMap": false, + "StylePropertyMapReadOnly": false, + "StyleSheet": false, + "StyleSheetList": false, + "SubmitEvent": false, + "Subscriber": false, + "SubtleCrypto": false, + "Summarizer": false, + "SuppressedError": false, + "SVGAElement": false, + "SVGAngle": false, + "SVGAnimatedAngle": false, + "SVGAnimatedBoolean": false, + "SVGAnimatedEnumeration": false, + "SVGAnimatedInteger": false, + "SVGAnimatedLength": false, + "SVGAnimatedLengthList": false, + "SVGAnimatedNumber": false, + "SVGAnimatedNumberList": false, + "SVGAnimatedPreserveAspectRatio": false, + "SVGAnimatedRect": false, + "SVGAnimatedString": false, + "SVGAnimatedTransformList": false, + "SVGAnimateElement": false, + "SVGAnimateMotionElement": false, + "SVGAnimateTransformElement": false, + "SVGAnimationElement": false, + "SVGCircleElement": false, + "SVGClipPathElement": false, + "SVGComponentTransferFunctionElement": false, + "SVGDefsElement": false, + "SVGDescElement": false, + "SVGElement": false, + "SVGEllipseElement": false, + "SVGFEBlendElement": false, + "SVGFEColorMatrixElement": false, + "SVGFEComponentTransferElement": false, + "SVGFECompositeElement": false, + "SVGFEConvolveMatrixElement": false, + "SVGFEDiffuseLightingElement": false, + "SVGFEDisplacementMapElement": false, + "SVGFEDistantLightElement": false, + "SVGFEDropShadowElement": false, + "SVGFEFloodElement": false, + "SVGFEFuncAElement": false, + "SVGFEFuncBElement": false, + "SVGFEFuncGElement": false, + "SVGFEFuncRElement": false, + "SVGFEGaussianBlurElement": false, + "SVGFEImageElement": false, + "SVGFEMergeElement": false, + "SVGFEMergeNodeElement": false, + "SVGFEMorphologyElement": false, + "SVGFEOffsetElement": false, + "SVGFEPointLightElement": false, + "SVGFESpecularLightingElement": false, + "SVGFESpotLightElement": false, + "SVGFETileElement": false, + "SVGFETurbulenceElement": false, + "SVGFilterElement": false, + "SVGForeignObjectElement": false, + "SVGGElement": false, + "SVGGeometryElement": false, + "SVGGradientElement": false, + "SVGGraphicsElement": false, + "SVGImageElement": false, + "SVGLength": false, + "SVGLengthList": false, + "SVGLinearGradientElement": false, + "SVGLineElement": false, + "SVGMarkerElement": false, + "SVGMaskElement": false, + "SVGMatrix": false, + "SVGMetadataElement": false, + "SVGMPathElement": false, + "SVGNumber": false, + "SVGNumberList": false, + "SVGPathElement": false, + "SVGPatternElement": false, + "SVGPoint": false, + "SVGPointList": false, + "SVGPolygonElement": false, + "SVGPolylineElement": false, + "SVGPreserveAspectRatio": false, + "SVGRadialGradientElement": false, + "SVGRect": false, + "SVGRectElement": false, + "SVGScriptElement": false, + "SVGSetElement": false, + "SVGStopElement": false, + "SVGStringList": false, + "SVGStyleElement": false, + "SVGSVGElement": false, + "SVGSwitchElement": false, + "SVGSymbolElement": false, + "SVGTextContentElement": false, + "SVGTextElement": false, + "SVGTextPathElement": false, + "SVGTextPositioningElement": false, + "SVGTitleElement": false, + "SVGTransform": false, + "SVGTransformList": false, + "SVGTSpanElement": false, + "SVGUnitTypes": false, + "SVGUseElement": false, + "SVGViewElement": false, + "SyncManager": false, + "TaskAttributionTiming": false, + "TaskController": false, + "TaskPriorityChangeEvent": false, + "TaskSignal": false, + "TEMPORARY": false, + "Text": false, + "TextDecoder": false, + "TextDecoderStream": false, + "TextEncoder": false, + "TextEncoderStream": false, + "TextEvent": false, + "TextFormat": false, + "TextFormatUpdateEvent": false, + "TextMetrics": false, + "TextTrack": false, + "TextTrackCue": false, + "TextTrackCueList": false, + "TextTrackList": false, + "TextUpdateEvent": false, + "TimeEvent": false, + "TimeRanges": false, + "ToggleEvent": false, + "toolbar": false, + "top": false, + "Touch": false, + "TouchEvent": false, + "TouchList": false, + "TrackEvent": false, + "TransformStream": false, + "TransformStreamDefaultController": false, + "TransitionEvent": false, + "Translator": false, + "TreeWalker": false, + "TrustedHTML": false, + "TrustedScript": false, + "TrustedScriptURL": false, + "TrustedTypePolicy": false, + "TrustedTypePolicyFactory": false, + "trustedTypes": false, + "UIEvent": false, + "URL": false, + "URLPattern": false, + "URLSearchParams": false, + "USB": false, + "USBAlternateInterface": false, + "USBConfiguration": false, + "USBConnectionEvent": false, + "USBDevice": false, + "USBEndpoint": false, + "USBInterface": false, + "USBInTransferResult": false, + "USBIsochronousInTransferPacket": false, + "USBIsochronousInTransferResult": false, + "USBIsochronousOutTransferPacket": false, + "USBIsochronousOutTransferResult": false, + "USBOutTransferResult": false, + "UserActivation": false, + "ValidityState": false, + "VideoColorSpace": false, + "VideoDecoder": false, + "VideoEncoder": false, + "VideoFrame": false, + "VideoPlaybackQuality": false, + "viewport": false, + "Viewport": false, + "ViewTimeline": false, + "ViewTransition": false, + "ViewTransitionTypeSet": false, + "VirtualKeyboard": false, + "VirtualKeyboardGeometryChangeEvent": false, + "VisibilityStateEntry": false, + "visualViewport": false, + "VisualViewport": false, + "VTTCue": false, + "VTTRegion": false, + "WakeLock": false, + "WakeLockSentinel": false, + "WaveShaperNode": false, + "WebAssembly": false, + "WebGL2RenderingContext": false, + "WebGLActiveInfo": false, + "WebGLBuffer": false, + "WebGLContextEvent": false, + "WebGLFramebuffer": false, + "WebGLObject": false, + "WebGLProgram": false, + "WebGLQuery": false, + "WebGLRenderbuffer": false, + "WebGLRenderingContext": false, + "WebGLSampler": false, + "WebGLShader": false, + "WebGLShaderPrecisionFormat": false, + "WebGLSync": false, + "WebGLTexture": false, + "WebGLTransformFeedback": false, + "WebGLUniformLocation": false, + "WebGLVertexArrayObject": false, + "WebSocket": false, + "WebSocketError": false, + "WebSocketStream": false, + "WebTransport": false, + "WebTransportBidirectionalStream": false, + "WebTransportDatagramDuplexStream": false, + "WebTransportError": false, + "WebTransportReceiveStream": false, + "WebTransportSendStream": false, + "WGSLLanguageFeatures": false, + "WheelEvent": false, + "when": false, + "window": false, + "Window": false, + "WindowControlsOverlay": false, + "WindowControlsOverlayGeometryChangeEvent": false, + "Worker": false, + "Worklet": false, + "WorkletGlobalScope": false, + "WritableStream": false, + "WritableStreamDefaultController": false, + "WritableStreamDefaultWriter": false, + "XMLDocument": false, + "XMLHttpRequest": false, + "XMLHttpRequestEventTarget": false, + "XMLHttpRequestUpload": false, + "XMLSerializer": false, + "XPathEvaluator": false, + "XPathExpression": false, + "XPathResult": false, + "XRAnchor": false, + "XRAnchorSet": false, + "XRBoundedReferenceSpace": false, + "XRCamera": false, + "XRCPUDepthInformation": false, + "XRDepthInformation": false, + "XRDOMOverlayState": false, + "XRFrame": false, + "XRHand": false, + "XRHitTestResult": false, + "XRHitTestSource": false, + "XRInputSource": false, + "XRInputSourceArray": false, + "XRInputSourceEvent": false, + "XRInputSourcesChangeEvent": false, + "XRJointPose": false, + "XRJointSpace": false, + "XRLayer": false, + "XRLightEstimate": false, + "XRLightProbe": false, + "XRPose": false, + "XRRay": false, + "XRReferenceSpace": false, + "XRReferenceSpaceEvent": false, + "XRRenderState": false, + "XRRigidTransform": false, + "XRSession": false, + "XRSessionEvent": false, + "XRSpace": false, + "XRSystem": false, + "XRTransientInputHitTestResult": false, + "XRTransientInputHitTestSource": false, + "XRView": false, + "XRViewerPose": false, + "XRViewport": false, + "XRWebGLBinding": false, + "XRWebGLDepthInformation": false, + "XRWebGLLayer": false, + "XSLTProcessor": false + } + }, + "errors": [ + { + "messageId": "impliedEval" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-implied-eval > invalid + +```js +setTimeout("x = 1;", 100); +``` + +```json +{ + "languageOptions": { + "globals": { + "AbortController": false, + "AbortSignal": false, + "AbsoluteOrientationSensor": false, + "AbstractRange": false, + "Accelerometer": false, + "addEventListener": false, + "ai": false, + "AI": false, + "AICreateMonitor": false, + "AITextSession": false, + "alert": false, + "AnalyserNode": false, + "Animation": false, + "AnimationEffect": false, + "AnimationEvent": false, + "AnimationPlaybackEvent": false, + "AnimationTimeline": false, + "AsyncDisposableStack": false, + "atob": false, + "Attr": false, + "Audio": false, + "AudioBuffer": false, + "AudioBufferSourceNode": false, + "AudioContext": false, + "AudioData": false, + "AudioDecoder": false, + "AudioDestinationNode": false, + "AudioEncoder": false, + "AudioListener": false, + "AudioNode": false, + "AudioParam": false, + "AudioParamMap": false, + "AudioProcessingEvent": false, + "AudioScheduledSourceNode": false, + "AudioSinkInfo": false, + "AudioWorklet": false, + "AudioWorkletGlobalScope": false, + "AudioWorkletNode": false, + "AudioWorkletProcessor": false, + "AuthenticatorAssertionResponse": false, + "AuthenticatorAttestationResponse": false, + "AuthenticatorResponse": false, + "BackgroundFetchManager": false, + "BackgroundFetchRecord": false, + "BackgroundFetchRegistration": false, + "BarcodeDetector": false, + "BarProp": false, + "BaseAudioContext": false, + "BatteryManager": false, + "BeforeUnloadEvent": false, + "BiquadFilterNode": false, + "Blob": false, + "BlobEvent": false, + "Bluetooth": false, + "BluetoothCharacteristicProperties": false, + "BluetoothDevice": false, + "BluetoothRemoteGATTCharacteristic": false, + "BluetoothRemoteGATTDescriptor": false, + "BluetoothRemoteGATTServer": false, + "BluetoothRemoteGATTService": false, + "BluetoothUUID": false, + "blur": false, + "BroadcastChannel": false, + "BrowserCaptureMediaStreamTrack": false, + "btoa": false, + "ByteLengthQueuingStrategy": false, + "Cache": false, + "caches": false, + "CacheStorage": false, + "cancelAnimationFrame": false, + "cancelIdleCallback": false, + "CanvasCaptureMediaStream": false, + "CanvasCaptureMediaStreamTrack": false, + "CanvasGradient": false, + "CanvasPattern": false, + "CanvasRenderingContext2D": false, + "CaptureController": false, + "CaretPosition": false, + "CDATASection": false, + "ChannelMergerNode": false, + "ChannelSplitterNode": false, + "ChapterInformation": false, + "CharacterBoundsUpdateEvent": false, + "CharacterData": false, + "clearInterval": false, + "clearTimeout": false, + "clientInformation": false, + "Clipboard": false, + "ClipboardChangeEvent": false, + "ClipboardEvent": false, + "ClipboardItem": false, + "close": false, + "closed": false, + "CloseEvent": false, + "CloseWatcher": false, + "CommandEvent": false, + "Comment": false, + "CompositionEvent": false, + "CompressionStream": false, + "confirm": false, + "console": false, + "ConstantSourceNode": false, + "ContentVisibilityAutoStateChangeEvent": false, + "ConvolverNode": false, + "CookieChangeEvent": false, + "CookieDeprecationLabel": false, + "cookieStore": false, + "CookieStore": false, + "CookieStoreManager": false, + "CountQueuingStrategy": false, + "createImageBitmap": false, + "CreateMonitor": false, + "Credential": false, + "credentialless": false, + "CredentialsContainer": false, + "CropTarget": false, + "crossOriginIsolated": false, + "crypto": false, + "Crypto": false, + "CryptoKey": false, + "CSPViolationReportBody": false, + "CSS": false, + "CSSAnimation": false, + "CSSConditionRule": false, + "CSSContainerRule": false, + "CSSCounterStyleRule": false, + "CSSFontFaceRule": false, + "CSSFontFeatureValuesRule": false, + "CSSFontPaletteValuesRule": false, + "CSSFunctionDeclarations": false, + "CSSFunctionDescriptors": false, + "CSSFunctionRule": false, + "CSSGroupingRule": false, + "CSSImageValue": false, + "CSSImportRule": false, + "CSSKeyframeRule": false, + "CSSKeyframesRule": false, + "CSSKeywordValue": false, + "CSSLayerBlockRule": false, + "CSSLayerStatementRule": false, + "CSSMarginRule": false, + "CSSMathClamp": false, + "CSSMathInvert": false, + "CSSMathMax": false, + "CSSMathMin": false, + "CSSMathNegate": false, + "CSSMathProduct": false, + "CSSMathSum": false, + "CSSMathValue": false, + "CSSMatrixComponent": false, + "CSSMediaRule": false, + "CSSNamespaceRule": false, + "CSSNestedDeclarations": false, + "CSSNumericArray": false, + "CSSNumericValue": false, + "CSSPageDescriptors": false, + "CSSPageRule": false, + "CSSPerspective": false, + "CSSPositionTryDescriptors": false, + "CSSPositionTryRule": false, + "CSSPositionValue": false, + "CSSPropertyRule": false, + "CSSRotate": false, + "CSSRule": false, + "CSSRuleList": false, + "CSSScale": false, + "CSSScopeRule": false, + "CSSSkew": false, + "CSSSkewX": false, + "CSSSkewY": false, + "CSSStartingStyleRule": false, + "CSSStyleDeclaration": false, + "CSSStyleRule": false, + "CSSStyleSheet": false, + "CSSStyleValue": false, + "CSSSupportsRule": false, + "CSSTransformComponent": false, + "CSSTransformValue": false, + "CSSTransition": false, + "CSSTranslate": false, + "CSSUnitValue": false, + "CSSUnparsedValue": false, + "CSSVariableReferenceValue": false, + "CSSViewTransitionRule": false, + "currentFrame": false, + "currentTime": false, + "CustomElementRegistry": false, + "customElements": false, + "CustomEvent": false, + "CustomStateSet": false, + "DataTransfer": false, + "DataTransferItem": false, + "DataTransferItemList": false, + "DecompressionStream": false, + "DelayNode": false, + "DelegatedInkTrailPresenter": false, + "DeviceMotionEvent": false, + "DeviceMotionEventAcceleration": false, + "DeviceMotionEventRotationRate": false, + "DeviceOrientationEvent": false, + "devicePixelRatio": false, + "DevicePosture": false, + "DigitalCredential": false, + "dispatchEvent": false, + "DisposableStack": false, + "document": false, + "Document": false, + "DocumentFragment": false, + "documentPictureInPicture": false, + "DocumentPictureInPicture": false, + "DocumentPictureInPictureEvent": false, + "DocumentTimeline": false, + "DocumentType": false, + "DOMError": false, + "DOMException": false, + "DOMImplementation": false, + "DOMMatrix": false, + "DOMMatrixReadOnly": false, + "DOMParser": false, + "DOMPoint": false, + "DOMPointReadOnly": false, + "DOMQuad": false, + "DOMRect": false, + "DOMRectList": false, + "DOMRectReadOnly": false, + "DOMStringList": false, + "DOMStringMap": false, + "DOMTokenList": false, + "DragEvent": false, + "DynamicsCompressorNode": false, + "EditContext": false, + "Element": false, + "ElementInternals": false, + "EncodedAudioChunk": false, + "EncodedVideoChunk": false, + "ErrorEvent": false, + "event": false, + "Event": false, + "EventCounts": false, + "EventSource": false, + "EventTarget": false, + "external": false, + "External": false, + "EyeDropper": false, + "FeaturePolicy": false, + "FederatedCredential": false, + "fence": false, + "Fence": false, + "FencedFrameConfig": false, + "fetch": false, + "fetchLater": false, + "FetchLaterResult": false, + "File": false, + "FileList": false, + "FileReader": false, + "FileSystem": false, + "FileSystemDirectoryEntry": false, + "FileSystemDirectoryHandle": false, + "FileSystemDirectoryReader": false, + "FileSystemEntry": false, + "FileSystemFileEntry": false, + "FileSystemFileHandle": false, + "FileSystemHandle": false, + "FileSystemObserver": false, + "FileSystemWritableFileStream": false, + "find": false, + "focus": false, + "FocusEvent": false, + "FontData": false, + "FontFace": false, + "FontFaceSet": false, + "FontFaceSetLoadEvent": false, + "FormData": false, + "FormDataEvent": false, + "FragmentDirective": false, + "frameElement": false, + "frames": false, + "GainNode": false, + "Gamepad": false, + "GamepadAxisMoveEvent": false, + "GamepadButton": false, + "GamepadButtonEvent": false, + "GamepadEvent": false, + "GamepadHapticActuator": false, + "GamepadPose": false, + "Geolocation": false, + "GeolocationCoordinates": false, + "GeolocationPosition": false, + "GeolocationPositionError": false, + "getComputedStyle": false, + "getScreenDetails": false, + "getSelection": false, + "GPU": false, + "GPUAdapter": false, + "GPUAdapterInfo": false, + "GPUBindGroup": false, + "GPUBindGroupLayout": false, + "GPUBuffer": false, + "GPUBufferUsage": false, + "GPUCanvasContext": false, + "GPUColorWrite": false, + "GPUCommandBuffer": false, + "GPUCommandEncoder": false, + "GPUCompilationInfo": false, + "GPUCompilationMessage": false, + "GPUComputePassEncoder": false, + "GPUComputePipeline": false, + "GPUDevice": false, + "GPUDeviceLostInfo": false, + "GPUError": false, + "GPUExternalTexture": false, + "GPUInternalError": false, + "GPUMapMode": false, + "GPUOutOfMemoryError": false, + "GPUPipelineError": false, + "GPUPipelineLayout": false, + "GPUQuerySet": false, + "GPUQueue": false, + "GPURenderBundle": false, + "GPURenderBundleEncoder": false, + "GPURenderPassEncoder": false, + "GPURenderPipeline": false, + "GPUSampler": false, + "GPUShaderModule": false, + "GPUShaderStage": false, + "GPUSupportedFeatures": false, + "GPUSupportedLimits": false, + "GPUTexture": false, + "GPUTextureUsage": false, + "GPUTextureView": false, + "GPUUncapturedErrorEvent": false, + "GPUValidationError": false, + "GravitySensor": false, + "Gyroscope": false, + "HashChangeEvent": false, + "Headers": false, + "HID": false, + "HIDConnectionEvent": false, + "HIDDevice": false, + "HIDInputReportEvent": false, + "Highlight": false, + "HighlightRegistry": false, + "history": false, + "History": false, + "HTMLAllCollection": false, + "HTMLAnchorElement": false, + "HTMLAreaElement": false, + "HTMLAudioElement": false, + "HTMLBaseElement": false, + "HTMLBodyElement": false, + "HTMLBRElement": false, + "HTMLButtonElement": false, + "HTMLCanvasElement": false, + "HTMLCollection": false, + "HTMLDataElement": false, + "HTMLDataListElement": false, + "HTMLDetailsElement": false, + "HTMLDialogElement": false, + "HTMLDirectoryElement": false, + "HTMLDivElement": false, + "HTMLDListElement": false, + "HTMLDocument": false, + "HTMLElement": false, + "HTMLEmbedElement": false, + "HTMLFencedFrameElement": false, + "HTMLFieldSetElement": false, + "HTMLFontElement": false, + "HTMLFormControlsCollection": false, + "HTMLFormElement": false, + "HTMLFrameElement": false, + "HTMLFrameSetElement": false, + "HTMLHeadElement": false, + "HTMLHeadingElement": false, + "HTMLHRElement": false, + "HTMLHtmlElement": false, + "HTMLIFrameElement": false, + "HTMLImageElement": false, + "HTMLInputElement": false, + "HTMLLabelElement": false, + "HTMLLegendElement": false, + "HTMLLIElement": false, + "HTMLLinkElement": false, + "HTMLMapElement": false, + "HTMLMarqueeElement": false, + "HTMLMediaElement": false, + "HTMLMenuElement": false, + "HTMLMetaElement": false, + "HTMLMeterElement": false, + "HTMLModElement": false, + "HTMLObjectElement": false, + "HTMLOListElement": false, + "HTMLOptGroupElement": false, + "HTMLOptionElement": false, + "HTMLOptionsCollection": false, + "HTMLOutputElement": false, + "HTMLParagraphElement": false, + "HTMLParamElement": false, + "HTMLPictureElement": false, + "HTMLPreElement": false, + "HTMLProgressElement": false, + "HTMLQuoteElement": false, + "HTMLScriptElement": false, + "HTMLSelectedContentElement": false, + "HTMLSelectElement": false, + "HTMLSlotElement": false, + "HTMLSourceElement": false, + "HTMLSpanElement": false, + "HTMLStyleElement": false, + "HTMLTableCaptionElement": false, + "HTMLTableCellElement": false, + "HTMLTableColElement": false, + "HTMLTableElement": false, + "HTMLTableRowElement": false, + "HTMLTableSectionElement": false, + "HTMLTemplateElement": false, + "HTMLTextAreaElement": false, + "HTMLTimeElement": false, + "HTMLTitleElement": false, + "HTMLTrackElement": false, + "HTMLUListElement": false, + "HTMLUnknownElement": false, + "HTMLVideoElement": false, + "IDBCursor": false, + "IDBCursorWithValue": false, + "IDBDatabase": false, + "IDBFactory": false, + "IDBIndex": false, + "IDBKeyRange": false, + "IDBObjectStore": false, + "IDBOpenDBRequest": false, + "IDBRecord": false, + "IDBRequest": false, + "IDBTransaction": false, + "IDBVersionChangeEvent": false, + "IdentityCredential": false, + "IdentityCredentialError": false, + "IdentityProvider": false, + "IdleDeadline": false, + "IdleDetector": false, + "IIRFilterNode": false, + "Image": false, + "ImageBitmap": false, + "ImageBitmapRenderingContext": false, + "ImageCapture": false, + "ImageData": false, + "ImageDecoder": false, + "ImageTrack": false, + "ImageTrackList": false, + "indexedDB": false, + "Ink": false, + "innerHeight": false, + "innerWidth": false, + "InputDeviceCapabilities": false, + "InputDeviceInfo": false, + "InputEvent": false, + "IntegrityViolationReportBody": false, + "InterestEvent": false, + "IntersectionObserver": false, + "IntersectionObserverEntry": false, + "isSecureContext": false, + "Keyboard": false, + "KeyboardEvent": false, + "KeyboardLayoutMap": false, + "KeyframeEffect": false, + "LanguageDetector": false, + "LargestContentfulPaint": false, + "LaunchParams": false, + "launchQueue": false, + "LaunchQueue": false, + "LayoutShift": false, + "LayoutShiftAttribution": false, + "length": false, + "LinearAccelerationSensor": false, + "localStorage": false, + "location": true, + "Location": false, + "locationbar": false, + "Lock": false, + "LockManager": false, + "matchMedia": false, + "MathMLElement": false, + "MediaCapabilities": false, + "MediaCapabilitiesInfo": false, + "MediaDeviceInfo": false, + "MediaDevices": false, + "MediaElementAudioSourceNode": false, + "MediaEncryptedEvent": false, + "MediaError": false, + "MediaKeyError": false, + "MediaKeyMessageEvent": false, + "MediaKeys": false, + "MediaKeySession": false, + "MediaKeyStatusMap": false, + "MediaKeySystemAccess": false, + "MediaList": false, + "MediaMetadata": false, + "MediaQueryList": false, + "MediaQueryListEvent": false, + "MediaRecorder": false, + "MediaRecorderErrorEvent": false, + "MediaSession": false, + "MediaSource": false, + "MediaSourceHandle": false, + "MediaStream": false, + "MediaStreamAudioDestinationNode": false, + "MediaStreamAudioSourceNode": false, + "MediaStreamEvent": false, + "MediaStreamTrack": false, + "MediaStreamTrackAudioSourceNode": false, + "MediaStreamTrackAudioStats": false, + "MediaStreamTrackEvent": false, + "MediaStreamTrackGenerator": false, + "MediaStreamTrackProcessor": false, + "MediaStreamTrackVideoStats": false, + "menubar": false, + "MessageChannel": false, + "MessageEvent": false, + "MessagePort": false, + "MIDIAccess": false, + "MIDIConnectionEvent": false, + "MIDIInput": false, + "MIDIInputMap": false, + "MIDIMessageEvent": false, + "MIDIOutput": false, + "MIDIOutputMap": false, + "MIDIPort": false, + "MimeType": false, + "MimeTypeArray": false, + "model": false, + "ModelGenericSession": false, + "ModelManager": false, + "MouseEvent": false, + "moveBy": false, + "moveTo": false, + "MutationEvent": false, + "MutationObserver": false, + "MutationRecord": false, + "name": false, + "NamedNodeMap": false, + "NavigateEvent": false, + "navigation": false, + "Navigation": false, + "NavigationActivation": false, + "NavigationCurrentEntryChangeEvent": false, + "NavigationDestination": false, + "NavigationHistoryEntry": false, + "NavigationPrecommitController": false, + "NavigationPreloadManager": false, + "NavigationTransition": false, + "navigator": false, + "Navigator": false, + "NavigatorLogin": false, + "NavigatorManagedData": false, + "NavigatorUAData": false, + "NetworkInformation": false, + "Node": false, + "NodeFilter": false, + "NodeIterator": false, + "NodeList": false, + "Notification": false, + "NotifyPaintEvent": false, + "NotRestoredReasonDetails": false, + "NotRestoredReasons": false, + "Observable": false, + "OfflineAudioCompletionEvent": false, + "OfflineAudioContext": false, + "offscreenBuffering": false, + "OffscreenCanvas": false, + "OffscreenCanvasRenderingContext2D": false, + "onabort": true, + "onafterprint": true, + "onanimationcancel": true, + "onanimationend": true, + "onanimationiteration": true, + "onanimationstart": true, + "onappinstalled": true, + "onauxclick": true, + "onbeforeinput": true, + "onbeforeinstallprompt": true, + "onbeforematch": true, + "onbeforeprint": true, + "onbeforetoggle": true, + "onbeforeunload": true, + "onbeforexrselect": true, + "onblur": true, + "oncancel": true, + "oncanplay": true, + "oncanplaythrough": true, + "onchange": true, + "onclick": true, + "onclose": true, + "oncommand": true, + "oncontentvisibilityautostatechange": true, + "oncontextlost": true, + "oncontextmenu": true, + "oncontextrestored": true, + "oncopy": true, + "oncuechange": true, + "oncut": true, + "ondblclick": true, + "ondevicemotion": true, + "ondeviceorientation": true, + "ondeviceorientationabsolute": true, + "ondrag": true, + "ondragend": true, + "ondragenter": true, + "ondragleave": true, + "ondragover": true, + "ondragstart": true, + "ondrop": true, + "ondurationchange": true, + "onemptied": true, + "onended": true, + "onerror": true, + "onfocus": true, + "onformdata": true, + "ongamepadconnected": true, + "ongamepaddisconnected": true, + "ongotpointercapture": true, + "onhashchange": true, + "oninput": true, + "oninvalid": true, + "onkeydown": true, + "onkeypress": true, + "onkeyup": true, + "onlanguagechange": true, + "onload": true, + "onloadeddata": true, + "onloadedmetadata": true, + "onloadstart": true, + "onlostpointercapture": true, + "onmessage": true, + "onmessageerror": true, + "onmousedown": true, + "onmouseenter": true, + "onmouseleave": true, + "onmousemove": true, + "onmouseout": true, + "onmouseover": true, + "onmouseup": true, + "onmousewheel": true, + "onoffline": true, + "ononline": true, + "onpagehide": true, + "onpagereveal": true, + "onpageshow": true, + "onpageswap": true, + "onpaste": true, + "onpause": true, + "onplay": true, + "onplaying": true, + "onpointercancel": true, + "onpointerdown": true, + "onpointerenter": true, + "onpointerleave": true, + "onpointermove": true, + "onpointerout": true, + "onpointerover": true, + "onpointerrawupdate": true, + "onpointerup": true, + "onpopstate": true, + "onprogress": true, + "onratechange": true, + "onrejectionhandled": true, + "onreset": true, + "onresize": true, + "onscroll": true, + "onscrollend": true, + "onscrollsnapchange": true, + "onscrollsnapchanging": true, + "onsearch": true, + "onsecuritypolicyviolation": true, + "onseeked": true, + "onseeking": true, + "onselect": true, + "onselectionchange": true, + "onselectstart": true, + "onslotchange": true, + "onstalled": true, + "onstorage": true, + "onsubmit": true, + "onsuspend": true, + "ontimeupdate": true, + "ontoggle": true, + "ontransitioncancel": true, + "ontransitionend": true, + "ontransitionrun": true, + "ontransitionstart": true, + "onunhandledrejection": true, + "onunload": true, + "onvolumechange": true, + "onwaiting": true, + "onwheel": true, + "open": false, + "opener": false, + "Option": false, + "OrientationSensor": false, + "origin": false, + "originAgentCluster": false, + "OscillatorNode": false, + "OTPCredential": false, + "outerHeight": false, + "outerWidth": false, + "OverconstrainedError": false, + "PageRevealEvent": false, + "PageSwapEvent": false, + "PageTransitionEvent": false, + "pageXOffset": false, + "pageYOffset": false, + "PannerNode": false, + "parent": false, + "PasswordCredential": false, + "Path2D": false, + "PaymentAddress": false, + "PaymentManager": false, + "PaymentMethodChangeEvent": false, + "PaymentRequest": false, + "PaymentRequestUpdateEvent": false, + "PaymentResponse": false, + "performance": false, + "Performance": false, + "PerformanceElementTiming": false, + "PerformanceEntry": false, + "PerformanceEventTiming": false, + "PerformanceLongAnimationFrameTiming": false, + "PerformanceLongTaskTiming": false, + "PerformanceMark": false, + "PerformanceMeasure": false, + "PerformanceNavigation": false, + "PerformanceNavigationTiming": false, + "PerformanceObserver": false, + "PerformanceObserverEntryList": false, + "PerformancePaintTiming": false, + "PerformanceResourceTiming": false, + "PerformanceScriptTiming": false, + "PerformanceServerTiming": false, + "PerformanceTiming": false, + "PeriodicSyncManager": false, + "PeriodicWave": false, + "Permissions": false, + "PermissionStatus": false, + "PERSISTENT": false, + "personalbar": false, + "PictureInPictureEvent": false, + "PictureInPictureWindow": false, + "Plugin": false, + "PluginArray": false, + "PointerEvent": false, + "PopStateEvent": false, + "postMessage": false, + "Presentation": false, + "PresentationAvailability": false, + "PresentationConnection": false, + "PresentationConnectionAvailableEvent": false, + "PresentationConnectionCloseEvent": false, + "PresentationConnectionList": false, + "PresentationReceiver": false, + "PresentationRequest": false, + "PressureObserver": false, + "PressureRecord": false, + "print": false, + "ProcessingInstruction": false, + "Profiler": false, + "ProgressEvent": false, + "PromiseRejectionEvent": false, + "prompt": false, + "ProtectedAudience": false, + "PublicKeyCredential": false, + "PushManager": false, + "PushSubscription": false, + "PushSubscriptionOptions": false, + "queryLocalFonts": false, + "queueMicrotask": false, + "QuotaExceededError": false, + "RadioNodeList": false, + "Range": false, + "ReadableByteStreamController": false, + "ReadableStream": false, + "ReadableStreamBYOBReader": false, + "ReadableStreamBYOBRequest": false, + "ReadableStreamDefaultController": false, + "ReadableStreamDefaultReader": false, + "registerProcessor": false, + "RelativeOrientationSensor": false, + "RemotePlayback": false, + "removeEventListener": false, + "ReportBody": false, + "reportError": false, + "ReportingObserver": false, + "Request": false, + "requestAnimationFrame": false, + "requestIdleCallback": false, + "resizeBy": false, + "ResizeObserver": false, + "ResizeObserverEntry": false, + "ResizeObserverSize": false, + "resizeTo": false, + "Response": false, + "RestrictionTarget": false, + "RTCCertificate": false, + "RTCDataChannel": false, + "RTCDataChannelEvent": false, + "RTCDtlsTransport": false, + "RTCDTMFSender": false, + "RTCDTMFToneChangeEvent": false, + "RTCEncodedAudioFrame": false, + "RTCEncodedVideoFrame": false, + "RTCError": false, + "RTCErrorEvent": false, + "RTCIceCandidate": false, + "RTCIceTransport": false, + "RTCPeerConnection": false, + "RTCPeerConnectionIceErrorEvent": false, + "RTCPeerConnectionIceEvent": false, + "RTCRtpReceiver": false, + "RTCRtpScriptTransform": false, + "RTCRtpSender": false, + "RTCRtpTransceiver": false, + "RTCSctpTransport": false, + "RTCSessionDescription": false, + "RTCStatsReport": false, + "RTCTrackEvent": false, + "sampleRate": false, + "scheduler": false, + "Scheduler": false, + "Scheduling": false, + "screen": false, + "Screen": false, + "ScreenDetailed": false, + "ScreenDetails": false, + "screenLeft": false, + "ScreenOrientation": false, + "screenTop": false, + "screenX": false, + "screenY": false, + "ScriptProcessorNode": false, + "scroll": false, + "scrollbars": false, + "scrollBy": false, + "ScrollTimeline": false, + "scrollTo": false, + "scrollX": false, + "scrollY": false, + "SecurityPolicyViolationEvent": false, + "Selection": false, + "self": false, + "Sensor": false, + "SensorErrorEvent": false, + "Serial": false, + "SerialPort": false, + "ServiceWorker": false, + "ServiceWorkerContainer": false, + "ServiceWorkerRegistration": false, + "sessionStorage": false, + "setInterval": false, + "setTimeout": false, + "ShadowRoot": false, + "sharedStorage": false, + "SharedStorage": false, + "SharedStorageAppendMethod": false, + "SharedStorageClearMethod": false, + "SharedStorageDeleteMethod": false, + "SharedStorageModifierMethod": false, + "SharedStorageSetMethod": false, + "SharedStorageWorklet": false, + "SharedWorker": false, + "showDirectoryPicker": false, + "showOpenFilePicker": false, + "showSaveFilePicker": false, + "SnapEvent": false, + "SourceBuffer": false, + "SourceBufferList": false, + "SpeechGrammar": false, + "SpeechGrammarList": false, + "SpeechRecognition": false, + "SpeechRecognitionErrorEvent": false, + "SpeechRecognitionEvent": false, + "SpeechRecognitionPhrase": false, + "speechSynthesis": false, + "SpeechSynthesis": false, + "SpeechSynthesisErrorEvent": false, + "SpeechSynthesisEvent": false, + "SpeechSynthesisUtterance": false, + "SpeechSynthesisVoice": false, + "StaticRange": false, + "status": false, + "statusbar": false, + "StereoPannerNode": false, + "stop": false, + "Storage": false, + "StorageBucket": false, + "StorageBucketManager": false, + "StorageEvent": false, + "StorageManager": false, + "structuredClone": false, + "styleMedia": false, + "StylePropertyMap": false, + "StylePropertyMapReadOnly": false, + "StyleSheet": false, + "StyleSheetList": false, + "SubmitEvent": false, + "Subscriber": false, + "SubtleCrypto": false, + "Summarizer": false, + "SuppressedError": false, + "SVGAElement": false, + "SVGAngle": false, + "SVGAnimatedAngle": false, + "SVGAnimatedBoolean": false, + "SVGAnimatedEnumeration": false, + "SVGAnimatedInteger": false, + "SVGAnimatedLength": false, + "SVGAnimatedLengthList": false, + "SVGAnimatedNumber": false, + "SVGAnimatedNumberList": false, + "SVGAnimatedPreserveAspectRatio": false, + "SVGAnimatedRect": false, + "SVGAnimatedString": false, + "SVGAnimatedTransformList": false, + "SVGAnimateElement": false, + "SVGAnimateMotionElement": false, + "SVGAnimateTransformElement": false, + "SVGAnimationElement": false, + "SVGCircleElement": false, + "SVGClipPathElement": false, + "SVGComponentTransferFunctionElement": false, + "SVGDefsElement": false, + "SVGDescElement": false, + "SVGElement": false, + "SVGEllipseElement": false, + "SVGFEBlendElement": false, + "SVGFEColorMatrixElement": false, + "SVGFEComponentTransferElement": false, + "SVGFECompositeElement": false, + "SVGFEConvolveMatrixElement": false, + "SVGFEDiffuseLightingElement": false, + "SVGFEDisplacementMapElement": false, + "SVGFEDistantLightElement": false, + "SVGFEDropShadowElement": false, + "SVGFEFloodElement": false, + "SVGFEFuncAElement": false, + "SVGFEFuncBElement": false, + "SVGFEFuncGElement": false, + "SVGFEFuncRElement": false, + "SVGFEGaussianBlurElement": false, + "SVGFEImageElement": false, + "SVGFEMergeElement": false, + "SVGFEMergeNodeElement": false, + "SVGFEMorphologyElement": false, + "SVGFEOffsetElement": false, + "SVGFEPointLightElement": false, + "SVGFESpecularLightingElement": false, + "SVGFESpotLightElement": false, + "SVGFETileElement": false, + "SVGFETurbulenceElement": false, + "SVGFilterElement": false, + "SVGForeignObjectElement": false, + "SVGGElement": false, + "SVGGeometryElement": false, + "SVGGradientElement": false, + "SVGGraphicsElement": false, + "SVGImageElement": false, + "SVGLength": false, + "SVGLengthList": false, + "SVGLinearGradientElement": false, + "SVGLineElement": false, + "SVGMarkerElement": false, + "SVGMaskElement": false, + "SVGMatrix": false, + "SVGMetadataElement": false, + "SVGMPathElement": false, + "SVGNumber": false, + "SVGNumberList": false, + "SVGPathElement": false, + "SVGPatternElement": false, + "SVGPoint": false, + "SVGPointList": false, + "SVGPolygonElement": false, + "SVGPolylineElement": false, + "SVGPreserveAspectRatio": false, + "SVGRadialGradientElement": false, + "SVGRect": false, + "SVGRectElement": false, + "SVGScriptElement": false, + "SVGSetElement": false, + "SVGStopElement": false, + "SVGStringList": false, + "SVGStyleElement": false, + "SVGSVGElement": false, + "SVGSwitchElement": false, + "SVGSymbolElement": false, + "SVGTextContentElement": false, + "SVGTextElement": false, + "SVGTextPathElement": false, + "SVGTextPositioningElement": false, + "SVGTitleElement": false, + "SVGTransform": false, + "SVGTransformList": false, + "SVGTSpanElement": false, + "SVGUnitTypes": false, + "SVGUseElement": false, + "SVGViewElement": false, + "SyncManager": false, + "TaskAttributionTiming": false, + "TaskController": false, + "TaskPriorityChangeEvent": false, + "TaskSignal": false, + "TEMPORARY": false, + "Text": false, + "TextDecoder": false, + "TextDecoderStream": false, + "TextEncoder": false, + "TextEncoderStream": false, + "TextEvent": false, + "TextFormat": false, + "TextFormatUpdateEvent": false, + "TextMetrics": false, + "TextTrack": false, + "TextTrackCue": false, + "TextTrackCueList": false, + "TextTrackList": false, + "TextUpdateEvent": false, + "TimeEvent": false, + "TimeRanges": false, + "ToggleEvent": false, + "toolbar": false, + "top": false, + "Touch": false, + "TouchEvent": false, + "TouchList": false, + "TrackEvent": false, + "TransformStream": false, + "TransformStreamDefaultController": false, + "TransitionEvent": false, + "Translator": false, + "TreeWalker": false, + "TrustedHTML": false, + "TrustedScript": false, + "TrustedScriptURL": false, + "TrustedTypePolicy": false, + "TrustedTypePolicyFactory": false, + "trustedTypes": false, + "UIEvent": false, + "URL": false, + "URLPattern": false, + "URLSearchParams": false, + "USB": false, + "USBAlternateInterface": false, + "USBConfiguration": false, + "USBConnectionEvent": false, + "USBDevice": false, + "USBEndpoint": false, + "USBInterface": false, + "USBInTransferResult": false, + "USBIsochronousInTransferPacket": false, + "USBIsochronousInTransferResult": false, + "USBIsochronousOutTransferPacket": false, + "USBIsochronousOutTransferResult": false, + "USBOutTransferResult": false, + "UserActivation": false, + "ValidityState": false, + "VideoColorSpace": false, + "VideoDecoder": false, + "VideoEncoder": false, + "VideoFrame": false, + "VideoPlaybackQuality": false, + "viewport": false, + "Viewport": false, + "ViewTimeline": false, + "ViewTransition": false, + "ViewTransitionTypeSet": false, + "VirtualKeyboard": false, + "VirtualKeyboardGeometryChangeEvent": false, + "VisibilityStateEntry": false, + "visualViewport": false, + "VisualViewport": false, + "VTTCue": false, + "VTTRegion": false, + "WakeLock": false, + "WakeLockSentinel": false, + "WaveShaperNode": false, + "WebAssembly": false, + "WebGL2RenderingContext": false, + "WebGLActiveInfo": false, + "WebGLBuffer": false, + "WebGLContextEvent": false, + "WebGLFramebuffer": false, + "WebGLObject": false, + "WebGLProgram": false, + "WebGLQuery": false, + "WebGLRenderbuffer": false, + "WebGLRenderingContext": false, + "WebGLSampler": false, + "WebGLShader": false, + "WebGLShaderPrecisionFormat": false, + "WebGLSync": false, + "WebGLTexture": false, + "WebGLTransformFeedback": false, + "WebGLUniformLocation": false, + "WebGLVertexArrayObject": false, + "WebSocket": false, + "WebSocketError": false, + "WebSocketStream": false, + "WebTransport": false, + "WebTransportBidirectionalStream": false, + "WebTransportDatagramDuplexStream": false, + "WebTransportError": false, + "WebTransportReceiveStream": false, + "WebTransportSendStream": false, + "WGSLLanguageFeatures": false, + "WheelEvent": false, + "when": false, + "window": false, + "Window": false, + "WindowControlsOverlay": false, + "WindowControlsOverlayGeometryChangeEvent": false, + "Worker": false, + "Worklet": false, + "WorkletGlobalScope": false, + "WritableStream": false, + "WritableStreamDefaultController": false, + "WritableStreamDefaultWriter": false, + "XMLDocument": false, + "XMLHttpRequest": false, + "XMLHttpRequestEventTarget": false, + "XMLHttpRequestUpload": false, + "XMLSerializer": false, + "XPathEvaluator": false, + "XPathExpression": false, + "XPathResult": false, + "XRAnchor": false, + "XRAnchorSet": false, + "XRBoundedReferenceSpace": false, + "XRCamera": false, + "XRCPUDepthInformation": false, + "XRDepthInformation": false, + "XRDOMOverlayState": false, + "XRFrame": false, + "XRHand": false, + "XRHitTestResult": false, + "XRHitTestSource": false, + "XRInputSource": false, + "XRInputSourceArray": false, + "XRInputSourceEvent": false, + "XRInputSourcesChangeEvent": false, + "XRJointPose": false, + "XRJointSpace": false, + "XRLayer": false, + "XRLightEstimate": false, + "XRLightProbe": false, + "XRPose": false, + "XRRay": false, + "XRReferenceSpace": false, + "XRReferenceSpaceEvent": false, + "XRRenderState": false, + "XRRigidTransform": false, + "XRSession": false, + "XRSessionEvent": false, + "XRSpace": false, + "XRSystem": false, + "XRTransientInputHitTestResult": false, + "XRTransientInputHitTestSource": false, + "XRView": false, + "XRViewerPose": false, + "XRViewport": false, + "XRWebGLBinding": false, + "XRWebGLDepthInformation": false, + "XRWebGLLayer": false, + "XSLTProcessor": false + } + }, + "errors": [ + { + "messageId": "impliedEval" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-implied-eval > invalid + +```js +setInterval("x = 1;"); +``` + +```json +{ + "languageOptions": { + "globals": { + "AbortController": false, + "AbortSignal": false, + "AbsoluteOrientationSensor": false, + "AbstractRange": false, + "Accelerometer": false, + "addEventListener": false, + "ai": false, + "AI": false, + "AICreateMonitor": false, + "AITextSession": false, + "alert": false, + "AnalyserNode": false, + "Animation": false, + "AnimationEffect": false, + "AnimationEvent": false, + "AnimationPlaybackEvent": false, + "AnimationTimeline": false, + "AsyncDisposableStack": false, + "atob": false, + "Attr": false, + "Audio": false, + "AudioBuffer": false, + "AudioBufferSourceNode": false, + "AudioContext": false, + "AudioData": false, + "AudioDecoder": false, + "AudioDestinationNode": false, + "AudioEncoder": false, + "AudioListener": false, + "AudioNode": false, + "AudioParam": false, + "AudioParamMap": false, + "AudioProcessingEvent": false, + "AudioScheduledSourceNode": false, + "AudioSinkInfo": false, + "AudioWorklet": false, + "AudioWorkletGlobalScope": false, + "AudioWorkletNode": false, + "AudioWorkletProcessor": false, + "AuthenticatorAssertionResponse": false, + "AuthenticatorAttestationResponse": false, + "AuthenticatorResponse": false, + "BackgroundFetchManager": false, + "BackgroundFetchRecord": false, + "BackgroundFetchRegistration": false, + "BarcodeDetector": false, + "BarProp": false, + "BaseAudioContext": false, + "BatteryManager": false, + "BeforeUnloadEvent": false, + "BiquadFilterNode": false, + "Blob": false, + "BlobEvent": false, + "Bluetooth": false, + "BluetoothCharacteristicProperties": false, + "BluetoothDevice": false, + "BluetoothRemoteGATTCharacteristic": false, + "BluetoothRemoteGATTDescriptor": false, + "BluetoothRemoteGATTServer": false, + "BluetoothRemoteGATTService": false, + "BluetoothUUID": false, + "blur": false, + "BroadcastChannel": false, + "BrowserCaptureMediaStreamTrack": false, + "btoa": false, + "ByteLengthQueuingStrategy": false, + "Cache": false, + "caches": false, + "CacheStorage": false, + "cancelAnimationFrame": false, + "cancelIdleCallback": false, + "CanvasCaptureMediaStream": false, + "CanvasCaptureMediaStreamTrack": false, + "CanvasGradient": false, + "CanvasPattern": false, + "CanvasRenderingContext2D": false, + "CaptureController": false, + "CaretPosition": false, + "CDATASection": false, + "ChannelMergerNode": false, + "ChannelSplitterNode": false, + "ChapterInformation": false, + "CharacterBoundsUpdateEvent": false, + "CharacterData": false, + "clearInterval": false, + "clearTimeout": false, + "clientInformation": false, + "Clipboard": false, + "ClipboardChangeEvent": false, + "ClipboardEvent": false, + "ClipboardItem": false, + "close": false, + "closed": false, + "CloseEvent": false, + "CloseWatcher": false, + "CommandEvent": false, + "Comment": false, + "CompositionEvent": false, + "CompressionStream": false, + "confirm": false, + "console": false, + "ConstantSourceNode": false, + "ContentVisibilityAutoStateChangeEvent": false, + "ConvolverNode": false, + "CookieChangeEvent": false, + "CookieDeprecationLabel": false, + "cookieStore": false, + "CookieStore": false, + "CookieStoreManager": false, + "CountQueuingStrategy": false, + "createImageBitmap": false, + "CreateMonitor": false, + "Credential": false, + "credentialless": false, + "CredentialsContainer": false, + "CropTarget": false, + "crossOriginIsolated": false, + "crypto": false, + "Crypto": false, + "CryptoKey": false, + "CSPViolationReportBody": false, + "CSS": false, + "CSSAnimation": false, + "CSSConditionRule": false, + "CSSContainerRule": false, + "CSSCounterStyleRule": false, + "CSSFontFaceRule": false, + "CSSFontFeatureValuesRule": false, + "CSSFontPaletteValuesRule": false, + "CSSFunctionDeclarations": false, + "CSSFunctionDescriptors": false, + "CSSFunctionRule": false, + "CSSGroupingRule": false, + "CSSImageValue": false, + "CSSImportRule": false, + "CSSKeyframeRule": false, + "CSSKeyframesRule": false, + "CSSKeywordValue": false, + "CSSLayerBlockRule": false, + "CSSLayerStatementRule": false, + "CSSMarginRule": false, + "CSSMathClamp": false, + "CSSMathInvert": false, + "CSSMathMax": false, + "CSSMathMin": false, + "CSSMathNegate": false, + "CSSMathProduct": false, + "CSSMathSum": false, + "CSSMathValue": false, + "CSSMatrixComponent": false, + "CSSMediaRule": false, + "CSSNamespaceRule": false, + "CSSNestedDeclarations": false, + "CSSNumericArray": false, + "CSSNumericValue": false, + "CSSPageDescriptors": false, + "CSSPageRule": false, + "CSSPerspective": false, + "CSSPositionTryDescriptors": false, + "CSSPositionTryRule": false, + "CSSPositionValue": false, + "CSSPropertyRule": false, + "CSSRotate": false, + "CSSRule": false, + "CSSRuleList": false, + "CSSScale": false, + "CSSScopeRule": false, + "CSSSkew": false, + "CSSSkewX": false, + "CSSSkewY": false, + "CSSStartingStyleRule": false, + "CSSStyleDeclaration": false, + "CSSStyleRule": false, + "CSSStyleSheet": false, + "CSSStyleValue": false, + "CSSSupportsRule": false, + "CSSTransformComponent": false, + "CSSTransformValue": false, + "CSSTransition": false, + "CSSTranslate": false, + "CSSUnitValue": false, + "CSSUnparsedValue": false, + "CSSVariableReferenceValue": false, + "CSSViewTransitionRule": false, + "currentFrame": false, + "currentTime": false, + "CustomElementRegistry": false, + "customElements": false, + "CustomEvent": false, + "CustomStateSet": false, + "DataTransfer": false, + "DataTransferItem": false, + "DataTransferItemList": false, + "DecompressionStream": false, + "DelayNode": false, + "DelegatedInkTrailPresenter": false, + "DeviceMotionEvent": false, + "DeviceMotionEventAcceleration": false, + "DeviceMotionEventRotationRate": false, + "DeviceOrientationEvent": false, + "devicePixelRatio": false, + "DevicePosture": false, + "DigitalCredential": false, + "dispatchEvent": false, + "DisposableStack": false, + "document": false, + "Document": false, + "DocumentFragment": false, + "documentPictureInPicture": false, + "DocumentPictureInPicture": false, + "DocumentPictureInPictureEvent": false, + "DocumentTimeline": false, + "DocumentType": false, + "DOMError": false, + "DOMException": false, + "DOMImplementation": false, + "DOMMatrix": false, + "DOMMatrixReadOnly": false, + "DOMParser": false, + "DOMPoint": false, + "DOMPointReadOnly": false, + "DOMQuad": false, + "DOMRect": false, + "DOMRectList": false, + "DOMRectReadOnly": false, + "DOMStringList": false, + "DOMStringMap": false, + "DOMTokenList": false, + "DragEvent": false, + "DynamicsCompressorNode": false, + "EditContext": false, + "Element": false, + "ElementInternals": false, + "EncodedAudioChunk": false, + "EncodedVideoChunk": false, + "ErrorEvent": false, + "event": false, + "Event": false, + "EventCounts": false, + "EventSource": false, + "EventTarget": false, + "external": false, + "External": false, + "EyeDropper": false, + "FeaturePolicy": false, + "FederatedCredential": false, + "fence": false, + "Fence": false, + "FencedFrameConfig": false, + "fetch": false, + "fetchLater": false, + "FetchLaterResult": false, + "File": false, + "FileList": false, + "FileReader": false, + "FileSystem": false, + "FileSystemDirectoryEntry": false, + "FileSystemDirectoryHandle": false, + "FileSystemDirectoryReader": false, + "FileSystemEntry": false, + "FileSystemFileEntry": false, + "FileSystemFileHandle": false, + "FileSystemHandle": false, + "FileSystemObserver": false, + "FileSystemWritableFileStream": false, + "find": false, + "focus": false, + "FocusEvent": false, + "FontData": false, + "FontFace": false, + "FontFaceSet": false, + "FontFaceSetLoadEvent": false, + "FormData": false, + "FormDataEvent": false, + "FragmentDirective": false, + "frameElement": false, + "frames": false, + "GainNode": false, + "Gamepad": false, + "GamepadAxisMoveEvent": false, + "GamepadButton": false, + "GamepadButtonEvent": false, + "GamepadEvent": false, + "GamepadHapticActuator": false, + "GamepadPose": false, + "Geolocation": false, + "GeolocationCoordinates": false, + "GeolocationPosition": false, + "GeolocationPositionError": false, + "getComputedStyle": false, + "getScreenDetails": false, + "getSelection": false, + "GPU": false, + "GPUAdapter": false, + "GPUAdapterInfo": false, + "GPUBindGroup": false, + "GPUBindGroupLayout": false, + "GPUBuffer": false, + "GPUBufferUsage": false, + "GPUCanvasContext": false, + "GPUColorWrite": false, + "GPUCommandBuffer": false, + "GPUCommandEncoder": false, + "GPUCompilationInfo": false, + "GPUCompilationMessage": false, + "GPUComputePassEncoder": false, + "GPUComputePipeline": false, + "GPUDevice": false, + "GPUDeviceLostInfo": false, + "GPUError": false, + "GPUExternalTexture": false, + "GPUInternalError": false, + "GPUMapMode": false, + "GPUOutOfMemoryError": false, + "GPUPipelineError": false, + "GPUPipelineLayout": false, + "GPUQuerySet": false, + "GPUQueue": false, + "GPURenderBundle": false, + "GPURenderBundleEncoder": false, + "GPURenderPassEncoder": false, + "GPURenderPipeline": false, + "GPUSampler": false, + "GPUShaderModule": false, + "GPUShaderStage": false, + "GPUSupportedFeatures": false, + "GPUSupportedLimits": false, + "GPUTexture": false, + "GPUTextureUsage": false, + "GPUTextureView": false, + "GPUUncapturedErrorEvent": false, + "GPUValidationError": false, + "GravitySensor": false, + "Gyroscope": false, + "HashChangeEvent": false, + "Headers": false, + "HID": false, + "HIDConnectionEvent": false, + "HIDDevice": false, + "HIDInputReportEvent": false, + "Highlight": false, + "HighlightRegistry": false, + "history": false, + "History": false, + "HTMLAllCollection": false, + "HTMLAnchorElement": false, + "HTMLAreaElement": false, + "HTMLAudioElement": false, + "HTMLBaseElement": false, + "HTMLBodyElement": false, + "HTMLBRElement": false, + "HTMLButtonElement": false, + "HTMLCanvasElement": false, + "HTMLCollection": false, + "HTMLDataElement": false, + "HTMLDataListElement": false, + "HTMLDetailsElement": false, + "HTMLDialogElement": false, + "HTMLDirectoryElement": false, + "HTMLDivElement": false, + "HTMLDListElement": false, + "HTMLDocument": false, + "HTMLElement": false, + "HTMLEmbedElement": false, + "HTMLFencedFrameElement": false, + "HTMLFieldSetElement": false, + "HTMLFontElement": false, + "HTMLFormControlsCollection": false, + "HTMLFormElement": false, + "HTMLFrameElement": false, + "HTMLFrameSetElement": false, + "HTMLHeadElement": false, + "HTMLHeadingElement": false, + "HTMLHRElement": false, + "HTMLHtmlElement": false, + "HTMLIFrameElement": false, + "HTMLImageElement": false, + "HTMLInputElement": false, + "HTMLLabelElement": false, + "HTMLLegendElement": false, + "HTMLLIElement": false, + "HTMLLinkElement": false, + "HTMLMapElement": false, + "HTMLMarqueeElement": false, + "HTMLMediaElement": false, + "HTMLMenuElement": false, + "HTMLMetaElement": false, + "HTMLMeterElement": false, + "HTMLModElement": false, + "HTMLObjectElement": false, + "HTMLOListElement": false, + "HTMLOptGroupElement": false, + "HTMLOptionElement": false, + "HTMLOptionsCollection": false, + "HTMLOutputElement": false, + "HTMLParagraphElement": false, + "HTMLParamElement": false, + "HTMLPictureElement": false, + "HTMLPreElement": false, + "HTMLProgressElement": false, + "HTMLQuoteElement": false, + "HTMLScriptElement": false, + "HTMLSelectedContentElement": false, + "HTMLSelectElement": false, + "HTMLSlotElement": false, + "HTMLSourceElement": false, + "HTMLSpanElement": false, + "HTMLStyleElement": false, + "HTMLTableCaptionElement": false, + "HTMLTableCellElement": false, + "HTMLTableColElement": false, + "HTMLTableElement": false, + "HTMLTableRowElement": false, + "HTMLTableSectionElement": false, + "HTMLTemplateElement": false, + "HTMLTextAreaElement": false, + "HTMLTimeElement": false, + "HTMLTitleElement": false, + "HTMLTrackElement": false, + "HTMLUListElement": false, + "HTMLUnknownElement": false, + "HTMLVideoElement": false, + "IDBCursor": false, + "IDBCursorWithValue": false, + "IDBDatabase": false, + "IDBFactory": false, + "IDBIndex": false, + "IDBKeyRange": false, + "IDBObjectStore": false, + "IDBOpenDBRequest": false, + "IDBRecord": false, + "IDBRequest": false, + "IDBTransaction": false, + "IDBVersionChangeEvent": false, + "IdentityCredential": false, + "IdentityCredentialError": false, + "IdentityProvider": false, + "IdleDeadline": false, + "IdleDetector": false, + "IIRFilterNode": false, + "Image": false, + "ImageBitmap": false, + "ImageBitmapRenderingContext": false, + "ImageCapture": false, + "ImageData": false, + "ImageDecoder": false, + "ImageTrack": false, + "ImageTrackList": false, + "indexedDB": false, + "Ink": false, + "innerHeight": false, + "innerWidth": false, + "InputDeviceCapabilities": false, + "InputDeviceInfo": false, + "InputEvent": false, + "IntegrityViolationReportBody": false, + "InterestEvent": false, + "IntersectionObserver": false, + "IntersectionObserverEntry": false, + "isSecureContext": false, + "Keyboard": false, + "KeyboardEvent": false, + "KeyboardLayoutMap": false, + "KeyframeEffect": false, + "LanguageDetector": false, + "LargestContentfulPaint": false, + "LaunchParams": false, + "launchQueue": false, + "LaunchQueue": false, + "LayoutShift": false, + "LayoutShiftAttribution": false, + "length": false, + "LinearAccelerationSensor": false, + "localStorage": false, + "location": true, + "Location": false, + "locationbar": false, + "Lock": false, + "LockManager": false, + "matchMedia": false, + "MathMLElement": false, + "MediaCapabilities": false, + "MediaCapabilitiesInfo": false, + "MediaDeviceInfo": false, + "MediaDevices": false, + "MediaElementAudioSourceNode": false, + "MediaEncryptedEvent": false, + "MediaError": false, + "MediaKeyError": false, + "MediaKeyMessageEvent": false, + "MediaKeys": false, + "MediaKeySession": false, + "MediaKeyStatusMap": false, + "MediaKeySystemAccess": false, + "MediaList": false, + "MediaMetadata": false, + "MediaQueryList": false, + "MediaQueryListEvent": false, + "MediaRecorder": false, + "MediaRecorderErrorEvent": false, + "MediaSession": false, + "MediaSource": false, + "MediaSourceHandle": false, + "MediaStream": false, + "MediaStreamAudioDestinationNode": false, + "MediaStreamAudioSourceNode": false, + "MediaStreamEvent": false, + "MediaStreamTrack": false, + "MediaStreamTrackAudioSourceNode": false, + "MediaStreamTrackAudioStats": false, + "MediaStreamTrackEvent": false, + "MediaStreamTrackGenerator": false, + "MediaStreamTrackProcessor": false, + "MediaStreamTrackVideoStats": false, + "menubar": false, + "MessageChannel": false, + "MessageEvent": false, + "MessagePort": false, + "MIDIAccess": false, + "MIDIConnectionEvent": false, + "MIDIInput": false, + "MIDIInputMap": false, + "MIDIMessageEvent": false, + "MIDIOutput": false, + "MIDIOutputMap": false, + "MIDIPort": false, + "MimeType": false, + "MimeTypeArray": false, + "model": false, + "ModelGenericSession": false, + "ModelManager": false, + "MouseEvent": false, + "moveBy": false, + "moveTo": false, + "MutationEvent": false, + "MutationObserver": false, + "MutationRecord": false, + "name": false, + "NamedNodeMap": false, + "NavigateEvent": false, + "navigation": false, + "Navigation": false, + "NavigationActivation": false, + "NavigationCurrentEntryChangeEvent": false, + "NavigationDestination": false, + "NavigationHistoryEntry": false, + "NavigationPrecommitController": false, + "NavigationPreloadManager": false, + "NavigationTransition": false, + "navigator": false, + "Navigator": false, + "NavigatorLogin": false, + "NavigatorManagedData": false, + "NavigatorUAData": false, + "NetworkInformation": false, + "Node": false, + "NodeFilter": false, + "NodeIterator": false, + "NodeList": false, + "Notification": false, + "NotifyPaintEvent": false, + "NotRestoredReasonDetails": false, + "NotRestoredReasons": false, + "Observable": false, + "OfflineAudioCompletionEvent": false, + "OfflineAudioContext": false, + "offscreenBuffering": false, + "OffscreenCanvas": false, + "OffscreenCanvasRenderingContext2D": false, + "onabort": true, + "onafterprint": true, + "onanimationcancel": true, + "onanimationend": true, + "onanimationiteration": true, + "onanimationstart": true, + "onappinstalled": true, + "onauxclick": true, + "onbeforeinput": true, + "onbeforeinstallprompt": true, + "onbeforematch": true, + "onbeforeprint": true, + "onbeforetoggle": true, + "onbeforeunload": true, + "onbeforexrselect": true, + "onblur": true, + "oncancel": true, + "oncanplay": true, + "oncanplaythrough": true, + "onchange": true, + "onclick": true, + "onclose": true, + "oncommand": true, + "oncontentvisibilityautostatechange": true, + "oncontextlost": true, + "oncontextmenu": true, + "oncontextrestored": true, + "oncopy": true, + "oncuechange": true, + "oncut": true, + "ondblclick": true, + "ondevicemotion": true, + "ondeviceorientation": true, + "ondeviceorientationabsolute": true, + "ondrag": true, + "ondragend": true, + "ondragenter": true, + "ondragleave": true, + "ondragover": true, + "ondragstart": true, + "ondrop": true, + "ondurationchange": true, + "onemptied": true, + "onended": true, + "onerror": true, + "onfocus": true, + "onformdata": true, + "ongamepadconnected": true, + "ongamepaddisconnected": true, + "ongotpointercapture": true, + "onhashchange": true, + "oninput": true, + "oninvalid": true, + "onkeydown": true, + "onkeypress": true, + "onkeyup": true, + "onlanguagechange": true, + "onload": true, + "onloadeddata": true, + "onloadedmetadata": true, + "onloadstart": true, + "onlostpointercapture": true, + "onmessage": true, + "onmessageerror": true, + "onmousedown": true, + "onmouseenter": true, + "onmouseleave": true, + "onmousemove": true, + "onmouseout": true, + "onmouseover": true, + "onmouseup": true, + "onmousewheel": true, + "onoffline": true, + "ononline": true, + "onpagehide": true, + "onpagereveal": true, + "onpageshow": true, + "onpageswap": true, + "onpaste": true, + "onpause": true, + "onplay": true, + "onplaying": true, + "onpointercancel": true, + "onpointerdown": true, + "onpointerenter": true, + "onpointerleave": true, + "onpointermove": true, + "onpointerout": true, + "onpointerover": true, + "onpointerrawupdate": true, + "onpointerup": true, + "onpopstate": true, + "onprogress": true, + "onratechange": true, + "onrejectionhandled": true, + "onreset": true, + "onresize": true, + "onscroll": true, + "onscrollend": true, + "onscrollsnapchange": true, + "onscrollsnapchanging": true, + "onsearch": true, + "onsecuritypolicyviolation": true, + "onseeked": true, + "onseeking": true, + "onselect": true, + "onselectionchange": true, + "onselectstart": true, + "onslotchange": true, + "onstalled": true, + "onstorage": true, + "onsubmit": true, + "onsuspend": true, + "ontimeupdate": true, + "ontoggle": true, + "ontransitioncancel": true, + "ontransitionend": true, + "ontransitionrun": true, + "ontransitionstart": true, + "onunhandledrejection": true, + "onunload": true, + "onvolumechange": true, + "onwaiting": true, + "onwheel": true, + "open": false, + "opener": false, + "Option": false, + "OrientationSensor": false, + "origin": false, + "originAgentCluster": false, + "OscillatorNode": false, + "OTPCredential": false, + "outerHeight": false, + "outerWidth": false, + "OverconstrainedError": false, + "PageRevealEvent": false, + "PageSwapEvent": false, + "PageTransitionEvent": false, + "pageXOffset": false, + "pageYOffset": false, + "PannerNode": false, + "parent": false, + "PasswordCredential": false, + "Path2D": false, + "PaymentAddress": false, + "PaymentManager": false, + "PaymentMethodChangeEvent": false, + "PaymentRequest": false, + "PaymentRequestUpdateEvent": false, + "PaymentResponse": false, + "performance": false, + "Performance": false, + "PerformanceElementTiming": false, + "PerformanceEntry": false, + "PerformanceEventTiming": false, + "PerformanceLongAnimationFrameTiming": false, + "PerformanceLongTaskTiming": false, + "PerformanceMark": false, + "PerformanceMeasure": false, + "PerformanceNavigation": false, + "PerformanceNavigationTiming": false, + "PerformanceObserver": false, + "PerformanceObserverEntryList": false, + "PerformancePaintTiming": false, + "PerformanceResourceTiming": false, + "PerformanceScriptTiming": false, + "PerformanceServerTiming": false, + "PerformanceTiming": false, + "PeriodicSyncManager": false, + "PeriodicWave": false, + "Permissions": false, + "PermissionStatus": false, + "PERSISTENT": false, + "personalbar": false, + "PictureInPictureEvent": false, + "PictureInPictureWindow": false, + "Plugin": false, + "PluginArray": false, + "PointerEvent": false, + "PopStateEvent": false, + "postMessage": false, + "Presentation": false, + "PresentationAvailability": false, + "PresentationConnection": false, + "PresentationConnectionAvailableEvent": false, + "PresentationConnectionCloseEvent": false, + "PresentationConnectionList": false, + "PresentationReceiver": false, + "PresentationRequest": false, + "PressureObserver": false, + "PressureRecord": false, + "print": false, + "ProcessingInstruction": false, + "Profiler": false, + "ProgressEvent": false, + "PromiseRejectionEvent": false, + "prompt": false, + "ProtectedAudience": false, + "PublicKeyCredential": false, + "PushManager": false, + "PushSubscription": false, + "PushSubscriptionOptions": false, + "queryLocalFonts": false, + "queueMicrotask": false, + "QuotaExceededError": false, + "RadioNodeList": false, + "Range": false, + "ReadableByteStreamController": false, + "ReadableStream": false, + "ReadableStreamBYOBReader": false, + "ReadableStreamBYOBRequest": false, + "ReadableStreamDefaultController": false, + "ReadableStreamDefaultReader": false, + "registerProcessor": false, + "RelativeOrientationSensor": false, + "RemotePlayback": false, + "removeEventListener": false, + "ReportBody": false, + "reportError": false, + "ReportingObserver": false, + "Request": false, + "requestAnimationFrame": false, + "requestIdleCallback": false, + "resizeBy": false, + "ResizeObserver": false, + "ResizeObserverEntry": false, + "ResizeObserverSize": false, + "resizeTo": false, + "Response": false, + "RestrictionTarget": false, + "RTCCertificate": false, + "RTCDataChannel": false, + "RTCDataChannelEvent": false, + "RTCDtlsTransport": false, + "RTCDTMFSender": false, + "RTCDTMFToneChangeEvent": false, + "RTCEncodedAudioFrame": false, + "RTCEncodedVideoFrame": false, + "RTCError": false, + "RTCErrorEvent": false, + "RTCIceCandidate": false, + "RTCIceTransport": false, + "RTCPeerConnection": false, + "RTCPeerConnectionIceErrorEvent": false, + "RTCPeerConnectionIceEvent": false, + "RTCRtpReceiver": false, + "RTCRtpScriptTransform": false, + "RTCRtpSender": false, + "RTCRtpTransceiver": false, + "RTCSctpTransport": false, + "RTCSessionDescription": false, + "RTCStatsReport": false, + "RTCTrackEvent": false, + "sampleRate": false, + "scheduler": false, + "Scheduler": false, + "Scheduling": false, + "screen": false, + "Screen": false, + "ScreenDetailed": false, + "ScreenDetails": false, + "screenLeft": false, + "ScreenOrientation": false, + "screenTop": false, + "screenX": false, + "screenY": false, + "ScriptProcessorNode": false, + "scroll": false, + "scrollbars": false, + "scrollBy": false, + "ScrollTimeline": false, + "scrollTo": false, + "scrollX": false, + "scrollY": false, + "SecurityPolicyViolationEvent": false, + "Selection": false, + "self": false, + "Sensor": false, + "SensorErrorEvent": false, + "Serial": false, + "SerialPort": false, + "ServiceWorker": false, + "ServiceWorkerContainer": false, + "ServiceWorkerRegistration": false, + "sessionStorage": false, + "setInterval": false, + "setTimeout": false, + "ShadowRoot": false, + "sharedStorage": false, + "SharedStorage": false, + "SharedStorageAppendMethod": false, + "SharedStorageClearMethod": false, + "SharedStorageDeleteMethod": false, + "SharedStorageModifierMethod": false, + "SharedStorageSetMethod": false, + "SharedStorageWorklet": false, + "SharedWorker": false, + "showDirectoryPicker": false, + "showOpenFilePicker": false, + "showSaveFilePicker": false, + "SnapEvent": false, + "SourceBuffer": false, + "SourceBufferList": false, + "SpeechGrammar": false, + "SpeechGrammarList": false, + "SpeechRecognition": false, + "SpeechRecognitionErrorEvent": false, + "SpeechRecognitionEvent": false, + "SpeechRecognitionPhrase": false, + "speechSynthesis": false, + "SpeechSynthesis": false, + "SpeechSynthesisErrorEvent": false, + "SpeechSynthesisEvent": false, + "SpeechSynthesisUtterance": false, + "SpeechSynthesisVoice": false, + "StaticRange": false, + "status": false, + "statusbar": false, + "StereoPannerNode": false, + "stop": false, + "Storage": false, + "StorageBucket": false, + "StorageBucketManager": false, + "StorageEvent": false, + "StorageManager": false, + "structuredClone": false, + "styleMedia": false, + "StylePropertyMap": false, + "StylePropertyMapReadOnly": false, + "StyleSheet": false, + "StyleSheetList": false, + "SubmitEvent": false, + "Subscriber": false, + "SubtleCrypto": false, + "Summarizer": false, + "SuppressedError": false, + "SVGAElement": false, + "SVGAngle": false, + "SVGAnimatedAngle": false, + "SVGAnimatedBoolean": false, + "SVGAnimatedEnumeration": false, + "SVGAnimatedInteger": false, + "SVGAnimatedLength": false, + "SVGAnimatedLengthList": false, + "SVGAnimatedNumber": false, + "SVGAnimatedNumberList": false, + "SVGAnimatedPreserveAspectRatio": false, + "SVGAnimatedRect": false, + "SVGAnimatedString": false, + "SVGAnimatedTransformList": false, + "SVGAnimateElement": false, + "SVGAnimateMotionElement": false, + "SVGAnimateTransformElement": false, + "SVGAnimationElement": false, + "SVGCircleElement": false, + "SVGClipPathElement": false, + "SVGComponentTransferFunctionElement": false, + "SVGDefsElement": false, + "SVGDescElement": false, + "SVGElement": false, + "SVGEllipseElement": false, + "SVGFEBlendElement": false, + "SVGFEColorMatrixElement": false, + "SVGFEComponentTransferElement": false, + "SVGFECompositeElement": false, + "SVGFEConvolveMatrixElement": false, + "SVGFEDiffuseLightingElement": false, + "SVGFEDisplacementMapElement": false, + "SVGFEDistantLightElement": false, + "SVGFEDropShadowElement": false, + "SVGFEFloodElement": false, + "SVGFEFuncAElement": false, + "SVGFEFuncBElement": false, + "SVGFEFuncGElement": false, + "SVGFEFuncRElement": false, + "SVGFEGaussianBlurElement": false, + "SVGFEImageElement": false, + "SVGFEMergeElement": false, + "SVGFEMergeNodeElement": false, + "SVGFEMorphologyElement": false, + "SVGFEOffsetElement": false, + "SVGFEPointLightElement": false, + "SVGFESpecularLightingElement": false, + "SVGFESpotLightElement": false, + "SVGFETileElement": false, + "SVGFETurbulenceElement": false, + "SVGFilterElement": false, + "SVGForeignObjectElement": false, + "SVGGElement": false, + "SVGGeometryElement": false, + "SVGGradientElement": false, + "SVGGraphicsElement": false, + "SVGImageElement": false, + "SVGLength": false, + "SVGLengthList": false, + "SVGLinearGradientElement": false, + "SVGLineElement": false, + "SVGMarkerElement": false, + "SVGMaskElement": false, + "SVGMatrix": false, + "SVGMetadataElement": false, + "SVGMPathElement": false, + "SVGNumber": false, + "SVGNumberList": false, + "SVGPathElement": false, + "SVGPatternElement": false, + "SVGPoint": false, + "SVGPointList": false, + "SVGPolygonElement": false, + "SVGPolylineElement": false, + "SVGPreserveAspectRatio": false, + "SVGRadialGradientElement": false, + "SVGRect": false, + "SVGRectElement": false, + "SVGScriptElement": false, + "SVGSetElement": false, + "SVGStopElement": false, + "SVGStringList": false, + "SVGStyleElement": false, + "SVGSVGElement": false, + "SVGSwitchElement": false, + "SVGSymbolElement": false, + "SVGTextContentElement": false, + "SVGTextElement": false, + "SVGTextPathElement": false, + "SVGTextPositioningElement": false, + "SVGTitleElement": false, + "SVGTransform": false, + "SVGTransformList": false, + "SVGTSpanElement": false, + "SVGUnitTypes": false, + "SVGUseElement": false, + "SVGViewElement": false, + "SyncManager": false, + "TaskAttributionTiming": false, + "TaskController": false, + "TaskPriorityChangeEvent": false, + "TaskSignal": false, + "TEMPORARY": false, + "Text": false, + "TextDecoder": false, + "TextDecoderStream": false, + "TextEncoder": false, + "TextEncoderStream": false, + "TextEvent": false, + "TextFormat": false, + "TextFormatUpdateEvent": false, + "TextMetrics": false, + "TextTrack": false, + "TextTrackCue": false, + "TextTrackCueList": false, + "TextTrackList": false, + "TextUpdateEvent": false, + "TimeEvent": false, + "TimeRanges": false, + "ToggleEvent": false, + "toolbar": false, + "top": false, + "Touch": false, + "TouchEvent": false, + "TouchList": false, + "TrackEvent": false, + "TransformStream": false, + "TransformStreamDefaultController": false, + "TransitionEvent": false, + "Translator": false, + "TreeWalker": false, + "TrustedHTML": false, + "TrustedScript": false, + "TrustedScriptURL": false, + "TrustedTypePolicy": false, + "TrustedTypePolicyFactory": false, + "trustedTypes": false, + "UIEvent": false, + "URL": false, + "URLPattern": false, + "URLSearchParams": false, + "USB": false, + "USBAlternateInterface": false, + "USBConfiguration": false, + "USBConnectionEvent": false, + "USBDevice": false, + "USBEndpoint": false, + "USBInterface": false, + "USBInTransferResult": false, + "USBIsochronousInTransferPacket": false, + "USBIsochronousInTransferResult": false, + "USBIsochronousOutTransferPacket": false, + "USBIsochronousOutTransferResult": false, + "USBOutTransferResult": false, + "UserActivation": false, + "ValidityState": false, + "VideoColorSpace": false, + "VideoDecoder": false, + "VideoEncoder": false, + "VideoFrame": false, + "VideoPlaybackQuality": false, + "viewport": false, + "Viewport": false, + "ViewTimeline": false, + "ViewTransition": false, + "ViewTransitionTypeSet": false, + "VirtualKeyboard": false, + "VirtualKeyboardGeometryChangeEvent": false, + "VisibilityStateEntry": false, + "visualViewport": false, + "VisualViewport": false, + "VTTCue": false, + "VTTRegion": false, + "WakeLock": false, + "WakeLockSentinel": false, + "WaveShaperNode": false, + "WebAssembly": false, + "WebGL2RenderingContext": false, + "WebGLActiveInfo": false, + "WebGLBuffer": false, + "WebGLContextEvent": false, + "WebGLFramebuffer": false, + "WebGLObject": false, + "WebGLProgram": false, + "WebGLQuery": false, + "WebGLRenderbuffer": false, + "WebGLRenderingContext": false, + "WebGLSampler": false, + "WebGLShader": false, + "WebGLShaderPrecisionFormat": false, + "WebGLSync": false, + "WebGLTexture": false, + "WebGLTransformFeedback": false, + "WebGLUniformLocation": false, + "WebGLVertexArrayObject": false, + "WebSocket": false, + "WebSocketError": false, + "WebSocketStream": false, + "WebTransport": false, + "WebTransportBidirectionalStream": false, + "WebTransportDatagramDuplexStream": false, + "WebTransportError": false, + "WebTransportReceiveStream": false, + "WebTransportSendStream": false, + "WGSLLanguageFeatures": false, + "WheelEvent": false, + "when": false, + "window": false, + "Window": false, + "WindowControlsOverlay": false, + "WindowControlsOverlayGeometryChangeEvent": false, + "Worker": false, + "Worklet": false, + "WorkletGlobalScope": false, + "WritableStream": false, + "WritableStreamDefaultController": false, + "WritableStreamDefaultWriter": false, + "XMLDocument": false, + "XMLHttpRequest": false, + "XMLHttpRequestEventTarget": false, + "XMLHttpRequestUpload": false, + "XMLSerializer": false, + "XPathEvaluator": false, + "XPathExpression": false, + "XPathResult": false, + "XRAnchor": false, + "XRAnchorSet": false, + "XRBoundedReferenceSpace": false, + "XRCamera": false, + "XRCPUDepthInformation": false, + "XRDepthInformation": false, + "XRDOMOverlayState": false, + "XRFrame": false, + "XRHand": false, + "XRHitTestResult": false, + "XRHitTestSource": false, + "XRInputSource": false, + "XRInputSourceArray": false, + "XRInputSourceEvent": false, + "XRInputSourcesChangeEvent": false, + "XRJointPose": false, + "XRJointSpace": false, + "XRLayer": false, + "XRLightEstimate": false, + "XRLightProbe": false, + "XRPose": false, + "XRRay": false, + "XRReferenceSpace": false, + "XRReferenceSpaceEvent": false, + "XRRenderState": false, + "XRRigidTransform": false, + "XRSession": false, + "XRSessionEvent": false, + "XRSpace": false, + "XRSystem": false, + "XRTransientInputHitTestResult": false, + "XRTransientInputHitTestSource": false, + "XRView": false, + "XRViewerPose": false, + "XRViewport": false, + "XRWebGLBinding": false, + "XRWebGLDepthInformation": false, + "XRWebGLLayer": false, + "XSLTProcessor": false + } + }, + "errors": [ + { + "messageId": "impliedEval" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-implied-eval > invalid + +```js +execScript("x = 1;"); +``` + +```json +{ + "languageOptions": { + "globals": { + "execScript": false + } + }, + "errors": [ + { + "messageId": "execScript" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-implied-eval > invalid + +```js +const s = 'x=1'; setTimeout(s, 100); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "globals": { + "AbortController": false, + "AbortSignal": false, + "AbsoluteOrientationSensor": false, + "AbstractRange": false, + "Accelerometer": false, + "addEventListener": false, + "ai": false, + "AI": false, + "AICreateMonitor": false, + "AITextSession": false, + "alert": false, + "AnalyserNode": false, + "Animation": false, + "AnimationEffect": false, + "AnimationEvent": false, + "AnimationPlaybackEvent": false, + "AnimationTimeline": false, + "AsyncDisposableStack": false, + "atob": false, + "Attr": false, + "Audio": false, + "AudioBuffer": false, + "AudioBufferSourceNode": false, + "AudioContext": false, + "AudioData": false, + "AudioDecoder": false, + "AudioDestinationNode": false, + "AudioEncoder": false, + "AudioListener": false, + "AudioNode": false, + "AudioParam": false, + "AudioParamMap": false, + "AudioProcessingEvent": false, + "AudioScheduledSourceNode": false, + "AudioSinkInfo": false, + "AudioWorklet": false, + "AudioWorkletGlobalScope": false, + "AudioWorkletNode": false, + "AudioWorkletProcessor": false, + "AuthenticatorAssertionResponse": false, + "AuthenticatorAttestationResponse": false, + "AuthenticatorResponse": false, + "BackgroundFetchManager": false, + "BackgroundFetchRecord": false, + "BackgroundFetchRegistration": false, + "BarcodeDetector": false, + "BarProp": false, + "BaseAudioContext": false, + "BatteryManager": false, + "BeforeUnloadEvent": false, + "BiquadFilterNode": false, + "Blob": false, + "BlobEvent": false, + "Bluetooth": false, + "BluetoothCharacteristicProperties": false, + "BluetoothDevice": false, + "BluetoothRemoteGATTCharacteristic": false, + "BluetoothRemoteGATTDescriptor": false, + "BluetoothRemoteGATTServer": false, + "BluetoothRemoteGATTService": false, + "BluetoothUUID": false, + "blur": false, + "BroadcastChannel": false, + "BrowserCaptureMediaStreamTrack": false, + "btoa": false, + "ByteLengthQueuingStrategy": false, + "Cache": false, + "caches": false, + "CacheStorage": false, + "cancelAnimationFrame": false, + "cancelIdleCallback": false, + "CanvasCaptureMediaStream": false, + "CanvasCaptureMediaStreamTrack": false, + "CanvasGradient": false, + "CanvasPattern": false, + "CanvasRenderingContext2D": false, + "CaptureController": false, + "CaretPosition": false, + "CDATASection": false, + "ChannelMergerNode": false, + "ChannelSplitterNode": false, + "ChapterInformation": false, + "CharacterBoundsUpdateEvent": false, + "CharacterData": false, + "clearInterval": false, + "clearTimeout": false, + "clientInformation": false, + "Clipboard": false, + "ClipboardChangeEvent": false, + "ClipboardEvent": false, + "ClipboardItem": false, + "close": false, + "closed": false, + "CloseEvent": false, + "CloseWatcher": false, + "CommandEvent": false, + "Comment": false, + "CompositionEvent": false, + "CompressionStream": false, + "confirm": false, + "console": false, + "ConstantSourceNode": false, + "ContentVisibilityAutoStateChangeEvent": false, + "ConvolverNode": false, + "CookieChangeEvent": false, + "CookieDeprecationLabel": false, + "cookieStore": false, + "CookieStore": false, + "CookieStoreManager": false, + "CountQueuingStrategy": false, + "createImageBitmap": false, + "CreateMonitor": false, + "Credential": false, + "credentialless": false, + "CredentialsContainer": false, + "CropTarget": false, + "crossOriginIsolated": false, + "crypto": false, + "Crypto": false, + "CryptoKey": false, + "CSPViolationReportBody": false, + "CSS": false, + "CSSAnimation": false, + "CSSConditionRule": false, + "CSSContainerRule": false, + "CSSCounterStyleRule": false, + "CSSFontFaceRule": false, + "CSSFontFeatureValuesRule": false, + "CSSFontPaletteValuesRule": false, + "CSSFunctionDeclarations": false, + "CSSFunctionDescriptors": false, + "CSSFunctionRule": false, + "CSSGroupingRule": false, + "CSSImageValue": false, + "CSSImportRule": false, + "CSSKeyframeRule": false, + "CSSKeyframesRule": false, + "CSSKeywordValue": false, + "CSSLayerBlockRule": false, + "CSSLayerStatementRule": false, + "CSSMarginRule": false, + "CSSMathClamp": false, + "CSSMathInvert": false, + "CSSMathMax": false, + "CSSMathMin": false, + "CSSMathNegate": false, + "CSSMathProduct": false, + "CSSMathSum": false, + "CSSMathValue": false, + "CSSMatrixComponent": false, + "CSSMediaRule": false, + "CSSNamespaceRule": false, + "CSSNestedDeclarations": false, + "CSSNumericArray": false, + "CSSNumericValue": false, + "CSSPageDescriptors": false, + "CSSPageRule": false, + "CSSPerspective": false, + "CSSPositionTryDescriptors": false, + "CSSPositionTryRule": false, + "CSSPositionValue": false, + "CSSPropertyRule": false, + "CSSRotate": false, + "CSSRule": false, + "CSSRuleList": false, + "CSSScale": false, + "CSSScopeRule": false, + "CSSSkew": false, + "CSSSkewX": false, + "CSSSkewY": false, + "CSSStartingStyleRule": false, + "CSSStyleDeclaration": false, + "CSSStyleRule": false, + "CSSStyleSheet": false, + "CSSStyleValue": false, + "CSSSupportsRule": false, + "CSSTransformComponent": false, + "CSSTransformValue": false, + "CSSTransition": false, + "CSSTranslate": false, + "CSSUnitValue": false, + "CSSUnparsedValue": false, + "CSSVariableReferenceValue": false, + "CSSViewTransitionRule": false, + "currentFrame": false, + "currentTime": false, + "CustomElementRegistry": false, + "customElements": false, + "CustomEvent": false, + "CustomStateSet": false, + "DataTransfer": false, + "DataTransferItem": false, + "DataTransferItemList": false, + "DecompressionStream": false, + "DelayNode": false, + "DelegatedInkTrailPresenter": false, + "DeviceMotionEvent": false, + "DeviceMotionEventAcceleration": false, + "DeviceMotionEventRotationRate": false, + "DeviceOrientationEvent": false, + "devicePixelRatio": false, + "DevicePosture": false, + "DigitalCredential": false, + "dispatchEvent": false, + "DisposableStack": false, + "document": false, + "Document": false, + "DocumentFragment": false, + "documentPictureInPicture": false, + "DocumentPictureInPicture": false, + "DocumentPictureInPictureEvent": false, + "DocumentTimeline": false, + "DocumentType": false, + "DOMError": false, + "DOMException": false, + "DOMImplementation": false, + "DOMMatrix": false, + "DOMMatrixReadOnly": false, + "DOMParser": false, + "DOMPoint": false, + "DOMPointReadOnly": false, + "DOMQuad": false, + "DOMRect": false, + "DOMRectList": false, + "DOMRectReadOnly": false, + "DOMStringList": false, + "DOMStringMap": false, + "DOMTokenList": false, + "DragEvent": false, + "DynamicsCompressorNode": false, + "EditContext": false, + "Element": false, + "ElementInternals": false, + "EncodedAudioChunk": false, + "EncodedVideoChunk": false, + "ErrorEvent": false, + "event": false, + "Event": false, + "EventCounts": false, + "EventSource": false, + "EventTarget": false, + "external": false, + "External": false, + "EyeDropper": false, + "FeaturePolicy": false, + "FederatedCredential": false, + "fence": false, + "Fence": false, + "FencedFrameConfig": false, + "fetch": false, + "fetchLater": false, + "FetchLaterResult": false, + "File": false, + "FileList": false, + "FileReader": false, + "FileSystem": false, + "FileSystemDirectoryEntry": false, + "FileSystemDirectoryHandle": false, + "FileSystemDirectoryReader": false, + "FileSystemEntry": false, + "FileSystemFileEntry": false, + "FileSystemFileHandle": false, + "FileSystemHandle": false, + "FileSystemObserver": false, + "FileSystemWritableFileStream": false, + "find": false, + "focus": false, + "FocusEvent": false, + "FontData": false, + "FontFace": false, + "FontFaceSet": false, + "FontFaceSetLoadEvent": false, + "FormData": false, + "FormDataEvent": false, + "FragmentDirective": false, + "frameElement": false, + "frames": false, + "GainNode": false, + "Gamepad": false, + "GamepadAxisMoveEvent": false, + "GamepadButton": false, + "GamepadButtonEvent": false, + "GamepadEvent": false, + "GamepadHapticActuator": false, + "GamepadPose": false, + "Geolocation": false, + "GeolocationCoordinates": false, + "GeolocationPosition": false, + "GeolocationPositionError": false, + "getComputedStyle": false, + "getScreenDetails": false, + "getSelection": false, + "GPU": false, + "GPUAdapter": false, + "GPUAdapterInfo": false, + "GPUBindGroup": false, + "GPUBindGroupLayout": false, + "GPUBuffer": false, + "GPUBufferUsage": false, + "GPUCanvasContext": false, + "GPUColorWrite": false, + "GPUCommandBuffer": false, + "GPUCommandEncoder": false, + "GPUCompilationInfo": false, + "GPUCompilationMessage": false, + "GPUComputePassEncoder": false, + "GPUComputePipeline": false, + "GPUDevice": false, + "GPUDeviceLostInfo": false, + "GPUError": false, + "GPUExternalTexture": false, + "GPUInternalError": false, + "GPUMapMode": false, + "GPUOutOfMemoryError": false, + "GPUPipelineError": false, + "GPUPipelineLayout": false, + "GPUQuerySet": false, + "GPUQueue": false, + "GPURenderBundle": false, + "GPURenderBundleEncoder": false, + "GPURenderPassEncoder": false, + "GPURenderPipeline": false, + "GPUSampler": false, + "GPUShaderModule": false, + "GPUShaderStage": false, + "GPUSupportedFeatures": false, + "GPUSupportedLimits": false, + "GPUTexture": false, + "GPUTextureUsage": false, + "GPUTextureView": false, + "GPUUncapturedErrorEvent": false, + "GPUValidationError": false, + "GravitySensor": false, + "Gyroscope": false, + "HashChangeEvent": false, + "Headers": false, + "HID": false, + "HIDConnectionEvent": false, + "HIDDevice": false, + "HIDInputReportEvent": false, + "Highlight": false, + "HighlightRegistry": false, + "history": false, + "History": false, + "HTMLAllCollection": false, + "HTMLAnchorElement": false, + "HTMLAreaElement": false, + "HTMLAudioElement": false, + "HTMLBaseElement": false, + "HTMLBodyElement": false, + "HTMLBRElement": false, + "HTMLButtonElement": false, + "HTMLCanvasElement": false, + "HTMLCollection": false, + "HTMLDataElement": false, + "HTMLDataListElement": false, + "HTMLDetailsElement": false, + "HTMLDialogElement": false, + "HTMLDirectoryElement": false, + "HTMLDivElement": false, + "HTMLDListElement": false, + "HTMLDocument": false, + "HTMLElement": false, + "HTMLEmbedElement": false, + "HTMLFencedFrameElement": false, + "HTMLFieldSetElement": false, + "HTMLFontElement": false, + "HTMLFormControlsCollection": false, + "HTMLFormElement": false, + "HTMLFrameElement": false, + "HTMLFrameSetElement": false, + "HTMLHeadElement": false, + "HTMLHeadingElement": false, + "HTMLHRElement": false, + "HTMLHtmlElement": false, + "HTMLIFrameElement": false, + "HTMLImageElement": false, + "HTMLInputElement": false, + "HTMLLabelElement": false, + "HTMLLegendElement": false, + "HTMLLIElement": false, + "HTMLLinkElement": false, + "HTMLMapElement": false, + "HTMLMarqueeElement": false, + "HTMLMediaElement": false, + "HTMLMenuElement": false, + "HTMLMetaElement": false, + "HTMLMeterElement": false, + "HTMLModElement": false, + "HTMLObjectElement": false, + "HTMLOListElement": false, + "HTMLOptGroupElement": false, + "HTMLOptionElement": false, + "HTMLOptionsCollection": false, + "HTMLOutputElement": false, + "HTMLParagraphElement": false, + "HTMLParamElement": false, + "HTMLPictureElement": false, + "HTMLPreElement": false, + "HTMLProgressElement": false, + "HTMLQuoteElement": false, + "HTMLScriptElement": false, + "HTMLSelectedContentElement": false, + "HTMLSelectElement": false, + "HTMLSlotElement": false, + "HTMLSourceElement": false, + "HTMLSpanElement": false, + "HTMLStyleElement": false, + "HTMLTableCaptionElement": false, + "HTMLTableCellElement": false, + "HTMLTableColElement": false, + "HTMLTableElement": false, + "HTMLTableRowElement": false, + "HTMLTableSectionElement": false, + "HTMLTemplateElement": false, + "HTMLTextAreaElement": false, + "HTMLTimeElement": false, + "HTMLTitleElement": false, + "HTMLTrackElement": false, + "HTMLUListElement": false, + "HTMLUnknownElement": false, + "HTMLVideoElement": false, + "IDBCursor": false, + "IDBCursorWithValue": false, + "IDBDatabase": false, + "IDBFactory": false, + "IDBIndex": false, + "IDBKeyRange": false, + "IDBObjectStore": false, + "IDBOpenDBRequest": false, + "IDBRecord": false, + "IDBRequest": false, + "IDBTransaction": false, + "IDBVersionChangeEvent": false, + "IdentityCredential": false, + "IdentityCredentialError": false, + "IdentityProvider": false, + "IdleDeadline": false, + "IdleDetector": false, + "IIRFilterNode": false, + "Image": false, + "ImageBitmap": false, + "ImageBitmapRenderingContext": false, + "ImageCapture": false, + "ImageData": false, + "ImageDecoder": false, + "ImageTrack": false, + "ImageTrackList": false, + "indexedDB": false, + "Ink": false, + "innerHeight": false, + "innerWidth": false, + "InputDeviceCapabilities": false, + "InputDeviceInfo": false, + "InputEvent": false, + "IntegrityViolationReportBody": false, + "InterestEvent": false, + "IntersectionObserver": false, + "IntersectionObserverEntry": false, + "isSecureContext": false, + "Keyboard": false, + "KeyboardEvent": false, + "KeyboardLayoutMap": false, + "KeyframeEffect": false, + "LanguageDetector": false, + "LargestContentfulPaint": false, + "LaunchParams": false, + "launchQueue": false, + "LaunchQueue": false, + "LayoutShift": false, + "LayoutShiftAttribution": false, + "length": false, + "LinearAccelerationSensor": false, + "localStorage": false, + "location": true, + "Location": false, + "locationbar": false, + "Lock": false, + "LockManager": false, + "matchMedia": false, + "MathMLElement": false, + "MediaCapabilities": false, + "MediaCapabilitiesInfo": false, + "MediaDeviceInfo": false, + "MediaDevices": false, + "MediaElementAudioSourceNode": false, + "MediaEncryptedEvent": false, + "MediaError": false, + "MediaKeyError": false, + "MediaKeyMessageEvent": false, + "MediaKeys": false, + "MediaKeySession": false, + "MediaKeyStatusMap": false, + "MediaKeySystemAccess": false, + "MediaList": false, + "MediaMetadata": false, + "MediaQueryList": false, + "MediaQueryListEvent": false, + "MediaRecorder": false, + "MediaRecorderErrorEvent": false, + "MediaSession": false, + "MediaSource": false, + "MediaSourceHandle": false, + "MediaStream": false, + "MediaStreamAudioDestinationNode": false, + "MediaStreamAudioSourceNode": false, + "MediaStreamEvent": false, + "MediaStreamTrack": false, + "MediaStreamTrackAudioSourceNode": false, + "MediaStreamTrackAudioStats": false, + "MediaStreamTrackEvent": false, + "MediaStreamTrackGenerator": false, + "MediaStreamTrackProcessor": false, + "MediaStreamTrackVideoStats": false, + "menubar": false, + "MessageChannel": false, + "MessageEvent": false, + "MessagePort": false, + "MIDIAccess": false, + "MIDIConnectionEvent": false, + "MIDIInput": false, + "MIDIInputMap": false, + "MIDIMessageEvent": false, + "MIDIOutput": false, + "MIDIOutputMap": false, + "MIDIPort": false, + "MimeType": false, + "MimeTypeArray": false, + "model": false, + "ModelGenericSession": false, + "ModelManager": false, + "MouseEvent": false, + "moveBy": false, + "moveTo": false, + "MutationEvent": false, + "MutationObserver": false, + "MutationRecord": false, + "name": false, + "NamedNodeMap": false, + "NavigateEvent": false, + "navigation": false, + "Navigation": false, + "NavigationActivation": false, + "NavigationCurrentEntryChangeEvent": false, + "NavigationDestination": false, + "NavigationHistoryEntry": false, + "NavigationPrecommitController": false, + "NavigationPreloadManager": false, + "NavigationTransition": false, + "navigator": false, + "Navigator": false, + "NavigatorLogin": false, + "NavigatorManagedData": false, + "NavigatorUAData": false, + "NetworkInformation": false, + "Node": false, + "NodeFilter": false, + "NodeIterator": false, + "NodeList": false, + "Notification": false, + "NotifyPaintEvent": false, + "NotRestoredReasonDetails": false, + "NotRestoredReasons": false, + "Observable": false, + "OfflineAudioCompletionEvent": false, + "OfflineAudioContext": false, + "offscreenBuffering": false, + "OffscreenCanvas": false, + "OffscreenCanvasRenderingContext2D": false, + "onabort": true, + "onafterprint": true, + "onanimationcancel": true, + "onanimationend": true, + "onanimationiteration": true, + "onanimationstart": true, + "onappinstalled": true, + "onauxclick": true, + "onbeforeinput": true, + "onbeforeinstallprompt": true, + "onbeforematch": true, + "onbeforeprint": true, + "onbeforetoggle": true, + "onbeforeunload": true, + "onbeforexrselect": true, + "onblur": true, + "oncancel": true, + "oncanplay": true, + "oncanplaythrough": true, + "onchange": true, + "onclick": true, + "onclose": true, + "oncommand": true, + "oncontentvisibilityautostatechange": true, + "oncontextlost": true, + "oncontextmenu": true, + "oncontextrestored": true, + "oncopy": true, + "oncuechange": true, + "oncut": true, + "ondblclick": true, + "ondevicemotion": true, + "ondeviceorientation": true, + "ondeviceorientationabsolute": true, + "ondrag": true, + "ondragend": true, + "ondragenter": true, + "ondragleave": true, + "ondragover": true, + "ondragstart": true, + "ondrop": true, + "ondurationchange": true, + "onemptied": true, + "onended": true, + "onerror": true, + "onfocus": true, + "onformdata": true, + "ongamepadconnected": true, + "ongamepaddisconnected": true, + "ongotpointercapture": true, + "onhashchange": true, + "oninput": true, + "oninvalid": true, + "onkeydown": true, + "onkeypress": true, + "onkeyup": true, + "onlanguagechange": true, + "onload": true, + "onloadeddata": true, + "onloadedmetadata": true, + "onloadstart": true, + "onlostpointercapture": true, + "onmessage": true, + "onmessageerror": true, + "onmousedown": true, + "onmouseenter": true, + "onmouseleave": true, + "onmousemove": true, + "onmouseout": true, + "onmouseover": true, + "onmouseup": true, + "onmousewheel": true, + "onoffline": true, + "ononline": true, + "onpagehide": true, + "onpagereveal": true, + "onpageshow": true, + "onpageswap": true, + "onpaste": true, + "onpause": true, + "onplay": true, + "onplaying": true, + "onpointercancel": true, + "onpointerdown": true, + "onpointerenter": true, + "onpointerleave": true, + "onpointermove": true, + "onpointerout": true, + "onpointerover": true, + "onpointerrawupdate": true, + "onpointerup": true, + "onpopstate": true, + "onprogress": true, + "onratechange": true, + "onrejectionhandled": true, + "onreset": true, + "onresize": true, + "onscroll": true, + "onscrollend": true, + "onscrollsnapchange": true, + "onscrollsnapchanging": true, + "onsearch": true, + "onsecuritypolicyviolation": true, + "onseeked": true, + "onseeking": true, + "onselect": true, + "onselectionchange": true, + "onselectstart": true, + "onslotchange": true, + "onstalled": true, + "onstorage": true, + "onsubmit": true, + "onsuspend": true, + "ontimeupdate": true, + "ontoggle": true, + "ontransitioncancel": true, + "ontransitionend": true, + "ontransitionrun": true, + "ontransitionstart": true, + "onunhandledrejection": true, + "onunload": true, + "onvolumechange": true, + "onwaiting": true, + "onwheel": true, + "open": false, + "opener": false, + "Option": false, + "OrientationSensor": false, + "origin": false, + "originAgentCluster": false, + "OscillatorNode": false, + "OTPCredential": false, + "outerHeight": false, + "outerWidth": false, + "OverconstrainedError": false, + "PageRevealEvent": false, + "PageSwapEvent": false, + "PageTransitionEvent": false, + "pageXOffset": false, + "pageYOffset": false, + "PannerNode": false, + "parent": false, + "PasswordCredential": false, + "Path2D": false, + "PaymentAddress": false, + "PaymentManager": false, + "PaymentMethodChangeEvent": false, + "PaymentRequest": false, + "PaymentRequestUpdateEvent": false, + "PaymentResponse": false, + "performance": false, + "Performance": false, + "PerformanceElementTiming": false, + "PerformanceEntry": false, + "PerformanceEventTiming": false, + "PerformanceLongAnimationFrameTiming": false, + "PerformanceLongTaskTiming": false, + "PerformanceMark": false, + "PerformanceMeasure": false, + "PerformanceNavigation": false, + "PerformanceNavigationTiming": false, + "PerformanceObserver": false, + "PerformanceObserverEntryList": false, + "PerformancePaintTiming": false, + "PerformanceResourceTiming": false, + "PerformanceScriptTiming": false, + "PerformanceServerTiming": false, + "PerformanceTiming": false, + "PeriodicSyncManager": false, + "PeriodicWave": false, + "Permissions": false, + "PermissionStatus": false, + "PERSISTENT": false, + "personalbar": false, + "PictureInPictureEvent": false, + "PictureInPictureWindow": false, + "Plugin": false, + "PluginArray": false, + "PointerEvent": false, + "PopStateEvent": false, + "postMessage": false, + "Presentation": false, + "PresentationAvailability": false, + "PresentationConnection": false, + "PresentationConnectionAvailableEvent": false, + "PresentationConnectionCloseEvent": false, + "PresentationConnectionList": false, + "PresentationReceiver": false, + "PresentationRequest": false, + "PressureObserver": false, + "PressureRecord": false, + "print": false, + "ProcessingInstruction": false, + "Profiler": false, + "ProgressEvent": false, + "PromiseRejectionEvent": false, + "prompt": false, + "ProtectedAudience": false, + "PublicKeyCredential": false, + "PushManager": false, + "PushSubscription": false, + "PushSubscriptionOptions": false, + "queryLocalFonts": false, + "queueMicrotask": false, + "QuotaExceededError": false, + "RadioNodeList": false, + "Range": false, + "ReadableByteStreamController": false, + "ReadableStream": false, + "ReadableStreamBYOBReader": false, + "ReadableStreamBYOBRequest": false, + "ReadableStreamDefaultController": false, + "ReadableStreamDefaultReader": false, + "registerProcessor": false, + "RelativeOrientationSensor": false, + "RemotePlayback": false, + "removeEventListener": false, + "ReportBody": false, + "reportError": false, + "ReportingObserver": false, + "Request": false, + "requestAnimationFrame": false, + "requestIdleCallback": false, + "resizeBy": false, + "ResizeObserver": false, + "ResizeObserverEntry": false, + "ResizeObserverSize": false, + "resizeTo": false, + "Response": false, + "RestrictionTarget": false, + "RTCCertificate": false, + "RTCDataChannel": false, + "RTCDataChannelEvent": false, + "RTCDtlsTransport": false, + "RTCDTMFSender": false, + "RTCDTMFToneChangeEvent": false, + "RTCEncodedAudioFrame": false, + "RTCEncodedVideoFrame": false, + "RTCError": false, + "RTCErrorEvent": false, + "RTCIceCandidate": false, + "RTCIceTransport": false, + "RTCPeerConnection": false, + "RTCPeerConnectionIceErrorEvent": false, + "RTCPeerConnectionIceEvent": false, + "RTCRtpReceiver": false, + "RTCRtpScriptTransform": false, + "RTCRtpSender": false, + "RTCRtpTransceiver": false, + "RTCSctpTransport": false, + "RTCSessionDescription": false, + "RTCStatsReport": false, + "RTCTrackEvent": false, + "sampleRate": false, + "scheduler": false, + "Scheduler": false, + "Scheduling": false, + "screen": false, + "Screen": false, + "ScreenDetailed": false, + "ScreenDetails": false, + "screenLeft": false, + "ScreenOrientation": false, + "screenTop": false, + "screenX": false, + "screenY": false, + "ScriptProcessorNode": false, + "scroll": false, + "scrollbars": false, + "scrollBy": false, + "ScrollTimeline": false, + "scrollTo": false, + "scrollX": false, + "scrollY": false, + "SecurityPolicyViolationEvent": false, + "Selection": false, + "self": false, + "Sensor": false, + "SensorErrorEvent": false, + "Serial": false, + "SerialPort": false, + "ServiceWorker": false, + "ServiceWorkerContainer": false, + "ServiceWorkerRegistration": false, + "sessionStorage": false, + "setInterval": false, + "setTimeout": false, + "ShadowRoot": false, + "sharedStorage": false, + "SharedStorage": false, + "SharedStorageAppendMethod": false, + "SharedStorageClearMethod": false, + "SharedStorageDeleteMethod": false, + "SharedStorageModifierMethod": false, + "SharedStorageSetMethod": false, + "SharedStorageWorklet": false, + "SharedWorker": false, + "showDirectoryPicker": false, + "showOpenFilePicker": false, + "showSaveFilePicker": false, + "SnapEvent": false, + "SourceBuffer": false, + "SourceBufferList": false, + "SpeechGrammar": false, + "SpeechGrammarList": false, + "SpeechRecognition": false, + "SpeechRecognitionErrorEvent": false, + "SpeechRecognitionEvent": false, + "SpeechRecognitionPhrase": false, + "speechSynthesis": false, + "SpeechSynthesis": false, + "SpeechSynthesisErrorEvent": false, + "SpeechSynthesisEvent": false, + "SpeechSynthesisUtterance": false, + "SpeechSynthesisVoice": false, + "StaticRange": false, + "status": false, + "statusbar": false, + "StereoPannerNode": false, + "stop": false, + "Storage": false, + "StorageBucket": false, + "StorageBucketManager": false, + "StorageEvent": false, + "StorageManager": false, + "structuredClone": false, + "styleMedia": false, + "StylePropertyMap": false, + "StylePropertyMapReadOnly": false, + "StyleSheet": false, + "StyleSheetList": false, + "SubmitEvent": false, + "Subscriber": false, + "SubtleCrypto": false, + "Summarizer": false, + "SuppressedError": false, + "SVGAElement": false, + "SVGAngle": false, + "SVGAnimatedAngle": false, + "SVGAnimatedBoolean": false, + "SVGAnimatedEnumeration": false, + "SVGAnimatedInteger": false, + "SVGAnimatedLength": false, + "SVGAnimatedLengthList": false, + "SVGAnimatedNumber": false, + "SVGAnimatedNumberList": false, + "SVGAnimatedPreserveAspectRatio": false, + "SVGAnimatedRect": false, + "SVGAnimatedString": false, + "SVGAnimatedTransformList": false, + "SVGAnimateElement": false, + "SVGAnimateMotionElement": false, + "SVGAnimateTransformElement": false, + "SVGAnimationElement": false, + "SVGCircleElement": false, + "SVGClipPathElement": false, + "SVGComponentTransferFunctionElement": false, + "SVGDefsElement": false, + "SVGDescElement": false, + "SVGElement": false, + "SVGEllipseElement": false, + "SVGFEBlendElement": false, + "SVGFEColorMatrixElement": false, + "SVGFEComponentTransferElement": false, + "SVGFECompositeElement": false, + "SVGFEConvolveMatrixElement": false, + "SVGFEDiffuseLightingElement": false, + "SVGFEDisplacementMapElement": false, + "SVGFEDistantLightElement": false, + "SVGFEDropShadowElement": false, + "SVGFEFloodElement": false, + "SVGFEFuncAElement": false, + "SVGFEFuncBElement": false, + "SVGFEFuncGElement": false, + "SVGFEFuncRElement": false, + "SVGFEGaussianBlurElement": false, + "SVGFEImageElement": false, + "SVGFEMergeElement": false, + "SVGFEMergeNodeElement": false, + "SVGFEMorphologyElement": false, + "SVGFEOffsetElement": false, + "SVGFEPointLightElement": false, + "SVGFESpecularLightingElement": false, + "SVGFESpotLightElement": false, + "SVGFETileElement": false, + "SVGFETurbulenceElement": false, + "SVGFilterElement": false, + "SVGForeignObjectElement": false, + "SVGGElement": false, + "SVGGeometryElement": false, + "SVGGradientElement": false, + "SVGGraphicsElement": false, + "SVGImageElement": false, + "SVGLength": false, + "SVGLengthList": false, + "SVGLinearGradientElement": false, + "SVGLineElement": false, + "SVGMarkerElement": false, + "SVGMaskElement": false, + "SVGMatrix": false, + "SVGMetadataElement": false, + "SVGMPathElement": false, + "SVGNumber": false, + "SVGNumberList": false, + "SVGPathElement": false, + "SVGPatternElement": false, + "SVGPoint": false, + "SVGPointList": false, + "SVGPolygonElement": false, + "SVGPolylineElement": false, + "SVGPreserveAspectRatio": false, + "SVGRadialGradientElement": false, + "SVGRect": false, + "SVGRectElement": false, + "SVGScriptElement": false, + "SVGSetElement": false, + "SVGStopElement": false, + "SVGStringList": false, + "SVGStyleElement": false, + "SVGSVGElement": false, + "SVGSwitchElement": false, + "SVGSymbolElement": false, + "SVGTextContentElement": false, + "SVGTextElement": false, + "SVGTextPathElement": false, + "SVGTextPositioningElement": false, + "SVGTitleElement": false, + "SVGTransform": false, + "SVGTransformList": false, + "SVGTSpanElement": false, + "SVGUnitTypes": false, + "SVGUseElement": false, + "SVGViewElement": false, + "SyncManager": false, + "TaskAttributionTiming": false, + "TaskController": false, + "TaskPriorityChangeEvent": false, + "TaskSignal": false, + "TEMPORARY": false, + "Text": false, + "TextDecoder": false, + "TextDecoderStream": false, + "TextEncoder": false, + "TextEncoderStream": false, + "TextEvent": false, + "TextFormat": false, + "TextFormatUpdateEvent": false, + "TextMetrics": false, + "TextTrack": false, + "TextTrackCue": false, + "TextTrackCueList": false, + "TextTrackList": false, + "TextUpdateEvent": false, + "TimeEvent": false, + "TimeRanges": false, + "ToggleEvent": false, + "toolbar": false, + "top": false, + "Touch": false, + "TouchEvent": false, + "TouchList": false, + "TrackEvent": false, + "TransformStream": false, + "TransformStreamDefaultController": false, + "TransitionEvent": false, + "Translator": false, + "TreeWalker": false, + "TrustedHTML": false, + "TrustedScript": false, + "TrustedScriptURL": false, + "TrustedTypePolicy": false, + "TrustedTypePolicyFactory": false, + "trustedTypes": false, + "UIEvent": false, + "URL": false, + "URLPattern": false, + "URLSearchParams": false, + "USB": false, + "USBAlternateInterface": false, + "USBConfiguration": false, + "USBConnectionEvent": false, + "USBDevice": false, + "USBEndpoint": false, + "USBInterface": false, + "USBInTransferResult": false, + "USBIsochronousInTransferPacket": false, + "USBIsochronousInTransferResult": false, + "USBIsochronousOutTransferPacket": false, + "USBIsochronousOutTransferResult": false, + "USBOutTransferResult": false, + "UserActivation": false, + "ValidityState": false, + "VideoColorSpace": false, + "VideoDecoder": false, + "VideoEncoder": false, + "VideoFrame": false, + "VideoPlaybackQuality": false, + "viewport": false, + "Viewport": false, + "ViewTimeline": false, + "ViewTransition": false, + "ViewTransitionTypeSet": false, + "VirtualKeyboard": false, + "VirtualKeyboardGeometryChangeEvent": false, + "VisibilityStateEntry": false, + "visualViewport": false, + "VisualViewport": false, + "VTTCue": false, + "VTTRegion": false, + "WakeLock": false, + "WakeLockSentinel": false, + "WaveShaperNode": false, + "WebAssembly": false, + "WebGL2RenderingContext": false, + "WebGLActiveInfo": false, + "WebGLBuffer": false, + "WebGLContextEvent": false, + "WebGLFramebuffer": false, + "WebGLObject": false, + "WebGLProgram": false, + "WebGLQuery": false, + "WebGLRenderbuffer": false, + "WebGLRenderingContext": false, + "WebGLSampler": false, + "WebGLShader": false, + "WebGLShaderPrecisionFormat": false, + "WebGLSync": false, + "WebGLTexture": false, + "WebGLTransformFeedback": false, + "WebGLUniformLocation": false, + "WebGLVertexArrayObject": false, + "WebSocket": false, + "WebSocketError": false, + "WebSocketStream": false, + "WebTransport": false, + "WebTransportBidirectionalStream": false, + "WebTransportDatagramDuplexStream": false, + "WebTransportError": false, + "WebTransportReceiveStream": false, + "WebTransportSendStream": false, + "WGSLLanguageFeatures": false, + "WheelEvent": false, + "when": false, + "window": false, + "Window": false, + "WindowControlsOverlay": false, + "WindowControlsOverlayGeometryChangeEvent": false, + "Worker": false, + "Worklet": false, + "WorkletGlobalScope": false, + "WritableStream": false, + "WritableStreamDefaultController": false, + "WritableStreamDefaultWriter": false, + "XMLDocument": false, + "XMLHttpRequest": false, + "XMLHttpRequestEventTarget": false, + "XMLHttpRequestUpload": false, + "XMLSerializer": false, + "XPathEvaluator": false, + "XPathExpression": false, + "XPathResult": false, + "XRAnchor": false, + "XRAnchorSet": false, + "XRBoundedReferenceSpace": false, + "XRCamera": false, + "XRCPUDepthInformation": false, + "XRDepthInformation": false, + "XRDOMOverlayState": false, + "XRFrame": false, + "XRHand": false, + "XRHitTestResult": false, + "XRHitTestSource": false, + "XRInputSource": false, + "XRInputSourceArray": false, + "XRInputSourceEvent": false, + "XRInputSourcesChangeEvent": false, + "XRJointPose": false, + "XRJointSpace": false, + "XRLayer": false, + "XRLightEstimate": false, + "XRLightProbe": false, + "XRPose": false, + "XRRay": false, + "XRReferenceSpace": false, + "XRReferenceSpaceEvent": false, + "XRRenderState": false, + "XRRigidTransform": false, + "XRSession": false, + "XRSessionEvent": false, + "XRSpace": false, + "XRSystem": false, + "XRTransientInputHitTestResult": false, + "XRTransientInputHitTestSource": false, + "XRView": false, + "XRViewerPose": false, + "XRViewport": false, + "XRWebGLBinding": false, + "XRWebGLDepthInformation": false, + "XRWebGLLayer": false, + "XSLTProcessor": false + } + }, + "errors": [ + { + "messageId": "impliedEval" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-implied-eval > invalid + +```js +setTimeout(String('x=1'), 100); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "globals": { + "AbortController": false, + "AbortSignal": false, + "AbsoluteOrientationSensor": false, + "AbstractRange": false, + "Accelerometer": false, + "addEventListener": false, + "ai": false, + "AI": false, + "AICreateMonitor": false, + "AITextSession": false, + "alert": false, + "AnalyserNode": false, + "Animation": false, + "AnimationEffect": false, + "AnimationEvent": false, + "AnimationPlaybackEvent": false, + "AnimationTimeline": false, + "AsyncDisposableStack": false, + "atob": false, + "Attr": false, + "Audio": false, + "AudioBuffer": false, + "AudioBufferSourceNode": false, + "AudioContext": false, + "AudioData": false, + "AudioDecoder": false, + "AudioDestinationNode": false, + "AudioEncoder": false, + "AudioListener": false, + "AudioNode": false, + "AudioParam": false, + "AudioParamMap": false, + "AudioProcessingEvent": false, + "AudioScheduledSourceNode": false, + "AudioSinkInfo": false, + "AudioWorklet": false, + "AudioWorkletGlobalScope": false, + "AudioWorkletNode": false, + "AudioWorkletProcessor": false, + "AuthenticatorAssertionResponse": false, + "AuthenticatorAttestationResponse": false, + "AuthenticatorResponse": false, + "BackgroundFetchManager": false, + "BackgroundFetchRecord": false, + "BackgroundFetchRegistration": false, + "BarcodeDetector": false, + "BarProp": false, + "BaseAudioContext": false, + "BatteryManager": false, + "BeforeUnloadEvent": false, + "BiquadFilterNode": false, + "Blob": false, + "BlobEvent": false, + "Bluetooth": false, + "BluetoothCharacteristicProperties": false, + "BluetoothDevice": false, + "BluetoothRemoteGATTCharacteristic": false, + "BluetoothRemoteGATTDescriptor": false, + "BluetoothRemoteGATTServer": false, + "BluetoothRemoteGATTService": false, + "BluetoothUUID": false, + "blur": false, + "BroadcastChannel": false, + "BrowserCaptureMediaStreamTrack": false, + "btoa": false, + "ByteLengthQueuingStrategy": false, + "Cache": false, + "caches": false, + "CacheStorage": false, + "cancelAnimationFrame": false, + "cancelIdleCallback": false, + "CanvasCaptureMediaStream": false, + "CanvasCaptureMediaStreamTrack": false, + "CanvasGradient": false, + "CanvasPattern": false, + "CanvasRenderingContext2D": false, + "CaptureController": false, + "CaretPosition": false, + "CDATASection": false, + "ChannelMergerNode": false, + "ChannelSplitterNode": false, + "ChapterInformation": false, + "CharacterBoundsUpdateEvent": false, + "CharacterData": false, + "clearInterval": false, + "clearTimeout": false, + "clientInformation": false, + "Clipboard": false, + "ClipboardChangeEvent": false, + "ClipboardEvent": false, + "ClipboardItem": false, + "close": false, + "closed": false, + "CloseEvent": false, + "CloseWatcher": false, + "CommandEvent": false, + "Comment": false, + "CompositionEvent": false, + "CompressionStream": false, + "confirm": false, + "console": false, + "ConstantSourceNode": false, + "ContentVisibilityAutoStateChangeEvent": false, + "ConvolverNode": false, + "CookieChangeEvent": false, + "CookieDeprecationLabel": false, + "cookieStore": false, + "CookieStore": false, + "CookieStoreManager": false, + "CountQueuingStrategy": false, + "createImageBitmap": false, + "CreateMonitor": false, + "Credential": false, + "credentialless": false, + "CredentialsContainer": false, + "CropTarget": false, + "crossOriginIsolated": false, + "crypto": false, + "Crypto": false, + "CryptoKey": false, + "CSPViolationReportBody": false, + "CSS": false, + "CSSAnimation": false, + "CSSConditionRule": false, + "CSSContainerRule": false, + "CSSCounterStyleRule": false, + "CSSFontFaceRule": false, + "CSSFontFeatureValuesRule": false, + "CSSFontPaletteValuesRule": false, + "CSSFunctionDeclarations": false, + "CSSFunctionDescriptors": false, + "CSSFunctionRule": false, + "CSSGroupingRule": false, + "CSSImageValue": false, + "CSSImportRule": false, + "CSSKeyframeRule": false, + "CSSKeyframesRule": false, + "CSSKeywordValue": false, + "CSSLayerBlockRule": false, + "CSSLayerStatementRule": false, + "CSSMarginRule": false, + "CSSMathClamp": false, + "CSSMathInvert": false, + "CSSMathMax": false, + "CSSMathMin": false, + "CSSMathNegate": false, + "CSSMathProduct": false, + "CSSMathSum": false, + "CSSMathValue": false, + "CSSMatrixComponent": false, + "CSSMediaRule": false, + "CSSNamespaceRule": false, + "CSSNestedDeclarations": false, + "CSSNumericArray": false, + "CSSNumericValue": false, + "CSSPageDescriptors": false, + "CSSPageRule": false, + "CSSPerspective": false, + "CSSPositionTryDescriptors": false, + "CSSPositionTryRule": false, + "CSSPositionValue": false, + "CSSPropertyRule": false, + "CSSRotate": false, + "CSSRule": false, + "CSSRuleList": false, + "CSSScale": false, + "CSSScopeRule": false, + "CSSSkew": false, + "CSSSkewX": false, + "CSSSkewY": false, + "CSSStartingStyleRule": false, + "CSSStyleDeclaration": false, + "CSSStyleRule": false, + "CSSStyleSheet": false, + "CSSStyleValue": false, + "CSSSupportsRule": false, + "CSSTransformComponent": false, + "CSSTransformValue": false, + "CSSTransition": false, + "CSSTranslate": false, + "CSSUnitValue": false, + "CSSUnparsedValue": false, + "CSSVariableReferenceValue": false, + "CSSViewTransitionRule": false, + "currentFrame": false, + "currentTime": false, + "CustomElementRegistry": false, + "customElements": false, + "CustomEvent": false, + "CustomStateSet": false, + "DataTransfer": false, + "DataTransferItem": false, + "DataTransferItemList": false, + "DecompressionStream": false, + "DelayNode": false, + "DelegatedInkTrailPresenter": false, + "DeviceMotionEvent": false, + "DeviceMotionEventAcceleration": false, + "DeviceMotionEventRotationRate": false, + "DeviceOrientationEvent": false, + "devicePixelRatio": false, + "DevicePosture": false, + "DigitalCredential": false, + "dispatchEvent": false, + "DisposableStack": false, + "document": false, + "Document": false, + "DocumentFragment": false, + "documentPictureInPicture": false, + "DocumentPictureInPicture": false, + "DocumentPictureInPictureEvent": false, + "DocumentTimeline": false, + "DocumentType": false, + "DOMError": false, + "DOMException": false, + "DOMImplementation": false, + "DOMMatrix": false, + "DOMMatrixReadOnly": false, + "DOMParser": false, + "DOMPoint": false, + "DOMPointReadOnly": false, + "DOMQuad": false, + "DOMRect": false, + "DOMRectList": false, + "DOMRectReadOnly": false, + "DOMStringList": false, + "DOMStringMap": false, + "DOMTokenList": false, + "DragEvent": false, + "DynamicsCompressorNode": false, + "EditContext": false, + "Element": false, + "ElementInternals": false, + "EncodedAudioChunk": false, + "EncodedVideoChunk": false, + "ErrorEvent": false, + "event": false, + "Event": false, + "EventCounts": false, + "EventSource": false, + "EventTarget": false, + "external": false, + "External": false, + "EyeDropper": false, + "FeaturePolicy": false, + "FederatedCredential": false, + "fence": false, + "Fence": false, + "FencedFrameConfig": false, + "fetch": false, + "fetchLater": false, + "FetchLaterResult": false, + "File": false, + "FileList": false, + "FileReader": false, + "FileSystem": false, + "FileSystemDirectoryEntry": false, + "FileSystemDirectoryHandle": false, + "FileSystemDirectoryReader": false, + "FileSystemEntry": false, + "FileSystemFileEntry": false, + "FileSystemFileHandle": false, + "FileSystemHandle": false, + "FileSystemObserver": false, + "FileSystemWritableFileStream": false, + "find": false, + "focus": false, + "FocusEvent": false, + "FontData": false, + "FontFace": false, + "FontFaceSet": false, + "FontFaceSetLoadEvent": false, + "FormData": false, + "FormDataEvent": false, + "FragmentDirective": false, + "frameElement": false, + "frames": false, + "GainNode": false, + "Gamepad": false, + "GamepadAxisMoveEvent": false, + "GamepadButton": false, + "GamepadButtonEvent": false, + "GamepadEvent": false, + "GamepadHapticActuator": false, + "GamepadPose": false, + "Geolocation": false, + "GeolocationCoordinates": false, + "GeolocationPosition": false, + "GeolocationPositionError": false, + "getComputedStyle": false, + "getScreenDetails": false, + "getSelection": false, + "GPU": false, + "GPUAdapter": false, + "GPUAdapterInfo": false, + "GPUBindGroup": false, + "GPUBindGroupLayout": false, + "GPUBuffer": false, + "GPUBufferUsage": false, + "GPUCanvasContext": false, + "GPUColorWrite": false, + "GPUCommandBuffer": false, + "GPUCommandEncoder": false, + "GPUCompilationInfo": false, + "GPUCompilationMessage": false, + "GPUComputePassEncoder": false, + "GPUComputePipeline": false, + "GPUDevice": false, + "GPUDeviceLostInfo": false, + "GPUError": false, + "GPUExternalTexture": false, + "GPUInternalError": false, + "GPUMapMode": false, + "GPUOutOfMemoryError": false, + "GPUPipelineError": false, + "GPUPipelineLayout": false, + "GPUQuerySet": false, + "GPUQueue": false, + "GPURenderBundle": false, + "GPURenderBundleEncoder": false, + "GPURenderPassEncoder": false, + "GPURenderPipeline": false, + "GPUSampler": false, + "GPUShaderModule": false, + "GPUShaderStage": false, + "GPUSupportedFeatures": false, + "GPUSupportedLimits": false, + "GPUTexture": false, + "GPUTextureUsage": false, + "GPUTextureView": false, + "GPUUncapturedErrorEvent": false, + "GPUValidationError": false, + "GravitySensor": false, + "Gyroscope": false, + "HashChangeEvent": false, + "Headers": false, + "HID": false, + "HIDConnectionEvent": false, + "HIDDevice": false, + "HIDInputReportEvent": false, + "Highlight": false, + "HighlightRegistry": false, + "history": false, + "History": false, + "HTMLAllCollection": false, + "HTMLAnchorElement": false, + "HTMLAreaElement": false, + "HTMLAudioElement": false, + "HTMLBaseElement": false, + "HTMLBodyElement": false, + "HTMLBRElement": false, + "HTMLButtonElement": false, + "HTMLCanvasElement": false, + "HTMLCollection": false, + "HTMLDataElement": false, + "HTMLDataListElement": false, + "HTMLDetailsElement": false, + "HTMLDialogElement": false, + "HTMLDirectoryElement": false, + "HTMLDivElement": false, + "HTMLDListElement": false, + "HTMLDocument": false, + "HTMLElement": false, + "HTMLEmbedElement": false, + "HTMLFencedFrameElement": false, + "HTMLFieldSetElement": false, + "HTMLFontElement": false, + "HTMLFormControlsCollection": false, + "HTMLFormElement": false, + "HTMLFrameElement": false, + "HTMLFrameSetElement": false, + "HTMLHeadElement": false, + "HTMLHeadingElement": false, + "HTMLHRElement": false, + "HTMLHtmlElement": false, + "HTMLIFrameElement": false, + "HTMLImageElement": false, + "HTMLInputElement": false, + "HTMLLabelElement": false, + "HTMLLegendElement": false, + "HTMLLIElement": false, + "HTMLLinkElement": false, + "HTMLMapElement": false, + "HTMLMarqueeElement": false, + "HTMLMediaElement": false, + "HTMLMenuElement": false, + "HTMLMetaElement": false, + "HTMLMeterElement": false, + "HTMLModElement": false, + "HTMLObjectElement": false, + "HTMLOListElement": false, + "HTMLOptGroupElement": false, + "HTMLOptionElement": false, + "HTMLOptionsCollection": false, + "HTMLOutputElement": false, + "HTMLParagraphElement": false, + "HTMLParamElement": false, + "HTMLPictureElement": false, + "HTMLPreElement": false, + "HTMLProgressElement": false, + "HTMLQuoteElement": false, + "HTMLScriptElement": false, + "HTMLSelectedContentElement": false, + "HTMLSelectElement": false, + "HTMLSlotElement": false, + "HTMLSourceElement": false, + "HTMLSpanElement": false, + "HTMLStyleElement": false, + "HTMLTableCaptionElement": false, + "HTMLTableCellElement": false, + "HTMLTableColElement": false, + "HTMLTableElement": false, + "HTMLTableRowElement": false, + "HTMLTableSectionElement": false, + "HTMLTemplateElement": false, + "HTMLTextAreaElement": false, + "HTMLTimeElement": false, + "HTMLTitleElement": false, + "HTMLTrackElement": false, + "HTMLUListElement": false, + "HTMLUnknownElement": false, + "HTMLVideoElement": false, + "IDBCursor": false, + "IDBCursorWithValue": false, + "IDBDatabase": false, + "IDBFactory": false, + "IDBIndex": false, + "IDBKeyRange": false, + "IDBObjectStore": false, + "IDBOpenDBRequest": false, + "IDBRecord": false, + "IDBRequest": false, + "IDBTransaction": false, + "IDBVersionChangeEvent": false, + "IdentityCredential": false, + "IdentityCredentialError": false, + "IdentityProvider": false, + "IdleDeadline": false, + "IdleDetector": false, + "IIRFilterNode": false, + "Image": false, + "ImageBitmap": false, + "ImageBitmapRenderingContext": false, + "ImageCapture": false, + "ImageData": false, + "ImageDecoder": false, + "ImageTrack": false, + "ImageTrackList": false, + "indexedDB": false, + "Ink": false, + "innerHeight": false, + "innerWidth": false, + "InputDeviceCapabilities": false, + "InputDeviceInfo": false, + "InputEvent": false, + "IntegrityViolationReportBody": false, + "InterestEvent": false, + "IntersectionObserver": false, + "IntersectionObserverEntry": false, + "isSecureContext": false, + "Keyboard": false, + "KeyboardEvent": false, + "KeyboardLayoutMap": false, + "KeyframeEffect": false, + "LanguageDetector": false, + "LargestContentfulPaint": false, + "LaunchParams": false, + "launchQueue": false, + "LaunchQueue": false, + "LayoutShift": false, + "LayoutShiftAttribution": false, + "length": false, + "LinearAccelerationSensor": false, + "localStorage": false, + "location": true, + "Location": false, + "locationbar": false, + "Lock": false, + "LockManager": false, + "matchMedia": false, + "MathMLElement": false, + "MediaCapabilities": false, + "MediaCapabilitiesInfo": false, + "MediaDeviceInfo": false, + "MediaDevices": false, + "MediaElementAudioSourceNode": false, + "MediaEncryptedEvent": false, + "MediaError": false, + "MediaKeyError": false, + "MediaKeyMessageEvent": false, + "MediaKeys": false, + "MediaKeySession": false, + "MediaKeyStatusMap": false, + "MediaKeySystemAccess": false, + "MediaList": false, + "MediaMetadata": false, + "MediaQueryList": false, + "MediaQueryListEvent": false, + "MediaRecorder": false, + "MediaRecorderErrorEvent": false, + "MediaSession": false, + "MediaSource": false, + "MediaSourceHandle": false, + "MediaStream": false, + "MediaStreamAudioDestinationNode": false, + "MediaStreamAudioSourceNode": false, + "MediaStreamEvent": false, + "MediaStreamTrack": false, + "MediaStreamTrackAudioSourceNode": false, + "MediaStreamTrackAudioStats": false, + "MediaStreamTrackEvent": false, + "MediaStreamTrackGenerator": false, + "MediaStreamTrackProcessor": false, + "MediaStreamTrackVideoStats": false, + "menubar": false, + "MessageChannel": false, + "MessageEvent": false, + "MessagePort": false, + "MIDIAccess": false, + "MIDIConnectionEvent": false, + "MIDIInput": false, + "MIDIInputMap": false, + "MIDIMessageEvent": false, + "MIDIOutput": false, + "MIDIOutputMap": false, + "MIDIPort": false, + "MimeType": false, + "MimeTypeArray": false, + "model": false, + "ModelGenericSession": false, + "ModelManager": false, + "MouseEvent": false, + "moveBy": false, + "moveTo": false, + "MutationEvent": false, + "MutationObserver": false, + "MutationRecord": false, + "name": false, + "NamedNodeMap": false, + "NavigateEvent": false, + "navigation": false, + "Navigation": false, + "NavigationActivation": false, + "NavigationCurrentEntryChangeEvent": false, + "NavigationDestination": false, + "NavigationHistoryEntry": false, + "NavigationPrecommitController": false, + "NavigationPreloadManager": false, + "NavigationTransition": false, + "navigator": false, + "Navigator": false, + "NavigatorLogin": false, + "NavigatorManagedData": false, + "NavigatorUAData": false, + "NetworkInformation": false, + "Node": false, + "NodeFilter": false, + "NodeIterator": false, + "NodeList": false, + "Notification": false, + "NotifyPaintEvent": false, + "NotRestoredReasonDetails": false, + "NotRestoredReasons": false, + "Observable": false, + "OfflineAudioCompletionEvent": false, + "OfflineAudioContext": false, + "offscreenBuffering": false, + "OffscreenCanvas": false, + "OffscreenCanvasRenderingContext2D": false, + "onabort": true, + "onafterprint": true, + "onanimationcancel": true, + "onanimationend": true, + "onanimationiteration": true, + "onanimationstart": true, + "onappinstalled": true, + "onauxclick": true, + "onbeforeinput": true, + "onbeforeinstallprompt": true, + "onbeforematch": true, + "onbeforeprint": true, + "onbeforetoggle": true, + "onbeforeunload": true, + "onbeforexrselect": true, + "onblur": true, + "oncancel": true, + "oncanplay": true, + "oncanplaythrough": true, + "onchange": true, + "onclick": true, + "onclose": true, + "oncommand": true, + "oncontentvisibilityautostatechange": true, + "oncontextlost": true, + "oncontextmenu": true, + "oncontextrestored": true, + "oncopy": true, + "oncuechange": true, + "oncut": true, + "ondblclick": true, + "ondevicemotion": true, + "ondeviceorientation": true, + "ondeviceorientationabsolute": true, + "ondrag": true, + "ondragend": true, + "ondragenter": true, + "ondragleave": true, + "ondragover": true, + "ondragstart": true, + "ondrop": true, + "ondurationchange": true, + "onemptied": true, + "onended": true, + "onerror": true, + "onfocus": true, + "onformdata": true, + "ongamepadconnected": true, + "ongamepaddisconnected": true, + "ongotpointercapture": true, + "onhashchange": true, + "oninput": true, + "oninvalid": true, + "onkeydown": true, + "onkeypress": true, + "onkeyup": true, + "onlanguagechange": true, + "onload": true, + "onloadeddata": true, + "onloadedmetadata": true, + "onloadstart": true, + "onlostpointercapture": true, + "onmessage": true, + "onmessageerror": true, + "onmousedown": true, + "onmouseenter": true, + "onmouseleave": true, + "onmousemove": true, + "onmouseout": true, + "onmouseover": true, + "onmouseup": true, + "onmousewheel": true, + "onoffline": true, + "ononline": true, + "onpagehide": true, + "onpagereveal": true, + "onpageshow": true, + "onpageswap": true, + "onpaste": true, + "onpause": true, + "onplay": true, + "onplaying": true, + "onpointercancel": true, + "onpointerdown": true, + "onpointerenter": true, + "onpointerleave": true, + "onpointermove": true, + "onpointerout": true, + "onpointerover": true, + "onpointerrawupdate": true, + "onpointerup": true, + "onpopstate": true, + "onprogress": true, + "onratechange": true, + "onrejectionhandled": true, + "onreset": true, + "onresize": true, + "onscroll": true, + "onscrollend": true, + "onscrollsnapchange": true, + "onscrollsnapchanging": true, + "onsearch": true, + "onsecuritypolicyviolation": true, + "onseeked": true, + "onseeking": true, + "onselect": true, + "onselectionchange": true, + "onselectstart": true, + "onslotchange": true, + "onstalled": true, + "onstorage": true, + "onsubmit": true, + "onsuspend": true, + "ontimeupdate": true, + "ontoggle": true, + "ontransitioncancel": true, + "ontransitionend": true, + "ontransitionrun": true, + "ontransitionstart": true, + "onunhandledrejection": true, + "onunload": true, + "onvolumechange": true, + "onwaiting": true, + "onwheel": true, + "open": false, + "opener": false, + "Option": false, + "OrientationSensor": false, + "origin": false, + "originAgentCluster": false, + "OscillatorNode": false, + "OTPCredential": false, + "outerHeight": false, + "outerWidth": false, + "OverconstrainedError": false, + "PageRevealEvent": false, + "PageSwapEvent": false, + "PageTransitionEvent": false, + "pageXOffset": false, + "pageYOffset": false, + "PannerNode": false, + "parent": false, + "PasswordCredential": false, + "Path2D": false, + "PaymentAddress": false, + "PaymentManager": false, + "PaymentMethodChangeEvent": false, + "PaymentRequest": false, + "PaymentRequestUpdateEvent": false, + "PaymentResponse": false, + "performance": false, + "Performance": false, + "PerformanceElementTiming": false, + "PerformanceEntry": false, + "PerformanceEventTiming": false, + "PerformanceLongAnimationFrameTiming": false, + "PerformanceLongTaskTiming": false, + "PerformanceMark": false, + "PerformanceMeasure": false, + "PerformanceNavigation": false, + "PerformanceNavigationTiming": false, + "PerformanceObserver": false, + "PerformanceObserverEntryList": false, + "PerformancePaintTiming": false, + "PerformanceResourceTiming": false, + "PerformanceScriptTiming": false, + "PerformanceServerTiming": false, + "PerformanceTiming": false, + "PeriodicSyncManager": false, + "PeriodicWave": false, + "Permissions": false, + "PermissionStatus": false, + "PERSISTENT": false, + "personalbar": false, + "PictureInPictureEvent": false, + "PictureInPictureWindow": false, + "Plugin": false, + "PluginArray": false, + "PointerEvent": false, + "PopStateEvent": false, + "postMessage": false, + "Presentation": false, + "PresentationAvailability": false, + "PresentationConnection": false, + "PresentationConnectionAvailableEvent": false, + "PresentationConnectionCloseEvent": false, + "PresentationConnectionList": false, + "PresentationReceiver": false, + "PresentationRequest": false, + "PressureObserver": false, + "PressureRecord": false, + "print": false, + "ProcessingInstruction": false, + "Profiler": false, + "ProgressEvent": false, + "PromiseRejectionEvent": false, + "prompt": false, + "ProtectedAudience": false, + "PublicKeyCredential": false, + "PushManager": false, + "PushSubscription": false, + "PushSubscriptionOptions": false, + "queryLocalFonts": false, + "queueMicrotask": false, + "QuotaExceededError": false, + "RadioNodeList": false, + "Range": false, + "ReadableByteStreamController": false, + "ReadableStream": false, + "ReadableStreamBYOBReader": false, + "ReadableStreamBYOBRequest": false, + "ReadableStreamDefaultController": false, + "ReadableStreamDefaultReader": false, + "registerProcessor": false, + "RelativeOrientationSensor": false, + "RemotePlayback": false, + "removeEventListener": false, + "ReportBody": false, + "reportError": false, + "ReportingObserver": false, + "Request": false, + "requestAnimationFrame": false, + "requestIdleCallback": false, + "resizeBy": false, + "ResizeObserver": false, + "ResizeObserverEntry": false, + "ResizeObserverSize": false, + "resizeTo": false, + "Response": false, + "RestrictionTarget": false, + "RTCCertificate": false, + "RTCDataChannel": false, + "RTCDataChannelEvent": false, + "RTCDtlsTransport": false, + "RTCDTMFSender": false, + "RTCDTMFToneChangeEvent": false, + "RTCEncodedAudioFrame": false, + "RTCEncodedVideoFrame": false, + "RTCError": false, + "RTCErrorEvent": false, + "RTCIceCandidate": false, + "RTCIceTransport": false, + "RTCPeerConnection": false, + "RTCPeerConnectionIceErrorEvent": false, + "RTCPeerConnectionIceEvent": false, + "RTCRtpReceiver": false, + "RTCRtpScriptTransform": false, + "RTCRtpSender": false, + "RTCRtpTransceiver": false, + "RTCSctpTransport": false, + "RTCSessionDescription": false, + "RTCStatsReport": false, + "RTCTrackEvent": false, + "sampleRate": false, + "scheduler": false, + "Scheduler": false, + "Scheduling": false, + "screen": false, + "Screen": false, + "ScreenDetailed": false, + "ScreenDetails": false, + "screenLeft": false, + "ScreenOrientation": false, + "screenTop": false, + "screenX": false, + "screenY": false, + "ScriptProcessorNode": false, + "scroll": false, + "scrollbars": false, + "scrollBy": false, + "ScrollTimeline": false, + "scrollTo": false, + "scrollX": false, + "scrollY": false, + "SecurityPolicyViolationEvent": false, + "Selection": false, + "self": false, + "Sensor": false, + "SensorErrorEvent": false, + "Serial": false, + "SerialPort": false, + "ServiceWorker": false, + "ServiceWorkerContainer": false, + "ServiceWorkerRegistration": false, + "sessionStorage": false, + "setInterval": false, + "setTimeout": false, + "ShadowRoot": false, + "sharedStorage": false, + "SharedStorage": false, + "SharedStorageAppendMethod": false, + "SharedStorageClearMethod": false, + "SharedStorageDeleteMethod": false, + "SharedStorageModifierMethod": false, + "SharedStorageSetMethod": false, + "SharedStorageWorklet": false, + "SharedWorker": false, + "showDirectoryPicker": false, + "showOpenFilePicker": false, + "showSaveFilePicker": false, + "SnapEvent": false, + "SourceBuffer": false, + "SourceBufferList": false, + "SpeechGrammar": false, + "SpeechGrammarList": false, + "SpeechRecognition": false, + "SpeechRecognitionErrorEvent": false, + "SpeechRecognitionEvent": false, + "SpeechRecognitionPhrase": false, + "speechSynthesis": false, + "SpeechSynthesis": false, + "SpeechSynthesisErrorEvent": false, + "SpeechSynthesisEvent": false, + "SpeechSynthesisUtterance": false, + "SpeechSynthesisVoice": false, + "StaticRange": false, + "status": false, + "statusbar": false, + "StereoPannerNode": false, + "stop": false, + "Storage": false, + "StorageBucket": false, + "StorageBucketManager": false, + "StorageEvent": false, + "StorageManager": false, + "structuredClone": false, + "styleMedia": false, + "StylePropertyMap": false, + "StylePropertyMapReadOnly": false, + "StyleSheet": false, + "StyleSheetList": false, + "SubmitEvent": false, + "Subscriber": false, + "SubtleCrypto": false, + "Summarizer": false, + "SuppressedError": false, + "SVGAElement": false, + "SVGAngle": false, + "SVGAnimatedAngle": false, + "SVGAnimatedBoolean": false, + "SVGAnimatedEnumeration": false, + "SVGAnimatedInteger": false, + "SVGAnimatedLength": false, + "SVGAnimatedLengthList": false, + "SVGAnimatedNumber": false, + "SVGAnimatedNumberList": false, + "SVGAnimatedPreserveAspectRatio": false, + "SVGAnimatedRect": false, + "SVGAnimatedString": false, + "SVGAnimatedTransformList": false, + "SVGAnimateElement": false, + "SVGAnimateMotionElement": false, + "SVGAnimateTransformElement": false, + "SVGAnimationElement": false, + "SVGCircleElement": false, + "SVGClipPathElement": false, + "SVGComponentTransferFunctionElement": false, + "SVGDefsElement": false, + "SVGDescElement": false, + "SVGElement": false, + "SVGEllipseElement": false, + "SVGFEBlendElement": false, + "SVGFEColorMatrixElement": false, + "SVGFEComponentTransferElement": false, + "SVGFECompositeElement": false, + "SVGFEConvolveMatrixElement": false, + "SVGFEDiffuseLightingElement": false, + "SVGFEDisplacementMapElement": false, + "SVGFEDistantLightElement": false, + "SVGFEDropShadowElement": false, + "SVGFEFloodElement": false, + "SVGFEFuncAElement": false, + "SVGFEFuncBElement": false, + "SVGFEFuncGElement": false, + "SVGFEFuncRElement": false, + "SVGFEGaussianBlurElement": false, + "SVGFEImageElement": false, + "SVGFEMergeElement": false, + "SVGFEMergeNodeElement": false, + "SVGFEMorphologyElement": false, + "SVGFEOffsetElement": false, + "SVGFEPointLightElement": false, + "SVGFESpecularLightingElement": false, + "SVGFESpotLightElement": false, + "SVGFETileElement": false, + "SVGFETurbulenceElement": false, + "SVGFilterElement": false, + "SVGForeignObjectElement": false, + "SVGGElement": false, + "SVGGeometryElement": false, + "SVGGradientElement": false, + "SVGGraphicsElement": false, + "SVGImageElement": false, + "SVGLength": false, + "SVGLengthList": false, + "SVGLinearGradientElement": false, + "SVGLineElement": false, + "SVGMarkerElement": false, + "SVGMaskElement": false, + "SVGMatrix": false, + "SVGMetadataElement": false, + "SVGMPathElement": false, + "SVGNumber": false, + "SVGNumberList": false, + "SVGPathElement": false, + "SVGPatternElement": false, + "SVGPoint": false, + "SVGPointList": false, + "SVGPolygonElement": false, + "SVGPolylineElement": false, + "SVGPreserveAspectRatio": false, + "SVGRadialGradientElement": false, + "SVGRect": false, + "SVGRectElement": false, + "SVGScriptElement": false, + "SVGSetElement": false, + "SVGStopElement": false, + "SVGStringList": false, + "SVGStyleElement": false, + "SVGSVGElement": false, + "SVGSwitchElement": false, + "SVGSymbolElement": false, + "SVGTextContentElement": false, + "SVGTextElement": false, + "SVGTextPathElement": false, + "SVGTextPositioningElement": false, + "SVGTitleElement": false, + "SVGTransform": false, + "SVGTransformList": false, + "SVGTSpanElement": false, + "SVGUnitTypes": false, + "SVGUseElement": false, + "SVGViewElement": false, + "SyncManager": false, + "TaskAttributionTiming": false, + "TaskController": false, + "TaskPriorityChangeEvent": false, + "TaskSignal": false, + "TEMPORARY": false, + "Text": false, + "TextDecoder": false, + "TextDecoderStream": false, + "TextEncoder": false, + "TextEncoderStream": false, + "TextEvent": false, + "TextFormat": false, + "TextFormatUpdateEvent": false, + "TextMetrics": false, + "TextTrack": false, + "TextTrackCue": false, + "TextTrackCueList": false, + "TextTrackList": false, + "TextUpdateEvent": false, + "TimeEvent": false, + "TimeRanges": false, + "ToggleEvent": false, + "toolbar": false, + "top": false, + "Touch": false, + "TouchEvent": false, + "TouchList": false, + "TrackEvent": false, + "TransformStream": false, + "TransformStreamDefaultController": false, + "TransitionEvent": false, + "Translator": false, + "TreeWalker": false, + "TrustedHTML": false, + "TrustedScript": false, + "TrustedScriptURL": false, + "TrustedTypePolicy": false, + "TrustedTypePolicyFactory": false, + "trustedTypes": false, + "UIEvent": false, + "URL": false, + "URLPattern": false, + "URLSearchParams": false, + "USB": false, + "USBAlternateInterface": false, + "USBConfiguration": false, + "USBConnectionEvent": false, + "USBDevice": false, + "USBEndpoint": false, + "USBInterface": false, + "USBInTransferResult": false, + "USBIsochronousInTransferPacket": false, + "USBIsochronousInTransferResult": false, + "USBIsochronousOutTransferPacket": false, + "USBIsochronousOutTransferResult": false, + "USBOutTransferResult": false, + "UserActivation": false, + "ValidityState": false, + "VideoColorSpace": false, + "VideoDecoder": false, + "VideoEncoder": false, + "VideoFrame": false, + "VideoPlaybackQuality": false, + "viewport": false, + "Viewport": false, + "ViewTimeline": false, + "ViewTransition": false, + "ViewTransitionTypeSet": false, + "VirtualKeyboard": false, + "VirtualKeyboardGeometryChangeEvent": false, + "VisibilityStateEntry": false, + "visualViewport": false, + "VisualViewport": false, + "VTTCue": false, + "VTTRegion": false, + "WakeLock": false, + "WakeLockSentinel": false, + "WaveShaperNode": false, + "WebAssembly": false, + "WebGL2RenderingContext": false, + "WebGLActiveInfo": false, + "WebGLBuffer": false, + "WebGLContextEvent": false, + "WebGLFramebuffer": false, + "WebGLObject": false, + "WebGLProgram": false, + "WebGLQuery": false, + "WebGLRenderbuffer": false, + "WebGLRenderingContext": false, + "WebGLSampler": false, + "WebGLShader": false, + "WebGLShaderPrecisionFormat": false, + "WebGLSync": false, + "WebGLTexture": false, + "WebGLTransformFeedback": false, + "WebGLUniformLocation": false, + "WebGLVertexArrayObject": false, + "WebSocket": false, + "WebSocketError": false, + "WebSocketStream": false, + "WebTransport": false, + "WebTransportBidirectionalStream": false, + "WebTransportDatagramDuplexStream": false, + "WebTransportError": false, + "WebTransportReceiveStream": false, + "WebTransportSendStream": false, + "WGSLLanguageFeatures": false, + "WheelEvent": false, + "when": false, + "window": false, + "Window": false, + "WindowControlsOverlay": false, + "WindowControlsOverlayGeometryChangeEvent": false, + "Worker": false, + "Worklet": false, + "WorkletGlobalScope": false, + "WritableStream": false, + "WritableStreamDefaultController": false, + "WritableStreamDefaultWriter": false, + "XMLDocument": false, + "XMLHttpRequest": false, + "XMLHttpRequestEventTarget": false, + "XMLHttpRequestUpload": false, + "XMLSerializer": false, + "XPathEvaluator": false, + "XPathExpression": false, + "XPathResult": false, + "XRAnchor": false, + "XRAnchorSet": false, + "XRBoundedReferenceSpace": false, + "XRCamera": false, + "XRCPUDepthInformation": false, + "XRDepthInformation": false, + "XRDOMOverlayState": false, + "XRFrame": false, + "XRHand": false, + "XRHitTestResult": false, + "XRHitTestSource": false, + "XRInputSource": false, + "XRInputSourceArray": false, + "XRInputSourceEvent": false, + "XRInputSourcesChangeEvent": false, + "XRJointPose": false, + "XRJointSpace": false, + "XRLayer": false, + "XRLightEstimate": false, + "XRLightProbe": false, + "XRPose": false, + "XRRay": false, + "XRReferenceSpace": false, + "XRReferenceSpaceEvent": false, + "XRRenderState": false, + "XRRigidTransform": false, + "XRSession": false, + "XRSessionEvent": false, + "XRSpace": false, + "XRSystem": false, + "XRTransientInputHitTestResult": false, + "XRTransientInputHitTestSource": false, + "XRView": false, + "XRViewerPose": false, + "XRViewport": false, + "XRWebGLBinding": false, + "XRWebGLDepthInformation": false, + "XRWebGLLayer": false, + "XSLTProcessor": false + } + }, + "errors": [ + { + "messageId": "impliedEval" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-implied-eval > invalid + +```js +window.setTimeout('foo') +``` + +```json +{ + "languageOptions": { + "globals": { + "AbortController": false, + "AbortSignal": false, + "AbsoluteOrientationSensor": false, + "AbstractRange": false, + "Accelerometer": false, + "addEventListener": false, + "ai": false, + "AI": false, + "AICreateMonitor": false, + "AITextSession": false, + "alert": false, + "AnalyserNode": false, + "Animation": false, + "AnimationEffect": false, + "AnimationEvent": false, + "AnimationPlaybackEvent": false, + "AnimationTimeline": false, + "AsyncDisposableStack": false, + "atob": false, + "Attr": false, + "Audio": false, + "AudioBuffer": false, + "AudioBufferSourceNode": false, + "AudioContext": false, + "AudioData": false, + "AudioDecoder": false, + "AudioDestinationNode": false, + "AudioEncoder": false, + "AudioListener": false, + "AudioNode": false, + "AudioParam": false, + "AudioParamMap": false, + "AudioProcessingEvent": false, + "AudioScheduledSourceNode": false, + "AudioSinkInfo": false, + "AudioWorklet": false, + "AudioWorkletGlobalScope": false, + "AudioWorkletNode": false, + "AudioWorkletProcessor": false, + "AuthenticatorAssertionResponse": false, + "AuthenticatorAttestationResponse": false, + "AuthenticatorResponse": false, + "BackgroundFetchManager": false, + "BackgroundFetchRecord": false, + "BackgroundFetchRegistration": false, + "BarcodeDetector": false, + "BarProp": false, + "BaseAudioContext": false, + "BatteryManager": false, + "BeforeUnloadEvent": false, + "BiquadFilterNode": false, + "Blob": false, + "BlobEvent": false, + "Bluetooth": false, + "BluetoothCharacteristicProperties": false, + "BluetoothDevice": false, + "BluetoothRemoteGATTCharacteristic": false, + "BluetoothRemoteGATTDescriptor": false, + "BluetoothRemoteGATTServer": false, + "BluetoothRemoteGATTService": false, + "BluetoothUUID": false, + "blur": false, + "BroadcastChannel": false, + "BrowserCaptureMediaStreamTrack": false, + "btoa": false, + "ByteLengthQueuingStrategy": false, + "Cache": false, + "caches": false, + "CacheStorage": false, + "cancelAnimationFrame": false, + "cancelIdleCallback": false, + "CanvasCaptureMediaStream": false, + "CanvasCaptureMediaStreamTrack": false, + "CanvasGradient": false, + "CanvasPattern": false, + "CanvasRenderingContext2D": false, + "CaptureController": false, + "CaretPosition": false, + "CDATASection": false, + "ChannelMergerNode": false, + "ChannelSplitterNode": false, + "ChapterInformation": false, + "CharacterBoundsUpdateEvent": false, + "CharacterData": false, + "clearInterval": false, + "clearTimeout": false, + "clientInformation": false, + "Clipboard": false, + "ClipboardChangeEvent": false, + "ClipboardEvent": false, + "ClipboardItem": false, + "close": false, + "closed": false, + "CloseEvent": false, + "CloseWatcher": false, + "CommandEvent": false, + "Comment": false, + "CompositionEvent": false, + "CompressionStream": false, + "confirm": false, + "console": false, + "ConstantSourceNode": false, + "ContentVisibilityAutoStateChangeEvent": false, + "ConvolverNode": false, + "CookieChangeEvent": false, + "CookieDeprecationLabel": false, + "cookieStore": false, + "CookieStore": false, + "CookieStoreManager": false, + "CountQueuingStrategy": false, + "createImageBitmap": false, + "CreateMonitor": false, + "Credential": false, + "credentialless": false, + "CredentialsContainer": false, + "CropTarget": false, + "crossOriginIsolated": false, + "crypto": false, + "Crypto": false, + "CryptoKey": false, + "CSPViolationReportBody": false, + "CSS": false, + "CSSAnimation": false, + "CSSConditionRule": false, + "CSSContainerRule": false, + "CSSCounterStyleRule": false, + "CSSFontFaceRule": false, + "CSSFontFeatureValuesRule": false, + "CSSFontPaletteValuesRule": false, + "CSSFunctionDeclarations": false, + "CSSFunctionDescriptors": false, + "CSSFunctionRule": false, + "CSSGroupingRule": false, + "CSSImageValue": false, + "CSSImportRule": false, + "CSSKeyframeRule": false, + "CSSKeyframesRule": false, + "CSSKeywordValue": false, + "CSSLayerBlockRule": false, + "CSSLayerStatementRule": false, + "CSSMarginRule": false, + "CSSMathClamp": false, + "CSSMathInvert": false, + "CSSMathMax": false, + "CSSMathMin": false, + "CSSMathNegate": false, + "CSSMathProduct": false, + "CSSMathSum": false, + "CSSMathValue": false, + "CSSMatrixComponent": false, + "CSSMediaRule": false, + "CSSNamespaceRule": false, + "CSSNestedDeclarations": false, + "CSSNumericArray": false, + "CSSNumericValue": false, + "CSSPageDescriptors": false, + "CSSPageRule": false, + "CSSPerspective": false, + "CSSPositionTryDescriptors": false, + "CSSPositionTryRule": false, + "CSSPositionValue": false, + "CSSPropertyRule": false, + "CSSRotate": false, + "CSSRule": false, + "CSSRuleList": false, + "CSSScale": false, + "CSSScopeRule": false, + "CSSSkew": false, + "CSSSkewX": false, + "CSSSkewY": false, + "CSSStartingStyleRule": false, + "CSSStyleDeclaration": false, + "CSSStyleRule": false, + "CSSStyleSheet": false, + "CSSStyleValue": false, + "CSSSupportsRule": false, + "CSSTransformComponent": false, + "CSSTransformValue": false, + "CSSTransition": false, + "CSSTranslate": false, + "CSSUnitValue": false, + "CSSUnparsedValue": false, + "CSSVariableReferenceValue": false, + "CSSViewTransitionRule": false, + "currentFrame": false, + "currentTime": false, + "CustomElementRegistry": false, + "customElements": false, + "CustomEvent": false, + "CustomStateSet": false, + "DataTransfer": false, + "DataTransferItem": false, + "DataTransferItemList": false, + "DecompressionStream": false, + "DelayNode": false, + "DelegatedInkTrailPresenter": false, + "DeviceMotionEvent": false, + "DeviceMotionEventAcceleration": false, + "DeviceMotionEventRotationRate": false, + "DeviceOrientationEvent": false, + "devicePixelRatio": false, + "DevicePosture": false, + "DigitalCredential": false, + "dispatchEvent": false, + "DisposableStack": false, + "document": false, + "Document": false, + "DocumentFragment": false, + "documentPictureInPicture": false, + "DocumentPictureInPicture": false, + "DocumentPictureInPictureEvent": false, + "DocumentTimeline": false, + "DocumentType": false, + "DOMError": false, + "DOMException": false, + "DOMImplementation": false, + "DOMMatrix": false, + "DOMMatrixReadOnly": false, + "DOMParser": false, + "DOMPoint": false, + "DOMPointReadOnly": false, + "DOMQuad": false, + "DOMRect": false, + "DOMRectList": false, + "DOMRectReadOnly": false, + "DOMStringList": false, + "DOMStringMap": false, + "DOMTokenList": false, + "DragEvent": false, + "DynamicsCompressorNode": false, + "EditContext": false, + "Element": false, + "ElementInternals": false, + "EncodedAudioChunk": false, + "EncodedVideoChunk": false, + "ErrorEvent": false, + "event": false, + "Event": false, + "EventCounts": false, + "EventSource": false, + "EventTarget": false, + "external": false, + "External": false, + "EyeDropper": false, + "FeaturePolicy": false, + "FederatedCredential": false, + "fence": false, + "Fence": false, + "FencedFrameConfig": false, + "fetch": false, + "fetchLater": false, + "FetchLaterResult": false, + "File": false, + "FileList": false, + "FileReader": false, + "FileSystem": false, + "FileSystemDirectoryEntry": false, + "FileSystemDirectoryHandle": false, + "FileSystemDirectoryReader": false, + "FileSystemEntry": false, + "FileSystemFileEntry": false, + "FileSystemFileHandle": false, + "FileSystemHandle": false, + "FileSystemObserver": false, + "FileSystemWritableFileStream": false, + "find": false, + "focus": false, + "FocusEvent": false, + "FontData": false, + "FontFace": false, + "FontFaceSet": false, + "FontFaceSetLoadEvent": false, + "FormData": false, + "FormDataEvent": false, + "FragmentDirective": false, + "frameElement": false, + "frames": false, + "GainNode": false, + "Gamepad": false, + "GamepadAxisMoveEvent": false, + "GamepadButton": false, + "GamepadButtonEvent": false, + "GamepadEvent": false, + "GamepadHapticActuator": false, + "GamepadPose": false, + "Geolocation": false, + "GeolocationCoordinates": false, + "GeolocationPosition": false, + "GeolocationPositionError": false, + "getComputedStyle": false, + "getScreenDetails": false, + "getSelection": false, + "GPU": false, + "GPUAdapter": false, + "GPUAdapterInfo": false, + "GPUBindGroup": false, + "GPUBindGroupLayout": false, + "GPUBuffer": false, + "GPUBufferUsage": false, + "GPUCanvasContext": false, + "GPUColorWrite": false, + "GPUCommandBuffer": false, + "GPUCommandEncoder": false, + "GPUCompilationInfo": false, + "GPUCompilationMessage": false, + "GPUComputePassEncoder": false, + "GPUComputePipeline": false, + "GPUDevice": false, + "GPUDeviceLostInfo": false, + "GPUError": false, + "GPUExternalTexture": false, + "GPUInternalError": false, + "GPUMapMode": false, + "GPUOutOfMemoryError": false, + "GPUPipelineError": false, + "GPUPipelineLayout": false, + "GPUQuerySet": false, + "GPUQueue": false, + "GPURenderBundle": false, + "GPURenderBundleEncoder": false, + "GPURenderPassEncoder": false, + "GPURenderPipeline": false, + "GPUSampler": false, + "GPUShaderModule": false, + "GPUShaderStage": false, + "GPUSupportedFeatures": false, + "GPUSupportedLimits": false, + "GPUTexture": false, + "GPUTextureUsage": false, + "GPUTextureView": false, + "GPUUncapturedErrorEvent": false, + "GPUValidationError": false, + "GravitySensor": false, + "Gyroscope": false, + "HashChangeEvent": false, + "Headers": false, + "HID": false, + "HIDConnectionEvent": false, + "HIDDevice": false, + "HIDInputReportEvent": false, + "Highlight": false, + "HighlightRegistry": false, + "history": false, + "History": false, + "HTMLAllCollection": false, + "HTMLAnchorElement": false, + "HTMLAreaElement": false, + "HTMLAudioElement": false, + "HTMLBaseElement": false, + "HTMLBodyElement": false, + "HTMLBRElement": false, + "HTMLButtonElement": false, + "HTMLCanvasElement": false, + "HTMLCollection": false, + "HTMLDataElement": false, + "HTMLDataListElement": false, + "HTMLDetailsElement": false, + "HTMLDialogElement": false, + "HTMLDirectoryElement": false, + "HTMLDivElement": false, + "HTMLDListElement": false, + "HTMLDocument": false, + "HTMLElement": false, + "HTMLEmbedElement": false, + "HTMLFencedFrameElement": false, + "HTMLFieldSetElement": false, + "HTMLFontElement": false, + "HTMLFormControlsCollection": false, + "HTMLFormElement": false, + "HTMLFrameElement": false, + "HTMLFrameSetElement": false, + "HTMLHeadElement": false, + "HTMLHeadingElement": false, + "HTMLHRElement": false, + "HTMLHtmlElement": false, + "HTMLIFrameElement": false, + "HTMLImageElement": false, + "HTMLInputElement": false, + "HTMLLabelElement": false, + "HTMLLegendElement": false, + "HTMLLIElement": false, + "HTMLLinkElement": false, + "HTMLMapElement": false, + "HTMLMarqueeElement": false, + "HTMLMediaElement": false, + "HTMLMenuElement": false, + "HTMLMetaElement": false, + "HTMLMeterElement": false, + "HTMLModElement": false, + "HTMLObjectElement": false, + "HTMLOListElement": false, + "HTMLOptGroupElement": false, + "HTMLOptionElement": false, + "HTMLOptionsCollection": false, + "HTMLOutputElement": false, + "HTMLParagraphElement": false, + "HTMLParamElement": false, + "HTMLPictureElement": false, + "HTMLPreElement": false, + "HTMLProgressElement": false, + "HTMLQuoteElement": false, + "HTMLScriptElement": false, + "HTMLSelectedContentElement": false, + "HTMLSelectElement": false, + "HTMLSlotElement": false, + "HTMLSourceElement": false, + "HTMLSpanElement": false, + "HTMLStyleElement": false, + "HTMLTableCaptionElement": false, + "HTMLTableCellElement": false, + "HTMLTableColElement": false, + "HTMLTableElement": false, + "HTMLTableRowElement": false, + "HTMLTableSectionElement": false, + "HTMLTemplateElement": false, + "HTMLTextAreaElement": false, + "HTMLTimeElement": false, + "HTMLTitleElement": false, + "HTMLTrackElement": false, + "HTMLUListElement": false, + "HTMLUnknownElement": false, + "HTMLVideoElement": false, + "IDBCursor": false, + "IDBCursorWithValue": false, + "IDBDatabase": false, + "IDBFactory": false, + "IDBIndex": false, + "IDBKeyRange": false, + "IDBObjectStore": false, + "IDBOpenDBRequest": false, + "IDBRecord": false, + "IDBRequest": false, + "IDBTransaction": false, + "IDBVersionChangeEvent": false, + "IdentityCredential": false, + "IdentityCredentialError": false, + "IdentityProvider": false, + "IdleDeadline": false, + "IdleDetector": false, + "IIRFilterNode": false, + "Image": false, + "ImageBitmap": false, + "ImageBitmapRenderingContext": false, + "ImageCapture": false, + "ImageData": false, + "ImageDecoder": false, + "ImageTrack": false, + "ImageTrackList": false, + "indexedDB": false, + "Ink": false, + "innerHeight": false, + "innerWidth": false, + "InputDeviceCapabilities": false, + "InputDeviceInfo": false, + "InputEvent": false, + "IntegrityViolationReportBody": false, + "InterestEvent": false, + "IntersectionObserver": false, + "IntersectionObserverEntry": false, + "isSecureContext": false, + "Keyboard": false, + "KeyboardEvent": false, + "KeyboardLayoutMap": false, + "KeyframeEffect": false, + "LanguageDetector": false, + "LargestContentfulPaint": false, + "LaunchParams": false, + "launchQueue": false, + "LaunchQueue": false, + "LayoutShift": false, + "LayoutShiftAttribution": false, + "length": false, + "LinearAccelerationSensor": false, + "localStorage": false, + "location": true, + "Location": false, + "locationbar": false, + "Lock": false, + "LockManager": false, + "matchMedia": false, + "MathMLElement": false, + "MediaCapabilities": false, + "MediaCapabilitiesInfo": false, + "MediaDeviceInfo": false, + "MediaDevices": false, + "MediaElementAudioSourceNode": false, + "MediaEncryptedEvent": false, + "MediaError": false, + "MediaKeyError": false, + "MediaKeyMessageEvent": false, + "MediaKeys": false, + "MediaKeySession": false, + "MediaKeyStatusMap": false, + "MediaKeySystemAccess": false, + "MediaList": false, + "MediaMetadata": false, + "MediaQueryList": false, + "MediaQueryListEvent": false, + "MediaRecorder": false, + "MediaRecorderErrorEvent": false, + "MediaSession": false, + "MediaSource": false, + "MediaSourceHandle": false, + "MediaStream": false, + "MediaStreamAudioDestinationNode": false, + "MediaStreamAudioSourceNode": false, + "MediaStreamEvent": false, + "MediaStreamTrack": false, + "MediaStreamTrackAudioSourceNode": false, + "MediaStreamTrackAudioStats": false, + "MediaStreamTrackEvent": false, + "MediaStreamTrackGenerator": false, + "MediaStreamTrackProcessor": false, + "MediaStreamTrackVideoStats": false, + "menubar": false, + "MessageChannel": false, + "MessageEvent": false, + "MessagePort": false, + "MIDIAccess": false, + "MIDIConnectionEvent": false, + "MIDIInput": false, + "MIDIInputMap": false, + "MIDIMessageEvent": false, + "MIDIOutput": false, + "MIDIOutputMap": false, + "MIDIPort": false, + "MimeType": false, + "MimeTypeArray": false, + "model": false, + "ModelGenericSession": false, + "ModelManager": false, + "MouseEvent": false, + "moveBy": false, + "moveTo": false, + "MutationEvent": false, + "MutationObserver": false, + "MutationRecord": false, + "name": false, + "NamedNodeMap": false, + "NavigateEvent": false, + "navigation": false, + "Navigation": false, + "NavigationActivation": false, + "NavigationCurrentEntryChangeEvent": false, + "NavigationDestination": false, + "NavigationHistoryEntry": false, + "NavigationPrecommitController": false, + "NavigationPreloadManager": false, + "NavigationTransition": false, + "navigator": false, + "Navigator": false, + "NavigatorLogin": false, + "NavigatorManagedData": false, + "NavigatorUAData": false, + "NetworkInformation": false, + "Node": false, + "NodeFilter": false, + "NodeIterator": false, + "NodeList": false, + "Notification": false, + "NotifyPaintEvent": false, + "NotRestoredReasonDetails": false, + "NotRestoredReasons": false, + "Observable": false, + "OfflineAudioCompletionEvent": false, + "OfflineAudioContext": false, + "offscreenBuffering": false, + "OffscreenCanvas": false, + "OffscreenCanvasRenderingContext2D": false, + "onabort": true, + "onafterprint": true, + "onanimationcancel": true, + "onanimationend": true, + "onanimationiteration": true, + "onanimationstart": true, + "onappinstalled": true, + "onauxclick": true, + "onbeforeinput": true, + "onbeforeinstallprompt": true, + "onbeforematch": true, + "onbeforeprint": true, + "onbeforetoggle": true, + "onbeforeunload": true, + "onbeforexrselect": true, + "onblur": true, + "oncancel": true, + "oncanplay": true, + "oncanplaythrough": true, + "onchange": true, + "onclick": true, + "onclose": true, + "oncommand": true, + "oncontentvisibilityautostatechange": true, + "oncontextlost": true, + "oncontextmenu": true, + "oncontextrestored": true, + "oncopy": true, + "oncuechange": true, + "oncut": true, + "ondblclick": true, + "ondevicemotion": true, + "ondeviceorientation": true, + "ondeviceorientationabsolute": true, + "ondrag": true, + "ondragend": true, + "ondragenter": true, + "ondragleave": true, + "ondragover": true, + "ondragstart": true, + "ondrop": true, + "ondurationchange": true, + "onemptied": true, + "onended": true, + "onerror": true, + "onfocus": true, + "onformdata": true, + "ongamepadconnected": true, + "ongamepaddisconnected": true, + "ongotpointercapture": true, + "onhashchange": true, + "oninput": true, + "oninvalid": true, + "onkeydown": true, + "onkeypress": true, + "onkeyup": true, + "onlanguagechange": true, + "onload": true, + "onloadeddata": true, + "onloadedmetadata": true, + "onloadstart": true, + "onlostpointercapture": true, + "onmessage": true, + "onmessageerror": true, + "onmousedown": true, + "onmouseenter": true, + "onmouseleave": true, + "onmousemove": true, + "onmouseout": true, + "onmouseover": true, + "onmouseup": true, + "onmousewheel": true, + "onoffline": true, + "ononline": true, + "onpagehide": true, + "onpagereveal": true, + "onpageshow": true, + "onpageswap": true, + "onpaste": true, + "onpause": true, + "onplay": true, + "onplaying": true, + "onpointercancel": true, + "onpointerdown": true, + "onpointerenter": true, + "onpointerleave": true, + "onpointermove": true, + "onpointerout": true, + "onpointerover": true, + "onpointerrawupdate": true, + "onpointerup": true, + "onpopstate": true, + "onprogress": true, + "onratechange": true, + "onrejectionhandled": true, + "onreset": true, + "onresize": true, + "onscroll": true, + "onscrollend": true, + "onscrollsnapchange": true, + "onscrollsnapchanging": true, + "onsearch": true, + "onsecuritypolicyviolation": true, + "onseeked": true, + "onseeking": true, + "onselect": true, + "onselectionchange": true, + "onselectstart": true, + "onslotchange": true, + "onstalled": true, + "onstorage": true, + "onsubmit": true, + "onsuspend": true, + "ontimeupdate": true, + "ontoggle": true, + "ontransitioncancel": true, + "ontransitionend": true, + "ontransitionrun": true, + "ontransitionstart": true, + "onunhandledrejection": true, + "onunload": true, + "onvolumechange": true, + "onwaiting": true, + "onwheel": true, + "open": false, + "opener": false, + "Option": false, + "OrientationSensor": false, + "origin": false, + "originAgentCluster": false, + "OscillatorNode": false, + "OTPCredential": false, + "outerHeight": false, + "outerWidth": false, + "OverconstrainedError": false, + "PageRevealEvent": false, + "PageSwapEvent": false, + "PageTransitionEvent": false, + "pageXOffset": false, + "pageYOffset": false, + "PannerNode": false, + "parent": false, + "PasswordCredential": false, + "Path2D": false, + "PaymentAddress": false, + "PaymentManager": false, + "PaymentMethodChangeEvent": false, + "PaymentRequest": false, + "PaymentRequestUpdateEvent": false, + "PaymentResponse": false, + "performance": false, + "Performance": false, + "PerformanceElementTiming": false, + "PerformanceEntry": false, + "PerformanceEventTiming": false, + "PerformanceLongAnimationFrameTiming": false, + "PerformanceLongTaskTiming": false, + "PerformanceMark": false, + "PerformanceMeasure": false, + "PerformanceNavigation": false, + "PerformanceNavigationTiming": false, + "PerformanceObserver": false, + "PerformanceObserverEntryList": false, + "PerformancePaintTiming": false, + "PerformanceResourceTiming": false, + "PerformanceScriptTiming": false, + "PerformanceServerTiming": false, + "PerformanceTiming": false, + "PeriodicSyncManager": false, + "PeriodicWave": false, + "Permissions": false, + "PermissionStatus": false, + "PERSISTENT": false, + "personalbar": false, + "PictureInPictureEvent": false, + "PictureInPictureWindow": false, + "Plugin": false, + "PluginArray": false, + "PointerEvent": false, + "PopStateEvent": false, + "postMessage": false, + "Presentation": false, + "PresentationAvailability": false, + "PresentationConnection": false, + "PresentationConnectionAvailableEvent": false, + "PresentationConnectionCloseEvent": false, + "PresentationConnectionList": false, + "PresentationReceiver": false, + "PresentationRequest": false, + "PressureObserver": false, + "PressureRecord": false, + "print": false, + "ProcessingInstruction": false, + "Profiler": false, + "ProgressEvent": false, + "PromiseRejectionEvent": false, + "prompt": false, + "ProtectedAudience": false, + "PublicKeyCredential": false, + "PushManager": false, + "PushSubscription": false, + "PushSubscriptionOptions": false, + "queryLocalFonts": false, + "queueMicrotask": false, + "QuotaExceededError": false, + "RadioNodeList": false, + "Range": false, + "ReadableByteStreamController": false, + "ReadableStream": false, + "ReadableStreamBYOBReader": false, + "ReadableStreamBYOBRequest": false, + "ReadableStreamDefaultController": false, + "ReadableStreamDefaultReader": false, + "registerProcessor": false, + "RelativeOrientationSensor": false, + "RemotePlayback": false, + "removeEventListener": false, + "ReportBody": false, + "reportError": false, + "ReportingObserver": false, + "Request": false, + "requestAnimationFrame": false, + "requestIdleCallback": false, + "resizeBy": false, + "ResizeObserver": false, + "ResizeObserverEntry": false, + "ResizeObserverSize": false, + "resizeTo": false, + "Response": false, + "RestrictionTarget": false, + "RTCCertificate": false, + "RTCDataChannel": false, + "RTCDataChannelEvent": false, + "RTCDtlsTransport": false, + "RTCDTMFSender": false, + "RTCDTMFToneChangeEvent": false, + "RTCEncodedAudioFrame": false, + "RTCEncodedVideoFrame": false, + "RTCError": false, + "RTCErrorEvent": false, + "RTCIceCandidate": false, + "RTCIceTransport": false, + "RTCPeerConnection": false, + "RTCPeerConnectionIceErrorEvent": false, + "RTCPeerConnectionIceEvent": false, + "RTCRtpReceiver": false, + "RTCRtpScriptTransform": false, + "RTCRtpSender": false, + "RTCRtpTransceiver": false, + "RTCSctpTransport": false, + "RTCSessionDescription": false, + "RTCStatsReport": false, + "RTCTrackEvent": false, + "sampleRate": false, + "scheduler": false, + "Scheduler": false, + "Scheduling": false, + "screen": false, + "Screen": false, + "ScreenDetailed": false, + "ScreenDetails": false, + "screenLeft": false, + "ScreenOrientation": false, + "screenTop": false, + "screenX": false, + "screenY": false, + "ScriptProcessorNode": false, + "scroll": false, + "scrollbars": false, + "scrollBy": false, + "ScrollTimeline": false, + "scrollTo": false, + "scrollX": false, + "scrollY": false, + "SecurityPolicyViolationEvent": false, + "Selection": false, + "self": false, + "Sensor": false, + "SensorErrorEvent": false, + "Serial": false, + "SerialPort": false, + "ServiceWorker": false, + "ServiceWorkerContainer": false, + "ServiceWorkerRegistration": false, + "sessionStorage": false, + "setInterval": false, + "setTimeout": false, + "ShadowRoot": false, + "sharedStorage": false, + "SharedStorage": false, + "SharedStorageAppendMethod": false, + "SharedStorageClearMethod": false, + "SharedStorageDeleteMethod": false, + "SharedStorageModifierMethod": false, + "SharedStorageSetMethod": false, + "SharedStorageWorklet": false, + "SharedWorker": false, + "showDirectoryPicker": false, + "showOpenFilePicker": false, + "showSaveFilePicker": false, + "SnapEvent": false, + "SourceBuffer": false, + "SourceBufferList": false, + "SpeechGrammar": false, + "SpeechGrammarList": false, + "SpeechRecognition": false, + "SpeechRecognitionErrorEvent": false, + "SpeechRecognitionEvent": false, + "SpeechRecognitionPhrase": false, + "speechSynthesis": false, + "SpeechSynthesis": false, + "SpeechSynthesisErrorEvent": false, + "SpeechSynthesisEvent": false, + "SpeechSynthesisUtterance": false, + "SpeechSynthesisVoice": false, + "StaticRange": false, + "status": false, + "statusbar": false, + "StereoPannerNode": false, + "stop": false, + "Storage": false, + "StorageBucket": false, + "StorageBucketManager": false, + "StorageEvent": false, + "StorageManager": false, + "structuredClone": false, + "styleMedia": false, + "StylePropertyMap": false, + "StylePropertyMapReadOnly": false, + "StyleSheet": false, + "StyleSheetList": false, + "SubmitEvent": false, + "Subscriber": false, + "SubtleCrypto": false, + "Summarizer": false, + "SuppressedError": false, + "SVGAElement": false, + "SVGAngle": false, + "SVGAnimatedAngle": false, + "SVGAnimatedBoolean": false, + "SVGAnimatedEnumeration": false, + "SVGAnimatedInteger": false, + "SVGAnimatedLength": false, + "SVGAnimatedLengthList": false, + "SVGAnimatedNumber": false, + "SVGAnimatedNumberList": false, + "SVGAnimatedPreserveAspectRatio": false, + "SVGAnimatedRect": false, + "SVGAnimatedString": false, + "SVGAnimatedTransformList": false, + "SVGAnimateElement": false, + "SVGAnimateMotionElement": false, + "SVGAnimateTransformElement": false, + "SVGAnimationElement": false, + "SVGCircleElement": false, + "SVGClipPathElement": false, + "SVGComponentTransferFunctionElement": false, + "SVGDefsElement": false, + "SVGDescElement": false, + "SVGElement": false, + "SVGEllipseElement": false, + "SVGFEBlendElement": false, + "SVGFEColorMatrixElement": false, + "SVGFEComponentTransferElement": false, + "SVGFECompositeElement": false, + "SVGFEConvolveMatrixElement": false, + "SVGFEDiffuseLightingElement": false, + "SVGFEDisplacementMapElement": false, + "SVGFEDistantLightElement": false, + "SVGFEDropShadowElement": false, + "SVGFEFloodElement": false, + "SVGFEFuncAElement": false, + "SVGFEFuncBElement": false, + "SVGFEFuncGElement": false, + "SVGFEFuncRElement": false, + "SVGFEGaussianBlurElement": false, + "SVGFEImageElement": false, + "SVGFEMergeElement": false, + "SVGFEMergeNodeElement": false, + "SVGFEMorphologyElement": false, + "SVGFEOffsetElement": false, + "SVGFEPointLightElement": false, + "SVGFESpecularLightingElement": false, + "SVGFESpotLightElement": false, + "SVGFETileElement": false, + "SVGFETurbulenceElement": false, + "SVGFilterElement": false, + "SVGForeignObjectElement": false, + "SVGGElement": false, + "SVGGeometryElement": false, + "SVGGradientElement": false, + "SVGGraphicsElement": false, + "SVGImageElement": false, + "SVGLength": false, + "SVGLengthList": false, + "SVGLinearGradientElement": false, + "SVGLineElement": false, + "SVGMarkerElement": false, + "SVGMaskElement": false, + "SVGMatrix": false, + "SVGMetadataElement": false, + "SVGMPathElement": false, + "SVGNumber": false, + "SVGNumberList": false, + "SVGPathElement": false, + "SVGPatternElement": false, + "SVGPoint": false, + "SVGPointList": false, + "SVGPolygonElement": false, + "SVGPolylineElement": false, + "SVGPreserveAspectRatio": false, + "SVGRadialGradientElement": false, + "SVGRect": false, + "SVGRectElement": false, + "SVGScriptElement": false, + "SVGSetElement": false, + "SVGStopElement": false, + "SVGStringList": false, + "SVGStyleElement": false, + "SVGSVGElement": false, + "SVGSwitchElement": false, + "SVGSymbolElement": false, + "SVGTextContentElement": false, + "SVGTextElement": false, + "SVGTextPathElement": false, + "SVGTextPositioningElement": false, + "SVGTitleElement": false, + "SVGTransform": false, + "SVGTransformList": false, + "SVGTSpanElement": false, + "SVGUnitTypes": false, + "SVGUseElement": false, + "SVGViewElement": false, + "SyncManager": false, + "TaskAttributionTiming": false, + "TaskController": false, + "TaskPriorityChangeEvent": false, + "TaskSignal": false, + "TEMPORARY": false, + "Text": false, + "TextDecoder": false, + "TextDecoderStream": false, + "TextEncoder": false, + "TextEncoderStream": false, + "TextEvent": false, + "TextFormat": false, + "TextFormatUpdateEvent": false, + "TextMetrics": false, + "TextTrack": false, + "TextTrackCue": false, + "TextTrackCueList": false, + "TextTrackList": false, + "TextUpdateEvent": false, + "TimeEvent": false, + "TimeRanges": false, + "ToggleEvent": false, + "toolbar": false, + "top": false, + "Touch": false, + "TouchEvent": false, + "TouchList": false, + "TrackEvent": false, + "TransformStream": false, + "TransformStreamDefaultController": false, + "TransitionEvent": false, + "Translator": false, + "TreeWalker": false, + "TrustedHTML": false, + "TrustedScript": false, + "TrustedScriptURL": false, + "TrustedTypePolicy": false, + "TrustedTypePolicyFactory": false, + "trustedTypes": false, + "UIEvent": false, + "URL": false, + "URLPattern": false, + "URLSearchParams": false, + "USB": false, + "USBAlternateInterface": false, + "USBConfiguration": false, + "USBConnectionEvent": false, + "USBDevice": false, + "USBEndpoint": false, + "USBInterface": false, + "USBInTransferResult": false, + "USBIsochronousInTransferPacket": false, + "USBIsochronousInTransferResult": false, + "USBIsochronousOutTransferPacket": false, + "USBIsochronousOutTransferResult": false, + "USBOutTransferResult": false, + "UserActivation": false, + "ValidityState": false, + "VideoColorSpace": false, + "VideoDecoder": false, + "VideoEncoder": false, + "VideoFrame": false, + "VideoPlaybackQuality": false, + "viewport": false, + "Viewport": false, + "ViewTimeline": false, + "ViewTransition": false, + "ViewTransitionTypeSet": false, + "VirtualKeyboard": false, + "VirtualKeyboardGeometryChangeEvent": false, + "VisibilityStateEntry": false, + "visualViewport": false, + "VisualViewport": false, + "VTTCue": false, + "VTTRegion": false, + "WakeLock": false, + "WakeLockSentinel": false, + "WaveShaperNode": false, + "WebAssembly": false, + "WebGL2RenderingContext": false, + "WebGLActiveInfo": false, + "WebGLBuffer": false, + "WebGLContextEvent": false, + "WebGLFramebuffer": false, + "WebGLObject": false, + "WebGLProgram": false, + "WebGLQuery": false, + "WebGLRenderbuffer": false, + "WebGLRenderingContext": false, + "WebGLSampler": false, + "WebGLShader": false, + "WebGLShaderPrecisionFormat": false, + "WebGLSync": false, + "WebGLTexture": false, + "WebGLTransformFeedback": false, + "WebGLUniformLocation": false, + "WebGLVertexArrayObject": false, + "WebSocket": false, + "WebSocketError": false, + "WebSocketStream": false, + "WebTransport": false, + "WebTransportBidirectionalStream": false, + "WebTransportDatagramDuplexStream": false, + "WebTransportError": false, + "WebTransportReceiveStream": false, + "WebTransportSendStream": false, + "WGSLLanguageFeatures": false, + "WheelEvent": false, + "when": false, + "window": false, + "Window": false, + "WindowControlsOverlay": false, + "WindowControlsOverlayGeometryChangeEvent": false, + "Worker": false, + "Worklet": false, + "WorkletGlobalScope": false, + "WritableStream": false, + "WritableStreamDefaultController": false, + "WritableStreamDefaultWriter": false, + "XMLDocument": false, + "XMLHttpRequest": false, + "XMLHttpRequestEventTarget": false, + "XMLHttpRequestUpload": false, + "XMLSerializer": false, + "XPathEvaluator": false, + "XPathExpression": false, + "XPathResult": false, + "XRAnchor": false, + "XRAnchorSet": false, + "XRBoundedReferenceSpace": false, + "XRCamera": false, + "XRCPUDepthInformation": false, + "XRDepthInformation": false, + "XRDOMOverlayState": false, + "XRFrame": false, + "XRHand": false, + "XRHitTestResult": false, + "XRHitTestSource": false, + "XRInputSource": false, + "XRInputSourceArray": false, + "XRInputSourceEvent": false, + "XRInputSourcesChangeEvent": false, + "XRJointPose": false, + "XRJointSpace": false, + "XRLayer": false, + "XRLightEstimate": false, + "XRLightProbe": false, + "XRPose": false, + "XRRay": false, + "XRReferenceSpace": false, + "XRReferenceSpaceEvent": false, + "XRRenderState": false, + "XRRigidTransform": false, + "XRSession": false, + "XRSessionEvent": false, + "XRSpace": false, + "XRSystem": false, + "XRTransientInputHitTestResult": false, + "XRTransientInputHitTestSource": false, + "XRView": false, + "XRViewerPose": false, + "XRViewport": false, + "XRWebGLBinding": false, + "XRWebGLDepthInformation": false, + "XRWebGLLayer": false, + "XSLTProcessor": false + } + }, + "errors": [ + { + "messageId": "impliedEval" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-implied-eval > invalid + +```js +window.setInterval('foo') +``` + +```json +{ + "languageOptions": { + "globals": { + "AbortController": false, + "AbortSignal": false, + "AbsoluteOrientationSensor": false, + "AbstractRange": false, + "Accelerometer": false, + "addEventListener": false, + "ai": false, + "AI": false, + "AICreateMonitor": false, + "AITextSession": false, + "alert": false, + "AnalyserNode": false, + "Animation": false, + "AnimationEffect": false, + "AnimationEvent": false, + "AnimationPlaybackEvent": false, + "AnimationTimeline": false, + "AsyncDisposableStack": false, + "atob": false, + "Attr": false, + "Audio": false, + "AudioBuffer": false, + "AudioBufferSourceNode": false, + "AudioContext": false, + "AudioData": false, + "AudioDecoder": false, + "AudioDestinationNode": false, + "AudioEncoder": false, + "AudioListener": false, + "AudioNode": false, + "AudioParam": false, + "AudioParamMap": false, + "AudioProcessingEvent": false, + "AudioScheduledSourceNode": false, + "AudioSinkInfo": false, + "AudioWorklet": false, + "AudioWorkletGlobalScope": false, + "AudioWorkletNode": false, + "AudioWorkletProcessor": false, + "AuthenticatorAssertionResponse": false, + "AuthenticatorAttestationResponse": false, + "AuthenticatorResponse": false, + "BackgroundFetchManager": false, + "BackgroundFetchRecord": false, + "BackgroundFetchRegistration": false, + "BarcodeDetector": false, + "BarProp": false, + "BaseAudioContext": false, + "BatteryManager": false, + "BeforeUnloadEvent": false, + "BiquadFilterNode": false, + "Blob": false, + "BlobEvent": false, + "Bluetooth": false, + "BluetoothCharacteristicProperties": false, + "BluetoothDevice": false, + "BluetoothRemoteGATTCharacteristic": false, + "BluetoothRemoteGATTDescriptor": false, + "BluetoothRemoteGATTServer": false, + "BluetoothRemoteGATTService": false, + "BluetoothUUID": false, + "blur": false, + "BroadcastChannel": false, + "BrowserCaptureMediaStreamTrack": false, + "btoa": false, + "ByteLengthQueuingStrategy": false, + "Cache": false, + "caches": false, + "CacheStorage": false, + "cancelAnimationFrame": false, + "cancelIdleCallback": false, + "CanvasCaptureMediaStream": false, + "CanvasCaptureMediaStreamTrack": false, + "CanvasGradient": false, + "CanvasPattern": false, + "CanvasRenderingContext2D": false, + "CaptureController": false, + "CaretPosition": false, + "CDATASection": false, + "ChannelMergerNode": false, + "ChannelSplitterNode": false, + "ChapterInformation": false, + "CharacterBoundsUpdateEvent": false, + "CharacterData": false, + "clearInterval": false, + "clearTimeout": false, + "clientInformation": false, + "Clipboard": false, + "ClipboardChangeEvent": false, + "ClipboardEvent": false, + "ClipboardItem": false, + "close": false, + "closed": false, + "CloseEvent": false, + "CloseWatcher": false, + "CommandEvent": false, + "Comment": false, + "CompositionEvent": false, + "CompressionStream": false, + "confirm": false, + "console": false, + "ConstantSourceNode": false, + "ContentVisibilityAutoStateChangeEvent": false, + "ConvolverNode": false, + "CookieChangeEvent": false, + "CookieDeprecationLabel": false, + "cookieStore": false, + "CookieStore": false, + "CookieStoreManager": false, + "CountQueuingStrategy": false, + "createImageBitmap": false, + "CreateMonitor": false, + "Credential": false, + "credentialless": false, + "CredentialsContainer": false, + "CropTarget": false, + "crossOriginIsolated": false, + "crypto": false, + "Crypto": false, + "CryptoKey": false, + "CSPViolationReportBody": false, + "CSS": false, + "CSSAnimation": false, + "CSSConditionRule": false, + "CSSContainerRule": false, + "CSSCounterStyleRule": false, + "CSSFontFaceRule": false, + "CSSFontFeatureValuesRule": false, + "CSSFontPaletteValuesRule": false, + "CSSFunctionDeclarations": false, + "CSSFunctionDescriptors": false, + "CSSFunctionRule": false, + "CSSGroupingRule": false, + "CSSImageValue": false, + "CSSImportRule": false, + "CSSKeyframeRule": false, + "CSSKeyframesRule": false, + "CSSKeywordValue": false, + "CSSLayerBlockRule": false, + "CSSLayerStatementRule": false, + "CSSMarginRule": false, + "CSSMathClamp": false, + "CSSMathInvert": false, + "CSSMathMax": false, + "CSSMathMin": false, + "CSSMathNegate": false, + "CSSMathProduct": false, + "CSSMathSum": false, + "CSSMathValue": false, + "CSSMatrixComponent": false, + "CSSMediaRule": false, + "CSSNamespaceRule": false, + "CSSNestedDeclarations": false, + "CSSNumericArray": false, + "CSSNumericValue": false, + "CSSPageDescriptors": false, + "CSSPageRule": false, + "CSSPerspective": false, + "CSSPositionTryDescriptors": false, + "CSSPositionTryRule": false, + "CSSPositionValue": false, + "CSSPropertyRule": false, + "CSSRotate": false, + "CSSRule": false, + "CSSRuleList": false, + "CSSScale": false, + "CSSScopeRule": false, + "CSSSkew": false, + "CSSSkewX": false, + "CSSSkewY": false, + "CSSStartingStyleRule": false, + "CSSStyleDeclaration": false, + "CSSStyleRule": false, + "CSSStyleSheet": false, + "CSSStyleValue": false, + "CSSSupportsRule": false, + "CSSTransformComponent": false, + "CSSTransformValue": false, + "CSSTransition": false, + "CSSTranslate": false, + "CSSUnitValue": false, + "CSSUnparsedValue": false, + "CSSVariableReferenceValue": false, + "CSSViewTransitionRule": false, + "currentFrame": false, + "currentTime": false, + "CustomElementRegistry": false, + "customElements": false, + "CustomEvent": false, + "CustomStateSet": false, + "DataTransfer": false, + "DataTransferItem": false, + "DataTransferItemList": false, + "DecompressionStream": false, + "DelayNode": false, + "DelegatedInkTrailPresenter": false, + "DeviceMotionEvent": false, + "DeviceMotionEventAcceleration": false, + "DeviceMotionEventRotationRate": false, + "DeviceOrientationEvent": false, + "devicePixelRatio": false, + "DevicePosture": false, + "DigitalCredential": false, + "dispatchEvent": false, + "DisposableStack": false, + "document": false, + "Document": false, + "DocumentFragment": false, + "documentPictureInPicture": false, + "DocumentPictureInPicture": false, + "DocumentPictureInPictureEvent": false, + "DocumentTimeline": false, + "DocumentType": false, + "DOMError": false, + "DOMException": false, + "DOMImplementation": false, + "DOMMatrix": false, + "DOMMatrixReadOnly": false, + "DOMParser": false, + "DOMPoint": false, + "DOMPointReadOnly": false, + "DOMQuad": false, + "DOMRect": false, + "DOMRectList": false, + "DOMRectReadOnly": false, + "DOMStringList": false, + "DOMStringMap": false, + "DOMTokenList": false, + "DragEvent": false, + "DynamicsCompressorNode": false, + "EditContext": false, + "Element": false, + "ElementInternals": false, + "EncodedAudioChunk": false, + "EncodedVideoChunk": false, + "ErrorEvent": false, + "event": false, + "Event": false, + "EventCounts": false, + "EventSource": false, + "EventTarget": false, + "external": false, + "External": false, + "EyeDropper": false, + "FeaturePolicy": false, + "FederatedCredential": false, + "fence": false, + "Fence": false, + "FencedFrameConfig": false, + "fetch": false, + "fetchLater": false, + "FetchLaterResult": false, + "File": false, + "FileList": false, + "FileReader": false, + "FileSystem": false, + "FileSystemDirectoryEntry": false, + "FileSystemDirectoryHandle": false, + "FileSystemDirectoryReader": false, + "FileSystemEntry": false, + "FileSystemFileEntry": false, + "FileSystemFileHandle": false, + "FileSystemHandle": false, + "FileSystemObserver": false, + "FileSystemWritableFileStream": false, + "find": false, + "focus": false, + "FocusEvent": false, + "FontData": false, + "FontFace": false, + "FontFaceSet": false, + "FontFaceSetLoadEvent": false, + "FormData": false, + "FormDataEvent": false, + "FragmentDirective": false, + "frameElement": false, + "frames": false, + "GainNode": false, + "Gamepad": false, + "GamepadAxisMoveEvent": false, + "GamepadButton": false, + "GamepadButtonEvent": false, + "GamepadEvent": false, + "GamepadHapticActuator": false, + "GamepadPose": false, + "Geolocation": false, + "GeolocationCoordinates": false, + "GeolocationPosition": false, + "GeolocationPositionError": false, + "getComputedStyle": false, + "getScreenDetails": false, + "getSelection": false, + "GPU": false, + "GPUAdapter": false, + "GPUAdapterInfo": false, + "GPUBindGroup": false, + "GPUBindGroupLayout": false, + "GPUBuffer": false, + "GPUBufferUsage": false, + "GPUCanvasContext": false, + "GPUColorWrite": false, + "GPUCommandBuffer": false, + "GPUCommandEncoder": false, + "GPUCompilationInfo": false, + "GPUCompilationMessage": false, + "GPUComputePassEncoder": false, + "GPUComputePipeline": false, + "GPUDevice": false, + "GPUDeviceLostInfo": false, + "GPUError": false, + "GPUExternalTexture": false, + "GPUInternalError": false, + "GPUMapMode": false, + "GPUOutOfMemoryError": false, + "GPUPipelineError": false, + "GPUPipelineLayout": false, + "GPUQuerySet": false, + "GPUQueue": false, + "GPURenderBundle": false, + "GPURenderBundleEncoder": false, + "GPURenderPassEncoder": false, + "GPURenderPipeline": false, + "GPUSampler": false, + "GPUShaderModule": false, + "GPUShaderStage": false, + "GPUSupportedFeatures": false, + "GPUSupportedLimits": false, + "GPUTexture": false, + "GPUTextureUsage": false, + "GPUTextureView": false, + "GPUUncapturedErrorEvent": false, + "GPUValidationError": false, + "GravitySensor": false, + "Gyroscope": false, + "HashChangeEvent": false, + "Headers": false, + "HID": false, + "HIDConnectionEvent": false, + "HIDDevice": false, + "HIDInputReportEvent": false, + "Highlight": false, + "HighlightRegistry": false, + "history": false, + "History": false, + "HTMLAllCollection": false, + "HTMLAnchorElement": false, + "HTMLAreaElement": false, + "HTMLAudioElement": false, + "HTMLBaseElement": false, + "HTMLBodyElement": false, + "HTMLBRElement": false, + "HTMLButtonElement": false, + "HTMLCanvasElement": false, + "HTMLCollection": false, + "HTMLDataElement": false, + "HTMLDataListElement": false, + "HTMLDetailsElement": false, + "HTMLDialogElement": false, + "HTMLDirectoryElement": false, + "HTMLDivElement": false, + "HTMLDListElement": false, + "HTMLDocument": false, + "HTMLElement": false, + "HTMLEmbedElement": false, + "HTMLFencedFrameElement": false, + "HTMLFieldSetElement": false, + "HTMLFontElement": false, + "HTMLFormControlsCollection": false, + "HTMLFormElement": false, + "HTMLFrameElement": false, + "HTMLFrameSetElement": false, + "HTMLHeadElement": false, + "HTMLHeadingElement": false, + "HTMLHRElement": false, + "HTMLHtmlElement": false, + "HTMLIFrameElement": false, + "HTMLImageElement": false, + "HTMLInputElement": false, + "HTMLLabelElement": false, + "HTMLLegendElement": false, + "HTMLLIElement": false, + "HTMLLinkElement": false, + "HTMLMapElement": false, + "HTMLMarqueeElement": false, + "HTMLMediaElement": false, + "HTMLMenuElement": false, + "HTMLMetaElement": false, + "HTMLMeterElement": false, + "HTMLModElement": false, + "HTMLObjectElement": false, + "HTMLOListElement": false, + "HTMLOptGroupElement": false, + "HTMLOptionElement": false, + "HTMLOptionsCollection": false, + "HTMLOutputElement": false, + "HTMLParagraphElement": false, + "HTMLParamElement": false, + "HTMLPictureElement": false, + "HTMLPreElement": false, + "HTMLProgressElement": false, + "HTMLQuoteElement": false, + "HTMLScriptElement": false, + "HTMLSelectedContentElement": false, + "HTMLSelectElement": false, + "HTMLSlotElement": false, + "HTMLSourceElement": false, + "HTMLSpanElement": false, + "HTMLStyleElement": false, + "HTMLTableCaptionElement": false, + "HTMLTableCellElement": false, + "HTMLTableColElement": false, + "HTMLTableElement": false, + "HTMLTableRowElement": false, + "HTMLTableSectionElement": false, + "HTMLTemplateElement": false, + "HTMLTextAreaElement": false, + "HTMLTimeElement": false, + "HTMLTitleElement": false, + "HTMLTrackElement": false, + "HTMLUListElement": false, + "HTMLUnknownElement": false, + "HTMLVideoElement": false, + "IDBCursor": false, + "IDBCursorWithValue": false, + "IDBDatabase": false, + "IDBFactory": false, + "IDBIndex": false, + "IDBKeyRange": false, + "IDBObjectStore": false, + "IDBOpenDBRequest": false, + "IDBRecord": false, + "IDBRequest": false, + "IDBTransaction": false, + "IDBVersionChangeEvent": false, + "IdentityCredential": false, + "IdentityCredentialError": false, + "IdentityProvider": false, + "IdleDeadline": false, + "IdleDetector": false, + "IIRFilterNode": false, + "Image": false, + "ImageBitmap": false, + "ImageBitmapRenderingContext": false, + "ImageCapture": false, + "ImageData": false, + "ImageDecoder": false, + "ImageTrack": false, + "ImageTrackList": false, + "indexedDB": false, + "Ink": false, + "innerHeight": false, + "innerWidth": false, + "InputDeviceCapabilities": false, + "InputDeviceInfo": false, + "InputEvent": false, + "IntegrityViolationReportBody": false, + "InterestEvent": false, + "IntersectionObserver": false, + "IntersectionObserverEntry": false, + "isSecureContext": false, + "Keyboard": false, + "KeyboardEvent": false, + "KeyboardLayoutMap": false, + "KeyframeEffect": false, + "LanguageDetector": false, + "LargestContentfulPaint": false, + "LaunchParams": false, + "launchQueue": false, + "LaunchQueue": false, + "LayoutShift": false, + "LayoutShiftAttribution": false, + "length": false, + "LinearAccelerationSensor": false, + "localStorage": false, + "location": true, + "Location": false, + "locationbar": false, + "Lock": false, + "LockManager": false, + "matchMedia": false, + "MathMLElement": false, + "MediaCapabilities": false, + "MediaCapabilitiesInfo": false, + "MediaDeviceInfo": false, + "MediaDevices": false, + "MediaElementAudioSourceNode": false, + "MediaEncryptedEvent": false, + "MediaError": false, + "MediaKeyError": false, + "MediaKeyMessageEvent": false, + "MediaKeys": false, + "MediaKeySession": false, + "MediaKeyStatusMap": false, + "MediaKeySystemAccess": false, + "MediaList": false, + "MediaMetadata": false, + "MediaQueryList": false, + "MediaQueryListEvent": false, + "MediaRecorder": false, + "MediaRecorderErrorEvent": false, + "MediaSession": false, + "MediaSource": false, + "MediaSourceHandle": false, + "MediaStream": false, + "MediaStreamAudioDestinationNode": false, + "MediaStreamAudioSourceNode": false, + "MediaStreamEvent": false, + "MediaStreamTrack": false, + "MediaStreamTrackAudioSourceNode": false, + "MediaStreamTrackAudioStats": false, + "MediaStreamTrackEvent": false, + "MediaStreamTrackGenerator": false, + "MediaStreamTrackProcessor": false, + "MediaStreamTrackVideoStats": false, + "menubar": false, + "MessageChannel": false, + "MessageEvent": false, + "MessagePort": false, + "MIDIAccess": false, + "MIDIConnectionEvent": false, + "MIDIInput": false, + "MIDIInputMap": false, + "MIDIMessageEvent": false, + "MIDIOutput": false, + "MIDIOutputMap": false, + "MIDIPort": false, + "MimeType": false, + "MimeTypeArray": false, + "model": false, + "ModelGenericSession": false, + "ModelManager": false, + "MouseEvent": false, + "moveBy": false, + "moveTo": false, + "MutationEvent": false, + "MutationObserver": false, + "MutationRecord": false, + "name": false, + "NamedNodeMap": false, + "NavigateEvent": false, + "navigation": false, + "Navigation": false, + "NavigationActivation": false, + "NavigationCurrentEntryChangeEvent": false, + "NavigationDestination": false, + "NavigationHistoryEntry": false, + "NavigationPrecommitController": false, + "NavigationPreloadManager": false, + "NavigationTransition": false, + "navigator": false, + "Navigator": false, + "NavigatorLogin": false, + "NavigatorManagedData": false, + "NavigatorUAData": false, + "NetworkInformation": false, + "Node": false, + "NodeFilter": false, + "NodeIterator": false, + "NodeList": false, + "Notification": false, + "NotifyPaintEvent": false, + "NotRestoredReasonDetails": false, + "NotRestoredReasons": false, + "Observable": false, + "OfflineAudioCompletionEvent": false, + "OfflineAudioContext": false, + "offscreenBuffering": false, + "OffscreenCanvas": false, + "OffscreenCanvasRenderingContext2D": false, + "onabort": true, + "onafterprint": true, + "onanimationcancel": true, + "onanimationend": true, + "onanimationiteration": true, + "onanimationstart": true, + "onappinstalled": true, + "onauxclick": true, + "onbeforeinput": true, + "onbeforeinstallprompt": true, + "onbeforematch": true, + "onbeforeprint": true, + "onbeforetoggle": true, + "onbeforeunload": true, + "onbeforexrselect": true, + "onblur": true, + "oncancel": true, + "oncanplay": true, + "oncanplaythrough": true, + "onchange": true, + "onclick": true, + "onclose": true, + "oncommand": true, + "oncontentvisibilityautostatechange": true, + "oncontextlost": true, + "oncontextmenu": true, + "oncontextrestored": true, + "oncopy": true, + "oncuechange": true, + "oncut": true, + "ondblclick": true, + "ondevicemotion": true, + "ondeviceorientation": true, + "ondeviceorientationabsolute": true, + "ondrag": true, + "ondragend": true, + "ondragenter": true, + "ondragleave": true, + "ondragover": true, + "ondragstart": true, + "ondrop": true, + "ondurationchange": true, + "onemptied": true, + "onended": true, + "onerror": true, + "onfocus": true, + "onformdata": true, + "ongamepadconnected": true, + "ongamepaddisconnected": true, + "ongotpointercapture": true, + "onhashchange": true, + "oninput": true, + "oninvalid": true, + "onkeydown": true, + "onkeypress": true, + "onkeyup": true, + "onlanguagechange": true, + "onload": true, + "onloadeddata": true, + "onloadedmetadata": true, + "onloadstart": true, + "onlostpointercapture": true, + "onmessage": true, + "onmessageerror": true, + "onmousedown": true, + "onmouseenter": true, + "onmouseleave": true, + "onmousemove": true, + "onmouseout": true, + "onmouseover": true, + "onmouseup": true, + "onmousewheel": true, + "onoffline": true, + "ononline": true, + "onpagehide": true, + "onpagereveal": true, + "onpageshow": true, + "onpageswap": true, + "onpaste": true, + "onpause": true, + "onplay": true, + "onplaying": true, + "onpointercancel": true, + "onpointerdown": true, + "onpointerenter": true, + "onpointerleave": true, + "onpointermove": true, + "onpointerout": true, + "onpointerover": true, + "onpointerrawupdate": true, + "onpointerup": true, + "onpopstate": true, + "onprogress": true, + "onratechange": true, + "onrejectionhandled": true, + "onreset": true, + "onresize": true, + "onscroll": true, + "onscrollend": true, + "onscrollsnapchange": true, + "onscrollsnapchanging": true, + "onsearch": true, + "onsecuritypolicyviolation": true, + "onseeked": true, + "onseeking": true, + "onselect": true, + "onselectionchange": true, + "onselectstart": true, + "onslotchange": true, + "onstalled": true, + "onstorage": true, + "onsubmit": true, + "onsuspend": true, + "ontimeupdate": true, + "ontoggle": true, + "ontransitioncancel": true, + "ontransitionend": true, + "ontransitionrun": true, + "ontransitionstart": true, + "onunhandledrejection": true, + "onunload": true, + "onvolumechange": true, + "onwaiting": true, + "onwheel": true, + "open": false, + "opener": false, + "Option": false, + "OrientationSensor": false, + "origin": false, + "originAgentCluster": false, + "OscillatorNode": false, + "OTPCredential": false, + "outerHeight": false, + "outerWidth": false, + "OverconstrainedError": false, + "PageRevealEvent": false, + "PageSwapEvent": false, + "PageTransitionEvent": false, + "pageXOffset": false, + "pageYOffset": false, + "PannerNode": false, + "parent": false, + "PasswordCredential": false, + "Path2D": false, + "PaymentAddress": false, + "PaymentManager": false, + "PaymentMethodChangeEvent": false, + "PaymentRequest": false, + "PaymentRequestUpdateEvent": false, + "PaymentResponse": false, + "performance": false, + "Performance": false, + "PerformanceElementTiming": false, + "PerformanceEntry": false, + "PerformanceEventTiming": false, + "PerformanceLongAnimationFrameTiming": false, + "PerformanceLongTaskTiming": false, + "PerformanceMark": false, + "PerformanceMeasure": false, + "PerformanceNavigation": false, + "PerformanceNavigationTiming": false, + "PerformanceObserver": false, + "PerformanceObserverEntryList": false, + "PerformancePaintTiming": false, + "PerformanceResourceTiming": false, + "PerformanceScriptTiming": false, + "PerformanceServerTiming": false, + "PerformanceTiming": false, + "PeriodicSyncManager": false, + "PeriodicWave": false, + "Permissions": false, + "PermissionStatus": false, + "PERSISTENT": false, + "personalbar": false, + "PictureInPictureEvent": false, + "PictureInPictureWindow": false, + "Plugin": false, + "PluginArray": false, + "PointerEvent": false, + "PopStateEvent": false, + "postMessage": false, + "Presentation": false, + "PresentationAvailability": false, + "PresentationConnection": false, + "PresentationConnectionAvailableEvent": false, + "PresentationConnectionCloseEvent": false, + "PresentationConnectionList": false, + "PresentationReceiver": false, + "PresentationRequest": false, + "PressureObserver": false, + "PressureRecord": false, + "print": false, + "ProcessingInstruction": false, + "Profiler": false, + "ProgressEvent": false, + "PromiseRejectionEvent": false, + "prompt": false, + "ProtectedAudience": false, + "PublicKeyCredential": false, + "PushManager": false, + "PushSubscription": false, + "PushSubscriptionOptions": false, + "queryLocalFonts": false, + "queueMicrotask": false, + "QuotaExceededError": false, + "RadioNodeList": false, + "Range": false, + "ReadableByteStreamController": false, + "ReadableStream": false, + "ReadableStreamBYOBReader": false, + "ReadableStreamBYOBRequest": false, + "ReadableStreamDefaultController": false, + "ReadableStreamDefaultReader": false, + "registerProcessor": false, + "RelativeOrientationSensor": false, + "RemotePlayback": false, + "removeEventListener": false, + "ReportBody": false, + "reportError": false, + "ReportingObserver": false, + "Request": false, + "requestAnimationFrame": false, + "requestIdleCallback": false, + "resizeBy": false, + "ResizeObserver": false, + "ResizeObserverEntry": false, + "ResizeObserverSize": false, + "resizeTo": false, + "Response": false, + "RestrictionTarget": false, + "RTCCertificate": false, + "RTCDataChannel": false, + "RTCDataChannelEvent": false, + "RTCDtlsTransport": false, + "RTCDTMFSender": false, + "RTCDTMFToneChangeEvent": false, + "RTCEncodedAudioFrame": false, + "RTCEncodedVideoFrame": false, + "RTCError": false, + "RTCErrorEvent": false, + "RTCIceCandidate": false, + "RTCIceTransport": false, + "RTCPeerConnection": false, + "RTCPeerConnectionIceErrorEvent": false, + "RTCPeerConnectionIceEvent": false, + "RTCRtpReceiver": false, + "RTCRtpScriptTransform": false, + "RTCRtpSender": false, + "RTCRtpTransceiver": false, + "RTCSctpTransport": false, + "RTCSessionDescription": false, + "RTCStatsReport": false, + "RTCTrackEvent": false, + "sampleRate": false, + "scheduler": false, + "Scheduler": false, + "Scheduling": false, + "screen": false, + "Screen": false, + "ScreenDetailed": false, + "ScreenDetails": false, + "screenLeft": false, + "ScreenOrientation": false, + "screenTop": false, + "screenX": false, + "screenY": false, + "ScriptProcessorNode": false, + "scroll": false, + "scrollbars": false, + "scrollBy": false, + "ScrollTimeline": false, + "scrollTo": false, + "scrollX": false, + "scrollY": false, + "SecurityPolicyViolationEvent": false, + "Selection": false, + "self": false, + "Sensor": false, + "SensorErrorEvent": false, + "Serial": false, + "SerialPort": false, + "ServiceWorker": false, + "ServiceWorkerContainer": false, + "ServiceWorkerRegistration": false, + "sessionStorage": false, + "setInterval": false, + "setTimeout": false, + "ShadowRoot": false, + "sharedStorage": false, + "SharedStorage": false, + "SharedStorageAppendMethod": false, + "SharedStorageClearMethod": false, + "SharedStorageDeleteMethod": false, + "SharedStorageModifierMethod": false, + "SharedStorageSetMethod": false, + "SharedStorageWorklet": false, + "SharedWorker": false, + "showDirectoryPicker": false, + "showOpenFilePicker": false, + "showSaveFilePicker": false, + "SnapEvent": false, + "SourceBuffer": false, + "SourceBufferList": false, + "SpeechGrammar": false, + "SpeechGrammarList": false, + "SpeechRecognition": false, + "SpeechRecognitionErrorEvent": false, + "SpeechRecognitionEvent": false, + "SpeechRecognitionPhrase": false, + "speechSynthesis": false, + "SpeechSynthesis": false, + "SpeechSynthesisErrorEvent": false, + "SpeechSynthesisEvent": false, + "SpeechSynthesisUtterance": false, + "SpeechSynthesisVoice": false, + "StaticRange": false, + "status": false, + "statusbar": false, + "StereoPannerNode": false, + "stop": false, + "Storage": false, + "StorageBucket": false, + "StorageBucketManager": false, + "StorageEvent": false, + "StorageManager": false, + "structuredClone": false, + "styleMedia": false, + "StylePropertyMap": false, + "StylePropertyMapReadOnly": false, + "StyleSheet": false, + "StyleSheetList": false, + "SubmitEvent": false, + "Subscriber": false, + "SubtleCrypto": false, + "Summarizer": false, + "SuppressedError": false, + "SVGAElement": false, + "SVGAngle": false, + "SVGAnimatedAngle": false, + "SVGAnimatedBoolean": false, + "SVGAnimatedEnumeration": false, + "SVGAnimatedInteger": false, + "SVGAnimatedLength": false, + "SVGAnimatedLengthList": false, + "SVGAnimatedNumber": false, + "SVGAnimatedNumberList": false, + "SVGAnimatedPreserveAspectRatio": false, + "SVGAnimatedRect": false, + "SVGAnimatedString": false, + "SVGAnimatedTransformList": false, + "SVGAnimateElement": false, + "SVGAnimateMotionElement": false, + "SVGAnimateTransformElement": false, + "SVGAnimationElement": false, + "SVGCircleElement": false, + "SVGClipPathElement": false, + "SVGComponentTransferFunctionElement": false, + "SVGDefsElement": false, + "SVGDescElement": false, + "SVGElement": false, + "SVGEllipseElement": false, + "SVGFEBlendElement": false, + "SVGFEColorMatrixElement": false, + "SVGFEComponentTransferElement": false, + "SVGFECompositeElement": false, + "SVGFEConvolveMatrixElement": false, + "SVGFEDiffuseLightingElement": false, + "SVGFEDisplacementMapElement": false, + "SVGFEDistantLightElement": false, + "SVGFEDropShadowElement": false, + "SVGFEFloodElement": false, + "SVGFEFuncAElement": false, + "SVGFEFuncBElement": false, + "SVGFEFuncGElement": false, + "SVGFEFuncRElement": false, + "SVGFEGaussianBlurElement": false, + "SVGFEImageElement": false, + "SVGFEMergeElement": false, + "SVGFEMergeNodeElement": false, + "SVGFEMorphologyElement": false, + "SVGFEOffsetElement": false, + "SVGFEPointLightElement": false, + "SVGFESpecularLightingElement": false, + "SVGFESpotLightElement": false, + "SVGFETileElement": false, + "SVGFETurbulenceElement": false, + "SVGFilterElement": false, + "SVGForeignObjectElement": false, + "SVGGElement": false, + "SVGGeometryElement": false, + "SVGGradientElement": false, + "SVGGraphicsElement": false, + "SVGImageElement": false, + "SVGLength": false, + "SVGLengthList": false, + "SVGLinearGradientElement": false, + "SVGLineElement": false, + "SVGMarkerElement": false, + "SVGMaskElement": false, + "SVGMatrix": false, + "SVGMetadataElement": false, + "SVGMPathElement": false, + "SVGNumber": false, + "SVGNumberList": false, + "SVGPathElement": false, + "SVGPatternElement": false, + "SVGPoint": false, + "SVGPointList": false, + "SVGPolygonElement": false, + "SVGPolylineElement": false, + "SVGPreserveAspectRatio": false, + "SVGRadialGradientElement": false, + "SVGRect": false, + "SVGRectElement": false, + "SVGScriptElement": false, + "SVGSetElement": false, + "SVGStopElement": false, + "SVGStringList": false, + "SVGStyleElement": false, + "SVGSVGElement": false, + "SVGSwitchElement": false, + "SVGSymbolElement": false, + "SVGTextContentElement": false, + "SVGTextElement": false, + "SVGTextPathElement": false, + "SVGTextPositioningElement": false, + "SVGTitleElement": false, + "SVGTransform": false, + "SVGTransformList": false, + "SVGTSpanElement": false, + "SVGUnitTypes": false, + "SVGUseElement": false, + "SVGViewElement": false, + "SyncManager": false, + "TaskAttributionTiming": false, + "TaskController": false, + "TaskPriorityChangeEvent": false, + "TaskSignal": false, + "TEMPORARY": false, + "Text": false, + "TextDecoder": false, + "TextDecoderStream": false, + "TextEncoder": false, + "TextEncoderStream": false, + "TextEvent": false, + "TextFormat": false, + "TextFormatUpdateEvent": false, + "TextMetrics": false, + "TextTrack": false, + "TextTrackCue": false, + "TextTrackCueList": false, + "TextTrackList": false, + "TextUpdateEvent": false, + "TimeEvent": false, + "TimeRanges": false, + "ToggleEvent": false, + "toolbar": false, + "top": false, + "Touch": false, + "TouchEvent": false, + "TouchList": false, + "TrackEvent": false, + "TransformStream": false, + "TransformStreamDefaultController": false, + "TransitionEvent": false, + "Translator": false, + "TreeWalker": false, + "TrustedHTML": false, + "TrustedScript": false, + "TrustedScriptURL": false, + "TrustedTypePolicy": false, + "TrustedTypePolicyFactory": false, + "trustedTypes": false, + "UIEvent": false, + "URL": false, + "URLPattern": false, + "URLSearchParams": false, + "USB": false, + "USBAlternateInterface": false, + "USBConfiguration": false, + "USBConnectionEvent": false, + "USBDevice": false, + "USBEndpoint": false, + "USBInterface": false, + "USBInTransferResult": false, + "USBIsochronousInTransferPacket": false, + "USBIsochronousInTransferResult": false, + "USBIsochronousOutTransferPacket": false, + "USBIsochronousOutTransferResult": false, + "USBOutTransferResult": false, + "UserActivation": false, + "ValidityState": false, + "VideoColorSpace": false, + "VideoDecoder": false, + "VideoEncoder": false, + "VideoFrame": false, + "VideoPlaybackQuality": false, + "viewport": false, + "Viewport": false, + "ViewTimeline": false, + "ViewTransition": false, + "ViewTransitionTypeSet": false, + "VirtualKeyboard": false, + "VirtualKeyboardGeometryChangeEvent": false, + "VisibilityStateEntry": false, + "visualViewport": false, + "VisualViewport": false, + "VTTCue": false, + "VTTRegion": false, + "WakeLock": false, + "WakeLockSentinel": false, + "WaveShaperNode": false, + "WebAssembly": false, + "WebGL2RenderingContext": false, + "WebGLActiveInfo": false, + "WebGLBuffer": false, + "WebGLContextEvent": false, + "WebGLFramebuffer": false, + "WebGLObject": false, + "WebGLProgram": false, + "WebGLQuery": false, + "WebGLRenderbuffer": false, + "WebGLRenderingContext": false, + "WebGLSampler": false, + "WebGLShader": false, + "WebGLShaderPrecisionFormat": false, + "WebGLSync": false, + "WebGLTexture": false, + "WebGLTransformFeedback": false, + "WebGLUniformLocation": false, + "WebGLVertexArrayObject": false, + "WebSocket": false, + "WebSocketError": false, + "WebSocketStream": false, + "WebTransport": false, + "WebTransportBidirectionalStream": false, + "WebTransportDatagramDuplexStream": false, + "WebTransportError": false, + "WebTransportReceiveStream": false, + "WebTransportSendStream": false, + "WGSLLanguageFeatures": false, + "WheelEvent": false, + "when": false, + "window": false, + "Window": false, + "WindowControlsOverlay": false, + "WindowControlsOverlayGeometryChangeEvent": false, + "Worker": false, + "Worklet": false, + "WorkletGlobalScope": false, + "WritableStream": false, + "WritableStreamDefaultController": false, + "WritableStreamDefaultWriter": false, + "XMLDocument": false, + "XMLHttpRequest": false, + "XMLHttpRequestEventTarget": false, + "XMLHttpRequestUpload": false, + "XMLSerializer": false, + "XPathEvaluator": false, + "XPathExpression": false, + "XPathResult": false, + "XRAnchor": false, + "XRAnchorSet": false, + "XRBoundedReferenceSpace": false, + "XRCamera": false, + "XRCPUDepthInformation": false, + "XRDepthInformation": false, + "XRDOMOverlayState": false, + "XRFrame": false, + "XRHand": false, + "XRHitTestResult": false, + "XRHitTestSource": false, + "XRInputSource": false, + "XRInputSourceArray": false, + "XRInputSourceEvent": false, + "XRInputSourcesChangeEvent": false, + "XRJointPose": false, + "XRJointSpace": false, + "XRLayer": false, + "XRLightEstimate": false, + "XRLightProbe": false, + "XRPose": false, + "XRRay": false, + "XRReferenceSpace": false, + "XRReferenceSpaceEvent": false, + "XRRenderState": false, + "XRRigidTransform": false, + "XRSession": false, + "XRSessionEvent": false, + "XRSpace": false, + "XRSystem": false, + "XRTransientInputHitTestResult": false, + "XRTransientInputHitTestSource": false, + "XRView": false, + "XRViewerPose": false, + "XRViewport": false, + "XRWebGLBinding": false, + "XRWebGLDepthInformation": false, + "XRWebGLLayer": false, + "XSLTProcessor": false + } + }, + "errors": [ + { + "messageId": "impliedEval" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-implied-eval > invalid + +```js +window.execScript('foo') +``` + +```json +{ + "languageOptions": { + "globals": { + "AbortController": false, + "AbortSignal": false, + "AbsoluteOrientationSensor": false, + "AbstractRange": false, + "Accelerometer": false, + "addEventListener": false, + "ai": false, + "AI": false, + "AICreateMonitor": false, + "AITextSession": false, + "alert": false, + "AnalyserNode": false, + "Animation": false, + "AnimationEffect": false, + "AnimationEvent": false, + "AnimationPlaybackEvent": false, + "AnimationTimeline": false, + "AsyncDisposableStack": false, + "atob": false, + "Attr": false, + "Audio": false, + "AudioBuffer": false, + "AudioBufferSourceNode": false, + "AudioContext": false, + "AudioData": false, + "AudioDecoder": false, + "AudioDestinationNode": false, + "AudioEncoder": false, + "AudioListener": false, + "AudioNode": false, + "AudioParam": false, + "AudioParamMap": false, + "AudioProcessingEvent": false, + "AudioScheduledSourceNode": false, + "AudioSinkInfo": false, + "AudioWorklet": false, + "AudioWorkletGlobalScope": false, + "AudioWorkletNode": false, + "AudioWorkletProcessor": false, + "AuthenticatorAssertionResponse": false, + "AuthenticatorAttestationResponse": false, + "AuthenticatorResponse": false, + "BackgroundFetchManager": false, + "BackgroundFetchRecord": false, + "BackgroundFetchRegistration": false, + "BarcodeDetector": false, + "BarProp": false, + "BaseAudioContext": false, + "BatteryManager": false, + "BeforeUnloadEvent": false, + "BiquadFilterNode": false, + "Blob": false, + "BlobEvent": false, + "Bluetooth": false, + "BluetoothCharacteristicProperties": false, + "BluetoothDevice": false, + "BluetoothRemoteGATTCharacteristic": false, + "BluetoothRemoteGATTDescriptor": false, + "BluetoothRemoteGATTServer": false, + "BluetoothRemoteGATTService": false, + "BluetoothUUID": false, + "blur": false, + "BroadcastChannel": false, + "BrowserCaptureMediaStreamTrack": false, + "btoa": false, + "ByteLengthQueuingStrategy": false, + "Cache": false, + "caches": false, + "CacheStorage": false, + "cancelAnimationFrame": false, + "cancelIdleCallback": false, + "CanvasCaptureMediaStream": false, + "CanvasCaptureMediaStreamTrack": false, + "CanvasGradient": false, + "CanvasPattern": false, + "CanvasRenderingContext2D": false, + "CaptureController": false, + "CaretPosition": false, + "CDATASection": false, + "ChannelMergerNode": false, + "ChannelSplitterNode": false, + "ChapterInformation": false, + "CharacterBoundsUpdateEvent": false, + "CharacterData": false, + "clearInterval": false, + "clearTimeout": false, + "clientInformation": false, + "Clipboard": false, + "ClipboardChangeEvent": false, + "ClipboardEvent": false, + "ClipboardItem": false, + "close": false, + "closed": false, + "CloseEvent": false, + "CloseWatcher": false, + "CommandEvent": false, + "Comment": false, + "CompositionEvent": false, + "CompressionStream": false, + "confirm": false, + "console": false, + "ConstantSourceNode": false, + "ContentVisibilityAutoStateChangeEvent": false, + "ConvolverNode": false, + "CookieChangeEvent": false, + "CookieDeprecationLabel": false, + "cookieStore": false, + "CookieStore": false, + "CookieStoreManager": false, + "CountQueuingStrategy": false, + "createImageBitmap": false, + "CreateMonitor": false, + "Credential": false, + "credentialless": false, + "CredentialsContainer": false, + "CropTarget": false, + "crossOriginIsolated": false, + "crypto": false, + "Crypto": false, + "CryptoKey": false, + "CSPViolationReportBody": false, + "CSS": false, + "CSSAnimation": false, + "CSSConditionRule": false, + "CSSContainerRule": false, + "CSSCounterStyleRule": false, + "CSSFontFaceRule": false, + "CSSFontFeatureValuesRule": false, + "CSSFontPaletteValuesRule": false, + "CSSFunctionDeclarations": false, + "CSSFunctionDescriptors": false, + "CSSFunctionRule": false, + "CSSGroupingRule": false, + "CSSImageValue": false, + "CSSImportRule": false, + "CSSKeyframeRule": false, + "CSSKeyframesRule": false, + "CSSKeywordValue": false, + "CSSLayerBlockRule": false, + "CSSLayerStatementRule": false, + "CSSMarginRule": false, + "CSSMathClamp": false, + "CSSMathInvert": false, + "CSSMathMax": false, + "CSSMathMin": false, + "CSSMathNegate": false, + "CSSMathProduct": false, + "CSSMathSum": false, + "CSSMathValue": false, + "CSSMatrixComponent": false, + "CSSMediaRule": false, + "CSSNamespaceRule": false, + "CSSNestedDeclarations": false, + "CSSNumericArray": false, + "CSSNumericValue": false, + "CSSPageDescriptors": false, + "CSSPageRule": false, + "CSSPerspective": false, + "CSSPositionTryDescriptors": false, + "CSSPositionTryRule": false, + "CSSPositionValue": false, + "CSSPropertyRule": false, + "CSSRotate": false, + "CSSRule": false, + "CSSRuleList": false, + "CSSScale": false, + "CSSScopeRule": false, + "CSSSkew": false, + "CSSSkewX": false, + "CSSSkewY": false, + "CSSStartingStyleRule": false, + "CSSStyleDeclaration": false, + "CSSStyleRule": false, + "CSSStyleSheet": false, + "CSSStyleValue": false, + "CSSSupportsRule": false, + "CSSTransformComponent": false, + "CSSTransformValue": false, + "CSSTransition": false, + "CSSTranslate": false, + "CSSUnitValue": false, + "CSSUnparsedValue": false, + "CSSVariableReferenceValue": false, + "CSSViewTransitionRule": false, + "currentFrame": false, + "currentTime": false, + "CustomElementRegistry": false, + "customElements": false, + "CustomEvent": false, + "CustomStateSet": false, + "DataTransfer": false, + "DataTransferItem": false, + "DataTransferItemList": false, + "DecompressionStream": false, + "DelayNode": false, + "DelegatedInkTrailPresenter": false, + "DeviceMotionEvent": false, + "DeviceMotionEventAcceleration": false, + "DeviceMotionEventRotationRate": false, + "DeviceOrientationEvent": false, + "devicePixelRatio": false, + "DevicePosture": false, + "DigitalCredential": false, + "dispatchEvent": false, + "DisposableStack": false, + "document": false, + "Document": false, + "DocumentFragment": false, + "documentPictureInPicture": false, + "DocumentPictureInPicture": false, + "DocumentPictureInPictureEvent": false, + "DocumentTimeline": false, + "DocumentType": false, + "DOMError": false, + "DOMException": false, + "DOMImplementation": false, + "DOMMatrix": false, + "DOMMatrixReadOnly": false, + "DOMParser": false, + "DOMPoint": false, + "DOMPointReadOnly": false, + "DOMQuad": false, + "DOMRect": false, + "DOMRectList": false, + "DOMRectReadOnly": false, + "DOMStringList": false, + "DOMStringMap": false, + "DOMTokenList": false, + "DragEvent": false, + "DynamicsCompressorNode": false, + "EditContext": false, + "Element": false, + "ElementInternals": false, + "EncodedAudioChunk": false, + "EncodedVideoChunk": false, + "ErrorEvent": false, + "event": false, + "Event": false, + "EventCounts": false, + "EventSource": false, + "EventTarget": false, + "external": false, + "External": false, + "EyeDropper": false, + "FeaturePolicy": false, + "FederatedCredential": false, + "fence": false, + "Fence": false, + "FencedFrameConfig": false, + "fetch": false, + "fetchLater": false, + "FetchLaterResult": false, + "File": false, + "FileList": false, + "FileReader": false, + "FileSystem": false, + "FileSystemDirectoryEntry": false, + "FileSystemDirectoryHandle": false, + "FileSystemDirectoryReader": false, + "FileSystemEntry": false, + "FileSystemFileEntry": false, + "FileSystemFileHandle": false, + "FileSystemHandle": false, + "FileSystemObserver": false, + "FileSystemWritableFileStream": false, + "find": false, + "focus": false, + "FocusEvent": false, + "FontData": false, + "FontFace": false, + "FontFaceSet": false, + "FontFaceSetLoadEvent": false, + "FormData": false, + "FormDataEvent": false, + "FragmentDirective": false, + "frameElement": false, + "frames": false, + "GainNode": false, + "Gamepad": false, + "GamepadAxisMoveEvent": false, + "GamepadButton": false, + "GamepadButtonEvent": false, + "GamepadEvent": false, + "GamepadHapticActuator": false, + "GamepadPose": false, + "Geolocation": false, + "GeolocationCoordinates": false, + "GeolocationPosition": false, + "GeolocationPositionError": false, + "getComputedStyle": false, + "getScreenDetails": false, + "getSelection": false, + "GPU": false, + "GPUAdapter": false, + "GPUAdapterInfo": false, + "GPUBindGroup": false, + "GPUBindGroupLayout": false, + "GPUBuffer": false, + "GPUBufferUsage": false, + "GPUCanvasContext": false, + "GPUColorWrite": false, + "GPUCommandBuffer": false, + "GPUCommandEncoder": false, + "GPUCompilationInfo": false, + "GPUCompilationMessage": false, + "GPUComputePassEncoder": false, + "GPUComputePipeline": false, + "GPUDevice": false, + "GPUDeviceLostInfo": false, + "GPUError": false, + "GPUExternalTexture": false, + "GPUInternalError": false, + "GPUMapMode": false, + "GPUOutOfMemoryError": false, + "GPUPipelineError": false, + "GPUPipelineLayout": false, + "GPUQuerySet": false, + "GPUQueue": false, + "GPURenderBundle": false, + "GPURenderBundleEncoder": false, + "GPURenderPassEncoder": false, + "GPURenderPipeline": false, + "GPUSampler": false, + "GPUShaderModule": false, + "GPUShaderStage": false, + "GPUSupportedFeatures": false, + "GPUSupportedLimits": false, + "GPUTexture": false, + "GPUTextureUsage": false, + "GPUTextureView": false, + "GPUUncapturedErrorEvent": false, + "GPUValidationError": false, + "GravitySensor": false, + "Gyroscope": false, + "HashChangeEvent": false, + "Headers": false, + "HID": false, + "HIDConnectionEvent": false, + "HIDDevice": false, + "HIDInputReportEvent": false, + "Highlight": false, + "HighlightRegistry": false, + "history": false, + "History": false, + "HTMLAllCollection": false, + "HTMLAnchorElement": false, + "HTMLAreaElement": false, + "HTMLAudioElement": false, + "HTMLBaseElement": false, + "HTMLBodyElement": false, + "HTMLBRElement": false, + "HTMLButtonElement": false, + "HTMLCanvasElement": false, + "HTMLCollection": false, + "HTMLDataElement": false, + "HTMLDataListElement": false, + "HTMLDetailsElement": false, + "HTMLDialogElement": false, + "HTMLDirectoryElement": false, + "HTMLDivElement": false, + "HTMLDListElement": false, + "HTMLDocument": false, + "HTMLElement": false, + "HTMLEmbedElement": false, + "HTMLFencedFrameElement": false, + "HTMLFieldSetElement": false, + "HTMLFontElement": false, + "HTMLFormControlsCollection": false, + "HTMLFormElement": false, + "HTMLFrameElement": false, + "HTMLFrameSetElement": false, + "HTMLHeadElement": false, + "HTMLHeadingElement": false, + "HTMLHRElement": false, + "HTMLHtmlElement": false, + "HTMLIFrameElement": false, + "HTMLImageElement": false, + "HTMLInputElement": false, + "HTMLLabelElement": false, + "HTMLLegendElement": false, + "HTMLLIElement": false, + "HTMLLinkElement": false, + "HTMLMapElement": false, + "HTMLMarqueeElement": false, + "HTMLMediaElement": false, + "HTMLMenuElement": false, + "HTMLMetaElement": false, + "HTMLMeterElement": false, + "HTMLModElement": false, + "HTMLObjectElement": false, + "HTMLOListElement": false, + "HTMLOptGroupElement": false, + "HTMLOptionElement": false, + "HTMLOptionsCollection": false, + "HTMLOutputElement": false, + "HTMLParagraphElement": false, + "HTMLParamElement": false, + "HTMLPictureElement": false, + "HTMLPreElement": false, + "HTMLProgressElement": false, + "HTMLQuoteElement": false, + "HTMLScriptElement": false, + "HTMLSelectedContentElement": false, + "HTMLSelectElement": false, + "HTMLSlotElement": false, + "HTMLSourceElement": false, + "HTMLSpanElement": false, + "HTMLStyleElement": false, + "HTMLTableCaptionElement": false, + "HTMLTableCellElement": false, + "HTMLTableColElement": false, + "HTMLTableElement": false, + "HTMLTableRowElement": false, + "HTMLTableSectionElement": false, + "HTMLTemplateElement": false, + "HTMLTextAreaElement": false, + "HTMLTimeElement": false, + "HTMLTitleElement": false, + "HTMLTrackElement": false, + "HTMLUListElement": false, + "HTMLUnknownElement": false, + "HTMLVideoElement": false, + "IDBCursor": false, + "IDBCursorWithValue": false, + "IDBDatabase": false, + "IDBFactory": false, + "IDBIndex": false, + "IDBKeyRange": false, + "IDBObjectStore": false, + "IDBOpenDBRequest": false, + "IDBRecord": false, + "IDBRequest": false, + "IDBTransaction": false, + "IDBVersionChangeEvent": false, + "IdentityCredential": false, + "IdentityCredentialError": false, + "IdentityProvider": false, + "IdleDeadline": false, + "IdleDetector": false, + "IIRFilterNode": false, + "Image": false, + "ImageBitmap": false, + "ImageBitmapRenderingContext": false, + "ImageCapture": false, + "ImageData": false, + "ImageDecoder": false, + "ImageTrack": false, + "ImageTrackList": false, + "indexedDB": false, + "Ink": false, + "innerHeight": false, + "innerWidth": false, + "InputDeviceCapabilities": false, + "InputDeviceInfo": false, + "InputEvent": false, + "IntegrityViolationReportBody": false, + "InterestEvent": false, + "IntersectionObserver": false, + "IntersectionObserverEntry": false, + "isSecureContext": false, + "Keyboard": false, + "KeyboardEvent": false, + "KeyboardLayoutMap": false, + "KeyframeEffect": false, + "LanguageDetector": false, + "LargestContentfulPaint": false, + "LaunchParams": false, + "launchQueue": false, + "LaunchQueue": false, + "LayoutShift": false, + "LayoutShiftAttribution": false, + "length": false, + "LinearAccelerationSensor": false, + "localStorage": false, + "location": true, + "Location": false, + "locationbar": false, + "Lock": false, + "LockManager": false, + "matchMedia": false, + "MathMLElement": false, + "MediaCapabilities": false, + "MediaCapabilitiesInfo": false, + "MediaDeviceInfo": false, + "MediaDevices": false, + "MediaElementAudioSourceNode": false, + "MediaEncryptedEvent": false, + "MediaError": false, + "MediaKeyError": false, + "MediaKeyMessageEvent": false, + "MediaKeys": false, + "MediaKeySession": false, + "MediaKeyStatusMap": false, + "MediaKeySystemAccess": false, + "MediaList": false, + "MediaMetadata": false, + "MediaQueryList": false, + "MediaQueryListEvent": false, + "MediaRecorder": false, + "MediaRecorderErrorEvent": false, + "MediaSession": false, + "MediaSource": false, + "MediaSourceHandle": false, + "MediaStream": false, + "MediaStreamAudioDestinationNode": false, + "MediaStreamAudioSourceNode": false, + "MediaStreamEvent": false, + "MediaStreamTrack": false, + "MediaStreamTrackAudioSourceNode": false, + "MediaStreamTrackAudioStats": false, + "MediaStreamTrackEvent": false, + "MediaStreamTrackGenerator": false, + "MediaStreamTrackProcessor": false, + "MediaStreamTrackVideoStats": false, + "menubar": false, + "MessageChannel": false, + "MessageEvent": false, + "MessagePort": false, + "MIDIAccess": false, + "MIDIConnectionEvent": false, + "MIDIInput": false, + "MIDIInputMap": false, + "MIDIMessageEvent": false, + "MIDIOutput": false, + "MIDIOutputMap": false, + "MIDIPort": false, + "MimeType": false, + "MimeTypeArray": false, + "model": false, + "ModelGenericSession": false, + "ModelManager": false, + "MouseEvent": false, + "moveBy": false, + "moveTo": false, + "MutationEvent": false, + "MutationObserver": false, + "MutationRecord": false, + "name": false, + "NamedNodeMap": false, + "NavigateEvent": false, + "navigation": false, + "Navigation": false, + "NavigationActivation": false, + "NavigationCurrentEntryChangeEvent": false, + "NavigationDestination": false, + "NavigationHistoryEntry": false, + "NavigationPrecommitController": false, + "NavigationPreloadManager": false, + "NavigationTransition": false, + "navigator": false, + "Navigator": false, + "NavigatorLogin": false, + "NavigatorManagedData": false, + "NavigatorUAData": false, + "NetworkInformation": false, + "Node": false, + "NodeFilter": false, + "NodeIterator": false, + "NodeList": false, + "Notification": false, + "NotifyPaintEvent": false, + "NotRestoredReasonDetails": false, + "NotRestoredReasons": false, + "Observable": false, + "OfflineAudioCompletionEvent": false, + "OfflineAudioContext": false, + "offscreenBuffering": false, + "OffscreenCanvas": false, + "OffscreenCanvasRenderingContext2D": false, + "onabort": true, + "onafterprint": true, + "onanimationcancel": true, + "onanimationend": true, + "onanimationiteration": true, + "onanimationstart": true, + "onappinstalled": true, + "onauxclick": true, + "onbeforeinput": true, + "onbeforeinstallprompt": true, + "onbeforematch": true, + "onbeforeprint": true, + "onbeforetoggle": true, + "onbeforeunload": true, + "onbeforexrselect": true, + "onblur": true, + "oncancel": true, + "oncanplay": true, + "oncanplaythrough": true, + "onchange": true, + "onclick": true, + "onclose": true, + "oncommand": true, + "oncontentvisibilityautostatechange": true, + "oncontextlost": true, + "oncontextmenu": true, + "oncontextrestored": true, + "oncopy": true, + "oncuechange": true, + "oncut": true, + "ondblclick": true, + "ondevicemotion": true, + "ondeviceorientation": true, + "ondeviceorientationabsolute": true, + "ondrag": true, + "ondragend": true, + "ondragenter": true, + "ondragleave": true, + "ondragover": true, + "ondragstart": true, + "ondrop": true, + "ondurationchange": true, + "onemptied": true, + "onended": true, + "onerror": true, + "onfocus": true, + "onformdata": true, + "ongamepadconnected": true, + "ongamepaddisconnected": true, + "ongotpointercapture": true, + "onhashchange": true, + "oninput": true, + "oninvalid": true, + "onkeydown": true, + "onkeypress": true, + "onkeyup": true, + "onlanguagechange": true, + "onload": true, + "onloadeddata": true, + "onloadedmetadata": true, + "onloadstart": true, + "onlostpointercapture": true, + "onmessage": true, + "onmessageerror": true, + "onmousedown": true, + "onmouseenter": true, + "onmouseleave": true, + "onmousemove": true, + "onmouseout": true, + "onmouseover": true, + "onmouseup": true, + "onmousewheel": true, + "onoffline": true, + "ononline": true, + "onpagehide": true, + "onpagereveal": true, + "onpageshow": true, + "onpageswap": true, + "onpaste": true, + "onpause": true, + "onplay": true, + "onplaying": true, + "onpointercancel": true, + "onpointerdown": true, + "onpointerenter": true, + "onpointerleave": true, + "onpointermove": true, + "onpointerout": true, + "onpointerover": true, + "onpointerrawupdate": true, + "onpointerup": true, + "onpopstate": true, + "onprogress": true, + "onratechange": true, + "onrejectionhandled": true, + "onreset": true, + "onresize": true, + "onscroll": true, + "onscrollend": true, + "onscrollsnapchange": true, + "onscrollsnapchanging": true, + "onsearch": true, + "onsecuritypolicyviolation": true, + "onseeked": true, + "onseeking": true, + "onselect": true, + "onselectionchange": true, + "onselectstart": true, + "onslotchange": true, + "onstalled": true, + "onstorage": true, + "onsubmit": true, + "onsuspend": true, + "ontimeupdate": true, + "ontoggle": true, + "ontransitioncancel": true, + "ontransitionend": true, + "ontransitionrun": true, + "ontransitionstart": true, + "onunhandledrejection": true, + "onunload": true, + "onvolumechange": true, + "onwaiting": true, + "onwheel": true, + "open": false, + "opener": false, + "Option": false, + "OrientationSensor": false, + "origin": false, + "originAgentCluster": false, + "OscillatorNode": false, + "OTPCredential": false, + "outerHeight": false, + "outerWidth": false, + "OverconstrainedError": false, + "PageRevealEvent": false, + "PageSwapEvent": false, + "PageTransitionEvent": false, + "pageXOffset": false, + "pageYOffset": false, + "PannerNode": false, + "parent": false, + "PasswordCredential": false, + "Path2D": false, + "PaymentAddress": false, + "PaymentManager": false, + "PaymentMethodChangeEvent": false, + "PaymentRequest": false, + "PaymentRequestUpdateEvent": false, + "PaymentResponse": false, + "performance": false, + "Performance": false, + "PerformanceElementTiming": false, + "PerformanceEntry": false, + "PerformanceEventTiming": false, + "PerformanceLongAnimationFrameTiming": false, + "PerformanceLongTaskTiming": false, + "PerformanceMark": false, + "PerformanceMeasure": false, + "PerformanceNavigation": false, + "PerformanceNavigationTiming": false, + "PerformanceObserver": false, + "PerformanceObserverEntryList": false, + "PerformancePaintTiming": false, + "PerformanceResourceTiming": false, + "PerformanceScriptTiming": false, + "PerformanceServerTiming": false, + "PerformanceTiming": false, + "PeriodicSyncManager": false, + "PeriodicWave": false, + "Permissions": false, + "PermissionStatus": false, + "PERSISTENT": false, + "personalbar": false, + "PictureInPictureEvent": false, + "PictureInPictureWindow": false, + "Plugin": false, + "PluginArray": false, + "PointerEvent": false, + "PopStateEvent": false, + "postMessage": false, + "Presentation": false, + "PresentationAvailability": false, + "PresentationConnection": false, + "PresentationConnectionAvailableEvent": false, + "PresentationConnectionCloseEvent": false, + "PresentationConnectionList": false, + "PresentationReceiver": false, + "PresentationRequest": false, + "PressureObserver": false, + "PressureRecord": false, + "print": false, + "ProcessingInstruction": false, + "Profiler": false, + "ProgressEvent": false, + "PromiseRejectionEvent": false, + "prompt": false, + "ProtectedAudience": false, + "PublicKeyCredential": false, + "PushManager": false, + "PushSubscription": false, + "PushSubscriptionOptions": false, + "queryLocalFonts": false, + "queueMicrotask": false, + "QuotaExceededError": false, + "RadioNodeList": false, + "Range": false, + "ReadableByteStreamController": false, + "ReadableStream": false, + "ReadableStreamBYOBReader": false, + "ReadableStreamBYOBRequest": false, + "ReadableStreamDefaultController": false, + "ReadableStreamDefaultReader": false, + "registerProcessor": false, + "RelativeOrientationSensor": false, + "RemotePlayback": false, + "removeEventListener": false, + "ReportBody": false, + "reportError": false, + "ReportingObserver": false, + "Request": false, + "requestAnimationFrame": false, + "requestIdleCallback": false, + "resizeBy": false, + "ResizeObserver": false, + "ResizeObserverEntry": false, + "ResizeObserverSize": false, + "resizeTo": false, + "Response": false, + "RestrictionTarget": false, + "RTCCertificate": false, + "RTCDataChannel": false, + "RTCDataChannelEvent": false, + "RTCDtlsTransport": false, + "RTCDTMFSender": false, + "RTCDTMFToneChangeEvent": false, + "RTCEncodedAudioFrame": false, + "RTCEncodedVideoFrame": false, + "RTCError": false, + "RTCErrorEvent": false, + "RTCIceCandidate": false, + "RTCIceTransport": false, + "RTCPeerConnection": false, + "RTCPeerConnectionIceErrorEvent": false, + "RTCPeerConnectionIceEvent": false, + "RTCRtpReceiver": false, + "RTCRtpScriptTransform": false, + "RTCRtpSender": false, + "RTCRtpTransceiver": false, + "RTCSctpTransport": false, + "RTCSessionDescription": false, + "RTCStatsReport": false, + "RTCTrackEvent": false, + "sampleRate": false, + "scheduler": false, + "Scheduler": false, + "Scheduling": false, + "screen": false, + "Screen": false, + "ScreenDetailed": false, + "ScreenDetails": false, + "screenLeft": false, + "ScreenOrientation": false, + "screenTop": false, + "screenX": false, + "screenY": false, + "ScriptProcessorNode": false, + "scroll": false, + "scrollbars": false, + "scrollBy": false, + "ScrollTimeline": false, + "scrollTo": false, + "scrollX": false, + "scrollY": false, + "SecurityPolicyViolationEvent": false, + "Selection": false, + "self": false, + "Sensor": false, + "SensorErrorEvent": false, + "Serial": false, + "SerialPort": false, + "ServiceWorker": false, + "ServiceWorkerContainer": false, + "ServiceWorkerRegistration": false, + "sessionStorage": false, + "setInterval": false, + "setTimeout": false, + "ShadowRoot": false, + "sharedStorage": false, + "SharedStorage": false, + "SharedStorageAppendMethod": false, + "SharedStorageClearMethod": false, + "SharedStorageDeleteMethod": false, + "SharedStorageModifierMethod": false, + "SharedStorageSetMethod": false, + "SharedStorageWorklet": false, + "SharedWorker": false, + "showDirectoryPicker": false, + "showOpenFilePicker": false, + "showSaveFilePicker": false, + "SnapEvent": false, + "SourceBuffer": false, + "SourceBufferList": false, + "SpeechGrammar": false, + "SpeechGrammarList": false, + "SpeechRecognition": false, + "SpeechRecognitionErrorEvent": false, + "SpeechRecognitionEvent": false, + "SpeechRecognitionPhrase": false, + "speechSynthesis": false, + "SpeechSynthesis": false, + "SpeechSynthesisErrorEvent": false, + "SpeechSynthesisEvent": false, + "SpeechSynthesisUtterance": false, + "SpeechSynthesisVoice": false, + "StaticRange": false, + "status": false, + "statusbar": false, + "StereoPannerNode": false, + "stop": false, + "Storage": false, + "StorageBucket": false, + "StorageBucketManager": false, + "StorageEvent": false, + "StorageManager": false, + "structuredClone": false, + "styleMedia": false, + "StylePropertyMap": false, + "StylePropertyMapReadOnly": false, + "StyleSheet": false, + "StyleSheetList": false, + "SubmitEvent": false, + "Subscriber": false, + "SubtleCrypto": false, + "Summarizer": false, + "SuppressedError": false, + "SVGAElement": false, + "SVGAngle": false, + "SVGAnimatedAngle": false, + "SVGAnimatedBoolean": false, + "SVGAnimatedEnumeration": false, + "SVGAnimatedInteger": false, + "SVGAnimatedLength": false, + "SVGAnimatedLengthList": false, + "SVGAnimatedNumber": false, + "SVGAnimatedNumberList": false, + "SVGAnimatedPreserveAspectRatio": false, + "SVGAnimatedRect": false, + "SVGAnimatedString": false, + "SVGAnimatedTransformList": false, + "SVGAnimateElement": false, + "SVGAnimateMotionElement": false, + "SVGAnimateTransformElement": false, + "SVGAnimationElement": false, + "SVGCircleElement": false, + "SVGClipPathElement": false, + "SVGComponentTransferFunctionElement": false, + "SVGDefsElement": false, + "SVGDescElement": false, + "SVGElement": false, + "SVGEllipseElement": false, + "SVGFEBlendElement": false, + "SVGFEColorMatrixElement": false, + "SVGFEComponentTransferElement": false, + "SVGFECompositeElement": false, + "SVGFEConvolveMatrixElement": false, + "SVGFEDiffuseLightingElement": false, + "SVGFEDisplacementMapElement": false, + "SVGFEDistantLightElement": false, + "SVGFEDropShadowElement": false, + "SVGFEFloodElement": false, + "SVGFEFuncAElement": false, + "SVGFEFuncBElement": false, + "SVGFEFuncGElement": false, + "SVGFEFuncRElement": false, + "SVGFEGaussianBlurElement": false, + "SVGFEImageElement": false, + "SVGFEMergeElement": false, + "SVGFEMergeNodeElement": false, + "SVGFEMorphologyElement": false, + "SVGFEOffsetElement": false, + "SVGFEPointLightElement": false, + "SVGFESpecularLightingElement": false, + "SVGFESpotLightElement": false, + "SVGFETileElement": false, + "SVGFETurbulenceElement": false, + "SVGFilterElement": false, + "SVGForeignObjectElement": false, + "SVGGElement": false, + "SVGGeometryElement": false, + "SVGGradientElement": false, + "SVGGraphicsElement": false, + "SVGImageElement": false, + "SVGLength": false, + "SVGLengthList": false, + "SVGLinearGradientElement": false, + "SVGLineElement": false, + "SVGMarkerElement": false, + "SVGMaskElement": false, + "SVGMatrix": false, + "SVGMetadataElement": false, + "SVGMPathElement": false, + "SVGNumber": false, + "SVGNumberList": false, + "SVGPathElement": false, + "SVGPatternElement": false, + "SVGPoint": false, + "SVGPointList": false, + "SVGPolygonElement": false, + "SVGPolylineElement": false, + "SVGPreserveAspectRatio": false, + "SVGRadialGradientElement": false, + "SVGRect": false, + "SVGRectElement": false, + "SVGScriptElement": false, + "SVGSetElement": false, + "SVGStopElement": false, + "SVGStringList": false, + "SVGStyleElement": false, + "SVGSVGElement": false, + "SVGSwitchElement": false, + "SVGSymbolElement": false, + "SVGTextContentElement": false, + "SVGTextElement": false, + "SVGTextPathElement": false, + "SVGTextPositioningElement": false, + "SVGTitleElement": false, + "SVGTransform": false, + "SVGTransformList": false, + "SVGTSpanElement": false, + "SVGUnitTypes": false, + "SVGUseElement": false, + "SVGViewElement": false, + "SyncManager": false, + "TaskAttributionTiming": false, + "TaskController": false, + "TaskPriorityChangeEvent": false, + "TaskSignal": false, + "TEMPORARY": false, + "Text": false, + "TextDecoder": false, + "TextDecoderStream": false, + "TextEncoder": false, + "TextEncoderStream": false, + "TextEvent": false, + "TextFormat": false, + "TextFormatUpdateEvent": false, + "TextMetrics": false, + "TextTrack": false, + "TextTrackCue": false, + "TextTrackCueList": false, + "TextTrackList": false, + "TextUpdateEvent": false, + "TimeEvent": false, + "TimeRanges": false, + "ToggleEvent": false, + "toolbar": false, + "top": false, + "Touch": false, + "TouchEvent": false, + "TouchList": false, + "TrackEvent": false, + "TransformStream": false, + "TransformStreamDefaultController": false, + "TransitionEvent": false, + "Translator": false, + "TreeWalker": false, + "TrustedHTML": false, + "TrustedScript": false, + "TrustedScriptURL": false, + "TrustedTypePolicy": false, + "TrustedTypePolicyFactory": false, + "trustedTypes": false, + "UIEvent": false, + "URL": false, + "URLPattern": false, + "URLSearchParams": false, + "USB": false, + "USBAlternateInterface": false, + "USBConfiguration": false, + "USBConnectionEvent": false, + "USBDevice": false, + "USBEndpoint": false, + "USBInterface": false, + "USBInTransferResult": false, + "USBIsochronousInTransferPacket": false, + "USBIsochronousInTransferResult": false, + "USBIsochronousOutTransferPacket": false, + "USBIsochronousOutTransferResult": false, + "USBOutTransferResult": false, + "UserActivation": false, + "ValidityState": false, + "VideoColorSpace": false, + "VideoDecoder": false, + "VideoEncoder": false, + "VideoFrame": false, + "VideoPlaybackQuality": false, + "viewport": false, + "Viewport": false, + "ViewTimeline": false, + "ViewTransition": false, + "ViewTransitionTypeSet": false, + "VirtualKeyboard": false, + "VirtualKeyboardGeometryChangeEvent": false, + "VisibilityStateEntry": false, + "visualViewport": false, + "VisualViewport": false, + "VTTCue": false, + "VTTRegion": false, + "WakeLock": false, + "WakeLockSentinel": false, + "WaveShaperNode": false, + "WebAssembly": false, + "WebGL2RenderingContext": false, + "WebGLActiveInfo": false, + "WebGLBuffer": false, + "WebGLContextEvent": false, + "WebGLFramebuffer": false, + "WebGLObject": false, + "WebGLProgram": false, + "WebGLQuery": false, + "WebGLRenderbuffer": false, + "WebGLRenderingContext": false, + "WebGLSampler": false, + "WebGLShader": false, + "WebGLShaderPrecisionFormat": false, + "WebGLSync": false, + "WebGLTexture": false, + "WebGLTransformFeedback": false, + "WebGLUniformLocation": false, + "WebGLVertexArrayObject": false, + "WebSocket": false, + "WebSocketError": false, + "WebSocketStream": false, + "WebTransport": false, + "WebTransportBidirectionalStream": false, + "WebTransportDatagramDuplexStream": false, + "WebTransportError": false, + "WebTransportReceiveStream": false, + "WebTransportSendStream": false, + "WGSLLanguageFeatures": false, + "WheelEvent": false, + "when": false, + "window": false, + "Window": false, + "WindowControlsOverlay": false, + "WindowControlsOverlayGeometryChangeEvent": false, + "Worker": false, + "Worklet": false, + "WorkletGlobalScope": false, + "WritableStream": false, + "WritableStreamDefaultController": false, + "WritableStreamDefaultWriter": false, + "XMLDocument": false, + "XMLHttpRequest": false, + "XMLHttpRequestEventTarget": false, + "XMLHttpRequestUpload": false, + "XMLSerializer": false, + "XPathEvaluator": false, + "XPathExpression": false, + "XPathResult": false, + "XRAnchor": false, + "XRAnchorSet": false, + "XRBoundedReferenceSpace": false, + "XRCamera": false, + "XRCPUDepthInformation": false, + "XRDepthInformation": false, + "XRDOMOverlayState": false, + "XRFrame": false, + "XRHand": false, + "XRHitTestResult": false, + "XRHitTestSource": false, + "XRInputSource": false, + "XRInputSourceArray": false, + "XRInputSourceEvent": false, + "XRInputSourcesChangeEvent": false, + "XRJointPose": false, + "XRJointSpace": false, + "XRLayer": false, + "XRLightEstimate": false, + "XRLightProbe": false, + "XRPose": false, + "XRRay": false, + "XRReferenceSpace": false, + "XRReferenceSpaceEvent": false, + "XRRenderState": false, + "XRRigidTransform": false, + "XRSession": false, + "XRSessionEvent": false, + "XRSpace": false, + "XRSystem": false, + "XRTransientInputHitTestResult": false, + "XRTransientInputHitTestSource": false, + "XRView": false, + "XRViewerPose": false, + "XRViewport": false, + "XRWebGLBinding": false, + "XRWebGLDepthInformation": false, + "XRWebGLLayer": false, + "XSLTProcessor": false + } + }, + "errors": [ + { + "messageId": "execScript" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-implied-eval > invalid + +```js +window['setTimeout']('foo') +``` + +```json +{ + "languageOptions": { + "globals": { + "AbortController": false, + "AbortSignal": false, + "AbsoluteOrientationSensor": false, + "AbstractRange": false, + "Accelerometer": false, + "addEventListener": false, + "ai": false, + "AI": false, + "AICreateMonitor": false, + "AITextSession": false, + "alert": false, + "AnalyserNode": false, + "Animation": false, + "AnimationEffect": false, + "AnimationEvent": false, + "AnimationPlaybackEvent": false, + "AnimationTimeline": false, + "AsyncDisposableStack": false, + "atob": false, + "Attr": false, + "Audio": false, + "AudioBuffer": false, + "AudioBufferSourceNode": false, + "AudioContext": false, + "AudioData": false, + "AudioDecoder": false, + "AudioDestinationNode": false, + "AudioEncoder": false, + "AudioListener": false, + "AudioNode": false, + "AudioParam": false, + "AudioParamMap": false, + "AudioProcessingEvent": false, + "AudioScheduledSourceNode": false, + "AudioSinkInfo": false, + "AudioWorklet": false, + "AudioWorkletGlobalScope": false, + "AudioWorkletNode": false, + "AudioWorkletProcessor": false, + "AuthenticatorAssertionResponse": false, + "AuthenticatorAttestationResponse": false, + "AuthenticatorResponse": false, + "BackgroundFetchManager": false, + "BackgroundFetchRecord": false, + "BackgroundFetchRegistration": false, + "BarcodeDetector": false, + "BarProp": false, + "BaseAudioContext": false, + "BatteryManager": false, + "BeforeUnloadEvent": false, + "BiquadFilterNode": false, + "Blob": false, + "BlobEvent": false, + "Bluetooth": false, + "BluetoothCharacteristicProperties": false, + "BluetoothDevice": false, + "BluetoothRemoteGATTCharacteristic": false, + "BluetoothRemoteGATTDescriptor": false, + "BluetoothRemoteGATTServer": false, + "BluetoothRemoteGATTService": false, + "BluetoothUUID": false, + "blur": false, + "BroadcastChannel": false, + "BrowserCaptureMediaStreamTrack": false, + "btoa": false, + "ByteLengthQueuingStrategy": false, + "Cache": false, + "caches": false, + "CacheStorage": false, + "cancelAnimationFrame": false, + "cancelIdleCallback": false, + "CanvasCaptureMediaStream": false, + "CanvasCaptureMediaStreamTrack": false, + "CanvasGradient": false, + "CanvasPattern": false, + "CanvasRenderingContext2D": false, + "CaptureController": false, + "CaretPosition": false, + "CDATASection": false, + "ChannelMergerNode": false, + "ChannelSplitterNode": false, + "ChapterInformation": false, + "CharacterBoundsUpdateEvent": false, + "CharacterData": false, + "clearInterval": false, + "clearTimeout": false, + "clientInformation": false, + "Clipboard": false, + "ClipboardChangeEvent": false, + "ClipboardEvent": false, + "ClipboardItem": false, + "close": false, + "closed": false, + "CloseEvent": false, + "CloseWatcher": false, + "CommandEvent": false, + "Comment": false, + "CompositionEvent": false, + "CompressionStream": false, + "confirm": false, + "console": false, + "ConstantSourceNode": false, + "ContentVisibilityAutoStateChangeEvent": false, + "ConvolverNode": false, + "CookieChangeEvent": false, + "CookieDeprecationLabel": false, + "cookieStore": false, + "CookieStore": false, + "CookieStoreManager": false, + "CountQueuingStrategy": false, + "createImageBitmap": false, + "CreateMonitor": false, + "Credential": false, + "credentialless": false, + "CredentialsContainer": false, + "CropTarget": false, + "crossOriginIsolated": false, + "crypto": false, + "Crypto": false, + "CryptoKey": false, + "CSPViolationReportBody": false, + "CSS": false, + "CSSAnimation": false, + "CSSConditionRule": false, + "CSSContainerRule": false, + "CSSCounterStyleRule": false, + "CSSFontFaceRule": false, + "CSSFontFeatureValuesRule": false, + "CSSFontPaletteValuesRule": false, + "CSSFunctionDeclarations": false, + "CSSFunctionDescriptors": false, + "CSSFunctionRule": false, + "CSSGroupingRule": false, + "CSSImageValue": false, + "CSSImportRule": false, + "CSSKeyframeRule": false, + "CSSKeyframesRule": false, + "CSSKeywordValue": false, + "CSSLayerBlockRule": false, + "CSSLayerStatementRule": false, + "CSSMarginRule": false, + "CSSMathClamp": false, + "CSSMathInvert": false, + "CSSMathMax": false, + "CSSMathMin": false, + "CSSMathNegate": false, + "CSSMathProduct": false, + "CSSMathSum": false, + "CSSMathValue": false, + "CSSMatrixComponent": false, + "CSSMediaRule": false, + "CSSNamespaceRule": false, + "CSSNestedDeclarations": false, + "CSSNumericArray": false, + "CSSNumericValue": false, + "CSSPageDescriptors": false, + "CSSPageRule": false, + "CSSPerspective": false, + "CSSPositionTryDescriptors": false, + "CSSPositionTryRule": false, + "CSSPositionValue": false, + "CSSPropertyRule": false, + "CSSRotate": false, + "CSSRule": false, + "CSSRuleList": false, + "CSSScale": false, + "CSSScopeRule": false, + "CSSSkew": false, + "CSSSkewX": false, + "CSSSkewY": false, + "CSSStartingStyleRule": false, + "CSSStyleDeclaration": false, + "CSSStyleRule": false, + "CSSStyleSheet": false, + "CSSStyleValue": false, + "CSSSupportsRule": false, + "CSSTransformComponent": false, + "CSSTransformValue": false, + "CSSTransition": false, + "CSSTranslate": false, + "CSSUnitValue": false, + "CSSUnparsedValue": false, + "CSSVariableReferenceValue": false, + "CSSViewTransitionRule": false, + "currentFrame": false, + "currentTime": false, + "CustomElementRegistry": false, + "customElements": false, + "CustomEvent": false, + "CustomStateSet": false, + "DataTransfer": false, + "DataTransferItem": false, + "DataTransferItemList": false, + "DecompressionStream": false, + "DelayNode": false, + "DelegatedInkTrailPresenter": false, + "DeviceMotionEvent": false, + "DeviceMotionEventAcceleration": false, + "DeviceMotionEventRotationRate": false, + "DeviceOrientationEvent": false, + "devicePixelRatio": false, + "DevicePosture": false, + "DigitalCredential": false, + "dispatchEvent": false, + "DisposableStack": false, + "document": false, + "Document": false, + "DocumentFragment": false, + "documentPictureInPicture": false, + "DocumentPictureInPicture": false, + "DocumentPictureInPictureEvent": false, + "DocumentTimeline": false, + "DocumentType": false, + "DOMError": false, + "DOMException": false, + "DOMImplementation": false, + "DOMMatrix": false, + "DOMMatrixReadOnly": false, + "DOMParser": false, + "DOMPoint": false, + "DOMPointReadOnly": false, + "DOMQuad": false, + "DOMRect": false, + "DOMRectList": false, + "DOMRectReadOnly": false, + "DOMStringList": false, + "DOMStringMap": false, + "DOMTokenList": false, + "DragEvent": false, + "DynamicsCompressorNode": false, + "EditContext": false, + "Element": false, + "ElementInternals": false, + "EncodedAudioChunk": false, + "EncodedVideoChunk": false, + "ErrorEvent": false, + "event": false, + "Event": false, + "EventCounts": false, + "EventSource": false, + "EventTarget": false, + "external": false, + "External": false, + "EyeDropper": false, + "FeaturePolicy": false, + "FederatedCredential": false, + "fence": false, + "Fence": false, + "FencedFrameConfig": false, + "fetch": false, + "fetchLater": false, + "FetchLaterResult": false, + "File": false, + "FileList": false, + "FileReader": false, + "FileSystem": false, + "FileSystemDirectoryEntry": false, + "FileSystemDirectoryHandle": false, + "FileSystemDirectoryReader": false, + "FileSystemEntry": false, + "FileSystemFileEntry": false, + "FileSystemFileHandle": false, + "FileSystemHandle": false, + "FileSystemObserver": false, + "FileSystemWritableFileStream": false, + "find": false, + "focus": false, + "FocusEvent": false, + "FontData": false, + "FontFace": false, + "FontFaceSet": false, + "FontFaceSetLoadEvent": false, + "FormData": false, + "FormDataEvent": false, + "FragmentDirective": false, + "frameElement": false, + "frames": false, + "GainNode": false, + "Gamepad": false, + "GamepadAxisMoveEvent": false, + "GamepadButton": false, + "GamepadButtonEvent": false, + "GamepadEvent": false, + "GamepadHapticActuator": false, + "GamepadPose": false, + "Geolocation": false, + "GeolocationCoordinates": false, + "GeolocationPosition": false, + "GeolocationPositionError": false, + "getComputedStyle": false, + "getScreenDetails": false, + "getSelection": false, + "GPU": false, + "GPUAdapter": false, + "GPUAdapterInfo": false, + "GPUBindGroup": false, + "GPUBindGroupLayout": false, + "GPUBuffer": false, + "GPUBufferUsage": false, + "GPUCanvasContext": false, + "GPUColorWrite": false, + "GPUCommandBuffer": false, + "GPUCommandEncoder": false, + "GPUCompilationInfo": false, + "GPUCompilationMessage": false, + "GPUComputePassEncoder": false, + "GPUComputePipeline": false, + "GPUDevice": false, + "GPUDeviceLostInfo": false, + "GPUError": false, + "GPUExternalTexture": false, + "GPUInternalError": false, + "GPUMapMode": false, + "GPUOutOfMemoryError": false, + "GPUPipelineError": false, + "GPUPipelineLayout": false, + "GPUQuerySet": false, + "GPUQueue": false, + "GPURenderBundle": false, + "GPURenderBundleEncoder": false, + "GPURenderPassEncoder": false, + "GPURenderPipeline": false, + "GPUSampler": false, + "GPUShaderModule": false, + "GPUShaderStage": false, + "GPUSupportedFeatures": false, + "GPUSupportedLimits": false, + "GPUTexture": false, + "GPUTextureUsage": false, + "GPUTextureView": false, + "GPUUncapturedErrorEvent": false, + "GPUValidationError": false, + "GravitySensor": false, + "Gyroscope": false, + "HashChangeEvent": false, + "Headers": false, + "HID": false, + "HIDConnectionEvent": false, + "HIDDevice": false, + "HIDInputReportEvent": false, + "Highlight": false, + "HighlightRegistry": false, + "history": false, + "History": false, + "HTMLAllCollection": false, + "HTMLAnchorElement": false, + "HTMLAreaElement": false, + "HTMLAudioElement": false, + "HTMLBaseElement": false, + "HTMLBodyElement": false, + "HTMLBRElement": false, + "HTMLButtonElement": false, + "HTMLCanvasElement": false, + "HTMLCollection": false, + "HTMLDataElement": false, + "HTMLDataListElement": false, + "HTMLDetailsElement": false, + "HTMLDialogElement": false, + "HTMLDirectoryElement": false, + "HTMLDivElement": false, + "HTMLDListElement": false, + "HTMLDocument": false, + "HTMLElement": false, + "HTMLEmbedElement": false, + "HTMLFencedFrameElement": false, + "HTMLFieldSetElement": false, + "HTMLFontElement": false, + "HTMLFormControlsCollection": false, + "HTMLFormElement": false, + "HTMLFrameElement": false, + "HTMLFrameSetElement": false, + "HTMLHeadElement": false, + "HTMLHeadingElement": false, + "HTMLHRElement": false, + "HTMLHtmlElement": false, + "HTMLIFrameElement": false, + "HTMLImageElement": false, + "HTMLInputElement": false, + "HTMLLabelElement": false, + "HTMLLegendElement": false, + "HTMLLIElement": false, + "HTMLLinkElement": false, + "HTMLMapElement": false, + "HTMLMarqueeElement": false, + "HTMLMediaElement": false, + "HTMLMenuElement": false, + "HTMLMetaElement": false, + "HTMLMeterElement": false, + "HTMLModElement": false, + "HTMLObjectElement": false, + "HTMLOListElement": false, + "HTMLOptGroupElement": false, + "HTMLOptionElement": false, + "HTMLOptionsCollection": false, + "HTMLOutputElement": false, + "HTMLParagraphElement": false, + "HTMLParamElement": false, + "HTMLPictureElement": false, + "HTMLPreElement": false, + "HTMLProgressElement": false, + "HTMLQuoteElement": false, + "HTMLScriptElement": false, + "HTMLSelectedContentElement": false, + "HTMLSelectElement": false, + "HTMLSlotElement": false, + "HTMLSourceElement": false, + "HTMLSpanElement": false, + "HTMLStyleElement": false, + "HTMLTableCaptionElement": false, + "HTMLTableCellElement": false, + "HTMLTableColElement": false, + "HTMLTableElement": false, + "HTMLTableRowElement": false, + "HTMLTableSectionElement": false, + "HTMLTemplateElement": false, + "HTMLTextAreaElement": false, + "HTMLTimeElement": false, + "HTMLTitleElement": false, + "HTMLTrackElement": false, + "HTMLUListElement": false, + "HTMLUnknownElement": false, + "HTMLVideoElement": false, + "IDBCursor": false, + "IDBCursorWithValue": false, + "IDBDatabase": false, + "IDBFactory": false, + "IDBIndex": false, + "IDBKeyRange": false, + "IDBObjectStore": false, + "IDBOpenDBRequest": false, + "IDBRecord": false, + "IDBRequest": false, + "IDBTransaction": false, + "IDBVersionChangeEvent": false, + "IdentityCredential": false, + "IdentityCredentialError": false, + "IdentityProvider": false, + "IdleDeadline": false, + "IdleDetector": false, + "IIRFilterNode": false, + "Image": false, + "ImageBitmap": false, + "ImageBitmapRenderingContext": false, + "ImageCapture": false, + "ImageData": false, + "ImageDecoder": false, + "ImageTrack": false, + "ImageTrackList": false, + "indexedDB": false, + "Ink": false, + "innerHeight": false, + "innerWidth": false, + "InputDeviceCapabilities": false, + "InputDeviceInfo": false, + "InputEvent": false, + "IntegrityViolationReportBody": false, + "InterestEvent": false, + "IntersectionObserver": false, + "IntersectionObserverEntry": false, + "isSecureContext": false, + "Keyboard": false, + "KeyboardEvent": false, + "KeyboardLayoutMap": false, + "KeyframeEffect": false, + "LanguageDetector": false, + "LargestContentfulPaint": false, + "LaunchParams": false, + "launchQueue": false, + "LaunchQueue": false, + "LayoutShift": false, + "LayoutShiftAttribution": false, + "length": false, + "LinearAccelerationSensor": false, + "localStorage": false, + "location": true, + "Location": false, + "locationbar": false, + "Lock": false, + "LockManager": false, + "matchMedia": false, + "MathMLElement": false, + "MediaCapabilities": false, + "MediaCapabilitiesInfo": false, + "MediaDeviceInfo": false, + "MediaDevices": false, + "MediaElementAudioSourceNode": false, + "MediaEncryptedEvent": false, + "MediaError": false, + "MediaKeyError": false, + "MediaKeyMessageEvent": false, + "MediaKeys": false, + "MediaKeySession": false, + "MediaKeyStatusMap": false, + "MediaKeySystemAccess": false, + "MediaList": false, + "MediaMetadata": false, + "MediaQueryList": false, + "MediaQueryListEvent": false, + "MediaRecorder": false, + "MediaRecorderErrorEvent": false, + "MediaSession": false, + "MediaSource": false, + "MediaSourceHandle": false, + "MediaStream": false, + "MediaStreamAudioDestinationNode": false, + "MediaStreamAudioSourceNode": false, + "MediaStreamEvent": false, + "MediaStreamTrack": false, + "MediaStreamTrackAudioSourceNode": false, + "MediaStreamTrackAudioStats": false, + "MediaStreamTrackEvent": false, + "MediaStreamTrackGenerator": false, + "MediaStreamTrackProcessor": false, + "MediaStreamTrackVideoStats": false, + "menubar": false, + "MessageChannel": false, + "MessageEvent": false, + "MessagePort": false, + "MIDIAccess": false, + "MIDIConnectionEvent": false, + "MIDIInput": false, + "MIDIInputMap": false, + "MIDIMessageEvent": false, + "MIDIOutput": false, + "MIDIOutputMap": false, + "MIDIPort": false, + "MimeType": false, + "MimeTypeArray": false, + "model": false, + "ModelGenericSession": false, + "ModelManager": false, + "MouseEvent": false, + "moveBy": false, + "moveTo": false, + "MutationEvent": false, + "MutationObserver": false, + "MutationRecord": false, + "name": false, + "NamedNodeMap": false, + "NavigateEvent": false, + "navigation": false, + "Navigation": false, + "NavigationActivation": false, + "NavigationCurrentEntryChangeEvent": false, + "NavigationDestination": false, + "NavigationHistoryEntry": false, + "NavigationPrecommitController": false, + "NavigationPreloadManager": false, + "NavigationTransition": false, + "navigator": false, + "Navigator": false, + "NavigatorLogin": false, + "NavigatorManagedData": false, + "NavigatorUAData": false, + "NetworkInformation": false, + "Node": false, + "NodeFilter": false, + "NodeIterator": false, + "NodeList": false, + "Notification": false, + "NotifyPaintEvent": false, + "NotRestoredReasonDetails": false, + "NotRestoredReasons": false, + "Observable": false, + "OfflineAudioCompletionEvent": false, + "OfflineAudioContext": false, + "offscreenBuffering": false, + "OffscreenCanvas": false, + "OffscreenCanvasRenderingContext2D": false, + "onabort": true, + "onafterprint": true, + "onanimationcancel": true, + "onanimationend": true, + "onanimationiteration": true, + "onanimationstart": true, + "onappinstalled": true, + "onauxclick": true, + "onbeforeinput": true, + "onbeforeinstallprompt": true, + "onbeforematch": true, + "onbeforeprint": true, + "onbeforetoggle": true, + "onbeforeunload": true, + "onbeforexrselect": true, + "onblur": true, + "oncancel": true, + "oncanplay": true, + "oncanplaythrough": true, + "onchange": true, + "onclick": true, + "onclose": true, + "oncommand": true, + "oncontentvisibilityautostatechange": true, + "oncontextlost": true, + "oncontextmenu": true, + "oncontextrestored": true, + "oncopy": true, + "oncuechange": true, + "oncut": true, + "ondblclick": true, + "ondevicemotion": true, + "ondeviceorientation": true, + "ondeviceorientationabsolute": true, + "ondrag": true, + "ondragend": true, + "ondragenter": true, + "ondragleave": true, + "ondragover": true, + "ondragstart": true, + "ondrop": true, + "ondurationchange": true, + "onemptied": true, + "onended": true, + "onerror": true, + "onfocus": true, + "onformdata": true, + "ongamepadconnected": true, + "ongamepaddisconnected": true, + "ongotpointercapture": true, + "onhashchange": true, + "oninput": true, + "oninvalid": true, + "onkeydown": true, + "onkeypress": true, + "onkeyup": true, + "onlanguagechange": true, + "onload": true, + "onloadeddata": true, + "onloadedmetadata": true, + "onloadstart": true, + "onlostpointercapture": true, + "onmessage": true, + "onmessageerror": true, + "onmousedown": true, + "onmouseenter": true, + "onmouseleave": true, + "onmousemove": true, + "onmouseout": true, + "onmouseover": true, + "onmouseup": true, + "onmousewheel": true, + "onoffline": true, + "ononline": true, + "onpagehide": true, + "onpagereveal": true, + "onpageshow": true, + "onpageswap": true, + "onpaste": true, + "onpause": true, + "onplay": true, + "onplaying": true, + "onpointercancel": true, + "onpointerdown": true, + "onpointerenter": true, + "onpointerleave": true, + "onpointermove": true, + "onpointerout": true, + "onpointerover": true, + "onpointerrawupdate": true, + "onpointerup": true, + "onpopstate": true, + "onprogress": true, + "onratechange": true, + "onrejectionhandled": true, + "onreset": true, + "onresize": true, + "onscroll": true, + "onscrollend": true, + "onscrollsnapchange": true, + "onscrollsnapchanging": true, + "onsearch": true, + "onsecuritypolicyviolation": true, + "onseeked": true, + "onseeking": true, + "onselect": true, + "onselectionchange": true, + "onselectstart": true, + "onslotchange": true, + "onstalled": true, + "onstorage": true, + "onsubmit": true, + "onsuspend": true, + "ontimeupdate": true, + "ontoggle": true, + "ontransitioncancel": true, + "ontransitionend": true, + "ontransitionrun": true, + "ontransitionstart": true, + "onunhandledrejection": true, + "onunload": true, + "onvolumechange": true, + "onwaiting": true, + "onwheel": true, + "open": false, + "opener": false, + "Option": false, + "OrientationSensor": false, + "origin": false, + "originAgentCluster": false, + "OscillatorNode": false, + "OTPCredential": false, + "outerHeight": false, + "outerWidth": false, + "OverconstrainedError": false, + "PageRevealEvent": false, + "PageSwapEvent": false, + "PageTransitionEvent": false, + "pageXOffset": false, + "pageYOffset": false, + "PannerNode": false, + "parent": false, + "PasswordCredential": false, + "Path2D": false, + "PaymentAddress": false, + "PaymentManager": false, + "PaymentMethodChangeEvent": false, + "PaymentRequest": false, + "PaymentRequestUpdateEvent": false, + "PaymentResponse": false, + "performance": false, + "Performance": false, + "PerformanceElementTiming": false, + "PerformanceEntry": false, + "PerformanceEventTiming": false, + "PerformanceLongAnimationFrameTiming": false, + "PerformanceLongTaskTiming": false, + "PerformanceMark": false, + "PerformanceMeasure": false, + "PerformanceNavigation": false, + "PerformanceNavigationTiming": false, + "PerformanceObserver": false, + "PerformanceObserverEntryList": false, + "PerformancePaintTiming": false, + "PerformanceResourceTiming": false, + "PerformanceScriptTiming": false, + "PerformanceServerTiming": false, + "PerformanceTiming": false, + "PeriodicSyncManager": false, + "PeriodicWave": false, + "Permissions": false, + "PermissionStatus": false, + "PERSISTENT": false, + "personalbar": false, + "PictureInPictureEvent": false, + "PictureInPictureWindow": false, + "Plugin": false, + "PluginArray": false, + "PointerEvent": false, + "PopStateEvent": false, + "postMessage": false, + "Presentation": false, + "PresentationAvailability": false, + "PresentationConnection": false, + "PresentationConnectionAvailableEvent": false, + "PresentationConnectionCloseEvent": false, + "PresentationConnectionList": false, + "PresentationReceiver": false, + "PresentationRequest": false, + "PressureObserver": false, + "PressureRecord": false, + "print": false, + "ProcessingInstruction": false, + "Profiler": false, + "ProgressEvent": false, + "PromiseRejectionEvent": false, + "prompt": false, + "ProtectedAudience": false, + "PublicKeyCredential": false, + "PushManager": false, + "PushSubscription": false, + "PushSubscriptionOptions": false, + "queryLocalFonts": false, + "queueMicrotask": false, + "QuotaExceededError": false, + "RadioNodeList": false, + "Range": false, + "ReadableByteStreamController": false, + "ReadableStream": false, + "ReadableStreamBYOBReader": false, + "ReadableStreamBYOBRequest": false, + "ReadableStreamDefaultController": false, + "ReadableStreamDefaultReader": false, + "registerProcessor": false, + "RelativeOrientationSensor": false, + "RemotePlayback": false, + "removeEventListener": false, + "ReportBody": false, + "reportError": false, + "ReportingObserver": false, + "Request": false, + "requestAnimationFrame": false, + "requestIdleCallback": false, + "resizeBy": false, + "ResizeObserver": false, + "ResizeObserverEntry": false, + "ResizeObserverSize": false, + "resizeTo": false, + "Response": false, + "RestrictionTarget": false, + "RTCCertificate": false, + "RTCDataChannel": false, + "RTCDataChannelEvent": false, + "RTCDtlsTransport": false, + "RTCDTMFSender": false, + "RTCDTMFToneChangeEvent": false, + "RTCEncodedAudioFrame": false, + "RTCEncodedVideoFrame": false, + "RTCError": false, + "RTCErrorEvent": false, + "RTCIceCandidate": false, + "RTCIceTransport": false, + "RTCPeerConnection": false, + "RTCPeerConnectionIceErrorEvent": false, + "RTCPeerConnectionIceEvent": false, + "RTCRtpReceiver": false, + "RTCRtpScriptTransform": false, + "RTCRtpSender": false, + "RTCRtpTransceiver": false, + "RTCSctpTransport": false, + "RTCSessionDescription": false, + "RTCStatsReport": false, + "RTCTrackEvent": false, + "sampleRate": false, + "scheduler": false, + "Scheduler": false, + "Scheduling": false, + "screen": false, + "Screen": false, + "ScreenDetailed": false, + "ScreenDetails": false, + "screenLeft": false, + "ScreenOrientation": false, + "screenTop": false, + "screenX": false, + "screenY": false, + "ScriptProcessorNode": false, + "scroll": false, + "scrollbars": false, + "scrollBy": false, + "ScrollTimeline": false, + "scrollTo": false, + "scrollX": false, + "scrollY": false, + "SecurityPolicyViolationEvent": false, + "Selection": false, + "self": false, + "Sensor": false, + "SensorErrorEvent": false, + "Serial": false, + "SerialPort": false, + "ServiceWorker": false, + "ServiceWorkerContainer": false, + "ServiceWorkerRegistration": false, + "sessionStorage": false, + "setInterval": false, + "setTimeout": false, + "ShadowRoot": false, + "sharedStorage": false, + "SharedStorage": false, + "SharedStorageAppendMethod": false, + "SharedStorageClearMethod": false, + "SharedStorageDeleteMethod": false, + "SharedStorageModifierMethod": false, + "SharedStorageSetMethod": false, + "SharedStorageWorklet": false, + "SharedWorker": false, + "showDirectoryPicker": false, + "showOpenFilePicker": false, + "showSaveFilePicker": false, + "SnapEvent": false, + "SourceBuffer": false, + "SourceBufferList": false, + "SpeechGrammar": false, + "SpeechGrammarList": false, + "SpeechRecognition": false, + "SpeechRecognitionErrorEvent": false, + "SpeechRecognitionEvent": false, + "SpeechRecognitionPhrase": false, + "speechSynthesis": false, + "SpeechSynthesis": false, + "SpeechSynthesisErrorEvent": false, + "SpeechSynthesisEvent": false, + "SpeechSynthesisUtterance": false, + "SpeechSynthesisVoice": false, + "StaticRange": false, + "status": false, + "statusbar": false, + "StereoPannerNode": false, + "stop": false, + "Storage": false, + "StorageBucket": false, + "StorageBucketManager": false, + "StorageEvent": false, + "StorageManager": false, + "structuredClone": false, + "styleMedia": false, + "StylePropertyMap": false, + "StylePropertyMapReadOnly": false, + "StyleSheet": false, + "StyleSheetList": false, + "SubmitEvent": false, + "Subscriber": false, + "SubtleCrypto": false, + "Summarizer": false, + "SuppressedError": false, + "SVGAElement": false, + "SVGAngle": false, + "SVGAnimatedAngle": false, + "SVGAnimatedBoolean": false, + "SVGAnimatedEnumeration": false, + "SVGAnimatedInteger": false, + "SVGAnimatedLength": false, + "SVGAnimatedLengthList": false, + "SVGAnimatedNumber": false, + "SVGAnimatedNumberList": false, + "SVGAnimatedPreserveAspectRatio": false, + "SVGAnimatedRect": false, + "SVGAnimatedString": false, + "SVGAnimatedTransformList": false, + "SVGAnimateElement": false, + "SVGAnimateMotionElement": false, + "SVGAnimateTransformElement": false, + "SVGAnimationElement": false, + "SVGCircleElement": false, + "SVGClipPathElement": false, + "SVGComponentTransferFunctionElement": false, + "SVGDefsElement": false, + "SVGDescElement": false, + "SVGElement": false, + "SVGEllipseElement": false, + "SVGFEBlendElement": false, + "SVGFEColorMatrixElement": false, + "SVGFEComponentTransferElement": false, + "SVGFECompositeElement": false, + "SVGFEConvolveMatrixElement": false, + "SVGFEDiffuseLightingElement": false, + "SVGFEDisplacementMapElement": false, + "SVGFEDistantLightElement": false, + "SVGFEDropShadowElement": false, + "SVGFEFloodElement": false, + "SVGFEFuncAElement": false, + "SVGFEFuncBElement": false, + "SVGFEFuncGElement": false, + "SVGFEFuncRElement": false, + "SVGFEGaussianBlurElement": false, + "SVGFEImageElement": false, + "SVGFEMergeElement": false, + "SVGFEMergeNodeElement": false, + "SVGFEMorphologyElement": false, + "SVGFEOffsetElement": false, + "SVGFEPointLightElement": false, + "SVGFESpecularLightingElement": false, + "SVGFESpotLightElement": false, + "SVGFETileElement": false, + "SVGFETurbulenceElement": false, + "SVGFilterElement": false, + "SVGForeignObjectElement": false, + "SVGGElement": false, + "SVGGeometryElement": false, + "SVGGradientElement": false, + "SVGGraphicsElement": false, + "SVGImageElement": false, + "SVGLength": false, + "SVGLengthList": false, + "SVGLinearGradientElement": false, + "SVGLineElement": false, + "SVGMarkerElement": false, + "SVGMaskElement": false, + "SVGMatrix": false, + "SVGMetadataElement": false, + "SVGMPathElement": false, + "SVGNumber": false, + "SVGNumberList": false, + "SVGPathElement": false, + "SVGPatternElement": false, + "SVGPoint": false, + "SVGPointList": false, + "SVGPolygonElement": false, + "SVGPolylineElement": false, + "SVGPreserveAspectRatio": false, + "SVGRadialGradientElement": false, + "SVGRect": false, + "SVGRectElement": false, + "SVGScriptElement": false, + "SVGSetElement": false, + "SVGStopElement": false, + "SVGStringList": false, + "SVGStyleElement": false, + "SVGSVGElement": false, + "SVGSwitchElement": false, + "SVGSymbolElement": false, + "SVGTextContentElement": false, + "SVGTextElement": false, + "SVGTextPathElement": false, + "SVGTextPositioningElement": false, + "SVGTitleElement": false, + "SVGTransform": false, + "SVGTransformList": false, + "SVGTSpanElement": false, + "SVGUnitTypes": false, + "SVGUseElement": false, + "SVGViewElement": false, + "SyncManager": false, + "TaskAttributionTiming": false, + "TaskController": false, + "TaskPriorityChangeEvent": false, + "TaskSignal": false, + "TEMPORARY": false, + "Text": false, + "TextDecoder": false, + "TextDecoderStream": false, + "TextEncoder": false, + "TextEncoderStream": false, + "TextEvent": false, + "TextFormat": false, + "TextFormatUpdateEvent": false, + "TextMetrics": false, + "TextTrack": false, + "TextTrackCue": false, + "TextTrackCueList": false, + "TextTrackList": false, + "TextUpdateEvent": false, + "TimeEvent": false, + "TimeRanges": false, + "ToggleEvent": false, + "toolbar": false, + "top": false, + "Touch": false, + "TouchEvent": false, + "TouchList": false, + "TrackEvent": false, + "TransformStream": false, + "TransformStreamDefaultController": false, + "TransitionEvent": false, + "Translator": false, + "TreeWalker": false, + "TrustedHTML": false, + "TrustedScript": false, + "TrustedScriptURL": false, + "TrustedTypePolicy": false, + "TrustedTypePolicyFactory": false, + "trustedTypes": false, + "UIEvent": false, + "URL": false, + "URLPattern": false, + "URLSearchParams": false, + "USB": false, + "USBAlternateInterface": false, + "USBConfiguration": false, + "USBConnectionEvent": false, + "USBDevice": false, + "USBEndpoint": false, + "USBInterface": false, + "USBInTransferResult": false, + "USBIsochronousInTransferPacket": false, + "USBIsochronousInTransferResult": false, + "USBIsochronousOutTransferPacket": false, + "USBIsochronousOutTransferResult": false, + "USBOutTransferResult": false, + "UserActivation": false, + "ValidityState": false, + "VideoColorSpace": false, + "VideoDecoder": false, + "VideoEncoder": false, + "VideoFrame": false, + "VideoPlaybackQuality": false, + "viewport": false, + "Viewport": false, + "ViewTimeline": false, + "ViewTransition": false, + "ViewTransitionTypeSet": false, + "VirtualKeyboard": false, + "VirtualKeyboardGeometryChangeEvent": false, + "VisibilityStateEntry": false, + "visualViewport": false, + "VisualViewport": false, + "VTTCue": false, + "VTTRegion": false, + "WakeLock": false, + "WakeLockSentinel": false, + "WaveShaperNode": false, + "WebAssembly": false, + "WebGL2RenderingContext": false, + "WebGLActiveInfo": false, + "WebGLBuffer": false, + "WebGLContextEvent": false, + "WebGLFramebuffer": false, + "WebGLObject": false, + "WebGLProgram": false, + "WebGLQuery": false, + "WebGLRenderbuffer": false, + "WebGLRenderingContext": false, + "WebGLSampler": false, + "WebGLShader": false, + "WebGLShaderPrecisionFormat": false, + "WebGLSync": false, + "WebGLTexture": false, + "WebGLTransformFeedback": false, + "WebGLUniformLocation": false, + "WebGLVertexArrayObject": false, + "WebSocket": false, + "WebSocketError": false, + "WebSocketStream": false, + "WebTransport": false, + "WebTransportBidirectionalStream": false, + "WebTransportDatagramDuplexStream": false, + "WebTransportError": false, + "WebTransportReceiveStream": false, + "WebTransportSendStream": false, + "WGSLLanguageFeatures": false, + "WheelEvent": false, + "when": false, + "window": false, + "Window": false, + "WindowControlsOverlay": false, + "WindowControlsOverlayGeometryChangeEvent": false, + "Worker": false, + "Worklet": false, + "WorkletGlobalScope": false, + "WritableStream": false, + "WritableStreamDefaultController": false, + "WritableStreamDefaultWriter": false, + "XMLDocument": false, + "XMLHttpRequest": false, + "XMLHttpRequestEventTarget": false, + "XMLHttpRequestUpload": false, + "XMLSerializer": false, + "XPathEvaluator": false, + "XPathExpression": false, + "XPathResult": false, + "XRAnchor": false, + "XRAnchorSet": false, + "XRBoundedReferenceSpace": false, + "XRCamera": false, + "XRCPUDepthInformation": false, + "XRDepthInformation": false, + "XRDOMOverlayState": false, + "XRFrame": false, + "XRHand": false, + "XRHitTestResult": false, + "XRHitTestSource": false, + "XRInputSource": false, + "XRInputSourceArray": false, + "XRInputSourceEvent": false, + "XRInputSourcesChangeEvent": false, + "XRJointPose": false, + "XRJointSpace": false, + "XRLayer": false, + "XRLightEstimate": false, + "XRLightProbe": false, + "XRPose": false, + "XRRay": false, + "XRReferenceSpace": false, + "XRReferenceSpaceEvent": false, + "XRRenderState": false, + "XRRigidTransform": false, + "XRSession": false, + "XRSessionEvent": false, + "XRSpace": false, + "XRSystem": false, + "XRTransientInputHitTestResult": false, + "XRTransientInputHitTestSource": false, + "XRView": false, + "XRViewerPose": false, + "XRViewport": false, + "XRWebGLBinding": false, + "XRWebGLDepthInformation": false, + "XRWebGLLayer": false, + "XSLTProcessor": false + } + }, + "errors": [ + { + "messageId": "impliedEval" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-implied-eval > invalid + +```js +window['setInterval']('foo') +``` + +```json +{ + "languageOptions": { + "globals": { + "AbortController": false, + "AbortSignal": false, + "AbsoluteOrientationSensor": false, + "AbstractRange": false, + "Accelerometer": false, + "addEventListener": false, + "ai": false, + "AI": false, + "AICreateMonitor": false, + "AITextSession": false, + "alert": false, + "AnalyserNode": false, + "Animation": false, + "AnimationEffect": false, + "AnimationEvent": false, + "AnimationPlaybackEvent": false, + "AnimationTimeline": false, + "AsyncDisposableStack": false, + "atob": false, + "Attr": false, + "Audio": false, + "AudioBuffer": false, + "AudioBufferSourceNode": false, + "AudioContext": false, + "AudioData": false, + "AudioDecoder": false, + "AudioDestinationNode": false, + "AudioEncoder": false, + "AudioListener": false, + "AudioNode": false, + "AudioParam": false, + "AudioParamMap": false, + "AudioProcessingEvent": false, + "AudioScheduledSourceNode": false, + "AudioSinkInfo": false, + "AudioWorklet": false, + "AudioWorkletGlobalScope": false, + "AudioWorkletNode": false, + "AudioWorkletProcessor": false, + "AuthenticatorAssertionResponse": false, + "AuthenticatorAttestationResponse": false, + "AuthenticatorResponse": false, + "BackgroundFetchManager": false, + "BackgroundFetchRecord": false, + "BackgroundFetchRegistration": false, + "BarcodeDetector": false, + "BarProp": false, + "BaseAudioContext": false, + "BatteryManager": false, + "BeforeUnloadEvent": false, + "BiquadFilterNode": false, + "Blob": false, + "BlobEvent": false, + "Bluetooth": false, + "BluetoothCharacteristicProperties": false, + "BluetoothDevice": false, + "BluetoothRemoteGATTCharacteristic": false, + "BluetoothRemoteGATTDescriptor": false, + "BluetoothRemoteGATTServer": false, + "BluetoothRemoteGATTService": false, + "BluetoothUUID": false, + "blur": false, + "BroadcastChannel": false, + "BrowserCaptureMediaStreamTrack": false, + "btoa": false, + "ByteLengthQueuingStrategy": false, + "Cache": false, + "caches": false, + "CacheStorage": false, + "cancelAnimationFrame": false, + "cancelIdleCallback": false, + "CanvasCaptureMediaStream": false, + "CanvasCaptureMediaStreamTrack": false, + "CanvasGradient": false, + "CanvasPattern": false, + "CanvasRenderingContext2D": false, + "CaptureController": false, + "CaretPosition": false, + "CDATASection": false, + "ChannelMergerNode": false, + "ChannelSplitterNode": false, + "ChapterInformation": false, + "CharacterBoundsUpdateEvent": false, + "CharacterData": false, + "clearInterval": false, + "clearTimeout": false, + "clientInformation": false, + "Clipboard": false, + "ClipboardChangeEvent": false, + "ClipboardEvent": false, + "ClipboardItem": false, + "close": false, + "closed": false, + "CloseEvent": false, + "CloseWatcher": false, + "CommandEvent": false, + "Comment": false, + "CompositionEvent": false, + "CompressionStream": false, + "confirm": false, + "console": false, + "ConstantSourceNode": false, + "ContentVisibilityAutoStateChangeEvent": false, + "ConvolverNode": false, + "CookieChangeEvent": false, + "CookieDeprecationLabel": false, + "cookieStore": false, + "CookieStore": false, + "CookieStoreManager": false, + "CountQueuingStrategy": false, + "createImageBitmap": false, + "CreateMonitor": false, + "Credential": false, + "credentialless": false, + "CredentialsContainer": false, + "CropTarget": false, + "crossOriginIsolated": false, + "crypto": false, + "Crypto": false, + "CryptoKey": false, + "CSPViolationReportBody": false, + "CSS": false, + "CSSAnimation": false, + "CSSConditionRule": false, + "CSSContainerRule": false, + "CSSCounterStyleRule": false, + "CSSFontFaceRule": false, + "CSSFontFeatureValuesRule": false, + "CSSFontPaletteValuesRule": false, + "CSSFunctionDeclarations": false, + "CSSFunctionDescriptors": false, + "CSSFunctionRule": false, + "CSSGroupingRule": false, + "CSSImageValue": false, + "CSSImportRule": false, + "CSSKeyframeRule": false, + "CSSKeyframesRule": false, + "CSSKeywordValue": false, + "CSSLayerBlockRule": false, + "CSSLayerStatementRule": false, + "CSSMarginRule": false, + "CSSMathClamp": false, + "CSSMathInvert": false, + "CSSMathMax": false, + "CSSMathMin": false, + "CSSMathNegate": false, + "CSSMathProduct": false, + "CSSMathSum": false, + "CSSMathValue": false, + "CSSMatrixComponent": false, + "CSSMediaRule": false, + "CSSNamespaceRule": false, + "CSSNestedDeclarations": false, + "CSSNumericArray": false, + "CSSNumericValue": false, + "CSSPageDescriptors": false, + "CSSPageRule": false, + "CSSPerspective": false, + "CSSPositionTryDescriptors": false, + "CSSPositionTryRule": false, + "CSSPositionValue": false, + "CSSPropertyRule": false, + "CSSRotate": false, + "CSSRule": false, + "CSSRuleList": false, + "CSSScale": false, + "CSSScopeRule": false, + "CSSSkew": false, + "CSSSkewX": false, + "CSSSkewY": false, + "CSSStartingStyleRule": false, + "CSSStyleDeclaration": false, + "CSSStyleRule": false, + "CSSStyleSheet": false, + "CSSStyleValue": false, + "CSSSupportsRule": false, + "CSSTransformComponent": false, + "CSSTransformValue": false, + "CSSTransition": false, + "CSSTranslate": false, + "CSSUnitValue": false, + "CSSUnparsedValue": false, + "CSSVariableReferenceValue": false, + "CSSViewTransitionRule": false, + "currentFrame": false, + "currentTime": false, + "CustomElementRegistry": false, + "customElements": false, + "CustomEvent": false, + "CustomStateSet": false, + "DataTransfer": false, + "DataTransferItem": false, + "DataTransferItemList": false, + "DecompressionStream": false, + "DelayNode": false, + "DelegatedInkTrailPresenter": false, + "DeviceMotionEvent": false, + "DeviceMotionEventAcceleration": false, + "DeviceMotionEventRotationRate": false, + "DeviceOrientationEvent": false, + "devicePixelRatio": false, + "DevicePosture": false, + "DigitalCredential": false, + "dispatchEvent": false, + "DisposableStack": false, + "document": false, + "Document": false, + "DocumentFragment": false, + "documentPictureInPicture": false, + "DocumentPictureInPicture": false, + "DocumentPictureInPictureEvent": false, + "DocumentTimeline": false, + "DocumentType": false, + "DOMError": false, + "DOMException": false, + "DOMImplementation": false, + "DOMMatrix": false, + "DOMMatrixReadOnly": false, + "DOMParser": false, + "DOMPoint": false, + "DOMPointReadOnly": false, + "DOMQuad": false, + "DOMRect": false, + "DOMRectList": false, + "DOMRectReadOnly": false, + "DOMStringList": false, + "DOMStringMap": false, + "DOMTokenList": false, + "DragEvent": false, + "DynamicsCompressorNode": false, + "EditContext": false, + "Element": false, + "ElementInternals": false, + "EncodedAudioChunk": false, + "EncodedVideoChunk": false, + "ErrorEvent": false, + "event": false, + "Event": false, + "EventCounts": false, + "EventSource": false, + "EventTarget": false, + "external": false, + "External": false, + "EyeDropper": false, + "FeaturePolicy": false, + "FederatedCredential": false, + "fence": false, + "Fence": false, + "FencedFrameConfig": false, + "fetch": false, + "fetchLater": false, + "FetchLaterResult": false, + "File": false, + "FileList": false, + "FileReader": false, + "FileSystem": false, + "FileSystemDirectoryEntry": false, + "FileSystemDirectoryHandle": false, + "FileSystemDirectoryReader": false, + "FileSystemEntry": false, + "FileSystemFileEntry": false, + "FileSystemFileHandle": false, + "FileSystemHandle": false, + "FileSystemObserver": false, + "FileSystemWritableFileStream": false, + "find": false, + "focus": false, + "FocusEvent": false, + "FontData": false, + "FontFace": false, + "FontFaceSet": false, + "FontFaceSetLoadEvent": false, + "FormData": false, + "FormDataEvent": false, + "FragmentDirective": false, + "frameElement": false, + "frames": false, + "GainNode": false, + "Gamepad": false, + "GamepadAxisMoveEvent": false, + "GamepadButton": false, + "GamepadButtonEvent": false, + "GamepadEvent": false, + "GamepadHapticActuator": false, + "GamepadPose": false, + "Geolocation": false, + "GeolocationCoordinates": false, + "GeolocationPosition": false, + "GeolocationPositionError": false, + "getComputedStyle": false, + "getScreenDetails": false, + "getSelection": false, + "GPU": false, + "GPUAdapter": false, + "GPUAdapterInfo": false, + "GPUBindGroup": false, + "GPUBindGroupLayout": false, + "GPUBuffer": false, + "GPUBufferUsage": false, + "GPUCanvasContext": false, + "GPUColorWrite": false, + "GPUCommandBuffer": false, + "GPUCommandEncoder": false, + "GPUCompilationInfo": false, + "GPUCompilationMessage": false, + "GPUComputePassEncoder": false, + "GPUComputePipeline": false, + "GPUDevice": false, + "GPUDeviceLostInfo": false, + "GPUError": false, + "GPUExternalTexture": false, + "GPUInternalError": false, + "GPUMapMode": false, + "GPUOutOfMemoryError": false, + "GPUPipelineError": false, + "GPUPipelineLayout": false, + "GPUQuerySet": false, + "GPUQueue": false, + "GPURenderBundle": false, + "GPURenderBundleEncoder": false, + "GPURenderPassEncoder": false, + "GPURenderPipeline": false, + "GPUSampler": false, + "GPUShaderModule": false, + "GPUShaderStage": false, + "GPUSupportedFeatures": false, + "GPUSupportedLimits": false, + "GPUTexture": false, + "GPUTextureUsage": false, + "GPUTextureView": false, + "GPUUncapturedErrorEvent": false, + "GPUValidationError": false, + "GravitySensor": false, + "Gyroscope": false, + "HashChangeEvent": false, + "Headers": false, + "HID": false, + "HIDConnectionEvent": false, + "HIDDevice": false, + "HIDInputReportEvent": false, + "Highlight": false, + "HighlightRegistry": false, + "history": false, + "History": false, + "HTMLAllCollection": false, + "HTMLAnchorElement": false, + "HTMLAreaElement": false, + "HTMLAudioElement": false, + "HTMLBaseElement": false, + "HTMLBodyElement": false, + "HTMLBRElement": false, + "HTMLButtonElement": false, + "HTMLCanvasElement": false, + "HTMLCollection": false, + "HTMLDataElement": false, + "HTMLDataListElement": false, + "HTMLDetailsElement": false, + "HTMLDialogElement": false, + "HTMLDirectoryElement": false, + "HTMLDivElement": false, + "HTMLDListElement": false, + "HTMLDocument": false, + "HTMLElement": false, + "HTMLEmbedElement": false, + "HTMLFencedFrameElement": false, + "HTMLFieldSetElement": false, + "HTMLFontElement": false, + "HTMLFormControlsCollection": false, + "HTMLFormElement": false, + "HTMLFrameElement": false, + "HTMLFrameSetElement": false, + "HTMLHeadElement": false, + "HTMLHeadingElement": false, + "HTMLHRElement": false, + "HTMLHtmlElement": false, + "HTMLIFrameElement": false, + "HTMLImageElement": false, + "HTMLInputElement": false, + "HTMLLabelElement": false, + "HTMLLegendElement": false, + "HTMLLIElement": false, + "HTMLLinkElement": false, + "HTMLMapElement": false, + "HTMLMarqueeElement": false, + "HTMLMediaElement": false, + "HTMLMenuElement": false, + "HTMLMetaElement": false, + "HTMLMeterElement": false, + "HTMLModElement": false, + "HTMLObjectElement": false, + "HTMLOListElement": false, + "HTMLOptGroupElement": false, + "HTMLOptionElement": false, + "HTMLOptionsCollection": false, + "HTMLOutputElement": false, + "HTMLParagraphElement": false, + "HTMLParamElement": false, + "HTMLPictureElement": false, + "HTMLPreElement": false, + "HTMLProgressElement": false, + "HTMLQuoteElement": false, + "HTMLScriptElement": false, + "HTMLSelectedContentElement": false, + "HTMLSelectElement": false, + "HTMLSlotElement": false, + "HTMLSourceElement": false, + "HTMLSpanElement": false, + "HTMLStyleElement": false, + "HTMLTableCaptionElement": false, + "HTMLTableCellElement": false, + "HTMLTableColElement": false, + "HTMLTableElement": false, + "HTMLTableRowElement": false, + "HTMLTableSectionElement": false, + "HTMLTemplateElement": false, + "HTMLTextAreaElement": false, + "HTMLTimeElement": false, + "HTMLTitleElement": false, + "HTMLTrackElement": false, + "HTMLUListElement": false, + "HTMLUnknownElement": false, + "HTMLVideoElement": false, + "IDBCursor": false, + "IDBCursorWithValue": false, + "IDBDatabase": false, + "IDBFactory": false, + "IDBIndex": false, + "IDBKeyRange": false, + "IDBObjectStore": false, + "IDBOpenDBRequest": false, + "IDBRecord": false, + "IDBRequest": false, + "IDBTransaction": false, + "IDBVersionChangeEvent": false, + "IdentityCredential": false, + "IdentityCredentialError": false, + "IdentityProvider": false, + "IdleDeadline": false, + "IdleDetector": false, + "IIRFilterNode": false, + "Image": false, + "ImageBitmap": false, + "ImageBitmapRenderingContext": false, + "ImageCapture": false, + "ImageData": false, + "ImageDecoder": false, + "ImageTrack": false, + "ImageTrackList": false, + "indexedDB": false, + "Ink": false, + "innerHeight": false, + "innerWidth": false, + "InputDeviceCapabilities": false, + "InputDeviceInfo": false, + "InputEvent": false, + "IntegrityViolationReportBody": false, + "InterestEvent": false, + "IntersectionObserver": false, + "IntersectionObserverEntry": false, + "isSecureContext": false, + "Keyboard": false, + "KeyboardEvent": false, + "KeyboardLayoutMap": false, + "KeyframeEffect": false, + "LanguageDetector": false, + "LargestContentfulPaint": false, + "LaunchParams": false, + "launchQueue": false, + "LaunchQueue": false, + "LayoutShift": false, + "LayoutShiftAttribution": false, + "length": false, + "LinearAccelerationSensor": false, + "localStorage": false, + "location": true, + "Location": false, + "locationbar": false, + "Lock": false, + "LockManager": false, + "matchMedia": false, + "MathMLElement": false, + "MediaCapabilities": false, + "MediaCapabilitiesInfo": false, + "MediaDeviceInfo": false, + "MediaDevices": false, + "MediaElementAudioSourceNode": false, + "MediaEncryptedEvent": false, + "MediaError": false, + "MediaKeyError": false, + "MediaKeyMessageEvent": false, + "MediaKeys": false, + "MediaKeySession": false, + "MediaKeyStatusMap": false, + "MediaKeySystemAccess": false, + "MediaList": false, + "MediaMetadata": false, + "MediaQueryList": false, + "MediaQueryListEvent": false, + "MediaRecorder": false, + "MediaRecorderErrorEvent": false, + "MediaSession": false, + "MediaSource": false, + "MediaSourceHandle": false, + "MediaStream": false, + "MediaStreamAudioDestinationNode": false, + "MediaStreamAudioSourceNode": false, + "MediaStreamEvent": false, + "MediaStreamTrack": false, + "MediaStreamTrackAudioSourceNode": false, + "MediaStreamTrackAudioStats": false, + "MediaStreamTrackEvent": false, + "MediaStreamTrackGenerator": false, + "MediaStreamTrackProcessor": false, + "MediaStreamTrackVideoStats": false, + "menubar": false, + "MessageChannel": false, + "MessageEvent": false, + "MessagePort": false, + "MIDIAccess": false, + "MIDIConnectionEvent": false, + "MIDIInput": false, + "MIDIInputMap": false, + "MIDIMessageEvent": false, + "MIDIOutput": false, + "MIDIOutputMap": false, + "MIDIPort": false, + "MimeType": false, + "MimeTypeArray": false, + "model": false, + "ModelGenericSession": false, + "ModelManager": false, + "MouseEvent": false, + "moveBy": false, + "moveTo": false, + "MutationEvent": false, + "MutationObserver": false, + "MutationRecord": false, + "name": false, + "NamedNodeMap": false, + "NavigateEvent": false, + "navigation": false, + "Navigation": false, + "NavigationActivation": false, + "NavigationCurrentEntryChangeEvent": false, + "NavigationDestination": false, + "NavigationHistoryEntry": false, + "NavigationPrecommitController": false, + "NavigationPreloadManager": false, + "NavigationTransition": false, + "navigator": false, + "Navigator": false, + "NavigatorLogin": false, + "NavigatorManagedData": false, + "NavigatorUAData": false, + "NetworkInformation": false, + "Node": false, + "NodeFilter": false, + "NodeIterator": false, + "NodeList": false, + "Notification": false, + "NotifyPaintEvent": false, + "NotRestoredReasonDetails": false, + "NotRestoredReasons": false, + "Observable": false, + "OfflineAudioCompletionEvent": false, + "OfflineAudioContext": false, + "offscreenBuffering": false, + "OffscreenCanvas": false, + "OffscreenCanvasRenderingContext2D": false, + "onabort": true, + "onafterprint": true, + "onanimationcancel": true, + "onanimationend": true, + "onanimationiteration": true, + "onanimationstart": true, + "onappinstalled": true, + "onauxclick": true, + "onbeforeinput": true, + "onbeforeinstallprompt": true, + "onbeforematch": true, + "onbeforeprint": true, + "onbeforetoggle": true, + "onbeforeunload": true, + "onbeforexrselect": true, + "onblur": true, + "oncancel": true, + "oncanplay": true, + "oncanplaythrough": true, + "onchange": true, + "onclick": true, + "onclose": true, + "oncommand": true, + "oncontentvisibilityautostatechange": true, + "oncontextlost": true, + "oncontextmenu": true, + "oncontextrestored": true, + "oncopy": true, + "oncuechange": true, + "oncut": true, + "ondblclick": true, + "ondevicemotion": true, + "ondeviceorientation": true, + "ondeviceorientationabsolute": true, + "ondrag": true, + "ondragend": true, + "ondragenter": true, + "ondragleave": true, + "ondragover": true, + "ondragstart": true, + "ondrop": true, + "ondurationchange": true, + "onemptied": true, + "onended": true, + "onerror": true, + "onfocus": true, + "onformdata": true, + "ongamepadconnected": true, + "ongamepaddisconnected": true, + "ongotpointercapture": true, + "onhashchange": true, + "oninput": true, + "oninvalid": true, + "onkeydown": true, + "onkeypress": true, + "onkeyup": true, + "onlanguagechange": true, + "onload": true, + "onloadeddata": true, + "onloadedmetadata": true, + "onloadstart": true, + "onlostpointercapture": true, + "onmessage": true, + "onmessageerror": true, + "onmousedown": true, + "onmouseenter": true, + "onmouseleave": true, + "onmousemove": true, + "onmouseout": true, + "onmouseover": true, + "onmouseup": true, + "onmousewheel": true, + "onoffline": true, + "ononline": true, + "onpagehide": true, + "onpagereveal": true, + "onpageshow": true, + "onpageswap": true, + "onpaste": true, + "onpause": true, + "onplay": true, + "onplaying": true, + "onpointercancel": true, + "onpointerdown": true, + "onpointerenter": true, + "onpointerleave": true, + "onpointermove": true, + "onpointerout": true, + "onpointerover": true, + "onpointerrawupdate": true, + "onpointerup": true, + "onpopstate": true, + "onprogress": true, + "onratechange": true, + "onrejectionhandled": true, + "onreset": true, + "onresize": true, + "onscroll": true, + "onscrollend": true, + "onscrollsnapchange": true, + "onscrollsnapchanging": true, + "onsearch": true, + "onsecuritypolicyviolation": true, + "onseeked": true, + "onseeking": true, + "onselect": true, + "onselectionchange": true, + "onselectstart": true, + "onslotchange": true, + "onstalled": true, + "onstorage": true, + "onsubmit": true, + "onsuspend": true, + "ontimeupdate": true, + "ontoggle": true, + "ontransitioncancel": true, + "ontransitionend": true, + "ontransitionrun": true, + "ontransitionstart": true, + "onunhandledrejection": true, + "onunload": true, + "onvolumechange": true, + "onwaiting": true, + "onwheel": true, + "open": false, + "opener": false, + "Option": false, + "OrientationSensor": false, + "origin": false, + "originAgentCluster": false, + "OscillatorNode": false, + "OTPCredential": false, + "outerHeight": false, + "outerWidth": false, + "OverconstrainedError": false, + "PageRevealEvent": false, + "PageSwapEvent": false, + "PageTransitionEvent": false, + "pageXOffset": false, + "pageYOffset": false, + "PannerNode": false, + "parent": false, + "PasswordCredential": false, + "Path2D": false, + "PaymentAddress": false, + "PaymentManager": false, + "PaymentMethodChangeEvent": false, + "PaymentRequest": false, + "PaymentRequestUpdateEvent": false, + "PaymentResponse": false, + "performance": false, + "Performance": false, + "PerformanceElementTiming": false, + "PerformanceEntry": false, + "PerformanceEventTiming": false, + "PerformanceLongAnimationFrameTiming": false, + "PerformanceLongTaskTiming": false, + "PerformanceMark": false, + "PerformanceMeasure": false, + "PerformanceNavigation": false, + "PerformanceNavigationTiming": false, + "PerformanceObserver": false, + "PerformanceObserverEntryList": false, + "PerformancePaintTiming": false, + "PerformanceResourceTiming": false, + "PerformanceScriptTiming": false, + "PerformanceServerTiming": false, + "PerformanceTiming": false, + "PeriodicSyncManager": false, + "PeriodicWave": false, + "Permissions": false, + "PermissionStatus": false, + "PERSISTENT": false, + "personalbar": false, + "PictureInPictureEvent": false, + "PictureInPictureWindow": false, + "Plugin": false, + "PluginArray": false, + "PointerEvent": false, + "PopStateEvent": false, + "postMessage": false, + "Presentation": false, + "PresentationAvailability": false, + "PresentationConnection": false, + "PresentationConnectionAvailableEvent": false, + "PresentationConnectionCloseEvent": false, + "PresentationConnectionList": false, + "PresentationReceiver": false, + "PresentationRequest": false, + "PressureObserver": false, + "PressureRecord": false, + "print": false, + "ProcessingInstruction": false, + "Profiler": false, + "ProgressEvent": false, + "PromiseRejectionEvent": false, + "prompt": false, + "ProtectedAudience": false, + "PublicKeyCredential": false, + "PushManager": false, + "PushSubscription": false, + "PushSubscriptionOptions": false, + "queryLocalFonts": false, + "queueMicrotask": false, + "QuotaExceededError": false, + "RadioNodeList": false, + "Range": false, + "ReadableByteStreamController": false, + "ReadableStream": false, + "ReadableStreamBYOBReader": false, + "ReadableStreamBYOBRequest": false, + "ReadableStreamDefaultController": false, + "ReadableStreamDefaultReader": false, + "registerProcessor": false, + "RelativeOrientationSensor": false, + "RemotePlayback": false, + "removeEventListener": false, + "ReportBody": false, + "reportError": false, + "ReportingObserver": false, + "Request": false, + "requestAnimationFrame": false, + "requestIdleCallback": false, + "resizeBy": false, + "ResizeObserver": false, + "ResizeObserverEntry": false, + "ResizeObserverSize": false, + "resizeTo": false, + "Response": false, + "RestrictionTarget": false, + "RTCCertificate": false, + "RTCDataChannel": false, + "RTCDataChannelEvent": false, + "RTCDtlsTransport": false, + "RTCDTMFSender": false, + "RTCDTMFToneChangeEvent": false, + "RTCEncodedAudioFrame": false, + "RTCEncodedVideoFrame": false, + "RTCError": false, + "RTCErrorEvent": false, + "RTCIceCandidate": false, + "RTCIceTransport": false, + "RTCPeerConnection": false, + "RTCPeerConnectionIceErrorEvent": false, + "RTCPeerConnectionIceEvent": false, + "RTCRtpReceiver": false, + "RTCRtpScriptTransform": false, + "RTCRtpSender": false, + "RTCRtpTransceiver": false, + "RTCSctpTransport": false, + "RTCSessionDescription": false, + "RTCStatsReport": false, + "RTCTrackEvent": false, + "sampleRate": false, + "scheduler": false, + "Scheduler": false, + "Scheduling": false, + "screen": false, + "Screen": false, + "ScreenDetailed": false, + "ScreenDetails": false, + "screenLeft": false, + "ScreenOrientation": false, + "screenTop": false, + "screenX": false, + "screenY": false, + "ScriptProcessorNode": false, + "scroll": false, + "scrollbars": false, + "scrollBy": false, + "ScrollTimeline": false, + "scrollTo": false, + "scrollX": false, + "scrollY": false, + "SecurityPolicyViolationEvent": false, + "Selection": false, + "self": false, + "Sensor": false, + "SensorErrorEvent": false, + "Serial": false, + "SerialPort": false, + "ServiceWorker": false, + "ServiceWorkerContainer": false, + "ServiceWorkerRegistration": false, + "sessionStorage": false, + "setInterval": false, + "setTimeout": false, + "ShadowRoot": false, + "sharedStorage": false, + "SharedStorage": false, + "SharedStorageAppendMethod": false, + "SharedStorageClearMethod": false, + "SharedStorageDeleteMethod": false, + "SharedStorageModifierMethod": false, + "SharedStorageSetMethod": false, + "SharedStorageWorklet": false, + "SharedWorker": false, + "showDirectoryPicker": false, + "showOpenFilePicker": false, + "showSaveFilePicker": false, + "SnapEvent": false, + "SourceBuffer": false, + "SourceBufferList": false, + "SpeechGrammar": false, + "SpeechGrammarList": false, + "SpeechRecognition": false, + "SpeechRecognitionErrorEvent": false, + "SpeechRecognitionEvent": false, + "SpeechRecognitionPhrase": false, + "speechSynthesis": false, + "SpeechSynthesis": false, + "SpeechSynthesisErrorEvent": false, + "SpeechSynthesisEvent": false, + "SpeechSynthesisUtterance": false, + "SpeechSynthesisVoice": false, + "StaticRange": false, + "status": false, + "statusbar": false, + "StereoPannerNode": false, + "stop": false, + "Storage": false, + "StorageBucket": false, + "StorageBucketManager": false, + "StorageEvent": false, + "StorageManager": false, + "structuredClone": false, + "styleMedia": false, + "StylePropertyMap": false, + "StylePropertyMapReadOnly": false, + "StyleSheet": false, + "StyleSheetList": false, + "SubmitEvent": false, + "Subscriber": false, + "SubtleCrypto": false, + "Summarizer": false, + "SuppressedError": false, + "SVGAElement": false, + "SVGAngle": false, + "SVGAnimatedAngle": false, + "SVGAnimatedBoolean": false, + "SVGAnimatedEnumeration": false, + "SVGAnimatedInteger": false, + "SVGAnimatedLength": false, + "SVGAnimatedLengthList": false, + "SVGAnimatedNumber": false, + "SVGAnimatedNumberList": false, + "SVGAnimatedPreserveAspectRatio": false, + "SVGAnimatedRect": false, + "SVGAnimatedString": false, + "SVGAnimatedTransformList": false, + "SVGAnimateElement": false, + "SVGAnimateMotionElement": false, + "SVGAnimateTransformElement": false, + "SVGAnimationElement": false, + "SVGCircleElement": false, + "SVGClipPathElement": false, + "SVGComponentTransferFunctionElement": false, + "SVGDefsElement": false, + "SVGDescElement": false, + "SVGElement": false, + "SVGEllipseElement": false, + "SVGFEBlendElement": false, + "SVGFEColorMatrixElement": false, + "SVGFEComponentTransferElement": false, + "SVGFECompositeElement": false, + "SVGFEConvolveMatrixElement": false, + "SVGFEDiffuseLightingElement": false, + "SVGFEDisplacementMapElement": false, + "SVGFEDistantLightElement": false, + "SVGFEDropShadowElement": false, + "SVGFEFloodElement": false, + "SVGFEFuncAElement": false, + "SVGFEFuncBElement": false, + "SVGFEFuncGElement": false, + "SVGFEFuncRElement": false, + "SVGFEGaussianBlurElement": false, + "SVGFEImageElement": false, + "SVGFEMergeElement": false, + "SVGFEMergeNodeElement": false, + "SVGFEMorphologyElement": false, + "SVGFEOffsetElement": false, + "SVGFEPointLightElement": false, + "SVGFESpecularLightingElement": false, + "SVGFESpotLightElement": false, + "SVGFETileElement": false, + "SVGFETurbulenceElement": false, + "SVGFilterElement": false, + "SVGForeignObjectElement": false, + "SVGGElement": false, + "SVGGeometryElement": false, + "SVGGradientElement": false, + "SVGGraphicsElement": false, + "SVGImageElement": false, + "SVGLength": false, + "SVGLengthList": false, + "SVGLinearGradientElement": false, + "SVGLineElement": false, + "SVGMarkerElement": false, + "SVGMaskElement": false, + "SVGMatrix": false, + "SVGMetadataElement": false, + "SVGMPathElement": false, + "SVGNumber": false, + "SVGNumberList": false, + "SVGPathElement": false, + "SVGPatternElement": false, + "SVGPoint": false, + "SVGPointList": false, + "SVGPolygonElement": false, + "SVGPolylineElement": false, + "SVGPreserveAspectRatio": false, + "SVGRadialGradientElement": false, + "SVGRect": false, + "SVGRectElement": false, + "SVGScriptElement": false, + "SVGSetElement": false, + "SVGStopElement": false, + "SVGStringList": false, + "SVGStyleElement": false, + "SVGSVGElement": false, + "SVGSwitchElement": false, + "SVGSymbolElement": false, + "SVGTextContentElement": false, + "SVGTextElement": false, + "SVGTextPathElement": false, + "SVGTextPositioningElement": false, + "SVGTitleElement": false, + "SVGTransform": false, + "SVGTransformList": false, + "SVGTSpanElement": false, + "SVGUnitTypes": false, + "SVGUseElement": false, + "SVGViewElement": false, + "SyncManager": false, + "TaskAttributionTiming": false, + "TaskController": false, + "TaskPriorityChangeEvent": false, + "TaskSignal": false, + "TEMPORARY": false, + "Text": false, + "TextDecoder": false, + "TextDecoderStream": false, + "TextEncoder": false, + "TextEncoderStream": false, + "TextEvent": false, + "TextFormat": false, + "TextFormatUpdateEvent": false, + "TextMetrics": false, + "TextTrack": false, + "TextTrackCue": false, + "TextTrackCueList": false, + "TextTrackList": false, + "TextUpdateEvent": false, + "TimeEvent": false, + "TimeRanges": false, + "ToggleEvent": false, + "toolbar": false, + "top": false, + "Touch": false, + "TouchEvent": false, + "TouchList": false, + "TrackEvent": false, + "TransformStream": false, + "TransformStreamDefaultController": false, + "TransitionEvent": false, + "Translator": false, + "TreeWalker": false, + "TrustedHTML": false, + "TrustedScript": false, + "TrustedScriptURL": false, + "TrustedTypePolicy": false, + "TrustedTypePolicyFactory": false, + "trustedTypes": false, + "UIEvent": false, + "URL": false, + "URLPattern": false, + "URLSearchParams": false, + "USB": false, + "USBAlternateInterface": false, + "USBConfiguration": false, + "USBConnectionEvent": false, + "USBDevice": false, + "USBEndpoint": false, + "USBInterface": false, + "USBInTransferResult": false, + "USBIsochronousInTransferPacket": false, + "USBIsochronousInTransferResult": false, + "USBIsochronousOutTransferPacket": false, + "USBIsochronousOutTransferResult": false, + "USBOutTransferResult": false, + "UserActivation": false, + "ValidityState": false, + "VideoColorSpace": false, + "VideoDecoder": false, + "VideoEncoder": false, + "VideoFrame": false, + "VideoPlaybackQuality": false, + "viewport": false, + "Viewport": false, + "ViewTimeline": false, + "ViewTransition": false, + "ViewTransitionTypeSet": false, + "VirtualKeyboard": false, + "VirtualKeyboardGeometryChangeEvent": false, + "VisibilityStateEntry": false, + "visualViewport": false, + "VisualViewport": false, + "VTTCue": false, + "VTTRegion": false, + "WakeLock": false, + "WakeLockSentinel": false, + "WaveShaperNode": false, + "WebAssembly": false, + "WebGL2RenderingContext": false, + "WebGLActiveInfo": false, + "WebGLBuffer": false, + "WebGLContextEvent": false, + "WebGLFramebuffer": false, + "WebGLObject": false, + "WebGLProgram": false, + "WebGLQuery": false, + "WebGLRenderbuffer": false, + "WebGLRenderingContext": false, + "WebGLSampler": false, + "WebGLShader": false, + "WebGLShaderPrecisionFormat": false, + "WebGLSync": false, + "WebGLTexture": false, + "WebGLTransformFeedback": false, + "WebGLUniformLocation": false, + "WebGLVertexArrayObject": false, + "WebSocket": false, + "WebSocketError": false, + "WebSocketStream": false, + "WebTransport": false, + "WebTransportBidirectionalStream": false, + "WebTransportDatagramDuplexStream": false, + "WebTransportError": false, + "WebTransportReceiveStream": false, + "WebTransportSendStream": false, + "WGSLLanguageFeatures": false, + "WheelEvent": false, + "when": false, + "window": false, + "Window": false, + "WindowControlsOverlay": false, + "WindowControlsOverlayGeometryChangeEvent": false, + "Worker": false, + "Worklet": false, + "WorkletGlobalScope": false, + "WritableStream": false, + "WritableStreamDefaultController": false, + "WritableStreamDefaultWriter": false, + "XMLDocument": false, + "XMLHttpRequest": false, + "XMLHttpRequestEventTarget": false, + "XMLHttpRequestUpload": false, + "XMLSerializer": false, + "XPathEvaluator": false, + "XPathExpression": false, + "XPathResult": false, + "XRAnchor": false, + "XRAnchorSet": false, + "XRBoundedReferenceSpace": false, + "XRCamera": false, + "XRCPUDepthInformation": false, + "XRDepthInformation": false, + "XRDOMOverlayState": false, + "XRFrame": false, + "XRHand": false, + "XRHitTestResult": false, + "XRHitTestSource": false, + "XRInputSource": false, + "XRInputSourceArray": false, + "XRInputSourceEvent": false, + "XRInputSourcesChangeEvent": false, + "XRJointPose": false, + "XRJointSpace": false, + "XRLayer": false, + "XRLightEstimate": false, + "XRLightProbe": false, + "XRPose": false, + "XRRay": false, + "XRReferenceSpace": false, + "XRReferenceSpaceEvent": false, + "XRRenderState": false, + "XRRigidTransform": false, + "XRSession": false, + "XRSessionEvent": false, + "XRSpace": false, + "XRSystem": false, + "XRTransientInputHitTestResult": false, + "XRTransientInputHitTestSource": false, + "XRView": false, + "XRViewerPose": false, + "XRViewport": false, + "XRWebGLBinding": false, + "XRWebGLDepthInformation": false, + "XRWebGLLayer": false, + "XSLTProcessor": false + } + }, + "errors": [ + { + "messageId": "impliedEval" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-implied-eval > invalid + +```js +window[`setInterval`]('foo') +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "globals": { + "AbortController": false, + "AbortSignal": false, + "AbsoluteOrientationSensor": false, + "AbstractRange": false, + "Accelerometer": false, + "addEventListener": false, + "ai": false, + "AI": false, + "AICreateMonitor": false, + "AITextSession": false, + "alert": false, + "AnalyserNode": false, + "Animation": false, + "AnimationEffect": false, + "AnimationEvent": false, + "AnimationPlaybackEvent": false, + "AnimationTimeline": false, + "AsyncDisposableStack": false, + "atob": false, + "Attr": false, + "Audio": false, + "AudioBuffer": false, + "AudioBufferSourceNode": false, + "AudioContext": false, + "AudioData": false, + "AudioDecoder": false, + "AudioDestinationNode": false, + "AudioEncoder": false, + "AudioListener": false, + "AudioNode": false, + "AudioParam": false, + "AudioParamMap": false, + "AudioProcessingEvent": false, + "AudioScheduledSourceNode": false, + "AudioSinkInfo": false, + "AudioWorklet": false, + "AudioWorkletGlobalScope": false, + "AudioWorkletNode": false, + "AudioWorkletProcessor": false, + "AuthenticatorAssertionResponse": false, + "AuthenticatorAttestationResponse": false, + "AuthenticatorResponse": false, + "BackgroundFetchManager": false, + "BackgroundFetchRecord": false, + "BackgroundFetchRegistration": false, + "BarcodeDetector": false, + "BarProp": false, + "BaseAudioContext": false, + "BatteryManager": false, + "BeforeUnloadEvent": false, + "BiquadFilterNode": false, + "Blob": false, + "BlobEvent": false, + "Bluetooth": false, + "BluetoothCharacteristicProperties": false, + "BluetoothDevice": false, + "BluetoothRemoteGATTCharacteristic": false, + "BluetoothRemoteGATTDescriptor": false, + "BluetoothRemoteGATTServer": false, + "BluetoothRemoteGATTService": false, + "BluetoothUUID": false, + "blur": false, + "BroadcastChannel": false, + "BrowserCaptureMediaStreamTrack": false, + "btoa": false, + "ByteLengthQueuingStrategy": false, + "Cache": false, + "caches": false, + "CacheStorage": false, + "cancelAnimationFrame": false, + "cancelIdleCallback": false, + "CanvasCaptureMediaStream": false, + "CanvasCaptureMediaStreamTrack": false, + "CanvasGradient": false, + "CanvasPattern": false, + "CanvasRenderingContext2D": false, + "CaptureController": false, + "CaretPosition": false, + "CDATASection": false, + "ChannelMergerNode": false, + "ChannelSplitterNode": false, + "ChapterInformation": false, + "CharacterBoundsUpdateEvent": false, + "CharacterData": false, + "clearInterval": false, + "clearTimeout": false, + "clientInformation": false, + "Clipboard": false, + "ClipboardChangeEvent": false, + "ClipboardEvent": false, + "ClipboardItem": false, + "close": false, + "closed": false, + "CloseEvent": false, + "CloseWatcher": false, + "CommandEvent": false, + "Comment": false, + "CompositionEvent": false, + "CompressionStream": false, + "confirm": false, + "console": false, + "ConstantSourceNode": false, + "ContentVisibilityAutoStateChangeEvent": false, + "ConvolverNode": false, + "CookieChangeEvent": false, + "CookieDeprecationLabel": false, + "cookieStore": false, + "CookieStore": false, + "CookieStoreManager": false, + "CountQueuingStrategy": false, + "createImageBitmap": false, + "CreateMonitor": false, + "Credential": false, + "credentialless": false, + "CredentialsContainer": false, + "CropTarget": false, + "crossOriginIsolated": false, + "crypto": false, + "Crypto": false, + "CryptoKey": false, + "CSPViolationReportBody": false, + "CSS": false, + "CSSAnimation": false, + "CSSConditionRule": false, + "CSSContainerRule": false, + "CSSCounterStyleRule": false, + "CSSFontFaceRule": false, + "CSSFontFeatureValuesRule": false, + "CSSFontPaletteValuesRule": false, + "CSSFunctionDeclarations": false, + "CSSFunctionDescriptors": false, + "CSSFunctionRule": false, + "CSSGroupingRule": false, + "CSSImageValue": false, + "CSSImportRule": false, + "CSSKeyframeRule": false, + "CSSKeyframesRule": false, + "CSSKeywordValue": false, + "CSSLayerBlockRule": false, + "CSSLayerStatementRule": false, + "CSSMarginRule": false, + "CSSMathClamp": false, + "CSSMathInvert": false, + "CSSMathMax": false, + "CSSMathMin": false, + "CSSMathNegate": false, + "CSSMathProduct": false, + "CSSMathSum": false, + "CSSMathValue": false, + "CSSMatrixComponent": false, + "CSSMediaRule": false, + "CSSNamespaceRule": false, + "CSSNestedDeclarations": false, + "CSSNumericArray": false, + "CSSNumericValue": false, + "CSSPageDescriptors": false, + "CSSPageRule": false, + "CSSPerspective": false, + "CSSPositionTryDescriptors": false, + "CSSPositionTryRule": false, + "CSSPositionValue": false, + "CSSPropertyRule": false, + "CSSRotate": false, + "CSSRule": false, + "CSSRuleList": false, + "CSSScale": false, + "CSSScopeRule": false, + "CSSSkew": false, + "CSSSkewX": false, + "CSSSkewY": false, + "CSSStartingStyleRule": false, + "CSSStyleDeclaration": false, + "CSSStyleRule": false, + "CSSStyleSheet": false, + "CSSStyleValue": false, + "CSSSupportsRule": false, + "CSSTransformComponent": false, + "CSSTransformValue": false, + "CSSTransition": false, + "CSSTranslate": false, + "CSSUnitValue": false, + "CSSUnparsedValue": false, + "CSSVariableReferenceValue": false, + "CSSViewTransitionRule": false, + "currentFrame": false, + "currentTime": false, + "CustomElementRegistry": false, + "customElements": false, + "CustomEvent": false, + "CustomStateSet": false, + "DataTransfer": false, + "DataTransferItem": false, + "DataTransferItemList": false, + "DecompressionStream": false, + "DelayNode": false, + "DelegatedInkTrailPresenter": false, + "DeviceMotionEvent": false, + "DeviceMotionEventAcceleration": false, + "DeviceMotionEventRotationRate": false, + "DeviceOrientationEvent": false, + "devicePixelRatio": false, + "DevicePosture": false, + "DigitalCredential": false, + "dispatchEvent": false, + "DisposableStack": false, + "document": false, + "Document": false, + "DocumentFragment": false, + "documentPictureInPicture": false, + "DocumentPictureInPicture": false, + "DocumentPictureInPictureEvent": false, + "DocumentTimeline": false, + "DocumentType": false, + "DOMError": false, + "DOMException": false, + "DOMImplementation": false, + "DOMMatrix": false, + "DOMMatrixReadOnly": false, + "DOMParser": false, + "DOMPoint": false, + "DOMPointReadOnly": false, + "DOMQuad": false, + "DOMRect": false, + "DOMRectList": false, + "DOMRectReadOnly": false, + "DOMStringList": false, + "DOMStringMap": false, + "DOMTokenList": false, + "DragEvent": false, + "DynamicsCompressorNode": false, + "EditContext": false, + "Element": false, + "ElementInternals": false, + "EncodedAudioChunk": false, + "EncodedVideoChunk": false, + "ErrorEvent": false, + "event": false, + "Event": false, + "EventCounts": false, + "EventSource": false, + "EventTarget": false, + "external": false, + "External": false, + "EyeDropper": false, + "FeaturePolicy": false, + "FederatedCredential": false, + "fence": false, + "Fence": false, + "FencedFrameConfig": false, + "fetch": false, + "fetchLater": false, + "FetchLaterResult": false, + "File": false, + "FileList": false, + "FileReader": false, + "FileSystem": false, + "FileSystemDirectoryEntry": false, + "FileSystemDirectoryHandle": false, + "FileSystemDirectoryReader": false, + "FileSystemEntry": false, + "FileSystemFileEntry": false, + "FileSystemFileHandle": false, + "FileSystemHandle": false, + "FileSystemObserver": false, + "FileSystemWritableFileStream": false, + "find": false, + "focus": false, + "FocusEvent": false, + "FontData": false, + "FontFace": false, + "FontFaceSet": false, + "FontFaceSetLoadEvent": false, + "FormData": false, + "FormDataEvent": false, + "FragmentDirective": false, + "frameElement": false, + "frames": false, + "GainNode": false, + "Gamepad": false, + "GamepadAxisMoveEvent": false, + "GamepadButton": false, + "GamepadButtonEvent": false, + "GamepadEvent": false, + "GamepadHapticActuator": false, + "GamepadPose": false, + "Geolocation": false, + "GeolocationCoordinates": false, + "GeolocationPosition": false, + "GeolocationPositionError": false, + "getComputedStyle": false, + "getScreenDetails": false, + "getSelection": false, + "GPU": false, + "GPUAdapter": false, + "GPUAdapterInfo": false, + "GPUBindGroup": false, + "GPUBindGroupLayout": false, + "GPUBuffer": false, + "GPUBufferUsage": false, + "GPUCanvasContext": false, + "GPUColorWrite": false, + "GPUCommandBuffer": false, + "GPUCommandEncoder": false, + "GPUCompilationInfo": false, + "GPUCompilationMessage": false, + "GPUComputePassEncoder": false, + "GPUComputePipeline": false, + "GPUDevice": false, + "GPUDeviceLostInfo": false, + "GPUError": false, + "GPUExternalTexture": false, + "GPUInternalError": false, + "GPUMapMode": false, + "GPUOutOfMemoryError": false, + "GPUPipelineError": false, + "GPUPipelineLayout": false, + "GPUQuerySet": false, + "GPUQueue": false, + "GPURenderBundle": false, + "GPURenderBundleEncoder": false, + "GPURenderPassEncoder": false, + "GPURenderPipeline": false, + "GPUSampler": false, + "GPUShaderModule": false, + "GPUShaderStage": false, + "GPUSupportedFeatures": false, + "GPUSupportedLimits": false, + "GPUTexture": false, + "GPUTextureUsage": false, + "GPUTextureView": false, + "GPUUncapturedErrorEvent": false, + "GPUValidationError": false, + "GravitySensor": false, + "Gyroscope": false, + "HashChangeEvent": false, + "Headers": false, + "HID": false, + "HIDConnectionEvent": false, + "HIDDevice": false, + "HIDInputReportEvent": false, + "Highlight": false, + "HighlightRegistry": false, + "history": false, + "History": false, + "HTMLAllCollection": false, + "HTMLAnchorElement": false, + "HTMLAreaElement": false, + "HTMLAudioElement": false, + "HTMLBaseElement": false, + "HTMLBodyElement": false, + "HTMLBRElement": false, + "HTMLButtonElement": false, + "HTMLCanvasElement": false, + "HTMLCollection": false, + "HTMLDataElement": false, + "HTMLDataListElement": false, + "HTMLDetailsElement": false, + "HTMLDialogElement": false, + "HTMLDirectoryElement": false, + "HTMLDivElement": false, + "HTMLDListElement": false, + "HTMLDocument": false, + "HTMLElement": false, + "HTMLEmbedElement": false, + "HTMLFencedFrameElement": false, + "HTMLFieldSetElement": false, + "HTMLFontElement": false, + "HTMLFormControlsCollection": false, + "HTMLFormElement": false, + "HTMLFrameElement": false, + "HTMLFrameSetElement": false, + "HTMLHeadElement": false, + "HTMLHeadingElement": false, + "HTMLHRElement": false, + "HTMLHtmlElement": false, + "HTMLIFrameElement": false, + "HTMLImageElement": false, + "HTMLInputElement": false, + "HTMLLabelElement": false, + "HTMLLegendElement": false, + "HTMLLIElement": false, + "HTMLLinkElement": false, + "HTMLMapElement": false, + "HTMLMarqueeElement": false, + "HTMLMediaElement": false, + "HTMLMenuElement": false, + "HTMLMetaElement": false, + "HTMLMeterElement": false, + "HTMLModElement": false, + "HTMLObjectElement": false, + "HTMLOListElement": false, + "HTMLOptGroupElement": false, + "HTMLOptionElement": false, + "HTMLOptionsCollection": false, + "HTMLOutputElement": false, + "HTMLParagraphElement": false, + "HTMLParamElement": false, + "HTMLPictureElement": false, + "HTMLPreElement": false, + "HTMLProgressElement": false, + "HTMLQuoteElement": false, + "HTMLScriptElement": false, + "HTMLSelectedContentElement": false, + "HTMLSelectElement": false, + "HTMLSlotElement": false, + "HTMLSourceElement": false, + "HTMLSpanElement": false, + "HTMLStyleElement": false, + "HTMLTableCaptionElement": false, + "HTMLTableCellElement": false, + "HTMLTableColElement": false, + "HTMLTableElement": false, + "HTMLTableRowElement": false, + "HTMLTableSectionElement": false, + "HTMLTemplateElement": false, + "HTMLTextAreaElement": false, + "HTMLTimeElement": false, + "HTMLTitleElement": false, + "HTMLTrackElement": false, + "HTMLUListElement": false, + "HTMLUnknownElement": false, + "HTMLVideoElement": false, + "IDBCursor": false, + "IDBCursorWithValue": false, + "IDBDatabase": false, + "IDBFactory": false, + "IDBIndex": false, + "IDBKeyRange": false, + "IDBObjectStore": false, + "IDBOpenDBRequest": false, + "IDBRecord": false, + "IDBRequest": false, + "IDBTransaction": false, + "IDBVersionChangeEvent": false, + "IdentityCredential": false, + "IdentityCredentialError": false, + "IdentityProvider": false, + "IdleDeadline": false, + "IdleDetector": false, + "IIRFilterNode": false, + "Image": false, + "ImageBitmap": false, + "ImageBitmapRenderingContext": false, + "ImageCapture": false, + "ImageData": false, + "ImageDecoder": false, + "ImageTrack": false, + "ImageTrackList": false, + "indexedDB": false, + "Ink": false, + "innerHeight": false, + "innerWidth": false, + "InputDeviceCapabilities": false, + "InputDeviceInfo": false, + "InputEvent": false, + "IntegrityViolationReportBody": false, + "InterestEvent": false, + "IntersectionObserver": false, + "IntersectionObserverEntry": false, + "isSecureContext": false, + "Keyboard": false, + "KeyboardEvent": false, + "KeyboardLayoutMap": false, + "KeyframeEffect": false, + "LanguageDetector": false, + "LargestContentfulPaint": false, + "LaunchParams": false, + "launchQueue": false, + "LaunchQueue": false, + "LayoutShift": false, + "LayoutShiftAttribution": false, + "length": false, + "LinearAccelerationSensor": false, + "localStorage": false, + "location": true, + "Location": false, + "locationbar": false, + "Lock": false, + "LockManager": false, + "matchMedia": false, + "MathMLElement": false, + "MediaCapabilities": false, + "MediaCapabilitiesInfo": false, + "MediaDeviceInfo": false, + "MediaDevices": false, + "MediaElementAudioSourceNode": false, + "MediaEncryptedEvent": false, + "MediaError": false, + "MediaKeyError": false, + "MediaKeyMessageEvent": false, + "MediaKeys": false, + "MediaKeySession": false, + "MediaKeyStatusMap": false, + "MediaKeySystemAccess": false, + "MediaList": false, + "MediaMetadata": false, + "MediaQueryList": false, + "MediaQueryListEvent": false, + "MediaRecorder": false, + "MediaRecorderErrorEvent": false, + "MediaSession": false, + "MediaSource": false, + "MediaSourceHandle": false, + "MediaStream": false, + "MediaStreamAudioDestinationNode": false, + "MediaStreamAudioSourceNode": false, + "MediaStreamEvent": false, + "MediaStreamTrack": false, + "MediaStreamTrackAudioSourceNode": false, + "MediaStreamTrackAudioStats": false, + "MediaStreamTrackEvent": false, + "MediaStreamTrackGenerator": false, + "MediaStreamTrackProcessor": false, + "MediaStreamTrackVideoStats": false, + "menubar": false, + "MessageChannel": false, + "MessageEvent": false, + "MessagePort": false, + "MIDIAccess": false, + "MIDIConnectionEvent": false, + "MIDIInput": false, + "MIDIInputMap": false, + "MIDIMessageEvent": false, + "MIDIOutput": false, + "MIDIOutputMap": false, + "MIDIPort": false, + "MimeType": false, + "MimeTypeArray": false, + "model": false, + "ModelGenericSession": false, + "ModelManager": false, + "MouseEvent": false, + "moveBy": false, + "moveTo": false, + "MutationEvent": false, + "MutationObserver": false, + "MutationRecord": false, + "name": false, + "NamedNodeMap": false, + "NavigateEvent": false, + "navigation": false, + "Navigation": false, + "NavigationActivation": false, + "NavigationCurrentEntryChangeEvent": false, + "NavigationDestination": false, + "NavigationHistoryEntry": false, + "NavigationPrecommitController": false, + "NavigationPreloadManager": false, + "NavigationTransition": false, + "navigator": false, + "Navigator": false, + "NavigatorLogin": false, + "NavigatorManagedData": false, + "NavigatorUAData": false, + "NetworkInformation": false, + "Node": false, + "NodeFilter": false, + "NodeIterator": false, + "NodeList": false, + "Notification": false, + "NotifyPaintEvent": false, + "NotRestoredReasonDetails": false, + "NotRestoredReasons": false, + "Observable": false, + "OfflineAudioCompletionEvent": false, + "OfflineAudioContext": false, + "offscreenBuffering": false, + "OffscreenCanvas": false, + "OffscreenCanvasRenderingContext2D": false, + "onabort": true, + "onafterprint": true, + "onanimationcancel": true, + "onanimationend": true, + "onanimationiteration": true, + "onanimationstart": true, + "onappinstalled": true, + "onauxclick": true, + "onbeforeinput": true, + "onbeforeinstallprompt": true, + "onbeforematch": true, + "onbeforeprint": true, + "onbeforetoggle": true, + "onbeforeunload": true, + "onbeforexrselect": true, + "onblur": true, + "oncancel": true, + "oncanplay": true, + "oncanplaythrough": true, + "onchange": true, + "onclick": true, + "onclose": true, + "oncommand": true, + "oncontentvisibilityautostatechange": true, + "oncontextlost": true, + "oncontextmenu": true, + "oncontextrestored": true, + "oncopy": true, + "oncuechange": true, + "oncut": true, + "ondblclick": true, + "ondevicemotion": true, + "ondeviceorientation": true, + "ondeviceorientationabsolute": true, + "ondrag": true, + "ondragend": true, + "ondragenter": true, + "ondragleave": true, + "ondragover": true, + "ondragstart": true, + "ondrop": true, + "ondurationchange": true, + "onemptied": true, + "onended": true, + "onerror": true, + "onfocus": true, + "onformdata": true, + "ongamepadconnected": true, + "ongamepaddisconnected": true, + "ongotpointercapture": true, + "onhashchange": true, + "oninput": true, + "oninvalid": true, + "onkeydown": true, + "onkeypress": true, + "onkeyup": true, + "onlanguagechange": true, + "onload": true, + "onloadeddata": true, + "onloadedmetadata": true, + "onloadstart": true, + "onlostpointercapture": true, + "onmessage": true, + "onmessageerror": true, + "onmousedown": true, + "onmouseenter": true, + "onmouseleave": true, + "onmousemove": true, + "onmouseout": true, + "onmouseover": true, + "onmouseup": true, + "onmousewheel": true, + "onoffline": true, + "ononline": true, + "onpagehide": true, + "onpagereveal": true, + "onpageshow": true, + "onpageswap": true, + "onpaste": true, + "onpause": true, + "onplay": true, + "onplaying": true, + "onpointercancel": true, + "onpointerdown": true, + "onpointerenter": true, + "onpointerleave": true, + "onpointermove": true, + "onpointerout": true, + "onpointerover": true, + "onpointerrawupdate": true, + "onpointerup": true, + "onpopstate": true, + "onprogress": true, + "onratechange": true, + "onrejectionhandled": true, + "onreset": true, + "onresize": true, + "onscroll": true, + "onscrollend": true, + "onscrollsnapchange": true, + "onscrollsnapchanging": true, + "onsearch": true, + "onsecuritypolicyviolation": true, + "onseeked": true, + "onseeking": true, + "onselect": true, + "onselectionchange": true, + "onselectstart": true, + "onslotchange": true, + "onstalled": true, + "onstorage": true, + "onsubmit": true, + "onsuspend": true, + "ontimeupdate": true, + "ontoggle": true, + "ontransitioncancel": true, + "ontransitionend": true, + "ontransitionrun": true, + "ontransitionstart": true, + "onunhandledrejection": true, + "onunload": true, + "onvolumechange": true, + "onwaiting": true, + "onwheel": true, + "open": false, + "opener": false, + "Option": false, + "OrientationSensor": false, + "origin": false, + "originAgentCluster": false, + "OscillatorNode": false, + "OTPCredential": false, + "outerHeight": false, + "outerWidth": false, + "OverconstrainedError": false, + "PageRevealEvent": false, + "PageSwapEvent": false, + "PageTransitionEvent": false, + "pageXOffset": false, + "pageYOffset": false, + "PannerNode": false, + "parent": false, + "PasswordCredential": false, + "Path2D": false, + "PaymentAddress": false, + "PaymentManager": false, + "PaymentMethodChangeEvent": false, + "PaymentRequest": false, + "PaymentRequestUpdateEvent": false, + "PaymentResponse": false, + "performance": false, + "Performance": false, + "PerformanceElementTiming": false, + "PerformanceEntry": false, + "PerformanceEventTiming": false, + "PerformanceLongAnimationFrameTiming": false, + "PerformanceLongTaskTiming": false, + "PerformanceMark": false, + "PerformanceMeasure": false, + "PerformanceNavigation": false, + "PerformanceNavigationTiming": false, + "PerformanceObserver": false, + "PerformanceObserverEntryList": false, + "PerformancePaintTiming": false, + "PerformanceResourceTiming": false, + "PerformanceScriptTiming": false, + "PerformanceServerTiming": false, + "PerformanceTiming": false, + "PeriodicSyncManager": false, + "PeriodicWave": false, + "Permissions": false, + "PermissionStatus": false, + "PERSISTENT": false, + "personalbar": false, + "PictureInPictureEvent": false, + "PictureInPictureWindow": false, + "Plugin": false, + "PluginArray": false, + "PointerEvent": false, + "PopStateEvent": false, + "postMessage": false, + "Presentation": false, + "PresentationAvailability": false, + "PresentationConnection": false, + "PresentationConnectionAvailableEvent": false, + "PresentationConnectionCloseEvent": false, + "PresentationConnectionList": false, + "PresentationReceiver": false, + "PresentationRequest": false, + "PressureObserver": false, + "PressureRecord": false, + "print": false, + "ProcessingInstruction": false, + "Profiler": false, + "ProgressEvent": false, + "PromiseRejectionEvent": false, + "prompt": false, + "ProtectedAudience": false, + "PublicKeyCredential": false, + "PushManager": false, + "PushSubscription": false, + "PushSubscriptionOptions": false, + "queryLocalFonts": false, + "queueMicrotask": false, + "QuotaExceededError": false, + "RadioNodeList": false, + "Range": false, + "ReadableByteStreamController": false, + "ReadableStream": false, + "ReadableStreamBYOBReader": false, + "ReadableStreamBYOBRequest": false, + "ReadableStreamDefaultController": false, + "ReadableStreamDefaultReader": false, + "registerProcessor": false, + "RelativeOrientationSensor": false, + "RemotePlayback": false, + "removeEventListener": false, + "ReportBody": false, + "reportError": false, + "ReportingObserver": false, + "Request": false, + "requestAnimationFrame": false, + "requestIdleCallback": false, + "resizeBy": false, + "ResizeObserver": false, + "ResizeObserverEntry": false, + "ResizeObserverSize": false, + "resizeTo": false, + "Response": false, + "RestrictionTarget": false, + "RTCCertificate": false, + "RTCDataChannel": false, + "RTCDataChannelEvent": false, + "RTCDtlsTransport": false, + "RTCDTMFSender": false, + "RTCDTMFToneChangeEvent": false, + "RTCEncodedAudioFrame": false, + "RTCEncodedVideoFrame": false, + "RTCError": false, + "RTCErrorEvent": false, + "RTCIceCandidate": false, + "RTCIceTransport": false, + "RTCPeerConnection": false, + "RTCPeerConnectionIceErrorEvent": false, + "RTCPeerConnectionIceEvent": false, + "RTCRtpReceiver": false, + "RTCRtpScriptTransform": false, + "RTCRtpSender": false, + "RTCRtpTransceiver": false, + "RTCSctpTransport": false, + "RTCSessionDescription": false, + "RTCStatsReport": false, + "RTCTrackEvent": false, + "sampleRate": false, + "scheduler": false, + "Scheduler": false, + "Scheduling": false, + "screen": false, + "Screen": false, + "ScreenDetailed": false, + "ScreenDetails": false, + "screenLeft": false, + "ScreenOrientation": false, + "screenTop": false, + "screenX": false, + "screenY": false, + "ScriptProcessorNode": false, + "scroll": false, + "scrollbars": false, + "scrollBy": false, + "ScrollTimeline": false, + "scrollTo": false, + "scrollX": false, + "scrollY": false, + "SecurityPolicyViolationEvent": false, + "Selection": false, + "self": false, + "Sensor": false, + "SensorErrorEvent": false, + "Serial": false, + "SerialPort": false, + "ServiceWorker": false, + "ServiceWorkerContainer": false, + "ServiceWorkerRegistration": false, + "sessionStorage": false, + "setInterval": false, + "setTimeout": false, + "ShadowRoot": false, + "sharedStorage": false, + "SharedStorage": false, + "SharedStorageAppendMethod": false, + "SharedStorageClearMethod": false, + "SharedStorageDeleteMethod": false, + "SharedStorageModifierMethod": false, + "SharedStorageSetMethod": false, + "SharedStorageWorklet": false, + "SharedWorker": false, + "showDirectoryPicker": false, + "showOpenFilePicker": false, + "showSaveFilePicker": false, + "SnapEvent": false, + "SourceBuffer": false, + "SourceBufferList": false, + "SpeechGrammar": false, + "SpeechGrammarList": false, + "SpeechRecognition": false, + "SpeechRecognitionErrorEvent": false, + "SpeechRecognitionEvent": false, + "SpeechRecognitionPhrase": false, + "speechSynthesis": false, + "SpeechSynthesis": false, + "SpeechSynthesisErrorEvent": false, + "SpeechSynthesisEvent": false, + "SpeechSynthesisUtterance": false, + "SpeechSynthesisVoice": false, + "StaticRange": false, + "status": false, + "statusbar": false, + "StereoPannerNode": false, + "stop": false, + "Storage": false, + "StorageBucket": false, + "StorageBucketManager": false, + "StorageEvent": false, + "StorageManager": false, + "structuredClone": false, + "styleMedia": false, + "StylePropertyMap": false, + "StylePropertyMapReadOnly": false, + "StyleSheet": false, + "StyleSheetList": false, + "SubmitEvent": false, + "Subscriber": false, + "SubtleCrypto": false, + "Summarizer": false, + "SuppressedError": false, + "SVGAElement": false, + "SVGAngle": false, + "SVGAnimatedAngle": false, + "SVGAnimatedBoolean": false, + "SVGAnimatedEnumeration": false, + "SVGAnimatedInteger": false, + "SVGAnimatedLength": false, + "SVGAnimatedLengthList": false, + "SVGAnimatedNumber": false, + "SVGAnimatedNumberList": false, + "SVGAnimatedPreserveAspectRatio": false, + "SVGAnimatedRect": false, + "SVGAnimatedString": false, + "SVGAnimatedTransformList": false, + "SVGAnimateElement": false, + "SVGAnimateMotionElement": false, + "SVGAnimateTransformElement": false, + "SVGAnimationElement": false, + "SVGCircleElement": false, + "SVGClipPathElement": false, + "SVGComponentTransferFunctionElement": false, + "SVGDefsElement": false, + "SVGDescElement": false, + "SVGElement": false, + "SVGEllipseElement": false, + "SVGFEBlendElement": false, + "SVGFEColorMatrixElement": false, + "SVGFEComponentTransferElement": false, + "SVGFECompositeElement": false, + "SVGFEConvolveMatrixElement": false, + "SVGFEDiffuseLightingElement": false, + "SVGFEDisplacementMapElement": false, + "SVGFEDistantLightElement": false, + "SVGFEDropShadowElement": false, + "SVGFEFloodElement": false, + "SVGFEFuncAElement": false, + "SVGFEFuncBElement": false, + "SVGFEFuncGElement": false, + "SVGFEFuncRElement": false, + "SVGFEGaussianBlurElement": false, + "SVGFEImageElement": false, + "SVGFEMergeElement": false, + "SVGFEMergeNodeElement": false, + "SVGFEMorphologyElement": false, + "SVGFEOffsetElement": false, + "SVGFEPointLightElement": false, + "SVGFESpecularLightingElement": false, + "SVGFESpotLightElement": false, + "SVGFETileElement": false, + "SVGFETurbulenceElement": false, + "SVGFilterElement": false, + "SVGForeignObjectElement": false, + "SVGGElement": false, + "SVGGeometryElement": false, + "SVGGradientElement": false, + "SVGGraphicsElement": false, + "SVGImageElement": false, + "SVGLength": false, + "SVGLengthList": false, + "SVGLinearGradientElement": false, + "SVGLineElement": false, + "SVGMarkerElement": false, + "SVGMaskElement": false, + "SVGMatrix": false, + "SVGMetadataElement": false, + "SVGMPathElement": false, + "SVGNumber": false, + "SVGNumberList": false, + "SVGPathElement": false, + "SVGPatternElement": false, + "SVGPoint": false, + "SVGPointList": false, + "SVGPolygonElement": false, + "SVGPolylineElement": false, + "SVGPreserveAspectRatio": false, + "SVGRadialGradientElement": false, + "SVGRect": false, + "SVGRectElement": false, + "SVGScriptElement": false, + "SVGSetElement": false, + "SVGStopElement": false, + "SVGStringList": false, + "SVGStyleElement": false, + "SVGSVGElement": false, + "SVGSwitchElement": false, + "SVGSymbolElement": false, + "SVGTextContentElement": false, + "SVGTextElement": false, + "SVGTextPathElement": false, + "SVGTextPositioningElement": false, + "SVGTitleElement": false, + "SVGTransform": false, + "SVGTransformList": false, + "SVGTSpanElement": false, + "SVGUnitTypes": false, + "SVGUseElement": false, + "SVGViewElement": false, + "SyncManager": false, + "TaskAttributionTiming": false, + "TaskController": false, + "TaskPriorityChangeEvent": false, + "TaskSignal": false, + "TEMPORARY": false, + "Text": false, + "TextDecoder": false, + "TextDecoderStream": false, + "TextEncoder": false, + "TextEncoderStream": false, + "TextEvent": false, + "TextFormat": false, + "TextFormatUpdateEvent": false, + "TextMetrics": false, + "TextTrack": false, + "TextTrackCue": false, + "TextTrackCueList": false, + "TextTrackList": false, + "TextUpdateEvent": false, + "TimeEvent": false, + "TimeRanges": false, + "ToggleEvent": false, + "toolbar": false, + "top": false, + "Touch": false, + "TouchEvent": false, + "TouchList": false, + "TrackEvent": false, + "TransformStream": false, + "TransformStreamDefaultController": false, + "TransitionEvent": false, + "Translator": false, + "TreeWalker": false, + "TrustedHTML": false, + "TrustedScript": false, + "TrustedScriptURL": false, + "TrustedTypePolicy": false, + "TrustedTypePolicyFactory": false, + "trustedTypes": false, + "UIEvent": false, + "URL": false, + "URLPattern": false, + "URLSearchParams": false, + "USB": false, + "USBAlternateInterface": false, + "USBConfiguration": false, + "USBConnectionEvent": false, + "USBDevice": false, + "USBEndpoint": false, + "USBInterface": false, + "USBInTransferResult": false, + "USBIsochronousInTransferPacket": false, + "USBIsochronousInTransferResult": false, + "USBIsochronousOutTransferPacket": false, + "USBIsochronousOutTransferResult": false, + "USBOutTransferResult": false, + "UserActivation": false, + "ValidityState": false, + "VideoColorSpace": false, + "VideoDecoder": false, + "VideoEncoder": false, + "VideoFrame": false, + "VideoPlaybackQuality": false, + "viewport": false, + "Viewport": false, + "ViewTimeline": false, + "ViewTransition": false, + "ViewTransitionTypeSet": false, + "VirtualKeyboard": false, + "VirtualKeyboardGeometryChangeEvent": false, + "VisibilityStateEntry": false, + "visualViewport": false, + "VisualViewport": false, + "VTTCue": false, + "VTTRegion": false, + "WakeLock": false, + "WakeLockSentinel": false, + "WaveShaperNode": false, + "WebAssembly": false, + "WebGL2RenderingContext": false, + "WebGLActiveInfo": false, + "WebGLBuffer": false, + "WebGLContextEvent": false, + "WebGLFramebuffer": false, + "WebGLObject": false, + "WebGLProgram": false, + "WebGLQuery": false, + "WebGLRenderbuffer": false, + "WebGLRenderingContext": false, + "WebGLSampler": false, + "WebGLShader": false, + "WebGLShaderPrecisionFormat": false, + "WebGLSync": false, + "WebGLTexture": false, + "WebGLTransformFeedback": false, + "WebGLUniformLocation": false, + "WebGLVertexArrayObject": false, + "WebSocket": false, + "WebSocketError": false, + "WebSocketStream": false, + "WebTransport": false, + "WebTransportBidirectionalStream": false, + "WebTransportDatagramDuplexStream": false, + "WebTransportError": false, + "WebTransportReceiveStream": false, + "WebTransportSendStream": false, + "WGSLLanguageFeatures": false, + "WheelEvent": false, + "when": false, + "window": false, + "Window": false, + "WindowControlsOverlay": false, + "WindowControlsOverlayGeometryChangeEvent": false, + "Worker": false, + "Worklet": false, + "WorkletGlobalScope": false, + "WritableStream": false, + "WritableStreamDefaultController": false, + "WritableStreamDefaultWriter": false, + "XMLDocument": false, + "XMLHttpRequest": false, + "XMLHttpRequestEventTarget": false, + "XMLHttpRequestUpload": false, + "XMLSerializer": false, + "XPathEvaluator": false, + "XPathExpression": false, + "XPathResult": false, + "XRAnchor": false, + "XRAnchorSet": false, + "XRBoundedReferenceSpace": false, + "XRCamera": false, + "XRCPUDepthInformation": false, + "XRDepthInformation": false, + "XRDOMOverlayState": false, + "XRFrame": false, + "XRHand": false, + "XRHitTestResult": false, + "XRHitTestSource": false, + "XRInputSource": false, + "XRInputSourceArray": false, + "XRInputSourceEvent": false, + "XRInputSourcesChangeEvent": false, + "XRJointPose": false, + "XRJointSpace": false, + "XRLayer": false, + "XRLightEstimate": false, + "XRLightProbe": false, + "XRPose": false, + "XRRay": false, + "XRReferenceSpace": false, + "XRReferenceSpaceEvent": false, + "XRRenderState": false, + "XRRigidTransform": false, + "XRSession": false, + "XRSessionEvent": false, + "XRSpace": false, + "XRSystem": false, + "XRTransientInputHitTestResult": false, + "XRTransientInputHitTestSource": false, + "XRView": false, + "XRViewerPose": false, + "XRViewport": false, + "XRWebGLBinding": false, + "XRWebGLDepthInformation": false, + "XRWebGLLayer": false, + "XSLTProcessor": false + } + }, + "errors": [ + { + "messageId": "impliedEval" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-implied-eval > invalid + +```js +window['execScript']('foo') +``` + +```json +{ + "languageOptions": { + "globals": { + "AbortController": false, + "AbortSignal": false, + "AbsoluteOrientationSensor": false, + "AbstractRange": false, + "Accelerometer": false, + "addEventListener": false, + "ai": false, + "AI": false, + "AICreateMonitor": false, + "AITextSession": false, + "alert": false, + "AnalyserNode": false, + "Animation": false, + "AnimationEffect": false, + "AnimationEvent": false, + "AnimationPlaybackEvent": false, + "AnimationTimeline": false, + "AsyncDisposableStack": false, + "atob": false, + "Attr": false, + "Audio": false, + "AudioBuffer": false, + "AudioBufferSourceNode": false, + "AudioContext": false, + "AudioData": false, + "AudioDecoder": false, + "AudioDestinationNode": false, + "AudioEncoder": false, + "AudioListener": false, + "AudioNode": false, + "AudioParam": false, + "AudioParamMap": false, + "AudioProcessingEvent": false, + "AudioScheduledSourceNode": false, + "AudioSinkInfo": false, + "AudioWorklet": false, + "AudioWorkletGlobalScope": false, + "AudioWorkletNode": false, + "AudioWorkletProcessor": false, + "AuthenticatorAssertionResponse": false, + "AuthenticatorAttestationResponse": false, + "AuthenticatorResponse": false, + "BackgroundFetchManager": false, + "BackgroundFetchRecord": false, + "BackgroundFetchRegistration": false, + "BarcodeDetector": false, + "BarProp": false, + "BaseAudioContext": false, + "BatteryManager": false, + "BeforeUnloadEvent": false, + "BiquadFilterNode": false, + "Blob": false, + "BlobEvent": false, + "Bluetooth": false, + "BluetoothCharacteristicProperties": false, + "BluetoothDevice": false, + "BluetoothRemoteGATTCharacteristic": false, + "BluetoothRemoteGATTDescriptor": false, + "BluetoothRemoteGATTServer": false, + "BluetoothRemoteGATTService": false, + "BluetoothUUID": false, + "blur": false, + "BroadcastChannel": false, + "BrowserCaptureMediaStreamTrack": false, + "btoa": false, + "ByteLengthQueuingStrategy": false, + "Cache": false, + "caches": false, + "CacheStorage": false, + "cancelAnimationFrame": false, + "cancelIdleCallback": false, + "CanvasCaptureMediaStream": false, + "CanvasCaptureMediaStreamTrack": false, + "CanvasGradient": false, + "CanvasPattern": false, + "CanvasRenderingContext2D": false, + "CaptureController": false, + "CaretPosition": false, + "CDATASection": false, + "ChannelMergerNode": false, + "ChannelSplitterNode": false, + "ChapterInformation": false, + "CharacterBoundsUpdateEvent": false, + "CharacterData": false, + "clearInterval": false, + "clearTimeout": false, + "clientInformation": false, + "Clipboard": false, + "ClipboardChangeEvent": false, + "ClipboardEvent": false, + "ClipboardItem": false, + "close": false, + "closed": false, + "CloseEvent": false, + "CloseWatcher": false, + "CommandEvent": false, + "Comment": false, + "CompositionEvent": false, + "CompressionStream": false, + "confirm": false, + "console": false, + "ConstantSourceNode": false, + "ContentVisibilityAutoStateChangeEvent": false, + "ConvolverNode": false, + "CookieChangeEvent": false, + "CookieDeprecationLabel": false, + "cookieStore": false, + "CookieStore": false, + "CookieStoreManager": false, + "CountQueuingStrategy": false, + "createImageBitmap": false, + "CreateMonitor": false, + "Credential": false, + "credentialless": false, + "CredentialsContainer": false, + "CropTarget": false, + "crossOriginIsolated": false, + "crypto": false, + "Crypto": false, + "CryptoKey": false, + "CSPViolationReportBody": false, + "CSS": false, + "CSSAnimation": false, + "CSSConditionRule": false, + "CSSContainerRule": false, + "CSSCounterStyleRule": false, + "CSSFontFaceRule": false, + "CSSFontFeatureValuesRule": false, + "CSSFontPaletteValuesRule": false, + "CSSFunctionDeclarations": false, + "CSSFunctionDescriptors": false, + "CSSFunctionRule": false, + "CSSGroupingRule": false, + "CSSImageValue": false, + "CSSImportRule": false, + "CSSKeyframeRule": false, + "CSSKeyframesRule": false, + "CSSKeywordValue": false, + "CSSLayerBlockRule": false, + "CSSLayerStatementRule": false, + "CSSMarginRule": false, + "CSSMathClamp": false, + "CSSMathInvert": false, + "CSSMathMax": false, + "CSSMathMin": false, + "CSSMathNegate": false, + "CSSMathProduct": false, + "CSSMathSum": false, + "CSSMathValue": false, + "CSSMatrixComponent": false, + "CSSMediaRule": false, + "CSSNamespaceRule": false, + "CSSNestedDeclarations": false, + "CSSNumericArray": false, + "CSSNumericValue": false, + "CSSPageDescriptors": false, + "CSSPageRule": false, + "CSSPerspective": false, + "CSSPositionTryDescriptors": false, + "CSSPositionTryRule": false, + "CSSPositionValue": false, + "CSSPropertyRule": false, + "CSSRotate": false, + "CSSRule": false, + "CSSRuleList": false, + "CSSScale": false, + "CSSScopeRule": false, + "CSSSkew": false, + "CSSSkewX": false, + "CSSSkewY": false, + "CSSStartingStyleRule": false, + "CSSStyleDeclaration": false, + "CSSStyleRule": false, + "CSSStyleSheet": false, + "CSSStyleValue": false, + "CSSSupportsRule": false, + "CSSTransformComponent": false, + "CSSTransformValue": false, + "CSSTransition": false, + "CSSTranslate": false, + "CSSUnitValue": false, + "CSSUnparsedValue": false, + "CSSVariableReferenceValue": false, + "CSSViewTransitionRule": false, + "currentFrame": false, + "currentTime": false, + "CustomElementRegistry": false, + "customElements": false, + "CustomEvent": false, + "CustomStateSet": false, + "DataTransfer": false, + "DataTransferItem": false, + "DataTransferItemList": false, + "DecompressionStream": false, + "DelayNode": false, + "DelegatedInkTrailPresenter": false, + "DeviceMotionEvent": false, + "DeviceMotionEventAcceleration": false, + "DeviceMotionEventRotationRate": false, + "DeviceOrientationEvent": false, + "devicePixelRatio": false, + "DevicePosture": false, + "DigitalCredential": false, + "dispatchEvent": false, + "DisposableStack": false, + "document": false, + "Document": false, + "DocumentFragment": false, + "documentPictureInPicture": false, + "DocumentPictureInPicture": false, + "DocumentPictureInPictureEvent": false, + "DocumentTimeline": false, + "DocumentType": false, + "DOMError": false, + "DOMException": false, + "DOMImplementation": false, + "DOMMatrix": false, + "DOMMatrixReadOnly": false, + "DOMParser": false, + "DOMPoint": false, + "DOMPointReadOnly": false, + "DOMQuad": false, + "DOMRect": false, + "DOMRectList": false, + "DOMRectReadOnly": false, + "DOMStringList": false, + "DOMStringMap": false, + "DOMTokenList": false, + "DragEvent": false, + "DynamicsCompressorNode": false, + "EditContext": false, + "Element": false, + "ElementInternals": false, + "EncodedAudioChunk": false, + "EncodedVideoChunk": false, + "ErrorEvent": false, + "event": false, + "Event": false, + "EventCounts": false, + "EventSource": false, + "EventTarget": false, + "external": false, + "External": false, + "EyeDropper": false, + "FeaturePolicy": false, + "FederatedCredential": false, + "fence": false, + "Fence": false, + "FencedFrameConfig": false, + "fetch": false, + "fetchLater": false, + "FetchLaterResult": false, + "File": false, + "FileList": false, + "FileReader": false, + "FileSystem": false, + "FileSystemDirectoryEntry": false, + "FileSystemDirectoryHandle": false, + "FileSystemDirectoryReader": false, + "FileSystemEntry": false, + "FileSystemFileEntry": false, + "FileSystemFileHandle": false, + "FileSystemHandle": false, + "FileSystemObserver": false, + "FileSystemWritableFileStream": false, + "find": false, + "focus": false, + "FocusEvent": false, + "FontData": false, + "FontFace": false, + "FontFaceSet": false, + "FontFaceSetLoadEvent": false, + "FormData": false, + "FormDataEvent": false, + "FragmentDirective": false, + "frameElement": false, + "frames": false, + "GainNode": false, + "Gamepad": false, + "GamepadAxisMoveEvent": false, + "GamepadButton": false, + "GamepadButtonEvent": false, + "GamepadEvent": false, + "GamepadHapticActuator": false, + "GamepadPose": false, + "Geolocation": false, + "GeolocationCoordinates": false, + "GeolocationPosition": false, + "GeolocationPositionError": false, + "getComputedStyle": false, + "getScreenDetails": false, + "getSelection": false, + "GPU": false, + "GPUAdapter": false, + "GPUAdapterInfo": false, + "GPUBindGroup": false, + "GPUBindGroupLayout": false, + "GPUBuffer": false, + "GPUBufferUsage": false, + "GPUCanvasContext": false, + "GPUColorWrite": false, + "GPUCommandBuffer": false, + "GPUCommandEncoder": false, + "GPUCompilationInfo": false, + "GPUCompilationMessage": false, + "GPUComputePassEncoder": false, + "GPUComputePipeline": false, + "GPUDevice": false, + "GPUDeviceLostInfo": false, + "GPUError": false, + "GPUExternalTexture": false, + "GPUInternalError": false, + "GPUMapMode": false, + "GPUOutOfMemoryError": false, + "GPUPipelineError": false, + "GPUPipelineLayout": false, + "GPUQuerySet": false, + "GPUQueue": false, + "GPURenderBundle": false, + "GPURenderBundleEncoder": false, + "GPURenderPassEncoder": false, + "GPURenderPipeline": false, + "GPUSampler": false, + "GPUShaderModule": false, + "GPUShaderStage": false, + "GPUSupportedFeatures": false, + "GPUSupportedLimits": false, + "GPUTexture": false, + "GPUTextureUsage": false, + "GPUTextureView": false, + "GPUUncapturedErrorEvent": false, + "GPUValidationError": false, + "GravitySensor": false, + "Gyroscope": false, + "HashChangeEvent": false, + "Headers": false, + "HID": false, + "HIDConnectionEvent": false, + "HIDDevice": false, + "HIDInputReportEvent": false, + "Highlight": false, + "HighlightRegistry": false, + "history": false, + "History": false, + "HTMLAllCollection": false, + "HTMLAnchorElement": false, + "HTMLAreaElement": false, + "HTMLAudioElement": false, + "HTMLBaseElement": false, + "HTMLBodyElement": false, + "HTMLBRElement": false, + "HTMLButtonElement": false, + "HTMLCanvasElement": false, + "HTMLCollection": false, + "HTMLDataElement": false, + "HTMLDataListElement": false, + "HTMLDetailsElement": false, + "HTMLDialogElement": false, + "HTMLDirectoryElement": false, + "HTMLDivElement": false, + "HTMLDListElement": false, + "HTMLDocument": false, + "HTMLElement": false, + "HTMLEmbedElement": false, + "HTMLFencedFrameElement": false, + "HTMLFieldSetElement": false, + "HTMLFontElement": false, + "HTMLFormControlsCollection": false, + "HTMLFormElement": false, + "HTMLFrameElement": false, + "HTMLFrameSetElement": false, + "HTMLHeadElement": false, + "HTMLHeadingElement": false, + "HTMLHRElement": false, + "HTMLHtmlElement": false, + "HTMLIFrameElement": false, + "HTMLImageElement": false, + "HTMLInputElement": false, + "HTMLLabelElement": false, + "HTMLLegendElement": false, + "HTMLLIElement": false, + "HTMLLinkElement": false, + "HTMLMapElement": false, + "HTMLMarqueeElement": false, + "HTMLMediaElement": false, + "HTMLMenuElement": false, + "HTMLMetaElement": false, + "HTMLMeterElement": false, + "HTMLModElement": false, + "HTMLObjectElement": false, + "HTMLOListElement": false, + "HTMLOptGroupElement": false, + "HTMLOptionElement": false, + "HTMLOptionsCollection": false, + "HTMLOutputElement": false, + "HTMLParagraphElement": false, + "HTMLParamElement": false, + "HTMLPictureElement": false, + "HTMLPreElement": false, + "HTMLProgressElement": false, + "HTMLQuoteElement": false, + "HTMLScriptElement": false, + "HTMLSelectedContentElement": false, + "HTMLSelectElement": false, + "HTMLSlotElement": false, + "HTMLSourceElement": false, + "HTMLSpanElement": false, + "HTMLStyleElement": false, + "HTMLTableCaptionElement": false, + "HTMLTableCellElement": false, + "HTMLTableColElement": false, + "HTMLTableElement": false, + "HTMLTableRowElement": false, + "HTMLTableSectionElement": false, + "HTMLTemplateElement": false, + "HTMLTextAreaElement": false, + "HTMLTimeElement": false, + "HTMLTitleElement": false, + "HTMLTrackElement": false, + "HTMLUListElement": false, + "HTMLUnknownElement": false, + "HTMLVideoElement": false, + "IDBCursor": false, + "IDBCursorWithValue": false, + "IDBDatabase": false, + "IDBFactory": false, + "IDBIndex": false, + "IDBKeyRange": false, + "IDBObjectStore": false, + "IDBOpenDBRequest": false, + "IDBRecord": false, + "IDBRequest": false, + "IDBTransaction": false, + "IDBVersionChangeEvent": false, + "IdentityCredential": false, + "IdentityCredentialError": false, + "IdentityProvider": false, + "IdleDeadline": false, + "IdleDetector": false, + "IIRFilterNode": false, + "Image": false, + "ImageBitmap": false, + "ImageBitmapRenderingContext": false, + "ImageCapture": false, + "ImageData": false, + "ImageDecoder": false, + "ImageTrack": false, + "ImageTrackList": false, + "indexedDB": false, + "Ink": false, + "innerHeight": false, + "innerWidth": false, + "InputDeviceCapabilities": false, + "InputDeviceInfo": false, + "InputEvent": false, + "IntegrityViolationReportBody": false, + "InterestEvent": false, + "IntersectionObserver": false, + "IntersectionObserverEntry": false, + "isSecureContext": false, + "Keyboard": false, + "KeyboardEvent": false, + "KeyboardLayoutMap": false, + "KeyframeEffect": false, + "LanguageDetector": false, + "LargestContentfulPaint": false, + "LaunchParams": false, + "launchQueue": false, + "LaunchQueue": false, + "LayoutShift": false, + "LayoutShiftAttribution": false, + "length": false, + "LinearAccelerationSensor": false, + "localStorage": false, + "location": true, + "Location": false, + "locationbar": false, + "Lock": false, + "LockManager": false, + "matchMedia": false, + "MathMLElement": false, + "MediaCapabilities": false, + "MediaCapabilitiesInfo": false, + "MediaDeviceInfo": false, + "MediaDevices": false, + "MediaElementAudioSourceNode": false, + "MediaEncryptedEvent": false, + "MediaError": false, + "MediaKeyError": false, + "MediaKeyMessageEvent": false, + "MediaKeys": false, + "MediaKeySession": false, + "MediaKeyStatusMap": false, + "MediaKeySystemAccess": false, + "MediaList": false, + "MediaMetadata": false, + "MediaQueryList": false, + "MediaQueryListEvent": false, + "MediaRecorder": false, + "MediaRecorderErrorEvent": false, + "MediaSession": false, + "MediaSource": false, + "MediaSourceHandle": false, + "MediaStream": false, + "MediaStreamAudioDestinationNode": false, + "MediaStreamAudioSourceNode": false, + "MediaStreamEvent": false, + "MediaStreamTrack": false, + "MediaStreamTrackAudioSourceNode": false, + "MediaStreamTrackAudioStats": false, + "MediaStreamTrackEvent": false, + "MediaStreamTrackGenerator": false, + "MediaStreamTrackProcessor": false, + "MediaStreamTrackVideoStats": false, + "menubar": false, + "MessageChannel": false, + "MessageEvent": false, + "MessagePort": false, + "MIDIAccess": false, + "MIDIConnectionEvent": false, + "MIDIInput": false, + "MIDIInputMap": false, + "MIDIMessageEvent": false, + "MIDIOutput": false, + "MIDIOutputMap": false, + "MIDIPort": false, + "MimeType": false, + "MimeTypeArray": false, + "model": false, + "ModelGenericSession": false, + "ModelManager": false, + "MouseEvent": false, + "moveBy": false, + "moveTo": false, + "MutationEvent": false, + "MutationObserver": false, + "MutationRecord": false, + "name": false, + "NamedNodeMap": false, + "NavigateEvent": false, + "navigation": false, + "Navigation": false, + "NavigationActivation": false, + "NavigationCurrentEntryChangeEvent": false, + "NavigationDestination": false, + "NavigationHistoryEntry": false, + "NavigationPrecommitController": false, + "NavigationPreloadManager": false, + "NavigationTransition": false, + "navigator": false, + "Navigator": false, + "NavigatorLogin": false, + "NavigatorManagedData": false, + "NavigatorUAData": false, + "NetworkInformation": false, + "Node": false, + "NodeFilter": false, + "NodeIterator": false, + "NodeList": false, + "Notification": false, + "NotifyPaintEvent": false, + "NotRestoredReasonDetails": false, + "NotRestoredReasons": false, + "Observable": false, + "OfflineAudioCompletionEvent": false, + "OfflineAudioContext": false, + "offscreenBuffering": false, + "OffscreenCanvas": false, + "OffscreenCanvasRenderingContext2D": false, + "onabort": true, + "onafterprint": true, + "onanimationcancel": true, + "onanimationend": true, + "onanimationiteration": true, + "onanimationstart": true, + "onappinstalled": true, + "onauxclick": true, + "onbeforeinput": true, + "onbeforeinstallprompt": true, + "onbeforematch": true, + "onbeforeprint": true, + "onbeforetoggle": true, + "onbeforeunload": true, + "onbeforexrselect": true, + "onblur": true, + "oncancel": true, + "oncanplay": true, + "oncanplaythrough": true, + "onchange": true, + "onclick": true, + "onclose": true, + "oncommand": true, + "oncontentvisibilityautostatechange": true, + "oncontextlost": true, + "oncontextmenu": true, + "oncontextrestored": true, + "oncopy": true, + "oncuechange": true, + "oncut": true, + "ondblclick": true, + "ondevicemotion": true, + "ondeviceorientation": true, + "ondeviceorientationabsolute": true, + "ondrag": true, + "ondragend": true, + "ondragenter": true, + "ondragleave": true, + "ondragover": true, + "ondragstart": true, + "ondrop": true, + "ondurationchange": true, + "onemptied": true, + "onended": true, + "onerror": true, + "onfocus": true, + "onformdata": true, + "ongamepadconnected": true, + "ongamepaddisconnected": true, + "ongotpointercapture": true, + "onhashchange": true, + "oninput": true, + "oninvalid": true, + "onkeydown": true, + "onkeypress": true, + "onkeyup": true, + "onlanguagechange": true, + "onload": true, + "onloadeddata": true, + "onloadedmetadata": true, + "onloadstart": true, + "onlostpointercapture": true, + "onmessage": true, + "onmessageerror": true, + "onmousedown": true, + "onmouseenter": true, + "onmouseleave": true, + "onmousemove": true, + "onmouseout": true, + "onmouseover": true, + "onmouseup": true, + "onmousewheel": true, + "onoffline": true, + "ononline": true, + "onpagehide": true, + "onpagereveal": true, + "onpageshow": true, + "onpageswap": true, + "onpaste": true, + "onpause": true, + "onplay": true, + "onplaying": true, + "onpointercancel": true, + "onpointerdown": true, + "onpointerenter": true, + "onpointerleave": true, + "onpointermove": true, + "onpointerout": true, + "onpointerover": true, + "onpointerrawupdate": true, + "onpointerup": true, + "onpopstate": true, + "onprogress": true, + "onratechange": true, + "onrejectionhandled": true, + "onreset": true, + "onresize": true, + "onscroll": true, + "onscrollend": true, + "onscrollsnapchange": true, + "onscrollsnapchanging": true, + "onsearch": true, + "onsecuritypolicyviolation": true, + "onseeked": true, + "onseeking": true, + "onselect": true, + "onselectionchange": true, + "onselectstart": true, + "onslotchange": true, + "onstalled": true, + "onstorage": true, + "onsubmit": true, + "onsuspend": true, + "ontimeupdate": true, + "ontoggle": true, + "ontransitioncancel": true, + "ontransitionend": true, + "ontransitionrun": true, + "ontransitionstart": true, + "onunhandledrejection": true, + "onunload": true, + "onvolumechange": true, + "onwaiting": true, + "onwheel": true, + "open": false, + "opener": false, + "Option": false, + "OrientationSensor": false, + "origin": false, + "originAgentCluster": false, + "OscillatorNode": false, + "OTPCredential": false, + "outerHeight": false, + "outerWidth": false, + "OverconstrainedError": false, + "PageRevealEvent": false, + "PageSwapEvent": false, + "PageTransitionEvent": false, + "pageXOffset": false, + "pageYOffset": false, + "PannerNode": false, + "parent": false, + "PasswordCredential": false, + "Path2D": false, + "PaymentAddress": false, + "PaymentManager": false, + "PaymentMethodChangeEvent": false, + "PaymentRequest": false, + "PaymentRequestUpdateEvent": false, + "PaymentResponse": false, + "performance": false, + "Performance": false, + "PerformanceElementTiming": false, + "PerformanceEntry": false, + "PerformanceEventTiming": false, + "PerformanceLongAnimationFrameTiming": false, + "PerformanceLongTaskTiming": false, + "PerformanceMark": false, + "PerformanceMeasure": false, + "PerformanceNavigation": false, + "PerformanceNavigationTiming": false, + "PerformanceObserver": false, + "PerformanceObserverEntryList": false, + "PerformancePaintTiming": false, + "PerformanceResourceTiming": false, + "PerformanceScriptTiming": false, + "PerformanceServerTiming": false, + "PerformanceTiming": false, + "PeriodicSyncManager": false, + "PeriodicWave": false, + "Permissions": false, + "PermissionStatus": false, + "PERSISTENT": false, + "personalbar": false, + "PictureInPictureEvent": false, + "PictureInPictureWindow": false, + "Plugin": false, + "PluginArray": false, + "PointerEvent": false, + "PopStateEvent": false, + "postMessage": false, + "Presentation": false, + "PresentationAvailability": false, + "PresentationConnection": false, + "PresentationConnectionAvailableEvent": false, + "PresentationConnectionCloseEvent": false, + "PresentationConnectionList": false, + "PresentationReceiver": false, + "PresentationRequest": false, + "PressureObserver": false, + "PressureRecord": false, + "print": false, + "ProcessingInstruction": false, + "Profiler": false, + "ProgressEvent": false, + "PromiseRejectionEvent": false, + "prompt": false, + "ProtectedAudience": false, + "PublicKeyCredential": false, + "PushManager": false, + "PushSubscription": false, + "PushSubscriptionOptions": false, + "queryLocalFonts": false, + "queueMicrotask": false, + "QuotaExceededError": false, + "RadioNodeList": false, + "Range": false, + "ReadableByteStreamController": false, + "ReadableStream": false, + "ReadableStreamBYOBReader": false, + "ReadableStreamBYOBRequest": false, + "ReadableStreamDefaultController": false, + "ReadableStreamDefaultReader": false, + "registerProcessor": false, + "RelativeOrientationSensor": false, + "RemotePlayback": false, + "removeEventListener": false, + "ReportBody": false, + "reportError": false, + "ReportingObserver": false, + "Request": false, + "requestAnimationFrame": false, + "requestIdleCallback": false, + "resizeBy": false, + "ResizeObserver": false, + "ResizeObserverEntry": false, + "ResizeObserverSize": false, + "resizeTo": false, + "Response": false, + "RestrictionTarget": false, + "RTCCertificate": false, + "RTCDataChannel": false, + "RTCDataChannelEvent": false, + "RTCDtlsTransport": false, + "RTCDTMFSender": false, + "RTCDTMFToneChangeEvent": false, + "RTCEncodedAudioFrame": false, + "RTCEncodedVideoFrame": false, + "RTCError": false, + "RTCErrorEvent": false, + "RTCIceCandidate": false, + "RTCIceTransport": false, + "RTCPeerConnection": false, + "RTCPeerConnectionIceErrorEvent": false, + "RTCPeerConnectionIceEvent": false, + "RTCRtpReceiver": false, + "RTCRtpScriptTransform": false, + "RTCRtpSender": false, + "RTCRtpTransceiver": false, + "RTCSctpTransport": false, + "RTCSessionDescription": false, + "RTCStatsReport": false, + "RTCTrackEvent": false, + "sampleRate": false, + "scheduler": false, + "Scheduler": false, + "Scheduling": false, + "screen": false, + "Screen": false, + "ScreenDetailed": false, + "ScreenDetails": false, + "screenLeft": false, + "ScreenOrientation": false, + "screenTop": false, + "screenX": false, + "screenY": false, + "ScriptProcessorNode": false, + "scroll": false, + "scrollbars": false, + "scrollBy": false, + "ScrollTimeline": false, + "scrollTo": false, + "scrollX": false, + "scrollY": false, + "SecurityPolicyViolationEvent": false, + "Selection": false, + "self": false, + "Sensor": false, + "SensorErrorEvent": false, + "Serial": false, + "SerialPort": false, + "ServiceWorker": false, + "ServiceWorkerContainer": false, + "ServiceWorkerRegistration": false, + "sessionStorage": false, + "setInterval": false, + "setTimeout": false, + "ShadowRoot": false, + "sharedStorage": false, + "SharedStorage": false, + "SharedStorageAppendMethod": false, + "SharedStorageClearMethod": false, + "SharedStorageDeleteMethod": false, + "SharedStorageModifierMethod": false, + "SharedStorageSetMethod": false, + "SharedStorageWorklet": false, + "SharedWorker": false, + "showDirectoryPicker": false, + "showOpenFilePicker": false, + "showSaveFilePicker": false, + "SnapEvent": false, + "SourceBuffer": false, + "SourceBufferList": false, + "SpeechGrammar": false, + "SpeechGrammarList": false, + "SpeechRecognition": false, + "SpeechRecognitionErrorEvent": false, + "SpeechRecognitionEvent": false, + "SpeechRecognitionPhrase": false, + "speechSynthesis": false, + "SpeechSynthesis": false, + "SpeechSynthesisErrorEvent": false, + "SpeechSynthesisEvent": false, + "SpeechSynthesisUtterance": false, + "SpeechSynthesisVoice": false, + "StaticRange": false, + "status": false, + "statusbar": false, + "StereoPannerNode": false, + "stop": false, + "Storage": false, + "StorageBucket": false, + "StorageBucketManager": false, + "StorageEvent": false, + "StorageManager": false, + "structuredClone": false, + "styleMedia": false, + "StylePropertyMap": false, + "StylePropertyMapReadOnly": false, + "StyleSheet": false, + "StyleSheetList": false, + "SubmitEvent": false, + "Subscriber": false, + "SubtleCrypto": false, + "Summarizer": false, + "SuppressedError": false, + "SVGAElement": false, + "SVGAngle": false, + "SVGAnimatedAngle": false, + "SVGAnimatedBoolean": false, + "SVGAnimatedEnumeration": false, + "SVGAnimatedInteger": false, + "SVGAnimatedLength": false, + "SVGAnimatedLengthList": false, + "SVGAnimatedNumber": false, + "SVGAnimatedNumberList": false, + "SVGAnimatedPreserveAspectRatio": false, + "SVGAnimatedRect": false, + "SVGAnimatedString": false, + "SVGAnimatedTransformList": false, + "SVGAnimateElement": false, + "SVGAnimateMotionElement": false, + "SVGAnimateTransformElement": false, + "SVGAnimationElement": false, + "SVGCircleElement": false, + "SVGClipPathElement": false, + "SVGComponentTransferFunctionElement": false, + "SVGDefsElement": false, + "SVGDescElement": false, + "SVGElement": false, + "SVGEllipseElement": false, + "SVGFEBlendElement": false, + "SVGFEColorMatrixElement": false, + "SVGFEComponentTransferElement": false, + "SVGFECompositeElement": false, + "SVGFEConvolveMatrixElement": false, + "SVGFEDiffuseLightingElement": false, + "SVGFEDisplacementMapElement": false, + "SVGFEDistantLightElement": false, + "SVGFEDropShadowElement": false, + "SVGFEFloodElement": false, + "SVGFEFuncAElement": false, + "SVGFEFuncBElement": false, + "SVGFEFuncGElement": false, + "SVGFEFuncRElement": false, + "SVGFEGaussianBlurElement": false, + "SVGFEImageElement": false, + "SVGFEMergeElement": false, + "SVGFEMergeNodeElement": false, + "SVGFEMorphologyElement": false, + "SVGFEOffsetElement": false, + "SVGFEPointLightElement": false, + "SVGFESpecularLightingElement": false, + "SVGFESpotLightElement": false, + "SVGFETileElement": false, + "SVGFETurbulenceElement": false, + "SVGFilterElement": false, + "SVGForeignObjectElement": false, + "SVGGElement": false, + "SVGGeometryElement": false, + "SVGGradientElement": false, + "SVGGraphicsElement": false, + "SVGImageElement": false, + "SVGLength": false, + "SVGLengthList": false, + "SVGLinearGradientElement": false, + "SVGLineElement": false, + "SVGMarkerElement": false, + "SVGMaskElement": false, + "SVGMatrix": false, + "SVGMetadataElement": false, + "SVGMPathElement": false, + "SVGNumber": false, + "SVGNumberList": false, + "SVGPathElement": false, + "SVGPatternElement": false, + "SVGPoint": false, + "SVGPointList": false, + "SVGPolygonElement": false, + "SVGPolylineElement": false, + "SVGPreserveAspectRatio": false, + "SVGRadialGradientElement": false, + "SVGRect": false, + "SVGRectElement": false, + "SVGScriptElement": false, + "SVGSetElement": false, + "SVGStopElement": false, + "SVGStringList": false, + "SVGStyleElement": false, + "SVGSVGElement": false, + "SVGSwitchElement": false, + "SVGSymbolElement": false, + "SVGTextContentElement": false, + "SVGTextElement": false, + "SVGTextPathElement": false, + "SVGTextPositioningElement": false, + "SVGTitleElement": false, + "SVGTransform": false, + "SVGTransformList": false, + "SVGTSpanElement": false, + "SVGUnitTypes": false, + "SVGUseElement": false, + "SVGViewElement": false, + "SyncManager": false, + "TaskAttributionTiming": false, + "TaskController": false, + "TaskPriorityChangeEvent": false, + "TaskSignal": false, + "TEMPORARY": false, + "Text": false, + "TextDecoder": false, + "TextDecoderStream": false, + "TextEncoder": false, + "TextEncoderStream": false, + "TextEvent": false, + "TextFormat": false, + "TextFormatUpdateEvent": false, + "TextMetrics": false, + "TextTrack": false, + "TextTrackCue": false, + "TextTrackCueList": false, + "TextTrackList": false, + "TextUpdateEvent": false, + "TimeEvent": false, + "TimeRanges": false, + "ToggleEvent": false, + "toolbar": false, + "top": false, + "Touch": false, + "TouchEvent": false, + "TouchList": false, + "TrackEvent": false, + "TransformStream": false, + "TransformStreamDefaultController": false, + "TransitionEvent": false, + "Translator": false, + "TreeWalker": false, + "TrustedHTML": false, + "TrustedScript": false, + "TrustedScriptURL": false, + "TrustedTypePolicy": false, + "TrustedTypePolicyFactory": false, + "trustedTypes": false, + "UIEvent": false, + "URL": false, + "URLPattern": false, + "URLSearchParams": false, + "USB": false, + "USBAlternateInterface": false, + "USBConfiguration": false, + "USBConnectionEvent": false, + "USBDevice": false, + "USBEndpoint": false, + "USBInterface": false, + "USBInTransferResult": false, + "USBIsochronousInTransferPacket": false, + "USBIsochronousInTransferResult": false, + "USBIsochronousOutTransferPacket": false, + "USBIsochronousOutTransferResult": false, + "USBOutTransferResult": false, + "UserActivation": false, + "ValidityState": false, + "VideoColorSpace": false, + "VideoDecoder": false, + "VideoEncoder": false, + "VideoFrame": false, + "VideoPlaybackQuality": false, + "viewport": false, + "Viewport": false, + "ViewTimeline": false, + "ViewTransition": false, + "ViewTransitionTypeSet": false, + "VirtualKeyboard": false, + "VirtualKeyboardGeometryChangeEvent": false, + "VisibilityStateEntry": false, + "visualViewport": false, + "VisualViewport": false, + "VTTCue": false, + "VTTRegion": false, + "WakeLock": false, + "WakeLockSentinel": false, + "WaveShaperNode": false, + "WebAssembly": false, + "WebGL2RenderingContext": false, + "WebGLActiveInfo": false, + "WebGLBuffer": false, + "WebGLContextEvent": false, + "WebGLFramebuffer": false, + "WebGLObject": false, + "WebGLProgram": false, + "WebGLQuery": false, + "WebGLRenderbuffer": false, + "WebGLRenderingContext": false, + "WebGLSampler": false, + "WebGLShader": false, + "WebGLShaderPrecisionFormat": false, + "WebGLSync": false, + "WebGLTexture": false, + "WebGLTransformFeedback": false, + "WebGLUniformLocation": false, + "WebGLVertexArrayObject": false, + "WebSocket": false, + "WebSocketError": false, + "WebSocketStream": false, + "WebTransport": false, + "WebTransportBidirectionalStream": false, + "WebTransportDatagramDuplexStream": false, + "WebTransportError": false, + "WebTransportReceiveStream": false, + "WebTransportSendStream": false, + "WGSLLanguageFeatures": false, + "WheelEvent": false, + "when": false, + "window": false, + "Window": false, + "WindowControlsOverlay": false, + "WindowControlsOverlayGeometryChangeEvent": false, + "Worker": false, + "Worklet": false, + "WorkletGlobalScope": false, + "WritableStream": false, + "WritableStreamDefaultController": false, + "WritableStreamDefaultWriter": false, + "XMLDocument": false, + "XMLHttpRequest": false, + "XMLHttpRequestEventTarget": false, + "XMLHttpRequestUpload": false, + "XMLSerializer": false, + "XPathEvaluator": false, + "XPathExpression": false, + "XPathResult": false, + "XRAnchor": false, + "XRAnchorSet": false, + "XRBoundedReferenceSpace": false, + "XRCamera": false, + "XRCPUDepthInformation": false, + "XRDepthInformation": false, + "XRDOMOverlayState": false, + "XRFrame": false, + "XRHand": false, + "XRHitTestResult": false, + "XRHitTestSource": false, + "XRInputSource": false, + "XRInputSourceArray": false, + "XRInputSourceEvent": false, + "XRInputSourcesChangeEvent": false, + "XRJointPose": false, + "XRJointSpace": false, + "XRLayer": false, + "XRLightEstimate": false, + "XRLightProbe": false, + "XRPose": false, + "XRRay": false, + "XRReferenceSpace": false, + "XRReferenceSpaceEvent": false, + "XRRenderState": false, + "XRRigidTransform": false, + "XRSession": false, + "XRSessionEvent": false, + "XRSpace": false, + "XRSystem": false, + "XRTransientInputHitTestResult": false, + "XRTransientInputHitTestSource": false, + "XRView": false, + "XRViewerPose": false, + "XRViewport": false, + "XRWebGLBinding": false, + "XRWebGLDepthInformation": false, + "XRWebGLLayer": false, + "XSLTProcessor": false + } + }, + "errors": [ + { + "messageId": "execScript" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-implied-eval > invalid + +```js +window[`execScript`]('foo') +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "globals": { + "AbortController": false, + "AbortSignal": false, + "AbsoluteOrientationSensor": false, + "AbstractRange": false, + "Accelerometer": false, + "addEventListener": false, + "ai": false, + "AI": false, + "AICreateMonitor": false, + "AITextSession": false, + "alert": false, + "AnalyserNode": false, + "Animation": false, + "AnimationEffect": false, + "AnimationEvent": false, + "AnimationPlaybackEvent": false, + "AnimationTimeline": false, + "AsyncDisposableStack": false, + "atob": false, + "Attr": false, + "Audio": false, + "AudioBuffer": false, + "AudioBufferSourceNode": false, + "AudioContext": false, + "AudioData": false, + "AudioDecoder": false, + "AudioDestinationNode": false, + "AudioEncoder": false, + "AudioListener": false, + "AudioNode": false, + "AudioParam": false, + "AudioParamMap": false, + "AudioProcessingEvent": false, + "AudioScheduledSourceNode": false, + "AudioSinkInfo": false, + "AudioWorklet": false, + "AudioWorkletGlobalScope": false, + "AudioWorkletNode": false, + "AudioWorkletProcessor": false, + "AuthenticatorAssertionResponse": false, + "AuthenticatorAttestationResponse": false, + "AuthenticatorResponse": false, + "BackgroundFetchManager": false, + "BackgroundFetchRecord": false, + "BackgroundFetchRegistration": false, + "BarcodeDetector": false, + "BarProp": false, + "BaseAudioContext": false, + "BatteryManager": false, + "BeforeUnloadEvent": false, + "BiquadFilterNode": false, + "Blob": false, + "BlobEvent": false, + "Bluetooth": false, + "BluetoothCharacteristicProperties": false, + "BluetoothDevice": false, + "BluetoothRemoteGATTCharacteristic": false, + "BluetoothRemoteGATTDescriptor": false, + "BluetoothRemoteGATTServer": false, + "BluetoothRemoteGATTService": false, + "BluetoothUUID": false, + "blur": false, + "BroadcastChannel": false, + "BrowserCaptureMediaStreamTrack": false, + "btoa": false, + "ByteLengthQueuingStrategy": false, + "Cache": false, + "caches": false, + "CacheStorage": false, + "cancelAnimationFrame": false, + "cancelIdleCallback": false, + "CanvasCaptureMediaStream": false, + "CanvasCaptureMediaStreamTrack": false, + "CanvasGradient": false, + "CanvasPattern": false, + "CanvasRenderingContext2D": false, + "CaptureController": false, + "CaretPosition": false, + "CDATASection": false, + "ChannelMergerNode": false, + "ChannelSplitterNode": false, + "ChapterInformation": false, + "CharacterBoundsUpdateEvent": false, + "CharacterData": false, + "clearInterval": false, + "clearTimeout": false, + "clientInformation": false, + "Clipboard": false, + "ClipboardChangeEvent": false, + "ClipboardEvent": false, + "ClipboardItem": false, + "close": false, + "closed": false, + "CloseEvent": false, + "CloseWatcher": false, + "CommandEvent": false, + "Comment": false, + "CompositionEvent": false, + "CompressionStream": false, + "confirm": false, + "console": false, + "ConstantSourceNode": false, + "ContentVisibilityAutoStateChangeEvent": false, + "ConvolverNode": false, + "CookieChangeEvent": false, + "CookieDeprecationLabel": false, + "cookieStore": false, + "CookieStore": false, + "CookieStoreManager": false, + "CountQueuingStrategy": false, + "createImageBitmap": false, + "CreateMonitor": false, + "Credential": false, + "credentialless": false, + "CredentialsContainer": false, + "CropTarget": false, + "crossOriginIsolated": false, + "crypto": false, + "Crypto": false, + "CryptoKey": false, + "CSPViolationReportBody": false, + "CSS": false, + "CSSAnimation": false, + "CSSConditionRule": false, + "CSSContainerRule": false, + "CSSCounterStyleRule": false, + "CSSFontFaceRule": false, + "CSSFontFeatureValuesRule": false, + "CSSFontPaletteValuesRule": false, + "CSSFunctionDeclarations": false, + "CSSFunctionDescriptors": false, + "CSSFunctionRule": false, + "CSSGroupingRule": false, + "CSSImageValue": false, + "CSSImportRule": false, + "CSSKeyframeRule": false, + "CSSKeyframesRule": false, + "CSSKeywordValue": false, + "CSSLayerBlockRule": false, + "CSSLayerStatementRule": false, + "CSSMarginRule": false, + "CSSMathClamp": false, + "CSSMathInvert": false, + "CSSMathMax": false, + "CSSMathMin": false, + "CSSMathNegate": false, + "CSSMathProduct": false, + "CSSMathSum": false, + "CSSMathValue": false, + "CSSMatrixComponent": false, + "CSSMediaRule": false, + "CSSNamespaceRule": false, + "CSSNestedDeclarations": false, + "CSSNumericArray": false, + "CSSNumericValue": false, + "CSSPageDescriptors": false, + "CSSPageRule": false, + "CSSPerspective": false, + "CSSPositionTryDescriptors": false, + "CSSPositionTryRule": false, + "CSSPositionValue": false, + "CSSPropertyRule": false, + "CSSRotate": false, + "CSSRule": false, + "CSSRuleList": false, + "CSSScale": false, + "CSSScopeRule": false, + "CSSSkew": false, + "CSSSkewX": false, + "CSSSkewY": false, + "CSSStartingStyleRule": false, + "CSSStyleDeclaration": false, + "CSSStyleRule": false, + "CSSStyleSheet": false, + "CSSStyleValue": false, + "CSSSupportsRule": false, + "CSSTransformComponent": false, + "CSSTransformValue": false, + "CSSTransition": false, + "CSSTranslate": false, + "CSSUnitValue": false, + "CSSUnparsedValue": false, + "CSSVariableReferenceValue": false, + "CSSViewTransitionRule": false, + "currentFrame": false, + "currentTime": false, + "CustomElementRegistry": false, + "customElements": false, + "CustomEvent": false, + "CustomStateSet": false, + "DataTransfer": false, + "DataTransferItem": false, + "DataTransferItemList": false, + "DecompressionStream": false, + "DelayNode": false, + "DelegatedInkTrailPresenter": false, + "DeviceMotionEvent": false, + "DeviceMotionEventAcceleration": false, + "DeviceMotionEventRotationRate": false, + "DeviceOrientationEvent": false, + "devicePixelRatio": false, + "DevicePosture": false, + "DigitalCredential": false, + "dispatchEvent": false, + "DisposableStack": false, + "document": false, + "Document": false, + "DocumentFragment": false, + "documentPictureInPicture": false, + "DocumentPictureInPicture": false, + "DocumentPictureInPictureEvent": false, + "DocumentTimeline": false, + "DocumentType": false, + "DOMError": false, + "DOMException": false, + "DOMImplementation": false, + "DOMMatrix": false, + "DOMMatrixReadOnly": false, + "DOMParser": false, + "DOMPoint": false, + "DOMPointReadOnly": false, + "DOMQuad": false, + "DOMRect": false, + "DOMRectList": false, + "DOMRectReadOnly": false, + "DOMStringList": false, + "DOMStringMap": false, + "DOMTokenList": false, + "DragEvent": false, + "DynamicsCompressorNode": false, + "EditContext": false, + "Element": false, + "ElementInternals": false, + "EncodedAudioChunk": false, + "EncodedVideoChunk": false, + "ErrorEvent": false, + "event": false, + "Event": false, + "EventCounts": false, + "EventSource": false, + "EventTarget": false, + "external": false, + "External": false, + "EyeDropper": false, + "FeaturePolicy": false, + "FederatedCredential": false, + "fence": false, + "Fence": false, + "FencedFrameConfig": false, + "fetch": false, + "fetchLater": false, + "FetchLaterResult": false, + "File": false, + "FileList": false, + "FileReader": false, + "FileSystem": false, + "FileSystemDirectoryEntry": false, + "FileSystemDirectoryHandle": false, + "FileSystemDirectoryReader": false, + "FileSystemEntry": false, + "FileSystemFileEntry": false, + "FileSystemFileHandle": false, + "FileSystemHandle": false, + "FileSystemObserver": false, + "FileSystemWritableFileStream": false, + "find": false, + "focus": false, + "FocusEvent": false, + "FontData": false, + "FontFace": false, + "FontFaceSet": false, + "FontFaceSetLoadEvent": false, + "FormData": false, + "FormDataEvent": false, + "FragmentDirective": false, + "frameElement": false, + "frames": false, + "GainNode": false, + "Gamepad": false, + "GamepadAxisMoveEvent": false, + "GamepadButton": false, + "GamepadButtonEvent": false, + "GamepadEvent": false, + "GamepadHapticActuator": false, + "GamepadPose": false, + "Geolocation": false, + "GeolocationCoordinates": false, + "GeolocationPosition": false, + "GeolocationPositionError": false, + "getComputedStyle": false, + "getScreenDetails": false, + "getSelection": false, + "GPU": false, + "GPUAdapter": false, + "GPUAdapterInfo": false, + "GPUBindGroup": false, + "GPUBindGroupLayout": false, + "GPUBuffer": false, + "GPUBufferUsage": false, + "GPUCanvasContext": false, + "GPUColorWrite": false, + "GPUCommandBuffer": false, + "GPUCommandEncoder": false, + "GPUCompilationInfo": false, + "GPUCompilationMessage": false, + "GPUComputePassEncoder": false, + "GPUComputePipeline": false, + "GPUDevice": false, + "GPUDeviceLostInfo": false, + "GPUError": false, + "GPUExternalTexture": false, + "GPUInternalError": false, + "GPUMapMode": false, + "GPUOutOfMemoryError": false, + "GPUPipelineError": false, + "GPUPipelineLayout": false, + "GPUQuerySet": false, + "GPUQueue": false, + "GPURenderBundle": false, + "GPURenderBundleEncoder": false, + "GPURenderPassEncoder": false, + "GPURenderPipeline": false, + "GPUSampler": false, + "GPUShaderModule": false, + "GPUShaderStage": false, + "GPUSupportedFeatures": false, + "GPUSupportedLimits": false, + "GPUTexture": false, + "GPUTextureUsage": false, + "GPUTextureView": false, + "GPUUncapturedErrorEvent": false, + "GPUValidationError": false, + "GravitySensor": false, + "Gyroscope": false, + "HashChangeEvent": false, + "Headers": false, + "HID": false, + "HIDConnectionEvent": false, + "HIDDevice": false, + "HIDInputReportEvent": false, + "Highlight": false, + "HighlightRegistry": false, + "history": false, + "History": false, + "HTMLAllCollection": false, + "HTMLAnchorElement": false, + "HTMLAreaElement": false, + "HTMLAudioElement": false, + "HTMLBaseElement": false, + "HTMLBodyElement": false, + "HTMLBRElement": false, + "HTMLButtonElement": false, + "HTMLCanvasElement": false, + "HTMLCollection": false, + "HTMLDataElement": false, + "HTMLDataListElement": false, + "HTMLDetailsElement": false, + "HTMLDialogElement": false, + "HTMLDirectoryElement": false, + "HTMLDivElement": false, + "HTMLDListElement": false, + "HTMLDocument": false, + "HTMLElement": false, + "HTMLEmbedElement": false, + "HTMLFencedFrameElement": false, + "HTMLFieldSetElement": false, + "HTMLFontElement": false, + "HTMLFormControlsCollection": false, + "HTMLFormElement": false, + "HTMLFrameElement": false, + "HTMLFrameSetElement": false, + "HTMLHeadElement": false, + "HTMLHeadingElement": false, + "HTMLHRElement": false, + "HTMLHtmlElement": false, + "HTMLIFrameElement": false, + "HTMLImageElement": false, + "HTMLInputElement": false, + "HTMLLabelElement": false, + "HTMLLegendElement": false, + "HTMLLIElement": false, + "HTMLLinkElement": false, + "HTMLMapElement": false, + "HTMLMarqueeElement": false, + "HTMLMediaElement": false, + "HTMLMenuElement": false, + "HTMLMetaElement": false, + "HTMLMeterElement": false, + "HTMLModElement": false, + "HTMLObjectElement": false, + "HTMLOListElement": false, + "HTMLOptGroupElement": false, + "HTMLOptionElement": false, + "HTMLOptionsCollection": false, + "HTMLOutputElement": false, + "HTMLParagraphElement": false, + "HTMLParamElement": false, + "HTMLPictureElement": false, + "HTMLPreElement": false, + "HTMLProgressElement": false, + "HTMLQuoteElement": false, + "HTMLScriptElement": false, + "HTMLSelectedContentElement": false, + "HTMLSelectElement": false, + "HTMLSlotElement": false, + "HTMLSourceElement": false, + "HTMLSpanElement": false, + "HTMLStyleElement": false, + "HTMLTableCaptionElement": false, + "HTMLTableCellElement": false, + "HTMLTableColElement": false, + "HTMLTableElement": false, + "HTMLTableRowElement": false, + "HTMLTableSectionElement": false, + "HTMLTemplateElement": false, + "HTMLTextAreaElement": false, + "HTMLTimeElement": false, + "HTMLTitleElement": false, + "HTMLTrackElement": false, + "HTMLUListElement": false, + "HTMLUnknownElement": false, + "HTMLVideoElement": false, + "IDBCursor": false, + "IDBCursorWithValue": false, + "IDBDatabase": false, + "IDBFactory": false, + "IDBIndex": false, + "IDBKeyRange": false, + "IDBObjectStore": false, + "IDBOpenDBRequest": false, + "IDBRecord": false, + "IDBRequest": false, + "IDBTransaction": false, + "IDBVersionChangeEvent": false, + "IdentityCredential": false, + "IdentityCredentialError": false, + "IdentityProvider": false, + "IdleDeadline": false, + "IdleDetector": false, + "IIRFilterNode": false, + "Image": false, + "ImageBitmap": false, + "ImageBitmapRenderingContext": false, + "ImageCapture": false, + "ImageData": false, + "ImageDecoder": false, + "ImageTrack": false, + "ImageTrackList": false, + "indexedDB": false, + "Ink": false, + "innerHeight": false, + "innerWidth": false, + "InputDeviceCapabilities": false, + "InputDeviceInfo": false, + "InputEvent": false, + "IntegrityViolationReportBody": false, + "InterestEvent": false, + "IntersectionObserver": false, + "IntersectionObserverEntry": false, + "isSecureContext": false, + "Keyboard": false, + "KeyboardEvent": false, + "KeyboardLayoutMap": false, + "KeyframeEffect": false, + "LanguageDetector": false, + "LargestContentfulPaint": false, + "LaunchParams": false, + "launchQueue": false, + "LaunchQueue": false, + "LayoutShift": false, + "LayoutShiftAttribution": false, + "length": false, + "LinearAccelerationSensor": false, + "localStorage": false, + "location": true, + "Location": false, + "locationbar": false, + "Lock": false, + "LockManager": false, + "matchMedia": false, + "MathMLElement": false, + "MediaCapabilities": false, + "MediaCapabilitiesInfo": false, + "MediaDeviceInfo": false, + "MediaDevices": false, + "MediaElementAudioSourceNode": false, + "MediaEncryptedEvent": false, + "MediaError": false, + "MediaKeyError": false, + "MediaKeyMessageEvent": false, + "MediaKeys": false, + "MediaKeySession": false, + "MediaKeyStatusMap": false, + "MediaKeySystemAccess": false, + "MediaList": false, + "MediaMetadata": false, + "MediaQueryList": false, + "MediaQueryListEvent": false, + "MediaRecorder": false, + "MediaRecorderErrorEvent": false, + "MediaSession": false, + "MediaSource": false, + "MediaSourceHandle": false, + "MediaStream": false, + "MediaStreamAudioDestinationNode": false, + "MediaStreamAudioSourceNode": false, + "MediaStreamEvent": false, + "MediaStreamTrack": false, + "MediaStreamTrackAudioSourceNode": false, + "MediaStreamTrackAudioStats": false, + "MediaStreamTrackEvent": false, + "MediaStreamTrackGenerator": false, + "MediaStreamTrackProcessor": false, + "MediaStreamTrackVideoStats": false, + "menubar": false, + "MessageChannel": false, + "MessageEvent": false, + "MessagePort": false, + "MIDIAccess": false, + "MIDIConnectionEvent": false, + "MIDIInput": false, + "MIDIInputMap": false, + "MIDIMessageEvent": false, + "MIDIOutput": false, + "MIDIOutputMap": false, + "MIDIPort": false, + "MimeType": false, + "MimeTypeArray": false, + "model": false, + "ModelGenericSession": false, + "ModelManager": false, + "MouseEvent": false, + "moveBy": false, + "moveTo": false, + "MutationEvent": false, + "MutationObserver": false, + "MutationRecord": false, + "name": false, + "NamedNodeMap": false, + "NavigateEvent": false, + "navigation": false, + "Navigation": false, + "NavigationActivation": false, + "NavigationCurrentEntryChangeEvent": false, + "NavigationDestination": false, + "NavigationHistoryEntry": false, + "NavigationPrecommitController": false, + "NavigationPreloadManager": false, + "NavigationTransition": false, + "navigator": false, + "Navigator": false, + "NavigatorLogin": false, + "NavigatorManagedData": false, + "NavigatorUAData": false, + "NetworkInformation": false, + "Node": false, + "NodeFilter": false, + "NodeIterator": false, + "NodeList": false, + "Notification": false, + "NotifyPaintEvent": false, + "NotRestoredReasonDetails": false, + "NotRestoredReasons": false, + "Observable": false, + "OfflineAudioCompletionEvent": false, + "OfflineAudioContext": false, + "offscreenBuffering": false, + "OffscreenCanvas": false, + "OffscreenCanvasRenderingContext2D": false, + "onabort": true, + "onafterprint": true, + "onanimationcancel": true, + "onanimationend": true, + "onanimationiteration": true, + "onanimationstart": true, + "onappinstalled": true, + "onauxclick": true, + "onbeforeinput": true, + "onbeforeinstallprompt": true, + "onbeforematch": true, + "onbeforeprint": true, + "onbeforetoggle": true, + "onbeforeunload": true, + "onbeforexrselect": true, + "onblur": true, + "oncancel": true, + "oncanplay": true, + "oncanplaythrough": true, + "onchange": true, + "onclick": true, + "onclose": true, + "oncommand": true, + "oncontentvisibilityautostatechange": true, + "oncontextlost": true, + "oncontextmenu": true, + "oncontextrestored": true, + "oncopy": true, + "oncuechange": true, + "oncut": true, + "ondblclick": true, + "ondevicemotion": true, + "ondeviceorientation": true, + "ondeviceorientationabsolute": true, + "ondrag": true, + "ondragend": true, + "ondragenter": true, + "ondragleave": true, + "ondragover": true, + "ondragstart": true, + "ondrop": true, + "ondurationchange": true, + "onemptied": true, + "onended": true, + "onerror": true, + "onfocus": true, + "onformdata": true, + "ongamepadconnected": true, + "ongamepaddisconnected": true, + "ongotpointercapture": true, + "onhashchange": true, + "oninput": true, + "oninvalid": true, + "onkeydown": true, + "onkeypress": true, + "onkeyup": true, + "onlanguagechange": true, + "onload": true, + "onloadeddata": true, + "onloadedmetadata": true, + "onloadstart": true, + "onlostpointercapture": true, + "onmessage": true, + "onmessageerror": true, + "onmousedown": true, + "onmouseenter": true, + "onmouseleave": true, + "onmousemove": true, + "onmouseout": true, + "onmouseover": true, + "onmouseup": true, + "onmousewheel": true, + "onoffline": true, + "ononline": true, + "onpagehide": true, + "onpagereveal": true, + "onpageshow": true, + "onpageswap": true, + "onpaste": true, + "onpause": true, + "onplay": true, + "onplaying": true, + "onpointercancel": true, + "onpointerdown": true, + "onpointerenter": true, + "onpointerleave": true, + "onpointermove": true, + "onpointerout": true, + "onpointerover": true, + "onpointerrawupdate": true, + "onpointerup": true, + "onpopstate": true, + "onprogress": true, + "onratechange": true, + "onrejectionhandled": true, + "onreset": true, + "onresize": true, + "onscroll": true, + "onscrollend": true, + "onscrollsnapchange": true, + "onscrollsnapchanging": true, + "onsearch": true, + "onsecuritypolicyviolation": true, + "onseeked": true, + "onseeking": true, + "onselect": true, + "onselectionchange": true, + "onselectstart": true, + "onslotchange": true, + "onstalled": true, + "onstorage": true, + "onsubmit": true, + "onsuspend": true, + "ontimeupdate": true, + "ontoggle": true, + "ontransitioncancel": true, + "ontransitionend": true, + "ontransitionrun": true, + "ontransitionstart": true, + "onunhandledrejection": true, + "onunload": true, + "onvolumechange": true, + "onwaiting": true, + "onwheel": true, + "open": false, + "opener": false, + "Option": false, + "OrientationSensor": false, + "origin": false, + "originAgentCluster": false, + "OscillatorNode": false, + "OTPCredential": false, + "outerHeight": false, + "outerWidth": false, + "OverconstrainedError": false, + "PageRevealEvent": false, + "PageSwapEvent": false, + "PageTransitionEvent": false, + "pageXOffset": false, + "pageYOffset": false, + "PannerNode": false, + "parent": false, + "PasswordCredential": false, + "Path2D": false, + "PaymentAddress": false, + "PaymentManager": false, + "PaymentMethodChangeEvent": false, + "PaymentRequest": false, + "PaymentRequestUpdateEvent": false, + "PaymentResponse": false, + "performance": false, + "Performance": false, + "PerformanceElementTiming": false, + "PerformanceEntry": false, + "PerformanceEventTiming": false, + "PerformanceLongAnimationFrameTiming": false, + "PerformanceLongTaskTiming": false, + "PerformanceMark": false, + "PerformanceMeasure": false, + "PerformanceNavigation": false, + "PerformanceNavigationTiming": false, + "PerformanceObserver": false, + "PerformanceObserverEntryList": false, + "PerformancePaintTiming": false, + "PerformanceResourceTiming": false, + "PerformanceScriptTiming": false, + "PerformanceServerTiming": false, + "PerformanceTiming": false, + "PeriodicSyncManager": false, + "PeriodicWave": false, + "Permissions": false, + "PermissionStatus": false, + "PERSISTENT": false, + "personalbar": false, + "PictureInPictureEvent": false, + "PictureInPictureWindow": false, + "Plugin": false, + "PluginArray": false, + "PointerEvent": false, + "PopStateEvent": false, + "postMessage": false, + "Presentation": false, + "PresentationAvailability": false, + "PresentationConnection": false, + "PresentationConnectionAvailableEvent": false, + "PresentationConnectionCloseEvent": false, + "PresentationConnectionList": false, + "PresentationReceiver": false, + "PresentationRequest": false, + "PressureObserver": false, + "PressureRecord": false, + "print": false, + "ProcessingInstruction": false, + "Profiler": false, + "ProgressEvent": false, + "PromiseRejectionEvent": false, + "prompt": false, + "ProtectedAudience": false, + "PublicKeyCredential": false, + "PushManager": false, + "PushSubscription": false, + "PushSubscriptionOptions": false, + "queryLocalFonts": false, + "queueMicrotask": false, + "QuotaExceededError": false, + "RadioNodeList": false, + "Range": false, + "ReadableByteStreamController": false, + "ReadableStream": false, + "ReadableStreamBYOBReader": false, + "ReadableStreamBYOBRequest": false, + "ReadableStreamDefaultController": false, + "ReadableStreamDefaultReader": false, + "registerProcessor": false, + "RelativeOrientationSensor": false, + "RemotePlayback": false, + "removeEventListener": false, + "ReportBody": false, + "reportError": false, + "ReportingObserver": false, + "Request": false, + "requestAnimationFrame": false, + "requestIdleCallback": false, + "resizeBy": false, + "ResizeObserver": false, + "ResizeObserverEntry": false, + "ResizeObserverSize": false, + "resizeTo": false, + "Response": false, + "RestrictionTarget": false, + "RTCCertificate": false, + "RTCDataChannel": false, + "RTCDataChannelEvent": false, + "RTCDtlsTransport": false, + "RTCDTMFSender": false, + "RTCDTMFToneChangeEvent": false, + "RTCEncodedAudioFrame": false, + "RTCEncodedVideoFrame": false, + "RTCError": false, + "RTCErrorEvent": false, + "RTCIceCandidate": false, + "RTCIceTransport": false, + "RTCPeerConnection": false, + "RTCPeerConnectionIceErrorEvent": false, + "RTCPeerConnectionIceEvent": false, + "RTCRtpReceiver": false, + "RTCRtpScriptTransform": false, + "RTCRtpSender": false, + "RTCRtpTransceiver": false, + "RTCSctpTransport": false, + "RTCSessionDescription": false, + "RTCStatsReport": false, + "RTCTrackEvent": false, + "sampleRate": false, + "scheduler": false, + "Scheduler": false, + "Scheduling": false, + "screen": false, + "Screen": false, + "ScreenDetailed": false, + "ScreenDetails": false, + "screenLeft": false, + "ScreenOrientation": false, + "screenTop": false, + "screenX": false, + "screenY": false, + "ScriptProcessorNode": false, + "scroll": false, + "scrollbars": false, + "scrollBy": false, + "ScrollTimeline": false, + "scrollTo": false, + "scrollX": false, + "scrollY": false, + "SecurityPolicyViolationEvent": false, + "Selection": false, + "self": false, + "Sensor": false, + "SensorErrorEvent": false, + "Serial": false, + "SerialPort": false, + "ServiceWorker": false, + "ServiceWorkerContainer": false, + "ServiceWorkerRegistration": false, + "sessionStorage": false, + "setInterval": false, + "setTimeout": false, + "ShadowRoot": false, + "sharedStorage": false, + "SharedStorage": false, + "SharedStorageAppendMethod": false, + "SharedStorageClearMethod": false, + "SharedStorageDeleteMethod": false, + "SharedStorageModifierMethod": false, + "SharedStorageSetMethod": false, + "SharedStorageWorklet": false, + "SharedWorker": false, + "showDirectoryPicker": false, + "showOpenFilePicker": false, + "showSaveFilePicker": false, + "SnapEvent": false, + "SourceBuffer": false, + "SourceBufferList": false, + "SpeechGrammar": false, + "SpeechGrammarList": false, + "SpeechRecognition": false, + "SpeechRecognitionErrorEvent": false, + "SpeechRecognitionEvent": false, + "SpeechRecognitionPhrase": false, + "speechSynthesis": false, + "SpeechSynthesis": false, + "SpeechSynthesisErrorEvent": false, + "SpeechSynthesisEvent": false, + "SpeechSynthesisUtterance": false, + "SpeechSynthesisVoice": false, + "StaticRange": false, + "status": false, + "statusbar": false, + "StereoPannerNode": false, + "stop": false, + "Storage": false, + "StorageBucket": false, + "StorageBucketManager": false, + "StorageEvent": false, + "StorageManager": false, + "structuredClone": false, + "styleMedia": false, + "StylePropertyMap": false, + "StylePropertyMapReadOnly": false, + "StyleSheet": false, + "StyleSheetList": false, + "SubmitEvent": false, + "Subscriber": false, + "SubtleCrypto": false, + "Summarizer": false, + "SuppressedError": false, + "SVGAElement": false, + "SVGAngle": false, + "SVGAnimatedAngle": false, + "SVGAnimatedBoolean": false, + "SVGAnimatedEnumeration": false, + "SVGAnimatedInteger": false, + "SVGAnimatedLength": false, + "SVGAnimatedLengthList": false, + "SVGAnimatedNumber": false, + "SVGAnimatedNumberList": false, + "SVGAnimatedPreserveAspectRatio": false, + "SVGAnimatedRect": false, + "SVGAnimatedString": false, + "SVGAnimatedTransformList": false, + "SVGAnimateElement": false, + "SVGAnimateMotionElement": false, + "SVGAnimateTransformElement": false, + "SVGAnimationElement": false, + "SVGCircleElement": false, + "SVGClipPathElement": false, + "SVGComponentTransferFunctionElement": false, + "SVGDefsElement": false, + "SVGDescElement": false, + "SVGElement": false, + "SVGEllipseElement": false, + "SVGFEBlendElement": false, + "SVGFEColorMatrixElement": false, + "SVGFEComponentTransferElement": false, + "SVGFECompositeElement": false, + "SVGFEConvolveMatrixElement": false, + "SVGFEDiffuseLightingElement": false, + "SVGFEDisplacementMapElement": false, + "SVGFEDistantLightElement": false, + "SVGFEDropShadowElement": false, + "SVGFEFloodElement": false, + "SVGFEFuncAElement": false, + "SVGFEFuncBElement": false, + "SVGFEFuncGElement": false, + "SVGFEFuncRElement": false, + "SVGFEGaussianBlurElement": false, + "SVGFEImageElement": false, + "SVGFEMergeElement": false, + "SVGFEMergeNodeElement": false, + "SVGFEMorphologyElement": false, + "SVGFEOffsetElement": false, + "SVGFEPointLightElement": false, + "SVGFESpecularLightingElement": false, + "SVGFESpotLightElement": false, + "SVGFETileElement": false, + "SVGFETurbulenceElement": false, + "SVGFilterElement": false, + "SVGForeignObjectElement": false, + "SVGGElement": false, + "SVGGeometryElement": false, + "SVGGradientElement": false, + "SVGGraphicsElement": false, + "SVGImageElement": false, + "SVGLength": false, + "SVGLengthList": false, + "SVGLinearGradientElement": false, + "SVGLineElement": false, + "SVGMarkerElement": false, + "SVGMaskElement": false, + "SVGMatrix": false, + "SVGMetadataElement": false, + "SVGMPathElement": false, + "SVGNumber": false, + "SVGNumberList": false, + "SVGPathElement": false, + "SVGPatternElement": false, + "SVGPoint": false, + "SVGPointList": false, + "SVGPolygonElement": false, + "SVGPolylineElement": false, + "SVGPreserveAspectRatio": false, + "SVGRadialGradientElement": false, + "SVGRect": false, + "SVGRectElement": false, + "SVGScriptElement": false, + "SVGSetElement": false, + "SVGStopElement": false, + "SVGStringList": false, + "SVGStyleElement": false, + "SVGSVGElement": false, + "SVGSwitchElement": false, + "SVGSymbolElement": false, + "SVGTextContentElement": false, + "SVGTextElement": false, + "SVGTextPathElement": false, + "SVGTextPositioningElement": false, + "SVGTitleElement": false, + "SVGTransform": false, + "SVGTransformList": false, + "SVGTSpanElement": false, + "SVGUnitTypes": false, + "SVGUseElement": false, + "SVGViewElement": false, + "SyncManager": false, + "TaskAttributionTiming": false, + "TaskController": false, + "TaskPriorityChangeEvent": false, + "TaskSignal": false, + "TEMPORARY": false, + "Text": false, + "TextDecoder": false, + "TextDecoderStream": false, + "TextEncoder": false, + "TextEncoderStream": false, + "TextEvent": false, + "TextFormat": false, + "TextFormatUpdateEvent": false, + "TextMetrics": false, + "TextTrack": false, + "TextTrackCue": false, + "TextTrackCueList": false, + "TextTrackList": false, + "TextUpdateEvent": false, + "TimeEvent": false, + "TimeRanges": false, + "ToggleEvent": false, + "toolbar": false, + "top": false, + "Touch": false, + "TouchEvent": false, + "TouchList": false, + "TrackEvent": false, + "TransformStream": false, + "TransformStreamDefaultController": false, + "TransitionEvent": false, + "Translator": false, + "TreeWalker": false, + "TrustedHTML": false, + "TrustedScript": false, + "TrustedScriptURL": false, + "TrustedTypePolicy": false, + "TrustedTypePolicyFactory": false, + "trustedTypes": false, + "UIEvent": false, + "URL": false, + "URLPattern": false, + "URLSearchParams": false, + "USB": false, + "USBAlternateInterface": false, + "USBConfiguration": false, + "USBConnectionEvent": false, + "USBDevice": false, + "USBEndpoint": false, + "USBInterface": false, + "USBInTransferResult": false, + "USBIsochronousInTransferPacket": false, + "USBIsochronousInTransferResult": false, + "USBIsochronousOutTransferPacket": false, + "USBIsochronousOutTransferResult": false, + "USBOutTransferResult": false, + "UserActivation": false, + "ValidityState": false, + "VideoColorSpace": false, + "VideoDecoder": false, + "VideoEncoder": false, + "VideoFrame": false, + "VideoPlaybackQuality": false, + "viewport": false, + "Viewport": false, + "ViewTimeline": false, + "ViewTransition": false, + "ViewTransitionTypeSet": false, + "VirtualKeyboard": false, + "VirtualKeyboardGeometryChangeEvent": false, + "VisibilityStateEntry": false, + "visualViewport": false, + "VisualViewport": false, + "VTTCue": false, + "VTTRegion": false, + "WakeLock": false, + "WakeLockSentinel": false, + "WaveShaperNode": false, + "WebAssembly": false, + "WebGL2RenderingContext": false, + "WebGLActiveInfo": false, + "WebGLBuffer": false, + "WebGLContextEvent": false, + "WebGLFramebuffer": false, + "WebGLObject": false, + "WebGLProgram": false, + "WebGLQuery": false, + "WebGLRenderbuffer": false, + "WebGLRenderingContext": false, + "WebGLSampler": false, + "WebGLShader": false, + "WebGLShaderPrecisionFormat": false, + "WebGLSync": false, + "WebGLTexture": false, + "WebGLTransformFeedback": false, + "WebGLUniformLocation": false, + "WebGLVertexArrayObject": false, + "WebSocket": false, + "WebSocketError": false, + "WebSocketStream": false, + "WebTransport": false, + "WebTransportBidirectionalStream": false, + "WebTransportDatagramDuplexStream": false, + "WebTransportError": false, + "WebTransportReceiveStream": false, + "WebTransportSendStream": false, + "WGSLLanguageFeatures": false, + "WheelEvent": false, + "when": false, + "window": false, + "Window": false, + "WindowControlsOverlay": false, + "WindowControlsOverlayGeometryChangeEvent": false, + "Worker": false, + "Worklet": false, + "WorkletGlobalScope": false, + "WritableStream": false, + "WritableStreamDefaultController": false, + "WritableStreamDefaultWriter": false, + "XMLDocument": false, + "XMLHttpRequest": false, + "XMLHttpRequestEventTarget": false, + "XMLHttpRequestUpload": false, + "XMLSerializer": false, + "XPathEvaluator": false, + "XPathExpression": false, + "XPathResult": false, + "XRAnchor": false, + "XRAnchorSet": false, + "XRBoundedReferenceSpace": false, + "XRCamera": false, + "XRCPUDepthInformation": false, + "XRDepthInformation": false, + "XRDOMOverlayState": false, + "XRFrame": false, + "XRHand": false, + "XRHitTestResult": false, + "XRHitTestSource": false, + "XRInputSource": false, + "XRInputSourceArray": false, + "XRInputSourceEvent": false, + "XRInputSourcesChangeEvent": false, + "XRJointPose": false, + "XRJointSpace": false, + "XRLayer": false, + "XRLightEstimate": false, + "XRLightProbe": false, + "XRPose": false, + "XRRay": false, + "XRReferenceSpace": false, + "XRReferenceSpaceEvent": false, + "XRRenderState": false, + "XRRigidTransform": false, + "XRSession": false, + "XRSessionEvent": false, + "XRSpace": false, + "XRSystem": false, + "XRTransientInputHitTestResult": false, + "XRTransientInputHitTestSource": false, + "XRView": false, + "XRViewerPose": false, + "XRViewport": false, + "XRWebGLBinding": false, + "XRWebGLDepthInformation": false, + "XRWebGLLayer": false, + "XSLTProcessor": false + } + }, + "errors": [ + { + "messageId": "execScript" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-implied-eval > invalid + +```js +window.window['setInterval']('foo') +``` + +```json +{ + "languageOptions": { + "globals": { + "AbortController": false, + "AbortSignal": false, + "AbsoluteOrientationSensor": false, + "AbstractRange": false, + "Accelerometer": false, + "addEventListener": false, + "ai": false, + "AI": false, + "AICreateMonitor": false, + "AITextSession": false, + "alert": false, + "AnalyserNode": false, + "Animation": false, + "AnimationEffect": false, + "AnimationEvent": false, + "AnimationPlaybackEvent": false, + "AnimationTimeline": false, + "AsyncDisposableStack": false, + "atob": false, + "Attr": false, + "Audio": false, + "AudioBuffer": false, + "AudioBufferSourceNode": false, + "AudioContext": false, + "AudioData": false, + "AudioDecoder": false, + "AudioDestinationNode": false, + "AudioEncoder": false, + "AudioListener": false, + "AudioNode": false, + "AudioParam": false, + "AudioParamMap": false, + "AudioProcessingEvent": false, + "AudioScheduledSourceNode": false, + "AudioSinkInfo": false, + "AudioWorklet": false, + "AudioWorkletGlobalScope": false, + "AudioWorkletNode": false, + "AudioWorkletProcessor": false, + "AuthenticatorAssertionResponse": false, + "AuthenticatorAttestationResponse": false, + "AuthenticatorResponse": false, + "BackgroundFetchManager": false, + "BackgroundFetchRecord": false, + "BackgroundFetchRegistration": false, + "BarcodeDetector": false, + "BarProp": false, + "BaseAudioContext": false, + "BatteryManager": false, + "BeforeUnloadEvent": false, + "BiquadFilterNode": false, + "Blob": false, + "BlobEvent": false, + "Bluetooth": false, + "BluetoothCharacteristicProperties": false, + "BluetoothDevice": false, + "BluetoothRemoteGATTCharacteristic": false, + "BluetoothRemoteGATTDescriptor": false, + "BluetoothRemoteGATTServer": false, + "BluetoothRemoteGATTService": false, + "BluetoothUUID": false, + "blur": false, + "BroadcastChannel": false, + "BrowserCaptureMediaStreamTrack": false, + "btoa": false, + "ByteLengthQueuingStrategy": false, + "Cache": false, + "caches": false, + "CacheStorage": false, + "cancelAnimationFrame": false, + "cancelIdleCallback": false, + "CanvasCaptureMediaStream": false, + "CanvasCaptureMediaStreamTrack": false, + "CanvasGradient": false, + "CanvasPattern": false, + "CanvasRenderingContext2D": false, + "CaptureController": false, + "CaretPosition": false, + "CDATASection": false, + "ChannelMergerNode": false, + "ChannelSplitterNode": false, + "ChapterInformation": false, + "CharacterBoundsUpdateEvent": false, + "CharacterData": false, + "clearInterval": false, + "clearTimeout": false, + "clientInformation": false, + "Clipboard": false, + "ClipboardChangeEvent": false, + "ClipboardEvent": false, + "ClipboardItem": false, + "close": false, + "closed": false, + "CloseEvent": false, + "CloseWatcher": false, + "CommandEvent": false, + "Comment": false, + "CompositionEvent": false, + "CompressionStream": false, + "confirm": false, + "console": false, + "ConstantSourceNode": false, + "ContentVisibilityAutoStateChangeEvent": false, + "ConvolverNode": false, + "CookieChangeEvent": false, + "CookieDeprecationLabel": false, + "cookieStore": false, + "CookieStore": false, + "CookieStoreManager": false, + "CountQueuingStrategy": false, + "createImageBitmap": false, + "CreateMonitor": false, + "Credential": false, + "credentialless": false, + "CredentialsContainer": false, + "CropTarget": false, + "crossOriginIsolated": false, + "crypto": false, + "Crypto": false, + "CryptoKey": false, + "CSPViolationReportBody": false, + "CSS": false, + "CSSAnimation": false, + "CSSConditionRule": false, + "CSSContainerRule": false, + "CSSCounterStyleRule": false, + "CSSFontFaceRule": false, + "CSSFontFeatureValuesRule": false, + "CSSFontPaletteValuesRule": false, + "CSSFunctionDeclarations": false, + "CSSFunctionDescriptors": false, + "CSSFunctionRule": false, + "CSSGroupingRule": false, + "CSSImageValue": false, + "CSSImportRule": false, + "CSSKeyframeRule": false, + "CSSKeyframesRule": false, + "CSSKeywordValue": false, + "CSSLayerBlockRule": false, + "CSSLayerStatementRule": false, + "CSSMarginRule": false, + "CSSMathClamp": false, + "CSSMathInvert": false, + "CSSMathMax": false, + "CSSMathMin": false, + "CSSMathNegate": false, + "CSSMathProduct": false, + "CSSMathSum": false, + "CSSMathValue": false, + "CSSMatrixComponent": false, + "CSSMediaRule": false, + "CSSNamespaceRule": false, + "CSSNestedDeclarations": false, + "CSSNumericArray": false, + "CSSNumericValue": false, + "CSSPageDescriptors": false, + "CSSPageRule": false, + "CSSPerspective": false, + "CSSPositionTryDescriptors": false, + "CSSPositionTryRule": false, + "CSSPositionValue": false, + "CSSPropertyRule": false, + "CSSRotate": false, + "CSSRule": false, + "CSSRuleList": false, + "CSSScale": false, + "CSSScopeRule": false, + "CSSSkew": false, + "CSSSkewX": false, + "CSSSkewY": false, + "CSSStartingStyleRule": false, + "CSSStyleDeclaration": false, + "CSSStyleRule": false, + "CSSStyleSheet": false, + "CSSStyleValue": false, + "CSSSupportsRule": false, + "CSSTransformComponent": false, + "CSSTransformValue": false, + "CSSTransition": false, + "CSSTranslate": false, + "CSSUnitValue": false, + "CSSUnparsedValue": false, + "CSSVariableReferenceValue": false, + "CSSViewTransitionRule": false, + "currentFrame": false, + "currentTime": false, + "CustomElementRegistry": false, + "customElements": false, + "CustomEvent": false, + "CustomStateSet": false, + "DataTransfer": false, + "DataTransferItem": false, + "DataTransferItemList": false, + "DecompressionStream": false, + "DelayNode": false, + "DelegatedInkTrailPresenter": false, + "DeviceMotionEvent": false, + "DeviceMotionEventAcceleration": false, + "DeviceMotionEventRotationRate": false, + "DeviceOrientationEvent": false, + "devicePixelRatio": false, + "DevicePosture": false, + "DigitalCredential": false, + "dispatchEvent": false, + "DisposableStack": false, + "document": false, + "Document": false, + "DocumentFragment": false, + "documentPictureInPicture": false, + "DocumentPictureInPicture": false, + "DocumentPictureInPictureEvent": false, + "DocumentTimeline": false, + "DocumentType": false, + "DOMError": false, + "DOMException": false, + "DOMImplementation": false, + "DOMMatrix": false, + "DOMMatrixReadOnly": false, + "DOMParser": false, + "DOMPoint": false, + "DOMPointReadOnly": false, + "DOMQuad": false, + "DOMRect": false, + "DOMRectList": false, + "DOMRectReadOnly": false, + "DOMStringList": false, + "DOMStringMap": false, + "DOMTokenList": false, + "DragEvent": false, + "DynamicsCompressorNode": false, + "EditContext": false, + "Element": false, + "ElementInternals": false, + "EncodedAudioChunk": false, + "EncodedVideoChunk": false, + "ErrorEvent": false, + "event": false, + "Event": false, + "EventCounts": false, + "EventSource": false, + "EventTarget": false, + "external": false, + "External": false, + "EyeDropper": false, + "FeaturePolicy": false, + "FederatedCredential": false, + "fence": false, + "Fence": false, + "FencedFrameConfig": false, + "fetch": false, + "fetchLater": false, + "FetchLaterResult": false, + "File": false, + "FileList": false, + "FileReader": false, + "FileSystem": false, + "FileSystemDirectoryEntry": false, + "FileSystemDirectoryHandle": false, + "FileSystemDirectoryReader": false, + "FileSystemEntry": false, + "FileSystemFileEntry": false, + "FileSystemFileHandle": false, + "FileSystemHandle": false, + "FileSystemObserver": false, + "FileSystemWritableFileStream": false, + "find": false, + "focus": false, + "FocusEvent": false, + "FontData": false, + "FontFace": false, + "FontFaceSet": false, + "FontFaceSetLoadEvent": false, + "FormData": false, + "FormDataEvent": false, + "FragmentDirective": false, + "frameElement": false, + "frames": false, + "GainNode": false, + "Gamepad": false, + "GamepadAxisMoveEvent": false, + "GamepadButton": false, + "GamepadButtonEvent": false, + "GamepadEvent": false, + "GamepadHapticActuator": false, + "GamepadPose": false, + "Geolocation": false, + "GeolocationCoordinates": false, + "GeolocationPosition": false, + "GeolocationPositionError": false, + "getComputedStyle": false, + "getScreenDetails": false, + "getSelection": false, + "GPU": false, + "GPUAdapter": false, + "GPUAdapterInfo": false, + "GPUBindGroup": false, + "GPUBindGroupLayout": false, + "GPUBuffer": false, + "GPUBufferUsage": false, + "GPUCanvasContext": false, + "GPUColorWrite": false, + "GPUCommandBuffer": false, + "GPUCommandEncoder": false, + "GPUCompilationInfo": false, + "GPUCompilationMessage": false, + "GPUComputePassEncoder": false, + "GPUComputePipeline": false, + "GPUDevice": false, + "GPUDeviceLostInfo": false, + "GPUError": false, + "GPUExternalTexture": false, + "GPUInternalError": false, + "GPUMapMode": false, + "GPUOutOfMemoryError": false, + "GPUPipelineError": false, + "GPUPipelineLayout": false, + "GPUQuerySet": false, + "GPUQueue": false, + "GPURenderBundle": false, + "GPURenderBundleEncoder": false, + "GPURenderPassEncoder": false, + "GPURenderPipeline": false, + "GPUSampler": false, + "GPUShaderModule": false, + "GPUShaderStage": false, + "GPUSupportedFeatures": false, + "GPUSupportedLimits": false, + "GPUTexture": false, + "GPUTextureUsage": false, + "GPUTextureView": false, + "GPUUncapturedErrorEvent": false, + "GPUValidationError": false, + "GravitySensor": false, + "Gyroscope": false, + "HashChangeEvent": false, + "Headers": false, + "HID": false, + "HIDConnectionEvent": false, + "HIDDevice": false, + "HIDInputReportEvent": false, + "Highlight": false, + "HighlightRegistry": false, + "history": false, + "History": false, + "HTMLAllCollection": false, + "HTMLAnchorElement": false, + "HTMLAreaElement": false, + "HTMLAudioElement": false, + "HTMLBaseElement": false, + "HTMLBodyElement": false, + "HTMLBRElement": false, + "HTMLButtonElement": false, + "HTMLCanvasElement": false, + "HTMLCollection": false, + "HTMLDataElement": false, + "HTMLDataListElement": false, + "HTMLDetailsElement": false, + "HTMLDialogElement": false, + "HTMLDirectoryElement": false, + "HTMLDivElement": false, + "HTMLDListElement": false, + "HTMLDocument": false, + "HTMLElement": false, + "HTMLEmbedElement": false, + "HTMLFencedFrameElement": false, + "HTMLFieldSetElement": false, + "HTMLFontElement": false, + "HTMLFormControlsCollection": false, + "HTMLFormElement": false, + "HTMLFrameElement": false, + "HTMLFrameSetElement": false, + "HTMLHeadElement": false, + "HTMLHeadingElement": false, + "HTMLHRElement": false, + "HTMLHtmlElement": false, + "HTMLIFrameElement": false, + "HTMLImageElement": false, + "HTMLInputElement": false, + "HTMLLabelElement": false, + "HTMLLegendElement": false, + "HTMLLIElement": false, + "HTMLLinkElement": false, + "HTMLMapElement": false, + "HTMLMarqueeElement": false, + "HTMLMediaElement": false, + "HTMLMenuElement": false, + "HTMLMetaElement": false, + "HTMLMeterElement": false, + "HTMLModElement": false, + "HTMLObjectElement": false, + "HTMLOListElement": false, + "HTMLOptGroupElement": false, + "HTMLOptionElement": false, + "HTMLOptionsCollection": false, + "HTMLOutputElement": false, + "HTMLParagraphElement": false, + "HTMLParamElement": false, + "HTMLPictureElement": false, + "HTMLPreElement": false, + "HTMLProgressElement": false, + "HTMLQuoteElement": false, + "HTMLScriptElement": false, + "HTMLSelectedContentElement": false, + "HTMLSelectElement": false, + "HTMLSlotElement": false, + "HTMLSourceElement": false, + "HTMLSpanElement": false, + "HTMLStyleElement": false, + "HTMLTableCaptionElement": false, + "HTMLTableCellElement": false, + "HTMLTableColElement": false, + "HTMLTableElement": false, + "HTMLTableRowElement": false, + "HTMLTableSectionElement": false, + "HTMLTemplateElement": false, + "HTMLTextAreaElement": false, + "HTMLTimeElement": false, + "HTMLTitleElement": false, + "HTMLTrackElement": false, + "HTMLUListElement": false, + "HTMLUnknownElement": false, + "HTMLVideoElement": false, + "IDBCursor": false, + "IDBCursorWithValue": false, + "IDBDatabase": false, + "IDBFactory": false, + "IDBIndex": false, + "IDBKeyRange": false, + "IDBObjectStore": false, + "IDBOpenDBRequest": false, + "IDBRecord": false, + "IDBRequest": false, + "IDBTransaction": false, + "IDBVersionChangeEvent": false, + "IdentityCredential": false, + "IdentityCredentialError": false, + "IdentityProvider": false, + "IdleDeadline": false, + "IdleDetector": false, + "IIRFilterNode": false, + "Image": false, + "ImageBitmap": false, + "ImageBitmapRenderingContext": false, + "ImageCapture": false, + "ImageData": false, + "ImageDecoder": false, + "ImageTrack": false, + "ImageTrackList": false, + "indexedDB": false, + "Ink": false, + "innerHeight": false, + "innerWidth": false, + "InputDeviceCapabilities": false, + "InputDeviceInfo": false, + "InputEvent": false, + "IntegrityViolationReportBody": false, + "InterestEvent": false, + "IntersectionObserver": false, + "IntersectionObserverEntry": false, + "isSecureContext": false, + "Keyboard": false, + "KeyboardEvent": false, + "KeyboardLayoutMap": false, + "KeyframeEffect": false, + "LanguageDetector": false, + "LargestContentfulPaint": false, + "LaunchParams": false, + "launchQueue": false, + "LaunchQueue": false, + "LayoutShift": false, + "LayoutShiftAttribution": false, + "length": false, + "LinearAccelerationSensor": false, + "localStorage": false, + "location": true, + "Location": false, + "locationbar": false, + "Lock": false, + "LockManager": false, + "matchMedia": false, + "MathMLElement": false, + "MediaCapabilities": false, + "MediaCapabilitiesInfo": false, + "MediaDeviceInfo": false, + "MediaDevices": false, + "MediaElementAudioSourceNode": false, + "MediaEncryptedEvent": false, + "MediaError": false, + "MediaKeyError": false, + "MediaKeyMessageEvent": false, + "MediaKeys": false, + "MediaKeySession": false, + "MediaKeyStatusMap": false, + "MediaKeySystemAccess": false, + "MediaList": false, + "MediaMetadata": false, + "MediaQueryList": false, + "MediaQueryListEvent": false, + "MediaRecorder": false, + "MediaRecorderErrorEvent": false, + "MediaSession": false, + "MediaSource": false, + "MediaSourceHandle": false, + "MediaStream": false, + "MediaStreamAudioDestinationNode": false, + "MediaStreamAudioSourceNode": false, + "MediaStreamEvent": false, + "MediaStreamTrack": false, + "MediaStreamTrackAudioSourceNode": false, + "MediaStreamTrackAudioStats": false, + "MediaStreamTrackEvent": false, + "MediaStreamTrackGenerator": false, + "MediaStreamTrackProcessor": false, + "MediaStreamTrackVideoStats": false, + "menubar": false, + "MessageChannel": false, + "MessageEvent": false, + "MessagePort": false, + "MIDIAccess": false, + "MIDIConnectionEvent": false, + "MIDIInput": false, + "MIDIInputMap": false, + "MIDIMessageEvent": false, + "MIDIOutput": false, + "MIDIOutputMap": false, + "MIDIPort": false, + "MimeType": false, + "MimeTypeArray": false, + "model": false, + "ModelGenericSession": false, + "ModelManager": false, + "MouseEvent": false, + "moveBy": false, + "moveTo": false, + "MutationEvent": false, + "MutationObserver": false, + "MutationRecord": false, + "name": false, + "NamedNodeMap": false, + "NavigateEvent": false, + "navigation": false, + "Navigation": false, + "NavigationActivation": false, + "NavigationCurrentEntryChangeEvent": false, + "NavigationDestination": false, + "NavigationHistoryEntry": false, + "NavigationPrecommitController": false, + "NavigationPreloadManager": false, + "NavigationTransition": false, + "navigator": false, + "Navigator": false, + "NavigatorLogin": false, + "NavigatorManagedData": false, + "NavigatorUAData": false, + "NetworkInformation": false, + "Node": false, + "NodeFilter": false, + "NodeIterator": false, + "NodeList": false, + "Notification": false, + "NotifyPaintEvent": false, + "NotRestoredReasonDetails": false, + "NotRestoredReasons": false, + "Observable": false, + "OfflineAudioCompletionEvent": false, + "OfflineAudioContext": false, + "offscreenBuffering": false, + "OffscreenCanvas": false, + "OffscreenCanvasRenderingContext2D": false, + "onabort": true, + "onafterprint": true, + "onanimationcancel": true, + "onanimationend": true, + "onanimationiteration": true, + "onanimationstart": true, + "onappinstalled": true, + "onauxclick": true, + "onbeforeinput": true, + "onbeforeinstallprompt": true, + "onbeforematch": true, + "onbeforeprint": true, + "onbeforetoggle": true, + "onbeforeunload": true, + "onbeforexrselect": true, + "onblur": true, + "oncancel": true, + "oncanplay": true, + "oncanplaythrough": true, + "onchange": true, + "onclick": true, + "onclose": true, + "oncommand": true, + "oncontentvisibilityautostatechange": true, + "oncontextlost": true, + "oncontextmenu": true, + "oncontextrestored": true, + "oncopy": true, + "oncuechange": true, + "oncut": true, + "ondblclick": true, + "ondevicemotion": true, + "ondeviceorientation": true, + "ondeviceorientationabsolute": true, + "ondrag": true, + "ondragend": true, + "ondragenter": true, + "ondragleave": true, + "ondragover": true, + "ondragstart": true, + "ondrop": true, + "ondurationchange": true, + "onemptied": true, + "onended": true, + "onerror": true, + "onfocus": true, + "onformdata": true, + "ongamepadconnected": true, + "ongamepaddisconnected": true, + "ongotpointercapture": true, + "onhashchange": true, + "oninput": true, + "oninvalid": true, + "onkeydown": true, + "onkeypress": true, + "onkeyup": true, + "onlanguagechange": true, + "onload": true, + "onloadeddata": true, + "onloadedmetadata": true, + "onloadstart": true, + "onlostpointercapture": true, + "onmessage": true, + "onmessageerror": true, + "onmousedown": true, + "onmouseenter": true, + "onmouseleave": true, + "onmousemove": true, + "onmouseout": true, + "onmouseover": true, + "onmouseup": true, + "onmousewheel": true, + "onoffline": true, + "ononline": true, + "onpagehide": true, + "onpagereveal": true, + "onpageshow": true, + "onpageswap": true, + "onpaste": true, + "onpause": true, + "onplay": true, + "onplaying": true, + "onpointercancel": true, + "onpointerdown": true, + "onpointerenter": true, + "onpointerleave": true, + "onpointermove": true, + "onpointerout": true, + "onpointerover": true, + "onpointerrawupdate": true, + "onpointerup": true, + "onpopstate": true, + "onprogress": true, + "onratechange": true, + "onrejectionhandled": true, + "onreset": true, + "onresize": true, + "onscroll": true, + "onscrollend": true, + "onscrollsnapchange": true, + "onscrollsnapchanging": true, + "onsearch": true, + "onsecuritypolicyviolation": true, + "onseeked": true, + "onseeking": true, + "onselect": true, + "onselectionchange": true, + "onselectstart": true, + "onslotchange": true, + "onstalled": true, + "onstorage": true, + "onsubmit": true, + "onsuspend": true, + "ontimeupdate": true, + "ontoggle": true, + "ontransitioncancel": true, + "ontransitionend": true, + "ontransitionrun": true, + "ontransitionstart": true, + "onunhandledrejection": true, + "onunload": true, + "onvolumechange": true, + "onwaiting": true, + "onwheel": true, + "open": false, + "opener": false, + "Option": false, + "OrientationSensor": false, + "origin": false, + "originAgentCluster": false, + "OscillatorNode": false, + "OTPCredential": false, + "outerHeight": false, + "outerWidth": false, + "OverconstrainedError": false, + "PageRevealEvent": false, + "PageSwapEvent": false, + "PageTransitionEvent": false, + "pageXOffset": false, + "pageYOffset": false, + "PannerNode": false, + "parent": false, + "PasswordCredential": false, + "Path2D": false, + "PaymentAddress": false, + "PaymentManager": false, + "PaymentMethodChangeEvent": false, + "PaymentRequest": false, + "PaymentRequestUpdateEvent": false, + "PaymentResponse": false, + "performance": false, + "Performance": false, + "PerformanceElementTiming": false, + "PerformanceEntry": false, + "PerformanceEventTiming": false, + "PerformanceLongAnimationFrameTiming": false, + "PerformanceLongTaskTiming": false, + "PerformanceMark": false, + "PerformanceMeasure": false, + "PerformanceNavigation": false, + "PerformanceNavigationTiming": false, + "PerformanceObserver": false, + "PerformanceObserverEntryList": false, + "PerformancePaintTiming": false, + "PerformanceResourceTiming": false, + "PerformanceScriptTiming": false, + "PerformanceServerTiming": false, + "PerformanceTiming": false, + "PeriodicSyncManager": false, + "PeriodicWave": false, + "Permissions": false, + "PermissionStatus": false, + "PERSISTENT": false, + "personalbar": false, + "PictureInPictureEvent": false, + "PictureInPictureWindow": false, + "Plugin": false, + "PluginArray": false, + "PointerEvent": false, + "PopStateEvent": false, + "postMessage": false, + "Presentation": false, + "PresentationAvailability": false, + "PresentationConnection": false, + "PresentationConnectionAvailableEvent": false, + "PresentationConnectionCloseEvent": false, + "PresentationConnectionList": false, + "PresentationReceiver": false, + "PresentationRequest": false, + "PressureObserver": false, + "PressureRecord": false, + "print": false, + "ProcessingInstruction": false, + "Profiler": false, + "ProgressEvent": false, + "PromiseRejectionEvent": false, + "prompt": false, + "ProtectedAudience": false, + "PublicKeyCredential": false, + "PushManager": false, + "PushSubscription": false, + "PushSubscriptionOptions": false, + "queryLocalFonts": false, + "queueMicrotask": false, + "QuotaExceededError": false, + "RadioNodeList": false, + "Range": false, + "ReadableByteStreamController": false, + "ReadableStream": false, + "ReadableStreamBYOBReader": false, + "ReadableStreamBYOBRequest": false, + "ReadableStreamDefaultController": false, + "ReadableStreamDefaultReader": false, + "registerProcessor": false, + "RelativeOrientationSensor": false, + "RemotePlayback": false, + "removeEventListener": false, + "ReportBody": false, + "reportError": false, + "ReportingObserver": false, + "Request": false, + "requestAnimationFrame": false, + "requestIdleCallback": false, + "resizeBy": false, + "ResizeObserver": false, + "ResizeObserverEntry": false, + "ResizeObserverSize": false, + "resizeTo": false, + "Response": false, + "RestrictionTarget": false, + "RTCCertificate": false, + "RTCDataChannel": false, + "RTCDataChannelEvent": false, + "RTCDtlsTransport": false, + "RTCDTMFSender": false, + "RTCDTMFToneChangeEvent": false, + "RTCEncodedAudioFrame": false, + "RTCEncodedVideoFrame": false, + "RTCError": false, + "RTCErrorEvent": false, + "RTCIceCandidate": false, + "RTCIceTransport": false, + "RTCPeerConnection": false, + "RTCPeerConnectionIceErrorEvent": false, + "RTCPeerConnectionIceEvent": false, + "RTCRtpReceiver": false, + "RTCRtpScriptTransform": false, + "RTCRtpSender": false, + "RTCRtpTransceiver": false, + "RTCSctpTransport": false, + "RTCSessionDescription": false, + "RTCStatsReport": false, + "RTCTrackEvent": false, + "sampleRate": false, + "scheduler": false, + "Scheduler": false, + "Scheduling": false, + "screen": false, + "Screen": false, + "ScreenDetailed": false, + "ScreenDetails": false, + "screenLeft": false, + "ScreenOrientation": false, + "screenTop": false, + "screenX": false, + "screenY": false, + "ScriptProcessorNode": false, + "scroll": false, + "scrollbars": false, + "scrollBy": false, + "ScrollTimeline": false, + "scrollTo": false, + "scrollX": false, + "scrollY": false, + "SecurityPolicyViolationEvent": false, + "Selection": false, + "self": false, + "Sensor": false, + "SensorErrorEvent": false, + "Serial": false, + "SerialPort": false, + "ServiceWorker": false, + "ServiceWorkerContainer": false, + "ServiceWorkerRegistration": false, + "sessionStorage": false, + "setInterval": false, + "setTimeout": false, + "ShadowRoot": false, + "sharedStorage": false, + "SharedStorage": false, + "SharedStorageAppendMethod": false, + "SharedStorageClearMethod": false, + "SharedStorageDeleteMethod": false, + "SharedStorageModifierMethod": false, + "SharedStorageSetMethod": false, + "SharedStorageWorklet": false, + "SharedWorker": false, + "showDirectoryPicker": false, + "showOpenFilePicker": false, + "showSaveFilePicker": false, + "SnapEvent": false, + "SourceBuffer": false, + "SourceBufferList": false, + "SpeechGrammar": false, + "SpeechGrammarList": false, + "SpeechRecognition": false, + "SpeechRecognitionErrorEvent": false, + "SpeechRecognitionEvent": false, + "SpeechRecognitionPhrase": false, + "speechSynthesis": false, + "SpeechSynthesis": false, + "SpeechSynthesisErrorEvent": false, + "SpeechSynthesisEvent": false, + "SpeechSynthesisUtterance": false, + "SpeechSynthesisVoice": false, + "StaticRange": false, + "status": false, + "statusbar": false, + "StereoPannerNode": false, + "stop": false, + "Storage": false, + "StorageBucket": false, + "StorageBucketManager": false, + "StorageEvent": false, + "StorageManager": false, + "structuredClone": false, + "styleMedia": false, + "StylePropertyMap": false, + "StylePropertyMapReadOnly": false, + "StyleSheet": false, + "StyleSheetList": false, + "SubmitEvent": false, + "Subscriber": false, + "SubtleCrypto": false, + "Summarizer": false, + "SuppressedError": false, + "SVGAElement": false, + "SVGAngle": false, + "SVGAnimatedAngle": false, + "SVGAnimatedBoolean": false, + "SVGAnimatedEnumeration": false, + "SVGAnimatedInteger": false, + "SVGAnimatedLength": false, + "SVGAnimatedLengthList": false, + "SVGAnimatedNumber": false, + "SVGAnimatedNumberList": false, + "SVGAnimatedPreserveAspectRatio": false, + "SVGAnimatedRect": false, + "SVGAnimatedString": false, + "SVGAnimatedTransformList": false, + "SVGAnimateElement": false, + "SVGAnimateMotionElement": false, + "SVGAnimateTransformElement": false, + "SVGAnimationElement": false, + "SVGCircleElement": false, + "SVGClipPathElement": false, + "SVGComponentTransferFunctionElement": false, + "SVGDefsElement": false, + "SVGDescElement": false, + "SVGElement": false, + "SVGEllipseElement": false, + "SVGFEBlendElement": false, + "SVGFEColorMatrixElement": false, + "SVGFEComponentTransferElement": false, + "SVGFECompositeElement": false, + "SVGFEConvolveMatrixElement": false, + "SVGFEDiffuseLightingElement": false, + "SVGFEDisplacementMapElement": false, + "SVGFEDistantLightElement": false, + "SVGFEDropShadowElement": false, + "SVGFEFloodElement": false, + "SVGFEFuncAElement": false, + "SVGFEFuncBElement": false, + "SVGFEFuncGElement": false, + "SVGFEFuncRElement": false, + "SVGFEGaussianBlurElement": false, + "SVGFEImageElement": false, + "SVGFEMergeElement": false, + "SVGFEMergeNodeElement": false, + "SVGFEMorphologyElement": false, + "SVGFEOffsetElement": false, + "SVGFEPointLightElement": false, + "SVGFESpecularLightingElement": false, + "SVGFESpotLightElement": false, + "SVGFETileElement": false, + "SVGFETurbulenceElement": false, + "SVGFilterElement": false, + "SVGForeignObjectElement": false, + "SVGGElement": false, + "SVGGeometryElement": false, + "SVGGradientElement": false, + "SVGGraphicsElement": false, + "SVGImageElement": false, + "SVGLength": false, + "SVGLengthList": false, + "SVGLinearGradientElement": false, + "SVGLineElement": false, + "SVGMarkerElement": false, + "SVGMaskElement": false, + "SVGMatrix": false, + "SVGMetadataElement": false, + "SVGMPathElement": false, + "SVGNumber": false, + "SVGNumberList": false, + "SVGPathElement": false, + "SVGPatternElement": false, + "SVGPoint": false, + "SVGPointList": false, + "SVGPolygonElement": false, + "SVGPolylineElement": false, + "SVGPreserveAspectRatio": false, + "SVGRadialGradientElement": false, + "SVGRect": false, + "SVGRectElement": false, + "SVGScriptElement": false, + "SVGSetElement": false, + "SVGStopElement": false, + "SVGStringList": false, + "SVGStyleElement": false, + "SVGSVGElement": false, + "SVGSwitchElement": false, + "SVGSymbolElement": false, + "SVGTextContentElement": false, + "SVGTextElement": false, + "SVGTextPathElement": false, + "SVGTextPositioningElement": false, + "SVGTitleElement": false, + "SVGTransform": false, + "SVGTransformList": false, + "SVGTSpanElement": false, + "SVGUnitTypes": false, + "SVGUseElement": false, + "SVGViewElement": false, + "SyncManager": false, + "TaskAttributionTiming": false, + "TaskController": false, + "TaskPriorityChangeEvent": false, + "TaskSignal": false, + "TEMPORARY": false, + "Text": false, + "TextDecoder": false, + "TextDecoderStream": false, + "TextEncoder": false, + "TextEncoderStream": false, + "TextEvent": false, + "TextFormat": false, + "TextFormatUpdateEvent": false, + "TextMetrics": false, + "TextTrack": false, + "TextTrackCue": false, + "TextTrackCueList": false, + "TextTrackList": false, + "TextUpdateEvent": false, + "TimeEvent": false, + "TimeRanges": false, + "ToggleEvent": false, + "toolbar": false, + "top": false, + "Touch": false, + "TouchEvent": false, + "TouchList": false, + "TrackEvent": false, + "TransformStream": false, + "TransformStreamDefaultController": false, + "TransitionEvent": false, + "Translator": false, + "TreeWalker": false, + "TrustedHTML": false, + "TrustedScript": false, + "TrustedScriptURL": false, + "TrustedTypePolicy": false, + "TrustedTypePolicyFactory": false, + "trustedTypes": false, + "UIEvent": false, + "URL": false, + "URLPattern": false, + "URLSearchParams": false, + "USB": false, + "USBAlternateInterface": false, + "USBConfiguration": false, + "USBConnectionEvent": false, + "USBDevice": false, + "USBEndpoint": false, + "USBInterface": false, + "USBInTransferResult": false, + "USBIsochronousInTransferPacket": false, + "USBIsochronousInTransferResult": false, + "USBIsochronousOutTransferPacket": false, + "USBIsochronousOutTransferResult": false, + "USBOutTransferResult": false, + "UserActivation": false, + "ValidityState": false, + "VideoColorSpace": false, + "VideoDecoder": false, + "VideoEncoder": false, + "VideoFrame": false, + "VideoPlaybackQuality": false, + "viewport": false, + "Viewport": false, + "ViewTimeline": false, + "ViewTransition": false, + "ViewTransitionTypeSet": false, + "VirtualKeyboard": false, + "VirtualKeyboardGeometryChangeEvent": false, + "VisibilityStateEntry": false, + "visualViewport": false, + "VisualViewport": false, + "VTTCue": false, + "VTTRegion": false, + "WakeLock": false, + "WakeLockSentinel": false, + "WaveShaperNode": false, + "WebAssembly": false, + "WebGL2RenderingContext": false, + "WebGLActiveInfo": false, + "WebGLBuffer": false, + "WebGLContextEvent": false, + "WebGLFramebuffer": false, + "WebGLObject": false, + "WebGLProgram": false, + "WebGLQuery": false, + "WebGLRenderbuffer": false, + "WebGLRenderingContext": false, + "WebGLSampler": false, + "WebGLShader": false, + "WebGLShaderPrecisionFormat": false, + "WebGLSync": false, + "WebGLTexture": false, + "WebGLTransformFeedback": false, + "WebGLUniformLocation": false, + "WebGLVertexArrayObject": false, + "WebSocket": false, + "WebSocketError": false, + "WebSocketStream": false, + "WebTransport": false, + "WebTransportBidirectionalStream": false, + "WebTransportDatagramDuplexStream": false, + "WebTransportError": false, + "WebTransportReceiveStream": false, + "WebTransportSendStream": false, + "WGSLLanguageFeatures": false, + "WheelEvent": false, + "when": false, + "window": false, + "Window": false, + "WindowControlsOverlay": false, + "WindowControlsOverlayGeometryChangeEvent": false, + "Worker": false, + "Worklet": false, + "WorkletGlobalScope": false, + "WritableStream": false, + "WritableStreamDefaultController": false, + "WritableStreamDefaultWriter": false, + "XMLDocument": false, + "XMLHttpRequest": false, + "XMLHttpRequestEventTarget": false, + "XMLHttpRequestUpload": false, + "XMLSerializer": false, + "XPathEvaluator": false, + "XPathExpression": false, + "XPathResult": false, + "XRAnchor": false, + "XRAnchorSet": false, + "XRBoundedReferenceSpace": false, + "XRCamera": false, + "XRCPUDepthInformation": false, + "XRDepthInformation": false, + "XRDOMOverlayState": false, + "XRFrame": false, + "XRHand": false, + "XRHitTestResult": false, + "XRHitTestSource": false, + "XRInputSource": false, + "XRInputSourceArray": false, + "XRInputSourceEvent": false, + "XRInputSourcesChangeEvent": false, + "XRJointPose": false, + "XRJointSpace": false, + "XRLayer": false, + "XRLightEstimate": false, + "XRLightProbe": false, + "XRPose": false, + "XRRay": false, + "XRReferenceSpace": false, + "XRReferenceSpaceEvent": false, + "XRRenderState": false, + "XRRigidTransform": false, + "XRSession": false, + "XRSessionEvent": false, + "XRSpace": false, + "XRSystem": false, + "XRTransientInputHitTestResult": false, + "XRTransientInputHitTestSource": false, + "XRView": false, + "XRViewerPose": false, + "XRViewport": false, + "XRWebGLBinding": false, + "XRWebGLDepthInformation": false, + "XRWebGLLayer": false, + "XSLTProcessor": false + } + }, + "errors": [ + { + "messageId": "impliedEval" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-implied-eval > invalid + +```js +window.window['execScript']('foo') +``` + +```json +{ + "languageOptions": { + "globals": { + "AbortController": false, + "AbortSignal": false, + "AbsoluteOrientationSensor": false, + "AbstractRange": false, + "Accelerometer": false, + "addEventListener": false, + "ai": false, + "AI": false, + "AICreateMonitor": false, + "AITextSession": false, + "alert": false, + "AnalyserNode": false, + "Animation": false, + "AnimationEffect": false, + "AnimationEvent": false, + "AnimationPlaybackEvent": false, + "AnimationTimeline": false, + "AsyncDisposableStack": false, + "atob": false, + "Attr": false, + "Audio": false, + "AudioBuffer": false, + "AudioBufferSourceNode": false, + "AudioContext": false, + "AudioData": false, + "AudioDecoder": false, + "AudioDestinationNode": false, + "AudioEncoder": false, + "AudioListener": false, + "AudioNode": false, + "AudioParam": false, + "AudioParamMap": false, + "AudioProcessingEvent": false, + "AudioScheduledSourceNode": false, + "AudioSinkInfo": false, + "AudioWorklet": false, + "AudioWorkletGlobalScope": false, + "AudioWorkletNode": false, + "AudioWorkletProcessor": false, + "AuthenticatorAssertionResponse": false, + "AuthenticatorAttestationResponse": false, + "AuthenticatorResponse": false, + "BackgroundFetchManager": false, + "BackgroundFetchRecord": false, + "BackgroundFetchRegistration": false, + "BarcodeDetector": false, + "BarProp": false, + "BaseAudioContext": false, + "BatteryManager": false, + "BeforeUnloadEvent": false, + "BiquadFilterNode": false, + "Blob": false, + "BlobEvent": false, + "Bluetooth": false, + "BluetoothCharacteristicProperties": false, + "BluetoothDevice": false, + "BluetoothRemoteGATTCharacteristic": false, + "BluetoothRemoteGATTDescriptor": false, + "BluetoothRemoteGATTServer": false, + "BluetoothRemoteGATTService": false, + "BluetoothUUID": false, + "blur": false, + "BroadcastChannel": false, + "BrowserCaptureMediaStreamTrack": false, + "btoa": false, + "ByteLengthQueuingStrategy": false, + "Cache": false, + "caches": false, + "CacheStorage": false, + "cancelAnimationFrame": false, + "cancelIdleCallback": false, + "CanvasCaptureMediaStream": false, + "CanvasCaptureMediaStreamTrack": false, + "CanvasGradient": false, + "CanvasPattern": false, + "CanvasRenderingContext2D": false, + "CaptureController": false, + "CaretPosition": false, + "CDATASection": false, + "ChannelMergerNode": false, + "ChannelSplitterNode": false, + "ChapterInformation": false, + "CharacterBoundsUpdateEvent": false, + "CharacterData": false, + "clearInterval": false, + "clearTimeout": false, + "clientInformation": false, + "Clipboard": false, + "ClipboardChangeEvent": false, + "ClipboardEvent": false, + "ClipboardItem": false, + "close": false, + "closed": false, + "CloseEvent": false, + "CloseWatcher": false, + "CommandEvent": false, + "Comment": false, + "CompositionEvent": false, + "CompressionStream": false, + "confirm": false, + "console": false, + "ConstantSourceNode": false, + "ContentVisibilityAutoStateChangeEvent": false, + "ConvolverNode": false, + "CookieChangeEvent": false, + "CookieDeprecationLabel": false, + "cookieStore": false, + "CookieStore": false, + "CookieStoreManager": false, + "CountQueuingStrategy": false, + "createImageBitmap": false, + "CreateMonitor": false, + "Credential": false, + "credentialless": false, + "CredentialsContainer": false, + "CropTarget": false, + "crossOriginIsolated": false, + "crypto": false, + "Crypto": false, + "CryptoKey": false, + "CSPViolationReportBody": false, + "CSS": false, + "CSSAnimation": false, + "CSSConditionRule": false, + "CSSContainerRule": false, + "CSSCounterStyleRule": false, + "CSSFontFaceRule": false, + "CSSFontFeatureValuesRule": false, + "CSSFontPaletteValuesRule": false, + "CSSFunctionDeclarations": false, + "CSSFunctionDescriptors": false, + "CSSFunctionRule": false, + "CSSGroupingRule": false, + "CSSImageValue": false, + "CSSImportRule": false, + "CSSKeyframeRule": false, + "CSSKeyframesRule": false, + "CSSKeywordValue": false, + "CSSLayerBlockRule": false, + "CSSLayerStatementRule": false, + "CSSMarginRule": false, + "CSSMathClamp": false, + "CSSMathInvert": false, + "CSSMathMax": false, + "CSSMathMin": false, + "CSSMathNegate": false, + "CSSMathProduct": false, + "CSSMathSum": false, + "CSSMathValue": false, + "CSSMatrixComponent": false, + "CSSMediaRule": false, + "CSSNamespaceRule": false, + "CSSNestedDeclarations": false, + "CSSNumericArray": false, + "CSSNumericValue": false, + "CSSPageDescriptors": false, + "CSSPageRule": false, + "CSSPerspective": false, + "CSSPositionTryDescriptors": false, + "CSSPositionTryRule": false, + "CSSPositionValue": false, + "CSSPropertyRule": false, + "CSSRotate": false, + "CSSRule": false, + "CSSRuleList": false, + "CSSScale": false, + "CSSScopeRule": false, + "CSSSkew": false, + "CSSSkewX": false, + "CSSSkewY": false, + "CSSStartingStyleRule": false, + "CSSStyleDeclaration": false, + "CSSStyleRule": false, + "CSSStyleSheet": false, + "CSSStyleValue": false, + "CSSSupportsRule": false, + "CSSTransformComponent": false, + "CSSTransformValue": false, + "CSSTransition": false, + "CSSTranslate": false, + "CSSUnitValue": false, + "CSSUnparsedValue": false, + "CSSVariableReferenceValue": false, + "CSSViewTransitionRule": false, + "currentFrame": false, + "currentTime": false, + "CustomElementRegistry": false, + "customElements": false, + "CustomEvent": false, + "CustomStateSet": false, + "DataTransfer": false, + "DataTransferItem": false, + "DataTransferItemList": false, + "DecompressionStream": false, + "DelayNode": false, + "DelegatedInkTrailPresenter": false, + "DeviceMotionEvent": false, + "DeviceMotionEventAcceleration": false, + "DeviceMotionEventRotationRate": false, + "DeviceOrientationEvent": false, + "devicePixelRatio": false, + "DevicePosture": false, + "DigitalCredential": false, + "dispatchEvent": false, + "DisposableStack": false, + "document": false, + "Document": false, + "DocumentFragment": false, + "documentPictureInPicture": false, + "DocumentPictureInPicture": false, + "DocumentPictureInPictureEvent": false, + "DocumentTimeline": false, + "DocumentType": false, + "DOMError": false, + "DOMException": false, + "DOMImplementation": false, + "DOMMatrix": false, + "DOMMatrixReadOnly": false, + "DOMParser": false, + "DOMPoint": false, + "DOMPointReadOnly": false, + "DOMQuad": false, + "DOMRect": false, + "DOMRectList": false, + "DOMRectReadOnly": false, + "DOMStringList": false, + "DOMStringMap": false, + "DOMTokenList": false, + "DragEvent": false, + "DynamicsCompressorNode": false, + "EditContext": false, + "Element": false, + "ElementInternals": false, + "EncodedAudioChunk": false, + "EncodedVideoChunk": false, + "ErrorEvent": false, + "event": false, + "Event": false, + "EventCounts": false, + "EventSource": false, + "EventTarget": false, + "external": false, + "External": false, + "EyeDropper": false, + "FeaturePolicy": false, + "FederatedCredential": false, + "fence": false, + "Fence": false, + "FencedFrameConfig": false, + "fetch": false, + "fetchLater": false, + "FetchLaterResult": false, + "File": false, + "FileList": false, + "FileReader": false, + "FileSystem": false, + "FileSystemDirectoryEntry": false, + "FileSystemDirectoryHandle": false, + "FileSystemDirectoryReader": false, + "FileSystemEntry": false, + "FileSystemFileEntry": false, + "FileSystemFileHandle": false, + "FileSystemHandle": false, + "FileSystemObserver": false, + "FileSystemWritableFileStream": false, + "find": false, + "focus": false, + "FocusEvent": false, + "FontData": false, + "FontFace": false, + "FontFaceSet": false, + "FontFaceSetLoadEvent": false, + "FormData": false, + "FormDataEvent": false, + "FragmentDirective": false, + "frameElement": false, + "frames": false, + "GainNode": false, + "Gamepad": false, + "GamepadAxisMoveEvent": false, + "GamepadButton": false, + "GamepadButtonEvent": false, + "GamepadEvent": false, + "GamepadHapticActuator": false, + "GamepadPose": false, + "Geolocation": false, + "GeolocationCoordinates": false, + "GeolocationPosition": false, + "GeolocationPositionError": false, + "getComputedStyle": false, + "getScreenDetails": false, + "getSelection": false, + "GPU": false, + "GPUAdapter": false, + "GPUAdapterInfo": false, + "GPUBindGroup": false, + "GPUBindGroupLayout": false, + "GPUBuffer": false, + "GPUBufferUsage": false, + "GPUCanvasContext": false, + "GPUColorWrite": false, + "GPUCommandBuffer": false, + "GPUCommandEncoder": false, + "GPUCompilationInfo": false, + "GPUCompilationMessage": false, + "GPUComputePassEncoder": false, + "GPUComputePipeline": false, + "GPUDevice": false, + "GPUDeviceLostInfo": false, + "GPUError": false, + "GPUExternalTexture": false, + "GPUInternalError": false, + "GPUMapMode": false, + "GPUOutOfMemoryError": false, + "GPUPipelineError": false, + "GPUPipelineLayout": false, + "GPUQuerySet": false, + "GPUQueue": false, + "GPURenderBundle": false, + "GPURenderBundleEncoder": false, + "GPURenderPassEncoder": false, + "GPURenderPipeline": false, + "GPUSampler": false, + "GPUShaderModule": false, + "GPUShaderStage": false, + "GPUSupportedFeatures": false, + "GPUSupportedLimits": false, + "GPUTexture": false, + "GPUTextureUsage": false, + "GPUTextureView": false, + "GPUUncapturedErrorEvent": false, + "GPUValidationError": false, + "GravitySensor": false, + "Gyroscope": false, + "HashChangeEvent": false, + "Headers": false, + "HID": false, + "HIDConnectionEvent": false, + "HIDDevice": false, + "HIDInputReportEvent": false, + "Highlight": false, + "HighlightRegistry": false, + "history": false, + "History": false, + "HTMLAllCollection": false, + "HTMLAnchorElement": false, + "HTMLAreaElement": false, + "HTMLAudioElement": false, + "HTMLBaseElement": false, + "HTMLBodyElement": false, + "HTMLBRElement": false, + "HTMLButtonElement": false, + "HTMLCanvasElement": false, + "HTMLCollection": false, + "HTMLDataElement": false, + "HTMLDataListElement": false, + "HTMLDetailsElement": false, + "HTMLDialogElement": false, + "HTMLDirectoryElement": false, + "HTMLDivElement": false, + "HTMLDListElement": false, + "HTMLDocument": false, + "HTMLElement": false, + "HTMLEmbedElement": false, + "HTMLFencedFrameElement": false, + "HTMLFieldSetElement": false, + "HTMLFontElement": false, + "HTMLFormControlsCollection": false, + "HTMLFormElement": false, + "HTMLFrameElement": false, + "HTMLFrameSetElement": false, + "HTMLHeadElement": false, + "HTMLHeadingElement": false, + "HTMLHRElement": false, + "HTMLHtmlElement": false, + "HTMLIFrameElement": false, + "HTMLImageElement": false, + "HTMLInputElement": false, + "HTMLLabelElement": false, + "HTMLLegendElement": false, + "HTMLLIElement": false, + "HTMLLinkElement": false, + "HTMLMapElement": false, + "HTMLMarqueeElement": false, + "HTMLMediaElement": false, + "HTMLMenuElement": false, + "HTMLMetaElement": false, + "HTMLMeterElement": false, + "HTMLModElement": false, + "HTMLObjectElement": false, + "HTMLOListElement": false, + "HTMLOptGroupElement": false, + "HTMLOptionElement": false, + "HTMLOptionsCollection": false, + "HTMLOutputElement": false, + "HTMLParagraphElement": false, + "HTMLParamElement": false, + "HTMLPictureElement": false, + "HTMLPreElement": false, + "HTMLProgressElement": false, + "HTMLQuoteElement": false, + "HTMLScriptElement": false, + "HTMLSelectedContentElement": false, + "HTMLSelectElement": false, + "HTMLSlotElement": false, + "HTMLSourceElement": false, + "HTMLSpanElement": false, + "HTMLStyleElement": false, + "HTMLTableCaptionElement": false, + "HTMLTableCellElement": false, + "HTMLTableColElement": false, + "HTMLTableElement": false, + "HTMLTableRowElement": false, + "HTMLTableSectionElement": false, + "HTMLTemplateElement": false, + "HTMLTextAreaElement": false, + "HTMLTimeElement": false, + "HTMLTitleElement": false, + "HTMLTrackElement": false, + "HTMLUListElement": false, + "HTMLUnknownElement": false, + "HTMLVideoElement": false, + "IDBCursor": false, + "IDBCursorWithValue": false, + "IDBDatabase": false, + "IDBFactory": false, + "IDBIndex": false, + "IDBKeyRange": false, + "IDBObjectStore": false, + "IDBOpenDBRequest": false, + "IDBRecord": false, + "IDBRequest": false, + "IDBTransaction": false, + "IDBVersionChangeEvent": false, + "IdentityCredential": false, + "IdentityCredentialError": false, + "IdentityProvider": false, + "IdleDeadline": false, + "IdleDetector": false, + "IIRFilterNode": false, + "Image": false, + "ImageBitmap": false, + "ImageBitmapRenderingContext": false, + "ImageCapture": false, + "ImageData": false, + "ImageDecoder": false, + "ImageTrack": false, + "ImageTrackList": false, + "indexedDB": false, + "Ink": false, + "innerHeight": false, + "innerWidth": false, + "InputDeviceCapabilities": false, + "InputDeviceInfo": false, + "InputEvent": false, + "IntegrityViolationReportBody": false, + "InterestEvent": false, + "IntersectionObserver": false, + "IntersectionObserverEntry": false, + "isSecureContext": false, + "Keyboard": false, + "KeyboardEvent": false, + "KeyboardLayoutMap": false, + "KeyframeEffect": false, + "LanguageDetector": false, + "LargestContentfulPaint": false, + "LaunchParams": false, + "launchQueue": false, + "LaunchQueue": false, + "LayoutShift": false, + "LayoutShiftAttribution": false, + "length": false, + "LinearAccelerationSensor": false, + "localStorage": false, + "location": true, + "Location": false, + "locationbar": false, + "Lock": false, + "LockManager": false, + "matchMedia": false, + "MathMLElement": false, + "MediaCapabilities": false, + "MediaCapabilitiesInfo": false, + "MediaDeviceInfo": false, + "MediaDevices": false, + "MediaElementAudioSourceNode": false, + "MediaEncryptedEvent": false, + "MediaError": false, + "MediaKeyError": false, + "MediaKeyMessageEvent": false, + "MediaKeys": false, + "MediaKeySession": false, + "MediaKeyStatusMap": false, + "MediaKeySystemAccess": false, + "MediaList": false, + "MediaMetadata": false, + "MediaQueryList": false, + "MediaQueryListEvent": false, + "MediaRecorder": false, + "MediaRecorderErrorEvent": false, + "MediaSession": false, + "MediaSource": false, + "MediaSourceHandle": false, + "MediaStream": false, + "MediaStreamAudioDestinationNode": false, + "MediaStreamAudioSourceNode": false, + "MediaStreamEvent": false, + "MediaStreamTrack": false, + "MediaStreamTrackAudioSourceNode": false, + "MediaStreamTrackAudioStats": false, + "MediaStreamTrackEvent": false, + "MediaStreamTrackGenerator": false, + "MediaStreamTrackProcessor": false, + "MediaStreamTrackVideoStats": false, + "menubar": false, + "MessageChannel": false, + "MessageEvent": false, + "MessagePort": false, + "MIDIAccess": false, + "MIDIConnectionEvent": false, + "MIDIInput": false, + "MIDIInputMap": false, + "MIDIMessageEvent": false, + "MIDIOutput": false, + "MIDIOutputMap": false, + "MIDIPort": false, + "MimeType": false, + "MimeTypeArray": false, + "model": false, + "ModelGenericSession": false, + "ModelManager": false, + "MouseEvent": false, + "moveBy": false, + "moveTo": false, + "MutationEvent": false, + "MutationObserver": false, + "MutationRecord": false, + "name": false, + "NamedNodeMap": false, + "NavigateEvent": false, + "navigation": false, + "Navigation": false, + "NavigationActivation": false, + "NavigationCurrentEntryChangeEvent": false, + "NavigationDestination": false, + "NavigationHistoryEntry": false, + "NavigationPrecommitController": false, + "NavigationPreloadManager": false, + "NavigationTransition": false, + "navigator": false, + "Navigator": false, + "NavigatorLogin": false, + "NavigatorManagedData": false, + "NavigatorUAData": false, + "NetworkInformation": false, + "Node": false, + "NodeFilter": false, + "NodeIterator": false, + "NodeList": false, + "Notification": false, + "NotifyPaintEvent": false, + "NotRestoredReasonDetails": false, + "NotRestoredReasons": false, + "Observable": false, + "OfflineAudioCompletionEvent": false, + "OfflineAudioContext": false, + "offscreenBuffering": false, + "OffscreenCanvas": false, + "OffscreenCanvasRenderingContext2D": false, + "onabort": true, + "onafterprint": true, + "onanimationcancel": true, + "onanimationend": true, + "onanimationiteration": true, + "onanimationstart": true, + "onappinstalled": true, + "onauxclick": true, + "onbeforeinput": true, + "onbeforeinstallprompt": true, + "onbeforematch": true, + "onbeforeprint": true, + "onbeforetoggle": true, + "onbeforeunload": true, + "onbeforexrselect": true, + "onblur": true, + "oncancel": true, + "oncanplay": true, + "oncanplaythrough": true, + "onchange": true, + "onclick": true, + "onclose": true, + "oncommand": true, + "oncontentvisibilityautostatechange": true, + "oncontextlost": true, + "oncontextmenu": true, + "oncontextrestored": true, + "oncopy": true, + "oncuechange": true, + "oncut": true, + "ondblclick": true, + "ondevicemotion": true, + "ondeviceorientation": true, + "ondeviceorientationabsolute": true, + "ondrag": true, + "ondragend": true, + "ondragenter": true, + "ondragleave": true, + "ondragover": true, + "ondragstart": true, + "ondrop": true, + "ondurationchange": true, + "onemptied": true, + "onended": true, + "onerror": true, + "onfocus": true, + "onformdata": true, + "ongamepadconnected": true, + "ongamepaddisconnected": true, + "ongotpointercapture": true, + "onhashchange": true, + "oninput": true, + "oninvalid": true, + "onkeydown": true, + "onkeypress": true, + "onkeyup": true, + "onlanguagechange": true, + "onload": true, + "onloadeddata": true, + "onloadedmetadata": true, + "onloadstart": true, + "onlostpointercapture": true, + "onmessage": true, + "onmessageerror": true, + "onmousedown": true, + "onmouseenter": true, + "onmouseleave": true, + "onmousemove": true, + "onmouseout": true, + "onmouseover": true, + "onmouseup": true, + "onmousewheel": true, + "onoffline": true, + "ononline": true, + "onpagehide": true, + "onpagereveal": true, + "onpageshow": true, + "onpageswap": true, + "onpaste": true, + "onpause": true, + "onplay": true, + "onplaying": true, + "onpointercancel": true, + "onpointerdown": true, + "onpointerenter": true, + "onpointerleave": true, + "onpointermove": true, + "onpointerout": true, + "onpointerover": true, + "onpointerrawupdate": true, + "onpointerup": true, + "onpopstate": true, + "onprogress": true, + "onratechange": true, + "onrejectionhandled": true, + "onreset": true, + "onresize": true, + "onscroll": true, + "onscrollend": true, + "onscrollsnapchange": true, + "onscrollsnapchanging": true, + "onsearch": true, + "onsecuritypolicyviolation": true, + "onseeked": true, + "onseeking": true, + "onselect": true, + "onselectionchange": true, + "onselectstart": true, + "onslotchange": true, + "onstalled": true, + "onstorage": true, + "onsubmit": true, + "onsuspend": true, + "ontimeupdate": true, + "ontoggle": true, + "ontransitioncancel": true, + "ontransitionend": true, + "ontransitionrun": true, + "ontransitionstart": true, + "onunhandledrejection": true, + "onunload": true, + "onvolumechange": true, + "onwaiting": true, + "onwheel": true, + "open": false, + "opener": false, + "Option": false, + "OrientationSensor": false, + "origin": false, + "originAgentCluster": false, + "OscillatorNode": false, + "OTPCredential": false, + "outerHeight": false, + "outerWidth": false, + "OverconstrainedError": false, + "PageRevealEvent": false, + "PageSwapEvent": false, + "PageTransitionEvent": false, + "pageXOffset": false, + "pageYOffset": false, + "PannerNode": false, + "parent": false, + "PasswordCredential": false, + "Path2D": false, + "PaymentAddress": false, + "PaymentManager": false, + "PaymentMethodChangeEvent": false, + "PaymentRequest": false, + "PaymentRequestUpdateEvent": false, + "PaymentResponse": false, + "performance": false, + "Performance": false, + "PerformanceElementTiming": false, + "PerformanceEntry": false, + "PerformanceEventTiming": false, + "PerformanceLongAnimationFrameTiming": false, + "PerformanceLongTaskTiming": false, + "PerformanceMark": false, + "PerformanceMeasure": false, + "PerformanceNavigation": false, + "PerformanceNavigationTiming": false, + "PerformanceObserver": false, + "PerformanceObserverEntryList": false, + "PerformancePaintTiming": false, + "PerformanceResourceTiming": false, + "PerformanceScriptTiming": false, + "PerformanceServerTiming": false, + "PerformanceTiming": false, + "PeriodicSyncManager": false, + "PeriodicWave": false, + "Permissions": false, + "PermissionStatus": false, + "PERSISTENT": false, + "personalbar": false, + "PictureInPictureEvent": false, + "PictureInPictureWindow": false, + "Plugin": false, + "PluginArray": false, + "PointerEvent": false, + "PopStateEvent": false, + "postMessage": false, + "Presentation": false, + "PresentationAvailability": false, + "PresentationConnection": false, + "PresentationConnectionAvailableEvent": false, + "PresentationConnectionCloseEvent": false, + "PresentationConnectionList": false, + "PresentationReceiver": false, + "PresentationRequest": false, + "PressureObserver": false, + "PressureRecord": false, + "print": false, + "ProcessingInstruction": false, + "Profiler": false, + "ProgressEvent": false, + "PromiseRejectionEvent": false, + "prompt": false, + "ProtectedAudience": false, + "PublicKeyCredential": false, + "PushManager": false, + "PushSubscription": false, + "PushSubscriptionOptions": false, + "queryLocalFonts": false, + "queueMicrotask": false, + "QuotaExceededError": false, + "RadioNodeList": false, + "Range": false, + "ReadableByteStreamController": false, + "ReadableStream": false, + "ReadableStreamBYOBReader": false, + "ReadableStreamBYOBRequest": false, + "ReadableStreamDefaultController": false, + "ReadableStreamDefaultReader": false, + "registerProcessor": false, + "RelativeOrientationSensor": false, + "RemotePlayback": false, + "removeEventListener": false, + "ReportBody": false, + "reportError": false, + "ReportingObserver": false, + "Request": false, + "requestAnimationFrame": false, + "requestIdleCallback": false, + "resizeBy": false, + "ResizeObserver": false, + "ResizeObserverEntry": false, + "ResizeObserverSize": false, + "resizeTo": false, + "Response": false, + "RestrictionTarget": false, + "RTCCertificate": false, + "RTCDataChannel": false, + "RTCDataChannelEvent": false, + "RTCDtlsTransport": false, + "RTCDTMFSender": false, + "RTCDTMFToneChangeEvent": false, + "RTCEncodedAudioFrame": false, + "RTCEncodedVideoFrame": false, + "RTCError": false, + "RTCErrorEvent": false, + "RTCIceCandidate": false, + "RTCIceTransport": false, + "RTCPeerConnection": false, + "RTCPeerConnectionIceErrorEvent": false, + "RTCPeerConnectionIceEvent": false, + "RTCRtpReceiver": false, + "RTCRtpScriptTransform": false, + "RTCRtpSender": false, + "RTCRtpTransceiver": false, + "RTCSctpTransport": false, + "RTCSessionDescription": false, + "RTCStatsReport": false, + "RTCTrackEvent": false, + "sampleRate": false, + "scheduler": false, + "Scheduler": false, + "Scheduling": false, + "screen": false, + "Screen": false, + "ScreenDetailed": false, + "ScreenDetails": false, + "screenLeft": false, + "ScreenOrientation": false, + "screenTop": false, + "screenX": false, + "screenY": false, + "ScriptProcessorNode": false, + "scroll": false, + "scrollbars": false, + "scrollBy": false, + "ScrollTimeline": false, + "scrollTo": false, + "scrollX": false, + "scrollY": false, + "SecurityPolicyViolationEvent": false, + "Selection": false, + "self": false, + "Sensor": false, + "SensorErrorEvent": false, + "Serial": false, + "SerialPort": false, + "ServiceWorker": false, + "ServiceWorkerContainer": false, + "ServiceWorkerRegistration": false, + "sessionStorage": false, + "setInterval": false, + "setTimeout": false, + "ShadowRoot": false, + "sharedStorage": false, + "SharedStorage": false, + "SharedStorageAppendMethod": false, + "SharedStorageClearMethod": false, + "SharedStorageDeleteMethod": false, + "SharedStorageModifierMethod": false, + "SharedStorageSetMethod": false, + "SharedStorageWorklet": false, + "SharedWorker": false, + "showDirectoryPicker": false, + "showOpenFilePicker": false, + "showSaveFilePicker": false, + "SnapEvent": false, + "SourceBuffer": false, + "SourceBufferList": false, + "SpeechGrammar": false, + "SpeechGrammarList": false, + "SpeechRecognition": false, + "SpeechRecognitionErrorEvent": false, + "SpeechRecognitionEvent": false, + "SpeechRecognitionPhrase": false, + "speechSynthesis": false, + "SpeechSynthesis": false, + "SpeechSynthesisErrorEvent": false, + "SpeechSynthesisEvent": false, + "SpeechSynthesisUtterance": false, + "SpeechSynthesisVoice": false, + "StaticRange": false, + "status": false, + "statusbar": false, + "StereoPannerNode": false, + "stop": false, + "Storage": false, + "StorageBucket": false, + "StorageBucketManager": false, + "StorageEvent": false, + "StorageManager": false, + "structuredClone": false, + "styleMedia": false, + "StylePropertyMap": false, + "StylePropertyMapReadOnly": false, + "StyleSheet": false, + "StyleSheetList": false, + "SubmitEvent": false, + "Subscriber": false, + "SubtleCrypto": false, + "Summarizer": false, + "SuppressedError": false, + "SVGAElement": false, + "SVGAngle": false, + "SVGAnimatedAngle": false, + "SVGAnimatedBoolean": false, + "SVGAnimatedEnumeration": false, + "SVGAnimatedInteger": false, + "SVGAnimatedLength": false, + "SVGAnimatedLengthList": false, + "SVGAnimatedNumber": false, + "SVGAnimatedNumberList": false, + "SVGAnimatedPreserveAspectRatio": false, + "SVGAnimatedRect": false, + "SVGAnimatedString": false, + "SVGAnimatedTransformList": false, + "SVGAnimateElement": false, + "SVGAnimateMotionElement": false, + "SVGAnimateTransformElement": false, + "SVGAnimationElement": false, + "SVGCircleElement": false, + "SVGClipPathElement": false, + "SVGComponentTransferFunctionElement": false, + "SVGDefsElement": false, + "SVGDescElement": false, + "SVGElement": false, + "SVGEllipseElement": false, + "SVGFEBlendElement": false, + "SVGFEColorMatrixElement": false, + "SVGFEComponentTransferElement": false, + "SVGFECompositeElement": false, + "SVGFEConvolveMatrixElement": false, + "SVGFEDiffuseLightingElement": false, + "SVGFEDisplacementMapElement": false, + "SVGFEDistantLightElement": false, + "SVGFEDropShadowElement": false, + "SVGFEFloodElement": false, + "SVGFEFuncAElement": false, + "SVGFEFuncBElement": false, + "SVGFEFuncGElement": false, + "SVGFEFuncRElement": false, + "SVGFEGaussianBlurElement": false, + "SVGFEImageElement": false, + "SVGFEMergeElement": false, + "SVGFEMergeNodeElement": false, + "SVGFEMorphologyElement": false, + "SVGFEOffsetElement": false, + "SVGFEPointLightElement": false, + "SVGFESpecularLightingElement": false, + "SVGFESpotLightElement": false, + "SVGFETileElement": false, + "SVGFETurbulenceElement": false, + "SVGFilterElement": false, + "SVGForeignObjectElement": false, + "SVGGElement": false, + "SVGGeometryElement": false, + "SVGGradientElement": false, + "SVGGraphicsElement": false, + "SVGImageElement": false, + "SVGLength": false, + "SVGLengthList": false, + "SVGLinearGradientElement": false, + "SVGLineElement": false, + "SVGMarkerElement": false, + "SVGMaskElement": false, + "SVGMatrix": false, + "SVGMetadataElement": false, + "SVGMPathElement": false, + "SVGNumber": false, + "SVGNumberList": false, + "SVGPathElement": false, + "SVGPatternElement": false, + "SVGPoint": false, + "SVGPointList": false, + "SVGPolygonElement": false, + "SVGPolylineElement": false, + "SVGPreserveAspectRatio": false, + "SVGRadialGradientElement": false, + "SVGRect": false, + "SVGRectElement": false, + "SVGScriptElement": false, + "SVGSetElement": false, + "SVGStopElement": false, + "SVGStringList": false, + "SVGStyleElement": false, + "SVGSVGElement": false, + "SVGSwitchElement": false, + "SVGSymbolElement": false, + "SVGTextContentElement": false, + "SVGTextElement": false, + "SVGTextPathElement": false, + "SVGTextPositioningElement": false, + "SVGTitleElement": false, + "SVGTransform": false, + "SVGTransformList": false, + "SVGTSpanElement": false, + "SVGUnitTypes": false, + "SVGUseElement": false, + "SVGViewElement": false, + "SyncManager": false, + "TaskAttributionTiming": false, + "TaskController": false, + "TaskPriorityChangeEvent": false, + "TaskSignal": false, + "TEMPORARY": false, + "Text": false, + "TextDecoder": false, + "TextDecoderStream": false, + "TextEncoder": false, + "TextEncoderStream": false, + "TextEvent": false, + "TextFormat": false, + "TextFormatUpdateEvent": false, + "TextMetrics": false, + "TextTrack": false, + "TextTrackCue": false, + "TextTrackCueList": false, + "TextTrackList": false, + "TextUpdateEvent": false, + "TimeEvent": false, + "TimeRanges": false, + "ToggleEvent": false, + "toolbar": false, + "top": false, + "Touch": false, + "TouchEvent": false, + "TouchList": false, + "TrackEvent": false, + "TransformStream": false, + "TransformStreamDefaultController": false, + "TransitionEvent": false, + "Translator": false, + "TreeWalker": false, + "TrustedHTML": false, + "TrustedScript": false, + "TrustedScriptURL": false, + "TrustedTypePolicy": false, + "TrustedTypePolicyFactory": false, + "trustedTypes": false, + "UIEvent": false, + "URL": false, + "URLPattern": false, + "URLSearchParams": false, + "USB": false, + "USBAlternateInterface": false, + "USBConfiguration": false, + "USBConnectionEvent": false, + "USBDevice": false, + "USBEndpoint": false, + "USBInterface": false, + "USBInTransferResult": false, + "USBIsochronousInTransferPacket": false, + "USBIsochronousInTransferResult": false, + "USBIsochronousOutTransferPacket": false, + "USBIsochronousOutTransferResult": false, + "USBOutTransferResult": false, + "UserActivation": false, + "ValidityState": false, + "VideoColorSpace": false, + "VideoDecoder": false, + "VideoEncoder": false, + "VideoFrame": false, + "VideoPlaybackQuality": false, + "viewport": false, + "Viewport": false, + "ViewTimeline": false, + "ViewTransition": false, + "ViewTransitionTypeSet": false, + "VirtualKeyboard": false, + "VirtualKeyboardGeometryChangeEvent": false, + "VisibilityStateEntry": false, + "visualViewport": false, + "VisualViewport": false, + "VTTCue": false, + "VTTRegion": false, + "WakeLock": false, + "WakeLockSentinel": false, + "WaveShaperNode": false, + "WebAssembly": false, + "WebGL2RenderingContext": false, + "WebGLActiveInfo": false, + "WebGLBuffer": false, + "WebGLContextEvent": false, + "WebGLFramebuffer": false, + "WebGLObject": false, + "WebGLProgram": false, + "WebGLQuery": false, + "WebGLRenderbuffer": false, + "WebGLRenderingContext": false, + "WebGLSampler": false, + "WebGLShader": false, + "WebGLShaderPrecisionFormat": false, + "WebGLSync": false, + "WebGLTexture": false, + "WebGLTransformFeedback": false, + "WebGLUniformLocation": false, + "WebGLVertexArrayObject": false, + "WebSocket": false, + "WebSocketError": false, + "WebSocketStream": false, + "WebTransport": false, + "WebTransportBidirectionalStream": false, + "WebTransportDatagramDuplexStream": false, + "WebTransportError": false, + "WebTransportReceiveStream": false, + "WebTransportSendStream": false, + "WGSLLanguageFeatures": false, + "WheelEvent": false, + "when": false, + "window": false, + "Window": false, + "WindowControlsOverlay": false, + "WindowControlsOverlayGeometryChangeEvent": false, + "Worker": false, + "Worklet": false, + "WorkletGlobalScope": false, + "WritableStream": false, + "WritableStreamDefaultController": false, + "WritableStreamDefaultWriter": false, + "XMLDocument": false, + "XMLHttpRequest": false, + "XMLHttpRequestEventTarget": false, + "XMLHttpRequestUpload": false, + "XMLSerializer": false, + "XPathEvaluator": false, + "XPathExpression": false, + "XPathResult": false, + "XRAnchor": false, + "XRAnchorSet": false, + "XRBoundedReferenceSpace": false, + "XRCamera": false, + "XRCPUDepthInformation": false, + "XRDepthInformation": false, + "XRDOMOverlayState": false, + "XRFrame": false, + "XRHand": false, + "XRHitTestResult": false, + "XRHitTestSource": false, + "XRInputSource": false, + "XRInputSourceArray": false, + "XRInputSourceEvent": false, + "XRInputSourcesChangeEvent": false, + "XRJointPose": false, + "XRJointSpace": false, + "XRLayer": false, + "XRLightEstimate": false, + "XRLightProbe": false, + "XRPose": false, + "XRRay": false, + "XRReferenceSpace": false, + "XRReferenceSpaceEvent": false, + "XRRenderState": false, + "XRRigidTransform": false, + "XRSession": false, + "XRSessionEvent": false, + "XRSpace": false, + "XRSystem": false, + "XRTransientInputHitTestResult": false, + "XRTransientInputHitTestSource": false, + "XRView": false, + "XRViewerPose": false, + "XRViewport": false, + "XRWebGLBinding": false, + "XRWebGLDepthInformation": false, + "XRWebGLLayer": false, + "XSLTProcessor": false + } + }, + "errors": [ + { + "messageId": "execScript" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-implied-eval > invalid + +```js +global.setTimeout('foo') +``` + +```json +{ + "languageOptions": { + "sourceType": "commonjs" + }, + "errors": [ + { + "messageId": "impliedEval" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-implied-eval > invalid + +```js +global.setInterval('foo') +``` + +```json +{ + "languageOptions": { + "sourceType": "commonjs" + }, + "errors": [ + { + "messageId": "impliedEval" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-implied-eval > invalid + +```js +global.execScript('foo') +``` + +```json +{ + "languageOptions": { + "sourceType": "commonjs" + }, + "errors": [ + { + "messageId": "execScript" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-implied-eval > invalid + +```js +global['setTimeout']('foo') +``` + +```json +{ + "languageOptions": { + "sourceType": "commonjs" + }, + "errors": [ + { + "messageId": "impliedEval" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-implied-eval > invalid + +```js +global['setInterval']('foo') +``` + +```json +{ + "languageOptions": { + "sourceType": "commonjs" + }, + "errors": [ + { + "messageId": "impliedEval" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-implied-eval > invalid + +```js +global[`setInterval`]('foo') +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "commonjs" + }, + "errors": [ + { + "messageId": "impliedEval" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-implied-eval > invalid + +```js +global['execScript']('foo') +``` + +```json +{ + "languageOptions": { + "sourceType": "commonjs" + }, + "errors": [ + { + "messageId": "execScript" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-implied-eval > invalid + +```js +global[`execScript`]('foo') +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "commonjs" + }, + "errors": [ + { + "messageId": "execScript" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-implied-eval > invalid + +```js +global.global['setInterval']('foo') +``` + +```json +{ + "languageOptions": { + "sourceType": "commonjs" + }, + "errors": [ + { + "messageId": "impliedEval" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-implied-eval > invalid + +```js +global.global['execScript']('foo') +``` + +```json +{ + "languageOptions": { + "sourceType": "commonjs" + }, + "errors": [ + { + "messageId": "execScript" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-implied-eval > invalid + +```js +globalThis.setTimeout('foo') +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2020 + }, + "errors": [ + { + "messageId": "impliedEval" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-implied-eval > invalid + +```js +globalThis.setInterval('foo') +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2020 + }, + "errors": [ + { + "messageId": "impliedEval" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-implied-eval > invalid + +```js +globalThis.execScript('foo') +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2020 + }, + "errors": [ + { + "messageId": "execScript" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-implied-eval > invalid + +```js +setTimeout(`foo${bar}`) +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "globals": { + "AbortController": false, + "AbortSignal": false, + "AbsoluteOrientationSensor": false, + "AbstractRange": false, + "Accelerometer": false, + "addEventListener": false, + "ai": false, + "AI": false, + "AICreateMonitor": false, + "AITextSession": false, + "alert": false, + "AnalyserNode": false, + "Animation": false, + "AnimationEffect": false, + "AnimationEvent": false, + "AnimationPlaybackEvent": false, + "AnimationTimeline": false, + "AsyncDisposableStack": false, + "atob": false, + "Attr": false, + "Audio": false, + "AudioBuffer": false, + "AudioBufferSourceNode": false, + "AudioContext": false, + "AudioData": false, + "AudioDecoder": false, + "AudioDestinationNode": false, + "AudioEncoder": false, + "AudioListener": false, + "AudioNode": false, + "AudioParam": false, + "AudioParamMap": false, + "AudioProcessingEvent": false, + "AudioScheduledSourceNode": false, + "AudioSinkInfo": false, + "AudioWorklet": false, + "AudioWorkletGlobalScope": false, + "AudioWorkletNode": false, + "AudioWorkletProcessor": false, + "AuthenticatorAssertionResponse": false, + "AuthenticatorAttestationResponse": false, + "AuthenticatorResponse": false, + "BackgroundFetchManager": false, + "BackgroundFetchRecord": false, + "BackgroundFetchRegistration": false, + "BarcodeDetector": false, + "BarProp": false, + "BaseAudioContext": false, + "BatteryManager": false, + "BeforeUnloadEvent": false, + "BiquadFilterNode": false, + "Blob": false, + "BlobEvent": false, + "Bluetooth": false, + "BluetoothCharacteristicProperties": false, + "BluetoothDevice": false, + "BluetoothRemoteGATTCharacteristic": false, + "BluetoothRemoteGATTDescriptor": false, + "BluetoothRemoteGATTServer": false, + "BluetoothRemoteGATTService": false, + "BluetoothUUID": false, + "blur": false, + "BroadcastChannel": false, + "BrowserCaptureMediaStreamTrack": false, + "btoa": false, + "ByteLengthQueuingStrategy": false, + "Cache": false, + "caches": false, + "CacheStorage": false, + "cancelAnimationFrame": false, + "cancelIdleCallback": false, + "CanvasCaptureMediaStream": false, + "CanvasCaptureMediaStreamTrack": false, + "CanvasGradient": false, + "CanvasPattern": false, + "CanvasRenderingContext2D": false, + "CaptureController": false, + "CaretPosition": false, + "CDATASection": false, + "ChannelMergerNode": false, + "ChannelSplitterNode": false, + "ChapterInformation": false, + "CharacterBoundsUpdateEvent": false, + "CharacterData": false, + "clearInterval": false, + "clearTimeout": false, + "clientInformation": false, + "Clipboard": false, + "ClipboardChangeEvent": false, + "ClipboardEvent": false, + "ClipboardItem": false, + "close": false, + "closed": false, + "CloseEvent": false, + "CloseWatcher": false, + "CommandEvent": false, + "Comment": false, + "CompositionEvent": false, + "CompressionStream": false, + "confirm": false, + "console": false, + "ConstantSourceNode": false, + "ContentVisibilityAutoStateChangeEvent": false, + "ConvolverNode": false, + "CookieChangeEvent": false, + "CookieDeprecationLabel": false, + "cookieStore": false, + "CookieStore": false, + "CookieStoreManager": false, + "CountQueuingStrategy": false, + "createImageBitmap": false, + "CreateMonitor": false, + "Credential": false, + "credentialless": false, + "CredentialsContainer": false, + "CropTarget": false, + "crossOriginIsolated": false, + "crypto": false, + "Crypto": false, + "CryptoKey": false, + "CSPViolationReportBody": false, + "CSS": false, + "CSSAnimation": false, + "CSSConditionRule": false, + "CSSContainerRule": false, + "CSSCounterStyleRule": false, + "CSSFontFaceRule": false, + "CSSFontFeatureValuesRule": false, + "CSSFontPaletteValuesRule": false, + "CSSFunctionDeclarations": false, + "CSSFunctionDescriptors": false, + "CSSFunctionRule": false, + "CSSGroupingRule": false, + "CSSImageValue": false, + "CSSImportRule": false, + "CSSKeyframeRule": false, + "CSSKeyframesRule": false, + "CSSKeywordValue": false, + "CSSLayerBlockRule": false, + "CSSLayerStatementRule": false, + "CSSMarginRule": false, + "CSSMathClamp": false, + "CSSMathInvert": false, + "CSSMathMax": false, + "CSSMathMin": false, + "CSSMathNegate": false, + "CSSMathProduct": false, + "CSSMathSum": false, + "CSSMathValue": false, + "CSSMatrixComponent": false, + "CSSMediaRule": false, + "CSSNamespaceRule": false, + "CSSNestedDeclarations": false, + "CSSNumericArray": false, + "CSSNumericValue": false, + "CSSPageDescriptors": false, + "CSSPageRule": false, + "CSSPerspective": false, + "CSSPositionTryDescriptors": false, + "CSSPositionTryRule": false, + "CSSPositionValue": false, + "CSSPropertyRule": false, + "CSSRotate": false, + "CSSRule": false, + "CSSRuleList": false, + "CSSScale": false, + "CSSScopeRule": false, + "CSSSkew": false, + "CSSSkewX": false, + "CSSSkewY": false, + "CSSStartingStyleRule": false, + "CSSStyleDeclaration": false, + "CSSStyleRule": false, + "CSSStyleSheet": false, + "CSSStyleValue": false, + "CSSSupportsRule": false, + "CSSTransformComponent": false, + "CSSTransformValue": false, + "CSSTransition": false, + "CSSTranslate": false, + "CSSUnitValue": false, + "CSSUnparsedValue": false, + "CSSVariableReferenceValue": false, + "CSSViewTransitionRule": false, + "currentFrame": false, + "currentTime": false, + "CustomElementRegistry": false, + "customElements": false, + "CustomEvent": false, + "CustomStateSet": false, + "DataTransfer": false, + "DataTransferItem": false, + "DataTransferItemList": false, + "DecompressionStream": false, + "DelayNode": false, + "DelegatedInkTrailPresenter": false, + "DeviceMotionEvent": false, + "DeviceMotionEventAcceleration": false, + "DeviceMotionEventRotationRate": false, + "DeviceOrientationEvent": false, + "devicePixelRatio": false, + "DevicePosture": false, + "DigitalCredential": false, + "dispatchEvent": false, + "DisposableStack": false, + "document": false, + "Document": false, + "DocumentFragment": false, + "documentPictureInPicture": false, + "DocumentPictureInPicture": false, + "DocumentPictureInPictureEvent": false, + "DocumentTimeline": false, + "DocumentType": false, + "DOMError": false, + "DOMException": false, + "DOMImplementation": false, + "DOMMatrix": false, + "DOMMatrixReadOnly": false, + "DOMParser": false, + "DOMPoint": false, + "DOMPointReadOnly": false, + "DOMQuad": false, + "DOMRect": false, + "DOMRectList": false, + "DOMRectReadOnly": false, + "DOMStringList": false, + "DOMStringMap": false, + "DOMTokenList": false, + "DragEvent": false, + "DynamicsCompressorNode": false, + "EditContext": false, + "Element": false, + "ElementInternals": false, + "EncodedAudioChunk": false, + "EncodedVideoChunk": false, + "ErrorEvent": false, + "event": false, + "Event": false, + "EventCounts": false, + "EventSource": false, + "EventTarget": false, + "external": false, + "External": false, + "EyeDropper": false, + "FeaturePolicy": false, + "FederatedCredential": false, + "fence": false, + "Fence": false, + "FencedFrameConfig": false, + "fetch": false, + "fetchLater": false, + "FetchLaterResult": false, + "File": false, + "FileList": false, + "FileReader": false, + "FileSystem": false, + "FileSystemDirectoryEntry": false, + "FileSystemDirectoryHandle": false, + "FileSystemDirectoryReader": false, + "FileSystemEntry": false, + "FileSystemFileEntry": false, + "FileSystemFileHandle": false, + "FileSystemHandle": false, + "FileSystemObserver": false, + "FileSystemWritableFileStream": false, + "find": false, + "focus": false, + "FocusEvent": false, + "FontData": false, + "FontFace": false, + "FontFaceSet": false, + "FontFaceSetLoadEvent": false, + "FormData": false, + "FormDataEvent": false, + "FragmentDirective": false, + "frameElement": false, + "frames": false, + "GainNode": false, + "Gamepad": false, + "GamepadAxisMoveEvent": false, + "GamepadButton": false, + "GamepadButtonEvent": false, + "GamepadEvent": false, + "GamepadHapticActuator": false, + "GamepadPose": false, + "Geolocation": false, + "GeolocationCoordinates": false, + "GeolocationPosition": false, + "GeolocationPositionError": false, + "getComputedStyle": false, + "getScreenDetails": false, + "getSelection": false, + "GPU": false, + "GPUAdapter": false, + "GPUAdapterInfo": false, + "GPUBindGroup": false, + "GPUBindGroupLayout": false, + "GPUBuffer": false, + "GPUBufferUsage": false, + "GPUCanvasContext": false, + "GPUColorWrite": false, + "GPUCommandBuffer": false, + "GPUCommandEncoder": false, + "GPUCompilationInfo": false, + "GPUCompilationMessage": false, + "GPUComputePassEncoder": false, + "GPUComputePipeline": false, + "GPUDevice": false, + "GPUDeviceLostInfo": false, + "GPUError": false, + "GPUExternalTexture": false, + "GPUInternalError": false, + "GPUMapMode": false, + "GPUOutOfMemoryError": false, + "GPUPipelineError": false, + "GPUPipelineLayout": false, + "GPUQuerySet": false, + "GPUQueue": false, + "GPURenderBundle": false, + "GPURenderBundleEncoder": false, + "GPURenderPassEncoder": false, + "GPURenderPipeline": false, + "GPUSampler": false, + "GPUShaderModule": false, + "GPUShaderStage": false, + "GPUSupportedFeatures": false, + "GPUSupportedLimits": false, + "GPUTexture": false, + "GPUTextureUsage": false, + "GPUTextureView": false, + "GPUUncapturedErrorEvent": false, + "GPUValidationError": false, + "GravitySensor": false, + "Gyroscope": false, + "HashChangeEvent": false, + "Headers": false, + "HID": false, + "HIDConnectionEvent": false, + "HIDDevice": false, + "HIDInputReportEvent": false, + "Highlight": false, + "HighlightRegistry": false, + "history": false, + "History": false, + "HTMLAllCollection": false, + "HTMLAnchorElement": false, + "HTMLAreaElement": false, + "HTMLAudioElement": false, + "HTMLBaseElement": false, + "HTMLBodyElement": false, + "HTMLBRElement": false, + "HTMLButtonElement": false, + "HTMLCanvasElement": false, + "HTMLCollection": false, + "HTMLDataElement": false, + "HTMLDataListElement": false, + "HTMLDetailsElement": false, + "HTMLDialogElement": false, + "HTMLDirectoryElement": false, + "HTMLDivElement": false, + "HTMLDListElement": false, + "HTMLDocument": false, + "HTMLElement": false, + "HTMLEmbedElement": false, + "HTMLFencedFrameElement": false, + "HTMLFieldSetElement": false, + "HTMLFontElement": false, + "HTMLFormControlsCollection": false, + "HTMLFormElement": false, + "HTMLFrameElement": false, + "HTMLFrameSetElement": false, + "HTMLHeadElement": false, + "HTMLHeadingElement": false, + "HTMLHRElement": false, + "HTMLHtmlElement": false, + "HTMLIFrameElement": false, + "HTMLImageElement": false, + "HTMLInputElement": false, + "HTMLLabelElement": false, + "HTMLLegendElement": false, + "HTMLLIElement": false, + "HTMLLinkElement": false, + "HTMLMapElement": false, + "HTMLMarqueeElement": false, + "HTMLMediaElement": false, + "HTMLMenuElement": false, + "HTMLMetaElement": false, + "HTMLMeterElement": false, + "HTMLModElement": false, + "HTMLObjectElement": false, + "HTMLOListElement": false, + "HTMLOptGroupElement": false, + "HTMLOptionElement": false, + "HTMLOptionsCollection": false, + "HTMLOutputElement": false, + "HTMLParagraphElement": false, + "HTMLParamElement": false, + "HTMLPictureElement": false, + "HTMLPreElement": false, + "HTMLProgressElement": false, + "HTMLQuoteElement": false, + "HTMLScriptElement": false, + "HTMLSelectedContentElement": false, + "HTMLSelectElement": false, + "HTMLSlotElement": false, + "HTMLSourceElement": false, + "HTMLSpanElement": false, + "HTMLStyleElement": false, + "HTMLTableCaptionElement": false, + "HTMLTableCellElement": false, + "HTMLTableColElement": false, + "HTMLTableElement": false, + "HTMLTableRowElement": false, + "HTMLTableSectionElement": false, + "HTMLTemplateElement": false, + "HTMLTextAreaElement": false, + "HTMLTimeElement": false, + "HTMLTitleElement": false, + "HTMLTrackElement": false, + "HTMLUListElement": false, + "HTMLUnknownElement": false, + "HTMLVideoElement": false, + "IDBCursor": false, + "IDBCursorWithValue": false, + "IDBDatabase": false, + "IDBFactory": false, + "IDBIndex": false, + "IDBKeyRange": false, + "IDBObjectStore": false, + "IDBOpenDBRequest": false, + "IDBRecord": false, + "IDBRequest": false, + "IDBTransaction": false, + "IDBVersionChangeEvent": false, + "IdentityCredential": false, + "IdentityCredentialError": false, + "IdentityProvider": false, + "IdleDeadline": false, + "IdleDetector": false, + "IIRFilterNode": false, + "Image": false, + "ImageBitmap": false, + "ImageBitmapRenderingContext": false, + "ImageCapture": false, + "ImageData": false, + "ImageDecoder": false, + "ImageTrack": false, + "ImageTrackList": false, + "indexedDB": false, + "Ink": false, + "innerHeight": false, + "innerWidth": false, + "InputDeviceCapabilities": false, + "InputDeviceInfo": false, + "InputEvent": false, + "IntegrityViolationReportBody": false, + "InterestEvent": false, + "IntersectionObserver": false, + "IntersectionObserverEntry": false, + "isSecureContext": false, + "Keyboard": false, + "KeyboardEvent": false, + "KeyboardLayoutMap": false, + "KeyframeEffect": false, + "LanguageDetector": false, + "LargestContentfulPaint": false, + "LaunchParams": false, + "launchQueue": false, + "LaunchQueue": false, + "LayoutShift": false, + "LayoutShiftAttribution": false, + "length": false, + "LinearAccelerationSensor": false, + "localStorage": false, + "location": true, + "Location": false, + "locationbar": false, + "Lock": false, + "LockManager": false, + "matchMedia": false, + "MathMLElement": false, + "MediaCapabilities": false, + "MediaCapabilitiesInfo": false, + "MediaDeviceInfo": false, + "MediaDevices": false, + "MediaElementAudioSourceNode": false, + "MediaEncryptedEvent": false, + "MediaError": false, + "MediaKeyError": false, + "MediaKeyMessageEvent": false, + "MediaKeys": false, + "MediaKeySession": false, + "MediaKeyStatusMap": false, + "MediaKeySystemAccess": false, + "MediaList": false, + "MediaMetadata": false, + "MediaQueryList": false, + "MediaQueryListEvent": false, + "MediaRecorder": false, + "MediaRecorderErrorEvent": false, + "MediaSession": false, + "MediaSource": false, + "MediaSourceHandle": false, + "MediaStream": false, + "MediaStreamAudioDestinationNode": false, + "MediaStreamAudioSourceNode": false, + "MediaStreamEvent": false, + "MediaStreamTrack": false, + "MediaStreamTrackAudioSourceNode": false, + "MediaStreamTrackAudioStats": false, + "MediaStreamTrackEvent": false, + "MediaStreamTrackGenerator": false, + "MediaStreamTrackProcessor": false, + "MediaStreamTrackVideoStats": false, + "menubar": false, + "MessageChannel": false, + "MessageEvent": false, + "MessagePort": false, + "MIDIAccess": false, + "MIDIConnectionEvent": false, + "MIDIInput": false, + "MIDIInputMap": false, + "MIDIMessageEvent": false, + "MIDIOutput": false, + "MIDIOutputMap": false, + "MIDIPort": false, + "MimeType": false, + "MimeTypeArray": false, + "model": false, + "ModelGenericSession": false, + "ModelManager": false, + "MouseEvent": false, + "moveBy": false, + "moveTo": false, + "MutationEvent": false, + "MutationObserver": false, + "MutationRecord": false, + "name": false, + "NamedNodeMap": false, + "NavigateEvent": false, + "navigation": false, + "Navigation": false, + "NavigationActivation": false, + "NavigationCurrentEntryChangeEvent": false, + "NavigationDestination": false, + "NavigationHistoryEntry": false, + "NavigationPrecommitController": false, + "NavigationPreloadManager": false, + "NavigationTransition": false, + "navigator": false, + "Navigator": false, + "NavigatorLogin": false, + "NavigatorManagedData": false, + "NavigatorUAData": false, + "NetworkInformation": false, + "Node": false, + "NodeFilter": false, + "NodeIterator": false, + "NodeList": false, + "Notification": false, + "NotifyPaintEvent": false, + "NotRestoredReasonDetails": false, + "NotRestoredReasons": false, + "Observable": false, + "OfflineAudioCompletionEvent": false, + "OfflineAudioContext": false, + "offscreenBuffering": false, + "OffscreenCanvas": false, + "OffscreenCanvasRenderingContext2D": false, + "onabort": true, + "onafterprint": true, + "onanimationcancel": true, + "onanimationend": true, + "onanimationiteration": true, + "onanimationstart": true, + "onappinstalled": true, + "onauxclick": true, + "onbeforeinput": true, + "onbeforeinstallprompt": true, + "onbeforematch": true, + "onbeforeprint": true, + "onbeforetoggle": true, + "onbeforeunload": true, + "onbeforexrselect": true, + "onblur": true, + "oncancel": true, + "oncanplay": true, + "oncanplaythrough": true, + "onchange": true, + "onclick": true, + "onclose": true, + "oncommand": true, + "oncontentvisibilityautostatechange": true, + "oncontextlost": true, + "oncontextmenu": true, + "oncontextrestored": true, + "oncopy": true, + "oncuechange": true, + "oncut": true, + "ondblclick": true, + "ondevicemotion": true, + "ondeviceorientation": true, + "ondeviceorientationabsolute": true, + "ondrag": true, + "ondragend": true, + "ondragenter": true, + "ondragleave": true, + "ondragover": true, + "ondragstart": true, + "ondrop": true, + "ondurationchange": true, + "onemptied": true, + "onended": true, + "onerror": true, + "onfocus": true, + "onformdata": true, + "ongamepadconnected": true, + "ongamepaddisconnected": true, + "ongotpointercapture": true, + "onhashchange": true, + "oninput": true, + "oninvalid": true, + "onkeydown": true, + "onkeypress": true, + "onkeyup": true, + "onlanguagechange": true, + "onload": true, + "onloadeddata": true, + "onloadedmetadata": true, + "onloadstart": true, + "onlostpointercapture": true, + "onmessage": true, + "onmessageerror": true, + "onmousedown": true, + "onmouseenter": true, + "onmouseleave": true, + "onmousemove": true, + "onmouseout": true, + "onmouseover": true, + "onmouseup": true, + "onmousewheel": true, + "onoffline": true, + "ononline": true, + "onpagehide": true, + "onpagereveal": true, + "onpageshow": true, + "onpageswap": true, + "onpaste": true, + "onpause": true, + "onplay": true, + "onplaying": true, + "onpointercancel": true, + "onpointerdown": true, + "onpointerenter": true, + "onpointerleave": true, + "onpointermove": true, + "onpointerout": true, + "onpointerover": true, + "onpointerrawupdate": true, + "onpointerup": true, + "onpopstate": true, + "onprogress": true, + "onratechange": true, + "onrejectionhandled": true, + "onreset": true, + "onresize": true, + "onscroll": true, + "onscrollend": true, + "onscrollsnapchange": true, + "onscrollsnapchanging": true, + "onsearch": true, + "onsecuritypolicyviolation": true, + "onseeked": true, + "onseeking": true, + "onselect": true, + "onselectionchange": true, + "onselectstart": true, + "onslotchange": true, + "onstalled": true, + "onstorage": true, + "onsubmit": true, + "onsuspend": true, + "ontimeupdate": true, + "ontoggle": true, + "ontransitioncancel": true, + "ontransitionend": true, + "ontransitionrun": true, + "ontransitionstart": true, + "onunhandledrejection": true, + "onunload": true, + "onvolumechange": true, + "onwaiting": true, + "onwheel": true, + "open": false, + "opener": false, + "Option": false, + "OrientationSensor": false, + "origin": false, + "originAgentCluster": false, + "OscillatorNode": false, + "OTPCredential": false, + "outerHeight": false, + "outerWidth": false, + "OverconstrainedError": false, + "PageRevealEvent": false, + "PageSwapEvent": false, + "PageTransitionEvent": false, + "pageXOffset": false, + "pageYOffset": false, + "PannerNode": false, + "parent": false, + "PasswordCredential": false, + "Path2D": false, + "PaymentAddress": false, + "PaymentManager": false, + "PaymentMethodChangeEvent": false, + "PaymentRequest": false, + "PaymentRequestUpdateEvent": false, + "PaymentResponse": false, + "performance": false, + "Performance": false, + "PerformanceElementTiming": false, + "PerformanceEntry": false, + "PerformanceEventTiming": false, + "PerformanceLongAnimationFrameTiming": false, + "PerformanceLongTaskTiming": false, + "PerformanceMark": false, + "PerformanceMeasure": false, + "PerformanceNavigation": false, + "PerformanceNavigationTiming": false, + "PerformanceObserver": false, + "PerformanceObserverEntryList": false, + "PerformancePaintTiming": false, + "PerformanceResourceTiming": false, + "PerformanceScriptTiming": false, + "PerformanceServerTiming": false, + "PerformanceTiming": false, + "PeriodicSyncManager": false, + "PeriodicWave": false, + "Permissions": false, + "PermissionStatus": false, + "PERSISTENT": false, + "personalbar": false, + "PictureInPictureEvent": false, + "PictureInPictureWindow": false, + "Plugin": false, + "PluginArray": false, + "PointerEvent": false, + "PopStateEvent": false, + "postMessage": false, + "Presentation": false, + "PresentationAvailability": false, + "PresentationConnection": false, + "PresentationConnectionAvailableEvent": false, + "PresentationConnectionCloseEvent": false, + "PresentationConnectionList": false, + "PresentationReceiver": false, + "PresentationRequest": false, + "PressureObserver": false, + "PressureRecord": false, + "print": false, + "ProcessingInstruction": false, + "Profiler": false, + "ProgressEvent": false, + "PromiseRejectionEvent": false, + "prompt": false, + "ProtectedAudience": false, + "PublicKeyCredential": false, + "PushManager": false, + "PushSubscription": false, + "PushSubscriptionOptions": false, + "queryLocalFonts": false, + "queueMicrotask": false, + "QuotaExceededError": false, + "RadioNodeList": false, + "Range": false, + "ReadableByteStreamController": false, + "ReadableStream": false, + "ReadableStreamBYOBReader": false, + "ReadableStreamBYOBRequest": false, + "ReadableStreamDefaultController": false, + "ReadableStreamDefaultReader": false, + "registerProcessor": false, + "RelativeOrientationSensor": false, + "RemotePlayback": false, + "removeEventListener": false, + "ReportBody": false, + "reportError": false, + "ReportingObserver": false, + "Request": false, + "requestAnimationFrame": false, + "requestIdleCallback": false, + "resizeBy": false, + "ResizeObserver": false, + "ResizeObserverEntry": false, + "ResizeObserverSize": false, + "resizeTo": false, + "Response": false, + "RestrictionTarget": false, + "RTCCertificate": false, + "RTCDataChannel": false, + "RTCDataChannelEvent": false, + "RTCDtlsTransport": false, + "RTCDTMFSender": false, + "RTCDTMFToneChangeEvent": false, + "RTCEncodedAudioFrame": false, + "RTCEncodedVideoFrame": false, + "RTCError": false, + "RTCErrorEvent": false, + "RTCIceCandidate": false, + "RTCIceTransport": false, + "RTCPeerConnection": false, + "RTCPeerConnectionIceErrorEvent": false, + "RTCPeerConnectionIceEvent": false, + "RTCRtpReceiver": false, + "RTCRtpScriptTransform": false, + "RTCRtpSender": false, + "RTCRtpTransceiver": false, + "RTCSctpTransport": false, + "RTCSessionDescription": false, + "RTCStatsReport": false, + "RTCTrackEvent": false, + "sampleRate": false, + "scheduler": false, + "Scheduler": false, + "Scheduling": false, + "screen": false, + "Screen": false, + "ScreenDetailed": false, + "ScreenDetails": false, + "screenLeft": false, + "ScreenOrientation": false, + "screenTop": false, + "screenX": false, + "screenY": false, + "ScriptProcessorNode": false, + "scroll": false, + "scrollbars": false, + "scrollBy": false, + "ScrollTimeline": false, + "scrollTo": false, + "scrollX": false, + "scrollY": false, + "SecurityPolicyViolationEvent": false, + "Selection": false, + "self": false, + "Sensor": false, + "SensorErrorEvent": false, + "Serial": false, + "SerialPort": false, + "ServiceWorker": false, + "ServiceWorkerContainer": false, + "ServiceWorkerRegistration": false, + "sessionStorage": false, + "setInterval": false, + "setTimeout": false, + "ShadowRoot": false, + "sharedStorage": false, + "SharedStorage": false, + "SharedStorageAppendMethod": false, + "SharedStorageClearMethod": false, + "SharedStorageDeleteMethod": false, + "SharedStorageModifierMethod": false, + "SharedStorageSetMethod": false, + "SharedStorageWorklet": false, + "SharedWorker": false, + "showDirectoryPicker": false, + "showOpenFilePicker": false, + "showSaveFilePicker": false, + "SnapEvent": false, + "SourceBuffer": false, + "SourceBufferList": false, + "SpeechGrammar": false, + "SpeechGrammarList": false, + "SpeechRecognition": false, + "SpeechRecognitionErrorEvent": false, + "SpeechRecognitionEvent": false, + "SpeechRecognitionPhrase": false, + "speechSynthesis": false, + "SpeechSynthesis": false, + "SpeechSynthesisErrorEvent": false, + "SpeechSynthesisEvent": false, + "SpeechSynthesisUtterance": false, + "SpeechSynthesisVoice": false, + "StaticRange": false, + "status": false, + "statusbar": false, + "StereoPannerNode": false, + "stop": false, + "Storage": false, + "StorageBucket": false, + "StorageBucketManager": false, + "StorageEvent": false, + "StorageManager": false, + "structuredClone": false, + "styleMedia": false, + "StylePropertyMap": false, + "StylePropertyMapReadOnly": false, + "StyleSheet": false, + "StyleSheetList": false, + "SubmitEvent": false, + "Subscriber": false, + "SubtleCrypto": false, + "Summarizer": false, + "SuppressedError": false, + "SVGAElement": false, + "SVGAngle": false, + "SVGAnimatedAngle": false, + "SVGAnimatedBoolean": false, + "SVGAnimatedEnumeration": false, + "SVGAnimatedInteger": false, + "SVGAnimatedLength": false, + "SVGAnimatedLengthList": false, + "SVGAnimatedNumber": false, + "SVGAnimatedNumberList": false, + "SVGAnimatedPreserveAspectRatio": false, + "SVGAnimatedRect": false, + "SVGAnimatedString": false, + "SVGAnimatedTransformList": false, + "SVGAnimateElement": false, + "SVGAnimateMotionElement": false, + "SVGAnimateTransformElement": false, + "SVGAnimationElement": false, + "SVGCircleElement": false, + "SVGClipPathElement": false, + "SVGComponentTransferFunctionElement": false, + "SVGDefsElement": false, + "SVGDescElement": false, + "SVGElement": false, + "SVGEllipseElement": false, + "SVGFEBlendElement": false, + "SVGFEColorMatrixElement": false, + "SVGFEComponentTransferElement": false, + "SVGFECompositeElement": false, + "SVGFEConvolveMatrixElement": false, + "SVGFEDiffuseLightingElement": false, + "SVGFEDisplacementMapElement": false, + "SVGFEDistantLightElement": false, + "SVGFEDropShadowElement": false, + "SVGFEFloodElement": false, + "SVGFEFuncAElement": false, + "SVGFEFuncBElement": false, + "SVGFEFuncGElement": false, + "SVGFEFuncRElement": false, + "SVGFEGaussianBlurElement": false, + "SVGFEImageElement": false, + "SVGFEMergeElement": false, + "SVGFEMergeNodeElement": false, + "SVGFEMorphologyElement": false, + "SVGFEOffsetElement": false, + "SVGFEPointLightElement": false, + "SVGFESpecularLightingElement": false, + "SVGFESpotLightElement": false, + "SVGFETileElement": false, + "SVGFETurbulenceElement": false, + "SVGFilterElement": false, + "SVGForeignObjectElement": false, + "SVGGElement": false, + "SVGGeometryElement": false, + "SVGGradientElement": false, + "SVGGraphicsElement": false, + "SVGImageElement": false, + "SVGLength": false, + "SVGLengthList": false, + "SVGLinearGradientElement": false, + "SVGLineElement": false, + "SVGMarkerElement": false, + "SVGMaskElement": false, + "SVGMatrix": false, + "SVGMetadataElement": false, + "SVGMPathElement": false, + "SVGNumber": false, + "SVGNumberList": false, + "SVGPathElement": false, + "SVGPatternElement": false, + "SVGPoint": false, + "SVGPointList": false, + "SVGPolygonElement": false, + "SVGPolylineElement": false, + "SVGPreserveAspectRatio": false, + "SVGRadialGradientElement": false, + "SVGRect": false, + "SVGRectElement": false, + "SVGScriptElement": false, + "SVGSetElement": false, + "SVGStopElement": false, + "SVGStringList": false, + "SVGStyleElement": false, + "SVGSVGElement": false, + "SVGSwitchElement": false, + "SVGSymbolElement": false, + "SVGTextContentElement": false, + "SVGTextElement": false, + "SVGTextPathElement": false, + "SVGTextPositioningElement": false, + "SVGTitleElement": false, + "SVGTransform": false, + "SVGTransformList": false, + "SVGTSpanElement": false, + "SVGUnitTypes": false, + "SVGUseElement": false, + "SVGViewElement": false, + "SyncManager": false, + "TaskAttributionTiming": false, + "TaskController": false, + "TaskPriorityChangeEvent": false, + "TaskSignal": false, + "TEMPORARY": false, + "Text": false, + "TextDecoder": false, + "TextDecoderStream": false, + "TextEncoder": false, + "TextEncoderStream": false, + "TextEvent": false, + "TextFormat": false, + "TextFormatUpdateEvent": false, + "TextMetrics": false, + "TextTrack": false, + "TextTrackCue": false, + "TextTrackCueList": false, + "TextTrackList": false, + "TextUpdateEvent": false, + "TimeEvent": false, + "TimeRanges": false, + "ToggleEvent": false, + "toolbar": false, + "top": false, + "Touch": false, + "TouchEvent": false, + "TouchList": false, + "TrackEvent": false, + "TransformStream": false, + "TransformStreamDefaultController": false, + "TransitionEvent": false, + "Translator": false, + "TreeWalker": false, + "TrustedHTML": false, + "TrustedScript": false, + "TrustedScriptURL": false, + "TrustedTypePolicy": false, + "TrustedTypePolicyFactory": false, + "trustedTypes": false, + "UIEvent": false, + "URL": false, + "URLPattern": false, + "URLSearchParams": false, + "USB": false, + "USBAlternateInterface": false, + "USBConfiguration": false, + "USBConnectionEvent": false, + "USBDevice": false, + "USBEndpoint": false, + "USBInterface": false, + "USBInTransferResult": false, + "USBIsochronousInTransferPacket": false, + "USBIsochronousInTransferResult": false, + "USBIsochronousOutTransferPacket": false, + "USBIsochronousOutTransferResult": false, + "USBOutTransferResult": false, + "UserActivation": false, + "ValidityState": false, + "VideoColorSpace": false, + "VideoDecoder": false, + "VideoEncoder": false, + "VideoFrame": false, + "VideoPlaybackQuality": false, + "viewport": false, + "Viewport": false, + "ViewTimeline": false, + "ViewTransition": false, + "ViewTransitionTypeSet": false, + "VirtualKeyboard": false, + "VirtualKeyboardGeometryChangeEvent": false, + "VisibilityStateEntry": false, + "visualViewport": false, + "VisualViewport": false, + "VTTCue": false, + "VTTRegion": false, + "WakeLock": false, + "WakeLockSentinel": false, + "WaveShaperNode": false, + "WebAssembly": false, + "WebGL2RenderingContext": false, + "WebGLActiveInfo": false, + "WebGLBuffer": false, + "WebGLContextEvent": false, + "WebGLFramebuffer": false, + "WebGLObject": false, + "WebGLProgram": false, + "WebGLQuery": false, + "WebGLRenderbuffer": false, + "WebGLRenderingContext": false, + "WebGLSampler": false, + "WebGLShader": false, + "WebGLShaderPrecisionFormat": false, + "WebGLSync": false, + "WebGLTexture": false, + "WebGLTransformFeedback": false, + "WebGLUniformLocation": false, + "WebGLVertexArrayObject": false, + "WebSocket": false, + "WebSocketError": false, + "WebSocketStream": false, + "WebTransport": false, + "WebTransportBidirectionalStream": false, + "WebTransportDatagramDuplexStream": false, + "WebTransportError": false, + "WebTransportReceiveStream": false, + "WebTransportSendStream": false, + "WGSLLanguageFeatures": false, + "WheelEvent": false, + "when": false, + "window": false, + "Window": false, + "WindowControlsOverlay": false, + "WindowControlsOverlayGeometryChangeEvent": false, + "Worker": false, + "Worklet": false, + "WorkletGlobalScope": false, + "WritableStream": false, + "WritableStreamDefaultController": false, + "WritableStreamDefaultWriter": false, + "XMLDocument": false, + "XMLHttpRequest": false, + "XMLHttpRequestEventTarget": false, + "XMLHttpRequestUpload": false, + "XMLSerializer": false, + "XPathEvaluator": false, + "XPathExpression": false, + "XPathResult": false, + "XRAnchor": false, + "XRAnchorSet": false, + "XRBoundedReferenceSpace": false, + "XRCamera": false, + "XRCPUDepthInformation": false, + "XRDepthInformation": false, + "XRDOMOverlayState": false, + "XRFrame": false, + "XRHand": false, + "XRHitTestResult": false, + "XRHitTestSource": false, + "XRInputSource": false, + "XRInputSourceArray": false, + "XRInputSourceEvent": false, + "XRInputSourcesChangeEvent": false, + "XRJointPose": false, + "XRJointSpace": false, + "XRLayer": false, + "XRLightEstimate": false, + "XRLightProbe": false, + "XRPose": false, + "XRRay": false, + "XRReferenceSpace": false, + "XRReferenceSpaceEvent": false, + "XRRenderState": false, + "XRRigidTransform": false, + "XRSession": false, + "XRSessionEvent": false, + "XRSpace": false, + "XRSystem": false, + "XRTransientInputHitTestResult": false, + "XRTransientInputHitTestSource": false, + "XRView": false, + "XRViewerPose": false, + "XRViewport": false, + "XRWebGLBinding": false, + "XRWebGLDepthInformation": false, + "XRWebGLLayer": false, + "XSLTProcessor": false + } + }, + "errors": [ + { + "messageId": "impliedEval" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-implied-eval > invalid + +```js +window.setTimeout(`foo${bar}`) +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "globals": { + "AbortController": false, + "AbortSignal": false, + "AbsoluteOrientationSensor": false, + "AbstractRange": false, + "Accelerometer": false, + "addEventListener": false, + "ai": false, + "AI": false, + "AICreateMonitor": false, + "AITextSession": false, + "alert": false, + "AnalyserNode": false, + "Animation": false, + "AnimationEffect": false, + "AnimationEvent": false, + "AnimationPlaybackEvent": false, + "AnimationTimeline": false, + "AsyncDisposableStack": false, + "atob": false, + "Attr": false, + "Audio": false, + "AudioBuffer": false, + "AudioBufferSourceNode": false, + "AudioContext": false, + "AudioData": false, + "AudioDecoder": false, + "AudioDestinationNode": false, + "AudioEncoder": false, + "AudioListener": false, + "AudioNode": false, + "AudioParam": false, + "AudioParamMap": false, + "AudioProcessingEvent": false, + "AudioScheduledSourceNode": false, + "AudioSinkInfo": false, + "AudioWorklet": false, + "AudioWorkletGlobalScope": false, + "AudioWorkletNode": false, + "AudioWorkletProcessor": false, + "AuthenticatorAssertionResponse": false, + "AuthenticatorAttestationResponse": false, + "AuthenticatorResponse": false, + "BackgroundFetchManager": false, + "BackgroundFetchRecord": false, + "BackgroundFetchRegistration": false, + "BarcodeDetector": false, + "BarProp": false, + "BaseAudioContext": false, + "BatteryManager": false, + "BeforeUnloadEvent": false, + "BiquadFilterNode": false, + "Blob": false, + "BlobEvent": false, + "Bluetooth": false, + "BluetoothCharacteristicProperties": false, + "BluetoothDevice": false, + "BluetoothRemoteGATTCharacteristic": false, + "BluetoothRemoteGATTDescriptor": false, + "BluetoothRemoteGATTServer": false, + "BluetoothRemoteGATTService": false, + "BluetoothUUID": false, + "blur": false, + "BroadcastChannel": false, + "BrowserCaptureMediaStreamTrack": false, + "btoa": false, + "ByteLengthQueuingStrategy": false, + "Cache": false, + "caches": false, + "CacheStorage": false, + "cancelAnimationFrame": false, + "cancelIdleCallback": false, + "CanvasCaptureMediaStream": false, + "CanvasCaptureMediaStreamTrack": false, + "CanvasGradient": false, + "CanvasPattern": false, + "CanvasRenderingContext2D": false, + "CaptureController": false, + "CaretPosition": false, + "CDATASection": false, + "ChannelMergerNode": false, + "ChannelSplitterNode": false, + "ChapterInformation": false, + "CharacterBoundsUpdateEvent": false, + "CharacterData": false, + "clearInterval": false, + "clearTimeout": false, + "clientInformation": false, + "Clipboard": false, + "ClipboardChangeEvent": false, + "ClipboardEvent": false, + "ClipboardItem": false, + "close": false, + "closed": false, + "CloseEvent": false, + "CloseWatcher": false, + "CommandEvent": false, + "Comment": false, + "CompositionEvent": false, + "CompressionStream": false, + "confirm": false, + "console": false, + "ConstantSourceNode": false, + "ContentVisibilityAutoStateChangeEvent": false, + "ConvolverNode": false, + "CookieChangeEvent": false, + "CookieDeprecationLabel": false, + "cookieStore": false, + "CookieStore": false, + "CookieStoreManager": false, + "CountQueuingStrategy": false, + "createImageBitmap": false, + "CreateMonitor": false, + "Credential": false, + "credentialless": false, + "CredentialsContainer": false, + "CropTarget": false, + "crossOriginIsolated": false, + "crypto": false, + "Crypto": false, + "CryptoKey": false, + "CSPViolationReportBody": false, + "CSS": false, + "CSSAnimation": false, + "CSSConditionRule": false, + "CSSContainerRule": false, + "CSSCounterStyleRule": false, + "CSSFontFaceRule": false, + "CSSFontFeatureValuesRule": false, + "CSSFontPaletteValuesRule": false, + "CSSFunctionDeclarations": false, + "CSSFunctionDescriptors": false, + "CSSFunctionRule": false, + "CSSGroupingRule": false, + "CSSImageValue": false, + "CSSImportRule": false, + "CSSKeyframeRule": false, + "CSSKeyframesRule": false, + "CSSKeywordValue": false, + "CSSLayerBlockRule": false, + "CSSLayerStatementRule": false, + "CSSMarginRule": false, + "CSSMathClamp": false, + "CSSMathInvert": false, + "CSSMathMax": false, + "CSSMathMin": false, + "CSSMathNegate": false, + "CSSMathProduct": false, + "CSSMathSum": false, + "CSSMathValue": false, + "CSSMatrixComponent": false, + "CSSMediaRule": false, + "CSSNamespaceRule": false, + "CSSNestedDeclarations": false, + "CSSNumericArray": false, + "CSSNumericValue": false, + "CSSPageDescriptors": false, + "CSSPageRule": false, + "CSSPerspective": false, + "CSSPositionTryDescriptors": false, + "CSSPositionTryRule": false, + "CSSPositionValue": false, + "CSSPropertyRule": false, + "CSSRotate": false, + "CSSRule": false, + "CSSRuleList": false, + "CSSScale": false, + "CSSScopeRule": false, + "CSSSkew": false, + "CSSSkewX": false, + "CSSSkewY": false, + "CSSStartingStyleRule": false, + "CSSStyleDeclaration": false, + "CSSStyleRule": false, + "CSSStyleSheet": false, + "CSSStyleValue": false, + "CSSSupportsRule": false, + "CSSTransformComponent": false, + "CSSTransformValue": false, + "CSSTransition": false, + "CSSTranslate": false, + "CSSUnitValue": false, + "CSSUnparsedValue": false, + "CSSVariableReferenceValue": false, + "CSSViewTransitionRule": false, + "currentFrame": false, + "currentTime": false, + "CustomElementRegistry": false, + "customElements": false, + "CustomEvent": false, + "CustomStateSet": false, + "DataTransfer": false, + "DataTransferItem": false, + "DataTransferItemList": false, + "DecompressionStream": false, + "DelayNode": false, + "DelegatedInkTrailPresenter": false, + "DeviceMotionEvent": false, + "DeviceMotionEventAcceleration": false, + "DeviceMotionEventRotationRate": false, + "DeviceOrientationEvent": false, + "devicePixelRatio": false, + "DevicePosture": false, + "DigitalCredential": false, + "dispatchEvent": false, + "DisposableStack": false, + "document": false, + "Document": false, + "DocumentFragment": false, + "documentPictureInPicture": false, + "DocumentPictureInPicture": false, + "DocumentPictureInPictureEvent": false, + "DocumentTimeline": false, + "DocumentType": false, + "DOMError": false, + "DOMException": false, + "DOMImplementation": false, + "DOMMatrix": false, + "DOMMatrixReadOnly": false, + "DOMParser": false, + "DOMPoint": false, + "DOMPointReadOnly": false, + "DOMQuad": false, + "DOMRect": false, + "DOMRectList": false, + "DOMRectReadOnly": false, + "DOMStringList": false, + "DOMStringMap": false, + "DOMTokenList": false, + "DragEvent": false, + "DynamicsCompressorNode": false, + "EditContext": false, + "Element": false, + "ElementInternals": false, + "EncodedAudioChunk": false, + "EncodedVideoChunk": false, + "ErrorEvent": false, + "event": false, + "Event": false, + "EventCounts": false, + "EventSource": false, + "EventTarget": false, + "external": false, + "External": false, + "EyeDropper": false, + "FeaturePolicy": false, + "FederatedCredential": false, + "fence": false, + "Fence": false, + "FencedFrameConfig": false, + "fetch": false, + "fetchLater": false, + "FetchLaterResult": false, + "File": false, + "FileList": false, + "FileReader": false, + "FileSystem": false, + "FileSystemDirectoryEntry": false, + "FileSystemDirectoryHandle": false, + "FileSystemDirectoryReader": false, + "FileSystemEntry": false, + "FileSystemFileEntry": false, + "FileSystemFileHandle": false, + "FileSystemHandle": false, + "FileSystemObserver": false, + "FileSystemWritableFileStream": false, + "find": false, + "focus": false, + "FocusEvent": false, + "FontData": false, + "FontFace": false, + "FontFaceSet": false, + "FontFaceSetLoadEvent": false, + "FormData": false, + "FormDataEvent": false, + "FragmentDirective": false, + "frameElement": false, + "frames": false, + "GainNode": false, + "Gamepad": false, + "GamepadAxisMoveEvent": false, + "GamepadButton": false, + "GamepadButtonEvent": false, + "GamepadEvent": false, + "GamepadHapticActuator": false, + "GamepadPose": false, + "Geolocation": false, + "GeolocationCoordinates": false, + "GeolocationPosition": false, + "GeolocationPositionError": false, + "getComputedStyle": false, + "getScreenDetails": false, + "getSelection": false, + "GPU": false, + "GPUAdapter": false, + "GPUAdapterInfo": false, + "GPUBindGroup": false, + "GPUBindGroupLayout": false, + "GPUBuffer": false, + "GPUBufferUsage": false, + "GPUCanvasContext": false, + "GPUColorWrite": false, + "GPUCommandBuffer": false, + "GPUCommandEncoder": false, + "GPUCompilationInfo": false, + "GPUCompilationMessage": false, + "GPUComputePassEncoder": false, + "GPUComputePipeline": false, + "GPUDevice": false, + "GPUDeviceLostInfo": false, + "GPUError": false, + "GPUExternalTexture": false, + "GPUInternalError": false, + "GPUMapMode": false, + "GPUOutOfMemoryError": false, + "GPUPipelineError": false, + "GPUPipelineLayout": false, + "GPUQuerySet": false, + "GPUQueue": false, + "GPURenderBundle": false, + "GPURenderBundleEncoder": false, + "GPURenderPassEncoder": false, + "GPURenderPipeline": false, + "GPUSampler": false, + "GPUShaderModule": false, + "GPUShaderStage": false, + "GPUSupportedFeatures": false, + "GPUSupportedLimits": false, + "GPUTexture": false, + "GPUTextureUsage": false, + "GPUTextureView": false, + "GPUUncapturedErrorEvent": false, + "GPUValidationError": false, + "GravitySensor": false, + "Gyroscope": false, + "HashChangeEvent": false, + "Headers": false, + "HID": false, + "HIDConnectionEvent": false, + "HIDDevice": false, + "HIDInputReportEvent": false, + "Highlight": false, + "HighlightRegistry": false, + "history": false, + "History": false, + "HTMLAllCollection": false, + "HTMLAnchorElement": false, + "HTMLAreaElement": false, + "HTMLAudioElement": false, + "HTMLBaseElement": false, + "HTMLBodyElement": false, + "HTMLBRElement": false, + "HTMLButtonElement": false, + "HTMLCanvasElement": false, + "HTMLCollection": false, + "HTMLDataElement": false, + "HTMLDataListElement": false, + "HTMLDetailsElement": false, + "HTMLDialogElement": false, + "HTMLDirectoryElement": false, + "HTMLDivElement": false, + "HTMLDListElement": false, + "HTMLDocument": false, + "HTMLElement": false, + "HTMLEmbedElement": false, + "HTMLFencedFrameElement": false, + "HTMLFieldSetElement": false, + "HTMLFontElement": false, + "HTMLFormControlsCollection": false, + "HTMLFormElement": false, + "HTMLFrameElement": false, + "HTMLFrameSetElement": false, + "HTMLHeadElement": false, + "HTMLHeadingElement": false, + "HTMLHRElement": false, + "HTMLHtmlElement": false, + "HTMLIFrameElement": false, + "HTMLImageElement": false, + "HTMLInputElement": false, + "HTMLLabelElement": false, + "HTMLLegendElement": false, + "HTMLLIElement": false, + "HTMLLinkElement": false, + "HTMLMapElement": false, + "HTMLMarqueeElement": false, + "HTMLMediaElement": false, + "HTMLMenuElement": false, + "HTMLMetaElement": false, + "HTMLMeterElement": false, + "HTMLModElement": false, + "HTMLObjectElement": false, + "HTMLOListElement": false, + "HTMLOptGroupElement": false, + "HTMLOptionElement": false, + "HTMLOptionsCollection": false, + "HTMLOutputElement": false, + "HTMLParagraphElement": false, + "HTMLParamElement": false, + "HTMLPictureElement": false, + "HTMLPreElement": false, + "HTMLProgressElement": false, + "HTMLQuoteElement": false, + "HTMLScriptElement": false, + "HTMLSelectedContentElement": false, + "HTMLSelectElement": false, + "HTMLSlotElement": false, + "HTMLSourceElement": false, + "HTMLSpanElement": false, + "HTMLStyleElement": false, + "HTMLTableCaptionElement": false, + "HTMLTableCellElement": false, + "HTMLTableColElement": false, + "HTMLTableElement": false, + "HTMLTableRowElement": false, + "HTMLTableSectionElement": false, + "HTMLTemplateElement": false, + "HTMLTextAreaElement": false, + "HTMLTimeElement": false, + "HTMLTitleElement": false, + "HTMLTrackElement": false, + "HTMLUListElement": false, + "HTMLUnknownElement": false, + "HTMLVideoElement": false, + "IDBCursor": false, + "IDBCursorWithValue": false, + "IDBDatabase": false, + "IDBFactory": false, + "IDBIndex": false, + "IDBKeyRange": false, + "IDBObjectStore": false, + "IDBOpenDBRequest": false, + "IDBRecord": false, + "IDBRequest": false, + "IDBTransaction": false, + "IDBVersionChangeEvent": false, + "IdentityCredential": false, + "IdentityCredentialError": false, + "IdentityProvider": false, + "IdleDeadline": false, + "IdleDetector": false, + "IIRFilterNode": false, + "Image": false, + "ImageBitmap": false, + "ImageBitmapRenderingContext": false, + "ImageCapture": false, + "ImageData": false, + "ImageDecoder": false, + "ImageTrack": false, + "ImageTrackList": false, + "indexedDB": false, + "Ink": false, + "innerHeight": false, + "innerWidth": false, + "InputDeviceCapabilities": false, + "InputDeviceInfo": false, + "InputEvent": false, + "IntegrityViolationReportBody": false, + "InterestEvent": false, + "IntersectionObserver": false, + "IntersectionObserverEntry": false, + "isSecureContext": false, + "Keyboard": false, + "KeyboardEvent": false, + "KeyboardLayoutMap": false, + "KeyframeEffect": false, + "LanguageDetector": false, + "LargestContentfulPaint": false, + "LaunchParams": false, + "launchQueue": false, + "LaunchQueue": false, + "LayoutShift": false, + "LayoutShiftAttribution": false, + "length": false, + "LinearAccelerationSensor": false, + "localStorage": false, + "location": true, + "Location": false, + "locationbar": false, + "Lock": false, + "LockManager": false, + "matchMedia": false, + "MathMLElement": false, + "MediaCapabilities": false, + "MediaCapabilitiesInfo": false, + "MediaDeviceInfo": false, + "MediaDevices": false, + "MediaElementAudioSourceNode": false, + "MediaEncryptedEvent": false, + "MediaError": false, + "MediaKeyError": false, + "MediaKeyMessageEvent": false, + "MediaKeys": false, + "MediaKeySession": false, + "MediaKeyStatusMap": false, + "MediaKeySystemAccess": false, + "MediaList": false, + "MediaMetadata": false, + "MediaQueryList": false, + "MediaQueryListEvent": false, + "MediaRecorder": false, + "MediaRecorderErrorEvent": false, + "MediaSession": false, + "MediaSource": false, + "MediaSourceHandle": false, + "MediaStream": false, + "MediaStreamAudioDestinationNode": false, + "MediaStreamAudioSourceNode": false, + "MediaStreamEvent": false, + "MediaStreamTrack": false, + "MediaStreamTrackAudioSourceNode": false, + "MediaStreamTrackAudioStats": false, + "MediaStreamTrackEvent": false, + "MediaStreamTrackGenerator": false, + "MediaStreamTrackProcessor": false, + "MediaStreamTrackVideoStats": false, + "menubar": false, + "MessageChannel": false, + "MessageEvent": false, + "MessagePort": false, + "MIDIAccess": false, + "MIDIConnectionEvent": false, + "MIDIInput": false, + "MIDIInputMap": false, + "MIDIMessageEvent": false, + "MIDIOutput": false, + "MIDIOutputMap": false, + "MIDIPort": false, + "MimeType": false, + "MimeTypeArray": false, + "model": false, + "ModelGenericSession": false, + "ModelManager": false, + "MouseEvent": false, + "moveBy": false, + "moveTo": false, + "MutationEvent": false, + "MutationObserver": false, + "MutationRecord": false, + "name": false, + "NamedNodeMap": false, + "NavigateEvent": false, + "navigation": false, + "Navigation": false, + "NavigationActivation": false, + "NavigationCurrentEntryChangeEvent": false, + "NavigationDestination": false, + "NavigationHistoryEntry": false, + "NavigationPrecommitController": false, + "NavigationPreloadManager": false, + "NavigationTransition": false, + "navigator": false, + "Navigator": false, + "NavigatorLogin": false, + "NavigatorManagedData": false, + "NavigatorUAData": false, + "NetworkInformation": false, + "Node": false, + "NodeFilter": false, + "NodeIterator": false, + "NodeList": false, + "Notification": false, + "NotifyPaintEvent": false, + "NotRestoredReasonDetails": false, + "NotRestoredReasons": false, + "Observable": false, + "OfflineAudioCompletionEvent": false, + "OfflineAudioContext": false, + "offscreenBuffering": false, + "OffscreenCanvas": false, + "OffscreenCanvasRenderingContext2D": false, + "onabort": true, + "onafterprint": true, + "onanimationcancel": true, + "onanimationend": true, + "onanimationiteration": true, + "onanimationstart": true, + "onappinstalled": true, + "onauxclick": true, + "onbeforeinput": true, + "onbeforeinstallprompt": true, + "onbeforematch": true, + "onbeforeprint": true, + "onbeforetoggle": true, + "onbeforeunload": true, + "onbeforexrselect": true, + "onblur": true, + "oncancel": true, + "oncanplay": true, + "oncanplaythrough": true, + "onchange": true, + "onclick": true, + "onclose": true, + "oncommand": true, + "oncontentvisibilityautostatechange": true, + "oncontextlost": true, + "oncontextmenu": true, + "oncontextrestored": true, + "oncopy": true, + "oncuechange": true, + "oncut": true, + "ondblclick": true, + "ondevicemotion": true, + "ondeviceorientation": true, + "ondeviceorientationabsolute": true, + "ondrag": true, + "ondragend": true, + "ondragenter": true, + "ondragleave": true, + "ondragover": true, + "ondragstart": true, + "ondrop": true, + "ondurationchange": true, + "onemptied": true, + "onended": true, + "onerror": true, + "onfocus": true, + "onformdata": true, + "ongamepadconnected": true, + "ongamepaddisconnected": true, + "ongotpointercapture": true, + "onhashchange": true, + "oninput": true, + "oninvalid": true, + "onkeydown": true, + "onkeypress": true, + "onkeyup": true, + "onlanguagechange": true, + "onload": true, + "onloadeddata": true, + "onloadedmetadata": true, + "onloadstart": true, + "onlostpointercapture": true, + "onmessage": true, + "onmessageerror": true, + "onmousedown": true, + "onmouseenter": true, + "onmouseleave": true, + "onmousemove": true, + "onmouseout": true, + "onmouseover": true, + "onmouseup": true, + "onmousewheel": true, + "onoffline": true, + "ononline": true, + "onpagehide": true, + "onpagereveal": true, + "onpageshow": true, + "onpageswap": true, + "onpaste": true, + "onpause": true, + "onplay": true, + "onplaying": true, + "onpointercancel": true, + "onpointerdown": true, + "onpointerenter": true, + "onpointerleave": true, + "onpointermove": true, + "onpointerout": true, + "onpointerover": true, + "onpointerrawupdate": true, + "onpointerup": true, + "onpopstate": true, + "onprogress": true, + "onratechange": true, + "onrejectionhandled": true, + "onreset": true, + "onresize": true, + "onscroll": true, + "onscrollend": true, + "onscrollsnapchange": true, + "onscrollsnapchanging": true, + "onsearch": true, + "onsecuritypolicyviolation": true, + "onseeked": true, + "onseeking": true, + "onselect": true, + "onselectionchange": true, + "onselectstart": true, + "onslotchange": true, + "onstalled": true, + "onstorage": true, + "onsubmit": true, + "onsuspend": true, + "ontimeupdate": true, + "ontoggle": true, + "ontransitioncancel": true, + "ontransitionend": true, + "ontransitionrun": true, + "ontransitionstart": true, + "onunhandledrejection": true, + "onunload": true, + "onvolumechange": true, + "onwaiting": true, + "onwheel": true, + "open": false, + "opener": false, + "Option": false, + "OrientationSensor": false, + "origin": false, + "originAgentCluster": false, + "OscillatorNode": false, + "OTPCredential": false, + "outerHeight": false, + "outerWidth": false, + "OverconstrainedError": false, + "PageRevealEvent": false, + "PageSwapEvent": false, + "PageTransitionEvent": false, + "pageXOffset": false, + "pageYOffset": false, + "PannerNode": false, + "parent": false, + "PasswordCredential": false, + "Path2D": false, + "PaymentAddress": false, + "PaymentManager": false, + "PaymentMethodChangeEvent": false, + "PaymentRequest": false, + "PaymentRequestUpdateEvent": false, + "PaymentResponse": false, + "performance": false, + "Performance": false, + "PerformanceElementTiming": false, + "PerformanceEntry": false, + "PerformanceEventTiming": false, + "PerformanceLongAnimationFrameTiming": false, + "PerformanceLongTaskTiming": false, + "PerformanceMark": false, + "PerformanceMeasure": false, + "PerformanceNavigation": false, + "PerformanceNavigationTiming": false, + "PerformanceObserver": false, + "PerformanceObserverEntryList": false, + "PerformancePaintTiming": false, + "PerformanceResourceTiming": false, + "PerformanceScriptTiming": false, + "PerformanceServerTiming": false, + "PerformanceTiming": false, + "PeriodicSyncManager": false, + "PeriodicWave": false, + "Permissions": false, + "PermissionStatus": false, + "PERSISTENT": false, + "personalbar": false, + "PictureInPictureEvent": false, + "PictureInPictureWindow": false, + "Plugin": false, + "PluginArray": false, + "PointerEvent": false, + "PopStateEvent": false, + "postMessage": false, + "Presentation": false, + "PresentationAvailability": false, + "PresentationConnection": false, + "PresentationConnectionAvailableEvent": false, + "PresentationConnectionCloseEvent": false, + "PresentationConnectionList": false, + "PresentationReceiver": false, + "PresentationRequest": false, + "PressureObserver": false, + "PressureRecord": false, + "print": false, + "ProcessingInstruction": false, + "Profiler": false, + "ProgressEvent": false, + "PromiseRejectionEvent": false, + "prompt": false, + "ProtectedAudience": false, + "PublicKeyCredential": false, + "PushManager": false, + "PushSubscription": false, + "PushSubscriptionOptions": false, + "queryLocalFonts": false, + "queueMicrotask": false, + "QuotaExceededError": false, + "RadioNodeList": false, + "Range": false, + "ReadableByteStreamController": false, + "ReadableStream": false, + "ReadableStreamBYOBReader": false, + "ReadableStreamBYOBRequest": false, + "ReadableStreamDefaultController": false, + "ReadableStreamDefaultReader": false, + "registerProcessor": false, + "RelativeOrientationSensor": false, + "RemotePlayback": false, + "removeEventListener": false, + "ReportBody": false, + "reportError": false, + "ReportingObserver": false, + "Request": false, + "requestAnimationFrame": false, + "requestIdleCallback": false, + "resizeBy": false, + "ResizeObserver": false, + "ResizeObserverEntry": false, + "ResizeObserverSize": false, + "resizeTo": false, + "Response": false, + "RestrictionTarget": false, + "RTCCertificate": false, + "RTCDataChannel": false, + "RTCDataChannelEvent": false, + "RTCDtlsTransport": false, + "RTCDTMFSender": false, + "RTCDTMFToneChangeEvent": false, + "RTCEncodedAudioFrame": false, + "RTCEncodedVideoFrame": false, + "RTCError": false, + "RTCErrorEvent": false, + "RTCIceCandidate": false, + "RTCIceTransport": false, + "RTCPeerConnection": false, + "RTCPeerConnectionIceErrorEvent": false, + "RTCPeerConnectionIceEvent": false, + "RTCRtpReceiver": false, + "RTCRtpScriptTransform": false, + "RTCRtpSender": false, + "RTCRtpTransceiver": false, + "RTCSctpTransport": false, + "RTCSessionDescription": false, + "RTCStatsReport": false, + "RTCTrackEvent": false, + "sampleRate": false, + "scheduler": false, + "Scheduler": false, + "Scheduling": false, + "screen": false, + "Screen": false, + "ScreenDetailed": false, + "ScreenDetails": false, + "screenLeft": false, + "ScreenOrientation": false, + "screenTop": false, + "screenX": false, + "screenY": false, + "ScriptProcessorNode": false, + "scroll": false, + "scrollbars": false, + "scrollBy": false, + "ScrollTimeline": false, + "scrollTo": false, + "scrollX": false, + "scrollY": false, + "SecurityPolicyViolationEvent": false, + "Selection": false, + "self": false, + "Sensor": false, + "SensorErrorEvent": false, + "Serial": false, + "SerialPort": false, + "ServiceWorker": false, + "ServiceWorkerContainer": false, + "ServiceWorkerRegistration": false, + "sessionStorage": false, + "setInterval": false, + "setTimeout": false, + "ShadowRoot": false, + "sharedStorage": false, + "SharedStorage": false, + "SharedStorageAppendMethod": false, + "SharedStorageClearMethod": false, + "SharedStorageDeleteMethod": false, + "SharedStorageModifierMethod": false, + "SharedStorageSetMethod": false, + "SharedStorageWorklet": false, + "SharedWorker": false, + "showDirectoryPicker": false, + "showOpenFilePicker": false, + "showSaveFilePicker": false, + "SnapEvent": false, + "SourceBuffer": false, + "SourceBufferList": false, + "SpeechGrammar": false, + "SpeechGrammarList": false, + "SpeechRecognition": false, + "SpeechRecognitionErrorEvent": false, + "SpeechRecognitionEvent": false, + "SpeechRecognitionPhrase": false, + "speechSynthesis": false, + "SpeechSynthesis": false, + "SpeechSynthesisErrorEvent": false, + "SpeechSynthesisEvent": false, + "SpeechSynthesisUtterance": false, + "SpeechSynthesisVoice": false, + "StaticRange": false, + "status": false, + "statusbar": false, + "StereoPannerNode": false, + "stop": false, + "Storage": false, + "StorageBucket": false, + "StorageBucketManager": false, + "StorageEvent": false, + "StorageManager": false, + "structuredClone": false, + "styleMedia": false, + "StylePropertyMap": false, + "StylePropertyMapReadOnly": false, + "StyleSheet": false, + "StyleSheetList": false, + "SubmitEvent": false, + "Subscriber": false, + "SubtleCrypto": false, + "Summarizer": false, + "SuppressedError": false, + "SVGAElement": false, + "SVGAngle": false, + "SVGAnimatedAngle": false, + "SVGAnimatedBoolean": false, + "SVGAnimatedEnumeration": false, + "SVGAnimatedInteger": false, + "SVGAnimatedLength": false, + "SVGAnimatedLengthList": false, + "SVGAnimatedNumber": false, + "SVGAnimatedNumberList": false, + "SVGAnimatedPreserveAspectRatio": false, + "SVGAnimatedRect": false, + "SVGAnimatedString": false, + "SVGAnimatedTransformList": false, + "SVGAnimateElement": false, + "SVGAnimateMotionElement": false, + "SVGAnimateTransformElement": false, + "SVGAnimationElement": false, + "SVGCircleElement": false, + "SVGClipPathElement": false, + "SVGComponentTransferFunctionElement": false, + "SVGDefsElement": false, + "SVGDescElement": false, + "SVGElement": false, + "SVGEllipseElement": false, + "SVGFEBlendElement": false, + "SVGFEColorMatrixElement": false, + "SVGFEComponentTransferElement": false, + "SVGFECompositeElement": false, + "SVGFEConvolveMatrixElement": false, + "SVGFEDiffuseLightingElement": false, + "SVGFEDisplacementMapElement": false, + "SVGFEDistantLightElement": false, + "SVGFEDropShadowElement": false, + "SVGFEFloodElement": false, + "SVGFEFuncAElement": false, + "SVGFEFuncBElement": false, + "SVGFEFuncGElement": false, + "SVGFEFuncRElement": false, + "SVGFEGaussianBlurElement": false, + "SVGFEImageElement": false, + "SVGFEMergeElement": false, + "SVGFEMergeNodeElement": false, + "SVGFEMorphologyElement": false, + "SVGFEOffsetElement": false, + "SVGFEPointLightElement": false, + "SVGFESpecularLightingElement": false, + "SVGFESpotLightElement": false, + "SVGFETileElement": false, + "SVGFETurbulenceElement": false, + "SVGFilterElement": false, + "SVGForeignObjectElement": false, + "SVGGElement": false, + "SVGGeometryElement": false, + "SVGGradientElement": false, + "SVGGraphicsElement": false, + "SVGImageElement": false, + "SVGLength": false, + "SVGLengthList": false, + "SVGLinearGradientElement": false, + "SVGLineElement": false, + "SVGMarkerElement": false, + "SVGMaskElement": false, + "SVGMatrix": false, + "SVGMetadataElement": false, + "SVGMPathElement": false, + "SVGNumber": false, + "SVGNumberList": false, + "SVGPathElement": false, + "SVGPatternElement": false, + "SVGPoint": false, + "SVGPointList": false, + "SVGPolygonElement": false, + "SVGPolylineElement": false, + "SVGPreserveAspectRatio": false, + "SVGRadialGradientElement": false, + "SVGRect": false, + "SVGRectElement": false, + "SVGScriptElement": false, + "SVGSetElement": false, + "SVGStopElement": false, + "SVGStringList": false, + "SVGStyleElement": false, + "SVGSVGElement": false, + "SVGSwitchElement": false, + "SVGSymbolElement": false, + "SVGTextContentElement": false, + "SVGTextElement": false, + "SVGTextPathElement": false, + "SVGTextPositioningElement": false, + "SVGTitleElement": false, + "SVGTransform": false, + "SVGTransformList": false, + "SVGTSpanElement": false, + "SVGUnitTypes": false, + "SVGUseElement": false, + "SVGViewElement": false, + "SyncManager": false, + "TaskAttributionTiming": false, + "TaskController": false, + "TaskPriorityChangeEvent": false, + "TaskSignal": false, + "TEMPORARY": false, + "Text": false, + "TextDecoder": false, + "TextDecoderStream": false, + "TextEncoder": false, + "TextEncoderStream": false, + "TextEvent": false, + "TextFormat": false, + "TextFormatUpdateEvent": false, + "TextMetrics": false, + "TextTrack": false, + "TextTrackCue": false, + "TextTrackCueList": false, + "TextTrackList": false, + "TextUpdateEvent": false, + "TimeEvent": false, + "TimeRanges": false, + "ToggleEvent": false, + "toolbar": false, + "top": false, + "Touch": false, + "TouchEvent": false, + "TouchList": false, + "TrackEvent": false, + "TransformStream": false, + "TransformStreamDefaultController": false, + "TransitionEvent": false, + "Translator": false, + "TreeWalker": false, + "TrustedHTML": false, + "TrustedScript": false, + "TrustedScriptURL": false, + "TrustedTypePolicy": false, + "TrustedTypePolicyFactory": false, + "trustedTypes": false, + "UIEvent": false, + "URL": false, + "URLPattern": false, + "URLSearchParams": false, + "USB": false, + "USBAlternateInterface": false, + "USBConfiguration": false, + "USBConnectionEvent": false, + "USBDevice": false, + "USBEndpoint": false, + "USBInterface": false, + "USBInTransferResult": false, + "USBIsochronousInTransferPacket": false, + "USBIsochronousInTransferResult": false, + "USBIsochronousOutTransferPacket": false, + "USBIsochronousOutTransferResult": false, + "USBOutTransferResult": false, + "UserActivation": false, + "ValidityState": false, + "VideoColorSpace": false, + "VideoDecoder": false, + "VideoEncoder": false, + "VideoFrame": false, + "VideoPlaybackQuality": false, + "viewport": false, + "Viewport": false, + "ViewTimeline": false, + "ViewTransition": false, + "ViewTransitionTypeSet": false, + "VirtualKeyboard": false, + "VirtualKeyboardGeometryChangeEvent": false, + "VisibilityStateEntry": false, + "visualViewport": false, + "VisualViewport": false, + "VTTCue": false, + "VTTRegion": false, + "WakeLock": false, + "WakeLockSentinel": false, + "WaveShaperNode": false, + "WebAssembly": false, + "WebGL2RenderingContext": false, + "WebGLActiveInfo": false, + "WebGLBuffer": false, + "WebGLContextEvent": false, + "WebGLFramebuffer": false, + "WebGLObject": false, + "WebGLProgram": false, + "WebGLQuery": false, + "WebGLRenderbuffer": false, + "WebGLRenderingContext": false, + "WebGLSampler": false, + "WebGLShader": false, + "WebGLShaderPrecisionFormat": false, + "WebGLSync": false, + "WebGLTexture": false, + "WebGLTransformFeedback": false, + "WebGLUniformLocation": false, + "WebGLVertexArrayObject": false, + "WebSocket": false, + "WebSocketError": false, + "WebSocketStream": false, + "WebTransport": false, + "WebTransportBidirectionalStream": false, + "WebTransportDatagramDuplexStream": false, + "WebTransportError": false, + "WebTransportReceiveStream": false, + "WebTransportSendStream": false, + "WGSLLanguageFeatures": false, + "WheelEvent": false, + "when": false, + "window": false, + "Window": false, + "WindowControlsOverlay": false, + "WindowControlsOverlayGeometryChangeEvent": false, + "Worker": false, + "Worklet": false, + "WorkletGlobalScope": false, + "WritableStream": false, + "WritableStreamDefaultController": false, + "WritableStreamDefaultWriter": false, + "XMLDocument": false, + "XMLHttpRequest": false, + "XMLHttpRequestEventTarget": false, + "XMLHttpRequestUpload": false, + "XMLSerializer": false, + "XPathEvaluator": false, + "XPathExpression": false, + "XPathResult": false, + "XRAnchor": false, + "XRAnchorSet": false, + "XRBoundedReferenceSpace": false, + "XRCamera": false, + "XRCPUDepthInformation": false, + "XRDepthInformation": false, + "XRDOMOverlayState": false, + "XRFrame": false, + "XRHand": false, + "XRHitTestResult": false, + "XRHitTestSource": false, + "XRInputSource": false, + "XRInputSourceArray": false, + "XRInputSourceEvent": false, + "XRInputSourcesChangeEvent": false, + "XRJointPose": false, + "XRJointSpace": false, + "XRLayer": false, + "XRLightEstimate": false, + "XRLightProbe": false, + "XRPose": false, + "XRRay": false, + "XRReferenceSpace": false, + "XRReferenceSpaceEvent": false, + "XRRenderState": false, + "XRRigidTransform": false, + "XRSession": false, + "XRSessionEvent": false, + "XRSpace": false, + "XRSystem": false, + "XRTransientInputHitTestResult": false, + "XRTransientInputHitTestSource": false, + "XRView": false, + "XRViewerPose": false, + "XRViewport": false, + "XRWebGLBinding": false, + "XRWebGLDepthInformation": false, + "XRWebGLLayer": false, + "XSLTProcessor": false + } + }, + "errors": [ + { + "messageId": "impliedEval" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-implied-eval > invalid + +```js +window.window.setTimeout(`foo${bar}`) +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "globals": { + "AbortController": false, + "AbortSignal": false, + "AbsoluteOrientationSensor": false, + "AbstractRange": false, + "Accelerometer": false, + "addEventListener": false, + "ai": false, + "AI": false, + "AICreateMonitor": false, + "AITextSession": false, + "alert": false, + "AnalyserNode": false, + "Animation": false, + "AnimationEffect": false, + "AnimationEvent": false, + "AnimationPlaybackEvent": false, + "AnimationTimeline": false, + "AsyncDisposableStack": false, + "atob": false, + "Attr": false, + "Audio": false, + "AudioBuffer": false, + "AudioBufferSourceNode": false, + "AudioContext": false, + "AudioData": false, + "AudioDecoder": false, + "AudioDestinationNode": false, + "AudioEncoder": false, + "AudioListener": false, + "AudioNode": false, + "AudioParam": false, + "AudioParamMap": false, + "AudioProcessingEvent": false, + "AudioScheduledSourceNode": false, + "AudioSinkInfo": false, + "AudioWorklet": false, + "AudioWorkletGlobalScope": false, + "AudioWorkletNode": false, + "AudioWorkletProcessor": false, + "AuthenticatorAssertionResponse": false, + "AuthenticatorAttestationResponse": false, + "AuthenticatorResponse": false, + "BackgroundFetchManager": false, + "BackgroundFetchRecord": false, + "BackgroundFetchRegistration": false, + "BarcodeDetector": false, + "BarProp": false, + "BaseAudioContext": false, + "BatteryManager": false, + "BeforeUnloadEvent": false, + "BiquadFilterNode": false, + "Blob": false, + "BlobEvent": false, + "Bluetooth": false, + "BluetoothCharacteristicProperties": false, + "BluetoothDevice": false, + "BluetoothRemoteGATTCharacteristic": false, + "BluetoothRemoteGATTDescriptor": false, + "BluetoothRemoteGATTServer": false, + "BluetoothRemoteGATTService": false, + "BluetoothUUID": false, + "blur": false, + "BroadcastChannel": false, + "BrowserCaptureMediaStreamTrack": false, + "btoa": false, + "ByteLengthQueuingStrategy": false, + "Cache": false, + "caches": false, + "CacheStorage": false, + "cancelAnimationFrame": false, + "cancelIdleCallback": false, + "CanvasCaptureMediaStream": false, + "CanvasCaptureMediaStreamTrack": false, + "CanvasGradient": false, + "CanvasPattern": false, + "CanvasRenderingContext2D": false, + "CaptureController": false, + "CaretPosition": false, + "CDATASection": false, + "ChannelMergerNode": false, + "ChannelSplitterNode": false, + "ChapterInformation": false, + "CharacterBoundsUpdateEvent": false, + "CharacterData": false, + "clearInterval": false, + "clearTimeout": false, + "clientInformation": false, + "Clipboard": false, + "ClipboardChangeEvent": false, + "ClipboardEvent": false, + "ClipboardItem": false, + "close": false, + "closed": false, + "CloseEvent": false, + "CloseWatcher": false, + "CommandEvent": false, + "Comment": false, + "CompositionEvent": false, + "CompressionStream": false, + "confirm": false, + "console": false, + "ConstantSourceNode": false, + "ContentVisibilityAutoStateChangeEvent": false, + "ConvolverNode": false, + "CookieChangeEvent": false, + "CookieDeprecationLabel": false, + "cookieStore": false, + "CookieStore": false, + "CookieStoreManager": false, + "CountQueuingStrategy": false, + "createImageBitmap": false, + "CreateMonitor": false, + "Credential": false, + "credentialless": false, + "CredentialsContainer": false, + "CropTarget": false, + "crossOriginIsolated": false, + "crypto": false, + "Crypto": false, + "CryptoKey": false, + "CSPViolationReportBody": false, + "CSS": false, + "CSSAnimation": false, + "CSSConditionRule": false, + "CSSContainerRule": false, + "CSSCounterStyleRule": false, + "CSSFontFaceRule": false, + "CSSFontFeatureValuesRule": false, + "CSSFontPaletteValuesRule": false, + "CSSFunctionDeclarations": false, + "CSSFunctionDescriptors": false, + "CSSFunctionRule": false, + "CSSGroupingRule": false, + "CSSImageValue": false, + "CSSImportRule": false, + "CSSKeyframeRule": false, + "CSSKeyframesRule": false, + "CSSKeywordValue": false, + "CSSLayerBlockRule": false, + "CSSLayerStatementRule": false, + "CSSMarginRule": false, + "CSSMathClamp": false, + "CSSMathInvert": false, + "CSSMathMax": false, + "CSSMathMin": false, + "CSSMathNegate": false, + "CSSMathProduct": false, + "CSSMathSum": false, + "CSSMathValue": false, + "CSSMatrixComponent": false, + "CSSMediaRule": false, + "CSSNamespaceRule": false, + "CSSNestedDeclarations": false, + "CSSNumericArray": false, + "CSSNumericValue": false, + "CSSPageDescriptors": false, + "CSSPageRule": false, + "CSSPerspective": false, + "CSSPositionTryDescriptors": false, + "CSSPositionTryRule": false, + "CSSPositionValue": false, + "CSSPropertyRule": false, + "CSSRotate": false, + "CSSRule": false, + "CSSRuleList": false, + "CSSScale": false, + "CSSScopeRule": false, + "CSSSkew": false, + "CSSSkewX": false, + "CSSSkewY": false, + "CSSStartingStyleRule": false, + "CSSStyleDeclaration": false, + "CSSStyleRule": false, + "CSSStyleSheet": false, + "CSSStyleValue": false, + "CSSSupportsRule": false, + "CSSTransformComponent": false, + "CSSTransformValue": false, + "CSSTransition": false, + "CSSTranslate": false, + "CSSUnitValue": false, + "CSSUnparsedValue": false, + "CSSVariableReferenceValue": false, + "CSSViewTransitionRule": false, + "currentFrame": false, + "currentTime": false, + "CustomElementRegistry": false, + "customElements": false, + "CustomEvent": false, + "CustomStateSet": false, + "DataTransfer": false, + "DataTransferItem": false, + "DataTransferItemList": false, + "DecompressionStream": false, + "DelayNode": false, + "DelegatedInkTrailPresenter": false, + "DeviceMotionEvent": false, + "DeviceMotionEventAcceleration": false, + "DeviceMotionEventRotationRate": false, + "DeviceOrientationEvent": false, + "devicePixelRatio": false, + "DevicePosture": false, + "DigitalCredential": false, + "dispatchEvent": false, + "DisposableStack": false, + "document": false, + "Document": false, + "DocumentFragment": false, + "documentPictureInPicture": false, + "DocumentPictureInPicture": false, + "DocumentPictureInPictureEvent": false, + "DocumentTimeline": false, + "DocumentType": false, + "DOMError": false, + "DOMException": false, + "DOMImplementation": false, + "DOMMatrix": false, + "DOMMatrixReadOnly": false, + "DOMParser": false, + "DOMPoint": false, + "DOMPointReadOnly": false, + "DOMQuad": false, + "DOMRect": false, + "DOMRectList": false, + "DOMRectReadOnly": false, + "DOMStringList": false, + "DOMStringMap": false, + "DOMTokenList": false, + "DragEvent": false, + "DynamicsCompressorNode": false, + "EditContext": false, + "Element": false, + "ElementInternals": false, + "EncodedAudioChunk": false, + "EncodedVideoChunk": false, + "ErrorEvent": false, + "event": false, + "Event": false, + "EventCounts": false, + "EventSource": false, + "EventTarget": false, + "external": false, + "External": false, + "EyeDropper": false, + "FeaturePolicy": false, + "FederatedCredential": false, + "fence": false, + "Fence": false, + "FencedFrameConfig": false, + "fetch": false, + "fetchLater": false, + "FetchLaterResult": false, + "File": false, + "FileList": false, + "FileReader": false, + "FileSystem": false, + "FileSystemDirectoryEntry": false, + "FileSystemDirectoryHandle": false, + "FileSystemDirectoryReader": false, + "FileSystemEntry": false, + "FileSystemFileEntry": false, + "FileSystemFileHandle": false, + "FileSystemHandle": false, + "FileSystemObserver": false, + "FileSystemWritableFileStream": false, + "find": false, + "focus": false, + "FocusEvent": false, + "FontData": false, + "FontFace": false, + "FontFaceSet": false, + "FontFaceSetLoadEvent": false, + "FormData": false, + "FormDataEvent": false, + "FragmentDirective": false, + "frameElement": false, + "frames": false, + "GainNode": false, + "Gamepad": false, + "GamepadAxisMoveEvent": false, + "GamepadButton": false, + "GamepadButtonEvent": false, + "GamepadEvent": false, + "GamepadHapticActuator": false, + "GamepadPose": false, + "Geolocation": false, + "GeolocationCoordinates": false, + "GeolocationPosition": false, + "GeolocationPositionError": false, + "getComputedStyle": false, + "getScreenDetails": false, + "getSelection": false, + "GPU": false, + "GPUAdapter": false, + "GPUAdapterInfo": false, + "GPUBindGroup": false, + "GPUBindGroupLayout": false, + "GPUBuffer": false, + "GPUBufferUsage": false, + "GPUCanvasContext": false, + "GPUColorWrite": false, + "GPUCommandBuffer": false, + "GPUCommandEncoder": false, + "GPUCompilationInfo": false, + "GPUCompilationMessage": false, + "GPUComputePassEncoder": false, + "GPUComputePipeline": false, + "GPUDevice": false, + "GPUDeviceLostInfo": false, + "GPUError": false, + "GPUExternalTexture": false, + "GPUInternalError": false, + "GPUMapMode": false, + "GPUOutOfMemoryError": false, + "GPUPipelineError": false, + "GPUPipelineLayout": false, + "GPUQuerySet": false, + "GPUQueue": false, + "GPURenderBundle": false, + "GPURenderBundleEncoder": false, + "GPURenderPassEncoder": false, + "GPURenderPipeline": false, + "GPUSampler": false, + "GPUShaderModule": false, + "GPUShaderStage": false, + "GPUSupportedFeatures": false, + "GPUSupportedLimits": false, + "GPUTexture": false, + "GPUTextureUsage": false, + "GPUTextureView": false, + "GPUUncapturedErrorEvent": false, + "GPUValidationError": false, + "GravitySensor": false, + "Gyroscope": false, + "HashChangeEvent": false, + "Headers": false, + "HID": false, + "HIDConnectionEvent": false, + "HIDDevice": false, + "HIDInputReportEvent": false, + "Highlight": false, + "HighlightRegistry": false, + "history": false, + "History": false, + "HTMLAllCollection": false, + "HTMLAnchorElement": false, + "HTMLAreaElement": false, + "HTMLAudioElement": false, + "HTMLBaseElement": false, + "HTMLBodyElement": false, + "HTMLBRElement": false, + "HTMLButtonElement": false, + "HTMLCanvasElement": false, + "HTMLCollection": false, + "HTMLDataElement": false, + "HTMLDataListElement": false, + "HTMLDetailsElement": false, + "HTMLDialogElement": false, + "HTMLDirectoryElement": false, + "HTMLDivElement": false, + "HTMLDListElement": false, + "HTMLDocument": false, + "HTMLElement": false, + "HTMLEmbedElement": false, + "HTMLFencedFrameElement": false, + "HTMLFieldSetElement": false, + "HTMLFontElement": false, + "HTMLFormControlsCollection": false, + "HTMLFormElement": false, + "HTMLFrameElement": false, + "HTMLFrameSetElement": false, + "HTMLHeadElement": false, + "HTMLHeadingElement": false, + "HTMLHRElement": false, + "HTMLHtmlElement": false, + "HTMLIFrameElement": false, + "HTMLImageElement": false, + "HTMLInputElement": false, + "HTMLLabelElement": false, + "HTMLLegendElement": false, + "HTMLLIElement": false, + "HTMLLinkElement": false, + "HTMLMapElement": false, + "HTMLMarqueeElement": false, + "HTMLMediaElement": false, + "HTMLMenuElement": false, + "HTMLMetaElement": false, + "HTMLMeterElement": false, + "HTMLModElement": false, + "HTMLObjectElement": false, + "HTMLOListElement": false, + "HTMLOptGroupElement": false, + "HTMLOptionElement": false, + "HTMLOptionsCollection": false, + "HTMLOutputElement": false, + "HTMLParagraphElement": false, + "HTMLParamElement": false, + "HTMLPictureElement": false, + "HTMLPreElement": false, + "HTMLProgressElement": false, + "HTMLQuoteElement": false, + "HTMLScriptElement": false, + "HTMLSelectedContentElement": false, + "HTMLSelectElement": false, + "HTMLSlotElement": false, + "HTMLSourceElement": false, + "HTMLSpanElement": false, + "HTMLStyleElement": false, + "HTMLTableCaptionElement": false, + "HTMLTableCellElement": false, + "HTMLTableColElement": false, + "HTMLTableElement": false, + "HTMLTableRowElement": false, + "HTMLTableSectionElement": false, + "HTMLTemplateElement": false, + "HTMLTextAreaElement": false, + "HTMLTimeElement": false, + "HTMLTitleElement": false, + "HTMLTrackElement": false, + "HTMLUListElement": false, + "HTMLUnknownElement": false, + "HTMLVideoElement": false, + "IDBCursor": false, + "IDBCursorWithValue": false, + "IDBDatabase": false, + "IDBFactory": false, + "IDBIndex": false, + "IDBKeyRange": false, + "IDBObjectStore": false, + "IDBOpenDBRequest": false, + "IDBRecord": false, + "IDBRequest": false, + "IDBTransaction": false, + "IDBVersionChangeEvent": false, + "IdentityCredential": false, + "IdentityCredentialError": false, + "IdentityProvider": false, + "IdleDeadline": false, + "IdleDetector": false, + "IIRFilterNode": false, + "Image": false, + "ImageBitmap": false, + "ImageBitmapRenderingContext": false, + "ImageCapture": false, + "ImageData": false, + "ImageDecoder": false, + "ImageTrack": false, + "ImageTrackList": false, + "indexedDB": false, + "Ink": false, + "innerHeight": false, + "innerWidth": false, + "InputDeviceCapabilities": false, + "InputDeviceInfo": false, + "InputEvent": false, + "IntegrityViolationReportBody": false, + "InterestEvent": false, + "IntersectionObserver": false, + "IntersectionObserverEntry": false, + "isSecureContext": false, + "Keyboard": false, + "KeyboardEvent": false, + "KeyboardLayoutMap": false, + "KeyframeEffect": false, + "LanguageDetector": false, + "LargestContentfulPaint": false, + "LaunchParams": false, + "launchQueue": false, + "LaunchQueue": false, + "LayoutShift": false, + "LayoutShiftAttribution": false, + "length": false, + "LinearAccelerationSensor": false, + "localStorage": false, + "location": true, + "Location": false, + "locationbar": false, + "Lock": false, + "LockManager": false, + "matchMedia": false, + "MathMLElement": false, + "MediaCapabilities": false, + "MediaCapabilitiesInfo": false, + "MediaDeviceInfo": false, + "MediaDevices": false, + "MediaElementAudioSourceNode": false, + "MediaEncryptedEvent": false, + "MediaError": false, + "MediaKeyError": false, + "MediaKeyMessageEvent": false, + "MediaKeys": false, + "MediaKeySession": false, + "MediaKeyStatusMap": false, + "MediaKeySystemAccess": false, + "MediaList": false, + "MediaMetadata": false, + "MediaQueryList": false, + "MediaQueryListEvent": false, + "MediaRecorder": false, + "MediaRecorderErrorEvent": false, + "MediaSession": false, + "MediaSource": false, + "MediaSourceHandle": false, + "MediaStream": false, + "MediaStreamAudioDestinationNode": false, + "MediaStreamAudioSourceNode": false, + "MediaStreamEvent": false, + "MediaStreamTrack": false, + "MediaStreamTrackAudioSourceNode": false, + "MediaStreamTrackAudioStats": false, + "MediaStreamTrackEvent": false, + "MediaStreamTrackGenerator": false, + "MediaStreamTrackProcessor": false, + "MediaStreamTrackVideoStats": false, + "menubar": false, + "MessageChannel": false, + "MessageEvent": false, + "MessagePort": false, + "MIDIAccess": false, + "MIDIConnectionEvent": false, + "MIDIInput": false, + "MIDIInputMap": false, + "MIDIMessageEvent": false, + "MIDIOutput": false, + "MIDIOutputMap": false, + "MIDIPort": false, + "MimeType": false, + "MimeTypeArray": false, + "model": false, + "ModelGenericSession": false, + "ModelManager": false, + "MouseEvent": false, + "moveBy": false, + "moveTo": false, + "MutationEvent": false, + "MutationObserver": false, + "MutationRecord": false, + "name": false, + "NamedNodeMap": false, + "NavigateEvent": false, + "navigation": false, + "Navigation": false, + "NavigationActivation": false, + "NavigationCurrentEntryChangeEvent": false, + "NavigationDestination": false, + "NavigationHistoryEntry": false, + "NavigationPrecommitController": false, + "NavigationPreloadManager": false, + "NavigationTransition": false, + "navigator": false, + "Navigator": false, + "NavigatorLogin": false, + "NavigatorManagedData": false, + "NavigatorUAData": false, + "NetworkInformation": false, + "Node": false, + "NodeFilter": false, + "NodeIterator": false, + "NodeList": false, + "Notification": false, + "NotifyPaintEvent": false, + "NotRestoredReasonDetails": false, + "NotRestoredReasons": false, + "Observable": false, + "OfflineAudioCompletionEvent": false, + "OfflineAudioContext": false, + "offscreenBuffering": false, + "OffscreenCanvas": false, + "OffscreenCanvasRenderingContext2D": false, + "onabort": true, + "onafterprint": true, + "onanimationcancel": true, + "onanimationend": true, + "onanimationiteration": true, + "onanimationstart": true, + "onappinstalled": true, + "onauxclick": true, + "onbeforeinput": true, + "onbeforeinstallprompt": true, + "onbeforematch": true, + "onbeforeprint": true, + "onbeforetoggle": true, + "onbeforeunload": true, + "onbeforexrselect": true, + "onblur": true, + "oncancel": true, + "oncanplay": true, + "oncanplaythrough": true, + "onchange": true, + "onclick": true, + "onclose": true, + "oncommand": true, + "oncontentvisibilityautostatechange": true, + "oncontextlost": true, + "oncontextmenu": true, + "oncontextrestored": true, + "oncopy": true, + "oncuechange": true, + "oncut": true, + "ondblclick": true, + "ondevicemotion": true, + "ondeviceorientation": true, + "ondeviceorientationabsolute": true, + "ondrag": true, + "ondragend": true, + "ondragenter": true, + "ondragleave": true, + "ondragover": true, + "ondragstart": true, + "ondrop": true, + "ondurationchange": true, + "onemptied": true, + "onended": true, + "onerror": true, + "onfocus": true, + "onformdata": true, + "ongamepadconnected": true, + "ongamepaddisconnected": true, + "ongotpointercapture": true, + "onhashchange": true, + "oninput": true, + "oninvalid": true, + "onkeydown": true, + "onkeypress": true, + "onkeyup": true, + "onlanguagechange": true, + "onload": true, + "onloadeddata": true, + "onloadedmetadata": true, + "onloadstart": true, + "onlostpointercapture": true, + "onmessage": true, + "onmessageerror": true, + "onmousedown": true, + "onmouseenter": true, + "onmouseleave": true, + "onmousemove": true, + "onmouseout": true, + "onmouseover": true, + "onmouseup": true, + "onmousewheel": true, + "onoffline": true, + "ononline": true, + "onpagehide": true, + "onpagereveal": true, + "onpageshow": true, + "onpageswap": true, + "onpaste": true, + "onpause": true, + "onplay": true, + "onplaying": true, + "onpointercancel": true, + "onpointerdown": true, + "onpointerenter": true, + "onpointerleave": true, + "onpointermove": true, + "onpointerout": true, + "onpointerover": true, + "onpointerrawupdate": true, + "onpointerup": true, + "onpopstate": true, + "onprogress": true, + "onratechange": true, + "onrejectionhandled": true, + "onreset": true, + "onresize": true, + "onscroll": true, + "onscrollend": true, + "onscrollsnapchange": true, + "onscrollsnapchanging": true, + "onsearch": true, + "onsecuritypolicyviolation": true, + "onseeked": true, + "onseeking": true, + "onselect": true, + "onselectionchange": true, + "onselectstart": true, + "onslotchange": true, + "onstalled": true, + "onstorage": true, + "onsubmit": true, + "onsuspend": true, + "ontimeupdate": true, + "ontoggle": true, + "ontransitioncancel": true, + "ontransitionend": true, + "ontransitionrun": true, + "ontransitionstart": true, + "onunhandledrejection": true, + "onunload": true, + "onvolumechange": true, + "onwaiting": true, + "onwheel": true, + "open": false, + "opener": false, + "Option": false, + "OrientationSensor": false, + "origin": false, + "originAgentCluster": false, + "OscillatorNode": false, + "OTPCredential": false, + "outerHeight": false, + "outerWidth": false, + "OverconstrainedError": false, + "PageRevealEvent": false, + "PageSwapEvent": false, + "PageTransitionEvent": false, + "pageXOffset": false, + "pageYOffset": false, + "PannerNode": false, + "parent": false, + "PasswordCredential": false, + "Path2D": false, + "PaymentAddress": false, + "PaymentManager": false, + "PaymentMethodChangeEvent": false, + "PaymentRequest": false, + "PaymentRequestUpdateEvent": false, + "PaymentResponse": false, + "performance": false, + "Performance": false, + "PerformanceElementTiming": false, + "PerformanceEntry": false, + "PerformanceEventTiming": false, + "PerformanceLongAnimationFrameTiming": false, + "PerformanceLongTaskTiming": false, + "PerformanceMark": false, + "PerformanceMeasure": false, + "PerformanceNavigation": false, + "PerformanceNavigationTiming": false, + "PerformanceObserver": false, + "PerformanceObserverEntryList": false, + "PerformancePaintTiming": false, + "PerformanceResourceTiming": false, + "PerformanceScriptTiming": false, + "PerformanceServerTiming": false, + "PerformanceTiming": false, + "PeriodicSyncManager": false, + "PeriodicWave": false, + "Permissions": false, + "PermissionStatus": false, + "PERSISTENT": false, + "personalbar": false, + "PictureInPictureEvent": false, + "PictureInPictureWindow": false, + "Plugin": false, + "PluginArray": false, + "PointerEvent": false, + "PopStateEvent": false, + "postMessage": false, + "Presentation": false, + "PresentationAvailability": false, + "PresentationConnection": false, + "PresentationConnectionAvailableEvent": false, + "PresentationConnectionCloseEvent": false, + "PresentationConnectionList": false, + "PresentationReceiver": false, + "PresentationRequest": false, + "PressureObserver": false, + "PressureRecord": false, + "print": false, + "ProcessingInstruction": false, + "Profiler": false, + "ProgressEvent": false, + "PromiseRejectionEvent": false, + "prompt": false, + "ProtectedAudience": false, + "PublicKeyCredential": false, + "PushManager": false, + "PushSubscription": false, + "PushSubscriptionOptions": false, + "queryLocalFonts": false, + "queueMicrotask": false, + "QuotaExceededError": false, + "RadioNodeList": false, + "Range": false, + "ReadableByteStreamController": false, + "ReadableStream": false, + "ReadableStreamBYOBReader": false, + "ReadableStreamBYOBRequest": false, + "ReadableStreamDefaultController": false, + "ReadableStreamDefaultReader": false, + "registerProcessor": false, + "RelativeOrientationSensor": false, + "RemotePlayback": false, + "removeEventListener": false, + "ReportBody": false, + "reportError": false, + "ReportingObserver": false, + "Request": false, + "requestAnimationFrame": false, + "requestIdleCallback": false, + "resizeBy": false, + "ResizeObserver": false, + "ResizeObserverEntry": false, + "ResizeObserverSize": false, + "resizeTo": false, + "Response": false, + "RestrictionTarget": false, + "RTCCertificate": false, + "RTCDataChannel": false, + "RTCDataChannelEvent": false, + "RTCDtlsTransport": false, + "RTCDTMFSender": false, + "RTCDTMFToneChangeEvent": false, + "RTCEncodedAudioFrame": false, + "RTCEncodedVideoFrame": false, + "RTCError": false, + "RTCErrorEvent": false, + "RTCIceCandidate": false, + "RTCIceTransport": false, + "RTCPeerConnection": false, + "RTCPeerConnectionIceErrorEvent": false, + "RTCPeerConnectionIceEvent": false, + "RTCRtpReceiver": false, + "RTCRtpScriptTransform": false, + "RTCRtpSender": false, + "RTCRtpTransceiver": false, + "RTCSctpTransport": false, + "RTCSessionDescription": false, + "RTCStatsReport": false, + "RTCTrackEvent": false, + "sampleRate": false, + "scheduler": false, + "Scheduler": false, + "Scheduling": false, + "screen": false, + "Screen": false, + "ScreenDetailed": false, + "ScreenDetails": false, + "screenLeft": false, + "ScreenOrientation": false, + "screenTop": false, + "screenX": false, + "screenY": false, + "ScriptProcessorNode": false, + "scroll": false, + "scrollbars": false, + "scrollBy": false, + "ScrollTimeline": false, + "scrollTo": false, + "scrollX": false, + "scrollY": false, + "SecurityPolicyViolationEvent": false, + "Selection": false, + "self": false, + "Sensor": false, + "SensorErrorEvent": false, + "Serial": false, + "SerialPort": false, + "ServiceWorker": false, + "ServiceWorkerContainer": false, + "ServiceWorkerRegistration": false, + "sessionStorage": false, + "setInterval": false, + "setTimeout": false, + "ShadowRoot": false, + "sharedStorage": false, + "SharedStorage": false, + "SharedStorageAppendMethod": false, + "SharedStorageClearMethod": false, + "SharedStorageDeleteMethod": false, + "SharedStorageModifierMethod": false, + "SharedStorageSetMethod": false, + "SharedStorageWorklet": false, + "SharedWorker": false, + "showDirectoryPicker": false, + "showOpenFilePicker": false, + "showSaveFilePicker": false, + "SnapEvent": false, + "SourceBuffer": false, + "SourceBufferList": false, + "SpeechGrammar": false, + "SpeechGrammarList": false, + "SpeechRecognition": false, + "SpeechRecognitionErrorEvent": false, + "SpeechRecognitionEvent": false, + "SpeechRecognitionPhrase": false, + "speechSynthesis": false, + "SpeechSynthesis": false, + "SpeechSynthesisErrorEvent": false, + "SpeechSynthesisEvent": false, + "SpeechSynthesisUtterance": false, + "SpeechSynthesisVoice": false, + "StaticRange": false, + "status": false, + "statusbar": false, + "StereoPannerNode": false, + "stop": false, + "Storage": false, + "StorageBucket": false, + "StorageBucketManager": false, + "StorageEvent": false, + "StorageManager": false, + "structuredClone": false, + "styleMedia": false, + "StylePropertyMap": false, + "StylePropertyMapReadOnly": false, + "StyleSheet": false, + "StyleSheetList": false, + "SubmitEvent": false, + "Subscriber": false, + "SubtleCrypto": false, + "Summarizer": false, + "SuppressedError": false, + "SVGAElement": false, + "SVGAngle": false, + "SVGAnimatedAngle": false, + "SVGAnimatedBoolean": false, + "SVGAnimatedEnumeration": false, + "SVGAnimatedInteger": false, + "SVGAnimatedLength": false, + "SVGAnimatedLengthList": false, + "SVGAnimatedNumber": false, + "SVGAnimatedNumberList": false, + "SVGAnimatedPreserveAspectRatio": false, + "SVGAnimatedRect": false, + "SVGAnimatedString": false, + "SVGAnimatedTransformList": false, + "SVGAnimateElement": false, + "SVGAnimateMotionElement": false, + "SVGAnimateTransformElement": false, + "SVGAnimationElement": false, + "SVGCircleElement": false, + "SVGClipPathElement": false, + "SVGComponentTransferFunctionElement": false, + "SVGDefsElement": false, + "SVGDescElement": false, + "SVGElement": false, + "SVGEllipseElement": false, + "SVGFEBlendElement": false, + "SVGFEColorMatrixElement": false, + "SVGFEComponentTransferElement": false, + "SVGFECompositeElement": false, + "SVGFEConvolveMatrixElement": false, + "SVGFEDiffuseLightingElement": false, + "SVGFEDisplacementMapElement": false, + "SVGFEDistantLightElement": false, + "SVGFEDropShadowElement": false, + "SVGFEFloodElement": false, + "SVGFEFuncAElement": false, + "SVGFEFuncBElement": false, + "SVGFEFuncGElement": false, + "SVGFEFuncRElement": false, + "SVGFEGaussianBlurElement": false, + "SVGFEImageElement": false, + "SVGFEMergeElement": false, + "SVGFEMergeNodeElement": false, + "SVGFEMorphologyElement": false, + "SVGFEOffsetElement": false, + "SVGFEPointLightElement": false, + "SVGFESpecularLightingElement": false, + "SVGFESpotLightElement": false, + "SVGFETileElement": false, + "SVGFETurbulenceElement": false, + "SVGFilterElement": false, + "SVGForeignObjectElement": false, + "SVGGElement": false, + "SVGGeometryElement": false, + "SVGGradientElement": false, + "SVGGraphicsElement": false, + "SVGImageElement": false, + "SVGLength": false, + "SVGLengthList": false, + "SVGLinearGradientElement": false, + "SVGLineElement": false, + "SVGMarkerElement": false, + "SVGMaskElement": false, + "SVGMatrix": false, + "SVGMetadataElement": false, + "SVGMPathElement": false, + "SVGNumber": false, + "SVGNumberList": false, + "SVGPathElement": false, + "SVGPatternElement": false, + "SVGPoint": false, + "SVGPointList": false, + "SVGPolygonElement": false, + "SVGPolylineElement": false, + "SVGPreserveAspectRatio": false, + "SVGRadialGradientElement": false, + "SVGRect": false, + "SVGRectElement": false, + "SVGScriptElement": false, + "SVGSetElement": false, + "SVGStopElement": false, + "SVGStringList": false, + "SVGStyleElement": false, + "SVGSVGElement": false, + "SVGSwitchElement": false, + "SVGSymbolElement": false, + "SVGTextContentElement": false, + "SVGTextElement": false, + "SVGTextPathElement": false, + "SVGTextPositioningElement": false, + "SVGTitleElement": false, + "SVGTransform": false, + "SVGTransformList": false, + "SVGTSpanElement": false, + "SVGUnitTypes": false, + "SVGUseElement": false, + "SVGViewElement": false, + "SyncManager": false, + "TaskAttributionTiming": false, + "TaskController": false, + "TaskPriorityChangeEvent": false, + "TaskSignal": false, + "TEMPORARY": false, + "Text": false, + "TextDecoder": false, + "TextDecoderStream": false, + "TextEncoder": false, + "TextEncoderStream": false, + "TextEvent": false, + "TextFormat": false, + "TextFormatUpdateEvent": false, + "TextMetrics": false, + "TextTrack": false, + "TextTrackCue": false, + "TextTrackCueList": false, + "TextTrackList": false, + "TextUpdateEvent": false, + "TimeEvent": false, + "TimeRanges": false, + "ToggleEvent": false, + "toolbar": false, + "top": false, + "Touch": false, + "TouchEvent": false, + "TouchList": false, + "TrackEvent": false, + "TransformStream": false, + "TransformStreamDefaultController": false, + "TransitionEvent": false, + "Translator": false, + "TreeWalker": false, + "TrustedHTML": false, + "TrustedScript": false, + "TrustedScriptURL": false, + "TrustedTypePolicy": false, + "TrustedTypePolicyFactory": false, + "trustedTypes": false, + "UIEvent": false, + "URL": false, + "URLPattern": false, + "URLSearchParams": false, + "USB": false, + "USBAlternateInterface": false, + "USBConfiguration": false, + "USBConnectionEvent": false, + "USBDevice": false, + "USBEndpoint": false, + "USBInterface": false, + "USBInTransferResult": false, + "USBIsochronousInTransferPacket": false, + "USBIsochronousInTransferResult": false, + "USBIsochronousOutTransferPacket": false, + "USBIsochronousOutTransferResult": false, + "USBOutTransferResult": false, + "UserActivation": false, + "ValidityState": false, + "VideoColorSpace": false, + "VideoDecoder": false, + "VideoEncoder": false, + "VideoFrame": false, + "VideoPlaybackQuality": false, + "viewport": false, + "Viewport": false, + "ViewTimeline": false, + "ViewTransition": false, + "ViewTransitionTypeSet": false, + "VirtualKeyboard": false, + "VirtualKeyboardGeometryChangeEvent": false, + "VisibilityStateEntry": false, + "visualViewport": false, + "VisualViewport": false, + "VTTCue": false, + "VTTRegion": false, + "WakeLock": false, + "WakeLockSentinel": false, + "WaveShaperNode": false, + "WebAssembly": false, + "WebGL2RenderingContext": false, + "WebGLActiveInfo": false, + "WebGLBuffer": false, + "WebGLContextEvent": false, + "WebGLFramebuffer": false, + "WebGLObject": false, + "WebGLProgram": false, + "WebGLQuery": false, + "WebGLRenderbuffer": false, + "WebGLRenderingContext": false, + "WebGLSampler": false, + "WebGLShader": false, + "WebGLShaderPrecisionFormat": false, + "WebGLSync": false, + "WebGLTexture": false, + "WebGLTransformFeedback": false, + "WebGLUniformLocation": false, + "WebGLVertexArrayObject": false, + "WebSocket": false, + "WebSocketError": false, + "WebSocketStream": false, + "WebTransport": false, + "WebTransportBidirectionalStream": false, + "WebTransportDatagramDuplexStream": false, + "WebTransportError": false, + "WebTransportReceiveStream": false, + "WebTransportSendStream": false, + "WGSLLanguageFeatures": false, + "WheelEvent": false, + "when": false, + "window": false, + "Window": false, + "WindowControlsOverlay": false, + "WindowControlsOverlayGeometryChangeEvent": false, + "Worker": false, + "Worklet": false, + "WorkletGlobalScope": false, + "WritableStream": false, + "WritableStreamDefaultController": false, + "WritableStreamDefaultWriter": false, + "XMLDocument": false, + "XMLHttpRequest": false, + "XMLHttpRequestEventTarget": false, + "XMLHttpRequestUpload": false, + "XMLSerializer": false, + "XPathEvaluator": false, + "XPathExpression": false, + "XPathResult": false, + "XRAnchor": false, + "XRAnchorSet": false, + "XRBoundedReferenceSpace": false, + "XRCamera": false, + "XRCPUDepthInformation": false, + "XRDepthInformation": false, + "XRDOMOverlayState": false, + "XRFrame": false, + "XRHand": false, + "XRHitTestResult": false, + "XRHitTestSource": false, + "XRInputSource": false, + "XRInputSourceArray": false, + "XRInputSourceEvent": false, + "XRInputSourcesChangeEvent": false, + "XRJointPose": false, + "XRJointSpace": false, + "XRLayer": false, + "XRLightEstimate": false, + "XRLightProbe": false, + "XRPose": false, + "XRRay": false, + "XRReferenceSpace": false, + "XRReferenceSpaceEvent": false, + "XRRenderState": false, + "XRRigidTransform": false, + "XRSession": false, + "XRSessionEvent": false, + "XRSpace": false, + "XRSystem": false, + "XRTransientInputHitTestResult": false, + "XRTransientInputHitTestSource": false, + "XRView": false, + "XRViewerPose": false, + "XRViewport": false, + "XRWebGLBinding": false, + "XRWebGLDepthInformation": false, + "XRWebGLLayer": false, + "XSLTProcessor": false + } + }, + "errors": [ + { + "messageId": "impliedEval" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-implied-eval > invalid + +```js +global.global.setTimeout(`foo${bar}`) +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "globals": { + "__dirname": false, + "__filename": false, + "AbortController": false, + "AbortSignal": false, + "AsyncDisposableStack": false, + "atob": false, + "Blob": false, + "BroadcastChannel": false, + "btoa": false, + "Buffer": false, + "ByteLengthQueuingStrategy": false, + "clearImmediate": false, + "clearInterval": false, + "clearTimeout": false, + "CloseEvent": false, + "CompressionStream": false, + "console": false, + "CountQueuingStrategy": false, + "crypto": false, + "Crypto": false, + "CryptoKey": false, + "CustomEvent": false, + "DecompressionStream": false, + "DisposableStack": false, + "DOMException": false, + "ErrorEvent": false, + "Event": false, + "EventTarget": false, + "exports": true, + "fetch": false, + "File": false, + "FormData": false, + "global": false, + "Headers": false, + "localStorage": false, + "MessageChannel": false, + "MessageEvent": false, + "MessagePort": false, + "module": false, + "navigator": false, + "Navigator": false, + "performance": false, + "Performance": false, + "PerformanceEntry": false, + "PerformanceMark": false, + "PerformanceMeasure": false, + "PerformanceObserver": false, + "PerformanceObserverEntryList": false, + "PerformanceResourceTiming": false, + "process": false, + "queueMicrotask": false, + "ReadableByteStreamController": false, + "ReadableStream": false, + "ReadableStreamBYOBReader": false, + "ReadableStreamBYOBRequest": false, + "ReadableStreamDefaultController": false, + "ReadableStreamDefaultReader": false, + "Request": false, + "require": false, + "Response": false, + "sessionStorage": false, + "setImmediate": false, + "setInterval": false, + "setTimeout": false, + "Storage": false, + "structuredClone": false, + "SubtleCrypto": false, + "SuppressedError": false, + "TextDecoder": false, + "TextDecoderStream": false, + "TextEncoder": false, + "TextEncoderStream": false, + "TransformStream": false, + "TransformStreamDefaultController": false, + "URL": false, + "URLPattern": false, + "URLSearchParams": false, + "WebAssembly": false, + "WebSocket": false, + "WritableStream": false, + "WritableStreamDefaultController": false, + "WritableStreamDefaultWriter": false + } + }, + "errors": [ + { + "messageId": "impliedEval" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-implied-eval > invalid + +```js +setTimeout('foo' + bar) +``` + +```json +{ + "languageOptions": { + "globals": { + "AbortController": false, + "AbortSignal": false, + "AbsoluteOrientationSensor": false, + "AbstractRange": false, + "Accelerometer": false, + "addEventListener": false, + "ai": false, + "AI": false, + "AICreateMonitor": false, + "AITextSession": false, + "alert": false, + "AnalyserNode": false, + "Animation": false, + "AnimationEffect": false, + "AnimationEvent": false, + "AnimationPlaybackEvent": false, + "AnimationTimeline": false, + "AsyncDisposableStack": false, + "atob": false, + "Attr": false, + "Audio": false, + "AudioBuffer": false, + "AudioBufferSourceNode": false, + "AudioContext": false, + "AudioData": false, + "AudioDecoder": false, + "AudioDestinationNode": false, + "AudioEncoder": false, + "AudioListener": false, + "AudioNode": false, + "AudioParam": false, + "AudioParamMap": false, + "AudioProcessingEvent": false, + "AudioScheduledSourceNode": false, + "AudioSinkInfo": false, + "AudioWorklet": false, + "AudioWorkletGlobalScope": false, + "AudioWorkletNode": false, + "AudioWorkletProcessor": false, + "AuthenticatorAssertionResponse": false, + "AuthenticatorAttestationResponse": false, + "AuthenticatorResponse": false, + "BackgroundFetchManager": false, + "BackgroundFetchRecord": false, + "BackgroundFetchRegistration": false, + "BarcodeDetector": false, + "BarProp": false, + "BaseAudioContext": false, + "BatteryManager": false, + "BeforeUnloadEvent": false, + "BiquadFilterNode": false, + "Blob": false, + "BlobEvent": false, + "Bluetooth": false, + "BluetoothCharacteristicProperties": false, + "BluetoothDevice": false, + "BluetoothRemoteGATTCharacteristic": false, + "BluetoothRemoteGATTDescriptor": false, + "BluetoothRemoteGATTServer": false, + "BluetoothRemoteGATTService": false, + "BluetoothUUID": false, + "blur": false, + "BroadcastChannel": false, + "BrowserCaptureMediaStreamTrack": false, + "btoa": false, + "ByteLengthQueuingStrategy": false, + "Cache": false, + "caches": false, + "CacheStorage": false, + "cancelAnimationFrame": false, + "cancelIdleCallback": false, + "CanvasCaptureMediaStream": false, + "CanvasCaptureMediaStreamTrack": false, + "CanvasGradient": false, + "CanvasPattern": false, + "CanvasRenderingContext2D": false, + "CaptureController": false, + "CaretPosition": false, + "CDATASection": false, + "ChannelMergerNode": false, + "ChannelSplitterNode": false, + "ChapterInformation": false, + "CharacterBoundsUpdateEvent": false, + "CharacterData": false, + "clearInterval": false, + "clearTimeout": false, + "clientInformation": false, + "Clipboard": false, + "ClipboardChangeEvent": false, + "ClipboardEvent": false, + "ClipboardItem": false, + "close": false, + "closed": false, + "CloseEvent": false, + "CloseWatcher": false, + "CommandEvent": false, + "Comment": false, + "CompositionEvent": false, + "CompressionStream": false, + "confirm": false, + "console": false, + "ConstantSourceNode": false, + "ContentVisibilityAutoStateChangeEvent": false, + "ConvolverNode": false, + "CookieChangeEvent": false, + "CookieDeprecationLabel": false, + "cookieStore": false, + "CookieStore": false, + "CookieStoreManager": false, + "CountQueuingStrategy": false, + "createImageBitmap": false, + "CreateMonitor": false, + "Credential": false, + "credentialless": false, + "CredentialsContainer": false, + "CropTarget": false, + "crossOriginIsolated": false, + "crypto": false, + "Crypto": false, + "CryptoKey": false, + "CSPViolationReportBody": false, + "CSS": false, + "CSSAnimation": false, + "CSSConditionRule": false, + "CSSContainerRule": false, + "CSSCounterStyleRule": false, + "CSSFontFaceRule": false, + "CSSFontFeatureValuesRule": false, + "CSSFontPaletteValuesRule": false, + "CSSFunctionDeclarations": false, + "CSSFunctionDescriptors": false, + "CSSFunctionRule": false, + "CSSGroupingRule": false, + "CSSImageValue": false, + "CSSImportRule": false, + "CSSKeyframeRule": false, + "CSSKeyframesRule": false, + "CSSKeywordValue": false, + "CSSLayerBlockRule": false, + "CSSLayerStatementRule": false, + "CSSMarginRule": false, + "CSSMathClamp": false, + "CSSMathInvert": false, + "CSSMathMax": false, + "CSSMathMin": false, + "CSSMathNegate": false, + "CSSMathProduct": false, + "CSSMathSum": false, + "CSSMathValue": false, + "CSSMatrixComponent": false, + "CSSMediaRule": false, + "CSSNamespaceRule": false, + "CSSNestedDeclarations": false, + "CSSNumericArray": false, + "CSSNumericValue": false, + "CSSPageDescriptors": false, + "CSSPageRule": false, + "CSSPerspective": false, + "CSSPositionTryDescriptors": false, + "CSSPositionTryRule": false, + "CSSPositionValue": false, + "CSSPropertyRule": false, + "CSSRotate": false, + "CSSRule": false, + "CSSRuleList": false, + "CSSScale": false, + "CSSScopeRule": false, + "CSSSkew": false, + "CSSSkewX": false, + "CSSSkewY": false, + "CSSStartingStyleRule": false, + "CSSStyleDeclaration": false, + "CSSStyleRule": false, + "CSSStyleSheet": false, + "CSSStyleValue": false, + "CSSSupportsRule": false, + "CSSTransformComponent": false, + "CSSTransformValue": false, + "CSSTransition": false, + "CSSTranslate": false, + "CSSUnitValue": false, + "CSSUnparsedValue": false, + "CSSVariableReferenceValue": false, + "CSSViewTransitionRule": false, + "currentFrame": false, + "currentTime": false, + "CustomElementRegistry": false, + "customElements": false, + "CustomEvent": false, + "CustomStateSet": false, + "DataTransfer": false, + "DataTransferItem": false, + "DataTransferItemList": false, + "DecompressionStream": false, + "DelayNode": false, + "DelegatedInkTrailPresenter": false, + "DeviceMotionEvent": false, + "DeviceMotionEventAcceleration": false, + "DeviceMotionEventRotationRate": false, + "DeviceOrientationEvent": false, + "devicePixelRatio": false, + "DevicePosture": false, + "DigitalCredential": false, + "dispatchEvent": false, + "DisposableStack": false, + "document": false, + "Document": false, + "DocumentFragment": false, + "documentPictureInPicture": false, + "DocumentPictureInPicture": false, + "DocumentPictureInPictureEvent": false, + "DocumentTimeline": false, + "DocumentType": false, + "DOMError": false, + "DOMException": false, + "DOMImplementation": false, + "DOMMatrix": false, + "DOMMatrixReadOnly": false, + "DOMParser": false, + "DOMPoint": false, + "DOMPointReadOnly": false, + "DOMQuad": false, + "DOMRect": false, + "DOMRectList": false, + "DOMRectReadOnly": false, + "DOMStringList": false, + "DOMStringMap": false, + "DOMTokenList": false, + "DragEvent": false, + "DynamicsCompressorNode": false, + "EditContext": false, + "Element": false, + "ElementInternals": false, + "EncodedAudioChunk": false, + "EncodedVideoChunk": false, + "ErrorEvent": false, + "event": false, + "Event": false, + "EventCounts": false, + "EventSource": false, + "EventTarget": false, + "external": false, + "External": false, + "EyeDropper": false, + "FeaturePolicy": false, + "FederatedCredential": false, + "fence": false, + "Fence": false, + "FencedFrameConfig": false, + "fetch": false, + "fetchLater": false, + "FetchLaterResult": false, + "File": false, + "FileList": false, + "FileReader": false, + "FileSystem": false, + "FileSystemDirectoryEntry": false, + "FileSystemDirectoryHandle": false, + "FileSystemDirectoryReader": false, + "FileSystemEntry": false, + "FileSystemFileEntry": false, + "FileSystemFileHandle": false, + "FileSystemHandle": false, + "FileSystemObserver": false, + "FileSystemWritableFileStream": false, + "find": false, + "focus": false, + "FocusEvent": false, + "FontData": false, + "FontFace": false, + "FontFaceSet": false, + "FontFaceSetLoadEvent": false, + "FormData": false, + "FormDataEvent": false, + "FragmentDirective": false, + "frameElement": false, + "frames": false, + "GainNode": false, + "Gamepad": false, + "GamepadAxisMoveEvent": false, + "GamepadButton": false, + "GamepadButtonEvent": false, + "GamepadEvent": false, + "GamepadHapticActuator": false, + "GamepadPose": false, + "Geolocation": false, + "GeolocationCoordinates": false, + "GeolocationPosition": false, + "GeolocationPositionError": false, + "getComputedStyle": false, + "getScreenDetails": false, + "getSelection": false, + "GPU": false, + "GPUAdapter": false, + "GPUAdapterInfo": false, + "GPUBindGroup": false, + "GPUBindGroupLayout": false, + "GPUBuffer": false, + "GPUBufferUsage": false, + "GPUCanvasContext": false, + "GPUColorWrite": false, + "GPUCommandBuffer": false, + "GPUCommandEncoder": false, + "GPUCompilationInfo": false, + "GPUCompilationMessage": false, + "GPUComputePassEncoder": false, + "GPUComputePipeline": false, + "GPUDevice": false, + "GPUDeviceLostInfo": false, + "GPUError": false, + "GPUExternalTexture": false, + "GPUInternalError": false, + "GPUMapMode": false, + "GPUOutOfMemoryError": false, + "GPUPipelineError": false, + "GPUPipelineLayout": false, + "GPUQuerySet": false, + "GPUQueue": false, + "GPURenderBundle": false, + "GPURenderBundleEncoder": false, + "GPURenderPassEncoder": false, + "GPURenderPipeline": false, + "GPUSampler": false, + "GPUShaderModule": false, + "GPUShaderStage": false, + "GPUSupportedFeatures": false, + "GPUSupportedLimits": false, + "GPUTexture": false, + "GPUTextureUsage": false, + "GPUTextureView": false, + "GPUUncapturedErrorEvent": false, + "GPUValidationError": false, + "GravitySensor": false, + "Gyroscope": false, + "HashChangeEvent": false, + "Headers": false, + "HID": false, + "HIDConnectionEvent": false, + "HIDDevice": false, + "HIDInputReportEvent": false, + "Highlight": false, + "HighlightRegistry": false, + "history": false, + "History": false, + "HTMLAllCollection": false, + "HTMLAnchorElement": false, + "HTMLAreaElement": false, + "HTMLAudioElement": false, + "HTMLBaseElement": false, + "HTMLBodyElement": false, + "HTMLBRElement": false, + "HTMLButtonElement": false, + "HTMLCanvasElement": false, + "HTMLCollection": false, + "HTMLDataElement": false, + "HTMLDataListElement": false, + "HTMLDetailsElement": false, + "HTMLDialogElement": false, + "HTMLDirectoryElement": false, + "HTMLDivElement": false, + "HTMLDListElement": false, + "HTMLDocument": false, + "HTMLElement": false, + "HTMLEmbedElement": false, + "HTMLFencedFrameElement": false, + "HTMLFieldSetElement": false, + "HTMLFontElement": false, + "HTMLFormControlsCollection": false, + "HTMLFormElement": false, + "HTMLFrameElement": false, + "HTMLFrameSetElement": false, + "HTMLHeadElement": false, + "HTMLHeadingElement": false, + "HTMLHRElement": false, + "HTMLHtmlElement": false, + "HTMLIFrameElement": false, + "HTMLImageElement": false, + "HTMLInputElement": false, + "HTMLLabelElement": false, + "HTMLLegendElement": false, + "HTMLLIElement": false, + "HTMLLinkElement": false, + "HTMLMapElement": false, + "HTMLMarqueeElement": false, + "HTMLMediaElement": false, + "HTMLMenuElement": false, + "HTMLMetaElement": false, + "HTMLMeterElement": false, + "HTMLModElement": false, + "HTMLObjectElement": false, + "HTMLOListElement": false, + "HTMLOptGroupElement": false, + "HTMLOptionElement": false, + "HTMLOptionsCollection": false, + "HTMLOutputElement": false, + "HTMLParagraphElement": false, + "HTMLParamElement": false, + "HTMLPictureElement": false, + "HTMLPreElement": false, + "HTMLProgressElement": false, + "HTMLQuoteElement": false, + "HTMLScriptElement": false, + "HTMLSelectedContentElement": false, + "HTMLSelectElement": false, + "HTMLSlotElement": false, + "HTMLSourceElement": false, + "HTMLSpanElement": false, + "HTMLStyleElement": false, + "HTMLTableCaptionElement": false, + "HTMLTableCellElement": false, + "HTMLTableColElement": false, + "HTMLTableElement": false, + "HTMLTableRowElement": false, + "HTMLTableSectionElement": false, + "HTMLTemplateElement": false, + "HTMLTextAreaElement": false, + "HTMLTimeElement": false, + "HTMLTitleElement": false, + "HTMLTrackElement": false, + "HTMLUListElement": false, + "HTMLUnknownElement": false, + "HTMLVideoElement": false, + "IDBCursor": false, + "IDBCursorWithValue": false, + "IDBDatabase": false, + "IDBFactory": false, + "IDBIndex": false, + "IDBKeyRange": false, + "IDBObjectStore": false, + "IDBOpenDBRequest": false, + "IDBRecord": false, + "IDBRequest": false, + "IDBTransaction": false, + "IDBVersionChangeEvent": false, + "IdentityCredential": false, + "IdentityCredentialError": false, + "IdentityProvider": false, + "IdleDeadline": false, + "IdleDetector": false, + "IIRFilterNode": false, + "Image": false, + "ImageBitmap": false, + "ImageBitmapRenderingContext": false, + "ImageCapture": false, + "ImageData": false, + "ImageDecoder": false, + "ImageTrack": false, + "ImageTrackList": false, + "indexedDB": false, + "Ink": false, + "innerHeight": false, + "innerWidth": false, + "InputDeviceCapabilities": false, + "InputDeviceInfo": false, + "InputEvent": false, + "IntegrityViolationReportBody": false, + "InterestEvent": false, + "IntersectionObserver": false, + "IntersectionObserverEntry": false, + "isSecureContext": false, + "Keyboard": false, + "KeyboardEvent": false, + "KeyboardLayoutMap": false, + "KeyframeEffect": false, + "LanguageDetector": false, + "LargestContentfulPaint": false, + "LaunchParams": false, + "launchQueue": false, + "LaunchQueue": false, + "LayoutShift": false, + "LayoutShiftAttribution": false, + "length": false, + "LinearAccelerationSensor": false, + "localStorage": false, + "location": true, + "Location": false, + "locationbar": false, + "Lock": false, + "LockManager": false, + "matchMedia": false, + "MathMLElement": false, + "MediaCapabilities": false, + "MediaCapabilitiesInfo": false, + "MediaDeviceInfo": false, + "MediaDevices": false, + "MediaElementAudioSourceNode": false, + "MediaEncryptedEvent": false, + "MediaError": false, + "MediaKeyError": false, + "MediaKeyMessageEvent": false, + "MediaKeys": false, + "MediaKeySession": false, + "MediaKeyStatusMap": false, + "MediaKeySystemAccess": false, + "MediaList": false, + "MediaMetadata": false, + "MediaQueryList": false, + "MediaQueryListEvent": false, + "MediaRecorder": false, + "MediaRecorderErrorEvent": false, + "MediaSession": false, + "MediaSource": false, + "MediaSourceHandle": false, + "MediaStream": false, + "MediaStreamAudioDestinationNode": false, + "MediaStreamAudioSourceNode": false, + "MediaStreamEvent": false, + "MediaStreamTrack": false, + "MediaStreamTrackAudioSourceNode": false, + "MediaStreamTrackAudioStats": false, + "MediaStreamTrackEvent": false, + "MediaStreamTrackGenerator": false, + "MediaStreamTrackProcessor": false, + "MediaStreamTrackVideoStats": false, + "menubar": false, + "MessageChannel": false, + "MessageEvent": false, + "MessagePort": false, + "MIDIAccess": false, + "MIDIConnectionEvent": false, + "MIDIInput": false, + "MIDIInputMap": false, + "MIDIMessageEvent": false, + "MIDIOutput": false, + "MIDIOutputMap": false, + "MIDIPort": false, + "MimeType": false, + "MimeTypeArray": false, + "model": false, + "ModelGenericSession": false, + "ModelManager": false, + "MouseEvent": false, + "moveBy": false, + "moveTo": false, + "MutationEvent": false, + "MutationObserver": false, + "MutationRecord": false, + "name": false, + "NamedNodeMap": false, + "NavigateEvent": false, + "navigation": false, + "Navigation": false, + "NavigationActivation": false, + "NavigationCurrentEntryChangeEvent": false, + "NavigationDestination": false, + "NavigationHistoryEntry": false, + "NavigationPrecommitController": false, + "NavigationPreloadManager": false, + "NavigationTransition": false, + "navigator": false, + "Navigator": false, + "NavigatorLogin": false, + "NavigatorManagedData": false, + "NavigatorUAData": false, + "NetworkInformation": false, + "Node": false, + "NodeFilter": false, + "NodeIterator": false, + "NodeList": false, + "Notification": false, + "NotifyPaintEvent": false, + "NotRestoredReasonDetails": false, + "NotRestoredReasons": false, + "Observable": false, + "OfflineAudioCompletionEvent": false, + "OfflineAudioContext": false, + "offscreenBuffering": false, + "OffscreenCanvas": false, + "OffscreenCanvasRenderingContext2D": false, + "onabort": true, + "onafterprint": true, + "onanimationcancel": true, + "onanimationend": true, + "onanimationiteration": true, + "onanimationstart": true, + "onappinstalled": true, + "onauxclick": true, + "onbeforeinput": true, + "onbeforeinstallprompt": true, + "onbeforematch": true, + "onbeforeprint": true, + "onbeforetoggle": true, + "onbeforeunload": true, + "onbeforexrselect": true, + "onblur": true, + "oncancel": true, + "oncanplay": true, + "oncanplaythrough": true, + "onchange": true, + "onclick": true, + "onclose": true, + "oncommand": true, + "oncontentvisibilityautostatechange": true, + "oncontextlost": true, + "oncontextmenu": true, + "oncontextrestored": true, + "oncopy": true, + "oncuechange": true, + "oncut": true, + "ondblclick": true, + "ondevicemotion": true, + "ondeviceorientation": true, + "ondeviceorientationabsolute": true, + "ondrag": true, + "ondragend": true, + "ondragenter": true, + "ondragleave": true, + "ondragover": true, + "ondragstart": true, + "ondrop": true, + "ondurationchange": true, + "onemptied": true, + "onended": true, + "onerror": true, + "onfocus": true, + "onformdata": true, + "ongamepadconnected": true, + "ongamepaddisconnected": true, + "ongotpointercapture": true, + "onhashchange": true, + "oninput": true, + "oninvalid": true, + "onkeydown": true, + "onkeypress": true, + "onkeyup": true, + "onlanguagechange": true, + "onload": true, + "onloadeddata": true, + "onloadedmetadata": true, + "onloadstart": true, + "onlostpointercapture": true, + "onmessage": true, + "onmessageerror": true, + "onmousedown": true, + "onmouseenter": true, + "onmouseleave": true, + "onmousemove": true, + "onmouseout": true, + "onmouseover": true, + "onmouseup": true, + "onmousewheel": true, + "onoffline": true, + "ononline": true, + "onpagehide": true, + "onpagereveal": true, + "onpageshow": true, + "onpageswap": true, + "onpaste": true, + "onpause": true, + "onplay": true, + "onplaying": true, + "onpointercancel": true, + "onpointerdown": true, + "onpointerenter": true, + "onpointerleave": true, + "onpointermove": true, + "onpointerout": true, + "onpointerover": true, + "onpointerrawupdate": true, + "onpointerup": true, + "onpopstate": true, + "onprogress": true, + "onratechange": true, + "onrejectionhandled": true, + "onreset": true, + "onresize": true, + "onscroll": true, + "onscrollend": true, + "onscrollsnapchange": true, + "onscrollsnapchanging": true, + "onsearch": true, + "onsecuritypolicyviolation": true, + "onseeked": true, + "onseeking": true, + "onselect": true, + "onselectionchange": true, + "onselectstart": true, + "onslotchange": true, + "onstalled": true, + "onstorage": true, + "onsubmit": true, + "onsuspend": true, + "ontimeupdate": true, + "ontoggle": true, + "ontransitioncancel": true, + "ontransitionend": true, + "ontransitionrun": true, + "ontransitionstart": true, + "onunhandledrejection": true, + "onunload": true, + "onvolumechange": true, + "onwaiting": true, + "onwheel": true, + "open": false, + "opener": false, + "Option": false, + "OrientationSensor": false, + "origin": false, + "originAgentCluster": false, + "OscillatorNode": false, + "OTPCredential": false, + "outerHeight": false, + "outerWidth": false, + "OverconstrainedError": false, + "PageRevealEvent": false, + "PageSwapEvent": false, + "PageTransitionEvent": false, + "pageXOffset": false, + "pageYOffset": false, + "PannerNode": false, + "parent": false, + "PasswordCredential": false, + "Path2D": false, + "PaymentAddress": false, + "PaymentManager": false, + "PaymentMethodChangeEvent": false, + "PaymentRequest": false, + "PaymentRequestUpdateEvent": false, + "PaymentResponse": false, + "performance": false, + "Performance": false, + "PerformanceElementTiming": false, + "PerformanceEntry": false, + "PerformanceEventTiming": false, + "PerformanceLongAnimationFrameTiming": false, + "PerformanceLongTaskTiming": false, + "PerformanceMark": false, + "PerformanceMeasure": false, + "PerformanceNavigation": false, + "PerformanceNavigationTiming": false, + "PerformanceObserver": false, + "PerformanceObserverEntryList": false, + "PerformancePaintTiming": false, + "PerformanceResourceTiming": false, + "PerformanceScriptTiming": false, + "PerformanceServerTiming": false, + "PerformanceTiming": false, + "PeriodicSyncManager": false, + "PeriodicWave": false, + "Permissions": false, + "PermissionStatus": false, + "PERSISTENT": false, + "personalbar": false, + "PictureInPictureEvent": false, + "PictureInPictureWindow": false, + "Plugin": false, + "PluginArray": false, + "PointerEvent": false, + "PopStateEvent": false, + "postMessage": false, + "Presentation": false, + "PresentationAvailability": false, + "PresentationConnection": false, + "PresentationConnectionAvailableEvent": false, + "PresentationConnectionCloseEvent": false, + "PresentationConnectionList": false, + "PresentationReceiver": false, + "PresentationRequest": false, + "PressureObserver": false, + "PressureRecord": false, + "print": false, + "ProcessingInstruction": false, + "Profiler": false, + "ProgressEvent": false, + "PromiseRejectionEvent": false, + "prompt": false, + "ProtectedAudience": false, + "PublicKeyCredential": false, + "PushManager": false, + "PushSubscription": false, + "PushSubscriptionOptions": false, + "queryLocalFonts": false, + "queueMicrotask": false, + "QuotaExceededError": false, + "RadioNodeList": false, + "Range": false, + "ReadableByteStreamController": false, + "ReadableStream": false, + "ReadableStreamBYOBReader": false, + "ReadableStreamBYOBRequest": false, + "ReadableStreamDefaultController": false, + "ReadableStreamDefaultReader": false, + "registerProcessor": false, + "RelativeOrientationSensor": false, + "RemotePlayback": false, + "removeEventListener": false, + "ReportBody": false, + "reportError": false, + "ReportingObserver": false, + "Request": false, + "requestAnimationFrame": false, + "requestIdleCallback": false, + "resizeBy": false, + "ResizeObserver": false, + "ResizeObserverEntry": false, + "ResizeObserverSize": false, + "resizeTo": false, + "Response": false, + "RestrictionTarget": false, + "RTCCertificate": false, + "RTCDataChannel": false, + "RTCDataChannelEvent": false, + "RTCDtlsTransport": false, + "RTCDTMFSender": false, + "RTCDTMFToneChangeEvent": false, + "RTCEncodedAudioFrame": false, + "RTCEncodedVideoFrame": false, + "RTCError": false, + "RTCErrorEvent": false, + "RTCIceCandidate": false, + "RTCIceTransport": false, + "RTCPeerConnection": false, + "RTCPeerConnectionIceErrorEvent": false, + "RTCPeerConnectionIceEvent": false, + "RTCRtpReceiver": false, + "RTCRtpScriptTransform": false, + "RTCRtpSender": false, + "RTCRtpTransceiver": false, + "RTCSctpTransport": false, + "RTCSessionDescription": false, + "RTCStatsReport": false, + "RTCTrackEvent": false, + "sampleRate": false, + "scheduler": false, + "Scheduler": false, + "Scheduling": false, + "screen": false, + "Screen": false, + "ScreenDetailed": false, + "ScreenDetails": false, + "screenLeft": false, + "ScreenOrientation": false, + "screenTop": false, + "screenX": false, + "screenY": false, + "ScriptProcessorNode": false, + "scroll": false, + "scrollbars": false, + "scrollBy": false, + "ScrollTimeline": false, + "scrollTo": false, + "scrollX": false, + "scrollY": false, + "SecurityPolicyViolationEvent": false, + "Selection": false, + "self": false, + "Sensor": false, + "SensorErrorEvent": false, + "Serial": false, + "SerialPort": false, + "ServiceWorker": false, + "ServiceWorkerContainer": false, + "ServiceWorkerRegistration": false, + "sessionStorage": false, + "setInterval": false, + "setTimeout": false, + "ShadowRoot": false, + "sharedStorage": false, + "SharedStorage": false, + "SharedStorageAppendMethod": false, + "SharedStorageClearMethod": false, + "SharedStorageDeleteMethod": false, + "SharedStorageModifierMethod": false, + "SharedStorageSetMethod": false, + "SharedStorageWorklet": false, + "SharedWorker": false, + "showDirectoryPicker": false, + "showOpenFilePicker": false, + "showSaveFilePicker": false, + "SnapEvent": false, + "SourceBuffer": false, + "SourceBufferList": false, + "SpeechGrammar": false, + "SpeechGrammarList": false, + "SpeechRecognition": false, + "SpeechRecognitionErrorEvent": false, + "SpeechRecognitionEvent": false, + "SpeechRecognitionPhrase": false, + "speechSynthesis": false, + "SpeechSynthesis": false, + "SpeechSynthesisErrorEvent": false, + "SpeechSynthesisEvent": false, + "SpeechSynthesisUtterance": false, + "SpeechSynthesisVoice": false, + "StaticRange": false, + "status": false, + "statusbar": false, + "StereoPannerNode": false, + "stop": false, + "Storage": false, + "StorageBucket": false, + "StorageBucketManager": false, + "StorageEvent": false, + "StorageManager": false, + "structuredClone": false, + "styleMedia": false, + "StylePropertyMap": false, + "StylePropertyMapReadOnly": false, + "StyleSheet": false, + "StyleSheetList": false, + "SubmitEvent": false, + "Subscriber": false, + "SubtleCrypto": false, + "Summarizer": false, + "SuppressedError": false, + "SVGAElement": false, + "SVGAngle": false, + "SVGAnimatedAngle": false, + "SVGAnimatedBoolean": false, + "SVGAnimatedEnumeration": false, + "SVGAnimatedInteger": false, + "SVGAnimatedLength": false, + "SVGAnimatedLengthList": false, + "SVGAnimatedNumber": false, + "SVGAnimatedNumberList": false, + "SVGAnimatedPreserveAspectRatio": false, + "SVGAnimatedRect": false, + "SVGAnimatedString": false, + "SVGAnimatedTransformList": false, + "SVGAnimateElement": false, + "SVGAnimateMotionElement": false, + "SVGAnimateTransformElement": false, + "SVGAnimationElement": false, + "SVGCircleElement": false, + "SVGClipPathElement": false, + "SVGComponentTransferFunctionElement": false, + "SVGDefsElement": false, + "SVGDescElement": false, + "SVGElement": false, + "SVGEllipseElement": false, + "SVGFEBlendElement": false, + "SVGFEColorMatrixElement": false, + "SVGFEComponentTransferElement": false, + "SVGFECompositeElement": false, + "SVGFEConvolveMatrixElement": false, + "SVGFEDiffuseLightingElement": false, + "SVGFEDisplacementMapElement": false, + "SVGFEDistantLightElement": false, + "SVGFEDropShadowElement": false, + "SVGFEFloodElement": false, + "SVGFEFuncAElement": false, + "SVGFEFuncBElement": false, + "SVGFEFuncGElement": false, + "SVGFEFuncRElement": false, + "SVGFEGaussianBlurElement": false, + "SVGFEImageElement": false, + "SVGFEMergeElement": false, + "SVGFEMergeNodeElement": false, + "SVGFEMorphologyElement": false, + "SVGFEOffsetElement": false, + "SVGFEPointLightElement": false, + "SVGFESpecularLightingElement": false, + "SVGFESpotLightElement": false, + "SVGFETileElement": false, + "SVGFETurbulenceElement": false, + "SVGFilterElement": false, + "SVGForeignObjectElement": false, + "SVGGElement": false, + "SVGGeometryElement": false, + "SVGGradientElement": false, + "SVGGraphicsElement": false, + "SVGImageElement": false, + "SVGLength": false, + "SVGLengthList": false, + "SVGLinearGradientElement": false, + "SVGLineElement": false, + "SVGMarkerElement": false, + "SVGMaskElement": false, + "SVGMatrix": false, + "SVGMetadataElement": false, + "SVGMPathElement": false, + "SVGNumber": false, + "SVGNumberList": false, + "SVGPathElement": false, + "SVGPatternElement": false, + "SVGPoint": false, + "SVGPointList": false, + "SVGPolygonElement": false, + "SVGPolylineElement": false, + "SVGPreserveAspectRatio": false, + "SVGRadialGradientElement": false, + "SVGRect": false, + "SVGRectElement": false, + "SVGScriptElement": false, + "SVGSetElement": false, + "SVGStopElement": false, + "SVGStringList": false, + "SVGStyleElement": false, + "SVGSVGElement": false, + "SVGSwitchElement": false, + "SVGSymbolElement": false, + "SVGTextContentElement": false, + "SVGTextElement": false, + "SVGTextPathElement": false, + "SVGTextPositioningElement": false, + "SVGTitleElement": false, + "SVGTransform": false, + "SVGTransformList": false, + "SVGTSpanElement": false, + "SVGUnitTypes": false, + "SVGUseElement": false, + "SVGViewElement": false, + "SyncManager": false, + "TaskAttributionTiming": false, + "TaskController": false, + "TaskPriorityChangeEvent": false, + "TaskSignal": false, + "TEMPORARY": false, + "Text": false, + "TextDecoder": false, + "TextDecoderStream": false, + "TextEncoder": false, + "TextEncoderStream": false, + "TextEvent": false, + "TextFormat": false, + "TextFormatUpdateEvent": false, + "TextMetrics": false, + "TextTrack": false, + "TextTrackCue": false, + "TextTrackCueList": false, + "TextTrackList": false, + "TextUpdateEvent": false, + "TimeEvent": false, + "TimeRanges": false, + "ToggleEvent": false, + "toolbar": false, + "top": false, + "Touch": false, + "TouchEvent": false, + "TouchList": false, + "TrackEvent": false, + "TransformStream": false, + "TransformStreamDefaultController": false, + "TransitionEvent": false, + "Translator": false, + "TreeWalker": false, + "TrustedHTML": false, + "TrustedScript": false, + "TrustedScriptURL": false, + "TrustedTypePolicy": false, + "TrustedTypePolicyFactory": false, + "trustedTypes": false, + "UIEvent": false, + "URL": false, + "URLPattern": false, + "URLSearchParams": false, + "USB": false, + "USBAlternateInterface": false, + "USBConfiguration": false, + "USBConnectionEvent": false, + "USBDevice": false, + "USBEndpoint": false, + "USBInterface": false, + "USBInTransferResult": false, + "USBIsochronousInTransferPacket": false, + "USBIsochronousInTransferResult": false, + "USBIsochronousOutTransferPacket": false, + "USBIsochronousOutTransferResult": false, + "USBOutTransferResult": false, + "UserActivation": false, + "ValidityState": false, + "VideoColorSpace": false, + "VideoDecoder": false, + "VideoEncoder": false, + "VideoFrame": false, + "VideoPlaybackQuality": false, + "viewport": false, + "Viewport": false, + "ViewTimeline": false, + "ViewTransition": false, + "ViewTransitionTypeSet": false, + "VirtualKeyboard": false, + "VirtualKeyboardGeometryChangeEvent": false, + "VisibilityStateEntry": false, + "visualViewport": false, + "VisualViewport": false, + "VTTCue": false, + "VTTRegion": false, + "WakeLock": false, + "WakeLockSentinel": false, + "WaveShaperNode": false, + "WebAssembly": false, + "WebGL2RenderingContext": false, + "WebGLActiveInfo": false, + "WebGLBuffer": false, + "WebGLContextEvent": false, + "WebGLFramebuffer": false, + "WebGLObject": false, + "WebGLProgram": false, + "WebGLQuery": false, + "WebGLRenderbuffer": false, + "WebGLRenderingContext": false, + "WebGLSampler": false, + "WebGLShader": false, + "WebGLShaderPrecisionFormat": false, + "WebGLSync": false, + "WebGLTexture": false, + "WebGLTransformFeedback": false, + "WebGLUniformLocation": false, + "WebGLVertexArrayObject": false, + "WebSocket": false, + "WebSocketError": false, + "WebSocketStream": false, + "WebTransport": false, + "WebTransportBidirectionalStream": false, + "WebTransportDatagramDuplexStream": false, + "WebTransportError": false, + "WebTransportReceiveStream": false, + "WebTransportSendStream": false, + "WGSLLanguageFeatures": false, + "WheelEvent": false, + "when": false, + "window": false, + "Window": false, + "WindowControlsOverlay": false, + "WindowControlsOverlayGeometryChangeEvent": false, + "Worker": false, + "Worklet": false, + "WorkletGlobalScope": false, + "WritableStream": false, + "WritableStreamDefaultController": false, + "WritableStreamDefaultWriter": false, + "XMLDocument": false, + "XMLHttpRequest": false, + "XMLHttpRequestEventTarget": false, + "XMLHttpRequestUpload": false, + "XMLSerializer": false, + "XPathEvaluator": false, + "XPathExpression": false, + "XPathResult": false, + "XRAnchor": false, + "XRAnchorSet": false, + "XRBoundedReferenceSpace": false, + "XRCamera": false, + "XRCPUDepthInformation": false, + "XRDepthInformation": false, + "XRDOMOverlayState": false, + "XRFrame": false, + "XRHand": false, + "XRHitTestResult": false, + "XRHitTestSource": false, + "XRInputSource": false, + "XRInputSourceArray": false, + "XRInputSourceEvent": false, + "XRInputSourcesChangeEvent": false, + "XRJointPose": false, + "XRJointSpace": false, + "XRLayer": false, + "XRLightEstimate": false, + "XRLightProbe": false, + "XRPose": false, + "XRRay": false, + "XRReferenceSpace": false, + "XRReferenceSpaceEvent": false, + "XRRenderState": false, + "XRRigidTransform": false, + "XRSession": false, + "XRSessionEvent": false, + "XRSpace": false, + "XRSystem": false, + "XRTransientInputHitTestResult": false, + "XRTransientInputHitTestSource": false, + "XRView": false, + "XRViewerPose": false, + "XRViewport": false, + "XRWebGLBinding": false, + "XRWebGLDepthInformation": false, + "XRWebGLLayer": false, + "XSLTProcessor": false + } + }, + "errors": [ + { + "messageId": "impliedEval" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-implied-eval > invalid + +```js +setTimeout(foo + 'bar') +``` + +```json +{ + "languageOptions": { + "globals": { + "AbortController": false, + "AbortSignal": false, + "AbsoluteOrientationSensor": false, + "AbstractRange": false, + "Accelerometer": false, + "addEventListener": false, + "ai": false, + "AI": false, + "AICreateMonitor": false, + "AITextSession": false, + "alert": false, + "AnalyserNode": false, + "Animation": false, + "AnimationEffect": false, + "AnimationEvent": false, + "AnimationPlaybackEvent": false, + "AnimationTimeline": false, + "AsyncDisposableStack": false, + "atob": false, + "Attr": false, + "Audio": false, + "AudioBuffer": false, + "AudioBufferSourceNode": false, + "AudioContext": false, + "AudioData": false, + "AudioDecoder": false, + "AudioDestinationNode": false, + "AudioEncoder": false, + "AudioListener": false, + "AudioNode": false, + "AudioParam": false, + "AudioParamMap": false, + "AudioProcessingEvent": false, + "AudioScheduledSourceNode": false, + "AudioSinkInfo": false, + "AudioWorklet": false, + "AudioWorkletGlobalScope": false, + "AudioWorkletNode": false, + "AudioWorkletProcessor": false, + "AuthenticatorAssertionResponse": false, + "AuthenticatorAttestationResponse": false, + "AuthenticatorResponse": false, + "BackgroundFetchManager": false, + "BackgroundFetchRecord": false, + "BackgroundFetchRegistration": false, + "BarcodeDetector": false, + "BarProp": false, + "BaseAudioContext": false, + "BatteryManager": false, + "BeforeUnloadEvent": false, + "BiquadFilterNode": false, + "Blob": false, + "BlobEvent": false, + "Bluetooth": false, + "BluetoothCharacteristicProperties": false, + "BluetoothDevice": false, + "BluetoothRemoteGATTCharacteristic": false, + "BluetoothRemoteGATTDescriptor": false, + "BluetoothRemoteGATTServer": false, + "BluetoothRemoteGATTService": false, + "BluetoothUUID": false, + "blur": false, + "BroadcastChannel": false, + "BrowserCaptureMediaStreamTrack": false, + "btoa": false, + "ByteLengthQueuingStrategy": false, + "Cache": false, + "caches": false, + "CacheStorage": false, + "cancelAnimationFrame": false, + "cancelIdleCallback": false, + "CanvasCaptureMediaStream": false, + "CanvasCaptureMediaStreamTrack": false, + "CanvasGradient": false, + "CanvasPattern": false, + "CanvasRenderingContext2D": false, + "CaptureController": false, + "CaretPosition": false, + "CDATASection": false, + "ChannelMergerNode": false, + "ChannelSplitterNode": false, + "ChapterInformation": false, + "CharacterBoundsUpdateEvent": false, + "CharacterData": false, + "clearInterval": false, + "clearTimeout": false, + "clientInformation": false, + "Clipboard": false, + "ClipboardChangeEvent": false, + "ClipboardEvent": false, + "ClipboardItem": false, + "close": false, + "closed": false, + "CloseEvent": false, + "CloseWatcher": false, + "CommandEvent": false, + "Comment": false, + "CompositionEvent": false, + "CompressionStream": false, + "confirm": false, + "console": false, + "ConstantSourceNode": false, + "ContentVisibilityAutoStateChangeEvent": false, + "ConvolverNode": false, + "CookieChangeEvent": false, + "CookieDeprecationLabel": false, + "cookieStore": false, + "CookieStore": false, + "CookieStoreManager": false, + "CountQueuingStrategy": false, + "createImageBitmap": false, + "CreateMonitor": false, + "Credential": false, + "credentialless": false, + "CredentialsContainer": false, + "CropTarget": false, + "crossOriginIsolated": false, + "crypto": false, + "Crypto": false, + "CryptoKey": false, + "CSPViolationReportBody": false, + "CSS": false, + "CSSAnimation": false, + "CSSConditionRule": false, + "CSSContainerRule": false, + "CSSCounterStyleRule": false, + "CSSFontFaceRule": false, + "CSSFontFeatureValuesRule": false, + "CSSFontPaletteValuesRule": false, + "CSSFunctionDeclarations": false, + "CSSFunctionDescriptors": false, + "CSSFunctionRule": false, + "CSSGroupingRule": false, + "CSSImageValue": false, + "CSSImportRule": false, + "CSSKeyframeRule": false, + "CSSKeyframesRule": false, + "CSSKeywordValue": false, + "CSSLayerBlockRule": false, + "CSSLayerStatementRule": false, + "CSSMarginRule": false, + "CSSMathClamp": false, + "CSSMathInvert": false, + "CSSMathMax": false, + "CSSMathMin": false, + "CSSMathNegate": false, + "CSSMathProduct": false, + "CSSMathSum": false, + "CSSMathValue": false, + "CSSMatrixComponent": false, + "CSSMediaRule": false, + "CSSNamespaceRule": false, + "CSSNestedDeclarations": false, + "CSSNumericArray": false, + "CSSNumericValue": false, + "CSSPageDescriptors": false, + "CSSPageRule": false, + "CSSPerspective": false, + "CSSPositionTryDescriptors": false, + "CSSPositionTryRule": false, + "CSSPositionValue": false, + "CSSPropertyRule": false, + "CSSRotate": false, + "CSSRule": false, + "CSSRuleList": false, + "CSSScale": false, + "CSSScopeRule": false, + "CSSSkew": false, + "CSSSkewX": false, + "CSSSkewY": false, + "CSSStartingStyleRule": false, + "CSSStyleDeclaration": false, + "CSSStyleRule": false, + "CSSStyleSheet": false, + "CSSStyleValue": false, + "CSSSupportsRule": false, + "CSSTransformComponent": false, + "CSSTransformValue": false, + "CSSTransition": false, + "CSSTranslate": false, + "CSSUnitValue": false, + "CSSUnparsedValue": false, + "CSSVariableReferenceValue": false, + "CSSViewTransitionRule": false, + "currentFrame": false, + "currentTime": false, + "CustomElementRegistry": false, + "customElements": false, + "CustomEvent": false, + "CustomStateSet": false, + "DataTransfer": false, + "DataTransferItem": false, + "DataTransferItemList": false, + "DecompressionStream": false, + "DelayNode": false, + "DelegatedInkTrailPresenter": false, + "DeviceMotionEvent": false, + "DeviceMotionEventAcceleration": false, + "DeviceMotionEventRotationRate": false, + "DeviceOrientationEvent": false, + "devicePixelRatio": false, + "DevicePosture": false, + "DigitalCredential": false, + "dispatchEvent": false, + "DisposableStack": false, + "document": false, + "Document": false, + "DocumentFragment": false, + "documentPictureInPicture": false, + "DocumentPictureInPicture": false, + "DocumentPictureInPictureEvent": false, + "DocumentTimeline": false, + "DocumentType": false, + "DOMError": false, + "DOMException": false, + "DOMImplementation": false, + "DOMMatrix": false, + "DOMMatrixReadOnly": false, + "DOMParser": false, + "DOMPoint": false, + "DOMPointReadOnly": false, + "DOMQuad": false, + "DOMRect": false, + "DOMRectList": false, + "DOMRectReadOnly": false, + "DOMStringList": false, + "DOMStringMap": false, + "DOMTokenList": false, + "DragEvent": false, + "DynamicsCompressorNode": false, + "EditContext": false, + "Element": false, + "ElementInternals": false, + "EncodedAudioChunk": false, + "EncodedVideoChunk": false, + "ErrorEvent": false, + "event": false, + "Event": false, + "EventCounts": false, + "EventSource": false, + "EventTarget": false, + "external": false, + "External": false, + "EyeDropper": false, + "FeaturePolicy": false, + "FederatedCredential": false, + "fence": false, + "Fence": false, + "FencedFrameConfig": false, + "fetch": false, + "fetchLater": false, + "FetchLaterResult": false, + "File": false, + "FileList": false, + "FileReader": false, + "FileSystem": false, + "FileSystemDirectoryEntry": false, + "FileSystemDirectoryHandle": false, + "FileSystemDirectoryReader": false, + "FileSystemEntry": false, + "FileSystemFileEntry": false, + "FileSystemFileHandle": false, + "FileSystemHandle": false, + "FileSystemObserver": false, + "FileSystemWritableFileStream": false, + "find": false, + "focus": false, + "FocusEvent": false, + "FontData": false, + "FontFace": false, + "FontFaceSet": false, + "FontFaceSetLoadEvent": false, + "FormData": false, + "FormDataEvent": false, + "FragmentDirective": false, + "frameElement": false, + "frames": false, + "GainNode": false, + "Gamepad": false, + "GamepadAxisMoveEvent": false, + "GamepadButton": false, + "GamepadButtonEvent": false, + "GamepadEvent": false, + "GamepadHapticActuator": false, + "GamepadPose": false, + "Geolocation": false, + "GeolocationCoordinates": false, + "GeolocationPosition": false, + "GeolocationPositionError": false, + "getComputedStyle": false, + "getScreenDetails": false, + "getSelection": false, + "GPU": false, + "GPUAdapter": false, + "GPUAdapterInfo": false, + "GPUBindGroup": false, + "GPUBindGroupLayout": false, + "GPUBuffer": false, + "GPUBufferUsage": false, + "GPUCanvasContext": false, + "GPUColorWrite": false, + "GPUCommandBuffer": false, + "GPUCommandEncoder": false, + "GPUCompilationInfo": false, + "GPUCompilationMessage": false, + "GPUComputePassEncoder": false, + "GPUComputePipeline": false, + "GPUDevice": false, + "GPUDeviceLostInfo": false, + "GPUError": false, + "GPUExternalTexture": false, + "GPUInternalError": false, + "GPUMapMode": false, + "GPUOutOfMemoryError": false, + "GPUPipelineError": false, + "GPUPipelineLayout": false, + "GPUQuerySet": false, + "GPUQueue": false, + "GPURenderBundle": false, + "GPURenderBundleEncoder": false, + "GPURenderPassEncoder": false, + "GPURenderPipeline": false, + "GPUSampler": false, + "GPUShaderModule": false, + "GPUShaderStage": false, + "GPUSupportedFeatures": false, + "GPUSupportedLimits": false, + "GPUTexture": false, + "GPUTextureUsage": false, + "GPUTextureView": false, + "GPUUncapturedErrorEvent": false, + "GPUValidationError": false, + "GravitySensor": false, + "Gyroscope": false, + "HashChangeEvent": false, + "Headers": false, + "HID": false, + "HIDConnectionEvent": false, + "HIDDevice": false, + "HIDInputReportEvent": false, + "Highlight": false, + "HighlightRegistry": false, + "history": false, + "History": false, + "HTMLAllCollection": false, + "HTMLAnchorElement": false, + "HTMLAreaElement": false, + "HTMLAudioElement": false, + "HTMLBaseElement": false, + "HTMLBodyElement": false, + "HTMLBRElement": false, + "HTMLButtonElement": false, + "HTMLCanvasElement": false, + "HTMLCollection": false, + "HTMLDataElement": false, + "HTMLDataListElement": false, + "HTMLDetailsElement": false, + "HTMLDialogElement": false, + "HTMLDirectoryElement": false, + "HTMLDivElement": false, + "HTMLDListElement": false, + "HTMLDocument": false, + "HTMLElement": false, + "HTMLEmbedElement": false, + "HTMLFencedFrameElement": false, + "HTMLFieldSetElement": false, + "HTMLFontElement": false, + "HTMLFormControlsCollection": false, + "HTMLFormElement": false, + "HTMLFrameElement": false, + "HTMLFrameSetElement": false, + "HTMLHeadElement": false, + "HTMLHeadingElement": false, + "HTMLHRElement": false, + "HTMLHtmlElement": false, + "HTMLIFrameElement": false, + "HTMLImageElement": false, + "HTMLInputElement": false, + "HTMLLabelElement": false, + "HTMLLegendElement": false, + "HTMLLIElement": false, + "HTMLLinkElement": false, + "HTMLMapElement": false, + "HTMLMarqueeElement": false, + "HTMLMediaElement": false, + "HTMLMenuElement": false, + "HTMLMetaElement": false, + "HTMLMeterElement": false, + "HTMLModElement": false, + "HTMLObjectElement": false, + "HTMLOListElement": false, + "HTMLOptGroupElement": false, + "HTMLOptionElement": false, + "HTMLOptionsCollection": false, + "HTMLOutputElement": false, + "HTMLParagraphElement": false, + "HTMLParamElement": false, + "HTMLPictureElement": false, + "HTMLPreElement": false, + "HTMLProgressElement": false, + "HTMLQuoteElement": false, + "HTMLScriptElement": false, + "HTMLSelectedContentElement": false, + "HTMLSelectElement": false, + "HTMLSlotElement": false, + "HTMLSourceElement": false, + "HTMLSpanElement": false, + "HTMLStyleElement": false, + "HTMLTableCaptionElement": false, + "HTMLTableCellElement": false, + "HTMLTableColElement": false, + "HTMLTableElement": false, + "HTMLTableRowElement": false, + "HTMLTableSectionElement": false, + "HTMLTemplateElement": false, + "HTMLTextAreaElement": false, + "HTMLTimeElement": false, + "HTMLTitleElement": false, + "HTMLTrackElement": false, + "HTMLUListElement": false, + "HTMLUnknownElement": false, + "HTMLVideoElement": false, + "IDBCursor": false, + "IDBCursorWithValue": false, + "IDBDatabase": false, + "IDBFactory": false, + "IDBIndex": false, + "IDBKeyRange": false, + "IDBObjectStore": false, + "IDBOpenDBRequest": false, + "IDBRecord": false, + "IDBRequest": false, + "IDBTransaction": false, + "IDBVersionChangeEvent": false, + "IdentityCredential": false, + "IdentityCredentialError": false, + "IdentityProvider": false, + "IdleDeadline": false, + "IdleDetector": false, + "IIRFilterNode": false, + "Image": false, + "ImageBitmap": false, + "ImageBitmapRenderingContext": false, + "ImageCapture": false, + "ImageData": false, + "ImageDecoder": false, + "ImageTrack": false, + "ImageTrackList": false, + "indexedDB": false, + "Ink": false, + "innerHeight": false, + "innerWidth": false, + "InputDeviceCapabilities": false, + "InputDeviceInfo": false, + "InputEvent": false, + "IntegrityViolationReportBody": false, + "InterestEvent": false, + "IntersectionObserver": false, + "IntersectionObserverEntry": false, + "isSecureContext": false, + "Keyboard": false, + "KeyboardEvent": false, + "KeyboardLayoutMap": false, + "KeyframeEffect": false, + "LanguageDetector": false, + "LargestContentfulPaint": false, + "LaunchParams": false, + "launchQueue": false, + "LaunchQueue": false, + "LayoutShift": false, + "LayoutShiftAttribution": false, + "length": false, + "LinearAccelerationSensor": false, + "localStorage": false, + "location": true, + "Location": false, + "locationbar": false, + "Lock": false, + "LockManager": false, + "matchMedia": false, + "MathMLElement": false, + "MediaCapabilities": false, + "MediaCapabilitiesInfo": false, + "MediaDeviceInfo": false, + "MediaDevices": false, + "MediaElementAudioSourceNode": false, + "MediaEncryptedEvent": false, + "MediaError": false, + "MediaKeyError": false, + "MediaKeyMessageEvent": false, + "MediaKeys": false, + "MediaKeySession": false, + "MediaKeyStatusMap": false, + "MediaKeySystemAccess": false, + "MediaList": false, + "MediaMetadata": false, + "MediaQueryList": false, + "MediaQueryListEvent": false, + "MediaRecorder": false, + "MediaRecorderErrorEvent": false, + "MediaSession": false, + "MediaSource": false, + "MediaSourceHandle": false, + "MediaStream": false, + "MediaStreamAudioDestinationNode": false, + "MediaStreamAudioSourceNode": false, + "MediaStreamEvent": false, + "MediaStreamTrack": false, + "MediaStreamTrackAudioSourceNode": false, + "MediaStreamTrackAudioStats": false, + "MediaStreamTrackEvent": false, + "MediaStreamTrackGenerator": false, + "MediaStreamTrackProcessor": false, + "MediaStreamTrackVideoStats": false, + "menubar": false, + "MessageChannel": false, + "MessageEvent": false, + "MessagePort": false, + "MIDIAccess": false, + "MIDIConnectionEvent": false, + "MIDIInput": false, + "MIDIInputMap": false, + "MIDIMessageEvent": false, + "MIDIOutput": false, + "MIDIOutputMap": false, + "MIDIPort": false, + "MimeType": false, + "MimeTypeArray": false, + "model": false, + "ModelGenericSession": false, + "ModelManager": false, + "MouseEvent": false, + "moveBy": false, + "moveTo": false, + "MutationEvent": false, + "MutationObserver": false, + "MutationRecord": false, + "name": false, + "NamedNodeMap": false, + "NavigateEvent": false, + "navigation": false, + "Navigation": false, + "NavigationActivation": false, + "NavigationCurrentEntryChangeEvent": false, + "NavigationDestination": false, + "NavigationHistoryEntry": false, + "NavigationPrecommitController": false, + "NavigationPreloadManager": false, + "NavigationTransition": false, + "navigator": false, + "Navigator": false, + "NavigatorLogin": false, + "NavigatorManagedData": false, + "NavigatorUAData": false, + "NetworkInformation": false, + "Node": false, + "NodeFilter": false, + "NodeIterator": false, + "NodeList": false, + "Notification": false, + "NotifyPaintEvent": false, + "NotRestoredReasonDetails": false, + "NotRestoredReasons": false, + "Observable": false, + "OfflineAudioCompletionEvent": false, + "OfflineAudioContext": false, + "offscreenBuffering": false, + "OffscreenCanvas": false, + "OffscreenCanvasRenderingContext2D": false, + "onabort": true, + "onafterprint": true, + "onanimationcancel": true, + "onanimationend": true, + "onanimationiteration": true, + "onanimationstart": true, + "onappinstalled": true, + "onauxclick": true, + "onbeforeinput": true, + "onbeforeinstallprompt": true, + "onbeforematch": true, + "onbeforeprint": true, + "onbeforetoggle": true, + "onbeforeunload": true, + "onbeforexrselect": true, + "onblur": true, + "oncancel": true, + "oncanplay": true, + "oncanplaythrough": true, + "onchange": true, + "onclick": true, + "onclose": true, + "oncommand": true, + "oncontentvisibilityautostatechange": true, + "oncontextlost": true, + "oncontextmenu": true, + "oncontextrestored": true, + "oncopy": true, + "oncuechange": true, + "oncut": true, + "ondblclick": true, + "ondevicemotion": true, + "ondeviceorientation": true, + "ondeviceorientationabsolute": true, + "ondrag": true, + "ondragend": true, + "ondragenter": true, + "ondragleave": true, + "ondragover": true, + "ondragstart": true, + "ondrop": true, + "ondurationchange": true, + "onemptied": true, + "onended": true, + "onerror": true, + "onfocus": true, + "onformdata": true, + "ongamepadconnected": true, + "ongamepaddisconnected": true, + "ongotpointercapture": true, + "onhashchange": true, + "oninput": true, + "oninvalid": true, + "onkeydown": true, + "onkeypress": true, + "onkeyup": true, + "onlanguagechange": true, + "onload": true, + "onloadeddata": true, + "onloadedmetadata": true, + "onloadstart": true, + "onlostpointercapture": true, + "onmessage": true, + "onmessageerror": true, + "onmousedown": true, + "onmouseenter": true, + "onmouseleave": true, + "onmousemove": true, + "onmouseout": true, + "onmouseover": true, + "onmouseup": true, + "onmousewheel": true, + "onoffline": true, + "ononline": true, + "onpagehide": true, + "onpagereveal": true, + "onpageshow": true, + "onpageswap": true, + "onpaste": true, + "onpause": true, + "onplay": true, + "onplaying": true, + "onpointercancel": true, + "onpointerdown": true, + "onpointerenter": true, + "onpointerleave": true, + "onpointermove": true, + "onpointerout": true, + "onpointerover": true, + "onpointerrawupdate": true, + "onpointerup": true, + "onpopstate": true, + "onprogress": true, + "onratechange": true, + "onrejectionhandled": true, + "onreset": true, + "onresize": true, + "onscroll": true, + "onscrollend": true, + "onscrollsnapchange": true, + "onscrollsnapchanging": true, + "onsearch": true, + "onsecuritypolicyviolation": true, + "onseeked": true, + "onseeking": true, + "onselect": true, + "onselectionchange": true, + "onselectstart": true, + "onslotchange": true, + "onstalled": true, + "onstorage": true, + "onsubmit": true, + "onsuspend": true, + "ontimeupdate": true, + "ontoggle": true, + "ontransitioncancel": true, + "ontransitionend": true, + "ontransitionrun": true, + "ontransitionstart": true, + "onunhandledrejection": true, + "onunload": true, + "onvolumechange": true, + "onwaiting": true, + "onwheel": true, + "open": false, + "opener": false, + "Option": false, + "OrientationSensor": false, + "origin": false, + "originAgentCluster": false, + "OscillatorNode": false, + "OTPCredential": false, + "outerHeight": false, + "outerWidth": false, + "OverconstrainedError": false, + "PageRevealEvent": false, + "PageSwapEvent": false, + "PageTransitionEvent": false, + "pageXOffset": false, + "pageYOffset": false, + "PannerNode": false, + "parent": false, + "PasswordCredential": false, + "Path2D": false, + "PaymentAddress": false, + "PaymentManager": false, + "PaymentMethodChangeEvent": false, + "PaymentRequest": false, + "PaymentRequestUpdateEvent": false, + "PaymentResponse": false, + "performance": false, + "Performance": false, + "PerformanceElementTiming": false, + "PerformanceEntry": false, + "PerformanceEventTiming": false, + "PerformanceLongAnimationFrameTiming": false, + "PerformanceLongTaskTiming": false, + "PerformanceMark": false, + "PerformanceMeasure": false, + "PerformanceNavigation": false, + "PerformanceNavigationTiming": false, + "PerformanceObserver": false, + "PerformanceObserverEntryList": false, + "PerformancePaintTiming": false, + "PerformanceResourceTiming": false, + "PerformanceScriptTiming": false, + "PerformanceServerTiming": false, + "PerformanceTiming": false, + "PeriodicSyncManager": false, + "PeriodicWave": false, + "Permissions": false, + "PermissionStatus": false, + "PERSISTENT": false, + "personalbar": false, + "PictureInPictureEvent": false, + "PictureInPictureWindow": false, + "Plugin": false, + "PluginArray": false, + "PointerEvent": false, + "PopStateEvent": false, + "postMessage": false, + "Presentation": false, + "PresentationAvailability": false, + "PresentationConnection": false, + "PresentationConnectionAvailableEvent": false, + "PresentationConnectionCloseEvent": false, + "PresentationConnectionList": false, + "PresentationReceiver": false, + "PresentationRequest": false, + "PressureObserver": false, + "PressureRecord": false, + "print": false, + "ProcessingInstruction": false, + "Profiler": false, + "ProgressEvent": false, + "PromiseRejectionEvent": false, + "prompt": false, + "ProtectedAudience": false, + "PublicKeyCredential": false, + "PushManager": false, + "PushSubscription": false, + "PushSubscriptionOptions": false, + "queryLocalFonts": false, + "queueMicrotask": false, + "QuotaExceededError": false, + "RadioNodeList": false, + "Range": false, + "ReadableByteStreamController": false, + "ReadableStream": false, + "ReadableStreamBYOBReader": false, + "ReadableStreamBYOBRequest": false, + "ReadableStreamDefaultController": false, + "ReadableStreamDefaultReader": false, + "registerProcessor": false, + "RelativeOrientationSensor": false, + "RemotePlayback": false, + "removeEventListener": false, + "ReportBody": false, + "reportError": false, + "ReportingObserver": false, + "Request": false, + "requestAnimationFrame": false, + "requestIdleCallback": false, + "resizeBy": false, + "ResizeObserver": false, + "ResizeObserverEntry": false, + "ResizeObserverSize": false, + "resizeTo": false, + "Response": false, + "RestrictionTarget": false, + "RTCCertificate": false, + "RTCDataChannel": false, + "RTCDataChannelEvent": false, + "RTCDtlsTransport": false, + "RTCDTMFSender": false, + "RTCDTMFToneChangeEvent": false, + "RTCEncodedAudioFrame": false, + "RTCEncodedVideoFrame": false, + "RTCError": false, + "RTCErrorEvent": false, + "RTCIceCandidate": false, + "RTCIceTransport": false, + "RTCPeerConnection": false, + "RTCPeerConnectionIceErrorEvent": false, + "RTCPeerConnectionIceEvent": false, + "RTCRtpReceiver": false, + "RTCRtpScriptTransform": false, + "RTCRtpSender": false, + "RTCRtpTransceiver": false, + "RTCSctpTransport": false, + "RTCSessionDescription": false, + "RTCStatsReport": false, + "RTCTrackEvent": false, + "sampleRate": false, + "scheduler": false, + "Scheduler": false, + "Scheduling": false, + "screen": false, + "Screen": false, + "ScreenDetailed": false, + "ScreenDetails": false, + "screenLeft": false, + "ScreenOrientation": false, + "screenTop": false, + "screenX": false, + "screenY": false, + "ScriptProcessorNode": false, + "scroll": false, + "scrollbars": false, + "scrollBy": false, + "ScrollTimeline": false, + "scrollTo": false, + "scrollX": false, + "scrollY": false, + "SecurityPolicyViolationEvent": false, + "Selection": false, + "self": false, + "Sensor": false, + "SensorErrorEvent": false, + "Serial": false, + "SerialPort": false, + "ServiceWorker": false, + "ServiceWorkerContainer": false, + "ServiceWorkerRegistration": false, + "sessionStorage": false, + "setInterval": false, + "setTimeout": false, + "ShadowRoot": false, + "sharedStorage": false, + "SharedStorage": false, + "SharedStorageAppendMethod": false, + "SharedStorageClearMethod": false, + "SharedStorageDeleteMethod": false, + "SharedStorageModifierMethod": false, + "SharedStorageSetMethod": false, + "SharedStorageWorklet": false, + "SharedWorker": false, + "showDirectoryPicker": false, + "showOpenFilePicker": false, + "showSaveFilePicker": false, + "SnapEvent": false, + "SourceBuffer": false, + "SourceBufferList": false, + "SpeechGrammar": false, + "SpeechGrammarList": false, + "SpeechRecognition": false, + "SpeechRecognitionErrorEvent": false, + "SpeechRecognitionEvent": false, + "SpeechRecognitionPhrase": false, + "speechSynthesis": false, + "SpeechSynthesis": false, + "SpeechSynthesisErrorEvent": false, + "SpeechSynthesisEvent": false, + "SpeechSynthesisUtterance": false, + "SpeechSynthesisVoice": false, + "StaticRange": false, + "status": false, + "statusbar": false, + "StereoPannerNode": false, + "stop": false, + "Storage": false, + "StorageBucket": false, + "StorageBucketManager": false, + "StorageEvent": false, + "StorageManager": false, + "structuredClone": false, + "styleMedia": false, + "StylePropertyMap": false, + "StylePropertyMapReadOnly": false, + "StyleSheet": false, + "StyleSheetList": false, + "SubmitEvent": false, + "Subscriber": false, + "SubtleCrypto": false, + "Summarizer": false, + "SuppressedError": false, + "SVGAElement": false, + "SVGAngle": false, + "SVGAnimatedAngle": false, + "SVGAnimatedBoolean": false, + "SVGAnimatedEnumeration": false, + "SVGAnimatedInteger": false, + "SVGAnimatedLength": false, + "SVGAnimatedLengthList": false, + "SVGAnimatedNumber": false, + "SVGAnimatedNumberList": false, + "SVGAnimatedPreserveAspectRatio": false, + "SVGAnimatedRect": false, + "SVGAnimatedString": false, + "SVGAnimatedTransformList": false, + "SVGAnimateElement": false, + "SVGAnimateMotionElement": false, + "SVGAnimateTransformElement": false, + "SVGAnimationElement": false, + "SVGCircleElement": false, + "SVGClipPathElement": false, + "SVGComponentTransferFunctionElement": false, + "SVGDefsElement": false, + "SVGDescElement": false, + "SVGElement": false, + "SVGEllipseElement": false, + "SVGFEBlendElement": false, + "SVGFEColorMatrixElement": false, + "SVGFEComponentTransferElement": false, + "SVGFECompositeElement": false, + "SVGFEConvolveMatrixElement": false, + "SVGFEDiffuseLightingElement": false, + "SVGFEDisplacementMapElement": false, + "SVGFEDistantLightElement": false, + "SVGFEDropShadowElement": false, + "SVGFEFloodElement": false, + "SVGFEFuncAElement": false, + "SVGFEFuncBElement": false, + "SVGFEFuncGElement": false, + "SVGFEFuncRElement": false, + "SVGFEGaussianBlurElement": false, + "SVGFEImageElement": false, + "SVGFEMergeElement": false, + "SVGFEMergeNodeElement": false, + "SVGFEMorphologyElement": false, + "SVGFEOffsetElement": false, + "SVGFEPointLightElement": false, + "SVGFESpecularLightingElement": false, + "SVGFESpotLightElement": false, + "SVGFETileElement": false, + "SVGFETurbulenceElement": false, + "SVGFilterElement": false, + "SVGForeignObjectElement": false, + "SVGGElement": false, + "SVGGeometryElement": false, + "SVGGradientElement": false, + "SVGGraphicsElement": false, + "SVGImageElement": false, + "SVGLength": false, + "SVGLengthList": false, + "SVGLinearGradientElement": false, + "SVGLineElement": false, + "SVGMarkerElement": false, + "SVGMaskElement": false, + "SVGMatrix": false, + "SVGMetadataElement": false, + "SVGMPathElement": false, + "SVGNumber": false, + "SVGNumberList": false, + "SVGPathElement": false, + "SVGPatternElement": false, + "SVGPoint": false, + "SVGPointList": false, + "SVGPolygonElement": false, + "SVGPolylineElement": false, + "SVGPreserveAspectRatio": false, + "SVGRadialGradientElement": false, + "SVGRect": false, + "SVGRectElement": false, + "SVGScriptElement": false, + "SVGSetElement": false, + "SVGStopElement": false, + "SVGStringList": false, + "SVGStyleElement": false, + "SVGSVGElement": false, + "SVGSwitchElement": false, + "SVGSymbolElement": false, + "SVGTextContentElement": false, + "SVGTextElement": false, + "SVGTextPathElement": false, + "SVGTextPositioningElement": false, + "SVGTitleElement": false, + "SVGTransform": false, + "SVGTransformList": false, + "SVGTSpanElement": false, + "SVGUnitTypes": false, + "SVGUseElement": false, + "SVGViewElement": false, + "SyncManager": false, + "TaskAttributionTiming": false, + "TaskController": false, + "TaskPriorityChangeEvent": false, + "TaskSignal": false, + "TEMPORARY": false, + "Text": false, + "TextDecoder": false, + "TextDecoderStream": false, + "TextEncoder": false, + "TextEncoderStream": false, + "TextEvent": false, + "TextFormat": false, + "TextFormatUpdateEvent": false, + "TextMetrics": false, + "TextTrack": false, + "TextTrackCue": false, + "TextTrackCueList": false, + "TextTrackList": false, + "TextUpdateEvent": false, + "TimeEvent": false, + "TimeRanges": false, + "ToggleEvent": false, + "toolbar": false, + "top": false, + "Touch": false, + "TouchEvent": false, + "TouchList": false, + "TrackEvent": false, + "TransformStream": false, + "TransformStreamDefaultController": false, + "TransitionEvent": false, + "Translator": false, + "TreeWalker": false, + "TrustedHTML": false, + "TrustedScript": false, + "TrustedScriptURL": false, + "TrustedTypePolicy": false, + "TrustedTypePolicyFactory": false, + "trustedTypes": false, + "UIEvent": false, + "URL": false, + "URLPattern": false, + "URLSearchParams": false, + "USB": false, + "USBAlternateInterface": false, + "USBConfiguration": false, + "USBConnectionEvent": false, + "USBDevice": false, + "USBEndpoint": false, + "USBInterface": false, + "USBInTransferResult": false, + "USBIsochronousInTransferPacket": false, + "USBIsochronousInTransferResult": false, + "USBIsochronousOutTransferPacket": false, + "USBIsochronousOutTransferResult": false, + "USBOutTransferResult": false, + "UserActivation": false, + "ValidityState": false, + "VideoColorSpace": false, + "VideoDecoder": false, + "VideoEncoder": false, + "VideoFrame": false, + "VideoPlaybackQuality": false, + "viewport": false, + "Viewport": false, + "ViewTimeline": false, + "ViewTransition": false, + "ViewTransitionTypeSet": false, + "VirtualKeyboard": false, + "VirtualKeyboardGeometryChangeEvent": false, + "VisibilityStateEntry": false, + "visualViewport": false, + "VisualViewport": false, + "VTTCue": false, + "VTTRegion": false, + "WakeLock": false, + "WakeLockSentinel": false, + "WaveShaperNode": false, + "WebAssembly": false, + "WebGL2RenderingContext": false, + "WebGLActiveInfo": false, + "WebGLBuffer": false, + "WebGLContextEvent": false, + "WebGLFramebuffer": false, + "WebGLObject": false, + "WebGLProgram": false, + "WebGLQuery": false, + "WebGLRenderbuffer": false, + "WebGLRenderingContext": false, + "WebGLSampler": false, + "WebGLShader": false, + "WebGLShaderPrecisionFormat": false, + "WebGLSync": false, + "WebGLTexture": false, + "WebGLTransformFeedback": false, + "WebGLUniformLocation": false, + "WebGLVertexArrayObject": false, + "WebSocket": false, + "WebSocketError": false, + "WebSocketStream": false, + "WebTransport": false, + "WebTransportBidirectionalStream": false, + "WebTransportDatagramDuplexStream": false, + "WebTransportError": false, + "WebTransportReceiveStream": false, + "WebTransportSendStream": false, + "WGSLLanguageFeatures": false, + "WheelEvent": false, + "when": false, + "window": false, + "Window": false, + "WindowControlsOverlay": false, + "WindowControlsOverlayGeometryChangeEvent": false, + "Worker": false, + "Worklet": false, + "WorkletGlobalScope": false, + "WritableStream": false, + "WritableStreamDefaultController": false, + "WritableStreamDefaultWriter": false, + "XMLDocument": false, + "XMLHttpRequest": false, + "XMLHttpRequestEventTarget": false, + "XMLHttpRequestUpload": false, + "XMLSerializer": false, + "XPathEvaluator": false, + "XPathExpression": false, + "XPathResult": false, + "XRAnchor": false, + "XRAnchorSet": false, + "XRBoundedReferenceSpace": false, + "XRCamera": false, + "XRCPUDepthInformation": false, + "XRDepthInformation": false, + "XRDOMOverlayState": false, + "XRFrame": false, + "XRHand": false, + "XRHitTestResult": false, + "XRHitTestSource": false, + "XRInputSource": false, + "XRInputSourceArray": false, + "XRInputSourceEvent": false, + "XRInputSourcesChangeEvent": false, + "XRJointPose": false, + "XRJointSpace": false, + "XRLayer": false, + "XRLightEstimate": false, + "XRLightProbe": false, + "XRPose": false, + "XRRay": false, + "XRReferenceSpace": false, + "XRReferenceSpaceEvent": false, + "XRRenderState": false, + "XRRigidTransform": false, + "XRSession": false, + "XRSessionEvent": false, + "XRSpace": false, + "XRSystem": false, + "XRTransientInputHitTestResult": false, + "XRTransientInputHitTestSource": false, + "XRView": false, + "XRViewerPose": false, + "XRViewport": false, + "XRWebGLBinding": false, + "XRWebGLDepthInformation": false, + "XRWebGLLayer": false, + "XSLTProcessor": false + } + }, + "errors": [ + { + "messageId": "impliedEval" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-implied-eval > invalid + +```js +setTimeout(`foo` + bar) +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "globals": { + "AbortController": false, + "AbortSignal": false, + "AbsoluteOrientationSensor": false, + "AbstractRange": false, + "Accelerometer": false, + "addEventListener": false, + "ai": false, + "AI": false, + "AICreateMonitor": false, + "AITextSession": false, + "alert": false, + "AnalyserNode": false, + "Animation": false, + "AnimationEffect": false, + "AnimationEvent": false, + "AnimationPlaybackEvent": false, + "AnimationTimeline": false, + "AsyncDisposableStack": false, + "atob": false, + "Attr": false, + "Audio": false, + "AudioBuffer": false, + "AudioBufferSourceNode": false, + "AudioContext": false, + "AudioData": false, + "AudioDecoder": false, + "AudioDestinationNode": false, + "AudioEncoder": false, + "AudioListener": false, + "AudioNode": false, + "AudioParam": false, + "AudioParamMap": false, + "AudioProcessingEvent": false, + "AudioScheduledSourceNode": false, + "AudioSinkInfo": false, + "AudioWorklet": false, + "AudioWorkletGlobalScope": false, + "AudioWorkletNode": false, + "AudioWorkletProcessor": false, + "AuthenticatorAssertionResponse": false, + "AuthenticatorAttestationResponse": false, + "AuthenticatorResponse": false, + "BackgroundFetchManager": false, + "BackgroundFetchRecord": false, + "BackgroundFetchRegistration": false, + "BarcodeDetector": false, + "BarProp": false, + "BaseAudioContext": false, + "BatteryManager": false, + "BeforeUnloadEvent": false, + "BiquadFilterNode": false, + "Blob": false, + "BlobEvent": false, + "Bluetooth": false, + "BluetoothCharacteristicProperties": false, + "BluetoothDevice": false, + "BluetoothRemoteGATTCharacteristic": false, + "BluetoothRemoteGATTDescriptor": false, + "BluetoothRemoteGATTServer": false, + "BluetoothRemoteGATTService": false, + "BluetoothUUID": false, + "blur": false, + "BroadcastChannel": false, + "BrowserCaptureMediaStreamTrack": false, + "btoa": false, + "ByteLengthQueuingStrategy": false, + "Cache": false, + "caches": false, + "CacheStorage": false, + "cancelAnimationFrame": false, + "cancelIdleCallback": false, + "CanvasCaptureMediaStream": false, + "CanvasCaptureMediaStreamTrack": false, + "CanvasGradient": false, + "CanvasPattern": false, + "CanvasRenderingContext2D": false, + "CaptureController": false, + "CaretPosition": false, + "CDATASection": false, + "ChannelMergerNode": false, + "ChannelSplitterNode": false, + "ChapterInformation": false, + "CharacterBoundsUpdateEvent": false, + "CharacterData": false, + "clearInterval": false, + "clearTimeout": false, + "clientInformation": false, + "Clipboard": false, + "ClipboardChangeEvent": false, + "ClipboardEvent": false, + "ClipboardItem": false, + "close": false, + "closed": false, + "CloseEvent": false, + "CloseWatcher": false, + "CommandEvent": false, + "Comment": false, + "CompositionEvent": false, + "CompressionStream": false, + "confirm": false, + "console": false, + "ConstantSourceNode": false, + "ContentVisibilityAutoStateChangeEvent": false, + "ConvolverNode": false, + "CookieChangeEvent": false, + "CookieDeprecationLabel": false, + "cookieStore": false, + "CookieStore": false, + "CookieStoreManager": false, + "CountQueuingStrategy": false, + "createImageBitmap": false, + "CreateMonitor": false, + "Credential": false, + "credentialless": false, + "CredentialsContainer": false, + "CropTarget": false, + "crossOriginIsolated": false, + "crypto": false, + "Crypto": false, + "CryptoKey": false, + "CSPViolationReportBody": false, + "CSS": false, + "CSSAnimation": false, + "CSSConditionRule": false, + "CSSContainerRule": false, + "CSSCounterStyleRule": false, + "CSSFontFaceRule": false, + "CSSFontFeatureValuesRule": false, + "CSSFontPaletteValuesRule": false, + "CSSFunctionDeclarations": false, + "CSSFunctionDescriptors": false, + "CSSFunctionRule": false, + "CSSGroupingRule": false, + "CSSImageValue": false, + "CSSImportRule": false, + "CSSKeyframeRule": false, + "CSSKeyframesRule": false, + "CSSKeywordValue": false, + "CSSLayerBlockRule": false, + "CSSLayerStatementRule": false, + "CSSMarginRule": false, + "CSSMathClamp": false, + "CSSMathInvert": false, + "CSSMathMax": false, + "CSSMathMin": false, + "CSSMathNegate": false, + "CSSMathProduct": false, + "CSSMathSum": false, + "CSSMathValue": false, + "CSSMatrixComponent": false, + "CSSMediaRule": false, + "CSSNamespaceRule": false, + "CSSNestedDeclarations": false, + "CSSNumericArray": false, + "CSSNumericValue": false, + "CSSPageDescriptors": false, + "CSSPageRule": false, + "CSSPerspective": false, + "CSSPositionTryDescriptors": false, + "CSSPositionTryRule": false, + "CSSPositionValue": false, + "CSSPropertyRule": false, + "CSSRotate": false, + "CSSRule": false, + "CSSRuleList": false, + "CSSScale": false, + "CSSScopeRule": false, + "CSSSkew": false, + "CSSSkewX": false, + "CSSSkewY": false, + "CSSStartingStyleRule": false, + "CSSStyleDeclaration": false, + "CSSStyleRule": false, + "CSSStyleSheet": false, + "CSSStyleValue": false, + "CSSSupportsRule": false, + "CSSTransformComponent": false, + "CSSTransformValue": false, + "CSSTransition": false, + "CSSTranslate": false, + "CSSUnitValue": false, + "CSSUnparsedValue": false, + "CSSVariableReferenceValue": false, + "CSSViewTransitionRule": false, + "currentFrame": false, + "currentTime": false, + "CustomElementRegistry": false, + "customElements": false, + "CustomEvent": false, + "CustomStateSet": false, + "DataTransfer": false, + "DataTransferItem": false, + "DataTransferItemList": false, + "DecompressionStream": false, + "DelayNode": false, + "DelegatedInkTrailPresenter": false, + "DeviceMotionEvent": false, + "DeviceMotionEventAcceleration": false, + "DeviceMotionEventRotationRate": false, + "DeviceOrientationEvent": false, + "devicePixelRatio": false, + "DevicePosture": false, + "DigitalCredential": false, + "dispatchEvent": false, + "DisposableStack": false, + "document": false, + "Document": false, + "DocumentFragment": false, + "documentPictureInPicture": false, + "DocumentPictureInPicture": false, + "DocumentPictureInPictureEvent": false, + "DocumentTimeline": false, + "DocumentType": false, + "DOMError": false, + "DOMException": false, + "DOMImplementation": false, + "DOMMatrix": false, + "DOMMatrixReadOnly": false, + "DOMParser": false, + "DOMPoint": false, + "DOMPointReadOnly": false, + "DOMQuad": false, + "DOMRect": false, + "DOMRectList": false, + "DOMRectReadOnly": false, + "DOMStringList": false, + "DOMStringMap": false, + "DOMTokenList": false, + "DragEvent": false, + "DynamicsCompressorNode": false, + "EditContext": false, + "Element": false, + "ElementInternals": false, + "EncodedAudioChunk": false, + "EncodedVideoChunk": false, + "ErrorEvent": false, + "event": false, + "Event": false, + "EventCounts": false, + "EventSource": false, + "EventTarget": false, + "external": false, + "External": false, + "EyeDropper": false, + "FeaturePolicy": false, + "FederatedCredential": false, + "fence": false, + "Fence": false, + "FencedFrameConfig": false, + "fetch": false, + "fetchLater": false, + "FetchLaterResult": false, + "File": false, + "FileList": false, + "FileReader": false, + "FileSystem": false, + "FileSystemDirectoryEntry": false, + "FileSystemDirectoryHandle": false, + "FileSystemDirectoryReader": false, + "FileSystemEntry": false, + "FileSystemFileEntry": false, + "FileSystemFileHandle": false, + "FileSystemHandle": false, + "FileSystemObserver": false, + "FileSystemWritableFileStream": false, + "find": false, + "focus": false, + "FocusEvent": false, + "FontData": false, + "FontFace": false, + "FontFaceSet": false, + "FontFaceSetLoadEvent": false, + "FormData": false, + "FormDataEvent": false, + "FragmentDirective": false, + "frameElement": false, + "frames": false, + "GainNode": false, + "Gamepad": false, + "GamepadAxisMoveEvent": false, + "GamepadButton": false, + "GamepadButtonEvent": false, + "GamepadEvent": false, + "GamepadHapticActuator": false, + "GamepadPose": false, + "Geolocation": false, + "GeolocationCoordinates": false, + "GeolocationPosition": false, + "GeolocationPositionError": false, + "getComputedStyle": false, + "getScreenDetails": false, + "getSelection": false, + "GPU": false, + "GPUAdapter": false, + "GPUAdapterInfo": false, + "GPUBindGroup": false, + "GPUBindGroupLayout": false, + "GPUBuffer": false, + "GPUBufferUsage": false, + "GPUCanvasContext": false, + "GPUColorWrite": false, + "GPUCommandBuffer": false, + "GPUCommandEncoder": false, + "GPUCompilationInfo": false, + "GPUCompilationMessage": false, + "GPUComputePassEncoder": false, + "GPUComputePipeline": false, + "GPUDevice": false, + "GPUDeviceLostInfo": false, + "GPUError": false, + "GPUExternalTexture": false, + "GPUInternalError": false, + "GPUMapMode": false, + "GPUOutOfMemoryError": false, + "GPUPipelineError": false, + "GPUPipelineLayout": false, + "GPUQuerySet": false, + "GPUQueue": false, + "GPURenderBundle": false, + "GPURenderBundleEncoder": false, + "GPURenderPassEncoder": false, + "GPURenderPipeline": false, + "GPUSampler": false, + "GPUShaderModule": false, + "GPUShaderStage": false, + "GPUSupportedFeatures": false, + "GPUSupportedLimits": false, + "GPUTexture": false, + "GPUTextureUsage": false, + "GPUTextureView": false, + "GPUUncapturedErrorEvent": false, + "GPUValidationError": false, + "GravitySensor": false, + "Gyroscope": false, + "HashChangeEvent": false, + "Headers": false, + "HID": false, + "HIDConnectionEvent": false, + "HIDDevice": false, + "HIDInputReportEvent": false, + "Highlight": false, + "HighlightRegistry": false, + "history": false, + "History": false, + "HTMLAllCollection": false, + "HTMLAnchorElement": false, + "HTMLAreaElement": false, + "HTMLAudioElement": false, + "HTMLBaseElement": false, + "HTMLBodyElement": false, + "HTMLBRElement": false, + "HTMLButtonElement": false, + "HTMLCanvasElement": false, + "HTMLCollection": false, + "HTMLDataElement": false, + "HTMLDataListElement": false, + "HTMLDetailsElement": false, + "HTMLDialogElement": false, + "HTMLDirectoryElement": false, + "HTMLDivElement": false, + "HTMLDListElement": false, + "HTMLDocument": false, + "HTMLElement": false, + "HTMLEmbedElement": false, + "HTMLFencedFrameElement": false, + "HTMLFieldSetElement": false, + "HTMLFontElement": false, + "HTMLFormControlsCollection": false, + "HTMLFormElement": false, + "HTMLFrameElement": false, + "HTMLFrameSetElement": false, + "HTMLHeadElement": false, + "HTMLHeadingElement": false, + "HTMLHRElement": false, + "HTMLHtmlElement": false, + "HTMLIFrameElement": false, + "HTMLImageElement": false, + "HTMLInputElement": false, + "HTMLLabelElement": false, + "HTMLLegendElement": false, + "HTMLLIElement": false, + "HTMLLinkElement": false, + "HTMLMapElement": false, + "HTMLMarqueeElement": false, + "HTMLMediaElement": false, + "HTMLMenuElement": false, + "HTMLMetaElement": false, + "HTMLMeterElement": false, + "HTMLModElement": false, + "HTMLObjectElement": false, + "HTMLOListElement": false, + "HTMLOptGroupElement": false, + "HTMLOptionElement": false, + "HTMLOptionsCollection": false, + "HTMLOutputElement": false, + "HTMLParagraphElement": false, + "HTMLParamElement": false, + "HTMLPictureElement": false, + "HTMLPreElement": false, + "HTMLProgressElement": false, + "HTMLQuoteElement": false, + "HTMLScriptElement": false, + "HTMLSelectedContentElement": false, + "HTMLSelectElement": false, + "HTMLSlotElement": false, + "HTMLSourceElement": false, + "HTMLSpanElement": false, + "HTMLStyleElement": false, + "HTMLTableCaptionElement": false, + "HTMLTableCellElement": false, + "HTMLTableColElement": false, + "HTMLTableElement": false, + "HTMLTableRowElement": false, + "HTMLTableSectionElement": false, + "HTMLTemplateElement": false, + "HTMLTextAreaElement": false, + "HTMLTimeElement": false, + "HTMLTitleElement": false, + "HTMLTrackElement": false, + "HTMLUListElement": false, + "HTMLUnknownElement": false, + "HTMLVideoElement": false, + "IDBCursor": false, + "IDBCursorWithValue": false, + "IDBDatabase": false, + "IDBFactory": false, + "IDBIndex": false, + "IDBKeyRange": false, + "IDBObjectStore": false, + "IDBOpenDBRequest": false, + "IDBRecord": false, + "IDBRequest": false, + "IDBTransaction": false, + "IDBVersionChangeEvent": false, + "IdentityCredential": false, + "IdentityCredentialError": false, + "IdentityProvider": false, + "IdleDeadline": false, + "IdleDetector": false, + "IIRFilterNode": false, + "Image": false, + "ImageBitmap": false, + "ImageBitmapRenderingContext": false, + "ImageCapture": false, + "ImageData": false, + "ImageDecoder": false, + "ImageTrack": false, + "ImageTrackList": false, + "indexedDB": false, + "Ink": false, + "innerHeight": false, + "innerWidth": false, + "InputDeviceCapabilities": false, + "InputDeviceInfo": false, + "InputEvent": false, + "IntegrityViolationReportBody": false, + "InterestEvent": false, + "IntersectionObserver": false, + "IntersectionObserverEntry": false, + "isSecureContext": false, + "Keyboard": false, + "KeyboardEvent": false, + "KeyboardLayoutMap": false, + "KeyframeEffect": false, + "LanguageDetector": false, + "LargestContentfulPaint": false, + "LaunchParams": false, + "launchQueue": false, + "LaunchQueue": false, + "LayoutShift": false, + "LayoutShiftAttribution": false, + "length": false, + "LinearAccelerationSensor": false, + "localStorage": false, + "location": true, + "Location": false, + "locationbar": false, + "Lock": false, + "LockManager": false, + "matchMedia": false, + "MathMLElement": false, + "MediaCapabilities": false, + "MediaCapabilitiesInfo": false, + "MediaDeviceInfo": false, + "MediaDevices": false, + "MediaElementAudioSourceNode": false, + "MediaEncryptedEvent": false, + "MediaError": false, + "MediaKeyError": false, + "MediaKeyMessageEvent": false, + "MediaKeys": false, + "MediaKeySession": false, + "MediaKeyStatusMap": false, + "MediaKeySystemAccess": false, + "MediaList": false, + "MediaMetadata": false, + "MediaQueryList": false, + "MediaQueryListEvent": false, + "MediaRecorder": false, + "MediaRecorderErrorEvent": false, + "MediaSession": false, + "MediaSource": false, + "MediaSourceHandle": false, + "MediaStream": false, + "MediaStreamAudioDestinationNode": false, + "MediaStreamAudioSourceNode": false, + "MediaStreamEvent": false, + "MediaStreamTrack": false, + "MediaStreamTrackAudioSourceNode": false, + "MediaStreamTrackAudioStats": false, + "MediaStreamTrackEvent": false, + "MediaStreamTrackGenerator": false, + "MediaStreamTrackProcessor": false, + "MediaStreamTrackVideoStats": false, + "menubar": false, + "MessageChannel": false, + "MessageEvent": false, + "MessagePort": false, + "MIDIAccess": false, + "MIDIConnectionEvent": false, + "MIDIInput": false, + "MIDIInputMap": false, + "MIDIMessageEvent": false, + "MIDIOutput": false, + "MIDIOutputMap": false, + "MIDIPort": false, + "MimeType": false, + "MimeTypeArray": false, + "model": false, + "ModelGenericSession": false, + "ModelManager": false, + "MouseEvent": false, + "moveBy": false, + "moveTo": false, + "MutationEvent": false, + "MutationObserver": false, + "MutationRecord": false, + "name": false, + "NamedNodeMap": false, + "NavigateEvent": false, + "navigation": false, + "Navigation": false, + "NavigationActivation": false, + "NavigationCurrentEntryChangeEvent": false, + "NavigationDestination": false, + "NavigationHistoryEntry": false, + "NavigationPrecommitController": false, + "NavigationPreloadManager": false, + "NavigationTransition": false, + "navigator": false, + "Navigator": false, + "NavigatorLogin": false, + "NavigatorManagedData": false, + "NavigatorUAData": false, + "NetworkInformation": false, + "Node": false, + "NodeFilter": false, + "NodeIterator": false, + "NodeList": false, + "Notification": false, + "NotifyPaintEvent": false, + "NotRestoredReasonDetails": false, + "NotRestoredReasons": false, + "Observable": false, + "OfflineAudioCompletionEvent": false, + "OfflineAudioContext": false, + "offscreenBuffering": false, + "OffscreenCanvas": false, + "OffscreenCanvasRenderingContext2D": false, + "onabort": true, + "onafterprint": true, + "onanimationcancel": true, + "onanimationend": true, + "onanimationiteration": true, + "onanimationstart": true, + "onappinstalled": true, + "onauxclick": true, + "onbeforeinput": true, + "onbeforeinstallprompt": true, + "onbeforematch": true, + "onbeforeprint": true, + "onbeforetoggle": true, + "onbeforeunload": true, + "onbeforexrselect": true, + "onblur": true, + "oncancel": true, + "oncanplay": true, + "oncanplaythrough": true, + "onchange": true, + "onclick": true, + "onclose": true, + "oncommand": true, + "oncontentvisibilityautostatechange": true, + "oncontextlost": true, + "oncontextmenu": true, + "oncontextrestored": true, + "oncopy": true, + "oncuechange": true, + "oncut": true, + "ondblclick": true, + "ondevicemotion": true, + "ondeviceorientation": true, + "ondeviceorientationabsolute": true, + "ondrag": true, + "ondragend": true, + "ondragenter": true, + "ondragleave": true, + "ondragover": true, + "ondragstart": true, + "ondrop": true, + "ondurationchange": true, + "onemptied": true, + "onended": true, + "onerror": true, + "onfocus": true, + "onformdata": true, + "ongamepadconnected": true, + "ongamepaddisconnected": true, + "ongotpointercapture": true, + "onhashchange": true, + "oninput": true, + "oninvalid": true, + "onkeydown": true, + "onkeypress": true, + "onkeyup": true, + "onlanguagechange": true, + "onload": true, + "onloadeddata": true, + "onloadedmetadata": true, + "onloadstart": true, + "onlostpointercapture": true, + "onmessage": true, + "onmessageerror": true, + "onmousedown": true, + "onmouseenter": true, + "onmouseleave": true, + "onmousemove": true, + "onmouseout": true, + "onmouseover": true, + "onmouseup": true, + "onmousewheel": true, + "onoffline": true, + "ononline": true, + "onpagehide": true, + "onpagereveal": true, + "onpageshow": true, + "onpageswap": true, + "onpaste": true, + "onpause": true, + "onplay": true, + "onplaying": true, + "onpointercancel": true, + "onpointerdown": true, + "onpointerenter": true, + "onpointerleave": true, + "onpointermove": true, + "onpointerout": true, + "onpointerover": true, + "onpointerrawupdate": true, + "onpointerup": true, + "onpopstate": true, + "onprogress": true, + "onratechange": true, + "onrejectionhandled": true, + "onreset": true, + "onresize": true, + "onscroll": true, + "onscrollend": true, + "onscrollsnapchange": true, + "onscrollsnapchanging": true, + "onsearch": true, + "onsecuritypolicyviolation": true, + "onseeked": true, + "onseeking": true, + "onselect": true, + "onselectionchange": true, + "onselectstart": true, + "onslotchange": true, + "onstalled": true, + "onstorage": true, + "onsubmit": true, + "onsuspend": true, + "ontimeupdate": true, + "ontoggle": true, + "ontransitioncancel": true, + "ontransitionend": true, + "ontransitionrun": true, + "ontransitionstart": true, + "onunhandledrejection": true, + "onunload": true, + "onvolumechange": true, + "onwaiting": true, + "onwheel": true, + "open": false, + "opener": false, + "Option": false, + "OrientationSensor": false, + "origin": false, + "originAgentCluster": false, + "OscillatorNode": false, + "OTPCredential": false, + "outerHeight": false, + "outerWidth": false, + "OverconstrainedError": false, + "PageRevealEvent": false, + "PageSwapEvent": false, + "PageTransitionEvent": false, + "pageXOffset": false, + "pageYOffset": false, + "PannerNode": false, + "parent": false, + "PasswordCredential": false, + "Path2D": false, + "PaymentAddress": false, + "PaymentManager": false, + "PaymentMethodChangeEvent": false, + "PaymentRequest": false, + "PaymentRequestUpdateEvent": false, + "PaymentResponse": false, + "performance": false, + "Performance": false, + "PerformanceElementTiming": false, + "PerformanceEntry": false, + "PerformanceEventTiming": false, + "PerformanceLongAnimationFrameTiming": false, + "PerformanceLongTaskTiming": false, + "PerformanceMark": false, + "PerformanceMeasure": false, + "PerformanceNavigation": false, + "PerformanceNavigationTiming": false, + "PerformanceObserver": false, + "PerformanceObserverEntryList": false, + "PerformancePaintTiming": false, + "PerformanceResourceTiming": false, + "PerformanceScriptTiming": false, + "PerformanceServerTiming": false, + "PerformanceTiming": false, + "PeriodicSyncManager": false, + "PeriodicWave": false, + "Permissions": false, + "PermissionStatus": false, + "PERSISTENT": false, + "personalbar": false, + "PictureInPictureEvent": false, + "PictureInPictureWindow": false, + "Plugin": false, + "PluginArray": false, + "PointerEvent": false, + "PopStateEvent": false, + "postMessage": false, + "Presentation": false, + "PresentationAvailability": false, + "PresentationConnection": false, + "PresentationConnectionAvailableEvent": false, + "PresentationConnectionCloseEvent": false, + "PresentationConnectionList": false, + "PresentationReceiver": false, + "PresentationRequest": false, + "PressureObserver": false, + "PressureRecord": false, + "print": false, + "ProcessingInstruction": false, + "Profiler": false, + "ProgressEvent": false, + "PromiseRejectionEvent": false, + "prompt": false, + "ProtectedAudience": false, + "PublicKeyCredential": false, + "PushManager": false, + "PushSubscription": false, + "PushSubscriptionOptions": false, + "queryLocalFonts": false, + "queueMicrotask": false, + "QuotaExceededError": false, + "RadioNodeList": false, + "Range": false, + "ReadableByteStreamController": false, + "ReadableStream": false, + "ReadableStreamBYOBReader": false, + "ReadableStreamBYOBRequest": false, + "ReadableStreamDefaultController": false, + "ReadableStreamDefaultReader": false, + "registerProcessor": false, + "RelativeOrientationSensor": false, + "RemotePlayback": false, + "removeEventListener": false, + "ReportBody": false, + "reportError": false, + "ReportingObserver": false, + "Request": false, + "requestAnimationFrame": false, + "requestIdleCallback": false, + "resizeBy": false, + "ResizeObserver": false, + "ResizeObserverEntry": false, + "ResizeObserverSize": false, + "resizeTo": false, + "Response": false, + "RestrictionTarget": false, + "RTCCertificate": false, + "RTCDataChannel": false, + "RTCDataChannelEvent": false, + "RTCDtlsTransport": false, + "RTCDTMFSender": false, + "RTCDTMFToneChangeEvent": false, + "RTCEncodedAudioFrame": false, + "RTCEncodedVideoFrame": false, + "RTCError": false, + "RTCErrorEvent": false, + "RTCIceCandidate": false, + "RTCIceTransport": false, + "RTCPeerConnection": false, + "RTCPeerConnectionIceErrorEvent": false, + "RTCPeerConnectionIceEvent": false, + "RTCRtpReceiver": false, + "RTCRtpScriptTransform": false, + "RTCRtpSender": false, + "RTCRtpTransceiver": false, + "RTCSctpTransport": false, + "RTCSessionDescription": false, + "RTCStatsReport": false, + "RTCTrackEvent": false, + "sampleRate": false, + "scheduler": false, + "Scheduler": false, + "Scheduling": false, + "screen": false, + "Screen": false, + "ScreenDetailed": false, + "ScreenDetails": false, + "screenLeft": false, + "ScreenOrientation": false, + "screenTop": false, + "screenX": false, + "screenY": false, + "ScriptProcessorNode": false, + "scroll": false, + "scrollbars": false, + "scrollBy": false, + "ScrollTimeline": false, + "scrollTo": false, + "scrollX": false, + "scrollY": false, + "SecurityPolicyViolationEvent": false, + "Selection": false, + "self": false, + "Sensor": false, + "SensorErrorEvent": false, + "Serial": false, + "SerialPort": false, + "ServiceWorker": false, + "ServiceWorkerContainer": false, + "ServiceWorkerRegistration": false, + "sessionStorage": false, + "setInterval": false, + "setTimeout": false, + "ShadowRoot": false, + "sharedStorage": false, + "SharedStorage": false, + "SharedStorageAppendMethod": false, + "SharedStorageClearMethod": false, + "SharedStorageDeleteMethod": false, + "SharedStorageModifierMethod": false, + "SharedStorageSetMethod": false, + "SharedStorageWorklet": false, + "SharedWorker": false, + "showDirectoryPicker": false, + "showOpenFilePicker": false, + "showSaveFilePicker": false, + "SnapEvent": false, + "SourceBuffer": false, + "SourceBufferList": false, + "SpeechGrammar": false, + "SpeechGrammarList": false, + "SpeechRecognition": false, + "SpeechRecognitionErrorEvent": false, + "SpeechRecognitionEvent": false, + "SpeechRecognitionPhrase": false, + "speechSynthesis": false, + "SpeechSynthesis": false, + "SpeechSynthesisErrorEvent": false, + "SpeechSynthesisEvent": false, + "SpeechSynthesisUtterance": false, + "SpeechSynthesisVoice": false, + "StaticRange": false, + "status": false, + "statusbar": false, + "StereoPannerNode": false, + "stop": false, + "Storage": false, + "StorageBucket": false, + "StorageBucketManager": false, + "StorageEvent": false, + "StorageManager": false, + "structuredClone": false, + "styleMedia": false, + "StylePropertyMap": false, + "StylePropertyMapReadOnly": false, + "StyleSheet": false, + "StyleSheetList": false, + "SubmitEvent": false, + "Subscriber": false, + "SubtleCrypto": false, + "Summarizer": false, + "SuppressedError": false, + "SVGAElement": false, + "SVGAngle": false, + "SVGAnimatedAngle": false, + "SVGAnimatedBoolean": false, + "SVGAnimatedEnumeration": false, + "SVGAnimatedInteger": false, + "SVGAnimatedLength": false, + "SVGAnimatedLengthList": false, + "SVGAnimatedNumber": false, + "SVGAnimatedNumberList": false, + "SVGAnimatedPreserveAspectRatio": false, + "SVGAnimatedRect": false, + "SVGAnimatedString": false, + "SVGAnimatedTransformList": false, + "SVGAnimateElement": false, + "SVGAnimateMotionElement": false, + "SVGAnimateTransformElement": false, + "SVGAnimationElement": false, + "SVGCircleElement": false, + "SVGClipPathElement": false, + "SVGComponentTransferFunctionElement": false, + "SVGDefsElement": false, + "SVGDescElement": false, + "SVGElement": false, + "SVGEllipseElement": false, + "SVGFEBlendElement": false, + "SVGFEColorMatrixElement": false, + "SVGFEComponentTransferElement": false, + "SVGFECompositeElement": false, + "SVGFEConvolveMatrixElement": false, + "SVGFEDiffuseLightingElement": false, + "SVGFEDisplacementMapElement": false, + "SVGFEDistantLightElement": false, + "SVGFEDropShadowElement": false, + "SVGFEFloodElement": false, + "SVGFEFuncAElement": false, + "SVGFEFuncBElement": false, + "SVGFEFuncGElement": false, + "SVGFEFuncRElement": false, + "SVGFEGaussianBlurElement": false, + "SVGFEImageElement": false, + "SVGFEMergeElement": false, + "SVGFEMergeNodeElement": false, + "SVGFEMorphologyElement": false, + "SVGFEOffsetElement": false, + "SVGFEPointLightElement": false, + "SVGFESpecularLightingElement": false, + "SVGFESpotLightElement": false, + "SVGFETileElement": false, + "SVGFETurbulenceElement": false, + "SVGFilterElement": false, + "SVGForeignObjectElement": false, + "SVGGElement": false, + "SVGGeometryElement": false, + "SVGGradientElement": false, + "SVGGraphicsElement": false, + "SVGImageElement": false, + "SVGLength": false, + "SVGLengthList": false, + "SVGLinearGradientElement": false, + "SVGLineElement": false, + "SVGMarkerElement": false, + "SVGMaskElement": false, + "SVGMatrix": false, + "SVGMetadataElement": false, + "SVGMPathElement": false, + "SVGNumber": false, + "SVGNumberList": false, + "SVGPathElement": false, + "SVGPatternElement": false, + "SVGPoint": false, + "SVGPointList": false, + "SVGPolygonElement": false, + "SVGPolylineElement": false, + "SVGPreserveAspectRatio": false, + "SVGRadialGradientElement": false, + "SVGRect": false, + "SVGRectElement": false, + "SVGScriptElement": false, + "SVGSetElement": false, + "SVGStopElement": false, + "SVGStringList": false, + "SVGStyleElement": false, + "SVGSVGElement": false, + "SVGSwitchElement": false, + "SVGSymbolElement": false, + "SVGTextContentElement": false, + "SVGTextElement": false, + "SVGTextPathElement": false, + "SVGTextPositioningElement": false, + "SVGTitleElement": false, + "SVGTransform": false, + "SVGTransformList": false, + "SVGTSpanElement": false, + "SVGUnitTypes": false, + "SVGUseElement": false, + "SVGViewElement": false, + "SyncManager": false, + "TaskAttributionTiming": false, + "TaskController": false, + "TaskPriorityChangeEvent": false, + "TaskSignal": false, + "TEMPORARY": false, + "Text": false, + "TextDecoder": false, + "TextDecoderStream": false, + "TextEncoder": false, + "TextEncoderStream": false, + "TextEvent": false, + "TextFormat": false, + "TextFormatUpdateEvent": false, + "TextMetrics": false, + "TextTrack": false, + "TextTrackCue": false, + "TextTrackCueList": false, + "TextTrackList": false, + "TextUpdateEvent": false, + "TimeEvent": false, + "TimeRanges": false, + "ToggleEvent": false, + "toolbar": false, + "top": false, + "Touch": false, + "TouchEvent": false, + "TouchList": false, + "TrackEvent": false, + "TransformStream": false, + "TransformStreamDefaultController": false, + "TransitionEvent": false, + "Translator": false, + "TreeWalker": false, + "TrustedHTML": false, + "TrustedScript": false, + "TrustedScriptURL": false, + "TrustedTypePolicy": false, + "TrustedTypePolicyFactory": false, + "trustedTypes": false, + "UIEvent": false, + "URL": false, + "URLPattern": false, + "URLSearchParams": false, + "USB": false, + "USBAlternateInterface": false, + "USBConfiguration": false, + "USBConnectionEvent": false, + "USBDevice": false, + "USBEndpoint": false, + "USBInterface": false, + "USBInTransferResult": false, + "USBIsochronousInTransferPacket": false, + "USBIsochronousInTransferResult": false, + "USBIsochronousOutTransferPacket": false, + "USBIsochronousOutTransferResult": false, + "USBOutTransferResult": false, + "UserActivation": false, + "ValidityState": false, + "VideoColorSpace": false, + "VideoDecoder": false, + "VideoEncoder": false, + "VideoFrame": false, + "VideoPlaybackQuality": false, + "viewport": false, + "Viewport": false, + "ViewTimeline": false, + "ViewTransition": false, + "ViewTransitionTypeSet": false, + "VirtualKeyboard": false, + "VirtualKeyboardGeometryChangeEvent": false, + "VisibilityStateEntry": false, + "visualViewport": false, + "VisualViewport": false, + "VTTCue": false, + "VTTRegion": false, + "WakeLock": false, + "WakeLockSentinel": false, + "WaveShaperNode": false, + "WebAssembly": false, + "WebGL2RenderingContext": false, + "WebGLActiveInfo": false, + "WebGLBuffer": false, + "WebGLContextEvent": false, + "WebGLFramebuffer": false, + "WebGLObject": false, + "WebGLProgram": false, + "WebGLQuery": false, + "WebGLRenderbuffer": false, + "WebGLRenderingContext": false, + "WebGLSampler": false, + "WebGLShader": false, + "WebGLShaderPrecisionFormat": false, + "WebGLSync": false, + "WebGLTexture": false, + "WebGLTransformFeedback": false, + "WebGLUniformLocation": false, + "WebGLVertexArrayObject": false, + "WebSocket": false, + "WebSocketError": false, + "WebSocketStream": false, + "WebTransport": false, + "WebTransportBidirectionalStream": false, + "WebTransportDatagramDuplexStream": false, + "WebTransportError": false, + "WebTransportReceiveStream": false, + "WebTransportSendStream": false, + "WGSLLanguageFeatures": false, + "WheelEvent": false, + "when": false, + "window": false, + "Window": false, + "WindowControlsOverlay": false, + "WindowControlsOverlayGeometryChangeEvent": false, + "Worker": false, + "Worklet": false, + "WorkletGlobalScope": false, + "WritableStream": false, + "WritableStreamDefaultController": false, + "WritableStreamDefaultWriter": false, + "XMLDocument": false, + "XMLHttpRequest": false, + "XMLHttpRequestEventTarget": false, + "XMLHttpRequestUpload": false, + "XMLSerializer": false, + "XPathEvaluator": false, + "XPathExpression": false, + "XPathResult": false, + "XRAnchor": false, + "XRAnchorSet": false, + "XRBoundedReferenceSpace": false, + "XRCamera": false, + "XRCPUDepthInformation": false, + "XRDepthInformation": false, + "XRDOMOverlayState": false, + "XRFrame": false, + "XRHand": false, + "XRHitTestResult": false, + "XRHitTestSource": false, + "XRInputSource": false, + "XRInputSourceArray": false, + "XRInputSourceEvent": false, + "XRInputSourcesChangeEvent": false, + "XRJointPose": false, + "XRJointSpace": false, + "XRLayer": false, + "XRLightEstimate": false, + "XRLightProbe": false, + "XRPose": false, + "XRRay": false, + "XRReferenceSpace": false, + "XRReferenceSpaceEvent": false, + "XRRenderState": false, + "XRRigidTransform": false, + "XRSession": false, + "XRSessionEvent": false, + "XRSpace": false, + "XRSystem": false, + "XRTransientInputHitTestResult": false, + "XRTransientInputHitTestSource": false, + "XRView": false, + "XRViewerPose": false, + "XRViewport": false, + "XRWebGLBinding": false, + "XRWebGLDepthInformation": false, + "XRWebGLLayer": false, + "XSLTProcessor": false + } + }, + "errors": [ + { + "messageId": "impliedEval" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-implied-eval > invalid + +```js +setTimeout(1 + ';' + 1) +``` + +```json +{ + "languageOptions": { + "globals": { + "AbortController": false, + "AbortSignal": false, + "AbsoluteOrientationSensor": false, + "AbstractRange": false, + "Accelerometer": false, + "addEventListener": false, + "ai": false, + "AI": false, + "AICreateMonitor": false, + "AITextSession": false, + "alert": false, + "AnalyserNode": false, + "Animation": false, + "AnimationEffect": false, + "AnimationEvent": false, + "AnimationPlaybackEvent": false, + "AnimationTimeline": false, + "AsyncDisposableStack": false, + "atob": false, + "Attr": false, + "Audio": false, + "AudioBuffer": false, + "AudioBufferSourceNode": false, + "AudioContext": false, + "AudioData": false, + "AudioDecoder": false, + "AudioDestinationNode": false, + "AudioEncoder": false, + "AudioListener": false, + "AudioNode": false, + "AudioParam": false, + "AudioParamMap": false, + "AudioProcessingEvent": false, + "AudioScheduledSourceNode": false, + "AudioSinkInfo": false, + "AudioWorklet": false, + "AudioWorkletGlobalScope": false, + "AudioWorkletNode": false, + "AudioWorkletProcessor": false, + "AuthenticatorAssertionResponse": false, + "AuthenticatorAttestationResponse": false, + "AuthenticatorResponse": false, + "BackgroundFetchManager": false, + "BackgroundFetchRecord": false, + "BackgroundFetchRegistration": false, + "BarcodeDetector": false, + "BarProp": false, + "BaseAudioContext": false, + "BatteryManager": false, + "BeforeUnloadEvent": false, + "BiquadFilterNode": false, + "Blob": false, + "BlobEvent": false, + "Bluetooth": false, + "BluetoothCharacteristicProperties": false, + "BluetoothDevice": false, + "BluetoothRemoteGATTCharacteristic": false, + "BluetoothRemoteGATTDescriptor": false, + "BluetoothRemoteGATTServer": false, + "BluetoothRemoteGATTService": false, + "BluetoothUUID": false, + "blur": false, + "BroadcastChannel": false, + "BrowserCaptureMediaStreamTrack": false, + "btoa": false, + "ByteLengthQueuingStrategy": false, + "Cache": false, + "caches": false, + "CacheStorage": false, + "cancelAnimationFrame": false, + "cancelIdleCallback": false, + "CanvasCaptureMediaStream": false, + "CanvasCaptureMediaStreamTrack": false, + "CanvasGradient": false, + "CanvasPattern": false, + "CanvasRenderingContext2D": false, + "CaptureController": false, + "CaretPosition": false, + "CDATASection": false, + "ChannelMergerNode": false, + "ChannelSplitterNode": false, + "ChapterInformation": false, + "CharacterBoundsUpdateEvent": false, + "CharacterData": false, + "clearInterval": false, + "clearTimeout": false, + "clientInformation": false, + "Clipboard": false, + "ClipboardChangeEvent": false, + "ClipboardEvent": false, + "ClipboardItem": false, + "close": false, + "closed": false, + "CloseEvent": false, + "CloseWatcher": false, + "CommandEvent": false, + "Comment": false, + "CompositionEvent": false, + "CompressionStream": false, + "confirm": false, + "console": false, + "ConstantSourceNode": false, + "ContentVisibilityAutoStateChangeEvent": false, + "ConvolverNode": false, + "CookieChangeEvent": false, + "CookieDeprecationLabel": false, + "cookieStore": false, + "CookieStore": false, + "CookieStoreManager": false, + "CountQueuingStrategy": false, + "createImageBitmap": false, + "CreateMonitor": false, + "Credential": false, + "credentialless": false, + "CredentialsContainer": false, + "CropTarget": false, + "crossOriginIsolated": false, + "crypto": false, + "Crypto": false, + "CryptoKey": false, + "CSPViolationReportBody": false, + "CSS": false, + "CSSAnimation": false, + "CSSConditionRule": false, + "CSSContainerRule": false, + "CSSCounterStyleRule": false, + "CSSFontFaceRule": false, + "CSSFontFeatureValuesRule": false, + "CSSFontPaletteValuesRule": false, + "CSSFunctionDeclarations": false, + "CSSFunctionDescriptors": false, + "CSSFunctionRule": false, + "CSSGroupingRule": false, + "CSSImageValue": false, + "CSSImportRule": false, + "CSSKeyframeRule": false, + "CSSKeyframesRule": false, + "CSSKeywordValue": false, + "CSSLayerBlockRule": false, + "CSSLayerStatementRule": false, + "CSSMarginRule": false, + "CSSMathClamp": false, + "CSSMathInvert": false, + "CSSMathMax": false, + "CSSMathMin": false, + "CSSMathNegate": false, + "CSSMathProduct": false, + "CSSMathSum": false, + "CSSMathValue": false, + "CSSMatrixComponent": false, + "CSSMediaRule": false, + "CSSNamespaceRule": false, + "CSSNestedDeclarations": false, + "CSSNumericArray": false, + "CSSNumericValue": false, + "CSSPageDescriptors": false, + "CSSPageRule": false, + "CSSPerspective": false, + "CSSPositionTryDescriptors": false, + "CSSPositionTryRule": false, + "CSSPositionValue": false, + "CSSPropertyRule": false, + "CSSRotate": false, + "CSSRule": false, + "CSSRuleList": false, + "CSSScale": false, + "CSSScopeRule": false, + "CSSSkew": false, + "CSSSkewX": false, + "CSSSkewY": false, + "CSSStartingStyleRule": false, + "CSSStyleDeclaration": false, + "CSSStyleRule": false, + "CSSStyleSheet": false, + "CSSStyleValue": false, + "CSSSupportsRule": false, + "CSSTransformComponent": false, + "CSSTransformValue": false, + "CSSTransition": false, + "CSSTranslate": false, + "CSSUnitValue": false, + "CSSUnparsedValue": false, + "CSSVariableReferenceValue": false, + "CSSViewTransitionRule": false, + "currentFrame": false, + "currentTime": false, + "CustomElementRegistry": false, + "customElements": false, + "CustomEvent": false, + "CustomStateSet": false, + "DataTransfer": false, + "DataTransferItem": false, + "DataTransferItemList": false, + "DecompressionStream": false, + "DelayNode": false, + "DelegatedInkTrailPresenter": false, + "DeviceMotionEvent": false, + "DeviceMotionEventAcceleration": false, + "DeviceMotionEventRotationRate": false, + "DeviceOrientationEvent": false, + "devicePixelRatio": false, + "DevicePosture": false, + "DigitalCredential": false, + "dispatchEvent": false, + "DisposableStack": false, + "document": false, + "Document": false, + "DocumentFragment": false, + "documentPictureInPicture": false, + "DocumentPictureInPicture": false, + "DocumentPictureInPictureEvent": false, + "DocumentTimeline": false, + "DocumentType": false, + "DOMError": false, + "DOMException": false, + "DOMImplementation": false, + "DOMMatrix": false, + "DOMMatrixReadOnly": false, + "DOMParser": false, + "DOMPoint": false, + "DOMPointReadOnly": false, + "DOMQuad": false, + "DOMRect": false, + "DOMRectList": false, + "DOMRectReadOnly": false, + "DOMStringList": false, + "DOMStringMap": false, + "DOMTokenList": false, + "DragEvent": false, + "DynamicsCompressorNode": false, + "EditContext": false, + "Element": false, + "ElementInternals": false, + "EncodedAudioChunk": false, + "EncodedVideoChunk": false, + "ErrorEvent": false, + "event": false, + "Event": false, + "EventCounts": false, + "EventSource": false, + "EventTarget": false, + "external": false, + "External": false, + "EyeDropper": false, + "FeaturePolicy": false, + "FederatedCredential": false, + "fence": false, + "Fence": false, + "FencedFrameConfig": false, + "fetch": false, + "fetchLater": false, + "FetchLaterResult": false, + "File": false, + "FileList": false, + "FileReader": false, + "FileSystem": false, + "FileSystemDirectoryEntry": false, + "FileSystemDirectoryHandle": false, + "FileSystemDirectoryReader": false, + "FileSystemEntry": false, + "FileSystemFileEntry": false, + "FileSystemFileHandle": false, + "FileSystemHandle": false, + "FileSystemObserver": false, + "FileSystemWritableFileStream": false, + "find": false, + "focus": false, + "FocusEvent": false, + "FontData": false, + "FontFace": false, + "FontFaceSet": false, + "FontFaceSetLoadEvent": false, + "FormData": false, + "FormDataEvent": false, + "FragmentDirective": false, + "frameElement": false, + "frames": false, + "GainNode": false, + "Gamepad": false, + "GamepadAxisMoveEvent": false, + "GamepadButton": false, + "GamepadButtonEvent": false, + "GamepadEvent": false, + "GamepadHapticActuator": false, + "GamepadPose": false, + "Geolocation": false, + "GeolocationCoordinates": false, + "GeolocationPosition": false, + "GeolocationPositionError": false, + "getComputedStyle": false, + "getScreenDetails": false, + "getSelection": false, + "GPU": false, + "GPUAdapter": false, + "GPUAdapterInfo": false, + "GPUBindGroup": false, + "GPUBindGroupLayout": false, + "GPUBuffer": false, + "GPUBufferUsage": false, + "GPUCanvasContext": false, + "GPUColorWrite": false, + "GPUCommandBuffer": false, + "GPUCommandEncoder": false, + "GPUCompilationInfo": false, + "GPUCompilationMessage": false, + "GPUComputePassEncoder": false, + "GPUComputePipeline": false, + "GPUDevice": false, + "GPUDeviceLostInfo": false, + "GPUError": false, + "GPUExternalTexture": false, + "GPUInternalError": false, + "GPUMapMode": false, + "GPUOutOfMemoryError": false, + "GPUPipelineError": false, + "GPUPipelineLayout": false, + "GPUQuerySet": false, + "GPUQueue": false, + "GPURenderBundle": false, + "GPURenderBundleEncoder": false, + "GPURenderPassEncoder": false, + "GPURenderPipeline": false, + "GPUSampler": false, + "GPUShaderModule": false, + "GPUShaderStage": false, + "GPUSupportedFeatures": false, + "GPUSupportedLimits": false, + "GPUTexture": false, + "GPUTextureUsage": false, + "GPUTextureView": false, + "GPUUncapturedErrorEvent": false, + "GPUValidationError": false, + "GravitySensor": false, + "Gyroscope": false, + "HashChangeEvent": false, + "Headers": false, + "HID": false, + "HIDConnectionEvent": false, + "HIDDevice": false, + "HIDInputReportEvent": false, + "Highlight": false, + "HighlightRegistry": false, + "history": false, + "History": false, + "HTMLAllCollection": false, + "HTMLAnchorElement": false, + "HTMLAreaElement": false, + "HTMLAudioElement": false, + "HTMLBaseElement": false, + "HTMLBodyElement": false, + "HTMLBRElement": false, + "HTMLButtonElement": false, + "HTMLCanvasElement": false, + "HTMLCollection": false, + "HTMLDataElement": false, + "HTMLDataListElement": false, + "HTMLDetailsElement": false, + "HTMLDialogElement": false, + "HTMLDirectoryElement": false, + "HTMLDivElement": false, + "HTMLDListElement": false, + "HTMLDocument": false, + "HTMLElement": false, + "HTMLEmbedElement": false, + "HTMLFencedFrameElement": false, + "HTMLFieldSetElement": false, + "HTMLFontElement": false, + "HTMLFormControlsCollection": false, + "HTMLFormElement": false, + "HTMLFrameElement": false, + "HTMLFrameSetElement": false, + "HTMLHeadElement": false, + "HTMLHeadingElement": false, + "HTMLHRElement": false, + "HTMLHtmlElement": false, + "HTMLIFrameElement": false, + "HTMLImageElement": false, + "HTMLInputElement": false, + "HTMLLabelElement": false, + "HTMLLegendElement": false, + "HTMLLIElement": false, + "HTMLLinkElement": false, + "HTMLMapElement": false, + "HTMLMarqueeElement": false, + "HTMLMediaElement": false, + "HTMLMenuElement": false, + "HTMLMetaElement": false, + "HTMLMeterElement": false, + "HTMLModElement": false, + "HTMLObjectElement": false, + "HTMLOListElement": false, + "HTMLOptGroupElement": false, + "HTMLOptionElement": false, + "HTMLOptionsCollection": false, + "HTMLOutputElement": false, + "HTMLParagraphElement": false, + "HTMLParamElement": false, + "HTMLPictureElement": false, + "HTMLPreElement": false, + "HTMLProgressElement": false, + "HTMLQuoteElement": false, + "HTMLScriptElement": false, + "HTMLSelectedContentElement": false, + "HTMLSelectElement": false, + "HTMLSlotElement": false, + "HTMLSourceElement": false, + "HTMLSpanElement": false, + "HTMLStyleElement": false, + "HTMLTableCaptionElement": false, + "HTMLTableCellElement": false, + "HTMLTableColElement": false, + "HTMLTableElement": false, + "HTMLTableRowElement": false, + "HTMLTableSectionElement": false, + "HTMLTemplateElement": false, + "HTMLTextAreaElement": false, + "HTMLTimeElement": false, + "HTMLTitleElement": false, + "HTMLTrackElement": false, + "HTMLUListElement": false, + "HTMLUnknownElement": false, + "HTMLVideoElement": false, + "IDBCursor": false, + "IDBCursorWithValue": false, + "IDBDatabase": false, + "IDBFactory": false, + "IDBIndex": false, + "IDBKeyRange": false, + "IDBObjectStore": false, + "IDBOpenDBRequest": false, + "IDBRecord": false, + "IDBRequest": false, + "IDBTransaction": false, + "IDBVersionChangeEvent": false, + "IdentityCredential": false, + "IdentityCredentialError": false, + "IdentityProvider": false, + "IdleDeadline": false, + "IdleDetector": false, + "IIRFilterNode": false, + "Image": false, + "ImageBitmap": false, + "ImageBitmapRenderingContext": false, + "ImageCapture": false, + "ImageData": false, + "ImageDecoder": false, + "ImageTrack": false, + "ImageTrackList": false, + "indexedDB": false, + "Ink": false, + "innerHeight": false, + "innerWidth": false, + "InputDeviceCapabilities": false, + "InputDeviceInfo": false, + "InputEvent": false, + "IntegrityViolationReportBody": false, + "InterestEvent": false, + "IntersectionObserver": false, + "IntersectionObserverEntry": false, + "isSecureContext": false, + "Keyboard": false, + "KeyboardEvent": false, + "KeyboardLayoutMap": false, + "KeyframeEffect": false, + "LanguageDetector": false, + "LargestContentfulPaint": false, + "LaunchParams": false, + "launchQueue": false, + "LaunchQueue": false, + "LayoutShift": false, + "LayoutShiftAttribution": false, + "length": false, + "LinearAccelerationSensor": false, + "localStorage": false, + "location": true, + "Location": false, + "locationbar": false, + "Lock": false, + "LockManager": false, + "matchMedia": false, + "MathMLElement": false, + "MediaCapabilities": false, + "MediaCapabilitiesInfo": false, + "MediaDeviceInfo": false, + "MediaDevices": false, + "MediaElementAudioSourceNode": false, + "MediaEncryptedEvent": false, + "MediaError": false, + "MediaKeyError": false, + "MediaKeyMessageEvent": false, + "MediaKeys": false, + "MediaKeySession": false, + "MediaKeyStatusMap": false, + "MediaKeySystemAccess": false, + "MediaList": false, + "MediaMetadata": false, + "MediaQueryList": false, + "MediaQueryListEvent": false, + "MediaRecorder": false, + "MediaRecorderErrorEvent": false, + "MediaSession": false, + "MediaSource": false, + "MediaSourceHandle": false, + "MediaStream": false, + "MediaStreamAudioDestinationNode": false, + "MediaStreamAudioSourceNode": false, + "MediaStreamEvent": false, + "MediaStreamTrack": false, + "MediaStreamTrackAudioSourceNode": false, + "MediaStreamTrackAudioStats": false, + "MediaStreamTrackEvent": false, + "MediaStreamTrackGenerator": false, + "MediaStreamTrackProcessor": false, + "MediaStreamTrackVideoStats": false, + "menubar": false, + "MessageChannel": false, + "MessageEvent": false, + "MessagePort": false, + "MIDIAccess": false, + "MIDIConnectionEvent": false, + "MIDIInput": false, + "MIDIInputMap": false, + "MIDIMessageEvent": false, + "MIDIOutput": false, + "MIDIOutputMap": false, + "MIDIPort": false, + "MimeType": false, + "MimeTypeArray": false, + "model": false, + "ModelGenericSession": false, + "ModelManager": false, + "MouseEvent": false, + "moveBy": false, + "moveTo": false, + "MutationEvent": false, + "MutationObserver": false, + "MutationRecord": false, + "name": false, + "NamedNodeMap": false, + "NavigateEvent": false, + "navigation": false, + "Navigation": false, + "NavigationActivation": false, + "NavigationCurrentEntryChangeEvent": false, + "NavigationDestination": false, + "NavigationHistoryEntry": false, + "NavigationPrecommitController": false, + "NavigationPreloadManager": false, + "NavigationTransition": false, + "navigator": false, + "Navigator": false, + "NavigatorLogin": false, + "NavigatorManagedData": false, + "NavigatorUAData": false, + "NetworkInformation": false, + "Node": false, + "NodeFilter": false, + "NodeIterator": false, + "NodeList": false, + "Notification": false, + "NotifyPaintEvent": false, + "NotRestoredReasonDetails": false, + "NotRestoredReasons": false, + "Observable": false, + "OfflineAudioCompletionEvent": false, + "OfflineAudioContext": false, + "offscreenBuffering": false, + "OffscreenCanvas": false, + "OffscreenCanvasRenderingContext2D": false, + "onabort": true, + "onafterprint": true, + "onanimationcancel": true, + "onanimationend": true, + "onanimationiteration": true, + "onanimationstart": true, + "onappinstalled": true, + "onauxclick": true, + "onbeforeinput": true, + "onbeforeinstallprompt": true, + "onbeforematch": true, + "onbeforeprint": true, + "onbeforetoggle": true, + "onbeforeunload": true, + "onbeforexrselect": true, + "onblur": true, + "oncancel": true, + "oncanplay": true, + "oncanplaythrough": true, + "onchange": true, + "onclick": true, + "onclose": true, + "oncommand": true, + "oncontentvisibilityautostatechange": true, + "oncontextlost": true, + "oncontextmenu": true, + "oncontextrestored": true, + "oncopy": true, + "oncuechange": true, + "oncut": true, + "ondblclick": true, + "ondevicemotion": true, + "ondeviceorientation": true, + "ondeviceorientationabsolute": true, + "ondrag": true, + "ondragend": true, + "ondragenter": true, + "ondragleave": true, + "ondragover": true, + "ondragstart": true, + "ondrop": true, + "ondurationchange": true, + "onemptied": true, + "onended": true, + "onerror": true, + "onfocus": true, + "onformdata": true, + "ongamepadconnected": true, + "ongamepaddisconnected": true, + "ongotpointercapture": true, + "onhashchange": true, + "oninput": true, + "oninvalid": true, + "onkeydown": true, + "onkeypress": true, + "onkeyup": true, + "onlanguagechange": true, + "onload": true, + "onloadeddata": true, + "onloadedmetadata": true, + "onloadstart": true, + "onlostpointercapture": true, + "onmessage": true, + "onmessageerror": true, + "onmousedown": true, + "onmouseenter": true, + "onmouseleave": true, + "onmousemove": true, + "onmouseout": true, + "onmouseover": true, + "onmouseup": true, + "onmousewheel": true, + "onoffline": true, + "ononline": true, + "onpagehide": true, + "onpagereveal": true, + "onpageshow": true, + "onpageswap": true, + "onpaste": true, + "onpause": true, + "onplay": true, + "onplaying": true, + "onpointercancel": true, + "onpointerdown": true, + "onpointerenter": true, + "onpointerleave": true, + "onpointermove": true, + "onpointerout": true, + "onpointerover": true, + "onpointerrawupdate": true, + "onpointerup": true, + "onpopstate": true, + "onprogress": true, + "onratechange": true, + "onrejectionhandled": true, + "onreset": true, + "onresize": true, + "onscroll": true, + "onscrollend": true, + "onscrollsnapchange": true, + "onscrollsnapchanging": true, + "onsearch": true, + "onsecuritypolicyviolation": true, + "onseeked": true, + "onseeking": true, + "onselect": true, + "onselectionchange": true, + "onselectstart": true, + "onslotchange": true, + "onstalled": true, + "onstorage": true, + "onsubmit": true, + "onsuspend": true, + "ontimeupdate": true, + "ontoggle": true, + "ontransitioncancel": true, + "ontransitionend": true, + "ontransitionrun": true, + "ontransitionstart": true, + "onunhandledrejection": true, + "onunload": true, + "onvolumechange": true, + "onwaiting": true, + "onwheel": true, + "open": false, + "opener": false, + "Option": false, + "OrientationSensor": false, + "origin": false, + "originAgentCluster": false, + "OscillatorNode": false, + "OTPCredential": false, + "outerHeight": false, + "outerWidth": false, + "OverconstrainedError": false, + "PageRevealEvent": false, + "PageSwapEvent": false, + "PageTransitionEvent": false, + "pageXOffset": false, + "pageYOffset": false, + "PannerNode": false, + "parent": false, + "PasswordCredential": false, + "Path2D": false, + "PaymentAddress": false, + "PaymentManager": false, + "PaymentMethodChangeEvent": false, + "PaymentRequest": false, + "PaymentRequestUpdateEvent": false, + "PaymentResponse": false, + "performance": false, + "Performance": false, + "PerformanceElementTiming": false, + "PerformanceEntry": false, + "PerformanceEventTiming": false, + "PerformanceLongAnimationFrameTiming": false, + "PerformanceLongTaskTiming": false, + "PerformanceMark": false, + "PerformanceMeasure": false, + "PerformanceNavigation": false, + "PerformanceNavigationTiming": false, + "PerformanceObserver": false, + "PerformanceObserverEntryList": false, + "PerformancePaintTiming": false, + "PerformanceResourceTiming": false, + "PerformanceScriptTiming": false, + "PerformanceServerTiming": false, + "PerformanceTiming": false, + "PeriodicSyncManager": false, + "PeriodicWave": false, + "Permissions": false, + "PermissionStatus": false, + "PERSISTENT": false, + "personalbar": false, + "PictureInPictureEvent": false, + "PictureInPictureWindow": false, + "Plugin": false, + "PluginArray": false, + "PointerEvent": false, + "PopStateEvent": false, + "postMessage": false, + "Presentation": false, + "PresentationAvailability": false, + "PresentationConnection": false, + "PresentationConnectionAvailableEvent": false, + "PresentationConnectionCloseEvent": false, + "PresentationConnectionList": false, + "PresentationReceiver": false, + "PresentationRequest": false, + "PressureObserver": false, + "PressureRecord": false, + "print": false, + "ProcessingInstruction": false, + "Profiler": false, + "ProgressEvent": false, + "PromiseRejectionEvent": false, + "prompt": false, + "ProtectedAudience": false, + "PublicKeyCredential": false, + "PushManager": false, + "PushSubscription": false, + "PushSubscriptionOptions": false, + "queryLocalFonts": false, + "queueMicrotask": false, + "QuotaExceededError": false, + "RadioNodeList": false, + "Range": false, + "ReadableByteStreamController": false, + "ReadableStream": false, + "ReadableStreamBYOBReader": false, + "ReadableStreamBYOBRequest": false, + "ReadableStreamDefaultController": false, + "ReadableStreamDefaultReader": false, + "registerProcessor": false, + "RelativeOrientationSensor": false, + "RemotePlayback": false, + "removeEventListener": false, + "ReportBody": false, + "reportError": false, + "ReportingObserver": false, + "Request": false, + "requestAnimationFrame": false, + "requestIdleCallback": false, + "resizeBy": false, + "ResizeObserver": false, + "ResizeObserverEntry": false, + "ResizeObserverSize": false, + "resizeTo": false, + "Response": false, + "RestrictionTarget": false, + "RTCCertificate": false, + "RTCDataChannel": false, + "RTCDataChannelEvent": false, + "RTCDtlsTransport": false, + "RTCDTMFSender": false, + "RTCDTMFToneChangeEvent": false, + "RTCEncodedAudioFrame": false, + "RTCEncodedVideoFrame": false, + "RTCError": false, + "RTCErrorEvent": false, + "RTCIceCandidate": false, + "RTCIceTransport": false, + "RTCPeerConnection": false, + "RTCPeerConnectionIceErrorEvent": false, + "RTCPeerConnectionIceEvent": false, + "RTCRtpReceiver": false, + "RTCRtpScriptTransform": false, + "RTCRtpSender": false, + "RTCRtpTransceiver": false, + "RTCSctpTransport": false, + "RTCSessionDescription": false, + "RTCStatsReport": false, + "RTCTrackEvent": false, + "sampleRate": false, + "scheduler": false, + "Scheduler": false, + "Scheduling": false, + "screen": false, + "Screen": false, + "ScreenDetailed": false, + "ScreenDetails": false, + "screenLeft": false, + "ScreenOrientation": false, + "screenTop": false, + "screenX": false, + "screenY": false, + "ScriptProcessorNode": false, + "scroll": false, + "scrollbars": false, + "scrollBy": false, + "ScrollTimeline": false, + "scrollTo": false, + "scrollX": false, + "scrollY": false, + "SecurityPolicyViolationEvent": false, + "Selection": false, + "self": false, + "Sensor": false, + "SensorErrorEvent": false, + "Serial": false, + "SerialPort": false, + "ServiceWorker": false, + "ServiceWorkerContainer": false, + "ServiceWorkerRegistration": false, + "sessionStorage": false, + "setInterval": false, + "setTimeout": false, + "ShadowRoot": false, + "sharedStorage": false, + "SharedStorage": false, + "SharedStorageAppendMethod": false, + "SharedStorageClearMethod": false, + "SharedStorageDeleteMethod": false, + "SharedStorageModifierMethod": false, + "SharedStorageSetMethod": false, + "SharedStorageWorklet": false, + "SharedWorker": false, + "showDirectoryPicker": false, + "showOpenFilePicker": false, + "showSaveFilePicker": false, + "SnapEvent": false, + "SourceBuffer": false, + "SourceBufferList": false, + "SpeechGrammar": false, + "SpeechGrammarList": false, + "SpeechRecognition": false, + "SpeechRecognitionErrorEvent": false, + "SpeechRecognitionEvent": false, + "SpeechRecognitionPhrase": false, + "speechSynthesis": false, + "SpeechSynthesis": false, + "SpeechSynthesisErrorEvent": false, + "SpeechSynthesisEvent": false, + "SpeechSynthesisUtterance": false, + "SpeechSynthesisVoice": false, + "StaticRange": false, + "status": false, + "statusbar": false, + "StereoPannerNode": false, + "stop": false, + "Storage": false, + "StorageBucket": false, + "StorageBucketManager": false, + "StorageEvent": false, + "StorageManager": false, + "structuredClone": false, + "styleMedia": false, + "StylePropertyMap": false, + "StylePropertyMapReadOnly": false, + "StyleSheet": false, + "StyleSheetList": false, + "SubmitEvent": false, + "Subscriber": false, + "SubtleCrypto": false, + "Summarizer": false, + "SuppressedError": false, + "SVGAElement": false, + "SVGAngle": false, + "SVGAnimatedAngle": false, + "SVGAnimatedBoolean": false, + "SVGAnimatedEnumeration": false, + "SVGAnimatedInteger": false, + "SVGAnimatedLength": false, + "SVGAnimatedLengthList": false, + "SVGAnimatedNumber": false, + "SVGAnimatedNumberList": false, + "SVGAnimatedPreserveAspectRatio": false, + "SVGAnimatedRect": false, + "SVGAnimatedString": false, + "SVGAnimatedTransformList": false, + "SVGAnimateElement": false, + "SVGAnimateMotionElement": false, + "SVGAnimateTransformElement": false, + "SVGAnimationElement": false, + "SVGCircleElement": false, + "SVGClipPathElement": false, + "SVGComponentTransferFunctionElement": false, + "SVGDefsElement": false, + "SVGDescElement": false, + "SVGElement": false, + "SVGEllipseElement": false, + "SVGFEBlendElement": false, + "SVGFEColorMatrixElement": false, + "SVGFEComponentTransferElement": false, + "SVGFECompositeElement": false, + "SVGFEConvolveMatrixElement": false, + "SVGFEDiffuseLightingElement": false, + "SVGFEDisplacementMapElement": false, + "SVGFEDistantLightElement": false, + "SVGFEDropShadowElement": false, + "SVGFEFloodElement": false, + "SVGFEFuncAElement": false, + "SVGFEFuncBElement": false, + "SVGFEFuncGElement": false, + "SVGFEFuncRElement": false, + "SVGFEGaussianBlurElement": false, + "SVGFEImageElement": false, + "SVGFEMergeElement": false, + "SVGFEMergeNodeElement": false, + "SVGFEMorphologyElement": false, + "SVGFEOffsetElement": false, + "SVGFEPointLightElement": false, + "SVGFESpecularLightingElement": false, + "SVGFESpotLightElement": false, + "SVGFETileElement": false, + "SVGFETurbulenceElement": false, + "SVGFilterElement": false, + "SVGForeignObjectElement": false, + "SVGGElement": false, + "SVGGeometryElement": false, + "SVGGradientElement": false, + "SVGGraphicsElement": false, + "SVGImageElement": false, + "SVGLength": false, + "SVGLengthList": false, + "SVGLinearGradientElement": false, + "SVGLineElement": false, + "SVGMarkerElement": false, + "SVGMaskElement": false, + "SVGMatrix": false, + "SVGMetadataElement": false, + "SVGMPathElement": false, + "SVGNumber": false, + "SVGNumberList": false, + "SVGPathElement": false, + "SVGPatternElement": false, + "SVGPoint": false, + "SVGPointList": false, + "SVGPolygonElement": false, + "SVGPolylineElement": false, + "SVGPreserveAspectRatio": false, + "SVGRadialGradientElement": false, + "SVGRect": false, + "SVGRectElement": false, + "SVGScriptElement": false, + "SVGSetElement": false, + "SVGStopElement": false, + "SVGStringList": false, + "SVGStyleElement": false, + "SVGSVGElement": false, + "SVGSwitchElement": false, + "SVGSymbolElement": false, + "SVGTextContentElement": false, + "SVGTextElement": false, + "SVGTextPathElement": false, + "SVGTextPositioningElement": false, + "SVGTitleElement": false, + "SVGTransform": false, + "SVGTransformList": false, + "SVGTSpanElement": false, + "SVGUnitTypes": false, + "SVGUseElement": false, + "SVGViewElement": false, + "SyncManager": false, + "TaskAttributionTiming": false, + "TaskController": false, + "TaskPriorityChangeEvent": false, + "TaskSignal": false, + "TEMPORARY": false, + "Text": false, + "TextDecoder": false, + "TextDecoderStream": false, + "TextEncoder": false, + "TextEncoderStream": false, + "TextEvent": false, + "TextFormat": false, + "TextFormatUpdateEvent": false, + "TextMetrics": false, + "TextTrack": false, + "TextTrackCue": false, + "TextTrackCueList": false, + "TextTrackList": false, + "TextUpdateEvent": false, + "TimeEvent": false, + "TimeRanges": false, + "ToggleEvent": false, + "toolbar": false, + "top": false, + "Touch": false, + "TouchEvent": false, + "TouchList": false, + "TrackEvent": false, + "TransformStream": false, + "TransformStreamDefaultController": false, + "TransitionEvent": false, + "Translator": false, + "TreeWalker": false, + "TrustedHTML": false, + "TrustedScript": false, + "TrustedScriptURL": false, + "TrustedTypePolicy": false, + "TrustedTypePolicyFactory": false, + "trustedTypes": false, + "UIEvent": false, + "URL": false, + "URLPattern": false, + "URLSearchParams": false, + "USB": false, + "USBAlternateInterface": false, + "USBConfiguration": false, + "USBConnectionEvent": false, + "USBDevice": false, + "USBEndpoint": false, + "USBInterface": false, + "USBInTransferResult": false, + "USBIsochronousInTransferPacket": false, + "USBIsochronousInTransferResult": false, + "USBIsochronousOutTransferPacket": false, + "USBIsochronousOutTransferResult": false, + "USBOutTransferResult": false, + "UserActivation": false, + "ValidityState": false, + "VideoColorSpace": false, + "VideoDecoder": false, + "VideoEncoder": false, + "VideoFrame": false, + "VideoPlaybackQuality": false, + "viewport": false, + "Viewport": false, + "ViewTimeline": false, + "ViewTransition": false, + "ViewTransitionTypeSet": false, + "VirtualKeyboard": false, + "VirtualKeyboardGeometryChangeEvent": false, + "VisibilityStateEntry": false, + "visualViewport": false, + "VisualViewport": false, + "VTTCue": false, + "VTTRegion": false, + "WakeLock": false, + "WakeLockSentinel": false, + "WaveShaperNode": false, + "WebAssembly": false, + "WebGL2RenderingContext": false, + "WebGLActiveInfo": false, + "WebGLBuffer": false, + "WebGLContextEvent": false, + "WebGLFramebuffer": false, + "WebGLObject": false, + "WebGLProgram": false, + "WebGLQuery": false, + "WebGLRenderbuffer": false, + "WebGLRenderingContext": false, + "WebGLSampler": false, + "WebGLShader": false, + "WebGLShaderPrecisionFormat": false, + "WebGLSync": false, + "WebGLTexture": false, + "WebGLTransformFeedback": false, + "WebGLUniformLocation": false, + "WebGLVertexArrayObject": false, + "WebSocket": false, + "WebSocketError": false, + "WebSocketStream": false, + "WebTransport": false, + "WebTransportBidirectionalStream": false, + "WebTransportDatagramDuplexStream": false, + "WebTransportError": false, + "WebTransportReceiveStream": false, + "WebTransportSendStream": false, + "WGSLLanguageFeatures": false, + "WheelEvent": false, + "when": false, + "window": false, + "Window": false, + "WindowControlsOverlay": false, + "WindowControlsOverlayGeometryChangeEvent": false, + "Worker": false, + "Worklet": false, + "WorkletGlobalScope": false, + "WritableStream": false, + "WritableStreamDefaultController": false, + "WritableStreamDefaultWriter": false, + "XMLDocument": false, + "XMLHttpRequest": false, + "XMLHttpRequestEventTarget": false, + "XMLHttpRequestUpload": false, + "XMLSerializer": false, + "XPathEvaluator": false, + "XPathExpression": false, + "XPathResult": false, + "XRAnchor": false, + "XRAnchorSet": false, + "XRBoundedReferenceSpace": false, + "XRCamera": false, + "XRCPUDepthInformation": false, + "XRDepthInformation": false, + "XRDOMOverlayState": false, + "XRFrame": false, + "XRHand": false, + "XRHitTestResult": false, + "XRHitTestSource": false, + "XRInputSource": false, + "XRInputSourceArray": false, + "XRInputSourceEvent": false, + "XRInputSourcesChangeEvent": false, + "XRJointPose": false, + "XRJointSpace": false, + "XRLayer": false, + "XRLightEstimate": false, + "XRLightProbe": false, + "XRPose": false, + "XRRay": false, + "XRReferenceSpace": false, + "XRReferenceSpaceEvent": false, + "XRRenderState": false, + "XRRigidTransform": false, + "XRSession": false, + "XRSessionEvent": false, + "XRSpace": false, + "XRSystem": false, + "XRTransientInputHitTestResult": false, + "XRTransientInputHitTestSource": false, + "XRView": false, + "XRViewerPose": false, + "XRViewport": false, + "XRWebGLBinding": false, + "XRWebGLDepthInformation": false, + "XRWebGLLayer": false, + "XSLTProcessor": false + } + }, + "errors": [ + { + "messageId": "impliedEval" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-implied-eval > invalid + +```js +window.setTimeout('foo' + bar) +``` + +```json +{ + "languageOptions": { + "globals": { + "AbortController": false, + "AbortSignal": false, + "AbsoluteOrientationSensor": false, + "AbstractRange": false, + "Accelerometer": false, + "addEventListener": false, + "ai": false, + "AI": false, + "AICreateMonitor": false, + "AITextSession": false, + "alert": false, + "AnalyserNode": false, + "Animation": false, + "AnimationEffect": false, + "AnimationEvent": false, + "AnimationPlaybackEvent": false, + "AnimationTimeline": false, + "AsyncDisposableStack": false, + "atob": false, + "Attr": false, + "Audio": false, + "AudioBuffer": false, + "AudioBufferSourceNode": false, + "AudioContext": false, + "AudioData": false, + "AudioDecoder": false, + "AudioDestinationNode": false, + "AudioEncoder": false, + "AudioListener": false, + "AudioNode": false, + "AudioParam": false, + "AudioParamMap": false, + "AudioProcessingEvent": false, + "AudioScheduledSourceNode": false, + "AudioSinkInfo": false, + "AudioWorklet": false, + "AudioWorkletGlobalScope": false, + "AudioWorkletNode": false, + "AudioWorkletProcessor": false, + "AuthenticatorAssertionResponse": false, + "AuthenticatorAttestationResponse": false, + "AuthenticatorResponse": false, + "BackgroundFetchManager": false, + "BackgroundFetchRecord": false, + "BackgroundFetchRegistration": false, + "BarcodeDetector": false, + "BarProp": false, + "BaseAudioContext": false, + "BatteryManager": false, + "BeforeUnloadEvent": false, + "BiquadFilterNode": false, + "Blob": false, + "BlobEvent": false, + "Bluetooth": false, + "BluetoothCharacteristicProperties": false, + "BluetoothDevice": false, + "BluetoothRemoteGATTCharacteristic": false, + "BluetoothRemoteGATTDescriptor": false, + "BluetoothRemoteGATTServer": false, + "BluetoothRemoteGATTService": false, + "BluetoothUUID": false, + "blur": false, + "BroadcastChannel": false, + "BrowserCaptureMediaStreamTrack": false, + "btoa": false, + "ByteLengthQueuingStrategy": false, + "Cache": false, + "caches": false, + "CacheStorage": false, + "cancelAnimationFrame": false, + "cancelIdleCallback": false, + "CanvasCaptureMediaStream": false, + "CanvasCaptureMediaStreamTrack": false, + "CanvasGradient": false, + "CanvasPattern": false, + "CanvasRenderingContext2D": false, + "CaptureController": false, + "CaretPosition": false, + "CDATASection": false, + "ChannelMergerNode": false, + "ChannelSplitterNode": false, + "ChapterInformation": false, + "CharacterBoundsUpdateEvent": false, + "CharacterData": false, + "clearInterval": false, + "clearTimeout": false, + "clientInformation": false, + "Clipboard": false, + "ClipboardChangeEvent": false, + "ClipboardEvent": false, + "ClipboardItem": false, + "close": false, + "closed": false, + "CloseEvent": false, + "CloseWatcher": false, + "CommandEvent": false, + "Comment": false, + "CompositionEvent": false, + "CompressionStream": false, + "confirm": false, + "console": false, + "ConstantSourceNode": false, + "ContentVisibilityAutoStateChangeEvent": false, + "ConvolverNode": false, + "CookieChangeEvent": false, + "CookieDeprecationLabel": false, + "cookieStore": false, + "CookieStore": false, + "CookieStoreManager": false, + "CountQueuingStrategy": false, + "createImageBitmap": false, + "CreateMonitor": false, + "Credential": false, + "credentialless": false, + "CredentialsContainer": false, + "CropTarget": false, + "crossOriginIsolated": false, + "crypto": false, + "Crypto": false, + "CryptoKey": false, + "CSPViolationReportBody": false, + "CSS": false, + "CSSAnimation": false, + "CSSConditionRule": false, + "CSSContainerRule": false, + "CSSCounterStyleRule": false, + "CSSFontFaceRule": false, + "CSSFontFeatureValuesRule": false, + "CSSFontPaletteValuesRule": false, + "CSSFunctionDeclarations": false, + "CSSFunctionDescriptors": false, + "CSSFunctionRule": false, + "CSSGroupingRule": false, + "CSSImageValue": false, + "CSSImportRule": false, + "CSSKeyframeRule": false, + "CSSKeyframesRule": false, + "CSSKeywordValue": false, + "CSSLayerBlockRule": false, + "CSSLayerStatementRule": false, + "CSSMarginRule": false, + "CSSMathClamp": false, + "CSSMathInvert": false, + "CSSMathMax": false, + "CSSMathMin": false, + "CSSMathNegate": false, + "CSSMathProduct": false, + "CSSMathSum": false, + "CSSMathValue": false, + "CSSMatrixComponent": false, + "CSSMediaRule": false, + "CSSNamespaceRule": false, + "CSSNestedDeclarations": false, + "CSSNumericArray": false, + "CSSNumericValue": false, + "CSSPageDescriptors": false, + "CSSPageRule": false, + "CSSPerspective": false, + "CSSPositionTryDescriptors": false, + "CSSPositionTryRule": false, + "CSSPositionValue": false, + "CSSPropertyRule": false, + "CSSRotate": false, + "CSSRule": false, + "CSSRuleList": false, + "CSSScale": false, + "CSSScopeRule": false, + "CSSSkew": false, + "CSSSkewX": false, + "CSSSkewY": false, + "CSSStartingStyleRule": false, + "CSSStyleDeclaration": false, + "CSSStyleRule": false, + "CSSStyleSheet": false, + "CSSStyleValue": false, + "CSSSupportsRule": false, + "CSSTransformComponent": false, + "CSSTransformValue": false, + "CSSTransition": false, + "CSSTranslate": false, + "CSSUnitValue": false, + "CSSUnparsedValue": false, + "CSSVariableReferenceValue": false, + "CSSViewTransitionRule": false, + "currentFrame": false, + "currentTime": false, + "CustomElementRegistry": false, + "customElements": false, + "CustomEvent": false, + "CustomStateSet": false, + "DataTransfer": false, + "DataTransferItem": false, + "DataTransferItemList": false, + "DecompressionStream": false, + "DelayNode": false, + "DelegatedInkTrailPresenter": false, + "DeviceMotionEvent": false, + "DeviceMotionEventAcceleration": false, + "DeviceMotionEventRotationRate": false, + "DeviceOrientationEvent": false, + "devicePixelRatio": false, + "DevicePosture": false, + "DigitalCredential": false, + "dispatchEvent": false, + "DisposableStack": false, + "document": false, + "Document": false, + "DocumentFragment": false, + "documentPictureInPicture": false, + "DocumentPictureInPicture": false, + "DocumentPictureInPictureEvent": false, + "DocumentTimeline": false, + "DocumentType": false, + "DOMError": false, + "DOMException": false, + "DOMImplementation": false, + "DOMMatrix": false, + "DOMMatrixReadOnly": false, + "DOMParser": false, + "DOMPoint": false, + "DOMPointReadOnly": false, + "DOMQuad": false, + "DOMRect": false, + "DOMRectList": false, + "DOMRectReadOnly": false, + "DOMStringList": false, + "DOMStringMap": false, + "DOMTokenList": false, + "DragEvent": false, + "DynamicsCompressorNode": false, + "EditContext": false, + "Element": false, + "ElementInternals": false, + "EncodedAudioChunk": false, + "EncodedVideoChunk": false, + "ErrorEvent": false, + "event": false, + "Event": false, + "EventCounts": false, + "EventSource": false, + "EventTarget": false, + "external": false, + "External": false, + "EyeDropper": false, + "FeaturePolicy": false, + "FederatedCredential": false, + "fence": false, + "Fence": false, + "FencedFrameConfig": false, + "fetch": false, + "fetchLater": false, + "FetchLaterResult": false, + "File": false, + "FileList": false, + "FileReader": false, + "FileSystem": false, + "FileSystemDirectoryEntry": false, + "FileSystemDirectoryHandle": false, + "FileSystemDirectoryReader": false, + "FileSystemEntry": false, + "FileSystemFileEntry": false, + "FileSystemFileHandle": false, + "FileSystemHandle": false, + "FileSystemObserver": false, + "FileSystemWritableFileStream": false, + "find": false, + "focus": false, + "FocusEvent": false, + "FontData": false, + "FontFace": false, + "FontFaceSet": false, + "FontFaceSetLoadEvent": false, + "FormData": false, + "FormDataEvent": false, + "FragmentDirective": false, + "frameElement": false, + "frames": false, + "GainNode": false, + "Gamepad": false, + "GamepadAxisMoveEvent": false, + "GamepadButton": false, + "GamepadButtonEvent": false, + "GamepadEvent": false, + "GamepadHapticActuator": false, + "GamepadPose": false, + "Geolocation": false, + "GeolocationCoordinates": false, + "GeolocationPosition": false, + "GeolocationPositionError": false, + "getComputedStyle": false, + "getScreenDetails": false, + "getSelection": false, + "GPU": false, + "GPUAdapter": false, + "GPUAdapterInfo": false, + "GPUBindGroup": false, + "GPUBindGroupLayout": false, + "GPUBuffer": false, + "GPUBufferUsage": false, + "GPUCanvasContext": false, + "GPUColorWrite": false, + "GPUCommandBuffer": false, + "GPUCommandEncoder": false, + "GPUCompilationInfo": false, + "GPUCompilationMessage": false, + "GPUComputePassEncoder": false, + "GPUComputePipeline": false, + "GPUDevice": false, + "GPUDeviceLostInfo": false, + "GPUError": false, + "GPUExternalTexture": false, + "GPUInternalError": false, + "GPUMapMode": false, + "GPUOutOfMemoryError": false, + "GPUPipelineError": false, + "GPUPipelineLayout": false, + "GPUQuerySet": false, + "GPUQueue": false, + "GPURenderBundle": false, + "GPURenderBundleEncoder": false, + "GPURenderPassEncoder": false, + "GPURenderPipeline": false, + "GPUSampler": false, + "GPUShaderModule": false, + "GPUShaderStage": false, + "GPUSupportedFeatures": false, + "GPUSupportedLimits": false, + "GPUTexture": false, + "GPUTextureUsage": false, + "GPUTextureView": false, + "GPUUncapturedErrorEvent": false, + "GPUValidationError": false, + "GravitySensor": false, + "Gyroscope": false, + "HashChangeEvent": false, + "Headers": false, + "HID": false, + "HIDConnectionEvent": false, + "HIDDevice": false, + "HIDInputReportEvent": false, + "Highlight": false, + "HighlightRegistry": false, + "history": false, + "History": false, + "HTMLAllCollection": false, + "HTMLAnchorElement": false, + "HTMLAreaElement": false, + "HTMLAudioElement": false, + "HTMLBaseElement": false, + "HTMLBodyElement": false, + "HTMLBRElement": false, + "HTMLButtonElement": false, + "HTMLCanvasElement": false, + "HTMLCollection": false, + "HTMLDataElement": false, + "HTMLDataListElement": false, + "HTMLDetailsElement": false, + "HTMLDialogElement": false, + "HTMLDirectoryElement": false, + "HTMLDivElement": false, + "HTMLDListElement": false, + "HTMLDocument": false, + "HTMLElement": false, + "HTMLEmbedElement": false, + "HTMLFencedFrameElement": false, + "HTMLFieldSetElement": false, + "HTMLFontElement": false, + "HTMLFormControlsCollection": false, + "HTMLFormElement": false, + "HTMLFrameElement": false, + "HTMLFrameSetElement": false, + "HTMLHeadElement": false, + "HTMLHeadingElement": false, + "HTMLHRElement": false, + "HTMLHtmlElement": false, + "HTMLIFrameElement": false, + "HTMLImageElement": false, + "HTMLInputElement": false, + "HTMLLabelElement": false, + "HTMLLegendElement": false, + "HTMLLIElement": false, + "HTMLLinkElement": false, + "HTMLMapElement": false, + "HTMLMarqueeElement": false, + "HTMLMediaElement": false, + "HTMLMenuElement": false, + "HTMLMetaElement": false, + "HTMLMeterElement": false, + "HTMLModElement": false, + "HTMLObjectElement": false, + "HTMLOListElement": false, + "HTMLOptGroupElement": false, + "HTMLOptionElement": false, + "HTMLOptionsCollection": false, + "HTMLOutputElement": false, + "HTMLParagraphElement": false, + "HTMLParamElement": false, + "HTMLPictureElement": false, + "HTMLPreElement": false, + "HTMLProgressElement": false, + "HTMLQuoteElement": false, + "HTMLScriptElement": false, + "HTMLSelectedContentElement": false, + "HTMLSelectElement": false, + "HTMLSlotElement": false, + "HTMLSourceElement": false, + "HTMLSpanElement": false, + "HTMLStyleElement": false, + "HTMLTableCaptionElement": false, + "HTMLTableCellElement": false, + "HTMLTableColElement": false, + "HTMLTableElement": false, + "HTMLTableRowElement": false, + "HTMLTableSectionElement": false, + "HTMLTemplateElement": false, + "HTMLTextAreaElement": false, + "HTMLTimeElement": false, + "HTMLTitleElement": false, + "HTMLTrackElement": false, + "HTMLUListElement": false, + "HTMLUnknownElement": false, + "HTMLVideoElement": false, + "IDBCursor": false, + "IDBCursorWithValue": false, + "IDBDatabase": false, + "IDBFactory": false, + "IDBIndex": false, + "IDBKeyRange": false, + "IDBObjectStore": false, + "IDBOpenDBRequest": false, + "IDBRecord": false, + "IDBRequest": false, + "IDBTransaction": false, + "IDBVersionChangeEvent": false, + "IdentityCredential": false, + "IdentityCredentialError": false, + "IdentityProvider": false, + "IdleDeadline": false, + "IdleDetector": false, + "IIRFilterNode": false, + "Image": false, + "ImageBitmap": false, + "ImageBitmapRenderingContext": false, + "ImageCapture": false, + "ImageData": false, + "ImageDecoder": false, + "ImageTrack": false, + "ImageTrackList": false, + "indexedDB": false, + "Ink": false, + "innerHeight": false, + "innerWidth": false, + "InputDeviceCapabilities": false, + "InputDeviceInfo": false, + "InputEvent": false, + "IntegrityViolationReportBody": false, + "InterestEvent": false, + "IntersectionObserver": false, + "IntersectionObserverEntry": false, + "isSecureContext": false, + "Keyboard": false, + "KeyboardEvent": false, + "KeyboardLayoutMap": false, + "KeyframeEffect": false, + "LanguageDetector": false, + "LargestContentfulPaint": false, + "LaunchParams": false, + "launchQueue": false, + "LaunchQueue": false, + "LayoutShift": false, + "LayoutShiftAttribution": false, + "length": false, + "LinearAccelerationSensor": false, + "localStorage": false, + "location": true, + "Location": false, + "locationbar": false, + "Lock": false, + "LockManager": false, + "matchMedia": false, + "MathMLElement": false, + "MediaCapabilities": false, + "MediaCapabilitiesInfo": false, + "MediaDeviceInfo": false, + "MediaDevices": false, + "MediaElementAudioSourceNode": false, + "MediaEncryptedEvent": false, + "MediaError": false, + "MediaKeyError": false, + "MediaKeyMessageEvent": false, + "MediaKeys": false, + "MediaKeySession": false, + "MediaKeyStatusMap": false, + "MediaKeySystemAccess": false, + "MediaList": false, + "MediaMetadata": false, + "MediaQueryList": false, + "MediaQueryListEvent": false, + "MediaRecorder": false, + "MediaRecorderErrorEvent": false, + "MediaSession": false, + "MediaSource": false, + "MediaSourceHandle": false, + "MediaStream": false, + "MediaStreamAudioDestinationNode": false, + "MediaStreamAudioSourceNode": false, + "MediaStreamEvent": false, + "MediaStreamTrack": false, + "MediaStreamTrackAudioSourceNode": false, + "MediaStreamTrackAudioStats": false, + "MediaStreamTrackEvent": false, + "MediaStreamTrackGenerator": false, + "MediaStreamTrackProcessor": false, + "MediaStreamTrackVideoStats": false, + "menubar": false, + "MessageChannel": false, + "MessageEvent": false, + "MessagePort": false, + "MIDIAccess": false, + "MIDIConnectionEvent": false, + "MIDIInput": false, + "MIDIInputMap": false, + "MIDIMessageEvent": false, + "MIDIOutput": false, + "MIDIOutputMap": false, + "MIDIPort": false, + "MimeType": false, + "MimeTypeArray": false, + "model": false, + "ModelGenericSession": false, + "ModelManager": false, + "MouseEvent": false, + "moveBy": false, + "moveTo": false, + "MutationEvent": false, + "MutationObserver": false, + "MutationRecord": false, + "name": false, + "NamedNodeMap": false, + "NavigateEvent": false, + "navigation": false, + "Navigation": false, + "NavigationActivation": false, + "NavigationCurrentEntryChangeEvent": false, + "NavigationDestination": false, + "NavigationHistoryEntry": false, + "NavigationPrecommitController": false, + "NavigationPreloadManager": false, + "NavigationTransition": false, + "navigator": false, + "Navigator": false, + "NavigatorLogin": false, + "NavigatorManagedData": false, + "NavigatorUAData": false, + "NetworkInformation": false, + "Node": false, + "NodeFilter": false, + "NodeIterator": false, + "NodeList": false, + "Notification": false, + "NotifyPaintEvent": false, + "NotRestoredReasonDetails": false, + "NotRestoredReasons": false, + "Observable": false, + "OfflineAudioCompletionEvent": false, + "OfflineAudioContext": false, + "offscreenBuffering": false, + "OffscreenCanvas": false, + "OffscreenCanvasRenderingContext2D": false, + "onabort": true, + "onafterprint": true, + "onanimationcancel": true, + "onanimationend": true, + "onanimationiteration": true, + "onanimationstart": true, + "onappinstalled": true, + "onauxclick": true, + "onbeforeinput": true, + "onbeforeinstallprompt": true, + "onbeforematch": true, + "onbeforeprint": true, + "onbeforetoggle": true, + "onbeforeunload": true, + "onbeforexrselect": true, + "onblur": true, + "oncancel": true, + "oncanplay": true, + "oncanplaythrough": true, + "onchange": true, + "onclick": true, + "onclose": true, + "oncommand": true, + "oncontentvisibilityautostatechange": true, + "oncontextlost": true, + "oncontextmenu": true, + "oncontextrestored": true, + "oncopy": true, + "oncuechange": true, + "oncut": true, + "ondblclick": true, + "ondevicemotion": true, + "ondeviceorientation": true, + "ondeviceorientationabsolute": true, + "ondrag": true, + "ondragend": true, + "ondragenter": true, + "ondragleave": true, + "ondragover": true, + "ondragstart": true, + "ondrop": true, + "ondurationchange": true, + "onemptied": true, + "onended": true, + "onerror": true, + "onfocus": true, + "onformdata": true, + "ongamepadconnected": true, + "ongamepaddisconnected": true, + "ongotpointercapture": true, + "onhashchange": true, + "oninput": true, + "oninvalid": true, + "onkeydown": true, + "onkeypress": true, + "onkeyup": true, + "onlanguagechange": true, + "onload": true, + "onloadeddata": true, + "onloadedmetadata": true, + "onloadstart": true, + "onlostpointercapture": true, + "onmessage": true, + "onmessageerror": true, + "onmousedown": true, + "onmouseenter": true, + "onmouseleave": true, + "onmousemove": true, + "onmouseout": true, + "onmouseover": true, + "onmouseup": true, + "onmousewheel": true, + "onoffline": true, + "ononline": true, + "onpagehide": true, + "onpagereveal": true, + "onpageshow": true, + "onpageswap": true, + "onpaste": true, + "onpause": true, + "onplay": true, + "onplaying": true, + "onpointercancel": true, + "onpointerdown": true, + "onpointerenter": true, + "onpointerleave": true, + "onpointermove": true, + "onpointerout": true, + "onpointerover": true, + "onpointerrawupdate": true, + "onpointerup": true, + "onpopstate": true, + "onprogress": true, + "onratechange": true, + "onrejectionhandled": true, + "onreset": true, + "onresize": true, + "onscroll": true, + "onscrollend": true, + "onscrollsnapchange": true, + "onscrollsnapchanging": true, + "onsearch": true, + "onsecuritypolicyviolation": true, + "onseeked": true, + "onseeking": true, + "onselect": true, + "onselectionchange": true, + "onselectstart": true, + "onslotchange": true, + "onstalled": true, + "onstorage": true, + "onsubmit": true, + "onsuspend": true, + "ontimeupdate": true, + "ontoggle": true, + "ontransitioncancel": true, + "ontransitionend": true, + "ontransitionrun": true, + "ontransitionstart": true, + "onunhandledrejection": true, + "onunload": true, + "onvolumechange": true, + "onwaiting": true, + "onwheel": true, + "open": false, + "opener": false, + "Option": false, + "OrientationSensor": false, + "origin": false, + "originAgentCluster": false, + "OscillatorNode": false, + "OTPCredential": false, + "outerHeight": false, + "outerWidth": false, + "OverconstrainedError": false, + "PageRevealEvent": false, + "PageSwapEvent": false, + "PageTransitionEvent": false, + "pageXOffset": false, + "pageYOffset": false, + "PannerNode": false, + "parent": false, + "PasswordCredential": false, + "Path2D": false, + "PaymentAddress": false, + "PaymentManager": false, + "PaymentMethodChangeEvent": false, + "PaymentRequest": false, + "PaymentRequestUpdateEvent": false, + "PaymentResponse": false, + "performance": false, + "Performance": false, + "PerformanceElementTiming": false, + "PerformanceEntry": false, + "PerformanceEventTiming": false, + "PerformanceLongAnimationFrameTiming": false, + "PerformanceLongTaskTiming": false, + "PerformanceMark": false, + "PerformanceMeasure": false, + "PerformanceNavigation": false, + "PerformanceNavigationTiming": false, + "PerformanceObserver": false, + "PerformanceObserverEntryList": false, + "PerformancePaintTiming": false, + "PerformanceResourceTiming": false, + "PerformanceScriptTiming": false, + "PerformanceServerTiming": false, + "PerformanceTiming": false, + "PeriodicSyncManager": false, + "PeriodicWave": false, + "Permissions": false, + "PermissionStatus": false, + "PERSISTENT": false, + "personalbar": false, + "PictureInPictureEvent": false, + "PictureInPictureWindow": false, + "Plugin": false, + "PluginArray": false, + "PointerEvent": false, + "PopStateEvent": false, + "postMessage": false, + "Presentation": false, + "PresentationAvailability": false, + "PresentationConnection": false, + "PresentationConnectionAvailableEvent": false, + "PresentationConnectionCloseEvent": false, + "PresentationConnectionList": false, + "PresentationReceiver": false, + "PresentationRequest": false, + "PressureObserver": false, + "PressureRecord": false, + "print": false, + "ProcessingInstruction": false, + "Profiler": false, + "ProgressEvent": false, + "PromiseRejectionEvent": false, + "prompt": false, + "ProtectedAudience": false, + "PublicKeyCredential": false, + "PushManager": false, + "PushSubscription": false, + "PushSubscriptionOptions": false, + "queryLocalFonts": false, + "queueMicrotask": false, + "QuotaExceededError": false, + "RadioNodeList": false, + "Range": false, + "ReadableByteStreamController": false, + "ReadableStream": false, + "ReadableStreamBYOBReader": false, + "ReadableStreamBYOBRequest": false, + "ReadableStreamDefaultController": false, + "ReadableStreamDefaultReader": false, + "registerProcessor": false, + "RelativeOrientationSensor": false, + "RemotePlayback": false, + "removeEventListener": false, + "ReportBody": false, + "reportError": false, + "ReportingObserver": false, + "Request": false, + "requestAnimationFrame": false, + "requestIdleCallback": false, + "resizeBy": false, + "ResizeObserver": false, + "ResizeObserverEntry": false, + "ResizeObserverSize": false, + "resizeTo": false, + "Response": false, + "RestrictionTarget": false, + "RTCCertificate": false, + "RTCDataChannel": false, + "RTCDataChannelEvent": false, + "RTCDtlsTransport": false, + "RTCDTMFSender": false, + "RTCDTMFToneChangeEvent": false, + "RTCEncodedAudioFrame": false, + "RTCEncodedVideoFrame": false, + "RTCError": false, + "RTCErrorEvent": false, + "RTCIceCandidate": false, + "RTCIceTransport": false, + "RTCPeerConnection": false, + "RTCPeerConnectionIceErrorEvent": false, + "RTCPeerConnectionIceEvent": false, + "RTCRtpReceiver": false, + "RTCRtpScriptTransform": false, + "RTCRtpSender": false, + "RTCRtpTransceiver": false, + "RTCSctpTransport": false, + "RTCSessionDescription": false, + "RTCStatsReport": false, + "RTCTrackEvent": false, + "sampleRate": false, + "scheduler": false, + "Scheduler": false, + "Scheduling": false, + "screen": false, + "Screen": false, + "ScreenDetailed": false, + "ScreenDetails": false, + "screenLeft": false, + "ScreenOrientation": false, + "screenTop": false, + "screenX": false, + "screenY": false, + "ScriptProcessorNode": false, + "scroll": false, + "scrollbars": false, + "scrollBy": false, + "ScrollTimeline": false, + "scrollTo": false, + "scrollX": false, + "scrollY": false, + "SecurityPolicyViolationEvent": false, + "Selection": false, + "self": false, + "Sensor": false, + "SensorErrorEvent": false, + "Serial": false, + "SerialPort": false, + "ServiceWorker": false, + "ServiceWorkerContainer": false, + "ServiceWorkerRegistration": false, + "sessionStorage": false, + "setInterval": false, + "setTimeout": false, + "ShadowRoot": false, + "sharedStorage": false, + "SharedStorage": false, + "SharedStorageAppendMethod": false, + "SharedStorageClearMethod": false, + "SharedStorageDeleteMethod": false, + "SharedStorageModifierMethod": false, + "SharedStorageSetMethod": false, + "SharedStorageWorklet": false, + "SharedWorker": false, + "showDirectoryPicker": false, + "showOpenFilePicker": false, + "showSaveFilePicker": false, + "SnapEvent": false, + "SourceBuffer": false, + "SourceBufferList": false, + "SpeechGrammar": false, + "SpeechGrammarList": false, + "SpeechRecognition": false, + "SpeechRecognitionErrorEvent": false, + "SpeechRecognitionEvent": false, + "SpeechRecognitionPhrase": false, + "speechSynthesis": false, + "SpeechSynthesis": false, + "SpeechSynthesisErrorEvent": false, + "SpeechSynthesisEvent": false, + "SpeechSynthesisUtterance": false, + "SpeechSynthesisVoice": false, + "StaticRange": false, + "status": false, + "statusbar": false, + "StereoPannerNode": false, + "stop": false, + "Storage": false, + "StorageBucket": false, + "StorageBucketManager": false, + "StorageEvent": false, + "StorageManager": false, + "structuredClone": false, + "styleMedia": false, + "StylePropertyMap": false, + "StylePropertyMapReadOnly": false, + "StyleSheet": false, + "StyleSheetList": false, + "SubmitEvent": false, + "Subscriber": false, + "SubtleCrypto": false, + "Summarizer": false, + "SuppressedError": false, + "SVGAElement": false, + "SVGAngle": false, + "SVGAnimatedAngle": false, + "SVGAnimatedBoolean": false, + "SVGAnimatedEnumeration": false, + "SVGAnimatedInteger": false, + "SVGAnimatedLength": false, + "SVGAnimatedLengthList": false, + "SVGAnimatedNumber": false, + "SVGAnimatedNumberList": false, + "SVGAnimatedPreserveAspectRatio": false, + "SVGAnimatedRect": false, + "SVGAnimatedString": false, + "SVGAnimatedTransformList": false, + "SVGAnimateElement": false, + "SVGAnimateMotionElement": false, + "SVGAnimateTransformElement": false, + "SVGAnimationElement": false, + "SVGCircleElement": false, + "SVGClipPathElement": false, + "SVGComponentTransferFunctionElement": false, + "SVGDefsElement": false, + "SVGDescElement": false, + "SVGElement": false, + "SVGEllipseElement": false, + "SVGFEBlendElement": false, + "SVGFEColorMatrixElement": false, + "SVGFEComponentTransferElement": false, + "SVGFECompositeElement": false, + "SVGFEConvolveMatrixElement": false, + "SVGFEDiffuseLightingElement": false, + "SVGFEDisplacementMapElement": false, + "SVGFEDistantLightElement": false, + "SVGFEDropShadowElement": false, + "SVGFEFloodElement": false, + "SVGFEFuncAElement": false, + "SVGFEFuncBElement": false, + "SVGFEFuncGElement": false, + "SVGFEFuncRElement": false, + "SVGFEGaussianBlurElement": false, + "SVGFEImageElement": false, + "SVGFEMergeElement": false, + "SVGFEMergeNodeElement": false, + "SVGFEMorphologyElement": false, + "SVGFEOffsetElement": false, + "SVGFEPointLightElement": false, + "SVGFESpecularLightingElement": false, + "SVGFESpotLightElement": false, + "SVGFETileElement": false, + "SVGFETurbulenceElement": false, + "SVGFilterElement": false, + "SVGForeignObjectElement": false, + "SVGGElement": false, + "SVGGeometryElement": false, + "SVGGradientElement": false, + "SVGGraphicsElement": false, + "SVGImageElement": false, + "SVGLength": false, + "SVGLengthList": false, + "SVGLinearGradientElement": false, + "SVGLineElement": false, + "SVGMarkerElement": false, + "SVGMaskElement": false, + "SVGMatrix": false, + "SVGMetadataElement": false, + "SVGMPathElement": false, + "SVGNumber": false, + "SVGNumberList": false, + "SVGPathElement": false, + "SVGPatternElement": false, + "SVGPoint": false, + "SVGPointList": false, + "SVGPolygonElement": false, + "SVGPolylineElement": false, + "SVGPreserveAspectRatio": false, + "SVGRadialGradientElement": false, + "SVGRect": false, + "SVGRectElement": false, + "SVGScriptElement": false, + "SVGSetElement": false, + "SVGStopElement": false, + "SVGStringList": false, + "SVGStyleElement": false, + "SVGSVGElement": false, + "SVGSwitchElement": false, + "SVGSymbolElement": false, + "SVGTextContentElement": false, + "SVGTextElement": false, + "SVGTextPathElement": false, + "SVGTextPositioningElement": false, + "SVGTitleElement": false, + "SVGTransform": false, + "SVGTransformList": false, + "SVGTSpanElement": false, + "SVGUnitTypes": false, + "SVGUseElement": false, + "SVGViewElement": false, + "SyncManager": false, + "TaskAttributionTiming": false, + "TaskController": false, + "TaskPriorityChangeEvent": false, + "TaskSignal": false, + "TEMPORARY": false, + "Text": false, + "TextDecoder": false, + "TextDecoderStream": false, + "TextEncoder": false, + "TextEncoderStream": false, + "TextEvent": false, + "TextFormat": false, + "TextFormatUpdateEvent": false, + "TextMetrics": false, + "TextTrack": false, + "TextTrackCue": false, + "TextTrackCueList": false, + "TextTrackList": false, + "TextUpdateEvent": false, + "TimeEvent": false, + "TimeRanges": false, + "ToggleEvent": false, + "toolbar": false, + "top": false, + "Touch": false, + "TouchEvent": false, + "TouchList": false, + "TrackEvent": false, + "TransformStream": false, + "TransformStreamDefaultController": false, + "TransitionEvent": false, + "Translator": false, + "TreeWalker": false, + "TrustedHTML": false, + "TrustedScript": false, + "TrustedScriptURL": false, + "TrustedTypePolicy": false, + "TrustedTypePolicyFactory": false, + "trustedTypes": false, + "UIEvent": false, + "URL": false, + "URLPattern": false, + "URLSearchParams": false, + "USB": false, + "USBAlternateInterface": false, + "USBConfiguration": false, + "USBConnectionEvent": false, + "USBDevice": false, + "USBEndpoint": false, + "USBInterface": false, + "USBInTransferResult": false, + "USBIsochronousInTransferPacket": false, + "USBIsochronousInTransferResult": false, + "USBIsochronousOutTransferPacket": false, + "USBIsochronousOutTransferResult": false, + "USBOutTransferResult": false, + "UserActivation": false, + "ValidityState": false, + "VideoColorSpace": false, + "VideoDecoder": false, + "VideoEncoder": false, + "VideoFrame": false, + "VideoPlaybackQuality": false, + "viewport": false, + "Viewport": false, + "ViewTimeline": false, + "ViewTransition": false, + "ViewTransitionTypeSet": false, + "VirtualKeyboard": false, + "VirtualKeyboardGeometryChangeEvent": false, + "VisibilityStateEntry": false, + "visualViewport": false, + "VisualViewport": false, + "VTTCue": false, + "VTTRegion": false, + "WakeLock": false, + "WakeLockSentinel": false, + "WaveShaperNode": false, + "WebAssembly": false, + "WebGL2RenderingContext": false, + "WebGLActiveInfo": false, + "WebGLBuffer": false, + "WebGLContextEvent": false, + "WebGLFramebuffer": false, + "WebGLObject": false, + "WebGLProgram": false, + "WebGLQuery": false, + "WebGLRenderbuffer": false, + "WebGLRenderingContext": false, + "WebGLSampler": false, + "WebGLShader": false, + "WebGLShaderPrecisionFormat": false, + "WebGLSync": false, + "WebGLTexture": false, + "WebGLTransformFeedback": false, + "WebGLUniformLocation": false, + "WebGLVertexArrayObject": false, + "WebSocket": false, + "WebSocketError": false, + "WebSocketStream": false, + "WebTransport": false, + "WebTransportBidirectionalStream": false, + "WebTransportDatagramDuplexStream": false, + "WebTransportError": false, + "WebTransportReceiveStream": false, + "WebTransportSendStream": false, + "WGSLLanguageFeatures": false, + "WheelEvent": false, + "when": false, + "window": false, + "Window": false, + "WindowControlsOverlay": false, + "WindowControlsOverlayGeometryChangeEvent": false, + "Worker": false, + "Worklet": false, + "WorkletGlobalScope": false, + "WritableStream": false, + "WritableStreamDefaultController": false, + "WritableStreamDefaultWriter": false, + "XMLDocument": false, + "XMLHttpRequest": false, + "XMLHttpRequestEventTarget": false, + "XMLHttpRequestUpload": false, + "XMLSerializer": false, + "XPathEvaluator": false, + "XPathExpression": false, + "XPathResult": false, + "XRAnchor": false, + "XRAnchorSet": false, + "XRBoundedReferenceSpace": false, + "XRCamera": false, + "XRCPUDepthInformation": false, + "XRDepthInformation": false, + "XRDOMOverlayState": false, + "XRFrame": false, + "XRHand": false, + "XRHitTestResult": false, + "XRHitTestSource": false, + "XRInputSource": false, + "XRInputSourceArray": false, + "XRInputSourceEvent": false, + "XRInputSourcesChangeEvent": false, + "XRJointPose": false, + "XRJointSpace": false, + "XRLayer": false, + "XRLightEstimate": false, + "XRLightProbe": false, + "XRPose": false, + "XRRay": false, + "XRReferenceSpace": false, + "XRReferenceSpaceEvent": false, + "XRRenderState": false, + "XRRigidTransform": false, + "XRSession": false, + "XRSessionEvent": false, + "XRSpace": false, + "XRSystem": false, + "XRTransientInputHitTestResult": false, + "XRTransientInputHitTestSource": false, + "XRView": false, + "XRViewerPose": false, + "XRViewport": false, + "XRWebGLBinding": false, + "XRWebGLDepthInformation": false, + "XRWebGLLayer": false, + "XSLTProcessor": false + } + }, + "errors": [ + { + "messageId": "impliedEval" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-implied-eval > invalid + +```js +window.setTimeout(foo + 'bar') +``` + +```json +{ + "languageOptions": { + "globals": { + "AbortController": false, + "AbortSignal": false, + "AbsoluteOrientationSensor": false, + "AbstractRange": false, + "Accelerometer": false, + "addEventListener": false, + "ai": false, + "AI": false, + "AICreateMonitor": false, + "AITextSession": false, + "alert": false, + "AnalyserNode": false, + "Animation": false, + "AnimationEffect": false, + "AnimationEvent": false, + "AnimationPlaybackEvent": false, + "AnimationTimeline": false, + "AsyncDisposableStack": false, + "atob": false, + "Attr": false, + "Audio": false, + "AudioBuffer": false, + "AudioBufferSourceNode": false, + "AudioContext": false, + "AudioData": false, + "AudioDecoder": false, + "AudioDestinationNode": false, + "AudioEncoder": false, + "AudioListener": false, + "AudioNode": false, + "AudioParam": false, + "AudioParamMap": false, + "AudioProcessingEvent": false, + "AudioScheduledSourceNode": false, + "AudioSinkInfo": false, + "AudioWorklet": false, + "AudioWorkletGlobalScope": false, + "AudioWorkletNode": false, + "AudioWorkletProcessor": false, + "AuthenticatorAssertionResponse": false, + "AuthenticatorAttestationResponse": false, + "AuthenticatorResponse": false, + "BackgroundFetchManager": false, + "BackgroundFetchRecord": false, + "BackgroundFetchRegistration": false, + "BarcodeDetector": false, + "BarProp": false, + "BaseAudioContext": false, + "BatteryManager": false, + "BeforeUnloadEvent": false, + "BiquadFilterNode": false, + "Blob": false, + "BlobEvent": false, + "Bluetooth": false, + "BluetoothCharacteristicProperties": false, + "BluetoothDevice": false, + "BluetoothRemoteGATTCharacteristic": false, + "BluetoothRemoteGATTDescriptor": false, + "BluetoothRemoteGATTServer": false, + "BluetoothRemoteGATTService": false, + "BluetoothUUID": false, + "blur": false, + "BroadcastChannel": false, + "BrowserCaptureMediaStreamTrack": false, + "btoa": false, + "ByteLengthQueuingStrategy": false, + "Cache": false, + "caches": false, + "CacheStorage": false, + "cancelAnimationFrame": false, + "cancelIdleCallback": false, + "CanvasCaptureMediaStream": false, + "CanvasCaptureMediaStreamTrack": false, + "CanvasGradient": false, + "CanvasPattern": false, + "CanvasRenderingContext2D": false, + "CaptureController": false, + "CaretPosition": false, + "CDATASection": false, + "ChannelMergerNode": false, + "ChannelSplitterNode": false, + "ChapterInformation": false, + "CharacterBoundsUpdateEvent": false, + "CharacterData": false, + "clearInterval": false, + "clearTimeout": false, + "clientInformation": false, + "Clipboard": false, + "ClipboardChangeEvent": false, + "ClipboardEvent": false, + "ClipboardItem": false, + "close": false, + "closed": false, + "CloseEvent": false, + "CloseWatcher": false, + "CommandEvent": false, + "Comment": false, + "CompositionEvent": false, + "CompressionStream": false, + "confirm": false, + "console": false, + "ConstantSourceNode": false, + "ContentVisibilityAutoStateChangeEvent": false, + "ConvolverNode": false, + "CookieChangeEvent": false, + "CookieDeprecationLabel": false, + "cookieStore": false, + "CookieStore": false, + "CookieStoreManager": false, + "CountQueuingStrategy": false, + "createImageBitmap": false, + "CreateMonitor": false, + "Credential": false, + "credentialless": false, + "CredentialsContainer": false, + "CropTarget": false, + "crossOriginIsolated": false, + "crypto": false, + "Crypto": false, + "CryptoKey": false, + "CSPViolationReportBody": false, + "CSS": false, + "CSSAnimation": false, + "CSSConditionRule": false, + "CSSContainerRule": false, + "CSSCounterStyleRule": false, + "CSSFontFaceRule": false, + "CSSFontFeatureValuesRule": false, + "CSSFontPaletteValuesRule": false, + "CSSFunctionDeclarations": false, + "CSSFunctionDescriptors": false, + "CSSFunctionRule": false, + "CSSGroupingRule": false, + "CSSImageValue": false, + "CSSImportRule": false, + "CSSKeyframeRule": false, + "CSSKeyframesRule": false, + "CSSKeywordValue": false, + "CSSLayerBlockRule": false, + "CSSLayerStatementRule": false, + "CSSMarginRule": false, + "CSSMathClamp": false, + "CSSMathInvert": false, + "CSSMathMax": false, + "CSSMathMin": false, + "CSSMathNegate": false, + "CSSMathProduct": false, + "CSSMathSum": false, + "CSSMathValue": false, + "CSSMatrixComponent": false, + "CSSMediaRule": false, + "CSSNamespaceRule": false, + "CSSNestedDeclarations": false, + "CSSNumericArray": false, + "CSSNumericValue": false, + "CSSPageDescriptors": false, + "CSSPageRule": false, + "CSSPerspective": false, + "CSSPositionTryDescriptors": false, + "CSSPositionTryRule": false, + "CSSPositionValue": false, + "CSSPropertyRule": false, + "CSSRotate": false, + "CSSRule": false, + "CSSRuleList": false, + "CSSScale": false, + "CSSScopeRule": false, + "CSSSkew": false, + "CSSSkewX": false, + "CSSSkewY": false, + "CSSStartingStyleRule": false, + "CSSStyleDeclaration": false, + "CSSStyleRule": false, + "CSSStyleSheet": false, + "CSSStyleValue": false, + "CSSSupportsRule": false, + "CSSTransformComponent": false, + "CSSTransformValue": false, + "CSSTransition": false, + "CSSTranslate": false, + "CSSUnitValue": false, + "CSSUnparsedValue": false, + "CSSVariableReferenceValue": false, + "CSSViewTransitionRule": false, + "currentFrame": false, + "currentTime": false, + "CustomElementRegistry": false, + "customElements": false, + "CustomEvent": false, + "CustomStateSet": false, + "DataTransfer": false, + "DataTransferItem": false, + "DataTransferItemList": false, + "DecompressionStream": false, + "DelayNode": false, + "DelegatedInkTrailPresenter": false, + "DeviceMotionEvent": false, + "DeviceMotionEventAcceleration": false, + "DeviceMotionEventRotationRate": false, + "DeviceOrientationEvent": false, + "devicePixelRatio": false, + "DevicePosture": false, + "DigitalCredential": false, + "dispatchEvent": false, + "DisposableStack": false, + "document": false, + "Document": false, + "DocumentFragment": false, + "documentPictureInPicture": false, + "DocumentPictureInPicture": false, + "DocumentPictureInPictureEvent": false, + "DocumentTimeline": false, + "DocumentType": false, + "DOMError": false, + "DOMException": false, + "DOMImplementation": false, + "DOMMatrix": false, + "DOMMatrixReadOnly": false, + "DOMParser": false, + "DOMPoint": false, + "DOMPointReadOnly": false, + "DOMQuad": false, + "DOMRect": false, + "DOMRectList": false, + "DOMRectReadOnly": false, + "DOMStringList": false, + "DOMStringMap": false, + "DOMTokenList": false, + "DragEvent": false, + "DynamicsCompressorNode": false, + "EditContext": false, + "Element": false, + "ElementInternals": false, + "EncodedAudioChunk": false, + "EncodedVideoChunk": false, + "ErrorEvent": false, + "event": false, + "Event": false, + "EventCounts": false, + "EventSource": false, + "EventTarget": false, + "external": false, + "External": false, + "EyeDropper": false, + "FeaturePolicy": false, + "FederatedCredential": false, + "fence": false, + "Fence": false, + "FencedFrameConfig": false, + "fetch": false, + "fetchLater": false, + "FetchLaterResult": false, + "File": false, + "FileList": false, + "FileReader": false, + "FileSystem": false, + "FileSystemDirectoryEntry": false, + "FileSystemDirectoryHandle": false, + "FileSystemDirectoryReader": false, + "FileSystemEntry": false, + "FileSystemFileEntry": false, + "FileSystemFileHandle": false, + "FileSystemHandle": false, + "FileSystemObserver": false, + "FileSystemWritableFileStream": false, + "find": false, + "focus": false, + "FocusEvent": false, + "FontData": false, + "FontFace": false, + "FontFaceSet": false, + "FontFaceSetLoadEvent": false, + "FormData": false, + "FormDataEvent": false, + "FragmentDirective": false, + "frameElement": false, + "frames": false, + "GainNode": false, + "Gamepad": false, + "GamepadAxisMoveEvent": false, + "GamepadButton": false, + "GamepadButtonEvent": false, + "GamepadEvent": false, + "GamepadHapticActuator": false, + "GamepadPose": false, + "Geolocation": false, + "GeolocationCoordinates": false, + "GeolocationPosition": false, + "GeolocationPositionError": false, + "getComputedStyle": false, + "getScreenDetails": false, + "getSelection": false, + "GPU": false, + "GPUAdapter": false, + "GPUAdapterInfo": false, + "GPUBindGroup": false, + "GPUBindGroupLayout": false, + "GPUBuffer": false, + "GPUBufferUsage": false, + "GPUCanvasContext": false, + "GPUColorWrite": false, + "GPUCommandBuffer": false, + "GPUCommandEncoder": false, + "GPUCompilationInfo": false, + "GPUCompilationMessage": false, + "GPUComputePassEncoder": false, + "GPUComputePipeline": false, + "GPUDevice": false, + "GPUDeviceLostInfo": false, + "GPUError": false, + "GPUExternalTexture": false, + "GPUInternalError": false, + "GPUMapMode": false, + "GPUOutOfMemoryError": false, + "GPUPipelineError": false, + "GPUPipelineLayout": false, + "GPUQuerySet": false, + "GPUQueue": false, + "GPURenderBundle": false, + "GPURenderBundleEncoder": false, + "GPURenderPassEncoder": false, + "GPURenderPipeline": false, + "GPUSampler": false, + "GPUShaderModule": false, + "GPUShaderStage": false, + "GPUSupportedFeatures": false, + "GPUSupportedLimits": false, + "GPUTexture": false, + "GPUTextureUsage": false, + "GPUTextureView": false, + "GPUUncapturedErrorEvent": false, + "GPUValidationError": false, + "GravitySensor": false, + "Gyroscope": false, + "HashChangeEvent": false, + "Headers": false, + "HID": false, + "HIDConnectionEvent": false, + "HIDDevice": false, + "HIDInputReportEvent": false, + "Highlight": false, + "HighlightRegistry": false, + "history": false, + "History": false, + "HTMLAllCollection": false, + "HTMLAnchorElement": false, + "HTMLAreaElement": false, + "HTMLAudioElement": false, + "HTMLBaseElement": false, + "HTMLBodyElement": false, + "HTMLBRElement": false, + "HTMLButtonElement": false, + "HTMLCanvasElement": false, + "HTMLCollection": false, + "HTMLDataElement": false, + "HTMLDataListElement": false, + "HTMLDetailsElement": false, + "HTMLDialogElement": false, + "HTMLDirectoryElement": false, + "HTMLDivElement": false, + "HTMLDListElement": false, + "HTMLDocument": false, + "HTMLElement": false, + "HTMLEmbedElement": false, + "HTMLFencedFrameElement": false, + "HTMLFieldSetElement": false, + "HTMLFontElement": false, + "HTMLFormControlsCollection": false, + "HTMLFormElement": false, + "HTMLFrameElement": false, + "HTMLFrameSetElement": false, + "HTMLHeadElement": false, + "HTMLHeadingElement": false, + "HTMLHRElement": false, + "HTMLHtmlElement": false, + "HTMLIFrameElement": false, + "HTMLImageElement": false, + "HTMLInputElement": false, + "HTMLLabelElement": false, + "HTMLLegendElement": false, + "HTMLLIElement": false, + "HTMLLinkElement": false, + "HTMLMapElement": false, + "HTMLMarqueeElement": false, + "HTMLMediaElement": false, + "HTMLMenuElement": false, + "HTMLMetaElement": false, + "HTMLMeterElement": false, + "HTMLModElement": false, + "HTMLObjectElement": false, + "HTMLOListElement": false, + "HTMLOptGroupElement": false, + "HTMLOptionElement": false, + "HTMLOptionsCollection": false, + "HTMLOutputElement": false, + "HTMLParagraphElement": false, + "HTMLParamElement": false, + "HTMLPictureElement": false, + "HTMLPreElement": false, + "HTMLProgressElement": false, + "HTMLQuoteElement": false, + "HTMLScriptElement": false, + "HTMLSelectedContentElement": false, + "HTMLSelectElement": false, + "HTMLSlotElement": false, + "HTMLSourceElement": false, + "HTMLSpanElement": false, + "HTMLStyleElement": false, + "HTMLTableCaptionElement": false, + "HTMLTableCellElement": false, + "HTMLTableColElement": false, + "HTMLTableElement": false, + "HTMLTableRowElement": false, + "HTMLTableSectionElement": false, + "HTMLTemplateElement": false, + "HTMLTextAreaElement": false, + "HTMLTimeElement": false, + "HTMLTitleElement": false, + "HTMLTrackElement": false, + "HTMLUListElement": false, + "HTMLUnknownElement": false, + "HTMLVideoElement": false, + "IDBCursor": false, + "IDBCursorWithValue": false, + "IDBDatabase": false, + "IDBFactory": false, + "IDBIndex": false, + "IDBKeyRange": false, + "IDBObjectStore": false, + "IDBOpenDBRequest": false, + "IDBRecord": false, + "IDBRequest": false, + "IDBTransaction": false, + "IDBVersionChangeEvent": false, + "IdentityCredential": false, + "IdentityCredentialError": false, + "IdentityProvider": false, + "IdleDeadline": false, + "IdleDetector": false, + "IIRFilterNode": false, + "Image": false, + "ImageBitmap": false, + "ImageBitmapRenderingContext": false, + "ImageCapture": false, + "ImageData": false, + "ImageDecoder": false, + "ImageTrack": false, + "ImageTrackList": false, + "indexedDB": false, + "Ink": false, + "innerHeight": false, + "innerWidth": false, + "InputDeviceCapabilities": false, + "InputDeviceInfo": false, + "InputEvent": false, + "IntegrityViolationReportBody": false, + "InterestEvent": false, + "IntersectionObserver": false, + "IntersectionObserverEntry": false, + "isSecureContext": false, + "Keyboard": false, + "KeyboardEvent": false, + "KeyboardLayoutMap": false, + "KeyframeEffect": false, + "LanguageDetector": false, + "LargestContentfulPaint": false, + "LaunchParams": false, + "launchQueue": false, + "LaunchQueue": false, + "LayoutShift": false, + "LayoutShiftAttribution": false, + "length": false, + "LinearAccelerationSensor": false, + "localStorage": false, + "location": true, + "Location": false, + "locationbar": false, + "Lock": false, + "LockManager": false, + "matchMedia": false, + "MathMLElement": false, + "MediaCapabilities": false, + "MediaCapabilitiesInfo": false, + "MediaDeviceInfo": false, + "MediaDevices": false, + "MediaElementAudioSourceNode": false, + "MediaEncryptedEvent": false, + "MediaError": false, + "MediaKeyError": false, + "MediaKeyMessageEvent": false, + "MediaKeys": false, + "MediaKeySession": false, + "MediaKeyStatusMap": false, + "MediaKeySystemAccess": false, + "MediaList": false, + "MediaMetadata": false, + "MediaQueryList": false, + "MediaQueryListEvent": false, + "MediaRecorder": false, + "MediaRecorderErrorEvent": false, + "MediaSession": false, + "MediaSource": false, + "MediaSourceHandle": false, + "MediaStream": false, + "MediaStreamAudioDestinationNode": false, + "MediaStreamAudioSourceNode": false, + "MediaStreamEvent": false, + "MediaStreamTrack": false, + "MediaStreamTrackAudioSourceNode": false, + "MediaStreamTrackAudioStats": false, + "MediaStreamTrackEvent": false, + "MediaStreamTrackGenerator": false, + "MediaStreamTrackProcessor": false, + "MediaStreamTrackVideoStats": false, + "menubar": false, + "MessageChannel": false, + "MessageEvent": false, + "MessagePort": false, + "MIDIAccess": false, + "MIDIConnectionEvent": false, + "MIDIInput": false, + "MIDIInputMap": false, + "MIDIMessageEvent": false, + "MIDIOutput": false, + "MIDIOutputMap": false, + "MIDIPort": false, + "MimeType": false, + "MimeTypeArray": false, + "model": false, + "ModelGenericSession": false, + "ModelManager": false, + "MouseEvent": false, + "moveBy": false, + "moveTo": false, + "MutationEvent": false, + "MutationObserver": false, + "MutationRecord": false, + "name": false, + "NamedNodeMap": false, + "NavigateEvent": false, + "navigation": false, + "Navigation": false, + "NavigationActivation": false, + "NavigationCurrentEntryChangeEvent": false, + "NavigationDestination": false, + "NavigationHistoryEntry": false, + "NavigationPrecommitController": false, + "NavigationPreloadManager": false, + "NavigationTransition": false, + "navigator": false, + "Navigator": false, + "NavigatorLogin": false, + "NavigatorManagedData": false, + "NavigatorUAData": false, + "NetworkInformation": false, + "Node": false, + "NodeFilter": false, + "NodeIterator": false, + "NodeList": false, + "Notification": false, + "NotifyPaintEvent": false, + "NotRestoredReasonDetails": false, + "NotRestoredReasons": false, + "Observable": false, + "OfflineAudioCompletionEvent": false, + "OfflineAudioContext": false, + "offscreenBuffering": false, + "OffscreenCanvas": false, + "OffscreenCanvasRenderingContext2D": false, + "onabort": true, + "onafterprint": true, + "onanimationcancel": true, + "onanimationend": true, + "onanimationiteration": true, + "onanimationstart": true, + "onappinstalled": true, + "onauxclick": true, + "onbeforeinput": true, + "onbeforeinstallprompt": true, + "onbeforematch": true, + "onbeforeprint": true, + "onbeforetoggle": true, + "onbeforeunload": true, + "onbeforexrselect": true, + "onblur": true, + "oncancel": true, + "oncanplay": true, + "oncanplaythrough": true, + "onchange": true, + "onclick": true, + "onclose": true, + "oncommand": true, + "oncontentvisibilityautostatechange": true, + "oncontextlost": true, + "oncontextmenu": true, + "oncontextrestored": true, + "oncopy": true, + "oncuechange": true, + "oncut": true, + "ondblclick": true, + "ondevicemotion": true, + "ondeviceorientation": true, + "ondeviceorientationabsolute": true, + "ondrag": true, + "ondragend": true, + "ondragenter": true, + "ondragleave": true, + "ondragover": true, + "ondragstart": true, + "ondrop": true, + "ondurationchange": true, + "onemptied": true, + "onended": true, + "onerror": true, + "onfocus": true, + "onformdata": true, + "ongamepadconnected": true, + "ongamepaddisconnected": true, + "ongotpointercapture": true, + "onhashchange": true, + "oninput": true, + "oninvalid": true, + "onkeydown": true, + "onkeypress": true, + "onkeyup": true, + "onlanguagechange": true, + "onload": true, + "onloadeddata": true, + "onloadedmetadata": true, + "onloadstart": true, + "onlostpointercapture": true, + "onmessage": true, + "onmessageerror": true, + "onmousedown": true, + "onmouseenter": true, + "onmouseleave": true, + "onmousemove": true, + "onmouseout": true, + "onmouseover": true, + "onmouseup": true, + "onmousewheel": true, + "onoffline": true, + "ononline": true, + "onpagehide": true, + "onpagereveal": true, + "onpageshow": true, + "onpageswap": true, + "onpaste": true, + "onpause": true, + "onplay": true, + "onplaying": true, + "onpointercancel": true, + "onpointerdown": true, + "onpointerenter": true, + "onpointerleave": true, + "onpointermove": true, + "onpointerout": true, + "onpointerover": true, + "onpointerrawupdate": true, + "onpointerup": true, + "onpopstate": true, + "onprogress": true, + "onratechange": true, + "onrejectionhandled": true, + "onreset": true, + "onresize": true, + "onscroll": true, + "onscrollend": true, + "onscrollsnapchange": true, + "onscrollsnapchanging": true, + "onsearch": true, + "onsecuritypolicyviolation": true, + "onseeked": true, + "onseeking": true, + "onselect": true, + "onselectionchange": true, + "onselectstart": true, + "onslotchange": true, + "onstalled": true, + "onstorage": true, + "onsubmit": true, + "onsuspend": true, + "ontimeupdate": true, + "ontoggle": true, + "ontransitioncancel": true, + "ontransitionend": true, + "ontransitionrun": true, + "ontransitionstart": true, + "onunhandledrejection": true, + "onunload": true, + "onvolumechange": true, + "onwaiting": true, + "onwheel": true, + "open": false, + "opener": false, + "Option": false, + "OrientationSensor": false, + "origin": false, + "originAgentCluster": false, + "OscillatorNode": false, + "OTPCredential": false, + "outerHeight": false, + "outerWidth": false, + "OverconstrainedError": false, + "PageRevealEvent": false, + "PageSwapEvent": false, + "PageTransitionEvent": false, + "pageXOffset": false, + "pageYOffset": false, + "PannerNode": false, + "parent": false, + "PasswordCredential": false, + "Path2D": false, + "PaymentAddress": false, + "PaymentManager": false, + "PaymentMethodChangeEvent": false, + "PaymentRequest": false, + "PaymentRequestUpdateEvent": false, + "PaymentResponse": false, + "performance": false, + "Performance": false, + "PerformanceElementTiming": false, + "PerformanceEntry": false, + "PerformanceEventTiming": false, + "PerformanceLongAnimationFrameTiming": false, + "PerformanceLongTaskTiming": false, + "PerformanceMark": false, + "PerformanceMeasure": false, + "PerformanceNavigation": false, + "PerformanceNavigationTiming": false, + "PerformanceObserver": false, + "PerformanceObserverEntryList": false, + "PerformancePaintTiming": false, + "PerformanceResourceTiming": false, + "PerformanceScriptTiming": false, + "PerformanceServerTiming": false, + "PerformanceTiming": false, + "PeriodicSyncManager": false, + "PeriodicWave": false, + "Permissions": false, + "PermissionStatus": false, + "PERSISTENT": false, + "personalbar": false, + "PictureInPictureEvent": false, + "PictureInPictureWindow": false, + "Plugin": false, + "PluginArray": false, + "PointerEvent": false, + "PopStateEvent": false, + "postMessage": false, + "Presentation": false, + "PresentationAvailability": false, + "PresentationConnection": false, + "PresentationConnectionAvailableEvent": false, + "PresentationConnectionCloseEvent": false, + "PresentationConnectionList": false, + "PresentationReceiver": false, + "PresentationRequest": false, + "PressureObserver": false, + "PressureRecord": false, + "print": false, + "ProcessingInstruction": false, + "Profiler": false, + "ProgressEvent": false, + "PromiseRejectionEvent": false, + "prompt": false, + "ProtectedAudience": false, + "PublicKeyCredential": false, + "PushManager": false, + "PushSubscription": false, + "PushSubscriptionOptions": false, + "queryLocalFonts": false, + "queueMicrotask": false, + "QuotaExceededError": false, + "RadioNodeList": false, + "Range": false, + "ReadableByteStreamController": false, + "ReadableStream": false, + "ReadableStreamBYOBReader": false, + "ReadableStreamBYOBRequest": false, + "ReadableStreamDefaultController": false, + "ReadableStreamDefaultReader": false, + "registerProcessor": false, + "RelativeOrientationSensor": false, + "RemotePlayback": false, + "removeEventListener": false, + "ReportBody": false, + "reportError": false, + "ReportingObserver": false, + "Request": false, + "requestAnimationFrame": false, + "requestIdleCallback": false, + "resizeBy": false, + "ResizeObserver": false, + "ResizeObserverEntry": false, + "ResizeObserverSize": false, + "resizeTo": false, + "Response": false, + "RestrictionTarget": false, + "RTCCertificate": false, + "RTCDataChannel": false, + "RTCDataChannelEvent": false, + "RTCDtlsTransport": false, + "RTCDTMFSender": false, + "RTCDTMFToneChangeEvent": false, + "RTCEncodedAudioFrame": false, + "RTCEncodedVideoFrame": false, + "RTCError": false, + "RTCErrorEvent": false, + "RTCIceCandidate": false, + "RTCIceTransport": false, + "RTCPeerConnection": false, + "RTCPeerConnectionIceErrorEvent": false, + "RTCPeerConnectionIceEvent": false, + "RTCRtpReceiver": false, + "RTCRtpScriptTransform": false, + "RTCRtpSender": false, + "RTCRtpTransceiver": false, + "RTCSctpTransport": false, + "RTCSessionDescription": false, + "RTCStatsReport": false, + "RTCTrackEvent": false, + "sampleRate": false, + "scheduler": false, + "Scheduler": false, + "Scheduling": false, + "screen": false, + "Screen": false, + "ScreenDetailed": false, + "ScreenDetails": false, + "screenLeft": false, + "ScreenOrientation": false, + "screenTop": false, + "screenX": false, + "screenY": false, + "ScriptProcessorNode": false, + "scroll": false, + "scrollbars": false, + "scrollBy": false, + "ScrollTimeline": false, + "scrollTo": false, + "scrollX": false, + "scrollY": false, + "SecurityPolicyViolationEvent": false, + "Selection": false, + "self": false, + "Sensor": false, + "SensorErrorEvent": false, + "Serial": false, + "SerialPort": false, + "ServiceWorker": false, + "ServiceWorkerContainer": false, + "ServiceWorkerRegistration": false, + "sessionStorage": false, + "setInterval": false, + "setTimeout": false, + "ShadowRoot": false, + "sharedStorage": false, + "SharedStorage": false, + "SharedStorageAppendMethod": false, + "SharedStorageClearMethod": false, + "SharedStorageDeleteMethod": false, + "SharedStorageModifierMethod": false, + "SharedStorageSetMethod": false, + "SharedStorageWorklet": false, + "SharedWorker": false, + "showDirectoryPicker": false, + "showOpenFilePicker": false, + "showSaveFilePicker": false, + "SnapEvent": false, + "SourceBuffer": false, + "SourceBufferList": false, + "SpeechGrammar": false, + "SpeechGrammarList": false, + "SpeechRecognition": false, + "SpeechRecognitionErrorEvent": false, + "SpeechRecognitionEvent": false, + "SpeechRecognitionPhrase": false, + "speechSynthesis": false, + "SpeechSynthesis": false, + "SpeechSynthesisErrorEvent": false, + "SpeechSynthesisEvent": false, + "SpeechSynthesisUtterance": false, + "SpeechSynthesisVoice": false, + "StaticRange": false, + "status": false, + "statusbar": false, + "StereoPannerNode": false, + "stop": false, + "Storage": false, + "StorageBucket": false, + "StorageBucketManager": false, + "StorageEvent": false, + "StorageManager": false, + "structuredClone": false, + "styleMedia": false, + "StylePropertyMap": false, + "StylePropertyMapReadOnly": false, + "StyleSheet": false, + "StyleSheetList": false, + "SubmitEvent": false, + "Subscriber": false, + "SubtleCrypto": false, + "Summarizer": false, + "SuppressedError": false, + "SVGAElement": false, + "SVGAngle": false, + "SVGAnimatedAngle": false, + "SVGAnimatedBoolean": false, + "SVGAnimatedEnumeration": false, + "SVGAnimatedInteger": false, + "SVGAnimatedLength": false, + "SVGAnimatedLengthList": false, + "SVGAnimatedNumber": false, + "SVGAnimatedNumberList": false, + "SVGAnimatedPreserveAspectRatio": false, + "SVGAnimatedRect": false, + "SVGAnimatedString": false, + "SVGAnimatedTransformList": false, + "SVGAnimateElement": false, + "SVGAnimateMotionElement": false, + "SVGAnimateTransformElement": false, + "SVGAnimationElement": false, + "SVGCircleElement": false, + "SVGClipPathElement": false, + "SVGComponentTransferFunctionElement": false, + "SVGDefsElement": false, + "SVGDescElement": false, + "SVGElement": false, + "SVGEllipseElement": false, + "SVGFEBlendElement": false, + "SVGFEColorMatrixElement": false, + "SVGFEComponentTransferElement": false, + "SVGFECompositeElement": false, + "SVGFEConvolveMatrixElement": false, + "SVGFEDiffuseLightingElement": false, + "SVGFEDisplacementMapElement": false, + "SVGFEDistantLightElement": false, + "SVGFEDropShadowElement": false, + "SVGFEFloodElement": false, + "SVGFEFuncAElement": false, + "SVGFEFuncBElement": false, + "SVGFEFuncGElement": false, + "SVGFEFuncRElement": false, + "SVGFEGaussianBlurElement": false, + "SVGFEImageElement": false, + "SVGFEMergeElement": false, + "SVGFEMergeNodeElement": false, + "SVGFEMorphologyElement": false, + "SVGFEOffsetElement": false, + "SVGFEPointLightElement": false, + "SVGFESpecularLightingElement": false, + "SVGFESpotLightElement": false, + "SVGFETileElement": false, + "SVGFETurbulenceElement": false, + "SVGFilterElement": false, + "SVGForeignObjectElement": false, + "SVGGElement": false, + "SVGGeometryElement": false, + "SVGGradientElement": false, + "SVGGraphicsElement": false, + "SVGImageElement": false, + "SVGLength": false, + "SVGLengthList": false, + "SVGLinearGradientElement": false, + "SVGLineElement": false, + "SVGMarkerElement": false, + "SVGMaskElement": false, + "SVGMatrix": false, + "SVGMetadataElement": false, + "SVGMPathElement": false, + "SVGNumber": false, + "SVGNumberList": false, + "SVGPathElement": false, + "SVGPatternElement": false, + "SVGPoint": false, + "SVGPointList": false, + "SVGPolygonElement": false, + "SVGPolylineElement": false, + "SVGPreserveAspectRatio": false, + "SVGRadialGradientElement": false, + "SVGRect": false, + "SVGRectElement": false, + "SVGScriptElement": false, + "SVGSetElement": false, + "SVGStopElement": false, + "SVGStringList": false, + "SVGStyleElement": false, + "SVGSVGElement": false, + "SVGSwitchElement": false, + "SVGSymbolElement": false, + "SVGTextContentElement": false, + "SVGTextElement": false, + "SVGTextPathElement": false, + "SVGTextPositioningElement": false, + "SVGTitleElement": false, + "SVGTransform": false, + "SVGTransformList": false, + "SVGTSpanElement": false, + "SVGUnitTypes": false, + "SVGUseElement": false, + "SVGViewElement": false, + "SyncManager": false, + "TaskAttributionTiming": false, + "TaskController": false, + "TaskPriorityChangeEvent": false, + "TaskSignal": false, + "TEMPORARY": false, + "Text": false, + "TextDecoder": false, + "TextDecoderStream": false, + "TextEncoder": false, + "TextEncoderStream": false, + "TextEvent": false, + "TextFormat": false, + "TextFormatUpdateEvent": false, + "TextMetrics": false, + "TextTrack": false, + "TextTrackCue": false, + "TextTrackCueList": false, + "TextTrackList": false, + "TextUpdateEvent": false, + "TimeEvent": false, + "TimeRanges": false, + "ToggleEvent": false, + "toolbar": false, + "top": false, + "Touch": false, + "TouchEvent": false, + "TouchList": false, + "TrackEvent": false, + "TransformStream": false, + "TransformStreamDefaultController": false, + "TransitionEvent": false, + "Translator": false, + "TreeWalker": false, + "TrustedHTML": false, + "TrustedScript": false, + "TrustedScriptURL": false, + "TrustedTypePolicy": false, + "TrustedTypePolicyFactory": false, + "trustedTypes": false, + "UIEvent": false, + "URL": false, + "URLPattern": false, + "URLSearchParams": false, + "USB": false, + "USBAlternateInterface": false, + "USBConfiguration": false, + "USBConnectionEvent": false, + "USBDevice": false, + "USBEndpoint": false, + "USBInterface": false, + "USBInTransferResult": false, + "USBIsochronousInTransferPacket": false, + "USBIsochronousInTransferResult": false, + "USBIsochronousOutTransferPacket": false, + "USBIsochronousOutTransferResult": false, + "USBOutTransferResult": false, + "UserActivation": false, + "ValidityState": false, + "VideoColorSpace": false, + "VideoDecoder": false, + "VideoEncoder": false, + "VideoFrame": false, + "VideoPlaybackQuality": false, + "viewport": false, + "Viewport": false, + "ViewTimeline": false, + "ViewTransition": false, + "ViewTransitionTypeSet": false, + "VirtualKeyboard": false, + "VirtualKeyboardGeometryChangeEvent": false, + "VisibilityStateEntry": false, + "visualViewport": false, + "VisualViewport": false, + "VTTCue": false, + "VTTRegion": false, + "WakeLock": false, + "WakeLockSentinel": false, + "WaveShaperNode": false, + "WebAssembly": false, + "WebGL2RenderingContext": false, + "WebGLActiveInfo": false, + "WebGLBuffer": false, + "WebGLContextEvent": false, + "WebGLFramebuffer": false, + "WebGLObject": false, + "WebGLProgram": false, + "WebGLQuery": false, + "WebGLRenderbuffer": false, + "WebGLRenderingContext": false, + "WebGLSampler": false, + "WebGLShader": false, + "WebGLShaderPrecisionFormat": false, + "WebGLSync": false, + "WebGLTexture": false, + "WebGLTransformFeedback": false, + "WebGLUniformLocation": false, + "WebGLVertexArrayObject": false, + "WebSocket": false, + "WebSocketError": false, + "WebSocketStream": false, + "WebTransport": false, + "WebTransportBidirectionalStream": false, + "WebTransportDatagramDuplexStream": false, + "WebTransportError": false, + "WebTransportReceiveStream": false, + "WebTransportSendStream": false, + "WGSLLanguageFeatures": false, + "WheelEvent": false, + "when": false, + "window": false, + "Window": false, + "WindowControlsOverlay": false, + "WindowControlsOverlayGeometryChangeEvent": false, + "Worker": false, + "Worklet": false, + "WorkletGlobalScope": false, + "WritableStream": false, + "WritableStreamDefaultController": false, + "WritableStreamDefaultWriter": false, + "XMLDocument": false, + "XMLHttpRequest": false, + "XMLHttpRequestEventTarget": false, + "XMLHttpRequestUpload": false, + "XMLSerializer": false, + "XPathEvaluator": false, + "XPathExpression": false, + "XPathResult": false, + "XRAnchor": false, + "XRAnchorSet": false, + "XRBoundedReferenceSpace": false, + "XRCamera": false, + "XRCPUDepthInformation": false, + "XRDepthInformation": false, + "XRDOMOverlayState": false, + "XRFrame": false, + "XRHand": false, + "XRHitTestResult": false, + "XRHitTestSource": false, + "XRInputSource": false, + "XRInputSourceArray": false, + "XRInputSourceEvent": false, + "XRInputSourcesChangeEvent": false, + "XRJointPose": false, + "XRJointSpace": false, + "XRLayer": false, + "XRLightEstimate": false, + "XRLightProbe": false, + "XRPose": false, + "XRRay": false, + "XRReferenceSpace": false, + "XRReferenceSpaceEvent": false, + "XRRenderState": false, + "XRRigidTransform": false, + "XRSession": false, + "XRSessionEvent": false, + "XRSpace": false, + "XRSystem": false, + "XRTransientInputHitTestResult": false, + "XRTransientInputHitTestSource": false, + "XRView": false, + "XRViewerPose": false, + "XRViewport": false, + "XRWebGLBinding": false, + "XRWebGLDepthInformation": false, + "XRWebGLLayer": false, + "XSLTProcessor": false + } + }, + "errors": [ + { + "messageId": "impliedEval" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-implied-eval > invalid + +```js +window.setTimeout(`foo` + bar) +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "globals": { + "AbortController": false, + "AbortSignal": false, + "AbsoluteOrientationSensor": false, + "AbstractRange": false, + "Accelerometer": false, + "addEventListener": false, + "ai": false, + "AI": false, + "AICreateMonitor": false, + "AITextSession": false, + "alert": false, + "AnalyserNode": false, + "Animation": false, + "AnimationEffect": false, + "AnimationEvent": false, + "AnimationPlaybackEvent": false, + "AnimationTimeline": false, + "AsyncDisposableStack": false, + "atob": false, + "Attr": false, + "Audio": false, + "AudioBuffer": false, + "AudioBufferSourceNode": false, + "AudioContext": false, + "AudioData": false, + "AudioDecoder": false, + "AudioDestinationNode": false, + "AudioEncoder": false, + "AudioListener": false, + "AudioNode": false, + "AudioParam": false, + "AudioParamMap": false, + "AudioProcessingEvent": false, + "AudioScheduledSourceNode": false, + "AudioSinkInfo": false, + "AudioWorklet": false, + "AudioWorkletGlobalScope": false, + "AudioWorkletNode": false, + "AudioWorkletProcessor": false, + "AuthenticatorAssertionResponse": false, + "AuthenticatorAttestationResponse": false, + "AuthenticatorResponse": false, + "BackgroundFetchManager": false, + "BackgroundFetchRecord": false, + "BackgroundFetchRegistration": false, + "BarcodeDetector": false, + "BarProp": false, + "BaseAudioContext": false, + "BatteryManager": false, + "BeforeUnloadEvent": false, + "BiquadFilterNode": false, + "Blob": false, + "BlobEvent": false, + "Bluetooth": false, + "BluetoothCharacteristicProperties": false, + "BluetoothDevice": false, + "BluetoothRemoteGATTCharacteristic": false, + "BluetoothRemoteGATTDescriptor": false, + "BluetoothRemoteGATTServer": false, + "BluetoothRemoteGATTService": false, + "BluetoothUUID": false, + "blur": false, + "BroadcastChannel": false, + "BrowserCaptureMediaStreamTrack": false, + "btoa": false, + "ByteLengthQueuingStrategy": false, + "Cache": false, + "caches": false, + "CacheStorage": false, + "cancelAnimationFrame": false, + "cancelIdleCallback": false, + "CanvasCaptureMediaStream": false, + "CanvasCaptureMediaStreamTrack": false, + "CanvasGradient": false, + "CanvasPattern": false, + "CanvasRenderingContext2D": false, + "CaptureController": false, + "CaretPosition": false, + "CDATASection": false, + "ChannelMergerNode": false, + "ChannelSplitterNode": false, + "ChapterInformation": false, + "CharacterBoundsUpdateEvent": false, + "CharacterData": false, + "clearInterval": false, + "clearTimeout": false, + "clientInformation": false, + "Clipboard": false, + "ClipboardChangeEvent": false, + "ClipboardEvent": false, + "ClipboardItem": false, + "close": false, + "closed": false, + "CloseEvent": false, + "CloseWatcher": false, + "CommandEvent": false, + "Comment": false, + "CompositionEvent": false, + "CompressionStream": false, + "confirm": false, + "console": false, + "ConstantSourceNode": false, + "ContentVisibilityAutoStateChangeEvent": false, + "ConvolverNode": false, + "CookieChangeEvent": false, + "CookieDeprecationLabel": false, + "cookieStore": false, + "CookieStore": false, + "CookieStoreManager": false, + "CountQueuingStrategy": false, + "createImageBitmap": false, + "CreateMonitor": false, + "Credential": false, + "credentialless": false, + "CredentialsContainer": false, + "CropTarget": false, + "crossOriginIsolated": false, + "crypto": false, + "Crypto": false, + "CryptoKey": false, + "CSPViolationReportBody": false, + "CSS": false, + "CSSAnimation": false, + "CSSConditionRule": false, + "CSSContainerRule": false, + "CSSCounterStyleRule": false, + "CSSFontFaceRule": false, + "CSSFontFeatureValuesRule": false, + "CSSFontPaletteValuesRule": false, + "CSSFunctionDeclarations": false, + "CSSFunctionDescriptors": false, + "CSSFunctionRule": false, + "CSSGroupingRule": false, + "CSSImageValue": false, + "CSSImportRule": false, + "CSSKeyframeRule": false, + "CSSKeyframesRule": false, + "CSSKeywordValue": false, + "CSSLayerBlockRule": false, + "CSSLayerStatementRule": false, + "CSSMarginRule": false, + "CSSMathClamp": false, + "CSSMathInvert": false, + "CSSMathMax": false, + "CSSMathMin": false, + "CSSMathNegate": false, + "CSSMathProduct": false, + "CSSMathSum": false, + "CSSMathValue": false, + "CSSMatrixComponent": false, + "CSSMediaRule": false, + "CSSNamespaceRule": false, + "CSSNestedDeclarations": false, + "CSSNumericArray": false, + "CSSNumericValue": false, + "CSSPageDescriptors": false, + "CSSPageRule": false, + "CSSPerspective": false, + "CSSPositionTryDescriptors": false, + "CSSPositionTryRule": false, + "CSSPositionValue": false, + "CSSPropertyRule": false, + "CSSRotate": false, + "CSSRule": false, + "CSSRuleList": false, + "CSSScale": false, + "CSSScopeRule": false, + "CSSSkew": false, + "CSSSkewX": false, + "CSSSkewY": false, + "CSSStartingStyleRule": false, + "CSSStyleDeclaration": false, + "CSSStyleRule": false, + "CSSStyleSheet": false, + "CSSStyleValue": false, + "CSSSupportsRule": false, + "CSSTransformComponent": false, + "CSSTransformValue": false, + "CSSTransition": false, + "CSSTranslate": false, + "CSSUnitValue": false, + "CSSUnparsedValue": false, + "CSSVariableReferenceValue": false, + "CSSViewTransitionRule": false, + "currentFrame": false, + "currentTime": false, + "CustomElementRegistry": false, + "customElements": false, + "CustomEvent": false, + "CustomStateSet": false, + "DataTransfer": false, + "DataTransferItem": false, + "DataTransferItemList": false, + "DecompressionStream": false, + "DelayNode": false, + "DelegatedInkTrailPresenter": false, + "DeviceMotionEvent": false, + "DeviceMotionEventAcceleration": false, + "DeviceMotionEventRotationRate": false, + "DeviceOrientationEvent": false, + "devicePixelRatio": false, + "DevicePosture": false, + "DigitalCredential": false, + "dispatchEvent": false, + "DisposableStack": false, + "document": false, + "Document": false, + "DocumentFragment": false, + "documentPictureInPicture": false, + "DocumentPictureInPicture": false, + "DocumentPictureInPictureEvent": false, + "DocumentTimeline": false, + "DocumentType": false, + "DOMError": false, + "DOMException": false, + "DOMImplementation": false, + "DOMMatrix": false, + "DOMMatrixReadOnly": false, + "DOMParser": false, + "DOMPoint": false, + "DOMPointReadOnly": false, + "DOMQuad": false, + "DOMRect": false, + "DOMRectList": false, + "DOMRectReadOnly": false, + "DOMStringList": false, + "DOMStringMap": false, + "DOMTokenList": false, + "DragEvent": false, + "DynamicsCompressorNode": false, + "EditContext": false, + "Element": false, + "ElementInternals": false, + "EncodedAudioChunk": false, + "EncodedVideoChunk": false, + "ErrorEvent": false, + "event": false, + "Event": false, + "EventCounts": false, + "EventSource": false, + "EventTarget": false, + "external": false, + "External": false, + "EyeDropper": false, + "FeaturePolicy": false, + "FederatedCredential": false, + "fence": false, + "Fence": false, + "FencedFrameConfig": false, + "fetch": false, + "fetchLater": false, + "FetchLaterResult": false, + "File": false, + "FileList": false, + "FileReader": false, + "FileSystem": false, + "FileSystemDirectoryEntry": false, + "FileSystemDirectoryHandle": false, + "FileSystemDirectoryReader": false, + "FileSystemEntry": false, + "FileSystemFileEntry": false, + "FileSystemFileHandle": false, + "FileSystemHandle": false, + "FileSystemObserver": false, + "FileSystemWritableFileStream": false, + "find": false, + "focus": false, + "FocusEvent": false, + "FontData": false, + "FontFace": false, + "FontFaceSet": false, + "FontFaceSetLoadEvent": false, + "FormData": false, + "FormDataEvent": false, + "FragmentDirective": false, + "frameElement": false, + "frames": false, + "GainNode": false, + "Gamepad": false, + "GamepadAxisMoveEvent": false, + "GamepadButton": false, + "GamepadButtonEvent": false, + "GamepadEvent": false, + "GamepadHapticActuator": false, + "GamepadPose": false, + "Geolocation": false, + "GeolocationCoordinates": false, + "GeolocationPosition": false, + "GeolocationPositionError": false, + "getComputedStyle": false, + "getScreenDetails": false, + "getSelection": false, + "GPU": false, + "GPUAdapter": false, + "GPUAdapterInfo": false, + "GPUBindGroup": false, + "GPUBindGroupLayout": false, + "GPUBuffer": false, + "GPUBufferUsage": false, + "GPUCanvasContext": false, + "GPUColorWrite": false, + "GPUCommandBuffer": false, + "GPUCommandEncoder": false, + "GPUCompilationInfo": false, + "GPUCompilationMessage": false, + "GPUComputePassEncoder": false, + "GPUComputePipeline": false, + "GPUDevice": false, + "GPUDeviceLostInfo": false, + "GPUError": false, + "GPUExternalTexture": false, + "GPUInternalError": false, + "GPUMapMode": false, + "GPUOutOfMemoryError": false, + "GPUPipelineError": false, + "GPUPipelineLayout": false, + "GPUQuerySet": false, + "GPUQueue": false, + "GPURenderBundle": false, + "GPURenderBundleEncoder": false, + "GPURenderPassEncoder": false, + "GPURenderPipeline": false, + "GPUSampler": false, + "GPUShaderModule": false, + "GPUShaderStage": false, + "GPUSupportedFeatures": false, + "GPUSupportedLimits": false, + "GPUTexture": false, + "GPUTextureUsage": false, + "GPUTextureView": false, + "GPUUncapturedErrorEvent": false, + "GPUValidationError": false, + "GravitySensor": false, + "Gyroscope": false, + "HashChangeEvent": false, + "Headers": false, + "HID": false, + "HIDConnectionEvent": false, + "HIDDevice": false, + "HIDInputReportEvent": false, + "Highlight": false, + "HighlightRegistry": false, + "history": false, + "History": false, + "HTMLAllCollection": false, + "HTMLAnchorElement": false, + "HTMLAreaElement": false, + "HTMLAudioElement": false, + "HTMLBaseElement": false, + "HTMLBodyElement": false, + "HTMLBRElement": false, + "HTMLButtonElement": false, + "HTMLCanvasElement": false, + "HTMLCollection": false, + "HTMLDataElement": false, + "HTMLDataListElement": false, + "HTMLDetailsElement": false, + "HTMLDialogElement": false, + "HTMLDirectoryElement": false, + "HTMLDivElement": false, + "HTMLDListElement": false, + "HTMLDocument": false, + "HTMLElement": false, + "HTMLEmbedElement": false, + "HTMLFencedFrameElement": false, + "HTMLFieldSetElement": false, + "HTMLFontElement": false, + "HTMLFormControlsCollection": false, + "HTMLFormElement": false, + "HTMLFrameElement": false, + "HTMLFrameSetElement": false, + "HTMLHeadElement": false, + "HTMLHeadingElement": false, + "HTMLHRElement": false, + "HTMLHtmlElement": false, + "HTMLIFrameElement": false, + "HTMLImageElement": false, + "HTMLInputElement": false, + "HTMLLabelElement": false, + "HTMLLegendElement": false, + "HTMLLIElement": false, + "HTMLLinkElement": false, + "HTMLMapElement": false, + "HTMLMarqueeElement": false, + "HTMLMediaElement": false, + "HTMLMenuElement": false, + "HTMLMetaElement": false, + "HTMLMeterElement": false, + "HTMLModElement": false, + "HTMLObjectElement": false, + "HTMLOListElement": false, + "HTMLOptGroupElement": false, + "HTMLOptionElement": false, + "HTMLOptionsCollection": false, + "HTMLOutputElement": false, + "HTMLParagraphElement": false, + "HTMLParamElement": false, + "HTMLPictureElement": false, + "HTMLPreElement": false, + "HTMLProgressElement": false, + "HTMLQuoteElement": false, + "HTMLScriptElement": false, + "HTMLSelectedContentElement": false, + "HTMLSelectElement": false, + "HTMLSlotElement": false, + "HTMLSourceElement": false, + "HTMLSpanElement": false, + "HTMLStyleElement": false, + "HTMLTableCaptionElement": false, + "HTMLTableCellElement": false, + "HTMLTableColElement": false, + "HTMLTableElement": false, + "HTMLTableRowElement": false, + "HTMLTableSectionElement": false, + "HTMLTemplateElement": false, + "HTMLTextAreaElement": false, + "HTMLTimeElement": false, + "HTMLTitleElement": false, + "HTMLTrackElement": false, + "HTMLUListElement": false, + "HTMLUnknownElement": false, + "HTMLVideoElement": false, + "IDBCursor": false, + "IDBCursorWithValue": false, + "IDBDatabase": false, + "IDBFactory": false, + "IDBIndex": false, + "IDBKeyRange": false, + "IDBObjectStore": false, + "IDBOpenDBRequest": false, + "IDBRecord": false, + "IDBRequest": false, + "IDBTransaction": false, + "IDBVersionChangeEvent": false, + "IdentityCredential": false, + "IdentityCredentialError": false, + "IdentityProvider": false, + "IdleDeadline": false, + "IdleDetector": false, + "IIRFilterNode": false, + "Image": false, + "ImageBitmap": false, + "ImageBitmapRenderingContext": false, + "ImageCapture": false, + "ImageData": false, + "ImageDecoder": false, + "ImageTrack": false, + "ImageTrackList": false, + "indexedDB": false, + "Ink": false, + "innerHeight": false, + "innerWidth": false, + "InputDeviceCapabilities": false, + "InputDeviceInfo": false, + "InputEvent": false, + "IntegrityViolationReportBody": false, + "InterestEvent": false, + "IntersectionObserver": false, + "IntersectionObserverEntry": false, + "isSecureContext": false, + "Keyboard": false, + "KeyboardEvent": false, + "KeyboardLayoutMap": false, + "KeyframeEffect": false, + "LanguageDetector": false, + "LargestContentfulPaint": false, + "LaunchParams": false, + "launchQueue": false, + "LaunchQueue": false, + "LayoutShift": false, + "LayoutShiftAttribution": false, + "length": false, + "LinearAccelerationSensor": false, + "localStorage": false, + "location": true, + "Location": false, + "locationbar": false, + "Lock": false, + "LockManager": false, + "matchMedia": false, + "MathMLElement": false, + "MediaCapabilities": false, + "MediaCapabilitiesInfo": false, + "MediaDeviceInfo": false, + "MediaDevices": false, + "MediaElementAudioSourceNode": false, + "MediaEncryptedEvent": false, + "MediaError": false, + "MediaKeyError": false, + "MediaKeyMessageEvent": false, + "MediaKeys": false, + "MediaKeySession": false, + "MediaKeyStatusMap": false, + "MediaKeySystemAccess": false, + "MediaList": false, + "MediaMetadata": false, + "MediaQueryList": false, + "MediaQueryListEvent": false, + "MediaRecorder": false, + "MediaRecorderErrorEvent": false, + "MediaSession": false, + "MediaSource": false, + "MediaSourceHandle": false, + "MediaStream": false, + "MediaStreamAudioDestinationNode": false, + "MediaStreamAudioSourceNode": false, + "MediaStreamEvent": false, + "MediaStreamTrack": false, + "MediaStreamTrackAudioSourceNode": false, + "MediaStreamTrackAudioStats": false, + "MediaStreamTrackEvent": false, + "MediaStreamTrackGenerator": false, + "MediaStreamTrackProcessor": false, + "MediaStreamTrackVideoStats": false, + "menubar": false, + "MessageChannel": false, + "MessageEvent": false, + "MessagePort": false, + "MIDIAccess": false, + "MIDIConnectionEvent": false, + "MIDIInput": false, + "MIDIInputMap": false, + "MIDIMessageEvent": false, + "MIDIOutput": false, + "MIDIOutputMap": false, + "MIDIPort": false, + "MimeType": false, + "MimeTypeArray": false, + "model": false, + "ModelGenericSession": false, + "ModelManager": false, + "MouseEvent": false, + "moveBy": false, + "moveTo": false, + "MutationEvent": false, + "MutationObserver": false, + "MutationRecord": false, + "name": false, + "NamedNodeMap": false, + "NavigateEvent": false, + "navigation": false, + "Navigation": false, + "NavigationActivation": false, + "NavigationCurrentEntryChangeEvent": false, + "NavigationDestination": false, + "NavigationHistoryEntry": false, + "NavigationPrecommitController": false, + "NavigationPreloadManager": false, + "NavigationTransition": false, + "navigator": false, + "Navigator": false, + "NavigatorLogin": false, + "NavigatorManagedData": false, + "NavigatorUAData": false, + "NetworkInformation": false, + "Node": false, + "NodeFilter": false, + "NodeIterator": false, + "NodeList": false, + "Notification": false, + "NotifyPaintEvent": false, + "NotRestoredReasonDetails": false, + "NotRestoredReasons": false, + "Observable": false, + "OfflineAudioCompletionEvent": false, + "OfflineAudioContext": false, + "offscreenBuffering": false, + "OffscreenCanvas": false, + "OffscreenCanvasRenderingContext2D": false, + "onabort": true, + "onafterprint": true, + "onanimationcancel": true, + "onanimationend": true, + "onanimationiteration": true, + "onanimationstart": true, + "onappinstalled": true, + "onauxclick": true, + "onbeforeinput": true, + "onbeforeinstallprompt": true, + "onbeforematch": true, + "onbeforeprint": true, + "onbeforetoggle": true, + "onbeforeunload": true, + "onbeforexrselect": true, + "onblur": true, + "oncancel": true, + "oncanplay": true, + "oncanplaythrough": true, + "onchange": true, + "onclick": true, + "onclose": true, + "oncommand": true, + "oncontentvisibilityautostatechange": true, + "oncontextlost": true, + "oncontextmenu": true, + "oncontextrestored": true, + "oncopy": true, + "oncuechange": true, + "oncut": true, + "ondblclick": true, + "ondevicemotion": true, + "ondeviceorientation": true, + "ondeviceorientationabsolute": true, + "ondrag": true, + "ondragend": true, + "ondragenter": true, + "ondragleave": true, + "ondragover": true, + "ondragstart": true, + "ondrop": true, + "ondurationchange": true, + "onemptied": true, + "onended": true, + "onerror": true, + "onfocus": true, + "onformdata": true, + "ongamepadconnected": true, + "ongamepaddisconnected": true, + "ongotpointercapture": true, + "onhashchange": true, + "oninput": true, + "oninvalid": true, + "onkeydown": true, + "onkeypress": true, + "onkeyup": true, + "onlanguagechange": true, + "onload": true, + "onloadeddata": true, + "onloadedmetadata": true, + "onloadstart": true, + "onlostpointercapture": true, + "onmessage": true, + "onmessageerror": true, + "onmousedown": true, + "onmouseenter": true, + "onmouseleave": true, + "onmousemove": true, + "onmouseout": true, + "onmouseover": true, + "onmouseup": true, + "onmousewheel": true, + "onoffline": true, + "ononline": true, + "onpagehide": true, + "onpagereveal": true, + "onpageshow": true, + "onpageswap": true, + "onpaste": true, + "onpause": true, + "onplay": true, + "onplaying": true, + "onpointercancel": true, + "onpointerdown": true, + "onpointerenter": true, + "onpointerleave": true, + "onpointermove": true, + "onpointerout": true, + "onpointerover": true, + "onpointerrawupdate": true, + "onpointerup": true, + "onpopstate": true, + "onprogress": true, + "onratechange": true, + "onrejectionhandled": true, + "onreset": true, + "onresize": true, + "onscroll": true, + "onscrollend": true, + "onscrollsnapchange": true, + "onscrollsnapchanging": true, + "onsearch": true, + "onsecuritypolicyviolation": true, + "onseeked": true, + "onseeking": true, + "onselect": true, + "onselectionchange": true, + "onselectstart": true, + "onslotchange": true, + "onstalled": true, + "onstorage": true, + "onsubmit": true, + "onsuspend": true, + "ontimeupdate": true, + "ontoggle": true, + "ontransitioncancel": true, + "ontransitionend": true, + "ontransitionrun": true, + "ontransitionstart": true, + "onunhandledrejection": true, + "onunload": true, + "onvolumechange": true, + "onwaiting": true, + "onwheel": true, + "open": false, + "opener": false, + "Option": false, + "OrientationSensor": false, + "origin": false, + "originAgentCluster": false, + "OscillatorNode": false, + "OTPCredential": false, + "outerHeight": false, + "outerWidth": false, + "OverconstrainedError": false, + "PageRevealEvent": false, + "PageSwapEvent": false, + "PageTransitionEvent": false, + "pageXOffset": false, + "pageYOffset": false, + "PannerNode": false, + "parent": false, + "PasswordCredential": false, + "Path2D": false, + "PaymentAddress": false, + "PaymentManager": false, + "PaymentMethodChangeEvent": false, + "PaymentRequest": false, + "PaymentRequestUpdateEvent": false, + "PaymentResponse": false, + "performance": false, + "Performance": false, + "PerformanceElementTiming": false, + "PerformanceEntry": false, + "PerformanceEventTiming": false, + "PerformanceLongAnimationFrameTiming": false, + "PerformanceLongTaskTiming": false, + "PerformanceMark": false, + "PerformanceMeasure": false, + "PerformanceNavigation": false, + "PerformanceNavigationTiming": false, + "PerformanceObserver": false, + "PerformanceObserverEntryList": false, + "PerformancePaintTiming": false, + "PerformanceResourceTiming": false, + "PerformanceScriptTiming": false, + "PerformanceServerTiming": false, + "PerformanceTiming": false, + "PeriodicSyncManager": false, + "PeriodicWave": false, + "Permissions": false, + "PermissionStatus": false, + "PERSISTENT": false, + "personalbar": false, + "PictureInPictureEvent": false, + "PictureInPictureWindow": false, + "Plugin": false, + "PluginArray": false, + "PointerEvent": false, + "PopStateEvent": false, + "postMessage": false, + "Presentation": false, + "PresentationAvailability": false, + "PresentationConnection": false, + "PresentationConnectionAvailableEvent": false, + "PresentationConnectionCloseEvent": false, + "PresentationConnectionList": false, + "PresentationReceiver": false, + "PresentationRequest": false, + "PressureObserver": false, + "PressureRecord": false, + "print": false, + "ProcessingInstruction": false, + "Profiler": false, + "ProgressEvent": false, + "PromiseRejectionEvent": false, + "prompt": false, + "ProtectedAudience": false, + "PublicKeyCredential": false, + "PushManager": false, + "PushSubscription": false, + "PushSubscriptionOptions": false, + "queryLocalFonts": false, + "queueMicrotask": false, + "QuotaExceededError": false, + "RadioNodeList": false, + "Range": false, + "ReadableByteStreamController": false, + "ReadableStream": false, + "ReadableStreamBYOBReader": false, + "ReadableStreamBYOBRequest": false, + "ReadableStreamDefaultController": false, + "ReadableStreamDefaultReader": false, + "registerProcessor": false, + "RelativeOrientationSensor": false, + "RemotePlayback": false, + "removeEventListener": false, + "ReportBody": false, + "reportError": false, + "ReportingObserver": false, + "Request": false, + "requestAnimationFrame": false, + "requestIdleCallback": false, + "resizeBy": false, + "ResizeObserver": false, + "ResizeObserverEntry": false, + "ResizeObserverSize": false, + "resizeTo": false, + "Response": false, + "RestrictionTarget": false, + "RTCCertificate": false, + "RTCDataChannel": false, + "RTCDataChannelEvent": false, + "RTCDtlsTransport": false, + "RTCDTMFSender": false, + "RTCDTMFToneChangeEvent": false, + "RTCEncodedAudioFrame": false, + "RTCEncodedVideoFrame": false, + "RTCError": false, + "RTCErrorEvent": false, + "RTCIceCandidate": false, + "RTCIceTransport": false, + "RTCPeerConnection": false, + "RTCPeerConnectionIceErrorEvent": false, + "RTCPeerConnectionIceEvent": false, + "RTCRtpReceiver": false, + "RTCRtpScriptTransform": false, + "RTCRtpSender": false, + "RTCRtpTransceiver": false, + "RTCSctpTransport": false, + "RTCSessionDescription": false, + "RTCStatsReport": false, + "RTCTrackEvent": false, + "sampleRate": false, + "scheduler": false, + "Scheduler": false, + "Scheduling": false, + "screen": false, + "Screen": false, + "ScreenDetailed": false, + "ScreenDetails": false, + "screenLeft": false, + "ScreenOrientation": false, + "screenTop": false, + "screenX": false, + "screenY": false, + "ScriptProcessorNode": false, + "scroll": false, + "scrollbars": false, + "scrollBy": false, + "ScrollTimeline": false, + "scrollTo": false, + "scrollX": false, + "scrollY": false, + "SecurityPolicyViolationEvent": false, + "Selection": false, + "self": false, + "Sensor": false, + "SensorErrorEvent": false, + "Serial": false, + "SerialPort": false, + "ServiceWorker": false, + "ServiceWorkerContainer": false, + "ServiceWorkerRegistration": false, + "sessionStorage": false, + "setInterval": false, + "setTimeout": false, + "ShadowRoot": false, + "sharedStorage": false, + "SharedStorage": false, + "SharedStorageAppendMethod": false, + "SharedStorageClearMethod": false, + "SharedStorageDeleteMethod": false, + "SharedStorageModifierMethod": false, + "SharedStorageSetMethod": false, + "SharedStorageWorklet": false, + "SharedWorker": false, + "showDirectoryPicker": false, + "showOpenFilePicker": false, + "showSaveFilePicker": false, + "SnapEvent": false, + "SourceBuffer": false, + "SourceBufferList": false, + "SpeechGrammar": false, + "SpeechGrammarList": false, + "SpeechRecognition": false, + "SpeechRecognitionErrorEvent": false, + "SpeechRecognitionEvent": false, + "SpeechRecognitionPhrase": false, + "speechSynthesis": false, + "SpeechSynthesis": false, + "SpeechSynthesisErrorEvent": false, + "SpeechSynthesisEvent": false, + "SpeechSynthesisUtterance": false, + "SpeechSynthesisVoice": false, + "StaticRange": false, + "status": false, + "statusbar": false, + "StereoPannerNode": false, + "stop": false, + "Storage": false, + "StorageBucket": false, + "StorageBucketManager": false, + "StorageEvent": false, + "StorageManager": false, + "structuredClone": false, + "styleMedia": false, + "StylePropertyMap": false, + "StylePropertyMapReadOnly": false, + "StyleSheet": false, + "StyleSheetList": false, + "SubmitEvent": false, + "Subscriber": false, + "SubtleCrypto": false, + "Summarizer": false, + "SuppressedError": false, + "SVGAElement": false, + "SVGAngle": false, + "SVGAnimatedAngle": false, + "SVGAnimatedBoolean": false, + "SVGAnimatedEnumeration": false, + "SVGAnimatedInteger": false, + "SVGAnimatedLength": false, + "SVGAnimatedLengthList": false, + "SVGAnimatedNumber": false, + "SVGAnimatedNumberList": false, + "SVGAnimatedPreserveAspectRatio": false, + "SVGAnimatedRect": false, + "SVGAnimatedString": false, + "SVGAnimatedTransformList": false, + "SVGAnimateElement": false, + "SVGAnimateMotionElement": false, + "SVGAnimateTransformElement": false, + "SVGAnimationElement": false, + "SVGCircleElement": false, + "SVGClipPathElement": false, + "SVGComponentTransferFunctionElement": false, + "SVGDefsElement": false, + "SVGDescElement": false, + "SVGElement": false, + "SVGEllipseElement": false, + "SVGFEBlendElement": false, + "SVGFEColorMatrixElement": false, + "SVGFEComponentTransferElement": false, + "SVGFECompositeElement": false, + "SVGFEConvolveMatrixElement": false, + "SVGFEDiffuseLightingElement": false, + "SVGFEDisplacementMapElement": false, + "SVGFEDistantLightElement": false, + "SVGFEDropShadowElement": false, + "SVGFEFloodElement": false, + "SVGFEFuncAElement": false, + "SVGFEFuncBElement": false, + "SVGFEFuncGElement": false, + "SVGFEFuncRElement": false, + "SVGFEGaussianBlurElement": false, + "SVGFEImageElement": false, + "SVGFEMergeElement": false, + "SVGFEMergeNodeElement": false, + "SVGFEMorphologyElement": false, + "SVGFEOffsetElement": false, + "SVGFEPointLightElement": false, + "SVGFESpecularLightingElement": false, + "SVGFESpotLightElement": false, + "SVGFETileElement": false, + "SVGFETurbulenceElement": false, + "SVGFilterElement": false, + "SVGForeignObjectElement": false, + "SVGGElement": false, + "SVGGeometryElement": false, + "SVGGradientElement": false, + "SVGGraphicsElement": false, + "SVGImageElement": false, + "SVGLength": false, + "SVGLengthList": false, + "SVGLinearGradientElement": false, + "SVGLineElement": false, + "SVGMarkerElement": false, + "SVGMaskElement": false, + "SVGMatrix": false, + "SVGMetadataElement": false, + "SVGMPathElement": false, + "SVGNumber": false, + "SVGNumberList": false, + "SVGPathElement": false, + "SVGPatternElement": false, + "SVGPoint": false, + "SVGPointList": false, + "SVGPolygonElement": false, + "SVGPolylineElement": false, + "SVGPreserveAspectRatio": false, + "SVGRadialGradientElement": false, + "SVGRect": false, + "SVGRectElement": false, + "SVGScriptElement": false, + "SVGSetElement": false, + "SVGStopElement": false, + "SVGStringList": false, + "SVGStyleElement": false, + "SVGSVGElement": false, + "SVGSwitchElement": false, + "SVGSymbolElement": false, + "SVGTextContentElement": false, + "SVGTextElement": false, + "SVGTextPathElement": false, + "SVGTextPositioningElement": false, + "SVGTitleElement": false, + "SVGTransform": false, + "SVGTransformList": false, + "SVGTSpanElement": false, + "SVGUnitTypes": false, + "SVGUseElement": false, + "SVGViewElement": false, + "SyncManager": false, + "TaskAttributionTiming": false, + "TaskController": false, + "TaskPriorityChangeEvent": false, + "TaskSignal": false, + "TEMPORARY": false, + "Text": false, + "TextDecoder": false, + "TextDecoderStream": false, + "TextEncoder": false, + "TextEncoderStream": false, + "TextEvent": false, + "TextFormat": false, + "TextFormatUpdateEvent": false, + "TextMetrics": false, + "TextTrack": false, + "TextTrackCue": false, + "TextTrackCueList": false, + "TextTrackList": false, + "TextUpdateEvent": false, + "TimeEvent": false, + "TimeRanges": false, + "ToggleEvent": false, + "toolbar": false, + "top": false, + "Touch": false, + "TouchEvent": false, + "TouchList": false, + "TrackEvent": false, + "TransformStream": false, + "TransformStreamDefaultController": false, + "TransitionEvent": false, + "Translator": false, + "TreeWalker": false, + "TrustedHTML": false, + "TrustedScript": false, + "TrustedScriptURL": false, + "TrustedTypePolicy": false, + "TrustedTypePolicyFactory": false, + "trustedTypes": false, + "UIEvent": false, + "URL": false, + "URLPattern": false, + "URLSearchParams": false, + "USB": false, + "USBAlternateInterface": false, + "USBConfiguration": false, + "USBConnectionEvent": false, + "USBDevice": false, + "USBEndpoint": false, + "USBInterface": false, + "USBInTransferResult": false, + "USBIsochronousInTransferPacket": false, + "USBIsochronousInTransferResult": false, + "USBIsochronousOutTransferPacket": false, + "USBIsochronousOutTransferResult": false, + "USBOutTransferResult": false, + "UserActivation": false, + "ValidityState": false, + "VideoColorSpace": false, + "VideoDecoder": false, + "VideoEncoder": false, + "VideoFrame": false, + "VideoPlaybackQuality": false, + "viewport": false, + "Viewport": false, + "ViewTimeline": false, + "ViewTransition": false, + "ViewTransitionTypeSet": false, + "VirtualKeyboard": false, + "VirtualKeyboardGeometryChangeEvent": false, + "VisibilityStateEntry": false, + "visualViewport": false, + "VisualViewport": false, + "VTTCue": false, + "VTTRegion": false, + "WakeLock": false, + "WakeLockSentinel": false, + "WaveShaperNode": false, + "WebAssembly": false, + "WebGL2RenderingContext": false, + "WebGLActiveInfo": false, + "WebGLBuffer": false, + "WebGLContextEvent": false, + "WebGLFramebuffer": false, + "WebGLObject": false, + "WebGLProgram": false, + "WebGLQuery": false, + "WebGLRenderbuffer": false, + "WebGLRenderingContext": false, + "WebGLSampler": false, + "WebGLShader": false, + "WebGLShaderPrecisionFormat": false, + "WebGLSync": false, + "WebGLTexture": false, + "WebGLTransformFeedback": false, + "WebGLUniformLocation": false, + "WebGLVertexArrayObject": false, + "WebSocket": false, + "WebSocketError": false, + "WebSocketStream": false, + "WebTransport": false, + "WebTransportBidirectionalStream": false, + "WebTransportDatagramDuplexStream": false, + "WebTransportError": false, + "WebTransportReceiveStream": false, + "WebTransportSendStream": false, + "WGSLLanguageFeatures": false, + "WheelEvent": false, + "when": false, + "window": false, + "Window": false, + "WindowControlsOverlay": false, + "WindowControlsOverlayGeometryChangeEvent": false, + "Worker": false, + "Worklet": false, + "WorkletGlobalScope": false, + "WritableStream": false, + "WritableStreamDefaultController": false, + "WritableStreamDefaultWriter": false, + "XMLDocument": false, + "XMLHttpRequest": false, + "XMLHttpRequestEventTarget": false, + "XMLHttpRequestUpload": false, + "XMLSerializer": false, + "XPathEvaluator": false, + "XPathExpression": false, + "XPathResult": false, + "XRAnchor": false, + "XRAnchorSet": false, + "XRBoundedReferenceSpace": false, + "XRCamera": false, + "XRCPUDepthInformation": false, + "XRDepthInformation": false, + "XRDOMOverlayState": false, + "XRFrame": false, + "XRHand": false, + "XRHitTestResult": false, + "XRHitTestSource": false, + "XRInputSource": false, + "XRInputSourceArray": false, + "XRInputSourceEvent": false, + "XRInputSourcesChangeEvent": false, + "XRJointPose": false, + "XRJointSpace": false, + "XRLayer": false, + "XRLightEstimate": false, + "XRLightProbe": false, + "XRPose": false, + "XRRay": false, + "XRReferenceSpace": false, + "XRReferenceSpaceEvent": false, + "XRRenderState": false, + "XRRigidTransform": false, + "XRSession": false, + "XRSessionEvent": false, + "XRSpace": false, + "XRSystem": false, + "XRTransientInputHitTestResult": false, + "XRTransientInputHitTestSource": false, + "XRView": false, + "XRViewerPose": false, + "XRViewport": false, + "XRWebGLBinding": false, + "XRWebGLDepthInformation": false, + "XRWebGLLayer": false, + "XSLTProcessor": false + } + }, + "errors": [ + { + "messageId": "impliedEval" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-implied-eval > invalid + +```js +window.setTimeout(1 + ';' + 1) +``` + +```json +{ + "languageOptions": { + "globals": { + "AbortController": false, + "AbortSignal": false, + "AbsoluteOrientationSensor": false, + "AbstractRange": false, + "Accelerometer": false, + "addEventListener": false, + "ai": false, + "AI": false, + "AICreateMonitor": false, + "AITextSession": false, + "alert": false, + "AnalyserNode": false, + "Animation": false, + "AnimationEffect": false, + "AnimationEvent": false, + "AnimationPlaybackEvent": false, + "AnimationTimeline": false, + "AsyncDisposableStack": false, + "atob": false, + "Attr": false, + "Audio": false, + "AudioBuffer": false, + "AudioBufferSourceNode": false, + "AudioContext": false, + "AudioData": false, + "AudioDecoder": false, + "AudioDestinationNode": false, + "AudioEncoder": false, + "AudioListener": false, + "AudioNode": false, + "AudioParam": false, + "AudioParamMap": false, + "AudioProcessingEvent": false, + "AudioScheduledSourceNode": false, + "AudioSinkInfo": false, + "AudioWorklet": false, + "AudioWorkletGlobalScope": false, + "AudioWorkletNode": false, + "AudioWorkletProcessor": false, + "AuthenticatorAssertionResponse": false, + "AuthenticatorAttestationResponse": false, + "AuthenticatorResponse": false, + "BackgroundFetchManager": false, + "BackgroundFetchRecord": false, + "BackgroundFetchRegistration": false, + "BarcodeDetector": false, + "BarProp": false, + "BaseAudioContext": false, + "BatteryManager": false, + "BeforeUnloadEvent": false, + "BiquadFilterNode": false, + "Blob": false, + "BlobEvent": false, + "Bluetooth": false, + "BluetoothCharacteristicProperties": false, + "BluetoothDevice": false, + "BluetoothRemoteGATTCharacteristic": false, + "BluetoothRemoteGATTDescriptor": false, + "BluetoothRemoteGATTServer": false, + "BluetoothRemoteGATTService": false, + "BluetoothUUID": false, + "blur": false, + "BroadcastChannel": false, + "BrowserCaptureMediaStreamTrack": false, + "btoa": false, + "ByteLengthQueuingStrategy": false, + "Cache": false, + "caches": false, + "CacheStorage": false, + "cancelAnimationFrame": false, + "cancelIdleCallback": false, + "CanvasCaptureMediaStream": false, + "CanvasCaptureMediaStreamTrack": false, + "CanvasGradient": false, + "CanvasPattern": false, + "CanvasRenderingContext2D": false, + "CaptureController": false, + "CaretPosition": false, + "CDATASection": false, + "ChannelMergerNode": false, + "ChannelSplitterNode": false, + "ChapterInformation": false, + "CharacterBoundsUpdateEvent": false, + "CharacterData": false, + "clearInterval": false, + "clearTimeout": false, + "clientInformation": false, + "Clipboard": false, + "ClipboardChangeEvent": false, + "ClipboardEvent": false, + "ClipboardItem": false, + "close": false, + "closed": false, + "CloseEvent": false, + "CloseWatcher": false, + "CommandEvent": false, + "Comment": false, + "CompositionEvent": false, + "CompressionStream": false, + "confirm": false, + "console": false, + "ConstantSourceNode": false, + "ContentVisibilityAutoStateChangeEvent": false, + "ConvolverNode": false, + "CookieChangeEvent": false, + "CookieDeprecationLabel": false, + "cookieStore": false, + "CookieStore": false, + "CookieStoreManager": false, + "CountQueuingStrategy": false, + "createImageBitmap": false, + "CreateMonitor": false, + "Credential": false, + "credentialless": false, + "CredentialsContainer": false, + "CropTarget": false, + "crossOriginIsolated": false, + "crypto": false, + "Crypto": false, + "CryptoKey": false, + "CSPViolationReportBody": false, + "CSS": false, + "CSSAnimation": false, + "CSSConditionRule": false, + "CSSContainerRule": false, + "CSSCounterStyleRule": false, + "CSSFontFaceRule": false, + "CSSFontFeatureValuesRule": false, + "CSSFontPaletteValuesRule": false, + "CSSFunctionDeclarations": false, + "CSSFunctionDescriptors": false, + "CSSFunctionRule": false, + "CSSGroupingRule": false, + "CSSImageValue": false, + "CSSImportRule": false, + "CSSKeyframeRule": false, + "CSSKeyframesRule": false, + "CSSKeywordValue": false, + "CSSLayerBlockRule": false, + "CSSLayerStatementRule": false, + "CSSMarginRule": false, + "CSSMathClamp": false, + "CSSMathInvert": false, + "CSSMathMax": false, + "CSSMathMin": false, + "CSSMathNegate": false, + "CSSMathProduct": false, + "CSSMathSum": false, + "CSSMathValue": false, + "CSSMatrixComponent": false, + "CSSMediaRule": false, + "CSSNamespaceRule": false, + "CSSNestedDeclarations": false, + "CSSNumericArray": false, + "CSSNumericValue": false, + "CSSPageDescriptors": false, + "CSSPageRule": false, + "CSSPerspective": false, + "CSSPositionTryDescriptors": false, + "CSSPositionTryRule": false, + "CSSPositionValue": false, + "CSSPropertyRule": false, + "CSSRotate": false, + "CSSRule": false, + "CSSRuleList": false, + "CSSScale": false, + "CSSScopeRule": false, + "CSSSkew": false, + "CSSSkewX": false, + "CSSSkewY": false, + "CSSStartingStyleRule": false, + "CSSStyleDeclaration": false, + "CSSStyleRule": false, + "CSSStyleSheet": false, + "CSSStyleValue": false, + "CSSSupportsRule": false, + "CSSTransformComponent": false, + "CSSTransformValue": false, + "CSSTransition": false, + "CSSTranslate": false, + "CSSUnitValue": false, + "CSSUnparsedValue": false, + "CSSVariableReferenceValue": false, + "CSSViewTransitionRule": false, + "currentFrame": false, + "currentTime": false, + "CustomElementRegistry": false, + "customElements": false, + "CustomEvent": false, + "CustomStateSet": false, + "DataTransfer": false, + "DataTransferItem": false, + "DataTransferItemList": false, + "DecompressionStream": false, + "DelayNode": false, + "DelegatedInkTrailPresenter": false, + "DeviceMotionEvent": false, + "DeviceMotionEventAcceleration": false, + "DeviceMotionEventRotationRate": false, + "DeviceOrientationEvent": false, + "devicePixelRatio": false, + "DevicePosture": false, + "DigitalCredential": false, + "dispatchEvent": false, + "DisposableStack": false, + "document": false, + "Document": false, + "DocumentFragment": false, + "documentPictureInPicture": false, + "DocumentPictureInPicture": false, + "DocumentPictureInPictureEvent": false, + "DocumentTimeline": false, + "DocumentType": false, + "DOMError": false, + "DOMException": false, + "DOMImplementation": false, + "DOMMatrix": false, + "DOMMatrixReadOnly": false, + "DOMParser": false, + "DOMPoint": false, + "DOMPointReadOnly": false, + "DOMQuad": false, + "DOMRect": false, + "DOMRectList": false, + "DOMRectReadOnly": false, + "DOMStringList": false, + "DOMStringMap": false, + "DOMTokenList": false, + "DragEvent": false, + "DynamicsCompressorNode": false, + "EditContext": false, + "Element": false, + "ElementInternals": false, + "EncodedAudioChunk": false, + "EncodedVideoChunk": false, + "ErrorEvent": false, + "event": false, + "Event": false, + "EventCounts": false, + "EventSource": false, + "EventTarget": false, + "external": false, + "External": false, + "EyeDropper": false, + "FeaturePolicy": false, + "FederatedCredential": false, + "fence": false, + "Fence": false, + "FencedFrameConfig": false, + "fetch": false, + "fetchLater": false, + "FetchLaterResult": false, + "File": false, + "FileList": false, + "FileReader": false, + "FileSystem": false, + "FileSystemDirectoryEntry": false, + "FileSystemDirectoryHandle": false, + "FileSystemDirectoryReader": false, + "FileSystemEntry": false, + "FileSystemFileEntry": false, + "FileSystemFileHandle": false, + "FileSystemHandle": false, + "FileSystemObserver": false, + "FileSystemWritableFileStream": false, + "find": false, + "focus": false, + "FocusEvent": false, + "FontData": false, + "FontFace": false, + "FontFaceSet": false, + "FontFaceSetLoadEvent": false, + "FormData": false, + "FormDataEvent": false, + "FragmentDirective": false, + "frameElement": false, + "frames": false, + "GainNode": false, + "Gamepad": false, + "GamepadAxisMoveEvent": false, + "GamepadButton": false, + "GamepadButtonEvent": false, + "GamepadEvent": false, + "GamepadHapticActuator": false, + "GamepadPose": false, + "Geolocation": false, + "GeolocationCoordinates": false, + "GeolocationPosition": false, + "GeolocationPositionError": false, + "getComputedStyle": false, + "getScreenDetails": false, + "getSelection": false, + "GPU": false, + "GPUAdapter": false, + "GPUAdapterInfo": false, + "GPUBindGroup": false, + "GPUBindGroupLayout": false, + "GPUBuffer": false, + "GPUBufferUsage": false, + "GPUCanvasContext": false, + "GPUColorWrite": false, + "GPUCommandBuffer": false, + "GPUCommandEncoder": false, + "GPUCompilationInfo": false, + "GPUCompilationMessage": false, + "GPUComputePassEncoder": false, + "GPUComputePipeline": false, + "GPUDevice": false, + "GPUDeviceLostInfo": false, + "GPUError": false, + "GPUExternalTexture": false, + "GPUInternalError": false, + "GPUMapMode": false, + "GPUOutOfMemoryError": false, + "GPUPipelineError": false, + "GPUPipelineLayout": false, + "GPUQuerySet": false, + "GPUQueue": false, + "GPURenderBundle": false, + "GPURenderBundleEncoder": false, + "GPURenderPassEncoder": false, + "GPURenderPipeline": false, + "GPUSampler": false, + "GPUShaderModule": false, + "GPUShaderStage": false, + "GPUSupportedFeatures": false, + "GPUSupportedLimits": false, + "GPUTexture": false, + "GPUTextureUsage": false, + "GPUTextureView": false, + "GPUUncapturedErrorEvent": false, + "GPUValidationError": false, + "GravitySensor": false, + "Gyroscope": false, + "HashChangeEvent": false, + "Headers": false, + "HID": false, + "HIDConnectionEvent": false, + "HIDDevice": false, + "HIDInputReportEvent": false, + "Highlight": false, + "HighlightRegistry": false, + "history": false, + "History": false, + "HTMLAllCollection": false, + "HTMLAnchorElement": false, + "HTMLAreaElement": false, + "HTMLAudioElement": false, + "HTMLBaseElement": false, + "HTMLBodyElement": false, + "HTMLBRElement": false, + "HTMLButtonElement": false, + "HTMLCanvasElement": false, + "HTMLCollection": false, + "HTMLDataElement": false, + "HTMLDataListElement": false, + "HTMLDetailsElement": false, + "HTMLDialogElement": false, + "HTMLDirectoryElement": false, + "HTMLDivElement": false, + "HTMLDListElement": false, + "HTMLDocument": false, + "HTMLElement": false, + "HTMLEmbedElement": false, + "HTMLFencedFrameElement": false, + "HTMLFieldSetElement": false, + "HTMLFontElement": false, + "HTMLFormControlsCollection": false, + "HTMLFormElement": false, + "HTMLFrameElement": false, + "HTMLFrameSetElement": false, + "HTMLHeadElement": false, + "HTMLHeadingElement": false, + "HTMLHRElement": false, + "HTMLHtmlElement": false, + "HTMLIFrameElement": false, + "HTMLImageElement": false, + "HTMLInputElement": false, + "HTMLLabelElement": false, + "HTMLLegendElement": false, + "HTMLLIElement": false, + "HTMLLinkElement": false, + "HTMLMapElement": false, + "HTMLMarqueeElement": false, + "HTMLMediaElement": false, + "HTMLMenuElement": false, + "HTMLMetaElement": false, + "HTMLMeterElement": false, + "HTMLModElement": false, + "HTMLObjectElement": false, + "HTMLOListElement": false, + "HTMLOptGroupElement": false, + "HTMLOptionElement": false, + "HTMLOptionsCollection": false, + "HTMLOutputElement": false, + "HTMLParagraphElement": false, + "HTMLParamElement": false, + "HTMLPictureElement": false, + "HTMLPreElement": false, + "HTMLProgressElement": false, + "HTMLQuoteElement": false, + "HTMLScriptElement": false, + "HTMLSelectedContentElement": false, + "HTMLSelectElement": false, + "HTMLSlotElement": false, + "HTMLSourceElement": false, + "HTMLSpanElement": false, + "HTMLStyleElement": false, + "HTMLTableCaptionElement": false, + "HTMLTableCellElement": false, + "HTMLTableColElement": false, + "HTMLTableElement": false, + "HTMLTableRowElement": false, + "HTMLTableSectionElement": false, + "HTMLTemplateElement": false, + "HTMLTextAreaElement": false, + "HTMLTimeElement": false, + "HTMLTitleElement": false, + "HTMLTrackElement": false, + "HTMLUListElement": false, + "HTMLUnknownElement": false, + "HTMLVideoElement": false, + "IDBCursor": false, + "IDBCursorWithValue": false, + "IDBDatabase": false, + "IDBFactory": false, + "IDBIndex": false, + "IDBKeyRange": false, + "IDBObjectStore": false, + "IDBOpenDBRequest": false, + "IDBRecord": false, + "IDBRequest": false, + "IDBTransaction": false, + "IDBVersionChangeEvent": false, + "IdentityCredential": false, + "IdentityCredentialError": false, + "IdentityProvider": false, + "IdleDeadline": false, + "IdleDetector": false, + "IIRFilterNode": false, + "Image": false, + "ImageBitmap": false, + "ImageBitmapRenderingContext": false, + "ImageCapture": false, + "ImageData": false, + "ImageDecoder": false, + "ImageTrack": false, + "ImageTrackList": false, + "indexedDB": false, + "Ink": false, + "innerHeight": false, + "innerWidth": false, + "InputDeviceCapabilities": false, + "InputDeviceInfo": false, + "InputEvent": false, + "IntegrityViolationReportBody": false, + "InterestEvent": false, + "IntersectionObserver": false, + "IntersectionObserverEntry": false, + "isSecureContext": false, + "Keyboard": false, + "KeyboardEvent": false, + "KeyboardLayoutMap": false, + "KeyframeEffect": false, + "LanguageDetector": false, + "LargestContentfulPaint": false, + "LaunchParams": false, + "launchQueue": false, + "LaunchQueue": false, + "LayoutShift": false, + "LayoutShiftAttribution": false, + "length": false, + "LinearAccelerationSensor": false, + "localStorage": false, + "location": true, + "Location": false, + "locationbar": false, + "Lock": false, + "LockManager": false, + "matchMedia": false, + "MathMLElement": false, + "MediaCapabilities": false, + "MediaCapabilitiesInfo": false, + "MediaDeviceInfo": false, + "MediaDevices": false, + "MediaElementAudioSourceNode": false, + "MediaEncryptedEvent": false, + "MediaError": false, + "MediaKeyError": false, + "MediaKeyMessageEvent": false, + "MediaKeys": false, + "MediaKeySession": false, + "MediaKeyStatusMap": false, + "MediaKeySystemAccess": false, + "MediaList": false, + "MediaMetadata": false, + "MediaQueryList": false, + "MediaQueryListEvent": false, + "MediaRecorder": false, + "MediaRecorderErrorEvent": false, + "MediaSession": false, + "MediaSource": false, + "MediaSourceHandle": false, + "MediaStream": false, + "MediaStreamAudioDestinationNode": false, + "MediaStreamAudioSourceNode": false, + "MediaStreamEvent": false, + "MediaStreamTrack": false, + "MediaStreamTrackAudioSourceNode": false, + "MediaStreamTrackAudioStats": false, + "MediaStreamTrackEvent": false, + "MediaStreamTrackGenerator": false, + "MediaStreamTrackProcessor": false, + "MediaStreamTrackVideoStats": false, + "menubar": false, + "MessageChannel": false, + "MessageEvent": false, + "MessagePort": false, + "MIDIAccess": false, + "MIDIConnectionEvent": false, + "MIDIInput": false, + "MIDIInputMap": false, + "MIDIMessageEvent": false, + "MIDIOutput": false, + "MIDIOutputMap": false, + "MIDIPort": false, + "MimeType": false, + "MimeTypeArray": false, + "model": false, + "ModelGenericSession": false, + "ModelManager": false, + "MouseEvent": false, + "moveBy": false, + "moveTo": false, + "MutationEvent": false, + "MutationObserver": false, + "MutationRecord": false, + "name": false, + "NamedNodeMap": false, + "NavigateEvent": false, + "navigation": false, + "Navigation": false, + "NavigationActivation": false, + "NavigationCurrentEntryChangeEvent": false, + "NavigationDestination": false, + "NavigationHistoryEntry": false, + "NavigationPrecommitController": false, + "NavigationPreloadManager": false, + "NavigationTransition": false, + "navigator": false, + "Navigator": false, + "NavigatorLogin": false, + "NavigatorManagedData": false, + "NavigatorUAData": false, + "NetworkInformation": false, + "Node": false, + "NodeFilter": false, + "NodeIterator": false, + "NodeList": false, + "Notification": false, + "NotifyPaintEvent": false, + "NotRestoredReasonDetails": false, + "NotRestoredReasons": false, + "Observable": false, + "OfflineAudioCompletionEvent": false, + "OfflineAudioContext": false, + "offscreenBuffering": false, + "OffscreenCanvas": false, + "OffscreenCanvasRenderingContext2D": false, + "onabort": true, + "onafterprint": true, + "onanimationcancel": true, + "onanimationend": true, + "onanimationiteration": true, + "onanimationstart": true, + "onappinstalled": true, + "onauxclick": true, + "onbeforeinput": true, + "onbeforeinstallprompt": true, + "onbeforematch": true, + "onbeforeprint": true, + "onbeforetoggle": true, + "onbeforeunload": true, + "onbeforexrselect": true, + "onblur": true, + "oncancel": true, + "oncanplay": true, + "oncanplaythrough": true, + "onchange": true, + "onclick": true, + "onclose": true, + "oncommand": true, + "oncontentvisibilityautostatechange": true, + "oncontextlost": true, + "oncontextmenu": true, + "oncontextrestored": true, + "oncopy": true, + "oncuechange": true, + "oncut": true, + "ondblclick": true, + "ondevicemotion": true, + "ondeviceorientation": true, + "ondeviceorientationabsolute": true, + "ondrag": true, + "ondragend": true, + "ondragenter": true, + "ondragleave": true, + "ondragover": true, + "ondragstart": true, + "ondrop": true, + "ondurationchange": true, + "onemptied": true, + "onended": true, + "onerror": true, + "onfocus": true, + "onformdata": true, + "ongamepadconnected": true, + "ongamepaddisconnected": true, + "ongotpointercapture": true, + "onhashchange": true, + "oninput": true, + "oninvalid": true, + "onkeydown": true, + "onkeypress": true, + "onkeyup": true, + "onlanguagechange": true, + "onload": true, + "onloadeddata": true, + "onloadedmetadata": true, + "onloadstart": true, + "onlostpointercapture": true, + "onmessage": true, + "onmessageerror": true, + "onmousedown": true, + "onmouseenter": true, + "onmouseleave": true, + "onmousemove": true, + "onmouseout": true, + "onmouseover": true, + "onmouseup": true, + "onmousewheel": true, + "onoffline": true, + "ononline": true, + "onpagehide": true, + "onpagereveal": true, + "onpageshow": true, + "onpageswap": true, + "onpaste": true, + "onpause": true, + "onplay": true, + "onplaying": true, + "onpointercancel": true, + "onpointerdown": true, + "onpointerenter": true, + "onpointerleave": true, + "onpointermove": true, + "onpointerout": true, + "onpointerover": true, + "onpointerrawupdate": true, + "onpointerup": true, + "onpopstate": true, + "onprogress": true, + "onratechange": true, + "onrejectionhandled": true, + "onreset": true, + "onresize": true, + "onscroll": true, + "onscrollend": true, + "onscrollsnapchange": true, + "onscrollsnapchanging": true, + "onsearch": true, + "onsecuritypolicyviolation": true, + "onseeked": true, + "onseeking": true, + "onselect": true, + "onselectionchange": true, + "onselectstart": true, + "onslotchange": true, + "onstalled": true, + "onstorage": true, + "onsubmit": true, + "onsuspend": true, + "ontimeupdate": true, + "ontoggle": true, + "ontransitioncancel": true, + "ontransitionend": true, + "ontransitionrun": true, + "ontransitionstart": true, + "onunhandledrejection": true, + "onunload": true, + "onvolumechange": true, + "onwaiting": true, + "onwheel": true, + "open": false, + "opener": false, + "Option": false, + "OrientationSensor": false, + "origin": false, + "originAgentCluster": false, + "OscillatorNode": false, + "OTPCredential": false, + "outerHeight": false, + "outerWidth": false, + "OverconstrainedError": false, + "PageRevealEvent": false, + "PageSwapEvent": false, + "PageTransitionEvent": false, + "pageXOffset": false, + "pageYOffset": false, + "PannerNode": false, + "parent": false, + "PasswordCredential": false, + "Path2D": false, + "PaymentAddress": false, + "PaymentManager": false, + "PaymentMethodChangeEvent": false, + "PaymentRequest": false, + "PaymentRequestUpdateEvent": false, + "PaymentResponse": false, + "performance": false, + "Performance": false, + "PerformanceElementTiming": false, + "PerformanceEntry": false, + "PerformanceEventTiming": false, + "PerformanceLongAnimationFrameTiming": false, + "PerformanceLongTaskTiming": false, + "PerformanceMark": false, + "PerformanceMeasure": false, + "PerformanceNavigation": false, + "PerformanceNavigationTiming": false, + "PerformanceObserver": false, + "PerformanceObserverEntryList": false, + "PerformancePaintTiming": false, + "PerformanceResourceTiming": false, + "PerformanceScriptTiming": false, + "PerformanceServerTiming": false, + "PerformanceTiming": false, + "PeriodicSyncManager": false, + "PeriodicWave": false, + "Permissions": false, + "PermissionStatus": false, + "PERSISTENT": false, + "personalbar": false, + "PictureInPictureEvent": false, + "PictureInPictureWindow": false, + "Plugin": false, + "PluginArray": false, + "PointerEvent": false, + "PopStateEvent": false, + "postMessage": false, + "Presentation": false, + "PresentationAvailability": false, + "PresentationConnection": false, + "PresentationConnectionAvailableEvent": false, + "PresentationConnectionCloseEvent": false, + "PresentationConnectionList": false, + "PresentationReceiver": false, + "PresentationRequest": false, + "PressureObserver": false, + "PressureRecord": false, + "print": false, + "ProcessingInstruction": false, + "Profiler": false, + "ProgressEvent": false, + "PromiseRejectionEvent": false, + "prompt": false, + "ProtectedAudience": false, + "PublicKeyCredential": false, + "PushManager": false, + "PushSubscription": false, + "PushSubscriptionOptions": false, + "queryLocalFonts": false, + "queueMicrotask": false, + "QuotaExceededError": false, + "RadioNodeList": false, + "Range": false, + "ReadableByteStreamController": false, + "ReadableStream": false, + "ReadableStreamBYOBReader": false, + "ReadableStreamBYOBRequest": false, + "ReadableStreamDefaultController": false, + "ReadableStreamDefaultReader": false, + "registerProcessor": false, + "RelativeOrientationSensor": false, + "RemotePlayback": false, + "removeEventListener": false, + "ReportBody": false, + "reportError": false, + "ReportingObserver": false, + "Request": false, + "requestAnimationFrame": false, + "requestIdleCallback": false, + "resizeBy": false, + "ResizeObserver": false, + "ResizeObserverEntry": false, + "ResizeObserverSize": false, + "resizeTo": false, + "Response": false, + "RestrictionTarget": false, + "RTCCertificate": false, + "RTCDataChannel": false, + "RTCDataChannelEvent": false, + "RTCDtlsTransport": false, + "RTCDTMFSender": false, + "RTCDTMFToneChangeEvent": false, + "RTCEncodedAudioFrame": false, + "RTCEncodedVideoFrame": false, + "RTCError": false, + "RTCErrorEvent": false, + "RTCIceCandidate": false, + "RTCIceTransport": false, + "RTCPeerConnection": false, + "RTCPeerConnectionIceErrorEvent": false, + "RTCPeerConnectionIceEvent": false, + "RTCRtpReceiver": false, + "RTCRtpScriptTransform": false, + "RTCRtpSender": false, + "RTCRtpTransceiver": false, + "RTCSctpTransport": false, + "RTCSessionDescription": false, + "RTCStatsReport": false, + "RTCTrackEvent": false, + "sampleRate": false, + "scheduler": false, + "Scheduler": false, + "Scheduling": false, + "screen": false, + "Screen": false, + "ScreenDetailed": false, + "ScreenDetails": false, + "screenLeft": false, + "ScreenOrientation": false, + "screenTop": false, + "screenX": false, + "screenY": false, + "ScriptProcessorNode": false, + "scroll": false, + "scrollbars": false, + "scrollBy": false, + "ScrollTimeline": false, + "scrollTo": false, + "scrollX": false, + "scrollY": false, + "SecurityPolicyViolationEvent": false, + "Selection": false, + "self": false, + "Sensor": false, + "SensorErrorEvent": false, + "Serial": false, + "SerialPort": false, + "ServiceWorker": false, + "ServiceWorkerContainer": false, + "ServiceWorkerRegistration": false, + "sessionStorage": false, + "setInterval": false, + "setTimeout": false, + "ShadowRoot": false, + "sharedStorage": false, + "SharedStorage": false, + "SharedStorageAppendMethod": false, + "SharedStorageClearMethod": false, + "SharedStorageDeleteMethod": false, + "SharedStorageModifierMethod": false, + "SharedStorageSetMethod": false, + "SharedStorageWorklet": false, + "SharedWorker": false, + "showDirectoryPicker": false, + "showOpenFilePicker": false, + "showSaveFilePicker": false, + "SnapEvent": false, + "SourceBuffer": false, + "SourceBufferList": false, + "SpeechGrammar": false, + "SpeechGrammarList": false, + "SpeechRecognition": false, + "SpeechRecognitionErrorEvent": false, + "SpeechRecognitionEvent": false, + "SpeechRecognitionPhrase": false, + "speechSynthesis": false, + "SpeechSynthesis": false, + "SpeechSynthesisErrorEvent": false, + "SpeechSynthesisEvent": false, + "SpeechSynthesisUtterance": false, + "SpeechSynthesisVoice": false, + "StaticRange": false, + "status": false, + "statusbar": false, + "StereoPannerNode": false, + "stop": false, + "Storage": false, + "StorageBucket": false, + "StorageBucketManager": false, + "StorageEvent": false, + "StorageManager": false, + "structuredClone": false, + "styleMedia": false, + "StylePropertyMap": false, + "StylePropertyMapReadOnly": false, + "StyleSheet": false, + "StyleSheetList": false, + "SubmitEvent": false, + "Subscriber": false, + "SubtleCrypto": false, + "Summarizer": false, + "SuppressedError": false, + "SVGAElement": false, + "SVGAngle": false, + "SVGAnimatedAngle": false, + "SVGAnimatedBoolean": false, + "SVGAnimatedEnumeration": false, + "SVGAnimatedInteger": false, + "SVGAnimatedLength": false, + "SVGAnimatedLengthList": false, + "SVGAnimatedNumber": false, + "SVGAnimatedNumberList": false, + "SVGAnimatedPreserveAspectRatio": false, + "SVGAnimatedRect": false, + "SVGAnimatedString": false, + "SVGAnimatedTransformList": false, + "SVGAnimateElement": false, + "SVGAnimateMotionElement": false, + "SVGAnimateTransformElement": false, + "SVGAnimationElement": false, + "SVGCircleElement": false, + "SVGClipPathElement": false, + "SVGComponentTransferFunctionElement": false, + "SVGDefsElement": false, + "SVGDescElement": false, + "SVGElement": false, + "SVGEllipseElement": false, + "SVGFEBlendElement": false, + "SVGFEColorMatrixElement": false, + "SVGFEComponentTransferElement": false, + "SVGFECompositeElement": false, + "SVGFEConvolveMatrixElement": false, + "SVGFEDiffuseLightingElement": false, + "SVGFEDisplacementMapElement": false, + "SVGFEDistantLightElement": false, + "SVGFEDropShadowElement": false, + "SVGFEFloodElement": false, + "SVGFEFuncAElement": false, + "SVGFEFuncBElement": false, + "SVGFEFuncGElement": false, + "SVGFEFuncRElement": false, + "SVGFEGaussianBlurElement": false, + "SVGFEImageElement": false, + "SVGFEMergeElement": false, + "SVGFEMergeNodeElement": false, + "SVGFEMorphologyElement": false, + "SVGFEOffsetElement": false, + "SVGFEPointLightElement": false, + "SVGFESpecularLightingElement": false, + "SVGFESpotLightElement": false, + "SVGFETileElement": false, + "SVGFETurbulenceElement": false, + "SVGFilterElement": false, + "SVGForeignObjectElement": false, + "SVGGElement": false, + "SVGGeometryElement": false, + "SVGGradientElement": false, + "SVGGraphicsElement": false, + "SVGImageElement": false, + "SVGLength": false, + "SVGLengthList": false, + "SVGLinearGradientElement": false, + "SVGLineElement": false, + "SVGMarkerElement": false, + "SVGMaskElement": false, + "SVGMatrix": false, + "SVGMetadataElement": false, + "SVGMPathElement": false, + "SVGNumber": false, + "SVGNumberList": false, + "SVGPathElement": false, + "SVGPatternElement": false, + "SVGPoint": false, + "SVGPointList": false, + "SVGPolygonElement": false, + "SVGPolylineElement": false, + "SVGPreserveAspectRatio": false, + "SVGRadialGradientElement": false, + "SVGRect": false, + "SVGRectElement": false, + "SVGScriptElement": false, + "SVGSetElement": false, + "SVGStopElement": false, + "SVGStringList": false, + "SVGStyleElement": false, + "SVGSVGElement": false, + "SVGSwitchElement": false, + "SVGSymbolElement": false, + "SVGTextContentElement": false, + "SVGTextElement": false, + "SVGTextPathElement": false, + "SVGTextPositioningElement": false, + "SVGTitleElement": false, + "SVGTransform": false, + "SVGTransformList": false, + "SVGTSpanElement": false, + "SVGUnitTypes": false, + "SVGUseElement": false, + "SVGViewElement": false, + "SyncManager": false, + "TaskAttributionTiming": false, + "TaskController": false, + "TaskPriorityChangeEvent": false, + "TaskSignal": false, + "TEMPORARY": false, + "Text": false, + "TextDecoder": false, + "TextDecoderStream": false, + "TextEncoder": false, + "TextEncoderStream": false, + "TextEvent": false, + "TextFormat": false, + "TextFormatUpdateEvent": false, + "TextMetrics": false, + "TextTrack": false, + "TextTrackCue": false, + "TextTrackCueList": false, + "TextTrackList": false, + "TextUpdateEvent": false, + "TimeEvent": false, + "TimeRanges": false, + "ToggleEvent": false, + "toolbar": false, + "top": false, + "Touch": false, + "TouchEvent": false, + "TouchList": false, + "TrackEvent": false, + "TransformStream": false, + "TransformStreamDefaultController": false, + "TransitionEvent": false, + "Translator": false, + "TreeWalker": false, + "TrustedHTML": false, + "TrustedScript": false, + "TrustedScriptURL": false, + "TrustedTypePolicy": false, + "TrustedTypePolicyFactory": false, + "trustedTypes": false, + "UIEvent": false, + "URL": false, + "URLPattern": false, + "URLSearchParams": false, + "USB": false, + "USBAlternateInterface": false, + "USBConfiguration": false, + "USBConnectionEvent": false, + "USBDevice": false, + "USBEndpoint": false, + "USBInterface": false, + "USBInTransferResult": false, + "USBIsochronousInTransferPacket": false, + "USBIsochronousInTransferResult": false, + "USBIsochronousOutTransferPacket": false, + "USBIsochronousOutTransferResult": false, + "USBOutTransferResult": false, + "UserActivation": false, + "ValidityState": false, + "VideoColorSpace": false, + "VideoDecoder": false, + "VideoEncoder": false, + "VideoFrame": false, + "VideoPlaybackQuality": false, + "viewport": false, + "Viewport": false, + "ViewTimeline": false, + "ViewTransition": false, + "ViewTransitionTypeSet": false, + "VirtualKeyboard": false, + "VirtualKeyboardGeometryChangeEvent": false, + "VisibilityStateEntry": false, + "visualViewport": false, + "VisualViewport": false, + "VTTCue": false, + "VTTRegion": false, + "WakeLock": false, + "WakeLockSentinel": false, + "WaveShaperNode": false, + "WebAssembly": false, + "WebGL2RenderingContext": false, + "WebGLActiveInfo": false, + "WebGLBuffer": false, + "WebGLContextEvent": false, + "WebGLFramebuffer": false, + "WebGLObject": false, + "WebGLProgram": false, + "WebGLQuery": false, + "WebGLRenderbuffer": false, + "WebGLRenderingContext": false, + "WebGLSampler": false, + "WebGLShader": false, + "WebGLShaderPrecisionFormat": false, + "WebGLSync": false, + "WebGLTexture": false, + "WebGLTransformFeedback": false, + "WebGLUniformLocation": false, + "WebGLVertexArrayObject": false, + "WebSocket": false, + "WebSocketError": false, + "WebSocketStream": false, + "WebTransport": false, + "WebTransportBidirectionalStream": false, + "WebTransportDatagramDuplexStream": false, + "WebTransportError": false, + "WebTransportReceiveStream": false, + "WebTransportSendStream": false, + "WGSLLanguageFeatures": false, + "WheelEvent": false, + "when": false, + "window": false, + "Window": false, + "WindowControlsOverlay": false, + "WindowControlsOverlayGeometryChangeEvent": false, + "Worker": false, + "Worklet": false, + "WorkletGlobalScope": false, + "WritableStream": false, + "WritableStreamDefaultController": false, + "WritableStreamDefaultWriter": false, + "XMLDocument": false, + "XMLHttpRequest": false, + "XMLHttpRequestEventTarget": false, + "XMLHttpRequestUpload": false, + "XMLSerializer": false, + "XPathEvaluator": false, + "XPathExpression": false, + "XPathResult": false, + "XRAnchor": false, + "XRAnchorSet": false, + "XRBoundedReferenceSpace": false, + "XRCamera": false, + "XRCPUDepthInformation": false, + "XRDepthInformation": false, + "XRDOMOverlayState": false, + "XRFrame": false, + "XRHand": false, + "XRHitTestResult": false, + "XRHitTestSource": false, + "XRInputSource": false, + "XRInputSourceArray": false, + "XRInputSourceEvent": false, + "XRInputSourcesChangeEvent": false, + "XRJointPose": false, + "XRJointSpace": false, + "XRLayer": false, + "XRLightEstimate": false, + "XRLightProbe": false, + "XRPose": false, + "XRRay": false, + "XRReferenceSpace": false, + "XRReferenceSpaceEvent": false, + "XRRenderState": false, + "XRRigidTransform": false, + "XRSession": false, + "XRSessionEvent": false, + "XRSpace": false, + "XRSystem": false, + "XRTransientInputHitTestResult": false, + "XRTransientInputHitTestSource": false, + "XRView": false, + "XRViewerPose": false, + "XRViewport": false, + "XRWebGLBinding": false, + "XRWebGLDepthInformation": false, + "XRWebGLLayer": false, + "XSLTProcessor": false + } + }, + "errors": [ + { + "messageId": "impliedEval" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-implied-eval > invalid + +```js +window.window.setTimeout(1 + ';' + 1) +``` + +```json +{ + "languageOptions": { + "globals": { + "AbortController": false, + "AbortSignal": false, + "AbsoluteOrientationSensor": false, + "AbstractRange": false, + "Accelerometer": false, + "addEventListener": false, + "ai": false, + "AI": false, + "AICreateMonitor": false, + "AITextSession": false, + "alert": false, + "AnalyserNode": false, + "Animation": false, + "AnimationEffect": false, + "AnimationEvent": false, + "AnimationPlaybackEvent": false, + "AnimationTimeline": false, + "AsyncDisposableStack": false, + "atob": false, + "Attr": false, + "Audio": false, + "AudioBuffer": false, + "AudioBufferSourceNode": false, + "AudioContext": false, + "AudioData": false, + "AudioDecoder": false, + "AudioDestinationNode": false, + "AudioEncoder": false, + "AudioListener": false, + "AudioNode": false, + "AudioParam": false, + "AudioParamMap": false, + "AudioProcessingEvent": false, + "AudioScheduledSourceNode": false, + "AudioSinkInfo": false, + "AudioWorklet": false, + "AudioWorkletGlobalScope": false, + "AudioWorkletNode": false, + "AudioWorkletProcessor": false, + "AuthenticatorAssertionResponse": false, + "AuthenticatorAttestationResponse": false, + "AuthenticatorResponse": false, + "BackgroundFetchManager": false, + "BackgroundFetchRecord": false, + "BackgroundFetchRegistration": false, + "BarcodeDetector": false, + "BarProp": false, + "BaseAudioContext": false, + "BatteryManager": false, + "BeforeUnloadEvent": false, + "BiquadFilterNode": false, + "Blob": false, + "BlobEvent": false, + "Bluetooth": false, + "BluetoothCharacteristicProperties": false, + "BluetoothDevice": false, + "BluetoothRemoteGATTCharacteristic": false, + "BluetoothRemoteGATTDescriptor": false, + "BluetoothRemoteGATTServer": false, + "BluetoothRemoteGATTService": false, + "BluetoothUUID": false, + "blur": false, + "BroadcastChannel": false, + "BrowserCaptureMediaStreamTrack": false, + "btoa": false, + "ByteLengthQueuingStrategy": false, + "Cache": false, + "caches": false, + "CacheStorage": false, + "cancelAnimationFrame": false, + "cancelIdleCallback": false, + "CanvasCaptureMediaStream": false, + "CanvasCaptureMediaStreamTrack": false, + "CanvasGradient": false, + "CanvasPattern": false, + "CanvasRenderingContext2D": false, + "CaptureController": false, + "CaretPosition": false, + "CDATASection": false, + "ChannelMergerNode": false, + "ChannelSplitterNode": false, + "ChapterInformation": false, + "CharacterBoundsUpdateEvent": false, + "CharacterData": false, + "clearInterval": false, + "clearTimeout": false, + "clientInformation": false, + "Clipboard": false, + "ClipboardChangeEvent": false, + "ClipboardEvent": false, + "ClipboardItem": false, + "close": false, + "closed": false, + "CloseEvent": false, + "CloseWatcher": false, + "CommandEvent": false, + "Comment": false, + "CompositionEvent": false, + "CompressionStream": false, + "confirm": false, + "console": false, + "ConstantSourceNode": false, + "ContentVisibilityAutoStateChangeEvent": false, + "ConvolverNode": false, + "CookieChangeEvent": false, + "CookieDeprecationLabel": false, + "cookieStore": false, + "CookieStore": false, + "CookieStoreManager": false, + "CountQueuingStrategy": false, + "createImageBitmap": false, + "CreateMonitor": false, + "Credential": false, + "credentialless": false, + "CredentialsContainer": false, + "CropTarget": false, + "crossOriginIsolated": false, + "crypto": false, + "Crypto": false, + "CryptoKey": false, + "CSPViolationReportBody": false, + "CSS": false, + "CSSAnimation": false, + "CSSConditionRule": false, + "CSSContainerRule": false, + "CSSCounterStyleRule": false, + "CSSFontFaceRule": false, + "CSSFontFeatureValuesRule": false, + "CSSFontPaletteValuesRule": false, + "CSSFunctionDeclarations": false, + "CSSFunctionDescriptors": false, + "CSSFunctionRule": false, + "CSSGroupingRule": false, + "CSSImageValue": false, + "CSSImportRule": false, + "CSSKeyframeRule": false, + "CSSKeyframesRule": false, + "CSSKeywordValue": false, + "CSSLayerBlockRule": false, + "CSSLayerStatementRule": false, + "CSSMarginRule": false, + "CSSMathClamp": false, + "CSSMathInvert": false, + "CSSMathMax": false, + "CSSMathMin": false, + "CSSMathNegate": false, + "CSSMathProduct": false, + "CSSMathSum": false, + "CSSMathValue": false, + "CSSMatrixComponent": false, + "CSSMediaRule": false, + "CSSNamespaceRule": false, + "CSSNestedDeclarations": false, + "CSSNumericArray": false, + "CSSNumericValue": false, + "CSSPageDescriptors": false, + "CSSPageRule": false, + "CSSPerspective": false, + "CSSPositionTryDescriptors": false, + "CSSPositionTryRule": false, + "CSSPositionValue": false, + "CSSPropertyRule": false, + "CSSRotate": false, + "CSSRule": false, + "CSSRuleList": false, + "CSSScale": false, + "CSSScopeRule": false, + "CSSSkew": false, + "CSSSkewX": false, + "CSSSkewY": false, + "CSSStartingStyleRule": false, + "CSSStyleDeclaration": false, + "CSSStyleRule": false, + "CSSStyleSheet": false, + "CSSStyleValue": false, + "CSSSupportsRule": false, + "CSSTransformComponent": false, + "CSSTransformValue": false, + "CSSTransition": false, + "CSSTranslate": false, + "CSSUnitValue": false, + "CSSUnparsedValue": false, + "CSSVariableReferenceValue": false, + "CSSViewTransitionRule": false, + "currentFrame": false, + "currentTime": false, + "CustomElementRegistry": false, + "customElements": false, + "CustomEvent": false, + "CustomStateSet": false, + "DataTransfer": false, + "DataTransferItem": false, + "DataTransferItemList": false, + "DecompressionStream": false, + "DelayNode": false, + "DelegatedInkTrailPresenter": false, + "DeviceMotionEvent": false, + "DeviceMotionEventAcceleration": false, + "DeviceMotionEventRotationRate": false, + "DeviceOrientationEvent": false, + "devicePixelRatio": false, + "DevicePosture": false, + "DigitalCredential": false, + "dispatchEvent": false, + "DisposableStack": false, + "document": false, + "Document": false, + "DocumentFragment": false, + "documentPictureInPicture": false, + "DocumentPictureInPicture": false, + "DocumentPictureInPictureEvent": false, + "DocumentTimeline": false, + "DocumentType": false, + "DOMError": false, + "DOMException": false, + "DOMImplementation": false, + "DOMMatrix": false, + "DOMMatrixReadOnly": false, + "DOMParser": false, + "DOMPoint": false, + "DOMPointReadOnly": false, + "DOMQuad": false, + "DOMRect": false, + "DOMRectList": false, + "DOMRectReadOnly": false, + "DOMStringList": false, + "DOMStringMap": false, + "DOMTokenList": false, + "DragEvent": false, + "DynamicsCompressorNode": false, + "EditContext": false, + "Element": false, + "ElementInternals": false, + "EncodedAudioChunk": false, + "EncodedVideoChunk": false, + "ErrorEvent": false, + "event": false, + "Event": false, + "EventCounts": false, + "EventSource": false, + "EventTarget": false, + "external": false, + "External": false, + "EyeDropper": false, + "FeaturePolicy": false, + "FederatedCredential": false, + "fence": false, + "Fence": false, + "FencedFrameConfig": false, + "fetch": false, + "fetchLater": false, + "FetchLaterResult": false, + "File": false, + "FileList": false, + "FileReader": false, + "FileSystem": false, + "FileSystemDirectoryEntry": false, + "FileSystemDirectoryHandle": false, + "FileSystemDirectoryReader": false, + "FileSystemEntry": false, + "FileSystemFileEntry": false, + "FileSystemFileHandle": false, + "FileSystemHandle": false, + "FileSystemObserver": false, + "FileSystemWritableFileStream": false, + "find": false, + "focus": false, + "FocusEvent": false, + "FontData": false, + "FontFace": false, + "FontFaceSet": false, + "FontFaceSetLoadEvent": false, + "FormData": false, + "FormDataEvent": false, + "FragmentDirective": false, + "frameElement": false, + "frames": false, + "GainNode": false, + "Gamepad": false, + "GamepadAxisMoveEvent": false, + "GamepadButton": false, + "GamepadButtonEvent": false, + "GamepadEvent": false, + "GamepadHapticActuator": false, + "GamepadPose": false, + "Geolocation": false, + "GeolocationCoordinates": false, + "GeolocationPosition": false, + "GeolocationPositionError": false, + "getComputedStyle": false, + "getScreenDetails": false, + "getSelection": false, + "GPU": false, + "GPUAdapter": false, + "GPUAdapterInfo": false, + "GPUBindGroup": false, + "GPUBindGroupLayout": false, + "GPUBuffer": false, + "GPUBufferUsage": false, + "GPUCanvasContext": false, + "GPUColorWrite": false, + "GPUCommandBuffer": false, + "GPUCommandEncoder": false, + "GPUCompilationInfo": false, + "GPUCompilationMessage": false, + "GPUComputePassEncoder": false, + "GPUComputePipeline": false, + "GPUDevice": false, + "GPUDeviceLostInfo": false, + "GPUError": false, + "GPUExternalTexture": false, + "GPUInternalError": false, + "GPUMapMode": false, + "GPUOutOfMemoryError": false, + "GPUPipelineError": false, + "GPUPipelineLayout": false, + "GPUQuerySet": false, + "GPUQueue": false, + "GPURenderBundle": false, + "GPURenderBundleEncoder": false, + "GPURenderPassEncoder": false, + "GPURenderPipeline": false, + "GPUSampler": false, + "GPUShaderModule": false, + "GPUShaderStage": false, + "GPUSupportedFeatures": false, + "GPUSupportedLimits": false, + "GPUTexture": false, + "GPUTextureUsage": false, + "GPUTextureView": false, + "GPUUncapturedErrorEvent": false, + "GPUValidationError": false, + "GravitySensor": false, + "Gyroscope": false, + "HashChangeEvent": false, + "Headers": false, + "HID": false, + "HIDConnectionEvent": false, + "HIDDevice": false, + "HIDInputReportEvent": false, + "Highlight": false, + "HighlightRegistry": false, + "history": false, + "History": false, + "HTMLAllCollection": false, + "HTMLAnchorElement": false, + "HTMLAreaElement": false, + "HTMLAudioElement": false, + "HTMLBaseElement": false, + "HTMLBodyElement": false, + "HTMLBRElement": false, + "HTMLButtonElement": false, + "HTMLCanvasElement": false, + "HTMLCollection": false, + "HTMLDataElement": false, + "HTMLDataListElement": false, + "HTMLDetailsElement": false, + "HTMLDialogElement": false, + "HTMLDirectoryElement": false, + "HTMLDivElement": false, + "HTMLDListElement": false, + "HTMLDocument": false, + "HTMLElement": false, + "HTMLEmbedElement": false, + "HTMLFencedFrameElement": false, + "HTMLFieldSetElement": false, + "HTMLFontElement": false, + "HTMLFormControlsCollection": false, + "HTMLFormElement": false, + "HTMLFrameElement": false, + "HTMLFrameSetElement": false, + "HTMLHeadElement": false, + "HTMLHeadingElement": false, + "HTMLHRElement": false, + "HTMLHtmlElement": false, + "HTMLIFrameElement": false, + "HTMLImageElement": false, + "HTMLInputElement": false, + "HTMLLabelElement": false, + "HTMLLegendElement": false, + "HTMLLIElement": false, + "HTMLLinkElement": false, + "HTMLMapElement": false, + "HTMLMarqueeElement": false, + "HTMLMediaElement": false, + "HTMLMenuElement": false, + "HTMLMetaElement": false, + "HTMLMeterElement": false, + "HTMLModElement": false, + "HTMLObjectElement": false, + "HTMLOListElement": false, + "HTMLOptGroupElement": false, + "HTMLOptionElement": false, + "HTMLOptionsCollection": false, + "HTMLOutputElement": false, + "HTMLParagraphElement": false, + "HTMLParamElement": false, + "HTMLPictureElement": false, + "HTMLPreElement": false, + "HTMLProgressElement": false, + "HTMLQuoteElement": false, + "HTMLScriptElement": false, + "HTMLSelectedContentElement": false, + "HTMLSelectElement": false, + "HTMLSlotElement": false, + "HTMLSourceElement": false, + "HTMLSpanElement": false, + "HTMLStyleElement": false, + "HTMLTableCaptionElement": false, + "HTMLTableCellElement": false, + "HTMLTableColElement": false, + "HTMLTableElement": false, + "HTMLTableRowElement": false, + "HTMLTableSectionElement": false, + "HTMLTemplateElement": false, + "HTMLTextAreaElement": false, + "HTMLTimeElement": false, + "HTMLTitleElement": false, + "HTMLTrackElement": false, + "HTMLUListElement": false, + "HTMLUnknownElement": false, + "HTMLVideoElement": false, + "IDBCursor": false, + "IDBCursorWithValue": false, + "IDBDatabase": false, + "IDBFactory": false, + "IDBIndex": false, + "IDBKeyRange": false, + "IDBObjectStore": false, + "IDBOpenDBRequest": false, + "IDBRecord": false, + "IDBRequest": false, + "IDBTransaction": false, + "IDBVersionChangeEvent": false, + "IdentityCredential": false, + "IdentityCredentialError": false, + "IdentityProvider": false, + "IdleDeadline": false, + "IdleDetector": false, + "IIRFilterNode": false, + "Image": false, + "ImageBitmap": false, + "ImageBitmapRenderingContext": false, + "ImageCapture": false, + "ImageData": false, + "ImageDecoder": false, + "ImageTrack": false, + "ImageTrackList": false, + "indexedDB": false, + "Ink": false, + "innerHeight": false, + "innerWidth": false, + "InputDeviceCapabilities": false, + "InputDeviceInfo": false, + "InputEvent": false, + "IntegrityViolationReportBody": false, + "InterestEvent": false, + "IntersectionObserver": false, + "IntersectionObserverEntry": false, + "isSecureContext": false, + "Keyboard": false, + "KeyboardEvent": false, + "KeyboardLayoutMap": false, + "KeyframeEffect": false, + "LanguageDetector": false, + "LargestContentfulPaint": false, + "LaunchParams": false, + "launchQueue": false, + "LaunchQueue": false, + "LayoutShift": false, + "LayoutShiftAttribution": false, + "length": false, + "LinearAccelerationSensor": false, + "localStorage": false, + "location": true, + "Location": false, + "locationbar": false, + "Lock": false, + "LockManager": false, + "matchMedia": false, + "MathMLElement": false, + "MediaCapabilities": false, + "MediaCapabilitiesInfo": false, + "MediaDeviceInfo": false, + "MediaDevices": false, + "MediaElementAudioSourceNode": false, + "MediaEncryptedEvent": false, + "MediaError": false, + "MediaKeyError": false, + "MediaKeyMessageEvent": false, + "MediaKeys": false, + "MediaKeySession": false, + "MediaKeyStatusMap": false, + "MediaKeySystemAccess": false, + "MediaList": false, + "MediaMetadata": false, + "MediaQueryList": false, + "MediaQueryListEvent": false, + "MediaRecorder": false, + "MediaRecorderErrorEvent": false, + "MediaSession": false, + "MediaSource": false, + "MediaSourceHandle": false, + "MediaStream": false, + "MediaStreamAudioDestinationNode": false, + "MediaStreamAudioSourceNode": false, + "MediaStreamEvent": false, + "MediaStreamTrack": false, + "MediaStreamTrackAudioSourceNode": false, + "MediaStreamTrackAudioStats": false, + "MediaStreamTrackEvent": false, + "MediaStreamTrackGenerator": false, + "MediaStreamTrackProcessor": false, + "MediaStreamTrackVideoStats": false, + "menubar": false, + "MessageChannel": false, + "MessageEvent": false, + "MessagePort": false, + "MIDIAccess": false, + "MIDIConnectionEvent": false, + "MIDIInput": false, + "MIDIInputMap": false, + "MIDIMessageEvent": false, + "MIDIOutput": false, + "MIDIOutputMap": false, + "MIDIPort": false, + "MimeType": false, + "MimeTypeArray": false, + "model": false, + "ModelGenericSession": false, + "ModelManager": false, + "MouseEvent": false, + "moveBy": false, + "moveTo": false, + "MutationEvent": false, + "MutationObserver": false, + "MutationRecord": false, + "name": false, + "NamedNodeMap": false, + "NavigateEvent": false, + "navigation": false, + "Navigation": false, + "NavigationActivation": false, + "NavigationCurrentEntryChangeEvent": false, + "NavigationDestination": false, + "NavigationHistoryEntry": false, + "NavigationPrecommitController": false, + "NavigationPreloadManager": false, + "NavigationTransition": false, + "navigator": false, + "Navigator": false, + "NavigatorLogin": false, + "NavigatorManagedData": false, + "NavigatorUAData": false, + "NetworkInformation": false, + "Node": false, + "NodeFilter": false, + "NodeIterator": false, + "NodeList": false, + "Notification": false, + "NotifyPaintEvent": false, + "NotRestoredReasonDetails": false, + "NotRestoredReasons": false, + "Observable": false, + "OfflineAudioCompletionEvent": false, + "OfflineAudioContext": false, + "offscreenBuffering": false, + "OffscreenCanvas": false, + "OffscreenCanvasRenderingContext2D": false, + "onabort": true, + "onafterprint": true, + "onanimationcancel": true, + "onanimationend": true, + "onanimationiteration": true, + "onanimationstart": true, + "onappinstalled": true, + "onauxclick": true, + "onbeforeinput": true, + "onbeforeinstallprompt": true, + "onbeforematch": true, + "onbeforeprint": true, + "onbeforetoggle": true, + "onbeforeunload": true, + "onbeforexrselect": true, + "onblur": true, + "oncancel": true, + "oncanplay": true, + "oncanplaythrough": true, + "onchange": true, + "onclick": true, + "onclose": true, + "oncommand": true, + "oncontentvisibilityautostatechange": true, + "oncontextlost": true, + "oncontextmenu": true, + "oncontextrestored": true, + "oncopy": true, + "oncuechange": true, + "oncut": true, + "ondblclick": true, + "ondevicemotion": true, + "ondeviceorientation": true, + "ondeviceorientationabsolute": true, + "ondrag": true, + "ondragend": true, + "ondragenter": true, + "ondragleave": true, + "ondragover": true, + "ondragstart": true, + "ondrop": true, + "ondurationchange": true, + "onemptied": true, + "onended": true, + "onerror": true, + "onfocus": true, + "onformdata": true, + "ongamepadconnected": true, + "ongamepaddisconnected": true, + "ongotpointercapture": true, + "onhashchange": true, + "oninput": true, + "oninvalid": true, + "onkeydown": true, + "onkeypress": true, + "onkeyup": true, + "onlanguagechange": true, + "onload": true, + "onloadeddata": true, + "onloadedmetadata": true, + "onloadstart": true, + "onlostpointercapture": true, + "onmessage": true, + "onmessageerror": true, + "onmousedown": true, + "onmouseenter": true, + "onmouseleave": true, + "onmousemove": true, + "onmouseout": true, + "onmouseover": true, + "onmouseup": true, + "onmousewheel": true, + "onoffline": true, + "ononline": true, + "onpagehide": true, + "onpagereveal": true, + "onpageshow": true, + "onpageswap": true, + "onpaste": true, + "onpause": true, + "onplay": true, + "onplaying": true, + "onpointercancel": true, + "onpointerdown": true, + "onpointerenter": true, + "onpointerleave": true, + "onpointermove": true, + "onpointerout": true, + "onpointerover": true, + "onpointerrawupdate": true, + "onpointerup": true, + "onpopstate": true, + "onprogress": true, + "onratechange": true, + "onrejectionhandled": true, + "onreset": true, + "onresize": true, + "onscroll": true, + "onscrollend": true, + "onscrollsnapchange": true, + "onscrollsnapchanging": true, + "onsearch": true, + "onsecuritypolicyviolation": true, + "onseeked": true, + "onseeking": true, + "onselect": true, + "onselectionchange": true, + "onselectstart": true, + "onslotchange": true, + "onstalled": true, + "onstorage": true, + "onsubmit": true, + "onsuspend": true, + "ontimeupdate": true, + "ontoggle": true, + "ontransitioncancel": true, + "ontransitionend": true, + "ontransitionrun": true, + "ontransitionstart": true, + "onunhandledrejection": true, + "onunload": true, + "onvolumechange": true, + "onwaiting": true, + "onwheel": true, + "open": false, + "opener": false, + "Option": false, + "OrientationSensor": false, + "origin": false, + "originAgentCluster": false, + "OscillatorNode": false, + "OTPCredential": false, + "outerHeight": false, + "outerWidth": false, + "OverconstrainedError": false, + "PageRevealEvent": false, + "PageSwapEvent": false, + "PageTransitionEvent": false, + "pageXOffset": false, + "pageYOffset": false, + "PannerNode": false, + "parent": false, + "PasswordCredential": false, + "Path2D": false, + "PaymentAddress": false, + "PaymentManager": false, + "PaymentMethodChangeEvent": false, + "PaymentRequest": false, + "PaymentRequestUpdateEvent": false, + "PaymentResponse": false, + "performance": false, + "Performance": false, + "PerformanceElementTiming": false, + "PerformanceEntry": false, + "PerformanceEventTiming": false, + "PerformanceLongAnimationFrameTiming": false, + "PerformanceLongTaskTiming": false, + "PerformanceMark": false, + "PerformanceMeasure": false, + "PerformanceNavigation": false, + "PerformanceNavigationTiming": false, + "PerformanceObserver": false, + "PerformanceObserverEntryList": false, + "PerformancePaintTiming": false, + "PerformanceResourceTiming": false, + "PerformanceScriptTiming": false, + "PerformanceServerTiming": false, + "PerformanceTiming": false, + "PeriodicSyncManager": false, + "PeriodicWave": false, + "Permissions": false, + "PermissionStatus": false, + "PERSISTENT": false, + "personalbar": false, + "PictureInPictureEvent": false, + "PictureInPictureWindow": false, + "Plugin": false, + "PluginArray": false, + "PointerEvent": false, + "PopStateEvent": false, + "postMessage": false, + "Presentation": false, + "PresentationAvailability": false, + "PresentationConnection": false, + "PresentationConnectionAvailableEvent": false, + "PresentationConnectionCloseEvent": false, + "PresentationConnectionList": false, + "PresentationReceiver": false, + "PresentationRequest": false, + "PressureObserver": false, + "PressureRecord": false, + "print": false, + "ProcessingInstruction": false, + "Profiler": false, + "ProgressEvent": false, + "PromiseRejectionEvent": false, + "prompt": false, + "ProtectedAudience": false, + "PublicKeyCredential": false, + "PushManager": false, + "PushSubscription": false, + "PushSubscriptionOptions": false, + "queryLocalFonts": false, + "queueMicrotask": false, + "QuotaExceededError": false, + "RadioNodeList": false, + "Range": false, + "ReadableByteStreamController": false, + "ReadableStream": false, + "ReadableStreamBYOBReader": false, + "ReadableStreamBYOBRequest": false, + "ReadableStreamDefaultController": false, + "ReadableStreamDefaultReader": false, + "registerProcessor": false, + "RelativeOrientationSensor": false, + "RemotePlayback": false, + "removeEventListener": false, + "ReportBody": false, + "reportError": false, + "ReportingObserver": false, + "Request": false, + "requestAnimationFrame": false, + "requestIdleCallback": false, + "resizeBy": false, + "ResizeObserver": false, + "ResizeObserverEntry": false, + "ResizeObserverSize": false, + "resizeTo": false, + "Response": false, + "RestrictionTarget": false, + "RTCCertificate": false, + "RTCDataChannel": false, + "RTCDataChannelEvent": false, + "RTCDtlsTransport": false, + "RTCDTMFSender": false, + "RTCDTMFToneChangeEvent": false, + "RTCEncodedAudioFrame": false, + "RTCEncodedVideoFrame": false, + "RTCError": false, + "RTCErrorEvent": false, + "RTCIceCandidate": false, + "RTCIceTransport": false, + "RTCPeerConnection": false, + "RTCPeerConnectionIceErrorEvent": false, + "RTCPeerConnectionIceEvent": false, + "RTCRtpReceiver": false, + "RTCRtpScriptTransform": false, + "RTCRtpSender": false, + "RTCRtpTransceiver": false, + "RTCSctpTransport": false, + "RTCSessionDescription": false, + "RTCStatsReport": false, + "RTCTrackEvent": false, + "sampleRate": false, + "scheduler": false, + "Scheduler": false, + "Scheduling": false, + "screen": false, + "Screen": false, + "ScreenDetailed": false, + "ScreenDetails": false, + "screenLeft": false, + "ScreenOrientation": false, + "screenTop": false, + "screenX": false, + "screenY": false, + "ScriptProcessorNode": false, + "scroll": false, + "scrollbars": false, + "scrollBy": false, + "ScrollTimeline": false, + "scrollTo": false, + "scrollX": false, + "scrollY": false, + "SecurityPolicyViolationEvent": false, + "Selection": false, + "self": false, + "Sensor": false, + "SensorErrorEvent": false, + "Serial": false, + "SerialPort": false, + "ServiceWorker": false, + "ServiceWorkerContainer": false, + "ServiceWorkerRegistration": false, + "sessionStorage": false, + "setInterval": false, + "setTimeout": false, + "ShadowRoot": false, + "sharedStorage": false, + "SharedStorage": false, + "SharedStorageAppendMethod": false, + "SharedStorageClearMethod": false, + "SharedStorageDeleteMethod": false, + "SharedStorageModifierMethod": false, + "SharedStorageSetMethod": false, + "SharedStorageWorklet": false, + "SharedWorker": false, + "showDirectoryPicker": false, + "showOpenFilePicker": false, + "showSaveFilePicker": false, + "SnapEvent": false, + "SourceBuffer": false, + "SourceBufferList": false, + "SpeechGrammar": false, + "SpeechGrammarList": false, + "SpeechRecognition": false, + "SpeechRecognitionErrorEvent": false, + "SpeechRecognitionEvent": false, + "SpeechRecognitionPhrase": false, + "speechSynthesis": false, + "SpeechSynthesis": false, + "SpeechSynthesisErrorEvent": false, + "SpeechSynthesisEvent": false, + "SpeechSynthesisUtterance": false, + "SpeechSynthesisVoice": false, + "StaticRange": false, + "status": false, + "statusbar": false, + "StereoPannerNode": false, + "stop": false, + "Storage": false, + "StorageBucket": false, + "StorageBucketManager": false, + "StorageEvent": false, + "StorageManager": false, + "structuredClone": false, + "styleMedia": false, + "StylePropertyMap": false, + "StylePropertyMapReadOnly": false, + "StyleSheet": false, + "StyleSheetList": false, + "SubmitEvent": false, + "Subscriber": false, + "SubtleCrypto": false, + "Summarizer": false, + "SuppressedError": false, + "SVGAElement": false, + "SVGAngle": false, + "SVGAnimatedAngle": false, + "SVGAnimatedBoolean": false, + "SVGAnimatedEnumeration": false, + "SVGAnimatedInteger": false, + "SVGAnimatedLength": false, + "SVGAnimatedLengthList": false, + "SVGAnimatedNumber": false, + "SVGAnimatedNumberList": false, + "SVGAnimatedPreserveAspectRatio": false, + "SVGAnimatedRect": false, + "SVGAnimatedString": false, + "SVGAnimatedTransformList": false, + "SVGAnimateElement": false, + "SVGAnimateMotionElement": false, + "SVGAnimateTransformElement": false, + "SVGAnimationElement": false, + "SVGCircleElement": false, + "SVGClipPathElement": false, + "SVGComponentTransferFunctionElement": false, + "SVGDefsElement": false, + "SVGDescElement": false, + "SVGElement": false, + "SVGEllipseElement": false, + "SVGFEBlendElement": false, + "SVGFEColorMatrixElement": false, + "SVGFEComponentTransferElement": false, + "SVGFECompositeElement": false, + "SVGFEConvolveMatrixElement": false, + "SVGFEDiffuseLightingElement": false, + "SVGFEDisplacementMapElement": false, + "SVGFEDistantLightElement": false, + "SVGFEDropShadowElement": false, + "SVGFEFloodElement": false, + "SVGFEFuncAElement": false, + "SVGFEFuncBElement": false, + "SVGFEFuncGElement": false, + "SVGFEFuncRElement": false, + "SVGFEGaussianBlurElement": false, + "SVGFEImageElement": false, + "SVGFEMergeElement": false, + "SVGFEMergeNodeElement": false, + "SVGFEMorphologyElement": false, + "SVGFEOffsetElement": false, + "SVGFEPointLightElement": false, + "SVGFESpecularLightingElement": false, + "SVGFESpotLightElement": false, + "SVGFETileElement": false, + "SVGFETurbulenceElement": false, + "SVGFilterElement": false, + "SVGForeignObjectElement": false, + "SVGGElement": false, + "SVGGeometryElement": false, + "SVGGradientElement": false, + "SVGGraphicsElement": false, + "SVGImageElement": false, + "SVGLength": false, + "SVGLengthList": false, + "SVGLinearGradientElement": false, + "SVGLineElement": false, + "SVGMarkerElement": false, + "SVGMaskElement": false, + "SVGMatrix": false, + "SVGMetadataElement": false, + "SVGMPathElement": false, + "SVGNumber": false, + "SVGNumberList": false, + "SVGPathElement": false, + "SVGPatternElement": false, + "SVGPoint": false, + "SVGPointList": false, + "SVGPolygonElement": false, + "SVGPolylineElement": false, + "SVGPreserveAspectRatio": false, + "SVGRadialGradientElement": false, + "SVGRect": false, + "SVGRectElement": false, + "SVGScriptElement": false, + "SVGSetElement": false, + "SVGStopElement": false, + "SVGStringList": false, + "SVGStyleElement": false, + "SVGSVGElement": false, + "SVGSwitchElement": false, + "SVGSymbolElement": false, + "SVGTextContentElement": false, + "SVGTextElement": false, + "SVGTextPathElement": false, + "SVGTextPositioningElement": false, + "SVGTitleElement": false, + "SVGTransform": false, + "SVGTransformList": false, + "SVGTSpanElement": false, + "SVGUnitTypes": false, + "SVGUseElement": false, + "SVGViewElement": false, + "SyncManager": false, + "TaskAttributionTiming": false, + "TaskController": false, + "TaskPriorityChangeEvent": false, + "TaskSignal": false, + "TEMPORARY": false, + "Text": false, + "TextDecoder": false, + "TextDecoderStream": false, + "TextEncoder": false, + "TextEncoderStream": false, + "TextEvent": false, + "TextFormat": false, + "TextFormatUpdateEvent": false, + "TextMetrics": false, + "TextTrack": false, + "TextTrackCue": false, + "TextTrackCueList": false, + "TextTrackList": false, + "TextUpdateEvent": false, + "TimeEvent": false, + "TimeRanges": false, + "ToggleEvent": false, + "toolbar": false, + "top": false, + "Touch": false, + "TouchEvent": false, + "TouchList": false, + "TrackEvent": false, + "TransformStream": false, + "TransformStreamDefaultController": false, + "TransitionEvent": false, + "Translator": false, + "TreeWalker": false, + "TrustedHTML": false, + "TrustedScript": false, + "TrustedScriptURL": false, + "TrustedTypePolicy": false, + "TrustedTypePolicyFactory": false, + "trustedTypes": false, + "UIEvent": false, + "URL": false, + "URLPattern": false, + "URLSearchParams": false, + "USB": false, + "USBAlternateInterface": false, + "USBConfiguration": false, + "USBConnectionEvent": false, + "USBDevice": false, + "USBEndpoint": false, + "USBInterface": false, + "USBInTransferResult": false, + "USBIsochronousInTransferPacket": false, + "USBIsochronousInTransferResult": false, + "USBIsochronousOutTransferPacket": false, + "USBIsochronousOutTransferResult": false, + "USBOutTransferResult": false, + "UserActivation": false, + "ValidityState": false, + "VideoColorSpace": false, + "VideoDecoder": false, + "VideoEncoder": false, + "VideoFrame": false, + "VideoPlaybackQuality": false, + "viewport": false, + "Viewport": false, + "ViewTimeline": false, + "ViewTransition": false, + "ViewTransitionTypeSet": false, + "VirtualKeyboard": false, + "VirtualKeyboardGeometryChangeEvent": false, + "VisibilityStateEntry": false, + "visualViewport": false, + "VisualViewport": false, + "VTTCue": false, + "VTTRegion": false, + "WakeLock": false, + "WakeLockSentinel": false, + "WaveShaperNode": false, + "WebAssembly": false, + "WebGL2RenderingContext": false, + "WebGLActiveInfo": false, + "WebGLBuffer": false, + "WebGLContextEvent": false, + "WebGLFramebuffer": false, + "WebGLObject": false, + "WebGLProgram": false, + "WebGLQuery": false, + "WebGLRenderbuffer": false, + "WebGLRenderingContext": false, + "WebGLSampler": false, + "WebGLShader": false, + "WebGLShaderPrecisionFormat": false, + "WebGLSync": false, + "WebGLTexture": false, + "WebGLTransformFeedback": false, + "WebGLUniformLocation": false, + "WebGLVertexArrayObject": false, + "WebSocket": false, + "WebSocketError": false, + "WebSocketStream": false, + "WebTransport": false, + "WebTransportBidirectionalStream": false, + "WebTransportDatagramDuplexStream": false, + "WebTransportError": false, + "WebTransportReceiveStream": false, + "WebTransportSendStream": false, + "WGSLLanguageFeatures": false, + "WheelEvent": false, + "when": false, + "window": false, + "Window": false, + "WindowControlsOverlay": false, + "WindowControlsOverlayGeometryChangeEvent": false, + "Worker": false, + "Worklet": false, + "WorkletGlobalScope": false, + "WritableStream": false, + "WritableStreamDefaultController": false, + "WritableStreamDefaultWriter": false, + "XMLDocument": false, + "XMLHttpRequest": false, + "XMLHttpRequestEventTarget": false, + "XMLHttpRequestUpload": false, + "XMLSerializer": false, + "XPathEvaluator": false, + "XPathExpression": false, + "XPathResult": false, + "XRAnchor": false, + "XRAnchorSet": false, + "XRBoundedReferenceSpace": false, + "XRCamera": false, + "XRCPUDepthInformation": false, + "XRDepthInformation": false, + "XRDOMOverlayState": false, + "XRFrame": false, + "XRHand": false, + "XRHitTestResult": false, + "XRHitTestSource": false, + "XRInputSource": false, + "XRInputSourceArray": false, + "XRInputSourceEvent": false, + "XRInputSourcesChangeEvent": false, + "XRJointPose": false, + "XRJointSpace": false, + "XRLayer": false, + "XRLightEstimate": false, + "XRLightProbe": false, + "XRPose": false, + "XRRay": false, + "XRReferenceSpace": false, + "XRReferenceSpaceEvent": false, + "XRRenderState": false, + "XRRigidTransform": false, + "XRSession": false, + "XRSessionEvent": false, + "XRSpace": false, + "XRSystem": false, + "XRTransientInputHitTestResult": false, + "XRTransientInputHitTestSource": false, + "XRView": false, + "XRViewerPose": false, + "XRViewport": false, + "XRWebGLBinding": false, + "XRWebGLDepthInformation": false, + "XRWebGLLayer": false, + "XSLTProcessor": false + } + }, + "errors": [ + { + "messageId": "impliedEval" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-implied-eval > invalid + +```js +global.setTimeout('foo' + bar) +``` + +```json +{ + "languageOptions": { + "sourceType": "commonjs" + }, + "errors": [ + { + "messageId": "impliedEval" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-implied-eval > invalid + +```js +global.setTimeout(foo + 'bar') +``` + +```json +{ + "languageOptions": { + "sourceType": "commonjs" + }, + "errors": [ + { + "messageId": "impliedEval" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-implied-eval > invalid + +```js +global.setTimeout(`foo` + bar) +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "commonjs" + }, + "errors": [ + { + "messageId": "impliedEval" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-implied-eval > invalid + +```js +global.setTimeout(1 + ';' + 1) +``` + +```json +{ + "languageOptions": { + "sourceType": "commonjs" + }, + "errors": [ + { + "messageId": "impliedEval" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-implied-eval > invalid + +```js +global.global.setTimeout(1 + ';' + 1) +``` + +```json +{ + "languageOptions": { + "sourceType": "commonjs" + }, + "errors": [ + { + "messageId": "impliedEval" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-implied-eval > invalid + +```js +globalThis.setTimeout('foo' + bar) +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2020 + }, + "errors": [ + { + "messageId": "impliedEval" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-implied-eval > invalid + +```js +setTimeout('foo' + (function() { + setTimeout(helper); + execScript('str'); + return 'bar'; +})()) +``` + +```json +{ + "languageOptions": { + "globals": { + "AbortController": false, + "AbortSignal": false, + "AbsoluteOrientationSensor": false, + "AbstractRange": false, + "Accelerometer": false, + "addEventListener": false, + "ai": false, + "AI": false, + "AICreateMonitor": false, + "AITextSession": false, + "alert": false, + "AnalyserNode": false, + "Animation": false, + "AnimationEffect": false, + "AnimationEvent": false, + "AnimationPlaybackEvent": false, + "AnimationTimeline": false, + "AsyncDisposableStack": false, + "atob": false, + "Attr": false, + "Audio": false, + "AudioBuffer": false, + "AudioBufferSourceNode": false, + "AudioContext": false, + "AudioData": false, + "AudioDecoder": false, + "AudioDestinationNode": false, + "AudioEncoder": false, + "AudioListener": false, + "AudioNode": false, + "AudioParam": false, + "AudioParamMap": false, + "AudioProcessingEvent": false, + "AudioScheduledSourceNode": false, + "AudioSinkInfo": false, + "AudioWorklet": false, + "AudioWorkletGlobalScope": false, + "AudioWorkletNode": false, + "AudioWorkletProcessor": false, + "AuthenticatorAssertionResponse": false, + "AuthenticatorAttestationResponse": false, + "AuthenticatorResponse": false, + "BackgroundFetchManager": false, + "BackgroundFetchRecord": false, + "BackgroundFetchRegistration": false, + "BarcodeDetector": false, + "BarProp": false, + "BaseAudioContext": false, + "BatteryManager": false, + "BeforeUnloadEvent": false, + "BiquadFilterNode": false, + "Blob": false, + "BlobEvent": false, + "Bluetooth": false, + "BluetoothCharacteristicProperties": false, + "BluetoothDevice": false, + "BluetoothRemoteGATTCharacteristic": false, + "BluetoothRemoteGATTDescriptor": false, + "BluetoothRemoteGATTServer": false, + "BluetoothRemoteGATTService": false, + "BluetoothUUID": false, + "blur": false, + "BroadcastChannel": false, + "BrowserCaptureMediaStreamTrack": false, + "btoa": false, + "ByteLengthQueuingStrategy": false, + "Cache": false, + "caches": false, + "CacheStorage": false, + "cancelAnimationFrame": false, + "cancelIdleCallback": false, + "CanvasCaptureMediaStream": false, + "CanvasCaptureMediaStreamTrack": false, + "CanvasGradient": false, + "CanvasPattern": false, + "CanvasRenderingContext2D": false, + "CaptureController": false, + "CaretPosition": false, + "CDATASection": false, + "ChannelMergerNode": false, + "ChannelSplitterNode": false, + "ChapterInformation": false, + "CharacterBoundsUpdateEvent": false, + "CharacterData": false, + "clearInterval": false, + "clearTimeout": false, + "clientInformation": false, + "Clipboard": false, + "ClipboardChangeEvent": false, + "ClipboardEvent": false, + "ClipboardItem": false, + "close": false, + "closed": false, + "CloseEvent": false, + "CloseWatcher": false, + "CommandEvent": false, + "Comment": false, + "CompositionEvent": false, + "CompressionStream": false, + "confirm": false, + "console": false, + "ConstantSourceNode": false, + "ContentVisibilityAutoStateChangeEvent": false, + "ConvolverNode": false, + "CookieChangeEvent": false, + "CookieDeprecationLabel": false, + "cookieStore": false, + "CookieStore": false, + "CookieStoreManager": false, + "CountQueuingStrategy": false, + "createImageBitmap": false, + "CreateMonitor": false, + "Credential": false, + "credentialless": false, + "CredentialsContainer": false, + "CropTarget": false, + "crossOriginIsolated": false, + "crypto": false, + "Crypto": false, + "CryptoKey": false, + "CSPViolationReportBody": false, + "CSS": false, + "CSSAnimation": false, + "CSSConditionRule": false, + "CSSContainerRule": false, + "CSSCounterStyleRule": false, + "CSSFontFaceRule": false, + "CSSFontFeatureValuesRule": false, + "CSSFontPaletteValuesRule": false, + "CSSFunctionDeclarations": false, + "CSSFunctionDescriptors": false, + "CSSFunctionRule": false, + "CSSGroupingRule": false, + "CSSImageValue": false, + "CSSImportRule": false, + "CSSKeyframeRule": false, + "CSSKeyframesRule": false, + "CSSKeywordValue": false, + "CSSLayerBlockRule": false, + "CSSLayerStatementRule": false, + "CSSMarginRule": false, + "CSSMathClamp": false, + "CSSMathInvert": false, + "CSSMathMax": false, + "CSSMathMin": false, + "CSSMathNegate": false, + "CSSMathProduct": false, + "CSSMathSum": false, + "CSSMathValue": false, + "CSSMatrixComponent": false, + "CSSMediaRule": false, + "CSSNamespaceRule": false, + "CSSNestedDeclarations": false, + "CSSNumericArray": false, + "CSSNumericValue": false, + "CSSPageDescriptors": false, + "CSSPageRule": false, + "CSSPerspective": false, + "CSSPositionTryDescriptors": false, + "CSSPositionTryRule": false, + "CSSPositionValue": false, + "CSSPropertyRule": false, + "CSSRotate": false, + "CSSRule": false, + "CSSRuleList": false, + "CSSScale": false, + "CSSScopeRule": false, + "CSSSkew": false, + "CSSSkewX": false, + "CSSSkewY": false, + "CSSStartingStyleRule": false, + "CSSStyleDeclaration": false, + "CSSStyleRule": false, + "CSSStyleSheet": false, + "CSSStyleValue": false, + "CSSSupportsRule": false, + "CSSTransformComponent": false, + "CSSTransformValue": false, + "CSSTransition": false, + "CSSTranslate": false, + "CSSUnitValue": false, + "CSSUnparsedValue": false, + "CSSVariableReferenceValue": false, + "CSSViewTransitionRule": false, + "currentFrame": false, + "currentTime": false, + "CustomElementRegistry": false, + "customElements": false, + "CustomEvent": false, + "CustomStateSet": false, + "DataTransfer": false, + "DataTransferItem": false, + "DataTransferItemList": false, + "DecompressionStream": false, + "DelayNode": false, + "DelegatedInkTrailPresenter": false, + "DeviceMotionEvent": false, + "DeviceMotionEventAcceleration": false, + "DeviceMotionEventRotationRate": false, + "DeviceOrientationEvent": false, + "devicePixelRatio": false, + "DevicePosture": false, + "DigitalCredential": false, + "dispatchEvent": false, + "DisposableStack": false, + "document": false, + "Document": false, + "DocumentFragment": false, + "documentPictureInPicture": false, + "DocumentPictureInPicture": false, + "DocumentPictureInPictureEvent": false, + "DocumentTimeline": false, + "DocumentType": false, + "DOMError": false, + "DOMException": false, + "DOMImplementation": false, + "DOMMatrix": false, + "DOMMatrixReadOnly": false, + "DOMParser": false, + "DOMPoint": false, + "DOMPointReadOnly": false, + "DOMQuad": false, + "DOMRect": false, + "DOMRectList": false, + "DOMRectReadOnly": false, + "DOMStringList": false, + "DOMStringMap": false, + "DOMTokenList": false, + "DragEvent": false, + "DynamicsCompressorNode": false, + "EditContext": false, + "Element": false, + "ElementInternals": false, + "EncodedAudioChunk": false, + "EncodedVideoChunk": false, + "ErrorEvent": false, + "event": false, + "Event": false, + "EventCounts": false, + "EventSource": false, + "EventTarget": false, + "external": false, + "External": false, + "EyeDropper": false, + "FeaturePolicy": false, + "FederatedCredential": false, + "fence": false, + "Fence": false, + "FencedFrameConfig": false, + "fetch": false, + "fetchLater": false, + "FetchLaterResult": false, + "File": false, + "FileList": false, + "FileReader": false, + "FileSystem": false, + "FileSystemDirectoryEntry": false, + "FileSystemDirectoryHandle": false, + "FileSystemDirectoryReader": false, + "FileSystemEntry": false, + "FileSystemFileEntry": false, + "FileSystemFileHandle": false, + "FileSystemHandle": false, + "FileSystemObserver": false, + "FileSystemWritableFileStream": false, + "find": false, + "focus": false, + "FocusEvent": false, + "FontData": false, + "FontFace": false, + "FontFaceSet": false, + "FontFaceSetLoadEvent": false, + "FormData": false, + "FormDataEvent": false, + "FragmentDirective": false, + "frameElement": false, + "frames": false, + "GainNode": false, + "Gamepad": false, + "GamepadAxisMoveEvent": false, + "GamepadButton": false, + "GamepadButtonEvent": false, + "GamepadEvent": false, + "GamepadHapticActuator": false, + "GamepadPose": false, + "Geolocation": false, + "GeolocationCoordinates": false, + "GeolocationPosition": false, + "GeolocationPositionError": false, + "getComputedStyle": false, + "getScreenDetails": false, + "getSelection": false, + "GPU": false, + "GPUAdapter": false, + "GPUAdapterInfo": false, + "GPUBindGroup": false, + "GPUBindGroupLayout": false, + "GPUBuffer": false, + "GPUBufferUsage": false, + "GPUCanvasContext": false, + "GPUColorWrite": false, + "GPUCommandBuffer": false, + "GPUCommandEncoder": false, + "GPUCompilationInfo": false, + "GPUCompilationMessage": false, + "GPUComputePassEncoder": false, + "GPUComputePipeline": false, + "GPUDevice": false, + "GPUDeviceLostInfo": false, + "GPUError": false, + "GPUExternalTexture": false, + "GPUInternalError": false, + "GPUMapMode": false, + "GPUOutOfMemoryError": false, + "GPUPipelineError": false, + "GPUPipelineLayout": false, + "GPUQuerySet": false, + "GPUQueue": false, + "GPURenderBundle": false, + "GPURenderBundleEncoder": false, + "GPURenderPassEncoder": false, + "GPURenderPipeline": false, + "GPUSampler": false, + "GPUShaderModule": false, + "GPUShaderStage": false, + "GPUSupportedFeatures": false, + "GPUSupportedLimits": false, + "GPUTexture": false, + "GPUTextureUsage": false, + "GPUTextureView": false, + "GPUUncapturedErrorEvent": false, + "GPUValidationError": false, + "GravitySensor": false, + "Gyroscope": false, + "HashChangeEvent": false, + "Headers": false, + "HID": false, + "HIDConnectionEvent": false, + "HIDDevice": false, + "HIDInputReportEvent": false, + "Highlight": false, + "HighlightRegistry": false, + "history": false, + "History": false, + "HTMLAllCollection": false, + "HTMLAnchorElement": false, + "HTMLAreaElement": false, + "HTMLAudioElement": false, + "HTMLBaseElement": false, + "HTMLBodyElement": false, + "HTMLBRElement": false, + "HTMLButtonElement": false, + "HTMLCanvasElement": false, + "HTMLCollection": false, + "HTMLDataElement": false, + "HTMLDataListElement": false, + "HTMLDetailsElement": false, + "HTMLDialogElement": false, + "HTMLDirectoryElement": false, + "HTMLDivElement": false, + "HTMLDListElement": false, + "HTMLDocument": false, + "HTMLElement": false, + "HTMLEmbedElement": false, + "HTMLFencedFrameElement": false, + "HTMLFieldSetElement": false, + "HTMLFontElement": false, + "HTMLFormControlsCollection": false, + "HTMLFormElement": false, + "HTMLFrameElement": false, + "HTMLFrameSetElement": false, + "HTMLHeadElement": false, + "HTMLHeadingElement": false, + "HTMLHRElement": false, + "HTMLHtmlElement": false, + "HTMLIFrameElement": false, + "HTMLImageElement": false, + "HTMLInputElement": false, + "HTMLLabelElement": false, + "HTMLLegendElement": false, + "HTMLLIElement": false, + "HTMLLinkElement": false, + "HTMLMapElement": false, + "HTMLMarqueeElement": false, + "HTMLMediaElement": false, + "HTMLMenuElement": false, + "HTMLMetaElement": false, + "HTMLMeterElement": false, + "HTMLModElement": false, + "HTMLObjectElement": false, + "HTMLOListElement": false, + "HTMLOptGroupElement": false, + "HTMLOptionElement": false, + "HTMLOptionsCollection": false, + "HTMLOutputElement": false, + "HTMLParagraphElement": false, + "HTMLParamElement": false, + "HTMLPictureElement": false, + "HTMLPreElement": false, + "HTMLProgressElement": false, + "HTMLQuoteElement": false, + "HTMLScriptElement": false, + "HTMLSelectedContentElement": false, + "HTMLSelectElement": false, + "HTMLSlotElement": false, + "HTMLSourceElement": false, + "HTMLSpanElement": false, + "HTMLStyleElement": false, + "HTMLTableCaptionElement": false, + "HTMLTableCellElement": false, + "HTMLTableColElement": false, + "HTMLTableElement": false, + "HTMLTableRowElement": false, + "HTMLTableSectionElement": false, + "HTMLTemplateElement": false, + "HTMLTextAreaElement": false, + "HTMLTimeElement": false, + "HTMLTitleElement": false, + "HTMLTrackElement": false, + "HTMLUListElement": false, + "HTMLUnknownElement": false, + "HTMLVideoElement": false, + "IDBCursor": false, + "IDBCursorWithValue": false, + "IDBDatabase": false, + "IDBFactory": false, + "IDBIndex": false, + "IDBKeyRange": false, + "IDBObjectStore": false, + "IDBOpenDBRequest": false, + "IDBRecord": false, + "IDBRequest": false, + "IDBTransaction": false, + "IDBVersionChangeEvent": false, + "IdentityCredential": false, + "IdentityCredentialError": false, + "IdentityProvider": false, + "IdleDeadline": false, + "IdleDetector": false, + "IIRFilterNode": false, + "Image": false, + "ImageBitmap": false, + "ImageBitmapRenderingContext": false, + "ImageCapture": false, + "ImageData": false, + "ImageDecoder": false, + "ImageTrack": false, + "ImageTrackList": false, + "indexedDB": false, + "Ink": false, + "innerHeight": false, + "innerWidth": false, + "InputDeviceCapabilities": false, + "InputDeviceInfo": false, + "InputEvent": false, + "IntegrityViolationReportBody": false, + "InterestEvent": false, + "IntersectionObserver": false, + "IntersectionObserverEntry": false, + "isSecureContext": false, + "Keyboard": false, + "KeyboardEvent": false, + "KeyboardLayoutMap": false, + "KeyframeEffect": false, + "LanguageDetector": false, + "LargestContentfulPaint": false, + "LaunchParams": false, + "launchQueue": false, + "LaunchQueue": false, + "LayoutShift": false, + "LayoutShiftAttribution": false, + "length": false, + "LinearAccelerationSensor": false, + "localStorage": false, + "location": true, + "Location": false, + "locationbar": false, + "Lock": false, + "LockManager": false, + "matchMedia": false, + "MathMLElement": false, + "MediaCapabilities": false, + "MediaCapabilitiesInfo": false, + "MediaDeviceInfo": false, + "MediaDevices": false, + "MediaElementAudioSourceNode": false, + "MediaEncryptedEvent": false, + "MediaError": false, + "MediaKeyError": false, + "MediaKeyMessageEvent": false, + "MediaKeys": false, + "MediaKeySession": false, + "MediaKeyStatusMap": false, + "MediaKeySystemAccess": false, + "MediaList": false, + "MediaMetadata": false, + "MediaQueryList": false, + "MediaQueryListEvent": false, + "MediaRecorder": false, + "MediaRecorderErrorEvent": false, + "MediaSession": false, + "MediaSource": false, + "MediaSourceHandle": false, + "MediaStream": false, + "MediaStreamAudioDestinationNode": false, + "MediaStreamAudioSourceNode": false, + "MediaStreamEvent": false, + "MediaStreamTrack": false, + "MediaStreamTrackAudioSourceNode": false, + "MediaStreamTrackAudioStats": false, + "MediaStreamTrackEvent": false, + "MediaStreamTrackGenerator": false, + "MediaStreamTrackProcessor": false, + "MediaStreamTrackVideoStats": false, + "menubar": false, + "MessageChannel": false, + "MessageEvent": false, + "MessagePort": false, + "MIDIAccess": false, + "MIDIConnectionEvent": false, + "MIDIInput": false, + "MIDIInputMap": false, + "MIDIMessageEvent": false, + "MIDIOutput": false, + "MIDIOutputMap": false, + "MIDIPort": false, + "MimeType": false, + "MimeTypeArray": false, + "model": false, + "ModelGenericSession": false, + "ModelManager": false, + "MouseEvent": false, + "moveBy": false, + "moveTo": false, + "MutationEvent": false, + "MutationObserver": false, + "MutationRecord": false, + "name": false, + "NamedNodeMap": false, + "NavigateEvent": false, + "navigation": false, + "Navigation": false, + "NavigationActivation": false, + "NavigationCurrentEntryChangeEvent": false, + "NavigationDestination": false, + "NavigationHistoryEntry": false, + "NavigationPrecommitController": false, + "NavigationPreloadManager": false, + "NavigationTransition": false, + "navigator": false, + "Navigator": false, + "NavigatorLogin": false, + "NavigatorManagedData": false, + "NavigatorUAData": false, + "NetworkInformation": false, + "Node": false, + "NodeFilter": false, + "NodeIterator": false, + "NodeList": false, + "Notification": false, + "NotifyPaintEvent": false, + "NotRestoredReasonDetails": false, + "NotRestoredReasons": false, + "Observable": false, + "OfflineAudioCompletionEvent": false, + "OfflineAudioContext": false, + "offscreenBuffering": false, + "OffscreenCanvas": false, + "OffscreenCanvasRenderingContext2D": false, + "onabort": true, + "onafterprint": true, + "onanimationcancel": true, + "onanimationend": true, + "onanimationiteration": true, + "onanimationstart": true, + "onappinstalled": true, + "onauxclick": true, + "onbeforeinput": true, + "onbeforeinstallprompt": true, + "onbeforematch": true, + "onbeforeprint": true, + "onbeforetoggle": true, + "onbeforeunload": true, + "onbeforexrselect": true, + "onblur": true, + "oncancel": true, + "oncanplay": true, + "oncanplaythrough": true, + "onchange": true, + "onclick": true, + "onclose": true, + "oncommand": true, + "oncontentvisibilityautostatechange": true, + "oncontextlost": true, + "oncontextmenu": true, + "oncontextrestored": true, + "oncopy": true, + "oncuechange": true, + "oncut": true, + "ondblclick": true, + "ondevicemotion": true, + "ondeviceorientation": true, + "ondeviceorientationabsolute": true, + "ondrag": true, + "ondragend": true, + "ondragenter": true, + "ondragleave": true, + "ondragover": true, + "ondragstart": true, + "ondrop": true, + "ondurationchange": true, + "onemptied": true, + "onended": true, + "onerror": true, + "onfocus": true, + "onformdata": true, + "ongamepadconnected": true, + "ongamepaddisconnected": true, + "ongotpointercapture": true, + "onhashchange": true, + "oninput": true, + "oninvalid": true, + "onkeydown": true, + "onkeypress": true, + "onkeyup": true, + "onlanguagechange": true, + "onload": true, + "onloadeddata": true, + "onloadedmetadata": true, + "onloadstart": true, + "onlostpointercapture": true, + "onmessage": true, + "onmessageerror": true, + "onmousedown": true, + "onmouseenter": true, + "onmouseleave": true, + "onmousemove": true, + "onmouseout": true, + "onmouseover": true, + "onmouseup": true, + "onmousewheel": true, + "onoffline": true, + "ononline": true, + "onpagehide": true, + "onpagereveal": true, + "onpageshow": true, + "onpageswap": true, + "onpaste": true, + "onpause": true, + "onplay": true, + "onplaying": true, + "onpointercancel": true, + "onpointerdown": true, + "onpointerenter": true, + "onpointerleave": true, + "onpointermove": true, + "onpointerout": true, + "onpointerover": true, + "onpointerrawupdate": true, + "onpointerup": true, + "onpopstate": true, + "onprogress": true, + "onratechange": true, + "onrejectionhandled": true, + "onreset": true, + "onresize": true, + "onscroll": true, + "onscrollend": true, + "onscrollsnapchange": true, + "onscrollsnapchanging": true, + "onsearch": true, + "onsecuritypolicyviolation": true, + "onseeked": true, + "onseeking": true, + "onselect": true, + "onselectionchange": true, + "onselectstart": true, + "onslotchange": true, + "onstalled": true, + "onstorage": true, + "onsubmit": true, + "onsuspend": true, + "ontimeupdate": true, + "ontoggle": true, + "ontransitioncancel": true, + "ontransitionend": true, + "ontransitionrun": true, + "ontransitionstart": true, + "onunhandledrejection": true, + "onunload": true, + "onvolumechange": true, + "onwaiting": true, + "onwheel": true, + "open": false, + "opener": false, + "Option": false, + "OrientationSensor": false, + "origin": false, + "originAgentCluster": false, + "OscillatorNode": false, + "OTPCredential": false, + "outerHeight": false, + "outerWidth": false, + "OverconstrainedError": false, + "PageRevealEvent": false, + "PageSwapEvent": false, + "PageTransitionEvent": false, + "pageXOffset": false, + "pageYOffset": false, + "PannerNode": false, + "parent": false, + "PasswordCredential": false, + "Path2D": false, + "PaymentAddress": false, + "PaymentManager": false, + "PaymentMethodChangeEvent": false, + "PaymentRequest": false, + "PaymentRequestUpdateEvent": false, + "PaymentResponse": false, + "performance": false, + "Performance": false, + "PerformanceElementTiming": false, + "PerformanceEntry": false, + "PerformanceEventTiming": false, + "PerformanceLongAnimationFrameTiming": false, + "PerformanceLongTaskTiming": false, + "PerformanceMark": false, + "PerformanceMeasure": false, + "PerformanceNavigation": false, + "PerformanceNavigationTiming": false, + "PerformanceObserver": false, + "PerformanceObserverEntryList": false, + "PerformancePaintTiming": false, + "PerformanceResourceTiming": false, + "PerformanceScriptTiming": false, + "PerformanceServerTiming": false, + "PerformanceTiming": false, + "PeriodicSyncManager": false, + "PeriodicWave": false, + "Permissions": false, + "PermissionStatus": false, + "PERSISTENT": false, + "personalbar": false, + "PictureInPictureEvent": false, + "PictureInPictureWindow": false, + "Plugin": false, + "PluginArray": false, + "PointerEvent": false, + "PopStateEvent": false, + "postMessage": false, + "Presentation": false, + "PresentationAvailability": false, + "PresentationConnection": false, + "PresentationConnectionAvailableEvent": false, + "PresentationConnectionCloseEvent": false, + "PresentationConnectionList": false, + "PresentationReceiver": false, + "PresentationRequest": false, + "PressureObserver": false, + "PressureRecord": false, + "print": false, + "ProcessingInstruction": false, + "Profiler": false, + "ProgressEvent": false, + "PromiseRejectionEvent": false, + "prompt": false, + "ProtectedAudience": false, + "PublicKeyCredential": false, + "PushManager": false, + "PushSubscription": false, + "PushSubscriptionOptions": false, + "queryLocalFonts": false, + "queueMicrotask": false, + "QuotaExceededError": false, + "RadioNodeList": false, + "Range": false, + "ReadableByteStreamController": false, + "ReadableStream": false, + "ReadableStreamBYOBReader": false, + "ReadableStreamBYOBRequest": false, + "ReadableStreamDefaultController": false, + "ReadableStreamDefaultReader": false, + "registerProcessor": false, + "RelativeOrientationSensor": false, + "RemotePlayback": false, + "removeEventListener": false, + "ReportBody": false, + "reportError": false, + "ReportingObserver": false, + "Request": false, + "requestAnimationFrame": false, + "requestIdleCallback": false, + "resizeBy": false, + "ResizeObserver": false, + "ResizeObserverEntry": false, + "ResizeObserverSize": false, + "resizeTo": false, + "Response": false, + "RestrictionTarget": false, + "RTCCertificate": false, + "RTCDataChannel": false, + "RTCDataChannelEvent": false, + "RTCDtlsTransport": false, + "RTCDTMFSender": false, + "RTCDTMFToneChangeEvent": false, + "RTCEncodedAudioFrame": false, + "RTCEncodedVideoFrame": false, + "RTCError": false, + "RTCErrorEvent": false, + "RTCIceCandidate": false, + "RTCIceTransport": false, + "RTCPeerConnection": false, + "RTCPeerConnectionIceErrorEvent": false, + "RTCPeerConnectionIceEvent": false, + "RTCRtpReceiver": false, + "RTCRtpScriptTransform": false, + "RTCRtpSender": false, + "RTCRtpTransceiver": false, + "RTCSctpTransport": false, + "RTCSessionDescription": false, + "RTCStatsReport": false, + "RTCTrackEvent": false, + "sampleRate": false, + "scheduler": false, + "Scheduler": false, + "Scheduling": false, + "screen": false, + "Screen": false, + "ScreenDetailed": false, + "ScreenDetails": false, + "screenLeft": false, + "ScreenOrientation": false, + "screenTop": false, + "screenX": false, + "screenY": false, + "ScriptProcessorNode": false, + "scroll": false, + "scrollbars": false, + "scrollBy": false, + "ScrollTimeline": false, + "scrollTo": false, + "scrollX": false, + "scrollY": false, + "SecurityPolicyViolationEvent": false, + "Selection": false, + "self": false, + "Sensor": false, + "SensorErrorEvent": false, + "Serial": false, + "SerialPort": false, + "ServiceWorker": false, + "ServiceWorkerContainer": false, + "ServiceWorkerRegistration": false, + "sessionStorage": false, + "setInterval": false, + "setTimeout": false, + "ShadowRoot": false, + "sharedStorage": false, + "SharedStorage": false, + "SharedStorageAppendMethod": false, + "SharedStorageClearMethod": false, + "SharedStorageDeleteMethod": false, + "SharedStorageModifierMethod": false, + "SharedStorageSetMethod": false, + "SharedStorageWorklet": false, + "SharedWorker": false, + "showDirectoryPicker": false, + "showOpenFilePicker": false, + "showSaveFilePicker": false, + "SnapEvent": false, + "SourceBuffer": false, + "SourceBufferList": false, + "SpeechGrammar": false, + "SpeechGrammarList": false, + "SpeechRecognition": false, + "SpeechRecognitionErrorEvent": false, + "SpeechRecognitionEvent": false, + "SpeechRecognitionPhrase": false, + "speechSynthesis": false, + "SpeechSynthesis": false, + "SpeechSynthesisErrorEvent": false, + "SpeechSynthesisEvent": false, + "SpeechSynthesisUtterance": false, + "SpeechSynthesisVoice": false, + "StaticRange": false, + "status": false, + "statusbar": false, + "StereoPannerNode": false, + "stop": false, + "Storage": false, + "StorageBucket": false, + "StorageBucketManager": false, + "StorageEvent": false, + "StorageManager": false, + "structuredClone": false, + "styleMedia": false, + "StylePropertyMap": false, + "StylePropertyMapReadOnly": false, + "StyleSheet": false, + "StyleSheetList": false, + "SubmitEvent": false, + "Subscriber": false, + "SubtleCrypto": false, + "Summarizer": false, + "SuppressedError": false, + "SVGAElement": false, + "SVGAngle": false, + "SVGAnimatedAngle": false, + "SVGAnimatedBoolean": false, + "SVGAnimatedEnumeration": false, + "SVGAnimatedInteger": false, + "SVGAnimatedLength": false, + "SVGAnimatedLengthList": false, + "SVGAnimatedNumber": false, + "SVGAnimatedNumberList": false, + "SVGAnimatedPreserveAspectRatio": false, + "SVGAnimatedRect": false, + "SVGAnimatedString": false, + "SVGAnimatedTransformList": false, + "SVGAnimateElement": false, + "SVGAnimateMotionElement": false, + "SVGAnimateTransformElement": false, + "SVGAnimationElement": false, + "SVGCircleElement": false, + "SVGClipPathElement": false, + "SVGComponentTransferFunctionElement": false, + "SVGDefsElement": false, + "SVGDescElement": false, + "SVGElement": false, + "SVGEllipseElement": false, + "SVGFEBlendElement": false, + "SVGFEColorMatrixElement": false, + "SVGFEComponentTransferElement": false, + "SVGFECompositeElement": false, + "SVGFEConvolveMatrixElement": false, + "SVGFEDiffuseLightingElement": false, + "SVGFEDisplacementMapElement": false, + "SVGFEDistantLightElement": false, + "SVGFEDropShadowElement": false, + "SVGFEFloodElement": false, + "SVGFEFuncAElement": false, + "SVGFEFuncBElement": false, + "SVGFEFuncGElement": false, + "SVGFEFuncRElement": false, + "SVGFEGaussianBlurElement": false, + "SVGFEImageElement": false, + "SVGFEMergeElement": false, + "SVGFEMergeNodeElement": false, + "SVGFEMorphologyElement": false, + "SVGFEOffsetElement": false, + "SVGFEPointLightElement": false, + "SVGFESpecularLightingElement": false, + "SVGFESpotLightElement": false, + "SVGFETileElement": false, + "SVGFETurbulenceElement": false, + "SVGFilterElement": false, + "SVGForeignObjectElement": false, + "SVGGElement": false, + "SVGGeometryElement": false, + "SVGGradientElement": false, + "SVGGraphicsElement": false, + "SVGImageElement": false, + "SVGLength": false, + "SVGLengthList": false, + "SVGLinearGradientElement": false, + "SVGLineElement": false, + "SVGMarkerElement": false, + "SVGMaskElement": false, + "SVGMatrix": false, + "SVGMetadataElement": false, + "SVGMPathElement": false, + "SVGNumber": false, + "SVGNumberList": false, + "SVGPathElement": false, + "SVGPatternElement": false, + "SVGPoint": false, + "SVGPointList": false, + "SVGPolygonElement": false, + "SVGPolylineElement": false, + "SVGPreserveAspectRatio": false, + "SVGRadialGradientElement": false, + "SVGRect": false, + "SVGRectElement": false, + "SVGScriptElement": false, + "SVGSetElement": false, + "SVGStopElement": false, + "SVGStringList": false, + "SVGStyleElement": false, + "SVGSVGElement": false, + "SVGSwitchElement": false, + "SVGSymbolElement": false, + "SVGTextContentElement": false, + "SVGTextElement": false, + "SVGTextPathElement": false, + "SVGTextPositioningElement": false, + "SVGTitleElement": false, + "SVGTransform": false, + "SVGTransformList": false, + "SVGTSpanElement": false, + "SVGUnitTypes": false, + "SVGUseElement": false, + "SVGViewElement": false, + "SyncManager": false, + "TaskAttributionTiming": false, + "TaskController": false, + "TaskPriorityChangeEvent": false, + "TaskSignal": false, + "TEMPORARY": false, + "Text": false, + "TextDecoder": false, + "TextDecoderStream": false, + "TextEncoder": false, + "TextEncoderStream": false, + "TextEvent": false, + "TextFormat": false, + "TextFormatUpdateEvent": false, + "TextMetrics": false, + "TextTrack": false, + "TextTrackCue": false, + "TextTrackCueList": false, + "TextTrackList": false, + "TextUpdateEvent": false, + "TimeEvent": false, + "TimeRanges": false, + "ToggleEvent": false, + "toolbar": false, + "top": false, + "Touch": false, + "TouchEvent": false, + "TouchList": false, + "TrackEvent": false, + "TransformStream": false, + "TransformStreamDefaultController": false, + "TransitionEvent": false, + "Translator": false, + "TreeWalker": false, + "TrustedHTML": false, + "TrustedScript": false, + "TrustedScriptURL": false, + "TrustedTypePolicy": false, + "TrustedTypePolicyFactory": false, + "trustedTypes": false, + "UIEvent": false, + "URL": false, + "URLPattern": false, + "URLSearchParams": false, + "USB": false, + "USBAlternateInterface": false, + "USBConfiguration": false, + "USBConnectionEvent": false, + "USBDevice": false, + "USBEndpoint": false, + "USBInterface": false, + "USBInTransferResult": false, + "USBIsochronousInTransferPacket": false, + "USBIsochronousInTransferResult": false, + "USBIsochronousOutTransferPacket": false, + "USBIsochronousOutTransferResult": false, + "USBOutTransferResult": false, + "UserActivation": false, + "ValidityState": false, + "VideoColorSpace": false, + "VideoDecoder": false, + "VideoEncoder": false, + "VideoFrame": false, + "VideoPlaybackQuality": false, + "viewport": false, + "Viewport": false, + "ViewTimeline": false, + "ViewTransition": false, + "ViewTransitionTypeSet": false, + "VirtualKeyboard": false, + "VirtualKeyboardGeometryChangeEvent": false, + "VisibilityStateEntry": false, + "visualViewport": false, + "VisualViewport": false, + "VTTCue": false, + "VTTRegion": false, + "WakeLock": false, + "WakeLockSentinel": false, + "WaveShaperNode": false, + "WebAssembly": false, + "WebGL2RenderingContext": false, + "WebGLActiveInfo": false, + "WebGLBuffer": false, + "WebGLContextEvent": false, + "WebGLFramebuffer": false, + "WebGLObject": false, + "WebGLProgram": false, + "WebGLQuery": false, + "WebGLRenderbuffer": false, + "WebGLRenderingContext": false, + "WebGLSampler": false, + "WebGLShader": false, + "WebGLShaderPrecisionFormat": false, + "WebGLSync": false, + "WebGLTexture": false, + "WebGLTransformFeedback": false, + "WebGLUniformLocation": false, + "WebGLVertexArrayObject": false, + "WebSocket": false, + "WebSocketError": false, + "WebSocketStream": false, + "WebTransport": false, + "WebTransportBidirectionalStream": false, + "WebTransportDatagramDuplexStream": false, + "WebTransportError": false, + "WebTransportReceiveStream": false, + "WebTransportSendStream": false, + "WGSLLanguageFeatures": false, + "WheelEvent": false, + "when": false, + "window": false, + "Window": false, + "WindowControlsOverlay": false, + "WindowControlsOverlayGeometryChangeEvent": false, + "Worker": false, + "Worklet": false, + "WorkletGlobalScope": false, + "WritableStream": false, + "WritableStreamDefaultController": false, + "WritableStreamDefaultWriter": false, + "XMLDocument": false, + "XMLHttpRequest": false, + "XMLHttpRequestEventTarget": false, + "XMLHttpRequestUpload": false, + "XMLSerializer": false, + "XPathEvaluator": false, + "XPathExpression": false, + "XPathResult": false, + "XRAnchor": false, + "XRAnchorSet": false, + "XRBoundedReferenceSpace": false, + "XRCamera": false, + "XRCPUDepthInformation": false, + "XRDepthInformation": false, + "XRDOMOverlayState": false, + "XRFrame": false, + "XRHand": false, + "XRHitTestResult": false, + "XRHitTestSource": false, + "XRInputSource": false, + "XRInputSourceArray": false, + "XRInputSourceEvent": false, + "XRInputSourcesChangeEvent": false, + "XRJointPose": false, + "XRJointSpace": false, + "XRLayer": false, + "XRLightEstimate": false, + "XRLightProbe": false, + "XRPose": false, + "XRRay": false, + "XRReferenceSpace": false, + "XRReferenceSpaceEvent": false, + "XRRenderState": false, + "XRRigidTransform": false, + "XRSession": false, + "XRSessionEvent": false, + "XRSpace": false, + "XRSystem": false, + "XRTransientInputHitTestResult": false, + "XRTransientInputHitTestSource": false, + "XRView": false, + "XRViewerPose": false, + "XRViewport": false, + "XRWebGLBinding": false, + "XRWebGLDepthInformation": false, + "XRWebGLLayer": false, + "XSLTProcessor": false, + "execScript": false + } + }, + "errors": [ + { + "messageId": "impliedEval", + "line": 1 + }, + { + "messageId": "execScript", + "line": 3 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 2 errors but had 0: [] + +0 !== 2 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-implied-eval > invalid + +```js +window.setTimeout('foo' + (function() { + setTimeout(helper); + window.execScript('str'); + return 'bar'; +})()) +``` + +```json +{ + "languageOptions": { + "globals": { + "AbortController": false, + "AbortSignal": false, + "AbsoluteOrientationSensor": false, + "AbstractRange": false, + "Accelerometer": false, + "addEventListener": false, + "ai": false, + "AI": false, + "AICreateMonitor": false, + "AITextSession": false, + "alert": false, + "AnalyserNode": false, + "Animation": false, + "AnimationEffect": false, + "AnimationEvent": false, + "AnimationPlaybackEvent": false, + "AnimationTimeline": false, + "AsyncDisposableStack": false, + "atob": false, + "Attr": false, + "Audio": false, + "AudioBuffer": false, + "AudioBufferSourceNode": false, + "AudioContext": false, + "AudioData": false, + "AudioDecoder": false, + "AudioDestinationNode": false, + "AudioEncoder": false, + "AudioListener": false, + "AudioNode": false, + "AudioParam": false, + "AudioParamMap": false, + "AudioProcessingEvent": false, + "AudioScheduledSourceNode": false, + "AudioSinkInfo": false, + "AudioWorklet": false, + "AudioWorkletGlobalScope": false, + "AudioWorkletNode": false, + "AudioWorkletProcessor": false, + "AuthenticatorAssertionResponse": false, + "AuthenticatorAttestationResponse": false, + "AuthenticatorResponse": false, + "BackgroundFetchManager": false, + "BackgroundFetchRecord": false, + "BackgroundFetchRegistration": false, + "BarcodeDetector": false, + "BarProp": false, + "BaseAudioContext": false, + "BatteryManager": false, + "BeforeUnloadEvent": false, + "BiquadFilterNode": false, + "Blob": false, + "BlobEvent": false, + "Bluetooth": false, + "BluetoothCharacteristicProperties": false, + "BluetoothDevice": false, + "BluetoothRemoteGATTCharacteristic": false, + "BluetoothRemoteGATTDescriptor": false, + "BluetoothRemoteGATTServer": false, + "BluetoothRemoteGATTService": false, + "BluetoothUUID": false, + "blur": false, + "BroadcastChannel": false, + "BrowserCaptureMediaStreamTrack": false, + "btoa": false, + "ByteLengthQueuingStrategy": false, + "Cache": false, + "caches": false, + "CacheStorage": false, + "cancelAnimationFrame": false, + "cancelIdleCallback": false, + "CanvasCaptureMediaStream": false, + "CanvasCaptureMediaStreamTrack": false, + "CanvasGradient": false, + "CanvasPattern": false, + "CanvasRenderingContext2D": false, + "CaptureController": false, + "CaretPosition": false, + "CDATASection": false, + "ChannelMergerNode": false, + "ChannelSplitterNode": false, + "ChapterInformation": false, + "CharacterBoundsUpdateEvent": false, + "CharacterData": false, + "clearInterval": false, + "clearTimeout": false, + "clientInformation": false, + "Clipboard": false, + "ClipboardChangeEvent": false, + "ClipboardEvent": false, + "ClipboardItem": false, + "close": false, + "closed": false, + "CloseEvent": false, + "CloseWatcher": false, + "CommandEvent": false, + "Comment": false, + "CompositionEvent": false, + "CompressionStream": false, + "confirm": false, + "console": false, + "ConstantSourceNode": false, + "ContentVisibilityAutoStateChangeEvent": false, + "ConvolverNode": false, + "CookieChangeEvent": false, + "CookieDeprecationLabel": false, + "cookieStore": false, + "CookieStore": false, + "CookieStoreManager": false, + "CountQueuingStrategy": false, + "createImageBitmap": false, + "CreateMonitor": false, + "Credential": false, + "credentialless": false, + "CredentialsContainer": false, + "CropTarget": false, + "crossOriginIsolated": false, + "crypto": false, + "Crypto": false, + "CryptoKey": false, + "CSPViolationReportBody": false, + "CSS": false, + "CSSAnimation": false, + "CSSConditionRule": false, + "CSSContainerRule": false, + "CSSCounterStyleRule": false, + "CSSFontFaceRule": false, + "CSSFontFeatureValuesRule": false, + "CSSFontPaletteValuesRule": false, + "CSSFunctionDeclarations": false, + "CSSFunctionDescriptors": false, + "CSSFunctionRule": false, + "CSSGroupingRule": false, + "CSSImageValue": false, + "CSSImportRule": false, + "CSSKeyframeRule": false, + "CSSKeyframesRule": false, + "CSSKeywordValue": false, + "CSSLayerBlockRule": false, + "CSSLayerStatementRule": false, + "CSSMarginRule": false, + "CSSMathClamp": false, + "CSSMathInvert": false, + "CSSMathMax": false, + "CSSMathMin": false, + "CSSMathNegate": false, + "CSSMathProduct": false, + "CSSMathSum": false, + "CSSMathValue": false, + "CSSMatrixComponent": false, + "CSSMediaRule": false, + "CSSNamespaceRule": false, + "CSSNestedDeclarations": false, + "CSSNumericArray": false, + "CSSNumericValue": false, + "CSSPageDescriptors": false, + "CSSPageRule": false, + "CSSPerspective": false, + "CSSPositionTryDescriptors": false, + "CSSPositionTryRule": false, + "CSSPositionValue": false, + "CSSPropertyRule": false, + "CSSRotate": false, + "CSSRule": false, + "CSSRuleList": false, + "CSSScale": false, + "CSSScopeRule": false, + "CSSSkew": false, + "CSSSkewX": false, + "CSSSkewY": false, + "CSSStartingStyleRule": false, + "CSSStyleDeclaration": false, + "CSSStyleRule": false, + "CSSStyleSheet": false, + "CSSStyleValue": false, + "CSSSupportsRule": false, + "CSSTransformComponent": false, + "CSSTransformValue": false, + "CSSTransition": false, + "CSSTranslate": false, + "CSSUnitValue": false, + "CSSUnparsedValue": false, + "CSSVariableReferenceValue": false, + "CSSViewTransitionRule": false, + "currentFrame": false, + "currentTime": false, + "CustomElementRegistry": false, + "customElements": false, + "CustomEvent": false, + "CustomStateSet": false, + "DataTransfer": false, + "DataTransferItem": false, + "DataTransferItemList": false, + "DecompressionStream": false, + "DelayNode": false, + "DelegatedInkTrailPresenter": false, + "DeviceMotionEvent": false, + "DeviceMotionEventAcceleration": false, + "DeviceMotionEventRotationRate": false, + "DeviceOrientationEvent": false, + "devicePixelRatio": false, + "DevicePosture": false, + "DigitalCredential": false, + "dispatchEvent": false, + "DisposableStack": false, + "document": false, + "Document": false, + "DocumentFragment": false, + "documentPictureInPicture": false, + "DocumentPictureInPicture": false, + "DocumentPictureInPictureEvent": false, + "DocumentTimeline": false, + "DocumentType": false, + "DOMError": false, + "DOMException": false, + "DOMImplementation": false, + "DOMMatrix": false, + "DOMMatrixReadOnly": false, + "DOMParser": false, + "DOMPoint": false, + "DOMPointReadOnly": false, + "DOMQuad": false, + "DOMRect": false, + "DOMRectList": false, + "DOMRectReadOnly": false, + "DOMStringList": false, + "DOMStringMap": false, + "DOMTokenList": false, + "DragEvent": false, + "DynamicsCompressorNode": false, + "EditContext": false, + "Element": false, + "ElementInternals": false, + "EncodedAudioChunk": false, + "EncodedVideoChunk": false, + "ErrorEvent": false, + "event": false, + "Event": false, + "EventCounts": false, + "EventSource": false, + "EventTarget": false, + "external": false, + "External": false, + "EyeDropper": false, + "FeaturePolicy": false, + "FederatedCredential": false, + "fence": false, + "Fence": false, + "FencedFrameConfig": false, + "fetch": false, + "fetchLater": false, + "FetchLaterResult": false, + "File": false, + "FileList": false, + "FileReader": false, + "FileSystem": false, + "FileSystemDirectoryEntry": false, + "FileSystemDirectoryHandle": false, + "FileSystemDirectoryReader": false, + "FileSystemEntry": false, + "FileSystemFileEntry": false, + "FileSystemFileHandle": false, + "FileSystemHandle": false, + "FileSystemObserver": false, + "FileSystemWritableFileStream": false, + "find": false, + "focus": false, + "FocusEvent": false, + "FontData": false, + "FontFace": false, + "FontFaceSet": false, + "FontFaceSetLoadEvent": false, + "FormData": false, + "FormDataEvent": false, + "FragmentDirective": false, + "frameElement": false, + "frames": false, + "GainNode": false, + "Gamepad": false, + "GamepadAxisMoveEvent": false, + "GamepadButton": false, + "GamepadButtonEvent": false, + "GamepadEvent": false, + "GamepadHapticActuator": false, + "GamepadPose": false, + "Geolocation": false, + "GeolocationCoordinates": false, + "GeolocationPosition": false, + "GeolocationPositionError": false, + "getComputedStyle": false, + "getScreenDetails": false, + "getSelection": false, + "GPU": false, + "GPUAdapter": false, + "GPUAdapterInfo": false, + "GPUBindGroup": false, + "GPUBindGroupLayout": false, + "GPUBuffer": false, + "GPUBufferUsage": false, + "GPUCanvasContext": false, + "GPUColorWrite": false, + "GPUCommandBuffer": false, + "GPUCommandEncoder": false, + "GPUCompilationInfo": false, + "GPUCompilationMessage": false, + "GPUComputePassEncoder": false, + "GPUComputePipeline": false, + "GPUDevice": false, + "GPUDeviceLostInfo": false, + "GPUError": false, + "GPUExternalTexture": false, + "GPUInternalError": false, + "GPUMapMode": false, + "GPUOutOfMemoryError": false, + "GPUPipelineError": false, + "GPUPipelineLayout": false, + "GPUQuerySet": false, + "GPUQueue": false, + "GPURenderBundle": false, + "GPURenderBundleEncoder": false, + "GPURenderPassEncoder": false, + "GPURenderPipeline": false, + "GPUSampler": false, + "GPUShaderModule": false, + "GPUShaderStage": false, + "GPUSupportedFeatures": false, + "GPUSupportedLimits": false, + "GPUTexture": false, + "GPUTextureUsage": false, + "GPUTextureView": false, + "GPUUncapturedErrorEvent": false, + "GPUValidationError": false, + "GravitySensor": false, + "Gyroscope": false, + "HashChangeEvent": false, + "Headers": false, + "HID": false, + "HIDConnectionEvent": false, + "HIDDevice": false, + "HIDInputReportEvent": false, + "Highlight": false, + "HighlightRegistry": false, + "history": false, + "History": false, + "HTMLAllCollection": false, + "HTMLAnchorElement": false, + "HTMLAreaElement": false, + "HTMLAudioElement": false, + "HTMLBaseElement": false, + "HTMLBodyElement": false, + "HTMLBRElement": false, + "HTMLButtonElement": false, + "HTMLCanvasElement": false, + "HTMLCollection": false, + "HTMLDataElement": false, + "HTMLDataListElement": false, + "HTMLDetailsElement": false, + "HTMLDialogElement": false, + "HTMLDirectoryElement": false, + "HTMLDivElement": false, + "HTMLDListElement": false, + "HTMLDocument": false, + "HTMLElement": false, + "HTMLEmbedElement": false, + "HTMLFencedFrameElement": false, + "HTMLFieldSetElement": false, + "HTMLFontElement": false, + "HTMLFormControlsCollection": false, + "HTMLFormElement": false, + "HTMLFrameElement": false, + "HTMLFrameSetElement": false, + "HTMLHeadElement": false, + "HTMLHeadingElement": false, + "HTMLHRElement": false, + "HTMLHtmlElement": false, + "HTMLIFrameElement": false, + "HTMLImageElement": false, + "HTMLInputElement": false, + "HTMLLabelElement": false, + "HTMLLegendElement": false, + "HTMLLIElement": false, + "HTMLLinkElement": false, + "HTMLMapElement": false, + "HTMLMarqueeElement": false, + "HTMLMediaElement": false, + "HTMLMenuElement": false, + "HTMLMetaElement": false, + "HTMLMeterElement": false, + "HTMLModElement": false, + "HTMLObjectElement": false, + "HTMLOListElement": false, + "HTMLOptGroupElement": false, + "HTMLOptionElement": false, + "HTMLOptionsCollection": false, + "HTMLOutputElement": false, + "HTMLParagraphElement": false, + "HTMLParamElement": false, + "HTMLPictureElement": false, + "HTMLPreElement": false, + "HTMLProgressElement": false, + "HTMLQuoteElement": false, + "HTMLScriptElement": false, + "HTMLSelectedContentElement": false, + "HTMLSelectElement": false, + "HTMLSlotElement": false, + "HTMLSourceElement": false, + "HTMLSpanElement": false, + "HTMLStyleElement": false, + "HTMLTableCaptionElement": false, + "HTMLTableCellElement": false, + "HTMLTableColElement": false, + "HTMLTableElement": false, + "HTMLTableRowElement": false, + "HTMLTableSectionElement": false, + "HTMLTemplateElement": false, + "HTMLTextAreaElement": false, + "HTMLTimeElement": false, + "HTMLTitleElement": false, + "HTMLTrackElement": false, + "HTMLUListElement": false, + "HTMLUnknownElement": false, + "HTMLVideoElement": false, + "IDBCursor": false, + "IDBCursorWithValue": false, + "IDBDatabase": false, + "IDBFactory": false, + "IDBIndex": false, + "IDBKeyRange": false, + "IDBObjectStore": false, + "IDBOpenDBRequest": false, + "IDBRecord": false, + "IDBRequest": false, + "IDBTransaction": false, + "IDBVersionChangeEvent": false, + "IdentityCredential": false, + "IdentityCredentialError": false, + "IdentityProvider": false, + "IdleDeadline": false, + "IdleDetector": false, + "IIRFilterNode": false, + "Image": false, + "ImageBitmap": false, + "ImageBitmapRenderingContext": false, + "ImageCapture": false, + "ImageData": false, + "ImageDecoder": false, + "ImageTrack": false, + "ImageTrackList": false, + "indexedDB": false, + "Ink": false, + "innerHeight": false, + "innerWidth": false, + "InputDeviceCapabilities": false, + "InputDeviceInfo": false, + "InputEvent": false, + "IntegrityViolationReportBody": false, + "InterestEvent": false, + "IntersectionObserver": false, + "IntersectionObserverEntry": false, + "isSecureContext": false, + "Keyboard": false, + "KeyboardEvent": false, + "KeyboardLayoutMap": false, + "KeyframeEffect": false, + "LanguageDetector": false, + "LargestContentfulPaint": false, + "LaunchParams": false, + "launchQueue": false, + "LaunchQueue": false, + "LayoutShift": false, + "LayoutShiftAttribution": false, + "length": false, + "LinearAccelerationSensor": false, + "localStorage": false, + "location": true, + "Location": false, + "locationbar": false, + "Lock": false, + "LockManager": false, + "matchMedia": false, + "MathMLElement": false, + "MediaCapabilities": false, + "MediaCapabilitiesInfo": false, + "MediaDeviceInfo": false, + "MediaDevices": false, + "MediaElementAudioSourceNode": false, + "MediaEncryptedEvent": false, + "MediaError": false, + "MediaKeyError": false, + "MediaKeyMessageEvent": false, + "MediaKeys": false, + "MediaKeySession": false, + "MediaKeyStatusMap": false, + "MediaKeySystemAccess": false, + "MediaList": false, + "MediaMetadata": false, + "MediaQueryList": false, + "MediaQueryListEvent": false, + "MediaRecorder": false, + "MediaRecorderErrorEvent": false, + "MediaSession": false, + "MediaSource": false, + "MediaSourceHandle": false, + "MediaStream": false, + "MediaStreamAudioDestinationNode": false, + "MediaStreamAudioSourceNode": false, + "MediaStreamEvent": false, + "MediaStreamTrack": false, + "MediaStreamTrackAudioSourceNode": false, + "MediaStreamTrackAudioStats": false, + "MediaStreamTrackEvent": false, + "MediaStreamTrackGenerator": false, + "MediaStreamTrackProcessor": false, + "MediaStreamTrackVideoStats": false, + "menubar": false, + "MessageChannel": false, + "MessageEvent": false, + "MessagePort": false, + "MIDIAccess": false, + "MIDIConnectionEvent": false, + "MIDIInput": false, + "MIDIInputMap": false, + "MIDIMessageEvent": false, + "MIDIOutput": false, + "MIDIOutputMap": false, + "MIDIPort": false, + "MimeType": false, + "MimeTypeArray": false, + "model": false, + "ModelGenericSession": false, + "ModelManager": false, + "MouseEvent": false, + "moveBy": false, + "moveTo": false, + "MutationEvent": false, + "MutationObserver": false, + "MutationRecord": false, + "name": false, + "NamedNodeMap": false, + "NavigateEvent": false, + "navigation": false, + "Navigation": false, + "NavigationActivation": false, + "NavigationCurrentEntryChangeEvent": false, + "NavigationDestination": false, + "NavigationHistoryEntry": false, + "NavigationPrecommitController": false, + "NavigationPreloadManager": false, + "NavigationTransition": false, + "navigator": false, + "Navigator": false, + "NavigatorLogin": false, + "NavigatorManagedData": false, + "NavigatorUAData": false, + "NetworkInformation": false, + "Node": false, + "NodeFilter": false, + "NodeIterator": false, + "NodeList": false, + "Notification": false, + "NotifyPaintEvent": false, + "NotRestoredReasonDetails": false, + "NotRestoredReasons": false, + "Observable": false, + "OfflineAudioCompletionEvent": false, + "OfflineAudioContext": false, + "offscreenBuffering": false, + "OffscreenCanvas": false, + "OffscreenCanvasRenderingContext2D": false, + "onabort": true, + "onafterprint": true, + "onanimationcancel": true, + "onanimationend": true, + "onanimationiteration": true, + "onanimationstart": true, + "onappinstalled": true, + "onauxclick": true, + "onbeforeinput": true, + "onbeforeinstallprompt": true, + "onbeforematch": true, + "onbeforeprint": true, + "onbeforetoggle": true, + "onbeforeunload": true, + "onbeforexrselect": true, + "onblur": true, + "oncancel": true, + "oncanplay": true, + "oncanplaythrough": true, + "onchange": true, + "onclick": true, + "onclose": true, + "oncommand": true, + "oncontentvisibilityautostatechange": true, + "oncontextlost": true, + "oncontextmenu": true, + "oncontextrestored": true, + "oncopy": true, + "oncuechange": true, + "oncut": true, + "ondblclick": true, + "ondevicemotion": true, + "ondeviceorientation": true, + "ondeviceorientationabsolute": true, + "ondrag": true, + "ondragend": true, + "ondragenter": true, + "ondragleave": true, + "ondragover": true, + "ondragstart": true, + "ondrop": true, + "ondurationchange": true, + "onemptied": true, + "onended": true, + "onerror": true, + "onfocus": true, + "onformdata": true, + "ongamepadconnected": true, + "ongamepaddisconnected": true, + "ongotpointercapture": true, + "onhashchange": true, + "oninput": true, + "oninvalid": true, + "onkeydown": true, + "onkeypress": true, + "onkeyup": true, + "onlanguagechange": true, + "onload": true, + "onloadeddata": true, + "onloadedmetadata": true, + "onloadstart": true, + "onlostpointercapture": true, + "onmessage": true, + "onmessageerror": true, + "onmousedown": true, + "onmouseenter": true, + "onmouseleave": true, + "onmousemove": true, + "onmouseout": true, + "onmouseover": true, + "onmouseup": true, + "onmousewheel": true, + "onoffline": true, + "ononline": true, + "onpagehide": true, + "onpagereveal": true, + "onpageshow": true, + "onpageswap": true, + "onpaste": true, + "onpause": true, + "onplay": true, + "onplaying": true, + "onpointercancel": true, + "onpointerdown": true, + "onpointerenter": true, + "onpointerleave": true, + "onpointermove": true, + "onpointerout": true, + "onpointerover": true, + "onpointerrawupdate": true, + "onpointerup": true, + "onpopstate": true, + "onprogress": true, + "onratechange": true, + "onrejectionhandled": true, + "onreset": true, + "onresize": true, + "onscroll": true, + "onscrollend": true, + "onscrollsnapchange": true, + "onscrollsnapchanging": true, + "onsearch": true, + "onsecuritypolicyviolation": true, + "onseeked": true, + "onseeking": true, + "onselect": true, + "onselectionchange": true, + "onselectstart": true, + "onslotchange": true, + "onstalled": true, + "onstorage": true, + "onsubmit": true, + "onsuspend": true, + "ontimeupdate": true, + "ontoggle": true, + "ontransitioncancel": true, + "ontransitionend": true, + "ontransitionrun": true, + "ontransitionstart": true, + "onunhandledrejection": true, + "onunload": true, + "onvolumechange": true, + "onwaiting": true, + "onwheel": true, + "open": false, + "opener": false, + "Option": false, + "OrientationSensor": false, + "origin": false, + "originAgentCluster": false, + "OscillatorNode": false, + "OTPCredential": false, + "outerHeight": false, + "outerWidth": false, + "OverconstrainedError": false, + "PageRevealEvent": false, + "PageSwapEvent": false, + "PageTransitionEvent": false, + "pageXOffset": false, + "pageYOffset": false, + "PannerNode": false, + "parent": false, + "PasswordCredential": false, + "Path2D": false, + "PaymentAddress": false, + "PaymentManager": false, + "PaymentMethodChangeEvent": false, + "PaymentRequest": false, + "PaymentRequestUpdateEvent": false, + "PaymentResponse": false, + "performance": false, + "Performance": false, + "PerformanceElementTiming": false, + "PerformanceEntry": false, + "PerformanceEventTiming": false, + "PerformanceLongAnimationFrameTiming": false, + "PerformanceLongTaskTiming": false, + "PerformanceMark": false, + "PerformanceMeasure": false, + "PerformanceNavigation": false, + "PerformanceNavigationTiming": false, + "PerformanceObserver": false, + "PerformanceObserverEntryList": false, + "PerformancePaintTiming": false, + "PerformanceResourceTiming": false, + "PerformanceScriptTiming": false, + "PerformanceServerTiming": false, + "PerformanceTiming": false, + "PeriodicSyncManager": false, + "PeriodicWave": false, + "Permissions": false, + "PermissionStatus": false, + "PERSISTENT": false, + "personalbar": false, + "PictureInPictureEvent": false, + "PictureInPictureWindow": false, + "Plugin": false, + "PluginArray": false, + "PointerEvent": false, + "PopStateEvent": false, + "postMessage": false, + "Presentation": false, + "PresentationAvailability": false, + "PresentationConnection": false, + "PresentationConnectionAvailableEvent": false, + "PresentationConnectionCloseEvent": false, + "PresentationConnectionList": false, + "PresentationReceiver": false, + "PresentationRequest": false, + "PressureObserver": false, + "PressureRecord": false, + "print": false, + "ProcessingInstruction": false, + "Profiler": false, + "ProgressEvent": false, + "PromiseRejectionEvent": false, + "prompt": false, + "ProtectedAudience": false, + "PublicKeyCredential": false, + "PushManager": false, + "PushSubscription": false, + "PushSubscriptionOptions": false, + "queryLocalFonts": false, + "queueMicrotask": false, + "QuotaExceededError": false, + "RadioNodeList": false, + "Range": false, + "ReadableByteStreamController": false, + "ReadableStream": false, + "ReadableStreamBYOBReader": false, + "ReadableStreamBYOBRequest": false, + "ReadableStreamDefaultController": false, + "ReadableStreamDefaultReader": false, + "registerProcessor": false, + "RelativeOrientationSensor": false, + "RemotePlayback": false, + "removeEventListener": false, + "ReportBody": false, + "reportError": false, + "ReportingObserver": false, + "Request": false, + "requestAnimationFrame": false, + "requestIdleCallback": false, + "resizeBy": false, + "ResizeObserver": false, + "ResizeObserverEntry": false, + "ResizeObserverSize": false, + "resizeTo": false, + "Response": false, + "RestrictionTarget": false, + "RTCCertificate": false, + "RTCDataChannel": false, + "RTCDataChannelEvent": false, + "RTCDtlsTransport": false, + "RTCDTMFSender": false, + "RTCDTMFToneChangeEvent": false, + "RTCEncodedAudioFrame": false, + "RTCEncodedVideoFrame": false, + "RTCError": false, + "RTCErrorEvent": false, + "RTCIceCandidate": false, + "RTCIceTransport": false, + "RTCPeerConnection": false, + "RTCPeerConnectionIceErrorEvent": false, + "RTCPeerConnectionIceEvent": false, + "RTCRtpReceiver": false, + "RTCRtpScriptTransform": false, + "RTCRtpSender": false, + "RTCRtpTransceiver": false, + "RTCSctpTransport": false, + "RTCSessionDescription": false, + "RTCStatsReport": false, + "RTCTrackEvent": false, + "sampleRate": false, + "scheduler": false, + "Scheduler": false, + "Scheduling": false, + "screen": false, + "Screen": false, + "ScreenDetailed": false, + "ScreenDetails": false, + "screenLeft": false, + "ScreenOrientation": false, + "screenTop": false, + "screenX": false, + "screenY": false, + "ScriptProcessorNode": false, + "scroll": false, + "scrollbars": false, + "scrollBy": false, + "ScrollTimeline": false, + "scrollTo": false, + "scrollX": false, + "scrollY": false, + "SecurityPolicyViolationEvent": false, + "Selection": false, + "self": false, + "Sensor": false, + "SensorErrorEvent": false, + "Serial": false, + "SerialPort": false, + "ServiceWorker": false, + "ServiceWorkerContainer": false, + "ServiceWorkerRegistration": false, + "sessionStorage": false, + "setInterval": false, + "setTimeout": false, + "ShadowRoot": false, + "sharedStorage": false, + "SharedStorage": false, + "SharedStorageAppendMethod": false, + "SharedStorageClearMethod": false, + "SharedStorageDeleteMethod": false, + "SharedStorageModifierMethod": false, + "SharedStorageSetMethod": false, + "SharedStorageWorklet": false, + "SharedWorker": false, + "showDirectoryPicker": false, + "showOpenFilePicker": false, + "showSaveFilePicker": false, + "SnapEvent": false, + "SourceBuffer": false, + "SourceBufferList": false, + "SpeechGrammar": false, + "SpeechGrammarList": false, + "SpeechRecognition": false, + "SpeechRecognitionErrorEvent": false, + "SpeechRecognitionEvent": false, + "SpeechRecognitionPhrase": false, + "speechSynthesis": false, + "SpeechSynthesis": false, + "SpeechSynthesisErrorEvent": false, + "SpeechSynthesisEvent": false, + "SpeechSynthesisUtterance": false, + "SpeechSynthesisVoice": false, + "StaticRange": false, + "status": false, + "statusbar": false, + "StereoPannerNode": false, + "stop": false, + "Storage": false, + "StorageBucket": false, + "StorageBucketManager": false, + "StorageEvent": false, + "StorageManager": false, + "structuredClone": false, + "styleMedia": false, + "StylePropertyMap": false, + "StylePropertyMapReadOnly": false, + "StyleSheet": false, + "StyleSheetList": false, + "SubmitEvent": false, + "Subscriber": false, + "SubtleCrypto": false, + "Summarizer": false, + "SuppressedError": false, + "SVGAElement": false, + "SVGAngle": false, + "SVGAnimatedAngle": false, + "SVGAnimatedBoolean": false, + "SVGAnimatedEnumeration": false, + "SVGAnimatedInteger": false, + "SVGAnimatedLength": false, + "SVGAnimatedLengthList": false, + "SVGAnimatedNumber": false, + "SVGAnimatedNumberList": false, + "SVGAnimatedPreserveAspectRatio": false, + "SVGAnimatedRect": false, + "SVGAnimatedString": false, + "SVGAnimatedTransformList": false, + "SVGAnimateElement": false, + "SVGAnimateMotionElement": false, + "SVGAnimateTransformElement": false, + "SVGAnimationElement": false, + "SVGCircleElement": false, + "SVGClipPathElement": false, + "SVGComponentTransferFunctionElement": false, + "SVGDefsElement": false, + "SVGDescElement": false, + "SVGElement": false, + "SVGEllipseElement": false, + "SVGFEBlendElement": false, + "SVGFEColorMatrixElement": false, + "SVGFEComponentTransferElement": false, + "SVGFECompositeElement": false, + "SVGFEConvolveMatrixElement": false, + "SVGFEDiffuseLightingElement": false, + "SVGFEDisplacementMapElement": false, + "SVGFEDistantLightElement": false, + "SVGFEDropShadowElement": false, + "SVGFEFloodElement": false, + "SVGFEFuncAElement": false, + "SVGFEFuncBElement": false, + "SVGFEFuncGElement": false, + "SVGFEFuncRElement": false, + "SVGFEGaussianBlurElement": false, + "SVGFEImageElement": false, + "SVGFEMergeElement": false, + "SVGFEMergeNodeElement": false, + "SVGFEMorphologyElement": false, + "SVGFEOffsetElement": false, + "SVGFEPointLightElement": false, + "SVGFESpecularLightingElement": false, + "SVGFESpotLightElement": false, + "SVGFETileElement": false, + "SVGFETurbulenceElement": false, + "SVGFilterElement": false, + "SVGForeignObjectElement": false, + "SVGGElement": false, + "SVGGeometryElement": false, + "SVGGradientElement": false, + "SVGGraphicsElement": false, + "SVGImageElement": false, + "SVGLength": false, + "SVGLengthList": false, + "SVGLinearGradientElement": false, + "SVGLineElement": false, + "SVGMarkerElement": false, + "SVGMaskElement": false, + "SVGMatrix": false, + "SVGMetadataElement": false, + "SVGMPathElement": false, + "SVGNumber": false, + "SVGNumberList": false, + "SVGPathElement": false, + "SVGPatternElement": false, + "SVGPoint": false, + "SVGPointList": false, + "SVGPolygonElement": false, + "SVGPolylineElement": false, + "SVGPreserveAspectRatio": false, + "SVGRadialGradientElement": false, + "SVGRect": false, + "SVGRectElement": false, + "SVGScriptElement": false, + "SVGSetElement": false, + "SVGStopElement": false, + "SVGStringList": false, + "SVGStyleElement": false, + "SVGSVGElement": false, + "SVGSwitchElement": false, + "SVGSymbolElement": false, + "SVGTextContentElement": false, + "SVGTextElement": false, + "SVGTextPathElement": false, + "SVGTextPositioningElement": false, + "SVGTitleElement": false, + "SVGTransform": false, + "SVGTransformList": false, + "SVGTSpanElement": false, + "SVGUnitTypes": false, + "SVGUseElement": false, + "SVGViewElement": false, + "SyncManager": false, + "TaskAttributionTiming": false, + "TaskController": false, + "TaskPriorityChangeEvent": false, + "TaskSignal": false, + "TEMPORARY": false, + "Text": false, + "TextDecoder": false, + "TextDecoderStream": false, + "TextEncoder": false, + "TextEncoderStream": false, + "TextEvent": false, + "TextFormat": false, + "TextFormatUpdateEvent": false, + "TextMetrics": false, + "TextTrack": false, + "TextTrackCue": false, + "TextTrackCueList": false, + "TextTrackList": false, + "TextUpdateEvent": false, + "TimeEvent": false, + "TimeRanges": false, + "ToggleEvent": false, + "toolbar": false, + "top": false, + "Touch": false, + "TouchEvent": false, + "TouchList": false, + "TrackEvent": false, + "TransformStream": false, + "TransformStreamDefaultController": false, + "TransitionEvent": false, + "Translator": false, + "TreeWalker": false, + "TrustedHTML": false, + "TrustedScript": false, + "TrustedScriptURL": false, + "TrustedTypePolicy": false, + "TrustedTypePolicyFactory": false, + "trustedTypes": false, + "UIEvent": false, + "URL": false, + "URLPattern": false, + "URLSearchParams": false, + "USB": false, + "USBAlternateInterface": false, + "USBConfiguration": false, + "USBConnectionEvent": false, + "USBDevice": false, + "USBEndpoint": false, + "USBInterface": false, + "USBInTransferResult": false, + "USBIsochronousInTransferPacket": false, + "USBIsochronousInTransferResult": false, + "USBIsochronousOutTransferPacket": false, + "USBIsochronousOutTransferResult": false, + "USBOutTransferResult": false, + "UserActivation": false, + "ValidityState": false, + "VideoColorSpace": false, + "VideoDecoder": false, + "VideoEncoder": false, + "VideoFrame": false, + "VideoPlaybackQuality": false, + "viewport": false, + "Viewport": false, + "ViewTimeline": false, + "ViewTransition": false, + "ViewTransitionTypeSet": false, + "VirtualKeyboard": false, + "VirtualKeyboardGeometryChangeEvent": false, + "VisibilityStateEntry": false, + "visualViewport": false, + "VisualViewport": false, + "VTTCue": false, + "VTTRegion": false, + "WakeLock": false, + "WakeLockSentinel": false, + "WaveShaperNode": false, + "WebAssembly": false, + "WebGL2RenderingContext": false, + "WebGLActiveInfo": false, + "WebGLBuffer": false, + "WebGLContextEvent": false, + "WebGLFramebuffer": false, + "WebGLObject": false, + "WebGLProgram": false, + "WebGLQuery": false, + "WebGLRenderbuffer": false, + "WebGLRenderingContext": false, + "WebGLSampler": false, + "WebGLShader": false, + "WebGLShaderPrecisionFormat": false, + "WebGLSync": false, + "WebGLTexture": false, + "WebGLTransformFeedback": false, + "WebGLUniformLocation": false, + "WebGLVertexArrayObject": false, + "WebSocket": false, + "WebSocketError": false, + "WebSocketStream": false, + "WebTransport": false, + "WebTransportBidirectionalStream": false, + "WebTransportDatagramDuplexStream": false, + "WebTransportError": false, + "WebTransportReceiveStream": false, + "WebTransportSendStream": false, + "WGSLLanguageFeatures": false, + "WheelEvent": false, + "when": false, + "window": false, + "Window": false, + "WindowControlsOverlay": false, + "WindowControlsOverlayGeometryChangeEvent": false, + "Worker": false, + "Worklet": false, + "WorkletGlobalScope": false, + "WritableStream": false, + "WritableStreamDefaultController": false, + "WritableStreamDefaultWriter": false, + "XMLDocument": false, + "XMLHttpRequest": false, + "XMLHttpRequestEventTarget": false, + "XMLHttpRequestUpload": false, + "XMLSerializer": false, + "XPathEvaluator": false, + "XPathExpression": false, + "XPathResult": false, + "XRAnchor": false, + "XRAnchorSet": false, + "XRBoundedReferenceSpace": false, + "XRCamera": false, + "XRCPUDepthInformation": false, + "XRDepthInformation": false, + "XRDOMOverlayState": false, + "XRFrame": false, + "XRHand": false, + "XRHitTestResult": false, + "XRHitTestSource": false, + "XRInputSource": false, + "XRInputSourceArray": false, + "XRInputSourceEvent": false, + "XRInputSourcesChangeEvent": false, + "XRJointPose": false, + "XRJointSpace": false, + "XRLayer": false, + "XRLightEstimate": false, + "XRLightProbe": false, + "XRPose": false, + "XRRay": false, + "XRReferenceSpace": false, + "XRReferenceSpaceEvent": false, + "XRRenderState": false, + "XRRigidTransform": false, + "XRSession": false, + "XRSessionEvent": false, + "XRSpace": false, + "XRSystem": false, + "XRTransientInputHitTestResult": false, + "XRTransientInputHitTestSource": false, + "XRView": false, + "XRViewerPose": false, + "XRViewport": false, + "XRWebGLBinding": false, + "XRWebGLDepthInformation": false, + "XRWebGLLayer": false, + "XSLTProcessor": false + } + }, + "errors": [ + { + "messageId": "impliedEval", + "line": 1 + }, + { + "messageId": "execScript", + "line": 3 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 2 errors but had 0: [] + +0 !== 2 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-implied-eval > invalid + +```js +global.setTimeout('foo' + (function() { + setTimeout(helper); + global.execScript('str'); + return 'bar'; +})()) +``` + +```json +{ + "languageOptions": { + "sourceType": "commonjs", + "globals": { + "AbortController": false, + "AbortSignal": false, + "AbsoluteOrientationSensor": false, + "AbstractRange": false, + "Accelerometer": false, + "addEventListener": false, + "ai": false, + "AI": false, + "AICreateMonitor": false, + "AITextSession": false, + "alert": false, + "AnalyserNode": false, + "Animation": false, + "AnimationEffect": false, + "AnimationEvent": false, + "AnimationPlaybackEvent": false, + "AnimationTimeline": false, + "AsyncDisposableStack": false, + "atob": false, + "Attr": false, + "Audio": false, + "AudioBuffer": false, + "AudioBufferSourceNode": false, + "AudioContext": false, + "AudioData": false, + "AudioDecoder": false, + "AudioDestinationNode": false, + "AudioEncoder": false, + "AudioListener": false, + "AudioNode": false, + "AudioParam": false, + "AudioParamMap": false, + "AudioProcessingEvent": false, + "AudioScheduledSourceNode": false, + "AudioSinkInfo": false, + "AudioWorklet": false, + "AudioWorkletGlobalScope": false, + "AudioWorkletNode": false, + "AudioWorkletProcessor": false, + "AuthenticatorAssertionResponse": false, + "AuthenticatorAttestationResponse": false, + "AuthenticatorResponse": false, + "BackgroundFetchManager": false, + "BackgroundFetchRecord": false, + "BackgroundFetchRegistration": false, + "BarcodeDetector": false, + "BarProp": false, + "BaseAudioContext": false, + "BatteryManager": false, + "BeforeUnloadEvent": false, + "BiquadFilterNode": false, + "Blob": false, + "BlobEvent": false, + "Bluetooth": false, + "BluetoothCharacteristicProperties": false, + "BluetoothDevice": false, + "BluetoothRemoteGATTCharacteristic": false, + "BluetoothRemoteGATTDescriptor": false, + "BluetoothRemoteGATTServer": false, + "BluetoothRemoteGATTService": false, + "BluetoothUUID": false, + "blur": false, + "BroadcastChannel": false, + "BrowserCaptureMediaStreamTrack": false, + "btoa": false, + "ByteLengthQueuingStrategy": false, + "Cache": false, + "caches": false, + "CacheStorage": false, + "cancelAnimationFrame": false, + "cancelIdleCallback": false, + "CanvasCaptureMediaStream": false, + "CanvasCaptureMediaStreamTrack": false, + "CanvasGradient": false, + "CanvasPattern": false, + "CanvasRenderingContext2D": false, + "CaptureController": false, + "CaretPosition": false, + "CDATASection": false, + "ChannelMergerNode": false, + "ChannelSplitterNode": false, + "ChapterInformation": false, + "CharacterBoundsUpdateEvent": false, + "CharacterData": false, + "clearInterval": false, + "clearTimeout": false, + "clientInformation": false, + "Clipboard": false, + "ClipboardChangeEvent": false, + "ClipboardEvent": false, + "ClipboardItem": false, + "close": false, + "closed": false, + "CloseEvent": false, + "CloseWatcher": false, + "CommandEvent": false, + "Comment": false, + "CompositionEvent": false, + "CompressionStream": false, + "confirm": false, + "console": false, + "ConstantSourceNode": false, + "ContentVisibilityAutoStateChangeEvent": false, + "ConvolverNode": false, + "CookieChangeEvent": false, + "CookieDeprecationLabel": false, + "cookieStore": false, + "CookieStore": false, + "CookieStoreManager": false, + "CountQueuingStrategy": false, + "createImageBitmap": false, + "CreateMonitor": false, + "Credential": false, + "credentialless": false, + "CredentialsContainer": false, + "CropTarget": false, + "crossOriginIsolated": false, + "crypto": false, + "Crypto": false, + "CryptoKey": false, + "CSPViolationReportBody": false, + "CSS": false, + "CSSAnimation": false, + "CSSConditionRule": false, + "CSSContainerRule": false, + "CSSCounterStyleRule": false, + "CSSFontFaceRule": false, + "CSSFontFeatureValuesRule": false, + "CSSFontPaletteValuesRule": false, + "CSSFunctionDeclarations": false, + "CSSFunctionDescriptors": false, + "CSSFunctionRule": false, + "CSSGroupingRule": false, + "CSSImageValue": false, + "CSSImportRule": false, + "CSSKeyframeRule": false, + "CSSKeyframesRule": false, + "CSSKeywordValue": false, + "CSSLayerBlockRule": false, + "CSSLayerStatementRule": false, + "CSSMarginRule": false, + "CSSMathClamp": false, + "CSSMathInvert": false, + "CSSMathMax": false, + "CSSMathMin": false, + "CSSMathNegate": false, + "CSSMathProduct": false, + "CSSMathSum": false, + "CSSMathValue": false, + "CSSMatrixComponent": false, + "CSSMediaRule": false, + "CSSNamespaceRule": false, + "CSSNestedDeclarations": false, + "CSSNumericArray": false, + "CSSNumericValue": false, + "CSSPageDescriptors": false, + "CSSPageRule": false, + "CSSPerspective": false, + "CSSPositionTryDescriptors": false, + "CSSPositionTryRule": false, + "CSSPositionValue": false, + "CSSPropertyRule": false, + "CSSRotate": false, + "CSSRule": false, + "CSSRuleList": false, + "CSSScale": false, + "CSSScopeRule": false, + "CSSSkew": false, + "CSSSkewX": false, + "CSSSkewY": false, + "CSSStartingStyleRule": false, + "CSSStyleDeclaration": false, + "CSSStyleRule": false, + "CSSStyleSheet": false, + "CSSStyleValue": false, + "CSSSupportsRule": false, + "CSSTransformComponent": false, + "CSSTransformValue": false, + "CSSTransition": false, + "CSSTranslate": false, + "CSSUnitValue": false, + "CSSUnparsedValue": false, + "CSSVariableReferenceValue": false, + "CSSViewTransitionRule": false, + "currentFrame": false, + "currentTime": false, + "CustomElementRegistry": false, + "customElements": false, + "CustomEvent": false, + "CustomStateSet": false, + "DataTransfer": false, + "DataTransferItem": false, + "DataTransferItemList": false, + "DecompressionStream": false, + "DelayNode": false, + "DelegatedInkTrailPresenter": false, + "DeviceMotionEvent": false, + "DeviceMotionEventAcceleration": false, + "DeviceMotionEventRotationRate": false, + "DeviceOrientationEvent": false, + "devicePixelRatio": false, + "DevicePosture": false, + "DigitalCredential": false, + "dispatchEvent": false, + "DisposableStack": false, + "document": false, + "Document": false, + "DocumentFragment": false, + "documentPictureInPicture": false, + "DocumentPictureInPicture": false, + "DocumentPictureInPictureEvent": false, + "DocumentTimeline": false, + "DocumentType": false, + "DOMError": false, + "DOMException": false, + "DOMImplementation": false, + "DOMMatrix": false, + "DOMMatrixReadOnly": false, + "DOMParser": false, + "DOMPoint": false, + "DOMPointReadOnly": false, + "DOMQuad": false, + "DOMRect": false, + "DOMRectList": false, + "DOMRectReadOnly": false, + "DOMStringList": false, + "DOMStringMap": false, + "DOMTokenList": false, + "DragEvent": false, + "DynamicsCompressorNode": false, + "EditContext": false, + "Element": false, + "ElementInternals": false, + "EncodedAudioChunk": false, + "EncodedVideoChunk": false, + "ErrorEvent": false, + "event": false, + "Event": false, + "EventCounts": false, + "EventSource": false, + "EventTarget": false, + "external": false, + "External": false, + "EyeDropper": false, + "FeaturePolicy": false, + "FederatedCredential": false, + "fence": false, + "Fence": false, + "FencedFrameConfig": false, + "fetch": false, + "fetchLater": false, + "FetchLaterResult": false, + "File": false, + "FileList": false, + "FileReader": false, + "FileSystem": false, + "FileSystemDirectoryEntry": false, + "FileSystemDirectoryHandle": false, + "FileSystemDirectoryReader": false, + "FileSystemEntry": false, + "FileSystemFileEntry": false, + "FileSystemFileHandle": false, + "FileSystemHandle": false, + "FileSystemObserver": false, + "FileSystemWritableFileStream": false, + "find": false, + "focus": false, + "FocusEvent": false, + "FontData": false, + "FontFace": false, + "FontFaceSet": false, + "FontFaceSetLoadEvent": false, + "FormData": false, + "FormDataEvent": false, + "FragmentDirective": false, + "frameElement": false, + "frames": false, + "GainNode": false, + "Gamepad": false, + "GamepadAxisMoveEvent": false, + "GamepadButton": false, + "GamepadButtonEvent": false, + "GamepadEvent": false, + "GamepadHapticActuator": false, + "GamepadPose": false, + "Geolocation": false, + "GeolocationCoordinates": false, + "GeolocationPosition": false, + "GeolocationPositionError": false, + "getComputedStyle": false, + "getScreenDetails": false, + "getSelection": false, + "GPU": false, + "GPUAdapter": false, + "GPUAdapterInfo": false, + "GPUBindGroup": false, + "GPUBindGroupLayout": false, + "GPUBuffer": false, + "GPUBufferUsage": false, + "GPUCanvasContext": false, + "GPUColorWrite": false, + "GPUCommandBuffer": false, + "GPUCommandEncoder": false, + "GPUCompilationInfo": false, + "GPUCompilationMessage": false, + "GPUComputePassEncoder": false, + "GPUComputePipeline": false, + "GPUDevice": false, + "GPUDeviceLostInfo": false, + "GPUError": false, + "GPUExternalTexture": false, + "GPUInternalError": false, + "GPUMapMode": false, + "GPUOutOfMemoryError": false, + "GPUPipelineError": false, + "GPUPipelineLayout": false, + "GPUQuerySet": false, + "GPUQueue": false, + "GPURenderBundle": false, + "GPURenderBundleEncoder": false, + "GPURenderPassEncoder": false, + "GPURenderPipeline": false, + "GPUSampler": false, + "GPUShaderModule": false, + "GPUShaderStage": false, + "GPUSupportedFeatures": false, + "GPUSupportedLimits": false, + "GPUTexture": false, + "GPUTextureUsage": false, + "GPUTextureView": false, + "GPUUncapturedErrorEvent": false, + "GPUValidationError": false, + "GravitySensor": false, + "Gyroscope": false, + "HashChangeEvent": false, + "Headers": false, + "HID": false, + "HIDConnectionEvent": false, + "HIDDevice": false, + "HIDInputReportEvent": false, + "Highlight": false, + "HighlightRegistry": false, + "history": false, + "History": false, + "HTMLAllCollection": false, + "HTMLAnchorElement": false, + "HTMLAreaElement": false, + "HTMLAudioElement": false, + "HTMLBaseElement": false, + "HTMLBodyElement": false, + "HTMLBRElement": false, + "HTMLButtonElement": false, + "HTMLCanvasElement": false, + "HTMLCollection": false, + "HTMLDataElement": false, + "HTMLDataListElement": false, + "HTMLDetailsElement": false, + "HTMLDialogElement": false, + "HTMLDirectoryElement": false, + "HTMLDivElement": false, + "HTMLDListElement": false, + "HTMLDocument": false, + "HTMLElement": false, + "HTMLEmbedElement": false, + "HTMLFencedFrameElement": false, + "HTMLFieldSetElement": false, + "HTMLFontElement": false, + "HTMLFormControlsCollection": false, + "HTMLFormElement": false, + "HTMLFrameElement": false, + "HTMLFrameSetElement": false, + "HTMLHeadElement": false, + "HTMLHeadingElement": false, + "HTMLHRElement": false, + "HTMLHtmlElement": false, + "HTMLIFrameElement": false, + "HTMLImageElement": false, + "HTMLInputElement": false, + "HTMLLabelElement": false, + "HTMLLegendElement": false, + "HTMLLIElement": false, + "HTMLLinkElement": false, + "HTMLMapElement": false, + "HTMLMarqueeElement": false, + "HTMLMediaElement": false, + "HTMLMenuElement": false, + "HTMLMetaElement": false, + "HTMLMeterElement": false, + "HTMLModElement": false, + "HTMLObjectElement": false, + "HTMLOListElement": false, + "HTMLOptGroupElement": false, + "HTMLOptionElement": false, + "HTMLOptionsCollection": false, + "HTMLOutputElement": false, + "HTMLParagraphElement": false, + "HTMLParamElement": false, + "HTMLPictureElement": false, + "HTMLPreElement": false, + "HTMLProgressElement": false, + "HTMLQuoteElement": false, + "HTMLScriptElement": false, + "HTMLSelectedContentElement": false, + "HTMLSelectElement": false, + "HTMLSlotElement": false, + "HTMLSourceElement": false, + "HTMLSpanElement": false, + "HTMLStyleElement": false, + "HTMLTableCaptionElement": false, + "HTMLTableCellElement": false, + "HTMLTableColElement": false, + "HTMLTableElement": false, + "HTMLTableRowElement": false, + "HTMLTableSectionElement": false, + "HTMLTemplateElement": false, + "HTMLTextAreaElement": false, + "HTMLTimeElement": false, + "HTMLTitleElement": false, + "HTMLTrackElement": false, + "HTMLUListElement": false, + "HTMLUnknownElement": false, + "HTMLVideoElement": false, + "IDBCursor": false, + "IDBCursorWithValue": false, + "IDBDatabase": false, + "IDBFactory": false, + "IDBIndex": false, + "IDBKeyRange": false, + "IDBObjectStore": false, + "IDBOpenDBRequest": false, + "IDBRecord": false, + "IDBRequest": false, + "IDBTransaction": false, + "IDBVersionChangeEvent": false, + "IdentityCredential": false, + "IdentityCredentialError": false, + "IdentityProvider": false, + "IdleDeadline": false, + "IdleDetector": false, + "IIRFilterNode": false, + "Image": false, + "ImageBitmap": false, + "ImageBitmapRenderingContext": false, + "ImageCapture": false, + "ImageData": false, + "ImageDecoder": false, + "ImageTrack": false, + "ImageTrackList": false, + "indexedDB": false, + "Ink": false, + "innerHeight": false, + "innerWidth": false, + "InputDeviceCapabilities": false, + "InputDeviceInfo": false, + "InputEvent": false, + "IntegrityViolationReportBody": false, + "InterestEvent": false, + "IntersectionObserver": false, + "IntersectionObserverEntry": false, + "isSecureContext": false, + "Keyboard": false, + "KeyboardEvent": false, + "KeyboardLayoutMap": false, + "KeyframeEffect": false, + "LanguageDetector": false, + "LargestContentfulPaint": false, + "LaunchParams": false, + "launchQueue": false, + "LaunchQueue": false, + "LayoutShift": false, + "LayoutShiftAttribution": false, + "length": false, + "LinearAccelerationSensor": false, + "localStorage": false, + "location": true, + "Location": false, + "locationbar": false, + "Lock": false, + "LockManager": false, + "matchMedia": false, + "MathMLElement": false, + "MediaCapabilities": false, + "MediaCapabilitiesInfo": false, + "MediaDeviceInfo": false, + "MediaDevices": false, + "MediaElementAudioSourceNode": false, + "MediaEncryptedEvent": false, + "MediaError": false, + "MediaKeyError": false, + "MediaKeyMessageEvent": false, + "MediaKeys": false, + "MediaKeySession": false, + "MediaKeyStatusMap": false, + "MediaKeySystemAccess": false, + "MediaList": false, + "MediaMetadata": false, + "MediaQueryList": false, + "MediaQueryListEvent": false, + "MediaRecorder": false, + "MediaRecorderErrorEvent": false, + "MediaSession": false, + "MediaSource": false, + "MediaSourceHandle": false, + "MediaStream": false, + "MediaStreamAudioDestinationNode": false, + "MediaStreamAudioSourceNode": false, + "MediaStreamEvent": false, + "MediaStreamTrack": false, + "MediaStreamTrackAudioSourceNode": false, + "MediaStreamTrackAudioStats": false, + "MediaStreamTrackEvent": false, + "MediaStreamTrackGenerator": false, + "MediaStreamTrackProcessor": false, + "MediaStreamTrackVideoStats": false, + "menubar": false, + "MessageChannel": false, + "MessageEvent": false, + "MessagePort": false, + "MIDIAccess": false, + "MIDIConnectionEvent": false, + "MIDIInput": false, + "MIDIInputMap": false, + "MIDIMessageEvent": false, + "MIDIOutput": false, + "MIDIOutputMap": false, + "MIDIPort": false, + "MimeType": false, + "MimeTypeArray": false, + "model": false, + "ModelGenericSession": false, + "ModelManager": false, + "MouseEvent": false, + "moveBy": false, + "moveTo": false, + "MutationEvent": false, + "MutationObserver": false, + "MutationRecord": false, + "name": false, + "NamedNodeMap": false, + "NavigateEvent": false, + "navigation": false, + "Navigation": false, + "NavigationActivation": false, + "NavigationCurrentEntryChangeEvent": false, + "NavigationDestination": false, + "NavigationHistoryEntry": false, + "NavigationPrecommitController": false, + "NavigationPreloadManager": false, + "NavigationTransition": false, + "navigator": false, + "Navigator": false, + "NavigatorLogin": false, + "NavigatorManagedData": false, + "NavigatorUAData": false, + "NetworkInformation": false, + "Node": false, + "NodeFilter": false, + "NodeIterator": false, + "NodeList": false, + "Notification": false, + "NotifyPaintEvent": false, + "NotRestoredReasonDetails": false, + "NotRestoredReasons": false, + "Observable": false, + "OfflineAudioCompletionEvent": false, + "OfflineAudioContext": false, + "offscreenBuffering": false, + "OffscreenCanvas": false, + "OffscreenCanvasRenderingContext2D": false, + "onabort": true, + "onafterprint": true, + "onanimationcancel": true, + "onanimationend": true, + "onanimationiteration": true, + "onanimationstart": true, + "onappinstalled": true, + "onauxclick": true, + "onbeforeinput": true, + "onbeforeinstallprompt": true, + "onbeforematch": true, + "onbeforeprint": true, + "onbeforetoggle": true, + "onbeforeunload": true, + "onbeforexrselect": true, + "onblur": true, + "oncancel": true, + "oncanplay": true, + "oncanplaythrough": true, + "onchange": true, + "onclick": true, + "onclose": true, + "oncommand": true, + "oncontentvisibilityautostatechange": true, + "oncontextlost": true, + "oncontextmenu": true, + "oncontextrestored": true, + "oncopy": true, + "oncuechange": true, + "oncut": true, + "ondblclick": true, + "ondevicemotion": true, + "ondeviceorientation": true, + "ondeviceorientationabsolute": true, + "ondrag": true, + "ondragend": true, + "ondragenter": true, + "ondragleave": true, + "ondragover": true, + "ondragstart": true, + "ondrop": true, + "ondurationchange": true, + "onemptied": true, + "onended": true, + "onerror": true, + "onfocus": true, + "onformdata": true, + "ongamepadconnected": true, + "ongamepaddisconnected": true, + "ongotpointercapture": true, + "onhashchange": true, + "oninput": true, + "oninvalid": true, + "onkeydown": true, + "onkeypress": true, + "onkeyup": true, + "onlanguagechange": true, + "onload": true, + "onloadeddata": true, + "onloadedmetadata": true, + "onloadstart": true, + "onlostpointercapture": true, + "onmessage": true, + "onmessageerror": true, + "onmousedown": true, + "onmouseenter": true, + "onmouseleave": true, + "onmousemove": true, + "onmouseout": true, + "onmouseover": true, + "onmouseup": true, + "onmousewheel": true, + "onoffline": true, + "ononline": true, + "onpagehide": true, + "onpagereveal": true, + "onpageshow": true, + "onpageswap": true, + "onpaste": true, + "onpause": true, + "onplay": true, + "onplaying": true, + "onpointercancel": true, + "onpointerdown": true, + "onpointerenter": true, + "onpointerleave": true, + "onpointermove": true, + "onpointerout": true, + "onpointerover": true, + "onpointerrawupdate": true, + "onpointerup": true, + "onpopstate": true, + "onprogress": true, + "onratechange": true, + "onrejectionhandled": true, + "onreset": true, + "onresize": true, + "onscroll": true, + "onscrollend": true, + "onscrollsnapchange": true, + "onscrollsnapchanging": true, + "onsearch": true, + "onsecuritypolicyviolation": true, + "onseeked": true, + "onseeking": true, + "onselect": true, + "onselectionchange": true, + "onselectstart": true, + "onslotchange": true, + "onstalled": true, + "onstorage": true, + "onsubmit": true, + "onsuspend": true, + "ontimeupdate": true, + "ontoggle": true, + "ontransitioncancel": true, + "ontransitionend": true, + "ontransitionrun": true, + "ontransitionstart": true, + "onunhandledrejection": true, + "onunload": true, + "onvolumechange": true, + "onwaiting": true, + "onwheel": true, + "open": false, + "opener": false, + "Option": false, + "OrientationSensor": false, + "origin": false, + "originAgentCluster": false, + "OscillatorNode": false, + "OTPCredential": false, + "outerHeight": false, + "outerWidth": false, + "OverconstrainedError": false, + "PageRevealEvent": false, + "PageSwapEvent": false, + "PageTransitionEvent": false, + "pageXOffset": false, + "pageYOffset": false, + "PannerNode": false, + "parent": false, + "PasswordCredential": false, + "Path2D": false, + "PaymentAddress": false, + "PaymentManager": false, + "PaymentMethodChangeEvent": false, + "PaymentRequest": false, + "PaymentRequestUpdateEvent": false, + "PaymentResponse": false, + "performance": false, + "Performance": false, + "PerformanceElementTiming": false, + "PerformanceEntry": false, + "PerformanceEventTiming": false, + "PerformanceLongAnimationFrameTiming": false, + "PerformanceLongTaskTiming": false, + "PerformanceMark": false, + "PerformanceMeasure": false, + "PerformanceNavigation": false, + "PerformanceNavigationTiming": false, + "PerformanceObserver": false, + "PerformanceObserverEntryList": false, + "PerformancePaintTiming": false, + "PerformanceResourceTiming": false, + "PerformanceScriptTiming": false, + "PerformanceServerTiming": false, + "PerformanceTiming": false, + "PeriodicSyncManager": false, + "PeriodicWave": false, + "Permissions": false, + "PermissionStatus": false, + "PERSISTENT": false, + "personalbar": false, + "PictureInPictureEvent": false, + "PictureInPictureWindow": false, + "Plugin": false, + "PluginArray": false, + "PointerEvent": false, + "PopStateEvent": false, + "postMessage": false, + "Presentation": false, + "PresentationAvailability": false, + "PresentationConnection": false, + "PresentationConnectionAvailableEvent": false, + "PresentationConnectionCloseEvent": false, + "PresentationConnectionList": false, + "PresentationReceiver": false, + "PresentationRequest": false, + "PressureObserver": false, + "PressureRecord": false, + "print": false, + "ProcessingInstruction": false, + "Profiler": false, + "ProgressEvent": false, + "PromiseRejectionEvent": false, + "prompt": false, + "ProtectedAudience": false, + "PublicKeyCredential": false, + "PushManager": false, + "PushSubscription": false, + "PushSubscriptionOptions": false, + "queryLocalFonts": false, + "queueMicrotask": false, + "QuotaExceededError": false, + "RadioNodeList": false, + "Range": false, + "ReadableByteStreamController": false, + "ReadableStream": false, + "ReadableStreamBYOBReader": false, + "ReadableStreamBYOBRequest": false, + "ReadableStreamDefaultController": false, + "ReadableStreamDefaultReader": false, + "registerProcessor": false, + "RelativeOrientationSensor": false, + "RemotePlayback": false, + "removeEventListener": false, + "ReportBody": false, + "reportError": false, + "ReportingObserver": false, + "Request": false, + "requestAnimationFrame": false, + "requestIdleCallback": false, + "resizeBy": false, + "ResizeObserver": false, + "ResizeObserverEntry": false, + "ResizeObserverSize": false, + "resizeTo": false, + "Response": false, + "RestrictionTarget": false, + "RTCCertificate": false, + "RTCDataChannel": false, + "RTCDataChannelEvent": false, + "RTCDtlsTransport": false, + "RTCDTMFSender": false, + "RTCDTMFToneChangeEvent": false, + "RTCEncodedAudioFrame": false, + "RTCEncodedVideoFrame": false, + "RTCError": false, + "RTCErrorEvent": false, + "RTCIceCandidate": false, + "RTCIceTransport": false, + "RTCPeerConnection": false, + "RTCPeerConnectionIceErrorEvent": false, + "RTCPeerConnectionIceEvent": false, + "RTCRtpReceiver": false, + "RTCRtpScriptTransform": false, + "RTCRtpSender": false, + "RTCRtpTransceiver": false, + "RTCSctpTransport": false, + "RTCSessionDescription": false, + "RTCStatsReport": false, + "RTCTrackEvent": false, + "sampleRate": false, + "scheduler": false, + "Scheduler": false, + "Scheduling": false, + "screen": false, + "Screen": false, + "ScreenDetailed": false, + "ScreenDetails": false, + "screenLeft": false, + "ScreenOrientation": false, + "screenTop": false, + "screenX": false, + "screenY": false, + "ScriptProcessorNode": false, + "scroll": false, + "scrollbars": false, + "scrollBy": false, + "ScrollTimeline": false, + "scrollTo": false, + "scrollX": false, + "scrollY": false, + "SecurityPolicyViolationEvent": false, + "Selection": false, + "self": false, + "Sensor": false, + "SensorErrorEvent": false, + "Serial": false, + "SerialPort": false, + "ServiceWorker": false, + "ServiceWorkerContainer": false, + "ServiceWorkerRegistration": false, + "sessionStorage": false, + "setInterval": false, + "setTimeout": false, + "ShadowRoot": false, + "sharedStorage": false, + "SharedStorage": false, + "SharedStorageAppendMethod": false, + "SharedStorageClearMethod": false, + "SharedStorageDeleteMethod": false, + "SharedStorageModifierMethod": false, + "SharedStorageSetMethod": false, + "SharedStorageWorklet": false, + "SharedWorker": false, + "showDirectoryPicker": false, + "showOpenFilePicker": false, + "showSaveFilePicker": false, + "SnapEvent": false, + "SourceBuffer": false, + "SourceBufferList": false, + "SpeechGrammar": false, + "SpeechGrammarList": false, + "SpeechRecognition": false, + "SpeechRecognitionErrorEvent": false, + "SpeechRecognitionEvent": false, + "SpeechRecognitionPhrase": false, + "speechSynthesis": false, + "SpeechSynthesis": false, + "SpeechSynthesisErrorEvent": false, + "SpeechSynthesisEvent": false, + "SpeechSynthesisUtterance": false, + "SpeechSynthesisVoice": false, + "StaticRange": false, + "status": false, + "statusbar": false, + "StereoPannerNode": false, + "stop": false, + "Storage": false, + "StorageBucket": false, + "StorageBucketManager": false, + "StorageEvent": false, + "StorageManager": false, + "structuredClone": false, + "styleMedia": false, + "StylePropertyMap": false, + "StylePropertyMapReadOnly": false, + "StyleSheet": false, + "StyleSheetList": false, + "SubmitEvent": false, + "Subscriber": false, + "SubtleCrypto": false, + "Summarizer": false, + "SuppressedError": false, + "SVGAElement": false, + "SVGAngle": false, + "SVGAnimatedAngle": false, + "SVGAnimatedBoolean": false, + "SVGAnimatedEnumeration": false, + "SVGAnimatedInteger": false, + "SVGAnimatedLength": false, + "SVGAnimatedLengthList": false, + "SVGAnimatedNumber": false, + "SVGAnimatedNumberList": false, + "SVGAnimatedPreserveAspectRatio": false, + "SVGAnimatedRect": false, + "SVGAnimatedString": false, + "SVGAnimatedTransformList": false, + "SVGAnimateElement": false, + "SVGAnimateMotionElement": false, + "SVGAnimateTransformElement": false, + "SVGAnimationElement": false, + "SVGCircleElement": false, + "SVGClipPathElement": false, + "SVGComponentTransferFunctionElement": false, + "SVGDefsElement": false, + "SVGDescElement": false, + "SVGElement": false, + "SVGEllipseElement": false, + "SVGFEBlendElement": false, + "SVGFEColorMatrixElement": false, + "SVGFEComponentTransferElement": false, + "SVGFECompositeElement": false, + "SVGFEConvolveMatrixElement": false, + "SVGFEDiffuseLightingElement": false, + "SVGFEDisplacementMapElement": false, + "SVGFEDistantLightElement": false, + "SVGFEDropShadowElement": false, + "SVGFEFloodElement": false, + "SVGFEFuncAElement": false, + "SVGFEFuncBElement": false, + "SVGFEFuncGElement": false, + "SVGFEFuncRElement": false, + "SVGFEGaussianBlurElement": false, + "SVGFEImageElement": false, + "SVGFEMergeElement": false, + "SVGFEMergeNodeElement": false, + "SVGFEMorphologyElement": false, + "SVGFEOffsetElement": false, + "SVGFEPointLightElement": false, + "SVGFESpecularLightingElement": false, + "SVGFESpotLightElement": false, + "SVGFETileElement": false, + "SVGFETurbulenceElement": false, + "SVGFilterElement": false, + "SVGForeignObjectElement": false, + "SVGGElement": false, + "SVGGeometryElement": false, + "SVGGradientElement": false, + "SVGGraphicsElement": false, + "SVGImageElement": false, + "SVGLength": false, + "SVGLengthList": false, + "SVGLinearGradientElement": false, + "SVGLineElement": false, + "SVGMarkerElement": false, + "SVGMaskElement": false, + "SVGMatrix": false, + "SVGMetadataElement": false, + "SVGMPathElement": false, + "SVGNumber": false, + "SVGNumberList": false, + "SVGPathElement": false, + "SVGPatternElement": false, + "SVGPoint": false, + "SVGPointList": false, + "SVGPolygonElement": false, + "SVGPolylineElement": false, + "SVGPreserveAspectRatio": false, + "SVGRadialGradientElement": false, + "SVGRect": false, + "SVGRectElement": false, + "SVGScriptElement": false, + "SVGSetElement": false, + "SVGStopElement": false, + "SVGStringList": false, + "SVGStyleElement": false, + "SVGSVGElement": false, + "SVGSwitchElement": false, + "SVGSymbolElement": false, + "SVGTextContentElement": false, + "SVGTextElement": false, + "SVGTextPathElement": false, + "SVGTextPositioningElement": false, + "SVGTitleElement": false, + "SVGTransform": false, + "SVGTransformList": false, + "SVGTSpanElement": false, + "SVGUnitTypes": false, + "SVGUseElement": false, + "SVGViewElement": false, + "SyncManager": false, + "TaskAttributionTiming": false, + "TaskController": false, + "TaskPriorityChangeEvent": false, + "TaskSignal": false, + "TEMPORARY": false, + "Text": false, + "TextDecoder": false, + "TextDecoderStream": false, + "TextEncoder": false, + "TextEncoderStream": false, + "TextEvent": false, + "TextFormat": false, + "TextFormatUpdateEvent": false, + "TextMetrics": false, + "TextTrack": false, + "TextTrackCue": false, + "TextTrackCueList": false, + "TextTrackList": false, + "TextUpdateEvent": false, + "TimeEvent": false, + "TimeRanges": false, + "ToggleEvent": false, + "toolbar": false, + "top": false, + "Touch": false, + "TouchEvent": false, + "TouchList": false, + "TrackEvent": false, + "TransformStream": false, + "TransformStreamDefaultController": false, + "TransitionEvent": false, + "Translator": false, + "TreeWalker": false, + "TrustedHTML": false, + "TrustedScript": false, + "TrustedScriptURL": false, + "TrustedTypePolicy": false, + "TrustedTypePolicyFactory": false, + "trustedTypes": false, + "UIEvent": false, + "URL": false, + "URLPattern": false, + "URLSearchParams": false, + "USB": false, + "USBAlternateInterface": false, + "USBConfiguration": false, + "USBConnectionEvent": false, + "USBDevice": false, + "USBEndpoint": false, + "USBInterface": false, + "USBInTransferResult": false, + "USBIsochronousInTransferPacket": false, + "USBIsochronousInTransferResult": false, + "USBIsochronousOutTransferPacket": false, + "USBIsochronousOutTransferResult": false, + "USBOutTransferResult": false, + "UserActivation": false, + "ValidityState": false, + "VideoColorSpace": false, + "VideoDecoder": false, + "VideoEncoder": false, + "VideoFrame": false, + "VideoPlaybackQuality": false, + "viewport": false, + "Viewport": false, + "ViewTimeline": false, + "ViewTransition": false, + "ViewTransitionTypeSet": false, + "VirtualKeyboard": false, + "VirtualKeyboardGeometryChangeEvent": false, + "VisibilityStateEntry": false, + "visualViewport": false, + "VisualViewport": false, + "VTTCue": false, + "VTTRegion": false, + "WakeLock": false, + "WakeLockSentinel": false, + "WaveShaperNode": false, + "WebAssembly": false, + "WebGL2RenderingContext": false, + "WebGLActiveInfo": false, + "WebGLBuffer": false, + "WebGLContextEvent": false, + "WebGLFramebuffer": false, + "WebGLObject": false, + "WebGLProgram": false, + "WebGLQuery": false, + "WebGLRenderbuffer": false, + "WebGLRenderingContext": false, + "WebGLSampler": false, + "WebGLShader": false, + "WebGLShaderPrecisionFormat": false, + "WebGLSync": false, + "WebGLTexture": false, + "WebGLTransformFeedback": false, + "WebGLUniformLocation": false, + "WebGLVertexArrayObject": false, + "WebSocket": false, + "WebSocketError": false, + "WebSocketStream": false, + "WebTransport": false, + "WebTransportBidirectionalStream": false, + "WebTransportDatagramDuplexStream": false, + "WebTransportError": false, + "WebTransportReceiveStream": false, + "WebTransportSendStream": false, + "WGSLLanguageFeatures": false, + "WheelEvent": false, + "when": false, + "window": false, + "Window": false, + "WindowControlsOverlay": false, + "WindowControlsOverlayGeometryChangeEvent": false, + "Worker": false, + "Worklet": false, + "WorkletGlobalScope": false, + "WritableStream": false, + "WritableStreamDefaultController": false, + "WritableStreamDefaultWriter": false, + "XMLDocument": false, + "XMLHttpRequest": false, + "XMLHttpRequestEventTarget": false, + "XMLHttpRequestUpload": false, + "XMLSerializer": false, + "XPathEvaluator": false, + "XPathExpression": false, + "XPathResult": false, + "XRAnchor": false, + "XRAnchorSet": false, + "XRBoundedReferenceSpace": false, + "XRCamera": false, + "XRCPUDepthInformation": false, + "XRDepthInformation": false, + "XRDOMOverlayState": false, + "XRFrame": false, + "XRHand": false, + "XRHitTestResult": false, + "XRHitTestSource": false, + "XRInputSource": false, + "XRInputSourceArray": false, + "XRInputSourceEvent": false, + "XRInputSourcesChangeEvent": false, + "XRJointPose": false, + "XRJointSpace": false, + "XRLayer": false, + "XRLightEstimate": false, + "XRLightProbe": false, + "XRPose": false, + "XRRay": false, + "XRReferenceSpace": false, + "XRReferenceSpaceEvent": false, + "XRRenderState": false, + "XRRigidTransform": false, + "XRSession": false, + "XRSessionEvent": false, + "XRSpace": false, + "XRSystem": false, + "XRTransientInputHitTestResult": false, + "XRTransientInputHitTestSource": false, + "XRView": false, + "XRViewerPose": false, + "XRViewport": false, + "XRWebGLBinding": false, + "XRWebGLDepthInformation": false, + "XRWebGLLayer": false, + "XSLTProcessor": false + } + }, + "errors": [ + { + "messageId": "impliedEval", + "line": 1 + }, + { + "messageId": "execScript", + "line": 3 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 2 errors but had 0: [] + +0 !== 2 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-implied-eval > invalid + +```js +window?.setTimeout('code', 0) +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2020, + "globals": { + "window": "readonly" + } + }, + "errors": [ + { + "messageId": "impliedEval" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-implied-eval > invalid + +```js +(window?.setTimeout)('code', 0) +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2020, + "globals": { + "window": "readonly" + } + }, + "errors": [ + { + "messageId": "impliedEval" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-implied-eval > invalid + +```js +window?.execScript('code') +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2020, + "globals": { + "window": "readonly" + } + }, + "errors": [ + { + "messageId": "execScript" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-implied-eval > invalid + +```js +(window?.execScript)('code') +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2020, + "globals": { + "window": "readonly" + } + }, + "errors": [ + { + "messageId": "execScript" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +### `no-inner-declarations` + +Pass: 67 / 68 (98.5%) +Fail: 1 / 68 (1.5%) + +#### no-inner-declarations > invalid + +```js +'use strict' + if (test) { function doSomething() { } } +``` + +```json +{ + "options": [ + "both", + { + "blockScopedFunctions": "allow" + } + ], + "languageOptions": { + "ecmaVersion": 5 + }, + "errors": [ + { + "messageId": "moveDeclToRoot", + "data": { + "type": "function", + "body": "program" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +### `no-invalid-this` + +Pass: 2 / 562 (0.4%) +Fail: 560 / 562 (99.6%) + +#### no-invalid-this > valid + +```js +console.log(this); z(x => console.log(x, this)); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +"use strict"; console.log(this); z(x => console.log(x, this)); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* implied strict mode */ console.log(this); z(x => console.log(x, this)); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "parserOptions": { + "ecmaFeatures": { + "impliedStrict": true + } + } + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +console.log(this); z(x => console.log(x, this)); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "parserOptions": { + "ecmaFeatures": { + "globalReturn": true + } + } + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +() => { this }; this; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +"use strict"; () => { this }; this; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* implied strict mode */ () => { this }; this; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "parserOptions": { + "ecmaFeatures": { + "impliedStrict": true + } + } + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +this.eval('foo'); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +"use strict"; this.eval('foo'); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* implied strict mode */ this.eval('foo'); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "parserOptions": { + "ecmaFeatures": { + "impliedStrict": true + } + } + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +(function() { console.log(this); z(x => console.log(x, this)); })(); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +function foo() { console.log(this); z(x => console.log(x, this)); } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +function foo() { console.log(this); z(x => console.log(x, this)); } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + }, + "options": [ + { + "capIsConstructor": false + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +function Foo() { console.log(this); z(x => console.log(x, this)); } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + }, + "options": [ + { + "capIsConstructor": false + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +return function() { console.log(this); z(x => console.log(x, this)); }; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "parserOptions": { + "ecmaFeatures": { + "globalReturn": true + } + } + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +var foo = (function() { console.log(this); z(x => console.log(x, this)); }).bar(obj); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +var obj = {foo: function() { function foo() { console.log(this); z(x => console.log(x, this)); } foo(); }}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +var obj = {foo() { function foo() { console.log(this); z(x => console.log(x, this)); } foo(); }}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +var obj = {foo: function() { return function() { console.log(this); z(x => console.log(x, this)); }; }}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +obj.foo = function() { return function() { console.log(this); z(x => console.log(x, this)); }; }; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +class A {static foo() { console.log(this); z(x => console.log(x, this)); }}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +"use strict"; class A {static foo() { console.log(this); z(x => console.log(x, this)); }}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* implied strict mode */ class A {static foo() { console.log(this); z(x => console.log(x, this)); }}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "parserOptions": { + "ecmaFeatures": { + "impliedStrict": true + } + } + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* modules */ class A {static foo() { console.log(this); z(x => console.log(x, this)); }}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +function Foo() { console.log(this); z(x => console.log(x, this)); } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +"use strict"; function Foo() { console.log(this); z(x => console.log(x, this)); } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* implied strict mode */ function Foo() { console.log(this); z(x => console.log(x, this)); } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "parserOptions": { + "ecmaFeatures": { + "impliedStrict": true + } + } + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* modules */ function Foo() { console.log(this); z(x => console.log(x, this)); } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +function Foo() { console.log(this); z(x => console.log(x, this)); } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + }, + "options": [ + {} + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +"use strict"; function Foo() { console.log(this); z(x => console.log(x, this)); } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + }, + "options": [ + {} + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* implied strict mode */ function Foo() { console.log(this); z(x => console.log(x, this)); } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "parserOptions": { + "ecmaFeatures": { + "impliedStrict": true + } + } + }, + "options": [ + {} + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* modules */ function Foo() { console.log(this); z(x => console.log(x, this)); } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + }, + "options": [ + {} + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +function Foo() { console.log(this); z(x => console.log(x, this)); } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + }, + "options": [ + { + "capIsConstructor": true + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +"use strict"; function Foo() { console.log(this); z(x => console.log(x, this)); } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + }, + "options": [ + { + "capIsConstructor": true + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* implied strict mode */ function Foo() { console.log(this); z(x => console.log(x, this)); } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "parserOptions": { + "ecmaFeatures": { + "impliedStrict": true + } + } + }, + "options": [ + { + "capIsConstructor": true + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* modules */ function Foo() { console.log(this); z(x => console.log(x, this)); } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + }, + "options": [ + { + "capIsConstructor": true + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +var Foo = function Foo() { console.log(this); z(x => console.log(x, this)); }; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +"use strict"; var Foo = function Foo() { console.log(this); z(x => console.log(x, this)); }; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* implied strict mode */ var Foo = function Foo() { console.log(this); z(x => console.log(x, this)); }; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "parserOptions": { + "ecmaFeatures": { + "impliedStrict": true + } + } + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* modules */ var Foo = function Foo() { console.log(this); z(x => console.log(x, this)); }; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +class A {constructor() { console.log(this); z(x => console.log(x, this)); }}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +"use strict"; class A {constructor() { console.log(this); z(x => console.log(x, this)); }}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* implied strict mode */ class A {constructor() { console.log(this); z(x => console.log(x, this)); }}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "parserOptions": { + "ecmaFeatures": { + "impliedStrict": true + } + } + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* modules */ class A {constructor() { console.log(this); z(x => console.log(x, this)); }}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +var obj = {foo: function() { console.log(this); z(x => console.log(x, this)); }}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +"use strict"; var obj = {foo: function() { console.log(this); z(x => console.log(x, this)); }}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* implied strict mode */ var obj = {foo: function() { console.log(this); z(x => console.log(x, this)); }}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "parserOptions": { + "ecmaFeatures": { + "impliedStrict": true + } + } + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* modules */ var obj = {foo: function() { console.log(this); z(x => console.log(x, this)); }}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +var obj = {foo() { console.log(this); z(x => console.log(x, this)); }}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +"use strict"; var obj = {foo() { console.log(this); z(x => console.log(x, this)); }}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* implied strict mode */ var obj = {foo() { console.log(this); z(x => console.log(x, this)); }}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "parserOptions": { + "ecmaFeatures": { + "impliedStrict": true + } + } + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* modules */ var obj = {foo() { console.log(this); z(x => console.log(x, this)); }}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +var obj = {foo: foo || function() { console.log(this); z(x => console.log(x, this)); }}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +"use strict"; var obj = {foo: foo || function() { console.log(this); z(x => console.log(x, this)); }}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* implied strict mode */ var obj = {foo: foo || function() { console.log(this); z(x => console.log(x, this)); }}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "parserOptions": { + "ecmaFeatures": { + "impliedStrict": true + } + } + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* modules */ var obj = {foo: foo || function() { console.log(this); z(x => console.log(x, this)); }}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +var obj = {foo: hasNative ? foo : function() { console.log(this); z(x => console.log(x, this)); }}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +"use strict"; var obj = {foo: hasNative ? foo : function() { console.log(this); z(x => console.log(x, this)); }}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* implied strict mode */ var obj = {foo: hasNative ? foo : function() { console.log(this); z(x => console.log(x, this)); }}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "parserOptions": { + "ecmaFeatures": { + "impliedStrict": true + } + } + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* modules */ var obj = {foo: hasNative ? foo : function() { console.log(this); z(x => console.log(x, this)); }}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +var obj = {foo: (function() { return function() { console.log(this); z(x => console.log(x, this)); }; })()}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +"use strict"; var obj = {foo: (function() { return function() { console.log(this); z(x => console.log(x, this)); }; })()}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* implied strict mode */ var obj = {foo: (function() { return function() { console.log(this); z(x => console.log(x, this)); }; })()}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "parserOptions": { + "ecmaFeatures": { + "impliedStrict": true + } + } + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* modules */ var obj = {foo: (function() { return function() { console.log(this); z(x => console.log(x, this)); }; })()}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +Object.defineProperty(obj, "foo", {value: function() { console.log(this); z(x => console.log(x, this)); }}) +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +"use strict"; Object.defineProperty(obj, "foo", {value: function() { console.log(this); z(x => console.log(x, this)); }}) +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* implied strict mode */ Object.defineProperty(obj, "foo", {value: function() { console.log(this); z(x => console.log(x, this)); }}) +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "parserOptions": { + "ecmaFeatures": { + "impliedStrict": true + } + } + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* modules */ Object.defineProperty(obj, "foo", {value: function() { console.log(this); z(x => console.log(x, this)); }}) +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +Object.defineProperties(obj, {foo: {value: function() { console.log(this); z(x => console.log(x, this)); }}}) +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +"use strict"; Object.defineProperties(obj, {foo: {value: function() { console.log(this); z(x => console.log(x, this)); }}}) +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* implied strict mode */ Object.defineProperties(obj, {foo: {value: function() { console.log(this); z(x => console.log(x, this)); }}}) +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "parserOptions": { + "ecmaFeatures": { + "impliedStrict": true + } + } + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* modules */ Object.defineProperties(obj, {foo: {value: function() { console.log(this); z(x => console.log(x, this)); }}}) +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +obj.foo = function() { console.log(this); z(x => console.log(x, this)); }; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +"use strict"; obj.foo = function() { console.log(this); z(x => console.log(x, this)); }; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* implied strict mode */ obj.foo = function() { console.log(this); z(x => console.log(x, this)); }; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "parserOptions": { + "ecmaFeatures": { + "impliedStrict": true + } + } + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* modules */ obj.foo = function() { console.log(this); z(x => console.log(x, this)); }; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +obj.foo = foo || function() { console.log(this); z(x => console.log(x, this)); }; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +"use strict"; obj.foo = foo || function() { console.log(this); z(x => console.log(x, this)); }; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* implied strict mode */ obj.foo = foo || function() { console.log(this); z(x => console.log(x, this)); }; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "parserOptions": { + "ecmaFeatures": { + "impliedStrict": true + } + } + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* modules */ obj.foo = foo || function() { console.log(this); z(x => console.log(x, this)); }; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +obj.foo = foo ? bar : function() { console.log(this); z(x => console.log(x, this)); }; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +"use strict"; obj.foo = foo ? bar : function() { console.log(this); z(x => console.log(x, this)); }; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* implied strict mode */ obj.foo = foo ? bar : function() { console.log(this); z(x => console.log(x, this)); }; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "parserOptions": { + "ecmaFeatures": { + "impliedStrict": true + } + } + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* modules */ obj.foo = foo ? bar : function() { console.log(this); z(x => console.log(x, this)); }; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +obj.foo = (function() { return function() { console.log(this); z(x => console.log(x, this)); }; })(); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +"use strict"; obj.foo = (function() { return function() { console.log(this); z(x => console.log(x, this)); }; })(); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* implied strict mode */ obj.foo = (function() { return function() { console.log(this); z(x => console.log(x, this)); }; })(); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "parserOptions": { + "ecmaFeatures": { + "impliedStrict": true + } + } + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* modules */ obj.foo = (function() { return function() { console.log(this); z(x => console.log(x, this)); }; })(); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +obj.foo = (() => function() { console.log(this); z(x => console.log(x, this)); })(); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +"use strict"; obj.foo = (() => function() { console.log(this); z(x => console.log(x, this)); })(); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* implied strict mode */ obj.foo = (() => function() { console.log(this); z(x => console.log(x, this)); })(); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "parserOptions": { + "ecmaFeatures": { + "impliedStrict": true + } + } + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* modules */ obj.foo = (() => function() { console.log(this); z(x => console.log(x, this)); })(); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +obj.foo = (function() { return () => { console.log(this); z(x => console.log(x, this)); }; })(); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +obj.foo = (() => () => { console.log(this); z(x => console.log(x, this)); })(); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +"use strict"; obj.foo = (() => () => { console.log(this); z(x => console.log(x, this)); })(); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* implied strict mode */ obj.foo = (() => () => { console.log(this); z(x => console.log(x, this)); })(); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "parserOptions": { + "ecmaFeatures": { + "impliedStrict": true + } + } + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +obj.foo = (function() { return function() { console.log(this); z(x => console.log(x, this)); }; })?.(); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2020 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +"use strict"; obj.foo = (function() { return function() { console.log(this); z(x => console.log(x, this)); }; })?.(); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2020 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* implied strict mode */ obj.foo = (function() { return function() { console.log(this); z(x => console.log(x, this)); }; })?.(); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2020, + "parserOptions": { + "ecmaFeatures": { + "impliedStrict": true + } + } + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* modules */ obj.foo = (function() { return function() { console.log(this); z(x => console.log(x, this)); }; })?.(); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2020, + "sourceType": "module" + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +class A {foo() { console.log(this); z(x => console.log(x, this)); }}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +"use strict"; class A {foo() { console.log(this); z(x => console.log(x, this)); }}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* implied strict mode */ class A {foo() { console.log(this); z(x => console.log(x, this)); }}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "parserOptions": { + "ecmaFeatures": { + "impliedStrict": true + } + } + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* modules */ class A {foo() { console.log(this); z(x => console.log(x, this)); }}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +var foo = function() { console.log(this); z(x => console.log(x, this)); }.bind(obj); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +"use strict"; var foo = function() { console.log(this); z(x => console.log(x, this)); }.bind(obj); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* implied strict mode */ var foo = function() { console.log(this); z(x => console.log(x, this)); }.bind(obj); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "parserOptions": { + "ecmaFeatures": { + "impliedStrict": true + } + } + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* modules */ var foo = function() { console.log(this); z(x => console.log(x, this)); }.bind(obj); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +var foo = function() { console.log(this); z(x => console.log(x, this)); }.bind(null); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +(function() { console.log(this); z(x => console.log(x, this)); }).call(obj); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +"use strict"; (function() { console.log(this); z(x => console.log(x, this)); }).call(obj); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* implied strict mode */ (function() { console.log(this); z(x => console.log(x, this)); }).call(obj); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "parserOptions": { + "ecmaFeatures": { + "impliedStrict": true + } + } + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* modules */ (function() { console.log(this); z(x => console.log(x, this)); }).call(obj); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +(function() { console.log(this); z(x => console.log(x, this)); }).call(undefined); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +(function() { console.log(this); z(x => console.log(x, this)); }).apply(obj); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +"use strict"; (function() { console.log(this); z(x => console.log(x, this)); }).apply(obj); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* implied strict mode */ (function() { console.log(this); z(x => console.log(x, this)); }).apply(obj); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "parserOptions": { + "ecmaFeatures": { + "impliedStrict": true + } + } + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* modules */ (function() { console.log(this); z(x => console.log(x, this)); }).apply(obj); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +(function() { console.log(this); z(x => console.log(x, this)); }).apply(void 0); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +Reflect.apply(function() { console.log(this); z(x => console.log(x, this)); }, obj, []); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +"use strict"; Reflect.apply(function() { console.log(this); z(x => console.log(x, this)); }, obj, []); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* implied strict mode */ Reflect.apply(function() { console.log(this); z(x => console.log(x, this)); }, obj, []); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "parserOptions": { + "ecmaFeatures": { + "impliedStrict": true + } + } + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* modules */ Reflect.apply(function() { console.log(this); z(x => console.log(x, this)); }, obj, []); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +var foo = function() { console.log(this); z(x => console.log(x, this)); }?.bind(obj); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2020 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +"use strict"; var foo = function() { console.log(this); z(x => console.log(x, this)); }?.bind(obj); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2020 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* implied strict mode */ var foo = function() { console.log(this); z(x => console.log(x, this)); }?.bind(obj); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2020, + "parserOptions": { + "ecmaFeatures": { + "impliedStrict": true + } + } + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* modules */ var foo = function() { console.log(this); z(x => console.log(x, this)); }?.bind(obj); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2020, + "sourceType": "module" + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +var foo = (function() { console.log(this); z(x => console.log(x, this)); }?.bind)(obj); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2020 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +"use strict"; var foo = (function() { console.log(this); z(x => console.log(x, this)); }?.bind)(obj); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2020 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* implied strict mode */ var foo = (function() { console.log(this); z(x => console.log(x, this)); }?.bind)(obj); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2020, + "parserOptions": { + "ecmaFeatures": { + "impliedStrict": true + } + } + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* modules */ var foo = (function() { console.log(this); z(x => console.log(x, this)); }?.bind)(obj); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2020, + "sourceType": "module" + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +var foo = function() { console.log(this); z(x => console.log(x, this)); }.bind?.(obj); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2020 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +"use strict"; var foo = function() { console.log(this); z(x => console.log(x, this)); }.bind?.(obj); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2020 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* implied strict mode */ var foo = function() { console.log(this); z(x => console.log(x, this)); }.bind?.(obj); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2020, + "parserOptions": { + "ecmaFeatures": { + "impliedStrict": true + } + } + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* modules */ var foo = function() { console.log(this); z(x => console.log(x, this)); }.bind?.(obj); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2020, + "sourceType": "module" + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +Array.from([], function() { console.log(this); z(x => console.log(x, this)); }); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +foo.every(function() { console.log(this); z(x => console.log(x, this)); }); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +foo.filter(function() { console.log(this); z(x => console.log(x, this)); }); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +foo.find(function() { console.log(this); z(x => console.log(x, this)); }); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +foo.findIndex(function() { console.log(this); z(x => console.log(x, this)); }); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +foo.findLast(function() { console.log(this); z(x => console.log(x, this)); }); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +foo.findLastIndex(function() { console.log(this); z(x => console.log(x, this)); }); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +foo.flatMap(function() { console.log(this); z(x => console.log(x, this)); }); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +foo.forEach(function() { console.log(this); z(x => console.log(x, this)); }); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +foo.map(function() { console.log(this); z(x => console.log(x, this)); }); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +foo.some(function() { console.log(this); z(x => console.log(x, this)); }); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +Array.from([], function() { console.log(this); z(x => console.log(x, this)); }, obj); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +"use strict"; Array.from([], function() { console.log(this); z(x => console.log(x, this)); }, obj); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* implied strict mode */ Array.from([], function() { console.log(this); z(x => console.log(x, this)); }, obj); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "parserOptions": { + "ecmaFeatures": { + "impliedStrict": true + } + } + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* modules */ Array.from([], function() { console.log(this); z(x => console.log(x, this)); }, obj); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +foo.every(function() { console.log(this); z(x => console.log(x, this)); }, obj); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +"use strict"; foo.every(function() { console.log(this); z(x => console.log(x, this)); }, obj); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* implied strict mode */ foo.every(function() { console.log(this); z(x => console.log(x, this)); }, obj); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "parserOptions": { + "ecmaFeatures": { + "impliedStrict": true + } + } + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* modules */ foo.every(function() { console.log(this); z(x => console.log(x, this)); }, obj); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +foo.filter(function() { console.log(this); z(x => console.log(x, this)); }, obj); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +"use strict"; foo.filter(function() { console.log(this); z(x => console.log(x, this)); }, obj); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* implied strict mode */ foo.filter(function() { console.log(this); z(x => console.log(x, this)); }, obj); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "parserOptions": { + "ecmaFeatures": { + "impliedStrict": true + } + } + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* modules */ foo.filter(function() { console.log(this); z(x => console.log(x, this)); }, obj); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +foo.find(function() { console.log(this); z(x => console.log(x, this)); }, obj); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +"use strict"; foo.find(function() { console.log(this); z(x => console.log(x, this)); }, obj); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* implied strict mode */ foo.find(function() { console.log(this); z(x => console.log(x, this)); }, obj); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "parserOptions": { + "ecmaFeatures": { + "impliedStrict": true + } + } + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* modules */ foo.find(function() { console.log(this); z(x => console.log(x, this)); }, obj); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +foo.findIndex(function() { console.log(this); z(x => console.log(x, this)); }, obj); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +"use strict"; foo.findIndex(function() { console.log(this); z(x => console.log(x, this)); }, obj); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* implied strict mode */ foo.findIndex(function() { console.log(this); z(x => console.log(x, this)); }, obj); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "parserOptions": { + "ecmaFeatures": { + "impliedStrict": true + } + } + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* modules */ foo.findIndex(function() { console.log(this); z(x => console.log(x, this)); }, obj); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +foo.findLast(function() { console.log(this); z(x => console.log(x, this)); }, obj); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +"use strict"; foo.findLast(function() { console.log(this); z(x => console.log(x, this)); }, obj); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* implied strict mode */ foo.findLast(function() { console.log(this); z(x => console.log(x, this)); }, obj); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "parserOptions": { + "ecmaFeatures": { + "impliedStrict": true + } + } + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* modules */ foo.findLast(function() { console.log(this); z(x => console.log(x, this)); }, obj); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +foo.findLastIndex(function() { console.log(this); z(x => console.log(x, this)); }, obj); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +"use strict"; foo.findLastIndex(function() { console.log(this); z(x => console.log(x, this)); }, obj); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* implied strict mode */ foo.findLastIndex(function() { console.log(this); z(x => console.log(x, this)); }, obj); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "parserOptions": { + "ecmaFeatures": { + "impliedStrict": true + } + } + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* modules */ foo.findLastIndex(function() { console.log(this); z(x => console.log(x, this)); }, obj); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +foo.flatMap(function() { console.log(this); z(x => console.log(x, this)); }, obj); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +"use strict"; foo.flatMap(function() { console.log(this); z(x => console.log(x, this)); }, obj); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* implied strict mode */ foo.flatMap(function() { console.log(this); z(x => console.log(x, this)); }, obj); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "parserOptions": { + "ecmaFeatures": { + "impliedStrict": true + } + } + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* modules */ foo.flatMap(function() { console.log(this); z(x => console.log(x, this)); }, obj); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +foo.forEach(function() { console.log(this); z(x => console.log(x, this)); }, obj); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +"use strict"; foo.forEach(function() { console.log(this); z(x => console.log(x, this)); }, obj); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* implied strict mode */ foo.forEach(function() { console.log(this); z(x => console.log(x, this)); }, obj); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "parserOptions": { + "ecmaFeatures": { + "impliedStrict": true + } + } + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* modules */ foo.forEach(function() { console.log(this); z(x => console.log(x, this)); }, obj); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +foo.map(function() { console.log(this); z(x => console.log(x, this)); }, obj); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +"use strict"; foo.map(function() { console.log(this); z(x => console.log(x, this)); }, obj); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* implied strict mode */ foo.map(function() { console.log(this); z(x => console.log(x, this)); }, obj); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "parserOptions": { + "ecmaFeatures": { + "impliedStrict": true + } + } + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* modules */ foo.map(function() { console.log(this); z(x => console.log(x, this)); }, obj); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +foo.some(function() { console.log(this); z(x => console.log(x, this)); }, obj); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +"use strict"; foo.some(function() { console.log(this); z(x => console.log(x, this)); }, obj); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* implied strict mode */ foo.some(function() { console.log(this); z(x => console.log(x, this)); }, obj); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "parserOptions": { + "ecmaFeatures": { + "impliedStrict": true + } + } + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* modules */ foo.some(function() { console.log(this); z(x => console.log(x, this)); }, obj); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +foo.forEach(function() { console.log(this); z(x => console.log(x, this)); }, null); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +Array?.from([], function() { console.log(this); z(x => console.log(x, this)); }, obj); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2020 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +"use strict"; Array?.from([], function() { console.log(this); z(x => console.log(x, this)); }, obj); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2020 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* implied strict mode */ Array?.from([], function() { console.log(this); z(x => console.log(x, this)); }, obj); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2020, + "parserOptions": { + "ecmaFeatures": { + "impliedStrict": true + } + } + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* modules */ Array?.from([], function() { console.log(this); z(x => console.log(x, this)); }, obj); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2020, + "sourceType": "module" + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +foo?.every(function() { console.log(this); z(x => console.log(x, this)); }, obj); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2020 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +"use strict"; foo?.every(function() { console.log(this); z(x => console.log(x, this)); }, obj); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2020 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* implied strict mode */ foo?.every(function() { console.log(this); z(x => console.log(x, this)); }, obj); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2020, + "parserOptions": { + "ecmaFeatures": { + "impliedStrict": true + } + } + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* modules */ foo?.every(function() { console.log(this); z(x => console.log(x, this)); }, obj); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2020, + "sourceType": "module" + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +(Array?.from)([], function() { console.log(this); z(x => console.log(x, this)); }, obj); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2020 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +"use strict"; (Array?.from)([], function() { console.log(this); z(x => console.log(x, this)); }, obj); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2020 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* implied strict mode */ (Array?.from)([], function() { console.log(this); z(x => console.log(x, this)); }, obj); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2020, + "parserOptions": { + "ecmaFeatures": { + "impliedStrict": true + } + } + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* modules */ (Array?.from)([], function() { console.log(this); z(x => console.log(x, this)); }, obj); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2020, + "sourceType": "module" + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +(foo?.every)(function() { console.log(this); z(x => console.log(x, this)); }, obj); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2020 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +"use strict"; (foo?.every)(function() { console.log(this); z(x => console.log(x, this)); }, obj); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2020 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* implied strict mode */ (foo?.every)(function() { console.log(this); z(x => console.log(x, this)); }, obj); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2020, + "parserOptions": { + "ecmaFeatures": { + "impliedStrict": true + } + } + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* modules */ (foo?.every)(function() { console.log(this); z(x => console.log(x, this)); }, obj); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2020, + "sourceType": "module" + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/** @this Obj */ function foo() { console.log(this); z(x => console.log(x, this)); } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +"use strict"; /** @this Obj */ function foo() { console.log(this); z(x => console.log(x, this)); } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* implied strict mode */ /** @this Obj */ function foo() { console.log(this); z(x => console.log(x, this)); } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "parserOptions": { + "ecmaFeatures": { + "impliedStrict": true + } + } + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* modules */ /** @this Obj */ function foo() { console.log(this); z(x => console.log(x, this)); } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/** + * @returns {void} + * @this Obj + */ +function foo() { console.log(this); z(x => console.log(x, this)); } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +"use strict"; /** + * @returns {void} + * @this Obj + */ +function foo() { console.log(this); z(x => console.log(x, this)); } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* implied strict mode */ /** + * @returns {void} + * @this Obj + */ +function foo() { console.log(this); z(x => console.log(x, this)); } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "parserOptions": { + "ecmaFeatures": { + "impliedStrict": true + } + } + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* modules */ /** + * @returns {void} + * @this Obj + */ +function foo() { console.log(this); z(x => console.log(x, this)); } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/** @returns {void} */ function foo() { console.log(this); z(x => console.log(x, this)); } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/** @this Obj */ foo(function() { console.log(this); z(x => console.log(x, this)); }); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +foo(/* @this Obj */ function() { console.log(this); z(x => console.log(x, this)); }); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +"use strict"; foo(/* @this Obj */ function() { console.log(this); z(x => console.log(x, this)); }); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* implied strict mode */ foo(/* @this Obj */ function() { console.log(this); z(x => console.log(x, this)); }); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "parserOptions": { + "ecmaFeatures": { + "impliedStrict": true + } + } + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* modules */ foo(/* @this Obj */ function() { console.log(this); z(x => console.log(x, this)); }); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +function foo() { /** @this Obj*/ return function bar() { console.log(this); z(x => console.log(x, this)); }; } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +"use strict"; function foo() { /** @this Obj*/ return function bar() { console.log(this); z(x => console.log(x, this)); }; } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* implied strict mode */ function foo() { /** @this Obj*/ return function bar() { console.log(this); z(x => console.log(x, this)); }; } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "parserOptions": { + "ecmaFeatures": { + "impliedStrict": true + } + } + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* modules */ function foo() { /** @this Obj*/ return function bar() { console.log(this); z(x => console.log(x, this)); }; } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +var Ctor = function() { console.log(this); z(x => console.log(x, this)); } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +"use strict"; var Ctor = function() { console.log(this); z(x => console.log(x, this)); } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* implied strict mode */ var Ctor = function() { console.log(this); z(x => console.log(x, this)); } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "parserOptions": { + "ecmaFeatures": { + "impliedStrict": true + } + } + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* modules */ var Ctor = function() { console.log(this); z(x => console.log(x, this)); } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +var Ctor = function() { console.log(this); z(x => console.log(x, this)); } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + }, + "options": [ + { + "capIsConstructor": false + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +var func = function() { console.log(this); z(x => console.log(x, this)); } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +var func = function() { console.log(this); z(x => console.log(x, this)); } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + }, + "options": [ + { + "capIsConstructor": false + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +Ctor = function() { console.log(this); z(x => console.log(x, this)); } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +"use strict"; Ctor = function() { console.log(this); z(x => console.log(x, this)); } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* implied strict mode */ Ctor = function() { console.log(this); z(x => console.log(x, this)); } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "parserOptions": { + "ecmaFeatures": { + "impliedStrict": true + } + } + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* modules */ Ctor = function() { console.log(this); z(x => console.log(x, this)); } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +Ctor = function() { console.log(this); z(x => console.log(x, this)); } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + }, + "options": [ + { + "capIsConstructor": false + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +func = function() { console.log(this); z(x => console.log(x, this)); } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +func = function() { console.log(this); z(x => console.log(x, this)); } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + }, + "options": [ + { + "capIsConstructor": false + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +function foo(Ctor = function() { console.log(this); z(x => console.log(x, this)); }) {} +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +"use strict"; function foo(Ctor = function() { console.log(this); z(x => console.log(x, this)); }) {} +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* implied strict mode */ function foo(Ctor = function() { console.log(this); z(x => console.log(x, this)); }) {} +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "parserOptions": { + "ecmaFeatures": { + "impliedStrict": true + } + } + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* modules */ function foo(Ctor = function() { console.log(this); z(x => console.log(x, this)); }) {} +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +function foo(func = function() { console.log(this); z(x => console.log(x, this)); }) {} +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +[obj.method = function() { console.log(this); z(x => console.log(x, this)); }] = a +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +"use strict"; [obj.method = function() { console.log(this); z(x => console.log(x, this)); }] = a +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* implied strict mode */ [obj.method = function() { console.log(this); z(x => console.log(x, this)); }] = a +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "parserOptions": { + "ecmaFeatures": { + "impliedStrict": true + } + } + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* modules */ [obj.method = function() { console.log(this); z(x => console.log(x, this)); }] = a +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +[func = function() { console.log(this); z(x => console.log(x, this)); }] = a +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +obj.method &&= function () { console.log(this); z(x => console.log(x, this)); } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2021 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +"use strict"; obj.method &&= function () { console.log(this); z(x => console.log(x, this)); } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2021 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* implied strict mode */ obj.method &&= function () { console.log(this); z(x => console.log(x, this)); } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2021, + "parserOptions": { + "ecmaFeatures": { + "impliedStrict": true + } + } + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* modules */ obj.method &&= function () { console.log(this); z(x => console.log(x, this)); } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2021, + "sourceType": "module" + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +obj.method ||= function () { console.log(this); z(x => console.log(x, this)); } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2021 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +"use strict"; obj.method ||= function () { console.log(this); z(x => console.log(x, this)); } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2021 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* implied strict mode */ obj.method ||= function () { console.log(this); z(x => console.log(x, this)); } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2021, + "parserOptions": { + "ecmaFeatures": { + "impliedStrict": true + } + } + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* modules */ obj.method ||= function () { console.log(this); z(x => console.log(x, this)); } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2021, + "sourceType": "module" + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +obj.method ??= function () { console.log(this); z(x => console.log(x, this)); } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2021 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +"use strict"; obj.method ??= function () { console.log(this); z(x => console.log(x, this)); } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2021 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* implied strict mode */ obj.method ??= function () { console.log(this); z(x => console.log(x, this)); } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2021, + "parserOptions": { + "ecmaFeatures": { + "impliedStrict": true + } + } + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* modules */ obj.method ??= function () { console.log(this); z(x => console.log(x, this)); } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2021, + "sourceType": "module" + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +class C { field = this } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2022 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +"use strict"; class C { field = this } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2022 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* implied strict mode */ class C { field = this } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2022, + "parserOptions": { + "ecmaFeatures": { + "impliedStrict": true + } + } + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* modules */ class C { field = this } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2022, + "sourceType": "module" + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +class C { static field = this } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2022 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +"use strict"; class C { static field = this } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2022 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* implied strict mode */ class C { static field = this } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2022, + "parserOptions": { + "ecmaFeatures": { + "impliedStrict": true + } + } + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* modules */ class C { static field = this } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2022, + "sourceType": "module" + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +class C { field = console.log(this); } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2022 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +"use strict"; class C { field = console.log(this); } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2022 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* implied strict mode */ class C { field = console.log(this); } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2022, + "parserOptions": { + "ecmaFeatures": { + "impliedStrict": true + } + } + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* modules */ class C { field = console.log(this); } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2022, + "sourceType": "module" + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +class C { field = z(x => console.log(x, this)); } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2022 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +"use strict"; class C { field = z(x => console.log(x, this)); } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2022 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* implied strict mode */ class C { field = z(x => console.log(x, this)); } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2022, + "parserOptions": { + "ecmaFeatures": { + "impliedStrict": true + } + } + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* modules */ class C { field = z(x => console.log(x, this)); } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2022, + "sourceType": "module" + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +class C { field = function () { console.log(this); z(x => console.log(x, this)); }; } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2022 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +"use strict"; class C { field = function () { console.log(this); z(x => console.log(x, this)); }; } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2022 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* implied strict mode */ class C { field = function () { console.log(this); z(x => console.log(x, this)); }; } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2022, + "parserOptions": { + "ecmaFeatures": { + "impliedStrict": true + } + } + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* modules */ class C { field = function () { console.log(this); z(x => console.log(x, this)); }; } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2022, + "sourceType": "module" + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +class C { #field = function () { console.log(this); z(x => console.log(x, this)); }; } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2022 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +"use strict"; class C { #field = function () { console.log(this); z(x => console.log(x, this)); }; } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2022 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* implied strict mode */ class C { #field = function () { console.log(this); z(x => console.log(x, this)); }; } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2022, + "parserOptions": { + "ecmaFeatures": { + "impliedStrict": true + } + } + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* modules */ class C { #field = function () { console.log(this); z(x => console.log(x, this)); }; } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2022, + "sourceType": "module" + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +class C { [this.foo]; } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2022 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +"use strict"; class C { [this.foo]; } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2022 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* implied strict mode */ class C { [this.foo]; } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2022, + "parserOptions": { + "ecmaFeatures": { + "impliedStrict": true + } + } + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +class C { foo = () => this; } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2022 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +"use strict"; class C { foo = () => this; } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2022 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* implied strict mode */ class C { foo = () => this; } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2022, + "parserOptions": { + "ecmaFeatures": { + "impliedStrict": true + } + } + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* modules */ class C { foo = () => this; } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2022, + "sourceType": "module" + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +class C { foo = () => { this }; } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2022 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +"use strict"; class C { foo = () => { this }; } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2022 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* implied strict mode */ class C { foo = () => { this }; } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2022, + "parserOptions": { + "ecmaFeatures": { + "impliedStrict": true + } + } + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* modules */ class C { foo = () => { this }; } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2022, + "sourceType": "module" + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +class C { static { this.x; } } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2022 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +"use strict"; class C { static { this.x; } } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2022 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* implied strict mode */ class C { static { this.x; } } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2022, + "parserOptions": { + "ecmaFeatures": { + "impliedStrict": true + } + } + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* modules */ class C { static { this.x; } } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2022, + "sourceType": "module" + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +class C { static { () => { this.x; } } } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2022 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +"use strict"; class C { static { () => { this.x; } } } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2022 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* implied strict mode */ class C { static { () => { this.x; } } } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2022, + "parserOptions": { + "ecmaFeatures": { + "impliedStrict": true + } + } + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* modules */ class C { static { () => { this.x; } } } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2022, + "sourceType": "module" + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +class C { static { class D { [this.x]; } } } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2022 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +"use strict"; class C { static { class D { [this.x]; } } } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2022 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* implied strict mode */ class C { static { class D { [this.x]; } } } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2022, + "parserOptions": { + "ecmaFeatures": { + "impliedStrict": true + } + } + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* modules */ class C { static { class D { [this.x]; } } } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2022, + "sourceType": "module" + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +class C { static {} [this]; } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2022 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +"use strict"; class C { static {} [this]; } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2022 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* implied strict mode */ class C { static {} [this]; } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2022, + "parserOptions": { + "ecmaFeatures": { + "impliedStrict": true + } + } + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +class C { static {} [this.x]; } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2022 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +"use strict"; class C { static {} [this.x]; } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2022 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* implied strict mode */ class C { static {} [this.x]; } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2022, + "parserOptions": { + "ecmaFeatures": { + "impliedStrict": true + } + } + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +function foo() { 'use strict'; this.eval(); } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 3 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +"use strict"; function foo() { 'use strict'; this.eval(); } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 3 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js +/* implied strict mode */ function foo() { 'use strict'; this.eval(); } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 3, + "parserOptions": { + "ecmaFeatures": { + "impliedStrict": true + } + } + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +/* modules */ console.log(this); z(x => console.log(x, this)); /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + }, + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +"use strict"; console.log(this); z(x => console.log(x, this)); /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "parserOptions": { + "ecmaFeatures": { + "globalReturn": true + } + } + }, + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +/* implied strict mode */ console.log(this); z(x => console.log(x, this)); /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "parserOptions": { + "ecmaFeatures": { + "globalReturn": true, + "impliedStrict": true + } + } + }, + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +/* modules */ console.log(this); z(x => console.log(x, this)); /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "parserOptions": { + "ecmaFeatures": { + "globalReturn": true + } + }, + "sourceType": "module" + }, + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +/* modules */ () => { this }; this; /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + }, + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +/* modules */ this.eval('foo'); /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + }, + "errors": [ + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +"use strict"; (function() { console.log(this); z(x => console.log(x, this)); })(); /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +/* implied strict mode */ (function() { console.log(this); z(x => console.log(x, this)); })(); /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "parserOptions": { + "ecmaFeatures": { + "impliedStrict": true + } + } + }, + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +/* modules */ (function() { console.log(this); z(x => console.log(x, this)); })(); /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + }, + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +"use strict"; function foo() { console.log(this); z(x => console.log(x, this)); } /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +/* implied strict mode */ function foo() { console.log(this); z(x => console.log(x, this)); } /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "parserOptions": { + "ecmaFeatures": { + "impliedStrict": true + } + } + }, + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +/* modules */ function foo() { console.log(this); z(x => console.log(x, this)); } /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + }, + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +"use strict"; function foo() { console.log(this); z(x => console.log(x, this)); } /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + }, + "options": [ + { + "capIsConstructor": false + } + ], + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +/* implied strict mode */ function foo() { console.log(this); z(x => console.log(x, this)); } /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "parserOptions": { + "ecmaFeatures": { + "impliedStrict": true + } + } + }, + "options": [ + { + "capIsConstructor": false + } + ], + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +/* modules */ function foo() { console.log(this); z(x => console.log(x, this)); } /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + }, + "options": [ + { + "capIsConstructor": false + } + ], + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +"use strict"; function Foo() { console.log(this); z(x => console.log(x, this)); } /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + }, + "options": [ + { + "capIsConstructor": false + } + ], + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +/* implied strict mode */ function Foo() { console.log(this); z(x => console.log(x, this)); } /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "parserOptions": { + "ecmaFeatures": { + "impliedStrict": true + } + } + }, + "options": [ + { + "capIsConstructor": false + } + ], + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +/* modules */ function Foo() { console.log(this); z(x => console.log(x, this)); } /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + }, + "options": [ + { + "capIsConstructor": false + } + ], + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +function foo() { "use strict"; console.log(this); z(x => console.log(x, this)); } /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +"use strict"; function foo() { "use strict"; console.log(this); z(x => console.log(x, this)); } /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +/* implied strict mode */ function foo() { "use strict"; console.log(this); z(x => console.log(x, this)); } /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "parserOptions": { + "ecmaFeatures": { + "impliedStrict": true + } + } + }, + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +/* modules */ function foo() { "use strict"; console.log(this); z(x => console.log(x, this)); } /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + }, + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +function Foo() { "use strict"; console.log(this); z(x => console.log(x, this)); } /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + }, + "options": [ + { + "capIsConstructor": false + } + ], + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +"use strict"; function Foo() { "use strict"; console.log(this); z(x => console.log(x, this)); } /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + }, + "options": [ + { + "capIsConstructor": false + } + ], + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +/* implied strict mode */ function Foo() { "use strict"; console.log(this); z(x => console.log(x, this)); } /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "parserOptions": { + "ecmaFeatures": { + "impliedStrict": true + } + } + }, + "options": [ + { + "capIsConstructor": false + } + ], + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +/* modules */ function Foo() { "use strict"; console.log(this); z(x => console.log(x, this)); } /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + }, + "options": [ + { + "capIsConstructor": false + } + ], + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +"use strict"; return function() { console.log(this); z(x => console.log(x, this)); }; /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "parserOptions": { + "ecmaFeatures": { + "globalReturn": true + } + } + }, + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +/* implied strict mode */ return function() { console.log(this); z(x => console.log(x, this)); }; /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "parserOptions": { + "ecmaFeatures": { + "globalReturn": true, + "impliedStrict": true + } + } + }, + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +"use strict"; var foo = (function() { console.log(this); z(x => console.log(x, this)); }).bar(obj); /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +/* implied strict mode */ var foo = (function() { console.log(this); z(x => console.log(x, this)); }).bar(obj); /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "parserOptions": { + "ecmaFeatures": { + "impliedStrict": true + } + } + }, + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +/* modules */ var foo = (function() { console.log(this); z(x => console.log(x, this)); }).bar(obj); /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + }, + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +"use strict"; var obj = {foo: function() { function foo() { console.log(this); z(x => console.log(x, this)); } foo(); }}; /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +/* implied strict mode */ var obj = {foo: function() { function foo() { console.log(this); z(x => console.log(x, this)); } foo(); }}; /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "parserOptions": { + "ecmaFeatures": { + "impliedStrict": true + } + } + }, + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +/* modules */ var obj = {foo: function() { function foo() { console.log(this); z(x => console.log(x, this)); } foo(); }}; /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + }, + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +"use strict"; var obj = {foo() { function foo() { console.log(this); z(x => console.log(x, this)); } foo(); }}; /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +/* implied strict mode */ var obj = {foo() { function foo() { console.log(this); z(x => console.log(x, this)); } foo(); }}; /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "parserOptions": { + "ecmaFeatures": { + "impliedStrict": true + } + } + }, + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +/* modules */ var obj = {foo() { function foo() { console.log(this); z(x => console.log(x, this)); } foo(); }}; /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + }, + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +"use strict"; var obj = {foo: function() { return function() { console.log(this); z(x => console.log(x, this)); }; }}; /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +/* implied strict mode */ var obj = {foo: function() { return function() { console.log(this); z(x => console.log(x, this)); }; }}; /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "parserOptions": { + "ecmaFeatures": { + "impliedStrict": true + } + } + }, + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +/* modules */ var obj = {foo: function() { return function() { console.log(this); z(x => console.log(x, this)); }; }}; /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + }, + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +var obj = {foo: function() { "use strict"; return function() { console.log(this); z(x => console.log(x, this)); }; }}; /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +"use strict"; var obj = {foo: function() { "use strict"; return function() { console.log(this); z(x => console.log(x, this)); }; }}; /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +/* implied strict mode */ var obj = {foo: function() { "use strict"; return function() { console.log(this); z(x => console.log(x, this)); }; }}; /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "parserOptions": { + "ecmaFeatures": { + "impliedStrict": true + } + } + }, + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +/* modules */ var obj = {foo: function() { "use strict"; return function() { console.log(this); z(x => console.log(x, this)); }; }}; /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + }, + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +"use strict"; obj.foo = function() { return function() { console.log(this); z(x => console.log(x, this)); }; }; /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +/* implied strict mode */ obj.foo = function() { return function() { console.log(this); z(x => console.log(x, this)); }; }; /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "parserOptions": { + "ecmaFeatures": { + "impliedStrict": true + } + } + }, + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +/* modules */ obj.foo = function() { return function() { console.log(this); z(x => console.log(x, this)); }; }; /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + }, + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +obj.foo = function() { "use strict"; return function() { console.log(this); z(x => console.log(x, this)); }; }; /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +"use strict"; obj.foo = function() { "use strict"; return function() { console.log(this); z(x => console.log(x, this)); }; }; /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +/* implied strict mode */ obj.foo = function() { "use strict"; return function() { console.log(this); z(x => console.log(x, this)); }; }; /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "parserOptions": { + "ecmaFeatures": { + "impliedStrict": true + } + } + }, + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +/* modules */ obj.foo = function() { "use strict"; return function() { console.log(this); z(x => console.log(x, this)); }; }; /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + }, + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +class A { foo() { return function() { console.log(this); z(x => console.log(x, this)); }; } } /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +"use strict"; class A { foo() { return function() { console.log(this); z(x => console.log(x, this)); }; } } /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +/* implied strict mode */ class A { foo() { return function() { console.log(this); z(x => console.log(x, this)); }; } } /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "parserOptions": { + "ecmaFeatures": { + "impliedStrict": true + } + } + }, + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +/* modules */ class A { foo() { return function() { console.log(this); z(x => console.log(x, this)); }; } } /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + }, + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +"use strict"; obj.foo = (function() { return () => { console.log(this); z(x => console.log(x, this)); }; })(); /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +/* implied strict mode */ obj.foo = (function() { return () => { console.log(this); z(x => console.log(x, this)); }; })(); /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "parserOptions": { + "ecmaFeatures": { + "impliedStrict": true + } + } + }, + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +/* modules */ obj.foo = (function() { return () => { console.log(this); z(x => console.log(x, this)); }; })(); /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + }, + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +/* modules */ obj.foo = (() => () => { console.log(this); z(x => console.log(x, this)); })(); /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + }, + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +"use strict"; var foo = function() { console.log(this); z(x => console.log(x, this)); }.bind(null); /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +/* implied strict mode */ var foo = function() { console.log(this); z(x => console.log(x, this)); }.bind(null); /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "parserOptions": { + "ecmaFeatures": { + "impliedStrict": true + } + } + }, + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +/* modules */ var foo = function() { console.log(this); z(x => console.log(x, this)); }.bind(null); /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + }, + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +"use strict"; (function() { console.log(this); z(x => console.log(x, this)); }).call(undefined); /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +/* implied strict mode */ (function() { console.log(this); z(x => console.log(x, this)); }).call(undefined); /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "parserOptions": { + "ecmaFeatures": { + "impliedStrict": true + } + } + }, + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +/* modules */ (function() { console.log(this); z(x => console.log(x, this)); }).call(undefined); /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + }, + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +"use strict"; (function() { console.log(this); z(x => console.log(x, this)); }).apply(void 0); /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +/* implied strict mode */ (function() { console.log(this); z(x => console.log(x, this)); }).apply(void 0); /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "parserOptions": { + "ecmaFeatures": { + "impliedStrict": true + } + } + }, + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +/* modules */ (function() { console.log(this); z(x => console.log(x, this)); }).apply(void 0); /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + }, + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +"use strict"; Array.from([], function() { console.log(this); z(x => console.log(x, this)); }); /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +/* implied strict mode */ Array.from([], function() { console.log(this); z(x => console.log(x, this)); }); /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "parserOptions": { + "ecmaFeatures": { + "impliedStrict": true + } + } + }, + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +/* modules */ Array.from([], function() { console.log(this); z(x => console.log(x, this)); }); /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + }, + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +"use strict"; foo.every(function() { console.log(this); z(x => console.log(x, this)); }); /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +/* implied strict mode */ foo.every(function() { console.log(this); z(x => console.log(x, this)); }); /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "parserOptions": { + "ecmaFeatures": { + "impliedStrict": true + } + } + }, + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +/* modules */ foo.every(function() { console.log(this); z(x => console.log(x, this)); }); /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + }, + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +"use strict"; foo.filter(function() { console.log(this); z(x => console.log(x, this)); }); /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +/* implied strict mode */ foo.filter(function() { console.log(this); z(x => console.log(x, this)); }); /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "parserOptions": { + "ecmaFeatures": { + "impliedStrict": true + } + } + }, + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +/* modules */ foo.filter(function() { console.log(this); z(x => console.log(x, this)); }); /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + }, + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +"use strict"; foo.find(function() { console.log(this); z(x => console.log(x, this)); }); /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +/* implied strict mode */ foo.find(function() { console.log(this); z(x => console.log(x, this)); }); /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "parserOptions": { + "ecmaFeatures": { + "impliedStrict": true + } + } + }, + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +/* modules */ foo.find(function() { console.log(this); z(x => console.log(x, this)); }); /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + }, + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +"use strict"; foo.findIndex(function() { console.log(this); z(x => console.log(x, this)); }); /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +/* implied strict mode */ foo.findIndex(function() { console.log(this); z(x => console.log(x, this)); }); /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "parserOptions": { + "ecmaFeatures": { + "impliedStrict": true + } + } + }, + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +/* modules */ foo.findIndex(function() { console.log(this); z(x => console.log(x, this)); }); /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + }, + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +"use strict"; foo.findLast(function() { console.log(this); z(x => console.log(x, this)); }); /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +/* implied strict mode */ foo.findLast(function() { console.log(this); z(x => console.log(x, this)); }); /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "parserOptions": { + "ecmaFeatures": { + "impliedStrict": true + } + } + }, + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +/* modules */ foo.findLast(function() { console.log(this); z(x => console.log(x, this)); }); /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + }, + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +"use strict"; foo.findLastIndex(function() { console.log(this); z(x => console.log(x, this)); }); /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +/* implied strict mode */ foo.findLastIndex(function() { console.log(this); z(x => console.log(x, this)); }); /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "parserOptions": { + "ecmaFeatures": { + "impliedStrict": true + } + } + }, + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +/* modules */ foo.findLastIndex(function() { console.log(this); z(x => console.log(x, this)); }); /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + }, + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +"use strict"; foo.flatMap(function() { console.log(this); z(x => console.log(x, this)); }); /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +/* implied strict mode */ foo.flatMap(function() { console.log(this); z(x => console.log(x, this)); }); /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "parserOptions": { + "ecmaFeatures": { + "impliedStrict": true + } + } + }, + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +/* modules */ foo.flatMap(function() { console.log(this); z(x => console.log(x, this)); }); /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + }, + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +"use strict"; foo.forEach(function() { console.log(this); z(x => console.log(x, this)); }); /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +/* implied strict mode */ foo.forEach(function() { console.log(this); z(x => console.log(x, this)); }); /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "parserOptions": { + "ecmaFeatures": { + "impliedStrict": true + } + } + }, + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +/* modules */ foo.forEach(function() { console.log(this); z(x => console.log(x, this)); }); /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + }, + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +"use strict"; foo.map(function() { console.log(this); z(x => console.log(x, this)); }); /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +/* implied strict mode */ foo.map(function() { console.log(this); z(x => console.log(x, this)); }); /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "parserOptions": { + "ecmaFeatures": { + "impliedStrict": true + } + } + }, + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +/* modules */ foo.map(function() { console.log(this); z(x => console.log(x, this)); }); /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + }, + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +"use strict"; foo.some(function() { console.log(this); z(x => console.log(x, this)); }); /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +/* implied strict mode */ foo.some(function() { console.log(this); z(x => console.log(x, this)); }); /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "parserOptions": { + "ecmaFeatures": { + "impliedStrict": true + } + } + }, + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +/* modules */ foo.some(function() { console.log(this); z(x => console.log(x, this)); }); /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + }, + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +"use strict"; foo.forEach(function() { console.log(this); z(x => console.log(x, this)); }, null); /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +/* implied strict mode */ foo.forEach(function() { console.log(this); z(x => console.log(x, this)); }, null); /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "parserOptions": { + "ecmaFeatures": { + "impliedStrict": true + } + } + }, + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +/* modules */ foo.forEach(function() { console.log(this); z(x => console.log(x, this)); }, null); /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + }, + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +"use strict"; /** @returns {void} */ function foo() { console.log(this); z(x => console.log(x, this)); } /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +/* implied strict mode */ /** @returns {void} */ function foo() { console.log(this); z(x => console.log(x, this)); } /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "parserOptions": { + "ecmaFeatures": { + "impliedStrict": true + } + } + }, + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +/* modules */ /** @returns {void} */ function foo() { console.log(this); z(x => console.log(x, this)); } /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + }, + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +"use strict"; /** @this Obj */ foo(function() { console.log(this); z(x => console.log(x, this)); }); /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +/* implied strict mode */ /** @this Obj */ foo(function() { console.log(this); z(x => console.log(x, this)); }); /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "parserOptions": { + "ecmaFeatures": { + "impliedStrict": true + } + } + }, + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +/* modules */ /** @this Obj */ foo(function() { console.log(this); z(x => console.log(x, this)); }); /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + }, + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +"use strict"; var Ctor = function() { console.log(this); z(x => console.log(x, this)); } /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + }, + "options": [ + { + "capIsConstructor": false + } + ], + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +/* implied strict mode */ var Ctor = function() { console.log(this); z(x => console.log(x, this)); } /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "parserOptions": { + "ecmaFeatures": { + "impliedStrict": true + } + } + }, + "options": [ + { + "capIsConstructor": false + } + ], + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +/* modules */ var Ctor = function() { console.log(this); z(x => console.log(x, this)); } /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + }, + "options": [ + { + "capIsConstructor": false + } + ], + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +"use strict"; var func = function() { console.log(this); z(x => console.log(x, this)); } /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +/* implied strict mode */ var func = function() { console.log(this); z(x => console.log(x, this)); } /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "parserOptions": { + "ecmaFeatures": { + "impliedStrict": true + } + } + }, + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +/* modules */ var func = function() { console.log(this); z(x => console.log(x, this)); } /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + }, + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +"use strict"; var func = function() { console.log(this); z(x => console.log(x, this)); } /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + }, + "options": [ + { + "capIsConstructor": false + } + ], + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +/* implied strict mode */ var func = function() { console.log(this); z(x => console.log(x, this)); } /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "parserOptions": { + "ecmaFeatures": { + "impliedStrict": true + } + } + }, + "options": [ + { + "capIsConstructor": false + } + ], + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +/* modules */ var func = function() { console.log(this); z(x => console.log(x, this)); } /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + }, + "options": [ + { + "capIsConstructor": false + } + ], + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +"use strict"; Ctor = function() { console.log(this); z(x => console.log(x, this)); } /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + }, + "options": [ + { + "capIsConstructor": false + } + ], + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +/* implied strict mode */ Ctor = function() { console.log(this); z(x => console.log(x, this)); } /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "parserOptions": { + "ecmaFeatures": { + "impliedStrict": true + } + } + }, + "options": [ + { + "capIsConstructor": false + } + ], + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +/* modules */ Ctor = function() { console.log(this); z(x => console.log(x, this)); } /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + }, + "options": [ + { + "capIsConstructor": false + } + ], + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +"use strict"; func = function() { console.log(this); z(x => console.log(x, this)); } /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +/* implied strict mode */ func = function() { console.log(this); z(x => console.log(x, this)); } /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "parserOptions": { + "ecmaFeatures": { + "impliedStrict": true + } + } + }, + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +/* modules */ func = function() { console.log(this); z(x => console.log(x, this)); } /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + }, + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +"use strict"; func = function() { console.log(this); z(x => console.log(x, this)); } /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + }, + "options": [ + { + "capIsConstructor": false + } + ], + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +/* implied strict mode */ func = function() { console.log(this); z(x => console.log(x, this)); } /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "parserOptions": { + "ecmaFeatures": { + "impliedStrict": true + } + } + }, + "options": [ + { + "capIsConstructor": false + } + ], + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +/* modules */ func = function() { console.log(this); z(x => console.log(x, this)); } /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + }, + "options": [ + { + "capIsConstructor": false + } + ], + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +"use strict"; function foo(func = function() { console.log(this); z(x => console.log(x, this)); }) {} /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +/* implied strict mode */ function foo(func = function() { console.log(this); z(x => console.log(x, this)); }) {} /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "parserOptions": { + "ecmaFeatures": { + "impliedStrict": true + } + } + }, + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +/* modules */ function foo(func = function() { console.log(this); z(x => console.log(x, this)); }) {} /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + }, + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +"use strict"; [func = function() { console.log(this); z(x => console.log(x, this)); }] = a /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +/* implied strict mode */ [func = function() { console.log(this); z(x => console.log(x, this)); }] = a /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "parserOptions": { + "ecmaFeatures": { + "impliedStrict": true + } + } + }, + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +/* modules */ [func = function() { console.log(this); z(x => console.log(x, this)); }] = a /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + }, + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +/* modules */ class C { [this.foo]; } /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2022, + "sourceType": "module" + }, + "errors": [ + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +class C { static { function foo() { this.x; } } } /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2022 + }, + "errors": [ + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +"use strict"; class C { static { function foo() { this.x; } } } /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2022 + }, + "errors": [ + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +/* implied strict mode */ class C { static { function foo() { this.x; } } } /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2022, + "parserOptions": { + "ecmaFeatures": { + "impliedStrict": true + } + } + }, + "errors": [ + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +/* modules */ class C { static { function foo() { this.x; } } } /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2022, + "sourceType": "module" + }, + "errors": [ + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +class C { static { (function() { this.x; }); } } /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2022 + }, + "errors": [ + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +"use strict"; class C { static { (function() { this.x; }); } } /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2022 + }, + "errors": [ + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +/* implied strict mode */ class C { static { (function() { this.x; }); } } /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2022, + "parserOptions": { + "ecmaFeatures": { + "impliedStrict": true + } + } + }, + "errors": [ + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +/* modules */ class C { static { (function() { this.x; }); } } /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2022, + "sourceType": "module" + }, + "errors": [ + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +class C { static { (function() { this.x; })(); } } /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2022 + }, + "errors": [ + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +"use strict"; class C { static { (function() { this.x; })(); } } /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2022 + }, + "errors": [ + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +/* implied strict mode */ class C { static { (function() { this.x; })(); } } /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2022, + "parserOptions": { + "ecmaFeatures": { + "impliedStrict": true + } + } + }, + "errors": [ + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +/* modules */ class C { static { (function() { this.x; })(); } } /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2022, + "sourceType": "module" + }, + "errors": [ + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +/* modules */ class C { static {} [this]; } /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2022, + "sourceType": "module" + }, + "errors": [ + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js +/* modules */ class C { static {} [this.x]; } /* should error */ +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2022, + "sourceType": "module" + }, + "errors": [ + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js + + describe('foo', () => { + it('does something', function (this: Mocha.Context) { + this.timeout(100); + // done + }); + }); + +``` + +```json +{} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-invalid-this > valid + +```js + + interface SomeType { + prop: string; + } + function foo(this: SomeType) { + this.prop; + } + +``` + +```json +{} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-invalid-this > valid + +```js + + function foo(this: prop) { + this.propMethod(); + } + +``` + +```json +{} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-invalid-this > valid + +```js + + z(function (x, this: context) { + console.log(x, this); + }); + +``` + +```json +{} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-invalid-this > valid + +```js + + function foo() { + /** @this Obj*/ return function bar() { + console.log(this); + z(x => console.log(x, this)); + }; + } + +``` + +```json +{} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js + + var Ctor = function () { + console.log(this); + z(x => console.log(x, this)); + }; + +``` + +```json +{} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js + + function Foo() { + console.log(this); + z(x => console.log(x, this)); + } + +``` + +```json +{} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js + + function Foo() { + console.log(this); + z(x => console.log(x, this)); + } + +``` + +```json +{ + "options": [ + {} + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js + + function Foo() { + console.log(this); + z(x => console.log(x, this)); + } + +``` + +```json +{ + "options": [ + { + "capIsConstructor": true + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js + + var Foo = function Foo() { + console.log(this); + z(x => console.log(x, this)); + }; + +``` + +```json +{} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js + + class A { + constructor() { + console.log(this); + z(x => console.log(x, this)); + } + } + +``` + +```json +{} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js + + var obj = { + foo: function () { + console.log(this); + z(x => console.log(x, this)); + }, + }; + +``` + +```json +{} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js + + var obj = { + foo() { + console.log(this); + z(x => console.log(x, this)); + }, + }; + +``` + +```json +{} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js + + var obj = { + foo: + foo || + function () { + console.log(this); + z(x => console.log(x, this)); + }, + }; + +``` + +```json +{} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js + + var obj = { + foo: hasNative + ? foo + : function () { + console.log(this); + z(x => console.log(x, this)); + }, + }; + +``` + +```json +{} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js + + var obj = { + foo: (function () { + return function () { + console.log(this); + z(x => console.log(x, this)); + }; + })(), + }; + +``` + +```json +{} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js + + Object.defineProperty(obj, 'foo', { + value: function () { + console.log(this); + z(x => console.log(x, this)); + }, + }); + +``` + +```json +{} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js + + Object.defineProperties(obj, { + foo: { + value: function () { + console.log(this); + z(x => console.log(x, this)); + }, + }, + }); + +``` + +```json +{} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js + + obj.foo = function () { + console.log(this); + z(x => console.log(x, this)); + }; + +``` + +```json +{} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js + + obj.foo = + foo || + function () { + console.log(this); + z(x => console.log(x, this)); + }; + +``` + +```json +{} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js + + obj.foo = foo + ? bar + : function () { + console.log(this); + z(x => console.log(x, this)); + }; + +``` + +```json +{} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js + + obj.foo = (function () { + return function () { + console.log(this); + z(x => console.log(x, this)); + }; + })(); + +``` + +```json +{} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js + + obj.foo = (() => + function () { + console.log(this); + z(x => console.log(x, this)); + })(); + +``` + +```json +{} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js + + (function () { + console.log(this); + z(x => console.log(x, this)); + }).call(obj); + +``` + +```json +{} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js + + var foo = function () { + console.log(this); + z(x => console.log(x, this)); + }.bind(obj); + +``` + +```json +{} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js + + Reflect.apply( + function () { + console.log(this); + z(x => console.log(x, this)); + }, + obj, + [], + ); + +``` + +```json +{} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js + + (function () { + console.log(this); + z(x => console.log(x, this)); + }).apply(obj); + +``` + +```json +{} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js + + class A { + foo() { + console.log(this); + z(x => console.log(x, this)); + } + } + +``` + +```json +{} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js + + Array.from( + [], + function () { + console.log(this); + z(x => console.log(x, this)); + }, + obj, + ); + +``` + +```json +{} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js + + foo.every(function () { + console.log(this); + z(x => console.log(x, this)); + }, obj); + +``` + +```json +{} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js + + foo.filter(function () { + console.log(this); + z(x => console.log(x, this)); + }, obj); + +``` + +```json +{} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js + + foo.find(function () { + console.log(this); + z(x => console.log(x, this)); + }, obj); + +``` + +```json +{} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js + + foo.findIndex(function () { + console.log(this); + z(x => console.log(x, this)); + }, obj); + +``` + +```json +{} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js + + foo.forEach(function () { + console.log(this); + z(x => console.log(x, this)); + }, obj); + +``` + +```json +{} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js + + foo.map(function () { + console.log(this); + z(x => console.log(x, this)); + }, obj); + +``` + +```json +{} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js + + foo.some(function () { + console.log(this); + z(x => console.log(x, this)); + }, obj); + +``` + +```json +{} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js + + /** @this Obj */ function foo() { + console.log(this); + z(x => console.log(x, this)); + } + +``` + +```json +{} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js + + foo( + /* @this Obj */ function () { + console.log(this); + z(x => console.log(x, this)); + }, + ); + +``` + +```json +{} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js + + /** + * @returns {void} + * @this Obj + */ + function foo() { + console.log(this); + z(x => console.log(x, this)); + } + +``` + +```json +{} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js + + Ctor = function () { + console.log(this); + z(x => console.log(x, this)); + }; + +``` + +```json +{} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js + + function foo( + Ctor = function () { + console.log(this); + z(x => console.log(x, this)); + }, + ) {} + +``` + +```json +{} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js + + [ + obj.method = function () { + console.log(this); + z(x => console.log(x, this)); + }, + ] = a; + +``` + +```json +{} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js + + class A { + a = 5; + b = this.a; + accessor c = this.a; + } + +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2022 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js + + class A { + b = 0; + c = this.b; + } + +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2022 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js + + class A { + b = new Array(this, 1, 2, 3); + } + +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2022 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js + + class A { + b = () => { + console.log(this); + }; + } + +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2022 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > valid + +```js + + class A { + static foo() { + console.log(this); + z(x => console.log(x, this)); + } + } + +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2022 + } +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js + + interface SomeType { + prop: string; + } + function foo() { + this.prop; + } + +``` + +```json +{ + "errors": [ + { + "messageId": "unexpectedThis" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-invalid-this > invalid + +```js + + console.log(this); + z(x => console.log(x, this)); + +``` + +```json +{ + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js + + console.log(this); + z(x => console.log(x, this)); + +``` + +```json +{ + "languageOptions": { + "parserOptions": { + "ecmaFeatures": { + "globalReturn": true + } + } + }, + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js + + (function () { + console.log(this); + z(x => console.log(x, this)); + })(); + +``` + +```json +{ + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js + + function foo() { + console.log(this); + z(x => console.log(x, this)); + } + +``` + +```json +{ + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js + + function foo() { + console.log(this); + z(x => console.log(x, this)); + } + +``` + +```json +{ + "options": [ + { + "capIsConstructor": false + } + ], + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js + + function Foo() { + console.log(this); + z(x => console.log(x, this)); + } + +``` + +```json +{ + "options": [ + { + "capIsConstructor": false + } + ], + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js + + function foo() { + 'use strict'; + console.log(this); + z(x => console.log(x, this)); + } + +``` + +```json +{ + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js + + function Foo() { + 'use strict'; + console.log(this); + z(x => console.log(x, this)); + } + +``` + +```json +{ + "options": [ + { + "capIsConstructor": false + } + ], + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js + + return function () { + console.log(this); + z(x => console.log(x, this)); + }; + +``` + +```json +{ + "languageOptions": { + "parserOptions": { + "ecmaFeatures": { + "globalReturn": true + } + } + }, + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js + + var foo = function () { + console.log(this); + z(x => console.log(x, this)); + }.bar(obj); + +``` + +```json +{ + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js + + var obj = { + foo: function () { + function foo() { + console.log(this); + z(x => console.log(x, this)); + } + foo(); + }, + }; + +``` + +```json +{ + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js + + var obj = { + foo() { + function foo() { + console.log(this); + z(x => console.log(x, this)); + } + foo(); + }, + }; + +``` + +```json +{ + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js + + var obj = { + foo: function () { + return function () { + console.log(this); + z(x => console.log(x, this)); + }; + }, + }; + +``` + +```json +{ + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js + + var obj = { + foo: function () { + 'use strict'; + return function () { + console.log(this); + z(x => console.log(x, this)); + }; + }, + }; + +``` + +```json +{ + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js + + obj.foo = function () { + return function () { + console.log(this); + z(x => console.log(x, this)); + }; + }; + +``` + +```json +{ + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js + + obj.foo = function () { + 'use strict'; + return function () { + console.log(this); + z(x => console.log(x, this)); + }; + }; + +``` + +```json +{ + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js + + class A { + foo() { + return function () { + console.log(this); + z(x => console.log(x, this)); + }; + } + } + +``` + +```json +{ + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js + + class A { + b = new Array(1, 2, function () { + console.log(this); + z(x => console.log(x, this)); + }); + } + +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2022 + }, + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js + + class A { + b = () => { + function c() { + console.log(this); + z(x => console.log(x, this)); + } + }; + } + +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2022 + }, + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js + + obj.foo = (function () { + return () => { + console.log(this); + z(x => console.log(x, this)); + }; + })(); + +``` + +```json +{ + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js + + obj.foo = (() => () => { + console.log(this); + z(x => console.log(x, this)); + })(); + +``` + +```json +{ + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js + + var foo = function () { + console.log(this); + z(x => console.log(x, this)); + }.bind(null); + +``` + +```json +{ + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js + + (function () { + console.log(this); + z(x => console.log(x, this)); + }).call(undefined); + +``` + +```json +{ + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js + + (function () { + console.log(this); + z(x => console.log(x, this)); + }).apply(void 0); + +``` + +```json +{ + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js + + Array.from([], function () { + console.log(this); + z(x => console.log(x, this)); + }); + +``` + +```json +{ + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js + + foo.every(function () { + console.log(this); + z(x => console.log(x, this)); + }); + +``` + +```json +{ + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js + + foo.filter(function () { + console.log(this); + z(x => console.log(x, this)); + }); + +``` + +```json +{ + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js + + foo.find(function () { + console.log(this); + z(x => console.log(x, this)); + }); + +``` + +```json +{ + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js + + foo.findIndex(function () { + console.log(this); + z(x => console.log(x, this)); + }); + +``` + +```json +{ + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js + + foo.forEach(function () { + console.log(this); + z(x => console.log(x, this)); + }); + +``` + +```json +{ + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js + + foo.map(function () { + console.log(this); + z(x => console.log(x, this)); + }); + +``` + +```json +{ + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js + + foo.some(function () { + console.log(this); + z(x => console.log(x, this)); + }); + +``` + +```json +{ + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js + + foo.forEach(function () { + console.log(this); + z(x => console.log(x, this)); + }, null); + +``` + +```json +{ + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js + + /** @returns {void} */ function foo() { + console.log(this); + z(x => console.log(x, this)); + } + +``` + +```json +{ + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js + + /** @this Obj */ foo(function () { + console.log(this); + z(x => console.log(x, this)); + }); + +``` + +```json +{ + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js + + var Ctor = function () { + console.log(this); + z(x => console.log(x, this)); + }; + +``` + +```json +{ + "options": [ + { + "capIsConstructor": false + } + ], + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js + + var func = function () { + console.log(this); + z(x => console.log(x, this)); + }; + +``` + +```json +{ + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js + + var func = function () { + console.log(this); + z(x => console.log(x, this)); + }; + +``` + +```json +{ + "options": [ + { + "capIsConstructor": false + } + ], + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js + + Ctor = function () { + console.log(this); + z(x => console.log(x, this)); + }; + +``` + +```json +{ + "options": [ + { + "capIsConstructor": false + } + ], + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js + + func = function () { + console.log(this); + z(x => console.log(x, this)); + }; + +``` + +```json +{ + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js + + func = function () { + console.log(this); + z(x => console.log(x, this)); + }; + +``` + +```json +{ + "options": [ + { + "capIsConstructor": false + } + ], + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js + + function foo( + func = function () { + console.log(this); + z(x => console.log(x, this)); + }, + ) {} + +``` + +```json +{ + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js + + [ + func = function () { + console.log(this); + z(x => console.log(x, this)); + }, + ] = a; + +``` + +```json +{ + "errors": [ + { + "messageId": "unexpectedThis" + }, + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js + +\u0009\u0009\u0009function foo() { + \u0009\u0009\u0009\u0009class C { + \u0009\u0009\u0009\u0009accessor [this.a] = foo; + \u0009\u0009\u0009\u0009} +\u0009\u0009\u0009} + +``` + +```json +{ + "code": "\n\t\t\tfunction foo() {\n \t\t\t\tclass C {\n \t\t\t\taccessor [this.a] = foo;\n \t\t\t\t}\n\t\t\t}\n ", + "errors": [ + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js + +\u0009\u0009\u0009function foo() { + \u0009\u0009\u0009\u0009class C { + \u0009\u0009\u0009\u0009accessor [this.a] = this.b; + \u0009\u0009\u0009\u0009} +\u0009\u0009\u0009} + +``` + +```json +{ + "code": "\n\t\t\tfunction foo() {\n \t\t\t\tclass C {\n \t\t\t\taccessor [this.a] = this.b;\n \t\t\t\t}\n\t\t\t}\n ", + "errors": [ + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +#### no-invalid-this > invalid + +```js + +\u0009\u0009\u0009function foo() { + \u0009\u0009\u0009\u0009class C { + \u0009\u0009\u0009\u0009accessor a = this.b; + \u0009\u0009\u0009\u0009accessor [this.c] = foo; + \u0009\u0009\u0009\u0009} +\u0009\u0009\u0009} + +``` + +```json +{ + "code": "\n\t\t\tfunction foo() {\n \t\t\t\tclass C {\n \t\t\t\taccessor a = this.b;\n \t\t\t\taccessor [this.c] = foo;\n \t\t\t\t}\n\t\t\t}\n ", + "errors": [ + { + "messageId": "unexpectedThis" + } + ] +} +``` + +TypeError: Cannot read properties of undefined (reading 'init') + at stack.getCurrent (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:85:17) + at ThisExpression (apps/oxlint/conformance/submodules/eslint/lib/rules/no-invalid-this.js:167:27) + at apps/oxlint/dist/lint.js + at walkThisExpression (apps/oxlint/dist/lint.js) + + +### `no-irregular-whitespace` + +Pass: 278 / 280 (99.3%) +Fail: 2 / 280 (0.7%) + +#### no-irregular-whitespace > valid + +```js +console.log('hello BOM'); +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-irregular-whitespace', + message: 'Irregular whitespace not allowed.', + messageId: 'noIrregularWhitespace', + severity: 1, + nodeType: null, + line: 1, + column: 0, + endLine: 1, + endColumn: 1, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-irregular-whitespace > invalid + +```js +foo\u000b
\u000b +``` + +```json +{ + "code": "foo\u000b
\u000b", + "errors": [ + { + "messageId": "noIrregularWhitespace", + "line": 1, + "column": 4, + "endLine": 1, + "endColumn": 5 + }, + { + "messageId": "noIrregularWhitespace", + "line": 1, + "column": 5, + "endLine": 2, + "endColumn": 1 + }, + { + "messageId": "noIrregularWhitespace", + "line": 2, + "column": 1, + "endLine": 2, + "endColumn": 2 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Actual error location does not match expected error location. ++ actual - expected + + { ++ column: 1, ++ endColumn: 2, +- column: 5, +- endColumn: 1, + endLine: 2, ++ line: 2 +- line: 1 + } + + at assertInvalidTestCaseLocationIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +### `no-labels` + +Pass: 12 / 29 (41.4%) +Fail: 17 / 29 (58.6%) + +#### no-labels > invalid + +```js +label: while (true) { break label; } +``` + +```json +{ + "errors": [ + { + "messageId": "unexpectedLabel" + }, + { + "messageId": "unexpectedLabelInBreak" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: messageId 'unexpectedLabelInBreak' does not match expected messageId 'unexpectedLabel' ++ actual - expected + ++ 'unexpectedLabelInBreak' +- 'unexpectedLabel' + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-labels > invalid + +```js +label: while (true) { continue label; } +``` + +```json +{ + "errors": [ + { + "messageId": "unexpectedLabel" + }, + { + "messageId": "unexpectedLabelInContinue" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: messageId 'unexpectedLabelInContinue' does not match expected messageId 'unexpectedLabel' ++ actual - expected + ++ 'unexpectedLabelInContinue' +- 'unexpectedLabel' + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-labels > invalid + +```js +A: break A; +``` + +```json +{ + "errors": [ + { + "messageId": "unexpectedLabel" + }, + { + "messageId": "unexpectedLabelInBreak" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: messageId 'unexpectedLabelInBreak' does not match expected messageId 'unexpectedLabel' ++ actual - expected + ++ 'unexpectedLabelInBreak' +- 'unexpectedLabel' + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-labels > invalid + +```js +A: { if (foo()) { break A; } bar(); }; +``` + +```json +{ + "errors": [ + { + "messageId": "unexpectedLabel" + }, + { + "messageId": "unexpectedLabelInBreak" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: messageId 'unexpectedLabelInBreak' does not match expected messageId 'unexpectedLabel' ++ actual - expected + ++ 'unexpectedLabelInBreak' +- 'unexpectedLabel' + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-labels > invalid + +```js +A: if (a) { if (foo()) { break A; } bar(); }; +``` + +```json +{ + "errors": [ + { + "messageId": "unexpectedLabel" + }, + { + "messageId": "unexpectedLabelInBreak" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: messageId 'unexpectedLabelInBreak' does not match expected messageId 'unexpectedLabel' ++ actual - expected + ++ 'unexpectedLabelInBreak' +- 'unexpectedLabel' + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-labels > invalid + +```js +A: switch (a) { case 0: break A; default: break; }; +``` + +```json +{ + "errors": [ + { + "messageId": "unexpectedLabel" + }, + { + "messageId": "unexpectedLabelInBreak" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: messageId 'unexpectedLabelInBreak' does not match expected messageId 'unexpectedLabel' ++ actual - expected + ++ 'unexpectedLabelInBreak' +- 'unexpectedLabel' + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-labels > invalid + +```js +A: switch (a) { case 0: B: { break A; } default: break; }; +``` + +```json +{ + "errors": [ + { + "messageId": "unexpectedLabel" + }, + { + "messageId": "unexpectedLabel" + }, + { + "messageId": "unexpectedLabelInBreak" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: messageId 'unexpectedLabelInBreak' does not match expected messageId 'unexpectedLabel' ++ actual - expected + ++ 'unexpectedLabelInBreak' +- 'unexpectedLabel' + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-labels > invalid + +```js +A: break A; +``` + +```json +{ + "options": [ + { + "allowLoop": true + } + ], + "errors": [ + { + "messageId": "unexpectedLabel" + }, + { + "messageId": "unexpectedLabelInBreak" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: messageId 'unexpectedLabelInBreak' does not match expected messageId 'unexpectedLabel' ++ actual - expected + ++ 'unexpectedLabelInBreak' +- 'unexpectedLabel' + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-labels > invalid + +```js +A: { if (foo()) { break A; } bar(); }; +``` + +```json +{ + "options": [ + { + "allowLoop": true + } + ], + "errors": [ + { + "messageId": "unexpectedLabel" + }, + { + "messageId": "unexpectedLabelInBreak" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: messageId 'unexpectedLabelInBreak' does not match expected messageId 'unexpectedLabel' ++ actual - expected + ++ 'unexpectedLabelInBreak' +- 'unexpectedLabel' + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-labels > invalid + +```js +A: if (a) { if (foo()) { break A; } bar(); }; +``` + +```json +{ + "options": [ + { + "allowLoop": true + } + ], + "errors": [ + { + "messageId": "unexpectedLabel" + }, + { + "messageId": "unexpectedLabelInBreak" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: messageId 'unexpectedLabelInBreak' does not match expected messageId 'unexpectedLabel' ++ actual - expected + ++ 'unexpectedLabelInBreak' +- 'unexpectedLabel' + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-labels > invalid + +```js +A: switch (a) { case 0: break A; default: break; }; +``` + +```json +{ + "options": [ + { + "allowLoop": true + } + ], + "errors": [ + { + "messageId": "unexpectedLabel" + }, + { + "messageId": "unexpectedLabelInBreak" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: messageId 'unexpectedLabelInBreak' does not match expected messageId 'unexpectedLabel' ++ actual - expected + ++ 'unexpectedLabelInBreak' +- 'unexpectedLabel' + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-labels > invalid + +```js +A: break A; +``` + +```json +{ + "options": [ + { + "allowSwitch": true + } + ], + "errors": [ + { + "messageId": "unexpectedLabel" + }, + { + "messageId": "unexpectedLabelInBreak" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: messageId 'unexpectedLabelInBreak' does not match expected messageId 'unexpectedLabel' ++ actual - expected + ++ 'unexpectedLabelInBreak' +- 'unexpectedLabel' + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-labels > invalid + +```js +A: { if (foo()) { break A; } bar(); }; +``` + +```json +{ + "options": [ + { + "allowSwitch": true + } + ], + "errors": [ + { + "messageId": "unexpectedLabel" + }, + { + "messageId": "unexpectedLabelInBreak" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: messageId 'unexpectedLabelInBreak' does not match expected messageId 'unexpectedLabel' ++ actual - expected + ++ 'unexpectedLabelInBreak' +- 'unexpectedLabel' + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-labels > invalid + +```js +A: if (a) { if (foo()) { break A; } bar(); }; +``` + +```json +{ + "options": [ + { + "allowSwitch": true + } + ], + "errors": [ + { + "messageId": "unexpectedLabel" + }, + { + "messageId": "unexpectedLabelInBreak" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: messageId 'unexpectedLabelInBreak' does not match expected messageId 'unexpectedLabel' ++ actual - expected + ++ 'unexpectedLabelInBreak' +- 'unexpectedLabel' + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-labels > invalid + +```js +A: while (a) { break A; } +``` + +```json +{ + "options": [ + { + "allowSwitch": true + } + ], + "errors": [ + { + "messageId": "unexpectedLabel" + }, + { + "messageId": "unexpectedLabelInBreak" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: messageId 'unexpectedLabelInBreak' does not match expected messageId 'unexpectedLabel' ++ actual - expected + ++ 'unexpectedLabelInBreak' +- 'unexpectedLabel' + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-labels > invalid + +```js +A: do { if (b) { break A; } } while (a); +``` + +```json +{ + "options": [ + { + "allowSwitch": true + } + ], + "errors": [ + { + "messageId": "unexpectedLabel" + }, + { + "messageId": "unexpectedLabelInBreak" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: messageId 'unexpectedLabelInBreak' does not match expected messageId 'unexpectedLabel' ++ actual - expected + ++ 'unexpectedLabelInBreak' +- 'unexpectedLabel' + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-labels > invalid + +```js +A: for (var a in obj) { for (;;) { switch (a) { case 0: break A; } } } +``` + +```json +{ + "options": [ + { + "allowSwitch": true + } + ], + "errors": [ + { + "messageId": "unexpectedLabel" + }, + { + "messageId": "unexpectedLabelInBreak" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: messageId 'unexpectedLabelInBreak' does not match expected messageId 'unexpectedLabel' ++ actual - expected + ++ 'unexpectedLabelInBreak' +- 'unexpectedLabel' + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +### `no-lone-blocks` + +Pass: 47 / 50 (94.0%) +Fail: 3 / 50 (6.0%) + +#### no-lone-blocks > valid + +```js +{ function bar() {} } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "parserOptions": { + "ecmaFeatures": { + "impliedStrict": true + } + } + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-lone-blocks', + message: 'Block is redundant.', + messageId: 'redundantBlock', + severity: 1, + nodeType: 'BlockStatement', + line: 1, + column: 0, + endLine: 1, + endColumn: 21, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-lone-blocks > invalid + +```js +{ +{ } } +``` + +```json +{ + "errors": [ + { + "messageId": "redundantBlock", + "line": 1 + }, + { + "messageId": "redundantNestedBlock", + "line": 2 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: messageId 'redundantNestedBlock' does not match expected messageId 'redundantBlock' ++ actual - expected + ++ 'redundantNestedBlock' +- 'redundantBlock' + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-lone-blocks > invalid + +```js +{ +{var x = 1;} + var y = 2; } + {var z = 1;} +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "redundantBlock", + "line": 1 + }, + { + "messageId": "redundantNestedBlock", + "line": 2 + }, + { + "messageId": "redundantBlock", + "line": 4 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: messageId 'redundantNestedBlock' does not match expected messageId 'redundantBlock' ++ actual - expected + ++ 'redundantNestedBlock' +- 'redundantBlock' + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +### `no-loop-func` + +Pass: 86 / 96 (89.6%) +Fail: 10 / 96 (10.4%) + +#### no-loop-func > valid + +```js + + let someArray: MyType[] = []; + for (let i = 0; i < 10; i += 1) { +\u0009someArray = someArray.filter((item: MyType) => !!item); + } +\u0009 +``` + +```json +{ + "code": "\n let someArray: MyType[] = [];\n for (let i = 0; i < 10; i += 1) {\n\tsomeArray = someArray.filter((item: MyType) => !!item);\n }\n\t " +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-loop-func > valid + +```js + + let someArray: MyType[] = []; + for (let i = 0; i < 10; i += 1) { +\u0009someArray = someArray.filter((item: MyType) => !!item); + } +\u0009\u0009 +``` + +```json +{ + "code": "\n let someArray: MyType[] = [];\n for (let i = 0; i < 10; i += 1) {\n\tsomeArray = someArray.filter((item: MyType) => !!item);\n }\n\t\t", + "languageOptions": { + "globals": { + "MyType": "readonly" + } + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-loop-func > valid + +```js + + let someArray: MyType[] = []; + for (let i = 0; i < 10; i += 1) { +\u0009someArray = someArray.filter((item: MyType) => !!item); + } +\u0009\u0009 +``` + +```json +{ + "code": "\n let someArray: MyType[] = [];\n for (let i = 0; i < 10; i += 1) {\n\tsomeArray = someArray.filter((item: MyType) => !!item);\n }\n\t\t", + "languageOptions": { + "globals": { + "MyType": "writable" + } + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-loop-func > valid + +```js + + type MyType = 1; + let someArray: MyType[] = []; + for (let i = 0; i < 10; i += 1) { +\u0009someArray = someArray.filter((item: MyType) => !!item); + } +\u0009 +``` + +```json +{ + "code": "\n type MyType = 1;\n let someArray: MyType[] = [];\n for (let i = 0; i < 10; i += 1) {\n\tsomeArray = someArray.filter((item: MyType) => !!item);\n }\n\t " +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-loop-func > valid + +```js + + // UnconfiguredGlobalType is not defined anywhere or configured in globals + for (var i = 0; i < 10; i++) { + const process = (item: UnconfiguredGlobalType) => { + // This is valid because the type reference is considered safe + // even though UnconfiguredGlobalType is not configured + return item.id; + }; + } + +``` + +```json +{} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-loop-func > valid + +```js + + for (var i = 0; i < 10; i++) { + // ConfiguredType is in globals, UnconfiguredType is not + // Both should be considered safe as they are type references + const process = (configItem: ConfiguredType, unconfigItem: UnconfiguredType) => { + return { + config: configItem.value, + unconfig: unconfigItem.value + }; + }; + } + +``` + +```json +{ + "languageOptions": { + "globals": { + "ConfiguredType": "readonly" + } + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-loop-func > invalid + +```js + + for (var i = 0; i < 10; i++) { + const handler = (event: Event) => { + console.log(i); + }; + } +\u0009\u0009\u0009 +``` + +```json +{ + "code": "\n for (var i = 0; i < 10; i++) {\n const handler = (event: Event) => {\n console.log(i);\n };\n }\n\t\t\t", + "errors": [ + { + "messageId": "unsafeRefs", + "data": { + "varNames": "'i'" + } + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-loop-func > invalid + +```js + + interface Item { + id: number; + name: string; + } + + const items: Item[] = []; + for (var i = 0; i < 10; i++) { + items.push({ + id: i, + name: "Item " + i + }); + + const process = function(callback: (item: Item) => void): void { + callback({ id: i, name: "Item " + i }); + }; + } +\u0009\u0009\u0009 +``` + +```json +{ + "code": "\n interface Item {\n id: number;\n name: string;\n }\n\n const items: Item[] = [];\n for (var i = 0; i < 10; i++) {\n items.push({\n id: i,\n name: \"Item \" + i\n });\n\n const process = function(callback: (item: Item) => void): void {\n callback({ id: i, name: \"Item \" + i });\n };\n }\n\t\t\t", + "errors": [ + { + "messageId": "unsafeRefs", + "data": { + "varNames": "'i'" + } + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-loop-func > invalid + +```js + + type Processor = (item: T) => void; + + for (var i = 0; i < 10; i++) { + const processor: Processor = (item) => { + return item + i; + }; + } +\u0009\u0009\u0009 +``` + +```json +{ + "code": "\n type Processor = (item: T) => void;\n\n for (var i = 0; i < 10; i++) {\n const processor: Processor = (item) => {\n return item + i;\n };\n }\n\t\t\t", + "errors": [ + { + "messageId": "unsafeRefs", + "data": { + "varNames": "'i'" + } + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-loop-func > invalid + +```js + + for (var i = 0; i < 10; i++) { + // UnconfiguredGlobalType is not defined anywhere + // But the function still references i which makes it unsafe + const process = (item: UnconfiguredGlobalType) => { + console.log(i, item.value); + }; + } + +``` + +```json +{ + "errors": [ + { + "messageId": "unsafeRefs", + "data": { + "varNames": "'i'" + } + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +### `no-magic-numbers` + +Pass: 126 / 205 (61.5%) +Fail: 79 / 205 (38.5%) + +#### no-magic-numbers > valid + +```js +type Foo = 'bar'; +``` + +```json +{} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-magic-numbers > valid + +```js +type Foo = true; +``` + +```json +{} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-magic-numbers > valid + +```js +type Foo = 1; +``` + +```json +{ + "options": [ + { + "ignoreNumericLiteralTypes": true + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-magic-numbers > valid + +```js +type Foo = -1; +``` + +```json +{ + "options": [ + { + "ignoreNumericLiteralTypes": true + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-magic-numbers > valid + +```js +type Nested = ('' | ('' | (1))); +``` + +```json +{ + "options": [ + { + "ignoreNumericLiteralTypes": true + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-magic-numbers > valid + +```js +type Foo = 1 | 2 | 3; +``` + +```json +{ + "options": [ + { + "ignoreNumericLiteralTypes": true + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-magic-numbers > valid + +```js +type Foo = 1 | -1; +``` + +```json +{ + "options": [ + { + "ignoreNumericLiteralTypes": true + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-magic-numbers > valid + +```js + +\u0009\u0009 enum foo { +\u0009\u0009\u0009SECOND = 1000, +\u0009\u0009\u0009NUM = '0123456789', +\u0009\u0009\u0009NEG = -1, +\u0009\u0009\u0009POS = +1, +\u0009\u0009 } +\u0009\u0009 +``` + +```json +{ + "code": "\n\t\t enum foo {\n\t\t\tSECOND = 1000,\n\t\t\tNUM = '0123456789',\n\t\t\tNEG = -1,\n\t\t\tPOS = +1,\n\t\t }\n\t\t", + "options": [ + { + "ignoreEnums": true + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-magic-numbers > valid + +```js +type Foo = Bar[0]; +``` + +```json +{ + "options": [ + { + "ignoreTypeIndexes": true + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-magic-numbers > valid + +```js +type Foo = Bar[-1]; +``` + +```json +{ + "options": [ + { + "ignoreTypeIndexes": true + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-magic-numbers > valid + +```js +type Foo = Bar[0xab]; +``` + +```json +{ + "options": [ + { + "ignoreTypeIndexes": true + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-magic-numbers > valid + +```js +type Foo = Bar[5.6e1]; +``` + +```json +{ + "options": [ + { + "ignoreTypeIndexes": true + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-magic-numbers > valid + +```js +type Foo = Bar[10n]; +``` + +```json +{ + "options": [ + { + "ignoreTypeIndexes": true + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-magic-numbers > valid + +```js +type Foo = Bar[1 | -2]; +``` + +```json +{ + "options": [ + { + "ignoreTypeIndexes": true + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-magic-numbers > valid + +```js +type Foo = Bar[1 & -2]; +``` + +```json +{ + "options": [ + { + "ignoreTypeIndexes": true + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-magic-numbers > valid + +```js +type Foo = Bar[1 & number]; +``` + +```json +{ + "options": [ + { + "ignoreTypeIndexes": true + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-magic-numbers > valid + +```js +type Foo = Bar[((1 & -2) | 3) | 4]; +``` + +```json +{ + "options": [ + { + "ignoreTypeIndexes": true + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-magic-numbers > valid + +```js +type Foo = Parameters[2]; +``` + +```json +{ + "options": [ + { + "ignoreTypeIndexes": true + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-magic-numbers > valid + +```js +type Foo = Bar['baz']; +``` + +```json +{ + "options": [ + { + "ignoreTypeIndexes": true + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-magic-numbers > valid + +```js +type Foo = Bar['baz']; +``` + +```json +{ + "options": [ + { + "ignoreTypeIndexes": false + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-magic-numbers > valid + +```js + + type Others = [['a'], ['b']]; + + type Foo = { +\u0009[K in keyof Others[0]]: Others[K]; + }; +\u0009\u0009 +``` + +```json +{ + "code": "\n type Others = [['a'], ['b']];\n \n type Foo = {\n\t[K in keyof Others[0]]: Others[K];\n };\n\t\t", + "options": [ + { + "ignoreTypeIndexes": true + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-magic-numbers > valid + +```js +type Foo = 1; +``` + +```json +{ + "options": [ + { + "ignore": [ + 1 + ] + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-magic-numbers > valid + +```js +type Foo = -2; +``` + +```json +{ + "options": [ + { + "ignore": [ + -2 + ] + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-magic-numbers > valid + +```js +type Foo = 3n; +``` + +```json +{ + "options": [ + { + "ignore": [ + "3n" + ] + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-magic-numbers > valid + +```js +type Foo = -4n; +``` + +```json +{ + "options": [ + { + "ignore": [ + "-4n" + ] + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-magic-numbers > valid + +```js +type Foo = 5.6; +``` + +```json +{ + "options": [ + { + "ignore": [ + 5.6 + ] + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-magic-numbers > valid + +```js +type Foo = -7.8; +``` + +```json +{ + "options": [ + { + "ignore": [ + -7.8 + ] + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-magic-numbers > valid + +```js +type Foo = 0x0a; +``` + +```json +{ + "options": [ + { + "ignore": [ + 10 + ] + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-magic-numbers > valid + +```js +type Foo = -0xbc; +``` + +```json +{ + "options": [ + { + "ignore": [ + -188 + ] + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-magic-numbers > valid + +```js +type Foo = 1e2; +``` + +```json +{ + "options": [ + { + "ignore": [ + 100 + ] + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-magic-numbers > valid + +```js +type Foo = -3e4; +``` + +```json +{ + "options": [ + { + "ignore": [ + -30000 + ] + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-magic-numbers > valid + +```js +type Foo = 5e-6; +``` + +```json +{ + "options": [ + { + "ignore": [ + 0.000005 + ] + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-magic-numbers > valid + +```js +type Foo = -7e-8; +``` + +```json +{ + "options": [ + { + "ignore": [ + -7e-8 + ] + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-magic-numbers > valid + +```js +type Foo = 1.1e2; +``` + +```json +{ + "options": [ + { + "ignore": [ + 110 + ] + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-magic-numbers > valid + +```js +type Foo = -3.1e4; +``` + +```json +{ + "options": [ + { + "ignore": [ + -31000 + ] + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-magic-numbers > valid + +```js +type Foo = 5.1e-6; +``` + +```json +{ + "options": [ + { + "ignore": [ + 0.0000051 + ] + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-magic-numbers > valid + +```js +type Foo = -7.1e-8; +``` + +```json +{ + "options": [ + { + "ignore": [ + -7.1e-8 + ] + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-magic-numbers > valid + +```js + + interface Foo { +\u0009bar: 1; + } +\u0009\u0009 +``` + +```json +{ + "code": "\n interface Foo {\n\tbar: 1;\n }\n\t\t", + "options": [ + { + "ignore": [ + 1 + ], + "ignoreNumericLiteralTypes": true + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-magic-numbers > valid + +```js + + enum foo { +\u0009SECOND = 1000, +\u0009NUM = '0123456789', +\u0009NEG = -1, +\u0009POS = +2, + } +\u0009\u0009 +``` + +```json +{ + "code": "\n enum foo {\n\tSECOND = 1000,\n\tNUM = '0123456789',\n\tNEG = -1,\n\tPOS = +2,\n }\n\t\t", + "options": [ + { + "ignore": [ + 1000, + -1, + 2 + ], + "ignoreEnums": false + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-magic-numbers > valid + +```js +type Foo = Bar[0]; +``` + +```json +{ + "options": [ + { + "ignore": [ + 0 + ], + "ignoreTypeIndexes": false + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-magic-numbers > valid + +```js + + type Other = { +\u0009[0]: 3; + }; + + type Foo = { +\u0009[K in keyof Other]: `${K & number}`; + }; +\u0009\u0009 +``` + +```json +{ + "code": "\n type Other = {\n\t[0]: 3;\n };\n \n type Foo = {\n\t[K in keyof Other]: `${K & number}`;\n };\n\t\t", + "options": [ + { + "ignore": [ + 0, + 3 + ], + "ignoreTypeIndexes": true + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-magic-numbers > invalid + +```js +type Foo = 1; +``` + +```json +{ + "options": [ + { + "ignoreNumericLiteralTypes": false + } + ], + "errors": [ + { + "column": 12, + "data": { + "raw": "1" + }, + "line": 1, + "messageId": "noMagic" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-magic-numbers > invalid + +```js +type Foo = -1; +``` + +```json +{ + "options": [ + { + "ignoreNumericLiteralTypes": false + } + ], + "errors": [ + { + "column": 12, + "data": { + "raw": "-1" + }, + "line": 1, + "messageId": "noMagic" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-magic-numbers > invalid + +```js +type Foo = 1 | 2 | 3; +``` + +```json +{ + "options": [ + { + "ignoreNumericLiteralTypes": false + } + ], + "errors": [ + { + "column": 12, + "data": { + "raw": "1" + }, + "line": 1, + "messageId": "noMagic" + }, + { + "column": 16, + "data": { + "raw": "2" + }, + "line": 1, + "messageId": "noMagic" + }, + { + "column": 20, + "data": { + "raw": "3" + }, + "line": 1, + "messageId": "noMagic" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-magic-numbers > invalid + +```js +type Foo = 1 | -1; +``` + +```json +{ + "options": [ + { + "ignoreNumericLiteralTypes": false + } + ], + "errors": [ + { + "column": 12, + "data": { + "raw": "1" + }, + "line": 1, + "messageId": "noMagic" + }, + { + "column": 16, + "data": { + "raw": "-1" + }, + "line": 1, + "messageId": "noMagic" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-magic-numbers > invalid + +```js + + interface Foo { +\u0009bar: 1; + } +\u0009\u0009 +``` + +```json +{ + "code": "\n interface Foo {\n\tbar: 1;\n }\n\t\t", + "options": [ + { + "ignoreNumericLiteralTypes": true + } + ], + "errors": [ + { + "column": 7, + "data": { + "raw": "1" + }, + "line": 3, + "messageId": "noMagic" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-magic-numbers > invalid + +```js + + enum foo { +\u0009SECOND = 1000, +\u0009NUM = '0123456789', +\u0009NEG = -1, +\u0009POS = +1, + } +\u0009\u0009 +``` + +```json +{ + "code": "\n enum foo {\n\tSECOND = 1000,\n\tNUM = '0123456789',\n\tNEG = -1,\n\tPOS = +1,\n }\n\t\t", + "options": [ + { + "ignoreEnums": false + } + ], + "errors": [ + { + "column": 11, + "data": { + "raw": "1000" + }, + "line": 3, + "messageId": "noMagic" + }, + { + "column": 8, + "data": { + "raw": "-1" + }, + "line": 5, + "messageId": "noMagic" + }, + { + "column": 8, + "data": { + "raw": "+1" + }, + "line": 6, + "messageId": "noMagic" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-magic-numbers > invalid + +```js +type Foo = Bar[0]; +``` + +```json +{ + "options": [ + { + "ignoreTypeIndexes": false + } + ], + "errors": [ + { + "column": 16, + "data": { + "raw": "0" + }, + "line": 1, + "messageId": "noMagic" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-magic-numbers > invalid + +```js +type Foo = Bar[-1]; +``` + +```json +{ + "options": [ + { + "ignoreTypeIndexes": false + } + ], + "errors": [ + { + "column": 16, + "data": { + "raw": "-1" + }, + "line": 1, + "messageId": "noMagic" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-magic-numbers > invalid + +```js +type Foo = Bar[0xab]; +``` + +```json +{ + "options": [ + { + "ignoreTypeIndexes": false + } + ], + "errors": [ + { + "column": 16, + "data": { + "raw": "0xab" + }, + "line": 1, + "messageId": "noMagic" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-magic-numbers > invalid + +```js +type Foo = Bar[5.6e1]; +``` + +```json +{ + "options": [ + { + "ignoreTypeIndexes": false + } + ], + "errors": [ + { + "column": 16, + "data": { + "raw": "5.6e1" + }, + "line": 1, + "messageId": "noMagic" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-magic-numbers > invalid + +```js +type Foo = Bar[10n]; +``` + +```json +{ + "options": [ + { + "ignoreTypeIndexes": false + } + ], + "errors": [ + { + "column": 16, + "data": { + "raw": "10n" + }, + "line": 1, + "messageId": "noMagic" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-magic-numbers > invalid + +```js +type Foo = Bar[1 | -2]; +``` + +```json +{ + "options": [ + { + "ignoreTypeIndexes": false + } + ], + "errors": [ + { + "column": 16, + "data": { + "raw": "1" + }, + "line": 1, + "messageId": "noMagic" + }, + { + "column": 20, + "data": { + "raw": "-2" + }, + "line": 1, + "messageId": "noMagic" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-magic-numbers > invalid + +```js +type Foo = Bar[1 & -2]; +``` + +```json +{ + "options": [ + { + "ignoreTypeIndexes": false + } + ], + "errors": [ + { + "column": 16, + "data": { + "raw": "1" + }, + "line": 1, + "messageId": "noMagic" + }, + { + "column": 20, + "data": { + "raw": "-2" + }, + "line": 1, + "messageId": "noMagic" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-magic-numbers > invalid + +```js +type Foo = Bar[1 & number]; +``` + +```json +{ + "options": [ + { + "ignoreTypeIndexes": false + } + ], + "errors": [ + { + "column": 16, + "data": { + "raw": "1" + }, + "line": 1, + "messageId": "noMagic" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-magic-numbers > invalid + +```js +type Foo = Bar[((1 & -2) | 3) | 4]; +``` + +```json +{ + "options": [ + { + "ignoreTypeIndexes": false + } + ], + "errors": [ + { + "column": 18, + "data": { + "raw": "1" + }, + "line": 1, + "messageId": "noMagic" + }, + { + "column": 22, + "data": { + "raw": "-2" + }, + "line": 1, + "messageId": "noMagic" + }, + { + "column": 28, + "data": { + "raw": "3" + }, + "line": 1, + "messageId": "noMagic" + }, + { + "column": 33, + "data": { + "raw": "4" + }, + "line": 1, + "messageId": "noMagic" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-magic-numbers > invalid + +```js +type Foo = Parameters[2]; +``` + +```json +{ + "options": [ + { + "ignoreTypeIndexes": false + } + ], + "errors": [ + { + "column": 28, + "data": { + "raw": "2" + }, + "line": 1, + "messageId": "noMagic" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-magic-numbers > invalid + +```js + + type Others = [['a'], ['b']]; + + type Foo = { +\u0009[K in keyof Others[0]]: Others[K]; + }; +\u0009\u0009 +``` + +```json +{ + "code": "\n type Others = [['a'], ['b']];\n \n type Foo = {\n\t[K in keyof Others[0]]: Others[K];\n };\n\t\t", + "options": [ + { + "ignoreTypeIndexes": false + } + ], + "errors": [ + { + "column": 21, + "data": { + "raw": "0" + }, + "line": 5, + "messageId": "noMagic" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-magic-numbers > invalid + +```js + + type Other = { +\u0009[0]: 3; + }; + + type Foo = { +\u0009[K in keyof Other]: `${K & number}`; + }; +\u0009\u0009 +``` + +```json +{ + "code": "\n type Other = {\n\t[0]: 3;\n };\n \n type Foo = {\n\t[K in keyof Other]: `${K & number}`;\n };\n\t\t", + "options": [ + { + "ignoreTypeIndexes": true + } + ], + "errors": [ + { + "column": 3, + "data": { + "raw": "0" + }, + "line": 3, + "messageId": "noMagic" + }, + { + "column": 7, + "data": { + "raw": "3" + }, + "line": 3, + "messageId": "noMagic" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-magic-numbers > invalid + +```js + + type Foo = { +\u0009[K in 0 | 1 | 2]: 0; + }; +\u0009\u0009 +``` + +```json +{ + "code": "\n type Foo = {\n\t[K in 0 | 1 | 2]: 0;\n };\n\t\t", + "options": [ + { + "ignoreTypeIndexes": true + } + ], + "errors": [ + { + "column": 8, + "data": { + "raw": "0" + }, + "line": 3, + "messageId": "noMagic" + }, + { + "column": 12, + "data": { + "raw": "1" + }, + "line": 3, + "messageId": "noMagic" + }, + { + "column": 16, + "data": { + "raw": "2" + }, + "line": 3, + "messageId": "noMagic" + }, + { + "column": 20, + "data": { + "raw": "0" + }, + "line": 3, + "messageId": "noMagic" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-magic-numbers > invalid + +```js +type Foo = 1; +``` + +```json +{ + "options": [ + { + "ignore": [ + -1 + ] + } + ], + "errors": [ + { + "column": 12, + "data": { + "raw": "1" + }, + "line": 1, + "messageId": "noMagic" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-magic-numbers > invalid + +```js +type Foo = -2; +``` + +```json +{ + "options": [ + { + "ignore": [ + 2 + ] + } + ], + "errors": [ + { + "column": 12, + "data": { + "raw": "-2" + }, + "line": 1, + "messageId": "noMagic" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-magic-numbers > invalid + +```js +type Foo = 3n; +``` + +```json +{ + "options": [ + { + "ignore": [ + "-3n" + ] + } + ], + "errors": [ + { + "column": 12, + "data": { + "raw": "3n" + }, + "line": 1, + "messageId": "noMagic" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-magic-numbers > invalid + +```js +type Foo = -4n; +``` + +```json +{ + "options": [ + { + "ignore": [ + "4n" + ] + } + ], + "errors": [ + { + "column": 12, + "data": { + "raw": "-4n" + }, + "line": 1, + "messageId": "noMagic" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-magic-numbers > invalid + +```js +type Foo = 5.6; +``` + +```json +{ + "options": [ + { + "ignore": [ + -5.6 + ] + } + ], + "errors": [ + { + "column": 12, + "data": { + "raw": "5.6" + }, + "line": 1, + "messageId": "noMagic" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-magic-numbers > invalid + +```js +type Foo = -7.8; +``` + +```json +{ + "options": [ + { + "ignore": [ + 7.8 + ] + } + ], + "errors": [ + { + "column": 12, + "data": { + "raw": "-7.8" + }, + "line": 1, + "messageId": "noMagic" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-magic-numbers > invalid + +```js +type Foo = 0x0a; +``` + +```json +{ + "options": [ + { + "ignore": [ + -10 + ] + } + ], + "errors": [ + { + "column": 12, + "data": { + "raw": "0x0a" + }, + "line": 1, + "messageId": "noMagic" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-magic-numbers > invalid + +```js +type Foo = -0xbc; +``` + +```json +{ + "options": [ + { + "ignore": [ + 188 + ] + } + ], + "errors": [ + { + "column": 12, + "data": { + "raw": "-0xbc" + }, + "line": 1, + "messageId": "noMagic" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-magic-numbers > invalid + +```js +type Foo = 1e2; +``` + +```json +{ + "options": [ + { + "ignore": [ + -100 + ] + } + ], + "errors": [ + { + "column": 12, + "data": { + "raw": "1e2" + }, + "line": 1, + "messageId": "noMagic" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-magic-numbers > invalid + +```js +type Foo = -3e4; +``` + +```json +{ + "options": [ + { + "ignore": [ + 30000 + ] + } + ], + "errors": [ + { + "column": 12, + "data": { + "raw": "-3e4" + }, + "line": 1, + "messageId": "noMagic" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-magic-numbers > invalid + +```js +type Foo = 5e-6; +``` + +```json +{ + "options": [ + { + "ignore": [ + -0.000005 + ] + } + ], + "errors": [ + { + "column": 12, + "data": { + "raw": "5e-6" + }, + "line": 1, + "messageId": "noMagic" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-magic-numbers > invalid + +```js +type Foo = -7e-8; +``` + +```json +{ + "options": [ + { + "ignore": [ + 7e-8 + ] + } + ], + "errors": [ + { + "column": 12, + "data": { + "raw": "-7e-8" + }, + "line": 1, + "messageId": "noMagic" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-magic-numbers > invalid + +```js +type Foo = 1.1e2; +``` + +```json +{ + "options": [ + { + "ignore": [ + -110 + ] + } + ], + "errors": [ + { + "column": 12, + "data": { + "raw": "1.1e2" + }, + "line": 1, + "messageId": "noMagic" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-magic-numbers > invalid + +```js +type Foo = -3.1e4; +``` + +```json +{ + "options": [ + { + "ignore": [ + 31000 + ] + } + ], + "errors": [ + { + "column": 12, + "data": { + "raw": "-3.1e4" + }, + "line": 1, + "messageId": "noMagic" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-magic-numbers > invalid + +```js +type Foo = 5.1e-6; +``` + +```json +{ + "options": [ + { + "ignore": [ + -0.0000051 + ] + } + ], + "errors": [ + { + "column": 12, + "data": { + "raw": "5.1e-6" + }, + "line": 1, + "messageId": "noMagic" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-magic-numbers > invalid + +```js +type Foo = -7.1e-8; +``` + +```json +{ + "options": [ + { + "ignore": [ + 7.1e-8 + ] + } + ], + "errors": [ + { + "column": 12, + "data": { + "raw": "-7.1e-8" + }, + "line": 1, + "messageId": "noMagic" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-magic-numbers > invalid + +```js +type Foo = { bar: 42 }; +``` + +```json +{ + "options": [ + { + "ignoreNumericLiteralTypes": true + } + ], + "errors": [ + { + "column": 19, + "data": { + "raw": "42" + }, + "line": 1, + "messageId": "noMagic" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-magic-numbers > invalid + +```js +type Foo = { bar: 2 | 3 }; +``` + +```json +{ + "options": [ + { + "ignoreNumericLiteralTypes": true + } + ], + "errors": [ + { + "column": 19, + "data": { + "raw": "2" + }, + "line": 1, + "messageId": "noMagic" + }, + { + "column": 23, + "data": { + "raw": "3" + }, + "line": 1, + "messageId": "noMagic" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-magic-numbers > invalid + +```js +type Foo = { bar: Bar[((1 & -2) | 3) | 4] }; +``` + +```json +{ + "options": [ + { + "ignoreNumericLiteralTypes": true + } + ], + "errors": [ + { + "column": 25, + "data": { + "raw": "1" + }, + "line": 1, + "messageId": "noMagic" + }, + { + "column": 29, + "data": { + "raw": "-2" + }, + "line": 1, + "messageId": "noMagic" + }, + { + "column": 35, + "data": { + "raw": "3" + }, + "line": 1, + "messageId": "noMagic" + }, + { + "column": 40, + "data": { + "raw": "4" + }, + "line": 1, + "messageId": "noMagic" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +### `no-misleading-character-class` + +Pass: 183 / 190 (96.3%) +Fail: 7 / 190 (3.7%) + +#### no-misleading-character-class > valid + +```js +new RegExp('[👍]') +``` + +```json +{ + "languageOptions": { + "globals": { + "RegExp": "off" + } + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-misleading-character-class', + message: "Unexpected surrogate pair in character class. Use 'u' flag.", + messageId: 'surrogatePairWithoutUFlag', + severity: 1, + nodeType: 'Literal', + line: 1, + column: 13, + endLine: 1, + endColumn: 15, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-misleading-character-class > invalid + +```js +var r = /[👨‍👩‍👦]/ +``` + +```json +{ + "errors": [ + { + "column": 11, + "endColumn": 13, + "messageId": "surrogatePairWithoutUFlag", + "suggestions": [ + { + "messageId": "suggestUnicodeFlag", + "output": "var r = /[👨‍👩‍👦]/u" + } + ] + }, + { + "column": 12, + "endColumn": 15, + "messageId": "zwj", + "suggestions": null + }, + { + "column": 14, + "endColumn": 16, + "messageId": "surrogatePairWithoutUFlag", + "suggestions": [ + { + "messageId": "suggestUnicodeFlag", + "output": "var r = /[👨‍👩‍👦]/u" + } + ] + }, + { + "column": 15, + "endColumn": 18, + "messageId": "zwj", + "suggestions": null + }, + { + "column": 17, + "endColumn": 19, + "messageId": "surrogatePairWithoutUFlag", + "suggestions": [ + { + "messageId": "suggestUnicodeFlag", + "output": "var r = /[👨‍👩‍👦]/u" + } + ] + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: messageId 'surrogatePairWithoutUFlag' does not match expected messageId 'zwj' ++ actual - expected + ++ 'surrogatePairWithoutUFlag' +- 'zwj' + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-misleading-character-class > invalid + +```js +var r = new RegExp("[👨‍👩‍👦]", "") +``` + +```json +{ + "errors": [ + { + "column": 22, + "endColumn": 24, + "messageId": "surrogatePairWithoutUFlag", + "suggestions": [ + { + "messageId": "suggestUnicodeFlag", + "output": "var r = new RegExp(\"[👨‍👩‍👦]\", \"u\")" + } + ] + }, + { + "column": 23, + "endColumn": 26, + "messageId": "zwj", + "suggestions": null + }, + { + "column": 25, + "endColumn": 27, + "messageId": "surrogatePairWithoutUFlag", + "suggestions": [ + { + "messageId": "suggestUnicodeFlag", + "output": "var r = new RegExp(\"[👨‍👩‍👦]\", \"u\")" + } + ] + }, + { + "column": 26, + "endColumn": 29, + "messageId": "zwj", + "suggestions": null + }, + { + "column": 28, + "endColumn": 30, + "messageId": "surrogatePairWithoutUFlag", + "suggestions": [ + { + "messageId": "suggestUnicodeFlag", + "output": "var r = new RegExp(\"[👨‍👩‍👦]\", \"u\")" + } + ] + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: messageId 'surrogatePairWithoutUFlag' does not match expected messageId 'zwj' ++ actual - expected + ++ 'surrogatePairWithoutUFlag' +- 'zwj' + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-misleading-character-class > invalid + +```js +var r = new globalThis.RegExp("[❇️]", "") +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2020 + }, + "errors": [ + { + "column": 33, + "endColumn": 35, + "messageId": "combiningClass", + "suggestions": null + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-misleading-character-class > invalid + +```js +var r = new globalThis.RegExp("[👶🏻]", "u") +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2020 + }, + "errors": [ + { + "column": 33, + "endColumn": 37, + "messageId": "emojiModifier", + "suggestions": null + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-misleading-character-class > invalid + +```js +var r = new globalThis.RegExp("[🇯🇵]", "") +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2020 + }, + "errors": [ + { + "column": 33, + "endColumn": 35, + "messageId": "surrogatePairWithoutUFlag", + "suggestions": [ + { + "messageId": "suggestUnicodeFlag", + "output": "var r = new globalThis.RegExp(\"[🇯🇵]\", \"u\")" + } + ] + }, + { + "column": 35, + "endColumn": 37, + "messageId": "surrogatePairWithoutUFlag", + "suggestions": [ + { + "messageId": "suggestUnicodeFlag", + "output": "var r = new globalThis.RegExp(\"[🇯🇵]\", \"u\")" + } + ] + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 2 errors but had 0: [] + +0 !== 2 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-misleading-character-class > invalid + +```js +var r = new globalThis.RegExp("[\\u{1F468}\\u{200D}\\u{1F469}\\u{200D}\\u{1F466}]", "u") +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2020 + }, + "errors": [ + { + "column": 33, + "endColumn": 81, + "messageId": "zwj", + "suggestions": null + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +### `no-mixed-operators` + +Pass: 37 / 40 (92.5%) +Fail: 3 / 40 (7.5%) + +#### no-mixed-operators > invalid + +```js +a && b > 0 || c +``` + +```json +{ + "options": [ + { + "groups": [ + [ + "&&", + "||", + ">" + ] + ] + } + ], + "errors": [ + { + "column": 3, + "messageId": "unexpectedMixedOperator", + "data": { + "leftOperator": "&&", + "rightOperator": "||" + } + }, + { + "column": 3, + "messageId": "unexpectedMixedOperator", + "data": { + "leftOperator": "&&", + "rightOperator": ">" + } + }, + { + "column": 8, + "messageId": "unexpectedMixedOperator", + "data": { + "leftOperator": "&&", + "rightOperator": ">" + } + }, + { + "column": 12, + "messageId": "unexpectedMixedOperator", + "data": { + "leftOperator": "&&", + "rightOperator": "||" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Hydrated message "Unexpected mix of '&&' and '>'. Use parentheses to clarify the intended order of operations." does not match "Unexpected mix of '&&' and '||'. Use parentheses to clarify the intended order of operations." ++ actual - expected + ++ "Unexpected mix of '&&' and '||'. Use parentheses to clarify the intended order of operations." +- "Unexpected mix of '&&' and '>'. Use parentheses to clarify the intended order of operations." + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-mixed-operators > invalid + +```js +a && b + c - d / e || f +``` + +```json +{ + "options": [ + { + "groups": [ + [ + "&&", + "||" + ], + [ + "+", + "-", + "*", + "/" + ] + ] + } + ], + "errors": [ + { + "column": 3, + "messageId": "unexpectedMixedOperator", + "data": { + "leftOperator": "&&", + "rightOperator": "||" + } + }, + { + "column": 12, + "messageId": "unexpectedMixedOperator", + "data": { + "leftOperator": "-", + "rightOperator": "/" + } + }, + { + "column": 16, + "messageId": "unexpectedMixedOperator", + "data": { + "leftOperator": "-", + "rightOperator": "/" + } + }, + { + "column": 20, + "messageId": "unexpectedMixedOperator", + "data": { + "leftOperator": "&&", + "rightOperator": "||" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Hydrated message "Unexpected mix of '-' and '/'. Use parentheses to clarify the intended order of operations." does not match "Unexpected mix of '&&' and '||'. Use parentheses to clarify the intended order of operations." ++ actual - expected + ++ "Unexpected mix of '&&' and '||'. Use parentheses to clarify the intended order of operations." +- "Unexpected mix of '-' and '/'. Use parentheses to clarify the intended order of operations." + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-mixed-operators > invalid + +```js +a && b + c - d / e || f +``` + +```json +{ + "options": [ + { + "groups": [ + [ + "&&", + "||" + ], + [ + "+", + "-", + "*", + "/" + ] + ], + "allowSamePrecedence": true + } + ], + "errors": [ + { + "column": 3, + "messageId": "unexpectedMixedOperator", + "data": { + "leftOperator": "&&", + "rightOperator": "||" + } + }, + { + "column": 12, + "messageId": "unexpectedMixedOperator", + "data": { + "leftOperator": "-", + "rightOperator": "/" + } + }, + { + "column": 16, + "messageId": "unexpectedMixedOperator", + "data": { + "leftOperator": "-", + "rightOperator": "/" + } + }, + { + "column": 20, + "messageId": "unexpectedMixedOperator", + "data": { + "leftOperator": "&&", + "rightOperator": "||" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Hydrated message "Unexpected mix of '-' and '/'. Use parentheses to clarify the intended order of operations." does not match "Unexpected mix of '&&' and '||'. Use parentheses to clarify the intended order of operations." ++ actual - expected + ++ "Unexpected mix of '&&' and '||'. Use parentheses to clarify the intended order of operations." +- "Unexpected mix of '-' and '/'. Use parentheses to clarify the intended order of operations." + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +### `no-multiple-empty-lines` + +Pass: 45 / 46 (97.8%) +Fail: 1 / 46 (2.2%) + +#### no-multiple-empty-lines > invalid + +```js +foo + +``` + +```json +{ + "output": "foo\n", + "options": [ + { + "max": 1, + "maxEOF": 0 + } + ], + "errors": [ + { + "messageId": "blankEndOfFile", + "data": { + "max": 0 + }, + "column": 1 + } + ] +} +``` + +RangeError: Line number out of range (line 3 requested). Line numbers should be 1-based, and less than or equal to number of lines in file (2). + at getOffsetFromLineColumn (apps/oxlint/dist/lint.js) + at report (apps/oxlint/dist/lint.js) + at Object.report (apps/oxlint/dist/lint.js) + at apps/oxlint/conformance/submodules/eslint/lib/rules/no-multiple-empty-lines.js:157:17 + + +### `no-native-reassign` + +Pass: 11 / 18 (61.1%) +Fail: 7 / 18 (38.9%) + +#### no-native-reassign > invalid + +```js +({Object = 0, String = 0} = {}); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "nativeReassign", + "data": { + "name": "Object" + } + }, + { + "messageId": "nativeReassign", + "data": { + "name": "String" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Hydrated message "Read-only global 'Object' should not be modified." does not match "Read-only global 'String' should not be modified." ++ actual - expected + ++ "Read-only global 'String' should not be modified." +- "Read-only global 'Object' should not be modified." + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-native-reassign > invalid + +```js +top = 0; +``` + +```json +{ + "languageOptions": { + "globals": { + "AbortController": false, + "AbortSignal": false, + "AbsoluteOrientationSensor": false, + "AbstractRange": false, + "Accelerometer": false, + "addEventListener": false, + "ai": false, + "AI": false, + "AICreateMonitor": false, + "AITextSession": false, + "alert": false, + "AnalyserNode": false, + "Animation": false, + "AnimationEffect": false, + "AnimationEvent": false, + "AnimationPlaybackEvent": false, + "AnimationTimeline": false, + "AsyncDisposableStack": false, + "atob": false, + "Attr": false, + "Audio": false, + "AudioBuffer": false, + "AudioBufferSourceNode": false, + "AudioContext": false, + "AudioData": false, + "AudioDecoder": false, + "AudioDestinationNode": false, + "AudioEncoder": false, + "AudioListener": false, + "AudioNode": false, + "AudioParam": false, + "AudioParamMap": false, + "AudioProcessingEvent": false, + "AudioScheduledSourceNode": false, + "AudioSinkInfo": false, + "AudioWorklet": false, + "AudioWorkletGlobalScope": false, + "AudioWorkletNode": false, + "AudioWorkletProcessor": false, + "AuthenticatorAssertionResponse": false, + "AuthenticatorAttestationResponse": false, + "AuthenticatorResponse": false, + "BackgroundFetchManager": false, + "BackgroundFetchRecord": false, + "BackgroundFetchRegistration": false, + "BarcodeDetector": false, + "BarProp": false, + "BaseAudioContext": false, + "BatteryManager": false, + "BeforeUnloadEvent": false, + "BiquadFilterNode": false, + "Blob": false, + "BlobEvent": false, + "Bluetooth": false, + "BluetoothCharacteristicProperties": false, + "BluetoothDevice": false, + "BluetoothRemoteGATTCharacteristic": false, + "BluetoothRemoteGATTDescriptor": false, + "BluetoothRemoteGATTServer": false, + "BluetoothRemoteGATTService": false, + "BluetoothUUID": false, + "blur": false, + "BroadcastChannel": false, + "BrowserCaptureMediaStreamTrack": false, + "btoa": false, + "ByteLengthQueuingStrategy": false, + "Cache": false, + "caches": false, + "CacheStorage": false, + "cancelAnimationFrame": false, + "cancelIdleCallback": false, + "CanvasCaptureMediaStream": false, + "CanvasCaptureMediaStreamTrack": false, + "CanvasGradient": false, + "CanvasPattern": false, + "CanvasRenderingContext2D": false, + "CaptureController": false, + "CaretPosition": false, + "CDATASection": false, + "ChannelMergerNode": false, + "ChannelSplitterNode": false, + "ChapterInformation": false, + "CharacterBoundsUpdateEvent": false, + "CharacterData": false, + "clearInterval": false, + "clearTimeout": false, + "clientInformation": false, + "Clipboard": false, + "ClipboardChangeEvent": false, + "ClipboardEvent": false, + "ClipboardItem": false, + "close": false, + "closed": false, + "CloseEvent": false, + "CloseWatcher": false, + "CommandEvent": false, + "Comment": false, + "CompositionEvent": false, + "CompressionStream": false, + "confirm": false, + "console": false, + "ConstantSourceNode": false, + "ContentVisibilityAutoStateChangeEvent": false, + "ConvolverNode": false, + "CookieChangeEvent": false, + "CookieDeprecationLabel": false, + "cookieStore": false, + "CookieStore": false, + "CookieStoreManager": false, + "CountQueuingStrategy": false, + "createImageBitmap": false, + "CreateMonitor": false, + "Credential": false, + "credentialless": false, + "CredentialsContainer": false, + "CropTarget": false, + "crossOriginIsolated": false, + "crypto": false, + "Crypto": false, + "CryptoKey": false, + "CSPViolationReportBody": false, + "CSS": false, + "CSSAnimation": false, + "CSSConditionRule": false, + "CSSContainerRule": false, + "CSSCounterStyleRule": false, + "CSSFontFaceRule": false, + "CSSFontFeatureValuesRule": false, + "CSSFontPaletteValuesRule": false, + "CSSFunctionDeclarations": false, + "CSSFunctionDescriptors": false, + "CSSFunctionRule": false, + "CSSGroupingRule": false, + "CSSImageValue": false, + "CSSImportRule": false, + "CSSKeyframeRule": false, + "CSSKeyframesRule": false, + "CSSKeywordValue": false, + "CSSLayerBlockRule": false, + "CSSLayerStatementRule": false, + "CSSMarginRule": false, + "CSSMathClamp": false, + "CSSMathInvert": false, + "CSSMathMax": false, + "CSSMathMin": false, + "CSSMathNegate": false, + "CSSMathProduct": false, + "CSSMathSum": false, + "CSSMathValue": false, + "CSSMatrixComponent": false, + "CSSMediaRule": false, + "CSSNamespaceRule": false, + "CSSNestedDeclarations": false, + "CSSNumericArray": false, + "CSSNumericValue": false, + "CSSPageDescriptors": false, + "CSSPageRule": false, + "CSSPerspective": false, + "CSSPositionTryDescriptors": false, + "CSSPositionTryRule": false, + "CSSPositionValue": false, + "CSSPropertyRule": false, + "CSSRotate": false, + "CSSRule": false, + "CSSRuleList": false, + "CSSScale": false, + "CSSScopeRule": false, + "CSSSkew": false, + "CSSSkewX": false, + "CSSSkewY": false, + "CSSStartingStyleRule": false, + "CSSStyleDeclaration": false, + "CSSStyleRule": false, + "CSSStyleSheet": false, + "CSSStyleValue": false, + "CSSSupportsRule": false, + "CSSTransformComponent": false, + "CSSTransformValue": false, + "CSSTransition": false, + "CSSTranslate": false, + "CSSUnitValue": false, + "CSSUnparsedValue": false, + "CSSVariableReferenceValue": false, + "CSSViewTransitionRule": false, + "currentFrame": false, + "currentTime": false, + "CustomElementRegistry": false, + "customElements": false, + "CustomEvent": false, + "CustomStateSet": false, + "DataTransfer": false, + "DataTransferItem": false, + "DataTransferItemList": false, + "DecompressionStream": false, + "DelayNode": false, + "DelegatedInkTrailPresenter": false, + "DeviceMotionEvent": false, + "DeviceMotionEventAcceleration": false, + "DeviceMotionEventRotationRate": false, + "DeviceOrientationEvent": false, + "devicePixelRatio": false, + "DevicePosture": false, + "DigitalCredential": false, + "dispatchEvent": false, + "DisposableStack": false, + "document": false, + "Document": false, + "DocumentFragment": false, + "documentPictureInPicture": false, + "DocumentPictureInPicture": false, + "DocumentPictureInPictureEvent": false, + "DocumentTimeline": false, + "DocumentType": false, + "DOMError": false, + "DOMException": false, + "DOMImplementation": false, + "DOMMatrix": false, + "DOMMatrixReadOnly": false, + "DOMParser": false, + "DOMPoint": false, + "DOMPointReadOnly": false, + "DOMQuad": false, + "DOMRect": false, + "DOMRectList": false, + "DOMRectReadOnly": false, + "DOMStringList": false, + "DOMStringMap": false, + "DOMTokenList": false, + "DragEvent": false, + "DynamicsCompressorNode": false, + "EditContext": false, + "Element": false, + "ElementInternals": false, + "EncodedAudioChunk": false, + "EncodedVideoChunk": false, + "ErrorEvent": false, + "event": false, + "Event": false, + "EventCounts": false, + "EventSource": false, + "EventTarget": false, + "external": false, + "External": false, + "EyeDropper": false, + "FeaturePolicy": false, + "FederatedCredential": false, + "fence": false, + "Fence": false, + "FencedFrameConfig": false, + "fetch": false, + "fetchLater": false, + "FetchLaterResult": false, + "File": false, + "FileList": false, + "FileReader": false, + "FileSystem": false, + "FileSystemDirectoryEntry": false, + "FileSystemDirectoryHandle": false, + "FileSystemDirectoryReader": false, + "FileSystemEntry": false, + "FileSystemFileEntry": false, + "FileSystemFileHandle": false, + "FileSystemHandle": false, + "FileSystemObserver": false, + "FileSystemWritableFileStream": false, + "find": false, + "focus": false, + "FocusEvent": false, + "FontData": false, + "FontFace": false, + "FontFaceSet": false, + "FontFaceSetLoadEvent": false, + "FormData": false, + "FormDataEvent": false, + "FragmentDirective": false, + "frameElement": false, + "frames": false, + "GainNode": false, + "Gamepad": false, + "GamepadAxisMoveEvent": false, + "GamepadButton": false, + "GamepadButtonEvent": false, + "GamepadEvent": false, + "GamepadHapticActuator": false, + "GamepadPose": false, + "Geolocation": false, + "GeolocationCoordinates": false, + "GeolocationPosition": false, + "GeolocationPositionError": false, + "getComputedStyle": false, + "getScreenDetails": false, + "getSelection": false, + "GPU": false, + "GPUAdapter": false, + "GPUAdapterInfo": false, + "GPUBindGroup": false, + "GPUBindGroupLayout": false, + "GPUBuffer": false, + "GPUBufferUsage": false, + "GPUCanvasContext": false, + "GPUColorWrite": false, + "GPUCommandBuffer": false, + "GPUCommandEncoder": false, + "GPUCompilationInfo": false, + "GPUCompilationMessage": false, + "GPUComputePassEncoder": false, + "GPUComputePipeline": false, + "GPUDevice": false, + "GPUDeviceLostInfo": false, + "GPUError": false, + "GPUExternalTexture": false, + "GPUInternalError": false, + "GPUMapMode": false, + "GPUOutOfMemoryError": false, + "GPUPipelineError": false, + "GPUPipelineLayout": false, + "GPUQuerySet": false, + "GPUQueue": false, + "GPURenderBundle": false, + "GPURenderBundleEncoder": false, + "GPURenderPassEncoder": false, + "GPURenderPipeline": false, + "GPUSampler": false, + "GPUShaderModule": false, + "GPUShaderStage": false, + "GPUSupportedFeatures": false, + "GPUSupportedLimits": false, + "GPUTexture": false, + "GPUTextureUsage": false, + "GPUTextureView": false, + "GPUUncapturedErrorEvent": false, + "GPUValidationError": false, + "GravitySensor": false, + "Gyroscope": false, + "HashChangeEvent": false, + "Headers": false, + "HID": false, + "HIDConnectionEvent": false, + "HIDDevice": false, + "HIDInputReportEvent": false, + "Highlight": false, + "HighlightRegistry": false, + "history": false, + "History": false, + "HTMLAllCollection": false, + "HTMLAnchorElement": false, + "HTMLAreaElement": false, + "HTMLAudioElement": false, + "HTMLBaseElement": false, + "HTMLBodyElement": false, + "HTMLBRElement": false, + "HTMLButtonElement": false, + "HTMLCanvasElement": false, + "HTMLCollection": false, + "HTMLDataElement": false, + "HTMLDataListElement": false, + "HTMLDetailsElement": false, + "HTMLDialogElement": false, + "HTMLDirectoryElement": false, + "HTMLDivElement": false, + "HTMLDListElement": false, + "HTMLDocument": false, + "HTMLElement": false, + "HTMLEmbedElement": false, + "HTMLFencedFrameElement": false, + "HTMLFieldSetElement": false, + "HTMLFontElement": false, + "HTMLFormControlsCollection": false, + "HTMLFormElement": false, + "HTMLFrameElement": false, + "HTMLFrameSetElement": false, + "HTMLHeadElement": false, + "HTMLHeadingElement": false, + "HTMLHRElement": false, + "HTMLHtmlElement": false, + "HTMLIFrameElement": false, + "HTMLImageElement": false, + "HTMLInputElement": false, + "HTMLLabelElement": false, + "HTMLLegendElement": false, + "HTMLLIElement": false, + "HTMLLinkElement": false, + "HTMLMapElement": false, + "HTMLMarqueeElement": false, + "HTMLMediaElement": false, + "HTMLMenuElement": false, + "HTMLMetaElement": false, + "HTMLMeterElement": false, + "HTMLModElement": false, + "HTMLObjectElement": false, + "HTMLOListElement": false, + "HTMLOptGroupElement": false, + "HTMLOptionElement": false, + "HTMLOptionsCollection": false, + "HTMLOutputElement": false, + "HTMLParagraphElement": false, + "HTMLParamElement": false, + "HTMLPictureElement": false, + "HTMLPreElement": false, + "HTMLProgressElement": false, + "HTMLQuoteElement": false, + "HTMLScriptElement": false, + "HTMLSelectedContentElement": false, + "HTMLSelectElement": false, + "HTMLSlotElement": false, + "HTMLSourceElement": false, + "HTMLSpanElement": false, + "HTMLStyleElement": false, + "HTMLTableCaptionElement": false, + "HTMLTableCellElement": false, + "HTMLTableColElement": false, + "HTMLTableElement": false, + "HTMLTableRowElement": false, + "HTMLTableSectionElement": false, + "HTMLTemplateElement": false, + "HTMLTextAreaElement": false, + "HTMLTimeElement": false, + "HTMLTitleElement": false, + "HTMLTrackElement": false, + "HTMLUListElement": false, + "HTMLUnknownElement": false, + "HTMLVideoElement": false, + "IDBCursor": false, + "IDBCursorWithValue": false, + "IDBDatabase": false, + "IDBFactory": false, + "IDBIndex": false, + "IDBKeyRange": false, + "IDBObjectStore": false, + "IDBOpenDBRequest": false, + "IDBRecord": false, + "IDBRequest": false, + "IDBTransaction": false, + "IDBVersionChangeEvent": false, + "IdentityCredential": false, + "IdentityCredentialError": false, + "IdentityProvider": false, + "IdleDeadline": false, + "IdleDetector": false, + "IIRFilterNode": false, + "Image": false, + "ImageBitmap": false, + "ImageBitmapRenderingContext": false, + "ImageCapture": false, + "ImageData": false, + "ImageDecoder": false, + "ImageTrack": false, + "ImageTrackList": false, + "indexedDB": false, + "Ink": false, + "innerHeight": false, + "innerWidth": false, + "InputDeviceCapabilities": false, + "InputDeviceInfo": false, + "InputEvent": false, + "IntegrityViolationReportBody": false, + "InterestEvent": false, + "IntersectionObserver": false, + "IntersectionObserverEntry": false, + "isSecureContext": false, + "Keyboard": false, + "KeyboardEvent": false, + "KeyboardLayoutMap": false, + "KeyframeEffect": false, + "LanguageDetector": false, + "LargestContentfulPaint": false, + "LaunchParams": false, + "launchQueue": false, + "LaunchQueue": false, + "LayoutShift": false, + "LayoutShiftAttribution": false, + "length": false, + "LinearAccelerationSensor": false, + "localStorage": false, + "location": true, + "Location": false, + "locationbar": false, + "Lock": false, + "LockManager": false, + "matchMedia": false, + "MathMLElement": false, + "MediaCapabilities": false, + "MediaCapabilitiesInfo": false, + "MediaDeviceInfo": false, + "MediaDevices": false, + "MediaElementAudioSourceNode": false, + "MediaEncryptedEvent": false, + "MediaError": false, + "MediaKeyError": false, + "MediaKeyMessageEvent": false, + "MediaKeys": false, + "MediaKeySession": false, + "MediaKeyStatusMap": false, + "MediaKeySystemAccess": false, + "MediaList": false, + "MediaMetadata": false, + "MediaQueryList": false, + "MediaQueryListEvent": false, + "MediaRecorder": false, + "MediaRecorderErrorEvent": false, + "MediaSession": false, + "MediaSource": false, + "MediaSourceHandle": false, + "MediaStream": false, + "MediaStreamAudioDestinationNode": false, + "MediaStreamAudioSourceNode": false, + "MediaStreamEvent": false, + "MediaStreamTrack": false, + "MediaStreamTrackAudioSourceNode": false, + "MediaStreamTrackAudioStats": false, + "MediaStreamTrackEvent": false, + "MediaStreamTrackGenerator": false, + "MediaStreamTrackProcessor": false, + "MediaStreamTrackVideoStats": false, + "menubar": false, + "MessageChannel": false, + "MessageEvent": false, + "MessagePort": false, + "MIDIAccess": false, + "MIDIConnectionEvent": false, + "MIDIInput": false, + "MIDIInputMap": false, + "MIDIMessageEvent": false, + "MIDIOutput": false, + "MIDIOutputMap": false, + "MIDIPort": false, + "MimeType": false, + "MimeTypeArray": false, + "model": false, + "ModelGenericSession": false, + "ModelManager": false, + "MouseEvent": false, + "moveBy": false, + "moveTo": false, + "MutationEvent": false, + "MutationObserver": false, + "MutationRecord": false, + "name": false, + "NamedNodeMap": false, + "NavigateEvent": false, + "navigation": false, + "Navigation": false, + "NavigationActivation": false, + "NavigationCurrentEntryChangeEvent": false, + "NavigationDestination": false, + "NavigationHistoryEntry": false, + "NavigationPrecommitController": false, + "NavigationPreloadManager": false, + "NavigationTransition": false, + "navigator": false, + "Navigator": false, + "NavigatorLogin": false, + "NavigatorManagedData": false, + "NavigatorUAData": false, + "NetworkInformation": false, + "Node": false, + "NodeFilter": false, + "NodeIterator": false, + "NodeList": false, + "Notification": false, + "NotifyPaintEvent": false, + "NotRestoredReasonDetails": false, + "NotRestoredReasons": false, + "Observable": false, + "OfflineAudioCompletionEvent": false, + "OfflineAudioContext": false, + "offscreenBuffering": false, + "OffscreenCanvas": false, + "OffscreenCanvasRenderingContext2D": false, + "onabort": true, + "onafterprint": true, + "onanimationcancel": true, + "onanimationend": true, + "onanimationiteration": true, + "onanimationstart": true, + "onappinstalled": true, + "onauxclick": true, + "onbeforeinput": true, + "onbeforeinstallprompt": true, + "onbeforematch": true, + "onbeforeprint": true, + "onbeforetoggle": true, + "onbeforeunload": true, + "onbeforexrselect": true, + "onblur": true, + "oncancel": true, + "oncanplay": true, + "oncanplaythrough": true, + "onchange": true, + "onclick": true, + "onclose": true, + "oncommand": true, + "oncontentvisibilityautostatechange": true, + "oncontextlost": true, + "oncontextmenu": true, + "oncontextrestored": true, + "oncopy": true, + "oncuechange": true, + "oncut": true, + "ondblclick": true, + "ondevicemotion": true, + "ondeviceorientation": true, + "ondeviceorientationabsolute": true, + "ondrag": true, + "ondragend": true, + "ondragenter": true, + "ondragleave": true, + "ondragover": true, + "ondragstart": true, + "ondrop": true, + "ondurationchange": true, + "onemptied": true, + "onended": true, + "onerror": true, + "onfocus": true, + "onformdata": true, + "ongamepadconnected": true, + "ongamepaddisconnected": true, + "ongotpointercapture": true, + "onhashchange": true, + "oninput": true, + "oninvalid": true, + "onkeydown": true, + "onkeypress": true, + "onkeyup": true, + "onlanguagechange": true, + "onload": true, + "onloadeddata": true, + "onloadedmetadata": true, + "onloadstart": true, + "onlostpointercapture": true, + "onmessage": true, + "onmessageerror": true, + "onmousedown": true, + "onmouseenter": true, + "onmouseleave": true, + "onmousemove": true, + "onmouseout": true, + "onmouseover": true, + "onmouseup": true, + "onmousewheel": true, + "onoffline": true, + "ononline": true, + "onpagehide": true, + "onpagereveal": true, + "onpageshow": true, + "onpageswap": true, + "onpaste": true, + "onpause": true, + "onplay": true, + "onplaying": true, + "onpointercancel": true, + "onpointerdown": true, + "onpointerenter": true, + "onpointerleave": true, + "onpointermove": true, + "onpointerout": true, + "onpointerover": true, + "onpointerrawupdate": true, + "onpointerup": true, + "onpopstate": true, + "onprogress": true, + "onratechange": true, + "onrejectionhandled": true, + "onreset": true, + "onresize": true, + "onscroll": true, + "onscrollend": true, + "onscrollsnapchange": true, + "onscrollsnapchanging": true, + "onsearch": true, + "onsecuritypolicyviolation": true, + "onseeked": true, + "onseeking": true, + "onselect": true, + "onselectionchange": true, + "onselectstart": true, + "onslotchange": true, + "onstalled": true, + "onstorage": true, + "onsubmit": true, + "onsuspend": true, + "ontimeupdate": true, + "ontoggle": true, + "ontransitioncancel": true, + "ontransitionend": true, + "ontransitionrun": true, + "ontransitionstart": true, + "onunhandledrejection": true, + "onunload": true, + "onvolumechange": true, + "onwaiting": true, + "onwheel": true, + "open": false, + "opener": false, + "Option": false, + "OrientationSensor": false, + "origin": false, + "originAgentCluster": false, + "OscillatorNode": false, + "OTPCredential": false, + "outerHeight": false, + "outerWidth": false, + "OverconstrainedError": false, + "PageRevealEvent": false, + "PageSwapEvent": false, + "PageTransitionEvent": false, + "pageXOffset": false, + "pageYOffset": false, + "PannerNode": false, + "parent": false, + "PasswordCredential": false, + "Path2D": false, + "PaymentAddress": false, + "PaymentManager": false, + "PaymentMethodChangeEvent": false, + "PaymentRequest": false, + "PaymentRequestUpdateEvent": false, + "PaymentResponse": false, + "performance": false, + "Performance": false, + "PerformanceElementTiming": false, + "PerformanceEntry": false, + "PerformanceEventTiming": false, + "PerformanceLongAnimationFrameTiming": false, + "PerformanceLongTaskTiming": false, + "PerformanceMark": false, + "PerformanceMeasure": false, + "PerformanceNavigation": false, + "PerformanceNavigationTiming": false, + "PerformanceObserver": false, + "PerformanceObserverEntryList": false, + "PerformancePaintTiming": false, + "PerformanceResourceTiming": false, + "PerformanceScriptTiming": false, + "PerformanceServerTiming": false, + "PerformanceTiming": false, + "PeriodicSyncManager": false, + "PeriodicWave": false, + "Permissions": false, + "PermissionStatus": false, + "PERSISTENT": false, + "personalbar": false, + "PictureInPictureEvent": false, + "PictureInPictureWindow": false, + "Plugin": false, + "PluginArray": false, + "PointerEvent": false, + "PopStateEvent": false, + "postMessage": false, + "Presentation": false, + "PresentationAvailability": false, + "PresentationConnection": false, + "PresentationConnectionAvailableEvent": false, + "PresentationConnectionCloseEvent": false, + "PresentationConnectionList": false, + "PresentationReceiver": false, + "PresentationRequest": false, + "PressureObserver": false, + "PressureRecord": false, + "print": false, + "ProcessingInstruction": false, + "Profiler": false, + "ProgressEvent": false, + "PromiseRejectionEvent": false, + "prompt": false, + "ProtectedAudience": false, + "PublicKeyCredential": false, + "PushManager": false, + "PushSubscription": false, + "PushSubscriptionOptions": false, + "queryLocalFonts": false, + "queueMicrotask": false, + "QuotaExceededError": false, + "RadioNodeList": false, + "Range": false, + "ReadableByteStreamController": false, + "ReadableStream": false, + "ReadableStreamBYOBReader": false, + "ReadableStreamBYOBRequest": false, + "ReadableStreamDefaultController": false, + "ReadableStreamDefaultReader": false, + "registerProcessor": false, + "RelativeOrientationSensor": false, + "RemotePlayback": false, + "removeEventListener": false, + "ReportBody": false, + "reportError": false, + "ReportingObserver": false, + "Request": false, + "requestAnimationFrame": false, + "requestIdleCallback": false, + "resizeBy": false, + "ResizeObserver": false, + "ResizeObserverEntry": false, + "ResizeObserverSize": false, + "resizeTo": false, + "Response": false, + "RestrictionTarget": false, + "RTCCertificate": false, + "RTCDataChannel": false, + "RTCDataChannelEvent": false, + "RTCDtlsTransport": false, + "RTCDTMFSender": false, + "RTCDTMFToneChangeEvent": false, + "RTCEncodedAudioFrame": false, + "RTCEncodedVideoFrame": false, + "RTCError": false, + "RTCErrorEvent": false, + "RTCIceCandidate": false, + "RTCIceTransport": false, + "RTCPeerConnection": false, + "RTCPeerConnectionIceErrorEvent": false, + "RTCPeerConnectionIceEvent": false, + "RTCRtpReceiver": false, + "RTCRtpScriptTransform": false, + "RTCRtpSender": false, + "RTCRtpTransceiver": false, + "RTCSctpTransport": false, + "RTCSessionDescription": false, + "RTCStatsReport": false, + "RTCTrackEvent": false, + "sampleRate": false, + "scheduler": false, + "Scheduler": false, + "Scheduling": false, + "screen": false, + "Screen": false, + "ScreenDetailed": false, + "ScreenDetails": false, + "screenLeft": false, + "ScreenOrientation": false, + "screenTop": false, + "screenX": false, + "screenY": false, + "ScriptProcessorNode": false, + "scroll": false, + "scrollbars": false, + "scrollBy": false, + "ScrollTimeline": false, + "scrollTo": false, + "scrollX": false, + "scrollY": false, + "SecurityPolicyViolationEvent": false, + "Selection": false, + "self": false, + "Sensor": false, + "SensorErrorEvent": false, + "Serial": false, + "SerialPort": false, + "ServiceWorker": false, + "ServiceWorkerContainer": false, + "ServiceWorkerRegistration": false, + "sessionStorage": false, + "setInterval": false, + "setTimeout": false, + "ShadowRoot": false, + "sharedStorage": false, + "SharedStorage": false, + "SharedStorageAppendMethod": false, + "SharedStorageClearMethod": false, + "SharedStorageDeleteMethod": false, + "SharedStorageModifierMethod": false, + "SharedStorageSetMethod": false, + "SharedStorageWorklet": false, + "SharedWorker": false, + "showDirectoryPicker": false, + "showOpenFilePicker": false, + "showSaveFilePicker": false, + "SnapEvent": false, + "SourceBuffer": false, + "SourceBufferList": false, + "SpeechGrammar": false, + "SpeechGrammarList": false, + "SpeechRecognition": false, + "SpeechRecognitionErrorEvent": false, + "SpeechRecognitionEvent": false, + "SpeechRecognitionPhrase": false, + "speechSynthesis": false, + "SpeechSynthesis": false, + "SpeechSynthesisErrorEvent": false, + "SpeechSynthesisEvent": false, + "SpeechSynthesisUtterance": false, + "SpeechSynthesisVoice": false, + "StaticRange": false, + "status": false, + "statusbar": false, + "StereoPannerNode": false, + "stop": false, + "Storage": false, + "StorageBucket": false, + "StorageBucketManager": false, + "StorageEvent": false, + "StorageManager": false, + "structuredClone": false, + "styleMedia": false, + "StylePropertyMap": false, + "StylePropertyMapReadOnly": false, + "StyleSheet": false, + "StyleSheetList": false, + "SubmitEvent": false, + "Subscriber": false, + "SubtleCrypto": false, + "Summarizer": false, + "SuppressedError": false, + "SVGAElement": false, + "SVGAngle": false, + "SVGAnimatedAngle": false, + "SVGAnimatedBoolean": false, + "SVGAnimatedEnumeration": false, + "SVGAnimatedInteger": false, + "SVGAnimatedLength": false, + "SVGAnimatedLengthList": false, + "SVGAnimatedNumber": false, + "SVGAnimatedNumberList": false, + "SVGAnimatedPreserveAspectRatio": false, + "SVGAnimatedRect": false, + "SVGAnimatedString": false, + "SVGAnimatedTransformList": false, + "SVGAnimateElement": false, + "SVGAnimateMotionElement": false, + "SVGAnimateTransformElement": false, + "SVGAnimationElement": false, + "SVGCircleElement": false, + "SVGClipPathElement": false, + "SVGComponentTransferFunctionElement": false, + "SVGDefsElement": false, + "SVGDescElement": false, + "SVGElement": false, + "SVGEllipseElement": false, + "SVGFEBlendElement": false, + "SVGFEColorMatrixElement": false, + "SVGFEComponentTransferElement": false, + "SVGFECompositeElement": false, + "SVGFEConvolveMatrixElement": false, + "SVGFEDiffuseLightingElement": false, + "SVGFEDisplacementMapElement": false, + "SVGFEDistantLightElement": false, + "SVGFEDropShadowElement": false, + "SVGFEFloodElement": false, + "SVGFEFuncAElement": false, + "SVGFEFuncBElement": false, + "SVGFEFuncGElement": false, + "SVGFEFuncRElement": false, + "SVGFEGaussianBlurElement": false, + "SVGFEImageElement": false, + "SVGFEMergeElement": false, + "SVGFEMergeNodeElement": false, + "SVGFEMorphologyElement": false, + "SVGFEOffsetElement": false, + "SVGFEPointLightElement": false, + "SVGFESpecularLightingElement": false, + "SVGFESpotLightElement": false, + "SVGFETileElement": false, + "SVGFETurbulenceElement": false, + "SVGFilterElement": false, + "SVGForeignObjectElement": false, + "SVGGElement": false, + "SVGGeometryElement": false, + "SVGGradientElement": false, + "SVGGraphicsElement": false, + "SVGImageElement": false, + "SVGLength": false, + "SVGLengthList": false, + "SVGLinearGradientElement": false, + "SVGLineElement": false, + "SVGMarkerElement": false, + "SVGMaskElement": false, + "SVGMatrix": false, + "SVGMetadataElement": false, + "SVGMPathElement": false, + "SVGNumber": false, + "SVGNumberList": false, + "SVGPathElement": false, + "SVGPatternElement": false, + "SVGPoint": false, + "SVGPointList": false, + "SVGPolygonElement": false, + "SVGPolylineElement": false, + "SVGPreserveAspectRatio": false, + "SVGRadialGradientElement": false, + "SVGRect": false, + "SVGRectElement": false, + "SVGScriptElement": false, + "SVGSetElement": false, + "SVGStopElement": false, + "SVGStringList": false, + "SVGStyleElement": false, + "SVGSVGElement": false, + "SVGSwitchElement": false, + "SVGSymbolElement": false, + "SVGTextContentElement": false, + "SVGTextElement": false, + "SVGTextPathElement": false, + "SVGTextPositioningElement": false, + "SVGTitleElement": false, + "SVGTransform": false, + "SVGTransformList": false, + "SVGTSpanElement": false, + "SVGUnitTypes": false, + "SVGUseElement": false, + "SVGViewElement": false, + "SyncManager": false, + "TaskAttributionTiming": false, + "TaskController": false, + "TaskPriorityChangeEvent": false, + "TaskSignal": false, + "TEMPORARY": false, + "Text": false, + "TextDecoder": false, + "TextDecoderStream": false, + "TextEncoder": false, + "TextEncoderStream": false, + "TextEvent": false, + "TextFormat": false, + "TextFormatUpdateEvent": false, + "TextMetrics": false, + "TextTrack": false, + "TextTrackCue": false, + "TextTrackCueList": false, + "TextTrackList": false, + "TextUpdateEvent": false, + "TimeEvent": false, + "TimeRanges": false, + "ToggleEvent": false, + "toolbar": false, + "top": false, + "Touch": false, + "TouchEvent": false, + "TouchList": false, + "TrackEvent": false, + "TransformStream": false, + "TransformStreamDefaultController": false, + "TransitionEvent": false, + "Translator": false, + "TreeWalker": false, + "TrustedHTML": false, + "TrustedScript": false, + "TrustedScriptURL": false, + "TrustedTypePolicy": false, + "TrustedTypePolicyFactory": false, + "trustedTypes": false, + "UIEvent": false, + "URL": false, + "URLPattern": false, + "URLSearchParams": false, + "USB": false, + "USBAlternateInterface": false, + "USBConfiguration": false, + "USBConnectionEvent": false, + "USBDevice": false, + "USBEndpoint": false, + "USBInterface": false, + "USBInTransferResult": false, + "USBIsochronousInTransferPacket": false, + "USBIsochronousInTransferResult": false, + "USBIsochronousOutTransferPacket": false, + "USBIsochronousOutTransferResult": false, + "USBOutTransferResult": false, + "UserActivation": false, + "ValidityState": false, + "VideoColorSpace": false, + "VideoDecoder": false, + "VideoEncoder": false, + "VideoFrame": false, + "VideoPlaybackQuality": false, + "viewport": false, + "Viewport": false, + "ViewTimeline": false, + "ViewTransition": false, + "ViewTransitionTypeSet": false, + "VirtualKeyboard": false, + "VirtualKeyboardGeometryChangeEvent": false, + "VisibilityStateEntry": false, + "visualViewport": false, + "VisualViewport": false, + "VTTCue": false, + "VTTRegion": false, + "WakeLock": false, + "WakeLockSentinel": false, + "WaveShaperNode": false, + "WebAssembly": false, + "WebGL2RenderingContext": false, + "WebGLActiveInfo": false, + "WebGLBuffer": false, + "WebGLContextEvent": false, + "WebGLFramebuffer": false, + "WebGLObject": false, + "WebGLProgram": false, + "WebGLQuery": false, + "WebGLRenderbuffer": false, + "WebGLRenderingContext": false, + "WebGLSampler": false, + "WebGLShader": false, + "WebGLShaderPrecisionFormat": false, + "WebGLSync": false, + "WebGLTexture": false, + "WebGLTransformFeedback": false, + "WebGLUniformLocation": false, + "WebGLVertexArrayObject": false, + "WebSocket": false, + "WebSocketError": false, + "WebSocketStream": false, + "WebTransport": false, + "WebTransportBidirectionalStream": false, + "WebTransportDatagramDuplexStream": false, + "WebTransportError": false, + "WebTransportReceiveStream": false, + "WebTransportSendStream": false, + "WGSLLanguageFeatures": false, + "WheelEvent": false, + "when": false, + "window": false, + "Window": false, + "WindowControlsOverlay": false, + "WindowControlsOverlayGeometryChangeEvent": false, + "Worker": false, + "Worklet": false, + "WorkletGlobalScope": false, + "WritableStream": false, + "WritableStreamDefaultController": false, + "WritableStreamDefaultWriter": false, + "XMLDocument": false, + "XMLHttpRequest": false, + "XMLHttpRequestEventTarget": false, + "XMLHttpRequestUpload": false, + "XMLSerializer": false, + "XPathEvaluator": false, + "XPathExpression": false, + "XPathResult": false, + "XRAnchor": false, + "XRAnchorSet": false, + "XRBoundedReferenceSpace": false, + "XRCamera": false, + "XRCPUDepthInformation": false, + "XRDepthInformation": false, + "XRDOMOverlayState": false, + "XRFrame": false, + "XRHand": false, + "XRHitTestResult": false, + "XRHitTestSource": false, + "XRInputSource": false, + "XRInputSourceArray": false, + "XRInputSourceEvent": false, + "XRInputSourcesChangeEvent": false, + "XRJointPose": false, + "XRJointSpace": false, + "XRLayer": false, + "XRLightEstimate": false, + "XRLightProbe": false, + "XRPose": false, + "XRRay": false, + "XRReferenceSpace": false, + "XRReferenceSpaceEvent": false, + "XRRenderState": false, + "XRRigidTransform": false, + "XRSession": false, + "XRSessionEvent": false, + "XRSpace": false, + "XRSystem": false, + "XRTransientInputHitTestResult": false, + "XRTransientInputHitTestSource": false, + "XRView": false, + "XRViewerPose": false, + "XRViewport": false, + "XRWebGLBinding": false, + "XRWebGLDepthInformation": false, + "XRWebGLLayer": false, + "XSLTProcessor": false + } + }, + "errors": [ + { + "messageId": "nativeReassign", + "data": { + "name": "top" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-native-reassign > invalid + +```js +require = 0; +``` + +```json +{ + "languageOptions": { + "sourceType": "commonjs" + }, + "errors": [ + { + "messageId": "nativeReassign", + "data": { + "name": "require" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-native-reassign > invalid + +```js +/*global b:false*/ function f() { b = 1; } +``` + +```json +{ + "errors": [ + { + "messageId": "nativeReassign", + "data": { + "name": "b" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-native-reassign > invalid + +```js +function f() { b = 1; } +``` + +```json +{ + "languageOptions": { + "globals": { + "b": false + } + }, + "errors": [ + { + "messageId": "nativeReassign", + "data": { + "name": "b" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-native-reassign > invalid + +```js +/*global b:false*/ function f() { b++; } +``` + +```json +{ + "errors": [ + { + "messageId": "nativeReassign", + "data": { + "name": "b" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-native-reassign > invalid + +```js +/*global b*/ b = 1; +``` + +```json +{ + "errors": [ + { + "messageId": "nativeReassign", + "data": { + "name": "b" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +### `no-new-native-nonconstructor` + +Pass: 12 / 14 (85.7%) +Fail: 2 / 14 (14.3%) + +#### no-new-native-nonconstructor > invalid + +```js +var foo = new Symbol('foo'); +``` + +```json +{ + "errors": [ + { + "message": "`Symbol` cannot be called as a constructor." + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-new-native-nonconstructor > invalid + +```js +function bar() { return function Symbol() {}; } var baz = new Symbol('baz'); +``` + +```json +{ + "errors": [ + { + "message": "`Symbol` cannot be called as a constructor." + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +### `no-new-symbol` + +Pass: 5 / 7 (71.4%) +Fail: 2 / 7 (28.6%) + +#### no-new-symbol > invalid + +```js +var foo = new Symbol('foo'); +``` + +```json +{ + "errors": [ + { + "messageId": "noNewSymbol" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-new-symbol > invalid + +```js +function bar() { return function Symbol() {}; } var baz = new Symbol('baz'); +``` + +```json +{ + "errors": [ + { + "messageId": "noNewSymbol" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +### `no-new-wrappers` + +Pass: 9 / 11 (81.8%) +Fail: 2 / 11 (18.2%) + +#### no-new-wrappers > valid + +```js +new String() +``` + +```json +{ + "languageOptions": { + "globals": { + "String": "off" + } + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-new-wrappers', + message: 'Do not use String as a constructor.', + messageId: 'noConstructor', + severity: 1, + nodeType: 'NewExpression', + line: 1, + column: 0, + endLine: 1, + endColumn: 12, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-new-wrappers > valid + +```js + + /* global Boolean:off */ + assert(new Boolean); + +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-new-wrappers', + message: 'Do not use Boolean as a constructor.', + messageId: 'noConstructor', + severity: 1, + nodeType: 'NewExpression', + line: 3, + column: 15, + endLine: 3, + endColumn: 26, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +### `no-obj-calls` + +Pass: 72 / 107 (67.3%) +Fail: 35 / 107 (32.7%) + +#### no-obj-calls > valid + +```js +/*globals Math: off*/ Math(); +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-obj-calls', + message: "'Math' is not a function.", + messageId: 'unexpectedCall', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 22, + endLine: 1, + endColumn: 28, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-obj-calls > valid + +```js +/*globals Math: off*/ new Math(); +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-obj-calls', + message: "'Math' is not a function.", + messageId: 'unexpectedCall', + severity: 1, + nodeType: 'NewExpression', + line: 1, + column: 22, + endLine: 1, + endColumn: 32, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-obj-calls > valid + +```js +JSON(); +``` + +```json +{ + "languageOptions": { + "globals": { + "JSON": "off" + } + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-obj-calls', + message: "'JSON' is not a function.", + messageId: 'unexpectedCall', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 0, + endLine: 1, + endColumn: 6, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-obj-calls > valid + +```js +new JSON(); +``` + +```json +{ + "languageOptions": { + "globals": { + "JSON": "off" + } + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-obj-calls', + message: "'JSON' is not a function.", + messageId: 'unexpectedCall', + severity: 1, + nodeType: 'NewExpression', + line: 1, + column: 0, + endLine: 1, + endColumn: 10, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-obj-calls > valid + +```js +Reflect(); +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-obj-calls', + message: "'Reflect' is not a function.", + messageId: 'unexpectedCall', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 0, + endLine: 1, + endColumn: 9, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-obj-calls > valid + +```js +Atomics(); +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-obj-calls', + message: "'Atomics' is not a function.", + messageId: 'unexpectedCall', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 0, + endLine: 1, + endColumn: 9, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-obj-calls > valid + +```js +new Reflect(); +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-obj-calls', + message: "'Reflect' is not a function.", + messageId: 'unexpectedCall', + severity: 1, + nodeType: 'NewExpression', + line: 1, + column: 0, + endLine: 1, + endColumn: 13, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-obj-calls > valid + +```js +new Atomics(); +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-obj-calls', + message: "'Atomics' is not a function.", + messageId: 'unexpectedCall', + severity: 1, + nodeType: 'NewExpression', + line: 1, + column: 0, + endLine: 1, + endColumn: 13, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-obj-calls > valid + +```js +Atomics(); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-obj-calls', + message: "'Atomics' is not a function.", + messageId: 'unexpectedCall', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 0, + endLine: 1, + endColumn: 9, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-obj-calls > valid + +```js +Intl() +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-obj-calls', + message: "'Intl' is not a function.", + messageId: 'unexpectedCall', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 0, + endLine: 1, + endColumn: 6, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-obj-calls > valid + +```js +new Intl() +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-obj-calls', + message: "'Intl' is not a function.", + messageId: 'unexpectedCall', + severity: 1, + nodeType: 'NewExpression', + line: 1, + column: 0, + endLine: 1, + endColumn: 10, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-obj-calls > invalid + +```js +Math( JSON() ); +``` + +```json +{ + "errors": [ + { + "messageId": "unexpectedCall", + "data": { + "name": "Math" + }, + "column": 1, + "endColumn": 15 + }, + { + "messageId": "unexpectedCall", + "data": { + "name": "JSON" + }, + "column": 7, + "endColumn": 13 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Hydrated message "'Math' is not a function." does not match "'JSON' is not a function." ++ actual - expected + ++ "'JSON' is not a function." +- "'Math' is not a function." + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-obj-calls > invalid + +```js +var x = globalThis.Math(); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2020 + }, + "errors": [ + { + "messageId": "unexpectedCall", + "data": { + "name": "Math" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-obj-calls > invalid + +```js +var x = new globalThis.Math(); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2020 + }, + "errors": [ + { + "messageId": "unexpectedCall", + "data": { + "name": "Math" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-obj-calls > invalid + +```js +f(globalThis.Math()); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2020 + }, + "errors": [ + { + "messageId": "unexpectedCall", + "data": { + "name": "Math" + }, + "column": 3, + "endColumn": 20 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-obj-calls > invalid + +```js +globalThis.Math().foo; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2020 + }, + "errors": [ + { + "messageId": "unexpectedCall", + "data": { + "name": "Math" + }, + "column": 1, + "endColumn": 18 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-obj-calls > invalid + +```js +new globalThis.Math().foo; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2020 + }, + "errors": [ + { + "messageId": "unexpectedCall", + "data": { + "name": "Math" + }, + "column": 1, + "endColumn": 22 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-obj-calls > invalid + +```js +var x = globalThis.JSON(); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2020 + }, + "errors": [ + { + "messageId": "unexpectedCall", + "data": { + "name": "JSON" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-obj-calls > invalid + +```js +x = globalThis.JSON(str); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2020 + }, + "errors": [ + { + "messageId": "unexpectedCall", + "data": { + "name": "JSON" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-obj-calls > invalid + +```js +globalThis.Math( globalThis.JSON() ); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2020 + }, + "errors": [ + { + "messageId": "unexpectedCall", + "data": { + "name": "Math" + }, + "column": 1, + "endColumn": 37 + }, + { + "messageId": "unexpectedCall", + "data": { + "name": "JSON" + }, + "column": 18, + "endColumn": 35 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 2 errors but had 0: [] + +0 !== 2 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-obj-calls > invalid + +```js +var x = globalThis.Reflect(); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2020 + }, + "errors": [ + { + "messageId": "unexpectedCall", + "data": { + "name": "Reflect" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-obj-calls > invalid + +```js +var x = new globalThis.Reflect; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2020 + }, + "errors": [ + { + "messageId": "unexpectedCall", + "data": { + "name": "Reflect" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-obj-calls > invalid + +```js +var x = globalThis.Atomics(); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2020 + }, + "errors": [ + { + "messageId": "unexpectedCall", + "data": { + "name": "Atomics" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-obj-calls > invalid + +```js +var x = globalThis.Intl(); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2020 + }, + "errors": [ + { + "messageId": "unexpectedCall", + "data": { + "name": "Intl" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-obj-calls > invalid + +```js +var x = new globalThis.Intl; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2020 + }, + "errors": [ + { + "messageId": "unexpectedCall", + "data": { + "name": "Intl" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-obj-calls > invalid + +```js +var foo = bar ? baz: JSON; foo(); +``` + +```json +{ + "errors": [ + { + "messageId": "unexpectedRefCall", + "data": { + "name": "foo", + "ref": "JSON" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-obj-calls > invalid + +```js +var foo = bar ? baz: JSON; new foo(); +``` + +```json +{ + "errors": [ + { + "messageId": "unexpectedRefCall", + "data": { + "name": "foo", + "ref": "JSON" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-obj-calls > invalid + +```js +var foo = bar ? baz: globalThis.JSON; foo(); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2020 + }, + "errors": [ + { + "messageId": "unexpectedRefCall", + "data": { + "name": "foo", + "ref": "JSON" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-obj-calls > invalid + +```js +var foo = bar ? baz: globalThis.JSON; new foo(); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2020 + }, + "errors": [ + { + "messageId": "unexpectedRefCall", + "data": { + "name": "foo", + "ref": "JSON" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-obj-calls > invalid + +```js +var foo = window.Atomics; foo(); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2020, + "globals": { + "AbortController": false, + "AbortSignal": false, + "AbsoluteOrientationSensor": false, + "AbstractRange": false, + "Accelerometer": false, + "addEventListener": false, + "ai": false, + "AI": false, + "AICreateMonitor": false, + "AITextSession": false, + "alert": false, + "AnalyserNode": false, + "Animation": false, + "AnimationEffect": false, + "AnimationEvent": false, + "AnimationPlaybackEvent": false, + "AnimationTimeline": false, + "AsyncDisposableStack": false, + "atob": false, + "Attr": false, + "Audio": false, + "AudioBuffer": false, + "AudioBufferSourceNode": false, + "AudioContext": false, + "AudioData": false, + "AudioDecoder": false, + "AudioDestinationNode": false, + "AudioEncoder": false, + "AudioListener": false, + "AudioNode": false, + "AudioParam": false, + "AudioParamMap": false, + "AudioProcessingEvent": false, + "AudioScheduledSourceNode": false, + "AudioSinkInfo": false, + "AudioWorklet": false, + "AudioWorkletGlobalScope": false, + "AudioWorkletNode": false, + "AudioWorkletProcessor": false, + "AuthenticatorAssertionResponse": false, + "AuthenticatorAttestationResponse": false, + "AuthenticatorResponse": false, + "BackgroundFetchManager": false, + "BackgroundFetchRecord": false, + "BackgroundFetchRegistration": false, + "BarcodeDetector": false, + "BarProp": false, + "BaseAudioContext": false, + "BatteryManager": false, + "BeforeUnloadEvent": false, + "BiquadFilterNode": false, + "Blob": false, + "BlobEvent": false, + "Bluetooth": false, + "BluetoothCharacteristicProperties": false, + "BluetoothDevice": false, + "BluetoothRemoteGATTCharacteristic": false, + "BluetoothRemoteGATTDescriptor": false, + "BluetoothRemoteGATTServer": false, + "BluetoothRemoteGATTService": false, + "BluetoothUUID": false, + "blur": false, + "BroadcastChannel": false, + "BrowserCaptureMediaStreamTrack": false, + "btoa": false, + "ByteLengthQueuingStrategy": false, + "Cache": false, + "caches": false, + "CacheStorage": false, + "cancelAnimationFrame": false, + "cancelIdleCallback": false, + "CanvasCaptureMediaStream": false, + "CanvasCaptureMediaStreamTrack": false, + "CanvasGradient": false, + "CanvasPattern": false, + "CanvasRenderingContext2D": false, + "CaptureController": false, + "CaretPosition": false, + "CDATASection": false, + "ChannelMergerNode": false, + "ChannelSplitterNode": false, + "ChapterInformation": false, + "CharacterBoundsUpdateEvent": false, + "CharacterData": false, + "clearInterval": false, + "clearTimeout": false, + "clientInformation": false, + "Clipboard": false, + "ClipboardChangeEvent": false, + "ClipboardEvent": false, + "ClipboardItem": false, + "close": false, + "closed": false, + "CloseEvent": false, + "CloseWatcher": false, + "CommandEvent": false, + "Comment": false, + "CompositionEvent": false, + "CompressionStream": false, + "confirm": false, + "console": false, + "ConstantSourceNode": false, + "ContentVisibilityAutoStateChangeEvent": false, + "ConvolverNode": false, + "CookieChangeEvent": false, + "CookieDeprecationLabel": false, + "cookieStore": false, + "CookieStore": false, + "CookieStoreManager": false, + "CountQueuingStrategy": false, + "createImageBitmap": false, + "CreateMonitor": false, + "Credential": false, + "credentialless": false, + "CredentialsContainer": false, + "CropTarget": false, + "crossOriginIsolated": false, + "crypto": false, + "Crypto": false, + "CryptoKey": false, + "CSPViolationReportBody": false, + "CSS": false, + "CSSAnimation": false, + "CSSConditionRule": false, + "CSSContainerRule": false, + "CSSCounterStyleRule": false, + "CSSFontFaceRule": false, + "CSSFontFeatureValuesRule": false, + "CSSFontPaletteValuesRule": false, + "CSSFunctionDeclarations": false, + "CSSFunctionDescriptors": false, + "CSSFunctionRule": false, + "CSSGroupingRule": false, + "CSSImageValue": false, + "CSSImportRule": false, + "CSSKeyframeRule": false, + "CSSKeyframesRule": false, + "CSSKeywordValue": false, + "CSSLayerBlockRule": false, + "CSSLayerStatementRule": false, + "CSSMarginRule": false, + "CSSMathClamp": false, + "CSSMathInvert": false, + "CSSMathMax": false, + "CSSMathMin": false, + "CSSMathNegate": false, + "CSSMathProduct": false, + "CSSMathSum": false, + "CSSMathValue": false, + "CSSMatrixComponent": false, + "CSSMediaRule": false, + "CSSNamespaceRule": false, + "CSSNestedDeclarations": false, + "CSSNumericArray": false, + "CSSNumericValue": false, + "CSSPageDescriptors": false, + "CSSPageRule": false, + "CSSPerspective": false, + "CSSPositionTryDescriptors": false, + "CSSPositionTryRule": false, + "CSSPositionValue": false, + "CSSPropertyRule": false, + "CSSRotate": false, + "CSSRule": false, + "CSSRuleList": false, + "CSSScale": false, + "CSSScopeRule": false, + "CSSSkew": false, + "CSSSkewX": false, + "CSSSkewY": false, + "CSSStartingStyleRule": false, + "CSSStyleDeclaration": false, + "CSSStyleRule": false, + "CSSStyleSheet": false, + "CSSStyleValue": false, + "CSSSupportsRule": false, + "CSSTransformComponent": false, + "CSSTransformValue": false, + "CSSTransition": false, + "CSSTranslate": false, + "CSSUnitValue": false, + "CSSUnparsedValue": false, + "CSSVariableReferenceValue": false, + "CSSViewTransitionRule": false, + "currentFrame": false, + "currentTime": false, + "CustomElementRegistry": false, + "customElements": false, + "CustomEvent": false, + "CustomStateSet": false, + "DataTransfer": false, + "DataTransferItem": false, + "DataTransferItemList": false, + "DecompressionStream": false, + "DelayNode": false, + "DelegatedInkTrailPresenter": false, + "DeviceMotionEvent": false, + "DeviceMotionEventAcceleration": false, + "DeviceMotionEventRotationRate": false, + "DeviceOrientationEvent": false, + "devicePixelRatio": false, + "DevicePosture": false, + "DigitalCredential": false, + "dispatchEvent": false, + "DisposableStack": false, + "document": false, + "Document": false, + "DocumentFragment": false, + "documentPictureInPicture": false, + "DocumentPictureInPicture": false, + "DocumentPictureInPictureEvent": false, + "DocumentTimeline": false, + "DocumentType": false, + "DOMError": false, + "DOMException": false, + "DOMImplementation": false, + "DOMMatrix": false, + "DOMMatrixReadOnly": false, + "DOMParser": false, + "DOMPoint": false, + "DOMPointReadOnly": false, + "DOMQuad": false, + "DOMRect": false, + "DOMRectList": false, + "DOMRectReadOnly": false, + "DOMStringList": false, + "DOMStringMap": false, + "DOMTokenList": false, + "DragEvent": false, + "DynamicsCompressorNode": false, + "EditContext": false, + "Element": false, + "ElementInternals": false, + "EncodedAudioChunk": false, + "EncodedVideoChunk": false, + "ErrorEvent": false, + "event": false, + "Event": false, + "EventCounts": false, + "EventSource": false, + "EventTarget": false, + "external": false, + "External": false, + "EyeDropper": false, + "FeaturePolicy": false, + "FederatedCredential": false, + "fence": false, + "Fence": false, + "FencedFrameConfig": false, + "fetch": false, + "fetchLater": false, + "FetchLaterResult": false, + "File": false, + "FileList": false, + "FileReader": false, + "FileSystem": false, + "FileSystemDirectoryEntry": false, + "FileSystemDirectoryHandle": false, + "FileSystemDirectoryReader": false, + "FileSystemEntry": false, + "FileSystemFileEntry": false, + "FileSystemFileHandle": false, + "FileSystemHandle": false, + "FileSystemObserver": false, + "FileSystemWritableFileStream": false, + "find": false, + "focus": false, + "FocusEvent": false, + "FontData": false, + "FontFace": false, + "FontFaceSet": false, + "FontFaceSetLoadEvent": false, + "FormData": false, + "FormDataEvent": false, + "FragmentDirective": false, + "frameElement": false, + "frames": false, + "GainNode": false, + "Gamepad": false, + "GamepadAxisMoveEvent": false, + "GamepadButton": false, + "GamepadButtonEvent": false, + "GamepadEvent": false, + "GamepadHapticActuator": false, + "GamepadPose": false, + "Geolocation": false, + "GeolocationCoordinates": false, + "GeolocationPosition": false, + "GeolocationPositionError": false, + "getComputedStyle": false, + "getScreenDetails": false, + "getSelection": false, + "GPU": false, + "GPUAdapter": false, + "GPUAdapterInfo": false, + "GPUBindGroup": false, + "GPUBindGroupLayout": false, + "GPUBuffer": false, + "GPUBufferUsage": false, + "GPUCanvasContext": false, + "GPUColorWrite": false, + "GPUCommandBuffer": false, + "GPUCommandEncoder": false, + "GPUCompilationInfo": false, + "GPUCompilationMessage": false, + "GPUComputePassEncoder": false, + "GPUComputePipeline": false, + "GPUDevice": false, + "GPUDeviceLostInfo": false, + "GPUError": false, + "GPUExternalTexture": false, + "GPUInternalError": false, + "GPUMapMode": false, + "GPUOutOfMemoryError": false, + "GPUPipelineError": false, + "GPUPipelineLayout": false, + "GPUQuerySet": false, + "GPUQueue": false, + "GPURenderBundle": false, + "GPURenderBundleEncoder": false, + "GPURenderPassEncoder": false, + "GPURenderPipeline": false, + "GPUSampler": false, + "GPUShaderModule": false, + "GPUShaderStage": false, + "GPUSupportedFeatures": false, + "GPUSupportedLimits": false, + "GPUTexture": false, + "GPUTextureUsage": false, + "GPUTextureView": false, + "GPUUncapturedErrorEvent": false, + "GPUValidationError": false, + "GravitySensor": false, + "Gyroscope": false, + "HashChangeEvent": false, + "Headers": false, + "HID": false, + "HIDConnectionEvent": false, + "HIDDevice": false, + "HIDInputReportEvent": false, + "Highlight": false, + "HighlightRegistry": false, + "history": false, + "History": false, + "HTMLAllCollection": false, + "HTMLAnchorElement": false, + "HTMLAreaElement": false, + "HTMLAudioElement": false, + "HTMLBaseElement": false, + "HTMLBodyElement": false, + "HTMLBRElement": false, + "HTMLButtonElement": false, + "HTMLCanvasElement": false, + "HTMLCollection": false, + "HTMLDataElement": false, + "HTMLDataListElement": false, + "HTMLDetailsElement": false, + "HTMLDialogElement": false, + "HTMLDirectoryElement": false, + "HTMLDivElement": false, + "HTMLDListElement": false, + "HTMLDocument": false, + "HTMLElement": false, + "HTMLEmbedElement": false, + "HTMLFencedFrameElement": false, + "HTMLFieldSetElement": false, + "HTMLFontElement": false, + "HTMLFormControlsCollection": false, + "HTMLFormElement": false, + "HTMLFrameElement": false, + "HTMLFrameSetElement": false, + "HTMLHeadElement": false, + "HTMLHeadingElement": false, + "HTMLHRElement": false, + "HTMLHtmlElement": false, + "HTMLIFrameElement": false, + "HTMLImageElement": false, + "HTMLInputElement": false, + "HTMLLabelElement": false, + "HTMLLegendElement": false, + "HTMLLIElement": false, + "HTMLLinkElement": false, + "HTMLMapElement": false, + "HTMLMarqueeElement": false, + "HTMLMediaElement": false, + "HTMLMenuElement": false, + "HTMLMetaElement": false, + "HTMLMeterElement": false, + "HTMLModElement": false, + "HTMLObjectElement": false, + "HTMLOListElement": false, + "HTMLOptGroupElement": false, + "HTMLOptionElement": false, + "HTMLOptionsCollection": false, + "HTMLOutputElement": false, + "HTMLParagraphElement": false, + "HTMLParamElement": false, + "HTMLPictureElement": false, + "HTMLPreElement": false, + "HTMLProgressElement": false, + "HTMLQuoteElement": false, + "HTMLScriptElement": false, + "HTMLSelectedContentElement": false, + "HTMLSelectElement": false, + "HTMLSlotElement": false, + "HTMLSourceElement": false, + "HTMLSpanElement": false, + "HTMLStyleElement": false, + "HTMLTableCaptionElement": false, + "HTMLTableCellElement": false, + "HTMLTableColElement": false, + "HTMLTableElement": false, + "HTMLTableRowElement": false, + "HTMLTableSectionElement": false, + "HTMLTemplateElement": false, + "HTMLTextAreaElement": false, + "HTMLTimeElement": false, + "HTMLTitleElement": false, + "HTMLTrackElement": false, + "HTMLUListElement": false, + "HTMLUnknownElement": false, + "HTMLVideoElement": false, + "IDBCursor": false, + "IDBCursorWithValue": false, + "IDBDatabase": false, + "IDBFactory": false, + "IDBIndex": false, + "IDBKeyRange": false, + "IDBObjectStore": false, + "IDBOpenDBRequest": false, + "IDBRecord": false, + "IDBRequest": false, + "IDBTransaction": false, + "IDBVersionChangeEvent": false, + "IdentityCredential": false, + "IdentityCredentialError": false, + "IdentityProvider": false, + "IdleDeadline": false, + "IdleDetector": false, + "IIRFilterNode": false, + "Image": false, + "ImageBitmap": false, + "ImageBitmapRenderingContext": false, + "ImageCapture": false, + "ImageData": false, + "ImageDecoder": false, + "ImageTrack": false, + "ImageTrackList": false, + "indexedDB": false, + "Ink": false, + "innerHeight": false, + "innerWidth": false, + "InputDeviceCapabilities": false, + "InputDeviceInfo": false, + "InputEvent": false, + "IntegrityViolationReportBody": false, + "InterestEvent": false, + "IntersectionObserver": false, + "IntersectionObserverEntry": false, + "isSecureContext": false, + "Keyboard": false, + "KeyboardEvent": false, + "KeyboardLayoutMap": false, + "KeyframeEffect": false, + "LanguageDetector": false, + "LargestContentfulPaint": false, + "LaunchParams": false, + "launchQueue": false, + "LaunchQueue": false, + "LayoutShift": false, + "LayoutShiftAttribution": false, + "length": false, + "LinearAccelerationSensor": false, + "localStorage": false, + "location": true, + "Location": false, + "locationbar": false, + "Lock": false, + "LockManager": false, + "matchMedia": false, + "MathMLElement": false, + "MediaCapabilities": false, + "MediaCapabilitiesInfo": false, + "MediaDeviceInfo": false, + "MediaDevices": false, + "MediaElementAudioSourceNode": false, + "MediaEncryptedEvent": false, + "MediaError": false, + "MediaKeyError": false, + "MediaKeyMessageEvent": false, + "MediaKeys": false, + "MediaKeySession": false, + "MediaKeyStatusMap": false, + "MediaKeySystemAccess": false, + "MediaList": false, + "MediaMetadata": false, + "MediaQueryList": false, + "MediaQueryListEvent": false, + "MediaRecorder": false, + "MediaRecorderErrorEvent": false, + "MediaSession": false, + "MediaSource": false, + "MediaSourceHandle": false, + "MediaStream": false, + "MediaStreamAudioDestinationNode": false, + "MediaStreamAudioSourceNode": false, + "MediaStreamEvent": false, + "MediaStreamTrack": false, + "MediaStreamTrackAudioSourceNode": false, + "MediaStreamTrackAudioStats": false, + "MediaStreamTrackEvent": false, + "MediaStreamTrackGenerator": false, + "MediaStreamTrackProcessor": false, + "MediaStreamTrackVideoStats": false, + "menubar": false, + "MessageChannel": false, + "MessageEvent": false, + "MessagePort": false, + "MIDIAccess": false, + "MIDIConnectionEvent": false, + "MIDIInput": false, + "MIDIInputMap": false, + "MIDIMessageEvent": false, + "MIDIOutput": false, + "MIDIOutputMap": false, + "MIDIPort": false, + "MimeType": false, + "MimeTypeArray": false, + "model": false, + "ModelGenericSession": false, + "ModelManager": false, + "MouseEvent": false, + "moveBy": false, + "moveTo": false, + "MutationEvent": false, + "MutationObserver": false, + "MutationRecord": false, + "name": false, + "NamedNodeMap": false, + "NavigateEvent": false, + "navigation": false, + "Navigation": false, + "NavigationActivation": false, + "NavigationCurrentEntryChangeEvent": false, + "NavigationDestination": false, + "NavigationHistoryEntry": false, + "NavigationPrecommitController": false, + "NavigationPreloadManager": false, + "NavigationTransition": false, + "navigator": false, + "Navigator": false, + "NavigatorLogin": false, + "NavigatorManagedData": false, + "NavigatorUAData": false, + "NetworkInformation": false, + "Node": false, + "NodeFilter": false, + "NodeIterator": false, + "NodeList": false, + "Notification": false, + "NotifyPaintEvent": false, + "NotRestoredReasonDetails": false, + "NotRestoredReasons": false, + "Observable": false, + "OfflineAudioCompletionEvent": false, + "OfflineAudioContext": false, + "offscreenBuffering": false, + "OffscreenCanvas": false, + "OffscreenCanvasRenderingContext2D": false, + "onabort": true, + "onafterprint": true, + "onanimationcancel": true, + "onanimationend": true, + "onanimationiteration": true, + "onanimationstart": true, + "onappinstalled": true, + "onauxclick": true, + "onbeforeinput": true, + "onbeforeinstallprompt": true, + "onbeforematch": true, + "onbeforeprint": true, + "onbeforetoggle": true, + "onbeforeunload": true, + "onbeforexrselect": true, + "onblur": true, + "oncancel": true, + "oncanplay": true, + "oncanplaythrough": true, + "onchange": true, + "onclick": true, + "onclose": true, + "oncommand": true, + "oncontentvisibilityautostatechange": true, + "oncontextlost": true, + "oncontextmenu": true, + "oncontextrestored": true, + "oncopy": true, + "oncuechange": true, + "oncut": true, + "ondblclick": true, + "ondevicemotion": true, + "ondeviceorientation": true, + "ondeviceorientationabsolute": true, + "ondrag": true, + "ondragend": true, + "ondragenter": true, + "ondragleave": true, + "ondragover": true, + "ondragstart": true, + "ondrop": true, + "ondurationchange": true, + "onemptied": true, + "onended": true, + "onerror": true, + "onfocus": true, + "onformdata": true, + "ongamepadconnected": true, + "ongamepaddisconnected": true, + "ongotpointercapture": true, + "onhashchange": true, + "oninput": true, + "oninvalid": true, + "onkeydown": true, + "onkeypress": true, + "onkeyup": true, + "onlanguagechange": true, + "onload": true, + "onloadeddata": true, + "onloadedmetadata": true, + "onloadstart": true, + "onlostpointercapture": true, + "onmessage": true, + "onmessageerror": true, + "onmousedown": true, + "onmouseenter": true, + "onmouseleave": true, + "onmousemove": true, + "onmouseout": true, + "onmouseover": true, + "onmouseup": true, + "onmousewheel": true, + "onoffline": true, + "ononline": true, + "onpagehide": true, + "onpagereveal": true, + "onpageshow": true, + "onpageswap": true, + "onpaste": true, + "onpause": true, + "onplay": true, + "onplaying": true, + "onpointercancel": true, + "onpointerdown": true, + "onpointerenter": true, + "onpointerleave": true, + "onpointermove": true, + "onpointerout": true, + "onpointerover": true, + "onpointerrawupdate": true, + "onpointerup": true, + "onpopstate": true, + "onprogress": true, + "onratechange": true, + "onrejectionhandled": true, + "onreset": true, + "onresize": true, + "onscroll": true, + "onscrollend": true, + "onscrollsnapchange": true, + "onscrollsnapchanging": true, + "onsearch": true, + "onsecuritypolicyviolation": true, + "onseeked": true, + "onseeking": true, + "onselect": true, + "onselectionchange": true, + "onselectstart": true, + "onslotchange": true, + "onstalled": true, + "onstorage": true, + "onsubmit": true, + "onsuspend": true, + "ontimeupdate": true, + "ontoggle": true, + "ontransitioncancel": true, + "ontransitionend": true, + "ontransitionrun": true, + "ontransitionstart": true, + "onunhandledrejection": true, + "onunload": true, + "onvolumechange": true, + "onwaiting": true, + "onwheel": true, + "open": false, + "opener": false, + "Option": false, + "OrientationSensor": false, + "origin": false, + "originAgentCluster": false, + "OscillatorNode": false, + "OTPCredential": false, + "outerHeight": false, + "outerWidth": false, + "OverconstrainedError": false, + "PageRevealEvent": false, + "PageSwapEvent": false, + "PageTransitionEvent": false, + "pageXOffset": false, + "pageYOffset": false, + "PannerNode": false, + "parent": false, + "PasswordCredential": false, + "Path2D": false, + "PaymentAddress": false, + "PaymentManager": false, + "PaymentMethodChangeEvent": false, + "PaymentRequest": false, + "PaymentRequestUpdateEvent": false, + "PaymentResponse": false, + "performance": false, + "Performance": false, + "PerformanceElementTiming": false, + "PerformanceEntry": false, + "PerformanceEventTiming": false, + "PerformanceLongAnimationFrameTiming": false, + "PerformanceLongTaskTiming": false, + "PerformanceMark": false, + "PerformanceMeasure": false, + "PerformanceNavigation": false, + "PerformanceNavigationTiming": false, + "PerformanceObserver": false, + "PerformanceObserverEntryList": false, + "PerformancePaintTiming": false, + "PerformanceResourceTiming": false, + "PerformanceScriptTiming": false, + "PerformanceServerTiming": false, + "PerformanceTiming": false, + "PeriodicSyncManager": false, + "PeriodicWave": false, + "Permissions": false, + "PermissionStatus": false, + "PERSISTENT": false, + "personalbar": false, + "PictureInPictureEvent": false, + "PictureInPictureWindow": false, + "Plugin": false, + "PluginArray": false, + "PointerEvent": false, + "PopStateEvent": false, + "postMessage": false, + "Presentation": false, + "PresentationAvailability": false, + "PresentationConnection": false, + "PresentationConnectionAvailableEvent": false, + "PresentationConnectionCloseEvent": false, + "PresentationConnectionList": false, + "PresentationReceiver": false, + "PresentationRequest": false, + "PressureObserver": false, + "PressureRecord": false, + "print": false, + "ProcessingInstruction": false, + "Profiler": false, + "ProgressEvent": false, + "PromiseRejectionEvent": false, + "prompt": false, + "ProtectedAudience": false, + "PublicKeyCredential": false, + "PushManager": false, + "PushSubscription": false, + "PushSubscriptionOptions": false, + "queryLocalFonts": false, + "queueMicrotask": false, + "QuotaExceededError": false, + "RadioNodeList": false, + "Range": false, + "ReadableByteStreamController": false, + "ReadableStream": false, + "ReadableStreamBYOBReader": false, + "ReadableStreamBYOBRequest": false, + "ReadableStreamDefaultController": false, + "ReadableStreamDefaultReader": false, + "registerProcessor": false, + "RelativeOrientationSensor": false, + "RemotePlayback": false, + "removeEventListener": false, + "ReportBody": false, + "reportError": false, + "ReportingObserver": false, + "Request": false, + "requestAnimationFrame": false, + "requestIdleCallback": false, + "resizeBy": false, + "ResizeObserver": false, + "ResizeObserverEntry": false, + "ResizeObserverSize": false, + "resizeTo": false, + "Response": false, + "RestrictionTarget": false, + "RTCCertificate": false, + "RTCDataChannel": false, + "RTCDataChannelEvent": false, + "RTCDtlsTransport": false, + "RTCDTMFSender": false, + "RTCDTMFToneChangeEvent": false, + "RTCEncodedAudioFrame": false, + "RTCEncodedVideoFrame": false, + "RTCError": false, + "RTCErrorEvent": false, + "RTCIceCandidate": false, + "RTCIceTransport": false, + "RTCPeerConnection": false, + "RTCPeerConnectionIceErrorEvent": false, + "RTCPeerConnectionIceEvent": false, + "RTCRtpReceiver": false, + "RTCRtpScriptTransform": false, + "RTCRtpSender": false, + "RTCRtpTransceiver": false, + "RTCSctpTransport": false, + "RTCSessionDescription": false, + "RTCStatsReport": false, + "RTCTrackEvent": false, + "sampleRate": false, + "scheduler": false, + "Scheduler": false, + "Scheduling": false, + "screen": false, + "Screen": false, + "ScreenDetailed": false, + "ScreenDetails": false, + "screenLeft": false, + "ScreenOrientation": false, + "screenTop": false, + "screenX": false, + "screenY": false, + "ScriptProcessorNode": false, + "scroll": false, + "scrollbars": false, + "scrollBy": false, + "ScrollTimeline": false, + "scrollTo": false, + "scrollX": false, + "scrollY": false, + "SecurityPolicyViolationEvent": false, + "Selection": false, + "self": false, + "Sensor": false, + "SensorErrorEvent": false, + "Serial": false, + "SerialPort": false, + "ServiceWorker": false, + "ServiceWorkerContainer": false, + "ServiceWorkerRegistration": false, + "sessionStorage": false, + "setInterval": false, + "setTimeout": false, + "ShadowRoot": false, + "sharedStorage": false, + "SharedStorage": false, + "SharedStorageAppendMethod": false, + "SharedStorageClearMethod": false, + "SharedStorageDeleteMethod": false, + "SharedStorageModifierMethod": false, + "SharedStorageSetMethod": false, + "SharedStorageWorklet": false, + "SharedWorker": false, + "showDirectoryPicker": false, + "showOpenFilePicker": false, + "showSaveFilePicker": false, + "SnapEvent": false, + "SourceBuffer": false, + "SourceBufferList": false, + "SpeechGrammar": false, + "SpeechGrammarList": false, + "SpeechRecognition": false, + "SpeechRecognitionErrorEvent": false, + "SpeechRecognitionEvent": false, + "SpeechRecognitionPhrase": false, + "speechSynthesis": false, + "SpeechSynthesis": false, + "SpeechSynthesisErrorEvent": false, + "SpeechSynthesisEvent": false, + "SpeechSynthesisUtterance": false, + "SpeechSynthesisVoice": false, + "StaticRange": false, + "status": false, + "statusbar": false, + "StereoPannerNode": false, + "stop": false, + "Storage": false, + "StorageBucket": false, + "StorageBucketManager": false, + "StorageEvent": false, + "StorageManager": false, + "structuredClone": false, + "styleMedia": false, + "StylePropertyMap": false, + "StylePropertyMapReadOnly": false, + "StyleSheet": false, + "StyleSheetList": false, + "SubmitEvent": false, + "Subscriber": false, + "SubtleCrypto": false, + "Summarizer": false, + "SuppressedError": false, + "SVGAElement": false, + "SVGAngle": false, + "SVGAnimatedAngle": false, + "SVGAnimatedBoolean": false, + "SVGAnimatedEnumeration": false, + "SVGAnimatedInteger": false, + "SVGAnimatedLength": false, + "SVGAnimatedLengthList": false, + "SVGAnimatedNumber": false, + "SVGAnimatedNumberList": false, + "SVGAnimatedPreserveAspectRatio": false, + "SVGAnimatedRect": false, + "SVGAnimatedString": false, + "SVGAnimatedTransformList": false, + "SVGAnimateElement": false, + "SVGAnimateMotionElement": false, + "SVGAnimateTransformElement": false, + "SVGAnimationElement": false, + "SVGCircleElement": false, + "SVGClipPathElement": false, + "SVGComponentTransferFunctionElement": false, + "SVGDefsElement": false, + "SVGDescElement": false, + "SVGElement": false, + "SVGEllipseElement": false, + "SVGFEBlendElement": false, + "SVGFEColorMatrixElement": false, + "SVGFEComponentTransferElement": false, + "SVGFECompositeElement": false, + "SVGFEConvolveMatrixElement": false, + "SVGFEDiffuseLightingElement": false, + "SVGFEDisplacementMapElement": false, + "SVGFEDistantLightElement": false, + "SVGFEDropShadowElement": false, + "SVGFEFloodElement": false, + "SVGFEFuncAElement": false, + "SVGFEFuncBElement": false, + "SVGFEFuncGElement": false, + "SVGFEFuncRElement": false, + "SVGFEGaussianBlurElement": false, + "SVGFEImageElement": false, + "SVGFEMergeElement": false, + "SVGFEMergeNodeElement": false, + "SVGFEMorphologyElement": false, + "SVGFEOffsetElement": false, + "SVGFEPointLightElement": false, + "SVGFESpecularLightingElement": false, + "SVGFESpotLightElement": false, + "SVGFETileElement": false, + "SVGFETurbulenceElement": false, + "SVGFilterElement": false, + "SVGForeignObjectElement": false, + "SVGGElement": false, + "SVGGeometryElement": false, + "SVGGradientElement": false, + "SVGGraphicsElement": false, + "SVGImageElement": false, + "SVGLength": false, + "SVGLengthList": false, + "SVGLinearGradientElement": false, + "SVGLineElement": false, + "SVGMarkerElement": false, + "SVGMaskElement": false, + "SVGMatrix": false, + "SVGMetadataElement": false, + "SVGMPathElement": false, + "SVGNumber": false, + "SVGNumberList": false, + "SVGPathElement": false, + "SVGPatternElement": false, + "SVGPoint": false, + "SVGPointList": false, + "SVGPolygonElement": false, + "SVGPolylineElement": false, + "SVGPreserveAspectRatio": false, + "SVGRadialGradientElement": false, + "SVGRect": false, + "SVGRectElement": false, + "SVGScriptElement": false, + "SVGSetElement": false, + "SVGStopElement": false, + "SVGStringList": false, + "SVGStyleElement": false, + "SVGSVGElement": false, + "SVGSwitchElement": false, + "SVGSymbolElement": false, + "SVGTextContentElement": false, + "SVGTextElement": false, + "SVGTextPathElement": false, + "SVGTextPositioningElement": false, + "SVGTitleElement": false, + "SVGTransform": false, + "SVGTransformList": false, + "SVGTSpanElement": false, + "SVGUnitTypes": false, + "SVGUseElement": false, + "SVGViewElement": false, + "SyncManager": false, + "TaskAttributionTiming": false, + "TaskController": false, + "TaskPriorityChangeEvent": false, + "TaskSignal": false, + "TEMPORARY": false, + "Text": false, + "TextDecoder": false, + "TextDecoderStream": false, + "TextEncoder": false, + "TextEncoderStream": false, + "TextEvent": false, + "TextFormat": false, + "TextFormatUpdateEvent": false, + "TextMetrics": false, + "TextTrack": false, + "TextTrackCue": false, + "TextTrackCueList": false, + "TextTrackList": false, + "TextUpdateEvent": false, + "TimeEvent": false, + "TimeRanges": false, + "ToggleEvent": false, + "toolbar": false, + "top": false, + "Touch": false, + "TouchEvent": false, + "TouchList": false, + "TrackEvent": false, + "TransformStream": false, + "TransformStreamDefaultController": false, + "TransitionEvent": false, + "Translator": false, + "TreeWalker": false, + "TrustedHTML": false, + "TrustedScript": false, + "TrustedScriptURL": false, + "TrustedTypePolicy": false, + "TrustedTypePolicyFactory": false, + "trustedTypes": false, + "UIEvent": false, + "URL": false, + "URLPattern": false, + "URLSearchParams": false, + "USB": false, + "USBAlternateInterface": false, + "USBConfiguration": false, + "USBConnectionEvent": false, + "USBDevice": false, + "USBEndpoint": false, + "USBInterface": false, + "USBInTransferResult": false, + "USBIsochronousInTransferPacket": false, + "USBIsochronousInTransferResult": false, + "USBIsochronousOutTransferPacket": false, + "USBIsochronousOutTransferResult": false, + "USBOutTransferResult": false, + "UserActivation": false, + "ValidityState": false, + "VideoColorSpace": false, + "VideoDecoder": false, + "VideoEncoder": false, + "VideoFrame": false, + "VideoPlaybackQuality": false, + "viewport": false, + "Viewport": false, + "ViewTimeline": false, + "ViewTransition": false, + "ViewTransitionTypeSet": false, + "VirtualKeyboard": false, + "VirtualKeyboardGeometryChangeEvent": false, + "VisibilityStateEntry": false, + "visualViewport": false, + "VisualViewport": false, + "VTTCue": false, + "VTTRegion": false, + "WakeLock": false, + "WakeLockSentinel": false, + "WaveShaperNode": false, + "WebAssembly": false, + "WebGL2RenderingContext": false, + "WebGLActiveInfo": false, + "WebGLBuffer": false, + "WebGLContextEvent": false, + "WebGLFramebuffer": false, + "WebGLObject": false, + "WebGLProgram": false, + "WebGLQuery": false, + "WebGLRenderbuffer": false, + "WebGLRenderingContext": false, + "WebGLSampler": false, + "WebGLShader": false, + "WebGLShaderPrecisionFormat": false, + "WebGLSync": false, + "WebGLTexture": false, + "WebGLTransformFeedback": false, + "WebGLUniformLocation": false, + "WebGLVertexArrayObject": false, + "WebSocket": false, + "WebSocketError": false, + "WebSocketStream": false, + "WebTransport": false, + "WebTransportBidirectionalStream": false, + "WebTransportDatagramDuplexStream": false, + "WebTransportError": false, + "WebTransportReceiveStream": false, + "WebTransportSendStream": false, + "WGSLLanguageFeatures": false, + "WheelEvent": false, + "when": false, + "window": false, + "Window": false, + "WindowControlsOverlay": false, + "WindowControlsOverlayGeometryChangeEvent": false, + "Worker": false, + "Worklet": false, + "WorkletGlobalScope": false, + "WritableStream": false, + "WritableStreamDefaultController": false, + "WritableStreamDefaultWriter": false, + "XMLDocument": false, + "XMLHttpRequest": false, + "XMLHttpRequestEventTarget": false, + "XMLHttpRequestUpload": false, + "XMLSerializer": false, + "XPathEvaluator": false, + "XPathExpression": false, + "XPathResult": false, + "XRAnchor": false, + "XRAnchorSet": false, + "XRBoundedReferenceSpace": false, + "XRCamera": false, + "XRCPUDepthInformation": false, + "XRDepthInformation": false, + "XRDOMOverlayState": false, + "XRFrame": false, + "XRHand": false, + "XRHitTestResult": false, + "XRHitTestSource": false, + "XRInputSource": false, + "XRInputSourceArray": false, + "XRInputSourceEvent": false, + "XRInputSourcesChangeEvent": false, + "XRJointPose": false, + "XRJointSpace": false, + "XRLayer": false, + "XRLightEstimate": false, + "XRLightProbe": false, + "XRPose": false, + "XRRay": false, + "XRReferenceSpace": false, + "XRReferenceSpaceEvent": false, + "XRRenderState": false, + "XRRigidTransform": false, + "XRSession": false, + "XRSessionEvent": false, + "XRSpace": false, + "XRSystem": false, + "XRTransientInputHitTestResult": false, + "XRTransientInputHitTestSource": false, + "XRView": false, + "XRViewerPose": false, + "XRViewport": false, + "XRWebGLBinding": false, + "XRWebGLDepthInformation": false, + "XRWebGLLayer": false, + "XSLTProcessor": false + } + }, + "errors": [ + { + "messageId": "unexpectedRefCall", + "data": { + "name": "foo", + "ref": "Atomics" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-obj-calls > invalid + +```js +var foo = window.Atomics; new foo; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2020, + "globals": { + "AbortController": false, + "AbortSignal": false, + "AbsoluteOrientationSensor": false, + "AbstractRange": false, + "Accelerometer": false, + "addEventListener": false, + "ai": false, + "AI": false, + "AICreateMonitor": false, + "AITextSession": false, + "alert": false, + "AnalyserNode": false, + "Animation": false, + "AnimationEffect": false, + "AnimationEvent": false, + "AnimationPlaybackEvent": false, + "AnimationTimeline": false, + "AsyncDisposableStack": false, + "atob": false, + "Attr": false, + "Audio": false, + "AudioBuffer": false, + "AudioBufferSourceNode": false, + "AudioContext": false, + "AudioData": false, + "AudioDecoder": false, + "AudioDestinationNode": false, + "AudioEncoder": false, + "AudioListener": false, + "AudioNode": false, + "AudioParam": false, + "AudioParamMap": false, + "AudioProcessingEvent": false, + "AudioScheduledSourceNode": false, + "AudioSinkInfo": false, + "AudioWorklet": false, + "AudioWorkletGlobalScope": false, + "AudioWorkletNode": false, + "AudioWorkletProcessor": false, + "AuthenticatorAssertionResponse": false, + "AuthenticatorAttestationResponse": false, + "AuthenticatorResponse": false, + "BackgroundFetchManager": false, + "BackgroundFetchRecord": false, + "BackgroundFetchRegistration": false, + "BarcodeDetector": false, + "BarProp": false, + "BaseAudioContext": false, + "BatteryManager": false, + "BeforeUnloadEvent": false, + "BiquadFilterNode": false, + "Blob": false, + "BlobEvent": false, + "Bluetooth": false, + "BluetoothCharacteristicProperties": false, + "BluetoothDevice": false, + "BluetoothRemoteGATTCharacteristic": false, + "BluetoothRemoteGATTDescriptor": false, + "BluetoothRemoteGATTServer": false, + "BluetoothRemoteGATTService": false, + "BluetoothUUID": false, + "blur": false, + "BroadcastChannel": false, + "BrowserCaptureMediaStreamTrack": false, + "btoa": false, + "ByteLengthQueuingStrategy": false, + "Cache": false, + "caches": false, + "CacheStorage": false, + "cancelAnimationFrame": false, + "cancelIdleCallback": false, + "CanvasCaptureMediaStream": false, + "CanvasCaptureMediaStreamTrack": false, + "CanvasGradient": false, + "CanvasPattern": false, + "CanvasRenderingContext2D": false, + "CaptureController": false, + "CaretPosition": false, + "CDATASection": false, + "ChannelMergerNode": false, + "ChannelSplitterNode": false, + "ChapterInformation": false, + "CharacterBoundsUpdateEvent": false, + "CharacterData": false, + "clearInterval": false, + "clearTimeout": false, + "clientInformation": false, + "Clipboard": false, + "ClipboardChangeEvent": false, + "ClipboardEvent": false, + "ClipboardItem": false, + "close": false, + "closed": false, + "CloseEvent": false, + "CloseWatcher": false, + "CommandEvent": false, + "Comment": false, + "CompositionEvent": false, + "CompressionStream": false, + "confirm": false, + "console": false, + "ConstantSourceNode": false, + "ContentVisibilityAutoStateChangeEvent": false, + "ConvolverNode": false, + "CookieChangeEvent": false, + "CookieDeprecationLabel": false, + "cookieStore": false, + "CookieStore": false, + "CookieStoreManager": false, + "CountQueuingStrategy": false, + "createImageBitmap": false, + "CreateMonitor": false, + "Credential": false, + "credentialless": false, + "CredentialsContainer": false, + "CropTarget": false, + "crossOriginIsolated": false, + "crypto": false, + "Crypto": false, + "CryptoKey": false, + "CSPViolationReportBody": false, + "CSS": false, + "CSSAnimation": false, + "CSSConditionRule": false, + "CSSContainerRule": false, + "CSSCounterStyleRule": false, + "CSSFontFaceRule": false, + "CSSFontFeatureValuesRule": false, + "CSSFontPaletteValuesRule": false, + "CSSFunctionDeclarations": false, + "CSSFunctionDescriptors": false, + "CSSFunctionRule": false, + "CSSGroupingRule": false, + "CSSImageValue": false, + "CSSImportRule": false, + "CSSKeyframeRule": false, + "CSSKeyframesRule": false, + "CSSKeywordValue": false, + "CSSLayerBlockRule": false, + "CSSLayerStatementRule": false, + "CSSMarginRule": false, + "CSSMathClamp": false, + "CSSMathInvert": false, + "CSSMathMax": false, + "CSSMathMin": false, + "CSSMathNegate": false, + "CSSMathProduct": false, + "CSSMathSum": false, + "CSSMathValue": false, + "CSSMatrixComponent": false, + "CSSMediaRule": false, + "CSSNamespaceRule": false, + "CSSNestedDeclarations": false, + "CSSNumericArray": false, + "CSSNumericValue": false, + "CSSPageDescriptors": false, + "CSSPageRule": false, + "CSSPerspective": false, + "CSSPositionTryDescriptors": false, + "CSSPositionTryRule": false, + "CSSPositionValue": false, + "CSSPropertyRule": false, + "CSSRotate": false, + "CSSRule": false, + "CSSRuleList": false, + "CSSScale": false, + "CSSScopeRule": false, + "CSSSkew": false, + "CSSSkewX": false, + "CSSSkewY": false, + "CSSStartingStyleRule": false, + "CSSStyleDeclaration": false, + "CSSStyleRule": false, + "CSSStyleSheet": false, + "CSSStyleValue": false, + "CSSSupportsRule": false, + "CSSTransformComponent": false, + "CSSTransformValue": false, + "CSSTransition": false, + "CSSTranslate": false, + "CSSUnitValue": false, + "CSSUnparsedValue": false, + "CSSVariableReferenceValue": false, + "CSSViewTransitionRule": false, + "currentFrame": false, + "currentTime": false, + "CustomElementRegistry": false, + "customElements": false, + "CustomEvent": false, + "CustomStateSet": false, + "DataTransfer": false, + "DataTransferItem": false, + "DataTransferItemList": false, + "DecompressionStream": false, + "DelayNode": false, + "DelegatedInkTrailPresenter": false, + "DeviceMotionEvent": false, + "DeviceMotionEventAcceleration": false, + "DeviceMotionEventRotationRate": false, + "DeviceOrientationEvent": false, + "devicePixelRatio": false, + "DevicePosture": false, + "DigitalCredential": false, + "dispatchEvent": false, + "DisposableStack": false, + "document": false, + "Document": false, + "DocumentFragment": false, + "documentPictureInPicture": false, + "DocumentPictureInPicture": false, + "DocumentPictureInPictureEvent": false, + "DocumentTimeline": false, + "DocumentType": false, + "DOMError": false, + "DOMException": false, + "DOMImplementation": false, + "DOMMatrix": false, + "DOMMatrixReadOnly": false, + "DOMParser": false, + "DOMPoint": false, + "DOMPointReadOnly": false, + "DOMQuad": false, + "DOMRect": false, + "DOMRectList": false, + "DOMRectReadOnly": false, + "DOMStringList": false, + "DOMStringMap": false, + "DOMTokenList": false, + "DragEvent": false, + "DynamicsCompressorNode": false, + "EditContext": false, + "Element": false, + "ElementInternals": false, + "EncodedAudioChunk": false, + "EncodedVideoChunk": false, + "ErrorEvent": false, + "event": false, + "Event": false, + "EventCounts": false, + "EventSource": false, + "EventTarget": false, + "external": false, + "External": false, + "EyeDropper": false, + "FeaturePolicy": false, + "FederatedCredential": false, + "fence": false, + "Fence": false, + "FencedFrameConfig": false, + "fetch": false, + "fetchLater": false, + "FetchLaterResult": false, + "File": false, + "FileList": false, + "FileReader": false, + "FileSystem": false, + "FileSystemDirectoryEntry": false, + "FileSystemDirectoryHandle": false, + "FileSystemDirectoryReader": false, + "FileSystemEntry": false, + "FileSystemFileEntry": false, + "FileSystemFileHandle": false, + "FileSystemHandle": false, + "FileSystemObserver": false, + "FileSystemWritableFileStream": false, + "find": false, + "focus": false, + "FocusEvent": false, + "FontData": false, + "FontFace": false, + "FontFaceSet": false, + "FontFaceSetLoadEvent": false, + "FormData": false, + "FormDataEvent": false, + "FragmentDirective": false, + "frameElement": false, + "frames": false, + "GainNode": false, + "Gamepad": false, + "GamepadAxisMoveEvent": false, + "GamepadButton": false, + "GamepadButtonEvent": false, + "GamepadEvent": false, + "GamepadHapticActuator": false, + "GamepadPose": false, + "Geolocation": false, + "GeolocationCoordinates": false, + "GeolocationPosition": false, + "GeolocationPositionError": false, + "getComputedStyle": false, + "getScreenDetails": false, + "getSelection": false, + "GPU": false, + "GPUAdapter": false, + "GPUAdapterInfo": false, + "GPUBindGroup": false, + "GPUBindGroupLayout": false, + "GPUBuffer": false, + "GPUBufferUsage": false, + "GPUCanvasContext": false, + "GPUColorWrite": false, + "GPUCommandBuffer": false, + "GPUCommandEncoder": false, + "GPUCompilationInfo": false, + "GPUCompilationMessage": false, + "GPUComputePassEncoder": false, + "GPUComputePipeline": false, + "GPUDevice": false, + "GPUDeviceLostInfo": false, + "GPUError": false, + "GPUExternalTexture": false, + "GPUInternalError": false, + "GPUMapMode": false, + "GPUOutOfMemoryError": false, + "GPUPipelineError": false, + "GPUPipelineLayout": false, + "GPUQuerySet": false, + "GPUQueue": false, + "GPURenderBundle": false, + "GPURenderBundleEncoder": false, + "GPURenderPassEncoder": false, + "GPURenderPipeline": false, + "GPUSampler": false, + "GPUShaderModule": false, + "GPUShaderStage": false, + "GPUSupportedFeatures": false, + "GPUSupportedLimits": false, + "GPUTexture": false, + "GPUTextureUsage": false, + "GPUTextureView": false, + "GPUUncapturedErrorEvent": false, + "GPUValidationError": false, + "GravitySensor": false, + "Gyroscope": false, + "HashChangeEvent": false, + "Headers": false, + "HID": false, + "HIDConnectionEvent": false, + "HIDDevice": false, + "HIDInputReportEvent": false, + "Highlight": false, + "HighlightRegistry": false, + "history": false, + "History": false, + "HTMLAllCollection": false, + "HTMLAnchorElement": false, + "HTMLAreaElement": false, + "HTMLAudioElement": false, + "HTMLBaseElement": false, + "HTMLBodyElement": false, + "HTMLBRElement": false, + "HTMLButtonElement": false, + "HTMLCanvasElement": false, + "HTMLCollection": false, + "HTMLDataElement": false, + "HTMLDataListElement": false, + "HTMLDetailsElement": false, + "HTMLDialogElement": false, + "HTMLDirectoryElement": false, + "HTMLDivElement": false, + "HTMLDListElement": false, + "HTMLDocument": false, + "HTMLElement": false, + "HTMLEmbedElement": false, + "HTMLFencedFrameElement": false, + "HTMLFieldSetElement": false, + "HTMLFontElement": false, + "HTMLFormControlsCollection": false, + "HTMLFormElement": false, + "HTMLFrameElement": false, + "HTMLFrameSetElement": false, + "HTMLHeadElement": false, + "HTMLHeadingElement": false, + "HTMLHRElement": false, + "HTMLHtmlElement": false, + "HTMLIFrameElement": false, + "HTMLImageElement": false, + "HTMLInputElement": false, + "HTMLLabelElement": false, + "HTMLLegendElement": false, + "HTMLLIElement": false, + "HTMLLinkElement": false, + "HTMLMapElement": false, + "HTMLMarqueeElement": false, + "HTMLMediaElement": false, + "HTMLMenuElement": false, + "HTMLMetaElement": false, + "HTMLMeterElement": false, + "HTMLModElement": false, + "HTMLObjectElement": false, + "HTMLOListElement": false, + "HTMLOptGroupElement": false, + "HTMLOptionElement": false, + "HTMLOptionsCollection": false, + "HTMLOutputElement": false, + "HTMLParagraphElement": false, + "HTMLParamElement": false, + "HTMLPictureElement": false, + "HTMLPreElement": false, + "HTMLProgressElement": false, + "HTMLQuoteElement": false, + "HTMLScriptElement": false, + "HTMLSelectedContentElement": false, + "HTMLSelectElement": false, + "HTMLSlotElement": false, + "HTMLSourceElement": false, + "HTMLSpanElement": false, + "HTMLStyleElement": false, + "HTMLTableCaptionElement": false, + "HTMLTableCellElement": false, + "HTMLTableColElement": false, + "HTMLTableElement": false, + "HTMLTableRowElement": false, + "HTMLTableSectionElement": false, + "HTMLTemplateElement": false, + "HTMLTextAreaElement": false, + "HTMLTimeElement": false, + "HTMLTitleElement": false, + "HTMLTrackElement": false, + "HTMLUListElement": false, + "HTMLUnknownElement": false, + "HTMLVideoElement": false, + "IDBCursor": false, + "IDBCursorWithValue": false, + "IDBDatabase": false, + "IDBFactory": false, + "IDBIndex": false, + "IDBKeyRange": false, + "IDBObjectStore": false, + "IDBOpenDBRequest": false, + "IDBRecord": false, + "IDBRequest": false, + "IDBTransaction": false, + "IDBVersionChangeEvent": false, + "IdentityCredential": false, + "IdentityCredentialError": false, + "IdentityProvider": false, + "IdleDeadline": false, + "IdleDetector": false, + "IIRFilterNode": false, + "Image": false, + "ImageBitmap": false, + "ImageBitmapRenderingContext": false, + "ImageCapture": false, + "ImageData": false, + "ImageDecoder": false, + "ImageTrack": false, + "ImageTrackList": false, + "indexedDB": false, + "Ink": false, + "innerHeight": false, + "innerWidth": false, + "InputDeviceCapabilities": false, + "InputDeviceInfo": false, + "InputEvent": false, + "IntegrityViolationReportBody": false, + "InterestEvent": false, + "IntersectionObserver": false, + "IntersectionObserverEntry": false, + "isSecureContext": false, + "Keyboard": false, + "KeyboardEvent": false, + "KeyboardLayoutMap": false, + "KeyframeEffect": false, + "LanguageDetector": false, + "LargestContentfulPaint": false, + "LaunchParams": false, + "launchQueue": false, + "LaunchQueue": false, + "LayoutShift": false, + "LayoutShiftAttribution": false, + "length": false, + "LinearAccelerationSensor": false, + "localStorage": false, + "location": true, + "Location": false, + "locationbar": false, + "Lock": false, + "LockManager": false, + "matchMedia": false, + "MathMLElement": false, + "MediaCapabilities": false, + "MediaCapabilitiesInfo": false, + "MediaDeviceInfo": false, + "MediaDevices": false, + "MediaElementAudioSourceNode": false, + "MediaEncryptedEvent": false, + "MediaError": false, + "MediaKeyError": false, + "MediaKeyMessageEvent": false, + "MediaKeys": false, + "MediaKeySession": false, + "MediaKeyStatusMap": false, + "MediaKeySystemAccess": false, + "MediaList": false, + "MediaMetadata": false, + "MediaQueryList": false, + "MediaQueryListEvent": false, + "MediaRecorder": false, + "MediaRecorderErrorEvent": false, + "MediaSession": false, + "MediaSource": false, + "MediaSourceHandle": false, + "MediaStream": false, + "MediaStreamAudioDestinationNode": false, + "MediaStreamAudioSourceNode": false, + "MediaStreamEvent": false, + "MediaStreamTrack": false, + "MediaStreamTrackAudioSourceNode": false, + "MediaStreamTrackAudioStats": false, + "MediaStreamTrackEvent": false, + "MediaStreamTrackGenerator": false, + "MediaStreamTrackProcessor": false, + "MediaStreamTrackVideoStats": false, + "menubar": false, + "MessageChannel": false, + "MessageEvent": false, + "MessagePort": false, + "MIDIAccess": false, + "MIDIConnectionEvent": false, + "MIDIInput": false, + "MIDIInputMap": false, + "MIDIMessageEvent": false, + "MIDIOutput": false, + "MIDIOutputMap": false, + "MIDIPort": false, + "MimeType": false, + "MimeTypeArray": false, + "model": false, + "ModelGenericSession": false, + "ModelManager": false, + "MouseEvent": false, + "moveBy": false, + "moveTo": false, + "MutationEvent": false, + "MutationObserver": false, + "MutationRecord": false, + "name": false, + "NamedNodeMap": false, + "NavigateEvent": false, + "navigation": false, + "Navigation": false, + "NavigationActivation": false, + "NavigationCurrentEntryChangeEvent": false, + "NavigationDestination": false, + "NavigationHistoryEntry": false, + "NavigationPrecommitController": false, + "NavigationPreloadManager": false, + "NavigationTransition": false, + "navigator": false, + "Navigator": false, + "NavigatorLogin": false, + "NavigatorManagedData": false, + "NavigatorUAData": false, + "NetworkInformation": false, + "Node": false, + "NodeFilter": false, + "NodeIterator": false, + "NodeList": false, + "Notification": false, + "NotifyPaintEvent": false, + "NotRestoredReasonDetails": false, + "NotRestoredReasons": false, + "Observable": false, + "OfflineAudioCompletionEvent": false, + "OfflineAudioContext": false, + "offscreenBuffering": false, + "OffscreenCanvas": false, + "OffscreenCanvasRenderingContext2D": false, + "onabort": true, + "onafterprint": true, + "onanimationcancel": true, + "onanimationend": true, + "onanimationiteration": true, + "onanimationstart": true, + "onappinstalled": true, + "onauxclick": true, + "onbeforeinput": true, + "onbeforeinstallprompt": true, + "onbeforematch": true, + "onbeforeprint": true, + "onbeforetoggle": true, + "onbeforeunload": true, + "onbeforexrselect": true, + "onblur": true, + "oncancel": true, + "oncanplay": true, + "oncanplaythrough": true, + "onchange": true, + "onclick": true, + "onclose": true, + "oncommand": true, + "oncontentvisibilityautostatechange": true, + "oncontextlost": true, + "oncontextmenu": true, + "oncontextrestored": true, + "oncopy": true, + "oncuechange": true, + "oncut": true, + "ondblclick": true, + "ondevicemotion": true, + "ondeviceorientation": true, + "ondeviceorientationabsolute": true, + "ondrag": true, + "ondragend": true, + "ondragenter": true, + "ondragleave": true, + "ondragover": true, + "ondragstart": true, + "ondrop": true, + "ondurationchange": true, + "onemptied": true, + "onended": true, + "onerror": true, + "onfocus": true, + "onformdata": true, + "ongamepadconnected": true, + "ongamepaddisconnected": true, + "ongotpointercapture": true, + "onhashchange": true, + "oninput": true, + "oninvalid": true, + "onkeydown": true, + "onkeypress": true, + "onkeyup": true, + "onlanguagechange": true, + "onload": true, + "onloadeddata": true, + "onloadedmetadata": true, + "onloadstart": true, + "onlostpointercapture": true, + "onmessage": true, + "onmessageerror": true, + "onmousedown": true, + "onmouseenter": true, + "onmouseleave": true, + "onmousemove": true, + "onmouseout": true, + "onmouseover": true, + "onmouseup": true, + "onmousewheel": true, + "onoffline": true, + "ononline": true, + "onpagehide": true, + "onpagereveal": true, + "onpageshow": true, + "onpageswap": true, + "onpaste": true, + "onpause": true, + "onplay": true, + "onplaying": true, + "onpointercancel": true, + "onpointerdown": true, + "onpointerenter": true, + "onpointerleave": true, + "onpointermove": true, + "onpointerout": true, + "onpointerover": true, + "onpointerrawupdate": true, + "onpointerup": true, + "onpopstate": true, + "onprogress": true, + "onratechange": true, + "onrejectionhandled": true, + "onreset": true, + "onresize": true, + "onscroll": true, + "onscrollend": true, + "onscrollsnapchange": true, + "onscrollsnapchanging": true, + "onsearch": true, + "onsecuritypolicyviolation": true, + "onseeked": true, + "onseeking": true, + "onselect": true, + "onselectionchange": true, + "onselectstart": true, + "onslotchange": true, + "onstalled": true, + "onstorage": true, + "onsubmit": true, + "onsuspend": true, + "ontimeupdate": true, + "ontoggle": true, + "ontransitioncancel": true, + "ontransitionend": true, + "ontransitionrun": true, + "ontransitionstart": true, + "onunhandledrejection": true, + "onunload": true, + "onvolumechange": true, + "onwaiting": true, + "onwheel": true, + "open": false, + "opener": false, + "Option": false, + "OrientationSensor": false, + "origin": false, + "originAgentCluster": false, + "OscillatorNode": false, + "OTPCredential": false, + "outerHeight": false, + "outerWidth": false, + "OverconstrainedError": false, + "PageRevealEvent": false, + "PageSwapEvent": false, + "PageTransitionEvent": false, + "pageXOffset": false, + "pageYOffset": false, + "PannerNode": false, + "parent": false, + "PasswordCredential": false, + "Path2D": false, + "PaymentAddress": false, + "PaymentManager": false, + "PaymentMethodChangeEvent": false, + "PaymentRequest": false, + "PaymentRequestUpdateEvent": false, + "PaymentResponse": false, + "performance": false, + "Performance": false, + "PerformanceElementTiming": false, + "PerformanceEntry": false, + "PerformanceEventTiming": false, + "PerformanceLongAnimationFrameTiming": false, + "PerformanceLongTaskTiming": false, + "PerformanceMark": false, + "PerformanceMeasure": false, + "PerformanceNavigation": false, + "PerformanceNavigationTiming": false, + "PerformanceObserver": false, + "PerformanceObserverEntryList": false, + "PerformancePaintTiming": false, + "PerformanceResourceTiming": false, + "PerformanceScriptTiming": false, + "PerformanceServerTiming": false, + "PerformanceTiming": false, + "PeriodicSyncManager": false, + "PeriodicWave": false, + "Permissions": false, + "PermissionStatus": false, + "PERSISTENT": false, + "personalbar": false, + "PictureInPictureEvent": false, + "PictureInPictureWindow": false, + "Plugin": false, + "PluginArray": false, + "PointerEvent": false, + "PopStateEvent": false, + "postMessage": false, + "Presentation": false, + "PresentationAvailability": false, + "PresentationConnection": false, + "PresentationConnectionAvailableEvent": false, + "PresentationConnectionCloseEvent": false, + "PresentationConnectionList": false, + "PresentationReceiver": false, + "PresentationRequest": false, + "PressureObserver": false, + "PressureRecord": false, + "print": false, + "ProcessingInstruction": false, + "Profiler": false, + "ProgressEvent": false, + "PromiseRejectionEvent": false, + "prompt": false, + "ProtectedAudience": false, + "PublicKeyCredential": false, + "PushManager": false, + "PushSubscription": false, + "PushSubscriptionOptions": false, + "queryLocalFonts": false, + "queueMicrotask": false, + "QuotaExceededError": false, + "RadioNodeList": false, + "Range": false, + "ReadableByteStreamController": false, + "ReadableStream": false, + "ReadableStreamBYOBReader": false, + "ReadableStreamBYOBRequest": false, + "ReadableStreamDefaultController": false, + "ReadableStreamDefaultReader": false, + "registerProcessor": false, + "RelativeOrientationSensor": false, + "RemotePlayback": false, + "removeEventListener": false, + "ReportBody": false, + "reportError": false, + "ReportingObserver": false, + "Request": false, + "requestAnimationFrame": false, + "requestIdleCallback": false, + "resizeBy": false, + "ResizeObserver": false, + "ResizeObserverEntry": false, + "ResizeObserverSize": false, + "resizeTo": false, + "Response": false, + "RestrictionTarget": false, + "RTCCertificate": false, + "RTCDataChannel": false, + "RTCDataChannelEvent": false, + "RTCDtlsTransport": false, + "RTCDTMFSender": false, + "RTCDTMFToneChangeEvent": false, + "RTCEncodedAudioFrame": false, + "RTCEncodedVideoFrame": false, + "RTCError": false, + "RTCErrorEvent": false, + "RTCIceCandidate": false, + "RTCIceTransport": false, + "RTCPeerConnection": false, + "RTCPeerConnectionIceErrorEvent": false, + "RTCPeerConnectionIceEvent": false, + "RTCRtpReceiver": false, + "RTCRtpScriptTransform": false, + "RTCRtpSender": false, + "RTCRtpTransceiver": false, + "RTCSctpTransport": false, + "RTCSessionDescription": false, + "RTCStatsReport": false, + "RTCTrackEvent": false, + "sampleRate": false, + "scheduler": false, + "Scheduler": false, + "Scheduling": false, + "screen": false, + "Screen": false, + "ScreenDetailed": false, + "ScreenDetails": false, + "screenLeft": false, + "ScreenOrientation": false, + "screenTop": false, + "screenX": false, + "screenY": false, + "ScriptProcessorNode": false, + "scroll": false, + "scrollbars": false, + "scrollBy": false, + "ScrollTimeline": false, + "scrollTo": false, + "scrollX": false, + "scrollY": false, + "SecurityPolicyViolationEvent": false, + "Selection": false, + "self": false, + "Sensor": false, + "SensorErrorEvent": false, + "Serial": false, + "SerialPort": false, + "ServiceWorker": false, + "ServiceWorkerContainer": false, + "ServiceWorkerRegistration": false, + "sessionStorage": false, + "setInterval": false, + "setTimeout": false, + "ShadowRoot": false, + "sharedStorage": false, + "SharedStorage": false, + "SharedStorageAppendMethod": false, + "SharedStorageClearMethod": false, + "SharedStorageDeleteMethod": false, + "SharedStorageModifierMethod": false, + "SharedStorageSetMethod": false, + "SharedStorageWorklet": false, + "SharedWorker": false, + "showDirectoryPicker": false, + "showOpenFilePicker": false, + "showSaveFilePicker": false, + "SnapEvent": false, + "SourceBuffer": false, + "SourceBufferList": false, + "SpeechGrammar": false, + "SpeechGrammarList": false, + "SpeechRecognition": false, + "SpeechRecognitionErrorEvent": false, + "SpeechRecognitionEvent": false, + "SpeechRecognitionPhrase": false, + "speechSynthesis": false, + "SpeechSynthesis": false, + "SpeechSynthesisErrorEvent": false, + "SpeechSynthesisEvent": false, + "SpeechSynthesisUtterance": false, + "SpeechSynthesisVoice": false, + "StaticRange": false, + "status": false, + "statusbar": false, + "StereoPannerNode": false, + "stop": false, + "Storage": false, + "StorageBucket": false, + "StorageBucketManager": false, + "StorageEvent": false, + "StorageManager": false, + "structuredClone": false, + "styleMedia": false, + "StylePropertyMap": false, + "StylePropertyMapReadOnly": false, + "StyleSheet": false, + "StyleSheetList": false, + "SubmitEvent": false, + "Subscriber": false, + "SubtleCrypto": false, + "Summarizer": false, + "SuppressedError": false, + "SVGAElement": false, + "SVGAngle": false, + "SVGAnimatedAngle": false, + "SVGAnimatedBoolean": false, + "SVGAnimatedEnumeration": false, + "SVGAnimatedInteger": false, + "SVGAnimatedLength": false, + "SVGAnimatedLengthList": false, + "SVGAnimatedNumber": false, + "SVGAnimatedNumberList": false, + "SVGAnimatedPreserveAspectRatio": false, + "SVGAnimatedRect": false, + "SVGAnimatedString": false, + "SVGAnimatedTransformList": false, + "SVGAnimateElement": false, + "SVGAnimateMotionElement": false, + "SVGAnimateTransformElement": false, + "SVGAnimationElement": false, + "SVGCircleElement": false, + "SVGClipPathElement": false, + "SVGComponentTransferFunctionElement": false, + "SVGDefsElement": false, + "SVGDescElement": false, + "SVGElement": false, + "SVGEllipseElement": false, + "SVGFEBlendElement": false, + "SVGFEColorMatrixElement": false, + "SVGFEComponentTransferElement": false, + "SVGFECompositeElement": false, + "SVGFEConvolveMatrixElement": false, + "SVGFEDiffuseLightingElement": false, + "SVGFEDisplacementMapElement": false, + "SVGFEDistantLightElement": false, + "SVGFEDropShadowElement": false, + "SVGFEFloodElement": false, + "SVGFEFuncAElement": false, + "SVGFEFuncBElement": false, + "SVGFEFuncGElement": false, + "SVGFEFuncRElement": false, + "SVGFEGaussianBlurElement": false, + "SVGFEImageElement": false, + "SVGFEMergeElement": false, + "SVGFEMergeNodeElement": false, + "SVGFEMorphologyElement": false, + "SVGFEOffsetElement": false, + "SVGFEPointLightElement": false, + "SVGFESpecularLightingElement": false, + "SVGFESpotLightElement": false, + "SVGFETileElement": false, + "SVGFETurbulenceElement": false, + "SVGFilterElement": false, + "SVGForeignObjectElement": false, + "SVGGElement": false, + "SVGGeometryElement": false, + "SVGGradientElement": false, + "SVGGraphicsElement": false, + "SVGImageElement": false, + "SVGLength": false, + "SVGLengthList": false, + "SVGLinearGradientElement": false, + "SVGLineElement": false, + "SVGMarkerElement": false, + "SVGMaskElement": false, + "SVGMatrix": false, + "SVGMetadataElement": false, + "SVGMPathElement": false, + "SVGNumber": false, + "SVGNumberList": false, + "SVGPathElement": false, + "SVGPatternElement": false, + "SVGPoint": false, + "SVGPointList": false, + "SVGPolygonElement": false, + "SVGPolylineElement": false, + "SVGPreserveAspectRatio": false, + "SVGRadialGradientElement": false, + "SVGRect": false, + "SVGRectElement": false, + "SVGScriptElement": false, + "SVGSetElement": false, + "SVGStopElement": false, + "SVGStringList": false, + "SVGStyleElement": false, + "SVGSVGElement": false, + "SVGSwitchElement": false, + "SVGSymbolElement": false, + "SVGTextContentElement": false, + "SVGTextElement": false, + "SVGTextPathElement": false, + "SVGTextPositioningElement": false, + "SVGTitleElement": false, + "SVGTransform": false, + "SVGTransformList": false, + "SVGTSpanElement": false, + "SVGUnitTypes": false, + "SVGUseElement": false, + "SVGViewElement": false, + "SyncManager": false, + "TaskAttributionTiming": false, + "TaskController": false, + "TaskPriorityChangeEvent": false, + "TaskSignal": false, + "TEMPORARY": false, + "Text": false, + "TextDecoder": false, + "TextDecoderStream": false, + "TextEncoder": false, + "TextEncoderStream": false, + "TextEvent": false, + "TextFormat": false, + "TextFormatUpdateEvent": false, + "TextMetrics": false, + "TextTrack": false, + "TextTrackCue": false, + "TextTrackCueList": false, + "TextTrackList": false, + "TextUpdateEvent": false, + "TimeEvent": false, + "TimeRanges": false, + "ToggleEvent": false, + "toolbar": false, + "top": false, + "Touch": false, + "TouchEvent": false, + "TouchList": false, + "TrackEvent": false, + "TransformStream": false, + "TransformStreamDefaultController": false, + "TransitionEvent": false, + "Translator": false, + "TreeWalker": false, + "TrustedHTML": false, + "TrustedScript": false, + "TrustedScriptURL": false, + "TrustedTypePolicy": false, + "TrustedTypePolicyFactory": false, + "trustedTypes": false, + "UIEvent": false, + "URL": false, + "URLPattern": false, + "URLSearchParams": false, + "USB": false, + "USBAlternateInterface": false, + "USBConfiguration": false, + "USBConnectionEvent": false, + "USBDevice": false, + "USBEndpoint": false, + "USBInterface": false, + "USBInTransferResult": false, + "USBIsochronousInTransferPacket": false, + "USBIsochronousInTransferResult": false, + "USBIsochronousOutTransferPacket": false, + "USBIsochronousOutTransferResult": false, + "USBOutTransferResult": false, + "UserActivation": false, + "ValidityState": false, + "VideoColorSpace": false, + "VideoDecoder": false, + "VideoEncoder": false, + "VideoFrame": false, + "VideoPlaybackQuality": false, + "viewport": false, + "Viewport": false, + "ViewTimeline": false, + "ViewTransition": false, + "ViewTransitionTypeSet": false, + "VirtualKeyboard": false, + "VirtualKeyboardGeometryChangeEvent": false, + "VisibilityStateEntry": false, + "visualViewport": false, + "VisualViewport": false, + "VTTCue": false, + "VTTRegion": false, + "WakeLock": false, + "WakeLockSentinel": false, + "WaveShaperNode": false, + "WebAssembly": false, + "WebGL2RenderingContext": false, + "WebGLActiveInfo": false, + "WebGLBuffer": false, + "WebGLContextEvent": false, + "WebGLFramebuffer": false, + "WebGLObject": false, + "WebGLProgram": false, + "WebGLQuery": false, + "WebGLRenderbuffer": false, + "WebGLRenderingContext": false, + "WebGLSampler": false, + "WebGLShader": false, + "WebGLShaderPrecisionFormat": false, + "WebGLSync": false, + "WebGLTexture": false, + "WebGLTransformFeedback": false, + "WebGLUniformLocation": false, + "WebGLVertexArrayObject": false, + "WebSocket": false, + "WebSocketError": false, + "WebSocketStream": false, + "WebTransport": false, + "WebTransportBidirectionalStream": false, + "WebTransportDatagramDuplexStream": false, + "WebTransportError": false, + "WebTransportReceiveStream": false, + "WebTransportSendStream": false, + "WGSLLanguageFeatures": false, + "WheelEvent": false, + "when": false, + "window": false, + "Window": false, + "WindowControlsOverlay": false, + "WindowControlsOverlayGeometryChangeEvent": false, + "Worker": false, + "Worklet": false, + "WorkletGlobalScope": false, + "WritableStream": false, + "WritableStreamDefaultController": false, + "WritableStreamDefaultWriter": false, + "XMLDocument": false, + "XMLHttpRequest": false, + "XMLHttpRequestEventTarget": false, + "XMLHttpRequestUpload": false, + "XMLSerializer": false, + "XPathEvaluator": false, + "XPathExpression": false, + "XPathResult": false, + "XRAnchor": false, + "XRAnchorSet": false, + "XRBoundedReferenceSpace": false, + "XRCamera": false, + "XRCPUDepthInformation": false, + "XRDepthInformation": false, + "XRDOMOverlayState": false, + "XRFrame": false, + "XRHand": false, + "XRHitTestResult": false, + "XRHitTestSource": false, + "XRInputSource": false, + "XRInputSourceArray": false, + "XRInputSourceEvent": false, + "XRInputSourcesChangeEvent": false, + "XRJointPose": false, + "XRJointSpace": false, + "XRLayer": false, + "XRLightEstimate": false, + "XRLightProbe": false, + "XRPose": false, + "XRRay": false, + "XRReferenceSpace": false, + "XRReferenceSpaceEvent": false, + "XRRenderState": false, + "XRRigidTransform": false, + "XRSession": false, + "XRSessionEvent": false, + "XRSpace": false, + "XRSystem": false, + "XRTransientInputHitTestResult": false, + "XRTransientInputHitTestSource": false, + "XRView": false, + "XRViewerPose": false, + "XRViewport": false, + "XRWebGLBinding": false, + "XRWebGLDepthInformation": false, + "XRWebGLLayer": false, + "XSLTProcessor": false + } + }, + "errors": [ + { + "messageId": "unexpectedRefCall", + "data": { + "name": "foo", + "ref": "Atomics" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-obj-calls > invalid + +```js +var foo = window.Intl; foo(); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2020, + "globals": { + "AbortController": false, + "AbortSignal": false, + "AbsoluteOrientationSensor": false, + "AbstractRange": false, + "Accelerometer": false, + "addEventListener": false, + "ai": false, + "AI": false, + "AICreateMonitor": false, + "AITextSession": false, + "alert": false, + "AnalyserNode": false, + "Animation": false, + "AnimationEffect": false, + "AnimationEvent": false, + "AnimationPlaybackEvent": false, + "AnimationTimeline": false, + "AsyncDisposableStack": false, + "atob": false, + "Attr": false, + "Audio": false, + "AudioBuffer": false, + "AudioBufferSourceNode": false, + "AudioContext": false, + "AudioData": false, + "AudioDecoder": false, + "AudioDestinationNode": false, + "AudioEncoder": false, + "AudioListener": false, + "AudioNode": false, + "AudioParam": false, + "AudioParamMap": false, + "AudioProcessingEvent": false, + "AudioScheduledSourceNode": false, + "AudioSinkInfo": false, + "AudioWorklet": false, + "AudioWorkletGlobalScope": false, + "AudioWorkletNode": false, + "AudioWorkletProcessor": false, + "AuthenticatorAssertionResponse": false, + "AuthenticatorAttestationResponse": false, + "AuthenticatorResponse": false, + "BackgroundFetchManager": false, + "BackgroundFetchRecord": false, + "BackgroundFetchRegistration": false, + "BarcodeDetector": false, + "BarProp": false, + "BaseAudioContext": false, + "BatteryManager": false, + "BeforeUnloadEvent": false, + "BiquadFilterNode": false, + "Blob": false, + "BlobEvent": false, + "Bluetooth": false, + "BluetoothCharacteristicProperties": false, + "BluetoothDevice": false, + "BluetoothRemoteGATTCharacteristic": false, + "BluetoothRemoteGATTDescriptor": false, + "BluetoothRemoteGATTServer": false, + "BluetoothRemoteGATTService": false, + "BluetoothUUID": false, + "blur": false, + "BroadcastChannel": false, + "BrowserCaptureMediaStreamTrack": false, + "btoa": false, + "ByteLengthQueuingStrategy": false, + "Cache": false, + "caches": false, + "CacheStorage": false, + "cancelAnimationFrame": false, + "cancelIdleCallback": false, + "CanvasCaptureMediaStream": false, + "CanvasCaptureMediaStreamTrack": false, + "CanvasGradient": false, + "CanvasPattern": false, + "CanvasRenderingContext2D": false, + "CaptureController": false, + "CaretPosition": false, + "CDATASection": false, + "ChannelMergerNode": false, + "ChannelSplitterNode": false, + "ChapterInformation": false, + "CharacterBoundsUpdateEvent": false, + "CharacterData": false, + "clearInterval": false, + "clearTimeout": false, + "clientInformation": false, + "Clipboard": false, + "ClipboardChangeEvent": false, + "ClipboardEvent": false, + "ClipboardItem": false, + "close": false, + "closed": false, + "CloseEvent": false, + "CloseWatcher": false, + "CommandEvent": false, + "Comment": false, + "CompositionEvent": false, + "CompressionStream": false, + "confirm": false, + "console": false, + "ConstantSourceNode": false, + "ContentVisibilityAutoStateChangeEvent": false, + "ConvolverNode": false, + "CookieChangeEvent": false, + "CookieDeprecationLabel": false, + "cookieStore": false, + "CookieStore": false, + "CookieStoreManager": false, + "CountQueuingStrategy": false, + "createImageBitmap": false, + "CreateMonitor": false, + "Credential": false, + "credentialless": false, + "CredentialsContainer": false, + "CropTarget": false, + "crossOriginIsolated": false, + "crypto": false, + "Crypto": false, + "CryptoKey": false, + "CSPViolationReportBody": false, + "CSS": false, + "CSSAnimation": false, + "CSSConditionRule": false, + "CSSContainerRule": false, + "CSSCounterStyleRule": false, + "CSSFontFaceRule": false, + "CSSFontFeatureValuesRule": false, + "CSSFontPaletteValuesRule": false, + "CSSFunctionDeclarations": false, + "CSSFunctionDescriptors": false, + "CSSFunctionRule": false, + "CSSGroupingRule": false, + "CSSImageValue": false, + "CSSImportRule": false, + "CSSKeyframeRule": false, + "CSSKeyframesRule": false, + "CSSKeywordValue": false, + "CSSLayerBlockRule": false, + "CSSLayerStatementRule": false, + "CSSMarginRule": false, + "CSSMathClamp": false, + "CSSMathInvert": false, + "CSSMathMax": false, + "CSSMathMin": false, + "CSSMathNegate": false, + "CSSMathProduct": false, + "CSSMathSum": false, + "CSSMathValue": false, + "CSSMatrixComponent": false, + "CSSMediaRule": false, + "CSSNamespaceRule": false, + "CSSNestedDeclarations": false, + "CSSNumericArray": false, + "CSSNumericValue": false, + "CSSPageDescriptors": false, + "CSSPageRule": false, + "CSSPerspective": false, + "CSSPositionTryDescriptors": false, + "CSSPositionTryRule": false, + "CSSPositionValue": false, + "CSSPropertyRule": false, + "CSSRotate": false, + "CSSRule": false, + "CSSRuleList": false, + "CSSScale": false, + "CSSScopeRule": false, + "CSSSkew": false, + "CSSSkewX": false, + "CSSSkewY": false, + "CSSStartingStyleRule": false, + "CSSStyleDeclaration": false, + "CSSStyleRule": false, + "CSSStyleSheet": false, + "CSSStyleValue": false, + "CSSSupportsRule": false, + "CSSTransformComponent": false, + "CSSTransformValue": false, + "CSSTransition": false, + "CSSTranslate": false, + "CSSUnitValue": false, + "CSSUnparsedValue": false, + "CSSVariableReferenceValue": false, + "CSSViewTransitionRule": false, + "currentFrame": false, + "currentTime": false, + "CustomElementRegistry": false, + "customElements": false, + "CustomEvent": false, + "CustomStateSet": false, + "DataTransfer": false, + "DataTransferItem": false, + "DataTransferItemList": false, + "DecompressionStream": false, + "DelayNode": false, + "DelegatedInkTrailPresenter": false, + "DeviceMotionEvent": false, + "DeviceMotionEventAcceleration": false, + "DeviceMotionEventRotationRate": false, + "DeviceOrientationEvent": false, + "devicePixelRatio": false, + "DevicePosture": false, + "DigitalCredential": false, + "dispatchEvent": false, + "DisposableStack": false, + "document": false, + "Document": false, + "DocumentFragment": false, + "documentPictureInPicture": false, + "DocumentPictureInPicture": false, + "DocumentPictureInPictureEvent": false, + "DocumentTimeline": false, + "DocumentType": false, + "DOMError": false, + "DOMException": false, + "DOMImplementation": false, + "DOMMatrix": false, + "DOMMatrixReadOnly": false, + "DOMParser": false, + "DOMPoint": false, + "DOMPointReadOnly": false, + "DOMQuad": false, + "DOMRect": false, + "DOMRectList": false, + "DOMRectReadOnly": false, + "DOMStringList": false, + "DOMStringMap": false, + "DOMTokenList": false, + "DragEvent": false, + "DynamicsCompressorNode": false, + "EditContext": false, + "Element": false, + "ElementInternals": false, + "EncodedAudioChunk": false, + "EncodedVideoChunk": false, + "ErrorEvent": false, + "event": false, + "Event": false, + "EventCounts": false, + "EventSource": false, + "EventTarget": false, + "external": false, + "External": false, + "EyeDropper": false, + "FeaturePolicy": false, + "FederatedCredential": false, + "fence": false, + "Fence": false, + "FencedFrameConfig": false, + "fetch": false, + "fetchLater": false, + "FetchLaterResult": false, + "File": false, + "FileList": false, + "FileReader": false, + "FileSystem": false, + "FileSystemDirectoryEntry": false, + "FileSystemDirectoryHandle": false, + "FileSystemDirectoryReader": false, + "FileSystemEntry": false, + "FileSystemFileEntry": false, + "FileSystemFileHandle": false, + "FileSystemHandle": false, + "FileSystemObserver": false, + "FileSystemWritableFileStream": false, + "find": false, + "focus": false, + "FocusEvent": false, + "FontData": false, + "FontFace": false, + "FontFaceSet": false, + "FontFaceSetLoadEvent": false, + "FormData": false, + "FormDataEvent": false, + "FragmentDirective": false, + "frameElement": false, + "frames": false, + "GainNode": false, + "Gamepad": false, + "GamepadAxisMoveEvent": false, + "GamepadButton": false, + "GamepadButtonEvent": false, + "GamepadEvent": false, + "GamepadHapticActuator": false, + "GamepadPose": false, + "Geolocation": false, + "GeolocationCoordinates": false, + "GeolocationPosition": false, + "GeolocationPositionError": false, + "getComputedStyle": false, + "getScreenDetails": false, + "getSelection": false, + "GPU": false, + "GPUAdapter": false, + "GPUAdapterInfo": false, + "GPUBindGroup": false, + "GPUBindGroupLayout": false, + "GPUBuffer": false, + "GPUBufferUsage": false, + "GPUCanvasContext": false, + "GPUColorWrite": false, + "GPUCommandBuffer": false, + "GPUCommandEncoder": false, + "GPUCompilationInfo": false, + "GPUCompilationMessage": false, + "GPUComputePassEncoder": false, + "GPUComputePipeline": false, + "GPUDevice": false, + "GPUDeviceLostInfo": false, + "GPUError": false, + "GPUExternalTexture": false, + "GPUInternalError": false, + "GPUMapMode": false, + "GPUOutOfMemoryError": false, + "GPUPipelineError": false, + "GPUPipelineLayout": false, + "GPUQuerySet": false, + "GPUQueue": false, + "GPURenderBundle": false, + "GPURenderBundleEncoder": false, + "GPURenderPassEncoder": false, + "GPURenderPipeline": false, + "GPUSampler": false, + "GPUShaderModule": false, + "GPUShaderStage": false, + "GPUSupportedFeatures": false, + "GPUSupportedLimits": false, + "GPUTexture": false, + "GPUTextureUsage": false, + "GPUTextureView": false, + "GPUUncapturedErrorEvent": false, + "GPUValidationError": false, + "GravitySensor": false, + "Gyroscope": false, + "HashChangeEvent": false, + "Headers": false, + "HID": false, + "HIDConnectionEvent": false, + "HIDDevice": false, + "HIDInputReportEvent": false, + "Highlight": false, + "HighlightRegistry": false, + "history": false, + "History": false, + "HTMLAllCollection": false, + "HTMLAnchorElement": false, + "HTMLAreaElement": false, + "HTMLAudioElement": false, + "HTMLBaseElement": false, + "HTMLBodyElement": false, + "HTMLBRElement": false, + "HTMLButtonElement": false, + "HTMLCanvasElement": false, + "HTMLCollection": false, + "HTMLDataElement": false, + "HTMLDataListElement": false, + "HTMLDetailsElement": false, + "HTMLDialogElement": false, + "HTMLDirectoryElement": false, + "HTMLDivElement": false, + "HTMLDListElement": false, + "HTMLDocument": false, + "HTMLElement": false, + "HTMLEmbedElement": false, + "HTMLFencedFrameElement": false, + "HTMLFieldSetElement": false, + "HTMLFontElement": false, + "HTMLFormControlsCollection": false, + "HTMLFormElement": false, + "HTMLFrameElement": false, + "HTMLFrameSetElement": false, + "HTMLHeadElement": false, + "HTMLHeadingElement": false, + "HTMLHRElement": false, + "HTMLHtmlElement": false, + "HTMLIFrameElement": false, + "HTMLImageElement": false, + "HTMLInputElement": false, + "HTMLLabelElement": false, + "HTMLLegendElement": false, + "HTMLLIElement": false, + "HTMLLinkElement": false, + "HTMLMapElement": false, + "HTMLMarqueeElement": false, + "HTMLMediaElement": false, + "HTMLMenuElement": false, + "HTMLMetaElement": false, + "HTMLMeterElement": false, + "HTMLModElement": false, + "HTMLObjectElement": false, + "HTMLOListElement": false, + "HTMLOptGroupElement": false, + "HTMLOptionElement": false, + "HTMLOptionsCollection": false, + "HTMLOutputElement": false, + "HTMLParagraphElement": false, + "HTMLParamElement": false, + "HTMLPictureElement": false, + "HTMLPreElement": false, + "HTMLProgressElement": false, + "HTMLQuoteElement": false, + "HTMLScriptElement": false, + "HTMLSelectedContentElement": false, + "HTMLSelectElement": false, + "HTMLSlotElement": false, + "HTMLSourceElement": false, + "HTMLSpanElement": false, + "HTMLStyleElement": false, + "HTMLTableCaptionElement": false, + "HTMLTableCellElement": false, + "HTMLTableColElement": false, + "HTMLTableElement": false, + "HTMLTableRowElement": false, + "HTMLTableSectionElement": false, + "HTMLTemplateElement": false, + "HTMLTextAreaElement": false, + "HTMLTimeElement": false, + "HTMLTitleElement": false, + "HTMLTrackElement": false, + "HTMLUListElement": false, + "HTMLUnknownElement": false, + "HTMLVideoElement": false, + "IDBCursor": false, + "IDBCursorWithValue": false, + "IDBDatabase": false, + "IDBFactory": false, + "IDBIndex": false, + "IDBKeyRange": false, + "IDBObjectStore": false, + "IDBOpenDBRequest": false, + "IDBRecord": false, + "IDBRequest": false, + "IDBTransaction": false, + "IDBVersionChangeEvent": false, + "IdentityCredential": false, + "IdentityCredentialError": false, + "IdentityProvider": false, + "IdleDeadline": false, + "IdleDetector": false, + "IIRFilterNode": false, + "Image": false, + "ImageBitmap": false, + "ImageBitmapRenderingContext": false, + "ImageCapture": false, + "ImageData": false, + "ImageDecoder": false, + "ImageTrack": false, + "ImageTrackList": false, + "indexedDB": false, + "Ink": false, + "innerHeight": false, + "innerWidth": false, + "InputDeviceCapabilities": false, + "InputDeviceInfo": false, + "InputEvent": false, + "IntegrityViolationReportBody": false, + "InterestEvent": false, + "IntersectionObserver": false, + "IntersectionObserverEntry": false, + "isSecureContext": false, + "Keyboard": false, + "KeyboardEvent": false, + "KeyboardLayoutMap": false, + "KeyframeEffect": false, + "LanguageDetector": false, + "LargestContentfulPaint": false, + "LaunchParams": false, + "launchQueue": false, + "LaunchQueue": false, + "LayoutShift": false, + "LayoutShiftAttribution": false, + "length": false, + "LinearAccelerationSensor": false, + "localStorage": false, + "location": true, + "Location": false, + "locationbar": false, + "Lock": false, + "LockManager": false, + "matchMedia": false, + "MathMLElement": false, + "MediaCapabilities": false, + "MediaCapabilitiesInfo": false, + "MediaDeviceInfo": false, + "MediaDevices": false, + "MediaElementAudioSourceNode": false, + "MediaEncryptedEvent": false, + "MediaError": false, + "MediaKeyError": false, + "MediaKeyMessageEvent": false, + "MediaKeys": false, + "MediaKeySession": false, + "MediaKeyStatusMap": false, + "MediaKeySystemAccess": false, + "MediaList": false, + "MediaMetadata": false, + "MediaQueryList": false, + "MediaQueryListEvent": false, + "MediaRecorder": false, + "MediaRecorderErrorEvent": false, + "MediaSession": false, + "MediaSource": false, + "MediaSourceHandle": false, + "MediaStream": false, + "MediaStreamAudioDestinationNode": false, + "MediaStreamAudioSourceNode": false, + "MediaStreamEvent": false, + "MediaStreamTrack": false, + "MediaStreamTrackAudioSourceNode": false, + "MediaStreamTrackAudioStats": false, + "MediaStreamTrackEvent": false, + "MediaStreamTrackGenerator": false, + "MediaStreamTrackProcessor": false, + "MediaStreamTrackVideoStats": false, + "menubar": false, + "MessageChannel": false, + "MessageEvent": false, + "MessagePort": false, + "MIDIAccess": false, + "MIDIConnectionEvent": false, + "MIDIInput": false, + "MIDIInputMap": false, + "MIDIMessageEvent": false, + "MIDIOutput": false, + "MIDIOutputMap": false, + "MIDIPort": false, + "MimeType": false, + "MimeTypeArray": false, + "model": false, + "ModelGenericSession": false, + "ModelManager": false, + "MouseEvent": false, + "moveBy": false, + "moveTo": false, + "MutationEvent": false, + "MutationObserver": false, + "MutationRecord": false, + "name": false, + "NamedNodeMap": false, + "NavigateEvent": false, + "navigation": false, + "Navigation": false, + "NavigationActivation": false, + "NavigationCurrentEntryChangeEvent": false, + "NavigationDestination": false, + "NavigationHistoryEntry": false, + "NavigationPrecommitController": false, + "NavigationPreloadManager": false, + "NavigationTransition": false, + "navigator": false, + "Navigator": false, + "NavigatorLogin": false, + "NavigatorManagedData": false, + "NavigatorUAData": false, + "NetworkInformation": false, + "Node": false, + "NodeFilter": false, + "NodeIterator": false, + "NodeList": false, + "Notification": false, + "NotifyPaintEvent": false, + "NotRestoredReasonDetails": false, + "NotRestoredReasons": false, + "Observable": false, + "OfflineAudioCompletionEvent": false, + "OfflineAudioContext": false, + "offscreenBuffering": false, + "OffscreenCanvas": false, + "OffscreenCanvasRenderingContext2D": false, + "onabort": true, + "onafterprint": true, + "onanimationcancel": true, + "onanimationend": true, + "onanimationiteration": true, + "onanimationstart": true, + "onappinstalled": true, + "onauxclick": true, + "onbeforeinput": true, + "onbeforeinstallprompt": true, + "onbeforematch": true, + "onbeforeprint": true, + "onbeforetoggle": true, + "onbeforeunload": true, + "onbeforexrselect": true, + "onblur": true, + "oncancel": true, + "oncanplay": true, + "oncanplaythrough": true, + "onchange": true, + "onclick": true, + "onclose": true, + "oncommand": true, + "oncontentvisibilityautostatechange": true, + "oncontextlost": true, + "oncontextmenu": true, + "oncontextrestored": true, + "oncopy": true, + "oncuechange": true, + "oncut": true, + "ondblclick": true, + "ondevicemotion": true, + "ondeviceorientation": true, + "ondeviceorientationabsolute": true, + "ondrag": true, + "ondragend": true, + "ondragenter": true, + "ondragleave": true, + "ondragover": true, + "ondragstart": true, + "ondrop": true, + "ondurationchange": true, + "onemptied": true, + "onended": true, + "onerror": true, + "onfocus": true, + "onformdata": true, + "ongamepadconnected": true, + "ongamepaddisconnected": true, + "ongotpointercapture": true, + "onhashchange": true, + "oninput": true, + "oninvalid": true, + "onkeydown": true, + "onkeypress": true, + "onkeyup": true, + "onlanguagechange": true, + "onload": true, + "onloadeddata": true, + "onloadedmetadata": true, + "onloadstart": true, + "onlostpointercapture": true, + "onmessage": true, + "onmessageerror": true, + "onmousedown": true, + "onmouseenter": true, + "onmouseleave": true, + "onmousemove": true, + "onmouseout": true, + "onmouseover": true, + "onmouseup": true, + "onmousewheel": true, + "onoffline": true, + "ononline": true, + "onpagehide": true, + "onpagereveal": true, + "onpageshow": true, + "onpageswap": true, + "onpaste": true, + "onpause": true, + "onplay": true, + "onplaying": true, + "onpointercancel": true, + "onpointerdown": true, + "onpointerenter": true, + "onpointerleave": true, + "onpointermove": true, + "onpointerout": true, + "onpointerover": true, + "onpointerrawupdate": true, + "onpointerup": true, + "onpopstate": true, + "onprogress": true, + "onratechange": true, + "onrejectionhandled": true, + "onreset": true, + "onresize": true, + "onscroll": true, + "onscrollend": true, + "onscrollsnapchange": true, + "onscrollsnapchanging": true, + "onsearch": true, + "onsecuritypolicyviolation": true, + "onseeked": true, + "onseeking": true, + "onselect": true, + "onselectionchange": true, + "onselectstart": true, + "onslotchange": true, + "onstalled": true, + "onstorage": true, + "onsubmit": true, + "onsuspend": true, + "ontimeupdate": true, + "ontoggle": true, + "ontransitioncancel": true, + "ontransitionend": true, + "ontransitionrun": true, + "ontransitionstart": true, + "onunhandledrejection": true, + "onunload": true, + "onvolumechange": true, + "onwaiting": true, + "onwheel": true, + "open": false, + "opener": false, + "Option": false, + "OrientationSensor": false, + "origin": false, + "originAgentCluster": false, + "OscillatorNode": false, + "OTPCredential": false, + "outerHeight": false, + "outerWidth": false, + "OverconstrainedError": false, + "PageRevealEvent": false, + "PageSwapEvent": false, + "PageTransitionEvent": false, + "pageXOffset": false, + "pageYOffset": false, + "PannerNode": false, + "parent": false, + "PasswordCredential": false, + "Path2D": false, + "PaymentAddress": false, + "PaymentManager": false, + "PaymentMethodChangeEvent": false, + "PaymentRequest": false, + "PaymentRequestUpdateEvent": false, + "PaymentResponse": false, + "performance": false, + "Performance": false, + "PerformanceElementTiming": false, + "PerformanceEntry": false, + "PerformanceEventTiming": false, + "PerformanceLongAnimationFrameTiming": false, + "PerformanceLongTaskTiming": false, + "PerformanceMark": false, + "PerformanceMeasure": false, + "PerformanceNavigation": false, + "PerformanceNavigationTiming": false, + "PerformanceObserver": false, + "PerformanceObserverEntryList": false, + "PerformancePaintTiming": false, + "PerformanceResourceTiming": false, + "PerformanceScriptTiming": false, + "PerformanceServerTiming": false, + "PerformanceTiming": false, + "PeriodicSyncManager": false, + "PeriodicWave": false, + "Permissions": false, + "PermissionStatus": false, + "PERSISTENT": false, + "personalbar": false, + "PictureInPictureEvent": false, + "PictureInPictureWindow": false, + "Plugin": false, + "PluginArray": false, + "PointerEvent": false, + "PopStateEvent": false, + "postMessage": false, + "Presentation": false, + "PresentationAvailability": false, + "PresentationConnection": false, + "PresentationConnectionAvailableEvent": false, + "PresentationConnectionCloseEvent": false, + "PresentationConnectionList": false, + "PresentationReceiver": false, + "PresentationRequest": false, + "PressureObserver": false, + "PressureRecord": false, + "print": false, + "ProcessingInstruction": false, + "Profiler": false, + "ProgressEvent": false, + "PromiseRejectionEvent": false, + "prompt": false, + "ProtectedAudience": false, + "PublicKeyCredential": false, + "PushManager": false, + "PushSubscription": false, + "PushSubscriptionOptions": false, + "queryLocalFonts": false, + "queueMicrotask": false, + "QuotaExceededError": false, + "RadioNodeList": false, + "Range": false, + "ReadableByteStreamController": false, + "ReadableStream": false, + "ReadableStreamBYOBReader": false, + "ReadableStreamBYOBRequest": false, + "ReadableStreamDefaultController": false, + "ReadableStreamDefaultReader": false, + "registerProcessor": false, + "RelativeOrientationSensor": false, + "RemotePlayback": false, + "removeEventListener": false, + "ReportBody": false, + "reportError": false, + "ReportingObserver": false, + "Request": false, + "requestAnimationFrame": false, + "requestIdleCallback": false, + "resizeBy": false, + "ResizeObserver": false, + "ResizeObserverEntry": false, + "ResizeObserverSize": false, + "resizeTo": false, + "Response": false, + "RestrictionTarget": false, + "RTCCertificate": false, + "RTCDataChannel": false, + "RTCDataChannelEvent": false, + "RTCDtlsTransport": false, + "RTCDTMFSender": false, + "RTCDTMFToneChangeEvent": false, + "RTCEncodedAudioFrame": false, + "RTCEncodedVideoFrame": false, + "RTCError": false, + "RTCErrorEvent": false, + "RTCIceCandidate": false, + "RTCIceTransport": false, + "RTCPeerConnection": false, + "RTCPeerConnectionIceErrorEvent": false, + "RTCPeerConnectionIceEvent": false, + "RTCRtpReceiver": false, + "RTCRtpScriptTransform": false, + "RTCRtpSender": false, + "RTCRtpTransceiver": false, + "RTCSctpTransport": false, + "RTCSessionDescription": false, + "RTCStatsReport": false, + "RTCTrackEvent": false, + "sampleRate": false, + "scheduler": false, + "Scheduler": false, + "Scheduling": false, + "screen": false, + "Screen": false, + "ScreenDetailed": false, + "ScreenDetails": false, + "screenLeft": false, + "ScreenOrientation": false, + "screenTop": false, + "screenX": false, + "screenY": false, + "ScriptProcessorNode": false, + "scroll": false, + "scrollbars": false, + "scrollBy": false, + "ScrollTimeline": false, + "scrollTo": false, + "scrollX": false, + "scrollY": false, + "SecurityPolicyViolationEvent": false, + "Selection": false, + "self": false, + "Sensor": false, + "SensorErrorEvent": false, + "Serial": false, + "SerialPort": false, + "ServiceWorker": false, + "ServiceWorkerContainer": false, + "ServiceWorkerRegistration": false, + "sessionStorage": false, + "setInterval": false, + "setTimeout": false, + "ShadowRoot": false, + "sharedStorage": false, + "SharedStorage": false, + "SharedStorageAppendMethod": false, + "SharedStorageClearMethod": false, + "SharedStorageDeleteMethod": false, + "SharedStorageModifierMethod": false, + "SharedStorageSetMethod": false, + "SharedStorageWorklet": false, + "SharedWorker": false, + "showDirectoryPicker": false, + "showOpenFilePicker": false, + "showSaveFilePicker": false, + "SnapEvent": false, + "SourceBuffer": false, + "SourceBufferList": false, + "SpeechGrammar": false, + "SpeechGrammarList": false, + "SpeechRecognition": false, + "SpeechRecognitionErrorEvent": false, + "SpeechRecognitionEvent": false, + "SpeechRecognitionPhrase": false, + "speechSynthesis": false, + "SpeechSynthesis": false, + "SpeechSynthesisErrorEvent": false, + "SpeechSynthesisEvent": false, + "SpeechSynthesisUtterance": false, + "SpeechSynthesisVoice": false, + "StaticRange": false, + "status": false, + "statusbar": false, + "StereoPannerNode": false, + "stop": false, + "Storage": false, + "StorageBucket": false, + "StorageBucketManager": false, + "StorageEvent": false, + "StorageManager": false, + "structuredClone": false, + "styleMedia": false, + "StylePropertyMap": false, + "StylePropertyMapReadOnly": false, + "StyleSheet": false, + "StyleSheetList": false, + "SubmitEvent": false, + "Subscriber": false, + "SubtleCrypto": false, + "Summarizer": false, + "SuppressedError": false, + "SVGAElement": false, + "SVGAngle": false, + "SVGAnimatedAngle": false, + "SVGAnimatedBoolean": false, + "SVGAnimatedEnumeration": false, + "SVGAnimatedInteger": false, + "SVGAnimatedLength": false, + "SVGAnimatedLengthList": false, + "SVGAnimatedNumber": false, + "SVGAnimatedNumberList": false, + "SVGAnimatedPreserveAspectRatio": false, + "SVGAnimatedRect": false, + "SVGAnimatedString": false, + "SVGAnimatedTransformList": false, + "SVGAnimateElement": false, + "SVGAnimateMotionElement": false, + "SVGAnimateTransformElement": false, + "SVGAnimationElement": false, + "SVGCircleElement": false, + "SVGClipPathElement": false, + "SVGComponentTransferFunctionElement": false, + "SVGDefsElement": false, + "SVGDescElement": false, + "SVGElement": false, + "SVGEllipseElement": false, + "SVGFEBlendElement": false, + "SVGFEColorMatrixElement": false, + "SVGFEComponentTransferElement": false, + "SVGFECompositeElement": false, + "SVGFEConvolveMatrixElement": false, + "SVGFEDiffuseLightingElement": false, + "SVGFEDisplacementMapElement": false, + "SVGFEDistantLightElement": false, + "SVGFEDropShadowElement": false, + "SVGFEFloodElement": false, + "SVGFEFuncAElement": false, + "SVGFEFuncBElement": false, + "SVGFEFuncGElement": false, + "SVGFEFuncRElement": false, + "SVGFEGaussianBlurElement": false, + "SVGFEImageElement": false, + "SVGFEMergeElement": false, + "SVGFEMergeNodeElement": false, + "SVGFEMorphologyElement": false, + "SVGFEOffsetElement": false, + "SVGFEPointLightElement": false, + "SVGFESpecularLightingElement": false, + "SVGFESpotLightElement": false, + "SVGFETileElement": false, + "SVGFETurbulenceElement": false, + "SVGFilterElement": false, + "SVGForeignObjectElement": false, + "SVGGElement": false, + "SVGGeometryElement": false, + "SVGGradientElement": false, + "SVGGraphicsElement": false, + "SVGImageElement": false, + "SVGLength": false, + "SVGLengthList": false, + "SVGLinearGradientElement": false, + "SVGLineElement": false, + "SVGMarkerElement": false, + "SVGMaskElement": false, + "SVGMatrix": false, + "SVGMetadataElement": false, + "SVGMPathElement": false, + "SVGNumber": false, + "SVGNumberList": false, + "SVGPathElement": false, + "SVGPatternElement": false, + "SVGPoint": false, + "SVGPointList": false, + "SVGPolygonElement": false, + "SVGPolylineElement": false, + "SVGPreserveAspectRatio": false, + "SVGRadialGradientElement": false, + "SVGRect": false, + "SVGRectElement": false, + "SVGScriptElement": false, + "SVGSetElement": false, + "SVGStopElement": false, + "SVGStringList": false, + "SVGStyleElement": false, + "SVGSVGElement": false, + "SVGSwitchElement": false, + "SVGSymbolElement": false, + "SVGTextContentElement": false, + "SVGTextElement": false, + "SVGTextPathElement": false, + "SVGTextPositioningElement": false, + "SVGTitleElement": false, + "SVGTransform": false, + "SVGTransformList": false, + "SVGTSpanElement": false, + "SVGUnitTypes": false, + "SVGUseElement": false, + "SVGViewElement": false, + "SyncManager": false, + "TaskAttributionTiming": false, + "TaskController": false, + "TaskPriorityChangeEvent": false, + "TaskSignal": false, + "TEMPORARY": false, + "Text": false, + "TextDecoder": false, + "TextDecoderStream": false, + "TextEncoder": false, + "TextEncoderStream": false, + "TextEvent": false, + "TextFormat": false, + "TextFormatUpdateEvent": false, + "TextMetrics": false, + "TextTrack": false, + "TextTrackCue": false, + "TextTrackCueList": false, + "TextTrackList": false, + "TextUpdateEvent": false, + "TimeEvent": false, + "TimeRanges": false, + "ToggleEvent": false, + "toolbar": false, + "top": false, + "Touch": false, + "TouchEvent": false, + "TouchList": false, + "TrackEvent": false, + "TransformStream": false, + "TransformStreamDefaultController": false, + "TransitionEvent": false, + "Translator": false, + "TreeWalker": false, + "TrustedHTML": false, + "TrustedScript": false, + "TrustedScriptURL": false, + "TrustedTypePolicy": false, + "TrustedTypePolicyFactory": false, + "trustedTypes": false, + "UIEvent": false, + "URL": false, + "URLPattern": false, + "URLSearchParams": false, + "USB": false, + "USBAlternateInterface": false, + "USBConfiguration": false, + "USBConnectionEvent": false, + "USBDevice": false, + "USBEndpoint": false, + "USBInterface": false, + "USBInTransferResult": false, + "USBIsochronousInTransferPacket": false, + "USBIsochronousInTransferResult": false, + "USBIsochronousOutTransferPacket": false, + "USBIsochronousOutTransferResult": false, + "USBOutTransferResult": false, + "UserActivation": false, + "ValidityState": false, + "VideoColorSpace": false, + "VideoDecoder": false, + "VideoEncoder": false, + "VideoFrame": false, + "VideoPlaybackQuality": false, + "viewport": false, + "Viewport": false, + "ViewTimeline": false, + "ViewTransition": false, + "ViewTransitionTypeSet": false, + "VirtualKeyboard": false, + "VirtualKeyboardGeometryChangeEvent": false, + "VisibilityStateEntry": false, + "visualViewport": false, + "VisualViewport": false, + "VTTCue": false, + "VTTRegion": false, + "WakeLock": false, + "WakeLockSentinel": false, + "WaveShaperNode": false, + "WebAssembly": false, + "WebGL2RenderingContext": false, + "WebGLActiveInfo": false, + "WebGLBuffer": false, + "WebGLContextEvent": false, + "WebGLFramebuffer": false, + "WebGLObject": false, + "WebGLProgram": false, + "WebGLQuery": false, + "WebGLRenderbuffer": false, + "WebGLRenderingContext": false, + "WebGLSampler": false, + "WebGLShader": false, + "WebGLShaderPrecisionFormat": false, + "WebGLSync": false, + "WebGLTexture": false, + "WebGLTransformFeedback": false, + "WebGLUniformLocation": false, + "WebGLVertexArrayObject": false, + "WebSocket": false, + "WebSocketError": false, + "WebSocketStream": false, + "WebTransport": false, + "WebTransportBidirectionalStream": false, + "WebTransportDatagramDuplexStream": false, + "WebTransportError": false, + "WebTransportReceiveStream": false, + "WebTransportSendStream": false, + "WGSLLanguageFeatures": false, + "WheelEvent": false, + "when": false, + "window": false, + "Window": false, + "WindowControlsOverlay": false, + "WindowControlsOverlayGeometryChangeEvent": false, + "Worker": false, + "Worklet": false, + "WorkletGlobalScope": false, + "WritableStream": false, + "WritableStreamDefaultController": false, + "WritableStreamDefaultWriter": false, + "XMLDocument": false, + "XMLHttpRequest": false, + "XMLHttpRequestEventTarget": false, + "XMLHttpRequestUpload": false, + "XMLSerializer": false, + "XPathEvaluator": false, + "XPathExpression": false, + "XPathResult": false, + "XRAnchor": false, + "XRAnchorSet": false, + "XRBoundedReferenceSpace": false, + "XRCamera": false, + "XRCPUDepthInformation": false, + "XRDepthInformation": false, + "XRDOMOverlayState": false, + "XRFrame": false, + "XRHand": false, + "XRHitTestResult": false, + "XRHitTestSource": false, + "XRInputSource": false, + "XRInputSourceArray": false, + "XRInputSourceEvent": false, + "XRInputSourcesChangeEvent": false, + "XRJointPose": false, + "XRJointSpace": false, + "XRLayer": false, + "XRLightEstimate": false, + "XRLightProbe": false, + "XRPose": false, + "XRRay": false, + "XRReferenceSpace": false, + "XRReferenceSpaceEvent": false, + "XRRenderState": false, + "XRRigidTransform": false, + "XRSession": false, + "XRSessionEvent": false, + "XRSpace": false, + "XRSystem": false, + "XRTransientInputHitTestResult": false, + "XRTransientInputHitTestSource": false, + "XRView": false, + "XRViewerPose": false, + "XRViewport": false, + "XRWebGLBinding": false, + "XRWebGLDepthInformation": false, + "XRWebGLLayer": false, + "XSLTProcessor": false + } + }, + "errors": [ + { + "messageId": "unexpectedRefCall", + "data": { + "name": "foo", + "ref": "Intl" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-obj-calls > invalid + +```js +var foo = window.Intl; new foo; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2020, + "globals": { + "AbortController": false, + "AbortSignal": false, + "AbsoluteOrientationSensor": false, + "AbstractRange": false, + "Accelerometer": false, + "addEventListener": false, + "ai": false, + "AI": false, + "AICreateMonitor": false, + "AITextSession": false, + "alert": false, + "AnalyserNode": false, + "Animation": false, + "AnimationEffect": false, + "AnimationEvent": false, + "AnimationPlaybackEvent": false, + "AnimationTimeline": false, + "AsyncDisposableStack": false, + "atob": false, + "Attr": false, + "Audio": false, + "AudioBuffer": false, + "AudioBufferSourceNode": false, + "AudioContext": false, + "AudioData": false, + "AudioDecoder": false, + "AudioDestinationNode": false, + "AudioEncoder": false, + "AudioListener": false, + "AudioNode": false, + "AudioParam": false, + "AudioParamMap": false, + "AudioProcessingEvent": false, + "AudioScheduledSourceNode": false, + "AudioSinkInfo": false, + "AudioWorklet": false, + "AudioWorkletGlobalScope": false, + "AudioWorkletNode": false, + "AudioWorkletProcessor": false, + "AuthenticatorAssertionResponse": false, + "AuthenticatorAttestationResponse": false, + "AuthenticatorResponse": false, + "BackgroundFetchManager": false, + "BackgroundFetchRecord": false, + "BackgroundFetchRegistration": false, + "BarcodeDetector": false, + "BarProp": false, + "BaseAudioContext": false, + "BatteryManager": false, + "BeforeUnloadEvent": false, + "BiquadFilterNode": false, + "Blob": false, + "BlobEvent": false, + "Bluetooth": false, + "BluetoothCharacteristicProperties": false, + "BluetoothDevice": false, + "BluetoothRemoteGATTCharacteristic": false, + "BluetoothRemoteGATTDescriptor": false, + "BluetoothRemoteGATTServer": false, + "BluetoothRemoteGATTService": false, + "BluetoothUUID": false, + "blur": false, + "BroadcastChannel": false, + "BrowserCaptureMediaStreamTrack": false, + "btoa": false, + "ByteLengthQueuingStrategy": false, + "Cache": false, + "caches": false, + "CacheStorage": false, + "cancelAnimationFrame": false, + "cancelIdleCallback": false, + "CanvasCaptureMediaStream": false, + "CanvasCaptureMediaStreamTrack": false, + "CanvasGradient": false, + "CanvasPattern": false, + "CanvasRenderingContext2D": false, + "CaptureController": false, + "CaretPosition": false, + "CDATASection": false, + "ChannelMergerNode": false, + "ChannelSplitterNode": false, + "ChapterInformation": false, + "CharacterBoundsUpdateEvent": false, + "CharacterData": false, + "clearInterval": false, + "clearTimeout": false, + "clientInformation": false, + "Clipboard": false, + "ClipboardChangeEvent": false, + "ClipboardEvent": false, + "ClipboardItem": false, + "close": false, + "closed": false, + "CloseEvent": false, + "CloseWatcher": false, + "CommandEvent": false, + "Comment": false, + "CompositionEvent": false, + "CompressionStream": false, + "confirm": false, + "console": false, + "ConstantSourceNode": false, + "ContentVisibilityAutoStateChangeEvent": false, + "ConvolverNode": false, + "CookieChangeEvent": false, + "CookieDeprecationLabel": false, + "cookieStore": false, + "CookieStore": false, + "CookieStoreManager": false, + "CountQueuingStrategy": false, + "createImageBitmap": false, + "CreateMonitor": false, + "Credential": false, + "credentialless": false, + "CredentialsContainer": false, + "CropTarget": false, + "crossOriginIsolated": false, + "crypto": false, + "Crypto": false, + "CryptoKey": false, + "CSPViolationReportBody": false, + "CSS": false, + "CSSAnimation": false, + "CSSConditionRule": false, + "CSSContainerRule": false, + "CSSCounterStyleRule": false, + "CSSFontFaceRule": false, + "CSSFontFeatureValuesRule": false, + "CSSFontPaletteValuesRule": false, + "CSSFunctionDeclarations": false, + "CSSFunctionDescriptors": false, + "CSSFunctionRule": false, + "CSSGroupingRule": false, + "CSSImageValue": false, + "CSSImportRule": false, + "CSSKeyframeRule": false, + "CSSKeyframesRule": false, + "CSSKeywordValue": false, + "CSSLayerBlockRule": false, + "CSSLayerStatementRule": false, + "CSSMarginRule": false, + "CSSMathClamp": false, + "CSSMathInvert": false, + "CSSMathMax": false, + "CSSMathMin": false, + "CSSMathNegate": false, + "CSSMathProduct": false, + "CSSMathSum": false, + "CSSMathValue": false, + "CSSMatrixComponent": false, + "CSSMediaRule": false, + "CSSNamespaceRule": false, + "CSSNestedDeclarations": false, + "CSSNumericArray": false, + "CSSNumericValue": false, + "CSSPageDescriptors": false, + "CSSPageRule": false, + "CSSPerspective": false, + "CSSPositionTryDescriptors": false, + "CSSPositionTryRule": false, + "CSSPositionValue": false, + "CSSPropertyRule": false, + "CSSRotate": false, + "CSSRule": false, + "CSSRuleList": false, + "CSSScale": false, + "CSSScopeRule": false, + "CSSSkew": false, + "CSSSkewX": false, + "CSSSkewY": false, + "CSSStartingStyleRule": false, + "CSSStyleDeclaration": false, + "CSSStyleRule": false, + "CSSStyleSheet": false, + "CSSStyleValue": false, + "CSSSupportsRule": false, + "CSSTransformComponent": false, + "CSSTransformValue": false, + "CSSTransition": false, + "CSSTranslate": false, + "CSSUnitValue": false, + "CSSUnparsedValue": false, + "CSSVariableReferenceValue": false, + "CSSViewTransitionRule": false, + "currentFrame": false, + "currentTime": false, + "CustomElementRegistry": false, + "customElements": false, + "CustomEvent": false, + "CustomStateSet": false, + "DataTransfer": false, + "DataTransferItem": false, + "DataTransferItemList": false, + "DecompressionStream": false, + "DelayNode": false, + "DelegatedInkTrailPresenter": false, + "DeviceMotionEvent": false, + "DeviceMotionEventAcceleration": false, + "DeviceMotionEventRotationRate": false, + "DeviceOrientationEvent": false, + "devicePixelRatio": false, + "DevicePosture": false, + "DigitalCredential": false, + "dispatchEvent": false, + "DisposableStack": false, + "document": false, + "Document": false, + "DocumentFragment": false, + "documentPictureInPicture": false, + "DocumentPictureInPicture": false, + "DocumentPictureInPictureEvent": false, + "DocumentTimeline": false, + "DocumentType": false, + "DOMError": false, + "DOMException": false, + "DOMImplementation": false, + "DOMMatrix": false, + "DOMMatrixReadOnly": false, + "DOMParser": false, + "DOMPoint": false, + "DOMPointReadOnly": false, + "DOMQuad": false, + "DOMRect": false, + "DOMRectList": false, + "DOMRectReadOnly": false, + "DOMStringList": false, + "DOMStringMap": false, + "DOMTokenList": false, + "DragEvent": false, + "DynamicsCompressorNode": false, + "EditContext": false, + "Element": false, + "ElementInternals": false, + "EncodedAudioChunk": false, + "EncodedVideoChunk": false, + "ErrorEvent": false, + "event": false, + "Event": false, + "EventCounts": false, + "EventSource": false, + "EventTarget": false, + "external": false, + "External": false, + "EyeDropper": false, + "FeaturePolicy": false, + "FederatedCredential": false, + "fence": false, + "Fence": false, + "FencedFrameConfig": false, + "fetch": false, + "fetchLater": false, + "FetchLaterResult": false, + "File": false, + "FileList": false, + "FileReader": false, + "FileSystem": false, + "FileSystemDirectoryEntry": false, + "FileSystemDirectoryHandle": false, + "FileSystemDirectoryReader": false, + "FileSystemEntry": false, + "FileSystemFileEntry": false, + "FileSystemFileHandle": false, + "FileSystemHandle": false, + "FileSystemObserver": false, + "FileSystemWritableFileStream": false, + "find": false, + "focus": false, + "FocusEvent": false, + "FontData": false, + "FontFace": false, + "FontFaceSet": false, + "FontFaceSetLoadEvent": false, + "FormData": false, + "FormDataEvent": false, + "FragmentDirective": false, + "frameElement": false, + "frames": false, + "GainNode": false, + "Gamepad": false, + "GamepadAxisMoveEvent": false, + "GamepadButton": false, + "GamepadButtonEvent": false, + "GamepadEvent": false, + "GamepadHapticActuator": false, + "GamepadPose": false, + "Geolocation": false, + "GeolocationCoordinates": false, + "GeolocationPosition": false, + "GeolocationPositionError": false, + "getComputedStyle": false, + "getScreenDetails": false, + "getSelection": false, + "GPU": false, + "GPUAdapter": false, + "GPUAdapterInfo": false, + "GPUBindGroup": false, + "GPUBindGroupLayout": false, + "GPUBuffer": false, + "GPUBufferUsage": false, + "GPUCanvasContext": false, + "GPUColorWrite": false, + "GPUCommandBuffer": false, + "GPUCommandEncoder": false, + "GPUCompilationInfo": false, + "GPUCompilationMessage": false, + "GPUComputePassEncoder": false, + "GPUComputePipeline": false, + "GPUDevice": false, + "GPUDeviceLostInfo": false, + "GPUError": false, + "GPUExternalTexture": false, + "GPUInternalError": false, + "GPUMapMode": false, + "GPUOutOfMemoryError": false, + "GPUPipelineError": false, + "GPUPipelineLayout": false, + "GPUQuerySet": false, + "GPUQueue": false, + "GPURenderBundle": false, + "GPURenderBundleEncoder": false, + "GPURenderPassEncoder": false, + "GPURenderPipeline": false, + "GPUSampler": false, + "GPUShaderModule": false, + "GPUShaderStage": false, + "GPUSupportedFeatures": false, + "GPUSupportedLimits": false, + "GPUTexture": false, + "GPUTextureUsage": false, + "GPUTextureView": false, + "GPUUncapturedErrorEvent": false, + "GPUValidationError": false, + "GravitySensor": false, + "Gyroscope": false, + "HashChangeEvent": false, + "Headers": false, + "HID": false, + "HIDConnectionEvent": false, + "HIDDevice": false, + "HIDInputReportEvent": false, + "Highlight": false, + "HighlightRegistry": false, + "history": false, + "History": false, + "HTMLAllCollection": false, + "HTMLAnchorElement": false, + "HTMLAreaElement": false, + "HTMLAudioElement": false, + "HTMLBaseElement": false, + "HTMLBodyElement": false, + "HTMLBRElement": false, + "HTMLButtonElement": false, + "HTMLCanvasElement": false, + "HTMLCollection": false, + "HTMLDataElement": false, + "HTMLDataListElement": false, + "HTMLDetailsElement": false, + "HTMLDialogElement": false, + "HTMLDirectoryElement": false, + "HTMLDivElement": false, + "HTMLDListElement": false, + "HTMLDocument": false, + "HTMLElement": false, + "HTMLEmbedElement": false, + "HTMLFencedFrameElement": false, + "HTMLFieldSetElement": false, + "HTMLFontElement": false, + "HTMLFormControlsCollection": false, + "HTMLFormElement": false, + "HTMLFrameElement": false, + "HTMLFrameSetElement": false, + "HTMLHeadElement": false, + "HTMLHeadingElement": false, + "HTMLHRElement": false, + "HTMLHtmlElement": false, + "HTMLIFrameElement": false, + "HTMLImageElement": false, + "HTMLInputElement": false, + "HTMLLabelElement": false, + "HTMLLegendElement": false, + "HTMLLIElement": false, + "HTMLLinkElement": false, + "HTMLMapElement": false, + "HTMLMarqueeElement": false, + "HTMLMediaElement": false, + "HTMLMenuElement": false, + "HTMLMetaElement": false, + "HTMLMeterElement": false, + "HTMLModElement": false, + "HTMLObjectElement": false, + "HTMLOListElement": false, + "HTMLOptGroupElement": false, + "HTMLOptionElement": false, + "HTMLOptionsCollection": false, + "HTMLOutputElement": false, + "HTMLParagraphElement": false, + "HTMLParamElement": false, + "HTMLPictureElement": false, + "HTMLPreElement": false, + "HTMLProgressElement": false, + "HTMLQuoteElement": false, + "HTMLScriptElement": false, + "HTMLSelectedContentElement": false, + "HTMLSelectElement": false, + "HTMLSlotElement": false, + "HTMLSourceElement": false, + "HTMLSpanElement": false, + "HTMLStyleElement": false, + "HTMLTableCaptionElement": false, + "HTMLTableCellElement": false, + "HTMLTableColElement": false, + "HTMLTableElement": false, + "HTMLTableRowElement": false, + "HTMLTableSectionElement": false, + "HTMLTemplateElement": false, + "HTMLTextAreaElement": false, + "HTMLTimeElement": false, + "HTMLTitleElement": false, + "HTMLTrackElement": false, + "HTMLUListElement": false, + "HTMLUnknownElement": false, + "HTMLVideoElement": false, + "IDBCursor": false, + "IDBCursorWithValue": false, + "IDBDatabase": false, + "IDBFactory": false, + "IDBIndex": false, + "IDBKeyRange": false, + "IDBObjectStore": false, + "IDBOpenDBRequest": false, + "IDBRecord": false, + "IDBRequest": false, + "IDBTransaction": false, + "IDBVersionChangeEvent": false, + "IdentityCredential": false, + "IdentityCredentialError": false, + "IdentityProvider": false, + "IdleDeadline": false, + "IdleDetector": false, + "IIRFilterNode": false, + "Image": false, + "ImageBitmap": false, + "ImageBitmapRenderingContext": false, + "ImageCapture": false, + "ImageData": false, + "ImageDecoder": false, + "ImageTrack": false, + "ImageTrackList": false, + "indexedDB": false, + "Ink": false, + "innerHeight": false, + "innerWidth": false, + "InputDeviceCapabilities": false, + "InputDeviceInfo": false, + "InputEvent": false, + "IntegrityViolationReportBody": false, + "InterestEvent": false, + "IntersectionObserver": false, + "IntersectionObserverEntry": false, + "isSecureContext": false, + "Keyboard": false, + "KeyboardEvent": false, + "KeyboardLayoutMap": false, + "KeyframeEffect": false, + "LanguageDetector": false, + "LargestContentfulPaint": false, + "LaunchParams": false, + "launchQueue": false, + "LaunchQueue": false, + "LayoutShift": false, + "LayoutShiftAttribution": false, + "length": false, + "LinearAccelerationSensor": false, + "localStorage": false, + "location": true, + "Location": false, + "locationbar": false, + "Lock": false, + "LockManager": false, + "matchMedia": false, + "MathMLElement": false, + "MediaCapabilities": false, + "MediaCapabilitiesInfo": false, + "MediaDeviceInfo": false, + "MediaDevices": false, + "MediaElementAudioSourceNode": false, + "MediaEncryptedEvent": false, + "MediaError": false, + "MediaKeyError": false, + "MediaKeyMessageEvent": false, + "MediaKeys": false, + "MediaKeySession": false, + "MediaKeyStatusMap": false, + "MediaKeySystemAccess": false, + "MediaList": false, + "MediaMetadata": false, + "MediaQueryList": false, + "MediaQueryListEvent": false, + "MediaRecorder": false, + "MediaRecorderErrorEvent": false, + "MediaSession": false, + "MediaSource": false, + "MediaSourceHandle": false, + "MediaStream": false, + "MediaStreamAudioDestinationNode": false, + "MediaStreamAudioSourceNode": false, + "MediaStreamEvent": false, + "MediaStreamTrack": false, + "MediaStreamTrackAudioSourceNode": false, + "MediaStreamTrackAudioStats": false, + "MediaStreamTrackEvent": false, + "MediaStreamTrackGenerator": false, + "MediaStreamTrackProcessor": false, + "MediaStreamTrackVideoStats": false, + "menubar": false, + "MessageChannel": false, + "MessageEvent": false, + "MessagePort": false, + "MIDIAccess": false, + "MIDIConnectionEvent": false, + "MIDIInput": false, + "MIDIInputMap": false, + "MIDIMessageEvent": false, + "MIDIOutput": false, + "MIDIOutputMap": false, + "MIDIPort": false, + "MimeType": false, + "MimeTypeArray": false, + "model": false, + "ModelGenericSession": false, + "ModelManager": false, + "MouseEvent": false, + "moveBy": false, + "moveTo": false, + "MutationEvent": false, + "MutationObserver": false, + "MutationRecord": false, + "name": false, + "NamedNodeMap": false, + "NavigateEvent": false, + "navigation": false, + "Navigation": false, + "NavigationActivation": false, + "NavigationCurrentEntryChangeEvent": false, + "NavigationDestination": false, + "NavigationHistoryEntry": false, + "NavigationPrecommitController": false, + "NavigationPreloadManager": false, + "NavigationTransition": false, + "navigator": false, + "Navigator": false, + "NavigatorLogin": false, + "NavigatorManagedData": false, + "NavigatorUAData": false, + "NetworkInformation": false, + "Node": false, + "NodeFilter": false, + "NodeIterator": false, + "NodeList": false, + "Notification": false, + "NotifyPaintEvent": false, + "NotRestoredReasonDetails": false, + "NotRestoredReasons": false, + "Observable": false, + "OfflineAudioCompletionEvent": false, + "OfflineAudioContext": false, + "offscreenBuffering": false, + "OffscreenCanvas": false, + "OffscreenCanvasRenderingContext2D": false, + "onabort": true, + "onafterprint": true, + "onanimationcancel": true, + "onanimationend": true, + "onanimationiteration": true, + "onanimationstart": true, + "onappinstalled": true, + "onauxclick": true, + "onbeforeinput": true, + "onbeforeinstallprompt": true, + "onbeforematch": true, + "onbeforeprint": true, + "onbeforetoggle": true, + "onbeforeunload": true, + "onbeforexrselect": true, + "onblur": true, + "oncancel": true, + "oncanplay": true, + "oncanplaythrough": true, + "onchange": true, + "onclick": true, + "onclose": true, + "oncommand": true, + "oncontentvisibilityautostatechange": true, + "oncontextlost": true, + "oncontextmenu": true, + "oncontextrestored": true, + "oncopy": true, + "oncuechange": true, + "oncut": true, + "ondblclick": true, + "ondevicemotion": true, + "ondeviceorientation": true, + "ondeviceorientationabsolute": true, + "ondrag": true, + "ondragend": true, + "ondragenter": true, + "ondragleave": true, + "ondragover": true, + "ondragstart": true, + "ondrop": true, + "ondurationchange": true, + "onemptied": true, + "onended": true, + "onerror": true, + "onfocus": true, + "onformdata": true, + "ongamepadconnected": true, + "ongamepaddisconnected": true, + "ongotpointercapture": true, + "onhashchange": true, + "oninput": true, + "oninvalid": true, + "onkeydown": true, + "onkeypress": true, + "onkeyup": true, + "onlanguagechange": true, + "onload": true, + "onloadeddata": true, + "onloadedmetadata": true, + "onloadstart": true, + "onlostpointercapture": true, + "onmessage": true, + "onmessageerror": true, + "onmousedown": true, + "onmouseenter": true, + "onmouseleave": true, + "onmousemove": true, + "onmouseout": true, + "onmouseover": true, + "onmouseup": true, + "onmousewheel": true, + "onoffline": true, + "ononline": true, + "onpagehide": true, + "onpagereveal": true, + "onpageshow": true, + "onpageswap": true, + "onpaste": true, + "onpause": true, + "onplay": true, + "onplaying": true, + "onpointercancel": true, + "onpointerdown": true, + "onpointerenter": true, + "onpointerleave": true, + "onpointermove": true, + "onpointerout": true, + "onpointerover": true, + "onpointerrawupdate": true, + "onpointerup": true, + "onpopstate": true, + "onprogress": true, + "onratechange": true, + "onrejectionhandled": true, + "onreset": true, + "onresize": true, + "onscroll": true, + "onscrollend": true, + "onscrollsnapchange": true, + "onscrollsnapchanging": true, + "onsearch": true, + "onsecuritypolicyviolation": true, + "onseeked": true, + "onseeking": true, + "onselect": true, + "onselectionchange": true, + "onselectstart": true, + "onslotchange": true, + "onstalled": true, + "onstorage": true, + "onsubmit": true, + "onsuspend": true, + "ontimeupdate": true, + "ontoggle": true, + "ontransitioncancel": true, + "ontransitionend": true, + "ontransitionrun": true, + "ontransitionstart": true, + "onunhandledrejection": true, + "onunload": true, + "onvolumechange": true, + "onwaiting": true, + "onwheel": true, + "open": false, + "opener": false, + "Option": false, + "OrientationSensor": false, + "origin": false, + "originAgentCluster": false, + "OscillatorNode": false, + "OTPCredential": false, + "outerHeight": false, + "outerWidth": false, + "OverconstrainedError": false, + "PageRevealEvent": false, + "PageSwapEvent": false, + "PageTransitionEvent": false, + "pageXOffset": false, + "pageYOffset": false, + "PannerNode": false, + "parent": false, + "PasswordCredential": false, + "Path2D": false, + "PaymentAddress": false, + "PaymentManager": false, + "PaymentMethodChangeEvent": false, + "PaymentRequest": false, + "PaymentRequestUpdateEvent": false, + "PaymentResponse": false, + "performance": false, + "Performance": false, + "PerformanceElementTiming": false, + "PerformanceEntry": false, + "PerformanceEventTiming": false, + "PerformanceLongAnimationFrameTiming": false, + "PerformanceLongTaskTiming": false, + "PerformanceMark": false, + "PerformanceMeasure": false, + "PerformanceNavigation": false, + "PerformanceNavigationTiming": false, + "PerformanceObserver": false, + "PerformanceObserverEntryList": false, + "PerformancePaintTiming": false, + "PerformanceResourceTiming": false, + "PerformanceScriptTiming": false, + "PerformanceServerTiming": false, + "PerformanceTiming": false, + "PeriodicSyncManager": false, + "PeriodicWave": false, + "Permissions": false, + "PermissionStatus": false, + "PERSISTENT": false, + "personalbar": false, + "PictureInPictureEvent": false, + "PictureInPictureWindow": false, + "Plugin": false, + "PluginArray": false, + "PointerEvent": false, + "PopStateEvent": false, + "postMessage": false, + "Presentation": false, + "PresentationAvailability": false, + "PresentationConnection": false, + "PresentationConnectionAvailableEvent": false, + "PresentationConnectionCloseEvent": false, + "PresentationConnectionList": false, + "PresentationReceiver": false, + "PresentationRequest": false, + "PressureObserver": false, + "PressureRecord": false, + "print": false, + "ProcessingInstruction": false, + "Profiler": false, + "ProgressEvent": false, + "PromiseRejectionEvent": false, + "prompt": false, + "ProtectedAudience": false, + "PublicKeyCredential": false, + "PushManager": false, + "PushSubscription": false, + "PushSubscriptionOptions": false, + "queryLocalFonts": false, + "queueMicrotask": false, + "QuotaExceededError": false, + "RadioNodeList": false, + "Range": false, + "ReadableByteStreamController": false, + "ReadableStream": false, + "ReadableStreamBYOBReader": false, + "ReadableStreamBYOBRequest": false, + "ReadableStreamDefaultController": false, + "ReadableStreamDefaultReader": false, + "registerProcessor": false, + "RelativeOrientationSensor": false, + "RemotePlayback": false, + "removeEventListener": false, + "ReportBody": false, + "reportError": false, + "ReportingObserver": false, + "Request": false, + "requestAnimationFrame": false, + "requestIdleCallback": false, + "resizeBy": false, + "ResizeObserver": false, + "ResizeObserverEntry": false, + "ResizeObserverSize": false, + "resizeTo": false, + "Response": false, + "RestrictionTarget": false, + "RTCCertificate": false, + "RTCDataChannel": false, + "RTCDataChannelEvent": false, + "RTCDtlsTransport": false, + "RTCDTMFSender": false, + "RTCDTMFToneChangeEvent": false, + "RTCEncodedAudioFrame": false, + "RTCEncodedVideoFrame": false, + "RTCError": false, + "RTCErrorEvent": false, + "RTCIceCandidate": false, + "RTCIceTransport": false, + "RTCPeerConnection": false, + "RTCPeerConnectionIceErrorEvent": false, + "RTCPeerConnectionIceEvent": false, + "RTCRtpReceiver": false, + "RTCRtpScriptTransform": false, + "RTCRtpSender": false, + "RTCRtpTransceiver": false, + "RTCSctpTransport": false, + "RTCSessionDescription": false, + "RTCStatsReport": false, + "RTCTrackEvent": false, + "sampleRate": false, + "scheduler": false, + "Scheduler": false, + "Scheduling": false, + "screen": false, + "Screen": false, + "ScreenDetailed": false, + "ScreenDetails": false, + "screenLeft": false, + "ScreenOrientation": false, + "screenTop": false, + "screenX": false, + "screenY": false, + "ScriptProcessorNode": false, + "scroll": false, + "scrollbars": false, + "scrollBy": false, + "ScrollTimeline": false, + "scrollTo": false, + "scrollX": false, + "scrollY": false, + "SecurityPolicyViolationEvent": false, + "Selection": false, + "self": false, + "Sensor": false, + "SensorErrorEvent": false, + "Serial": false, + "SerialPort": false, + "ServiceWorker": false, + "ServiceWorkerContainer": false, + "ServiceWorkerRegistration": false, + "sessionStorage": false, + "setInterval": false, + "setTimeout": false, + "ShadowRoot": false, + "sharedStorage": false, + "SharedStorage": false, + "SharedStorageAppendMethod": false, + "SharedStorageClearMethod": false, + "SharedStorageDeleteMethod": false, + "SharedStorageModifierMethod": false, + "SharedStorageSetMethod": false, + "SharedStorageWorklet": false, + "SharedWorker": false, + "showDirectoryPicker": false, + "showOpenFilePicker": false, + "showSaveFilePicker": false, + "SnapEvent": false, + "SourceBuffer": false, + "SourceBufferList": false, + "SpeechGrammar": false, + "SpeechGrammarList": false, + "SpeechRecognition": false, + "SpeechRecognitionErrorEvent": false, + "SpeechRecognitionEvent": false, + "SpeechRecognitionPhrase": false, + "speechSynthesis": false, + "SpeechSynthesis": false, + "SpeechSynthesisErrorEvent": false, + "SpeechSynthesisEvent": false, + "SpeechSynthesisUtterance": false, + "SpeechSynthesisVoice": false, + "StaticRange": false, + "status": false, + "statusbar": false, + "StereoPannerNode": false, + "stop": false, + "Storage": false, + "StorageBucket": false, + "StorageBucketManager": false, + "StorageEvent": false, + "StorageManager": false, + "structuredClone": false, + "styleMedia": false, + "StylePropertyMap": false, + "StylePropertyMapReadOnly": false, + "StyleSheet": false, + "StyleSheetList": false, + "SubmitEvent": false, + "Subscriber": false, + "SubtleCrypto": false, + "Summarizer": false, + "SuppressedError": false, + "SVGAElement": false, + "SVGAngle": false, + "SVGAnimatedAngle": false, + "SVGAnimatedBoolean": false, + "SVGAnimatedEnumeration": false, + "SVGAnimatedInteger": false, + "SVGAnimatedLength": false, + "SVGAnimatedLengthList": false, + "SVGAnimatedNumber": false, + "SVGAnimatedNumberList": false, + "SVGAnimatedPreserveAspectRatio": false, + "SVGAnimatedRect": false, + "SVGAnimatedString": false, + "SVGAnimatedTransformList": false, + "SVGAnimateElement": false, + "SVGAnimateMotionElement": false, + "SVGAnimateTransformElement": false, + "SVGAnimationElement": false, + "SVGCircleElement": false, + "SVGClipPathElement": false, + "SVGComponentTransferFunctionElement": false, + "SVGDefsElement": false, + "SVGDescElement": false, + "SVGElement": false, + "SVGEllipseElement": false, + "SVGFEBlendElement": false, + "SVGFEColorMatrixElement": false, + "SVGFEComponentTransferElement": false, + "SVGFECompositeElement": false, + "SVGFEConvolveMatrixElement": false, + "SVGFEDiffuseLightingElement": false, + "SVGFEDisplacementMapElement": false, + "SVGFEDistantLightElement": false, + "SVGFEDropShadowElement": false, + "SVGFEFloodElement": false, + "SVGFEFuncAElement": false, + "SVGFEFuncBElement": false, + "SVGFEFuncGElement": false, + "SVGFEFuncRElement": false, + "SVGFEGaussianBlurElement": false, + "SVGFEImageElement": false, + "SVGFEMergeElement": false, + "SVGFEMergeNodeElement": false, + "SVGFEMorphologyElement": false, + "SVGFEOffsetElement": false, + "SVGFEPointLightElement": false, + "SVGFESpecularLightingElement": false, + "SVGFESpotLightElement": false, + "SVGFETileElement": false, + "SVGFETurbulenceElement": false, + "SVGFilterElement": false, + "SVGForeignObjectElement": false, + "SVGGElement": false, + "SVGGeometryElement": false, + "SVGGradientElement": false, + "SVGGraphicsElement": false, + "SVGImageElement": false, + "SVGLength": false, + "SVGLengthList": false, + "SVGLinearGradientElement": false, + "SVGLineElement": false, + "SVGMarkerElement": false, + "SVGMaskElement": false, + "SVGMatrix": false, + "SVGMetadataElement": false, + "SVGMPathElement": false, + "SVGNumber": false, + "SVGNumberList": false, + "SVGPathElement": false, + "SVGPatternElement": false, + "SVGPoint": false, + "SVGPointList": false, + "SVGPolygonElement": false, + "SVGPolylineElement": false, + "SVGPreserveAspectRatio": false, + "SVGRadialGradientElement": false, + "SVGRect": false, + "SVGRectElement": false, + "SVGScriptElement": false, + "SVGSetElement": false, + "SVGStopElement": false, + "SVGStringList": false, + "SVGStyleElement": false, + "SVGSVGElement": false, + "SVGSwitchElement": false, + "SVGSymbolElement": false, + "SVGTextContentElement": false, + "SVGTextElement": false, + "SVGTextPathElement": false, + "SVGTextPositioningElement": false, + "SVGTitleElement": false, + "SVGTransform": false, + "SVGTransformList": false, + "SVGTSpanElement": false, + "SVGUnitTypes": false, + "SVGUseElement": false, + "SVGViewElement": false, + "SyncManager": false, + "TaskAttributionTiming": false, + "TaskController": false, + "TaskPriorityChangeEvent": false, + "TaskSignal": false, + "TEMPORARY": false, + "Text": false, + "TextDecoder": false, + "TextDecoderStream": false, + "TextEncoder": false, + "TextEncoderStream": false, + "TextEvent": false, + "TextFormat": false, + "TextFormatUpdateEvent": false, + "TextMetrics": false, + "TextTrack": false, + "TextTrackCue": false, + "TextTrackCueList": false, + "TextTrackList": false, + "TextUpdateEvent": false, + "TimeEvent": false, + "TimeRanges": false, + "ToggleEvent": false, + "toolbar": false, + "top": false, + "Touch": false, + "TouchEvent": false, + "TouchList": false, + "TrackEvent": false, + "TransformStream": false, + "TransformStreamDefaultController": false, + "TransitionEvent": false, + "Translator": false, + "TreeWalker": false, + "TrustedHTML": false, + "TrustedScript": false, + "TrustedScriptURL": false, + "TrustedTypePolicy": false, + "TrustedTypePolicyFactory": false, + "trustedTypes": false, + "UIEvent": false, + "URL": false, + "URLPattern": false, + "URLSearchParams": false, + "USB": false, + "USBAlternateInterface": false, + "USBConfiguration": false, + "USBConnectionEvent": false, + "USBDevice": false, + "USBEndpoint": false, + "USBInterface": false, + "USBInTransferResult": false, + "USBIsochronousInTransferPacket": false, + "USBIsochronousInTransferResult": false, + "USBIsochronousOutTransferPacket": false, + "USBIsochronousOutTransferResult": false, + "USBOutTransferResult": false, + "UserActivation": false, + "ValidityState": false, + "VideoColorSpace": false, + "VideoDecoder": false, + "VideoEncoder": false, + "VideoFrame": false, + "VideoPlaybackQuality": false, + "viewport": false, + "Viewport": false, + "ViewTimeline": false, + "ViewTransition": false, + "ViewTransitionTypeSet": false, + "VirtualKeyboard": false, + "VirtualKeyboardGeometryChangeEvent": false, + "VisibilityStateEntry": false, + "visualViewport": false, + "VisualViewport": false, + "VTTCue": false, + "VTTRegion": false, + "WakeLock": false, + "WakeLockSentinel": false, + "WaveShaperNode": false, + "WebAssembly": false, + "WebGL2RenderingContext": false, + "WebGLActiveInfo": false, + "WebGLBuffer": false, + "WebGLContextEvent": false, + "WebGLFramebuffer": false, + "WebGLObject": false, + "WebGLProgram": false, + "WebGLQuery": false, + "WebGLRenderbuffer": false, + "WebGLRenderingContext": false, + "WebGLSampler": false, + "WebGLShader": false, + "WebGLShaderPrecisionFormat": false, + "WebGLSync": false, + "WebGLTexture": false, + "WebGLTransformFeedback": false, + "WebGLUniformLocation": false, + "WebGLVertexArrayObject": false, + "WebSocket": false, + "WebSocketError": false, + "WebSocketStream": false, + "WebTransport": false, + "WebTransportBidirectionalStream": false, + "WebTransportDatagramDuplexStream": false, + "WebTransportError": false, + "WebTransportReceiveStream": false, + "WebTransportSendStream": false, + "WGSLLanguageFeatures": false, + "WheelEvent": false, + "when": false, + "window": false, + "Window": false, + "WindowControlsOverlay": false, + "WindowControlsOverlayGeometryChangeEvent": false, + "Worker": false, + "Worklet": false, + "WorkletGlobalScope": false, + "WritableStream": false, + "WritableStreamDefaultController": false, + "WritableStreamDefaultWriter": false, + "XMLDocument": false, + "XMLHttpRequest": false, + "XMLHttpRequestEventTarget": false, + "XMLHttpRequestUpload": false, + "XMLSerializer": false, + "XPathEvaluator": false, + "XPathExpression": false, + "XPathResult": false, + "XRAnchor": false, + "XRAnchorSet": false, + "XRBoundedReferenceSpace": false, + "XRCamera": false, + "XRCPUDepthInformation": false, + "XRDepthInformation": false, + "XRDOMOverlayState": false, + "XRFrame": false, + "XRHand": false, + "XRHitTestResult": false, + "XRHitTestSource": false, + "XRInputSource": false, + "XRInputSourceArray": false, + "XRInputSourceEvent": false, + "XRInputSourcesChangeEvent": false, + "XRJointPose": false, + "XRJointSpace": false, + "XRLayer": false, + "XRLightEstimate": false, + "XRLightProbe": false, + "XRPose": false, + "XRRay": false, + "XRReferenceSpace": false, + "XRReferenceSpaceEvent": false, + "XRRenderState": false, + "XRRigidTransform": false, + "XRSession": false, + "XRSessionEvent": false, + "XRSpace": false, + "XRSystem": false, + "XRTransientInputHitTestResult": false, + "XRTransientInputHitTestSource": false, + "XRView": false, + "XRViewerPose": false, + "XRViewport": false, + "XRWebGLBinding": false, + "XRWebGLDepthInformation": false, + "XRWebGLLayer": false, + "XSLTProcessor": false + } + }, + "errors": [ + { + "messageId": "unexpectedRefCall", + "data": { + "name": "foo", + "ref": "Intl" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-obj-calls > invalid + +```js +var x = globalThis?.Reflect(); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2020 + }, + "errors": [ + { + "messageId": "unexpectedCall", + "data": { + "name": "Reflect" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-obj-calls > invalid + +```js +var x = (globalThis?.Reflect)(); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2020 + }, + "errors": [ + { + "messageId": "unexpectedCall", + "data": { + "name": "Reflect" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +### `no-object-constructor` + +Pass: 55 / 56 (98.2%) +Fail: 1 / 56 (1.8%) + +#### no-object-constructor > valid + +```js +new Object() +``` + +```json +{ + "languageOptions": { + "globals": { + "Object": "off" + } + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-object-constructor', + message: 'The object literal notation {} is preferable.', + messageId: 'preferLiteral', + severity: 1, + nodeType: 'NewExpression', + line: 1, + column: 0, + endLine: 1, + endColumn: 12, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +### `no-promise-executor-return` + +Pass: 14 / 124 (11.3%) +Fail: 110 / 124 (88.7%) + +#### no-promise-executor-return > valid + +```js +function foo(resolve, reject) { return 1; } +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'shouldCheck') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/no-promise-executor-return.js:230:20) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-promise-executor-return > valid + +```js +function Promise(resolve, reject) { return 1; } +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'shouldCheck') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/no-promise-executor-return.js:230:20) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-promise-executor-return > valid + +```js +(function (resolve, reject) { return 1; }) +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'shouldCheck') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/no-promise-executor-return.js:230:20) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-promise-executor-return > valid + +```js +(function foo(resolve, reject) { return 1; }) +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'shouldCheck') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/no-promise-executor-return.js:230:20) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-promise-executor-return > valid + +```js +(function Promise(resolve, reject) { return 1; }) +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'shouldCheck') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/no-promise-executor-return.js:230:20) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-promise-executor-return > valid + +```js +var foo = function (resolve, reject) { return 1; } +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'shouldCheck') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/no-promise-executor-return.js:230:20) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-promise-executor-return > valid + +```js +var foo = function Promise(resolve, reject) { return 1; } +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'shouldCheck') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/no-promise-executor-return.js:230:20) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-promise-executor-return > valid + +```js +var Promise = function (resolve, reject) { return 1; } +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'shouldCheck') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/no-promise-executor-return.js:230:20) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-promise-executor-return > valid + +```js +(resolve, reject) => { return 1; } +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'shouldCheck') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/no-promise-executor-return.js:230:20) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-promise-executor-return > valid + +```js +var foo = (resolve, reject) => { return 1; } +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'shouldCheck') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/no-promise-executor-return.js:230:20) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-promise-executor-return > valid + +```js +var Promise = (resolve, reject) => { return 1; } +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'shouldCheck') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/no-promise-executor-return.js:230:20) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-promise-executor-return > valid + +```js +var foo = { bar(resolve, reject) { return 1; } } +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'shouldCheck') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/no-promise-executor-return.js:230:20) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-promise-executor-return > valid + +```js +var foo = { Promise(resolve, reject) { return 1; } } +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'shouldCheck') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/no-promise-executor-return.js:230:20) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-promise-executor-return > valid + +```js +new foo(function (resolve, reject) { return 1; }); +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'shouldCheck') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/no-promise-executor-return.js:230:20) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-promise-executor-return > valid + +```js +new foo(function bar(resolve, reject) { return 1; }); +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'shouldCheck') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/no-promise-executor-return.js:230:20) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-promise-executor-return > valid + +```js +new foo(function Promise(resolve, reject) { return 1; }); +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'shouldCheck') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/no-promise-executor-return.js:230:20) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-promise-executor-return > valid + +```js +new foo((resolve, reject) => { return 1; }); +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'shouldCheck') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/no-promise-executor-return.js:230:20) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-promise-executor-return > valid + +```js +new promise(function foo(resolve, reject) { return 1; }); +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'shouldCheck') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/no-promise-executor-return.js:230:20) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-promise-executor-return > valid + +```js +new Promise.foo(function foo(resolve, reject) { return 1; }); +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'shouldCheck') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/no-promise-executor-return.js:230:20) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-promise-executor-return > valid + +```js +new foo.Promise(function foo(resolve, reject) { return 1; }); +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'shouldCheck') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/no-promise-executor-return.js:230:20) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-promise-executor-return > valid + +```js +new Promise.Promise(function foo(resolve, reject) { return 1; }); +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'shouldCheck') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/no-promise-executor-return.js:230:20) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-promise-executor-return > valid + +```js +new Promise()(function foo(resolve, reject) { return 1; }); +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'shouldCheck') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/no-promise-executor-return.js:230:20) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-promise-executor-return > valid + +```js +Promise(function (resolve, reject) { return 1; }); +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'shouldCheck') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/no-promise-executor-return.js:230:20) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-promise-executor-return > valid + +```js +Promise((resolve, reject) => { return 1; }); +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'shouldCheck') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/no-promise-executor-return.js:230:20) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-promise-executor-return > valid + +```js +new Promise(foo, function (resolve, reject) { return 1; }); +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'shouldCheck') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/no-promise-executor-return.js:230:20) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-promise-executor-return > valid + +```js +new Promise(foo, (resolve, reject) => { return 1; }); +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'shouldCheck') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/no-promise-executor-return.js:230:20) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-promise-executor-return > valid + +```js +/* globals Promise:off */ new Promise(function (resolve, reject) { return 1; }); +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'shouldCheck') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/no-promise-executor-return.js:230:20) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-promise-executor-return > valid + +```js +new Promise((resolve, reject) => { return 1; }); +``` + +```json +{ + "languageOptions": { + "globals": { + "Promise": "off" + } + } +} +``` + +TypeError: Cannot read properties of null (reading 'shouldCheck') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/no-promise-executor-return.js:230:20) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-promise-executor-return > valid + +```js +let Promise; new Promise(function (resolve, reject) { return 1; }); +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'shouldCheck') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/no-promise-executor-return.js:230:20) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-promise-executor-return > valid + +```js +function f() { new Promise((resolve, reject) => { return 1; }); var Promise; } +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'shouldCheck') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/no-promise-executor-return.js:230:20) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-promise-executor-return > valid + +```js +if (x) { const Promise = foo(); new Promise(function (resolve, reject) { return 1; }); } +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'shouldCheck') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/no-promise-executor-return.js:230:20) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-promise-executor-return > valid + +```js +x = function Promise() { new Promise((resolve, reject) => { return 1; }); } +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'shouldCheck') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/no-promise-executor-return.js:230:20) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-promise-executor-return > valid + +```js +new Promise(function (resolve, reject) { return; }); +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'shouldCheck') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/no-promise-executor-return.js:230:20) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-promise-executor-return > valid + +```js +new Promise(function (resolve, reject) { reject(new Error()); return; }); +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'shouldCheck') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/no-promise-executor-return.js:230:20) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-promise-executor-return > valid + +```js +new Promise(function (resolve, reject) { if (foo) { return; } }); +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'shouldCheck') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/no-promise-executor-return.js:230:20) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-promise-executor-return > valid + +```js +new Promise((resolve, reject) => { return; }); +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'shouldCheck') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/no-promise-executor-return.js:230:20) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-promise-executor-return > valid + +```js +new Promise((resolve, reject) => { if (foo) { resolve(1); return; } reject(new Error()); }); +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'shouldCheck') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/no-promise-executor-return.js:230:20) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-promise-executor-return > valid + +```js +new Promise(function (resolve, reject) { function foo() { return 1; } }); +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'shouldCheck') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/no-promise-executor-return.js:230:20) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-promise-executor-return > valid + +```js +new Promise((resolve, reject) => { (function foo() { return 1; })(); }); +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'shouldCheck') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/no-promise-executor-return.js:230:20) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-promise-executor-return > valid + +```js +new Promise(function (resolve, reject) { () => { return 1; } }); +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'shouldCheck') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/no-promise-executor-return.js:230:20) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-promise-executor-return > valid + +```js +function foo() { return new Promise(function (resolve, reject) { resolve(bar); }) }; +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'shouldCheck') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/no-promise-executor-return.js:230:20) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-promise-executor-return > valid + +```js +foo => new Promise((resolve, reject) => { bar(foo, (err, data) => { if (err) { reject(err); return; } resolve(data); })}); +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'shouldCheck') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/no-promise-executor-return.js:230:20) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-promise-executor-return > valid + +```js +new Promise(function (resolve, reject) {}); function foo() { return 1; } +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'shouldCheck') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/no-promise-executor-return.js:230:20) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-promise-executor-return > valid + +```js +new Promise((resolve, reject) => {}); (function () { return 1; }); +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'shouldCheck') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/no-promise-executor-return.js:230:20) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-promise-executor-return > valid + +```js +new Promise(function (resolve, reject) {}); () => { return 1; }; +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'shouldCheck') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/no-promise-executor-return.js:230:20) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-promise-executor-return > valid + +```js +return 1; +``` + +```json +{ + "languageOptions": { + "sourceType": "commonjs" + } +} +``` + +TypeError: Cannot read properties of null (reading 'shouldCheck') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/no-promise-executor-return.js:230:20) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-promise-executor-return > valid + +```js +return 1; +``` + +```json +{ + "languageOptions": { + "sourceType": "script", + "parserOptions": { + "ecmaFeatures": { + "globalReturn": true + } + } + } +} +``` + +TypeError: Cannot read properties of null (reading 'shouldCheck') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/no-promise-executor-return.js:230:20) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-promise-executor-return > valid + +```js +return 1; function foo(){ return 1; } return 1; +``` + +```json +{ + "languageOptions": { + "sourceType": "commonjs" + } +} +``` + +TypeError: Cannot read properties of null (reading 'shouldCheck') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/no-promise-executor-return.js:230:20) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-promise-executor-return > valid + +```js +function foo(){} return 1; var bar = function*(){ return 1; }; return 1; var baz = () => {}; return 1; +``` + +```json +{ + "languageOptions": { + "sourceType": "commonjs" + } +} +``` + +TypeError: Cannot read properties of null (reading 'shouldCheck') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/no-promise-executor-return.js:230:20) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-promise-executor-return > valid + +```js +new Promise(function (resolve, reject) {}); return 1; +``` + +```json +{ + "languageOptions": { + "sourceType": "commonjs" + } +} +``` + +TypeError: Cannot read properties of null (reading 'shouldCheck') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/no-promise-executor-return.js:230:20) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-promise-executor-return > valid + +```js +new Promise(r => { return void 0 }) +``` + +```json +{ + "options": [ + { + "allowVoid": true + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'shouldCheck') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/no-promise-executor-return.js:230:20) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-promise-executor-return > valid + +```js +new Promise(r => { if (foo) { return void 0 } return void 0 }) +``` + +```json +{ + "options": [ + { + "allowVoid": true + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'shouldCheck') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/no-promise-executor-return.js:230:20) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-promise-executor-return > invalid + +```js +new Promise(function (resolve, reject) { return 1; }) +``` + +```json +{ + "errors": [ + { + "message": "Return values from promise executor functions cannot be read.", + "column": 42, + "endColumn": 51, + "suggestions": null + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'shouldCheck') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/no-promise-executor-return.js:230:20) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-promise-executor-return > invalid + +```js +new Promise((resolve, reject) => resolve(1)) +``` + +```json +{ + "options": [ + { + "allowVoid": true + } + ], + "errors": [ + { + "message": "Return values from promise executor functions cannot be read.", + "column": 34, + "endColumn": 44, + "suggestions": [ + { + "messageId": "prependVoid", + "output": "new Promise((resolve, reject) => void resolve(1))" + }, + { + "messageId": "wrapBraces", + "output": "new Promise((resolve, reject) => {resolve(1)})" + } + ] + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-promise-executor-return > invalid + +```js +new Promise((resolve, reject) => { return 1 }) +``` + +```json +{ + "options": [ + { + "allowVoid": true + } + ], + "errors": [ + { + "message": "Return values from promise executor functions cannot be read.", + "column": 36, + "endColumn": 44, + "suggestions": [ + { + "messageId": "prependVoid", + "output": "new Promise((resolve, reject) => { return void 1 })" + } + ] + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'shouldCheck') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/no-promise-executor-return.js:230:20) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-promise-executor-return > invalid + +```js +new Promise(r => 1) +``` + +```json +{ + "options": [ + { + "allowVoid": true + } + ], + "errors": [ + { + "messageId": "returnsValue", + "suggestions": [ + { + "messageId": "prependVoid", + "output": "new Promise(r => void 1)" + }, + { + "messageId": "wrapBraces", + "output": "new Promise(r => {1})" + } + ] + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-promise-executor-return > invalid + +```js +new Promise(r => 1 ? 2 : 3) +``` + +```json +{ + "options": [ + { + "allowVoid": true + } + ], + "errors": [ + { + "messageId": "returnsValue", + "suggestions": [ + { + "messageId": "prependVoid", + "output": "new Promise(r => void (1 ? 2 : 3))" + }, + { + "messageId": "wrapBraces", + "output": "new Promise(r => {1 ? 2 : 3})" + } + ] + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-promise-executor-return > invalid + +```js +new Promise(r => (1 ? 2 : 3)) +``` + +```json +{ + "options": [ + { + "allowVoid": true + } + ], + "errors": [ + { + "messageId": "returnsValue", + "suggestions": [ + { + "messageId": "prependVoid", + "output": "new Promise(r => void (1 ? 2 : 3))" + }, + { + "messageId": "wrapBraces", + "output": "new Promise(r => {(1 ? 2 : 3)})" + } + ] + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-promise-executor-return > invalid + +```js +new Promise(r => (1)) +``` + +```json +{ + "options": [ + { + "allowVoid": true + } + ], + "errors": [ + { + "messageId": "returnsValue", + "suggestions": [ + { + "messageId": "prependVoid", + "output": "new Promise(r => void (1))" + }, + { + "messageId": "wrapBraces", + "output": "new Promise(r => {(1)})" + } + ] + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-promise-executor-return > invalid + +```js +new Promise(r => () => {}) +``` + +```json +{ + "options": [ + { + "allowVoid": true + } + ], + "errors": [ + { + "messageId": "returnsValue", + "suggestions": [ + { + "messageId": "prependVoid", + "output": "new Promise(r => void (() => {}))" + }, + { + "messageId": "wrapBraces", + "output": "new Promise(r => {() => {}})" + } + ] + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-promise-executor-return > invalid + +```js +new Promise(r => null) +``` + +```json +{ + "options": [ + { + "allowVoid": true + } + ], + "errors": [ + { + "messageId": "returnsValue", + "suggestions": [ + { + "messageId": "prependVoid", + "output": "new Promise(r => void null)" + }, + { + "messageId": "wrapBraces", + "output": "new Promise(r => {null})" + } + ] + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-promise-executor-return > invalid + +```js +new Promise(r => null) +``` + +```json +{ + "options": [ + { + "allowVoid": false + } + ], + "errors": [ + { + "messageId": "returnsValue", + "suggestions": [ + { + "messageId": "wrapBraces", + "output": "new Promise(r => {null})" + } + ] + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-promise-executor-return > invalid + +```js +new Promise(r => /*hi*/ ~0) +``` + +```json +{ + "options": [ + { + "allowVoid": true + } + ], + "errors": [ + { + "messageId": "returnsValue", + "suggestions": [ + { + "messageId": "prependVoid", + "output": "new Promise(r => /*hi*/ void ~0)" + }, + { + "messageId": "wrapBraces", + "output": "new Promise(r => /*hi*/ {~0})" + } + ] + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-promise-executor-return > invalid + +```js +new Promise(r => /*hi*/ ~0) +``` + +```json +{ + "options": [ + { + "allowVoid": false + } + ], + "errors": [ + { + "messageId": "returnsValue", + "suggestions": [ + { + "messageId": "wrapBraces", + "output": "new Promise(r => /*hi*/ {~0})" + } + ] + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-promise-executor-return > invalid + +```js +new Promise(r => { return 0 }) +``` + +```json +{ + "options": [ + { + "allowVoid": true + } + ], + "errors": [ + { + "messageId": "returnsValue", + "suggestions": [ + { + "messageId": "prependVoid", + "output": "new Promise(r => { return void 0 })" + } + ] + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'shouldCheck') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/no-promise-executor-return.js:230:20) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-promise-executor-return > invalid + +```js +new Promise(r => { return 0 }) +``` + +```json +{ + "options": [ + { + "allowVoid": false + } + ], + "errors": [ + { + "messageId": "returnsValue", + "suggestions": null + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'shouldCheck') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/no-promise-executor-return.js:230:20) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-promise-executor-return > invalid + +```js +new Promise(r => { if (foo) { return void 0 } return 0 }) +``` + +```json +{ + "options": [ + { + "allowVoid": true + } + ], + "errors": [ + { + "messageId": "returnsValue", + "suggestions": [ + { + "messageId": "prependVoid", + "output": "new Promise(r => { if (foo) { return void 0 } return void 0 })" + } + ] + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'shouldCheck') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/no-promise-executor-return.js:230:20) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-promise-executor-return > invalid + +```js +new Promise(resolve => { return (foo = resolve(1)); }) +``` + +```json +{ + "options": [ + { + "allowVoid": true + } + ], + "errors": [ + { + "messageId": "returnsValue", + "suggestions": [ + { + "messageId": "prependVoid", + "output": "new Promise(resolve => { return void (foo = resolve(1)); })" + } + ] + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'shouldCheck') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/no-promise-executor-return.js:230:20) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-promise-executor-return > invalid + +```js +new Promise(resolve => r = resolve) +``` + +```json +{ + "options": [ + { + "allowVoid": true + } + ], + "errors": [ + { + "messageId": "returnsValue", + "suggestions": [ + { + "messageId": "prependVoid", + "output": "new Promise(resolve => void (r = resolve))" + }, + { + "messageId": "wrapBraces", + "output": "new Promise(resolve => {r = resolve})" + } + ] + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-promise-executor-return > invalid + +```js +new Promise(r => { return(1) }) +``` + +```json +{ + "options": [ + { + "allowVoid": true + } + ], + "errors": [ + { + "messageId": "returnsValue", + "suggestions": [ + { + "messageId": "prependVoid", + "output": "new Promise(r => { return void (1) })" + } + ] + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'shouldCheck') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/no-promise-executor-return.js:230:20) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-promise-executor-return > invalid + +```js +new Promise(r =>1) +``` + +```json +{ + "options": [ + { + "allowVoid": true + } + ], + "errors": [ + { + "messageId": "returnsValue", + "suggestions": [ + { + "messageId": "prependVoid", + "output": "new Promise(r =>void 1)" + }, + { + "messageId": "wrapBraces", + "output": "new Promise(r =>{1})" + } + ] + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-promise-executor-return > invalid + +```js +new Promise(r => ((1))) +``` + +```json +{ + "options": [ + { + "allowVoid": true + } + ], + "errors": [ + { + "messageId": "returnsValue", + "suggestions": [ + { + "messageId": "prependVoid", + "output": "new Promise(r => void ((1)))" + }, + { + "messageId": "wrapBraces", + "output": "new Promise(r => {((1))})" + } + ] + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-promise-executor-return > invalid + +```js +new Promise(function foo(resolve, reject) { return 1; }) +``` + +```json +{ + "errors": [ + { + "messageId": "returnsValue", + "suggestions": null + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'shouldCheck') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/no-promise-executor-return.js:230:20) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-promise-executor-return > invalid + +```js +new Promise((resolve, reject) => { return 1; }) +``` + +```json +{ + "errors": [ + { + "messageId": "returnsValue", + "suggestions": null + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'shouldCheck') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/no-promise-executor-return.js:230:20) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-promise-executor-return > invalid + +```js +new Promise(function (resolve, reject) { return undefined; }) +``` + +```json +{ + "errors": [ + { + "messageId": "returnsValue", + "suggestions": null + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'shouldCheck') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/no-promise-executor-return.js:230:20) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-promise-executor-return > invalid + +```js +new Promise((resolve, reject) => { return null; }) +``` + +```json +{ + "errors": [ + { + "messageId": "returnsValue", + "suggestions": null + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'shouldCheck') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/no-promise-executor-return.js:230:20) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-promise-executor-return > invalid + +```js +new Promise(function (resolve, reject) { return false; }) +``` + +```json +{ + "errors": [ + { + "messageId": "returnsValue", + "suggestions": null + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'shouldCheck') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/no-promise-executor-return.js:230:20) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-promise-executor-return > invalid + +```js +new Promise((resolve, reject) => resolve) +``` + +```json +{ + "errors": [ + { + "messageId": "returnsValue", + "column": 34, + "suggestions": [ + { + "messageId": "wrapBraces", + "output": "new Promise((resolve, reject) => {resolve})" + } + ] + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-promise-executor-return > invalid + +```js +new Promise((resolve, reject) => null) +``` + +```json +{ + "errors": [ + { + "messageId": "returnsValue", + "column": 34, + "suggestions": [ + { + "messageId": "wrapBraces", + "output": "new Promise((resolve, reject) => {null})" + } + ] + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-promise-executor-return > invalid + +```js +new Promise(function (resolve, reject) { return resolve(foo); }) +``` + +```json +{ + "errors": [ + { + "messageId": "returnsValue", + "suggestions": null + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'shouldCheck') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/no-promise-executor-return.js:230:20) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-promise-executor-return > invalid + +```js +new Promise((resolve, reject) => { return reject(foo); }) +``` + +```json +{ + "errors": [ + { + "messageId": "returnsValue", + "suggestions": null + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'shouldCheck') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/no-promise-executor-return.js:230:20) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-promise-executor-return > invalid + +```js +new Promise((resolve, reject) => x + y) +``` + +```json +{ + "errors": [ + { + "messageId": "returnsValue", + "column": 34, + "suggestions": [ + { + "messageId": "wrapBraces", + "output": "new Promise((resolve, reject) => {x + y})" + } + ] + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-promise-executor-return > invalid + +```js +new Promise((resolve, reject) => { return Promise.resolve(42); }) +``` + +```json +{ + "errors": [ + { + "messageId": "returnsValue", + "suggestions": null + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'shouldCheck') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/no-promise-executor-return.js:230:20) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-promise-executor-return > invalid + +```js +new Promise(function (resolve, reject) { if (foo) { return 1; } }) +``` + +```json +{ + "errors": [ + { + "messageId": "returnsValue", + "suggestions": null + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'shouldCheck') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/no-promise-executor-return.js:230:20) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-promise-executor-return > invalid + +```js +new Promise((resolve, reject) => { try { return 1; } catch(e) {} }) +``` + +```json +{ + "errors": [ + { + "messageId": "returnsValue", + "suggestions": null + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'shouldCheck') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/no-promise-executor-return.js:230:20) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-promise-executor-return > invalid + +```js +new Promise(function (resolve, reject) { while (foo){ if (bar) break; else return 1; } }) +``` + +```json +{ + "errors": [ + { + "messageId": "returnsValue", + "suggestions": null + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'shouldCheck') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/no-promise-executor-return.js:230:20) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkIfStatement (apps/oxlint/dist/lint.js) + + +#### no-promise-executor-return > invalid + +```js +new Promise(() => { return void 1; }) +``` + +```json +{ + "errors": [ + { + "messageId": "returnsValue", + "suggestions": null + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'shouldCheck') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/no-promise-executor-return.js:230:20) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-promise-executor-return > invalid + +```js +new Promise(() => (1)) +``` + +```json +{ + "errors": [ + { + "messageId": "returnsValue", + "column": 20, + "suggestions": [ + { + "messageId": "wrapBraces", + "output": "new Promise(() => {(1)})" + } + ] + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-promise-executor-return > invalid + +```js +() => new Promise(() => ({})); +``` + +```json +{ + "errors": [ + { + "messageId": "returnsValue", + "column": 26, + "suggestions": [ + { + "messageId": "wrapBraces", + "output": "() => new Promise(() => {({})});" + } + ] + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-promise-executor-return > invalid + +```js +new Promise(function () { return 1; }) +``` + +```json +{ + "errors": [ + { + "messageId": "returnsValue", + "suggestions": null + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'shouldCheck') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/no-promise-executor-return.js:230:20) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-promise-executor-return > invalid + +```js +new Promise(() => { return 1; }) +``` + +```json +{ + "errors": [ + { + "messageId": "returnsValue", + "suggestions": null + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'shouldCheck') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/no-promise-executor-return.js:230:20) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-promise-executor-return > invalid + +```js +new Promise(() => 1) +``` + +```json +{ + "errors": [ + { + "messageId": "returnsValue", + "column": 19, + "suggestions": [ + { + "messageId": "wrapBraces", + "output": "new Promise(() => {1})" + } + ] + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-promise-executor-return > invalid + +```js +function foo() {} new Promise(function () { return 1; }); +``` + +```json +{ + "errors": [ + { + "messageId": "returnsValue", + "column": 45, + "suggestions": null + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'shouldCheck') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/no-promise-executor-return.js:230:20) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-promise-executor-return > invalid + +```js +function foo() { return; } new Promise(() => { return 1; }); +``` + +```json +{ + "errors": [ + { + "messageId": "returnsValue", + "column": 48, + "suggestions": null + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'shouldCheck') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/no-promise-executor-return.js:230:20) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-promise-executor-return > invalid + +```js +function foo() { return 1; } new Promise(() => { return 2; }); +``` + +```json +{ + "errors": [ + { + "messageId": "returnsValue", + "column": 50, + "suggestions": null + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'shouldCheck') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/no-promise-executor-return.js:230:20) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-promise-executor-return > invalid + +```js +function foo () { return new Promise(function () { return 1; }); } +``` + +```json +{ + "errors": [ + { + "messageId": "returnsValue", + "column": 52, + "suggestions": null + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'shouldCheck') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/no-promise-executor-return.js:230:20) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-promise-executor-return > invalid + +```js +function foo() { return new Promise(() => { bar(() => { return 1; }); return false; }); } +``` + +```json +{ + "errors": [ + { + "messageId": "returnsValue", + "column": 71, + "suggestions": null + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'shouldCheck') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/no-promise-executor-return.js:230:20) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-promise-executor-return > invalid + +```js +() => new Promise(() => { if (foo) { return 0; } else bar(() => { return 1; }); }) +``` + +```json +{ + "errors": [ + { + "messageId": "returnsValue", + "column": 38, + "suggestions": null + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'shouldCheck') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/no-promise-executor-return.js:230:20) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-promise-executor-return > invalid + +```js +function foo () { return 1; return new Promise(function () { return 2; }); return 3;} +``` + +```json +{ + "errors": [ + { + "messageId": "returnsValue", + "column": 62, + "suggestions": null + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'shouldCheck') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/no-promise-executor-return.js:230:20) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-promise-executor-return > invalid + +```js +() => 1; new Promise(() => { return 1; }) +``` + +```json +{ + "errors": [ + { + "messageId": "returnsValue", + "column": 30, + "suggestions": null + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'shouldCheck') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/no-promise-executor-return.js:230:20) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-promise-executor-return > invalid + +```js +new Promise(function () { return 1; }); function foo() { return 1; } +``` + +```json +{ + "errors": [ + { + "messageId": "returnsValue", + "column": 27, + "suggestions": null + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'shouldCheck') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/no-promise-executor-return.js:230:20) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-promise-executor-return > invalid + +```js +() => new Promise(() => { return 1; }); +``` + +```json +{ + "errors": [ + { + "messageId": "returnsValue", + "column": 27, + "suggestions": null + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'shouldCheck') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/no-promise-executor-return.js:230:20) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-promise-executor-return > invalid + +```js +() => new Promise(() => 1); +``` + +```json +{ + "errors": [ + { + "messageId": "returnsValue", + "column": 25, + "suggestions": [ + { + "messageId": "wrapBraces", + "output": "() => new Promise(() => {1});" + } + ] + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-promise-executor-return > invalid + +```js +() => new Promise(() => () => 1); +``` + +```json +{ + "errors": [ + { + "messageId": "returnsValue", + "column": 25, + "suggestions": [ + { + "messageId": "wrapBraces", + "output": "() => new Promise(() => {() => 1});" + } + ] + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-promise-executor-return > invalid + +```js +() => new Promise(() => async () => 1); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2017 + }, + "errors": [ + { + "messageId": "returnsValue", + "column": 25, + "suggestions": [ + { + "messageId": "wrapBraces", + "output": "() => new Promise(() => {async () => 1});" + } + ] + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-promise-executor-return > invalid + +```js +() => new Promise(() => function () {}); +``` + +```json +{ + "errors": [ + { + "messageId": "returnsValue", + "column": 25, + "suggestions": [] + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-promise-executor-return > invalid + +```js +() => new Promise(() => function foo() {}); +``` + +```json +{ + "errors": [ + { + "messageId": "returnsValue", + "column": 25, + "suggestions": [ + { + "messageId": "wrapBraces", + "output": "() => new Promise(() => {function foo() {}});" + } + ] + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-promise-executor-return > invalid + +```js +() => new Promise(() => []); +``` + +```json +{ + "errors": [ + { + "messageId": "returnsValue", + "column": 25, + "suggestions": [ + { + "messageId": "wrapBraces", + "output": "() => new Promise(() => {[]});" + } + ] + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-promise-executor-return > invalid + +```js +new Promise((Promise) => { return 1; }) +``` + +```json +{ + "errors": [ + { + "messageId": "returnsValue", + "suggestions": null + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'shouldCheck') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/no-promise-executor-return.js:230:20) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-promise-executor-return > invalid + +```js +new Promise(function Promise(resolve, reject) { return 1; }) +``` + +```json +{ + "errors": [ + { + "messageId": "returnsValue", + "suggestions": null + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'shouldCheck') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/no-promise-executor-return.js:230:20) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +### `no-redeclare` + +Pass: 50 / 75 (66.7%) +Fail: 25 / 75 (33.3%) + +#### no-redeclare > valid + +```js +var Object = 0; +``` + +```json +{ + "options": [ + { + "builtinGlobals": true + } + ], + "languageOptions": { + "parserOptions": { + "ecmaFeatures": { + "globalReturn": true + } + } + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-redeclare', + message: "'Object' is already defined as a built-in global variable.", + messageId: 'redeclaredAsBuiltin', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 4, + endLine: 1, + endColumn: 10, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-redeclare > invalid + +```js +var top = 0; +``` + +```json +{ + "options": [ + { + "builtinGlobals": true + } + ], + "languageOptions": { + "globals": { + "AbortController": false, + "AbortSignal": false, + "AbsoluteOrientationSensor": false, + "AbstractRange": false, + "Accelerometer": false, + "addEventListener": false, + "ai": false, + "AI": false, + "AICreateMonitor": false, + "AITextSession": false, + "alert": false, + "AnalyserNode": false, + "Animation": false, + "AnimationEffect": false, + "AnimationEvent": false, + "AnimationPlaybackEvent": false, + "AnimationTimeline": false, + "AsyncDisposableStack": false, + "atob": false, + "Attr": false, + "Audio": false, + "AudioBuffer": false, + "AudioBufferSourceNode": false, + "AudioContext": false, + "AudioData": false, + "AudioDecoder": false, + "AudioDestinationNode": false, + "AudioEncoder": false, + "AudioListener": false, + "AudioNode": false, + "AudioParam": false, + "AudioParamMap": false, + "AudioProcessingEvent": false, + "AudioScheduledSourceNode": false, + "AudioSinkInfo": false, + "AudioWorklet": false, + "AudioWorkletGlobalScope": false, + "AudioWorkletNode": false, + "AudioWorkletProcessor": false, + "AuthenticatorAssertionResponse": false, + "AuthenticatorAttestationResponse": false, + "AuthenticatorResponse": false, + "BackgroundFetchManager": false, + "BackgroundFetchRecord": false, + "BackgroundFetchRegistration": false, + "BarcodeDetector": false, + "BarProp": false, + "BaseAudioContext": false, + "BatteryManager": false, + "BeforeUnloadEvent": false, + "BiquadFilterNode": false, + "Blob": false, + "BlobEvent": false, + "Bluetooth": false, + "BluetoothCharacteristicProperties": false, + "BluetoothDevice": false, + "BluetoothRemoteGATTCharacteristic": false, + "BluetoothRemoteGATTDescriptor": false, + "BluetoothRemoteGATTServer": false, + "BluetoothRemoteGATTService": false, + "BluetoothUUID": false, + "blur": false, + "BroadcastChannel": false, + "BrowserCaptureMediaStreamTrack": false, + "btoa": false, + "ByteLengthQueuingStrategy": false, + "Cache": false, + "caches": false, + "CacheStorage": false, + "cancelAnimationFrame": false, + "cancelIdleCallback": false, + "CanvasCaptureMediaStream": false, + "CanvasCaptureMediaStreamTrack": false, + "CanvasGradient": false, + "CanvasPattern": false, + "CanvasRenderingContext2D": false, + "CaptureController": false, + "CaretPosition": false, + "CDATASection": false, + "ChannelMergerNode": false, + "ChannelSplitterNode": false, + "ChapterInformation": false, + "CharacterBoundsUpdateEvent": false, + "CharacterData": false, + "clearInterval": false, + "clearTimeout": false, + "clientInformation": false, + "Clipboard": false, + "ClipboardChangeEvent": false, + "ClipboardEvent": false, + "ClipboardItem": false, + "close": false, + "closed": false, + "CloseEvent": false, + "CloseWatcher": false, + "CommandEvent": false, + "Comment": false, + "CompositionEvent": false, + "CompressionStream": false, + "confirm": false, + "console": false, + "ConstantSourceNode": false, + "ContentVisibilityAutoStateChangeEvent": false, + "ConvolverNode": false, + "CookieChangeEvent": false, + "CookieDeprecationLabel": false, + "cookieStore": false, + "CookieStore": false, + "CookieStoreManager": false, + "CountQueuingStrategy": false, + "createImageBitmap": false, + "CreateMonitor": false, + "Credential": false, + "credentialless": false, + "CredentialsContainer": false, + "CropTarget": false, + "crossOriginIsolated": false, + "crypto": false, + "Crypto": false, + "CryptoKey": false, + "CSPViolationReportBody": false, + "CSS": false, + "CSSAnimation": false, + "CSSConditionRule": false, + "CSSContainerRule": false, + "CSSCounterStyleRule": false, + "CSSFontFaceRule": false, + "CSSFontFeatureValuesRule": false, + "CSSFontPaletteValuesRule": false, + "CSSFunctionDeclarations": false, + "CSSFunctionDescriptors": false, + "CSSFunctionRule": false, + "CSSGroupingRule": false, + "CSSImageValue": false, + "CSSImportRule": false, + "CSSKeyframeRule": false, + "CSSKeyframesRule": false, + "CSSKeywordValue": false, + "CSSLayerBlockRule": false, + "CSSLayerStatementRule": false, + "CSSMarginRule": false, + "CSSMathClamp": false, + "CSSMathInvert": false, + "CSSMathMax": false, + "CSSMathMin": false, + "CSSMathNegate": false, + "CSSMathProduct": false, + "CSSMathSum": false, + "CSSMathValue": false, + "CSSMatrixComponent": false, + "CSSMediaRule": false, + "CSSNamespaceRule": false, + "CSSNestedDeclarations": false, + "CSSNumericArray": false, + "CSSNumericValue": false, + "CSSPageDescriptors": false, + "CSSPageRule": false, + "CSSPerspective": false, + "CSSPositionTryDescriptors": false, + "CSSPositionTryRule": false, + "CSSPositionValue": false, + "CSSPropertyRule": false, + "CSSRotate": false, + "CSSRule": false, + "CSSRuleList": false, + "CSSScale": false, + "CSSScopeRule": false, + "CSSSkew": false, + "CSSSkewX": false, + "CSSSkewY": false, + "CSSStartingStyleRule": false, + "CSSStyleDeclaration": false, + "CSSStyleRule": false, + "CSSStyleSheet": false, + "CSSStyleValue": false, + "CSSSupportsRule": false, + "CSSTransformComponent": false, + "CSSTransformValue": false, + "CSSTransition": false, + "CSSTranslate": false, + "CSSUnitValue": false, + "CSSUnparsedValue": false, + "CSSVariableReferenceValue": false, + "CSSViewTransitionRule": false, + "currentFrame": false, + "currentTime": false, + "CustomElementRegistry": false, + "customElements": false, + "CustomEvent": false, + "CustomStateSet": false, + "DataTransfer": false, + "DataTransferItem": false, + "DataTransferItemList": false, + "DecompressionStream": false, + "DelayNode": false, + "DelegatedInkTrailPresenter": false, + "DeviceMotionEvent": false, + "DeviceMotionEventAcceleration": false, + "DeviceMotionEventRotationRate": false, + "DeviceOrientationEvent": false, + "devicePixelRatio": false, + "DevicePosture": false, + "DigitalCredential": false, + "dispatchEvent": false, + "DisposableStack": false, + "document": false, + "Document": false, + "DocumentFragment": false, + "documentPictureInPicture": false, + "DocumentPictureInPicture": false, + "DocumentPictureInPictureEvent": false, + "DocumentTimeline": false, + "DocumentType": false, + "DOMError": false, + "DOMException": false, + "DOMImplementation": false, + "DOMMatrix": false, + "DOMMatrixReadOnly": false, + "DOMParser": false, + "DOMPoint": false, + "DOMPointReadOnly": false, + "DOMQuad": false, + "DOMRect": false, + "DOMRectList": false, + "DOMRectReadOnly": false, + "DOMStringList": false, + "DOMStringMap": false, + "DOMTokenList": false, + "DragEvent": false, + "DynamicsCompressorNode": false, + "EditContext": false, + "Element": false, + "ElementInternals": false, + "EncodedAudioChunk": false, + "EncodedVideoChunk": false, + "ErrorEvent": false, + "event": false, + "Event": false, + "EventCounts": false, + "EventSource": false, + "EventTarget": false, + "external": false, + "External": false, + "EyeDropper": false, + "FeaturePolicy": false, + "FederatedCredential": false, + "fence": false, + "Fence": false, + "FencedFrameConfig": false, + "fetch": false, + "fetchLater": false, + "FetchLaterResult": false, + "File": false, + "FileList": false, + "FileReader": false, + "FileSystem": false, + "FileSystemDirectoryEntry": false, + "FileSystemDirectoryHandle": false, + "FileSystemDirectoryReader": false, + "FileSystemEntry": false, + "FileSystemFileEntry": false, + "FileSystemFileHandle": false, + "FileSystemHandle": false, + "FileSystemObserver": false, + "FileSystemWritableFileStream": false, + "find": false, + "focus": false, + "FocusEvent": false, + "FontData": false, + "FontFace": false, + "FontFaceSet": false, + "FontFaceSetLoadEvent": false, + "FormData": false, + "FormDataEvent": false, + "FragmentDirective": false, + "frameElement": false, + "frames": false, + "GainNode": false, + "Gamepad": false, + "GamepadAxisMoveEvent": false, + "GamepadButton": false, + "GamepadButtonEvent": false, + "GamepadEvent": false, + "GamepadHapticActuator": false, + "GamepadPose": false, + "Geolocation": false, + "GeolocationCoordinates": false, + "GeolocationPosition": false, + "GeolocationPositionError": false, + "getComputedStyle": false, + "getScreenDetails": false, + "getSelection": false, + "GPU": false, + "GPUAdapter": false, + "GPUAdapterInfo": false, + "GPUBindGroup": false, + "GPUBindGroupLayout": false, + "GPUBuffer": false, + "GPUBufferUsage": false, + "GPUCanvasContext": false, + "GPUColorWrite": false, + "GPUCommandBuffer": false, + "GPUCommandEncoder": false, + "GPUCompilationInfo": false, + "GPUCompilationMessage": false, + "GPUComputePassEncoder": false, + "GPUComputePipeline": false, + "GPUDevice": false, + "GPUDeviceLostInfo": false, + "GPUError": false, + "GPUExternalTexture": false, + "GPUInternalError": false, + "GPUMapMode": false, + "GPUOutOfMemoryError": false, + "GPUPipelineError": false, + "GPUPipelineLayout": false, + "GPUQuerySet": false, + "GPUQueue": false, + "GPURenderBundle": false, + "GPURenderBundleEncoder": false, + "GPURenderPassEncoder": false, + "GPURenderPipeline": false, + "GPUSampler": false, + "GPUShaderModule": false, + "GPUShaderStage": false, + "GPUSupportedFeatures": false, + "GPUSupportedLimits": false, + "GPUTexture": false, + "GPUTextureUsage": false, + "GPUTextureView": false, + "GPUUncapturedErrorEvent": false, + "GPUValidationError": false, + "GravitySensor": false, + "Gyroscope": false, + "HashChangeEvent": false, + "Headers": false, + "HID": false, + "HIDConnectionEvent": false, + "HIDDevice": false, + "HIDInputReportEvent": false, + "Highlight": false, + "HighlightRegistry": false, + "history": false, + "History": false, + "HTMLAllCollection": false, + "HTMLAnchorElement": false, + "HTMLAreaElement": false, + "HTMLAudioElement": false, + "HTMLBaseElement": false, + "HTMLBodyElement": false, + "HTMLBRElement": false, + "HTMLButtonElement": false, + "HTMLCanvasElement": false, + "HTMLCollection": false, + "HTMLDataElement": false, + "HTMLDataListElement": false, + "HTMLDetailsElement": false, + "HTMLDialogElement": false, + "HTMLDirectoryElement": false, + "HTMLDivElement": false, + "HTMLDListElement": false, + "HTMLDocument": false, + "HTMLElement": false, + "HTMLEmbedElement": false, + "HTMLFencedFrameElement": false, + "HTMLFieldSetElement": false, + "HTMLFontElement": false, + "HTMLFormControlsCollection": false, + "HTMLFormElement": false, + "HTMLFrameElement": false, + "HTMLFrameSetElement": false, + "HTMLHeadElement": false, + "HTMLHeadingElement": false, + "HTMLHRElement": false, + "HTMLHtmlElement": false, + "HTMLIFrameElement": false, + "HTMLImageElement": false, + "HTMLInputElement": false, + "HTMLLabelElement": false, + "HTMLLegendElement": false, + "HTMLLIElement": false, + "HTMLLinkElement": false, + "HTMLMapElement": false, + "HTMLMarqueeElement": false, + "HTMLMediaElement": false, + "HTMLMenuElement": false, + "HTMLMetaElement": false, + "HTMLMeterElement": false, + "HTMLModElement": false, + "HTMLObjectElement": false, + "HTMLOListElement": false, + "HTMLOptGroupElement": false, + "HTMLOptionElement": false, + "HTMLOptionsCollection": false, + "HTMLOutputElement": false, + "HTMLParagraphElement": false, + "HTMLParamElement": false, + "HTMLPictureElement": false, + "HTMLPreElement": false, + "HTMLProgressElement": false, + "HTMLQuoteElement": false, + "HTMLScriptElement": false, + "HTMLSelectedContentElement": false, + "HTMLSelectElement": false, + "HTMLSlotElement": false, + "HTMLSourceElement": false, + "HTMLSpanElement": false, + "HTMLStyleElement": false, + "HTMLTableCaptionElement": false, + "HTMLTableCellElement": false, + "HTMLTableColElement": false, + "HTMLTableElement": false, + "HTMLTableRowElement": false, + "HTMLTableSectionElement": false, + "HTMLTemplateElement": false, + "HTMLTextAreaElement": false, + "HTMLTimeElement": false, + "HTMLTitleElement": false, + "HTMLTrackElement": false, + "HTMLUListElement": false, + "HTMLUnknownElement": false, + "HTMLVideoElement": false, + "IDBCursor": false, + "IDBCursorWithValue": false, + "IDBDatabase": false, + "IDBFactory": false, + "IDBIndex": false, + "IDBKeyRange": false, + "IDBObjectStore": false, + "IDBOpenDBRequest": false, + "IDBRecord": false, + "IDBRequest": false, + "IDBTransaction": false, + "IDBVersionChangeEvent": false, + "IdentityCredential": false, + "IdentityCredentialError": false, + "IdentityProvider": false, + "IdleDeadline": false, + "IdleDetector": false, + "IIRFilterNode": false, + "Image": false, + "ImageBitmap": false, + "ImageBitmapRenderingContext": false, + "ImageCapture": false, + "ImageData": false, + "ImageDecoder": false, + "ImageTrack": false, + "ImageTrackList": false, + "indexedDB": false, + "Ink": false, + "innerHeight": false, + "innerWidth": false, + "InputDeviceCapabilities": false, + "InputDeviceInfo": false, + "InputEvent": false, + "IntegrityViolationReportBody": false, + "InterestEvent": false, + "IntersectionObserver": false, + "IntersectionObserverEntry": false, + "isSecureContext": false, + "Keyboard": false, + "KeyboardEvent": false, + "KeyboardLayoutMap": false, + "KeyframeEffect": false, + "LanguageDetector": false, + "LargestContentfulPaint": false, + "LaunchParams": false, + "launchQueue": false, + "LaunchQueue": false, + "LayoutShift": false, + "LayoutShiftAttribution": false, + "length": false, + "LinearAccelerationSensor": false, + "localStorage": false, + "location": true, + "Location": false, + "locationbar": false, + "Lock": false, + "LockManager": false, + "matchMedia": false, + "MathMLElement": false, + "MediaCapabilities": false, + "MediaCapabilitiesInfo": false, + "MediaDeviceInfo": false, + "MediaDevices": false, + "MediaElementAudioSourceNode": false, + "MediaEncryptedEvent": false, + "MediaError": false, + "MediaKeyError": false, + "MediaKeyMessageEvent": false, + "MediaKeys": false, + "MediaKeySession": false, + "MediaKeyStatusMap": false, + "MediaKeySystemAccess": false, + "MediaList": false, + "MediaMetadata": false, + "MediaQueryList": false, + "MediaQueryListEvent": false, + "MediaRecorder": false, + "MediaRecorderErrorEvent": false, + "MediaSession": false, + "MediaSource": false, + "MediaSourceHandle": false, + "MediaStream": false, + "MediaStreamAudioDestinationNode": false, + "MediaStreamAudioSourceNode": false, + "MediaStreamEvent": false, + "MediaStreamTrack": false, + "MediaStreamTrackAudioSourceNode": false, + "MediaStreamTrackAudioStats": false, + "MediaStreamTrackEvent": false, + "MediaStreamTrackGenerator": false, + "MediaStreamTrackProcessor": false, + "MediaStreamTrackVideoStats": false, + "menubar": false, + "MessageChannel": false, + "MessageEvent": false, + "MessagePort": false, + "MIDIAccess": false, + "MIDIConnectionEvent": false, + "MIDIInput": false, + "MIDIInputMap": false, + "MIDIMessageEvent": false, + "MIDIOutput": false, + "MIDIOutputMap": false, + "MIDIPort": false, + "MimeType": false, + "MimeTypeArray": false, + "model": false, + "ModelGenericSession": false, + "ModelManager": false, + "MouseEvent": false, + "moveBy": false, + "moveTo": false, + "MutationEvent": false, + "MutationObserver": false, + "MutationRecord": false, + "name": false, + "NamedNodeMap": false, + "NavigateEvent": false, + "navigation": false, + "Navigation": false, + "NavigationActivation": false, + "NavigationCurrentEntryChangeEvent": false, + "NavigationDestination": false, + "NavigationHistoryEntry": false, + "NavigationPrecommitController": false, + "NavigationPreloadManager": false, + "NavigationTransition": false, + "navigator": false, + "Navigator": false, + "NavigatorLogin": false, + "NavigatorManagedData": false, + "NavigatorUAData": false, + "NetworkInformation": false, + "Node": false, + "NodeFilter": false, + "NodeIterator": false, + "NodeList": false, + "Notification": false, + "NotifyPaintEvent": false, + "NotRestoredReasonDetails": false, + "NotRestoredReasons": false, + "Observable": false, + "OfflineAudioCompletionEvent": false, + "OfflineAudioContext": false, + "offscreenBuffering": false, + "OffscreenCanvas": false, + "OffscreenCanvasRenderingContext2D": false, + "onabort": true, + "onafterprint": true, + "onanimationcancel": true, + "onanimationend": true, + "onanimationiteration": true, + "onanimationstart": true, + "onappinstalled": true, + "onauxclick": true, + "onbeforeinput": true, + "onbeforeinstallprompt": true, + "onbeforematch": true, + "onbeforeprint": true, + "onbeforetoggle": true, + "onbeforeunload": true, + "onbeforexrselect": true, + "onblur": true, + "oncancel": true, + "oncanplay": true, + "oncanplaythrough": true, + "onchange": true, + "onclick": true, + "onclose": true, + "oncommand": true, + "oncontentvisibilityautostatechange": true, + "oncontextlost": true, + "oncontextmenu": true, + "oncontextrestored": true, + "oncopy": true, + "oncuechange": true, + "oncut": true, + "ondblclick": true, + "ondevicemotion": true, + "ondeviceorientation": true, + "ondeviceorientationabsolute": true, + "ondrag": true, + "ondragend": true, + "ondragenter": true, + "ondragleave": true, + "ondragover": true, + "ondragstart": true, + "ondrop": true, + "ondurationchange": true, + "onemptied": true, + "onended": true, + "onerror": true, + "onfocus": true, + "onformdata": true, + "ongamepadconnected": true, + "ongamepaddisconnected": true, + "ongotpointercapture": true, + "onhashchange": true, + "oninput": true, + "oninvalid": true, + "onkeydown": true, + "onkeypress": true, + "onkeyup": true, + "onlanguagechange": true, + "onload": true, + "onloadeddata": true, + "onloadedmetadata": true, + "onloadstart": true, + "onlostpointercapture": true, + "onmessage": true, + "onmessageerror": true, + "onmousedown": true, + "onmouseenter": true, + "onmouseleave": true, + "onmousemove": true, + "onmouseout": true, + "onmouseover": true, + "onmouseup": true, + "onmousewheel": true, + "onoffline": true, + "ononline": true, + "onpagehide": true, + "onpagereveal": true, + "onpageshow": true, + "onpageswap": true, + "onpaste": true, + "onpause": true, + "onplay": true, + "onplaying": true, + "onpointercancel": true, + "onpointerdown": true, + "onpointerenter": true, + "onpointerleave": true, + "onpointermove": true, + "onpointerout": true, + "onpointerover": true, + "onpointerrawupdate": true, + "onpointerup": true, + "onpopstate": true, + "onprogress": true, + "onratechange": true, + "onrejectionhandled": true, + "onreset": true, + "onresize": true, + "onscroll": true, + "onscrollend": true, + "onscrollsnapchange": true, + "onscrollsnapchanging": true, + "onsearch": true, + "onsecuritypolicyviolation": true, + "onseeked": true, + "onseeking": true, + "onselect": true, + "onselectionchange": true, + "onselectstart": true, + "onslotchange": true, + "onstalled": true, + "onstorage": true, + "onsubmit": true, + "onsuspend": true, + "ontimeupdate": true, + "ontoggle": true, + "ontransitioncancel": true, + "ontransitionend": true, + "ontransitionrun": true, + "ontransitionstart": true, + "onunhandledrejection": true, + "onunload": true, + "onvolumechange": true, + "onwaiting": true, + "onwheel": true, + "open": false, + "opener": false, + "Option": false, + "OrientationSensor": false, + "origin": false, + "originAgentCluster": false, + "OscillatorNode": false, + "OTPCredential": false, + "outerHeight": false, + "outerWidth": false, + "OverconstrainedError": false, + "PageRevealEvent": false, + "PageSwapEvent": false, + "PageTransitionEvent": false, + "pageXOffset": false, + "pageYOffset": false, + "PannerNode": false, + "parent": false, + "PasswordCredential": false, + "Path2D": false, + "PaymentAddress": false, + "PaymentManager": false, + "PaymentMethodChangeEvent": false, + "PaymentRequest": false, + "PaymentRequestUpdateEvent": false, + "PaymentResponse": false, + "performance": false, + "Performance": false, + "PerformanceElementTiming": false, + "PerformanceEntry": false, + "PerformanceEventTiming": false, + "PerformanceLongAnimationFrameTiming": false, + "PerformanceLongTaskTiming": false, + "PerformanceMark": false, + "PerformanceMeasure": false, + "PerformanceNavigation": false, + "PerformanceNavigationTiming": false, + "PerformanceObserver": false, + "PerformanceObserverEntryList": false, + "PerformancePaintTiming": false, + "PerformanceResourceTiming": false, + "PerformanceScriptTiming": false, + "PerformanceServerTiming": false, + "PerformanceTiming": false, + "PeriodicSyncManager": false, + "PeriodicWave": false, + "Permissions": false, + "PermissionStatus": false, + "PERSISTENT": false, + "personalbar": false, + "PictureInPictureEvent": false, + "PictureInPictureWindow": false, + "Plugin": false, + "PluginArray": false, + "PointerEvent": false, + "PopStateEvent": false, + "postMessage": false, + "Presentation": false, + "PresentationAvailability": false, + "PresentationConnection": false, + "PresentationConnectionAvailableEvent": false, + "PresentationConnectionCloseEvent": false, + "PresentationConnectionList": false, + "PresentationReceiver": false, + "PresentationRequest": false, + "PressureObserver": false, + "PressureRecord": false, + "print": false, + "ProcessingInstruction": false, + "Profiler": false, + "ProgressEvent": false, + "PromiseRejectionEvent": false, + "prompt": false, + "ProtectedAudience": false, + "PublicKeyCredential": false, + "PushManager": false, + "PushSubscription": false, + "PushSubscriptionOptions": false, + "queryLocalFonts": false, + "queueMicrotask": false, + "QuotaExceededError": false, + "RadioNodeList": false, + "Range": false, + "ReadableByteStreamController": false, + "ReadableStream": false, + "ReadableStreamBYOBReader": false, + "ReadableStreamBYOBRequest": false, + "ReadableStreamDefaultController": false, + "ReadableStreamDefaultReader": false, + "registerProcessor": false, + "RelativeOrientationSensor": false, + "RemotePlayback": false, + "removeEventListener": false, + "ReportBody": false, + "reportError": false, + "ReportingObserver": false, + "Request": false, + "requestAnimationFrame": false, + "requestIdleCallback": false, + "resizeBy": false, + "ResizeObserver": false, + "ResizeObserverEntry": false, + "ResizeObserverSize": false, + "resizeTo": false, + "Response": false, + "RestrictionTarget": false, + "RTCCertificate": false, + "RTCDataChannel": false, + "RTCDataChannelEvent": false, + "RTCDtlsTransport": false, + "RTCDTMFSender": false, + "RTCDTMFToneChangeEvent": false, + "RTCEncodedAudioFrame": false, + "RTCEncodedVideoFrame": false, + "RTCError": false, + "RTCErrorEvent": false, + "RTCIceCandidate": false, + "RTCIceTransport": false, + "RTCPeerConnection": false, + "RTCPeerConnectionIceErrorEvent": false, + "RTCPeerConnectionIceEvent": false, + "RTCRtpReceiver": false, + "RTCRtpScriptTransform": false, + "RTCRtpSender": false, + "RTCRtpTransceiver": false, + "RTCSctpTransport": false, + "RTCSessionDescription": false, + "RTCStatsReport": false, + "RTCTrackEvent": false, + "sampleRate": false, + "scheduler": false, + "Scheduler": false, + "Scheduling": false, + "screen": false, + "Screen": false, + "ScreenDetailed": false, + "ScreenDetails": false, + "screenLeft": false, + "ScreenOrientation": false, + "screenTop": false, + "screenX": false, + "screenY": false, + "ScriptProcessorNode": false, + "scroll": false, + "scrollbars": false, + "scrollBy": false, + "ScrollTimeline": false, + "scrollTo": false, + "scrollX": false, + "scrollY": false, + "SecurityPolicyViolationEvent": false, + "Selection": false, + "self": false, + "Sensor": false, + "SensorErrorEvent": false, + "Serial": false, + "SerialPort": false, + "ServiceWorker": false, + "ServiceWorkerContainer": false, + "ServiceWorkerRegistration": false, + "sessionStorage": false, + "setInterval": false, + "setTimeout": false, + "ShadowRoot": false, + "sharedStorage": false, + "SharedStorage": false, + "SharedStorageAppendMethod": false, + "SharedStorageClearMethod": false, + "SharedStorageDeleteMethod": false, + "SharedStorageModifierMethod": false, + "SharedStorageSetMethod": false, + "SharedStorageWorklet": false, + "SharedWorker": false, + "showDirectoryPicker": false, + "showOpenFilePicker": false, + "showSaveFilePicker": false, + "SnapEvent": false, + "SourceBuffer": false, + "SourceBufferList": false, + "SpeechGrammar": false, + "SpeechGrammarList": false, + "SpeechRecognition": false, + "SpeechRecognitionErrorEvent": false, + "SpeechRecognitionEvent": false, + "SpeechRecognitionPhrase": false, + "speechSynthesis": false, + "SpeechSynthesis": false, + "SpeechSynthesisErrorEvent": false, + "SpeechSynthesisEvent": false, + "SpeechSynthesisUtterance": false, + "SpeechSynthesisVoice": false, + "StaticRange": false, + "status": false, + "statusbar": false, + "StereoPannerNode": false, + "stop": false, + "Storage": false, + "StorageBucket": false, + "StorageBucketManager": false, + "StorageEvent": false, + "StorageManager": false, + "structuredClone": false, + "styleMedia": false, + "StylePropertyMap": false, + "StylePropertyMapReadOnly": false, + "StyleSheet": false, + "StyleSheetList": false, + "SubmitEvent": false, + "Subscriber": false, + "SubtleCrypto": false, + "Summarizer": false, + "SuppressedError": false, + "SVGAElement": false, + "SVGAngle": false, + "SVGAnimatedAngle": false, + "SVGAnimatedBoolean": false, + "SVGAnimatedEnumeration": false, + "SVGAnimatedInteger": false, + "SVGAnimatedLength": false, + "SVGAnimatedLengthList": false, + "SVGAnimatedNumber": false, + "SVGAnimatedNumberList": false, + "SVGAnimatedPreserveAspectRatio": false, + "SVGAnimatedRect": false, + "SVGAnimatedString": false, + "SVGAnimatedTransformList": false, + "SVGAnimateElement": false, + "SVGAnimateMotionElement": false, + "SVGAnimateTransformElement": false, + "SVGAnimationElement": false, + "SVGCircleElement": false, + "SVGClipPathElement": false, + "SVGComponentTransferFunctionElement": false, + "SVGDefsElement": false, + "SVGDescElement": false, + "SVGElement": false, + "SVGEllipseElement": false, + "SVGFEBlendElement": false, + "SVGFEColorMatrixElement": false, + "SVGFEComponentTransferElement": false, + "SVGFECompositeElement": false, + "SVGFEConvolveMatrixElement": false, + "SVGFEDiffuseLightingElement": false, + "SVGFEDisplacementMapElement": false, + "SVGFEDistantLightElement": false, + "SVGFEDropShadowElement": false, + "SVGFEFloodElement": false, + "SVGFEFuncAElement": false, + "SVGFEFuncBElement": false, + "SVGFEFuncGElement": false, + "SVGFEFuncRElement": false, + "SVGFEGaussianBlurElement": false, + "SVGFEImageElement": false, + "SVGFEMergeElement": false, + "SVGFEMergeNodeElement": false, + "SVGFEMorphologyElement": false, + "SVGFEOffsetElement": false, + "SVGFEPointLightElement": false, + "SVGFESpecularLightingElement": false, + "SVGFESpotLightElement": false, + "SVGFETileElement": false, + "SVGFETurbulenceElement": false, + "SVGFilterElement": false, + "SVGForeignObjectElement": false, + "SVGGElement": false, + "SVGGeometryElement": false, + "SVGGradientElement": false, + "SVGGraphicsElement": false, + "SVGImageElement": false, + "SVGLength": false, + "SVGLengthList": false, + "SVGLinearGradientElement": false, + "SVGLineElement": false, + "SVGMarkerElement": false, + "SVGMaskElement": false, + "SVGMatrix": false, + "SVGMetadataElement": false, + "SVGMPathElement": false, + "SVGNumber": false, + "SVGNumberList": false, + "SVGPathElement": false, + "SVGPatternElement": false, + "SVGPoint": false, + "SVGPointList": false, + "SVGPolygonElement": false, + "SVGPolylineElement": false, + "SVGPreserveAspectRatio": false, + "SVGRadialGradientElement": false, + "SVGRect": false, + "SVGRectElement": false, + "SVGScriptElement": false, + "SVGSetElement": false, + "SVGStopElement": false, + "SVGStringList": false, + "SVGStyleElement": false, + "SVGSVGElement": false, + "SVGSwitchElement": false, + "SVGSymbolElement": false, + "SVGTextContentElement": false, + "SVGTextElement": false, + "SVGTextPathElement": false, + "SVGTextPositioningElement": false, + "SVGTitleElement": false, + "SVGTransform": false, + "SVGTransformList": false, + "SVGTSpanElement": false, + "SVGUnitTypes": false, + "SVGUseElement": false, + "SVGViewElement": false, + "SyncManager": false, + "TaskAttributionTiming": false, + "TaskController": false, + "TaskPriorityChangeEvent": false, + "TaskSignal": false, + "TEMPORARY": false, + "Text": false, + "TextDecoder": false, + "TextDecoderStream": false, + "TextEncoder": false, + "TextEncoderStream": false, + "TextEvent": false, + "TextFormat": false, + "TextFormatUpdateEvent": false, + "TextMetrics": false, + "TextTrack": false, + "TextTrackCue": false, + "TextTrackCueList": false, + "TextTrackList": false, + "TextUpdateEvent": false, + "TimeEvent": false, + "TimeRanges": false, + "ToggleEvent": false, + "toolbar": false, + "top": false, + "Touch": false, + "TouchEvent": false, + "TouchList": false, + "TrackEvent": false, + "TransformStream": false, + "TransformStreamDefaultController": false, + "TransitionEvent": false, + "Translator": false, + "TreeWalker": false, + "TrustedHTML": false, + "TrustedScript": false, + "TrustedScriptURL": false, + "TrustedTypePolicy": false, + "TrustedTypePolicyFactory": false, + "trustedTypes": false, + "UIEvent": false, + "URL": false, + "URLPattern": false, + "URLSearchParams": false, + "USB": false, + "USBAlternateInterface": false, + "USBConfiguration": false, + "USBConnectionEvent": false, + "USBDevice": false, + "USBEndpoint": false, + "USBInterface": false, + "USBInTransferResult": false, + "USBIsochronousInTransferPacket": false, + "USBIsochronousInTransferResult": false, + "USBIsochronousOutTransferPacket": false, + "USBIsochronousOutTransferResult": false, + "USBOutTransferResult": false, + "UserActivation": false, + "ValidityState": false, + "VideoColorSpace": false, + "VideoDecoder": false, + "VideoEncoder": false, + "VideoFrame": false, + "VideoPlaybackQuality": false, + "viewport": false, + "Viewport": false, + "ViewTimeline": false, + "ViewTransition": false, + "ViewTransitionTypeSet": false, + "VirtualKeyboard": false, + "VirtualKeyboardGeometryChangeEvent": false, + "VisibilityStateEntry": false, + "visualViewport": false, + "VisualViewport": false, + "VTTCue": false, + "VTTRegion": false, + "WakeLock": false, + "WakeLockSentinel": false, + "WaveShaperNode": false, + "WebAssembly": false, + "WebGL2RenderingContext": false, + "WebGLActiveInfo": false, + "WebGLBuffer": false, + "WebGLContextEvent": false, + "WebGLFramebuffer": false, + "WebGLObject": false, + "WebGLProgram": false, + "WebGLQuery": false, + "WebGLRenderbuffer": false, + "WebGLRenderingContext": false, + "WebGLSampler": false, + "WebGLShader": false, + "WebGLShaderPrecisionFormat": false, + "WebGLSync": false, + "WebGLTexture": false, + "WebGLTransformFeedback": false, + "WebGLUniformLocation": false, + "WebGLVertexArrayObject": false, + "WebSocket": false, + "WebSocketError": false, + "WebSocketStream": false, + "WebTransport": false, + "WebTransportBidirectionalStream": false, + "WebTransportDatagramDuplexStream": false, + "WebTransportError": false, + "WebTransportReceiveStream": false, + "WebTransportSendStream": false, + "WGSLLanguageFeatures": false, + "WheelEvent": false, + "when": false, + "window": false, + "Window": false, + "WindowControlsOverlay": false, + "WindowControlsOverlayGeometryChangeEvent": false, + "Worker": false, + "Worklet": false, + "WorkletGlobalScope": false, + "WritableStream": false, + "WritableStreamDefaultController": false, + "WritableStreamDefaultWriter": false, + "XMLDocument": false, + "XMLHttpRequest": false, + "XMLHttpRequestEventTarget": false, + "XMLHttpRequestUpload": false, + "XMLSerializer": false, + "XPathEvaluator": false, + "XPathExpression": false, + "XPathResult": false, + "XRAnchor": false, + "XRAnchorSet": false, + "XRBoundedReferenceSpace": false, + "XRCamera": false, + "XRCPUDepthInformation": false, + "XRDepthInformation": false, + "XRDOMOverlayState": false, + "XRFrame": false, + "XRHand": false, + "XRHitTestResult": false, + "XRHitTestSource": false, + "XRInputSource": false, + "XRInputSourceArray": false, + "XRInputSourceEvent": false, + "XRInputSourcesChangeEvent": false, + "XRJointPose": false, + "XRJointSpace": false, + "XRLayer": false, + "XRLightEstimate": false, + "XRLightProbe": false, + "XRPose": false, + "XRRay": false, + "XRReferenceSpace": false, + "XRReferenceSpaceEvent": false, + "XRRenderState": false, + "XRRigidTransform": false, + "XRSession": false, + "XRSessionEvent": false, + "XRSpace": false, + "XRSystem": false, + "XRTransientInputHitTestResult": false, + "XRTransientInputHitTestSource": false, + "XRView": false, + "XRViewerPose": false, + "XRViewport": false, + "XRWebGLBinding": false, + "XRWebGLDepthInformation": false, + "XRWebGLLayer": false, + "XSLTProcessor": false + } + }, + "errors": [ + { + "message": "'top' is already defined as a built-in global variable." + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-redeclare > invalid + +```js +var a; var {a = 0, b: Object = 0} = {}; +``` + +```json +{ + "options": [ + { + "builtinGlobals": true + } + ], + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "message": "'a' is already defined." + }, + { + "message": "'Object' is already defined as a built-in global variable." + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Expected values to be strictly equal: ++ actual - expected + ++ "'Object' is already defined as a built-in global variable." +- "'a' is already defined." + + at assertMessageMatches (apps/oxlint/dist/index.js) + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-redeclare > invalid + +```js +var a; var {a = 0, b: Object = 0} = {}; +``` + +```json +{ + "options": [ + { + "builtinGlobals": true + } + ], + "languageOptions": { + "ecmaVersion": 6, + "parserOptions": { + "ecmaFeatures": { + "globalReturn": true + } + } + }, + "errors": [ + { + "message": "'a' is already defined." + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 2: [ + { + ruleId: 'rule-to-test/no-redeclare', + message: "'Object' is already defined as a built-in global variable.", + messageId: 'redeclaredAsBuiltin', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 22, + endLine: 1, + endColumn: 28, + suggestions: null + }, + { + ruleId: 'rule-to-test/no-redeclare', + message: "'a' is already defined.", + messageId: 'redeclared', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 12, + endLine: 1, + endColumn: 13, + suggestions: null + } +] + +2 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-redeclare > invalid + +```js +var globalThis = 0; +``` + +```json +{ + "options": [ + { + "builtinGlobals": true + } + ], + "languageOptions": { + "ecmaVersion": 2020 + }, + "errors": [ + { + "message": "'globalThis' is already defined as a built-in global variable." + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-redeclare > invalid + +```js +var a; var {a = 0, b: globalThis = 0} = {}; +``` + +```json +{ + "options": [ + { + "builtinGlobals": true + } + ], + "languageOptions": { + "ecmaVersion": 2020 + }, + "errors": [ + { + "message": "'a' is already defined." + }, + { + "message": "'globalThis' is already defined as a built-in global variable." + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 2 errors but had 1: [ + { + ruleId: 'rule-to-test/no-redeclare', + message: "'a' is already defined.", + messageId: 'redeclared', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 12, + endLine: 1, + endColumn: 13, + suggestions: null + } +] + +1 !== 2 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-redeclare > invalid + +```js +/*global b:false*/ var b = 1; +``` + +```json +{ + "options": [ + { + "builtinGlobals": true + } + ], + "errors": [ + { + "message": "'b' is already defined by a variable declaration.", + "line": 1, + "column": 10, + "endLine": 1, + "endColumn": 11 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-redeclare > invalid + +```js +/*global b:true*/ var b = 1; +``` + +```json +{ + "options": [ + { + "builtinGlobals": true + } + ], + "errors": [ + { + "message": "'b' is already defined by a variable declaration.", + "line": 1, + "column": 10, + "endLine": 1, + "endColumn": 11 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-redeclare > invalid + +```js +var top = 0; +``` + +```json +{ + "languageOptions": { + "globals": { + "AbortController": false, + "AbortSignal": false, + "AbsoluteOrientationSensor": false, + "AbstractRange": false, + "Accelerometer": false, + "addEventListener": false, + "ai": false, + "AI": false, + "AICreateMonitor": false, + "AITextSession": false, + "alert": false, + "AnalyserNode": false, + "Animation": false, + "AnimationEffect": false, + "AnimationEvent": false, + "AnimationPlaybackEvent": false, + "AnimationTimeline": false, + "AsyncDisposableStack": false, + "atob": false, + "Attr": false, + "Audio": false, + "AudioBuffer": false, + "AudioBufferSourceNode": false, + "AudioContext": false, + "AudioData": false, + "AudioDecoder": false, + "AudioDestinationNode": false, + "AudioEncoder": false, + "AudioListener": false, + "AudioNode": false, + "AudioParam": false, + "AudioParamMap": false, + "AudioProcessingEvent": false, + "AudioScheduledSourceNode": false, + "AudioSinkInfo": false, + "AudioWorklet": false, + "AudioWorkletGlobalScope": false, + "AudioWorkletNode": false, + "AudioWorkletProcessor": false, + "AuthenticatorAssertionResponse": false, + "AuthenticatorAttestationResponse": false, + "AuthenticatorResponse": false, + "BackgroundFetchManager": false, + "BackgroundFetchRecord": false, + "BackgroundFetchRegistration": false, + "BarcodeDetector": false, + "BarProp": false, + "BaseAudioContext": false, + "BatteryManager": false, + "BeforeUnloadEvent": false, + "BiquadFilterNode": false, + "Blob": false, + "BlobEvent": false, + "Bluetooth": false, + "BluetoothCharacteristicProperties": false, + "BluetoothDevice": false, + "BluetoothRemoteGATTCharacteristic": false, + "BluetoothRemoteGATTDescriptor": false, + "BluetoothRemoteGATTServer": false, + "BluetoothRemoteGATTService": false, + "BluetoothUUID": false, + "blur": false, + "BroadcastChannel": false, + "BrowserCaptureMediaStreamTrack": false, + "btoa": false, + "ByteLengthQueuingStrategy": false, + "Cache": false, + "caches": false, + "CacheStorage": false, + "cancelAnimationFrame": false, + "cancelIdleCallback": false, + "CanvasCaptureMediaStream": false, + "CanvasCaptureMediaStreamTrack": false, + "CanvasGradient": false, + "CanvasPattern": false, + "CanvasRenderingContext2D": false, + "CaptureController": false, + "CaretPosition": false, + "CDATASection": false, + "ChannelMergerNode": false, + "ChannelSplitterNode": false, + "ChapterInformation": false, + "CharacterBoundsUpdateEvent": false, + "CharacterData": false, + "clearInterval": false, + "clearTimeout": false, + "clientInformation": false, + "Clipboard": false, + "ClipboardChangeEvent": false, + "ClipboardEvent": false, + "ClipboardItem": false, + "close": false, + "closed": false, + "CloseEvent": false, + "CloseWatcher": false, + "CommandEvent": false, + "Comment": false, + "CompositionEvent": false, + "CompressionStream": false, + "confirm": false, + "console": false, + "ConstantSourceNode": false, + "ContentVisibilityAutoStateChangeEvent": false, + "ConvolverNode": false, + "CookieChangeEvent": false, + "CookieDeprecationLabel": false, + "cookieStore": false, + "CookieStore": false, + "CookieStoreManager": false, + "CountQueuingStrategy": false, + "createImageBitmap": false, + "CreateMonitor": false, + "Credential": false, + "credentialless": false, + "CredentialsContainer": false, + "CropTarget": false, + "crossOriginIsolated": false, + "crypto": false, + "Crypto": false, + "CryptoKey": false, + "CSPViolationReportBody": false, + "CSS": false, + "CSSAnimation": false, + "CSSConditionRule": false, + "CSSContainerRule": false, + "CSSCounterStyleRule": false, + "CSSFontFaceRule": false, + "CSSFontFeatureValuesRule": false, + "CSSFontPaletteValuesRule": false, + "CSSFunctionDeclarations": false, + "CSSFunctionDescriptors": false, + "CSSFunctionRule": false, + "CSSGroupingRule": false, + "CSSImageValue": false, + "CSSImportRule": false, + "CSSKeyframeRule": false, + "CSSKeyframesRule": false, + "CSSKeywordValue": false, + "CSSLayerBlockRule": false, + "CSSLayerStatementRule": false, + "CSSMarginRule": false, + "CSSMathClamp": false, + "CSSMathInvert": false, + "CSSMathMax": false, + "CSSMathMin": false, + "CSSMathNegate": false, + "CSSMathProduct": false, + "CSSMathSum": false, + "CSSMathValue": false, + "CSSMatrixComponent": false, + "CSSMediaRule": false, + "CSSNamespaceRule": false, + "CSSNestedDeclarations": false, + "CSSNumericArray": false, + "CSSNumericValue": false, + "CSSPageDescriptors": false, + "CSSPageRule": false, + "CSSPerspective": false, + "CSSPositionTryDescriptors": false, + "CSSPositionTryRule": false, + "CSSPositionValue": false, + "CSSPropertyRule": false, + "CSSRotate": false, + "CSSRule": false, + "CSSRuleList": false, + "CSSScale": false, + "CSSScopeRule": false, + "CSSSkew": false, + "CSSSkewX": false, + "CSSSkewY": false, + "CSSStartingStyleRule": false, + "CSSStyleDeclaration": false, + "CSSStyleRule": false, + "CSSStyleSheet": false, + "CSSStyleValue": false, + "CSSSupportsRule": false, + "CSSTransformComponent": false, + "CSSTransformValue": false, + "CSSTransition": false, + "CSSTranslate": false, + "CSSUnitValue": false, + "CSSUnparsedValue": false, + "CSSVariableReferenceValue": false, + "CSSViewTransitionRule": false, + "currentFrame": false, + "currentTime": false, + "CustomElementRegistry": false, + "customElements": false, + "CustomEvent": false, + "CustomStateSet": false, + "DataTransfer": false, + "DataTransferItem": false, + "DataTransferItemList": false, + "DecompressionStream": false, + "DelayNode": false, + "DelegatedInkTrailPresenter": false, + "DeviceMotionEvent": false, + "DeviceMotionEventAcceleration": false, + "DeviceMotionEventRotationRate": false, + "DeviceOrientationEvent": false, + "devicePixelRatio": false, + "DevicePosture": false, + "DigitalCredential": false, + "dispatchEvent": false, + "DisposableStack": false, + "document": false, + "Document": false, + "DocumentFragment": false, + "documentPictureInPicture": false, + "DocumentPictureInPicture": false, + "DocumentPictureInPictureEvent": false, + "DocumentTimeline": false, + "DocumentType": false, + "DOMError": false, + "DOMException": false, + "DOMImplementation": false, + "DOMMatrix": false, + "DOMMatrixReadOnly": false, + "DOMParser": false, + "DOMPoint": false, + "DOMPointReadOnly": false, + "DOMQuad": false, + "DOMRect": false, + "DOMRectList": false, + "DOMRectReadOnly": false, + "DOMStringList": false, + "DOMStringMap": false, + "DOMTokenList": false, + "DragEvent": false, + "DynamicsCompressorNode": false, + "EditContext": false, + "Element": false, + "ElementInternals": false, + "EncodedAudioChunk": false, + "EncodedVideoChunk": false, + "ErrorEvent": false, + "event": false, + "Event": false, + "EventCounts": false, + "EventSource": false, + "EventTarget": false, + "external": false, + "External": false, + "EyeDropper": false, + "FeaturePolicy": false, + "FederatedCredential": false, + "fence": false, + "Fence": false, + "FencedFrameConfig": false, + "fetch": false, + "fetchLater": false, + "FetchLaterResult": false, + "File": false, + "FileList": false, + "FileReader": false, + "FileSystem": false, + "FileSystemDirectoryEntry": false, + "FileSystemDirectoryHandle": false, + "FileSystemDirectoryReader": false, + "FileSystemEntry": false, + "FileSystemFileEntry": false, + "FileSystemFileHandle": false, + "FileSystemHandle": false, + "FileSystemObserver": false, + "FileSystemWritableFileStream": false, + "find": false, + "focus": false, + "FocusEvent": false, + "FontData": false, + "FontFace": false, + "FontFaceSet": false, + "FontFaceSetLoadEvent": false, + "FormData": false, + "FormDataEvent": false, + "FragmentDirective": false, + "frameElement": false, + "frames": false, + "GainNode": false, + "Gamepad": false, + "GamepadAxisMoveEvent": false, + "GamepadButton": false, + "GamepadButtonEvent": false, + "GamepadEvent": false, + "GamepadHapticActuator": false, + "GamepadPose": false, + "Geolocation": false, + "GeolocationCoordinates": false, + "GeolocationPosition": false, + "GeolocationPositionError": false, + "getComputedStyle": false, + "getScreenDetails": false, + "getSelection": false, + "GPU": false, + "GPUAdapter": false, + "GPUAdapterInfo": false, + "GPUBindGroup": false, + "GPUBindGroupLayout": false, + "GPUBuffer": false, + "GPUBufferUsage": false, + "GPUCanvasContext": false, + "GPUColorWrite": false, + "GPUCommandBuffer": false, + "GPUCommandEncoder": false, + "GPUCompilationInfo": false, + "GPUCompilationMessage": false, + "GPUComputePassEncoder": false, + "GPUComputePipeline": false, + "GPUDevice": false, + "GPUDeviceLostInfo": false, + "GPUError": false, + "GPUExternalTexture": false, + "GPUInternalError": false, + "GPUMapMode": false, + "GPUOutOfMemoryError": false, + "GPUPipelineError": false, + "GPUPipelineLayout": false, + "GPUQuerySet": false, + "GPUQueue": false, + "GPURenderBundle": false, + "GPURenderBundleEncoder": false, + "GPURenderPassEncoder": false, + "GPURenderPipeline": false, + "GPUSampler": false, + "GPUShaderModule": false, + "GPUShaderStage": false, + "GPUSupportedFeatures": false, + "GPUSupportedLimits": false, + "GPUTexture": false, + "GPUTextureUsage": false, + "GPUTextureView": false, + "GPUUncapturedErrorEvent": false, + "GPUValidationError": false, + "GravitySensor": false, + "Gyroscope": false, + "HashChangeEvent": false, + "Headers": false, + "HID": false, + "HIDConnectionEvent": false, + "HIDDevice": false, + "HIDInputReportEvent": false, + "Highlight": false, + "HighlightRegistry": false, + "history": false, + "History": false, + "HTMLAllCollection": false, + "HTMLAnchorElement": false, + "HTMLAreaElement": false, + "HTMLAudioElement": false, + "HTMLBaseElement": false, + "HTMLBodyElement": false, + "HTMLBRElement": false, + "HTMLButtonElement": false, + "HTMLCanvasElement": false, + "HTMLCollection": false, + "HTMLDataElement": false, + "HTMLDataListElement": false, + "HTMLDetailsElement": false, + "HTMLDialogElement": false, + "HTMLDirectoryElement": false, + "HTMLDivElement": false, + "HTMLDListElement": false, + "HTMLDocument": false, + "HTMLElement": false, + "HTMLEmbedElement": false, + "HTMLFencedFrameElement": false, + "HTMLFieldSetElement": false, + "HTMLFontElement": false, + "HTMLFormControlsCollection": false, + "HTMLFormElement": false, + "HTMLFrameElement": false, + "HTMLFrameSetElement": false, + "HTMLHeadElement": false, + "HTMLHeadingElement": false, + "HTMLHRElement": false, + "HTMLHtmlElement": false, + "HTMLIFrameElement": false, + "HTMLImageElement": false, + "HTMLInputElement": false, + "HTMLLabelElement": false, + "HTMLLegendElement": false, + "HTMLLIElement": false, + "HTMLLinkElement": false, + "HTMLMapElement": false, + "HTMLMarqueeElement": false, + "HTMLMediaElement": false, + "HTMLMenuElement": false, + "HTMLMetaElement": false, + "HTMLMeterElement": false, + "HTMLModElement": false, + "HTMLObjectElement": false, + "HTMLOListElement": false, + "HTMLOptGroupElement": false, + "HTMLOptionElement": false, + "HTMLOptionsCollection": false, + "HTMLOutputElement": false, + "HTMLParagraphElement": false, + "HTMLParamElement": false, + "HTMLPictureElement": false, + "HTMLPreElement": false, + "HTMLProgressElement": false, + "HTMLQuoteElement": false, + "HTMLScriptElement": false, + "HTMLSelectedContentElement": false, + "HTMLSelectElement": false, + "HTMLSlotElement": false, + "HTMLSourceElement": false, + "HTMLSpanElement": false, + "HTMLStyleElement": false, + "HTMLTableCaptionElement": false, + "HTMLTableCellElement": false, + "HTMLTableColElement": false, + "HTMLTableElement": false, + "HTMLTableRowElement": false, + "HTMLTableSectionElement": false, + "HTMLTemplateElement": false, + "HTMLTextAreaElement": false, + "HTMLTimeElement": false, + "HTMLTitleElement": false, + "HTMLTrackElement": false, + "HTMLUListElement": false, + "HTMLUnknownElement": false, + "HTMLVideoElement": false, + "IDBCursor": false, + "IDBCursorWithValue": false, + "IDBDatabase": false, + "IDBFactory": false, + "IDBIndex": false, + "IDBKeyRange": false, + "IDBObjectStore": false, + "IDBOpenDBRequest": false, + "IDBRecord": false, + "IDBRequest": false, + "IDBTransaction": false, + "IDBVersionChangeEvent": false, + "IdentityCredential": false, + "IdentityCredentialError": false, + "IdentityProvider": false, + "IdleDeadline": false, + "IdleDetector": false, + "IIRFilterNode": false, + "Image": false, + "ImageBitmap": false, + "ImageBitmapRenderingContext": false, + "ImageCapture": false, + "ImageData": false, + "ImageDecoder": false, + "ImageTrack": false, + "ImageTrackList": false, + "indexedDB": false, + "Ink": false, + "innerHeight": false, + "innerWidth": false, + "InputDeviceCapabilities": false, + "InputDeviceInfo": false, + "InputEvent": false, + "IntegrityViolationReportBody": false, + "InterestEvent": false, + "IntersectionObserver": false, + "IntersectionObserverEntry": false, + "isSecureContext": false, + "Keyboard": false, + "KeyboardEvent": false, + "KeyboardLayoutMap": false, + "KeyframeEffect": false, + "LanguageDetector": false, + "LargestContentfulPaint": false, + "LaunchParams": false, + "launchQueue": false, + "LaunchQueue": false, + "LayoutShift": false, + "LayoutShiftAttribution": false, + "length": false, + "LinearAccelerationSensor": false, + "localStorage": false, + "location": true, + "Location": false, + "locationbar": false, + "Lock": false, + "LockManager": false, + "matchMedia": false, + "MathMLElement": false, + "MediaCapabilities": false, + "MediaCapabilitiesInfo": false, + "MediaDeviceInfo": false, + "MediaDevices": false, + "MediaElementAudioSourceNode": false, + "MediaEncryptedEvent": false, + "MediaError": false, + "MediaKeyError": false, + "MediaKeyMessageEvent": false, + "MediaKeys": false, + "MediaKeySession": false, + "MediaKeyStatusMap": false, + "MediaKeySystemAccess": false, + "MediaList": false, + "MediaMetadata": false, + "MediaQueryList": false, + "MediaQueryListEvent": false, + "MediaRecorder": false, + "MediaRecorderErrorEvent": false, + "MediaSession": false, + "MediaSource": false, + "MediaSourceHandle": false, + "MediaStream": false, + "MediaStreamAudioDestinationNode": false, + "MediaStreamAudioSourceNode": false, + "MediaStreamEvent": false, + "MediaStreamTrack": false, + "MediaStreamTrackAudioSourceNode": false, + "MediaStreamTrackAudioStats": false, + "MediaStreamTrackEvent": false, + "MediaStreamTrackGenerator": false, + "MediaStreamTrackProcessor": false, + "MediaStreamTrackVideoStats": false, + "menubar": false, + "MessageChannel": false, + "MessageEvent": false, + "MessagePort": false, + "MIDIAccess": false, + "MIDIConnectionEvent": false, + "MIDIInput": false, + "MIDIInputMap": false, + "MIDIMessageEvent": false, + "MIDIOutput": false, + "MIDIOutputMap": false, + "MIDIPort": false, + "MimeType": false, + "MimeTypeArray": false, + "model": false, + "ModelGenericSession": false, + "ModelManager": false, + "MouseEvent": false, + "moveBy": false, + "moveTo": false, + "MutationEvent": false, + "MutationObserver": false, + "MutationRecord": false, + "name": false, + "NamedNodeMap": false, + "NavigateEvent": false, + "navigation": false, + "Navigation": false, + "NavigationActivation": false, + "NavigationCurrentEntryChangeEvent": false, + "NavigationDestination": false, + "NavigationHistoryEntry": false, + "NavigationPrecommitController": false, + "NavigationPreloadManager": false, + "NavigationTransition": false, + "navigator": false, + "Navigator": false, + "NavigatorLogin": false, + "NavigatorManagedData": false, + "NavigatorUAData": false, + "NetworkInformation": false, + "Node": false, + "NodeFilter": false, + "NodeIterator": false, + "NodeList": false, + "Notification": false, + "NotifyPaintEvent": false, + "NotRestoredReasonDetails": false, + "NotRestoredReasons": false, + "Observable": false, + "OfflineAudioCompletionEvent": false, + "OfflineAudioContext": false, + "offscreenBuffering": false, + "OffscreenCanvas": false, + "OffscreenCanvasRenderingContext2D": false, + "onabort": true, + "onafterprint": true, + "onanimationcancel": true, + "onanimationend": true, + "onanimationiteration": true, + "onanimationstart": true, + "onappinstalled": true, + "onauxclick": true, + "onbeforeinput": true, + "onbeforeinstallprompt": true, + "onbeforematch": true, + "onbeforeprint": true, + "onbeforetoggle": true, + "onbeforeunload": true, + "onbeforexrselect": true, + "onblur": true, + "oncancel": true, + "oncanplay": true, + "oncanplaythrough": true, + "onchange": true, + "onclick": true, + "onclose": true, + "oncommand": true, + "oncontentvisibilityautostatechange": true, + "oncontextlost": true, + "oncontextmenu": true, + "oncontextrestored": true, + "oncopy": true, + "oncuechange": true, + "oncut": true, + "ondblclick": true, + "ondevicemotion": true, + "ondeviceorientation": true, + "ondeviceorientationabsolute": true, + "ondrag": true, + "ondragend": true, + "ondragenter": true, + "ondragleave": true, + "ondragover": true, + "ondragstart": true, + "ondrop": true, + "ondurationchange": true, + "onemptied": true, + "onended": true, + "onerror": true, + "onfocus": true, + "onformdata": true, + "ongamepadconnected": true, + "ongamepaddisconnected": true, + "ongotpointercapture": true, + "onhashchange": true, + "oninput": true, + "oninvalid": true, + "onkeydown": true, + "onkeypress": true, + "onkeyup": true, + "onlanguagechange": true, + "onload": true, + "onloadeddata": true, + "onloadedmetadata": true, + "onloadstart": true, + "onlostpointercapture": true, + "onmessage": true, + "onmessageerror": true, + "onmousedown": true, + "onmouseenter": true, + "onmouseleave": true, + "onmousemove": true, + "onmouseout": true, + "onmouseover": true, + "onmouseup": true, + "onmousewheel": true, + "onoffline": true, + "ononline": true, + "onpagehide": true, + "onpagereveal": true, + "onpageshow": true, + "onpageswap": true, + "onpaste": true, + "onpause": true, + "onplay": true, + "onplaying": true, + "onpointercancel": true, + "onpointerdown": true, + "onpointerenter": true, + "onpointerleave": true, + "onpointermove": true, + "onpointerout": true, + "onpointerover": true, + "onpointerrawupdate": true, + "onpointerup": true, + "onpopstate": true, + "onprogress": true, + "onratechange": true, + "onrejectionhandled": true, + "onreset": true, + "onresize": true, + "onscroll": true, + "onscrollend": true, + "onscrollsnapchange": true, + "onscrollsnapchanging": true, + "onsearch": true, + "onsecuritypolicyviolation": true, + "onseeked": true, + "onseeking": true, + "onselect": true, + "onselectionchange": true, + "onselectstart": true, + "onslotchange": true, + "onstalled": true, + "onstorage": true, + "onsubmit": true, + "onsuspend": true, + "ontimeupdate": true, + "ontoggle": true, + "ontransitioncancel": true, + "ontransitionend": true, + "ontransitionrun": true, + "ontransitionstart": true, + "onunhandledrejection": true, + "onunload": true, + "onvolumechange": true, + "onwaiting": true, + "onwheel": true, + "open": false, + "opener": false, + "Option": false, + "OrientationSensor": false, + "origin": false, + "originAgentCluster": false, + "OscillatorNode": false, + "OTPCredential": false, + "outerHeight": false, + "outerWidth": false, + "OverconstrainedError": false, + "PageRevealEvent": false, + "PageSwapEvent": false, + "PageTransitionEvent": false, + "pageXOffset": false, + "pageYOffset": false, + "PannerNode": false, + "parent": false, + "PasswordCredential": false, + "Path2D": false, + "PaymentAddress": false, + "PaymentManager": false, + "PaymentMethodChangeEvent": false, + "PaymentRequest": false, + "PaymentRequestUpdateEvent": false, + "PaymentResponse": false, + "performance": false, + "Performance": false, + "PerformanceElementTiming": false, + "PerformanceEntry": false, + "PerformanceEventTiming": false, + "PerformanceLongAnimationFrameTiming": false, + "PerformanceLongTaskTiming": false, + "PerformanceMark": false, + "PerformanceMeasure": false, + "PerformanceNavigation": false, + "PerformanceNavigationTiming": false, + "PerformanceObserver": false, + "PerformanceObserverEntryList": false, + "PerformancePaintTiming": false, + "PerformanceResourceTiming": false, + "PerformanceScriptTiming": false, + "PerformanceServerTiming": false, + "PerformanceTiming": false, + "PeriodicSyncManager": false, + "PeriodicWave": false, + "Permissions": false, + "PermissionStatus": false, + "PERSISTENT": false, + "personalbar": false, + "PictureInPictureEvent": false, + "PictureInPictureWindow": false, + "Plugin": false, + "PluginArray": false, + "PointerEvent": false, + "PopStateEvent": false, + "postMessage": false, + "Presentation": false, + "PresentationAvailability": false, + "PresentationConnection": false, + "PresentationConnectionAvailableEvent": false, + "PresentationConnectionCloseEvent": false, + "PresentationConnectionList": false, + "PresentationReceiver": false, + "PresentationRequest": false, + "PressureObserver": false, + "PressureRecord": false, + "print": false, + "ProcessingInstruction": false, + "Profiler": false, + "ProgressEvent": false, + "PromiseRejectionEvent": false, + "prompt": false, + "ProtectedAudience": false, + "PublicKeyCredential": false, + "PushManager": false, + "PushSubscription": false, + "PushSubscriptionOptions": false, + "queryLocalFonts": false, + "queueMicrotask": false, + "QuotaExceededError": false, + "RadioNodeList": false, + "Range": false, + "ReadableByteStreamController": false, + "ReadableStream": false, + "ReadableStreamBYOBReader": false, + "ReadableStreamBYOBRequest": false, + "ReadableStreamDefaultController": false, + "ReadableStreamDefaultReader": false, + "registerProcessor": false, + "RelativeOrientationSensor": false, + "RemotePlayback": false, + "removeEventListener": false, + "ReportBody": false, + "reportError": false, + "ReportingObserver": false, + "Request": false, + "requestAnimationFrame": false, + "requestIdleCallback": false, + "resizeBy": false, + "ResizeObserver": false, + "ResizeObserverEntry": false, + "ResizeObserverSize": false, + "resizeTo": false, + "Response": false, + "RestrictionTarget": false, + "RTCCertificate": false, + "RTCDataChannel": false, + "RTCDataChannelEvent": false, + "RTCDtlsTransport": false, + "RTCDTMFSender": false, + "RTCDTMFToneChangeEvent": false, + "RTCEncodedAudioFrame": false, + "RTCEncodedVideoFrame": false, + "RTCError": false, + "RTCErrorEvent": false, + "RTCIceCandidate": false, + "RTCIceTransport": false, + "RTCPeerConnection": false, + "RTCPeerConnectionIceErrorEvent": false, + "RTCPeerConnectionIceEvent": false, + "RTCRtpReceiver": false, + "RTCRtpScriptTransform": false, + "RTCRtpSender": false, + "RTCRtpTransceiver": false, + "RTCSctpTransport": false, + "RTCSessionDescription": false, + "RTCStatsReport": false, + "RTCTrackEvent": false, + "sampleRate": false, + "scheduler": false, + "Scheduler": false, + "Scheduling": false, + "screen": false, + "Screen": false, + "ScreenDetailed": false, + "ScreenDetails": false, + "screenLeft": false, + "ScreenOrientation": false, + "screenTop": false, + "screenX": false, + "screenY": false, + "ScriptProcessorNode": false, + "scroll": false, + "scrollbars": false, + "scrollBy": false, + "ScrollTimeline": false, + "scrollTo": false, + "scrollX": false, + "scrollY": false, + "SecurityPolicyViolationEvent": false, + "Selection": false, + "self": false, + "Sensor": false, + "SensorErrorEvent": false, + "Serial": false, + "SerialPort": false, + "ServiceWorker": false, + "ServiceWorkerContainer": false, + "ServiceWorkerRegistration": false, + "sessionStorage": false, + "setInterval": false, + "setTimeout": false, + "ShadowRoot": false, + "sharedStorage": false, + "SharedStorage": false, + "SharedStorageAppendMethod": false, + "SharedStorageClearMethod": false, + "SharedStorageDeleteMethod": false, + "SharedStorageModifierMethod": false, + "SharedStorageSetMethod": false, + "SharedStorageWorklet": false, + "SharedWorker": false, + "showDirectoryPicker": false, + "showOpenFilePicker": false, + "showSaveFilePicker": false, + "SnapEvent": false, + "SourceBuffer": false, + "SourceBufferList": false, + "SpeechGrammar": false, + "SpeechGrammarList": false, + "SpeechRecognition": false, + "SpeechRecognitionErrorEvent": false, + "SpeechRecognitionEvent": false, + "SpeechRecognitionPhrase": false, + "speechSynthesis": false, + "SpeechSynthesis": false, + "SpeechSynthesisErrorEvent": false, + "SpeechSynthesisEvent": false, + "SpeechSynthesisUtterance": false, + "SpeechSynthesisVoice": false, + "StaticRange": false, + "status": false, + "statusbar": false, + "StereoPannerNode": false, + "stop": false, + "Storage": false, + "StorageBucket": false, + "StorageBucketManager": false, + "StorageEvent": false, + "StorageManager": false, + "structuredClone": false, + "styleMedia": false, + "StylePropertyMap": false, + "StylePropertyMapReadOnly": false, + "StyleSheet": false, + "StyleSheetList": false, + "SubmitEvent": false, + "Subscriber": false, + "SubtleCrypto": false, + "Summarizer": false, + "SuppressedError": false, + "SVGAElement": false, + "SVGAngle": false, + "SVGAnimatedAngle": false, + "SVGAnimatedBoolean": false, + "SVGAnimatedEnumeration": false, + "SVGAnimatedInteger": false, + "SVGAnimatedLength": false, + "SVGAnimatedLengthList": false, + "SVGAnimatedNumber": false, + "SVGAnimatedNumberList": false, + "SVGAnimatedPreserveAspectRatio": false, + "SVGAnimatedRect": false, + "SVGAnimatedString": false, + "SVGAnimatedTransformList": false, + "SVGAnimateElement": false, + "SVGAnimateMotionElement": false, + "SVGAnimateTransformElement": false, + "SVGAnimationElement": false, + "SVGCircleElement": false, + "SVGClipPathElement": false, + "SVGComponentTransferFunctionElement": false, + "SVGDefsElement": false, + "SVGDescElement": false, + "SVGElement": false, + "SVGEllipseElement": false, + "SVGFEBlendElement": false, + "SVGFEColorMatrixElement": false, + "SVGFEComponentTransferElement": false, + "SVGFECompositeElement": false, + "SVGFEConvolveMatrixElement": false, + "SVGFEDiffuseLightingElement": false, + "SVGFEDisplacementMapElement": false, + "SVGFEDistantLightElement": false, + "SVGFEDropShadowElement": false, + "SVGFEFloodElement": false, + "SVGFEFuncAElement": false, + "SVGFEFuncBElement": false, + "SVGFEFuncGElement": false, + "SVGFEFuncRElement": false, + "SVGFEGaussianBlurElement": false, + "SVGFEImageElement": false, + "SVGFEMergeElement": false, + "SVGFEMergeNodeElement": false, + "SVGFEMorphologyElement": false, + "SVGFEOffsetElement": false, + "SVGFEPointLightElement": false, + "SVGFESpecularLightingElement": false, + "SVGFESpotLightElement": false, + "SVGFETileElement": false, + "SVGFETurbulenceElement": false, + "SVGFilterElement": false, + "SVGForeignObjectElement": false, + "SVGGElement": false, + "SVGGeometryElement": false, + "SVGGradientElement": false, + "SVGGraphicsElement": false, + "SVGImageElement": false, + "SVGLength": false, + "SVGLengthList": false, + "SVGLinearGradientElement": false, + "SVGLineElement": false, + "SVGMarkerElement": false, + "SVGMaskElement": false, + "SVGMatrix": false, + "SVGMetadataElement": false, + "SVGMPathElement": false, + "SVGNumber": false, + "SVGNumberList": false, + "SVGPathElement": false, + "SVGPatternElement": false, + "SVGPoint": false, + "SVGPointList": false, + "SVGPolygonElement": false, + "SVGPolylineElement": false, + "SVGPreserveAspectRatio": false, + "SVGRadialGradientElement": false, + "SVGRect": false, + "SVGRectElement": false, + "SVGScriptElement": false, + "SVGSetElement": false, + "SVGStopElement": false, + "SVGStringList": false, + "SVGStyleElement": false, + "SVGSVGElement": false, + "SVGSwitchElement": false, + "SVGSymbolElement": false, + "SVGTextContentElement": false, + "SVGTextElement": false, + "SVGTextPathElement": false, + "SVGTextPositioningElement": false, + "SVGTitleElement": false, + "SVGTransform": false, + "SVGTransformList": false, + "SVGTSpanElement": false, + "SVGUnitTypes": false, + "SVGUseElement": false, + "SVGViewElement": false, + "SyncManager": false, + "TaskAttributionTiming": false, + "TaskController": false, + "TaskPriorityChangeEvent": false, + "TaskSignal": false, + "TEMPORARY": false, + "Text": false, + "TextDecoder": false, + "TextDecoderStream": false, + "TextEncoder": false, + "TextEncoderStream": false, + "TextEvent": false, + "TextFormat": false, + "TextFormatUpdateEvent": false, + "TextMetrics": false, + "TextTrack": false, + "TextTrackCue": false, + "TextTrackCueList": false, + "TextTrackList": false, + "TextUpdateEvent": false, + "TimeEvent": false, + "TimeRanges": false, + "ToggleEvent": false, + "toolbar": false, + "top": false, + "Touch": false, + "TouchEvent": false, + "TouchList": false, + "TrackEvent": false, + "TransformStream": false, + "TransformStreamDefaultController": false, + "TransitionEvent": false, + "Translator": false, + "TreeWalker": false, + "TrustedHTML": false, + "TrustedScript": false, + "TrustedScriptURL": false, + "TrustedTypePolicy": false, + "TrustedTypePolicyFactory": false, + "trustedTypes": false, + "UIEvent": false, + "URL": false, + "URLPattern": false, + "URLSearchParams": false, + "USB": false, + "USBAlternateInterface": false, + "USBConfiguration": false, + "USBConnectionEvent": false, + "USBDevice": false, + "USBEndpoint": false, + "USBInterface": false, + "USBInTransferResult": false, + "USBIsochronousInTransferPacket": false, + "USBIsochronousInTransferResult": false, + "USBIsochronousOutTransferPacket": false, + "USBIsochronousOutTransferResult": false, + "USBOutTransferResult": false, + "UserActivation": false, + "ValidityState": false, + "VideoColorSpace": false, + "VideoDecoder": false, + "VideoEncoder": false, + "VideoFrame": false, + "VideoPlaybackQuality": false, + "viewport": false, + "Viewport": false, + "ViewTimeline": false, + "ViewTransition": false, + "ViewTransitionTypeSet": false, + "VirtualKeyboard": false, + "VirtualKeyboardGeometryChangeEvent": false, + "VisibilityStateEntry": false, + "visualViewport": false, + "VisualViewport": false, + "VTTCue": false, + "VTTRegion": false, + "WakeLock": false, + "WakeLockSentinel": false, + "WaveShaperNode": false, + "WebAssembly": false, + "WebGL2RenderingContext": false, + "WebGLActiveInfo": false, + "WebGLBuffer": false, + "WebGLContextEvent": false, + "WebGLFramebuffer": false, + "WebGLObject": false, + "WebGLProgram": false, + "WebGLQuery": false, + "WebGLRenderbuffer": false, + "WebGLRenderingContext": false, + "WebGLSampler": false, + "WebGLShader": false, + "WebGLShaderPrecisionFormat": false, + "WebGLSync": false, + "WebGLTexture": false, + "WebGLTransformFeedback": false, + "WebGLUniformLocation": false, + "WebGLVertexArrayObject": false, + "WebSocket": false, + "WebSocketError": false, + "WebSocketStream": false, + "WebTransport": false, + "WebTransportBidirectionalStream": false, + "WebTransportDatagramDuplexStream": false, + "WebTransportError": false, + "WebTransportReceiveStream": false, + "WebTransportSendStream": false, + "WGSLLanguageFeatures": false, + "WheelEvent": false, + "when": false, + "window": false, + "Window": false, + "WindowControlsOverlay": false, + "WindowControlsOverlayGeometryChangeEvent": false, + "Worker": false, + "Worklet": false, + "WorkletGlobalScope": false, + "WritableStream": false, + "WritableStreamDefaultController": false, + "WritableStreamDefaultWriter": false, + "XMLDocument": false, + "XMLHttpRequest": false, + "XMLHttpRequestEventTarget": false, + "XMLHttpRequestUpload": false, + "XMLSerializer": false, + "XPathEvaluator": false, + "XPathExpression": false, + "XPathResult": false, + "XRAnchor": false, + "XRAnchorSet": false, + "XRBoundedReferenceSpace": false, + "XRCamera": false, + "XRCPUDepthInformation": false, + "XRDepthInformation": false, + "XRDOMOverlayState": false, + "XRFrame": false, + "XRHand": false, + "XRHitTestResult": false, + "XRHitTestSource": false, + "XRInputSource": false, + "XRInputSourceArray": false, + "XRInputSourceEvent": false, + "XRInputSourcesChangeEvent": false, + "XRJointPose": false, + "XRJointSpace": false, + "XRLayer": false, + "XRLightEstimate": false, + "XRLightProbe": false, + "XRPose": false, + "XRRay": false, + "XRReferenceSpace": false, + "XRReferenceSpaceEvent": false, + "XRRenderState": false, + "XRRigidTransform": false, + "XRSession": false, + "XRSessionEvent": false, + "XRSpace": false, + "XRSystem": false, + "XRTransientInputHitTestResult": false, + "XRTransientInputHitTestSource": false, + "XRView": false, + "XRViewerPose": false, + "XRViewport": false, + "XRWebGLBinding": false, + "XRWebGLDepthInformation": false, + "XRWebGLLayer": false, + "XSLTProcessor": false + } + }, + "errors": [ + { + "message": "'top' is already defined as a built-in global variable." + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-redeclare > invalid + +```js +/*globals Array */ +``` + +```json +{ + "options": [ + { + "builtinGlobals": true + } + ], + "errors": [ + { + "message": "'Array' is already defined as a built-in global variable.", + "line": 1, + "column": 11, + "endLine": 1, + "endColumn": 16 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-redeclare > invalid + +```js +/*globals parseInt */ +``` + +```json +{ + "options": [ + { + "builtinGlobals": true + } + ], + "errors": [ + { + "message": "'parseInt' is already defined as a built-in global variable.", + "line": 1, + "column": 11, + "endLine": 1, + "endColumn": 19 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-redeclare > invalid + +```js +/*globals foo, Array */ +``` + +```json +{ + "options": [ + { + "builtinGlobals": true + } + ], + "errors": [ + { + "message": "'Array' is already defined as a built-in global variable.", + "line": 1, + "column": 16, + "endLine": 1, + "endColumn": 21 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-redeclare > invalid + +```js +/* globals foo, Array, baz */ +``` + +```json +{ + "options": [ + { + "builtinGlobals": true + } + ], + "errors": [ + { + "message": "'Array' is already defined as a built-in global variable.", + "line": 1, + "column": 17, + "endLine": 1, + "endColumn": 22 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-redeclare > invalid + +```js +/*global foo, Array, baz*/ +``` + +```json +{ + "options": [ + { + "builtinGlobals": true + } + ], + "errors": [ + { + "message": "'Array' is already defined as a built-in global variable.", + "line": 1, + "column": 15, + "endLine": 1, + "endColumn": 20 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-redeclare > invalid + +```js +/*global array, Array*/ +``` + +```json +{ + "options": [ + { + "builtinGlobals": true + } + ], + "errors": [ + { + "message": "'Array' is already defined as a built-in global variable.", + "line": 1, + "column": 17, + "endLine": 1, + "endColumn": 22 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-redeclare > invalid + +```js +/*globals a,Array*/ +``` + +```json +{ + "options": [ + { + "builtinGlobals": true + } + ], + "errors": [ + { + "message": "'Array' is already defined as a built-in global variable.", + "line": 1, + "column": 13, + "endLine": 1, + "endColumn": 18 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-redeclare > invalid + +```js +/*globals a:readonly, Array:writable */ +``` + +```json +{ + "options": [ + { + "builtinGlobals": true + } + ], + "errors": [ + { + "message": "'Array' is already defined as a built-in global variable.", + "line": 1, + "column": 23, + "endLine": 1, + "endColumn": 28 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-redeclare > invalid + +```js + +/*globals Array */ +``` + +```json +{ + "options": [ + { + "builtinGlobals": true + } + ], + "errors": [ + { + "message": "'Array' is already defined as a built-in global variable.", + "line": 2, + "column": 11, + "endLine": 2, + "endColumn": 16 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-redeclare > invalid + +```js +/*globals +Array */ +``` + +```json +{ + "options": [ + { + "builtinGlobals": true + } + ], + "errors": [ + { + "message": "'Array' is already defined as a built-in global variable.", + "line": 2, + "column": 1, + "endLine": 2, + "endColumn": 6 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-redeclare > invalid + +```js + +/*globals + +Array*/ +``` + +```json +{ + "options": [ + { + "builtinGlobals": true + } + ], + "errors": [ + { + "message": "'Array' is already defined as a built-in global variable.", + "line": 4, + "column": 1, + "endLine": 4, + "endColumn": 6 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-redeclare > invalid + +```js +/*globals foo, + Array */ +``` + +```json +{ + "options": [ + { + "builtinGlobals": true + } + ], + "errors": [ + { + "message": "'Array' is already defined as a built-in global variable.", + "line": 2, + "column": 5, + "endLine": 2, + "endColumn": 10 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-redeclare > invalid + +```js +/*globals a */ +``` + +```json +{ + "options": [ + { + "builtinGlobals": true + } + ], + "languageOptions": { + "globals": { + "a": "readonly" + } + }, + "errors": [ + { + "message": "'a' is already defined as a built-in global variable.", + "line": 1, + "column": 11, + "endLine": 1, + "endColumn": 12 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-redeclare > invalid + +```js +/*globals a */ +``` + +```json +{ + "options": [ + { + "builtinGlobals": true + } + ], + "languageOptions": { + "globals": { + "a": "writable" + } + }, + "errors": [ + { + "message": "'a' is already defined as a built-in global variable.", + "line": 1, + "column": 11, + "endLine": 1, + "endColumn": 12 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-redeclare > invalid + +```js +/*globals a */ /*globals a */ +``` + +```json +{ + "errors": [ + { + "message": "'a' is already defined.", + "line": 1, + "column": 26, + "endLine": 1, + "endColumn": 27 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-redeclare > invalid + +```js +/*globals a */ /*globals a */ var a = 0 +``` + +```json +{ + "options": [ + { + "builtinGlobals": true + } + ], + "languageOptions": { + "globals": { + "a": "writable" + } + }, + "errors": [ + { + "message": "'a' is already defined as a built-in global variable.", + "line": 1, + "column": 11, + "endLine": 1, + "endColumn": 12 + }, + { + "message": "'a' is already defined as a built-in global variable.", + "line": 1, + "column": 26, + "endLine": 1, + "endColumn": 27 + }, + { + "message": "'a' is already defined as a built-in global variable.", + "line": 1, + "column": 35, + "endLine": 1, + "endColumn": 36 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 3 errors but had 0: [] + +0 !== 3 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +### `no-restricted-globals` + +Pass: 102 / 166 (61.4%) +Fail: 64 / 166 (38.6%) + +#### no-restricted-globals > invalid + +```js +window.foo() +``` + +```json +{ + "options": [ + { + "globals": [ + "foo" + ], + "checkGlobalObject": true + } + ], + "languageOptions": { + "globals": { + "AbortController": false, + "AbortSignal": false, + "AbsoluteOrientationSensor": false, + "AbstractRange": false, + "Accelerometer": false, + "addEventListener": false, + "ai": false, + "AI": false, + "AICreateMonitor": false, + "AITextSession": false, + "alert": false, + "AnalyserNode": false, + "Animation": false, + "AnimationEffect": false, + "AnimationEvent": false, + "AnimationPlaybackEvent": false, + "AnimationTimeline": false, + "AsyncDisposableStack": false, + "atob": false, + "Attr": false, + "Audio": false, + "AudioBuffer": false, + "AudioBufferSourceNode": false, + "AudioContext": false, + "AudioData": false, + "AudioDecoder": false, + "AudioDestinationNode": false, + "AudioEncoder": false, + "AudioListener": false, + "AudioNode": false, + "AudioParam": false, + "AudioParamMap": false, + "AudioProcessingEvent": false, + "AudioScheduledSourceNode": false, + "AudioSinkInfo": false, + "AudioWorklet": false, + "AudioWorkletGlobalScope": false, + "AudioWorkletNode": false, + "AudioWorkletProcessor": false, + "AuthenticatorAssertionResponse": false, + "AuthenticatorAttestationResponse": false, + "AuthenticatorResponse": false, + "BackgroundFetchManager": false, + "BackgroundFetchRecord": false, + "BackgroundFetchRegistration": false, + "BarcodeDetector": false, + "BarProp": false, + "BaseAudioContext": false, + "BatteryManager": false, + "BeforeUnloadEvent": false, + "BiquadFilterNode": false, + "Blob": false, + "BlobEvent": false, + "Bluetooth": false, + "BluetoothCharacteristicProperties": false, + "BluetoothDevice": false, + "BluetoothRemoteGATTCharacteristic": false, + "BluetoothRemoteGATTDescriptor": false, + "BluetoothRemoteGATTServer": false, + "BluetoothRemoteGATTService": false, + "BluetoothUUID": false, + "blur": false, + "BroadcastChannel": false, + "BrowserCaptureMediaStreamTrack": false, + "btoa": false, + "ByteLengthQueuingStrategy": false, + "Cache": false, + "caches": false, + "CacheStorage": false, + "cancelAnimationFrame": false, + "cancelIdleCallback": false, + "CanvasCaptureMediaStream": false, + "CanvasCaptureMediaStreamTrack": false, + "CanvasGradient": false, + "CanvasPattern": false, + "CanvasRenderingContext2D": false, + "CaptureController": false, + "CaretPosition": false, + "CDATASection": false, + "ChannelMergerNode": false, + "ChannelSplitterNode": false, + "ChapterInformation": false, + "CharacterBoundsUpdateEvent": false, + "CharacterData": false, + "clearInterval": false, + "clearTimeout": false, + "clientInformation": false, + "Clipboard": false, + "ClipboardChangeEvent": false, + "ClipboardEvent": false, + "ClipboardItem": false, + "close": false, + "closed": false, + "CloseEvent": false, + "CloseWatcher": false, + "CommandEvent": false, + "Comment": false, + "CompositionEvent": false, + "CompressionStream": false, + "confirm": false, + "console": false, + "ConstantSourceNode": false, + "ContentVisibilityAutoStateChangeEvent": false, + "ConvolverNode": false, + "CookieChangeEvent": false, + "CookieDeprecationLabel": false, + "cookieStore": false, + "CookieStore": false, + "CookieStoreManager": false, + "CountQueuingStrategy": false, + "createImageBitmap": false, + "CreateMonitor": false, + "Credential": false, + "credentialless": false, + "CredentialsContainer": false, + "CropTarget": false, + "crossOriginIsolated": false, + "crypto": false, + "Crypto": false, + "CryptoKey": false, + "CSPViolationReportBody": false, + "CSS": false, + "CSSAnimation": false, + "CSSConditionRule": false, + "CSSContainerRule": false, + "CSSCounterStyleRule": false, + "CSSFontFaceRule": false, + "CSSFontFeatureValuesRule": false, + "CSSFontPaletteValuesRule": false, + "CSSFunctionDeclarations": false, + "CSSFunctionDescriptors": false, + "CSSFunctionRule": false, + "CSSGroupingRule": false, + "CSSImageValue": false, + "CSSImportRule": false, + "CSSKeyframeRule": false, + "CSSKeyframesRule": false, + "CSSKeywordValue": false, + "CSSLayerBlockRule": false, + "CSSLayerStatementRule": false, + "CSSMarginRule": false, + "CSSMathClamp": false, + "CSSMathInvert": false, + "CSSMathMax": false, + "CSSMathMin": false, + "CSSMathNegate": false, + "CSSMathProduct": false, + "CSSMathSum": false, + "CSSMathValue": false, + "CSSMatrixComponent": false, + "CSSMediaRule": false, + "CSSNamespaceRule": false, + "CSSNestedDeclarations": false, + "CSSNumericArray": false, + "CSSNumericValue": false, + "CSSPageDescriptors": false, + "CSSPageRule": false, + "CSSPerspective": false, + "CSSPositionTryDescriptors": false, + "CSSPositionTryRule": false, + "CSSPositionValue": false, + "CSSPropertyRule": false, + "CSSRotate": false, + "CSSRule": false, + "CSSRuleList": false, + "CSSScale": false, + "CSSScopeRule": false, + "CSSSkew": false, + "CSSSkewX": false, + "CSSSkewY": false, + "CSSStartingStyleRule": false, + "CSSStyleDeclaration": false, + "CSSStyleRule": false, + "CSSStyleSheet": false, + "CSSStyleValue": false, + "CSSSupportsRule": false, + "CSSTransformComponent": false, + "CSSTransformValue": false, + "CSSTransition": false, + "CSSTranslate": false, + "CSSUnitValue": false, + "CSSUnparsedValue": false, + "CSSVariableReferenceValue": false, + "CSSViewTransitionRule": false, + "currentFrame": false, + "currentTime": false, + "CustomElementRegistry": false, + "customElements": false, + "CustomEvent": false, + "CustomStateSet": false, + "DataTransfer": false, + "DataTransferItem": false, + "DataTransferItemList": false, + "DecompressionStream": false, + "DelayNode": false, + "DelegatedInkTrailPresenter": false, + "DeviceMotionEvent": false, + "DeviceMotionEventAcceleration": false, + "DeviceMotionEventRotationRate": false, + "DeviceOrientationEvent": false, + "devicePixelRatio": false, + "DevicePosture": false, + "DigitalCredential": false, + "dispatchEvent": false, + "DisposableStack": false, + "document": false, + "Document": false, + "DocumentFragment": false, + "documentPictureInPicture": false, + "DocumentPictureInPicture": false, + "DocumentPictureInPictureEvent": false, + "DocumentTimeline": false, + "DocumentType": false, + "DOMError": false, + "DOMException": false, + "DOMImplementation": false, + "DOMMatrix": false, + "DOMMatrixReadOnly": false, + "DOMParser": false, + "DOMPoint": false, + "DOMPointReadOnly": false, + "DOMQuad": false, + "DOMRect": false, + "DOMRectList": false, + "DOMRectReadOnly": false, + "DOMStringList": false, + "DOMStringMap": false, + "DOMTokenList": false, + "DragEvent": false, + "DynamicsCompressorNode": false, + "EditContext": false, + "Element": false, + "ElementInternals": false, + "EncodedAudioChunk": false, + "EncodedVideoChunk": false, + "ErrorEvent": false, + "event": false, + "Event": false, + "EventCounts": false, + "EventSource": false, + "EventTarget": false, + "external": false, + "External": false, + "EyeDropper": false, + "FeaturePolicy": false, + "FederatedCredential": false, + "fence": false, + "Fence": false, + "FencedFrameConfig": false, + "fetch": false, + "fetchLater": false, + "FetchLaterResult": false, + "File": false, + "FileList": false, + "FileReader": false, + "FileSystem": false, + "FileSystemDirectoryEntry": false, + "FileSystemDirectoryHandle": false, + "FileSystemDirectoryReader": false, + "FileSystemEntry": false, + "FileSystemFileEntry": false, + "FileSystemFileHandle": false, + "FileSystemHandle": false, + "FileSystemObserver": false, + "FileSystemWritableFileStream": false, + "find": false, + "focus": false, + "FocusEvent": false, + "FontData": false, + "FontFace": false, + "FontFaceSet": false, + "FontFaceSetLoadEvent": false, + "FormData": false, + "FormDataEvent": false, + "FragmentDirective": false, + "frameElement": false, + "frames": false, + "GainNode": false, + "Gamepad": false, + "GamepadAxisMoveEvent": false, + "GamepadButton": false, + "GamepadButtonEvent": false, + "GamepadEvent": false, + "GamepadHapticActuator": false, + "GamepadPose": false, + "Geolocation": false, + "GeolocationCoordinates": false, + "GeolocationPosition": false, + "GeolocationPositionError": false, + "getComputedStyle": false, + "getScreenDetails": false, + "getSelection": false, + "GPU": false, + "GPUAdapter": false, + "GPUAdapterInfo": false, + "GPUBindGroup": false, + "GPUBindGroupLayout": false, + "GPUBuffer": false, + "GPUBufferUsage": false, + "GPUCanvasContext": false, + "GPUColorWrite": false, + "GPUCommandBuffer": false, + "GPUCommandEncoder": false, + "GPUCompilationInfo": false, + "GPUCompilationMessage": false, + "GPUComputePassEncoder": false, + "GPUComputePipeline": false, + "GPUDevice": false, + "GPUDeviceLostInfo": false, + "GPUError": false, + "GPUExternalTexture": false, + "GPUInternalError": false, + "GPUMapMode": false, + "GPUOutOfMemoryError": false, + "GPUPipelineError": false, + "GPUPipelineLayout": false, + "GPUQuerySet": false, + "GPUQueue": false, + "GPURenderBundle": false, + "GPURenderBundleEncoder": false, + "GPURenderPassEncoder": false, + "GPURenderPipeline": false, + "GPUSampler": false, + "GPUShaderModule": false, + "GPUShaderStage": false, + "GPUSupportedFeatures": false, + "GPUSupportedLimits": false, + "GPUTexture": false, + "GPUTextureUsage": false, + "GPUTextureView": false, + "GPUUncapturedErrorEvent": false, + "GPUValidationError": false, + "GravitySensor": false, + "Gyroscope": false, + "HashChangeEvent": false, + "Headers": false, + "HID": false, + "HIDConnectionEvent": false, + "HIDDevice": false, + "HIDInputReportEvent": false, + "Highlight": false, + "HighlightRegistry": false, + "history": false, + "History": false, + "HTMLAllCollection": false, + "HTMLAnchorElement": false, + "HTMLAreaElement": false, + "HTMLAudioElement": false, + "HTMLBaseElement": false, + "HTMLBodyElement": false, + "HTMLBRElement": false, + "HTMLButtonElement": false, + "HTMLCanvasElement": false, + "HTMLCollection": false, + "HTMLDataElement": false, + "HTMLDataListElement": false, + "HTMLDetailsElement": false, + "HTMLDialogElement": false, + "HTMLDirectoryElement": false, + "HTMLDivElement": false, + "HTMLDListElement": false, + "HTMLDocument": false, + "HTMLElement": false, + "HTMLEmbedElement": false, + "HTMLFencedFrameElement": false, + "HTMLFieldSetElement": false, + "HTMLFontElement": false, + "HTMLFormControlsCollection": false, + "HTMLFormElement": false, + "HTMLFrameElement": false, + "HTMLFrameSetElement": false, + "HTMLHeadElement": false, + "HTMLHeadingElement": false, + "HTMLHRElement": false, + "HTMLHtmlElement": false, + "HTMLIFrameElement": false, + "HTMLImageElement": false, + "HTMLInputElement": false, + "HTMLLabelElement": false, + "HTMLLegendElement": false, + "HTMLLIElement": false, + "HTMLLinkElement": false, + "HTMLMapElement": false, + "HTMLMarqueeElement": false, + "HTMLMediaElement": false, + "HTMLMenuElement": false, + "HTMLMetaElement": false, + "HTMLMeterElement": false, + "HTMLModElement": false, + "HTMLObjectElement": false, + "HTMLOListElement": false, + "HTMLOptGroupElement": false, + "HTMLOptionElement": false, + "HTMLOptionsCollection": false, + "HTMLOutputElement": false, + "HTMLParagraphElement": false, + "HTMLParamElement": false, + "HTMLPictureElement": false, + "HTMLPreElement": false, + "HTMLProgressElement": false, + "HTMLQuoteElement": false, + "HTMLScriptElement": false, + "HTMLSelectedContentElement": false, + "HTMLSelectElement": false, + "HTMLSlotElement": false, + "HTMLSourceElement": false, + "HTMLSpanElement": false, + "HTMLStyleElement": false, + "HTMLTableCaptionElement": false, + "HTMLTableCellElement": false, + "HTMLTableColElement": false, + "HTMLTableElement": false, + "HTMLTableRowElement": false, + "HTMLTableSectionElement": false, + "HTMLTemplateElement": false, + "HTMLTextAreaElement": false, + "HTMLTimeElement": false, + "HTMLTitleElement": false, + "HTMLTrackElement": false, + "HTMLUListElement": false, + "HTMLUnknownElement": false, + "HTMLVideoElement": false, + "IDBCursor": false, + "IDBCursorWithValue": false, + "IDBDatabase": false, + "IDBFactory": false, + "IDBIndex": false, + "IDBKeyRange": false, + "IDBObjectStore": false, + "IDBOpenDBRequest": false, + "IDBRecord": false, + "IDBRequest": false, + "IDBTransaction": false, + "IDBVersionChangeEvent": false, + "IdentityCredential": false, + "IdentityCredentialError": false, + "IdentityProvider": false, + "IdleDeadline": false, + "IdleDetector": false, + "IIRFilterNode": false, + "Image": false, + "ImageBitmap": false, + "ImageBitmapRenderingContext": false, + "ImageCapture": false, + "ImageData": false, + "ImageDecoder": false, + "ImageTrack": false, + "ImageTrackList": false, + "indexedDB": false, + "Ink": false, + "innerHeight": false, + "innerWidth": false, + "InputDeviceCapabilities": false, + "InputDeviceInfo": false, + "InputEvent": false, + "IntegrityViolationReportBody": false, + "InterestEvent": false, + "IntersectionObserver": false, + "IntersectionObserverEntry": false, + "isSecureContext": false, + "Keyboard": false, + "KeyboardEvent": false, + "KeyboardLayoutMap": false, + "KeyframeEffect": false, + "LanguageDetector": false, + "LargestContentfulPaint": false, + "LaunchParams": false, + "launchQueue": false, + "LaunchQueue": false, + "LayoutShift": false, + "LayoutShiftAttribution": false, + "length": false, + "LinearAccelerationSensor": false, + "localStorage": false, + "location": true, + "Location": false, + "locationbar": false, + "Lock": false, + "LockManager": false, + "matchMedia": false, + "MathMLElement": false, + "MediaCapabilities": false, + "MediaCapabilitiesInfo": false, + "MediaDeviceInfo": false, + "MediaDevices": false, + "MediaElementAudioSourceNode": false, + "MediaEncryptedEvent": false, + "MediaError": false, + "MediaKeyError": false, + "MediaKeyMessageEvent": false, + "MediaKeys": false, + "MediaKeySession": false, + "MediaKeyStatusMap": false, + "MediaKeySystemAccess": false, + "MediaList": false, + "MediaMetadata": false, + "MediaQueryList": false, + "MediaQueryListEvent": false, + "MediaRecorder": false, + "MediaRecorderErrorEvent": false, + "MediaSession": false, + "MediaSource": false, + "MediaSourceHandle": false, + "MediaStream": false, + "MediaStreamAudioDestinationNode": false, + "MediaStreamAudioSourceNode": false, + "MediaStreamEvent": false, + "MediaStreamTrack": false, + "MediaStreamTrackAudioSourceNode": false, + "MediaStreamTrackAudioStats": false, + "MediaStreamTrackEvent": false, + "MediaStreamTrackGenerator": false, + "MediaStreamTrackProcessor": false, + "MediaStreamTrackVideoStats": false, + "menubar": false, + "MessageChannel": false, + "MessageEvent": false, + "MessagePort": false, + "MIDIAccess": false, + "MIDIConnectionEvent": false, + "MIDIInput": false, + "MIDIInputMap": false, + "MIDIMessageEvent": false, + "MIDIOutput": false, + "MIDIOutputMap": false, + "MIDIPort": false, + "MimeType": false, + "MimeTypeArray": false, + "model": false, + "ModelGenericSession": false, + "ModelManager": false, + "MouseEvent": false, + "moveBy": false, + "moveTo": false, + "MutationEvent": false, + "MutationObserver": false, + "MutationRecord": false, + "name": false, + "NamedNodeMap": false, + "NavigateEvent": false, + "navigation": false, + "Navigation": false, + "NavigationActivation": false, + "NavigationCurrentEntryChangeEvent": false, + "NavigationDestination": false, + "NavigationHistoryEntry": false, + "NavigationPrecommitController": false, + "NavigationPreloadManager": false, + "NavigationTransition": false, + "navigator": false, + "Navigator": false, + "NavigatorLogin": false, + "NavigatorManagedData": false, + "NavigatorUAData": false, + "NetworkInformation": false, + "Node": false, + "NodeFilter": false, + "NodeIterator": false, + "NodeList": false, + "Notification": false, + "NotifyPaintEvent": false, + "NotRestoredReasonDetails": false, + "NotRestoredReasons": false, + "Observable": false, + "OfflineAudioCompletionEvent": false, + "OfflineAudioContext": false, + "offscreenBuffering": false, + "OffscreenCanvas": false, + "OffscreenCanvasRenderingContext2D": false, + "onabort": true, + "onafterprint": true, + "onanimationcancel": true, + "onanimationend": true, + "onanimationiteration": true, + "onanimationstart": true, + "onappinstalled": true, + "onauxclick": true, + "onbeforeinput": true, + "onbeforeinstallprompt": true, + "onbeforematch": true, + "onbeforeprint": true, + "onbeforetoggle": true, + "onbeforeunload": true, + "onbeforexrselect": true, + "onblur": true, + "oncancel": true, + "oncanplay": true, + "oncanplaythrough": true, + "onchange": true, + "onclick": true, + "onclose": true, + "oncommand": true, + "oncontentvisibilityautostatechange": true, + "oncontextlost": true, + "oncontextmenu": true, + "oncontextrestored": true, + "oncopy": true, + "oncuechange": true, + "oncut": true, + "ondblclick": true, + "ondevicemotion": true, + "ondeviceorientation": true, + "ondeviceorientationabsolute": true, + "ondrag": true, + "ondragend": true, + "ondragenter": true, + "ondragleave": true, + "ondragover": true, + "ondragstart": true, + "ondrop": true, + "ondurationchange": true, + "onemptied": true, + "onended": true, + "onerror": true, + "onfocus": true, + "onformdata": true, + "ongamepadconnected": true, + "ongamepaddisconnected": true, + "ongotpointercapture": true, + "onhashchange": true, + "oninput": true, + "oninvalid": true, + "onkeydown": true, + "onkeypress": true, + "onkeyup": true, + "onlanguagechange": true, + "onload": true, + "onloadeddata": true, + "onloadedmetadata": true, + "onloadstart": true, + "onlostpointercapture": true, + "onmessage": true, + "onmessageerror": true, + "onmousedown": true, + "onmouseenter": true, + "onmouseleave": true, + "onmousemove": true, + "onmouseout": true, + "onmouseover": true, + "onmouseup": true, + "onmousewheel": true, + "onoffline": true, + "ononline": true, + "onpagehide": true, + "onpagereveal": true, + "onpageshow": true, + "onpageswap": true, + "onpaste": true, + "onpause": true, + "onplay": true, + "onplaying": true, + "onpointercancel": true, + "onpointerdown": true, + "onpointerenter": true, + "onpointerleave": true, + "onpointermove": true, + "onpointerout": true, + "onpointerover": true, + "onpointerrawupdate": true, + "onpointerup": true, + "onpopstate": true, + "onprogress": true, + "onratechange": true, + "onrejectionhandled": true, + "onreset": true, + "onresize": true, + "onscroll": true, + "onscrollend": true, + "onscrollsnapchange": true, + "onscrollsnapchanging": true, + "onsearch": true, + "onsecuritypolicyviolation": true, + "onseeked": true, + "onseeking": true, + "onselect": true, + "onselectionchange": true, + "onselectstart": true, + "onslotchange": true, + "onstalled": true, + "onstorage": true, + "onsubmit": true, + "onsuspend": true, + "ontimeupdate": true, + "ontoggle": true, + "ontransitioncancel": true, + "ontransitionend": true, + "ontransitionrun": true, + "ontransitionstart": true, + "onunhandledrejection": true, + "onunload": true, + "onvolumechange": true, + "onwaiting": true, + "onwheel": true, + "open": false, + "opener": false, + "Option": false, + "OrientationSensor": false, + "origin": false, + "originAgentCluster": false, + "OscillatorNode": false, + "OTPCredential": false, + "outerHeight": false, + "outerWidth": false, + "OverconstrainedError": false, + "PageRevealEvent": false, + "PageSwapEvent": false, + "PageTransitionEvent": false, + "pageXOffset": false, + "pageYOffset": false, + "PannerNode": false, + "parent": false, + "PasswordCredential": false, + "Path2D": false, + "PaymentAddress": false, + "PaymentManager": false, + "PaymentMethodChangeEvent": false, + "PaymentRequest": false, + "PaymentRequestUpdateEvent": false, + "PaymentResponse": false, + "performance": false, + "Performance": false, + "PerformanceElementTiming": false, + "PerformanceEntry": false, + "PerformanceEventTiming": false, + "PerformanceLongAnimationFrameTiming": false, + "PerformanceLongTaskTiming": false, + "PerformanceMark": false, + "PerformanceMeasure": false, + "PerformanceNavigation": false, + "PerformanceNavigationTiming": false, + "PerformanceObserver": false, + "PerformanceObserverEntryList": false, + "PerformancePaintTiming": false, + "PerformanceResourceTiming": false, + "PerformanceScriptTiming": false, + "PerformanceServerTiming": false, + "PerformanceTiming": false, + "PeriodicSyncManager": false, + "PeriodicWave": false, + "Permissions": false, + "PermissionStatus": false, + "PERSISTENT": false, + "personalbar": false, + "PictureInPictureEvent": false, + "PictureInPictureWindow": false, + "Plugin": false, + "PluginArray": false, + "PointerEvent": false, + "PopStateEvent": false, + "postMessage": false, + "Presentation": false, + "PresentationAvailability": false, + "PresentationConnection": false, + "PresentationConnectionAvailableEvent": false, + "PresentationConnectionCloseEvent": false, + "PresentationConnectionList": false, + "PresentationReceiver": false, + "PresentationRequest": false, + "PressureObserver": false, + "PressureRecord": false, + "print": false, + "ProcessingInstruction": false, + "Profiler": false, + "ProgressEvent": false, + "PromiseRejectionEvent": false, + "prompt": false, + "ProtectedAudience": false, + "PublicKeyCredential": false, + "PushManager": false, + "PushSubscription": false, + "PushSubscriptionOptions": false, + "queryLocalFonts": false, + "queueMicrotask": false, + "QuotaExceededError": false, + "RadioNodeList": false, + "Range": false, + "ReadableByteStreamController": false, + "ReadableStream": false, + "ReadableStreamBYOBReader": false, + "ReadableStreamBYOBRequest": false, + "ReadableStreamDefaultController": false, + "ReadableStreamDefaultReader": false, + "registerProcessor": false, + "RelativeOrientationSensor": false, + "RemotePlayback": false, + "removeEventListener": false, + "ReportBody": false, + "reportError": false, + "ReportingObserver": false, + "Request": false, + "requestAnimationFrame": false, + "requestIdleCallback": false, + "resizeBy": false, + "ResizeObserver": false, + "ResizeObserverEntry": false, + "ResizeObserverSize": false, + "resizeTo": false, + "Response": false, + "RestrictionTarget": false, + "RTCCertificate": false, + "RTCDataChannel": false, + "RTCDataChannelEvent": false, + "RTCDtlsTransport": false, + "RTCDTMFSender": false, + "RTCDTMFToneChangeEvent": false, + "RTCEncodedAudioFrame": false, + "RTCEncodedVideoFrame": false, + "RTCError": false, + "RTCErrorEvent": false, + "RTCIceCandidate": false, + "RTCIceTransport": false, + "RTCPeerConnection": false, + "RTCPeerConnectionIceErrorEvent": false, + "RTCPeerConnectionIceEvent": false, + "RTCRtpReceiver": false, + "RTCRtpScriptTransform": false, + "RTCRtpSender": false, + "RTCRtpTransceiver": false, + "RTCSctpTransport": false, + "RTCSessionDescription": false, + "RTCStatsReport": false, + "RTCTrackEvent": false, + "sampleRate": false, + "scheduler": false, + "Scheduler": false, + "Scheduling": false, + "screen": false, + "Screen": false, + "ScreenDetailed": false, + "ScreenDetails": false, + "screenLeft": false, + "ScreenOrientation": false, + "screenTop": false, + "screenX": false, + "screenY": false, + "ScriptProcessorNode": false, + "scroll": false, + "scrollbars": false, + "scrollBy": false, + "ScrollTimeline": false, + "scrollTo": false, + "scrollX": false, + "scrollY": false, + "SecurityPolicyViolationEvent": false, + "Selection": false, + "self": false, + "Sensor": false, + "SensorErrorEvent": false, + "Serial": false, + "SerialPort": false, + "ServiceWorker": false, + "ServiceWorkerContainer": false, + "ServiceWorkerRegistration": false, + "sessionStorage": false, + "setInterval": false, + "setTimeout": false, + "ShadowRoot": false, + "sharedStorage": false, + "SharedStorage": false, + "SharedStorageAppendMethod": false, + "SharedStorageClearMethod": false, + "SharedStorageDeleteMethod": false, + "SharedStorageModifierMethod": false, + "SharedStorageSetMethod": false, + "SharedStorageWorklet": false, + "SharedWorker": false, + "showDirectoryPicker": false, + "showOpenFilePicker": false, + "showSaveFilePicker": false, + "SnapEvent": false, + "SourceBuffer": false, + "SourceBufferList": false, + "SpeechGrammar": false, + "SpeechGrammarList": false, + "SpeechRecognition": false, + "SpeechRecognitionErrorEvent": false, + "SpeechRecognitionEvent": false, + "SpeechRecognitionPhrase": false, + "speechSynthesis": false, + "SpeechSynthesis": false, + "SpeechSynthesisErrorEvent": false, + "SpeechSynthesisEvent": false, + "SpeechSynthesisUtterance": false, + "SpeechSynthesisVoice": false, + "StaticRange": false, + "status": false, + "statusbar": false, + "StereoPannerNode": false, + "stop": false, + "Storage": false, + "StorageBucket": false, + "StorageBucketManager": false, + "StorageEvent": false, + "StorageManager": false, + "structuredClone": false, + "styleMedia": false, + "StylePropertyMap": false, + "StylePropertyMapReadOnly": false, + "StyleSheet": false, + "StyleSheetList": false, + "SubmitEvent": false, + "Subscriber": false, + "SubtleCrypto": false, + "Summarizer": false, + "SuppressedError": false, + "SVGAElement": false, + "SVGAngle": false, + "SVGAnimatedAngle": false, + "SVGAnimatedBoolean": false, + "SVGAnimatedEnumeration": false, + "SVGAnimatedInteger": false, + "SVGAnimatedLength": false, + "SVGAnimatedLengthList": false, + "SVGAnimatedNumber": false, + "SVGAnimatedNumberList": false, + "SVGAnimatedPreserveAspectRatio": false, + "SVGAnimatedRect": false, + "SVGAnimatedString": false, + "SVGAnimatedTransformList": false, + "SVGAnimateElement": false, + "SVGAnimateMotionElement": false, + "SVGAnimateTransformElement": false, + "SVGAnimationElement": false, + "SVGCircleElement": false, + "SVGClipPathElement": false, + "SVGComponentTransferFunctionElement": false, + "SVGDefsElement": false, + "SVGDescElement": false, + "SVGElement": false, + "SVGEllipseElement": false, + "SVGFEBlendElement": false, + "SVGFEColorMatrixElement": false, + "SVGFEComponentTransferElement": false, + "SVGFECompositeElement": false, + "SVGFEConvolveMatrixElement": false, + "SVGFEDiffuseLightingElement": false, + "SVGFEDisplacementMapElement": false, + "SVGFEDistantLightElement": false, + "SVGFEDropShadowElement": false, + "SVGFEFloodElement": false, + "SVGFEFuncAElement": false, + "SVGFEFuncBElement": false, + "SVGFEFuncGElement": false, + "SVGFEFuncRElement": false, + "SVGFEGaussianBlurElement": false, + "SVGFEImageElement": false, + "SVGFEMergeElement": false, + "SVGFEMergeNodeElement": false, + "SVGFEMorphologyElement": false, + "SVGFEOffsetElement": false, + "SVGFEPointLightElement": false, + "SVGFESpecularLightingElement": false, + "SVGFESpotLightElement": false, + "SVGFETileElement": false, + "SVGFETurbulenceElement": false, + "SVGFilterElement": false, + "SVGForeignObjectElement": false, + "SVGGElement": false, + "SVGGeometryElement": false, + "SVGGradientElement": false, + "SVGGraphicsElement": false, + "SVGImageElement": false, + "SVGLength": false, + "SVGLengthList": false, + "SVGLinearGradientElement": false, + "SVGLineElement": false, + "SVGMarkerElement": false, + "SVGMaskElement": false, + "SVGMatrix": false, + "SVGMetadataElement": false, + "SVGMPathElement": false, + "SVGNumber": false, + "SVGNumberList": false, + "SVGPathElement": false, + "SVGPatternElement": false, + "SVGPoint": false, + "SVGPointList": false, + "SVGPolygonElement": false, + "SVGPolylineElement": false, + "SVGPreserveAspectRatio": false, + "SVGRadialGradientElement": false, + "SVGRect": false, + "SVGRectElement": false, + "SVGScriptElement": false, + "SVGSetElement": false, + "SVGStopElement": false, + "SVGStringList": false, + "SVGStyleElement": false, + "SVGSVGElement": false, + "SVGSwitchElement": false, + "SVGSymbolElement": false, + "SVGTextContentElement": false, + "SVGTextElement": false, + "SVGTextPathElement": false, + "SVGTextPositioningElement": false, + "SVGTitleElement": false, + "SVGTransform": false, + "SVGTransformList": false, + "SVGTSpanElement": false, + "SVGUnitTypes": false, + "SVGUseElement": false, + "SVGViewElement": false, + "SyncManager": false, + "TaskAttributionTiming": false, + "TaskController": false, + "TaskPriorityChangeEvent": false, + "TaskSignal": false, + "TEMPORARY": false, + "Text": false, + "TextDecoder": false, + "TextDecoderStream": false, + "TextEncoder": false, + "TextEncoderStream": false, + "TextEvent": false, + "TextFormat": false, + "TextFormatUpdateEvent": false, + "TextMetrics": false, + "TextTrack": false, + "TextTrackCue": false, + "TextTrackCueList": false, + "TextTrackList": false, + "TextUpdateEvent": false, + "TimeEvent": false, + "TimeRanges": false, + "ToggleEvent": false, + "toolbar": false, + "top": false, + "Touch": false, + "TouchEvent": false, + "TouchList": false, + "TrackEvent": false, + "TransformStream": false, + "TransformStreamDefaultController": false, + "TransitionEvent": false, + "Translator": false, + "TreeWalker": false, + "TrustedHTML": false, + "TrustedScript": false, + "TrustedScriptURL": false, + "TrustedTypePolicy": false, + "TrustedTypePolicyFactory": false, + "trustedTypes": false, + "UIEvent": false, + "URL": false, + "URLPattern": false, + "URLSearchParams": false, + "USB": false, + "USBAlternateInterface": false, + "USBConfiguration": false, + "USBConnectionEvent": false, + "USBDevice": false, + "USBEndpoint": false, + "USBInterface": false, + "USBInTransferResult": false, + "USBIsochronousInTransferPacket": false, + "USBIsochronousInTransferResult": false, + "USBIsochronousOutTransferPacket": false, + "USBIsochronousOutTransferResult": false, + "USBOutTransferResult": false, + "UserActivation": false, + "ValidityState": false, + "VideoColorSpace": false, + "VideoDecoder": false, + "VideoEncoder": false, + "VideoFrame": false, + "VideoPlaybackQuality": false, + "viewport": false, + "Viewport": false, + "ViewTimeline": false, + "ViewTransition": false, + "ViewTransitionTypeSet": false, + "VirtualKeyboard": false, + "VirtualKeyboardGeometryChangeEvent": false, + "VisibilityStateEntry": false, + "visualViewport": false, + "VisualViewport": false, + "VTTCue": false, + "VTTRegion": false, + "WakeLock": false, + "WakeLockSentinel": false, + "WaveShaperNode": false, + "WebAssembly": false, + "WebGL2RenderingContext": false, + "WebGLActiveInfo": false, + "WebGLBuffer": false, + "WebGLContextEvent": false, + "WebGLFramebuffer": false, + "WebGLObject": false, + "WebGLProgram": false, + "WebGLQuery": false, + "WebGLRenderbuffer": false, + "WebGLRenderingContext": false, + "WebGLSampler": false, + "WebGLShader": false, + "WebGLShaderPrecisionFormat": false, + "WebGLSync": false, + "WebGLTexture": false, + "WebGLTransformFeedback": false, + "WebGLUniformLocation": false, + "WebGLVertexArrayObject": false, + "WebSocket": false, + "WebSocketError": false, + "WebSocketStream": false, + "WebTransport": false, + "WebTransportBidirectionalStream": false, + "WebTransportDatagramDuplexStream": false, + "WebTransportError": false, + "WebTransportReceiveStream": false, + "WebTransportSendStream": false, + "WGSLLanguageFeatures": false, + "WheelEvent": false, + "when": false, + "window": false, + "Window": false, + "WindowControlsOverlay": false, + "WindowControlsOverlayGeometryChangeEvent": false, + "Worker": false, + "Worklet": false, + "WorkletGlobalScope": false, + "WritableStream": false, + "WritableStreamDefaultController": false, + "WritableStreamDefaultWriter": false, + "XMLDocument": false, + "XMLHttpRequest": false, + "XMLHttpRequestEventTarget": false, + "XMLHttpRequestUpload": false, + "XMLSerializer": false, + "XPathEvaluator": false, + "XPathExpression": false, + "XPathResult": false, + "XRAnchor": false, + "XRAnchorSet": false, + "XRBoundedReferenceSpace": false, + "XRCamera": false, + "XRCPUDepthInformation": false, + "XRDepthInformation": false, + "XRDOMOverlayState": false, + "XRFrame": false, + "XRHand": false, + "XRHitTestResult": false, + "XRHitTestSource": false, + "XRInputSource": false, + "XRInputSourceArray": false, + "XRInputSourceEvent": false, + "XRInputSourcesChangeEvent": false, + "XRJointPose": false, + "XRJointSpace": false, + "XRLayer": false, + "XRLightEstimate": false, + "XRLightProbe": false, + "XRPose": false, + "XRRay": false, + "XRReferenceSpace": false, + "XRReferenceSpaceEvent": false, + "XRRenderState": false, + "XRRigidTransform": false, + "XRSession": false, + "XRSessionEvent": false, + "XRSpace": false, + "XRSystem": false, + "XRTransientInputHitTestResult": false, + "XRTransientInputHitTestSource": false, + "XRView": false, + "XRViewerPose": false, + "XRViewport": false, + "XRWebGLBinding": false, + "XRWebGLDepthInformation": false, + "XRWebGLLayer": false, + "XSLTProcessor": false + } + }, + "errors": [ + { + "messageId": "defaultMessage", + "data": { + "name": "foo" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-restricted-globals > invalid + +```js +self.foo() +``` + +```json +{ + "options": [ + { + "globals": [ + "foo" + ], + "checkGlobalObject": true + } + ], + "languageOptions": { + "globals": { + "AbortController": false, + "AbortSignal": false, + "AbsoluteOrientationSensor": false, + "AbstractRange": false, + "Accelerometer": false, + "addEventListener": false, + "ai": false, + "AI": false, + "AICreateMonitor": false, + "AITextSession": false, + "alert": false, + "AnalyserNode": false, + "Animation": false, + "AnimationEffect": false, + "AnimationEvent": false, + "AnimationPlaybackEvent": false, + "AnimationTimeline": false, + "AsyncDisposableStack": false, + "atob": false, + "Attr": false, + "Audio": false, + "AudioBuffer": false, + "AudioBufferSourceNode": false, + "AudioContext": false, + "AudioData": false, + "AudioDecoder": false, + "AudioDestinationNode": false, + "AudioEncoder": false, + "AudioListener": false, + "AudioNode": false, + "AudioParam": false, + "AudioParamMap": false, + "AudioProcessingEvent": false, + "AudioScheduledSourceNode": false, + "AudioSinkInfo": false, + "AudioWorklet": false, + "AudioWorkletGlobalScope": false, + "AudioWorkletNode": false, + "AudioWorkletProcessor": false, + "AuthenticatorAssertionResponse": false, + "AuthenticatorAttestationResponse": false, + "AuthenticatorResponse": false, + "BackgroundFetchManager": false, + "BackgroundFetchRecord": false, + "BackgroundFetchRegistration": false, + "BarcodeDetector": false, + "BarProp": false, + "BaseAudioContext": false, + "BatteryManager": false, + "BeforeUnloadEvent": false, + "BiquadFilterNode": false, + "Blob": false, + "BlobEvent": false, + "Bluetooth": false, + "BluetoothCharacteristicProperties": false, + "BluetoothDevice": false, + "BluetoothRemoteGATTCharacteristic": false, + "BluetoothRemoteGATTDescriptor": false, + "BluetoothRemoteGATTServer": false, + "BluetoothRemoteGATTService": false, + "BluetoothUUID": false, + "blur": false, + "BroadcastChannel": false, + "BrowserCaptureMediaStreamTrack": false, + "btoa": false, + "ByteLengthQueuingStrategy": false, + "Cache": false, + "caches": false, + "CacheStorage": false, + "cancelAnimationFrame": false, + "cancelIdleCallback": false, + "CanvasCaptureMediaStream": false, + "CanvasCaptureMediaStreamTrack": false, + "CanvasGradient": false, + "CanvasPattern": false, + "CanvasRenderingContext2D": false, + "CaptureController": false, + "CaretPosition": false, + "CDATASection": false, + "ChannelMergerNode": false, + "ChannelSplitterNode": false, + "ChapterInformation": false, + "CharacterBoundsUpdateEvent": false, + "CharacterData": false, + "clearInterval": false, + "clearTimeout": false, + "clientInformation": false, + "Clipboard": false, + "ClipboardChangeEvent": false, + "ClipboardEvent": false, + "ClipboardItem": false, + "close": false, + "closed": false, + "CloseEvent": false, + "CloseWatcher": false, + "CommandEvent": false, + "Comment": false, + "CompositionEvent": false, + "CompressionStream": false, + "confirm": false, + "console": false, + "ConstantSourceNode": false, + "ContentVisibilityAutoStateChangeEvent": false, + "ConvolverNode": false, + "CookieChangeEvent": false, + "CookieDeprecationLabel": false, + "cookieStore": false, + "CookieStore": false, + "CookieStoreManager": false, + "CountQueuingStrategy": false, + "createImageBitmap": false, + "CreateMonitor": false, + "Credential": false, + "credentialless": false, + "CredentialsContainer": false, + "CropTarget": false, + "crossOriginIsolated": false, + "crypto": false, + "Crypto": false, + "CryptoKey": false, + "CSPViolationReportBody": false, + "CSS": false, + "CSSAnimation": false, + "CSSConditionRule": false, + "CSSContainerRule": false, + "CSSCounterStyleRule": false, + "CSSFontFaceRule": false, + "CSSFontFeatureValuesRule": false, + "CSSFontPaletteValuesRule": false, + "CSSFunctionDeclarations": false, + "CSSFunctionDescriptors": false, + "CSSFunctionRule": false, + "CSSGroupingRule": false, + "CSSImageValue": false, + "CSSImportRule": false, + "CSSKeyframeRule": false, + "CSSKeyframesRule": false, + "CSSKeywordValue": false, + "CSSLayerBlockRule": false, + "CSSLayerStatementRule": false, + "CSSMarginRule": false, + "CSSMathClamp": false, + "CSSMathInvert": false, + "CSSMathMax": false, + "CSSMathMin": false, + "CSSMathNegate": false, + "CSSMathProduct": false, + "CSSMathSum": false, + "CSSMathValue": false, + "CSSMatrixComponent": false, + "CSSMediaRule": false, + "CSSNamespaceRule": false, + "CSSNestedDeclarations": false, + "CSSNumericArray": false, + "CSSNumericValue": false, + "CSSPageDescriptors": false, + "CSSPageRule": false, + "CSSPerspective": false, + "CSSPositionTryDescriptors": false, + "CSSPositionTryRule": false, + "CSSPositionValue": false, + "CSSPropertyRule": false, + "CSSRotate": false, + "CSSRule": false, + "CSSRuleList": false, + "CSSScale": false, + "CSSScopeRule": false, + "CSSSkew": false, + "CSSSkewX": false, + "CSSSkewY": false, + "CSSStartingStyleRule": false, + "CSSStyleDeclaration": false, + "CSSStyleRule": false, + "CSSStyleSheet": false, + "CSSStyleValue": false, + "CSSSupportsRule": false, + "CSSTransformComponent": false, + "CSSTransformValue": false, + "CSSTransition": false, + "CSSTranslate": false, + "CSSUnitValue": false, + "CSSUnparsedValue": false, + "CSSVariableReferenceValue": false, + "CSSViewTransitionRule": false, + "currentFrame": false, + "currentTime": false, + "CustomElementRegistry": false, + "customElements": false, + "CustomEvent": false, + "CustomStateSet": false, + "DataTransfer": false, + "DataTransferItem": false, + "DataTransferItemList": false, + "DecompressionStream": false, + "DelayNode": false, + "DelegatedInkTrailPresenter": false, + "DeviceMotionEvent": false, + "DeviceMotionEventAcceleration": false, + "DeviceMotionEventRotationRate": false, + "DeviceOrientationEvent": false, + "devicePixelRatio": false, + "DevicePosture": false, + "DigitalCredential": false, + "dispatchEvent": false, + "DisposableStack": false, + "document": false, + "Document": false, + "DocumentFragment": false, + "documentPictureInPicture": false, + "DocumentPictureInPicture": false, + "DocumentPictureInPictureEvent": false, + "DocumentTimeline": false, + "DocumentType": false, + "DOMError": false, + "DOMException": false, + "DOMImplementation": false, + "DOMMatrix": false, + "DOMMatrixReadOnly": false, + "DOMParser": false, + "DOMPoint": false, + "DOMPointReadOnly": false, + "DOMQuad": false, + "DOMRect": false, + "DOMRectList": false, + "DOMRectReadOnly": false, + "DOMStringList": false, + "DOMStringMap": false, + "DOMTokenList": false, + "DragEvent": false, + "DynamicsCompressorNode": false, + "EditContext": false, + "Element": false, + "ElementInternals": false, + "EncodedAudioChunk": false, + "EncodedVideoChunk": false, + "ErrorEvent": false, + "event": false, + "Event": false, + "EventCounts": false, + "EventSource": false, + "EventTarget": false, + "external": false, + "External": false, + "EyeDropper": false, + "FeaturePolicy": false, + "FederatedCredential": false, + "fence": false, + "Fence": false, + "FencedFrameConfig": false, + "fetch": false, + "fetchLater": false, + "FetchLaterResult": false, + "File": false, + "FileList": false, + "FileReader": false, + "FileSystem": false, + "FileSystemDirectoryEntry": false, + "FileSystemDirectoryHandle": false, + "FileSystemDirectoryReader": false, + "FileSystemEntry": false, + "FileSystemFileEntry": false, + "FileSystemFileHandle": false, + "FileSystemHandle": false, + "FileSystemObserver": false, + "FileSystemWritableFileStream": false, + "find": false, + "focus": false, + "FocusEvent": false, + "FontData": false, + "FontFace": false, + "FontFaceSet": false, + "FontFaceSetLoadEvent": false, + "FormData": false, + "FormDataEvent": false, + "FragmentDirective": false, + "frameElement": false, + "frames": false, + "GainNode": false, + "Gamepad": false, + "GamepadAxisMoveEvent": false, + "GamepadButton": false, + "GamepadButtonEvent": false, + "GamepadEvent": false, + "GamepadHapticActuator": false, + "GamepadPose": false, + "Geolocation": false, + "GeolocationCoordinates": false, + "GeolocationPosition": false, + "GeolocationPositionError": false, + "getComputedStyle": false, + "getScreenDetails": false, + "getSelection": false, + "GPU": false, + "GPUAdapter": false, + "GPUAdapterInfo": false, + "GPUBindGroup": false, + "GPUBindGroupLayout": false, + "GPUBuffer": false, + "GPUBufferUsage": false, + "GPUCanvasContext": false, + "GPUColorWrite": false, + "GPUCommandBuffer": false, + "GPUCommandEncoder": false, + "GPUCompilationInfo": false, + "GPUCompilationMessage": false, + "GPUComputePassEncoder": false, + "GPUComputePipeline": false, + "GPUDevice": false, + "GPUDeviceLostInfo": false, + "GPUError": false, + "GPUExternalTexture": false, + "GPUInternalError": false, + "GPUMapMode": false, + "GPUOutOfMemoryError": false, + "GPUPipelineError": false, + "GPUPipelineLayout": false, + "GPUQuerySet": false, + "GPUQueue": false, + "GPURenderBundle": false, + "GPURenderBundleEncoder": false, + "GPURenderPassEncoder": false, + "GPURenderPipeline": false, + "GPUSampler": false, + "GPUShaderModule": false, + "GPUShaderStage": false, + "GPUSupportedFeatures": false, + "GPUSupportedLimits": false, + "GPUTexture": false, + "GPUTextureUsage": false, + "GPUTextureView": false, + "GPUUncapturedErrorEvent": false, + "GPUValidationError": false, + "GravitySensor": false, + "Gyroscope": false, + "HashChangeEvent": false, + "Headers": false, + "HID": false, + "HIDConnectionEvent": false, + "HIDDevice": false, + "HIDInputReportEvent": false, + "Highlight": false, + "HighlightRegistry": false, + "history": false, + "History": false, + "HTMLAllCollection": false, + "HTMLAnchorElement": false, + "HTMLAreaElement": false, + "HTMLAudioElement": false, + "HTMLBaseElement": false, + "HTMLBodyElement": false, + "HTMLBRElement": false, + "HTMLButtonElement": false, + "HTMLCanvasElement": false, + "HTMLCollection": false, + "HTMLDataElement": false, + "HTMLDataListElement": false, + "HTMLDetailsElement": false, + "HTMLDialogElement": false, + "HTMLDirectoryElement": false, + "HTMLDivElement": false, + "HTMLDListElement": false, + "HTMLDocument": false, + "HTMLElement": false, + "HTMLEmbedElement": false, + "HTMLFencedFrameElement": false, + "HTMLFieldSetElement": false, + "HTMLFontElement": false, + "HTMLFormControlsCollection": false, + "HTMLFormElement": false, + "HTMLFrameElement": false, + "HTMLFrameSetElement": false, + "HTMLHeadElement": false, + "HTMLHeadingElement": false, + "HTMLHRElement": false, + "HTMLHtmlElement": false, + "HTMLIFrameElement": false, + "HTMLImageElement": false, + "HTMLInputElement": false, + "HTMLLabelElement": false, + "HTMLLegendElement": false, + "HTMLLIElement": false, + "HTMLLinkElement": false, + "HTMLMapElement": false, + "HTMLMarqueeElement": false, + "HTMLMediaElement": false, + "HTMLMenuElement": false, + "HTMLMetaElement": false, + "HTMLMeterElement": false, + "HTMLModElement": false, + "HTMLObjectElement": false, + "HTMLOListElement": false, + "HTMLOptGroupElement": false, + "HTMLOptionElement": false, + "HTMLOptionsCollection": false, + "HTMLOutputElement": false, + "HTMLParagraphElement": false, + "HTMLParamElement": false, + "HTMLPictureElement": false, + "HTMLPreElement": false, + "HTMLProgressElement": false, + "HTMLQuoteElement": false, + "HTMLScriptElement": false, + "HTMLSelectedContentElement": false, + "HTMLSelectElement": false, + "HTMLSlotElement": false, + "HTMLSourceElement": false, + "HTMLSpanElement": false, + "HTMLStyleElement": false, + "HTMLTableCaptionElement": false, + "HTMLTableCellElement": false, + "HTMLTableColElement": false, + "HTMLTableElement": false, + "HTMLTableRowElement": false, + "HTMLTableSectionElement": false, + "HTMLTemplateElement": false, + "HTMLTextAreaElement": false, + "HTMLTimeElement": false, + "HTMLTitleElement": false, + "HTMLTrackElement": false, + "HTMLUListElement": false, + "HTMLUnknownElement": false, + "HTMLVideoElement": false, + "IDBCursor": false, + "IDBCursorWithValue": false, + "IDBDatabase": false, + "IDBFactory": false, + "IDBIndex": false, + "IDBKeyRange": false, + "IDBObjectStore": false, + "IDBOpenDBRequest": false, + "IDBRecord": false, + "IDBRequest": false, + "IDBTransaction": false, + "IDBVersionChangeEvent": false, + "IdentityCredential": false, + "IdentityCredentialError": false, + "IdentityProvider": false, + "IdleDeadline": false, + "IdleDetector": false, + "IIRFilterNode": false, + "Image": false, + "ImageBitmap": false, + "ImageBitmapRenderingContext": false, + "ImageCapture": false, + "ImageData": false, + "ImageDecoder": false, + "ImageTrack": false, + "ImageTrackList": false, + "indexedDB": false, + "Ink": false, + "innerHeight": false, + "innerWidth": false, + "InputDeviceCapabilities": false, + "InputDeviceInfo": false, + "InputEvent": false, + "IntegrityViolationReportBody": false, + "InterestEvent": false, + "IntersectionObserver": false, + "IntersectionObserverEntry": false, + "isSecureContext": false, + "Keyboard": false, + "KeyboardEvent": false, + "KeyboardLayoutMap": false, + "KeyframeEffect": false, + "LanguageDetector": false, + "LargestContentfulPaint": false, + "LaunchParams": false, + "launchQueue": false, + "LaunchQueue": false, + "LayoutShift": false, + "LayoutShiftAttribution": false, + "length": false, + "LinearAccelerationSensor": false, + "localStorage": false, + "location": true, + "Location": false, + "locationbar": false, + "Lock": false, + "LockManager": false, + "matchMedia": false, + "MathMLElement": false, + "MediaCapabilities": false, + "MediaCapabilitiesInfo": false, + "MediaDeviceInfo": false, + "MediaDevices": false, + "MediaElementAudioSourceNode": false, + "MediaEncryptedEvent": false, + "MediaError": false, + "MediaKeyError": false, + "MediaKeyMessageEvent": false, + "MediaKeys": false, + "MediaKeySession": false, + "MediaKeyStatusMap": false, + "MediaKeySystemAccess": false, + "MediaList": false, + "MediaMetadata": false, + "MediaQueryList": false, + "MediaQueryListEvent": false, + "MediaRecorder": false, + "MediaRecorderErrorEvent": false, + "MediaSession": false, + "MediaSource": false, + "MediaSourceHandle": false, + "MediaStream": false, + "MediaStreamAudioDestinationNode": false, + "MediaStreamAudioSourceNode": false, + "MediaStreamEvent": false, + "MediaStreamTrack": false, + "MediaStreamTrackAudioSourceNode": false, + "MediaStreamTrackAudioStats": false, + "MediaStreamTrackEvent": false, + "MediaStreamTrackGenerator": false, + "MediaStreamTrackProcessor": false, + "MediaStreamTrackVideoStats": false, + "menubar": false, + "MessageChannel": false, + "MessageEvent": false, + "MessagePort": false, + "MIDIAccess": false, + "MIDIConnectionEvent": false, + "MIDIInput": false, + "MIDIInputMap": false, + "MIDIMessageEvent": false, + "MIDIOutput": false, + "MIDIOutputMap": false, + "MIDIPort": false, + "MimeType": false, + "MimeTypeArray": false, + "model": false, + "ModelGenericSession": false, + "ModelManager": false, + "MouseEvent": false, + "moveBy": false, + "moveTo": false, + "MutationEvent": false, + "MutationObserver": false, + "MutationRecord": false, + "name": false, + "NamedNodeMap": false, + "NavigateEvent": false, + "navigation": false, + "Navigation": false, + "NavigationActivation": false, + "NavigationCurrentEntryChangeEvent": false, + "NavigationDestination": false, + "NavigationHistoryEntry": false, + "NavigationPrecommitController": false, + "NavigationPreloadManager": false, + "NavigationTransition": false, + "navigator": false, + "Navigator": false, + "NavigatorLogin": false, + "NavigatorManagedData": false, + "NavigatorUAData": false, + "NetworkInformation": false, + "Node": false, + "NodeFilter": false, + "NodeIterator": false, + "NodeList": false, + "Notification": false, + "NotifyPaintEvent": false, + "NotRestoredReasonDetails": false, + "NotRestoredReasons": false, + "Observable": false, + "OfflineAudioCompletionEvent": false, + "OfflineAudioContext": false, + "offscreenBuffering": false, + "OffscreenCanvas": false, + "OffscreenCanvasRenderingContext2D": false, + "onabort": true, + "onafterprint": true, + "onanimationcancel": true, + "onanimationend": true, + "onanimationiteration": true, + "onanimationstart": true, + "onappinstalled": true, + "onauxclick": true, + "onbeforeinput": true, + "onbeforeinstallprompt": true, + "onbeforematch": true, + "onbeforeprint": true, + "onbeforetoggle": true, + "onbeforeunload": true, + "onbeforexrselect": true, + "onblur": true, + "oncancel": true, + "oncanplay": true, + "oncanplaythrough": true, + "onchange": true, + "onclick": true, + "onclose": true, + "oncommand": true, + "oncontentvisibilityautostatechange": true, + "oncontextlost": true, + "oncontextmenu": true, + "oncontextrestored": true, + "oncopy": true, + "oncuechange": true, + "oncut": true, + "ondblclick": true, + "ondevicemotion": true, + "ondeviceorientation": true, + "ondeviceorientationabsolute": true, + "ondrag": true, + "ondragend": true, + "ondragenter": true, + "ondragleave": true, + "ondragover": true, + "ondragstart": true, + "ondrop": true, + "ondurationchange": true, + "onemptied": true, + "onended": true, + "onerror": true, + "onfocus": true, + "onformdata": true, + "ongamepadconnected": true, + "ongamepaddisconnected": true, + "ongotpointercapture": true, + "onhashchange": true, + "oninput": true, + "oninvalid": true, + "onkeydown": true, + "onkeypress": true, + "onkeyup": true, + "onlanguagechange": true, + "onload": true, + "onloadeddata": true, + "onloadedmetadata": true, + "onloadstart": true, + "onlostpointercapture": true, + "onmessage": true, + "onmessageerror": true, + "onmousedown": true, + "onmouseenter": true, + "onmouseleave": true, + "onmousemove": true, + "onmouseout": true, + "onmouseover": true, + "onmouseup": true, + "onmousewheel": true, + "onoffline": true, + "ononline": true, + "onpagehide": true, + "onpagereveal": true, + "onpageshow": true, + "onpageswap": true, + "onpaste": true, + "onpause": true, + "onplay": true, + "onplaying": true, + "onpointercancel": true, + "onpointerdown": true, + "onpointerenter": true, + "onpointerleave": true, + "onpointermove": true, + "onpointerout": true, + "onpointerover": true, + "onpointerrawupdate": true, + "onpointerup": true, + "onpopstate": true, + "onprogress": true, + "onratechange": true, + "onrejectionhandled": true, + "onreset": true, + "onresize": true, + "onscroll": true, + "onscrollend": true, + "onscrollsnapchange": true, + "onscrollsnapchanging": true, + "onsearch": true, + "onsecuritypolicyviolation": true, + "onseeked": true, + "onseeking": true, + "onselect": true, + "onselectionchange": true, + "onselectstart": true, + "onslotchange": true, + "onstalled": true, + "onstorage": true, + "onsubmit": true, + "onsuspend": true, + "ontimeupdate": true, + "ontoggle": true, + "ontransitioncancel": true, + "ontransitionend": true, + "ontransitionrun": true, + "ontransitionstart": true, + "onunhandledrejection": true, + "onunload": true, + "onvolumechange": true, + "onwaiting": true, + "onwheel": true, + "open": false, + "opener": false, + "Option": false, + "OrientationSensor": false, + "origin": false, + "originAgentCluster": false, + "OscillatorNode": false, + "OTPCredential": false, + "outerHeight": false, + "outerWidth": false, + "OverconstrainedError": false, + "PageRevealEvent": false, + "PageSwapEvent": false, + "PageTransitionEvent": false, + "pageXOffset": false, + "pageYOffset": false, + "PannerNode": false, + "parent": false, + "PasswordCredential": false, + "Path2D": false, + "PaymentAddress": false, + "PaymentManager": false, + "PaymentMethodChangeEvent": false, + "PaymentRequest": false, + "PaymentRequestUpdateEvent": false, + "PaymentResponse": false, + "performance": false, + "Performance": false, + "PerformanceElementTiming": false, + "PerformanceEntry": false, + "PerformanceEventTiming": false, + "PerformanceLongAnimationFrameTiming": false, + "PerformanceLongTaskTiming": false, + "PerformanceMark": false, + "PerformanceMeasure": false, + "PerformanceNavigation": false, + "PerformanceNavigationTiming": false, + "PerformanceObserver": false, + "PerformanceObserverEntryList": false, + "PerformancePaintTiming": false, + "PerformanceResourceTiming": false, + "PerformanceScriptTiming": false, + "PerformanceServerTiming": false, + "PerformanceTiming": false, + "PeriodicSyncManager": false, + "PeriodicWave": false, + "Permissions": false, + "PermissionStatus": false, + "PERSISTENT": false, + "personalbar": false, + "PictureInPictureEvent": false, + "PictureInPictureWindow": false, + "Plugin": false, + "PluginArray": false, + "PointerEvent": false, + "PopStateEvent": false, + "postMessage": false, + "Presentation": false, + "PresentationAvailability": false, + "PresentationConnection": false, + "PresentationConnectionAvailableEvent": false, + "PresentationConnectionCloseEvent": false, + "PresentationConnectionList": false, + "PresentationReceiver": false, + "PresentationRequest": false, + "PressureObserver": false, + "PressureRecord": false, + "print": false, + "ProcessingInstruction": false, + "Profiler": false, + "ProgressEvent": false, + "PromiseRejectionEvent": false, + "prompt": false, + "ProtectedAudience": false, + "PublicKeyCredential": false, + "PushManager": false, + "PushSubscription": false, + "PushSubscriptionOptions": false, + "queryLocalFonts": false, + "queueMicrotask": false, + "QuotaExceededError": false, + "RadioNodeList": false, + "Range": false, + "ReadableByteStreamController": false, + "ReadableStream": false, + "ReadableStreamBYOBReader": false, + "ReadableStreamBYOBRequest": false, + "ReadableStreamDefaultController": false, + "ReadableStreamDefaultReader": false, + "registerProcessor": false, + "RelativeOrientationSensor": false, + "RemotePlayback": false, + "removeEventListener": false, + "ReportBody": false, + "reportError": false, + "ReportingObserver": false, + "Request": false, + "requestAnimationFrame": false, + "requestIdleCallback": false, + "resizeBy": false, + "ResizeObserver": false, + "ResizeObserverEntry": false, + "ResizeObserverSize": false, + "resizeTo": false, + "Response": false, + "RestrictionTarget": false, + "RTCCertificate": false, + "RTCDataChannel": false, + "RTCDataChannelEvent": false, + "RTCDtlsTransport": false, + "RTCDTMFSender": false, + "RTCDTMFToneChangeEvent": false, + "RTCEncodedAudioFrame": false, + "RTCEncodedVideoFrame": false, + "RTCError": false, + "RTCErrorEvent": false, + "RTCIceCandidate": false, + "RTCIceTransport": false, + "RTCPeerConnection": false, + "RTCPeerConnectionIceErrorEvent": false, + "RTCPeerConnectionIceEvent": false, + "RTCRtpReceiver": false, + "RTCRtpScriptTransform": false, + "RTCRtpSender": false, + "RTCRtpTransceiver": false, + "RTCSctpTransport": false, + "RTCSessionDescription": false, + "RTCStatsReport": false, + "RTCTrackEvent": false, + "sampleRate": false, + "scheduler": false, + "Scheduler": false, + "Scheduling": false, + "screen": false, + "Screen": false, + "ScreenDetailed": false, + "ScreenDetails": false, + "screenLeft": false, + "ScreenOrientation": false, + "screenTop": false, + "screenX": false, + "screenY": false, + "ScriptProcessorNode": false, + "scroll": false, + "scrollbars": false, + "scrollBy": false, + "ScrollTimeline": false, + "scrollTo": false, + "scrollX": false, + "scrollY": false, + "SecurityPolicyViolationEvent": false, + "Selection": false, + "self": false, + "Sensor": false, + "SensorErrorEvent": false, + "Serial": false, + "SerialPort": false, + "ServiceWorker": false, + "ServiceWorkerContainer": false, + "ServiceWorkerRegistration": false, + "sessionStorage": false, + "setInterval": false, + "setTimeout": false, + "ShadowRoot": false, + "sharedStorage": false, + "SharedStorage": false, + "SharedStorageAppendMethod": false, + "SharedStorageClearMethod": false, + "SharedStorageDeleteMethod": false, + "SharedStorageModifierMethod": false, + "SharedStorageSetMethod": false, + "SharedStorageWorklet": false, + "SharedWorker": false, + "showDirectoryPicker": false, + "showOpenFilePicker": false, + "showSaveFilePicker": false, + "SnapEvent": false, + "SourceBuffer": false, + "SourceBufferList": false, + "SpeechGrammar": false, + "SpeechGrammarList": false, + "SpeechRecognition": false, + "SpeechRecognitionErrorEvent": false, + "SpeechRecognitionEvent": false, + "SpeechRecognitionPhrase": false, + "speechSynthesis": false, + "SpeechSynthesis": false, + "SpeechSynthesisErrorEvent": false, + "SpeechSynthesisEvent": false, + "SpeechSynthesisUtterance": false, + "SpeechSynthesisVoice": false, + "StaticRange": false, + "status": false, + "statusbar": false, + "StereoPannerNode": false, + "stop": false, + "Storage": false, + "StorageBucket": false, + "StorageBucketManager": false, + "StorageEvent": false, + "StorageManager": false, + "structuredClone": false, + "styleMedia": false, + "StylePropertyMap": false, + "StylePropertyMapReadOnly": false, + "StyleSheet": false, + "StyleSheetList": false, + "SubmitEvent": false, + "Subscriber": false, + "SubtleCrypto": false, + "Summarizer": false, + "SuppressedError": false, + "SVGAElement": false, + "SVGAngle": false, + "SVGAnimatedAngle": false, + "SVGAnimatedBoolean": false, + "SVGAnimatedEnumeration": false, + "SVGAnimatedInteger": false, + "SVGAnimatedLength": false, + "SVGAnimatedLengthList": false, + "SVGAnimatedNumber": false, + "SVGAnimatedNumberList": false, + "SVGAnimatedPreserveAspectRatio": false, + "SVGAnimatedRect": false, + "SVGAnimatedString": false, + "SVGAnimatedTransformList": false, + "SVGAnimateElement": false, + "SVGAnimateMotionElement": false, + "SVGAnimateTransformElement": false, + "SVGAnimationElement": false, + "SVGCircleElement": false, + "SVGClipPathElement": false, + "SVGComponentTransferFunctionElement": false, + "SVGDefsElement": false, + "SVGDescElement": false, + "SVGElement": false, + "SVGEllipseElement": false, + "SVGFEBlendElement": false, + "SVGFEColorMatrixElement": false, + "SVGFEComponentTransferElement": false, + "SVGFECompositeElement": false, + "SVGFEConvolveMatrixElement": false, + "SVGFEDiffuseLightingElement": false, + "SVGFEDisplacementMapElement": false, + "SVGFEDistantLightElement": false, + "SVGFEDropShadowElement": false, + "SVGFEFloodElement": false, + "SVGFEFuncAElement": false, + "SVGFEFuncBElement": false, + "SVGFEFuncGElement": false, + "SVGFEFuncRElement": false, + "SVGFEGaussianBlurElement": false, + "SVGFEImageElement": false, + "SVGFEMergeElement": false, + "SVGFEMergeNodeElement": false, + "SVGFEMorphologyElement": false, + "SVGFEOffsetElement": false, + "SVGFEPointLightElement": false, + "SVGFESpecularLightingElement": false, + "SVGFESpotLightElement": false, + "SVGFETileElement": false, + "SVGFETurbulenceElement": false, + "SVGFilterElement": false, + "SVGForeignObjectElement": false, + "SVGGElement": false, + "SVGGeometryElement": false, + "SVGGradientElement": false, + "SVGGraphicsElement": false, + "SVGImageElement": false, + "SVGLength": false, + "SVGLengthList": false, + "SVGLinearGradientElement": false, + "SVGLineElement": false, + "SVGMarkerElement": false, + "SVGMaskElement": false, + "SVGMatrix": false, + "SVGMetadataElement": false, + "SVGMPathElement": false, + "SVGNumber": false, + "SVGNumberList": false, + "SVGPathElement": false, + "SVGPatternElement": false, + "SVGPoint": false, + "SVGPointList": false, + "SVGPolygonElement": false, + "SVGPolylineElement": false, + "SVGPreserveAspectRatio": false, + "SVGRadialGradientElement": false, + "SVGRect": false, + "SVGRectElement": false, + "SVGScriptElement": false, + "SVGSetElement": false, + "SVGStopElement": false, + "SVGStringList": false, + "SVGStyleElement": false, + "SVGSVGElement": false, + "SVGSwitchElement": false, + "SVGSymbolElement": false, + "SVGTextContentElement": false, + "SVGTextElement": false, + "SVGTextPathElement": false, + "SVGTextPositioningElement": false, + "SVGTitleElement": false, + "SVGTransform": false, + "SVGTransformList": false, + "SVGTSpanElement": false, + "SVGUnitTypes": false, + "SVGUseElement": false, + "SVGViewElement": false, + "SyncManager": false, + "TaskAttributionTiming": false, + "TaskController": false, + "TaskPriorityChangeEvent": false, + "TaskSignal": false, + "TEMPORARY": false, + "Text": false, + "TextDecoder": false, + "TextDecoderStream": false, + "TextEncoder": false, + "TextEncoderStream": false, + "TextEvent": false, + "TextFormat": false, + "TextFormatUpdateEvent": false, + "TextMetrics": false, + "TextTrack": false, + "TextTrackCue": false, + "TextTrackCueList": false, + "TextTrackList": false, + "TextUpdateEvent": false, + "TimeEvent": false, + "TimeRanges": false, + "ToggleEvent": false, + "toolbar": false, + "top": false, + "Touch": false, + "TouchEvent": false, + "TouchList": false, + "TrackEvent": false, + "TransformStream": false, + "TransformStreamDefaultController": false, + "TransitionEvent": false, + "Translator": false, + "TreeWalker": false, + "TrustedHTML": false, + "TrustedScript": false, + "TrustedScriptURL": false, + "TrustedTypePolicy": false, + "TrustedTypePolicyFactory": false, + "trustedTypes": false, + "UIEvent": false, + "URL": false, + "URLPattern": false, + "URLSearchParams": false, + "USB": false, + "USBAlternateInterface": false, + "USBConfiguration": false, + "USBConnectionEvent": false, + "USBDevice": false, + "USBEndpoint": false, + "USBInterface": false, + "USBInTransferResult": false, + "USBIsochronousInTransferPacket": false, + "USBIsochronousInTransferResult": false, + "USBIsochronousOutTransferPacket": false, + "USBIsochronousOutTransferResult": false, + "USBOutTransferResult": false, + "UserActivation": false, + "ValidityState": false, + "VideoColorSpace": false, + "VideoDecoder": false, + "VideoEncoder": false, + "VideoFrame": false, + "VideoPlaybackQuality": false, + "viewport": false, + "Viewport": false, + "ViewTimeline": false, + "ViewTransition": false, + "ViewTransitionTypeSet": false, + "VirtualKeyboard": false, + "VirtualKeyboardGeometryChangeEvent": false, + "VisibilityStateEntry": false, + "visualViewport": false, + "VisualViewport": false, + "VTTCue": false, + "VTTRegion": false, + "WakeLock": false, + "WakeLockSentinel": false, + "WaveShaperNode": false, + "WebAssembly": false, + "WebGL2RenderingContext": false, + "WebGLActiveInfo": false, + "WebGLBuffer": false, + "WebGLContextEvent": false, + "WebGLFramebuffer": false, + "WebGLObject": false, + "WebGLProgram": false, + "WebGLQuery": false, + "WebGLRenderbuffer": false, + "WebGLRenderingContext": false, + "WebGLSampler": false, + "WebGLShader": false, + "WebGLShaderPrecisionFormat": false, + "WebGLSync": false, + "WebGLTexture": false, + "WebGLTransformFeedback": false, + "WebGLUniformLocation": false, + "WebGLVertexArrayObject": false, + "WebSocket": false, + "WebSocketError": false, + "WebSocketStream": false, + "WebTransport": false, + "WebTransportBidirectionalStream": false, + "WebTransportDatagramDuplexStream": false, + "WebTransportError": false, + "WebTransportReceiveStream": false, + "WebTransportSendStream": false, + "WGSLLanguageFeatures": false, + "WheelEvent": false, + "when": false, + "window": false, + "Window": false, + "WindowControlsOverlay": false, + "WindowControlsOverlayGeometryChangeEvent": false, + "Worker": false, + "Worklet": false, + "WorkletGlobalScope": false, + "WritableStream": false, + "WritableStreamDefaultController": false, + "WritableStreamDefaultWriter": false, + "XMLDocument": false, + "XMLHttpRequest": false, + "XMLHttpRequestEventTarget": false, + "XMLHttpRequestUpload": false, + "XMLSerializer": false, + "XPathEvaluator": false, + "XPathExpression": false, + "XPathResult": false, + "XRAnchor": false, + "XRAnchorSet": false, + "XRBoundedReferenceSpace": false, + "XRCamera": false, + "XRCPUDepthInformation": false, + "XRDepthInformation": false, + "XRDOMOverlayState": false, + "XRFrame": false, + "XRHand": false, + "XRHitTestResult": false, + "XRHitTestSource": false, + "XRInputSource": false, + "XRInputSourceArray": false, + "XRInputSourceEvent": false, + "XRInputSourcesChangeEvent": false, + "XRJointPose": false, + "XRJointSpace": false, + "XRLayer": false, + "XRLightEstimate": false, + "XRLightProbe": false, + "XRPose": false, + "XRRay": false, + "XRReferenceSpace": false, + "XRReferenceSpaceEvent": false, + "XRRenderState": false, + "XRRigidTransform": false, + "XRSession": false, + "XRSessionEvent": false, + "XRSpace": false, + "XRSystem": false, + "XRTransientInputHitTestResult": false, + "XRTransientInputHitTestSource": false, + "XRView": false, + "XRViewerPose": false, + "XRViewport": false, + "XRWebGLBinding": false, + "XRWebGLDepthInformation": false, + "XRWebGLLayer": false, + "XSLTProcessor": false + } + }, + "errors": [ + { + "messageId": "defaultMessage", + "data": { + "name": "foo" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-restricted-globals > invalid + +```js +window.window.foo() +``` + +```json +{ + "options": [ + { + "globals": [ + "foo" + ], + "checkGlobalObject": true + } + ], + "languageOptions": { + "globals": { + "AbortController": false, + "AbortSignal": false, + "AbsoluteOrientationSensor": false, + "AbstractRange": false, + "Accelerometer": false, + "addEventListener": false, + "ai": false, + "AI": false, + "AICreateMonitor": false, + "AITextSession": false, + "alert": false, + "AnalyserNode": false, + "Animation": false, + "AnimationEffect": false, + "AnimationEvent": false, + "AnimationPlaybackEvent": false, + "AnimationTimeline": false, + "AsyncDisposableStack": false, + "atob": false, + "Attr": false, + "Audio": false, + "AudioBuffer": false, + "AudioBufferSourceNode": false, + "AudioContext": false, + "AudioData": false, + "AudioDecoder": false, + "AudioDestinationNode": false, + "AudioEncoder": false, + "AudioListener": false, + "AudioNode": false, + "AudioParam": false, + "AudioParamMap": false, + "AudioProcessingEvent": false, + "AudioScheduledSourceNode": false, + "AudioSinkInfo": false, + "AudioWorklet": false, + "AudioWorkletGlobalScope": false, + "AudioWorkletNode": false, + "AudioWorkletProcessor": false, + "AuthenticatorAssertionResponse": false, + "AuthenticatorAttestationResponse": false, + "AuthenticatorResponse": false, + "BackgroundFetchManager": false, + "BackgroundFetchRecord": false, + "BackgroundFetchRegistration": false, + "BarcodeDetector": false, + "BarProp": false, + "BaseAudioContext": false, + "BatteryManager": false, + "BeforeUnloadEvent": false, + "BiquadFilterNode": false, + "Blob": false, + "BlobEvent": false, + "Bluetooth": false, + "BluetoothCharacteristicProperties": false, + "BluetoothDevice": false, + "BluetoothRemoteGATTCharacteristic": false, + "BluetoothRemoteGATTDescriptor": false, + "BluetoothRemoteGATTServer": false, + "BluetoothRemoteGATTService": false, + "BluetoothUUID": false, + "blur": false, + "BroadcastChannel": false, + "BrowserCaptureMediaStreamTrack": false, + "btoa": false, + "ByteLengthQueuingStrategy": false, + "Cache": false, + "caches": false, + "CacheStorage": false, + "cancelAnimationFrame": false, + "cancelIdleCallback": false, + "CanvasCaptureMediaStream": false, + "CanvasCaptureMediaStreamTrack": false, + "CanvasGradient": false, + "CanvasPattern": false, + "CanvasRenderingContext2D": false, + "CaptureController": false, + "CaretPosition": false, + "CDATASection": false, + "ChannelMergerNode": false, + "ChannelSplitterNode": false, + "ChapterInformation": false, + "CharacterBoundsUpdateEvent": false, + "CharacterData": false, + "clearInterval": false, + "clearTimeout": false, + "clientInformation": false, + "Clipboard": false, + "ClipboardChangeEvent": false, + "ClipboardEvent": false, + "ClipboardItem": false, + "close": false, + "closed": false, + "CloseEvent": false, + "CloseWatcher": false, + "CommandEvent": false, + "Comment": false, + "CompositionEvent": false, + "CompressionStream": false, + "confirm": false, + "console": false, + "ConstantSourceNode": false, + "ContentVisibilityAutoStateChangeEvent": false, + "ConvolverNode": false, + "CookieChangeEvent": false, + "CookieDeprecationLabel": false, + "cookieStore": false, + "CookieStore": false, + "CookieStoreManager": false, + "CountQueuingStrategy": false, + "createImageBitmap": false, + "CreateMonitor": false, + "Credential": false, + "credentialless": false, + "CredentialsContainer": false, + "CropTarget": false, + "crossOriginIsolated": false, + "crypto": false, + "Crypto": false, + "CryptoKey": false, + "CSPViolationReportBody": false, + "CSS": false, + "CSSAnimation": false, + "CSSConditionRule": false, + "CSSContainerRule": false, + "CSSCounterStyleRule": false, + "CSSFontFaceRule": false, + "CSSFontFeatureValuesRule": false, + "CSSFontPaletteValuesRule": false, + "CSSFunctionDeclarations": false, + "CSSFunctionDescriptors": false, + "CSSFunctionRule": false, + "CSSGroupingRule": false, + "CSSImageValue": false, + "CSSImportRule": false, + "CSSKeyframeRule": false, + "CSSKeyframesRule": false, + "CSSKeywordValue": false, + "CSSLayerBlockRule": false, + "CSSLayerStatementRule": false, + "CSSMarginRule": false, + "CSSMathClamp": false, + "CSSMathInvert": false, + "CSSMathMax": false, + "CSSMathMin": false, + "CSSMathNegate": false, + "CSSMathProduct": false, + "CSSMathSum": false, + "CSSMathValue": false, + "CSSMatrixComponent": false, + "CSSMediaRule": false, + "CSSNamespaceRule": false, + "CSSNestedDeclarations": false, + "CSSNumericArray": false, + "CSSNumericValue": false, + "CSSPageDescriptors": false, + "CSSPageRule": false, + "CSSPerspective": false, + "CSSPositionTryDescriptors": false, + "CSSPositionTryRule": false, + "CSSPositionValue": false, + "CSSPropertyRule": false, + "CSSRotate": false, + "CSSRule": false, + "CSSRuleList": false, + "CSSScale": false, + "CSSScopeRule": false, + "CSSSkew": false, + "CSSSkewX": false, + "CSSSkewY": false, + "CSSStartingStyleRule": false, + "CSSStyleDeclaration": false, + "CSSStyleRule": false, + "CSSStyleSheet": false, + "CSSStyleValue": false, + "CSSSupportsRule": false, + "CSSTransformComponent": false, + "CSSTransformValue": false, + "CSSTransition": false, + "CSSTranslate": false, + "CSSUnitValue": false, + "CSSUnparsedValue": false, + "CSSVariableReferenceValue": false, + "CSSViewTransitionRule": false, + "currentFrame": false, + "currentTime": false, + "CustomElementRegistry": false, + "customElements": false, + "CustomEvent": false, + "CustomStateSet": false, + "DataTransfer": false, + "DataTransferItem": false, + "DataTransferItemList": false, + "DecompressionStream": false, + "DelayNode": false, + "DelegatedInkTrailPresenter": false, + "DeviceMotionEvent": false, + "DeviceMotionEventAcceleration": false, + "DeviceMotionEventRotationRate": false, + "DeviceOrientationEvent": false, + "devicePixelRatio": false, + "DevicePosture": false, + "DigitalCredential": false, + "dispatchEvent": false, + "DisposableStack": false, + "document": false, + "Document": false, + "DocumentFragment": false, + "documentPictureInPicture": false, + "DocumentPictureInPicture": false, + "DocumentPictureInPictureEvent": false, + "DocumentTimeline": false, + "DocumentType": false, + "DOMError": false, + "DOMException": false, + "DOMImplementation": false, + "DOMMatrix": false, + "DOMMatrixReadOnly": false, + "DOMParser": false, + "DOMPoint": false, + "DOMPointReadOnly": false, + "DOMQuad": false, + "DOMRect": false, + "DOMRectList": false, + "DOMRectReadOnly": false, + "DOMStringList": false, + "DOMStringMap": false, + "DOMTokenList": false, + "DragEvent": false, + "DynamicsCompressorNode": false, + "EditContext": false, + "Element": false, + "ElementInternals": false, + "EncodedAudioChunk": false, + "EncodedVideoChunk": false, + "ErrorEvent": false, + "event": false, + "Event": false, + "EventCounts": false, + "EventSource": false, + "EventTarget": false, + "external": false, + "External": false, + "EyeDropper": false, + "FeaturePolicy": false, + "FederatedCredential": false, + "fence": false, + "Fence": false, + "FencedFrameConfig": false, + "fetch": false, + "fetchLater": false, + "FetchLaterResult": false, + "File": false, + "FileList": false, + "FileReader": false, + "FileSystem": false, + "FileSystemDirectoryEntry": false, + "FileSystemDirectoryHandle": false, + "FileSystemDirectoryReader": false, + "FileSystemEntry": false, + "FileSystemFileEntry": false, + "FileSystemFileHandle": false, + "FileSystemHandle": false, + "FileSystemObserver": false, + "FileSystemWritableFileStream": false, + "find": false, + "focus": false, + "FocusEvent": false, + "FontData": false, + "FontFace": false, + "FontFaceSet": false, + "FontFaceSetLoadEvent": false, + "FormData": false, + "FormDataEvent": false, + "FragmentDirective": false, + "frameElement": false, + "frames": false, + "GainNode": false, + "Gamepad": false, + "GamepadAxisMoveEvent": false, + "GamepadButton": false, + "GamepadButtonEvent": false, + "GamepadEvent": false, + "GamepadHapticActuator": false, + "GamepadPose": false, + "Geolocation": false, + "GeolocationCoordinates": false, + "GeolocationPosition": false, + "GeolocationPositionError": false, + "getComputedStyle": false, + "getScreenDetails": false, + "getSelection": false, + "GPU": false, + "GPUAdapter": false, + "GPUAdapterInfo": false, + "GPUBindGroup": false, + "GPUBindGroupLayout": false, + "GPUBuffer": false, + "GPUBufferUsage": false, + "GPUCanvasContext": false, + "GPUColorWrite": false, + "GPUCommandBuffer": false, + "GPUCommandEncoder": false, + "GPUCompilationInfo": false, + "GPUCompilationMessage": false, + "GPUComputePassEncoder": false, + "GPUComputePipeline": false, + "GPUDevice": false, + "GPUDeviceLostInfo": false, + "GPUError": false, + "GPUExternalTexture": false, + "GPUInternalError": false, + "GPUMapMode": false, + "GPUOutOfMemoryError": false, + "GPUPipelineError": false, + "GPUPipelineLayout": false, + "GPUQuerySet": false, + "GPUQueue": false, + "GPURenderBundle": false, + "GPURenderBundleEncoder": false, + "GPURenderPassEncoder": false, + "GPURenderPipeline": false, + "GPUSampler": false, + "GPUShaderModule": false, + "GPUShaderStage": false, + "GPUSupportedFeatures": false, + "GPUSupportedLimits": false, + "GPUTexture": false, + "GPUTextureUsage": false, + "GPUTextureView": false, + "GPUUncapturedErrorEvent": false, + "GPUValidationError": false, + "GravitySensor": false, + "Gyroscope": false, + "HashChangeEvent": false, + "Headers": false, + "HID": false, + "HIDConnectionEvent": false, + "HIDDevice": false, + "HIDInputReportEvent": false, + "Highlight": false, + "HighlightRegistry": false, + "history": false, + "History": false, + "HTMLAllCollection": false, + "HTMLAnchorElement": false, + "HTMLAreaElement": false, + "HTMLAudioElement": false, + "HTMLBaseElement": false, + "HTMLBodyElement": false, + "HTMLBRElement": false, + "HTMLButtonElement": false, + "HTMLCanvasElement": false, + "HTMLCollection": false, + "HTMLDataElement": false, + "HTMLDataListElement": false, + "HTMLDetailsElement": false, + "HTMLDialogElement": false, + "HTMLDirectoryElement": false, + "HTMLDivElement": false, + "HTMLDListElement": false, + "HTMLDocument": false, + "HTMLElement": false, + "HTMLEmbedElement": false, + "HTMLFencedFrameElement": false, + "HTMLFieldSetElement": false, + "HTMLFontElement": false, + "HTMLFormControlsCollection": false, + "HTMLFormElement": false, + "HTMLFrameElement": false, + "HTMLFrameSetElement": false, + "HTMLHeadElement": false, + "HTMLHeadingElement": false, + "HTMLHRElement": false, + "HTMLHtmlElement": false, + "HTMLIFrameElement": false, + "HTMLImageElement": false, + "HTMLInputElement": false, + "HTMLLabelElement": false, + "HTMLLegendElement": false, + "HTMLLIElement": false, + "HTMLLinkElement": false, + "HTMLMapElement": false, + "HTMLMarqueeElement": false, + "HTMLMediaElement": false, + "HTMLMenuElement": false, + "HTMLMetaElement": false, + "HTMLMeterElement": false, + "HTMLModElement": false, + "HTMLObjectElement": false, + "HTMLOListElement": false, + "HTMLOptGroupElement": false, + "HTMLOptionElement": false, + "HTMLOptionsCollection": false, + "HTMLOutputElement": false, + "HTMLParagraphElement": false, + "HTMLParamElement": false, + "HTMLPictureElement": false, + "HTMLPreElement": false, + "HTMLProgressElement": false, + "HTMLQuoteElement": false, + "HTMLScriptElement": false, + "HTMLSelectedContentElement": false, + "HTMLSelectElement": false, + "HTMLSlotElement": false, + "HTMLSourceElement": false, + "HTMLSpanElement": false, + "HTMLStyleElement": false, + "HTMLTableCaptionElement": false, + "HTMLTableCellElement": false, + "HTMLTableColElement": false, + "HTMLTableElement": false, + "HTMLTableRowElement": false, + "HTMLTableSectionElement": false, + "HTMLTemplateElement": false, + "HTMLTextAreaElement": false, + "HTMLTimeElement": false, + "HTMLTitleElement": false, + "HTMLTrackElement": false, + "HTMLUListElement": false, + "HTMLUnknownElement": false, + "HTMLVideoElement": false, + "IDBCursor": false, + "IDBCursorWithValue": false, + "IDBDatabase": false, + "IDBFactory": false, + "IDBIndex": false, + "IDBKeyRange": false, + "IDBObjectStore": false, + "IDBOpenDBRequest": false, + "IDBRecord": false, + "IDBRequest": false, + "IDBTransaction": false, + "IDBVersionChangeEvent": false, + "IdentityCredential": false, + "IdentityCredentialError": false, + "IdentityProvider": false, + "IdleDeadline": false, + "IdleDetector": false, + "IIRFilterNode": false, + "Image": false, + "ImageBitmap": false, + "ImageBitmapRenderingContext": false, + "ImageCapture": false, + "ImageData": false, + "ImageDecoder": false, + "ImageTrack": false, + "ImageTrackList": false, + "indexedDB": false, + "Ink": false, + "innerHeight": false, + "innerWidth": false, + "InputDeviceCapabilities": false, + "InputDeviceInfo": false, + "InputEvent": false, + "IntegrityViolationReportBody": false, + "InterestEvent": false, + "IntersectionObserver": false, + "IntersectionObserverEntry": false, + "isSecureContext": false, + "Keyboard": false, + "KeyboardEvent": false, + "KeyboardLayoutMap": false, + "KeyframeEffect": false, + "LanguageDetector": false, + "LargestContentfulPaint": false, + "LaunchParams": false, + "launchQueue": false, + "LaunchQueue": false, + "LayoutShift": false, + "LayoutShiftAttribution": false, + "length": false, + "LinearAccelerationSensor": false, + "localStorage": false, + "location": true, + "Location": false, + "locationbar": false, + "Lock": false, + "LockManager": false, + "matchMedia": false, + "MathMLElement": false, + "MediaCapabilities": false, + "MediaCapabilitiesInfo": false, + "MediaDeviceInfo": false, + "MediaDevices": false, + "MediaElementAudioSourceNode": false, + "MediaEncryptedEvent": false, + "MediaError": false, + "MediaKeyError": false, + "MediaKeyMessageEvent": false, + "MediaKeys": false, + "MediaKeySession": false, + "MediaKeyStatusMap": false, + "MediaKeySystemAccess": false, + "MediaList": false, + "MediaMetadata": false, + "MediaQueryList": false, + "MediaQueryListEvent": false, + "MediaRecorder": false, + "MediaRecorderErrorEvent": false, + "MediaSession": false, + "MediaSource": false, + "MediaSourceHandle": false, + "MediaStream": false, + "MediaStreamAudioDestinationNode": false, + "MediaStreamAudioSourceNode": false, + "MediaStreamEvent": false, + "MediaStreamTrack": false, + "MediaStreamTrackAudioSourceNode": false, + "MediaStreamTrackAudioStats": false, + "MediaStreamTrackEvent": false, + "MediaStreamTrackGenerator": false, + "MediaStreamTrackProcessor": false, + "MediaStreamTrackVideoStats": false, + "menubar": false, + "MessageChannel": false, + "MessageEvent": false, + "MessagePort": false, + "MIDIAccess": false, + "MIDIConnectionEvent": false, + "MIDIInput": false, + "MIDIInputMap": false, + "MIDIMessageEvent": false, + "MIDIOutput": false, + "MIDIOutputMap": false, + "MIDIPort": false, + "MimeType": false, + "MimeTypeArray": false, + "model": false, + "ModelGenericSession": false, + "ModelManager": false, + "MouseEvent": false, + "moveBy": false, + "moveTo": false, + "MutationEvent": false, + "MutationObserver": false, + "MutationRecord": false, + "name": false, + "NamedNodeMap": false, + "NavigateEvent": false, + "navigation": false, + "Navigation": false, + "NavigationActivation": false, + "NavigationCurrentEntryChangeEvent": false, + "NavigationDestination": false, + "NavigationHistoryEntry": false, + "NavigationPrecommitController": false, + "NavigationPreloadManager": false, + "NavigationTransition": false, + "navigator": false, + "Navigator": false, + "NavigatorLogin": false, + "NavigatorManagedData": false, + "NavigatorUAData": false, + "NetworkInformation": false, + "Node": false, + "NodeFilter": false, + "NodeIterator": false, + "NodeList": false, + "Notification": false, + "NotifyPaintEvent": false, + "NotRestoredReasonDetails": false, + "NotRestoredReasons": false, + "Observable": false, + "OfflineAudioCompletionEvent": false, + "OfflineAudioContext": false, + "offscreenBuffering": false, + "OffscreenCanvas": false, + "OffscreenCanvasRenderingContext2D": false, + "onabort": true, + "onafterprint": true, + "onanimationcancel": true, + "onanimationend": true, + "onanimationiteration": true, + "onanimationstart": true, + "onappinstalled": true, + "onauxclick": true, + "onbeforeinput": true, + "onbeforeinstallprompt": true, + "onbeforematch": true, + "onbeforeprint": true, + "onbeforetoggle": true, + "onbeforeunload": true, + "onbeforexrselect": true, + "onblur": true, + "oncancel": true, + "oncanplay": true, + "oncanplaythrough": true, + "onchange": true, + "onclick": true, + "onclose": true, + "oncommand": true, + "oncontentvisibilityautostatechange": true, + "oncontextlost": true, + "oncontextmenu": true, + "oncontextrestored": true, + "oncopy": true, + "oncuechange": true, + "oncut": true, + "ondblclick": true, + "ondevicemotion": true, + "ondeviceorientation": true, + "ondeviceorientationabsolute": true, + "ondrag": true, + "ondragend": true, + "ondragenter": true, + "ondragleave": true, + "ondragover": true, + "ondragstart": true, + "ondrop": true, + "ondurationchange": true, + "onemptied": true, + "onended": true, + "onerror": true, + "onfocus": true, + "onformdata": true, + "ongamepadconnected": true, + "ongamepaddisconnected": true, + "ongotpointercapture": true, + "onhashchange": true, + "oninput": true, + "oninvalid": true, + "onkeydown": true, + "onkeypress": true, + "onkeyup": true, + "onlanguagechange": true, + "onload": true, + "onloadeddata": true, + "onloadedmetadata": true, + "onloadstart": true, + "onlostpointercapture": true, + "onmessage": true, + "onmessageerror": true, + "onmousedown": true, + "onmouseenter": true, + "onmouseleave": true, + "onmousemove": true, + "onmouseout": true, + "onmouseover": true, + "onmouseup": true, + "onmousewheel": true, + "onoffline": true, + "ononline": true, + "onpagehide": true, + "onpagereveal": true, + "onpageshow": true, + "onpageswap": true, + "onpaste": true, + "onpause": true, + "onplay": true, + "onplaying": true, + "onpointercancel": true, + "onpointerdown": true, + "onpointerenter": true, + "onpointerleave": true, + "onpointermove": true, + "onpointerout": true, + "onpointerover": true, + "onpointerrawupdate": true, + "onpointerup": true, + "onpopstate": true, + "onprogress": true, + "onratechange": true, + "onrejectionhandled": true, + "onreset": true, + "onresize": true, + "onscroll": true, + "onscrollend": true, + "onscrollsnapchange": true, + "onscrollsnapchanging": true, + "onsearch": true, + "onsecuritypolicyviolation": true, + "onseeked": true, + "onseeking": true, + "onselect": true, + "onselectionchange": true, + "onselectstart": true, + "onslotchange": true, + "onstalled": true, + "onstorage": true, + "onsubmit": true, + "onsuspend": true, + "ontimeupdate": true, + "ontoggle": true, + "ontransitioncancel": true, + "ontransitionend": true, + "ontransitionrun": true, + "ontransitionstart": true, + "onunhandledrejection": true, + "onunload": true, + "onvolumechange": true, + "onwaiting": true, + "onwheel": true, + "open": false, + "opener": false, + "Option": false, + "OrientationSensor": false, + "origin": false, + "originAgentCluster": false, + "OscillatorNode": false, + "OTPCredential": false, + "outerHeight": false, + "outerWidth": false, + "OverconstrainedError": false, + "PageRevealEvent": false, + "PageSwapEvent": false, + "PageTransitionEvent": false, + "pageXOffset": false, + "pageYOffset": false, + "PannerNode": false, + "parent": false, + "PasswordCredential": false, + "Path2D": false, + "PaymentAddress": false, + "PaymentManager": false, + "PaymentMethodChangeEvent": false, + "PaymentRequest": false, + "PaymentRequestUpdateEvent": false, + "PaymentResponse": false, + "performance": false, + "Performance": false, + "PerformanceElementTiming": false, + "PerformanceEntry": false, + "PerformanceEventTiming": false, + "PerformanceLongAnimationFrameTiming": false, + "PerformanceLongTaskTiming": false, + "PerformanceMark": false, + "PerformanceMeasure": false, + "PerformanceNavigation": false, + "PerformanceNavigationTiming": false, + "PerformanceObserver": false, + "PerformanceObserverEntryList": false, + "PerformancePaintTiming": false, + "PerformanceResourceTiming": false, + "PerformanceScriptTiming": false, + "PerformanceServerTiming": false, + "PerformanceTiming": false, + "PeriodicSyncManager": false, + "PeriodicWave": false, + "Permissions": false, + "PermissionStatus": false, + "PERSISTENT": false, + "personalbar": false, + "PictureInPictureEvent": false, + "PictureInPictureWindow": false, + "Plugin": false, + "PluginArray": false, + "PointerEvent": false, + "PopStateEvent": false, + "postMessage": false, + "Presentation": false, + "PresentationAvailability": false, + "PresentationConnection": false, + "PresentationConnectionAvailableEvent": false, + "PresentationConnectionCloseEvent": false, + "PresentationConnectionList": false, + "PresentationReceiver": false, + "PresentationRequest": false, + "PressureObserver": false, + "PressureRecord": false, + "print": false, + "ProcessingInstruction": false, + "Profiler": false, + "ProgressEvent": false, + "PromiseRejectionEvent": false, + "prompt": false, + "ProtectedAudience": false, + "PublicKeyCredential": false, + "PushManager": false, + "PushSubscription": false, + "PushSubscriptionOptions": false, + "queryLocalFonts": false, + "queueMicrotask": false, + "QuotaExceededError": false, + "RadioNodeList": false, + "Range": false, + "ReadableByteStreamController": false, + "ReadableStream": false, + "ReadableStreamBYOBReader": false, + "ReadableStreamBYOBRequest": false, + "ReadableStreamDefaultController": false, + "ReadableStreamDefaultReader": false, + "registerProcessor": false, + "RelativeOrientationSensor": false, + "RemotePlayback": false, + "removeEventListener": false, + "ReportBody": false, + "reportError": false, + "ReportingObserver": false, + "Request": false, + "requestAnimationFrame": false, + "requestIdleCallback": false, + "resizeBy": false, + "ResizeObserver": false, + "ResizeObserverEntry": false, + "ResizeObserverSize": false, + "resizeTo": false, + "Response": false, + "RestrictionTarget": false, + "RTCCertificate": false, + "RTCDataChannel": false, + "RTCDataChannelEvent": false, + "RTCDtlsTransport": false, + "RTCDTMFSender": false, + "RTCDTMFToneChangeEvent": false, + "RTCEncodedAudioFrame": false, + "RTCEncodedVideoFrame": false, + "RTCError": false, + "RTCErrorEvent": false, + "RTCIceCandidate": false, + "RTCIceTransport": false, + "RTCPeerConnection": false, + "RTCPeerConnectionIceErrorEvent": false, + "RTCPeerConnectionIceEvent": false, + "RTCRtpReceiver": false, + "RTCRtpScriptTransform": false, + "RTCRtpSender": false, + "RTCRtpTransceiver": false, + "RTCSctpTransport": false, + "RTCSessionDescription": false, + "RTCStatsReport": false, + "RTCTrackEvent": false, + "sampleRate": false, + "scheduler": false, + "Scheduler": false, + "Scheduling": false, + "screen": false, + "Screen": false, + "ScreenDetailed": false, + "ScreenDetails": false, + "screenLeft": false, + "ScreenOrientation": false, + "screenTop": false, + "screenX": false, + "screenY": false, + "ScriptProcessorNode": false, + "scroll": false, + "scrollbars": false, + "scrollBy": false, + "ScrollTimeline": false, + "scrollTo": false, + "scrollX": false, + "scrollY": false, + "SecurityPolicyViolationEvent": false, + "Selection": false, + "self": false, + "Sensor": false, + "SensorErrorEvent": false, + "Serial": false, + "SerialPort": false, + "ServiceWorker": false, + "ServiceWorkerContainer": false, + "ServiceWorkerRegistration": false, + "sessionStorage": false, + "setInterval": false, + "setTimeout": false, + "ShadowRoot": false, + "sharedStorage": false, + "SharedStorage": false, + "SharedStorageAppendMethod": false, + "SharedStorageClearMethod": false, + "SharedStorageDeleteMethod": false, + "SharedStorageModifierMethod": false, + "SharedStorageSetMethod": false, + "SharedStorageWorklet": false, + "SharedWorker": false, + "showDirectoryPicker": false, + "showOpenFilePicker": false, + "showSaveFilePicker": false, + "SnapEvent": false, + "SourceBuffer": false, + "SourceBufferList": false, + "SpeechGrammar": false, + "SpeechGrammarList": false, + "SpeechRecognition": false, + "SpeechRecognitionErrorEvent": false, + "SpeechRecognitionEvent": false, + "SpeechRecognitionPhrase": false, + "speechSynthesis": false, + "SpeechSynthesis": false, + "SpeechSynthesisErrorEvent": false, + "SpeechSynthesisEvent": false, + "SpeechSynthesisUtterance": false, + "SpeechSynthesisVoice": false, + "StaticRange": false, + "status": false, + "statusbar": false, + "StereoPannerNode": false, + "stop": false, + "Storage": false, + "StorageBucket": false, + "StorageBucketManager": false, + "StorageEvent": false, + "StorageManager": false, + "structuredClone": false, + "styleMedia": false, + "StylePropertyMap": false, + "StylePropertyMapReadOnly": false, + "StyleSheet": false, + "StyleSheetList": false, + "SubmitEvent": false, + "Subscriber": false, + "SubtleCrypto": false, + "Summarizer": false, + "SuppressedError": false, + "SVGAElement": false, + "SVGAngle": false, + "SVGAnimatedAngle": false, + "SVGAnimatedBoolean": false, + "SVGAnimatedEnumeration": false, + "SVGAnimatedInteger": false, + "SVGAnimatedLength": false, + "SVGAnimatedLengthList": false, + "SVGAnimatedNumber": false, + "SVGAnimatedNumberList": false, + "SVGAnimatedPreserveAspectRatio": false, + "SVGAnimatedRect": false, + "SVGAnimatedString": false, + "SVGAnimatedTransformList": false, + "SVGAnimateElement": false, + "SVGAnimateMotionElement": false, + "SVGAnimateTransformElement": false, + "SVGAnimationElement": false, + "SVGCircleElement": false, + "SVGClipPathElement": false, + "SVGComponentTransferFunctionElement": false, + "SVGDefsElement": false, + "SVGDescElement": false, + "SVGElement": false, + "SVGEllipseElement": false, + "SVGFEBlendElement": false, + "SVGFEColorMatrixElement": false, + "SVGFEComponentTransferElement": false, + "SVGFECompositeElement": false, + "SVGFEConvolveMatrixElement": false, + "SVGFEDiffuseLightingElement": false, + "SVGFEDisplacementMapElement": false, + "SVGFEDistantLightElement": false, + "SVGFEDropShadowElement": false, + "SVGFEFloodElement": false, + "SVGFEFuncAElement": false, + "SVGFEFuncBElement": false, + "SVGFEFuncGElement": false, + "SVGFEFuncRElement": false, + "SVGFEGaussianBlurElement": false, + "SVGFEImageElement": false, + "SVGFEMergeElement": false, + "SVGFEMergeNodeElement": false, + "SVGFEMorphologyElement": false, + "SVGFEOffsetElement": false, + "SVGFEPointLightElement": false, + "SVGFESpecularLightingElement": false, + "SVGFESpotLightElement": false, + "SVGFETileElement": false, + "SVGFETurbulenceElement": false, + "SVGFilterElement": false, + "SVGForeignObjectElement": false, + "SVGGElement": false, + "SVGGeometryElement": false, + "SVGGradientElement": false, + "SVGGraphicsElement": false, + "SVGImageElement": false, + "SVGLength": false, + "SVGLengthList": false, + "SVGLinearGradientElement": false, + "SVGLineElement": false, + "SVGMarkerElement": false, + "SVGMaskElement": false, + "SVGMatrix": false, + "SVGMetadataElement": false, + "SVGMPathElement": false, + "SVGNumber": false, + "SVGNumberList": false, + "SVGPathElement": false, + "SVGPatternElement": false, + "SVGPoint": false, + "SVGPointList": false, + "SVGPolygonElement": false, + "SVGPolylineElement": false, + "SVGPreserveAspectRatio": false, + "SVGRadialGradientElement": false, + "SVGRect": false, + "SVGRectElement": false, + "SVGScriptElement": false, + "SVGSetElement": false, + "SVGStopElement": false, + "SVGStringList": false, + "SVGStyleElement": false, + "SVGSVGElement": false, + "SVGSwitchElement": false, + "SVGSymbolElement": false, + "SVGTextContentElement": false, + "SVGTextElement": false, + "SVGTextPathElement": false, + "SVGTextPositioningElement": false, + "SVGTitleElement": false, + "SVGTransform": false, + "SVGTransformList": false, + "SVGTSpanElement": false, + "SVGUnitTypes": false, + "SVGUseElement": false, + "SVGViewElement": false, + "SyncManager": false, + "TaskAttributionTiming": false, + "TaskController": false, + "TaskPriorityChangeEvent": false, + "TaskSignal": false, + "TEMPORARY": false, + "Text": false, + "TextDecoder": false, + "TextDecoderStream": false, + "TextEncoder": false, + "TextEncoderStream": false, + "TextEvent": false, + "TextFormat": false, + "TextFormatUpdateEvent": false, + "TextMetrics": false, + "TextTrack": false, + "TextTrackCue": false, + "TextTrackCueList": false, + "TextTrackList": false, + "TextUpdateEvent": false, + "TimeEvent": false, + "TimeRanges": false, + "ToggleEvent": false, + "toolbar": false, + "top": false, + "Touch": false, + "TouchEvent": false, + "TouchList": false, + "TrackEvent": false, + "TransformStream": false, + "TransformStreamDefaultController": false, + "TransitionEvent": false, + "Translator": false, + "TreeWalker": false, + "TrustedHTML": false, + "TrustedScript": false, + "TrustedScriptURL": false, + "TrustedTypePolicy": false, + "TrustedTypePolicyFactory": false, + "trustedTypes": false, + "UIEvent": false, + "URL": false, + "URLPattern": false, + "URLSearchParams": false, + "USB": false, + "USBAlternateInterface": false, + "USBConfiguration": false, + "USBConnectionEvent": false, + "USBDevice": false, + "USBEndpoint": false, + "USBInterface": false, + "USBInTransferResult": false, + "USBIsochronousInTransferPacket": false, + "USBIsochronousInTransferResult": false, + "USBIsochronousOutTransferPacket": false, + "USBIsochronousOutTransferResult": false, + "USBOutTransferResult": false, + "UserActivation": false, + "ValidityState": false, + "VideoColorSpace": false, + "VideoDecoder": false, + "VideoEncoder": false, + "VideoFrame": false, + "VideoPlaybackQuality": false, + "viewport": false, + "Viewport": false, + "ViewTimeline": false, + "ViewTransition": false, + "ViewTransitionTypeSet": false, + "VirtualKeyboard": false, + "VirtualKeyboardGeometryChangeEvent": false, + "VisibilityStateEntry": false, + "visualViewport": false, + "VisualViewport": false, + "VTTCue": false, + "VTTRegion": false, + "WakeLock": false, + "WakeLockSentinel": false, + "WaveShaperNode": false, + "WebAssembly": false, + "WebGL2RenderingContext": false, + "WebGLActiveInfo": false, + "WebGLBuffer": false, + "WebGLContextEvent": false, + "WebGLFramebuffer": false, + "WebGLObject": false, + "WebGLProgram": false, + "WebGLQuery": false, + "WebGLRenderbuffer": false, + "WebGLRenderingContext": false, + "WebGLSampler": false, + "WebGLShader": false, + "WebGLShaderPrecisionFormat": false, + "WebGLSync": false, + "WebGLTexture": false, + "WebGLTransformFeedback": false, + "WebGLUniformLocation": false, + "WebGLVertexArrayObject": false, + "WebSocket": false, + "WebSocketError": false, + "WebSocketStream": false, + "WebTransport": false, + "WebTransportBidirectionalStream": false, + "WebTransportDatagramDuplexStream": false, + "WebTransportError": false, + "WebTransportReceiveStream": false, + "WebTransportSendStream": false, + "WGSLLanguageFeatures": false, + "WheelEvent": false, + "when": false, + "window": false, + "Window": false, + "WindowControlsOverlay": false, + "WindowControlsOverlayGeometryChangeEvent": false, + "Worker": false, + "Worklet": false, + "WorkletGlobalScope": false, + "WritableStream": false, + "WritableStreamDefaultController": false, + "WritableStreamDefaultWriter": false, + "XMLDocument": false, + "XMLHttpRequest": false, + "XMLHttpRequestEventTarget": false, + "XMLHttpRequestUpload": false, + "XMLSerializer": false, + "XPathEvaluator": false, + "XPathExpression": false, + "XPathResult": false, + "XRAnchor": false, + "XRAnchorSet": false, + "XRBoundedReferenceSpace": false, + "XRCamera": false, + "XRCPUDepthInformation": false, + "XRDepthInformation": false, + "XRDOMOverlayState": false, + "XRFrame": false, + "XRHand": false, + "XRHitTestResult": false, + "XRHitTestSource": false, + "XRInputSource": false, + "XRInputSourceArray": false, + "XRInputSourceEvent": false, + "XRInputSourcesChangeEvent": false, + "XRJointPose": false, + "XRJointSpace": false, + "XRLayer": false, + "XRLightEstimate": false, + "XRLightProbe": false, + "XRPose": false, + "XRRay": false, + "XRReferenceSpace": false, + "XRReferenceSpaceEvent": false, + "XRRenderState": false, + "XRRigidTransform": false, + "XRSession": false, + "XRSessionEvent": false, + "XRSpace": false, + "XRSystem": false, + "XRTransientInputHitTestResult": false, + "XRTransientInputHitTestSource": false, + "XRView": false, + "XRViewerPose": false, + "XRViewport": false, + "XRWebGLBinding": false, + "XRWebGLDepthInformation": false, + "XRWebGLLayer": false, + "XSLTProcessor": false + } + }, + "errors": [ + { + "messageId": "defaultMessage", + "data": { + "name": "foo" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-restricted-globals > invalid + +```js +self.self.foo() +``` + +```json +{ + "options": [ + { + "globals": [ + "foo" + ], + "checkGlobalObject": true + } + ], + "languageOptions": { + "globals": { + "AbortController": false, + "AbortSignal": false, + "AbsoluteOrientationSensor": false, + "AbstractRange": false, + "Accelerometer": false, + "addEventListener": false, + "ai": false, + "AI": false, + "AICreateMonitor": false, + "AITextSession": false, + "alert": false, + "AnalyserNode": false, + "Animation": false, + "AnimationEffect": false, + "AnimationEvent": false, + "AnimationPlaybackEvent": false, + "AnimationTimeline": false, + "AsyncDisposableStack": false, + "atob": false, + "Attr": false, + "Audio": false, + "AudioBuffer": false, + "AudioBufferSourceNode": false, + "AudioContext": false, + "AudioData": false, + "AudioDecoder": false, + "AudioDestinationNode": false, + "AudioEncoder": false, + "AudioListener": false, + "AudioNode": false, + "AudioParam": false, + "AudioParamMap": false, + "AudioProcessingEvent": false, + "AudioScheduledSourceNode": false, + "AudioSinkInfo": false, + "AudioWorklet": false, + "AudioWorkletGlobalScope": false, + "AudioWorkletNode": false, + "AudioWorkletProcessor": false, + "AuthenticatorAssertionResponse": false, + "AuthenticatorAttestationResponse": false, + "AuthenticatorResponse": false, + "BackgroundFetchManager": false, + "BackgroundFetchRecord": false, + "BackgroundFetchRegistration": false, + "BarcodeDetector": false, + "BarProp": false, + "BaseAudioContext": false, + "BatteryManager": false, + "BeforeUnloadEvent": false, + "BiquadFilterNode": false, + "Blob": false, + "BlobEvent": false, + "Bluetooth": false, + "BluetoothCharacteristicProperties": false, + "BluetoothDevice": false, + "BluetoothRemoteGATTCharacteristic": false, + "BluetoothRemoteGATTDescriptor": false, + "BluetoothRemoteGATTServer": false, + "BluetoothRemoteGATTService": false, + "BluetoothUUID": false, + "blur": false, + "BroadcastChannel": false, + "BrowserCaptureMediaStreamTrack": false, + "btoa": false, + "ByteLengthQueuingStrategy": false, + "Cache": false, + "caches": false, + "CacheStorage": false, + "cancelAnimationFrame": false, + "cancelIdleCallback": false, + "CanvasCaptureMediaStream": false, + "CanvasCaptureMediaStreamTrack": false, + "CanvasGradient": false, + "CanvasPattern": false, + "CanvasRenderingContext2D": false, + "CaptureController": false, + "CaretPosition": false, + "CDATASection": false, + "ChannelMergerNode": false, + "ChannelSplitterNode": false, + "ChapterInformation": false, + "CharacterBoundsUpdateEvent": false, + "CharacterData": false, + "clearInterval": false, + "clearTimeout": false, + "clientInformation": false, + "Clipboard": false, + "ClipboardChangeEvent": false, + "ClipboardEvent": false, + "ClipboardItem": false, + "close": false, + "closed": false, + "CloseEvent": false, + "CloseWatcher": false, + "CommandEvent": false, + "Comment": false, + "CompositionEvent": false, + "CompressionStream": false, + "confirm": false, + "console": false, + "ConstantSourceNode": false, + "ContentVisibilityAutoStateChangeEvent": false, + "ConvolverNode": false, + "CookieChangeEvent": false, + "CookieDeprecationLabel": false, + "cookieStore": false, + "CookieStore": false, + "CookieStoreManager": false, + "CountQueuingStrategy": false, + "createImageBitmap": false, + "CreateMonitor": false, + "Credential": false, + "credentialless": false, + "CredentialsContainer": false, + "CropTarget": false, + "crossOriginIsolated": false, + "crypto": false, + "Crypto": false, + "CryptoKey": false, + "CSPViolationReportBody": false, + "CSS": false, + "CSSAnimation": false, + "CSSConditionRule": false, + "CSSContainerRule": false, + "CSSCounterStyleRule": false, + "CSSFontFaceRule": false, + "CSSFontFeatureValuesRule": false, + "CSSFontPaletteValuesRule": false, + "CSSFunctionDeclarations": false, + "CSSFunctionDescriptors": false, + "CSSFunctionRule": false, + "CSSGroupingRule": false, + "CSSImageValue": false, + "CSSImportRule": false, + "CSSKeyframeRule": false, + "CSSKeyframesRule": false, + "CSSKeywordValue": false, + "CSSLayerBlockRule": false, + "CSSLayerStatementRule": false, + "CSSMarginRule": false, + "CSSMathClamp": false, + "CSSMathInvert": false, + "CSSMathMax": false, + "CSSMathMin": false, + "CSSMathNegate": false, + "CSSMathProduct": false, + "CSSMathSum": false, + "CSSMathValue": false, + "CSSMatrixComponent": false, + "CSSMediaRule": false, + "CSSNamespaceRule": false, + "CSSNestedDeclarations": false, + "CSSNumericArray": false, + "CSSNumericValue": false, + "CSSPageDescriptors": false, + "CSSPageRule": false, + "CSSPerspective": false, + "CSSPositionTryDescriptors": false, + "CSSPositionTryRule": false, + "CSSPositionValue": false, + "CSSPropertyRule": false, + "CSSRotate": false, + "CSSRule": false, + "CSSRuleList": false, + "CSSScale": false, + "CSSScopeRule": false, + "CSSSkew": false, + "CSSSkewX": false, + "CSSSkewY": false, + "CSSStartingStyleRule": false, + "CSSStyleDeclaration": false, + "CSSStyleRule": false, + "CSSStyleSheet": false, + "CSSStyleValue": false, + "CSSSupportsRule": false, + "CSSTransformComponent": false, + "CSSTransformValue": false, + "CSSTransition": false, + "CSSTranslate": false, + "CSSUnitValue": false, + "CSSUnparsedValue": false, + "CSSVariableReferenceValue": false, + "CSSViewTransitionRule": false, + "currentFrame": false, + "currentTime": false, + "CustomElementRegistry": false, + "customElements": false, + "CustomEvent": false, + "CustomStateSet": false, + "DataTransfer": false, + "DataTransferItem": false, + "DataTransferItemList": false, + "DecompressionStream": false, + "DelayNode": false, + "DelegatedInkTrailPresenter": false, + "DeviceMotionEvent": false, + "DeviceMotionEventAcceleration": false, + "DeviceMotionEventRotationRate": false, + "DeviceOrientationEvent": false, + "devicePixelRatio": false, + "DevicePosture": false, + "DigitalCredential": false, + "dispatchEvent": false, + "DisposableStack": false, + "document": false, + "Document": false, + "DocumentFragment": false, + "documentPictureInPicture": false, + "DocumentPictureInPicture": false, + "DocumentPictureInPictureEvent": false, + "DocumentTimeline": false, + "DocumentType": false, + "DOMError": false, + "DOMException": false, + "DOMImplementation": false, + "DOMMatrix": false, + "DOMMatrixReadOnly": false, + "DOMParser": false, + "DOMPoint": false, + "DOMPointReadOnly": false, + "DOMQuad": false, + "DOMRect": false, + "DOMRectList": false, + "DOMRectReadOnly": false, + "DOMStringList": false, + "DOMStringMap": false, + "DOMTokenList": false, + "DragEvent": false, + "DynamicsCompressorNode": false, + "EditContext": false, + "Element": false, + "ElementInternals": false, + "EncodedAudioChunk": false, + "EncodedVideoChunk": false, + "ErrorEvent": false, + "event": false, + "Event": false, + "EventCounts": false, + "EventSource": false, + "EventTarget": false, + "external": false, + "External": false, + "EyeDropper": false, + "FeaturePolicy": false, + "FederatedCredential": false, + "fence": false, + "Fence": false, + "FencedFrameConfig": false, + "fetch": false, + "fetchLater": false, + "FetchLaterResult": false, + "File": false, + "FileList": false, + "FileReader": false, + "FileSystem": false, + "FileSystemDirectoryEntry": false, + "FileSystemDirectoryHandle": false, + "FileSystemDirectoryReader": false, + "FileSystemEntry": false, + "FileSystemFileEntry": false, + "FileSystemFileHandle": false, + "FileSystemHandle": false, + "FileSystemObserver": false, + "FileSystemWritableFileStream": false, + "find": false, + "focus": false, + "FocusEvent": false, + "FontData": false, + "FontFace": false, + "FontFaceSet": false, + "FontFaceSetLoadEvent": false, + "FormData": false, + "FormDataEvent": false, + "FragmentDirective": false, + "frameElement": false, + "frames": false, + "GainNode": false, + "Gamepad": false, + "GamepadAxisMoveEvent": false, + "GamepadButton": false, + "GamepadButtonEvent": false, + "GamepadEvent": false, + "GamepadHapticActuator": false, + "GamepadPose": false, + "Geolocation": false, + "GeolocationCoordinates": false, + "GeolocationPosition": false, + "GeolocationPositionError": false, + "getComputedStyle": false, + "getScreenDetails": false, + "getSelection": false, + "GPU": false, + "GPUAdapter": false, + "GPUAdapterInfo": false, + "GPUBindGroup": false, + "GPUBindGroupLayout": false, + "GPUBuffer": false, + "GPUBufferUsage": false, + "GPUCanvasContext": false, + "GPUColorWrite": false, + "GPUCommandBuffer": false, + "GPUCommandEncoder": false, + "GPUCompilationInfo": false, + "GPUCompilationMessage": false, + "GPUComputePassEncoder": false, + "GPUComputePipeline": false, + "GPUDevice": false, + "GPUDeviceLostInfo": false, + "GPUError": false, + "GPUExternalTexture": false, + "GPUInternalError": false, + "GPUMapMode": false, + "GPUOutOfMemoryError": false, + "GPUPipelineError": false, + "GPUPipelineLayout": false, + "GPUQuerySet": false, + "GPUQueue": false, + "GPURenderBundle": false, + "GPURenderBundleEncoder": false, + "GPURenderPassEncoder": false, + "GPURenderPipeline": false, + "GPUSampler": false, + "GPUShaderModule": false, + "GPUShaderStage": false, + "GPUSupportedFeatures": false, + "GPUSupportedLimits": false, + "GPUTexture": false, + "GPUTextureUsage": false, + "GPUTextureView": false, + "GPUUncapturedErrorEvent": false, + "GPUValidationError": false, + "GravitySensor": false, + "Gyroscope": false, + "HashChangeEvent": false, + "Headers": false, + "HID": false, + "HIDConnectionEvent": false, + "HIDDevice": false, + "HIDInputReportEvent": false, + "Highlight": false, + "HighlightRegistry": false, + "history": false, + "History": false, + "HTMLAllCollection": false, + "HTMLAnchorElement": false, + "HTMLAreaElement": false, + "HTMLAudioElement": false, + "HTMLBaseElement": false, + "HTMLBodyElement": false, + "HTMLBRElement": false, + "HTMLButtonElement": false, + "HTMLCanvasElement": false, + "HTMLCollection": false, + "HTMLDataElement": false, + "HTMLDataListElement": false, + "HTMLDetailsElement": false, + "HTMLDialogElement": false, + "HTMLDirectoryElement": false, + "HTMLDivElement": false, + "HTMLDListElement": false, + "HTMLDocument": false, + "HTMLElement": false, + "HTMLEmbedElement": false, + "HTMLFencedFrameElement": false, + "HTMLFieldSetElement": false, + "HTMLFontElement": false, + "HTMLFormControlsCollection": false, + "HTMLFormElement": false, + "HTMLFrameElement": false, + "HTMLFrameSetElement": false, + "HTMLHeadElement": false, + "HTMLHeadingElement": false, + "HTMLHRElement": false, + "HTMLHtmlElement": false, + "HTMLIFrameElement": false, + "HTMLImageElement": false, + "HTMLInputElement": false, + "HTMLLabelElement": false, + "HTMLLegendElement": false, + "HTMLLIElement": false, + "HTMLLinkElement": false, + "HTMLMapElement": false, + "HTMLMarqueeElement": false, + "HTMLMediaElement": false, + "HTMLMenuElement": false, + "HTMLMetaElement": false, + "HTMLMeterElement": false, + "HTMLModElement": false, + "HTMLObjectElement": false, + "HTMLOListElement": false, + "HTMLOptGroupElement": false, + "HTMLOptionElement": false, + "HTMLOptionsCollection": false, + "HTMLOutputElement": false, + "HTMLParagraphElement": false, + "HTMLParamElement": false, + "HTMLPictureElement": false, + "HTMLPreElement": false, + "HTMLProgressElement": false, + "HTMLQuoteElement": false, + "HTMLScriptElement": false, + "HTMLSelectedContentElement": false, + "HTMLSelectElement": false, + "HTMLSlotElement": false, + "HTMLSourceElement": false, + "HTMLSpanElement": false, + "HTMLStyleElement": false, + "HTMLTableCaptionElement": false, + "HTMLTableCellElement": false, + "HTMLTableColElement": false, + "HTMLTableElement": false, + "HTMLTableRowElement": false, + "HTMLTableSectionElement": false, + "HTMLTemplateElement": false, + "HTMLTextAreaElement": false, + "HTMLTimeElement": false, + "HTMLTitleElement": false, + "HTMLTrackElement": false, + "HTMLUListElement": false, + "HTMLUnknownElement": false, + "HTMLVideoElement": false, + "IDBCursor": false, + "IDBCursorWithValue": false, + "IDBDatabase": false, + "IDBFactory": false, + "IDBIndex": false, + "IDBKeyRange": false, + "IDBObjectStore": false, + "IDBOpenDBRequest": false, + "IDBRecord": false, + "IDBRequest": false, + "IDBTransaction": false, + "IDBVersionChangeEvent": false, + "IdentityCredential": false, + "IdentityCredentialError": false, + "IdentityProvider": false, + "IdleDeadline": false, + "IdleDetector": false, + "IIRFilterNode": false, + "Image": false, + "ImageBitmap": false, + "ImageBitmapRenderingContext": false, + "ImageCapture": false, + "ImageData": false, + "ImageDecoder": false, + "ImageTrack": false, + "ImageTrackList": false, + "indexedDB": false, + "Ink": false, + "innerHeight": false, + "innerWidth": false, + "InputDeviceCapabilities": false, + "InputDeviceInfo": false, + "InputEvent": false, + "IntegrityViolationReportBody": false, + "InterestEvent": false, + "IntersectionObserver": false, + "IntersectionObserverEntry": false, + "isSecureContext": false, + "Keyboard": false, + "KeyboardEvent": false, + "KeyboardLayoutMap": false, + "KeyframeEffect": false, + "LanguageDetector": false, + "LargestContentfulPaint": false, + "LaunchParams": false, + "launchQueue": false, + "LaunchQueue": false, + "LayoutShift": false, + "LayoutShiftAttribution": false, + "length": false, + "LinearAccelerationSensor": false, + "localStorage": false, + "location": true, + "Location": false, + "locationbar": false, + "Lock": false, + "LockManager": false, + "matchMedia": false, + "MathMLElement": false, + "MediaCapabilities": false, + "MediaCapabilitiesInfo": false, + "MediaDeviceInfo": false, + "MediaDevices": false, + "MediaElementAudioSourceNode": false, + "MediaEncryptedEvent": false, + "MediaError": false, + "MediaKeyError": false, + "MediaKeyMessageEvent": false, + "MediaKeys": false, + "MediaKeySession": false, + "MediaKeyStatusMap": false, + "MediaKeySystemAccess": false, + "MediaList": false, + "MediaMetadata": false, + "MediaQueryList": false, + "MediaQueryListEvent": false, + "MediaRecorder": false, + "MediaRecorderErrorEvent": false, + "MediaSession": false, + "MediaSource": false, + "MediaSourceHandle": false, + "MediaStream": false, + "MediaStreamAudioDestinationNode": false, + "MediaStreamAudioSourceNode": false, + "MediaStreamEvent": false, + "MediaStreamTrack": false, + "MediaStreamTrackAudioSourceNode": false, + "MediaStreamTrackAudioStats": false, + "MediaStreamTrackEvent": false, + "MediaStreamTrackGenerator": false, + "MediaStreamTrackProcessor": false, + "MediaStreamTrackVideoStats": false, + "menubar": false, + "MessageChannel": false, + "MessageEvent": false, + "MessagePort": false, + "MIDIAccess": false, + "MIDIConnectionEvent": false, + "MIDIInput": false, + "MIDIInputMap": false, + "MIDIMessageEvent": false, + "MIDIOutput": false, + "MIDIOutputMap": false, + "MIDIPort": false, + "MimeType": false, + "MimeTypeArray": false, + "model": false, + "ModelGenericSession": false, + "ModelManager": false, + "MouseEvent": false, + "moveBy": false, + "moveTo": false, + "MutationEvent": false, + "MutationObserver": false, + "MutationRecord": false, + "name": false, + "NamedNodeMap": false, + "NavigateEvent": false, + "navigation": false, + "Navigation": false, + "NavigationActivation": false, + "NavigationCurrentEntryChangeEvent": false, + "NavigationDestination": false, + "NavigationHistoryEntry": false, + "NavigationPrecommitController": false, + "NavigationPreloadManager": false, + "NavigationTransition": false, + "navigator": false, + "Navigator": false, + "NavigatorLogin": false, + "NavigatorManagedData": false, + "NavigatorUAData": false, + "NetworkInformation": false, + "Node": false, + "NodeFilter": false, + "NodeIterator": false, + "NodeList": false, + "Notification": false, + "NotifyPaintEvent": false, + "NotRestoredReasonDetails": false, + "NotRestoredReasons": false, + "Observable": false, + "OfflineAudioCompletionEvent": false, + "OfflineAudioContext": false, + "offscreenBuffering": false, + "OffscreenCanvas": false, + "OffscreenCanvasRenderingContext2D": false, + "onabort": true, + "onafterprint": true, + "onanimationcancel": true, + "onanimationend": true, + "onanimationiteration": true, + "onanimationstart": true, + "onappinstalled": true, + "onauxclick": true, + "onbeforeinput": true, + "onbeforeinstallprompt": true, + "onbeforematch": true, + "onbeforeprint": true, + "onbeforetoggle": true, + "onbeforeunload": true, + "onbeforexrselect": true, + "onblur": true, + "oncancel": true, + "oncanplay": true, + "oncanplaythrough": true, + "onchange": true, + "onclick": true, + "onclose": true, + "oncommand": true, + "oncontentvisibilityautostatechange": true, + "oncontextlost": true, + "oncontextmenu": true, + "oncontextrestored": true, + "oncopy": true, + "oncuechange": true, + "oncut": true, + "ondblclick": true, + "ondevicemotion": true, + "ondeviceorientation": true, + "ondeviceorientationabsolute": true, + "ondrag": true, + "ondragend": true, + "ondragenter": true, + "ondragleave": true, + "ondragover": true, + "ondragstart": true, + "ondrop": true, + "ondurationchange": true, + "onemptied": true, + "onended": true, + "onerror": true, + "onfocus": true, + "onformdata": true, + "ongamepadconnected": true, + "ongamepaddisconnected": true, + "ongotpointercapture": true, + "onhashchange": true, + "oninput": true, + "oninvalid": true, + "onkeydown": true, + "onkeypress": true, + "onkeyup": true, + "onlanguagechange": true, + "onload": true, + "onloadeddata": true, + "onloadedmetadata": true, + "onloadstart": true, + "onlostpointercapture": true, + "onmessage": true, + "onmessageerror": true, + "onmousedown": true, + "onmouseenter": true, + "onmouseleave": true, + "onmousemove": true, + "onmouseout": true, + "onmouseover": true, + "onmouseup": true, + "onmousewheel": true, + "onoffline": true, + "ononline": true, + "onpagehide": true, + "onpagereveal": true, + "onpageshow": true, + "onpageswap": true, + "onpaste": true, + "onpause": true, + "onplay": true, + "onplaying": true, + "onpointercancel": true, + "onpointerdown": true, + "onpointerenter": true, + "onpointerleave": true, + "onpointermove": true, + "onpointerout": true, + "onpointerover": true, + "onpointerrawupdate": true, + "onpointerup": true, + "onpopstate": true, + "onprogress": true, + "onratechange": true, + "onrejectionhandled": true, + "onreset": true, + "onresize": true, + "onscroll": true, + "onscrollend": true, + "onscrollsnapchange": true, + "onscrollsnapchanging": true, + "onsearch": true, + "onsecuritypolicyviolation": true, + "onseeked": true, + "onseeking": true, + "onselect": true, + "onselectionchange": true, + "onselectstart": true, + "onslotchange": true, + "onstalled": true, + "onstorage": true, + "onsubmit": true, + "onsuspend": true, + "ontimeupdate": true, + "ontoggle": true, + "ontransitioncancel": true, + "ontransitionend": true, + "ontransitionrun": true, + "ontransitionstart": true, + "onunhandledrejection": true, + "onunload": true, + "onvolumechange": true, + "onwaiting": true, + "onwheel": true, + "open": false, + "opener": false, + "Option": false, + "OrientationSensor": false, + "origin": false, + "originAgentCluster": false, + "OscillatorNode": false, + "OTPCredential": false, + "outerHeight": false, + "outerWidth": false, + "OverconstrainedError": false, + "PageRevealEvent": false, + "PageSwapEvent": false, + "PageTransitionEvent": false, + "pageXOffset": false, + "pageYOffset": false, + "PannerNode": false, + "parent": false, + "PasswordCredential": false, + "Path2D": false, + "PaymentAddress": false, + "PaymentManager": false, + "PaymentMethodChangeEvent": false, + "PaymentRequest": false, + "PaymentRequestUpdateEvent": false, + "PaymentResponse": false, + "performance": false, + "Performance": false, + "PerformanceElementTiming": false, + "PerformanceEntry": false, + "PerformanceEventTiming": false, + "PerformanceLongAnimationFrameTiming": false, + "PerformanceLongTaskTiming": false, + "PerformanceMark": false, + "PerformanceMeasure": false, + "PerformanceNavigation": false, + "PerformanceNavigationTiming": false, + "PerformanceObserver": false, + "PerformanceObserverEntryList": false, + "PerformancePaintTiming": false, + "PerformanceResourceTiming": false, + "PerformanceScriptTiming": false, + "PerformanceServerTiming": false, + "PerformanceTiming": false, + "PeriodicSyncManager": false, + "PeriodicWave": false, + "Permissions": false, + "PermissionStatus": false, + "PERSISTENT": false, + "personalbar": false, + "PictureInPictureEvent": false, + "PictureInPictureWindow": false, + "Plugin": false, + "PluginArray": false, + "PointerEvent": false, + "PopStateEvent": false, + "postMessage": false, + "Presentation": false, + "PresentationAvailability": false, + "PresentationConnection": false, + "PresentationConnectionAvailableEvent": false, + "PresentationConnectionCloseEvent": false, + "PresentationConnectionList": false, + "PresentationReceiver": false, + "PresentationRequest": false, + "PressureObserver": false, + "PressureRecord": false, + "print": false, + "ProcessingInstruction": false, + "Profiler": false, + "ProgressEvent": false, + "PromiseRejectionEvent": false, + "prompt": false, + "ProtectedAudience": false, + "PublicKeyCredential": false, + "PushManager": false, + "PushSubscription": false, + "PushSubscriptionOptions": false, + "queryLocalFonts": false, + "queueMicrotask": false, + "QuotaExceededError": false, + "RadioNodeList": false, + "Range": false, + "ReadableByteStreamController": false, + "ReadableStream": false, + "ReadableStreamBYOBReader": false, + "ReadableStreamBYOBRequest": false, + "ReadableStreamDefaultController": false, + "ReadableStreamDefaultReader": false, + "registerProcessor": false, + "RelativeOrientationSensor": false, + "RemotePlayback": false, + "removeEventListener": false, + "ReportBody": false, + "reportError": false, + "ReportingObserver": false, + "Request": false, + "requestAnimationFrame": false, + "requestIdleCallback": false, + "resizeBy": false, + "ResizeObserver": false, + "ResizeObserverEntry": false, + "ResizeObserverSize": false, + "resizeTo": false, + "Response": false, + "RestrictionTarget": false, + "RTCCertificate": false, + "RTCDataChannel": false, + "RTCDataChannelEvent": false, + "RTCDtlsTransport": false, + "RTCDTMFSender": false, + "RTCDTMFToneChangeEvent": false, + "RTCEncodedAudioFrame": false, + "RTCEncodedVideoFrame": false, + "RTCError": false, + "RTCErrorEvent": false, + "RTCIceCandidate": false, + "RTCIceTransport": false, + "RTCPeerConnection": false, + "RTCPeerConnectionIceErrorEvent": false, + "RTCPeerConnectionIceEvent": false, + "RTCRtpReceiver": false, + "RTCRtpScriptTransform": false, + "RTCRtpSender": false, + "RTCRtpTransceiver": false, + "RTCSctpTransport": false, + "RTCSessionDescription": false, + "RTCStatsReport": false, + "RTCTrackEvent": false, + "sampleRate": false, + "scheduler": false, + "Scheduler": false, + "Scheduling": false, + "screen": false, + "Screen": false, + "ScreenDetailed": false, + "ScreenDetails": false, + "screenLeft": false, + "ScreenOrientation": false, + "screenTop": false, + "screenX": false, + "screenY": false, + "ScriptProcessorNode": false, + "scroll": false, + "scrollbars": false, + "scrollBy": false, + "ScrollTimeline": false, + "scrollTo": false, + "scrollX": false, + "scrollY": false, + "SecurityPolicyViolationEvent": false, + "Selection": false, + "self": false, + "Sensor": false, + "SensorErrorEvent": false, + "Serial": false, + "SerialPort": false, + "ServiceWorker": false, + "ServiceWorkerContainer": false, + "ServiceWorkerRegistration": false, + "sessionStorage": false, + "setInterval": false, + "setTimeout": false, + "ShadowRoot": false, + "sharedStorage": false, + "SharedStorage": false, + "SharedStorageAppendMethod": false, + "SharedStorageClearMethod": false, + "SharedStorageDeleteMethod": false, + "SharedStorageModifierMethod": false, + "SharedStorageSetMethod": false, + "SharedStorageWorklet": false, + "SharedWorker": false, + "showDirectoryPicker": false, + "showOpenFilePicker": false, + "showSaveFilePicker": false, + "SnapEvent": false, + "SourceBuffer": false, + "SourceBufferList": false, + "SpeechGrammar": false, + "SpeechGrammarList": false, + "SpeechRecognition": false, + "SpeechRecognitionErrorEvent": false, + "SpeechRecognitionEvent": false, + "SpeechRecognitionPhrase": false, + "speechSynthesis": false, + "SpeechSynthesis": false, + "SpeechSynthesisErrorEvent": false, + "SpeechSynthesisEvent": false, + "SpeechSynthesisUtterance": false, + "SpeechSynthesisVoice": false, + "StaticRange": false, + "status": false, + "statusbar": false, + "StereoPannerNode": false, + "stop": false, + "Storage": false, + "StorageBucket": false, + "StorageBucketManager": false, + "StorageEvent": false, + "StorageManager": false, + "structuredClone": false, + "styleMedia": false, + "StylePropertyMap": false, + "StylePropertyMapReadOnly": false, + "StyleSheet": false, + "StyleSheetList": false, + "SubmitEvent": false, + "Subscriber": false, + "SubtleCrypto": false, + "Summarizer": false, + "SuppressedError": false, + "SVGAElement": false, + "SVGAngle": false, + "SVGAnimatedAngle": false, + "SVGAnimatedBoolean": false, + "SVGAnimatedEnumeration": false, + "SVGAnimatedInteger": false, + "SVGAnimatedLength": false, + "SVGAnimatedLengthList": false, + "SVGAnimatedNumber": false, + "SVGAnimatedNumberList": false, + "SVGAnimatedPreserveAspectRatio": false, + "SVGAnimatedRect": false, + "SVGAnimatedString": false, + "SVGAnimatedTransformList": false, + "SVGAnimateElement": false, + "SVGAnimateMotionElement": false, + "SVGAnimateTransformElement": false, + "SVGAnimationElement": false, + "SVGCircleElement": false, + "SVGClipPathElement": false, + "SVGComponentTransferFunctionElement": false, + "SVGDefsElement": false, + "SVGDescElement": false, + "SVGElement": false, + "SVGEllipseElement": false, + "SVGFEBlendElement": false, + "SVGFEColorMatrixElement": false, + "SVGFEComponentTransferElement": false, + "SVGFECompositeElement": false, + "SVGFEConvolveMatrixElement": false, + "SVGFEDiffuseLightingElement": false, + "SVGFEDisplacementMapElement": false, + "SVGFEDistantLightElement": false, + "SVGFEDropShadowElement": false, + "SVGFEFloodElement": false, + "SVGFEFuncAElement": false, + "SVGFEFuncBElement": false, + "SVGFEFuncGElement": false, + "SVGFEFuncRElement": false, + "SVGFEGaussianBlurElement": false, + "SVGFEImageElement": false, + "SVGFEMergeElement": false, + "SVGFEMergeNodeElement": false, + "SVGFEMorphologyElement": false, + "SVGFEOffsetElement": false, + "SVGFEPointLightElement": false, + "SVGFESpecularLightingElement": false, + "SVGFESpotLightElement": false, + "SVGFETileElement": false, + "SVGFETurbulenceElement": false, + "SVGFilterElement": false, + "SVGForeignObjectElement": false, + "SVGGElement": false, + "SVGGeometryElement": false, + "SVGGradientElement": false, + "SVGGraphicsElement": false, + "SVGImageElement": false, + "SVGLength": false, + "SVGLengthList": false, + "SVGLinearGradientElement": false, + "SVGLineElement": false, + "SVGMarkerElement": false, + "SVGMaskElement": false, + "SVGMatrix": false, + "SVGMetadataElement": false, + "SVGMPathElement": false, + "SVGNumber": false, + "SVGNumberList": false, + "SVGPathElement": false, + "SVGPatternElement": false, + "SVGPoint": false, + "SVGPointList": false, + "SVGPolygonElement": false, + "SVGPolylineElement": false, + "SVGPreserveAspectRatio": false, + "SVGRadialGradientElement": false, + "SVGRect": false, + "SVGRectElement": false, + "SVGScriptElement": false, + "SVGSetElement": false, + "SVGStopElement": false, + "SVGStringList": false, + "SVGStyleElement": false, + "SVGSVGElement": false, + "SVGSwitchElement": false, + "SVGSymbolElement": false, + "SVGTextContentElement": false, + "SVGTextElement": false, + "SVGTextPathElement": false, + "SVGTextPositioningElement": false, + "SVGTitleElement": false, + "SVGTransform": false, + "SVGTransformList": false, + "SVGTSpanElement": false, + "SVGUnitTypes": false, + "SVGUseElement": false, + "SVGViewElement": false, + "SyncManager": false, + "TaskAttributionTiming": false, + "TaskController": false, + "TaskPriorityChangeEvent": false, + "TaskSignal": false, + "TEMPORARY": false, + "Text": false, + "TextDecoder": false, + "TextDecoderStream": false, + "TextEncoder": false, + "TextEncoderStream": false, + "TextEvent": false, + "TextFormat": false, + "TextFormatUpdateEvent": false, + "TextMetrics": false, + "TextTrack": false, + "TextTrackCue": false, + "TextTrackCueList": false, + "TextTrackList": false, + "TextUpdateEvent": false, + "TimeEvent": false, + "TimeRanges": false, + "ToggleEvent": false, + "toolbar": false, + "top": false, + "Touch": false, + "TouchEvent": false, + "TouchList": false, + "TrackEvent": false, + "TransformStream": false, + "TransformStreamDefaultController": false, + "TransitionEvent": false, + "Translator": false, + "TreeWalker": false, + "TrustedHTML": false, + "TrustedScript": false, + "TrustedScriptURL": false, + "TrustedTypePolicy": false, + "TrustedTypePolicyFactory": false, + "trustedTypes": false, + "UIEvent": false, + "URL": false, + "URLPattern": false, + "URLSearchParams": false, + "USB": false, + "USBAlternateInterface": false, + "USBConfiguration": false, + "USBConnectionEvent": false, + "USBDevice": false, + "USBEndpoint": false, + "USBInterface": false, + "USBInTransferResult": false, + "USBIsochronousInTransferPacket": false, + "USBIsochronousInTransferResult": false, + "USBIsochronousOutTransferPacket": false, + "USBIsochronousOutTransferResult": false, + "USBOutTransferResult": false, + "UserActivation": false, + "ValidityState": false, + "VideoColorSpace": false, + "VideoDecoder": false, + "VideoEncoder": false, + "VideoFrame": false, + "VideoPlaybackQuality": false, + "viewport": false, + "Viewport": false, + "ViewTimeline": false, + "ViewTransition": false, + "ViewTransitionTypeSet": false, + "VirtualKeyboard": false, + "VirtualKeyboardGeometryChangeEvent": false, + "VisibilityStateEntry": false, + "visualViewport": false, + "VisualViewport": false, + "VTTCue": false, + "VTTRegion": false, + "WakeLock": false, + "WakeLockSentinel": false, + "WaveShaperNode": false, + "WebAssembly": false, + "WebGL2RenderingContext": false, + "WebGLActiveInfo": false, + "WebGLBuffer": false, + "WebGLContextEvent": false, + "WebGLFramebuffer": false, + "WebGLObject": false, + "WebGLProgram": false, + "WebGLQuery": false, + "WebGLRenderbuffer": false, + "WebGLRenderingContext": false, + "WebGLSampler": false, + "WebGLShader": false, + "WebGLShaderPrecisionFormat": false, + "WebGLSync": false, + "WebGLTexture": false, + "WebGLTransformFeedback": false, + "WebGLUniformLocation": false, + "WebGLVertexArrayObject": false, + "WebSocket": false, + "WebSocketError": false, + "WebSocketStream": false, + "WebTransport": false, + "WebTransportBidirectionalStream": false, + "WebTransportDatagramDuplexStream": false, + "WebTransportError": false, + "WebTransportReceiveStream": false, + "WebTransportSendStream": false, + "WGSLLanguageFeatures": false, + "WheelEvent": false, + "when": false, + "window": false, + "Window": false, + "WindowControlsOverlay": false, + "WindowControlsOverlayGeometryChangeEvent": false, + "Worker": false, + "Worklet": false, + "WorkletGlobalScope": false, + "WritableStream": false, + "WritableStreamDefaultController": false, + "WritableStreamDefaultWriter": false, + "XMLDocument": false, + "XMLHttpRequest": false, + "XMLHttpRequestEventTarget": false, + "XMLHttpRequestUpload": false, + "XMLSerializer": false, + "XPathEvaluator": false, + "XPathExpression": false, + "XPathResult": false, + "XRAnchor": false, + "XRAnchorSet": false, + "XRBoundedReferenceSpace": false, + "XRCamera": false, + "XRCPUDepthInformation": false, + "XRDepthInformation": false, + "XRDOMOverlayState": false, + "XRFrame": false, + "XRHand": false, + "XRHitTestResult": false, + "XRHitTestSource": false, + "XRInputSource": false, + "XRInputSourceArray": false, + "XRInputSourceEvent": false, + "XRInputSourcesChangeEvent": false, + "XRJointPose": false, + "XRJointSpace": false, + "XRLayer": false, + "XRLightEstimate": false, + "XRLightProbe": false, + "XRPose": false, + "XRRay": false, + "XRReferenceSpace": false, + "XRReferenceSpaceEvent": false, + "XRRenderState": false, + "XRRigidTransform": false, + "XRSession": false, + "XRSessionEvent": false, + "XRSpace": false, + "XRSystem": false, + "XRTransientInputHitTestResult": false, + "XRTransientInputHitTestSource": false, + "XRView": false, + "XRViewerPose": false, + "XRViewport": false, + "XRWebGLBinding": false, + "XRWebGLDepthInformation": false, + "XRWebGLLayer": false, + "XSLTProcessor": false + } + }, + "errors": [ + { + "messageId": "defaultMessage", + "data": { + "name": "foo" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-restricted-globals > invalid + +```js +globalThis.foo() +``` + +```json +{ + "options": [ + { + "globals": [ + "foo" + ], + "checkGlobalObject": true + } + ], + "languageOptions": { + "ecmaVersion": 2020 + }, + "errors": [ + { + "messageId": "defaultMessage", + "data": { + "name": "foo" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-restricted-globals > invalid + +```js +globalThis.globalThis.foo() +``` + +```json +{ + "options": [ + { + "globals": [ + "foo" + ], + "checkGlobalObject": true + } + ], + "languageOptions": { + "ecmaVersion": 2020 + }, + "errors": [ + { + "messageId": "defaultMessage", + "data": { + "name": "foo" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-restricted-globals > invalid + +```js +myGlobal.foo() +``` + +```json +{ + "options": [ + { + "globals": [ + "foo" + ], + "checkGlobalObject": true, + "globalObjects": [ + "myGlobal" + ] + } + ], + "languageOptions": { + "globals": { + "myGlobal": "readonly" + } + }, + "errors": [ + { + "messageId": "defaultMessage", + "data": { + "name": "foo" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-restricted-globals > invalid + +```js +myGlobal.myGlobal.foo() +``` + +```json +{ + "options": [ + { + "globals": [ + "foo" + ], + "checkGlobalObject": true, + "globalObjects": [ + "myGlobal" + ] + } + ], + "languageOptions": { + "globals": { + "myGlobal": "readonly" + } + }, + "errors": [ + { + "messageId": "defaultMessage", + "data": { + "name": "foo" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-restricted-globals > invalid + +```js +window["foo"] +``` + +```json +{ + "options": [ + { + "globals": [ + "foo" + ], + "checkGlobalObject": true + } + ], + "languageOptions": { + "globals": { + "AbortController": false, + "AbortSignal": false, + "AbsoluteOrientationSensor": false, + "AbstractRange": false, + "Accelerometer": false, + "addEventListener": false, + "ai": false, + "AI": false, + "AICreateMonitor": false, + "AITextSession": false, + "alert": false, + "AnalyserNode": false, + "Animation": false, + "AnimationEffect": false, + "AnimationEvent": false, + "AnimationPlaybackEvent": false, + "AnimationTimeline": false, + "AsyncDisposableStack": false, + "atob": false, + "Attr": false, + "Audio": false, + "AudioBuffer": false, + "AudioBufferSourceNode": false, + "AudioContext": false, + "AudioData": false, + "AudioDecoder": false, + "AudioDestinationNode": false, + "AudioEncoder": false, + "AudioListener": false, + "AudioNode": false, + "AudioParam": false, + "AudioParamMap": false, + "AudioProcessingEvent": false, + "AudioScheduledSourceNode": false, + "AudioSinkInfo": false, + "AudioWorklet": false, + "AudioWorkletGlobalScope": false, + "AudioWorkletNode": false, + "AudioWorkletProcessor": false, + "AuthenticatorAssertionResponse": false, + "AuthenticatorAttestationResponse": false, + "AuthenticatorResponse": false, + "BackgroundFetchManager": false, + "BackgroundFetchRecord": false, + "BackgroundFetchRegistration": false, + "BarcodeDetector": false, + "BarProp": false, + "BaseAudioContext": false, + "BatteryManager": false, + "BeforeUnloadEvent": false, + "BiquadFilterNode": false, + "Blob": false, + "BlobEvent": false, + "Bluetooth": false, + "BluetoothCharacteristicProperties": false, + "BluetoothDevice": false, + "BluetoothRemoteGATTCharacteristic": false, + "BluetoothRemoteGATTDescriptor": false, + "BluetoothRemoteGATTServer": false, + "BluetoothRemoteGATTService": false, + "BluetoothUUID": false, + "blur": false, + "BroadcastChannel": false, + "BrowserCaptureMediaStreamTrack": false, + "btoa": false, + "ByteLengthQueuingStrategy": false, + "Cache": false, + "caches": false, + "CacheStorage": false, + "cancelAnimationFrame": false, + "cancelIdleCallback": false, + "CanvasCaptureMediaStream": false, + "CanvasCaptureMediaStreamTrack": false, + "CanvasGradient": false, + "CanvasPattern": false, + "CanvasRenderingContext2D": false, + "CaptureController": false, + "CaretPosition": false, + "CDATASection": false, + "ChannelMergerNode": false, + "ChannelSplitterNode": false, + "ChapterInformation": false, + "CharacterBoundsUpdateEvent": false, + "CharacterData": false, + "clearInterval": false, + "clearTimeout": false, + "clientInformation": false, + "Clipboard": false, + "ClipboardChangeEvent": false, + "ClipboardEvent": false, + "ClipboardItem": false, + "close": false, + "closed": false, + "CloseEvent": false, + "CloseWatcher": false, + "CommandEvent": false, + "Comment": false, + "CompositionEvent": false, + "CompressionStream": false, + "confirm": false, + "console": false, + "ConstantSourceNode": false, + "ContentVisibilityAutoStateChangeEvent": false, + "ConvolverNode": false, + "CookieChangeEvent": false, + "CookieDeprecationLabel": false, + "cookieStore": false, + "CookieStore": false, + "CookieStoreManager": false, + "CountQueuingStrategy": false, + "createImageBitmap": false, + "CreateMonitor": false, + "Credential": false, + "credentialless": false, + "CredentialsContainer": false, + "CropTarget": false, + "crossOriginIsolated": false, + "crypto": false, + "Crypto": false, + "CryptoKey": false, + "CSPViolationReportBody": false, + "CSS": false, + "CSSAnimation": false, + "CSSConditionRule": false, + "CSSContainerRule": false, + "CSSCounterStyleRule": false, + "CSSFontFaceRule": false, + "CSSFontFeatureValuesRule": false, + "CSSFontPaletteValuesRule": false, + "CSSFunctionDeclarations": false, + "CSSFunctionDescriptors": false, + "CSSFunctionRule": false, + "CSSGroupingRule": false, + "CSSImageValue": false, + "CSSImportRule": false, + "CSSKeyframeRule": false, + "CSSKeyframesRule": false, + "CSSKeywordValue": false, + "CSSLayerBlockRule": false, + "CSSLayerStatementRule": false, + "CSSMarginRule": false, + "CSSMathClamp": false, + "CSSMathInvert": false, + "CSSMathMax": false, + "CSSMathMin": false, + "CSSMathNegate": false, + "CSSMathProduct": false, + "CSSMathSum": false, + "CSSMathValue": false, + "CSSMatrixComponent": false, + "CSSMediaRule": false, + "CSSNamespaceRule": false, + "CSSNestedDeclarations": false, + "CSSNumericArray": false, + "CSSNumericValue": false, + "CSSPageDescriptors": false, + "CSSPageRule": false, + "CSSPerspective": false, + "CSSPositionTryDescriptors": false, + "CSSPositionTryRule": false, + "CSSPositionValue": false, + "CSSPropertyRule": false, + "CSSRotate": false, + "CSSRule": false, + "CSSRuleList": false, + "CSSScale": false, + "CSSScopeRule": false, + "CSSSkew": false, + "CSSSkewX": false, + "CSSSkewY": false, + "CSSStartingStyleRule": false, + "CSSStyleDeclaration": false, + "CSSStyleRule": false, + "CSSStyleSheet": false, + "CSSStyleValue": false, + "CSSSupportsRule": false, + "CSSTransformComponent": false, + "CSSTransformValue": false, + "CSSTransition": false, + "CSSTranslate": false, + "CSSUnitValue": false, + "CSSUnparsedValue": false, + "CSSVariableReferenceValue": false, + "CSSViewTransitionRule": false, + "currentFrame": false, + "currentTime": false, + "CustomElementRegistry": false, + "customElements": false, + "CustomEvent": false, + "CustomStateSet": false, + "DataTransfer": false, + "DataTransferItem": false, + "DataTransferItemList": false, + "DecompressionStream": false, + "DelayNode": false, + "DelegatedInkTrailPresenter": false, + "DeviceMotionEvent": false, + "DeviceMotionEventAcceleration": false, + "DeviceMotionEventRotationRate": false, + "DeviceOrientationEvent": false, + "devicePixelRatio": false, + "DevicePosture": false, + "DigitalCredential": false, + "dispatchEvent": false, + "DisposableStack": false, + "document": false, + "Document": false, + "DocumentFragment": false, + "documentPictureInPicture": false, + "DocumentPictureInPicture": false, + "DocumentPictureInPictureEvent": false, + "DocumentTimeline": false, + "DocumentType": false, + "DOMError": false, + "DOMException": false, + "DOMImplementation": false, + "DOMMatrix": false, + "DOMMatrixReadOnly": false, + "DOMParser": false, + "DOMPoint": false, + "DOMPointReadOnly": false, + "DOMQuad": false, + "DOMRect": false, + "DOMRectList": false, + "DOMRectReadOnly": false, + "DOMStringList": false, + "DOMStringMap": false, + "DOMTokenList": false, + "DragEvent": false, + "DynamicsCompressorNode": false, + "EditContext": false, + "Element": false, + "ElementInternals": false, + "EncodedAudioChunk": false, + "EncodedVideoChunk": false, + "ErrorEvent": false, + "event": false, + "Event": false, + "EventCounts": false, + "EventSource": false, + "EventTarget": false, + "external": false, + "External": false, + "EyeDropper": false, + "FeaturePolicy": false, + "FederatedCredential": false, + "fence": false, + "Fence": false, + "FencedFrameConfig": false, + "fetch": false, + "fetchLater": false, + "FetchLaterResult": false, + "File": false, + "FileList": false, + "FileReader": false, + "FileSystem": false, + "FileSystemDirectoryEntry": false, + "FileSystemDirectoryHandle": false, + "FileSystemDirectoryReader": false, + "FileSystemEntry": false, + "FileSystemFileEntry": false, + "FileSystemFileHandle": false, + "FileSystemHandle": false, + "FileSystemObserver": false, + "FileSystemWritableFileStream": false, + "find": false, + "focus": false, + "FocusEvent": false, + "FontData": false, + "FontFace": false, + "FontFaceSet": false, + "FontFaceSetLoadEvent": false, + "FormData": false, + "FormDataEvent": false, + "FragmentDirective": false, + "frameElement": false, + "frames": false, + "GainNode": false, + "Gamepad": false, + "GamepadAxisMoveEvent": false, + "GamepadButton": false, + "GamepadButtonEvent": false, + "GamepadEvent": false, + "GamepadHapticActuator": false, + "GamepadPose": false, + "Geolocation": false, + "GeolocationCoordinates": false, + "GeolocationPosition": false, + "GeolocationPositionError": false, + "getComputedStyle": false, + "getScreenDetails": false, + "getSelection": false, + "GPU": false, + "GPUAdapter": false, + "GPUAdapterInfo": false, + "GPUBindGroup": false, + "GPUBindGroupLayout": false, + "GPUBuffer": false, + "GPUBufferUsage": false, + "GPUCanvasContext": false, + "GPUColorWrite": false, + "GPUCommandBuffer": false, + "GPUCommandEncoder": false, + "GPUCompilationInfo": false, + "GPUCompilationMessage": false, + "GPUComputePassEncoder": false, + "GPUComputePipeline": false, + "GPUDevice": false, + "GPUDeviceLostInfo": false, + "GPUError": false, + "GPUExternalTexture": false, + "GPUInternalError": false, + "GPUMapMode": false, + "GPUOutOfMemoryError": false, + "GPUPipelineError": false, + "GPUPipelineLayout": false, + "GPUQuerySet": false, + "GPUQueue": false, + "GPURenderBundle": false, + "GPURenderBundleEncoder": false, + "GPURenderPassEncoder": false, + "GPURenderPipeline": false, + "GPUSampler": false, + "GPUShaderModule": false, + "GPUShaderStage": false, + "GPUSupportedFeatures": false, + "GPUSupportedLimits": false, + "GPUTexture": false, + "GPUTextureUsage": false, + "GPUTextureView": false, + "GPUUncapturedErrorEvent": false, + "GPUValidationError": false, + "GravitySensor": false, + "Gyroscope": false, + "HashChangeEvent": false, + "Headers": false, + "HID": false, + "HIDConnectionEvent": false, + "HIDDevice": false, + "HIDInputReportEvent": false, + "Highlight": false, + "HighlightRegistry": false, + "history": false, + "History": false, + "HTMLAllCollection": false, + "HTMLAnchorElement": false, + "HTMLAreaElement": false, + "HTMLAudioElement": false, + "HTMLBaseElement": false, + "HTMLBodyElement": false, + "HTMLBRElement": false, + "HTMLButtonElement": false, + "HTMLCanvasElement": false, + "HTMLCollection": false, + "HTMLDataElement": false, + "HTMLDataListElement": false, + "HTMLDetailsElement": false, + "HTMLDialogElement": false, + "HTMLDirectoryElement": false, + "HTMLDivElement": false, + "HTMLDListElement": false, + "HTMLDocument": false, + "HTMLElement": false, + "HTMLEmbedElement": false, + "HTMLFencedFrameElement": false, + "HTMLFieldSetElement": false, + "HTMLFontElement": false, + "HTMLFormControlsCollection": false, + "HTMLFormElement": false, + "HTMLFrameElement": false, + "HTMLFrameSetElement": false, + "HTMLHeadElement": false, + "HTMLHeadingElement": false, + "HTMLHRElement": false, + "HTMLHtmlElement": false, + "HTMLIFrameElement": false, + "HTMLImageElement": false, + "HTMLInputElement": false, + "HTMLLabelElement": false, + "HTMLLegendElement": false, + "HTMLLIElement": false, + "HTMLLinkElement": false, + "HTMLMapElement": false, + "HTMLMarqueeElement": false, + "HTMLMediaElement": false, + "HTMLMenuElement": false, + "HTMLMetaElement": false, + "HTMLMeterElement": false, + "HTMLModElement": false, + "HTMLObjectElement": false, + "HTMLOListElement": false, + "HTMLOptGroupElement": false, + "HTMLOptionElement": false, + "HTMLOptionsCollection": false, + "HTMLOutputElement": false, + "HTMLParagraphElement": false, + "HTMLParamElement": false, + "HTMLPictureElement": false, + "HTMLPreElement": false, + "HTMLProgressElement": false, + "HTMLQuoteElement": false, + "HTMLScriptElement": false, + "HTMLSelectedContentElement": false, + "HTMLSelectElement": false, + "HTMLSlotElement": false, + "HTMLSourceElement": false, + "HTMLSpanElement": false, + "HTMLStyleElement": false, + "HTMLTableCaptionElement": false, + "HTMLTableCellElement": false, + "HTMLTableColElement": false, + "HTMLTableElement": false, + "HTMLTableRowElement": false, + "HTMLTableSectionElement": false, + "HTMLTemplateElement": false, + "HTMLTextAreaElement": false, + "HTMLTimeElement": false, + "HTMLTitleElement": false, + "HTMLTrackElement": false, + "HTMLUListElement": false, + "HTMLUnknownElement": false, + "HTMLVideoElement": false, + "IDBCursor": false, + "IDBCursorWithValue": false, + "IDBDatabase": false, + "IDBFactory": false, + "IDBIndex": false, + "IDBKeyRange": false, + "IDBObjectStore": false, + "IDBOpenDBRequest": false, + "IDBRecord": false, + "IDBRequest": false, + "IDBTransaction": false, + "IDBVersionChangeEvent": false, + "IdentityCredential": false, + "IdentityCredentialError": false, + "IdentityProvider": false, + "IdleDeadline": false, + "IdleDetector": false, + "IIRFilterNode": false, + "Image": false, + "ImageBitmap": false, + "ImageBitmapRenderingContext": false, + "ImageCapture": false, + "ImageData": false, + "ImageDecoder": false, + "ImageTrack": false, + "ImageTrackList": false, + "indexedDB": false, + "Ink": false, + "innerHeight": false, + "innerWidth": false, + "InputDeviceCapabilities": false, + "InputDeviceInfo": false, + "InputEvent": false, + "IntegrityViolationReportBody": false, + "InterestEvent": false, + "IntersectionObserver": false, + "IntersectionObserverEntry": false, + "isSecureContext": false, + "Keyboard": false, + "KeyboardEvent": false, + "KeyboardLayoutMap": false, + "KeyframeEffect": false, + "LanguageDetector": false, + "LargestContentfulPaint": false, + "LaunchParams": false, + "launchQueue": false, + "LaunchQueue": false, + "LayoutShift": false, + "LayoutShiftAttribution": false, + "length": false, + "LinearAccelerationSensor": false, + "localStorage": false, + "location": true, + "Location": false, + "locationbar": false, + "Lock": false, + "LockManager": false, + "matchMedia": false, + "MathMLElement": false, + "MediaCapabilities": false, + "MediaCapabilitiesInfo": false, + "MediaDeviceInfo": false, + "MediaDevices": false, + "MediaElementAudioSourceNode": false, + "MediaEncryptedEvent": false, + "MediaError": false, + "MediaKeyError": false, + "MediaKeyMessageEvent": false, + "MediaKeys": false, + "MediaKeySession": false, + "MediaKeyStatusMap": false, + "MediaKeySystemAccess": false, + "MediaList": false, + "MediaMetadata": false, + "MediaQueryList": false, + "MediaQueryListEvent": false, + "MediaRecorder": false, + "MediaRecorderErrorEvent": false, + "MediaSession": false, + "MediaSource": false, + "MediaSourceHandle": false, + "MediaStream": false, + "MediaStreamAudioDestinationNode": false, + "MediaStreamAudioSourceNode": false, + "MediaStreamEvent": false, + "MediaStreamTrack": false, + "MediaStreamTrackAudioSourceNode": false, + "MediaStreamTrackAudioStats": false, + "MediaStreamTrackEvent": false, + "MediaStreamTrackGenerator": false, + "MediaStreamTrackProcessor": false, + "MediaStreamTrackVideoStats": false, + "menubar": false, + "MessageChannel": false, + "MessageEvent": false, + "MessagePort": false, + "MIDIAccess": false, + "MIDIConnectionEvent": false, + "MIDIInput": false, + "MIDIInputMap": false, + "MIDIMessageEvent": false, + "MIDIOutput": false, + "MIDIOutputMap": false, + "MIDIPort": false, + "MimeType": false, + "MimeTypeArray": false, + "model": false, + "ModelGenericSession": false, + "ModelManager": false, + "MouseEvent": false, + "moveBy": false, + "moveTo": false, + "MutationEvent": false, + "MutationObserver": false, + "MutationRecord": false, + "name": false, + "NamedNodeMap": false, + "NavigateEvent": false, + "navigation": false, + "Navigation": false, + "NavigationActivation": false, + "NavigationCurrentEntryChangeEvent": false, + "NavigationDestination": false, + "NavigationHistoryEntry": false, + "NavigationPrecommitController": false, + "NavigationPreloadManager": false, + "NavigationTransition": false, + "navigator": false, + "Navigator": false, + "NavigatorLogin": false, + "NavigatorManagedData": false, + "NavigatorUAData": false, + "NetworkInformation": false, + "Node": false, + "NodeFilter": false, + "NodeIterator": false, + "NodeList": false, + "Notification": false, + "NotifyPaintEvent": false, + "NotRestoredReasonDetails": false, + "NotRestoredReasons": false, + "Observable": false, + "OfflineAudioCompletionEvent": false, + "OfflineAudioContext": false, + "offscreenBuffering": false, + "OffscreenCanvas": false, + "OffscreenCanvasRenderingContext2D": false, + "onabort": true, + "onafterprint": true, + "onanimationcancel": true, + "onanimationend": true, + "onanimationiteration": true, + "onanimationstart": true, + "onappinstalled": true, + "onauxclick": true, + "onbeforeinput": true, + "onbeforeinstallprompt": true, + "onbeforematch": true, + "onbeforeprint": true, + "onbeforetoggle": true, + "onbeforeunload": true, + "onbeforexrselect": true, + "onblur": true, + "oncancel": true, + "oncanplay": true, + "oncanplaythrough": true, + "onchange": true, + "onclick": true, + "onclose": true, + "oncommand": true, + "oncontentvisibilityautostatechange": true, + "oncontextlost": true, + "oncontextmenu": true, + "oncontextrestored": true, + "oncopy": true, + "oncuechange": true, + "oncut": true, + "ondblclick": true, + "ondevicemotion": true, + "ondeviceorientation": true, + "ondeviceorientationabsolute": true, + "ondrag": true, + "ondragend": true, + "ondragenter": true, + "ondragleave": true, + "ondragover": true, + "ondragstart": true, + "ondrop": true, + "ondurationchange": true, + "onemptied": true, + "onended": true, + "onerror": true, + "onfocus": true, + "onformdata": true, + "ongamepadconnected": true, + "ongamepaddisconnected": true, + "ongotpointercapture": true, + "onhashchange": true, + "oninput": true, + "oninvalid": true, + "onkeydown": true, + "onkeypress": true, + "onkeyup": true, + "onlanguagechange": true, + "onload": true, + "onloadeddata": true, + "onloadedmetadata": true, + "onloadstart": true, + "onlostpointercapture": true, + "onmessage": true, + "onmessageerror": true, + "onmousedown": true, + "onmouseenter": true, + "onmouseleave": true, + "onmousemove": true, + "onmouseout": true, + "onmouseover": true, + "onmouseup": true, + "onmousewheel": true, + "onoffline": true, + "ononline": true, + "onpagehide": true, + "onpagereveal": true, + "onpageshow": true, + "onpageswap": true, + "onpaste": true, + "onpause": true, + "onplay": true, + "onplaying": true, + "onpointercancel": true, + "onpointerdown": true, + "onpointerenter": true, + "onpointerleave": true, + "onpointermove": true, + "onpointerout": true, + "onpointerover": true, + "onpointerrawupdate": true, + "onpointerup": true, + "onpopstate": true, + "onprogress": true, + "onratechange": true, + "onrejectionhandled": true, + "onreset": true, + "onresize": true, + "onscroll": true, + "onscrollend": true, + "onscrollsnapchange": true, + "onscrollsnapchanging": true, + "onsearch": true, + "onsecuritypolicyviolation": true, + "onseeked": true, + "onseeking": true, + "onselect": true, + "onselectionchange": true, + "onselectstart": true, + "onslotchange": true, + "onstalled": true, + "onstorage": true, + "onsubmit": true, + "onsuspend": true, + "ontimeupdate": true, + "ontoggle": true, + "ontransitioncancel": true, + "ontransitionend": true, + "ontransitionrun": true, + "ontransitionstart": true, + "onunhandledrejection": true, + "onunload": true, + "onvolumechange": true, + "onwaiting": true, + "onwheel": true, + "open": false, + "opener": false, + "Option": false, + "OrientationSensor": false, + "origin": false, + "originAgentCluster": false, + "OscillatorNode": false, + "OTPCredential": false, + "outerHeight": false, + "outerWidth": false, + "OverconstrainedError": false, + "PageRevealEvent": false, + "PageSwapEvent": false, + "PageTransitionEvent": false, + "pageXOffset": false, + "pageYOffset": false, + "PannerNode": false, + "parent": false, + "PasswordCredential": false, + "Path2D": false, + "PaymentAddress": false, + "PaymentManager": false, + "PaymentMethodChangeEvent": false, + "PaymentRequest": false, + "PaymentRequestUpdateEvent": false, + "PaymentResponse": false, + "performance": false, + "Performance": false, + "PerformanceElementTiming": false, + "PerformanceEntry": false, + "PerformanceEventTiming": false, + "PerformanceLongAnimationFrameTiming": false, + "PerformanceLongTaskTiming": false, + "PerformanceMark": false, + "PerformanceMeasure": false, + "PerformanceNavigation": false, + "PerformanceNavigationTiming": false, + "PerformanceObserver": false, + "PerformanceObserverEntryList": false, + "PerformancePaintTiming": false, + "PerformanceResourceTiming": false, + "PerformanceScriptTiming": false, + "PerformanceServerTiming": false, + "PerformanceTiming": false, + "PeriodicSyncManager": false, + "PeriodicWave": false, + "Permissions": false, + "PermissionStatus": false, + "PERSISTENT": false, + "personalbar": false, + "PictureInPictureEvent": false, + "PictureInPictureWindow": false, + "Plugin": false, + "PluginArray": false, + "PointerEvent": false, + "PopStateEvent": false, + "postMessage": false, + "Presentation": false, + "PresentationAvailability": false, + "PresentationConnection": false, + "PresentationConnectionAvailableEvent": false, + "PresentationConnectionCloseEvent": false, + "PresentationConnectionList": false, + "PresentationReceiver": false, + "PresentationRequest": false, + "PressureObserver": false, + "PressureRecord": false, + "print": false, + "ProcessingInstruction": false, + "Profiler": false, + "ProgressEvent": false, + "PromiseRejectionEvent": false, + "prompt": false, + "ProtectedAudience": false, + "PublicKeyCredential": false, + "PushManager": false, + "PushSubscription": false, + "PushSubscriptionOptions": false, + "queryLocalFonts": false, + "queueMicrotask": false, + "QuotaExceededError": false, + "RadioNodeList": false, + "Range": false, + "ReadableByteStreamController": false, + "ReadableStream": false, + "ReadableStreamBYOBReader": false, + "ReadableStreamBYOBRequest": false, + "ReadableStreamDefaultController": false, + "ReadableStreamDefaultReader": false, + "registerProcessor": false, + "RelativeOrientationSensor": false, + "RemotePlayback": false, + "removeEventListener": false, + "ReportBody": false, + "reportError": false, + "ReportingObserver": false, + "Request": false, + "requestAnimationFrame": false, + "requestIdleCallback": false, + "resizeBy": false, + "ResizeObserver": false, + "ResizeObserverEntry": false, + "ResizeObserverSize": false, + "resizeTo": false, + "Response": false, + "RestrictionTarget": false, + "RTCCertificate": false, + "RTCDataChannel": false, + "RTCDataChannelEvent": false, + "RTCDtlsTransport": false, + "RTCDTMFSender": false, + "RTCDTMFToneChangeEvent": false, + "RTCEncodedAudioFrame": false, + "RTCEncodedVideoFrame": false, + "RTCError": false, + "RTCErrorEvent": false, + "RTCIceCandidate": false, + "RTCIceTransport": false, + "RTCPeerConnection": false, + "RTCPeerConnectionIceErrorEvent": false, + "RTCPeerConnectionIceEvent": false, + "RTCRtpReceiver": false, + "RTCRtpScriptTransform": false, + "RTCRtpSender": false, + "RTCRtpTransceiver": false, + "RTCSctpTransport": false, + "RTCSessionDescription": false, + "RTCStatsReport": false, + "RTCTrackEvent": false, + "sampleRate": false, + "scheduler": false, + "Scheduler": false, + "Scheduling": false, + "screen": false, + "Screen": false, + "ScreenDetailed": false, + "ScreenDetails": false, + "screenLeft": false, + "ScreenOrientation": false, + "screenTop": false, + "screenX": false, + "screenY": false, + "ScriptProcessorNode": false, + "scroll": false, + "scrollbars": false, + "scrollBy": false, + "ScrollTimeline": false, + "scrollTo": false, + "scrollX": false, + "scrollY": false, + "SecurityPolicyViolationEvent": false, + "Selection": false, + "self": false, + "Sensor": false, + "SensorErrorEvent": false, + "Serial": false, + "SerialPort": false, + "ServiceWorker": false, + "ServiceWorkerContainer": false, + "ServiceWorkerRegistration": false, + "sessionStorage": false, + "setInterval": false, + "setTimeout": false, + "ShadowRoot": false, + "sharedStorage": false, + "SharedStorage": false, + "SharedStorageAppendMethod": false, + "SharedStorageClearMethod": false, + "SharedStorageDeleteMethod": false, + "SharedStorageModifierMethod": false, + "SharedStorageSetMethod": false, + "SharedStorageWorklet": false, + "SharedWorker": false, + "showDirectoryPicker": false, + "showOpenFilePicker": false, + "showSaveFilePicker": false, + "SnapEvent": false, + "SourceBuffer": false, + "SourceBufferList": false, + "SpeechGrammar": false, + "SpeechGrammarList": false, + "SpeechRecognition": false, + "SpeechRecognitionErrorEvent": false, + "SpeechRecognitionEvent": false, + "SpeechRecognitionPhrase": false, + "speechSynthesis": false, + "SpeechSynthesis": false, + "SpeechSynthesisErrorEvent": false, + "SpeechSynthesisEvent": false, + "SpeechSynthesisUtterance": false, + "SpeechSynthesisVoice": false, + "StaticRange": false, + "status": false, + "statusbar": false, + "StereoPannerNode": false, + "stop": false, + "Storage": false, + "StorageBucket": false, + "StorageBucketManager": false, + "StorageEvent": false, + "StorageManager": false, + "structuredClone": false, + "styleMedia": false, + "StylePropertyMap": false, + "StylePropertyMapReadOnly": false, + "StyleSheet": false, + "StyleSheetList": false, + "SubmitEvent": false, + "Subscriber": false, + "SubtleCrypto": false, + "Summarizer": false, + "SuppressedError": false, + "SVGAElement": false, + "SVGAngle": false, + "SVGAnimatedAngle": false, + "SVGAnimatedBoolean": false, + "SVGAnimatedEnumeration": false, + "SVGAnimatedInteger": false, + "SVGAnimatedLength": false, + "SVGAnimatedLengthList": false, + "SVGAnimatedNumber": false, + "SVGAnimatedNumberList": false, + "SVGAnimatedPreserveAspectRatio": false, + "SVGAnimatedRect": false, + "SVGAnimatedString": false, + "SVGAnimatedTransformList": false, + "SVGAnimateElement": false, + "SVGAnimateMotionElement": false, + "SVGAnimateTransformElement": false, + "SVGAnimationElement": false, + "SVGCircleElement": false, + "SVGClipPathElement": false, + "SVGComponentTransferFunctionElement": false, + "SVGDefsElement": false, + "SVGDescElement": false, + "SVGElement": false, + "SVGEllipseElement": false, + "SVGFEBlendElement": false, + "SVGFEColorMatrixElement": false, + "SVGFEComponentTransferElement": false, + "SVGFECompositeElement": false, + "SVGFEConvolveMatrixElement": false, + "SVGFEDiffuseLightingElement": false, + "SVGFEDisplacementMapElement": false, + "SVGFEDistantLightElement": false, + "SVGFEDropShadowElement": false, + "SVGFEFloodElement": false, + "SVGFEFuncAElement": false, + "SVGFEFuncBElement": false, + "SVGFEFuncGElement": false, + "SVGFEFuncRElement": false, + "SVGFEGaussianBlurElement": false, + "SVGFEImageElement": false, + "SVGFEMergeElement": false, + "SVGFEMergeNodeElement": false, + "SVGFEMorphologyElement": false, + "SVGFEOffsetElement": false, + "SVGFEPointLightElement": false, + "SVGFESpecularLightingElement": false, + "SVGFESpotLightElement": false, + "SVGFETileElement": false, + "SVGFETurbulenceElement": false, + "SVGFilterElement": false, + "SVGForeignObjectElement": false, + "SVGGElement": false, + "SVGGeometryElement": false, + "SVGGradientElement": false, + "SVGGraphicsElement": false, + "SVGImageElement": false, + "SVGLength": false, + "SVGLengthList": false, + "SVGLinearGradientElement": false, + "SVGLineElement": false, + "SVGMarkerElement": false, + "SVGMaskElement": false, + "SVGMatrix": false, + "SVGMetadataElement": false, + "SVGMPathElement": false, + "SVGNumber": false, + "SVGNumberList": false, + "SVGPathElement": false, + "SVGPatternElement": false, + "SVGPoint": false, + "SVGPointList": false, + "SVGPolygonElement": false, + "SVGPolylineElement": false, + "SVGPreserveAspectRatio": false, + "SVGRadialGradientElement": false, + "SVGRect": false, + "SVGRectElement": false, + "SVGScriptElement": false, + "SVGSetElement": false, + "SVGStopElement": false, + "SVGStringList": false, + "SVGStyleElement": false, + "SVGSVGElement": false, + "SVGSwitchElement": false, + "SVGSymbolElement": false, + "SVGTextContentElement": false, + "SVGTextElement": false, + "SVGTextPathElement": false, + "SVGTextPositioningElement": false, + "SVGTitleElement": false, + "SVGTransform": false, + "SVGTransformList": false, + "SVGTSpanElement": false, + "SVGUnitTypes": false, + "SVGUseElement": false, + "SVGViewElement": false, + "SyncManager": false, + "TaskAttributionTiming": false, + "TaskController": false, + "TaskPriorityChangeEvent": false, + "TaskSignal": false, + "TEMPORARY": false, + "Text": false, + "TextDecoder": false, + "TextDecoderStream": false, + "TextEncoder": false, + "TextEncoderStream": false, + "TextEvent": false, + "TextFormat": false, + "TextFormatUpdateEvent": false, + "TextMetrics": false, + "TextTrack": false, + "TextTrackCue": false, + "TextTrackCueList": false, + "TextTrackList": false, + "TextUpdateEvent": false, + "TimeEvent": false, + "TimeRanges": false, + "ToggleEvent": false, + "toolbar": false, + "top": false, + "Touch": false, + "TouchEvent": false, + "TouchList": false, + "TrackEvent": false, + "TransformStream": false, + "TransformStreamDefaultController": false, + "TransitionEvent": false, + "Translator": false, + "TreeWalker": false, + "TrustedHTML": false, + "TrustedScript": false, + "TrustedScriptURL": false, + "TrustedTypePolicy": false, + "TrustedTypePolicyFactory": false, + "trustedTypes": false, + "UIEvent": false, + "URL": false, + "URLPattern": false, + "URLSearchParams": false, + "USB": false, + "USBAlternateInterface": false, + "USBConfiguration": false, + "USBConnectionEvent": false, + "USBDevice": false, + "USBEndpoint": false, + "USBInterface": false, + "USBInTransferResult": false, + "USBIsochronousInTransferPacket": false, + "USBIsochronousInTransferResult": false, + "USBIsochronousOutTransferPacket": false, + "USBIsochronousOutTransferResult": false, + "USBOutTransferResult": false, + "UserActivation": false, + "ValidityState": false, + "VideoColorSpace": false, + "VideoDecoder": false, + "VideoEncoder": false, + "VideoFrame": false, + "VideoPlaybackQuality": false, + "viewport": false, + "Viewport": false, + "ViewTimeline": false, + "ViewTransition": false, + "ViewTransitionTypeSet": false, + "VirtualKeyboard": false, + "VirtualKeyboardGeometryChangeEvent": false, + "VisibilityStateEntry": false, + "visualViewport": false, + "VisualViewport": false, + "VTTCue": false, + "VTTRegion": false, + "WakeLock": false, + "WakeLockSentinel": false, + "WaveShaperNode": false, + "WebAssembly": false, + "WebGL2RenderingContext": false, + "WebGLActiveInfo": false, + "WebGLBuffer": false, + "WebGLContextEvent": false, + "WebGLFramebuffer": false, + "WebGLObject": false, + "WebGLProgram": false, + "WebGLQuery": false, + "WebGLRenderbuffer": false, + "WebGLRenderingContext": false, + "WebGLSampler": false, + "WebGLShader": false, + "WebGLShaderPrecisionFormat": false, + "WebGLSync": false, + "WebGLTexture": false, + "WebGLTransformFeedback": false, + "WebGLUniformLocation": false, + "WebGLVertexArrayObject": false, + "WebSocket": false, + "WebSocketError": false, + "WebSocketStream": false, + "WebTransport": false, + "WebTransportBidirectionalStream": false, + "WebTransportDatagramDuplexStream": false, + "WebTransportError": false, + "WebTransportReceiveStream": false, + "WebTransportSendStream": false, + "WGSLLanguageFeatures": false, + "WheelEvent": false, + "when": false, + "window": false, + "Window": false, + "WindowControlsOverlay": false, + "WindowControlsOverlayGeometryChangeEvent": false, + "Worker": false, + "Worklet": false, + "WorkletGlobalScope": false, + "WritableStream": false, + "WritableStreamDefaultController": false, + "WritableStreamDefaultWriter": false, + "XMLDocument": false, + "XMLHttpRequest": false, + "XMLHttpRequestEventTarget": false, + "XMLHttpRequestUpload": false, + "XMLSerializer": false, + "XPathEvaluator": false, + "XPathExpression": false, + "XPathResult": false, + "XRAnchor": false, + "XRAnchorSet": false, + "XRBoundedReferenceSpace": false, + "XRCamera": false, + "XRCPUDepthInformation": false, + "XRDepthInformation": false, + "XRDOMOverlayState": false, + "XRFrame": false, + "XRHand": false, + "XRHitTestResult": false, + "XRHitTestSource": false, + "XRInputSource": false, + "XRInputSourceArray": false, + "XRInputSourceEvent": false, + "XRInputSourcesChangeEvent": false, + "XRJointPose": false, + "XRJointSpace": false, + "XRLayer": false, + "XRLightEstimate": false, + "XRLightProbe": false, + "XRPose": false, + "XRRay": false, + "XRReferenceSpace": false, + "XRReferenceSpaceEvent": false, + "XRRenderState": false, + "XRRigidTransform": false, + "XRSession": false, + "XRSessionEvent": false, + "XRSpace": false, + "XRSystem": false, + "XRTransientInputHitTestResult": false, + "XRTransientInputHitTestSource": false, + "XRView": false, + "XRViewerPose": false, + "XRViewport": false, + "XRWebGLBinding": false, + "XRWebGLDepthInformation": false, + "XRWebGLLayer": false, + "XSLTProcessor": false + } + }, + "errors": [ + { + "messageId": "defaultMessage", + "data": { + "name": "foo" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-restricted-globals > invalid + +```js +self["foo"] +``` + +```json +{ + "options": [ + { + "globals": [ + "foo" + ], + "checkGlobalObject": true + } + ], + "languageOptions": { + "globals": { + "AbortController": false, + "AbortSignal": false, + "AbsoluteOrientationSensor": false, + "AbstractRange": false, + "Accelerometer": false, + "addEventListener": false, + "ai": false, + "AI": false, + "AICreateMonitor": false, + "AITextSession": false, + "alert": false, + "AnalyserNode": false, + "Animation": false, + "AnimationEffect": false, + "AnimationEvent": false, + "AnimationPlaybackEvent": false, + "AnimationTimeline": false, + "AsyncDisposableStack": false, + "atob": false, + "Attr": false, + "Audio": false, + "AudioBuffer": false, + "AudioBufferSourceNode": false, + "AudioContext": false, + "AudioData": false, + "AudioDecoder": false, + "AudioDestinationNode": false, + "AudioEncoder": false, + "AudioListener": false, + "AudioNode": false, + "AudioParam": false, + "AudioParamMap": false, + "AudioProcessingEvent": false, + "AudioScheduledSourceNode": false, + "AudioSinkInfo": false, + "AudioWorklet": false, + "AudioWorkletGlobalScope": false, + "AudioWorkletNode": false, + "AudioWorkletProcessor": false, + "AuthenticatorAssertionResponse": false, + "AuthenticatorAttestationResponse": false, + "AuthenticatorResponse": false, + "BackgroundFetchManager": false, + "BackgroundFetchRecord": false, + "BackgroundFetchRegistration": false, + "BarcodeDetector": false, + "BarProp": false, + "BaseAudioContext": false, + "BatteryManager": false, + "BeforeUnloadEvent": false, + "BiquadFilterNode": false, + "Blob": false, + "BlobEvent": false, + "Bluetooth": false, + "BluetoothCharacteristicProperties": false, + "BluetoothDevice": false, + "BluetoothRemoteGATTCharacteristic": false, + "BluetoothRemoteGATTDescriptor": false, + "BluetoothRemoteGATTServer": false, + "BluetoothRemoteGATTService": false, + "BluetoothUUID": false, + "blur": false, + "BroadcastChannel": false, + "BrowserCaptureMediaStreamTrack": false, + "btoa": false, + "ByteLengthQueuingStrategy": false, + "Cache": false, + "caches": false, + "CacheStorage": false, + "cancelAnimationFrame": false, + "cancelIdleCallback": false, + "CanvasCaptureMediaStream": false, + "CanvasCaptureMediaStreamTrack": false, + "CanvasGradient": false, + "CanvasPattern": false, + "CanvasRenderingContext2D": false, + "CaptureController": false, + "CaretPosition": false, + "CDATASection": false, + "ChannelMergerNode": false, + "ChannelSplitterNode": false, + "ChapterInformation": false, + "CharacterBoundsUpdateEvent": false, + "CharacterData": false, + "clearInterval": false, + "clearTimeout": false, + "clientInformation": false, + "Clipboard": false, + "ClipboardChangeEvent": false, + "ClipboardEvent": false, + "ClipboardItem": false, + "close": false, + "closed": false, + "CloseEvent": false, + "CloseWatcher": false, + "CommandEvent": false, + "Comment": false, + "CompositionEvent": false, + "CompressionStream": false, + "confirm": false, + "console": false, + "ConstantSourceNode": false, + "ContentVisibilityAutoStateChangeEvent": false, + "ConvolverNode": false, + "CookieChangeEvent": false, + "CookieDeprecationLabel": false, + "cookieStore": false, + "CookieStore": false, + "CookieStoreManager": false, + "CountQueuingStrategy": false, + "createImageBitmap": false, + "CreateMonitor": false, + "Credential": false, + "credentialless": false, + "CredentialsContainer": false, + "CropTarget": false, + "crossOriginIsolated": false, + "crypto": false, + "Crypto": false, + "CryptoKey": false, + "CSPViolationReportBody": false, + "CSS": false, + "CSSAnimation": false, + "CSSConditionRule": false, + "CSSContainerRule": false, + "CSSCounterStyleRule": false, + "CSSFontFaceRule": false, + "CSSFontFeatureValuesRule": false, + "CSSFontPaletteValuesRule": false, + "CSSFunctionDeclarations": false, + "CSSFunctionDescriptors": false, + "CSSFunctionRule": false, + "CSSGroupingRule": false, + "CSSImageValue": false, + "CSSImportRule": false, + "CSSKeyframeRule": false, + "CSSKeyframesRule": false, + "CSSKeywordValue": false, + "CSSLayerBlockRule": false, + "CSSLayerStatementRule": false, + "CSSMarginRule": false, + "CSSMathClamp": false, + "CSSMathInvert": false, + "CSSMathMax": false, + "CSSMathMin": false, + "CSSMathNegate": false, + "CSSMathProduct": false, + "CSSMathSum": false, + "CSSMathValue": false, + "CSSMatrixComponent": false, + "CSSMediaRule": false, + "CSSNamespaceRule": false, + "CSSNestedDeclarations": false, + "CSSNumericArray": false, + "CSSNumericValue": false, + "CSSPageDescriptors": false, + "CSSPageRule": false, + "CSSPerspective": false, + "CSSPositionTryDescriptors": false, + "CSSPositionTryRule": false, + "CSSPositionValue": false, + "CSSPropertyRule": false, + "CSSRotate": false, + "CSSRule": false, + "CSSRuleList": false, + "CSSScale": false, + "CSSScopeRule": false, + "CSSSkew": false, + "CSSSkewX": false, + "CSSSkewY": false, + "CSSStartingStyleRule": false, + "CSSStyleDeclaration": false, + "CSSStyleRule": false, + "CSSStyleSheet": false, + "CSSStyleValue": false, + "CSSSupportsRule": false, + "CSSTransformComponent": false, + "CSSTransformValue": false, + "CSSTransition": false, + "CSSTranslate": false, + "CSSUnitValue": false, + "CSSUnparsedValue": false, + "CSSVariableReferenceValue": false, + "CSSViewTransitionRule": false, + "currentFrame": false, + "currentTime": false, + "CustomElementRegistry": false, + "customElements": false, + "CustomEvent": false, + "CustomStateSet": false, + "DataTransfer": false, + "DataTransferItem": false, + "DataTransferItemList": false, + "DecompressionStream": false, + "DelayNode": false, + "DelegatedInkTrailPresenter": false, + "DeviceMotionEvent": false, + "DeviceMotionEventAcceleration": false, + "DeviceMotionEventRotationRate": false, + "DeviceOrientationEvent": false, + "devicePixelRatio": false, + "DevicePosture": false, + "DigitalCredential": false, + "dispatchEvent": false, + "DisposableStack": false, + "document": false, + "Document": false, + "DocumentFragment": false, + "documentPictureInPicture": false, + "DocumentPictureInPicture": false, + "DocumentPictureInPictureEvent": false, + "DocumentTimeline": false, + "DocumentType": false, + "DOMError": false, + "DOMException": false, + "DOMImplementation": false, + "DOMMatrix": false, + "DOMMatrixReadOnly": false, + "DOMParser": false, + "DOMPoint": false, + "DOMPointReadOnly": false, + "DOMQuad": false, + "DOMRect": false, + "DOMRectList": false, + "DOMRectReadOnly": false, + "DOMStringList": false, + "DOMStringMap": false, + "DOMTokenList": false, + "DragEvent": false, + "DynamicsCompressorNode": false, + "EditContext": false, + "Element": false, + "ElementInternals": false, + "EncodedAudioChunk": false, + "EncodedVideoChunk": false, + "ErrorEvent": false, + "event": false, + "Event": false, + "EventCounts": false, + "EventSource": false, + "EventTarget": false, + "external": false, + "External": false, + "EyeDropper": false, + "FeaturePolicy": false, + "FederatedCredential": false, + "fence": false, + "Fence": false, + "FencedFrameConfig": false, + "fetch": false, + "fetchLater": false, + "FetchLaterResult": false, + "File": false, + "FileList": false, + "FileReader": false, + "FileSystem": false, + "FileSystemDirectoryEntry": false, + "FileSystemDirectoryHandle": false, + "FileSystemDirectoryReader": false, + "FileSystemEntry": false, + "FileSystemFileEntry": false, + "FileSystemFileHandle": false, + "FileSystemHandle": false, + "FileSystemObserver": false, + "FileSystemWritableFileStream": false, + "find": false, + "focus": false, + "FocusEvent": false, + "FontData": false, + "FontFace": false, + "FontFaceSet": false, + "FontFaceSetLoadEvent": false, + "FormData": false, + "FormDataEvent": false, + "FragmentDirective": false, + "frameElement": false, + "frames": false, + "GainNode": false, + "Gamepad": false, + "GamepadAxisMoveEvent": false, + "GamepadButton": false, + "GamepadButtonEvent": false, + "GamepadEvent": false, + "GamepadHapticActuator": false, + "GamepadPose": false, + "Geolocation": false, + "GeolocationCoordinates": false, + "GeolocationPosition": false, + "GeolocationPositionError": false, + "getComputedStyle": false, + "getScreenDetails": false, + "getSelection": false, + "GPU": false, + "GPUAdapter": false, + "GPUAdapterInfo": false, + "GPUBindGroup": false, + "GPUBindGroupLayout": false, + "GPUBuffer": false, + "GPUBufferUsage": false, + "GPUCanvasContext": false, + "GPUColorWrite": false, + "GPUCommandBuffer": false, + "GPUCommandEncoder": false, + "GPUCompilationInfo": false, + "GPUCompilationMessage": false, + "GPUComputePassEncoder": false, + "GPUComputePipeline": false, + "GPUDevice": false, + "GPUDeviceLostInfo": false, + "GPUError": false, + "GPUExternalTexture": false, + "GPUInternalError": false, + "GPUMapMode": false, + "GPUOutOfMemoryError": false, + "GPUPipelineError": false, + "GPUPipelineLayout": false, + "GPUQuerySet": false, + "GPUQueue": false, + "GPURenderBundle": false, + "GPURenderBundleEncoder": false, + "GPURenderPassEncoder": false, + "GPURenderPipeline": false, + "GPUSampler": false, + "GPUShaderModule": false, + "GPUShaderStage": false, + "GPUSupportedFeatures": false, + "GPUSupportedLimits": false, + "GPUTexture": false, + "GPUTextureUsage": false, + "GPUTextureView": false, + "GPUUncapturedErrorEvent": false, + "GPUValidationError": false, + "GravitySensor": false, + "Gyroscope": false, + "HashChangeEvent": false, + "Headers": false, + "HID": false, + "HIDConnectionEvent": false, + "HIDDevice": false, + "HIDInputReportEvent": false, + "Highlight": false, + "HighlightRegistry": false, + "history": false, + "History": false, + "HTMLAllCollection": false, + "HTMLAnchorElement": false, + "HTMLAreaElement": false, + "HTMLAudioElement": false, + "HTMLBaseElement": false, + "HTMLBodyElement": false, + "HTMLBRElement": false, + "HTMLButtonElement": false, + "HTMLCanvasElement": false, + "HTMLCollection": false, + "HTMLDataElement": false, + "HTMLDataListElement": false, + "HTMLDetailsElement": false, + "HTMLDialogElement": false, + "HTMLDirectoryElement": false, + "HTMLDivElement": false, + "HTMLDListElement": false, + "HTMLDocument": false, + "HTMLElement": false, + "HTMLEmbedElement": false, + "HTMLFencedFrameElement": false, + "HTMLFieldSetElement": false, + "HTMLFontElement": false, + "HTMLFormControlsCollection": false, + "HTMLFormElement": false, + "HTMLFrameElement": false, + "HTMLFrameSetElement": false, + "HTMLHeadElement": false, + "HTMLHeadingElement": false, + "HTMLHRElement": false, + "HTMLHtmlElement": false, + "HTMLIFrameElement": false, + "HTMLImageElement": false, + "HTMLInputElement": false, + "HTMLLabelElement": false, + "HTMLLegendElement": false, + "HTMLLIElement": false, + "HTMLLinkElement": false, + "HTMLMapElement": false, + "HTMLMarqueeElement": false, + "HTMLMediaElement": false, + "HTMLMenuElement": false, + "HTMLMetaElement": false, + "HTMLMeterElement": false, + "HTMLModElement": false, + "HTMLObjectElement": false, + "HTMLOListElement": false, + "HTMLOptGroupElement": false, + "HTMLOptionElement": false, + "HTMLOptionsCollection": false, + "HTMLOutputElement": false, + "HTMLParagraphElement": false, + "HTMLParamElement": false, + "HTMLPictureElement": false, + "HTMLPreElement": false, + "HTMLProgressElement": false, + "HTMLQuoteElement": false, + "HTMLScriptElement": false, + "HTMLSelectedContentElement": false, + "HTMLSelectElement": false, + "HTMLSlotElement": false, + "HTMLSourceElement": false, + "HTMLSpanElement": false, + "HTMLStyleElement": false, + "HTMLTableCaptionElement": false, + "HTMLTableCellElement": false, + "HTMLTableColElement": false, + "HTMLTableElement": false, + "HTMLTableRowElement": false, + "HTMLTableSectionElement": false, + "HTMLTemplateElement": false, + "HTMLTextAreaElement": false, + "HTMLTimeElement": false, + "HTMLTitleElement": false, + "HTMLTrackElement": false, + "HTMLUListElement": false, + "HTMLUnknownElement": false, + "HTMLVideoElement": false, + "IDBCursor": false, + "IDBCursorWithValue": false, + "IDBDatabase": false, + "IDBFactory": false, + "IDBIndex": false, + "IDBKeyRange": false, + "IDBObjectStore": false, + "IDBOpenDBRequest": false, + "IDBRecord": false, + "IDBRequest": false, + "IDBTransaction": false, + "IDBVersionChangeEvent": false, + "IdentityCredential": false, + "IdentityCredentialError": false, + "IdentityProvider": false, + "IdleDeadline": false, + "IdleDetector": false, + "IIRFilterNode": false, + "Image": false, + "ImageBitmap": false, + "ImageBitmapRenderingContext": false, + "ImageCapture": false, + "ImageData": false, + "ImageDecoder": false, + "ImageTrack": false, + "ImageTrackList": false, + "indexedDB": false, + "Ink": false, + "innerHeight": false, + "innerWidth": false, + "InputDeviceCapabilities": false, + "InputDeviceInfo": false, + "InputEvent": false, + "IntegrityViolationReportBody": false, + "InterestEvent": false, + "IntersectionObserver": false, + "IntersectionObserverEntry": false, + "isSecureContext": false, + "Keyboard": false, + "KeyboardEvent": false, + "KeyboardLayoutMap": false, + "KeyframeEffect": false, + "LanguageDetector": false, + "LargestContentfulPaint": false, + "LaunchParams": false, + "launchQueue": false, + "LaunchQueue": false, + "LayoutShift": false, + "LayoutShiftAttribution": false, + "length": false, + "LinearAccelerationSensor": false, + "localStorage": false, + "location": true, + "Location": false, + "locationbar": false, + "Lock": false, + "LockManager": false, + "matchMedia": false, + "MathMLElement": false, + "MediaCapabilities": false, + "MediaCapabilitiesInfo": false, + "MediaDeviceInfo": false, + "MediaDevices": false, + "MediaElementAudioSourceNode": false, + "MediaEncryptedEvent": false, + "MediaError": false, + "MediaKeyError": false, + "MediaKeyMessageEvent": false, + "MediaKeys": false, + "MediaKeySession": false, + "MediaKeyStatusMap": false, + "MediaKeySystemAccess": false, + "MediaList": false, + "MediaMetadata": false, + "MediaQueryList": false, + "MediaQueryListEvent": false, + "MediaRecorder": false, + "MediaRecorderErrorEvent": false, + "MediaSession": false, + "MediaSource": false, + "MediaSourceHandle": false, + "MediaStream": false, + "MediaStreamAudioDestinationNode": false, + "MediaStreamAudioSourceNode": false, + "MediaStreamEvent": false, + "MediaStreamTrack": false, + "MediaStreamTrackAudioSourceNode": false, + "MediaStreamTrackAudioStats": false, + "MediaStreamTrackEvent": false, + "MediaStreamTrackGenerator": false, + "MediaStreamTrackProcessor": false, + "MediaStreamTrackVideoStats": false, + "menubar": false, + "MessageChannel": false, + "MessageEvent": false, + "MessagePort": false, + "MIDIAccess": false, + "MIDIConnectionEvent": false, + "MIDIInput": false, + "MIDIInputMap": false, + "MIDIMessageEvent": false, + "MIDIOutput": false, + "MIDIOutputMap": false, + "MIDIPort": false, + "MimeType": false, + "MimeTypeArray": false, + "model": false, + "ModelGenericSession": false, + "ModelManager": false, + "MouseEvent": false, + "moveBy": false, + "moveTo": false, + "MutationEvent": false, + "MutationObserver": false, + "MutationRecord": false, + "name": false, + "NamedNodeMap": false, + "NavigateEvent": false, + "navigation": false, + "Navigation": false, + "NavigationActivation": false, + "NavigationCurrentEntryChangeEvent": false, + "NavigationDestination": false, + "NavigationHistoryEntry": false, + "NavigationPrecommitController": false, + "NavigationPreloadManager": false, + "NavigationTransition": false, + "navigator": false, + "Navigator": false, + "NavigatorLogin": false, + "NavigatorManagedData": false, + "NavigatorUAData": false, + "NetworkInformation": false, + "Node": false, + "NodeFilter": false, + "NodeIterator": false, + "NodeList": false, + "Notification": false, + "NotifyPaintEvent": false, + "NotRestoredReasonDetails": false, + "NotRestoredReasons": false, + "Observable": false, + "OfflineAudioCompletionEvent": false, + "OfflineAudioContext": false, + "offscreenBuffering": false, + "OffscreenCanvas": false, + "OffscreenCanvasRenderingContext2D": false, + "onabort": true, + "onafterprint": true, + "onanimationcancel": true, + "onanimationend": true, + "onanimationiteration": true, + "onanimationstart": true, + "onappinstalled": true, + "onauxclick": true, + "onbeforeinput": true, + "onbeforeinstallprompt": true, + "onbeforematch": true, + "onbeforeprint": true, + "onbeforetoggle": true, + "onbeforeunload": true, + "onbeforexrselect": true, + "onblur": true, + "oncancel": true, + "oncanplay": true, + "oncanplaythrough": true, + "onchange": true, + "onclick": true, + "onclose": true, + "oncommand": true, + "oncontentvisibilityautostatechange": true, + "oncontextlost": true, + "oncontextmenu": true, + "oncontextrestored": true, + "oncopy": true, + "oncuechange": true, + "oncut": true, + "ondblclick": true, + "ondevicemotion": true, + "ondeviceorientation": true, + "ondeviceorientationabsolute": true, + "ondrag": true, + "ondragend": true, + "ondragenter": true, + "ondragleave": true, + "ondragover": true, + "ondragstart": true, + "ondrop": true, + "ondurationchange": true, + "onemptied": true, + "onended": true, + "onerror": true, + "onfocus": true, + "onformdata": true, + "ongamepadconnected": true, + "ongamepaddisconnected": true, + "ongotpointercapture": true, + "onhashchange": true, + "oninput": true, + "oninvalid": true, + "onkeydown": true, + "onkeypress": true, + "onkeyup": true, + "onlanguagechange": true, + "onload": true, + "onloadeddata": true, + "onloadedmetadata": true, + "onloadstart": true, + "onlostpointercapture": true, + "onmessage": true, + "onmessageerror": true, + "onmousedown": true, + "onmouseenter": true, + "onmouseleave": true, + "onmousemove": true, + "onmouseout": true, + "onmouseover": true, + "onmouseup": true, + "onmousewheel": true, + "onoffline": true, + "ononline": true, + "onpagehide": true, + "onpagereveal": true, + "onpageshow": true, + "onpageswap": true, + "onpaste": true, + "onpause": true, + "onplay": true, + "onplaying": true, + "onpointercancel": true, + "onpointerdown": true, + "onpointerenter": true, + "onpointerleave": true, + "onpointermove": true, + "onpointerout": true, + "onpointerover": true, + "onpointerrawupdate": true, + "onpointerup": true, + "onpopstate": true, + "onprogress": true, + "onratechange": true, + "onrejectionhandled": true, + "onreset": true, + "onresize": true, + "onscroll": true, + "onscrollend": true, + "onscrollsnapchange": true, + "onscrollsnapchanging": true, + "onsearch": true, + "onsecuritypolicyviolation": true, + "onseeked": true, + "onseeking": true, + "onselect": true, + "onselectionchange": true, + "onselectstart": true, + "onslotchange": true, + "onstalled": true, + "onstorage": true, + "onsubmit": true, + "onsuspend": true, + "ontimeupdate": true, + "ontoggle": true, + "ontransitioncancel": true, + "ontransitionend": true, + "ontransitionrun": true, + "ontransitionstart": true, + "onunhandledrejection": true, + "onunload": true, + "onvolumechange": true, + "onwaiting": true, + "onwheel": true, + "open": false, + "opener": false, + "Option": false, + "OrientationSensor": false, + "origin": false, + "originAgentCluster": false, + "OscillatorNode": false, + "OTPCredential": false, + "outerHeight": false, + "outerWidth": false, + "OverconstrainedError": false, + "PageRevealEvent": false, + "PageSwapEvent": false, + "PageTransitionEvent": false, + "pageXOffset": false, + "pageYOffset": false, + "PannerNode": false, + "parent": false, + "PasswordCredential": false, + "Path2D": false, + "PaymentAddress": false, + "PaymentManager": false, + "PaymentMethodChangeEvent": false, + "PaymentRequest": false, + "PaymentRequestUpdateEvent": false, + "PaymentResponse": false, + "performance": false, + "Performance": false, + "PerformanceElementTiming": false, + "PerformanceEntry": false, + "PerformanceEventTiming": false, + "PerformanceLongAnimationFrameTiming": false, + "PerformanceLongTaskTiming": false, + "PerformanceMark": false, + "PerformanceMeasure": false, + "PerformanceNavigation": false, + "PerformanceNavigationTiming": false, + "PerformanceObserver": false, + "PerformanceObserverEntryList": false, + "PerformancePaintTiming": false, + "PerformanceResourceTiming": false, + "PerformanceScriptTiming": false, + "PerformanceServerTiming": false, + "PerformanceTiming": false, + "PeriodicSyncManager": false, + "PeriodicWave": false, + "Permissions": false, + "PermissionStatus": false, + "PERSISTENT": false, + "personalbar": false, + "PictureInPictureEvent": false, + "PictureInPictureWindow": false, + "Plugin": false, + "PluginArray": false, + "PointerEvent": false, + "PopStateEvent": false, + "postMessage": false, + "Presentation": false, + "PresentationAvailability": false, + "PresentationConnection": false, + "PresentationConnectionAvailableEvent": false, + "PresentationConnectionCloseEvent": false, + "PresentationConnectionList": false, + "PresentationReceiver": false, + "PresentationRequest": false, + "PressureObserver": false, + "PressureRecord": false, + "print": false, + "ProcessingInstruction": false, + "Profiler": false, + "ProgressEvent": false, + "PromiseRejectionEvent": false, + "prompt": false, + "ProtectedAudience": false, + "PublicKeyCredential": false, + "PushManager": false, + "PushSubscription": false, + "PushSubscriptionOptions": false, + "queryLocalFonts": false, + "queueMicrotask": false, + "QuotaExceededError": false, + "RadioNodeList": false, + "Range": false, + "ReadableByteStreamController": false, + "ReadableStream": false, + "ReadableStreamBYOBReader": false, + "ReadableStreamBYOBRequest": false, + "ReadableStreamDefaultController": false, + "ReadableStreamDefaultReader": false, + "registerProcessor": false, + "RelativeOrientationSensor": false, + "RemotePlayback": false, + "removeEventListener": false, + "ReportBody": false, + "reportError": false, + "ReportingObserver": false, + "Request": false, + "requestAnimationFrame": false, + "requestIdleCallback": false, + "resizeBy": false, + "ResizeObserver": false, + "ResizeObserverEntry": false, + "ResizeObserverSize": false, + "resizeTo": false, + "Response": false, + "RestrictionTarget": false, + "RTCCertificate": false, + "RTCDataChannel": false, + "RTCDataChannelEvent": false, + "RTCDtlsTransport": false, + "RTCDTMFSender": false, + "RTCDTMFToneChangeEvent": false, + "RTCEncodedAudioFrame": false, + "RTCEncodedVideoFrame": false, + "RTCError": false, + "RTCErrorEvent": false, + "RTCIceCandidate": false, + "RTCIceTransport": false, + "RTCPeerConnection": false, + "RTCPeerConnectionIceErrorEvent": false, + "RTCPeerConnectionIceEvent": false, + "RTCRtpReceiver": false, + "RTCRtpScriptTransform": false, + "RTCRtpSender": false, + "RTCRtpTransceiver": false, + "RTCSctpTransport": false, + "RTCSessionDescription": false, + "RTCStatsReport": false, + "RTCTrackEvent": false, + "sampleRate": false, + "scheduler": false, + "Scheduler": false, + "Scheduling": false, + "screen": false, + "Screen": false, + "ScreenDetailed": false, + "ScreenDetails": false, + "screenLeft": false, + "ScreenOrientation": false, + "screenTop": false, + "screenX": false, + "screenY": false, + "ScriptProcessorNode": false, + "scroll": false, + "scrollbars": false, + "scrollBy": false, + "ScrollTimeline": false, + "scrollTo": false, + "scrollX": false, + "scrollY": false, + "SecurityPolicyViolationEvent": false, + "Selection": false, + "self": false, + "Sensor": false, + "SensorErrorEvent": false, + "Serial": false, + "SerialPort": false, + "ServiceWorker": false, + "ServiceWorkerContainer": false, + "ServiceWorkerRegistration": false, + "sessionStorage": false, + "setInterval": false, + "setTimeout": false, + "ShadowRoot": false, + "sharedStorage": false, + "SharedStorage": false, + "SharedStorageAppendMethod": false, + "SharedStorageClearMethod": false, + "SharedStorageDeleteMethod": false, + "SharedStorageModifierMethod": false, + "SharedStorageSetMethod": false, + "SharedStorageWorklet": false, + "SharedWorker": false, + "showDirectoryPicker": false, + "showOpenFilePicker": false, + "showSaveFilePicker": false, + "SnapEvent": false, + "SourceBuffer": false, + "SourceBufferList": false, + "SpeechGrammar": false, + "SpeechGrammarList": false, + "SpeechRecognition": false, + "SpeechRecognitionErrorEvent": false, + "SpeechRecognitionEvent": false, + "SpeechRecognitionPhrase": false, + "speechSynthesis": false, + "SpeechSynthesis": false, + "SpeechSynthesisErrorEvent": false, + "SpeechSynthesisEvent": false, + "SpeechSynthesisUtterance": false, + "SpeechSynthesisVoice": false, + "StaticRange": false, + "status": false, + "statusbar": false, + "StereoPannerNode": false, + "stop": false, + "Storage": false, + "StorageBucket": false, + "StorageBucketManager": false, + "StorageEvent": false, + "StorageManager": false, + "structuredClone": false, + "styleMedia": false, + "StylePropertyMap": false, + "StylePropertyMapReadOnly": false, + "StyleSheet": false, + "StyleSheetList": false, + "SubmitEvent": false, + "Subscriber": false, + "SubtleCrypto": false, + "Summarizer": false, + "SuppressedError": false, + "SVGAElement": false, + "SVGAngle": false, + "SVGAnimatedAngle": false, + "SVGAnimatedBoolean": false, + "SVGAnimatedEnumeration": false, + "SVGAnimatedInteger": false, + "SVGAnimatedLength": false, + "SVGAnimatedLengthList": false, + "SVGAnimatedNumber": false, + "SVGAnimatedNumberList": false, + "SVGAnimatedPreserveAspectRatio": false, + "SVGAnimatedRect": false, + "SVGAnimatedString": false, + "SVGAnimatedTransformList": false, + "SVGAnimateElement": false, + "SVGAnimateMotionElement": false, + "SVGAnimateTransformElement": false, + "SVGAnimationElement": false, + "SVGCircleElement": false, + "SVGClipPathElement": false, + "SVGComponentTransferFunctionElement": false, + "SVGDefsElement": false, + "SVGDescElement": false, + "SVGElement": false, + "SVGEllipseElement": false, + "SVGFEBlendElement": false, + "SVGFEColorMatrixElement": false, + "SVGFEComponentTransferElement": false, + "SVGFECompositeElement": false, + "SVGFEConvolveMatrixElement": false, + "SVGFEDiffuseLightingElement": false, + "SVGFEDisplacementMapElement": false, + "SVGFEDistantLightElement": false, + "SVGFEDropShadowElement": false, + "SVGFEFloodElement": false, + "SVGFEFuncAElement": false, + "SVGFEFuncBElement": false, + "SVGFEFuncGElement": false, + "SVGFEFuncRElement": false, + "SVGFEGaussianBlurElement": false, + "SVGFEImageElement": false, + "SVGFEMergeElement": false, + "SVGFEMergeNodeElement": false, + "SVGFEMorphologyElement": false, + "SVGFEOffsetElement": false, + "SVGFEPointLightElement": false, + "SVGFESpecularLightingElement": false, + "SVGFESpotLightElement": false, + "SVGFETileElement": false, + "SVGFETurbulenceElement": false, + "SVGFilterElement": false, + "SVGForeignObjectElement": false, + "SVGGElement": false, + "SVGGeometryElement": false, + "SVGGradientElement": false, + "SVGGraphicsElement": false, + "SVGImageElement": false, + "SVGLength": false, + "SVGLengthList": false, + "SVGLinearGradientElement": false, + "SVGLineElement": false, + "SVGMarkerElement": false, + "SVGMaskElement": false, + "SVGMatrix": false, + "SVGMetadataElement": false, + "SVGMPathElement": false, + "SVGNumber": false, + "SVGNumberList": false, + "SVGPathElement": false, + "SVGPatternElement": false, + "SVGPoint": false, + "SVGPointList": false, + "SVGPolygonElement": false, + "SVGPolylineElement": false, + "SVGPreserveAspectRatio": false, + "SVGRadialGradientElement": false, + "SVGRect": false, + "SVGRectElement": false, + "SVGScriptElement": false, + "SVGSetElement": false, + "SVGStopElement": false, + "SVGStringList": false, + "SVGStyleElement": false, + "SVGSVGElement": false, + "SVGSwitchElement": false, + "SVGSymbolElement": false, + "SVGTextContentElement": false, + "SVGTextElement": false, + "SVGTextPathElement": false, + "SVGTextPositioningElement": false, + "SVGTitleElement": false, + "SVGTransform": false, + "SVGTransformList": false, + "SVGTSpanElement": false, + "SVGUnitTypes": false, + "SVGUseElement": false, + "SVGViewElement": false, + "SyncManager": false, + "TaskAttributionTiming": false, + "TaskController": false, + "TaskPriorityChangeEvent": false, + "TaskSignal": false, + "TEMPORARY": false, + "Text": false, + "TextDecoder": false, + "TextDecoderStream": false, + "TextEncoder": false, + "TextEncoderStream": false, + "TextEvent": false, + "TextFormat": false, + "TextFormatUpdateEvent": false, + "TextMetrics": false, + "TextTrack": false, + "TextTrackCue": false, + "TextTrackCueList": false, + "TextTrackList": false, + "TextUpdateEvent": false, + "TimeEvent": false, + "TimeRanges": false, + "ToggleEvent": false, + "toolbar": false, + "top": false, + "Touch": false, + "TouchEvent": false, + "TouchList": false, + "TrackEvent": false, + "TransformStream": false, + "TransformStreamDefaultController": false, + "TransitionEvent": false, + "Translator": false, + "TreeWalker": false, + "TrustedHTML": false, + "TrustedScript": false, + "TrustedScriptURL": false, + "TrustedTypePolicy": false, + "TrustedTypePolicyFactory": false, + "trustedTypes": false, + "UIEvent": false, + "URL": false, + "URLPattern": false, + "URLSearchParams": false, + "USB": false, + "USBAlternateInterface": false, + "USBConfiguration": false, + "USBConnectionEvent": false, + "USBDevice": false, + "USBEndpoint": false, + "USBInterface": false, + "USBInTransferResult": false, + "USBIsochronousInTransferPacket": false, + "USBIsochronousInTransferResult": false, + "USBIsochronousOutTransferPacket": false, + "USBIsochronousOutTransferResult": false, + "USBOutTransferResult": false, + "UserActivation": false, + "ValidityState": false, + "VideoColorSpace": false, + "VideoDecoder": false, + "VideoEncoder": false, + "VideoFrame": false, + "VideoPlaybackQuality": false, + "viewport": false, + "Viewport": false, + "ViewTimeline": false, + "ViewTransition": false, + "ViewTransitionTypeSet": false, + "VirtualKeyboard": false, + "VirtualKeyboardGeometryChangeEvent": false, + "VisibilityStateEntry": false, + "visualViewport": false, + "VisualViewport": false, + "VTTCue": false, + "VTTRegion": false, + "WakeLock": false, + "WakeLockSentinel": false, + "WaveShaperNode": false, + "WebAssembly": false, + "WebGL2RenderingContext": false, + "WebGLActiveInfo": false, + "WebGLBuffer": false, + "WebGLContextEvent": false, + "WebGLFramebuffer": false, + "WebGLObject": false, + "WebGLProgram": false, + "WebGLQuery": false, + "WebGLRenderbuffer": false, + "WebGLRenderingContext": false, + "WebGLSampler": false, + "WebGLShader": false, + "WebGLShaderPrecisionFormat": false, + "WebGLSync": false, + "WebGLTexture": false, + "WebGLTransformFeedback": false, + "WebGLUniformLocation": false, + "WebGLVertexArrayObject": false, + "WebSocket": false, + "WebSocketError": false, + "WebSocketStream": false, + "WebTransport": false, + "WebTransportBidirectionalStream": false, + "WebTransportDatagramDuplexStream": false, + "WebTransportError": false, + "WebTransportReceiveStream": false, + "WebTransportSendStream": false, + "WGSLLanguageFeatures": false, + "WheelEvent": false, + "when": false, + "window": false, + "Window": false, + "WindowControlsOverlay": false, + "WindowControlsOverlayGeometryChangeEvent": false, + "Worker": false, + "Worklet": false, + "WorkletGlobalScope": false, + "WritableStream": false, + "WritableStreamDefaultController": false, + "WritableStreamDefaultWriter": false, + "XMLDocument": false, + "XMLHttpRequest": false, + "XMLHttpRequestEventTarget": false, + "XMLHttpRequestUpload": false, + "XMLSerializer": false, + "XPathEvaluator": false, + "XPathExpression": false, + "XPathResult": false, + "XRAnchor": false, + "XRAnchorSet": false, + "XRBoundedReferenceSpace": false, + "XRCamera": false, + "XRCPUDepthInformation": false, + "XRDepthInformation": false, + "XRDOMOverlayState": false, + "XRFrame": false, + "XRHand": false, + "XRHitTestResult": false, + "XRHitTestSource": false, + "XRInputSource": false, + "XRInputSourceArray": false, + "XRInputSourceEvent": false, + "XRInputSourcesChangeEvent": false, + "XRJointPose": false, + "XRJointSpace": false, + "XRLayer": false, + "XRLightEstimate": false, + "XRLightProbe": false, + "XRPose": false, + "XRRay": false, + "XRReferenceSpace": false, + "XRReferenceSpaceEvent": false, + "XRRenderState": false, + "XRRigidTransform": false, + "XRSession": false, + "XRSessionEvent": false, + "XRSpace": false, + "XRSystem": false, + "XRTransientInputHitTestResult": false, + "XRTransientInputHitTestSource": false, + "XRView": false, + "XRViewerPose": false, + "XRViewport": false, + "XRWebGLBinding": false, + "XRWebGLDepthInformation": false, + "XRWebGLLayer": false, + "XSLTProcessor": false + } + }, + "errors": [ + { + "messageId": "defaultMessage", + "data": { + "name": "foo" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-restricted-globals > invalid + +```js +globalThis["foo"] +``` + +```json +{ + "options": [ + { + "globals": [ + "foo" + ], + "checkGlobalObject": true + } + ], + "languageOptions": { + "ecmaVersion": 2020 + }, + "errors": [ + { + "messageId": "defaultMessage", + "data": { + "name": "foo" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-restricted-globals > invalid + +```js +myGlobal["foo"] +``` + +```json +{ + "options": [ + { + "globals": [ + "foo" + ], + "checkGlobalObject": true, + "globalObjects": [ + "myGlobal" + ] + } + ], + "languageOptions": { + "globals": { + "myGlobal": "readonly" + } + }, + "errors": [ + { + "messageId": "defaultMessage", + "data": { + "name": "foo" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-restricted-globals > invalid + +```js +window?.foo() +``` + +```json +{ + "options": [ + { + "globals": [ + "foo" + ], + "checkGlobalObject": true + } + ], + "languageOptions": { + "globals": { + "AbortController": false, + "AbortSignal": false, + "AbsoluteOrientationSensor": false, + "AbstractRange": false, + "Accelerometer": false, + "addEventListener": false, + "ai": false, + "AI": false, + "AICreateMonitor": false, + "AITextSession": false, + "alert": false, + "AnalyserNode": false, + "Animation": false, + "AnimationEffect": false, + "AnimationEvent": false, + "AnimationPlaybackEvent": false, + "AnimationTimeline": false, + "AsyncDisposableStack": false, + "atob": false, + "Attr": false, + "Audio": false, + "AudioBuffer": false, + "AudioBufferSourceNode": false, + "AudioContext": false, + "AudioData": false, + "AudioDecoder": false, + "AudioDestinationNode": false, + "AudioEncoder": false, + "AudioListener": false, + "AudioNode": false, + "AudioParam": false, + "AudioParamMap": false, + "AudioProcessingEvent": false, + "AudioScheduledSourceNode": false, + "AudioSinkInfo": false, + "AudioWorklet": false, + "AudioWorkletGlobalScope": false, + "AudioWorkletNode": false, + "AudioWorkletProcessor": false, + "AuthenticatorAssertionResponse": false, + "AuthenticatorAttestationResponse": false, + "AuthenticatorResponse": false, + "BackgroundFetchManager": false, + "BackgroundFetchRecord": false, + "BackgroundFetchRegistration": false, + "BarcodeDetector": false, + "BarProp": false, + "BaseAudioContext": false, + "BatteryManager": false, + "BeforeUnloadEvent": false, + "BiquadFilterNode": false, + "Blob": false, + "BlobEvent": false, + "Bluetooth": false, + "BluetoothCharacteristicProperties": false, + "BluetoothDevice": false, + "BluetoothRemoteGATTCharacteristic": false, + "BluetoothRemoteGATTDescriptor": false, + "BluetoothRemoteGATTServer": false, + "BluetoothRemoteGATTService": false, + "BluetoothUUID": false, + "blur": false, + "BroadcastChannel": false, + "BrowserCaptureMediaStreamTrack": false, + "btoa": false, + "ByteLengthQueuingStrategy": false, + "Cache": false, + "caches": false, + "CacheStorage": false, + "cancelAnimationFrame": false, + "cancelIdleCallback": false, + "CanvasCaptureMediaStream": false, + "CanvasCaptureMediaStreamTrack": false, + "CanvasGradient": false, + "CanvasPattern": false, + "CanvasRenderingContext2D": false, + "CaptureController": false, + "CaretPosition": false, + "CDATASection": false, + "ChannelMergerNode": false, + "ChannelSplitterNode": false, + "ChapterInformation": false, + "CharacterBoundsUpdateEvent": false, + "CharacterData": false, + "clearInterval": false, + "clearTimeout": false, + "clientInformation": false, + "Clipboard": false, + "ClipboardChangeEvent": false, + "ClipboardEvent": false, + "ClipboardItem": false, + "close": false, + "closed": false, + "CloseEvent": false, + "CloseWatcher": false, + "CommandEvent": false, + "Comment": false, + "CompositionEvent": false, + "CompressionStream": false, + "confirm": false, + "console": false, + "ConstantSourceNode": false, + "ContentVisibilityAutoStateChangeEvent": false, + "ConvolverNode": false, + "CookieChangeEvent": false, + "CookieDeprecationLabel": false, + "cookieStore": false, + "CookieStore": false, + "CookieStoreManager": false, + "CountQueuingStrategy": false, + "createImageBitmap": false, + "CreateMonitor": false, + "Credential": false, + "credentialless": false, + "CredentialsContainer": false, + "CropTarget": false, + "crossOriginIsolated": false, + "crypto": false, + "Crypto": false, + "CryptoKey": false, + "CSPViolationReportBody": false, + "CSS": false, + "CSSAnimation": false, + "CSSConditionRule": false, + "CSSContainerRule": false, + "CSSCounterStyleRule": false, + "CSSFontFaceRule": false, + "CSSFontFeatureValuesRule": false, + "CSSFontPaletteValuesRule": false, + "CSSFunctionDeclarations": false, + "CSSFunctionDescriptors": false, + "CSSFunctionRule": false, + "CSSGroupingRule": false, + "CSSImageValue": false, + "CSSImportRule": false, + "CSSKeyframeRule": false, + "CSSKeyframesRule": false, + "CSSKeywordValue": false, + "CSSLayerBlockRule": false, + "CSSLayerStatementRule": false, + "CSSMarginRule": false, + "CSSMathClamp": false, + "CSSMathInvert": false, + "CSSMathMax": false, + "CSSMathMin": false, + "CSSMathNegate": false, + "CSSMathProduct": false, + "CSSMathSum": false, + "CSSMathValue": false, + "CSSMatrixComponent": false, + "CSSMediaRule": false, + "CSSNamespaceRule": false, + "CSSNestedDeclarations": false, + "CSSNumericArray": false, + "CSSNumericValue": false, + "CSSPageDescriptors": false, + "CSSPageRule": false, + "CSSPerspective": false, + "CSSPositionTryDescriptors": false, + "CSSPositionTryRule": false, + "CSSPositionValue": false, + "CSSPropertyRule": false, + "CSSRotate": false, + "CSSRule": false, + "CSSRuleList": false, + "CSSScale": false, + "CSSScopeRule": false, + "CSSSkew": false, + "CSSSkewX": false, + "CSSSkewY": false, + "CSSStartingStyleRule": false, + "CSSStyleDeclaration": false, + "CSSStyleRule": false, + "CSSStyleSheet": false, + "CSSStyleValue": false, + "CSSSupportsRule": false, + "CSSTransformComponent": false, + "CSSTransformValue": false, + "CSSTransition": false, + "CSSTranslate": false, + "CSSUnitValue": false, + "CSSUnparsedValue": false, + "CSSVariableReferenceValue": false, + "CSSViewTransitionRule": false, + "currentFrame": false, + "currentTime": false, + "CustomElementRegistry": false, + "customElements": false, + "CustomEvent": false, + "CustomStateSet": false, + "DataTransfer": false, + "DataTransferItem": false, + "DataTransferItemList": false, + "DecompressionStream": false, + "DelayNode": false, + "DelegatedInkTrailPresenter": false, + "DeviceMotionEvent": false, + "DeviceMotionEventAcceleration": false, + "DeviceMotionEventRotationRate": false, + "DeviceOrientationEvent": false, + "devicePixelRatio": false, + "DevicePosture": false, + "DigitalCredential": false, + "dispatchEvent": false, + "DisposableStack": false, + "document": false, + "Document": false, + "DocumentFragment": false, + "documentPictureInPicture": false, + "DocumentPictureInPicture": false, + "DocumentPictureInPictureEvent": false, + "DocumentTimeline": false, + "DocumentType": false, + "DOMError": false, + "DOMException": false, + "DOMImplementation": false, + "DOMMatrix": false, + "DOMMatrixReadOnly": false, + "DOMParser": false, + "DOMPoint": false, + "DOMPointReadOnly": false, + "DOMQuad": false, + "DOMRect": false, + "DOMRectList": false, + "DOMRectReadOnly": false, + "DOMStringList": false, + "DOMStringMap": false, + "DOMTokenList": false, + "DragEvent": false, + "DynamicsCompressorNode": false, + "EditContext": false, + "Element": false, + "ElementInternals": false, + "EncodedAudioChunk": false, + "EncodedVideoChunk": false, + "ErrorEvent": false, + "event": false, + "Event": false, + "EventCounts": false, + "EventSource": false, + "EventTarget": false, + "external": false, + "External": false, + "EyeDropper": false, + "FeaturePolicy": false, + "FederatedCredential": false, + "fence": false, + "Fence": false, + "FencedFrameConfig": false, + "fetch": false, + "fetchLater": false, + "FetchLaterResult": false, + "File": false, + "FileList": false, + "FileReader": false, + "FileSystem": false, + "FileSystemDirectoryEntry": false, + "FileSystemDirectoryHandle": false, + "FileSystemDirectoryReader": false, + "FileSystemEntry": false, + "FileSystemFileEntry": false, + "FileSystemFileHandle": false, + "FileSystemHandle": false, + "FileSystemObserver": false, + "FileSystemWritableFileStream": false, + "find": false, + "focus": false, + "FocusEvent": false, + "FontData": false, + "FontFace": false, + "FontFaceSet": false, + "FontFaceSetLoadEvent": false, + "FormData": false, + "FormDataEvent": false, + "FragmentDirective": false, + "frameElement": false, + "frames": false, + "GainNode": false, + "Gamepad": false, + "GamepadAxisMoveEvent": false, + "GamepadButton": false, + "GamepadButtonEvent": false, + "GamepadEvent": false, + "GamepadHapticActuator": false, + "GamepadPose": false, + "Geolocation": false, + "GeolocationCoordinates": false, + "GeolocationPosition": false, + "GeolocationPositionError": false, + "getComputedStyle": false, + "getScreenDetails": false, + "getSelection": false, + "GPU": false, + "GPUAdapter": false, + "GPUAdapterInfo": false, + "GPUBindGroup": false, + "GPUBindGroupLayout": false, + "GPUBuffer": false, + "GPUBufferUsage": false, + "GPUCanvasContext": false, + "GPUColorWrite": false, + "GPUCommandBuffer": false, + "GPUCommandEncoder": false, + "GPUCompilationInfo": false, + "GPUCompilationMessage": false, + "GPUComputePassEncoder": false, + "GPUComputePipeline": false, + "GPUDevice": false, + "GPUDeviceLostInfo": false, + "GPUError": false, + "GPUExternalTexture": false, + "GPUInternalError": false, + "GPUMapMode": false, + "GPUOutOfMemoryError": false, + "GPUPipelineError": false, + "GPUPipelineLayout": false, + "GPUQuerySet": false, + "GPUQueue": false, + "GPURenderBundle": false, + "GPURenderBundleEncoder": false, + "GPURenderPassEncoder": false, + "GPURenderPipeline": false, + "GPUSampler": false, + "GPUShaderModule": false, + "GPUShaderStage": false, + "GPUSupportedFeatures": false, + "GPUSupportedLimits": false, + "GPUTexture": false, + "GPUTextureUsage": false, + "GPUTextureView": false, + "GPUUncapturedErrorEvent": false, + "GPUValidationError": false, + "GravitySensor": false, + "Gyroscope": false, + "HashChangeEvent": false, + "Headers": false, + "HID": false, + "HIDConnectionEvent": false, + "HIDDevice": false, + "HIDInputReportEvent": false, + "Highlight": false, + "HighlightRegistry": false, + "history": false, + "History": false, + "HTMLAllCollection": false, + "HTMLAnchorElement": false, + "HTMLAreaElement": false, + "HTMLAudioElement": false, + "HTMLBaseElement": false, + "HTMLBodyElement": false, + "HTMLBRElement": false, + "HTMLButtonElement": false, + "HTMLCanvasElement": false, + "HTMLCollection": false, + "HTMLDataElement": false, + "HTMLDataListElement": false, + "HTMLDetailsElement": false, + "HTMLDialogElement": false, + "HTMLDirectoryElement": false, + "HTMLDivElement": false, + "HTMLDListElement": false, + "HTMLDocument": false, + "HTMLElement": false, + "HTMLEmbedElement": false, + "HTMLFencedFrameElement": false, + "HTMLFieldSetElement": false, + "HTMLFontElement": false, + "HTMLFormControlsCollection": false, + "HTMLFormElement": false, + "HTMLFrameElement": false, + "HTMLFrameSetElement": false, + "HTMLHeadElement": false, + "HTMLHeadingElement": false, + "HTMLHRElement": false, + "HTMLHtmlElement": false, + "HTMLIFrameElement": false, + "HTMLImageElement": false, + "HTMLInputElement": false, + "HTMLLabelElement": false, + "HTMLLegendElement": false, + "HTMLLIElement": false, + "HTMLLinkElement": false, + "HTMLMapElement": false, + "HTMLMarqueeElement": false, + "HTMLMediaElement": false, + "HTMLMenuElement": false, + "HTMLMetaElement": false, + "HTMLMeterElement": false, + "HTMLModElement": false, + "HTMLObjectElement": false, + "HTMLOListElement": false, + "HTMLOptGroupElement": false, + "HTMLOptionElement": false, + "HTMLOptionsCollection": false, + "HTMLOutputElement": false, + "HTMLParagraphElement": false, + "HTMLParamElement": false, + "HTMLPictureElement": false, + "HTMLPreElement": false, + "HTMLProgressElement": false, + "HTMLQuoteElement": false, + "HTMLScriptElement": false, + "HTMLSelectedContentElement": false, + "HTMLSelectElement": false, + "HTMLSlotElement": false, + "HTMLSourceElement": false, + "HTMLSpanElement": false, + "HTMLStyleElement": false, + "HTMLTableCaptionElement": false, + "HTMLTableCellElement": false, + "HTMLTableColElement": false, + "HTMLTableElement": false, + "HTMLTableRowElement": false, + "HTMLTableSectionElement": false, + "HTMLTemplateElement": false, + "HTMLTextAreaElement": false, + "HTMLTimeElement": false, + "HTMLTitleElement": false, + "HTMLTrackElement": false, + "HTMLUListElement": false, + "HTMLUnknownElement": false, + "HTMLVideoElement": false, + "IDBCursor": false, + "IDBCursorWithValue": false, + "IDBDatabase": false, + "IDBFactory": false, + "IDBIndex": false, + "IDBKeyRange": false, + "IDBObjectStore": false, + "IDBOpenDBRequest": false, + "IDBRecord": false, + "IDBRequest": false, + "IDBTransaction": false, + "IDBVersionChangeEvent": false, + "IdentityCredential": false, + "IdentityCredentialError": false, + "IdentityProvider": false, + "IdleDeadline": false, + "IdleDetector": false, + "IIRFilterNode": false, + "Image": false, + "ImageBitmap": false, + "ImageBitmapRenderingContext": false, + "ImageCapture": false, + "ImageData": false, + "ImageDecoder": false, + "ImageTrack": false, + "ImageTrackList": false, + "indexedDB": false, + "Ink": false, + "innerHeight": false, + "innerWidth": false, + "InputDeviceCapabilities": false, + "InputDeviceInfo": false, + "InputEvent": false, + "IntegrityViolationReportBody": false, + "InterestEvent": false, + "IntersectionObserver": false, + "IntersectionObserverEntry": false, + "isSecureContext": false, + "Keyboard": false, + "KeyboardEvent": false, + "KeyboardLayoutMap": false, + "KeyframeEffect": false, + "LanguageDetector": false, + "LargestContentfulPaint": false, + "LaunchParams": false, + "launchQueue": false, + "LaunchQueue": false, + "LayoutShift": false, + "LayoutShiftAttribution": false, + "length": false, + "LinearAccelerationSensor": false, + "localStorage": false, + "location": true, + "Location": false, + "locationbar": false, + "Lock": false, + "LockManager": false, + "matchMedia": false, + "MathMLElement": false, + "MediaCapabilities": false, + "MediaCapabilitiesInfo": false, + "MediaDeviceInfo": false, + "MediaDevices": false, + "MediaElementAudioSourceNode": false, + "MediaEncryptedEvent": false, + "MediaError": false, + "MediaKeyError": false, + "MediaKeyMessageEvent": false, + "MediaKeys": false, + "MediaKeySession": false, + "MediaKeyStatusMap": false, + "MediaKeySystemAccess": false, + "MediaList": false, + "MediaMetadata": false, + "MediaQueryList": false, + "MediaQueryListEvent": false, + "MediaRecorder": false, + "MediaRecorderErrorEvent": false, + "MediaSession": false, + "MediaSource": false, + "MediaSourceHandle": false, + "MediaStream": false, + "MediaStreamAudioDestinationNode": false, + "MediaStreamAudioSourceNode": false, + "MediaStreamEvent": false, + "MediaStreamTrack": false, + "MediaStreamTrackAudioSourceNode": false, + "MediaStreamTrackAudioStats": false, + "MediaStreamTrackEvent": false, + "MediaStreamTrackGenerator": false, + "MediaStreamTrackProcessor": false, + "MediaStreamTrackVideoStats": false, + "menubar": false, + "MessageChannel": false, + "MessageEvent": false, + "MessagePort": false, + "MIDIAccess": false, + "MIDIConnectionEvent": false, + "MIDIInput": false, + "MIDIInputMap": false, + "MIDIMessageEvent": false, + "MIDIOutput": false, + "MIDIOutputMap": false, + "MIDIPort": false, + "MimeType": false, + "MimeTypeArray": false, + "model": false, + "ModelGenericSession": false, + "ModelManager": false, + "MouseEvent": false, + "moveBy": false, + "moveTo": false, + "MutationEvent": false, + "MutationObserver": false, + "MutationRecord": false, + "name": false, + "NamedNodeMap": false, + "NavigateEvent": false, + "navigation": false, + "Navigation": false, + "NavigationActivation": false, + "NavigationCurrentEntryChangeEvent": false, + "NavigationDestination": false, + "NavigationHistoryEntry": false, + "NavigationPrecommitController": false, + "NavigationPreloadManager": false, + "NavigationTransition": false, + "navigator": false, + "Navigator": false, + "NavigatorLogin": false, + "NavigatorManagedData": false, + "NavigatorUAData": false, + "NetworkInformation": false, + "Node": false, + "NodeFilter": false, + "NodeIterator": false, + "NodeList": false, + "Notification": false, + "NotifyPaintEvent": false, + "NotRestoredReasonDetails": false, + "NotRestoredReasons": false, + "Observable": false, + "OfflineAudioCompletionEvent": false, + "OfflineAudioContext": false, + "offscreenBuffering": false, + "OffscreenCanvas": false, + "OffscreenCanvasRenderingContext2D": false, + "onabort": true, + "onafterprint": true, + "onanimationcancel": true, + "onanimationend": true, + "onanimationiteration": true, + "onanimationstart": true, + "onappinstalled": true, + "onauxclick": true, + "onbeforeinput": true, + "onbeforeinstallprompt": true, + "onbeforematch": true, + "onbeforeprint": true, + "onbeforetoggle": true, + "onbeforeunload": true, + "onbeforexrselect": true, + "onblur": true, + "oncancel": true, + "oncanplay": true, + "oncanplaythrough": true, + "onchange": true, + "onclick": true, + "onclose": true, + "oncommand": true, + "oncontentvisibilityautostatechange": true, + "oncontextlost": true, + "oncontextmenu": true, + "oncontextrestored": true, + "oncopy": true, + "oncuechange": true, + "oncut": true, + "ondblclick": true, + "ondevicemotion": true, + "ondeviceorientation": true, + "ondeviceorientationabsolute": true, + "ondrag": true, + "ondragend": true, + "ondragenter": true, + "ondragleave": true, + "ondragover": true, + "ondragstart": true, + "ondrop": true, + "ondurationchange": true, + "onemptied": true, + "onended": true, + "onerror": true, + "onfocus": true, + "onformdata": true, + "ongamepadconnected": true, + "ongamepaddisconnected": true, + "ongotpointercapture": true, + "onhashchange": true, + "oninput": true, + "oninvalid": true, + "onkeydown": true, + "onkeypress": true, + "onkeyup": true, + "onlanguagechange": true, + "onload": true, + "onloadeddata": true, + "onloadedmetadata": true, + "onloadstart": true, + "onlostpointercapture": true, + "onmessage": true, + "onmessageerror": true, + "onmousedown": true, + "onmouseenter": true, + "onmouseleave": true, + "onmousemove": true, + "onmouseout": true, + "onmouseover": true, + "onmouseup": true, + "onmousewheel": true, + "onoffline": true, + "ononline": true, + "onpagehide": true, + "onpagereveal": true, + "onpageshow": true, + "onpageswap": true, + "onpaste": true, + "onpause": true, + "onplay": true, + "onplaying": true, + "onpointercancel": true, + "onpointerdown": true, + "onpointerenter": true, + "onpointerleave": true, + "onpointermove": true, + "onpointerout": true, + "onpointerover": true, + "onpointerrawupdate": true, + "onpointerup": true, + "onpopstate": true, + "onprogress": true, + "onratechange": true, + "onrejectionhandled": true, + "onreset": true, + "onresize": true, + "onscroll": true, + "onscrollend": true, + "onscrollsnapchange": true, + "onscrollsnapchanging": true, + "onsearch": true, + "onsecuritypolicyviolation": true, + "onseeked": true, + "onseeking": true, + "onselect": true, + "onselectionchange": true, + "onselectstart": true, + "onslotchange": true, + "onstalled": true, + "onstorage": true, + "onsubmit": true, + "onsuspend": true, + "ontimeupdate": true, + "ontoggle": true, + "ontransitioncancel": true, + "ontransitionend": true, + "ontransitionrun": true, + "ontransitionstart": true, + "onunhandledrejection": true, + "onunload": true, + "onvolumechange": true, + "onwaiting": true, + "onwheel": true, + "open": false, + "opener": false, + "Option": false, + "OrientationSensor": false, + "origin": false, + "originAgentCluster": false, + "OscillatorNode": false, + "OTPCredential": false, + "outerHeight": false, + "outerWidth": false, + "OverconstrainedError": false, + "PageRevealEvent": false, + "PageSwapEvent": false, + "PageTransitionEvent": false, + "pageXOffset": false, + "pageYOffset": false, + "PannerNode": false, + "parent": false, + "PasswordCredential": false, + "Path2D": false, + "PaymentAddress": false, + "PaymentManager": false, + "PaymentMethodChangeEvent": false, + "PaymentRequest": false, + "PaymentRequestUpdateEvent": false, + "PaymentResponse": false, + "performance": false, + "Performance": false, + "PerformanceElementTiming": false, + "PerformanceEntry": false, + "PerformanceEventTiming": false, + "PerformanceLongAnimationFrameTiming": false, + "PerformanceLongTaskTiming": false, + "PerformanceMark": false, + "PerformanceMeasure": false, + "PerformanceNavigation": false, + "PerformanceNavigationTiming": false, + "PerformanceObserver": false, + "PerformanceObserverEntryList": false, + "PerformancePaintTiming": false, + "PerformanceResourceTiming": false, + "PerformanceScriptTiming": false, + "PerformanceServerTiming": false, + "PerformanceTiming": false, + "PeriodicSyncManager": false, + "PeriodicWave": false, + "Permissions": false, + "PermissionStatus": false, + "PERSISTENT": false, + "personalbar": false, + "PictureInPictureEvent": false, + "PictureInPictureWindow": false, + "Plugin": false, + "PluginArray": false, + "PointerEvent": false, + "PopStateEvent": false, + "postMessage": false, + "Presentation": false, + "PresentationAvailability": false, + "PresentationConnection": false, + "PresentationConnectionAvailableEvent": false, + "PresentationConnectionCloseEvent": false, + "PresentationConnectionList": false, + "PresentationReceiver": false, + "PresentationRequest": false, + "PressureObserver": false, + "PressureRecord": false, + "print": false, + "ProcessingInstruction": false, + "Profiler": false, + "ProgressEvent": false, + "PromiseRejectionEvent": false, + "prompt": false, + "ProtectedAudience": false, + "PublicKeyCredential": false, + "PushManager": false, + "PushSubscription": false, + "PushSubscriptionOptions": false, + "queryLocalFonts": false, + "queueMicrotask": false, + "QuotaExceededError": false, + "RadioNodeList": false, + "Range": false, + "ReadableByteStreamController": false, + "ReadableStream": false, + "ReadableStreamBYOBReader": false, + "ReadableStreamBYOBRequest": false, + "ReadableStreamDefaultController": false, + "ReadableStreamDefaultReader": false, + "registerProcessor": false, + "RelativeOrientationSensor": false, + "RemotePlayback": false, + "removeEventListener": false, + "ReportBody": false, + "reportError": false, + "ReportingObserver": false, + "Request": false, + "requestAnimationFrame": false, + "requestIdleCallback": false, + "resizeBy": false, + "ResizeObserver": false, + "ResizeObserverEntry": false, + "ResizeObserverSize": false, + "resizeTo": false, + "Response": false, + "RestrictionTarget": false, + "RTCCertificate": false, + "RTCDataChannel": false, + "RTCDataChannelEvent": false, + "RTCDtlsTransport": false, + "RTCDTMFSender": false, + "RTCDTMFToneChangeEvent": false, + "RTCEncodedAudioFrame": false, + "RTCEncodedVideoFrame": false, + "RTCError": false, + "RTCErrorEvent": false, + "RTCIceCandidate": false, + "RTCIceTransport": false, + "RTCPeerConnection": false, + "RTCPeerConnectionIceErrorEvent": false, + "RTCPeerConnectionIceEvent": false, + "RTCRtpReceiver": false, + "RTCRtpScriptTransform": false, + "RTCRtpSender": false, + "RTCRtpTransceiver": false, + "RTCSctpTransport": false, + "RTCSessionDescription": false, + "RTCStatsReport": false, + "RTCTrackEvent": false, + "sampleRate": false, + "scheduler": false, + "Scheduler": false, + "Scheduling": false, + "screen": false, + "Screen": false, + "ScreenDetailed": false, + "ScreenDetails": false, + "screenLeft": false, + "ScreenOrientation": false, + "screenTop": false, + "screenX": false, + "screenY": false, + "ScriptProcessorNode": false, + "scroll": false, + "scrollbars": false, + "scrollBy": false, + "ScrollTimeline": false, + "scrollTo": false, + "scrollX": false, + "scrollY": false, + "SecurityPolicyViolationEvent": false, + "Selection": false, + "self": false, + "Sensor": false, + "SensorErrorEvent": false, + "Serial": false, + "SerialPort": false, + "ServiceWorker": false, + "ServiceWorkerContainer": false, + "ServiceWorkerRegistration": false, + "sessionStorage": false, + "setInterval": false, + "setTimeout": false, + "ShadowRoot": false, + "sharedStorage": false, + "SharedStorage": false, + "SharedStorageAppendMethod": false, + "SharedStorageClearMethod": false, + "SharedStorageDeleteMethod": false, + "SharedStorageModifierMethod": false, + "SharedStorageSetMethod": false, + "SharedStorageWorklet": false, + "SharedWorker": false, + "showDirectoryPicker": false, + "showOpenFilePicker": false, + "showSaveFilePicker": false, + "SnapEvent": false, + "SourceBuffer": false, + "SourceBufferList": false, + "SpeechGrammar": false, + "SpeechGrammarList": false, + "SpeechRecognition": false, + "SpeechRecognitionErrorEvent": false, + "SpeechRecognitionEvent": false, + "SpeechRecognitionPhrase": false, + "speechSynthesis": false, + "SpeechSynthesis": false, + "SpeechSynthesisErrorEvent": false, + "SpeechSynthesisEvent": false, + "SpeechSynthesisUtterance": false, + "SpeechSynthesisVoice": false, + "StaticRange": false, + "status": false, + "statusbar": false, + "StereoPannerNode": false, + "stop": false, + "Storage": false, + "StorageBucket": false, + "StorageBucketManager": false, + "StorageEvent": false, + "StorageManager": false, + "structuredClone": false, + "styleMedia": false, + "StylePropertyMap": false, + "StylePropertyMapReadOnly": false, + "StyleSheet": false, + "StyleSheetList": false, + "SubmitEvent": false, + "Subscriber": false, + "SubtleCrypto": false, + "Summarizer": false, + "SuppressedError": false, + "SVGAElement": false, + "SVGAngle": false, + "SVGAnimatedAngle": false, + "SVGAnimatedBoolean": false, + "SVGAnimatedEnumeration": false, + "SVGAnimatedInteger": false, + "SVGAnimatedLength": false, + "SVGAnimatedLengthList": false, + "SVGAnimatedNumber": false, + "SVGAnimatedNumberList": false, + "SVGAnimatedPreserveAspectRatio": false, + "SVGAnimatedRect": false, + "SVGAnimatedString": false, + "SVGAnimatedTransformList": false, + "SVGAnimateElement": false, + "SVGAnimateMotionElement": false, + "SVGAnimateTransformElement": false, + "SVGAnimationElement": false, + "SVGCircleElement": false, + "SVGClipPathElement": false, + "SVGComponentTransferFunctionElement": false, + "SVGDefsElement": false, + "SVGDescElement": false, + "SVGElement": false, + "SVGEllipseElement": false, + "SVGFEBlendElement": false, + "SVGFEColorMatrixElement": false, + "SVGFEComponentTransferElement": false, + "SVGFECompositeElement": false, + "SVGFEConvolveMatrixElement": false, + "SVGFEDiffuseLightingElement": false, + "SVGFEDisplacementMapElement": false, + "SVGFEDistantLightElement": false, + "SVGFEDropShadowElement": false, + "SVGFEFloodElement": false, + "SVGFEFuncAElement": false, + "SVGFEFuncBElement": false, + "SVGFEFuncGElement": false, + "SVGFEFuncRElement": false, + "SVGFEGaussianBlurElement": false, + "SVGFEImageElement": false, + "SVGFEMergeElement": false, + "SVGFEMergeNodeElement": false, + "SVGFEMorphologyElement": false, + "SVGFEOffsetElement": false, + "SVGFEPointLightElement": false, + "SVGFESpecularLightingElement": false, + "SVGFESpotLightElement": false, + "SVGFETileElement": false, + "SVGFETurbulenceElement": false, + "SVGFilterElement": false, + "SVGForeignObjectElement": false, + "SVGGElement": false, + "SVGGeometryElement": false, + "SVGGradientElement": false, + "SVGGraphicsElement": false, + "SVGImageElement": false, + "SVGLength": false, + "SVGLengthList": false, + "SVGLinearGradientElement": false, + "SVGLineElement": false, + "SVGMarkerElement": false, + "SVGMaskElement": false, + "SVGMatrix": false, + "SVGMetadataElement": false, + "SVGMPathElement": false, + "SVGNumber": false, + "SVGNumberList": false, + "SVGPathElement": false, + "SVGPatternElement": false, + "SVGPoint": false, + "SVGPointList": false, + "SVGPolygonElement": false, + "SVGPolylineElement": false, + "SVGPreserveAspectRatio": false, + "SVGRadialGradientElement": false, + "SVGRect": false, + "SVGRectElement": false, + "SVGScriptElement": false, + "SVGSetElement": false, + "SVGStopElement": false, + "SVGStringList": false, + "SVGStyleElement": false, + "SVGSVGElement": false, + "SVGSwitchElement": false, + "SVGSymbolElement": false, + "SVGTextContentElement": false, + "SVGTextElement": false, + "SVGTextPathElement": false, + "SVGTextPositioningElement": false, + "SVGTitleElement": false, + "SVGTransform": false, + "SVGTransformList": false, + "SVGTSpanElement": false, + "SVGUnitTypes": false, + "SVGUseElement": false, + "SVGViewElement": false, + "SyncManager": false, + "TaskAttributionTiming": false, + "TaskController": false, + "TaskPriorityChangeEvent": false, + "TaskSignal": false, + "TEMPORARY": false, + "Text": false, + "TextDecoder": false, + "TextDecoderStream": false, + "TextEncoder": false, + "TextEncoderStream": false, + "TextEvent": false, + "TextFormat": false, + "TextFormatUpdateEvent": false, + "TextMetrics": false, + "TextTrack": false, + "TextTrackCue": false, + "TextTrackCueList": false, + "TextTrackList": false, + "TextUpdateEvent": false, + "TimeEvent": false, + "TimeRanges": false, + "ToggleEvent": false, + "toolbar": false, + "top": false, + "Touch": false, + "TouchEvent": false, + "TouchList": false, + "TrackEvent": false, + "TransformStream": false, + "TransformStreamDefaultController": false, + "TransitionEvent": false, + "Translator": false, + "TreeWalker": false, + "TrustedHTML": false, + "TrustedScript": false, + "TrustedScriptURL": false, + "TrustedTypePolicy": false, + "TrustedTypePolicyFactory": false, + "trustedTypes": false, + "UIEvent": false, + "URL": false, + "URLPattern": false, + "URLSearchParams": false, + "USB": false, + "USBAlternateInterface": false, + "USBConfiguration": false, + "USBConnectionEvent": false, + "USBDevice": false, + "USBEndpoint": false, + "USBInterface": false, + "USBInTransferResult": false, + "USBIsochronousInTransferPacket": false, + "USBIsochronousInTransferResult": false, + "USBIsochronousOutTransferPacket": false, + "USBIsochronousOutTransferResult": false, + "USBOutTransferResult": false, + "UserActivation": false, + "ValidityState": false, + "VideoColorSpace": false, + "VideoDecoder": false, + "VideoEncoder": false, + "VideoFrame": false, + "VideoPlaybackQuality": false, + "viewport": false, + "Viewport": false, + "ViewTimeline": false, + "ViewTransition": false, + "ViewTransitionTypeSet": false, + "VirtualKeyboard": false, + "VirtualKeyboardGeometryChangeEvent": false, + "VisibilityStateEntry": false, + "visualViewport": false, + "VisualViewport": false, + "VTTCue": false, + "VTTRegion": false, + "WakeLock": false, + "WakeLockSentinel": false, + "WaveShaperNode": false, + "WebAssembly": false, + "WebGL2RenderingContext": false, + "WebGLActiveInfo": false, + "WebGLBuffer": false, + "WebGLContextEvent": false, + "WebGLFramebuffer": false, + "WebGLObject": false, + "WebGLProgram": false, + "WebGLQuery": false, + "WebGLRenderbuffer": false, + "WebGLRenderingContext": false, + "WebGLSampler": false, + "WebGLShader": false, + "WebGLShaderPrecisionFormat": false, + "WebGLSync": false, + "WebGLTexture": false, + "WebGLTransformFeedback": false, + "WebGLUniformLocation": false, + "WebGLVertexArrayObject": false, + "WebSocket": false, + "WebSocketError": false, + "WebSocketStream": false, + "WebTransport": false, + "WebTransportBidirectionalStream": false, + "WebTransportDatagramDuplexStream": false, + "WebTransportError": false, + "WebTransportReceiveStream": false, + "WebTransportSendStream": false, + "WGSLLanguageFeatures": false, + "WheelEvent": false, + "when": false, + "window": false, + "Window": false, + "WindowControlsOverlay": false, + "WindowControlsOverlayGeometryChangeEvent": false, + "Worker": false, + "Worklet": false, + "WorkletGlobalScope": false, + "WritableStream": false, + "WritableStreamDefaultController": false, + "WritableStreamDefaultWriter": false, + "XMLDocument": false, + "XMLHttpRequest": false, + "XMLHttpRequestEventTarget": false, + "XMLHttpRequestUpload": false, + "XMLSerializer": false, + "XPathEvaluator": false, + "XPathExpression": false, + "XPathResult": false, + "XRAnchor": false, + "XRAnchorSet": false, + "XRBoundedReferenceSpace": false, + "XRCamera": false, + "XRCPUDepthInformation": false, + "XRDepthInformation": false, + "XRDOMOverlayState": false, + "XRFrame": false, + "XRHand": false, + "XRHitTestResult": false, + "XRHitTestSource": false, + "XRInputSource": false, + "XRInputSourceArray": false, + "XRInputSourceEvent": false, + "XRInputSourcesChangeEvent": false, + "XRJointPose": false, + "XRJointSpace": false, + "XRLayer": false, + "XRLightEstimate": false, + "XRLightProbe": false, + "XRPose": false, + "XRRay": false, + "XRReferenceSpace": false, + "XRReferenceSpaceEvent": false, + "XRRenderState": false, + "XRRigidTransform": false, + "XRSession": false, + "XRSessionEvent": false, + "XRSpace": false, + "XRSystem": false, + "XRTransientInputHitTestResult": false, + "XRTransientInputHitTestSource": false, + "XRView": false, + "XRViewerPose": false, + "XRViewport": false, + "XRWebGLBinding": false, + "XRWebGLDepthInformation": false, + "XRWebGLLayer": false, + "XSLTProcessor": false + } + }, + "errors": [ + { + "messageId": "defaultMessage", + "data": { + "name": "foo" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-restricted-globals > invalid + +```js +self?.foo() +``` + +```json +{ + "options": [ + { + "globals": [ + "foo" + ], + "checkGlobalObject": true + } + ], + "languageOptions": { + "globals": { + "AbortController": false, + "AbortSignal": false, + "AbsoluteOrientationSensor": false, + "AbstractRange": false, + "Accelerometer": false, + "addEventListener": false, + "ai": false, + "AI": false, + "AICreateMonitor": false, + "AITextSession": false, + "alert": false, + "AnalyserNode": false, + "Animation": false, + "AnimationEffect": false, + "AnimationEvent": false, + "AnimationPlaybackEvent": false, + "AnimationTimeline": false, + "AsyncDisposableStack": false, + "atob": false, + "Attr": false, + "Audio": false, + "AudioBuffer": false, + "AudioBufferSourceNode": false, + "AudioContext": false, + "AudioData": false, + "AudioDecoder": false, + "AudioDestinationNode": false, + "AudioEncoder": false, + "AudioListener": false, + "AudioNode": false, + "AudioParam": false, + "AudioParamMap": false, + "AudioProcessingEvent": false, + "AudioScheduledSourceNode": false, + "AudioSinkInfo": false, + "AudioWorklet": false, + "AudioWorkletGlobalScope": false, + "AudioWorkletNode": false, + "AudioWorkletProcessor": false, + "AuthenticatorAssertionResponse": false, + "AuthenticatorAttestationResponse": false, + "AuthenticatorResponse": false, + "BackgroundFetchManager": false, + "BackgroundFetchRecord": false, + "BackgroundFetchRegistration": false, + "BarcodeDetector": false, + "BarProp": false, + "BaseAudioContext": false, + "BatteryManager": false, + "BeforeUnloadEvent": false, + "BiquadFilterNode": false, + "Blob": false, + "BlobEvent": false, + "Bluetooth": false, + "BluetoothCharacteristicProperties": false, + "BluetoothDevice": false, + "BluetoothRemoteGATTCharacteristic": false, + "BluetoothRemoteGATTDescriptor": false, + "BluetoothRemoteGATTServer": false, + "BluetoothRemoteGATTService": false, + "BluetoothUUID": false, + "blur": false, + "BroadcastChannel": false, + "BrowserCaptureMediaStreamTrack": false, + "btoa": false, + "ByteLengthQueuingStrategy": false, + "Cache": false, + "caches": false, + "CacheStorage": false, + "cancelAnimationFrame": false, + "cancelIdleCallback": false, + "CanvasCaptureMediaStream": false, + "CanvasCaptureMediaStreamTrack": false, + "CanvasGradient": false, + "CanvasPattern": false, + "CanvasRenderingContext2D": false, + "CaptureController": false, + "CaretPosition": false, + "CDATASection": false, + "ChannelMergerNode": false, + "ChannelSplitterNode": false, + "ChapterInformation": false, + "CharacterBoundsUpdateEvent": false, + "CharacterData": false, + "clearInterval": false, + "clearTimeout": false, + "clientInformation": false, + "Clipboard": false, + "ClipboardChangeEvent": false, + "ClipboardEvent": false, + "ClipboardItem": false, + "close": false, + "closed": false, + "CloseEvent": false, + "CloseWatcher": false, + "CommandEvent": false, + "Comment": false, + "CompositionEvent": false, + "CompressionStream": false, + "confirm": false, + "console": false, + "ConstantSourceNode": false, + "ContentVisibilityAutoStateChangeEvent": false, + "ConvolverNode": false, + "CookieChangeEvent": false, + "CookieDeprecationLabel": false, + "cookieStore": false, + "CookieStore": false, + "CookieStoreManager": false, + "CountQueuingStrategy": false, + "createImageBitmap": false, + "CreateMonitor": false, + "Credential": false, + "credentialless": false, + "CredentialsContainer": false, + "CropTarget": false, + "crossOriginIsolated": false, + "crypto": false, + "Crypto": false, + "CryptoKey": false, + "CSPViolationReportBody": false, + "CSS": false, + "CSSAnimation": false, + "CSSConditionRule": false, + "CSSContainerRule": false, + "CSSCounterStyleRule": false, + "CSSFontFaceRule": false, + "CSSFontFeatureValuesRule": false, + "CSSFontPaletteValuesRule": false, + "CSSFunctionDeclarations": false, + "CSSFunctionDescriptors": false, + "CSSFunctionRule": false, + "CSSGroupingRule": false, + "CSSImageValue": false, + "CSSImportRule": false, + "CSSKeyframeRule": false, + "CSSKeyframesRule": false, + "CSSKeywordValue": false, + "CSSLayerBlockRule": false, + "CSSLayerStatementRule": false, + "CSSMarginRule": false, + "CSSMathClamp": false, + "CSSMathInvert": false, + "CSSMathMax": false, + "CSSMathMin": false, + "CSSMathNegate": false, + "CSSMathProduct": false, + "CSSMathSum": false, + "CSSMathValue": false, + "CSSMatrixComponent": false, + "CSSMediaRule": false, + "CSSNamespaceRule": false, + "CSSNestedDeclarations": false, + "CSSNumericArray": false, + "CSSNumericValue": false, + "CSSPageDescriptors": false, + "CSSPageRule": false, + "CSSPerspective": false, + "CSSPositionTryDescriptors": false, + "CSSPositionTryRule": false, + "CSSPositionValue": false, + "CSSPropertyRule": false, + "CSSRotate": false, + "CSSRule": false, + "CSSRuleList": false, + "CSSScale": false, + "CSSScopeRule": false, + "CSSSkew": false, + "CSSSkewX": false, + "CSSSkewY": false, + "CSSStartingStyleRule": false, + "CSSStyleDeclaration": false, + "CSSStyleRule": false, + "CSSStyleSheet": false, + "CSSStyleValue": false, + "CSSSupportsRule": false, + "CSSTransformComponent": false, + "CSSTransformValue": false, + "CSSTransition": false, + "CSSTranslate": false, + "CSSUnitValue": false, + "CSSUnparsedValue": false, + "CSSVariableReferenceValue": false, + "CSSViewTransitionRule": false, + "currentFrame": false, + "currentTime": false, + "CustomElementRegistry": false, + "customElements": false, + "CustomEvent": false, + "CustomStateSet": false, + "DataTransfer": false, + "DataTransferItem": false, + "DataTransferItemList": false, + "DecompressionStream": false, + "DelayNode": false, + "DelegatedInkTrailPresenter": false, + "DeviceMotionEvent": false, + "DeviceMotionEventAcceleration": false, + "DeviceMotionEventRotationRate": false, + "DeviceOrientationEvent": false, + "devicePixelRatio": false, + "DevicePosture": false, + "DigitalCredential": false, + "dispatchEvent": false, + "DisposableStack": false, + "document": false, + "Document": false, + "DocumentFragment": false, + "documentPictureInPicture": false, + "DocumentPictureInPicture": false, + "DocumentPictureInPictureEvent": false, + "DocumentTimeline": false, + "DocumentType": false, + "DOMError": false, + "DOMException": false, + "DOMImplementation": false, + "DOMMatrix": false, + "DOMMatrixReadOnly": false, + "DOMParser": false, + "DOMPoint": false, + "DOMPointReadOnly": false, + "DOMQuad": false, + "DOMRect": false, + "DOMRectList": false, + "DOMRectReadOnly": false, + "DOMStringList": false, + "DOMStringMap": false, + "DOMTokenList": false, + "DragEvent": false, + "DynamicsCompressorNode": false, + "EditContext": false, + "Element": false, + "ElementInternals": false, + "EncodedAudioChunk": false, + "EncodedVideoChunk": false, + "ErrorEvent": false, + "event": false, + "Event": false, + "EventCounts": false, + "EventSource": false, + "EventTarget": false, + "external": false, + "External": false, + "EyeDropper": false, + "FeaturePolicy": false, + "FederatedCredential": false, + "fence": false, + "Fence": false, + "FencedFrameConfig": false, + "fetch": false, + "fetchLater": false, + "FetchLaterResult": false, + "File": false, + "FileList": false, + "FileReader": false, + "FileSystem": false, + "FileSystemDirectoryEntry": false, + "FileSystemDirectoryHandle": false, + "FileSystemDirectoryReader": false, + "FileSystemEntry": false, + "FileSystemFileEntry": false, + "FileSystemFileHandle": false, + "FileSystemHandle": false, + "FileSystemObserver": false, + "FileSystemWritableFileStream": false, + "find": false, + "focus": false, + "FocusEvent": false, + "FontData": false, + "FontFace": false, + "FontFaceSet": false, + "FontFaceSetLoadEvent": false, + "FormData": false, + "FormDataEvent": false, + "FragmentDirective": false, + "frameElement": false, + "frames": false, + "GainNode": false, + "Gamepad": false, + "GamepadAxisMoveEvent": false, + "GamepadButton": false, + "GamepadButtonEvent": false, + "GamepadEvent": false, + "GamepadHapticActuator": false, + "GamepadPose": false, + "Geolocation": false, + "GeolocationCoordinates": false, + "GeolocationPosition": false, + "GeolocationPositionError": false, + "getComputedStyle": false, + "getScreenDetails": false, + "getSelection": false, + "GPU": false, + "GPUAdapter": false, + "GPUAdapterInfo": false, + "GPUBindGroup": false, + "GPUBindGroupLayout": false, + "GPUBuffer": false, + "GPUBufferUsage": false, + "GPUCanvasContext": false, + "GPUColorWrite": false, + "GPUCommandBuffer": false, + "GPUCommandEncoder": false, + "GPUCompilationInfo": false, + "GPUCompilationMessage": false, + "GPUComputePassEncoder": false, + "GPUComputePipeline": false, + "GPUDevice": false, + "GPUDeviceLostInfo": false, + "GPUError": false, + "GPUExternalTexture": false, + "GPUInternalError": false, + "GPUMapMode": false, + "GPUOutOfMemoryError": false, + "GPUPipelineError": false, + "GPUPipelineLayout": false, + "GPUQuerySet": false, + "GPUQueue": false, + "GPURenderBundle": false, + "GPURenderBundleEncoder": false, + "GPURenderPassEncoder": false, + "GPURenderPipeline": false, + "GPUSampler": false, + "GPUShaderModule": false, + "GPUShaderStage": false, + "GPUSupportedFeatures": false, + "GPUSupportedLimits": false, + "GPUTexture": false, + "GPUTextureUsage": false, + "GPUTextureView": false, + "GPUUncapturedErrorEvent": false, + "GPUValidationError": false, + "GravitySensor": false, + "Gyroscope": false, + "HashChangeEvent": false, + "Headers": false, + "HID": false, + "HIDConnectionEvent": false, + "HIDDevice": false, + "HIDInputReportEvent": false, + "Highlight": false, + "HighlightRegistry": false, + "history": false, + "History": false, + "HTMLAllCollection": false, + "HTMLAnchorElement": false, + "HTMLAreaElement": false, + "HTMLAudioElement": false, + "HTMLBaseElement": false, + "HTMLBodyElement": false, + "HTMLBRElement": false, + "HTMLButtonElement": false, + "HTMLCanvasElement": false, + "HTMLCollection": false, + "HTMLDataElement": false, + "HTMLDataListElement": false, + "HTMLDetailsElement": false, + "HTMLDialogElement": false, + "HTMLDirectoryElement": false, + "HTMLDivElement": false, + "HTMLDListElement": false, + "HTMLDocument": false, + "HTMLElement": false, + "HTMLEmbedElement": false, + "HTMLFencedFrameElement": false, + "HTMLFieldSetElement": false, + "HTMLFontElement": false, + "HTMLFormControlsCollection": false, + "HTMLFormElement": false, + "HTMLFrameElement": false, + "HTMLFrameSetElement": false, + "HTMLHeadElement": false, + "HTMLHeadingElement": false, + "HTMLHRElement": false, + "HTMLHtmlElement": false, + "HTMLIFrameElement": false, + "HTMLImageElement": false, + "HTMLInputElement": false, + "HTMLLabelElement": false, + "HTMLLegendElement": false, + "HTMLLIElement": false, + "HTMLLinkElement": false, + "HTMLMapElement": false, + "HTMLMarqueeElement": false, + "HTMLMediaElement": false, + "HTMLMenuElement": false, + "HTMLMetaElement": false, + "HTMLMeterElement": false, + "HTMLModElement": false, + "HTMLObjectElement": false, + "HTMLOListElement": false, + "HTMLOptGroupElement": false, + "HTMLOptionElement": false, + "HTMLOptionsCollection": false, + "HTMLOutputElement": false, + "HTMLParagraphElement": false, + "HTMLParamElement": false, + "HTMLPictureElement": false, + "HTMLPreElement": false, + "HTMLProgressElement": false, + "HTMLQuoteElement": false, + "HTMLScriptElement": false, + "HTMLSelectedContentElement": false, + "HTMLSelectElement": false, + "HTMLSlotElement": false, + "HTMLSourceElement": false, + "HTMLSpanElement": false, + "HTMLStyleElement": false, + "HTMLTableCaptionElement": false, + "HTMLTableCellElement": false, + "HTMLTableColElement": false, + "HTMLTableElement": false, + "HTMLTableRowElement": false, + "HTMLTableSectionElement": false, + "HTMLTemplateElement": false, + "HTMLTextAreaElement": false, + "HTMLTimeElement": false, + "HTMLTitleElement": false, + "HTMLTrackElement": false, + "HTMLUListElement": false, + "HTMLUnknownElement": false, + "HTMLVideoElement": false, + "IDBCursor": false, + "IDBCursorWithValue": false, + "IDBDatabase": false, + "IDBFactory": false, + "IDBIndex": false, + "IDBKeyRange": false, + "IDBObjectStore": false, + "IDBOpenDBRequest": false, + "IDBRecord": false, + "IDBRequest": false, + "IDBTransaction": false, + "IDBVersionChangeEvent": false, + "IdentityCredential": false, + "IdentityCredentialError": false, + "IdentityProvider": false, + "IdleDeadline": false, + "IdleDetector": false, + "IIRFilterNode": false, + "Image": false, + "ImageBitmap": false, + "ImageBitmapRenderingContext": false, + "ImageCapture": false, + "ImageData": false, + "ImageDecoder": false, + "ImageTrack": false, + "ImageTrackList": false, + "indexedDB": false, + "Ink": false, + "innerHeight": false, + "innerWidth": false, + "InputDeviceCapabilities": false, + "InputDeviceInfo": false, + "InputEvent": false, + "IntegrityViolationReportBody": false, + "InterestEvent": false, + "IntersectionObserver": false, + "IntersectionObserverEntry": false, + "isSecureContext": false, + "Keyboard": false, + "KeyboardEvent": false, + "KeyboardLayoutMap": false, + "KeyframeEffect": false, + "LanguageDetector": false, + "LargestContentfulPaint": false, + "LaunchParams": false, + "launchQueue": false, + "LaunchQueue": false, + "LayoutShift": false, + "LayoutShiftAttribution": false, + "length": false, + "LinearAccelerationSensor": false, + "localStorage": false, + "location": true, + "Location": false, + "locationbar": false, + "Lock": false, + "LockManager": false, + "matchMedia": false, + "MathMLElement": false, + "MediaCapabilities": false, + "MediaCapabilitiesInfo": false, + "MediaDeviceInfo": false, + "MediaDevices": false, + "MediaElementAudioSourceNode": false, + "MediaEncryptedEvent": false, + "MediaError": false, + "MediaKeyError": false, + "MediaKeyMessageEvent": false, + "MediaKeys": false, + "MediaKeySession": false, + "MediaKeyStatusMap": false, + "MediaKeySystemAccess": false, + "MediaList": false, + "MediaMetadata": false, + "MediaQueryList": false, + "MediaQueryListEvent": false, + "MediaRecorder": false, + "MediaRecorderErrorEvent": false, + "MediaSession": false, + "MediaSource": false, + "MediaSourceHandle": false, + "MediaStream": false, + "MediaStreamAudioDestinationNode": false, + "MediaStreamAudioSourceNode": false, + "MediaStreamEvent": false, + "MediaStreamTrack": false, + "MediaStreamTrackAudioSourceNode": false, + "MediaStreamTrackAudioStats": false, + "MediaStreamTrackEvent": false, + "MediaStreamTrackGenerator": false, + "MediaStreamTrackProcessor": false, + "MediaStreamTrackVideoStats": false, + "menubar": false, + "MessageChannel": false, + "MessageEvent": false, + "MessagePort": false, + "MIDIAccess": false, + "MIDIConnectionEvent": false, + "MIDIInput": false, + "MIDIInputMap": false, + "MIDIMessageEvent": false, + "MIDIOutput": false, + "MIDIOutputMap": false, + "MIDIPort": false, + "MimeType": false, + "MimeTypeArray": false, + "model": false, + "ModelGenericSession": false, + "ModelManager": false, + "MouseEvent": false, + "moveBy": false, + "moveTo": false, + "MutationEvent": false, + "MutationObserver": false, + "MutationRecord": false, + "name": false, + "NamedNodeMap": false, + "NavigateEvent": false, + "navigation": false, + "Navigation": false, + "NavigationActivation": false, + "NavigationCurrentEntryChangeEvent": false, + "NavigationDestination": false, + "NavigationHistoryEntry": false, + "NavigationPrecommitController": false, + "NavigationPreloadManager": false, + "NavigationTransition": false, + "navigator": false, + "Navigator": false, + "NavigatorLogin": false, + "NavigatorManagedData": false, + "NavigatorUAData": false, + "NetworkInformation": false, + "Node": false, + "NodeFilter": false, + "NodeIterator": false, + "NodeList": false, + "Notification": false, + "NotifyPaintEvent": false, + "NotRestoredReasonDetails": false, + "NotRestoredReasons": false, + "Observable": false, + "OfflineAudioCompletionEvent": false, + "OfflineAudioContext": false, + "offscreenBuffering": false, + "OffscreenCanvas": false, + "OffscreenCanvasRenderingContext2D": false, + "onabort": true, + "onafterprint": true, + "onanimationcancel": true, + "onanimationend": true, + "onanimationiteration": true, + "onanimationstart": true, + "onappinstalled": true, + "onauxclick": true, + "onbeforeinput": true, + "onbeforeinstallprompt": true, + "onbeforematch": true, + "onbeforeprint": true, + "onbeforetoggle": true, + "onbeforeunload": true, + "onbeforexrselect": true, + "onblur": true, + "oncancel": true, + "oncanplay": true, + "oncanplaythrough": true, + "onchange": true, + "onclick": true, + "onclose": true, + "oncommand": true, + "oncontentvisibilityautostatechange": true, + "oncontextlost": true, + "oncontextmenu": true, + "oncontextrestored": true, + "oncopy": true, + "oncuechange": true, + "oncut": true, + "ondblclick": true, + "ondevicemotion": true, + "ondeviceorientation": true, + "ondeviceorientationabsolute": true, + "ondrag": true, + "ondragend": true, + "ondragenter": true, + "ondragleave": true, + "ondragover": true, + "ondragstart": true, + "ondrop": true, + "ondurationchange": true, + "onemptied": true, + "onended": true, + "onerror": true, + "onfocus": true, + "onformdata": true, + "ongamepadconnected": true, + "ongamepaddisconnected": true, + "ongotpointercapture": true, + "onhashchange": true, + "oninput": true, + "oninvalid": true, + "onkeydown": true, + "onkeypress": true, + "onkeyup": true, + "onlanguagechange": true, + "onload": true, + "onloadeddata": true, + "onloadedmetadata": true, + "onloadstart": true, + "onlostpointercapture": true, + "onmessage": true, + "onmessageerror": true, + "onmousedown": true, + "onmouseenter": true, + "onmouseleave": true, + "onmousemove": true, + "onmouseout": true, + "onmouseover": true, + "onmouseup": true, + "onmousewheel": true, + "onoffline": true, + "ononline": true, + "onpagehide": true, + "onpagereveal": true, + "onpageshow": true, + "onpageswap": true, + "onpaste": true, + "onpause": true, + "onplay": true, + "onplaying": true, + "onpointercancel": true, + "onpointerdown": true, + "onpointerenter": true, + "onpointerleave": true, + "onpointermove": true, + "onpointerout": true, + "onpointerover": true, + "onpointerrawupdate": true, + "onpointerup": true, + "onpopstate": true, + "onprogress": true, + "onratechange": true, + "onrejectionhandled": true, + "onreset": true, + "onresize": true, + "onscroll": true, + "onscrollend": true, + "onscrollsnapchange": true, + "onscrollsnapchanging": true, + "onsearch": true, + "onsecuritypolicyviolation": true, + "onseeked": true, + "onseeking": true, + "onselect": true, + "onselectionchange": true, + "onselectstart": true, + "onslotchange": true, + "onstalled": true, + "onstorage": true, + "onsubmit": true, + "onsuspend": true, + "ontimeupdate": true, + "ontoggle": true, + "ontransitioncancel": true, + "ontransitionend": true, + "ontransitionrun": true, + "ontransitionstart": true, + "onunhandledrejection": true, + "onunload": true, + "onvolumechange": true, + "onwaiting": true, + "onwheel": true, + "open": false, + "opener": false, + "Option": false, + "OrientationSensor": false, + "origin": false, + "originAgentCluster": false, + "OscillatorNode": false, + "OTPCredential": false, + "outerHeight": false, + "outerWidth": false, + "OverconstrainedError": false, + "PageRevealEvent": false, + "PageSwapEvent": false, + "PageTransitionEvent": false, + "pageXOffset": false, + "pageYOffset": false, + "PannerNode": false, + "parent": false, + "PasswordCredential": false, + "Path2D": false, + "PaymentAddress": false, + "PaymentManager": false, + "PaymentMethodChangeEvent": false, + "PaymentRequest": false, + "PaymentRequestUpdateEvent": false, + "PaymentResponse": false, + "performance": false, + "Performance": false, + "PerformanceElementTiming": false, + "PerformanceEntry": false, + "PerformanceEventTiming": false, + "PerformanceLongAnimationFrameTiming": false, + "PerformanceLongTaskTiming": false, + "PerformanceMark": false, + "PerformanceMeasure": false, + "PerformanceNavigation": false, + "PerformanceNavigationTiming": false, + "PerformanceObserver": false, + "PerformanceObserverEntryList": false, + "PerformancePaintTiming": false, + "PerformanceResourceTiming": false, + "PerformanceScriptTiming": false, + "PerformanceServerTiming": false, + "PerformanceTiming": false, + "PeriodicSyncManager": false, + "PeriodicWave": false, + "Permissions": false, + "PermissionStatus": false, + "PERSISTENT": false, + "personalbar": false, + "PictureInPictureEvent": false, + "PictureInPictureWindow": false, + "Plugin": false, + "PluginArray": false, + "PointerEvent": false, + "PopStateEvent": false, + "postMessage": false, + "Presentation": false, + "PresentationAvailability": false, + "PresentationConnection": false, + "PresentationConnectionAvailableEvent": false, + "PresentationConnectionCloseEvent": false, + "PresentationConnectionList": false, + "PresentationReceiver": false, + "PresentationRequest": false, + "PressureObserver": false, + "PressureRecord": false, + "print": false, + "ProcessingInstruction": false, + "Profiler": false, + "ProgressEvent": false, + "PromiseRejectionEvent": false, + "prompt": false, + "ProtectedAudience": false, + "PublicKeyCredential": false, + "PushManager": false, + "PushSubscription": false, + "PushSubscriptionOptions": false, + "queryLocalFonts": false, + "queueMicrotask": false, + "QuotaExceededError": false, + "RadioNodeList": false, + "Range": false, + "ReadableByteStreamController": false, + "ReadableStream": false, + "ReadableStreamBYOBReader": false, + "ReadableStreamBYOBRequest": false, + "ReadableStreamDefaultController": false, + "ReadableStreamDefaultReader": false, + "registerProcessor": false, + "RelativeOrientationSensor": false, + "RemotePlayback": false, + "removeEventListener": false, + "ReportBody": false, + "reportError": false, + "ReportingObserver": false, + "Request": false, + "requestAnimationFrame": false, + "requestIdleCallback": false, + "resizeBy": false, + "ResizeObserver": false, + "ResizeObserverEntry": false, + "ResizeObserverSize": false, + "resizeTo": false, + "Response": false, + "RestrictionTarget": false, + "RTCCertificate": false, + "RTCDataChannel": false, + "RTCDataChannelEvent": false, + "RTCDtlsTransport": false, + "RTCDTMFSender": false, + "RTCDTMFToneChangeEvent": false, + "RTCEncodedAudioFrame": false, + "RTCEncodedVideoFrame": false, + "RTCError": false, + "RTCErrorEvent": false, + "RTCIceCandidate": false, + "RTCIceTransport": false, + "RTCPeerConnection": false, + "RTCPeerConnectionIceErrorEvent": false, + "RTCPeerConnectionIceEvent": false, + "RTCRtpReceiver": false, + "RTCRtpScriptTransform": false, + "RTCRtpSender": false, + "RTCRtpTransceiver": false, + "RTCSctpTransport": false, + "RTCSessionDescription": false, + "RTCStatsReport": false, + "RTCTrackEvent": false, + "sampleRate": false, + "scheduler": false, + "Scheduler": false, + "Scheduling": false, + "screen": false, + "Screen": false, + "ScreenDetailed": false, + "ScreenDetails": false, + "screenLeft": false, + "ScreenOrientation": false, + "screenTop": false, + "screenX": false, + "screenY": false, + "ScriptProcessorNode": false, + "scroll": false, + "scrollbars": false, + "scrollBy": false, + "ScrollTimeline": false, + "scrollTo": false, + "scrollX": false, + "scrollY": false, + "SecurityPolicyViolationEvent": false, + "Selection": false, + "self": false, + "Sensor": false, + "SensorErrorEvent": false, + "Serial": false, + "SerialPort": false, + "ServiceWorker": false, + "ServiceWorkerContainer": false, + "ServiceWorkerRegistration": false, + "sessionStorage": false, + "setInterval": false, + "setTimeout": false, + "ShadowRoot": false, + "sharedStorage": false, + "SharedStorage": false, + "SharedStorageAppendMethod": false, + "SharedStorageClearMethod": false, + "SharedStorageDeleteMethod": false, + "SharedStorageModifierMethod": false, + "SharedStorageSetMethod": false, + "SharedStorageWorklet": false, + "SharedWorker": false, + "showDirectoryPicker": false, + "showOpenFilePicker": false, + "showSaveFilePicker": false, + "SnapEvent": false, + "SourceBuffer": false, + "SourceBufferList": false, + "SpeechGrammar": false, + "SpeechGrammarList": false, + "SpeechRecognition": false, + "SpeechRecognitionErrorEvent": false, + "SpeechRecognitionEvent": false, + "SpeechRecognitionPhrase": false, + "speechSynthesis": false, + "SpeechSynthesis": false, + "SpeechSynthesisErrorEvent": false, + "SpeechSynthesisEvent": false, + "SpeechSynthesisUtterance": false, + "SpeechSynthesisVoice": false, + "StaticRange": false, + "status": false, + "statusbar": false, + "StereoPannerNode": false, + "stop": false, + "Storage": false, + "StorageBucket": false, + "StorageBucketManager": false, + "StorageEvent": false, + "StorageManager": false, + "structuredClone": false, + "styleMedia": false, + "StylePropertyMap": false, + "StylePropertyMapReadOnly": false, + "StyleSheet": false, + "StyleSheetList": false, + "SubmitEvent": false, + "Subscriber": false, + "SubtleCrypto": false, + "Summarizer": false, + "SuppressedError": false, + "SVGAElement": false, + "SVGAngle": false, + "SVGAnimatedAngle": false, + "SVGAnimatedBoolean": false, + "SVGAnimatedEnumeration": false, + "SVGAnimatedInteger": false, + "SVGAnimatedLength": false, + "SVGAnimatedLengthList": false, + "SVGAnimatedNumber": false, + "SVGAnimatedNumberList": false, + "SVGAnimatedPreserveAspectRatio": false, + "SVGAnimatedRect": false, + "SVGAnimatedString": false, + "SVGAnimatedTransformList": false, + "SVGAnimateElement": false, + "SVGAnimateMotionElement": false, + "SVGAnimateTransformElement": false, + "SVGAnimationElement": false, + "SVGCircleElement": false, + "SVGClipPathElement": false, + "SVGComponentTransferFunctionElement": false, + "SVGDefsElement": false, + "SVGDescElement": false, + "SVGElement": false, + "SVGEllipseElement": false, + "SVGFEBlendElement": false, + "SVGFEColorMatrixElement": false, + "SVGFEComponentTransferElement": false, + "SVGFECompositeElement": false, + "SVGFEConvolveMatrixElement": false, + "SVGFEDiffuseLightingElement": false, + "SVGFEDisplacementMapElement": false, + "SVGFEDistantLightElement": false, + "SVGFEDropShadowElement": false, + "SVGFEFloodElement": false, + "SVGFEFuncAElement": false, + "SVGFEFuncBElement": false, + "SVGFEFuncGElement": false, + "SVGFEFuncRElement": false, + "SVGFEGaussianBlurElement": false, + "SVGFEImageElement": false, + "SVGFEMergeElement": false, + "SVGFEMergeNodeElement": false, + "SVGFEMorphologyElement": false, + "SVGFEOffsetElement": false, + "SVGFEPointLightElement": false, + "SVGFESpecularLightingElement": false, + "SVGFESpotLightElement": false, + "SVGFETileElement": false, + "SVGFETurbulenceElement": false, + "SVGFilterElement": false, + "SVGForeignObjectElement": false, + "SVGGElement": false, + "SVGGeometryElement": false, + "SVGGradientElement": false, + "SVGGraphicsElement": false, + "SVGImageElement": false, + "SVGLength": false, + "SVGLengthList": false, + "SVGLinearGradientElement": false, + "SVGLineElement": false, + "SVGMarkerElement": false, + "SVGMaskElement": false, + "SVGMatrix": false, + "SVGMetadataElement": false, + "SVGMPathElement": false, + "SVGNumber": false, + "SVGNumberList": false, + "SVGPathElement": false, + "SVGPatternElement": false, + "SVGPoint": false, + "SVGPointList": false, + "SVGPolygonElement": false, + "SVGPolylineElement": false, + "SVGPreserveAspectRatio": false, + "SVGRadialGradientElement": false, + "SVGRect": false, + "SVGRectElement": false, + "SVGScriptElement": false, + "SVGSetElement": false, + "SVGStopElement": false, + "SVGStringList": false, + "SVGStyleElement": false, + "SVGSVGElement": false, + "SVGSwitchElement": false, + "SVGSymbolElement": false, + "SVGTextContentElement": false, + "SVGTextElement": false, + "SVGTextPathElement": false, + "SVGTextPositioningElement": false, + "SVGTitleElement": false, + "SVGTransform": false, + "SVGTransformList": false, + "SVGTSpanElement": false, + "SVGUnitTypes": false, + "SVGUseElement": false, + "SVGViewElement": false, + "SyncManager": false, + "TaskAttributionTiming": false, + "TaskController": false, + "TaskPriorityChangeEvent": false, + "TaskSignal": false, + "TEMPORARY": false, + "Text": false, + "TextDecoder": false, + "TextDecoderStream": false, + "TextEncoder": false, + "TextEncoderStream": false, + "TextEvent": false, + "TextFormat": false, + "TextFormatUpdateEvent": false, + "TextMetrics": false, + "TextTrack": false, + "TextTrackCue": false, + "TextTrackCueList": false, + "TextTrackList": false, + "TextUpdateEvent": false, + "TimeEvent": false, + "TimeRanges": false, + "ToggleEvent": false, + "toolbar": false, + "top": false, + "Touch": false, + "TouchEvent": false, + "TouchList": false, + "TrackEvent": false, + "TransformStream": false, + "TransformStreamDefaultController": false, + "TransitionEvent": false, + "Translator": false, + "TreeWalker": false, + "TrustedHTML": false, + "TrustedScript": false, + "TrustedScriptURL": false, + "TrustedTypePolicy": false, + "TrustedTypePolicyFactory": false, + "trustedTypes": false, + "UIEvent": false, + "URL": false, + "URLPattern": false, + "URLSearchParams": false, + "USB": false, + "USBAlternateInterface": false, + "USBConfiguration": false, + "USBConnectionEvent": false, + "USBDevice": false, + "USBEndpoint": false, + "USBInterface": false, + "USBInTransferResult": false, + "USBIsochronousInTransferPacket": false, + "USBIsochronousInTransferResult": false, + "USBIsochronousOutTransferPacket": false, + "USBIsochronousOutTransferResult": false, + "USBOutTransferResult": false, + "UserActivation": false, + "ValidityState": false, + "VideoColorSpace": false, + "VideoDecoder": false, + "VideoEncoder": false, + "VideoFrame": false, + "VideoPlaybackQuality": false, + "viewport": false, + "Viewport": false, + "ViewTimeline": false, + "ViewTransition": false, + "ViewTransitionTypeSet": false, + "VirtualKeyboard": false, + "VirtualKeyboardGeometryChangeEvent": false, + "VisibilityStateEntry": false, + "visualViewport": false, + "VisualViewport": false, + "VTTCue": false, + "VTTRegion": false, + "WakeLock": false, + "WakeLockSentinel": false, + "WaveShaperNode": false, + "WebAssembly": false, + "WebGL2RenderingContext": false, + "WebGLActiveInfo": false, + "WebGLBuffer": false, + "WebGLContextEvent": false, + "WebGLFramebuffer": false, + "WebGLObject": false, + "WebGLProgram": false, + "WebGLQuery": false, + "WebGLRenderbuffer": false, + "WebGLRenderingContext": false, + "WebGLSampler": false, + "WebGLShader": false, + "WebGLShaderPrecisionFormat": false, + "WebGLSync": false, + "WebGLTexture": false, + "WebGLTransformFeedback": false, + "WebGLUniformLocation": false, + "WebGLVertexArrayObject": false, + "WebSocket": false, + "WebSocketError": false, + "WebSocketStream": false, + "WebTransport": false, + "WebTransportBidirectionalStream": false, + "WebTransportDatagramDuplexStream": false, + "WebTransportError": false, + "WebTransportReceiveStream": false, + "WebTransportSendStream": false, + "WGSLLanguageFeatures": false, + "WheelEvent": false, + "when": false, + "window": false, + "Window": false, + "WindowControlsOverlay": false, + "WindowControlsOverlayGeometryChangeEvent": false, + "Worker": false, + "Worklet": false, + "WorkletGlobalScope": false, + "WritableStream": false, + "WritableStreamDefaultController": false, + "WritableStreamDefaultWriter": false, + "XMLDocument": false, + "XMLHttpRequest": false, + "XMLHttpRequestEventTarget": false, + "XMLHttpRequestUpload": false, + "XMLSerializer": false, + "XPathEvaluator": false, + "XPathExpression": false, + "XPathResult": false, + "XRAnchor": false, + "XRAnchorSet": false, + "XRBoundedReferenceSpace": false, + "XRCamera": false, + "XRCPUDepthInformation": false, + "XRDepthInformation": false, + "XRDOMOverlayState": false, + "XRFrame": false, + "XRHand": false, + "XRHitTestResult": false, + "XRHitTestSource": false, + "XRInputSource": false, + "XRInputSourceArray": false, + "XRInputSourceEvent": false, + "XRInputSourcesChangeEvent": false, + "XRJointPose": false, + "XRJointSpace": false, + "XRLayer": false, + "XRLightEstimate": false, + "XRLightProbe": false, + "XRPose": false, + "XRRay": false, + "XRReferenceSpace": false, + "XRReferenceSpaceEvent": false, + "XRRenderState": false, + "XRRigidTransform": false, + "XRSession": false, + "XRSessionEvent": false, + "XRSpace": false, + "XRSystem": false, + "XRTransientInputHitTestResult": false, + "XRTransientInputHitTestSource": false, + "XRView": false, + "XRViewerPose": false, + "XRViewport": false, + "XRWebGLBinding": false, + "XRWebGLDepthInformation": false, + "XRWebGLLayer": false, + "XSLTProcessor": false + } + }, + "errors": [ + { + "messageId": "defaultMessage", + "data": { + "name": "foo" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-restricted-globals > invalid + +```js +window.foo(); myGlobal.foo() +``` + +```json +{ + "options": [ + { + "globals": [ + "foo" + ], + "checkGlobalObject": true, + "globalObjects": [ + "myGlobal" + ] + } + ], + "languageOptions": { + "globals": { + "AbortController": false, + "AbortSignal": false, + "AbsoluteOrientationSensor": false, + "AbstractRange": false, + "Accelerometer": false, + "addEventListener": false, + "ai": false, + "AI": false, + "AICreateMonitor": false, + "AITextSession": false, + "alert": false, + "AnalyserNode": false, + "Animation": false, + "AnimationEffect": false, + "AnimationEvent": false, + "AnimationPlaybackEvent": false, + "AnimationTimeline": false, + "AsyncDisposableStack": false, + "atob": false, + "Attr": false, + "Audio": false, + "AudioBuffer": false, + "AudioBufferSourceNode": false, + "AudioContext": false, + "AudioData": false, + "AudioDecoder": false, + "AudioDestinationNode": false, + "AudioEncoder": false, + "AudioListener": false, + "AudioNode": false, + "AudioParam": false, + "AudioParamMap": false, + "AudioProcessingEvent": false, + "AudioScheduledSourceNode": false, + "AudioSinkInfo": false, + "AudioWorklet": false, + "AudioWorkletGlobalScope": false, + "AudioWorkletNode": false, + "AudioWorkletProcessor": false, + "AuthenticatorAssertionResponse": false, + "AuthenticatorAttestationResponse": false, + "AuthenticatorResponse": false, + "BackgroundFetchManager": false, + "BackgroundFetchRecord": false, + "BackgroundFetchRegistration": false, + "BarcodeDetector": false, + "BarProp": false, + "BaseAudioContext": false, + "BatteryManager": false, + "BeforeUnloadEvent": false, + "BiquadFilterNode": false, + "Blob": false, + "BlobEvent": false, + "Bluetooth": false, + "BluetoothCharacteristicProperties": false, + "BluetoothDevice": false, + "BluetoothRemoteGATTCharacteristic": false, + "BluetoothRemoteGATTDescriptor": false, + "BluetoothRemoteGATTServer": false, + "BluetoothRemoteGATTService": false, + "BluetoothUUID": false, + "blur": false, + "BroadcastChannel": false, + "BrowserCaptureMediaStreamTrack": false, + "btoa": false, + "ByteLengthQueuingStrategy": false, + "Cache": false, + "caches": false, + "CacheStorage": false, + "cancelAnimationFrame": false, + "cancelIdleCallback": false, + "CanvasCaptureMediaStream": false, + "CanvasCaptureMediaStreamTrack": false, + "CanvasGradient": false, + "CanvasPattern": false, + "CanvasRenderingContext2D": false, + "CaptureController": false, + "CaretPosition": false, + "CDATASection": false, + "ChannelMergerNode": false, + "ChannelSplitterNode": false, + "ChapterInformation": false, + "CharacterBoundsUpdateEvent": false, + "CharacterData": false, + "clearInterval": false, + "clearTimeout": false, + "clientInformation": false, + "Clipboard": false, + "ClipboardChangeEvent": false, + "ClipboardEvent": false, + "ClipboardItem": false, + "close": false, + "closed": false, + "CloseEvent": false, + "CloseWatcher": false, + "CommandEvent": false, + "Comment": false, + "CompositionEvent": false, + "CompressionStream": false, + "confirm": false, + "console": false, + "ConstantSourceNode": false, + "ContentVisibilityAutoStateChangeEvent": false, + "ConvolverNode": false, + "CookieChangeEvent": false, + "CookieDeprecationLabel": false, + "cookieStore": false, + "CookieStore": false, + "CookieStoreManager": false, + "CountQueuingStrategy": false, + "createImageBitmap": false, + "CreateMonitor": false, + "Credential": false, + "credentialless": false, + "CredentialsContainer": false, + "CropTarget": false, + "crossOriginIsolated": false, + "crypto": false, + "Crypto": false, + "CryptoKey": false, + "CSPViolationReportBody": false, + "CSS": false, + "CSSAnimation": false, + "CSSConditionRule": false, + "CSSContainerRule": false, + "CSSCounterStyleRule": false, + "CSSFontFaceRule": false, + "CSSFontFeatureValuesRule": false, + "CSSFontPaletteValuesRule": false, + "CSSFunctionDeclarations": false, + "CSSFunctionDescriptors": false, + "CSSFunctionRule": false, + "CSSGroupingRule": false, + "CSSImageValue": false, + "CSSImportRule": false, + "CSSKeyframeRule": false, + "CSSKeyframesRule": false, + "CSSKeywordValue": false, + "CSSLayerBlockRule": false, + "CSSLayerStatementRule": false, + "CSSMarginRule": false, + "CSSMathClamp": false, + "CSSMathInvert": false, + "CSSMathMax": false, + "CSSMathMin": false, + "CSSMathNegate": false, + "CSSMathProduct": false, + "CSSMathSum": false, + "CSSMathValue": false, + "CSSMatrixComponent": false, + "CSSMediaRule": false, + "CSSNamespaceRule": false, + "CSSNestedDeclarations": false, + "CSSNumericArray": false, + "CSSNumericValue": false, + "CSSPageDescriptors": false, + "CSSPageRule": false, + "CSSPerspective": false, + "CSSPositionTryDescriptors": false, + "CSSPositionTryRule": false, + "CSSPositionValue": false, + "CSSPropertyRule": false, + "CSSRotate": false, + "CSSRule": false, + "CSSRuleList": false, + "CSSScale": false, + "CSSScopeRule": false, + "CSSSkew": false, + "CSSSkewX": false, + "CSSSkewY": false, + "CSSStartingStyleRule": false, + "CSSStyleDeclaration": false, + "CSSStyleRule": false, + "CSSStyleSheet": false, + "CSSStyleValue": false, + "CSSSupportsRule": false, + "CSSTransformComponent": false, + "CSSTransformValue": false, + "CSSTransition": false, + "CSSTranslate": false, + "CSSUnitValue": false, + "CSSUnparsedValue": false, + "CSSVariableReferenceValue": false, + "CSSViewTransitionRule": false, + "currentFrame": false, + "currentTime": false, + "CustomElementRegistry": false, + "customElements": false, + "CustomEvent": false, + "CustomStateSet": false, + "DataTransfer": false, + "DataTransferItem": false, + "DataTransferItemList": false, + "DecompressionStream": false, + "DelayNode": false, + "DelegatedInkTrailPresenter": false, + "DeviceMotionEvent": false, + "DeviceMotionEventAcceleration": false, + "DeviceMotionEventRotationRate": false, + "DeviceOrientationEvent": false, + "devicePixelRatio": false, + "DevicePosture": false, + "DigitalCredential": false, + "dispatchEvent": false, + "DisposableStack": false, + "document": false, + "Document": false, + "DocumentFragment": false, + "documentPictureInPicture": false, + "DocumentPictureInPicture": false, + "DocumentPictureInPictureEvent": false, + "DocumentTimeline": false, + "DocumentType": false, + "DOMError": false, + "DOMException": false, + "DOMImplementation": false, + "DOMMatrix": false, + "DOMMatrixReadOnly": false, + "DOMParser": false, + "DOMPoint": false, + "DOMPointReadOnly": false, + "DOMQuad": false, + "DOMRect": false, + "DOMRectList": false, + "DOMRectReadOnly": false, + "DOMStringList": false, + "DOMStringMap": false, + "DOMTokenList": false, + "DragEvent": false, + "DynamicsCompressorNode": false, + "EditContext": false, + "Element": false, + "ElementInternals": false, + "EncodedAudioChunk": false, + "EncodedVideoChunk": false, + "ErrorEvent": false, + "event": false, + "Event": false, + "EventCounts": false, + "EventSource": false, + "EventTarget": false, + "external": false, + "External": false, + "EyeDropper": false, + "FeaturePolicy": false, + "FederatedCredential": false, + "fence": false, + "Fence": false, + "FencedFrameConfig": false, + "fetch": false, + "fetchLater": false, + "FetchLaterResult": false, + "File": false, + "FileList": false, + "FileReader": false, + "FileSystem": false, + "FileSystemDirectoryEntry": false, + "FileSystemDirectoryHandle": false, + "FileSystemDirectoryReader": false, + "FileSystemEntry": false, + "FileSystemFileEntry": false, + "FileSystemFileHandle": false, + "FileSystemHandle": false, + "FileSystemObserver": false, + "FileSystemWritableFileStream": false, + "find": false, + "focus": false, + "FocusEvent": false, + "FontData": false, + "FontFace": false, + "FontFaceSet": false, + "FontFaceSetLoadEvent": false, + "FormData": false, + "FormDataEvent": false, + "FragmentDirective": false, + "frameElement": false, + "frames": false, + "GainNode": false, + "Gamepad": false, + "GamepadAxisMoveEvent": false, + "GamepadButton": false, + "GamepadButtonEvent": false, + "GamepadEvent": false, + "GamepadHapticActuator": false, + "GamepadPose": false, + "Geolocation": false, + "GeolocationCoordinates": false, + "GeolocationPosition": false, + "GeolocationPositionError": false, + "getComputedStyle": false, + "getScreenDetails": false, + "getSelection": false, + "GPU": false, + "GPUAdapter": false, + "GPUAdapterInfo": false, + "GPUBindGroup": false, + "GPUBindGroupLayout": false, + "GPUBuffer": false, + "GPUBufferUsage": false, + "GPUCanvasContext": false, + "GPUColorWrite": false, + "GPUCommandBuffer": false, + "GPUCommandEncoder": false, + "GPUCompilationInfo": false, + "GPUCompilationMessage": false, + "GPUComputePassEncoder": false, + "GPUComputePipeline": false, + "GPUDevice": false, + "GPUDeviceLostInfo": false, + "GPUError": false, + "GPUExternalTexture": false, + "GPUInternalError": false, + "GPUMapMode": false, + "GPUOutOfMemoryError": false, + "GPUPipelineError": false, + "GPUPipelineLayout": false, + "GPUQuerySet": false, + "GPUQueue": false, + "GPURenderBundle": false, + "GPURenderBundleEncoder": false, + "GPURenderPassEncoder": false, + "GPURenderPipeline": false, + "GPUSampler": false, + "GPUShaderModule": false, + "GPUShaderStage": false, + "GPUSupportedFeatures": false, + "GPUSupportedLimits": false, + "GPUTexture": false, + "GPUTextureUsage": false, + "GPUTextureView": false, + "GPUUncapturedErrorEvent": false, + "GPUValidationError": false, + "GravitySensor": false, + "Gyroscope": false, + "HashChangeEvent": false, + "Headers": false, + "HID": false, + "HIDConnectionEvent": false, + "HIDDevice": false, + "HIDInputReportEvent": false, + "Highlight": false, + "HighlightRegistry": false, + "history": false, + "History": false, + "HTMLAllCollection": false, + "HTMLAnchorElement": false, + "HTMLAreaElement": false, + "HTMLAudioElement": false, + "HTMLBaseElement": false, + "HTMLBodyElement": false, + "HTMLBRElement": false, + "HTMLButtonElement": false, + "HTMLCanvasElement": false, + "HTMLCollection": false, + "HTMLDataElement": false, + "HTMLDataListElement": false, + "HTMLDetailsElement": false, + "HTMLDialogElement": false, + "HTMLDirectoryElement": false, + "HTMLDivElement": false, + "HTMLDListElement": false, + "HTMLDocument": false, + "HTMLElement": false, + "HTMLEmbedElement": false, + "HTMLFencedFrameElement": false, + "HTMLFieldSetElement": false, + "HTMLFontElement": false, + "HTMLFormControlsCollection": false, + "HTMLFormElement": false, + "HTMLFrameElement": false, + "HTMLFrameSetElement": false, + "HTMLHeadElement": false, + "HTMLHeadingElement": false, + "HTMLHRElement": false, + "HTMLHtmlElement": false, + "HTMLIFrameElement": false, + "HTMLImageElement": false, + "HTMLInputElement": false, + "HTMLLabelElement": false, + "HTMLLegendElement": false, + "HTMLLIElement": false, + "HTMLLinkElement": false, + "HTMLMapElement": false, + "HTMLMarqueeElement": false, + "HTMLMediaElement": false, + "HTMLMenuElement": false, + "HTMLMetaElement": false, + "HTMLMeterElement": false, + "HTMLModElement": false, + "HTMLObjectElement": false, + "HTMLOListElement": false, + "HTMLOptGroupElement": false, + "HTMLOptionElement": false, + "HTMLOptionsCollection": false, + "HTMLOutputElement": false, + "HTMLParagraphElement": false, + "HTMLParamElement": false, + "HTMLPictureElement": false, + "HTMLPreElement": false, + "HTMLProgressElement": false, + "HTMLQuoteElement": false, + "HTMLScriptElement": false, + "HTMLSelectedContentElement": false, + "HTMLSelectElement": false, + "HTMLSlotElement": false, + "HTMLSourceElement": false, + "HTMLSpanElement": false, + "HTMLStyleElement": false, + "HTMLTableCaptionElement": false, + "HTMLTableCellElement": false, + "HTMLTableColElement": false, + "HTMLTableElement": false, + "HTMLTableRowElement": false, + "HTMLTableSectionElement": false, + "HTMLTemplateElement": false, + "HTMLTextAreaElement": false, + "HTMLTimeElement": false, + "HTMLTitleElement": false, + "HTMLTrackElement": false, + "HTMLUListElement": false, + "HTMLUnknownElement": false, + "HTMLVideoElement": false, + "IDBCursor": false, + "IDBCursorWithValue": false, + "IDBDatabase": false, + "IDBFactory": false, + "IDBIndex": false, + "IDBKeyRange": false, + "IDBObjectStore": false, + "IDBOpenDBRequest": false, + "IDBRecord": false, + "IDBRequest": false, + "IDBTransaction": false, + "IDBVersionChangeEvent": false, + "IdentityCredential": false, + "IdentityCredentialError": false, + "IdentityProvider": false, + "IdleDeadline": false, + "IdleDetector": false, + "IIRFilterNode": false, + "Image": false, + "ImageBitmap": false, + "ImageBitmapRenderingContext": false, + "ImageCapture": false, + "ImageData": false, + "ImageDecoder": false, + "ImageTrack": false, + "ImageTrackList": false, + "indexedDB": false, + "Ink": false, + "innerHeight": false, + "innerWidth": false, + "InputDeviceCapabilities": false, + "InputDeviceInfo": false, + "InputEvent": false, + "IntegrityViolationReportBody": false, + "InterestEvent": false, + "IntersectionObserver": false, + "IntersectionObserverEntry": false, + "isSecureContext": false, + "Keyboard": false, + "KeyboardEvent": false, + "KeyboardLayoutMap": false, + "KeyframeEffect": false, + "LanguageDetector": false, + "LargestContentfulPaint": false, + "LaunchParams": false, + "launchQueue": false, + "LaunchQueue": false, + "LayoutShift": false, + "LayoutShiftAttribution": false, + "length": false, + "LinearAccelerationSensor": false, + "localStorage": false, + "location": true, + "Location": false, + "locationbar": false, + "Lock": false, + "LockManager": false, + "matchMedia": false, + "MathMLElement": false, + "MediaCapabilities": false, + "MediaCapabilitiesInfo": false, + "MediaDeviceInfo": false, + "MediaDevices": false, + "MediaElementAudioSourceNode": false, + "MediaEncryptedEvent": false, + "MediaError": false, + "MediaKeyError": false, + "MediaKeyMessageEvent": false, + "MediaKeys": false, + "MediaKeySession": false, + "MediaKeyStatusMap": false, + "MediaKeySystemAccess": false, + "MediaList": false, + "MediaMetadata": false, + "MediaQueryList": false, + "MediaQueryListEvent": false, + "MediaRecorder": false, + "MediaRecorderErrorEvent": false, + "MediaSession": false, + "MediaSource": false, + "MediaSourceHandle": false, + "MediaStream": false, + "MediaStreamAudioDestinationNode": false, + "MediaStreamAudioSourceNode": false, + "MediaStreamEvent": false, + "MediaStreamTrack": false, + "MediaStreamTrackAudioSourceNode": false, + "MediaStreamTrackAudioStats": false, + "MediaStreamTrackEvent": false, + "MediaStreamTrackGenerator": false, + "MediaStreamTrackProcessor": false, + "MediaStreamTrackVideoStats": false, + "menubar": false, + "MessageChannel": false, + "MessageEvent": false, + "MessagePort": false, + "MIDIAccess": false, + "MIDIConnectionEvent": false, + "MIDIInput": false, + "MIDIInputMap": false, + "MIDIMessageEvent": false, + "MIDIOutput": false, + "MIDIOutputMap": false, + "MIDIPort": false, + "MimeType": false, + "MimeTypeArray": false, + "model": false, + "ModelGenericSession": false, + "ModelManager": false, + "MouseEvent": false, + "moveBy": false, + "moveTo": false, + "MutationEvent": false, + "MutationObserver": false, + "MutationRecord": false, + "name": false, + "NamedNodeMap": false, + "NavigateEvent": false, + "navigation": false, + "Navigation": false, + "NavigationActivation": false, + "NavigationCurrentEntryChangeEvent": false, + "NavigationDestination": false, + "NavigationHistoryEntry": false, + "NavigationPrecommitController": false, + "NavigationPreloadManager": false, + "NavigationTransition": false, + "navigator": false, + "Navigator": false, + "NavigatorLogin": false, + "NavigatorManagedData": false, + "NavigatorUAData": false, + "NetworkInformation": false, + "Node": false, + "NodeFilter": false, + "NodeIterator": false, + "NodeList": false, + "Notification": false, + "NotifyPaintEvent": false, + "NotRestoredReasonDetails": false, + "NotRestoredReasons": false, + "Observable": false, + "OfflineAudioCompletionEvent": false, + "OfflineAudioContext": false, + "offscreenBuffering": false, + "OffscreenCanvas": false, + "OffscreenCanvasRenderingContext2D": false, + "onabort": true, + "onafterprint": true, + "onanimationcancel": true, + "onanimationend": true, + "onanimationiteration": true, + "onanimationstart": true, + "onappinstalled": true, + "onauxclick": true, + "onbeforeinput": true, + "onbeforeinstallprompt": true, + "onbeforematch": true, + "onbeforeprint": true, + "onbeforetoggle": true, + "onbeforeunload": true, + "onbeforexrselect": true, + "onblur": true, + "oncancel": true, + "oncanplay": true, + "oncanplaythrough": true, + "onchange": true, + "onclick": true, + "onclose": true, + "oncommand": true, + "oncontentvisibilityautostatechange": true, + "oncontextlost": true, + "oncontextmenu": true, + "oncontextrestored": true, + "oncopy": true, + "oncuechange": true, + "oncut": true, + "ondblclick": true, + "ondevicemotion": true, + "ondeviceorientation": true, + "ondeviceorientationabsolute": true, + "ondrag": true, + "ondragend": true, + "ondragenter": true, + "ondragleave": true, + "ondragover": true, + "ondragstart": true, + "ondrop": true, + "ondurationchange": true, + "onemptied": true, + "onended": true, + "onerror": true, + "onfocus": true, + "onformdata": true, + "ongamepadconnected": true, + "ongamepaddisconnected": true, + "ongotpointercapture": true, + "onhashchange": true, + "oninput": true, + "oninvalid": true, + "onkeydown": true, + "onkeypress": true, + "onkeyup": true, + "onlanguagechange": true, + "onload": true, + "onloadeddata": true, + "onloadedmetadata": true, + "onloadstart": true, + "onlostpointercapture": true, + "onmessage": true, + "onmessageerror": true, + "onmousedown": true, + "onmouseenter": true, + "onmouseleave": true, + "onmousemove": true, + "onmouseout": true, + "onmouseover": true, + "onmouseup": true, + "onmousewheel": true, + "onoffline": true, + "ononline": true, + "onpagehide": true, + "onpagereveal": true, + "onpageshow": true, + "onpageswap": true, + "onpaste": true, + "onpause": true, + "onplay": true, + "onplaying": true, + "onpointercancel": true, + "onpointerdown": true, + "onpointerenter": true, + "onpointerleave": true, + "onpointermove": true, + "onpointerout": true, + "onpointerover": true, + "onpointerrawupdate": true, + "onpointerup": true, + "onpopstate": true, + "onprogress": true, + "onratechange": true, + "onrejectionhandled": true, + "onreset": true, + "onresize": true, + "onscroll": true, + "onscrollend": true, + "onscrollsnapchange": true, + "onscrollsnapchanging": true, + "onsearch": true, + "onsecuritypolicyviolation": true, + "onseeked": true, + "onseeking": true, + "onselect": true, + "onselectionchange": true, + "onselectstart": true, + "onslotchange": true, + "onstalled": true, + "onstorage": true, + "onsubmit": true, + "onsuspend": true, + "ontimeupdate": true, + "ontoggle": true, + "ontransitioncancel": true, + "ontransitionend": true, + "ontransitionrun": true, + "ontransitionstart": true, + "onunhandledrejection": true, + "onunload": true, + "onvolumechange": true, + "onwaiting": true, + "onwheel": true, + "open": false, + "opener": false, + "Option": false, + "OrientationSensor": false, + "origin": false, + "originAgentCluster": false, + "OscillatorNode": false, + "OTPCredential": false, + "outerHeight": false, + "outerWidth": false, + "OverconstrainedError": false, + "PageRevealEvent": false, + "PageSwapEvent": false, + "PageTransitionEvent": false, + "pageXOffset": false, + "pageYOffset": false, + "PannerNode": false, + "parent": false, + "PasswordCredential": false, + "Path2D": false, + "PaymentAddress": false, + "PaymentManager": false, + "PaymentMethodChangeEvent": false, + "PaymentRequest": false, + "PaymentRequestUpdateEvent": false, + "PaymentResponse": false, + "performance": false, + "Performance": false, + "PerformanceElementTiming": false, + "PerformanceEntry": false, + "PerformanceEventTiming": false, + "PerformanceLongAnimationFrameTiming": false, + "PerformanceLongTaskTiming": false, + "PerformanceMark": false, + "PerformanceMeasure": false, + "PerformanceNavigation": false, + "PerformanceNavigationTiming": false, + "PerformanceObserver": false, + "PerformanceObserverEntryList": false, + "PerformancePaintTiming": false, + "PerformanceResourceTiming": false, + "PerformanceScriptTiming": false, + "PerformanceServerTiming": false, + "PerformanceTiming": false, + "PeriodicSyncManager": false, + "PeriodicWave": false, + "Permissions": false, + "PermissionStatus": false, + "PERSISTENT": false, + "personalbar": false, + "PictureInPictureEvent": false, + "PictureInPictureWindow": false, + "Plugin": false, + "PluginArray": false, + "PointerEvent": false, + "PopStateEvent": false, + "postMessage": false, + "Presentation": false, + "PresentationAvailability": false, + "PresentationConnection": false, + "PresentationConnectionAvailableEvent": false, + "PresentationConnectionCloseEvent": false, + "PresentationConnectionList": false, + "PresentationReceiver": false, + "PresentationRequest": false, + "PressureObserver": false, + "PressureRecord": false, + "print": false, + "ProcessingInstruction": false, + "Profiler": false, + "ProgressEvent": false, + "PromiseRejectionEvent": false, + "prompt": false, + "ProtectedAudience": false, + "PublicKeyCredential": false, + "PushManager": false, + "PushSubscription": false, + "PushSubscriptionOptions": false, + "queryLocalFonts": false, + "queueMicrotask": false, + "QuotaExceededError": false, + "RadioNodeList": false, + "Range": false, + "ReadableByteStreamController": false, + "ReadableStream": false, + "ReadableStreamBYOBReader": false, + "ReadableStreamBYOBRequest": false, + "ReadableStreamDefaultController": false, + "ReadableStreamDefaultReader": false, + "registerProcessor": false, + "RelativeOrientationSensor": false, + "RemotePlayback": false, + "removeEventListener": false, + "ReportBody": false, + "reportError": false, + "ReportingObserver": false, + "Request": false, + "requestAnimationFrame": false, + "requestIdleCallback": false, + "resizeBy": false, + "ResizeObserver": false, + "ResizeObserverEntry": false, + "ResizeObserverSize": false, + "resizeTo": false, + "Response": false, + "RestrictionTarget": false, + "RTCCertificate": false, + "RTCDataChannel": false, + "RTCDataChannelEvent": false, + "RTCDtlsTransport": false, + "RTCDTMFSender": false, + "RTCDTMFToneChangeEvent": false, + "RTCEncodedAudioFrame": false, + "RTCEncodedVideoFrame": false, + "RTCError": false, + "RTCErrorEvent": false, + "RTCIceCandidate": false, + "RTCIceTransport": false, + "RTCPeerConnection": false, + "RTCPeerConnectionIceErrorEvent": false, + "RTCPeerConnectionIceEvent": false, + "RTCRtpReceiver": false, + "RTCRtpScriptTransform": false, + "RTCRtpSender": false, + "RTCRtpTransceiver": false, + "RTCSctpTransport": false, + "RTCSessionDescription": false, + "RTCStatsReport": false, + "RTCTrackEvent": false, + "sampleRate": false, + "scheduler": false, + "Scheduler": false, + "Scheduling": false, + "screen": false, + "Screen": false, + "ScreenDetailed": false, + "ScreenDetails": false, + "screenLeft": false, + "ScreenOrientation": false, + "screenTop": false, + "screenX": false, + "screenY": false, + "ScriptProcessorNode": false, + "scroll": false, + "scrollbars": false, + "scrollBy": false, + "ScrollTimeline": false, + "scrollTo": false, + "scrollX": false, + "scrollY": false, + "SecurityPolicyViolationEvent": false, + "Selection": false, + "self": false, + "Sensor": false, + "SensorErrorEvent": false, + "Serial": false, + "SerialPort": false, + "ServiceWorker": false, + "ServiceWorkerContainer": false, + "ServiceWorkerRegistration": false, + "sessionStorage": false, + "setInterval": false, + "setTimeout": false, + "ShadowRoot": false, + "sharedStorage": false, + "SharedStorage": false, + "SharedStorageAppendMethod": false, + "SharedStorageClearMethod": false, + "SharedStorageDeleteMethod": false, + "SharedStorageModifierMethod": false, + "SharedStorageSetMethod": false, + "SharedStorageWorklet": false, + "SharedWorker": false, + "showDirectoryPicker": false, + "showOpenFilePicker": false, + "showSaveFilePicker": false, + "SnapEvent": false, + "SourceBuffer": false, + "SourceBufferList": false, + "SpeechGrammar": false, + "SpeechGrammarList": false, + "SpeechRecognition": false, + "SpeechRecognitionErrorEvent": false, + "SpeechRecognitionEvent": false, + "SpeechRecognitionPhrase": false, + "speechSynthesis": false, + "SpeechSynthesis": false, + "SpeechSynthesisErrorEvent": false, + "SpeechSynthesisEvent": false, + "SpeechSynthesisUtterance": false, + "SpeechSynthesisVoice": false, + "StaticRange": false, + "status": false, + "statusbar": false, + "StereoPannerNode": false, + "stop": false, + "Storage": false, + "StorageBucket": false, + "StorageBucketManager": false, + "StorageEvent": false, + "StorageManager": false, + "structuredClone": false, + "styleMedia": false, + "StylePropertyMap": false, + "StylePropertyMapReadOnly": false, + "StyleSheet": false, + "StyleSheetList": false, + "SubmitEvent": false, + "Subscriber": false, + "SubtleCrypto": false, + "Summarizer": false, + "SuppressedError": false, + "SVGAElement": false, + "SVGAngle": false, + "SVGAnimatedAngle": false, + "SVGAnimatedBoolean": false, + "SVGAnimatedEnumeration": false, + "SVGAnimatedInteger": false, + "SVGAnimatedLength": false, + "SVGAnimatedLengthList": false, + "SVGAnimatedNumber": false, + "SVGAnimatedNumberList": false, + "SVGAnimatedPreserveAspectRatio": false, + "SVGAnimatedRect": false, + "SVGAnimatedString": false, + "SVGAnimatedTransformList": false, + "SVGAnimateElement": false, + "SVGAnimateMotionElement": false, + "SVGAnimateTransformElement": false, + "SVGAnimationElement": false, + "SVGCircleElement": false, + "SVGClipPathElement": false, + "SVGComponentTransferFunctionElement": false, + "SVGDefsElement": false, + "SVGDescElement": false, + "SVGElement": false, + "SVGEllipseElement": false, + "SVGFEBlendElement": false, + "SVGFEColorMatrixElement": false, + "SVGFEComponentTransferElement": false, + "SVGFECompositeElement": false, + "SVGFEConvolveMatrixElement": false, + "SVGFEDiffuseLightingElement": false, + "SVGFEDisplacementMapElement": false, + "SVGFEDistantLightElement": false, + "SVGFEDropShadowElement": false, + "SVGFEFloodElement": false, + "SVGFEFuncAElement": false, + "SVGFEFuncBElement": false, + "SVGFEFuncGElement": false, + "SVGFEFuncRElement": false, + "SVGFEGaussianBlurElement": false, + "SVGFEImageElement": false, + "SVGFEMergeElement": false, + "SVGFEMergeNodeElement": false, + "SVGFEMorphologyElement": false, + "SVGFEOffsetElement": false, + "SVGFEPointLightElement": false, + "SVGFESpecularLightingElement": false, + "SVGFESpotLightElement": false, + "SVGFETileElement": false, + "SVGFETurbulenceElement": false, + "SVGFilterElement": false, + "SVGForeignObjectElement": false, + "SVGGElement": false, + "SVGGeometryElement": false, + "SVGGradientElement": false, + "SVGGraphicsElement": false, + "SVGImageElement": false, + "SVGLength": false, + "SVGLengthList": false, + "SVGLinearGradientElement": false, + "SVGLineElement": false, + "SVGMarkerElement": false, + "SVGMaskElement": false, + "SVGMatrix": false, + "SVGMetadataElement": false, + "SVGMPathElement": false, + "SVGNumber": false, + "SVGNumberList": false, + "SVGPathElement": false, + "SVGPatternElement": false, + "SVGPoint": false, + "SVGPointList": false, + "SVGPolygonElement": false, + "SVGPolylineElement": false, + "SVGPreserveAspectRatio": false, + "SVGRadialGradientElement": false, + "SVGRect": false, + "SVGRectElement": false, + "SVGScriptElement": false, + "SVGSetElement": false, + "SVGStopElement": false, + "SVGStringList": false, + "SVGStyleElement": false, + "SVGSVGElement": false, + "SVGSwitchElement": false, + "SVGSymbolElement": false, + "SVGTextContentElement": false, + "SVGTextElement": false, + "SVGTextPathElement": false, + "SVGTextPositioningElement": false, + "SVGTitleElement": false, + "SVGTransform": false, + "SVGTransformList": false, + "SVGTSpanElement": false, + "SVGUnitTypes": false, + "SVGUseElement": false, + "SVGViewElement": false, + "SyncManager": false, + "TaskAttributionTiming": false, + "TaskController": false, + "TaskPriorityChangeEvent": false, + "TaskSignal": false, + "TEMPORARY": false, + "Text": false, + "TextDecoder": false, + "TextDecoderStream": false, + "TextEncoder": false, + "TextEncoderStream": false, + "TextEvent": false, + "TextFormat": false, + "TextFormatUpdateEvent": false, + "TextMetrics": false, + "TextTrack": false, + "TextTrackCue": false, + "TextTrackCueList": false, + "TextTrackList": false, + "TextUpdateEvent": false, + "TimeEvent": false, + "TimeRanges": false, + "ToggleEvent": false, + "toolbar": false, + "top": false, + "Touch": false, + "TouchEvent": false, + "TouchList": false, + "TrackEvent": false, + "TransformStream": false, + "TransformStreamDefaultController": false, + "TransitionEvent": false, + "Translator": false, + "TreeWalker": false, + "TrustedHTML": false, + "TrustedScript": false, + "TrustedScriptURL": false, + "TrustedTypePolicy": false, + "TrustedTypePolicyFactory": false, + "trustedTypes": false, + "UIEvent": false, + "URL": false, + "URLPattern": false, + "URLSearchParams": false, + "USB": false, + "USBAlternateInterface": false, + "USBConfiguration": false, + "USBConnectionEvent": false, + "USBDevice": false, + "USBEndpoint": false, + "USBInterface": false, + "USBInTransferResult": false, + "USBIsochronousInTransferPacket": false, + "USBIsochronousInTransferResult": false, + "USBIsochronousOutTransferPacket": false, + "USBIsochronousOutTransferResult": false, + "USBOutTransferResult": false, + "UserActivation": false, + "ValidityState": false, + "VideoColorSpace": false, + "VideoDecoder": false, + "VideoEncoder": false, + "VideoFrame": false, + "VideoPlaybackQuality": false, + "viewport": false, + "Viewport": false, + "ViewTimeline": false, + "ViewTransition": false, + "ViewTransitionTypeSet": false, + "VirtualKeyboard": false, + "VirtualKeyboardGeometryChangeEvent": false, + "VisibilityStateEntry": false, + "visualViewport": false, + "VisualViewport": false, + "VTTCue": false, + "VTTRegion": false, + "WakeLock": false, + "WakeLockSentinel": false, + "WaveShaperNode": false, + "WebAssembly": false, + "WebGL2RenderingContext": false, + "WebGLActiveInfo": false, + "WebGLBuffer": false, + "WebGLContextEvent": false, + "WebGLFramebuffer": false, + "WebGLObject": false, + "WebGLProgram": false, + "WebGLQuery": false, + "WebGLRenderbuffer": false, + "WebGLRenderingContext": false, + "WebGLSampler": false, + "WebGLShader": false, + "WebGLShaderPrecisionFormat": false, + "WebGLSync": false, + "WebGLTexture": false, + "WebGLTransformFeedback": false, + "WebGLUniformLocation": false, + "WebGLVertexArrayObject": false, + "WebSocket": false, + "WebSocketError": false, + "WebSocketStream": false, + "WebTransport": false, + "WebTransportBidirectionalStream": false, + "WebTransportDatagramDuplexStream": false, + "WebTransportError": false, + "WebTransportReceiveStream": false, + "WebTransportSendStream": false, + "WGSLLanguageFeatures": false, + "WheelEvent": false, + "when": false, + "window": false, + "Window": false, + "WindowControlsOverlay": false, + "WindowControlsOverlayGeometryChangeEvent": false, + "Worker": false, + "Worklet": false, + "WorkletGlobalScope": false, + "WritableStream": false, + "WritableStreamDefaultController": false, + "WritableStreamDefaultWriter": false, + "XMLDocument": false, + "XMLHttpRequest": false, + "XMLHttpRequestEventTarget": false, + "XMLHttpRequestUpload": false, + "XMLSerializer": false, + "XPathEvaluator": false, + "XPathExpression": false, + "XPathResult": false, + "XRAnchor": false, + "XRAnchorSet": false, + "XRBoundedReferenceSpace": false, + "XRCamera": false, + "XRCPUDepthInformation": false, + "XRDepthInformation": false, + "XRDOMOverlayState": false, + "XRFrame": false, + "XRHand": false, + "XRHitTestResult": false, + "XRHitTestSource": false, + "XRInputSource": false, + "XRInputSourceArray": false, + "XRInputSourceEvent": false, + "XRInputSourcesChangeEvent": false, + "XRJointPose": false, + "XRJointSpace": false, + "XRLayer": false, + "XRLightEstimate": false, + "XRLightProbe": false, + "XRPose": false, + "XRRay": false, + "XRReferenceSpace": false, + "XRReferenceSpaceEvent": false, + "XRRenderState": false, + "XRRigidTransform": false, + "XRSession": false, + "XRSessionEvent": false, + "XRSpace": false, + "XRSystem": false, + "XRTransientInputHitTestResult": false, + "XRTransientInputHitTestSource": false, + "XRView": false, + "XRViewerPose": false, + "XRViewport": false, + "XRWebGLBinding": false, + "XRWebGLDepthInformation": false, + "XRWebGLLayer": false, + "XSLTProcessor": false, + "myGlobal": "readonly" + } + }, + "errors": [ + { + "messageId": "defaultMessage", + "data": { + "name": "foo" + } + }, + { + "messageId": "defaultMessage", + "data": { + "name": "foo" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 2 errors but had 0: [] + +0 !== 2 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-restricted-globals > invalid + +```js +myGlobal.foo(); myOtherGlobal.bar() +``` + +```json +{ + "options": [ + { + "globals": [ + "foo", + "bar" + ], + "checkGlobalObject": true, + "globalObjects": [ + "myGlobal", + "myOtherGlobal" + ] + } + ], + "languageOptions": { + "globals": { + "myGlobal": "readonly", + "myOtherGlobal": "readonly" + } + }, + "errors": [ + { + "messageId": "defaultMessage", + "data": { + "name": "foo" + } + }, + { + "messageId": "defaultMessage", + "data": { + "name": "bar" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 2 errors but had 0: [] + +0 !== 2 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-restricted-globals > invalid + +```js +foo(); window.foo() +``` + +```json +{ + "options": [ + { + "globals": [ + "foo" + ], + "checkGlobalObject": true + } + ], + "languageOptions": { + "globals": { + "AbortController": false, + "AbortSignal": false, + "AbsoluteOrientationSensor": false, + "AbstractRange": false, + "Accelerometer": false, + "addEventListener": false, + "ai": false, + "AI": false, + "AICreateMonitor": false, + "AITextSession": false, + "alert": false, + "AnalyserNode": false, + "Animation": false, + "AnimationEffect": false, + "AnimationEvent": false, + "AnimationPlaybackEvent": false, + "AnimationTimeline": false, + "AsyncDisposableStack": false, + "atob": false, + "Attr": false, + "Audio": false, + "AudioBuffer": false, + "AudioBufferSourceNode": false, + "AudioContext": false, + "AudioData": false, + "AudioDecoder": false, + "AudioDestinationNode": false, + "AudioEncoder": false, + "AudioListener": false, + "AudioNode": false, + "AudioParam": false, + "AudioParamMap": false, + "AudioProcessingEvent": false, + "AudioScheduledSourceNode": false, + "AudioSinkInfo": false, + "AudioWorklet": false, + "AudioWorkletGlobalScope": false, + "AudioWorkletNode": false, + "AudioWorkletProcessor": false, + "AuthenticatorAssertionResponse": false, + "AuthenticatorAttestationResponse": false, + "AuthenticatorResponse": false, + "BackgroundFetchManager": false, + "BackgroundFetchRecord": false, + "BackgroundFetchRegistration": false, + "BarcodeDetector": false, + "BarProp": false, + "BaseAudioContext": false, + "BatteryManager": false, + "BeforeUnloadEvent": false, + "BiquadFilterNode": false, + "Blob": false, + "BlobEvent": false, + "Bluetooth": false, + "BluetoothCharacteristicProperties": false, + "BluetoothDevice": false, + "BluetoothRemoteGATTCharacteristic": false, + "BluetoothRemoteGATTDescriptor": false, + "BluetoothRemoteGATTServer": false, + "BluetoothRemoteGATTService": false, + "BluetoothUUID": false, + "blur": false, + "BroadcastChannel": false, + "BrowserCaptureMediaStreamTrack": false, + "btoa": false, + "ByteLengthQueuingStrategy": false, + "Cache": false, + "caches": false, + "CacheStorage": false, + "cancelAnimationFrame": false, + "cancelIdleCallback": false, + "CanvasCaptureMediaStream": false, + "CanvasCaptureMediaStreamTrack": false, + "CanvasGradient": false, + "CanvasPattern": false, + "CanvasRenderingContext2D": false, + "CaptureController": false, + "CaretPosition": false, + "CDATASection": false, + "ChannelMergerNode": false, + "ChannelSplitterNode": false, + "ChapterInformation": false, + "CharacterBoundsUpdateEvent": false, + "CharacterData": false, + "clearInterval": false, + "clearTimeout": false, + "clientInformation": false, + "Clipboard": false, + "ClipboardChangeEvent": false, + "ClipboardEvent": false, + "ClipboardItem": false, + "close": false, + "closed": false, + "CloseEvent": false, + "CloseWatcher": false, + "CommandEvent": false, + "Comment": false, + "CompositionEvent": false, + "CompressionStream": false, + "confirm": false, + "console": false, + "ConstantSourceNode": false, + "ContentVisibilityAutoStateChangeEvent": false, + "ConvolverNode": false, + "CookieChangeEvent": false, + "CookieDeprecationLabel": false, + "cookieStore": false, + "CookieStore": false, + "CookieStoreManager": false, + "CountQueuingStrategy": false, + "createImageBitmap": false, + "CreateMonitor": false, + "Credential": false, + "credentialless": false, + "CredentialsContainer": false, + "CropTarget": false, + "crossOriginIsolated": false, + "crypto": false, + "Crypto": false, + "CryptoKey": false, + "CSPViolationReportBody": false, + "CSS": false, + "CSSAnimation": false, + "CSSConditionRule": false, + "CSSContainerRule": false, + "CSSCounterStyleRule": false, + "CSSFontFaceRule": false, + "CSSFontFeatureValuesRule": false, + "CSSFontPaletteValuesRule": false, + "CSSFunctionDeclarations": false, + "CSSFunctionDescriptors": false, + "CSSFunctionRule": false, + "CSSGroupingRule": false, + "CSSImageValue": false, + "CSSImportRule": false, + "CSSKeyframeRule": false, + "CSSKeyframesRule": false, + "CSSKeywordValue": false, + "CSSLayerBlockRule": false, + "CSSLayerStatementRule": false, + "CSSMarginRule": false, + "CSSMathClamp": false, + "CSSMathInvert": false, + "CSSMathMax": false, + "CSSMathMin": false, + "CSSMathNegate": false, + "CSSMathProduct": false, + "CSSMathSum": false, + "CSSMathValue": false, + "CSSMatrixComponent": false, + "CSSMediaRule": false, + "CSSNamespaceRule": false, + "CSSNestedDeclarations": false, + "CSSNumericArray": false, + "CSSNumericValue": false, + "CSSPageDescriptors": false, + "CSSPageRule": false, + "CSSPerspective": false, + "CSSPositionTryDescriptors": false, + "CSSPositionTryRule": false, + "CSSPositionValue": false, + "CSSPropertyRule": false, + "CSSRotate": false, + "CSSRule": false, + "CSSRuleList": false, + "CSSScale": false, + "CSSScopeRule": false, + "CSSSkew": false, + "CSSSkewX": false, + "CSSSkewY": false, + "CSSStartingStyleRule": false, + "CSSStyleDeclaration": false, + "CSSStyleRule": false, + "CSSStyleSheet": false, + "CSSStyleValue": false, + "CSSSupportsRule": false, + "CSSTransformComponent": false, + "CSSTransformValue": false, + "CSSTransition": false, + "CSSTranslate": false, + "CSSUnitValue": false, + "CSSUnparsedValue": false, + "CSSVariableReferenceValue": false, + "CSSViewTransitionRule": false, + "currentFrame": false, + "currentTime": false, + "CustomElementRegistry": false, + "customElements": false, + "CustomEvent": false, + "CustomStateSet": false, + "DataTransfer": false, + "DataTransferItem": false, + "DataTransferItemList": false, + "DecompressionStream": false, + "DelayNode": false, + "DelegatedInkTrailPresenter": false, + "DeviceMotionEvent": false, + "DeviceMotionEventAcceleration": false, + "DeviceMotionEventRotationRate": false, + "DeviceOrientationEvent": false, + "devicePixelRatio": false, + "DevicePosture": false, + "DigitalCredential": false, + "dispatchEvent": false, + "DisposableStack": false, + "document": false, + "Document": false, + "DocumentFragment": false, + "documentPictureInPicture": false, + "DocumentPictureInPicture": false, + "DocumentPictureInPictureEvent": false, + "DocumentTimeline": false, + "DocumentType": false, + "DOMError": false, + "DOMException": false, + "DOMImplementation": false, + "DOMMatrix": false, + "DOMMatrixReadOnly": false, + "DOMParser": false, + "DOMPoint": false, + "DOMPointReadOnly": false, + "DOMQuad": false, + "DOMRect": false, + "DOMRectList": false, + "DOMRectReadOnly": false, + "DOMStringList": false, + "DOMStringMap": false, + "DOMTokenList": false, + "DragEvent": false, + "DynamicsCompressorNode": false, + "EditContext": false, + "Element": false, + "ElementInternals": false, + "EncodedAudioChunk": false, + "EncodedVideoChunk": false, + "ErrorEvent": false, + "event": false, + "Event": false, + "EventCounts": false, + "EventSource": false, + "EventTarget": false, + "external": false, + "External": false, + "EyeDropper": false, + "FeaturePolicy": false, + "FederatedCredential": false, + "fence": false, + "Fence": false, + "FencedFrameConfig": false, + "fetch": false, + "fetchLater": false, + "FetchLaterResult": false, + "File": false, + "FileList": false, + "FileReader": false, + "FileSystem": false, + "FileSystemDirectoryEntry": false, + "FileSystemDirectoryHandle": false, + "FileSystemDirectoryReader": false, + "FileSystemEntry": false, + "FileSystemFileEntry": false, + "FileSystemFileHandle": false, + "FileSystemHandle": false, + "FileSystemObserver": false, + "FileSystemWritableFileStream": false, + "find": false, + "focus": false, + "FocusEvent": false, + "FontData": false, + "FontFace": false, + "FontFaceSet": false, + "FontFaceSetLoadEvent": false, + "FormData": false, + "FormDataEvent": false, + "FragmentDirective": false, + "frameElement": false, + "frames": false, + "GainNode": false, + "Gamepad": false, + "GamepadAxisMoveEvent": false, + "GamepadButton": false, + "GamepadButtonEvent": false, + "GamepadEvent": false, + "GamepadHapticActuator": false, + "GamepadPose": false, + "Geolocation": false, + "GeolocationCoordinates": false, + "GeolocationPosition": false, + "GeolocationPositionError": false, + "getComputedStyle": false, + "getScreenDetails": false, + "getSelection": false, + "GPU": false, + "GPUAdapter": false, + "GPUAdapterInfo": false, + "GPUBindGroup": false, + "GPUBindGroupLayout": false, + "GPUBuffer": false, + "GPUBufferUsage": false, + "GPUCanvasContext": false, + "GPUColorWrite": false, + "GPUCommandBuffer": false, + "GPUCommandEncoder": false, + "GPUCompilationInfo": false, + "GPUCompilationMessage": false, + "GPUComputePassEncoder": false, + "GPUComputePipeline": false, + "GPUDevice": false, + "GPUDeviceLostInfo": false, + "GPUError": false, + "GPUExternalTexture": false, + "GPUInternalError": false, + "GPUMapMode": false, + "GPUOutOfMemoryError": false, + "GPUPipelineError": false, + "GPUPipelineLayout": false, + "GPUQuerySet": false, + "GPUQueue": false, + "GPURenderBundle": false, + "GPURenderBundleEncoder": false, + "GPURenderPassEncoder": false, + "GPURenderPipeline": false, + "GPUSampler": false, + "GPUShaderModule": false, + "GPUShaderStage": false, + "GPUSupportedFeatures": false, + "GPUSupportedLimits": false, + "GPUTexture": false, + "GPUTextureUsage": false, + "GPUTextureView": false, + "GPUUncapturedErrorEvent": false, + "GPUValidationError": false, + "GravitySensor": false, + "Gyroscope": false, + "HashChangeEvent": false, + "Headers": false, + "HID": false, + "HIDConnectionEvent": false, + "HIDDevice": false, + "HIDInputReportEvent": false, + "Highlight": false, + "HighlightRegistry": false, + "history": false, + "History": false, + "HTMLAllCollection": false, + "HTMLAnchorElement": false, + "HTMLAreaElement": false, + "HTMLAudioElement": false, + "HTMLBaseElement": false, + "HTMLBodyElement": false, + "HTMLBRElement": false, + "HTMLButtonElement": false, + "HTMLCanvasElement": false, + "HTMLCollection": false, + "HTMLDataElement": false, + "HTMLDataListElement": false, + "HTMLDetailsElement": false, + "HTMLDialogElement": false, + "HTMLDirectoryElement": false, + "HTMLDivElement": false, + "HTMLDListElement": false, + "HTMLDocument": false, + "HTMLElement": false, + "HTMLEmbedElement": false, + "HTMLFencedFrameElement": false, + "HTMLFieldSetElement": false, + "HTMLFontElement": false, + "HTMLFormControlsCollection": false, + "HTMLFormElement": false, + "HTMLFrameElement": false, + "HTMLFrameSetElement": false, + "HTMLHeadElement": false, + "HTMLHeadingElement": false, + "HTMLHRElement": false, + "HTMLHtmlElement": false, + "HTMLIFrameElement": false, + "HTMLImageElement": false, + "HTMLInputElement": false, + "HTMLLabelElement": false, + "HTMLLegendElement": false, + "HTMLLIElement": false, + "HTMLLinkElement": false, + "HTMLMapElement": false, + "HTMLMarqueeElement": false, + "HTMLMediaElement": false, + "HTMLMenuElement": false, + "HTMLMetaElement": false, + "HTMLMeterElement": false, + "HTMLModElement": false, + "HTMLObjectElement": false, + "HTMLOListElement": false, + "HTMLOptGroupElement": false, + "HTMLOptionElement": false, + "HTMLOptionsCollection": false, + "HTMLOutputElement": false, + "HTMLParagraphElement": false, + "HTMLParamElement": false, + "HTMLPictureElement": false, + "HTMLPreElement": false, + "HTMLProgressElement": false, + "HTMLQuoteElement": false, + "HTMLScriptElement": false, + "HTMLSelectedContentElement": false, + "HTMLSelectElement": false, + "HTMLSlotElement": false, + "HTMLSourceElement": false, + "HTMLSpanElement": false, + "HTMLStyleElement": false, + "HTMLTableCaptionElement": false, + "HTMLTableCellElement": false, + "HTMLTableColElement": false, + "HTMLTableElement": false, + "HTMLTableRowElement": false, + "HTMLTableSectionElement": false, + "HTMLTemplateElement": false, + "HTMLTextAreaElement": false, + "HTMLTimeElement": false, + "HTMLTitleElement": false, + "HTMLTrackElement": false, + "HTMLUListElement": false, + "HTMLUnknownElement": false, + "HTMLVideoElement": false, + "IDBCursor": false, + "IDBCursorWithValue": false, + "IDBDatabase": false, + "IDBFactory": false, + "IDBIndex": false, + "IDBKeyRange": false, + "IDBObjectStore": false, + "IDBOpenDBRequest": false, + "IDBRecord": false, + "IDBRequest": false, + "IDBTransaction": false, + "IDBVersionChangeEvent": false, + "IdentityCredential": false, + "IdentityCredentialError": false, + "IdentityProvider": false, + "IdleDeadline": false, + "IdleDetector": false, + "IIRFilterNode": false, + "Image": false, + "ImageBitmap": false, + "ImageBitmapRenderingContext": false, + "ImageCapture": false, + "ImageData": false, + "ImageDecoder": false, + "ImageTrack": false, + "ImageTrackList": false, + "indexedDB": false, + "Ink": false, + "innerHeight": false, + "innerWidth": false, + "InputDeviceCapabilities": false, + "InputDeviceInfo": false, + "InputEvent": false, + "IntegrityViolationReportBody": false, + "InterestEvent": false, + "IntersectionObserver": false, + "IntersectionObserverEntry": false, + "isSecureContext": false, + "Keyboard": false, + "KeyboardEvent": false, + "KeyboardLayoutMap": false, + "KeyframeEffect": false, + "LanguageDetector": false, + "LargestContentfulPaint": false, + "LaunchParams": false, + "launchQueue": false, + "LaunchQueue": false, + "LayoutShift": false, + "LayoutShiftAttribution": false, + "length": false, + "LinearAccelerationSensor": false, + "localStorage": false, + "location": true, + "Location": false, + "locationbar": false, + "Lock": false, + "LockManager": false, + "matchMedia": false, + "MathMLElement": false, + "MediaCapabilities": false, + "MediaCapabilitiesInfo": false, + "MediaDeviceInfo": false, + "MediaDevices": false, + "MediaElementAudioSourceNode": false, + "MediaEncryptedEvent": false, + "MediaError": false, + "MediaKeyError": false, + "MediaKeyMessageEvent": false, + "MediaKeys": false, + "MediaKeySession": false, + "MediaKeyStatusMap": false, + "MediaKeySystemAccess": false, + "MediaList": false, + "MediaMetadata": false, + "MediaQueryList": false, + "MediaQueryListEvent": false, + "MediaRecorder": false, + "MediaRecorderErrorEvent": false, + "MediaSession": false, + "MediaSource": false, + "MediaSourceHandle": false, + "MediaStream": false, + "MediaStreamAudioDestinationNode": false, + "MediaStreamAudioSourceNode": false, + "MediaStreamEvent": false, + "MediaStreamTrack": false, + "MediaStreamTrackAudioSourceNode": false, + "MediaStreamTrackAudioStats": false, + "MediaStreamTrackEvent": false, + "MediaStreamTrackGenerator": false, + "MediaStreamTrackProcessor": false, + "MediaStreamTrackVideoStats": false, + "menubar": false, + "MessageChannel": false, + "MessageEvent": false, + "MessagePort": false, + "MIDIAccess": false, + "MIDIConnectionEvent": false, + "MIDIInput": false, + "MIDIInputMap": false, + "MIDIMessageEvent": false, + "MIDIOutput": false, + "MIDIOutputMap": false, + "MIDIPort": false, + "MimeType": false, + "MimeTypeArray": false, + "model": false, + "ModelGenericSession": false, + "ModelManager": false, + "MouseEvent": false, + "moveBy": false, + "moveTo": false, + "MutationEvent": false, + "MutationObserver": false, + "MutationRecord": false, + "name": false, + "NamedNodeMap": false, + "NavigateEvent": false, + "navigation": false, + "Navigation": false, + "NavigationActivation": false, + "NavigationCurrentEntryChangeEvent": false, + "NavigationDestination": false, + "NavigationHistoryEntry": false, + "NavigationPrecommitController": false, + "NavigationPreloadManager": false, + "NavigationTransition": false, + "navigator": false, + "Navigator": false, + "NavigatorLogin": false, + "NavigatorManagedData": false, + "NavigatorUAData": false, + "NetworkInformation": false, + "Node": false, + "NodeFilter": false, + "NodeIterator": false, + "NodeList": false, + "Notification": false, + "NotifyPaintEvent": false, + "NotRestoredReasonDetails": false, + "NotRestoredReasons": false, + "Observable": false, + "OfflineAudioCompletionEvent": false, + "OfflineAudioContext": false, + "offscreenBuffering": false, + "OffscreenCanvas": false, + "OffscreenCanvasRenderingContext2D": false, + "onabort": true, + "onafterprint": true, + "onanimationcancel": true, + "onanimationend": true, + "onanimationiteration": true, + "onanimationstart": true, + "onappinstalled": true, + "onauxclick": true, + "onbeforeinput": true, + "onbeforeinstallprompt": true, + "onbeforematch": true, + "onbeforeprint": true, + "onbeforetoggle": true, + "onbeforeunload": true, + "onbeforexrselect": true, + "onblur": true, + "oncancel": true, + "oncanplay": true, + "oncanplaythrough": true, + "onchange": true, + "onclick": true, + "onclose": true, + "oncommand": true, + "oncontentvisibilityautostatechange": true, + "oncontextlost": true, + "oncontextmenu": true, + "oncontextrestored": true, + "oncopy": true, + "oncuechange": true, + "oncut": true, + "ondblclick": true, + "ondevicemotion": true, + "ondeviceorientation": true, + "ondeviceorientationabsolute": true, + "ondrag": true, + "ondragend": true, + "ondragenter": true, + "ondragleave": true, + "ondragover": true, + "ondragstart": true, + "ondrop": true, + "ondurationchange": true, + "onemptied": true, + "onended": true, + "onerror": true, + "onfocus": true, + "onformdata": true, + "ongamepadconnected": true, + "ongamepaddisconnected": true, + "ongotpointercapture": true, + "onhashchange": true, + "oninput": true, + "oninvalid": true, + "onkeydown": true, + "onkeypress": true, + "onkeyup": true, + "onlanguagechange": true, + "onload": true, + "onloadeddata": true, + "onloadedmetadata": true, + "onloadstart": true, + "onlostpointercapture": true, + "onmessage": true, + "onmessageerror": true, + "onmousedown": true, + "onmouseenter": true, + "onmouseleave": true, + "onmousemove": true, + "onmouseout": true, + "onmouseover": true, + "onmouseup": true, + "onmousewheel": true, + "onoffline": true, + "ononline": true, + "onpagehide": true, + "onpagereveal": true, + "onpageshow": true, + "onpageswap": true, + "onpaste": true, + "onpause": true, + "onplay": true, + "onplaying": true, + "onpointercancel": true, + "onpointerdown": true, + "onpointerenter": true, + "onpointerleave": true, + "onpointermove": true, + "onpointerout": true, + "onpointerover": true, + "onpointerrawupdate": true, + "onpointerup": true, + "onpopstate": true, + "onprogress": true, + "onratechange": true, + "onrejectionhandled": true, + "onreset": true, + "onresize": true, + "onscroll": true, + "onscrollend": true, + "onscrollsnapchange": true, + "onscrollsnapchanging": true, + "onsearch": true, + "onsecuritypolicyviolation": true, + "onseeked": true, + "onseeking": true, + "onselect": true, + "onselectionchange": true, + "onselectstart": true, + "onslotchange": true, + "onstalled": true, + "onstorage": true, + "onsubmit": true, + "onsuspend": true, + "ontimeupdate": true, + "ontoggle": true, + "ontransitioncancel": true, + "ontransitionend": true, + "ontransitionrun": true, + "ontransitionstart": true, + "onunhandledrejection": true, + "onunload": true, + "onvolumechange": true, + "onwaiting": true, + "onwheel": true, + "open": false, + "opener": false, + "Option": false, + "OrientationSensor": false, + "origin": false, + "originAgentCluster": false, + "OscillatorNode": false, + "OTPCredential": false, + "outerHeight": false, + "outerWidth": false, + "OverconstrainedError": false, + "PageRevealEvent": false, + "PageSwapEvent": false, + "PageTransitionEvent": false, + "pageXOffset": false, + "pageYOffset": false, + "PannerNode": false, + "parent": false, + "PasswordCredential": false, + "Path2D": false, + "PaymentAddress": false, + "PaymentManager": false, + "PaymentMethodChangeEvent": false, + "PaymentRequest": false, + "PaymentRequestUpdateEvent": false, + "PaymentResponse": false, + "performance": false, + "Performance": false, + "PerformanceElementTiming": false, + "PerformanceEntry": false, + "PerformanceEventTiming": false, + "PerformanceLongAnimationFrameTiming": false, + "PerformanceLongTaskTiming": false, + "PerformanceMark": false, + "PerformanceMeasure": false, + "PerformanceNavigation": false, + "PerformanceNavigationTiming": false, + "PerformanceObserver": false, + "PerformanceObserverEntryList": false, + "PerformancePaintTiming": false, + "PerformanceResourceTiming": false, + "PerformanceScriptTiming": false, + "PerformanceServerTiming": false, + "PerformanceTiming": false, + "PeriodicSyncManager": false, + "PeriodicWave": false, + "Permissions": false, + "PermissionStatus": false, + "PERSISTENT": false, + "personalbar": false, + "PictureInPictureEvent": false, + "PictureInPictureWindow": false, + "Plugin": false, + "PluginArray": false, + "PointerEvent": false, + "PopStateEvent": false, + "postMessage": false, + "Presentation": false, + "PresentationAvailability": false, + "PresentationConnection": false, + "PresentationConnectionAvailableEvent": false, + "PresentationConnectionCloseEvent": false, + "PresentationConnectionList": false, + "PresentationReceiver": false, + "PresentationRequest": false, + "PressureObserver": false, + "PressureRecord": false, + "print": false, + "ProcessingInstruction": false, + "Profiler": false, + "ProgressEvent": false, + "PromiseRejectionEvent": false, + "prompt": false, + "ProtectedAudience": false, + "PublicKeyCredential": false, + "PushManager": false, + "PushSubscription": false, + "PushSubscriptionOptions": false, + "queryLocalFonts": false, + "queueMicrotask": false, + "QuotaExceededError": false, + "RadioNodeList": false, + "Range": false, + "ReadableByteStreamController": false, + "ReadableStream": false, + "ReadableStreamBYOBReader": false, + "ReadableStreamBYOBRequest": false, + "ReadableStreamDefaultController": false, + "ReadableStreamDefaultReader": false, + "registerProcessor": false, + "RelativeOrientationSensor": false, + "RemotePlayback": false, + "removeEventListener": false, + "ReportBody": false, + "reportError": false, + "ReportingObserver": false, + "Request": false, + "requestAnimationFrame": false, + "requestIdleCallback": false, + "resizeBy": false, + "ResizeObserver": false, + "ResizeObserverEntry": false, + "ResizeObserverSize": false, + "resizeTo": false, + "Response": false, + "RestrictionTarget": false, + "RTCCertificate": false, + "RTCDataChannel": false, + "RTCDataChannelEvent": false, + "RTCDtlsTransport": false, + "RTCDTMFSender": false, + "RTCDTMFToneChangeEvent": false, + "RTCEncodedAudioFrame": false, + "RTCEncodedVideoFrame": false, + "RTCError": false, + "RTCErrorEvent": false, + "RTCIceCandidate": false, + "RTCIceTransport": false, + "RTCPeerConnection": false, + "RTCPeerConnectionIceErrorEvent": false, + "RTCPeerConnectionIceEvent": false, + "RTCRtpReceiver": false, + "RTCRtpScriptTransform": false, + "RTCRtpSender": false, + "RTCRtpTransceiver": false, + "RTCSctpTransport": false, + "RTCSessionDescription": false, + "RTCStatsReport": false, + "RTCTrackEvent": false, + "sampleRate": false, + "scheduler": false, + "Scheduler": false, + "Scheduling": false, + "screen": false, + "Screen": false, + "ScreenDetailed": false, + "ScreenDetails": false, + "screenLeft": false, + "ScreenOrientation": false, + "screenTop": false, + "screenX": false, + "screenY": false, + "ScriptProcessorNode": false, + "scroll": false, + "scrollbars": false, + "scrollBy": false, + "ScrollTimeline": false, + "scrollTo": false, + "scrollX": false, + "scrollY": false, + "SecurityPolicyViolationEvent": false, + "Selection": false, + "self": false, + "Sensor": false, + "SensorErrorEvent": false, + "Serial": false, + "SerialPort": false, + "ServiceWorker": false, + "ServiceWorkerContainer": false, + "ServiceWorkerRegistration": false, + "sessionStorage": false, + "setInterval": false, + "setTimeout": false, + "ShadowRoot": false, + "sharedStorage": false, + "SharedStorage": false, + "SharedStorageAppendMethod": false, + "SharedStorageClearMethod": false, + "SharedStorageDeleteMethod": false, + "SharedStorageModifierMethod": false, + "SharedStorageSetMethod": false, + "SharedStorageWorklet": false, + "SharedWorker": false, + "showDirectoryPicker": false, + "showOpenFilePicker": false, + "showSaveFilePicker": false, + "SnapEvent": false, + "SourceBuffer": false, + "SourceBufferList": false, + "SpeechGrammar": false, + "SpeechGrammarList": false, + "SpeechRecognition": false, + "SpeechRecognitionErrorEvent": false, + "SpeechRecognitionEvent": false, + "SpeechRecognitionPhrase": false, + "speechSynthesis": false, + "SpeechSynthesis": false, + "SpeechSynthesisErrorEvent": false, + "SpeechSynthesisEvent": false, + "SpeechSynthesisUtterance": false, + "SpeechSynthesisVoice": false, + "StaticRange": false, + "status": false, + "statusbar": false, + "StereoPannerNode": false, + "stop": false, + "Storage": false, + "StorageBucket": false, + "StorageBucketManager": false, + "StorageEvent": false, + "StorageManager": false, + "structuredClone": false, + "styleMedia": false, + "StylePropertyMap": false, + "StylePropertyMapReadOnly": false, + "StyleSheet": false, + "StyleSheetList": false, + "SubmitEvent": false, + "Subscriber": false, + "SubtleCrypto": false, + "Summarizer": false, + "SuppressedError": false, + "SVGAElement": false, + "SVGAngle": false, + "SVGAnimatedAngle": false, + "SVGAnimatedBoolean": false, + "SVGAnimatedEnumeration": false, + "SVGAnimatedInteger": false, + "SVGAnimatedLength": false, + "SVGAnimatedLengthList": false, + "SVGAnimatedNumber": false, + "SVGAnimatedNumberList": false, + "SVGAnimatedPreserveAspectRatio": false, + "SVGAnimatedRect": false, + "SVGAnimatedString": false, + "SVGAnimatedTransformList": false, + "SVGAnimateElement": false, + "SVGAnimateMotionElement": false, + "SVGAnimateTransformElement": false, + "SVGAnimationElement": false, + "SVGCircleElement": false, + "SVGClipPathElement": false, + "SVGComponentTransferFunctionElement": false, + "SVGDefsElement": false, + "SVGDescElement": false, + "SVGElement": false, + "SVGEllipseElement": false, + "SVGFEBlendElement": false, + "SVGFEColorMatrixElement": false, + "SVGFEComponentTransferElement": false, + "SVGFECompositeElement": false, + "SVGFEConvolveMatrixElement": false, + "SVGFEDiffuseLightingElement": false, + "SVGFEDisplacementMapElement": false, + "SVGFEDistantLightElement": false, + "SVGFEDropShadowElement": false, + "SVGFEFloodElement": false, + "SVGFEFuncAElement": false, + "SVGFEFuncBElement": false, + "SVGFEFuncGElement": false, + "SVGFEFuncRElement": false, + "SVGFEGaussianBlurElement": false, + "SVGFEImageElement": false, + "SVGFEMergeElement": false, + "SVGFEMergeNodeElement": false, + "SVGFEMorphologyElement": false, + "SVGFEOffsetElement": false, + "SVGFEPointLightElement": false, + "SVGFESpecularLightingElement": false, + "SVGFESpotLightElement": false, + "SVGFETileElement": false, + "SVGFETurbulenceElement": false, + "SVGFilterElement": false, + "SVGForeignObjectElement": false, + "SVGGElement": false, + "SVGGeometryElement": false, + "SVGGradientElement": false, + "SVGGraphicsElement": false, + "SVGImageElement": false, + "SVGLength": false, + "SVGLengthList": false, + "SVGLinearGradientElement": false, + "SVGLineElement": false, + "SVGMarkerElement": false, + "SVGMaskElement": false, + "SVGMatrix": false, + "SVGMetadataElement": false, + "SVGMPathElement": false, + "SVGNumber": false, + "SVGNumberList": false, + "SVGPathElement": false, + "SVGPatternElement": false, + "SVGPoint": false, + "SVGPointList": false, + "SVGPolygonElement": false, + "SVGPolylineElement": false, + "SVGPreserveAspectRatio": false, + "SVGRadialGradientElement": false, + "SVGRect": false, + "SVGRectElement": false, + "SVGScriptElement": false, + "SVGSetElement": false, + "SVGStopElement": false, + "SVGStringList": false, + "SVGStyleElement": false, + "SVGSVGElement": false, + "SVGSwitchElement": false, + "SVGSymbolElement": false, + "SVGTextContentElement": false, + "SVGTextElement": false, + "SVGTextPathElement": false, + "SVGTextPositioningElement": false, + "SVGTitleElement": false, + "SVGTransform": false, + "SVGTransformList": false, + "SVGTSpanElement": false, + "SVGUnitTypes": false, + "SVGUseElement": false, + "SVGViewElement": false, + "SyncManager": false, + "TaskAttributionTiming": false, + "TaskController": false, + "TaskPriorityChangeEvent": false, + "TaskSignal": false, + "TEMPORARY": false, + "Text": false, + "TextDecoder": false, + "TextDecoderStream": false, + "TextEncoder": false, + "TextEncoderStream": false, + "TextEvent": false, + "TextFormat": false, + "TextFormatUpdateEvent": false, + "TextMetrics": false, + "TextTrack": false, + "TextTrackCue": false, + "TextTrackCueList": false, + "TextTrackList": false, + "TextUpdateEvent": false, + "TimeEvent": false, + "TimeRanges": false, + "ToggleEvent": false, + "toolbar": false, + "top": false, + "Touch": false, + "TouchEvent": false, + "TouchList": false, + "TrackEvent": false, + "TransformStream": false, + "TransformStreamDefaultController": false, + "TransitionEvent": false, + "Translator": false, + "TreeWalker": false, + "TrustedHTML": false, + "TrustedScript": false, + "TrustedScriptURL": false, + "TrustedTypePolicy": false, + "TrustedTypePolicyFactory": false, + "trustedTypes": false, + "UIEvent": false, + "URL": false, + "URLPattern": false, + "URLSearchParams": false, + "USB": false, + "USBAlternateInterface": false, + "USBConfiguration": false, + "USBConnectionEvent": false, + "USBDevice": false, + "USBEndpoint": false, + "USBInterface": false, + "USBInTransferResult": false, + "USBIsochronousInTransferPacket": false, + "USBIsochronousInTransferResult": false, + "USBIsochronousOutTransferPacket": false, + "USBIsochronousOutTransferResult": false, + "USBOutTransferResult": false, + "UserActivation": false, + "ValidityState": false, + "VideoColorSpace": false, + "VideoDecoder": false, + "VideoEncoder": false, + "VideoFrame": false, + "VideoPlaybackQuality": false, + "viewport": false, + "Viewport": false, + "ViewTimeline": false, + "ViewTransition": false, + "ViewTransitionTypeSet": false, + "VirtualKeyboard": false, + "VirtualKeyboardGeometryChangeEvent": false, + "VisibilityStateEntry": false, + "visualViewport": false, + "VisualViewport": false, + "VTTCue": false, + "VTTRegion": false, + "WakeLock": false, + "WakeLockSentinel": false, + "WaveShaperNode": false, + "WebAssembly": false, + "WebGL2RenderingContext": false, + "WebGLActiveInfo": false, + "WebGLBuffer": false, + "WebGLContextEvent": false, + "WebGLFramebuffer": false, + "WebGLObject": false, + "WebGLProgram": false, + "WebGLQuery": false, + "WebGLRenderbuffer": false, + "WebGLRenderingContext": false, + "WebGLSampler": false, + "WebGLShader": false, + "WebGLShaderPrecisionFormat": false, + "WebGLSync": false, + "WebGLTexture": false, + "WebGLTransformFeedback": false, + "WebGLUniformLocation": false, + "WebGLVertexArrayObject": false, + "WebSocket": false, + "WebSocketError": false, + "WebSocketStream": false, + "WebTransport": false, + "WebTransportBidirectionalStream": false, + "WebTransportDatagramDuplexStream": false, + "WebTransportError": false, + "WebTransportReceiveStream": false, + "WebTransportSendStream": false, + "WGSLLanguageFeatures": false, + "WheelEvent": false, + "when": false, + "window": false, + "Window": false, + "WindowControlsOverlay": false, + "WindowControlsOverlayGeometryChangeEvent": false, + "Worker": false, + "Worklet": false, + "WorkletGlobalScope": false, + "WritableStream": false, + "WritableStreamDefaultController": false, + "WritableStreamDefaultWriter": false, + "XMLDocument": false, + "XMLHttpRequest": false, + "XMLHttpRequestEventTarget": false, + "XMLHttpRequestUpload": false, + "XMLSerializer": false, + "XPathEvaluator": false, + "XPathExpression": false, + "XPathResult": false, + "XRAnchor": false, + "XRAnchorSet": false, + "XRBoundedReferenceSpace": false, + "XRCamera": false, + "XRCPUDepthInformation": false, + "XRDepthInformation": false, + "XRDOMOverlayState": false, + "XRFrame": false, + "XRHand": false, + "XRHitTestResult": false, + "XRHitTestSource": false, + "XRInputSource": false, + "XRInputSourceArray": false, + "XRInputSourceEvent": false, + "XRInputSourcesChangeEvent": false, + "XRJointPose": false, + "XRJointSpace": false, + "XRLayer": false, + "XRLightEstimate": false, + "XRLightProbe": false, + "XRPose": false, + "XRRay": false, + "XRReferenceSpace": false, + "XRReferenceSpaceEvent": false, + "XRRenderState": false, + "XRRigidTransform": false, + "XRSession": false, + "XRSessionEvent": false, + "XRSpace": false, + "XRSystem": false, + "XRTransientInputHitTestResult": false, + "XRTransientInputHitTestSource": false, + "XRView": false, + "XRViewerPose": false, + "XRViewport": false, + "XRWebGLBinding": false, + "XRWebGLDepthInformation": false, + "XRWebGLLayer": false, + "XSLTProcessor": false + } + }, + "errors": [ + { + "messageId": "defaultMessage", + "data": { + "name": "foo" + } + }, + { + "messageId": "defaultMessage", + "data": { + "name": "foo" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 2 errors but had 1: [ + { + ruleId: 'rule-to-test/no-restricted-globals', + message: "Unexpected use of 'foo'.", + messageId: 'defaultMessage', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 0, + endLine: 1, + endColumn: 3, + suggestions: null + } +] + +1 !== 2 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-restricted-globals > invalid + +```js +foo(); self.foo() +``` + +```json +{ + "options": [ + { + "globals": [ + "foo" + ], + "checkGlobalObject": true + } + ], + "languageOptions": { + "globals": { + "AbortController": false, + "AbortSignal": false, + "AbsoluteOrientationSensor": false, + "AbstractRange": false, + "Accelerometer": false, + "addEventListener": false, + "ai": false, + "AI": false, + "AICreateMonitor": false, + "AITextSession": false, + "alert": false, + "AnalyserNode": false, + "Animation": false, + "AnimationEffect": false, + "AnimationEvent": false, + "AnimationPlaybackEvent": false, + "AnimationTimeline": false, + "AsyncDisposableStack": false, + "atob": false, + "Attr": false, + "Audio": false, + "AudioBuffer": false, + "AudioBufferSourceNode": false, + "AudioContext": false, + "AudioData": false, + "AudioDecoder": false, + "AudioDestinationNode": false, + "AudioEncoder": false, + "AudioListener": false, + "AudioNode": false, + "AudioParam": false, + "AudioParamMap": false, + "AudioProcessingEvent": false, + "AudioScheduledSourceNode": false, + "AudioSinkInfo": false, + "AudioWorklet": false, + "AudioWorkletGlobalScope": false, + "AudioWorkletNode": false, + "AudioWorkletProcessor": false, + "AuthenticatorAssertionResponse": false, + "AuthenticatorAttestationResponse": false, + "AuthenticatorResponse": false, + "BackgroundFetchManager": false, + "BackgroundFetchRecord": false, + "BackgroundFetchRegistration": false, + "BarcodeDetector": false, + "BarProp": false, + "BaseAudioContext": false, + "BatteryManager": false, + "BeforeUnloadEvent": false, + "BiquadFilterNode": false, + "Blob": false, + "BlobEvent": false, + "Bluetooth": false, + "BluetoothCharacteristicProperties": false, + "BluetoothDevice": false, + "BluetoothRemoteGATTCharacteristic": false, + "BluetoothRemoteGATTDescriptor": false, + "BluetoothRemoteGATTServer": false, + "BluetoothRemoteGATTService": false, + "BluetoothUUID": false, + "blur": false, + "BroadcastChannel": false, + "BrowserCaptureMediaStreamTrack": false, + "btoa": false, + "ByteLengthQueuingStrategy": false, + "Cache": false, + "caches": false, + "CacheStorage": false, + "cancelAnimationFrame": false, + "cancelIdleCallback": false, + "CanvasCaptureMediaStream": false, + "CanvasCaptureMediaStreamTrack": false, + "CanvasGradient": false, + "CanvasPattern": false, + "CanvasRenderingContext2D": false, + "CaptureController": false, + "CaretPosition": false, + "CDATASection": false, + "ChannelMergerNode": false, + "ChannelSplitterNode": false, + "ChapterInformation": false, + "CharacterBoundsUpdateEvent": false, + "CharacterData": false, + "clearInterval": false, + "clearTimeout": false, + "clientInformation": false, + "Clipboard": false, + "ClipboardChangeEvent": false, + "ClipboardEvent": false, + "ClipboardItem": false, + "close": false, + "closed": false, + "CloseEvent": false, + "CloseWatcher": false, + "CommandEvent": false, + "Comment": false, + "CompositionEvent": false, + "CompressionStream": false, + "confirm": false, + "console": false, + "ConstantSourceNode": false, + "ContentVisibilityAutoStateChangeEvent": false, + "ConvolverNode": false, + "CookieChangeEvent": false, + "CookieDeprecationLabel": false, + "cookieStore": false, + "CookieStore": false, + "CookieStoreManager": false, + "CountQueuingStrategy": false, + "createImageBitmap": false, + "CreateMonitor": false, + "Credential": false, + "credentialless": false, + "CredentialsContainer": false, + "CropTarget": false, + "crossOriginIsolated": false, + "crypto": false, + "Crypto": false, + "CryptoKey": false, + "CSPViolationReportBody": false, + "CSS": false, + "CSSAnimation": false, + "CSSConditionRule": false, + "CSSContainerRule": false, + "CSSCounterStyleRule": false, + "CSSFontFaceRule": false, + "CSSFontFeatureValuesRule": false, + "CSSFontPaletteValuesRule": false, + "CSSFunctionDeclarations": false, + "CSSFunctionDescriptors": false, + "CSSFunctionRule": false, + "CSSGroupingRule": false, + "CSSImageValue": false, + "CSSImportRule": false, + "CSSKeyframeRule": false, + "CSSKeyframesRule": false, + "CSSKeywordValue": false, + "CSSLayerBlockRule": false, + "CSSLayerStatementRule": false, + "CSSMarginRule": false, + "CSSMathClamp": false, + "CSSMathInvert": false, + "CSSMathMax": false, + "CSSMathMin": false, + "CSSMathNegate": false, + "CSSMathProduct": false, + "CSSMathSum": false, + "CSSMathValue": false, + "CSSMatrixComponent": false, + "CSSMediaRule": false, + "CSSNamespaceRule": false, + "CSSNestedDeclarations": false, + "CSSNumericArray": false, + "CSSNumericValue": false, + "CSSPageDescriptors": false, + "CSSPageRule": false, + "CSSPerspective": false, + "CSSPositionTryDescriptors": false, + "CSSPositionTryRule": false, + "CSSPositionValue": false, + "CSSPropertyRule": false, + "CSSRotate": false, + "CSSRule": false, + "CSSRuleList": false, + "CSSScale": false, + "CSSScopeRule": false, + "CSSSkew": false, + "CSSSkewX": false, + "CSSSkewY": false, + "CSSStartingStyleRule": false, + "CSSStyleDeclaration": false, + "CSSStyleRule": false, + "CSSStyleSheet": false, + "CSSStyleValue": false, + "CSSSupportsRule": false, + "CSSTransformComponent": false, + "CSSTransformValue": false, + "CSSTransition": false, + "CSSTranslate": false, + "CSSUnitValue": false, + "CSSUnparsedValue": false, + "CSSVariableReferenceValue": false, + "CSSViewTransitionRule": false, + "currentFrame": false, + "currentTime": false, + "CustomElementRegistry": false, + "customElements": false, + "CustomEvent": false, + "CustomStateSet": false, + "DataTransfer": false, + "DataTransferItem": false, + "DataTransferItemList": false, + "DecompressionStream": false, + "DelayNode": false, + "DelegatedInkTrailPresenter": false, + "DeviceMotionEvent": false, + "DeviceMotionEventAcceleration": false, + "DeviceMotionEventRotationRate": false, + "DeviceOrientationEvent": false, + "devicePixelRatio": false, + "DevicePosture": false, + "DigitalCredential": false, + "dispatchEvent": false, + "DisposableStack": false, + "document": false, + "Document": false, + "DocumentFragment": false, + "documentPictureInPicture": false, + "DocumentPictureInPicture": false, + "DocumentPictureInPictureEvent": false, + "DocumentTimeline": false, + "DocumentType": false, + "DOMError": false, + "DOMException": false, + "DOMImplementation": false, + "DOMMatrix": false, + "DOMMatrixReadOnly": false, + "DOMParser": false, + "DOMPoint": false, + "DOMPointReadOnly": false, + "DOMQuad": false, + "DOMRect": false, + "DOMRectList": false, + "DOMRectReadOnly": false, + "DOMStringList": false, + "DOMStringMap": false, + "DOMTokenList": false, + "DragEvent": false, + "DynamicsCompressorNode": false, + "EditContext": false, + "Element": false, + "ElementInternals": false, + "EncodedAudioChunk": false, + "EncodedVideoChunk": false, + "ErrorEvent": false, + "event": false, + "Event": false, + "EventCounts": false, + "EventSource": false, + "EventTarget": false, + "external": false, + "External": false, + "EyeDropper": false, + "FeaturePolicy": false, + "FederatedCredential": false, + "fence": false, + "Fence": false, + "FencedFrameConfig": false, + "fetch": false, + "fetchLater": false, + "FetchLaterResult": false, + "File": false, + "FileList": false, + "FileReader": false, + "FileSystem": false, + "FileSystemDirectoryEntry": false, + "FileSystemDirectoryHandle": false, + "FileSystemDirectoryReader": false, + "FileSystemEntry": false, + "FileSystemFileEntry": false, + "FileSystemFileHandle": false, + "FileSystemHandle": false, + "FileSystemObserver": false, + "FileSystemWritableFileStream": false, + "find": false, + "focus": false, + "FocusEvent": false, + "FontData": false, + "FontFace": false, + "FontFaceSet": false, + "FontFaceSetLoadEvent": false, + "FormData": false, + "FormDataEvent": false, + "FragmentDirective": false, + "frameElement": false, + "frames": false, + "GainNode": false, + "Gamepad": false, + "GamepadAxisMoveEvent": false, + "GamepadButton": false, + "GamepadButtonEvent": false, + "GamepadEvent": false, + "GamepadHapticActuator": false, + "GamepadPose": false, + "Geolocation": false, + "GeolocationCoordinates": false, + "GeolocationPosition": false, + "GeolocationPositionError": false, + "getComputedStyle": false, + "getScreenDetails": false, + "getSelection": false, + "GPU": false, + "GPUAdapter": false, + "GPUAdapterInfo": false, + "GPUBindGroup": false, + "GPUBindGroupLayout": false, + "GPUBuffer": false, + "GPUBufferUsage": false, + "GPUCanvasContext": false, + "GPUColorWrite": false, + "GPUCommandBuffer": false, + "GPUCommandEncoder": false, + "GPUCompilationInfo": false, + "GPUCompilationMessage": false, + "GPUComputePassEncoder": false, + "GPUComputePipeline": false, + "GPUDevice": false, + "GPUDeviceLostInfo": false, + "GPUError": false, + "GPUExternalTexture": false, + "GPUInternalError": false, + "GPUMapMode": false, + "GPUOutOfMemoryError": false, + "GPUPipelineError": false, + "GPUPipelineLayout": false, + "GPUQuerySet": false, + "GPUQueue": false, + "GPURenderBundle": false, + "GPURenderBundleEncoder": false, + "GPURenderPassEncoder": false, + "GPURenderPipeline": false, + "GPUSampler": false, + "GPUShaderModule": false, + "GPUShaderStage": false, + "GPUSupportedFeatures": false, + "GPUSupportedLimits": false, + "GPUTexture": false, + "GPUTextureUsage": false, + "GPUTextureView": false, + "GPUUncapturedErrorEvent": false, + "GPUValidationError": false, + "GravitySensor": false, + "Gyroscope": false, + "HashChangeEvent": false, + "Headers": false, + "HID": false, + "HIDConnectionEvent": false, + "HIDDevice": false, + "HIDInputReportEvent": false, + "Highlight": false, + "HighlightRegistry": false, + "history": false, + "History": false, + "HTMLAllCollection": false, + "HTMLAnchorElement": false, + "HTMLAreaElement": false, + "HTMLAudioElement": false, + "HTMLBaseElement": false, + "HTMLBodyElement": false, + "HTMLBRElement": false, + "HTMLButtonElement": false, + "HTMLCanvasElement": false, + "HTMLCollection": false, + "HTMLDataElement": false, + "HTMLDataListElement": false, + "HTMLDetailsElement": false, + "HTMLDialogElement": false, + "HTMLDirectoryElement": false, + "HTMLDivElement": false, + "HTMLDListElement": false, + "HTMLDocument": false, + "HTMLElement": false, + "HTMLEmbedElement": false, + "HTMLFencedFrameElement": false, + "HTMLFieldSetElement": false, + "HTMLFontElement": false, + "HTMLFormControlsCollection": false, + "HTMLFormElement": false, + "HTMLFrameElement": false, + "HTMLFrameSetElement": false, + "HTMLHeadElement": false, + "HTMLHeadingElement": false, + "HTMLHRElement": false, + "HTMLHtmlElement": false, + "HTMLIFrameElement": false, + "HTMLImageElement": false, + "HTMLInputElement": false, + "HTMLLabelElement": false, + "HTMLLegendElement": false, + "HTMLLIElement": false, + "HTMLLinkElement": false, + "HTMLMapElement": false, + "HTMLMarqueeElement": false, + "HTMLMediaElement": false, + "HTMLMenuElement": false, + "HTMLMetaElement": false, + "HTMLMeterElement": false, + "HTMLModElement": false, + "HTMLObjectElement": false, + "HTMLOListElement": false, + "HTMLOptGroupElement": false, + "HTMLOptionElement": false, + "HTMLOptionsCollection": false, + "HTMLOutputElement": false, + "HTMLParagraphElement": false, + "HTMLParamElement": false, + "HTMLPictureElement": false, + "HTMLPreElement": false, + "HTMLProgressElement": false, + "HTMLQuoteElement": false, + "HTMLScriptElement": false, + "HTMLSelectedContentElement": false, + "HTMLSelectElement": false, + "HTMLSlotElement": false, + "HTMLSourceElement": false, + "HTMLSpanElement": false, + "HTMLStyleElement": false, + "HTMLTableCaptionElement": false, + "HTMLTableCellElement": false, + "HTMLTableColElement": false, + "HTMLTableElement": false, + "HTMLTableRowElement": false, + "HTMLTableSectionElement": false, + "HTMLTemplateElement": false, + "HTMLTextAreaElement": false, + "HTMLTimeElement": false, + "HTMLTitleElement": false, + "HTMLTrackElement": false, + "HTMLUListElement": false, + "HTMLUnknownElement": false, + "HTMLVideoElement": false, + "IDBCursor": false, + "IDBCursorWithValue": false, + "IDBDatabase": false, + "IDBFactory": false, + "IDBIndex": false, + "IDBKeyRange": false, + "IDBObjectStore": false, + "IDBOpenDBRequest": false, + "IDBRecord": false, + "IDBRequest": false, + "IDBTransaction": false, + "IDBVersionChangeEvent": false, + "IdentityCredential": false, + "IdentityCredentialError": false, + "IdentityProvider": false, + "IdleDeadline": false, + "IdleDetector": false, + "IIRFilterNode": false, + "Image": false, + "ImageBitmap": false, + "ImageBitmapRenderingContext": false, + "ImageCapture": false, + "ImageData": false, + "ImageDecoder": false, + "ImageTrack": false, + "ImageTrackList": false, + "indexedDB": false, + "Ink": false, + "innerHeight": false, + "innerWidth": false, + "InputDeviceCapabilities": false, + "InputDeviceInfo": false, + "InputEvent": false, + "IntegrityViolationReportBody": false, + "InterestEvent": false, + "IntersectionObserver": false, + "IntersectionObserverEntry": false, + "isSecureContext": false, + "Keyboard": false, + "KeyboardEvent": false, + "KeyboardLayoutMap": false, + "KeyframeEffect": false, + "LanguageDetector": false, + "LargestContentfulPaint": false, + "LaunchParams": false, + "launchQueue": false, + "LaunchQueue": false, + "LayoutShift": false, + "LayoutShiftAttribution": false, + "length": false, + "LinearAccelerationSensor": false, + "localStorage": false, + "location": true, + "Location": false, + "locationbar": false, + "Lock": false, + "LockManager": false, + "matchMedia": false, + "MathMLElement": false, + "MediaCapabilities": false, + "MediaCapabilitiesInfo": false, + "MediaDeviceInfo": false, + "MediaDevices": false, + "MediaElementAudioSourceNode": false, + "MediaEncryptedEvent": false, + "MediaError": false, + "MediaKeyError": false, + "MediaKeyMessageEvent": false, + "MediaKeys": false, + "MediaKeySession": false, + "MediaKeyStatusMap": false, + "MediaKeySystemAccess": false, + "MediaList": false, + "MediaMetadata": false, + "MediaQueryList": false, + "MediaQueryListEvent": false, + "MediaRecorder": false, + "MediaRecorderErrorEvent": false, + "MediaSession": false, + "MediaSource": false, + "MediaSourceHandle": false, + "MediaStream": false, + "MediaStreamAudioDestinationNode": false, + "MediaStreamAudioSourceNode": false, + "MediaStreamEvent": false, + "MediaStreamTrack": false, + "MediaStreamTrackAudioSourceNode": false, + "MediaStreamTrackAudioStats": false, + "MediaStreamTrackEvent": false, + "MediaStreamTrackGenerator": false, + "MediaStreamTrackProcessor": false, + "MediaStreamTrackVideoStats": false, + "menubar": false, + "MessageChannel": false, + "MessageEvent": false, + "MessagePort": false, + "MIDIAccess": false, + "MIDIConnectionEvent": false, + "MIDIInput": false, + "MIDIInputMap": false, + "MIDIMessageEvent": false, + "MIDIOutput": false, + "MIDIOutputMap": false, + "MIDIPort": false, + "MimeType": false, + "MimeTypeArray": false, + "model": false, + "ModelGenericSession": false, + "ModelManager": false, + "MouseEvent": false, + "moveBy": false, + "moveTo": false, + "MutationEvent": false, + "MutationObserver": false, + "MutationRecord": false, + "name": false, + "NamedNodeMap": false, + "NavigateEvent": false, + "navigation": false, + "Navigation": false, + "NavigationActivation": false, + "NavigationCurrentEntryChangeEvent": false, + "NavigationDestination": false, + "NavigationHistoryEntry": false, + "NavigationPrecommitController": false, + "NavigationPreloadManager": false, + "NavigationTransition": false, + "navigator": false, + "Navigator": false, + "NavigatorLogin": false, + "NavigatorManagedData": false, + "NavigatorUAData": false, + "NetworkInformation": false, + "Node": false, + "NodeFilter": false, + "NodeIterator": false, + "NodeList": false, + "Notification": false, + "NotifyPaintEvent": false, + "NotRestoredReasonDetails": false, + "NotRestoredReasons": false, + "Observable": false, + "OfflineAudioCompletionEvent": false, + "OfflineAudioContext": false, + "offscreenBuffering": false, + "OffscreenCanvas": false, + "OffscreenCanvasRenderingContext2D": false, + "onabort": true, + "onafterprint": true, + "onanimationcancel": true, + "onanimationend": true, + "onanimationiteration": true, + "onanimationstart": true, + "onappinstalled": true, + "onauxclick": true, + "onbeforeinput": true, + "onbeforeinstallprompt": true, + "onbeforematch": true, + "onbeforeprint": true, + "onbeforetoggle": true, + "onbeforeunload": true, + "onbeforexrselect": true, + "onblur": true, + "oncancel": true, + "oncanplay": true, + "oncanplaythrough": true, + "onchange": true, + "onclick": true, + "onclose": true, + "oncommand": true, + "oncontentvisibilityautostatechange": true, + "oncontextlost": true, + "oncontextmenu": true, + "oncontextrestored": true, + "oncopy": true, + "oncuechange": true, + "oncut": true, + "ondblclick": true, + "ondevicemotion": true, + "ondeviceorientation": true, + "ondeviceorientationabsolute": true, + "ondrag": true, + "ondragend": true, + "ondragenter": true, + "ondragleave": true, + "ondragover": true, + "ondragstart": true, + "ondrop": true, + "ondurationchange": true, + "onemptied": true, + "onended": true, + "onerror": true, + "onfocus": true, + "onformdata": true, + "ongamepadconnected": true, + "ongamepaddisconnected": true, + "ongotpointercapture": true, + "onhashchange": true, + "oninput": true, + "oninvalid": true, + "onkeydown": true, + "onkeypress": true, + "onkeyup": true, + "onlanguagechange": true, + "onload": true, + "onloadeddata": true, + "onloadedmetadata": true, + "onloadstart": true, + "onlostpointercapture": true, + "onmessage": true, + "onmessageerror": true, + "onmousedown": true, + "onmouseenter": true, + "onmouseleave": true, + "onmousemove": true, + "onmouseout": true, + "onmouseover": true, + "onmouseup": true, + "onmousewheel": true, + "onoffline": true, + "ononline": true, + "onpagehide": true, + "onpagereveal": true, + "onpageshow": true, + "onpageswap": true, + "onpaste": true, + "onpause": true, + "onplay": true, + "onplaying": true, + "onpointercancel": true, + "onpointerdown": true, + "onpointerenter": true, + "onpointerleave": true, + "onpointermove": true, + "onpointerout": true, + "onpointerover": true, + "onpointerrawupdate": true, + "onpointerup": true, + "onpopstate": true, + "onprogress": true, + "onratechange": true, + "onrejectionhandled": true, + "onreset": true, + "onresize": true, + "onscroll": true, + "onscrollend": true, + "onscrollsnapchange": true, + "onscrollsnapchanging": true, + "onsearch": true, + "onsecuritypolicyviolation": true, + "onseeked": true, + "onseeking": true, + "onselect": true, + "onselectionchange": true, + "onselectstart": true, + "onslotchange": true, + "onstalled": true, + "onstorage": true, + "onsubmit": true, + "onsuspend": true, + "ontimeupdate": true, + "ontoggle": true, + "ontransitioncancel": true, + "ontransitionend": true, + "ontransitionrun": true, + "ontransitionstart": true, + "onunhandledrejection": true, + "onunload": true, + "onvolumechange": true, + "onwaiting": true, + "onwheel": true, + "open": false, + "opener": false, + "Option": false, + "OrientationSensor": false, + "origin": false, + "originAgentCluster": false, + "OscillatorNode": false, + "OTPCredential": false, + "outerHeight": false, + "outerWidth": false, + "OverconstrainedError": false, + "PageRevealEvent": false, + "PageSwapEvent": false, + "PageTransitionEvent": false, + "pageXOffset": false, + "pageYOffset": false, + "PannerNode": false, + "parent": false, + "PasswordCredential": false, + "Path2D": false, + "PaymentAddress": false, + "PaymentManager": false, + "PaymentMethodChangeEvent": false, + "PaymentRequest": false, + "PaymentRequestUpdateEvent": false, + "PaymentResponse": false, + "performance": false, + "Performance": false, + "PerformanceElementTiming": false, + "PerformanceEntry": false, + "PerformanceEventTiming": false, + "PerformanceLongAnimationFrameTiming": false, + "PerformanceLongTaskTiming": false, + "PerformanceMark": false, + "PerformanceMeasure": false, + "PerformanceNavigation": false, + "PerformanceNavigationTiming": false, + "PerformanceObserver": false, + "PerformanceObserverEntryList": false, + "PerformancePaintTiming": false, + "PerformanceResourceTiming": false, + "PerformanceScriptTiming": false, + "PerformanceServerTiming": false, + "PerformanceTiming": false, + "PeriodicSyncManager": false, + "PeriodicWave": false, + "Permissions": false, + "PermissionStatus": false, + "PERSISTENT": false, + "personalbar": false, + "PictureInPictureEvent": false, + "PictureInPictureWindow": false, + "Plugin": false, + "PluginArray": false, + "PointerEvent": false, + "PopStateEvent": false, + "postMessage": false, + "Presentation": false, + "PresentationAvailability": false, + "PresentationConnection": false, + "PresentationConnectionAvailableEvent": false, + "PresentationConnectionCloseEvent": false, + "PresentationConnectionList": false, + "PresentationReceiver": false, + "PresentationRequest": false, + "PressureObserver": false, + "PressureRecord": false, + "print": false, + "ProcessingInstruction": false, + "Profiler": false, + "ProgressEvent": false, + "PromiseRejectionEvent": false, + "prompt": false, + "ProtectedAudience": false, + "PublicKeyCredential": false, + "PushManager": false, + "PushSubscription": false, + "PushSubscriptionOptions": false, + "queryLocalFonts": false, + "queueMicrotask": false, + "QuotaExceededError": false, + "RadioNodeList": false, + "Range": false, + "ReadableByteStreamController": false, + "ReadableStream": false, + "ReadableStreamBYOBReader": false, + "ReadableStreamBYOBRequest": false, + "ReadableStreamDefaultController": false, + "ReadableStreamDefaultReader": false, + "registerProcessor": false, + "RelativeOrientationSensor": false, + "RemotePlayback": false, + "removeEventListener": false, + "ReportBody": false, + "reportError": false, + "ReportingObserver": false, + "Request": false, + "requestAnimationFrame": false, + "requestIdleCallback": false, + "resizeBy": false, + "ResizeObserver": false, + "ResizeObserverEntry": false, + "ResizeObserverSize": false, + "resizeTo": false, + "Response": false, + "RestrictionTarget": false, + "RTCCertificate": false, + "RTCDataChannel": false, + "RTCDataChannelEvent": false, + "RTCDtlsTransport": false, + "RTCDTMFSender": false, + "RTCDTMFToneChangeEvent": false, + "RTCEncodedAudioFrame": false, + "RTCEncodedVideoFrame": false, + "RTCError": false, + "RTCErrorEvent": false, + "RTCIceCandidate": false, + "RTCIceTransport": false, + "RTCPeerConnection": false, + "RTCPeerConnectionIceErrorEvent": false, + "RTCPeerConnectionIceEvent": false, + "RTCRtpReceiver": false, + "RTCRtpScriptTransform": false, + "RTCRtpSender": false, + "RTCRtpTransceiver": false, + "RTCSctpTransport": false, + "RTCSessionDescription": false, + "RTCStatsReport": false, + "RTCTrackEvent": false, + "sampleRate": false, + "scheduler": false, + "Scheduler": false, + "Scheduling": false, + "screen": false, + "Screen": false, + "ScreenDetailed": false, + "ScreenDetails": false, + "screenLeft": false, + "ScreenOrientation": false, + "screenTop": false, + "screenX": false, + "screenY": false, + "ScriptProcessorNode": false, + "scroll": false, + "scrollbars": false, + "scrollBy": false, + "ScrollTimeline": false, + "scrollTo": false, + "scrollX": false, + "scrollY": false, + "SecurityPolicyViolationEvent": false, + "Selection": false, + "self": false, + "Sensor": false, + "SensorErrorEvent": false, + "Serial": false, + "SerialPort": false, + "ServiceWorker": false, + "ServiceWorkerContainer": false, + "ServiceWorkerRegistration": false, + "sessionStorage": false, + "setInterval": false, + "setTimeout": false, + "ShadowRoot": false, + "sharedStorage": false, + "SharedStorage": false, + "SharedStorageAppendMethod": false, + "SharedStorageClearMethod": false, + "SharedStorageDeleteMethod": false, + "SharedStorageModifierMethod": false, + "SharedStorageSetMethod": false, + "SharedStorageWorklet": false, + "SharedWorker": false, + "showDirectoryPicker": false, + "showOpenFilePicker": false, + "showSaveFilePicker": false, + "SnapEvent": false, + "SourceBuffer": false, + "SourceBufferList": false, + "SpeechGrammar": false, + "SpeechGrammarList": false, + "SpeechRecognition": false, + "SpeechRecognitionErrorEvent": false, + "SpeechRecognitionEvent": false, + "SpeechRecognitionPhrase": false, + "speechSynthesis": false, + "SpeechSynthesis": false, + "SpeechSynthesisErrorEvent": false, + "SpeechSynthesisEvent": false, + "SpeechSynthesisUtterance": false, + "SpeechSynthesisVoice": false, + "StaticRange": false, + "status": false, + "statusbar": false, + "StereoPannerNode": false, + "stop": false, + "Storage": false, + "StorageBucket": false, + "StorageBucketManager": false, + "StorageEvent": false, + "StorageManager": false, + "structuredClone": false, + "styleMedia": false, + "StylePropertyMap": false, + "StylePropertyMapReadOnly": false, + "StyleSheet": false, + "StyleSheetList": false, + "SubmitEvent": false, + "Subscriber": false, + "SubtleCrypto": false, + "Summarizer": false, + "SuppressedError": false, + "SVGAElement": false, + "SVGAngle": false, + "SVGAnimatedAngle": false, + "SVGAnimatedBoolean": false, + "SVGAnimatedEnumeration": false, + "SVGAnimatedInteger": false, + "SVGAnimatedLength": false, + "SVGAnimatedLengthList": false, + "SVGAnimatedNumber": false, + "SVGAnimatedNumberList": false, + "SVGAnimatedPreserveAspectRatio": false, + "SVGAnimatedRect": false, + "SVGAnimatedString": false, + "SVGAnimatedTransformList": false, + "SVGAnimateElement": false, + "SVGAnimateMotionElement": false, + "SVGAnimateTransformElement": false, + "SVGAnimationElement": false, + "SVGCircleElement": false, + "SVGClipPathElement": false, + "SVGComponentTransferFunctionElement": false, + "SVGDefsElement": false, + "SVGDescElement": false, + "SVGElement": false, + "SVGEllipseElement": false, + "SVGFEBlendElement": false, + "SVGFEColorMatrixElement": false, + "SVGFEComponentTransferElement": false, + "SVGFECompositeElement": false, + "SVGFEConvolveMatrixElement": false, + "SVGFEDiffuseLightingElement": false, + "SVGFEDisplacementMapElement": false, + "SVGFEDistantLightElement": false, + "SVGFEDropShadowElement": false, + "SVGFEFloodElement": false, + "SVGFEFuncAElement": false, + "SVGFEFuncBElement": false, + "SVGFEFuncGElement": false, + "SVGFEFuncRElement": false, + "SVGFEGaussianBlurElement": false, + "SVGFEImageElement": false, + "SVGFEMergeElement": false, + "SVGFEMergeNodeElement": false, + "SVGFEMorphologyElement": false, + "SVGFEOffsetElement": false, + "SVGFEPointLightElement": false, + "SVGFESpecularLightingElement": false, + "SVGFESpotLightElement": false, + "SVGFETileElement": false, + "SVGFETurbulenceElement": false, + "SVGFilterElement": false, + "SVGForeignObjectElement": false, + "SVGGElement": false, + "SVGGeometryElement": false, + "SVGGradientElement": false, + "SVGGraphicsElement": false, + "SVGImageElement": false, + "SVGLength": false, + "SVGLengthList": false, + "SVGLinearGradientElement": false, + "SVGLineElement": false, + "SVGMarkerElement": false, + "SVGMaskElement": false, + "SVGMatrix": false, + "SVGMetadataElement": false, + "SVGMPathElement": false, + "SVGNumber": false, + "SVGNumberList": false, + "SVGPathElement": false, + "SVGPatternElement": false, + "SVGPoint": false, + "SVGPointList": false, + "SVGPolygonElement": false, + "SVGPolylineElement": false, + "SVGPreserveAspectRatio": false, + "SVGRadialGradientElement": false, + "SVGRect": false, + "SVGRectElement": false, + "SVGScriptElement": false, + "SVGSetElement": false, + "SVGStopElement": false, + "SVGStringList": false, + "SVGStyleElement": false, + "SVGSVGElement": false, + "SVGSwitchElement": false, + "SVGSymbolElement": false, + "SVGTextContentElement": false, + "SVGTextElement": false, + "SVGTextPathElement": false, + "SVGTextPositioningElement": false, + "SVGTitleElement": false, + "SVGTransform": false, + "SVGTransformList": false, + "SVGTSpanElement": false, + "SVGUnitTypes": false, + "SVGUseElement": false, + "SVGViewElement": false, + "SyncManager": false, + "TaskAttributionTiming": false, + "TaskController": false, + "TaskPriorityChangeEvent": false, + "TaskSignal": false, + "TEMPORARY": false, + "Text": false, + "TextDecoder": false, + "TextDecoderStream": false, + "TextEncoder": false, + "TextEncoderStream": false, + "TextEvent": false, + "TextFormat": false, + "TextFormatUpdateEvent": false, + "TextMetrics": false, + "TextTrack": false, + "TextTrackCue": false, + "TextTrackCueList": false, + "TextTrackList": false, + "TextUpdateEvent": false, + "TimeEvent": false, + "TimeRanges": false, + "ToggleEvent": false, + "toolbar": false, + "top": false, + "Touch": false, + "TouchEvent": false, + "TouchList": false, + "TrackEvent": false, + "TransformStream": false, + "TransformStreamDefaultController": false, + "TransitionEvent": false, + "Translator": false, + "TreeWalker": false, + "TrustedHTML": false, + "TrustedScript": false, + "TrustedScriptURL": false, + "TrustedTypePolicy": false, + "TrustedTypePolicyFactory": false, + "trustedTypes": false, + "UIEvent": false, + "URL": false, + "URLPattern": false, + "URLSearchParams": false, + "USB": false, + "USBAlternateInterface": false, + "USBConfiguration": false, + "USBConnectionEvent": false, + "USBDevice": false, + "USBEndpoint": false, + "USBInterface": false, + "USBInTransferResult": false, + "USBIsochronousInTransferPacket": false, + "USBIsochronousInTransferResult": false, + "USBIsochronousOutTransferPacket": false, + "USBIsochronousOutTransferResult": false, + "USBOutTransferResult": false, + "UserActivation": false, + "ValidityState": false, + "VideoColorSpace": false, + "VideoDecoder": false, + "VideoEncoder": false, + "VideoFrame": false, + "VideoPlaybackQuality": false, + "viewport": false, + "Viewport": false, + "ViewTimeline": false, + "ViewTransition": false, + "ViewTransitionTypeSet": false, + "VirtualKeyboard": false, + "VirtualKeyboardGeometryChangeEvent": false, + "VisibilityStateEntry": false, + "visualViewport": false, + "VisualViewport": false, + "VTTCue": false, + "VTTRegion": false, + "WakeLock": false, + "WakeLockSentinel": false, + "WaveShaperNode": false, + "WebAssembly": false, + "WebGL2RenderingContext": false, + "WebGLActiveInfo": false, + "WebGLBuffer": false, + "WebGLContextEvent": false, + "WebGLFramebuffer": false, + "WebGLObject": false, + "WebGLProgram": false, + "WebGLQuery": false, + "WebGLRenderbuffer": false, + "WebGLRenderingContext": false, + "WebGLSampler": false, + "WebGLShader": false, + "WebGLShaderPrecisionFormat": false, + "WebGLSync": false, + "WebGLTexture": false, + "WebGLTransformFeedback": false, + "WebGLUniformLocation": false, + "WebGLVertexArrayObject": false, + "WebSocket": false, + "WebSocketError": false, + "WebSocketStream": false, + "WebTransport": false, + "WebTransportBidirectionalStream": false, + "WebTransportDatagramDuplexStream": false, + "WebTransportError": false, + "WebTransportReceiveStream": false, + "WebTransportSendStream": false, + "WGSLLanguageFeatures": false, + "WheelEvent": false, + "when": false, + "window": false, + "Window": false, + "WindowControlsOverlay": false, + "WindowControlsOverlayGeometryChangeEvent": false, + "Worker": false, + "Worklet": false, + "WorkletGlobalScope": false, + "WritableStream": false, + "WritableStreamDefaultController": false, + "WritableStreamDefaultWriter": false, + "XMLDocument": false, + "XMLHttpRequest": false, + "XMLHttpRequestEventTarget": false, + "XMLHttpRequestUpload": false, + "XMLSerializer": false, + "XPathEvaluator": false, + "XPathExpression": false, + "XPathResult": false, + "XRAnchor": false, + "XRAnchorSet": false, + "XRBoundedReferenceSpace": false, + "XRCamera": false, + "XRCPUDepthInformation": false, + "XRDepthInformation": false, + "XRDOMOverlayState": false, + "XRFrame": false, + "XRHand": false, + "XRHitTestResult": false, + "XRHitTestSource": false, + "XRInputSource": false, + "XRInputSourceArray": false, + "XRInputSourceEvent": false, + "XRInputSourcesChangeEvent": false, + "XRJointPose": false, + "XRJointSpace": false, + "XRLayer": false, + "XRLightEstimate": false, + "XRLightProbe": false, + "XRPose": false, + "XRRay": false, + "XRReferenceSpace": false, + "XRReferenceSpaceEvent": false, + "XRRenderState": false, + "XRRigidTransform": false, + "XRSession": false, + "XRSessionEvent": false, + "XRSpace": false, + "XRSystem": false, + "XRTransientInputHitTestResult": false, + "XRTransientInputHitTestSource": false, + "XRView": false, + "XRViewerPose": false, + "XRViewport": false, + "XRWebGLBinding": false, + "XRWebGLDepthInformation": false, + "XRWebGLLayer": false, + "XSLTProcessor": false + } + }, + "errors": [ + { + "messageId": "defaultMessage", + "data": { + "name": "foo" + } + }, + { + "messageId": "defaultMessage", + "data": { + "name": "foo" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 2 errors but had 1: [ + { + ruleId: 'rule-to-test/no-restricted-globals', + message: "Unexpected use of 'foo'.", + messageId: 'defaultMessage', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 0, + endLine: 1, + endColumn: 3, + suggestions: null + } +] + +1 !== 2 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-restricted-globals > invalid + +```js +foo(); myGlobal.foo() +``` + +```json +{ + "options": [ + { + "globals": [ + "foo" + ], + "checkGlobalObject": true, + "globalObjects": [ + "myGlobal" + ] + } + ], + "languageOptions": { + "globals": { + "myGlobal": "readonly" + } + }, + "errors": [ + { + "messageId": "defaultMessage", + "data": { + "name": "foo" + } + }, + { + "messageId": "defaultMessage", + "data": { + "name": "foo" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 2 errors but had 1: [ + { + ruleId: 'rule-to-test/no-restricted-globals', + message: "Unexpected use of 'foo'.", + messageId: 'defaultMessage', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 0, + endLine: 1, + endColumn: 3, + suggestions: null + } +] + +1 !== 2 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-restricted-globals > invalid + +```js +function onClick(event) { console.log(event); console.log(window.event); } +``` + +```json +{ + "options": [ + { + "globals": [ + "event" + ], + "checkGlobalObject": true + } + ], + "languageOptions": { + "globals": { + "AbortController": false, + "AbortSignal": false, + "AbsoluteOrientationSensor": false, + "AbstractRange": false, + "Accelerometer": false, + "addEventListener": false, + "ai": false, + "AI": false, + "AICreateMonitor": false, + "AITextSession": false, + "alert": false, + "AnalyserNode": false, + "Animation": false, + "AnimationEffect": false, + "AnimationEvent": false, + "AnimationPlaybackEvent": false, + "AnimationTimeline": false, + "AsyncDisposableStack": false, + "atob": false, + "Attr": false, + "Audio": false, + "AudioBuffer": false, + "AudioBufferSourceNode": false, + "AudioContext": false, + "AudioData": false, + "AudioDecoder": false, + "AudioDestinationNode": false, + "AudioEncoder": false, + "AudioListener": false, + "AudioNode": false, + "AudioParam": false, + "AudioParamMap": false, + "AudioProcessingEvent": false, + "AudioScheduledSourceNode": false, + "AudioSinkInfo": false, + "AudioWorklet": false, + "AudioWorkletGlobalScope": false, + "AudioWorkletNode": false, + "AudioWorkletProcessor": false, + "AuthenticatorAssertionResponse": false, + "AuthenticatorAttestationResponse": false, + "AuthenticatorResponse": false, + "BackgroundFetchManager": false, + "BackgroundFetchRecord": false, + "BackgroundFetchRegistration": false, + "BarcodeDetector": false, + "BarProp": false, + "BaseAudioContext": false, + "BatteryManager": false, + "BeforeUnloadEvent": false, + "BiquadFilterNode": false, + "Blob": false, + "BlobEvent": false, + "Bluetooth": false, + "BluetoothCharacteristicProperties": false, + "BluetoothDevice": false, + "BluetoothRemoteGATTCharacteristic": false, + "BluetoothRemoteGATTDescriptor": false, + "BluetoothRemoteGATTServer": false, + "BluetoothRemoteGATTService": false, + "BluetoothUUID": false, + "blur": false, + "BroadcastChannel": false, + "BrowserCaptureMediaStreamTrack": false, + "btoa": false, + "ByteLengthQueuingStrategy": false, + "Cache": false, + "caches": false, + "CacheStorage": false, + "cancelAnimationFrame": false, + "cancelIdleCallback": false, + "CanvasCaptureMediaStream": false, + "CanvasCaptureMediaStreamTrack": false, + "CanvasGradient": false, + "CanvasPattern": false, + "CanvasRenderingContext2D": false, + "CaptureController": false, + "CaretPosition": false, + "CDATASection": false, + "ChannelMergerNode": false, + "ChannelSplitterNode": false, + "ChapterInformation": false, + "CharacterBoundsUpdateEvent": false, + "CharacterData": false, + "clearInterval": false, + "clearTimeout": false, + "clientInformation": false, + "Clipboard": false, + "ClipboardChangeEvent": false, + "ClipboardEvent": false, + "ClipboardItem": false, + "close": false, + "closed": false, + "CloseEvent": false, + "CloseWatcher": false, + "CommandEvent": false, + "Comment": false, + "CompositionEvent": false, + "CompressionStream": false, + "confirm": false, + "console": false, + "ConstantSourceNode": false, + "ContentVisibilityAutoStateChangeEvent": false, + "ConvolverNode": false, + "CookieChangeEvent": false, + "CookieDeprecationLabel": false, + "cookieStore": false, + "CookieStore": false, + "CookieStoreManager": false, + "CountQueuingStrategy": false, + "createImageBitmap": false, + "CreateMonitor": false, + "Credential": false, + "credentialless": false, + "CredentialsContainer": false, + "CropTarget": false, + "crossOriginIsolated": false, + "crypto": false, + "Crypto": false, + "CryptoKey": false, + "CSPViolationReportBody": false, + "CSS": false, + "CSSAnimation": false, + "CSSConditionRule": false, + "CSSContainerRule": false, + "CSSCounterStyleRule": false, + "CSSFontFaceRule": false, + "CSSFontFeatureValuesRule": false, + "CSSFontPaletteValuesRule": false, + "CSSFunctionDeclarations": false, + "CSSFunctionDescriptors": false, + "CSSFunctionRule": false, + "CSSGroupingRule": false, + "CSSImageValue": false, + "CSSImportRule": false, + "CSSKeyframeRule": false, + "CSSKeyframesRule": false, + "CSSKeywordValue": false, + "CSSLayerBlockRule": false, + "CSSLayerStatementRule": false, + "CSSMarginRule": false, + "CSSMathClamp": false, + "CSSMathInvert": false, + "CSSMathMax": false, + "CSSMathMin": false, + "CSSMathNegate": false, + "CSSMathProduct": false, + "CSSMathSum": false, + "CSSMathValue": false, + "CSSMatrixComponent": false, + "CSSMediaRule": false, + "CSSNamespaceRule": false, + "CSSNestedDeclarations": false, + "CSSNumericArray": false, + "CSSNumericValue": false, + "CSSPageDescriptors": false, + "CSSPageRule": false, + "CSSPerspective": false, + "CSSPositionTryDescriptors": false, + "CSSPositionTryRule": false, + "CSSPositionValue": false, + "CSSPropertyRule": false, + "CSSRotate": false, + "CSSRule": false, + "CSSRuleList": false, + "CSSScale": false, + "CSSScopeRule": false, + "CSSSkew": false, + "CSSSkewX": false, + "CSSSkewY": false, + "CSSStartingStyleRule": false, + "CSSStyleDeclaration": false, + "CSSStyleRule": false, + "CSSStyleSheet": false, + "CSSStyleValue": false, + "CSSSupportsRule": false, + "CSSTransformComponent": false, + "CSSTransformValue": false, + "CSSTransition": false, + "CSSTranslate": false, + "CSSUnitValue": false, + "CSSUnparsedValue": false, + "CSSVariableReferenceValue": false, + "CSSViewTransitionRule": false, + "currentFrame": false, + "currentTime": false, + "CustomElementRegistry": false, + "customElements": false, + "CustomEvent": false, + "CustomStateSet": false, + "DataTransfer": false, + "DataTransferItem": false, + "DataTransferItemList": false, + "DecompressionStream": false, + "DelayNode": false, + "DelegatedInkTrailPresenter": false, + "DeviceMotionEvent": false, + "DeviceMotionEventAcceleration": false, + "DeviceMotionEventRotationRate": false, + "DeviceOrientationEvent": false, + "devicePixelRatio": false, + "DevicePosture": false, + "DigitalCredential": false, + "dispatchEvent": false, + "DisposableStack": false, + "document": false, + "Document": false, + "DocumentFragment": false, + "documentPictureInPicture": false, + "DocumentPictureInPicture": false, + "DocumentPictureInPictureEvent": false, + "DocumentTimeline": false, + "DocumentType": false, + "DOMError": false, + "DOMException": false, + "DOMImplementation": false, + "DOMMatrix": false, + "DOMMatrixReadOnly": false, + "DOMParser": false, + "DOMPoint": false, + "DOMPointReadOnly": false, + "DOMQuad": false, + "DOMRect": false, + "DOMRectList": false, + "DOMRectReadOnly": false, + "DOMStringList": false, + "DOMStringMap": false, + "DOMTokenList": false, + "DragEvent": false, + "DynamicsCompressorNode": false, + "EditContext": false, + "Element": false, + "ElementInternals": false, + "EncodedAudioChunk": false, + "EncodedVideoChunk": false, + "ErrorEvent": false, + "event": false, + "Event": false, + "EventCounts": false, + "EventSource": false, + "EventTarget": false, + "external": false, + "External": false, + "EyeDropper": false, + "FeaturePolicy": false, + "FederatedCredential": false, + "fence": false, + "Fence": false, + "FencedFrameConfig": false, + "fetch": false, + "fetchLater": false, + "FetchLaterResult": false, + "File": false, + "FileList": false, + "FileReader": false, + "FileSystem": false, + "FileSystemDirectoryEntry": false, + "FileSystemDirectoryHandle": false, + "FileSystemDirectoryReader": false, + "FileSystemEntry": false, + "FileSystemFileEntry": false, + "FileSystemFileHandle": false, + "FileSystemHandle": false, + "FileSystemObserver": false, + "FileSystemWritableFileStream": false, + "find": false, + "focus": false, + "FocusEvent": false, + "FontData": false, + "FontFace": false, + "FontFaceSet": false, + "FontFaceSetLoadEvent": false, + "FormData": false, + "FormDataEvent": false, + "FragmentDirective": false, + "frameElement": false, + "frames": false, + "GainNode": false, + "Gamepad": false, + "GamepadAxisMoveEvent": false, + "GamepadButton": false, + "GamepadButtonEvent": false, + "GamepadEvent": false, + "GamepadHapticActuator": false, + "GamepadPose": false, + "Geolocation": false, + "GeolocationCoordinates": false, + "GeolocationPosition": false, + "GeolocationPositionError": false, + "getComputedStyle": false, + "getScreenDetails": false, + "getSelection": false, + "GPU": false, + "GPUAdapter": false, + "GPUAdapterInfo": false, + "GPUBindGroup": false, + "GPUBindGroupLayout": false, + "GPUBuffer": false, + "GPUBufferUsage": false, + "GPUCanvasContext": false, + "GPUColorWrite": false, + "GPUCommandBuffer": false, + "GPUCommandEncoder": false, + "GPUCompilationInfo": false, + "GPUCompilationMessage": false, + "GPUComputePassEncoder": false, + "GPUComputePipeline": false, + "GPUDevice": false, + "GPUDeviceLostInfo": false, + "GPUError": false, + "GPUExternalTexture": false, + "GPUInternalError": false, + "GPUMapMode": false, + "GPUOutOfMemoryError": false, + "GPUPipelineError": false, + "GPUPipelineLayout": false, + "GPUQuerySet": false, + "GPUQueue": false, + "GPURenderBundle": false, + "GPURenderBundleEncoder": false, + "GPURenderPassEncoder": false, + "GPURenderPipeline": false, + "GPUSampler": false, + "GPUShaderModule": false, + "GPUShaderStage": false, + "GPUSupportedFeatures": false, + "GPUSupportedLimits": false, + "GPUTexture": false, + "GPUTextureUsage": false, + "GPUTextureView": false, + "GPUUncapturedErrorEvent": false, + "GPUValidationError": false, + "GravitySensor": false, + "Gyroscope": false, + "HashChangeEvent": false, + "Headers": false, + "HID": false, + "HIDConnectionEvent": false, + "HIDDevice": false, + "HIDInputReportEvent": false, + "Highlight": false, + "HighlightRegistry": false, + "history": false, + "History": false, + "HTMLAllCollection": false, + "HTMLAnchorElement": false, + "HTMLAreaElement": false, + "HTMLAudioElement": false, + "HTMLBaseElement": false, + "HTMLBodyElement": false, + "HTMLBRElement": false, + "HTMLButtonElement": false, + "HTMLCanvasElement": false, + "HTMLCollection": false, + "HTMLDataElement": false, + "HTMLDataListElement": false, + "HTMLDetailsElement": false, + "HTMLDialogElement": false, + "HTMLDirectoryElement": false, + "HTMLDivElement": false, + "HTMLDListElement": false, + "HTMLDocument": false, + "HTMLElement": false, + "HTMLEmbedElement": false, + "HTMLFencedFrameElement": false, + "HTMLFieldSetElement": false, + "HTMLFontElement": false, + "HTMLFormControlsCollection": false, + "HTMLFormElement": false, + "HTMLFrameElement": false, + "HTMLFrameSetElement": false, + "HTMLHeadElement": false, + "HTMLHeadingElement": false, + "HTMLHRElement": false, + "HTMLHtmlElement": false, + "HTMLIFrameElement": false, + "HTMLImageElement": false, + "HTMLInputElement": false, + "HTMLLabelElement": false, + "HTMLLegendElement": false, + "HTMLLIElement": false, + "HTMLLinkElement": false, + "HTMLMapElement": false, + "HTMLMarqueeElement": false, + "HTMLMediaElement": false, + "HTMLMenuElement": false, + "HTMLMetaElement": false, + "HTMLMeterElement": false, + "HTMLModElement": false, + "HTMLObjectElement": false, + "HTMLOListElement": false, + "HTMLOptGroupElement": false, + "HTMLOptionElement": false, + "HTMLOptionsCollection": false, + "HTMLOutputElement": false, + "HTMLParagraphElement": false, + "HTMLParamElement": false, + "HTMLPictureElement": false, + "HTMLPreElement": false, + "HTMLProgressElement": false, + "HTMLQuoteElement": false, + "HTMLScriptElement": false, + "HTMLSelectedContentElement": false, + "HTMLSelectElement": false, + "HTMLSlotElement": false, + "HTMLSourceElement": false, + "HTMLSpanElement": false, + "HTMLStyleElement": false, + "HTMLTableCaptionElement": false, + "HTMLTableCellElement": false, + "HTMLTableColElement": false, + "HTMLTableElement": false, + "HTMLTableRowElement": false, + "HTMLTableSectionElement": false, + "HTMLTemplateElement": false, + "HTMLTextAreaElement": false, + "HTMLTimeElement": false, + "HTMLTitleElement": false, + "HTMLTrackElement": false, + "HTMLUListElement": false, + "HTMLUnknownElement": false, + "HTMLVideoElement": false, + "IDBCursor": false, + "IDBCursorWithValue": false, + "IDBDatabase": false, + "IDBFactory": false, + "IDBIndex": false, + "IDBKeyRange": false, + "IDBObjectStore": false, + "IDBOpenDBRequest": false, + "IDBRecord": false, + "IDBRequest": false, + "IDBTransaction": false, + "IDBVersionChangeEvent": false, + "IdentityCredential": false, + "IdentityCredentialError": false, + "IdentityProvider": false, + "IdleDeadline": false, + "IdleDetector": false, + "IIRFilterNode": false, + "Image": false, + "ImageBitmap": false, + "ImageBitmapRenderingContext": false, + "ImageCapture": false, + "ImageData": false, + "ImageDecoder": false, + "ImageTrack": false, + "ImageTrackList": false, + "indexedDB": false, + "Ink": false, + "innerHeight": false, + "innerWidth": false, + "InputDeviceCapabilities": false, + "InputDeviceInfo": false, + "InputEvent": false, + "IntegrityViolationReportBody": false, + "InterestEvent": false, + "IntersectionObserver": false, + "IntersectionObserverEntry": false, + "isSecureContext": false, + "Keyboard": false, + "KeyboardEvent": false, + "KeyboardLayoutMap": false, + "KeyframeEffect": false, + "LanguageDetector": false, + "LargestContentfulPaint": false, + "LaunchParams": false, + "launchQueue": false, + "LaunchQueue": false, + "LayoutShift": false, + "LayoutShiftAttribution": false, + "length": false, + "LinearAccelerationSensor": false, + "localStorage": false, + "location": true, + "Location": false, + "locationbar": false, + "Lock": false, + "LockManager": false, + "matchMedia": false, + "MathMLElement": false, + "MediaCapabilities": false, + "MediaCapabilitiesInfo": false, + "MediaDeviceInfo": false, + "MediaDevices": false, + "MediaElementAudioSourceNode": false, + "MediaEncryptedEvent": false, + "MediaError": false, + "MediaKeyError": false, + "MediaKeyMessageEvent": false, + "MediaKeys": false, + "MediaKeySession": false, + "MediaKeyStatusMap": false, + "MediaKeySystemAccess": false, + "MediaList": false, + "MediaMetadata": false, + "MediaQueryList": false, + "MediaQueryListEvent": false, + "MediaRecorder": false, + "MediaRecorderErrorEvent": false, + "MediaSession": false, + "MediaSource": false, + "MediaSourceHandle": false, + "MediaStream": false, + "MediaStreamAudioDestinationNode": false, + "MediaStreamAudioSourceNode": false, + "MediaStreamEvent": false, + "MediaStreamTrack": false, + "MediaStreamTrackAudioSourceNode": false, + "MediaStreamTrackAudioStats": false, + "MediaStreamTrackEvent": false, + "MediaStreamTrackGenerator": false, + "MediaStreamTrackProcessor": false, + "MediaStreamTrackVideoStats": false, + "menubar": false, + "MessageChannel": false, + "MessageEvent": false, + "MessagePort": false, + "MIDIAccess": false, + "MIDIConnectionEvent": false, + "MIDIInput": false, + "MIDIInputMap": false, + "MIDIMessageEvent": false, + "MIDIOutput": false, + "MIDIOutputMap": false, + "MIDIPort": false, + "MimeType": false, + "MimeTypeArray": false, + "model": false, + "ModelGenericSession": false, + "ModelManager": false, + "MouseEvent": false, + "moveBy": false, + "moveTo": false, + "MutationEvent": false, + "MutationObserver": false, + "MutationRecord": false, + "name": false, + "NamedNodeMap": false, + "NavigateEvent": false, + "navigation": false, + "Navigation": false, + "NavigationActivation": false, + "NavigationCurrentEntryChangeEvent": false, + "NavigationDestination": false, + "NavigationHistoryEntry": false, + "NavigationPrecommitController": false, + "NavigationPreloadManager": false, + "NavigationTransition": false, + "navigator": false, + "Navigator": false, + "NavigatorLogin": false, + "NavigatorManagedData": false, + "NavigatorUAData": false, + "NetworkInformation": false, + "Node": false, + "NodeFilter": false, + "NodeIterator": false, + "NodeList": false, + "Notification": false, + "NotifyPaintEvent": false, + "NotRestoredReasonDetails": false, + "NotRestoredReasons": false, + "Observable": false, + "OfflineAudioCompletionEvent": false, + "OfflineAudioContext": false, + "offscreenBuffering": false, + "OffscreenCanvas": false, + "OffscreenCanvasRenderingContext2D": false, + "onabort": true, + "onafterprint": true, + "onanimationcancel": true, + "onanimationend": true, + "onanimationiteration": true, + "onanimationstart": true, + "onappinstalled": true, + "onauxclick": true, + "onbeforeinput": true, + "onbeforeinstallprompt": true, + "onbeforematch": true, + "onbeforeprint": true, + "onbeforetoggle": true, + "onbeforeunload": true, + "onbeforexrselect": true, + "onblur": true, + "oncancel": true, + "oncanplay": true, + "oncanplaythrough": true, + "onchange": true, + "onclick": true, + "onclose": true, + "oncommand": true, + "oncontentvisibilityautostatechange": true, + "oncontextlost": true, + "oncontextmenu": true, + "oncontextrestored": true, + "oncopy": true, + "oncuechange": true, + "oncut": true, + "ondblclick": true, + "ondevicemotion": true, + "ondeviceorientation": true, + "ondeviceorientationabsolute": true, + "ondrag": true, + "ondragend": true, + "ondragenter": true, + "ondragleave": true, + "ondragover": true, + "ondragstart": true, + "ondrop": true, + "ondurationchange": true, + "onemptied": true, + "onended": true, + "onerror": true, + "onfocus": true, + "onformdata": true, + "ongamepadconnected": true, + "ongamepaddisconnected": true, + "ongotpointercapture": true, + "onhashchange": true, + "oninput": true, + "oninvalid": true, + "onkeydown": true, + "onkeypress": true, + "onkeyup": true, + "onlanguagechange": true, + "onload": true, + "onloadeddata": true, + "onloadedmetadata": true, + "onloadstart": true, + "onlostpointercapture": true, + "onmessage": true, + "onmessageerror": true, + "onmousedown": true, + "onmouseenter": true, + "onmouseleave": true, + "onmousemove": true, + "onmouseout": true, + "onmouseover": true, + "onmouseup": true, + "onmousewheel": true, + "onoffline": true, + "ononline": true, + "onpagehide": true, + "onpagereveal": true, + "onpageshow": true, + "onpageswap": true, + "onpaste": true, + "onpause": true, + "onplay": true, + "onplaying": true, + "onpointercancel": true, + "onpointerdown": true, + "onpointerenter": true, + "onpointerleave": true, + "onpointermove": true, + "onpointerout": true, + "onpointerover": true, + "onpointerrawupdate": true, + "onpointerup": true, + "onpopstate": true, + "onprogress": true, + "onratechange": true, + "onrejectionhandled": true, + "onreset": true, + "onresize": true, + "onscroll": true, + "onscrollend": true, + "onscrollsnapchange": true, + "onscrollsnapchanging": true, + "onsearch": true, + "onsecuritypolicyviolation": true, + "onseeked": true, + "onseeking": true, + "onselect": true, + "onselectionchange": true, + "onselectstart": true, + "onslotchange": true, + "onstalled": true, + "onstorage": true, + "onsubmit": true, + "onsuspend": true, + "ontimeupdate": true, + "ontoggle": true, + "ontransitioncancel": true, + "ontransitionend": true, + "ontransitionrun": true, + "ontransitionstart": true, + "onunhandledrejection": true, + "onunload": true, + "onvolumechange": true, + "onwaiting": true, + "onwheel": true, + "open": false, + "opener": false, + "Option": false, + "OrientationSensor": false, + "origin": false, + "originAgentCluster": false, + "OscillatorNode": false, + "OTPCredential": false, + "outerHeight": false, + "outerWidth": false, + "OverconstrainedError": false, + "PageRevealEvent": false, + "PageSwapEvent": false, + "PageTransitionEvent": false, + "pageXOffset": false, + "pageYOffset": false, + "PannerNode": false, + "parent": false, + "PasswordCredential": false, + "Path2D": false, + "PaymentAddress": false, + "PaymentManager": false, + "PaymentMethodChangeEvent": false, + "PaymentRequest": false, + "PaymentRequestUpdateEvent": false, + "PaymentResponse": false, + "performance": false, + "Performance": false, + "PerformanceElementTiming": false, + "PerformanceEntry": false, + "PerformanceEventTiming": false, + "PerformanceLongAnimationFrameTiming": false, + "PerformanceLongTaskTiming": false, + "PerformanceMark": false, + "PerformanceMeasure": false, + "PerformanceNavigation": false, + "PerformanceNavigationTiming": false, + "PerformanceObserver": false, + "PerformanceObserverEntryList": false, + "PerformancePaintTiming": false, + "PerformanceResourceTiming": false, + "PerformanceScriptTiming": false, + "PerformanceServerTiming": false, + "PerformanceTiming": false, + "PeriodicSyncManager": false, + "PeriodicWave": false, + "Permissions": false, + "PermissionStatus": false, + "PERSISTENT": false, + "personalbar": false, + "PictureInPictureEvent": false, + "PictureInPictureWindow": false, + "Plugin": false, + "PluginArray": false, + "PointerEvent": false, + "PopStateEvent": false, + "postMessage": false, + "Presentation": false, + "PresentationAvailability": false, + "PresentationConnection": false, + "PresentationConnectionAvailableEvent": false, + "PresentationConnectionCloseEvent": false, + "PresentationConnectionList": false, + "PresentationReceiver": false, + "PresentationRequest": false, + "PressureObserver": false, + "PressureRecord": false, + "print": false, + "ProcessingInstruction": false, + "Profiler": false, + "ProgressEvent": false, + "PromiseRejectionEvent": false, + "prompt": false, + "ProtectedAudience": false, + "PublicKeyCredential": false, + "PushManager": false, + "PushSubscription": false, + "PushSubscriptionOptions": false, + "queryLocalFonts": false, + "queueMicrotask": false, + "QuotaExceededError": false, + "RadioNodeList": false, + "Range": false, + "ReadableByteStreamController": false, + "ReadableStream": false, + "ReadableStreamBYOBReader": false, + "ReadableStreamBYOBRequest": false, + "ReadableStreamDefaultController": false, + "ReadableStreamDefaultReader": false, + "registerProcessor": false, + "RelativeOrientationSensor": false, + "RemotePlayback": false, + "removeEventListener": false, + "ReportBody": false, + "reportError": false, + "ReportingObserver": false, + "Request": false, + "requestAnimationFrame": false, + "requestIdleCallback": false, + "resizeBy": false, + "ResizeObserver": false, + "ResizeObserverEntry": false, + "ResizeObserverSize": false, + "resizeTo": false, + "Response": false, + "RestrictionTarget": false, + "RTCCertificate": false, + "RTCDataChannel": false, + "RTCDataChannelEvent": false, + "RTCDtlsTransport": false, + "RTCDTMFSender": false, + "RTCDTMFToneChangeEvent": false, + "RTCEncodedAudioFrame": false, + "RTCEncodedVideoFrame": false, + "RTCError": false, + "RTCErrorEvent": false, + "RTCIceCandidate": false, + "RTCIceTransport": false, + "RTCPeerConnection": false, + "RTCPeerConnectionIceErrorEvent": false, + "RTCPeerConnectionIceEvent": false, + "RTCRtpReceiver": false, + "RTCRtpScriptTransform": false, + "RTCRtpSender": false, + "RTCRtpTransceiver": false, + "RTCSctpTransport": false, + "RTCSessionDescription": false, + "RTCStatsReport": false, + "RTCTrackEvent": false, + "sampleRate": false, + "scheduler": false, + "Scheduler": false, + "Scheduling": false, + "screen": false, + "Screen": false, + "ScreenDetailed": false, + "ScreenDetails": false, + "screenLeft": false, + "ScreenOrientation": false, + "screenTop": false, + "screenX": false, + "screenY": false, + "ScriptProcessorNode": false, + "scroll": false, + "scrollbars": false, + "scrollBy": false, + "ScrollTimeline": false, + "scrollTo": false, + "scrollX": false, + "scrollY": false, + "SecurityPolicyViolationEvent": false, + "Selection": false, + "self": false, + "Sensor": false, + "SensorErrorEvent": false, + "Serial": false, + "SerialPort": false, + "ServiceWorker": false, + "ServiceWorkerContainer": false, + "ServiceWorkerRegistration": false, + "sessionStorage": false, + "setInterval": false, + "setTimeout": false, + "ShadowRoot": false, + "sharedStorage": false, + "SharedStorage": false, + "SharedStorageAppendMethod": false, + "SharedStorageClearMethod": false, + "SharedStorageDeleteMethod": false, + "SharedStorageModifierMethod": false, + "SharedStorageSetMethod": false, + "SharedStorageWorklet": false, + "SharedWorker": false, + "showDirectoryPicker": false, + "showOpenFilePicker": false, + "showSaveFilePicker": false, + "SnapEvent": false, + "SourceBuffer": false, + "SourceBufferList": false, + "SpeechGrammar": false, + "SpeechGrammarList": false, + "SpeechRecognition": false, + "SpeechRecognitionErrorEvent": false, + "SpeechRecognitionEvent": false, + "SpeechRecognitionPhrase": false, + "speechSynthesis": false, + "SpeechSynthesis": false, + "SpeechSynthesisErrorEvent": false, + "SpeechSynthesisEvent": false, + "SpeechSynthesisUtterance": false, + "SpeechSynthesisVoice": false, + "StaticRange": false, + "status": false, + "statusbar": false, + "StereoPannerNode": false, + "stop": false, + "Storage": false, + "StorageBucket": false, + "StorageBucketManager": false, + "StorageEvent": false, + "StorageManager": false, + "structuredClone": false, + "styleMedia": false, + "StylePropertyMap": false, + "StylePropertyMapReadOnly": false, + "StyleSheet": false, + "StyleSheetList": false, + "SubmitEvent": false, + "Subscriber": false, + "SubtleCrypto": false, + "Summarizer": false, + "SuppressedError": false, + "SVGAElement": false, + "SVGAngle": false, + "SVGAnimatedAngle": false, + "SVGAnimatedBoolean": false, + "SVGAnimatedEnumeration": false, + "SVGAnimatedInteger": false, + "SVGAnimatedLength": false, + "SVGAnimatedLengthList": false, + "SVGAnimatedNumber": false, + "SVGAnimatedNumberList": false, + "SVGAnimatedPreserveAspectRatio": false, + "SVGAnimatedRect": false, + "SVGAnimatedString": false, + "SVGAnimatedTransformList": false, + "SVGAnimateElement": false, + "SVGAnimateMotionElement": false, + "SVGAnimateTransformElement": false, + "SVGAnimationElement": false, + "SVGCircleElement": false, + "SVGClipPathElement": false, + "SVGComponentTransferFunctionElement": false, + "SVGDefsElement": false, + "SVGDescElement": false, + "SVGElement": false, + "SVGEllipseElement": false, + "SVGFEBlendElement": false, + "SVGFEColorMatrixElement": false, + "SVGFEComponentTransferElement": false, + "SVGFECompositeElement": false, + "SVGFEConvolveMatrixElement": false, + "SVGFEDiffuseLightingElement": false, + "SVGFEDisplacementMapElement": false, + "SVGFEDistantLightElement": false, + "SVGFEDropShadowElement": false, + "SVGFEFloodElement": false, + "SVGFEFuncAElement": false, + "SVGFEFuncBElement": false, + "SVGFEFuncGElement": false, + "SVGFEFuncRElement": false, + "SVGFEGaussianBlurElement": false, + "SVGFEImageElement": false, + "SVGFEMergeElement": false, + "SVGFEMergeNodeElement": false, + "SVGFEMorphologyElement": false, + "SVGFEOffsetElement": false, + "SVGFEPointLightElement": false, + "SVGFESpecularLightingElement": false, + "SVGFESpotLightElement": false, + "SVGFETileElement": false, + "SVGFETurbulenceElement": false, + "SVGFilterElement": false, + "SVGForeignObjectElement": false, + "SVGGElement": false, + "SVGGeometryElement": false, + "SVGGradientElement": false, + "SVGGraphicsElement": false, + "SVGImageElement": false, + "SVGLength": false, + "SVGLengthList": false, + "SVGLinearGradientElement": false, + "SVGLineElement": false, + "SVGMarkerElement": false, + "SVGMaskElement": false, + "SVGMatrix": false, + "SVGMetadataElement": false, + "SVGMPathElement": false, + "SVGNumber": false, + "SVGNumberList": false, + "SVGPathElement": false, + "SVGPatternElement": false, + "SVGPoint": false, + "SVGPointList": false, + "SVGPolygonElement": false, + "SVGPolylineElement": false, + "SVGPreserveAspectRatio": false, + "SVGRadialGradientElement": false, + "SVGRect": false, + "SVGRectElement": false, + "SVGScriptElement": false, + "SVGSetElement": false, + "SVGStopElement": false, + "SVGStringList": false, + "SVGStyleElement": false, + "SVGSVGElement": false, + "SVGSwitchElement": false, + "SVGSymbolElement": false, + "SVGTextContentElement": false, + "SVGTextElement": false, + "SVGTextPathElement": false, + "SVGTextPositioningElement": false, + "SVGTitleElement": false, + "SVGTransform": false, + "SVGTransformList": false, + "SVGTSpanElement": false, + "SVGUnitTypes": false, + "SVGUseElement": false, + "SVGViewElement": false, + "SyncManager": false, + "TaskAttributionTiming": false, + "TaskController": false, + "TaskPriorityChangeEvent": false, + "TaskSignal": false, + "TEMPORARY": false, + "Text": false, + "TextDecoder": false, + "TextDecoderStream": false, + "TextEncoder": false, + "TextEncoderStream": false, + "TextEvent": false, + "TextFormat": false, + "TextFormatUpdateEvent": false, + "TextMetrics": false, + "TextTrack": false, + "TextTrackCue": false, + "TextTrackCueList": false, + "TextTrackList": false, + "TextUpdateEvent": false, + "TimeEvent": false, + "TimeRanges": false, + "ToggleEvent": false, + "toolbar": false, + "top": false, + "Touch": false, + "TouchEvent": false, + "TouchList": false, + "TrackEvent": false, + "TransformStream": false, + "TransformStreamDefaultController": false, + "TransitionEvent": false, + "Translator": false, + "TreeWalker": false, + "TrustedHTML": false, + "TrustedScript": false, + "TrustedScriptURL": false, + "TrustedTypePolicy": false, + "TrustedTypePolicyFactory": false, + "trustedTypes": false, + "UIEvent": false, + "URL": false, + "URLPattern": false, + "URLSearchParams": false, + "USB": false, + "USBAlternateInterface": false, + "USBConfiguration": false, + "USBConnectionEvent": false, + "USBDevice": false, + "USBEndpoint": false, + "USBInterface": false, + "USBInTransferResult": false, + "USBIsochronousInTransferPacket": false, + "USBIsochronousInTransferResult": false, + "USBIsochronousOutTransferPacket": false, + "USBIsochronousOutTransferResult": false, + "USBOutTransferResult": false, + "UserActivation": false, + "ValidityState": false, + "VideoColorSpace": false, + "VideoDecoder": false, + "VideoEncoder": false, + "VideoFrame": false, + "VideoPlaybackQuality": false, + "viewport": false, + "Viewport": false, + "ViewTimeline": false, + "ViewTransition": false, + "ViewTransitionTypeSet": false, + "VirtualKeyboard": false, + "VirtualKeyboardGeometryChangeEvent": false, + "VisibilityStateEntry": false, + "visualViewport": false, + "VisualViewport": false, + "VTTCue": false, + "VTTRegion": false, + "WakeLock": false, + "WakeLockSentinel": false, + "WaveShaperNode": false, + "WebAssembly": false, + "WebGL2RenderingContext": false, + "WebGLActiveInfo": false, + "WebGLBuffer": false, + "WebGLContextEvent": false, + "WebGLFramebuffer": false, + "WebGLObject": false, + "WebGLProgram": false, + "WebGLQuery": false, + "WebGLRenderbuffer": false, + "WebGLRenderingContext": false, + "WebGLSampler": false, + "WebGLShader": false, + "WebGLShaderPrecisionFormat": false, + "WebGLSync": false, + "WebGLTexture": false, + "WebGLTransformFeedback": false, + "WebGLUniformLocation": false, + "WebGLVertexArrayObject": false, + "WebSocket": false, + "WebSocketError": false, + "WebSocketStream": false, + "WebTransport": false, + "WebTransportBidirectionalStream": false, + "WebTransportDatagramDuplexStream": false, + "WebTransportError": false, + "WebTransportReceiveStream": false, + "WebTransportSendStream": false, + "WGSLLanguageFeatures": false, + "WheelEvent": false, + "when": false, + "window": false, + "Window": false, + "WindowControlsOverlay": false, + "WindowControlsOverlayGeometryChangeEvent": false, + "Worker": false, + "Worklet": false, + "WorkletGlobalScope": false, + "WritableStream": false, + "WritableStreamDefaultController": false, + "WritableStreamDefaultWriter": false, + "XMLDocument": false, + "XMLHttpRequest": false, + "XMLHttpRequestEventTarget": false, + "XMLHttpRequestUpload": false, + "XMLSerializer": false, + "XPathEvaluator": false, + "XPathExpression": false, + "XPathResult": false, + "XRAnchor": false, + "XRAnchorSet": false, + "XRBoundedReferenceSpace": false, + "XRCamera": false, + "XRCPUDepthInformation": false, + "XRDepthInformation": false, + "XRDOMOverlayState": false, + "XRFrame": false, + "XRHand": false, + "XRHitTestResult": false, + "XRHitTestSource": false, + "XRInputSource": false, + "XRInputSourceArray": false, + "XRInputSourceEvent": false, + "XRInputSourcesChangeEvent": false, + "XRJointPose": false, + "XRJointSpace": false, + "XRLayer": false, + "XRLightEstimate": false, + "XRLightProbe": false, + "XRPose": false, + "XRRay": false, + "XRReferenceSpace": false, + "XRReferenceSpaceEvent": false, + "XRRenderState": false, + "XRRigidTransform": false, + "XRSession": false, + "XRSessionEvent": false, + "XRSpace": false, + "XRSystem": false, + "XRTransientInputHitTestResult": false, + "XRTransientInputHitTestSource": false, + "XRView": false, + "XRViewerPose": false, + "XRViewport": false, + "XRWebGLBinding": false, + "XRWebGLDepthInformation": false, + "XRWebGLLayer": false, + "XSLTProcessor": false + } + }, + "errors": [ + { + "messageId": "defaultMessage", + "data": { + "name": "event" + }, + "line": 1, + "column": 66, + "endLine": 1, + "endColumn": 71 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-restricted-globals > invalid + +```js +function onClick(event) { console.log(event); console.log(self.event); } +``` + +```json +{ + "options": [ + { + "globals": [ + "event" + ], + "checkGlobalObject": true + } + ], + "languageOptions": { + "globals": { + "AbortController": false, + "AbortSignal": false, + "AbsoluteOrientationSensor": false, + "AbstractRange": false, + "Accelerometer": false, + "addEventListener": false, + "ai": false, + "AI": false, + "AICreateMonitor": false, + "AITextSession": false, + "alert": false, + "AnalyserNode": false, + "Animation": false, + "AnimationEffect": false, + "AnimationEvent": false, + "AnimationPlaybackEvent": false, + "AnimationTimeline": false, + "AsyncDisposableStack": false, + "atob": false, + "Attr": false, + "Audio": false, + "AudioBuffer": false, + "AudioBufferSourceNode": false, + "AudioContext": false, + "AudioData": false, + "AudioDecoder": false, + "AudioDestinationNode": false, + "AudioEncoder": false, + "AudioListener": false, + "AudioNode": false, + "AudioParam": false, + "AudioParamMap": false, + "AudioProcessingEvent": false, + "AudioScheduledSourceNode": false, + "AudioSinkInfo": false, + "AudioWorklet": false, + "AudioWorkletGlobalScope": false, + "AudioWorkletNode": false, + "AudioWorkletProcessor": false, + "AuthenticatorAssertionResponse": false, + "AuthenticatorAttestationResponse": false, + "AuthenticatorResponse": false, + "BackgroundFetchManager": false, + "BackgroundFetchRecord": false, + "BackgroundFetchRegistration": false, + "BarcodeDetector": false, + "BarProp": false, + "BaseAudioContext": false, + "BatteryManager": false, + "BeforeUnloadEvent": false, + "BiquadFilterNode": false, + "Blob": false, + "BlobEvent": false, + "Bluetooth": false, + "BluetoothCharacteristicProperties": false, + "BluetoothDevice": false, + "BluetoothRemoteGATTCharacteristic": false, + "BluetoothRemoteGATTDescriptor": false, + "BluetoothRemoteGATTServer": false, + "BluetoothRemoteGATTService": false, + "BluetoothUUID": false, + "blur": false, + "BroadcastChannel": false, + "BrowserCaptureMediaStreamTrack": false, + "btoa": false, + "ByteLengthQueuingStrategy": false, + "Cache": false, + "caches": false, + "CacheStorage": false, + "cancelAnimationFrame": false, + "cancelIdleCallback": false, + "CanvasCaptureMediaStream": false, + "CanvasCaptureMediaStreamTrack": false, + "CanvasGradient": false, + "CanvasPattern": false, + "CanvasRenderingContext2D": false, + "CaptureController": false, + "CaretPosition": false, + "CDATASection": false, + "ChannelMergerNode": false, + "ChannelSplitterNode": false, + "ChapterInformation": false, + "CharacterBoundsUpdateEvent": false, + "CharacterData": false, + "clearInterval": false, + "clearTimeout": false, + "clientInformation": false, + "Clipboard": false, + "ClipboardChangeEvent": false, + "ClipboardEvent": false, + "ClipboardItem": false, + "close": false, + "closed": false, + "CloseEvent": false, + "CloseWatcher": false, + "CommandEvent": false, + "Comment": false, + "CompositionEvent": false, + "CompressionStream": false, + "confirm": false, + "console": false, + "ConstantSourceNode": false, + "ContentVisibilityAutoStateChangeEvent": false, + "ConvolverNode": false, + "CookieChangeEvent": false, + "CookieDeprecationLabel": false, + "cookieStore": false, + "CookieStore": false, + "CookieStoreManager": false, + "CountQueuingStrategy": false, + "createImageBitmap": false, + "CreateMonitor": false, + "Credential": false, + "credentialless": false, + "CredentialsContainer": false, + "CropTarget": false, + "crossOriginIsolated": false, + "crypto": false, + "Crypto": false, + "CryptoKey": false, + "CSPViolationReportBody": false, + "CSS": false, + "CSSAnimation": false, + "CSSConditionRule": false, + "CSSContainerRule": false, + "CSSCounterStyleRule": false, + "CSSFontFaceRule": false, + "CSSFontFeatureValuesRule": false, + "CSSFontPaletteValuesRule": false, + "CSSFunctionDeclarations": false, + "CSSFunctionDescriptors": false, + "CSSFunctionRule": false, + "CSSGroupingRule": false, + "CSSImageValue": false, + "CSSImportRule": false, + "CSSKeyframeRule": false, + "CSSKeyframesRule": false, + "CSSKeywordValue": false, + "CSSLayerBlockRule": false, + "CSSLayerStatementRule": false, + "CSSMarginRule": false, + "CSSMathClamp": false, + "CSSMathInvert": false, + "CSSMathMax": false, + "CSSMathMin": false, + "CSSMathNegate": false, + "CSSMathProduct": false, + "CSSMathSum": false, + "CSSMathValue": false, + "CSSMatrixComponent": false, + "CSSMediaRule": false, + "CSSNamespaceRule": false, + "CSSNestedDeclarations": false, + "CSSNumericArray": false, + "CSSNumericValue": false, + "CSSPageDescriptors": false, + "CSSPageRule": false, + "CSSPerspective": false, + "CSSPositionTryDescriptors": false, + "CSSPositionTryRule": false, + "CSSPositionValue": false, + "CSSPropertyRule": false, + "CSSRotate": false, + "CSSRule": false, + "CSSRuleList": false, + "CSSScale": false, + "CSSScopeRule": false, + "CSSSkew": false, + "CSSSkewX": false, + "CSSSkewY": false, + "CSSStartingStyleRule": false, + "CSSStyleDeclaration": false, + "CSSStyleRule": false, + "CSSStyleSheet": false, + "CSSStyleValue": false, + "CSSSupportsRule": false, + "CSSTransformComponent": false, + "CSSTransformValue": false, + "CSSTransition": false, + "CSSTranslate": false, + "CSSUnitValue": false, + "CSSUnparsedValue": false, + "CSSVariableReferenceValue": false, + "CSSViewTransitionRule": false, + "currentFrame": false, + "currentTime": false, + "CustomElementRegistry": false, + "customElements": false, + "CustomEvent": false, + "CustomStateSet": false, + "DataTransfer": false, + "DataTransferItem": false, + "DataTransferItemList": false, + "DecompressionStream": false, + "DelayNode": false, + "DelegatedInkTrailPresenter": false, + "DeviceMotionEvent": false, + "DeviceMotionEventAcceleration": false, + "DeviceMotionEventRotationRate": false, + "DeviceOrientationEvent": false, + "devicePixelRatio": false, + "DevicePosture": false, + "DigitalCredential": false, + "dispatchEvent": false, + "DisposableStack": false, + "document": false, + "Document": false, + "DocumentFragment": false, + "documentPictureInPicture": false, + "DocumentPictureInPicture": false, + "DocumentPictureInPictureEvent": false, + "DocumentTimeline": false, + "DocumentType": false, + "DOMError": false, + "DOMException": false, + "DOMImplementation": false, + "DOMMatrix": false, + "DOMMatrixReadOnly": false, + "DOMParser": false, + "DOMPoint": false, + "DOMPointReadOnly": false, + "DOMQuad": false, + "DOMRect": false, + "DOMRectList": false, + "DOMRectReadOnly": false, + "DOMStringList": false, + "DOMStringMap": false, + "DOMTokenList": false, + "DragEvent": false, + "DynamicsCompressorNode": false, + "EditContext": false, + "Element": false, + "ElementInternals": false, + "EncodedAudioChunk": false, + "EncodedVideoChunk": false, + "ErrorEvent": false, + "event": false, + "Event": false, + "EventCounts": false, + "EventSource": false, + "EventTarget": false, + "external": false, + "External": false, + "EyeDropper": false, + "FeaturePolicy": false, + "FederatedCredential": false, + "fence": false, + "Fence": false, + "FencedFrameConfig": false, + "fetch": false, + "fetchLater": false, + "FetchLaterResult": false, + "File": false, + "FileList": false, + "FileReader": false, + "FileSystem": false, + "FileSystemDirectoryEntry": false, + "FileSystemDirectoryHandle": false, + "FileSystemDirectoryReader": false, + "FileSystemEntry": false, + "FileSystemFileEntry": false, + "FileSystemFileHandle": false, + "FileSystemHandle": false, + "FileSystemObserver": false, + "FileSystemWritableFileStream": false, + "find": false, + "focus": false, + "FocusEvent": false, + "FontData": false, + "FontFace": false, + "FontFaceSet": false, + "FontFaceSetLoadEvent": false, + "FormData": false, + "FormDataEvent": false, + "FragmentDirective": false, + "frameElement": false, + "frames": false, + "GainNode": false, + "Gamepad": false, + "GamepadAxisMoveEvent": false, + "GamepadButton": false, + "GamepadButtonEvent": false, + "GamepadEvent": false, + "GamepadHapticActuator": false, + "GamepadPose": false, + "Geolocation": false, + "GeolocationCoordinates": false, + "GeolocationPosition": false, + "GeolocationPositionError": false, + "getComputedStyle": false, + "getScreenDetails": false, + "getSelection": false, + "GPU": false, + "GPUAdapter": false, + "GPUAdapterInfo": false, + "GPUBindGroup": false, + "GPUBindGroupLayout": false, + "GPUBuffer": false, + "GPUBufferUsage": false, + "GPUCanvasContext": false, + "GPUColorWrite": false, + "GPUCommandBuffer": false, + "GPUCommandEncoder": false, + "GPUCompilationInfo": false, + "GPUCompilationMessage": false, + "GPUComputePassEncoder": false, + "GPUComputePipeline": false, + "GPUDevice": false, + "GPUDeviceLostInfo": false, + "GPUError": false, + "GPUExternalTexture": false, + "GPUInternalError": false, + "GPUMapMode": false, + "GPUOutOfMemoryError": false, + "GPUPipelineError": false, + "GPUPipelineLayout": false, + "GPUQuerySet": false, + "GPUQueue": false, + "GPURenderBundle": false, + "GPURenderBundleEncoder": false, + "GPURenderPassEncoder": false, + "GPURenderPipeline": false, + "GPUSampler": false, + "GPUShaderModule": false, + "GPUShaderStage": false, + "GPUSupportedFeatures": false, + "GPUSupportedLimits": false, + "GPUTexture": false, + "GPUTextureUsage": false, + "GPUTextureView": false, + "GPUUncapturedErrorEvent": false, + "GPUValidationError": false, + "GravitySensor": false, + "Gyroscope": false, + "HashChangeEvent": false, + "Headers": false, + "HID": false, + "HIDConnectionEvent": false, + "HIDDevice": false, + "HIDInputReportEvent": false, + "Highlight": false, + "HighlightRegistry": false, + "history": false, + "History": false, + "HTMLAllCollection": false, + "HTMLAnchorElement": false, + "HTMLAreaElement": false, + "HTMLAudioElement": false, + "HTMLBaseElement": false, + "HTMLBodyElement": false, + "HTMLBRElement": false, + "HTMLButtonElement": false, + "HTMLCanvasElement": false, + "HTMLCollection": false, + "HTMLDataElement": false, + "HTMLDataListElement": false, + "HTMLDetailsElement": false, + "HTMLDialogElement": false, + "HTMLDirectoryElement": false, + "HTMLDivElement": false, + "HTMLDListElement": false, + "HTMLDocument": false, + "HTMLElement": false, + "HTMLEmbedElement": false, + "HTMLFencedFrameElement": false, + "HTMLFieldSetElement": false, + "HTMLFontElement": false, + "HTMLFormControlsCollection": false, + "HTMLFormElement": false, + "HTMLFrameElement": false, + "HTMLFrameSetElement": false, + "HTMLHeadElement": false, + "HTMLHeadingElement": false, + "HTMLHRElement": false, + "HTMLHtmlElement": false, + "HTMLIFrameElement": false, + "HTMLImageElement": false, + "HTMLInputElement": false, + "HTMLLabelElement": false, + "HTMLLegendElement": false, + "HTMLLIElement": false, + "HTMLLinkElement": false, + "HTMLMapElement": false, + "HTMLMarqueeElement": false, + "HTMLMediaElement": false, + "HTMLMenuElement": false, + "HTMLMetaElement": false, + "HTMLMeterElement": false, + "HTMLModElement": false, + "HTMLObjectElement": false, + "HTMLOListElement": false, + "HTMLOptGroupElement": false, + "HTMLOptionElement": false, + "HTMLOptionsCollection": false, + "HTMLOutputElement": false, + "HTMLParagraphElement": false, + "HTMLParamElement": false, + "HTMLPictureElement": false, + "HTMLPreElement": false, + "HTMLProgressElement": false, + "HTMLQuoteElement": false, + "HTMLScriptElement": false, + "HTMLSelectedContentElement": false, + "HTMLSelectElement": false, + "HTMLSlotElement": false, + "HTMLSourceElement": false, + "HTMLSpanElement": false, + "HTMLStyleElement": false, + "HTMLTableCaptionElement": false, + "HTMLTableCellElement": false, + "HTMLTableColElement": false, + "HTMLTableElement": false, + "HTMLTableRowElement": false, + "HTMLTableSectionElement": false, + "HTMLTemplateElement": false, + "HTMLTextAreaElement": false, + "HTMLTimeElement": false, + "HTMLTitleElement": false, + "HTMLTrackElement": false, + "HTMLUListElement": false, + "HTMLUnknownElement": false, + "HTMLVideoElement": false, + "IDBCursor": false, + "IDBCursorWithValue": false, + "IDBDatabase": false, + "IDBFactory": false, + "IDBIndex": false, + "IDBKeyRange": false, + "IDBObjectStore": false, + "IDBOpenDBRequest": false, + "IDBRecord": false, + "IDBRequest": false, + "IDBTransaction": false, + "IDBVersionChangeEvent": false, + "IdentityCredential": false, + "IdentityCredentialError": false, + "IdentityProvider": false, + "IdleDeadline": false, + "IdleDetector": false, + "IIRFilterNode": false, + "Image": false, + "ImageBitmap": false, + "ImageBitmapRenderingContext": false, + "ImageCapture": false, + "ImageData": false, + "ImageDecoder": false, + "ImageTrack": false, + "ImageTrackList": false, + "indexedDB": false, + "Ink": false, + "innerHeight": false, + "innerWidth": false, + "InputDeviceCapabilities": false, + "InputDeviceInfo": false, + "InputEvent": false, + "IntegrityViolationReportBody": false, + "InterestEvent": false, + "IntersectionObserver": false, + "IntersectionObserverEntry": false, + "isSecureContext": false, + "Keyboard": false, + "KeyboardEvent": false, + "KeyboardLayoutMap": false, + "KeyframeEffect": false, + "LanguageDetector": false, + "LargestContentfulPaint": false, + "LaunchParams": false, + "launchQueue": false, + "LaunchQueue": false, + "LayoutShift": false, + "LayoutShiftAttribution": false, + "length": false, + "LinearAccelerationSensor": false, + "localStorage": false, + "location": true, + "Location": false, + "locationbar": false, + "Lock": false, + "LockManager": false, + "matchMedia": false, + "MathMLElement": false, + "MediaCapabilities": false, + "MediaCapabilitiesInfo": false, + "MediaDeviceInfo": false, + "MediaDevices": false, + "MediaElementAudioSourceNode": false, + "MediaEncryptedEvent": false, + "MediaError": false, + "MediaKeyError": false, + "MediaKeyMessageEvent": false, + "MediaKeys": false, + "MediaKeySession": false, + "MediaKeyStatusMap": false, + "MediaKeySystemAccess": false, + "MediaList": false, + "MediaMetadata": false, + "MediaQueryList": false, + "MediaQueryListEvent": false, + "MediaRecorder": false, + "MediaRecorderErrorEvent": false, + "MediaSession": false, + "MediaSource": false, + "MediaSourceHandle": false, + "MediaStream": false, + "MediaStreamAudioDestinationNode": false, + "MediaStreamAudioSourceNode": false, + "MediaStreamEvent": false, + "MediaStreamTrack": false, + "MediaStreamTrackAudioSourceNode": false, + "MediaStreamTrackAudioStats": false, + "MediaStreamTrackEvent": false, + "MediaStreamTrackGenerator": false, + "MediaStreamTrackProcessor": false, + "MediaStreamTrackVideoStats": false, + "menubar": false, + "MessageChannel": false, + "MessageEvent": false, + "MessagePort": false, + "MIDIAccess": false, + "MIDIConnectionEvent": false, + "MIDIInput": false, + "MIDIInputMap": false, + "MIDIMessageEvent": false, + "MIDIOutput": false, + "MIDIOutputMap": false, + "MIDIPort": false, + "MimeType": false, + "MimeTypeArray": false, + "model": false, + "ModelGenericSession": false, + "ModelManager": false, + "MouseEvent": false, + "moveBy": false, + "moveTo": false, + "MutationEvent": false, + "MutationObserver": false, + "MutationRecord": false, + "name": false, + "NamedNodeMap": false, + "NavigateEvent": false, + "navigation": false, + "Navigation": false, + "NavigationActivation": false, + "NavigationCurrentEntryChangeEvent": false, + "NavigationDestination": false, + "NavigationHistoryEntry": false, + "NavigationPrecommitController": false, + "NavigationPreloadManager": false, + "NavigationTransition": false, + "navigator": false, + "Navigator": false, + "NavigatorLogin": false, + "NavigatorManagedData": false, + "NavigatorUAData": false, + "NetworkInformation": false, + "Node": false, + "NodeFilter": false, + "NodeIterator": false, + "NodeList": false, + "Notification": false, + "NotifyPaintEvent": false, + "NotRestoredReasonDetails": false, + "NotRestoredReasons": false, + "Observable": false, + "OfflineAudioCompletionEvent": false, + "OfflineAudioContext": false, + "offscreenBuffering": false, + "OffscreenCanvas": false, + "OffscreenCanvasRenderingContext2D": false, + "onabort": true, + "onafterprint": true, + "onanimationcancel": true, + "onanimationend": true, + "onanimationiteration": true, + "onanimationstart": true, + "onappinstalled": true, + "onauxclick": true, + "onbeforeinput": true, + "onbeforeinstallprompt": true, + "onbeforematch": true, + "onbeforeprint": true, + "onbeforetoggle": true, + "onbeforeunload": true, + "onbeforexrselect": true, + "onblur": true, + "oncancel": true, + "oncanplay": true, + "oncanplaythrough": true, + "onchange": true, + "onclick": true, + "onclose": true, + "oncommand": true, + "oncontentvisibilityautostatechange": true, + "oncontextlost": true, + "oncontextmenu": true, + "oncontextrestored": true, + "oncopy": true, + "oncuechange": true, + "oncut": true, + "ondblclick": true, + "ondevicemotion": true, + "ondeviceorientation": true, + "ondeviceorientationabsolute": true, + "ondrag": true, + "ondragend": true, + "ondragenter": true, + "ondragleave": true, + "ondragover": true, + "ondragstart": true, + "ondrop": true, + "ondurationchange": true, + "onemptied": true, + "onended": true, + "onerror": true, + "onfocus": true, + "onformdata": true, + "ongamepadconnected": true, + "ongamepaddisconnected": true, + "ongotpointercapture": true, + "onhashchange": true, + "oninput": true, + "oninvalid": true, + "onkeydown": true, + "onkeypress": true, + "onkeyup": true, + "onlanguagechange": true, + "onload": true, + "onloadeddata": true, + "onloadedmetadata": true, + "onloadstart": true, + "onlostpointercapture": true, + "onmessage": true, + "onmessageerror": true, + "onmousedown": true, + "onmouseenter": true, + "onmouseleave": true, + "onmousemove": true, + "onmouseout": true, + "onmouseover": true, + "onmouseup": true, + "onmousewheel": true, + "onoffline": true, + "ononline": true, + "onpagehide": true, + "onpagereveal": true, + "onpageshow": true, + "onpageswap": true, + "onpaste": true, + "onpause": true, + "onplay": true, + "onplaying": true, + "onpointercancel": true, + "onpointerdown": true, + "onpointerenter": true, + "onpointerleave": true, + "onpointermove": true, + "onpointerout": true, + "onpointerover": true, + "onpointerrawupdate": true, + "onpointerup": true, + "onpopstate": true, + "onprogress": true, + "onratechange": true, + "onrejectionhandled": true, + "onreset": true, + "onresize": true, + "onscroll": true, + "onscrollend": true, + "onscrollsnapchange": true, + "onscrollsnapchanging": true, + "onsearch": true, + "onsecuritypolicyviolation": true, + "onseeked": true, + "onseeking": true, + "onselect": true, + "onselectionchange": true, + "onselectstart": true, + "onslotchange": true, + "onstalled": true, + "onstorage": true, + "onsubmit": true, + "onsuspend": true, + "ontimeupdate": true, + "ontoggle": true, + "ontransitioncancel": true, + "ontransitionend": true, + "ontransitionrun": true, + "ontransitionstart": true, + "onunhandledrejection": true, + "onunload": true, + "onvolumechange": true, + "onwaiting": true, + "onwheel": true, + "open": false, + "opener": false, + "Option": false, + "OrientationSensor": false, + "origin": false, + "originAgentCluster": false, + "OscillatorNode": false, + "OTPCredential": false, + "outerHeight": false, + "outerWidth": false, + "OverconstrainedError": false, + "PageRevealEvent": false, + "PageSwapEvent": false, + "PageTransitionEvent": false, + "pageXOffset": false, + "pageYOffset": false, + "PannerNode": false, + "parent": false, + "PasswordCredential": false, + "Path2D": false, + "PaymentAddress": false, + "PaymentManager": false, + "PaymentMethodChangeEvent": false, + "PaymentRequest": false, + "PaymentRequestUpdateEvent": false, + "PaymentResponse": false, + "performance": false, + "Performance": false, + "PerformanceElementTiming": false, + "PerformanceEntry": false, + "PerformanceEventTiming": false, + "PerformanceLongAnimationFrameTiming": false, + "PerformanceLongTaskTiming": false, + "PerformanceMark": false, + "PerformanceMeasure": false, + "PerformanceNavigation": false, + "PerformanceNavigationTiming": false, + "PerformanceObserver": false, + "PerformanceObserverEntryList": false, + "PerformancePaintTiming": false, + "PerformanceResourceTiming": false, + "PerformanceScriptTiming": false, + "PerformanceServerTiming": false, + "PerformanceTiming": false, + "PeriodicSyncManager": false, + "PeriodicWave": false, + "Permissions": false, + "PermissionStatus": false, + "PERSISTENT": false, + "personalbar": false, + "PictureInPictureEvent": false, + "PictureInPictureWindow": false, + "Plugin": false, + "PluginArray": false, + "PointerEvent": false, + "PopStateEvent": false, + "postMessage": false, + "Presentation": false, + "PresentationAvailability": false, + "PresentationConnection": false, + "PresentationConnectionAvailableEvent": false, + "PresentationConnectionCloseEvent": false, + "PresentationConnectionList": false, + "PresentationReceiver": false, + "PresentationRequest": false, + "PressureObserver": false, + "PressureRecord": false, + "print": false, + "ProcessingInstruction": false, + "Profiler": false, + "ProgressEvent": false, + "PromiseRejectionEvent": false, + "prompt": false, + "ProtectedAudience": false, + "PublicKeyCredential": false, + "PushManager": false, + "PushSubscription": false, + "PushSubscriptionOptions": false, + "queryLocalFonts": false, + "queueMicrotask": false, + "QuotaExceededError": false, + "RadioNodeList": false, + "Range": false, + "ReadableByteStreamController": false, + "ReadableStream": false, + "ReadableStreamBYOBReader": false, + "ReadableStreamBYOBRequest": false, + "ReadableStreamDefaultController": false, + "ReadableStreamDefaultReader": false, + "registerProcessor": false, + "RelativeOrientationSensor": false, + "RemotePlayback": false, + "removeEventListener": false, + "ReportBody": false, + "reportError": false, + "ReportingObserver": false, + "Request": false, + "requestAnimationFrame": false, + "requestIdleCallback": false, + "resizeBy": false, + "ResizeObserver": false, + "ResizeObserverEntry": false, + "ResizeObserverSize": false, + "resizeTo": false, + "Response": false, + "RestrictionTarget": false, + "RTCCertificate": false, + "RTCDataChannel": false, + "RTCDataChannelEvent": false, + "RTCDtlsTransport": false, + "RTCDTMFSender": false, + "RTCDTMFToneChangeEvent": false, + "RTCEncodedAudioFrame": false, + "RTCEncodedVideoFrame": false, + "RTCError": false, + "RTCErrorEvent": false, + "RTCIceCandidate": false, + "RTCIceTransport": false, + "RTCPeerConnection": false, + "RTCPeerConnectionIceErrorEvent": false, + "RTCPeerConnectionIceEvent": false, + "RTCRtpReceiver": false, + "RTCRtpScriptTransform": false, + "RTCRtpSender": false, + "RTCRtpTransceiver": false, + "RTCSctpTransport": false, + "RTCSessionDescription": false, + "RTCStatsReport": false, + "RTCTrackEvent": false, + "sampleRate": false, + "scheduler": false, + "Scheduler": false, + "Scheduling": false, + "screen": false, + "Screen": false, + "ScreenDetailed": false, + "ScreenDetails": false, + "screenLeft": false, + "ScreenOrientation": false, + "screenTop": false, + "screenX": false, + "screenY": false, + "ScriptProcessorNode": false, + "scroll": false, + "scrollbars": false, + "scrollBy": false, + "ScrollTimeline": false, + "scrollTo": false, + "scrollX": false, + "scrollY": false, + "SecurityPolicyViolationEvent": false, + "Selection": false, + "self": false, + "Sensor": false, + "SensorErrorEvent": false, + "Serial": false, + "SerialPort": false, + "ServiceWorker": false, + "ServiceWorkerContainer": false, + "ServiceWorkerRegistration": false, + "sessionStorage": false, + "setInterval": false, + "setTimeout": false, + "ShadowRoot": false, + "sharedStorage": false, + "SharedStorage": false, + "SharedStorageAppendMethod": false, + "SharedStorageClearMethod": false, + "SharedStorageDeleteMethod": false, + "SharedStorageModifierMethod": false, + "SharedStorageSetMethod": false, + "SharedStorageWorklet": false, + "SharedWorker": false, + "showDirectoryPicker": false, + "showOpenFilePicker": false, + "showSaveFilePicker": false, + "SnapEvent": false, + "SourceBuffer": false, + "SourceBufferList": false, + "SpeechGrammar": false, + "SpeechGrammarList": false, + "SpeechRecognition": false, + "SpeechRecognitionErrorEvent": false, + "SpeechRecognitionEvent": false, + "SpeechRecognitionPhrase": false, + "speechSynthesis": false, + "SpeechSynthesis": false, + "SpeechSynthesisErrorEvent": false, + "SpeechSynthesisEvent": false, + "SpeechSynthesisUtterance": false, + "SpeechSynthesisVoice": false, + "StaticRange": false, + "status": false, + "statusbar": false, + "StereoPannerNode": false, + "stop": false, + "Storage": false, + "StorageBucket": false, + "StorageBucketManager": false, + "StorageEvent": false, + "StorageManager": false, + "structuredClone": false, + "styleMedia": false, + "StylePropertyMap": false, + "StylePropertyMapReadOnly": false, + "StyleSheet": false, + "StyleSheetList": false, + "SubmitEvent": false, + "Subscriber": false, + "SubtleCrypto": false, + "Summarizer": false, + "SuppressedError": false, + "SVGAElement": false, + "SVGAngle": false, + "SVGAnimatedAngle": false, + "SVGAnimatedBoolean": false, + "SVGAnimatedEnumeration": false, + "SVGAnimatedInteger": false, + "SVGAnimatedLength": false, + "SVGAnimatedLengthList": false, + "SVGAnimatedNumber": false, + "SVGAnimatedNumberList": false, + "SVGAnimatedPreserveAspectRatio": false, + "SVGAnimatedRect": false, + "SVGAnimatedString": false, + "SVGAnimatedTransformList": false, + "SVGAnimateElement": false, + "SVGAnimateMotionElement": false, + "SVGAnimateTransformElement": false, + "SVGAnimationElement": false, + "SVGCircleElement": false, + "SVGClipPathElement": false, + "SVGComponentTransferFunctionElement": false, + "SVGDefsElement": false, + "SVGDescElement": false, + "SVGElement": false, + "SVGEllipseElement": false, + "SVGFEBlendElement": false, + "SVGFEColorMatrixElement": false, + "SVGFEComponentTransferElement": false, + "SVGFECompositeElement": false, + "SVGFEConvolveMatrixElement": false, + "SVGFEDiffuseLightingElement": false, + "SVGFEDisplacementMapElement": false, + "SVGFEDistantLightElement": false, + "SVGFEDropShadowElement": false, + "SVGFEFloodElement": false, + "SVGFEFuncAElement": false, + "SVGFEFuncBElement": false, + "SVGFEFuncGElement": false, + "SVGFEFuncRElement": false, + "SVGFEGaussianBlurElement": false, + "SVGFEImageElement": false, + "SVGFEMergeElement": false, + "SVGFEMergeNodeElement": false, + "SVGFEMorphologyElement": false, + "SVGFEOffsetElement": false, + "SVGFEPointLightElement": false, + "SVGFESpecularLightingElement": false, + "SVGFESpotLightElement": false, + "SVGFETileElement": false, + "SVGFETurbulenceElement": false, + "SVGFilterElement": false, + "SVGForeignObjectElement": false, + "SVGGElement": false, + "SVGGeometryElement": false, + "SVGGradientElement": false, + "SVGGraphicsElement": false, + "SVGImageElement": false, + "SVGLength": false, + "SVGLengthList": false, + "SVGLinearGradientElement": false, + "SVGLineElement": false, + "SVGMarkerElement": false, + "SVGMaskElement": false, + "SVGMatrix": false, + "SVGMetadataElement": false, + "SVGMPathElement": false, + "SVGNumber": false, + "SVGNumberList": false, + "SVGPathElement": false, + "SVGPatternElement": false, + "SVGPoint": false, + "SVGPointList": false, + "SVGPolygonElement": false, + "SVGPolylineElement": false, + "SVGPreserveAspectRatio": false, + "SVGRadialGradientElement": false, + "SVGRect": false, + "SVGRectElement": false, + "SVGScriptElement": false, + "SVGSetElement": false, + "SVGStopElement": false, + "SVGStringList": false, + "SVGStyleElement": false, + "SVGSVGElement": false, + "SVGSwitchElement": false, + "SVGSymbolElement": false, + "SVGTextContentElement": false, + "SVGTextElement": false, + "SVGTextPathElement": false, + "SVGTextPositioningElement": false, + "SVGTitleElement": false, + "SVGTransform": false, + "SVGTransformList": false, + "SVGTSpanElement": false, + "SVGUnitTypes": false, + "SVGUseElement": false, + "SVGViewElement": false, + "SyncManager": false, + "TaskAttributionTiming": false, + "TaskController": false, + "TaskPriorityChangeEvent": false, + "TaskSignal": false, + "TEMPORARY": false, + "Text": false, + "TextDecoder": false, + "TextDecoderStream": false, + "TextEncoder": false, + "TextEncoderStream": false, + "TextEvent": false, + "TextFormat": false, + "TextFormatUpdateEvent": false, + "TextMetrics": false, + "TextTrack": false, + "TextTrackCue": false, + "TextTrackCueList": false, + "TextTrackList": false, + "TextUpdateEvent": false, + "TimeEvent": false, + "TimeRanges": false, + "ToggleEvent": false, + "toolbar": false, + "top": false, + "Touch": false, + "TouchEvent": false, + "TouchList": false, + "TrackEvent": false, + "TransformStream": false, + "TransformStreamDefaultController": false, + "TransitionEvent": false, + "Translator": false, + "TreeWalker": false, + "TrustedHTML": false, + "TrustedScript": false, + "TrustedScriptURL": false, + "TrustedTypePolicy": false, + "TrustedTypePolicyFactory": false, + "trustedTypes": false, + "UIEvent": false, + "URL": false, + "URLPattern": false, + "URLSearchParams": false, + "USB": false, + "USBAlternateInterface": false, + "USBConfiguration": false, + "USBConnectionEvent": false, + "USBDevice": false, + "USBEndpoint": false, + "USBInterface": false, + "USBInTransferResult": false, + "USBIsochronousInTransferPacket": false, + "USBIsochronousInTransferResult": false, + "USBIsochronousOutTransferPacket": false, + "USBIsochronousOutTransferResult": false, + "USBOutTransferResult": false, + "UserActivation": false, + "ValidityState": false, + "VideoColorSpace": false, + "VideoDecoder": false, + "VideoEncoder": false, + "VideoFrame": false, + "VideoPlaybackQuality": false, + "viewport": false, + "Viewport": false, + "ViewTimeline": false, + "ViewTransition": false, + "ViewTransitionTypeSet": false, + "VirtualKeyboard": false, + "VirtualKeyboardGeometryChangeEvent": false, + "VisibilityStateEntry": false, + "visualViewport": false, + "VisualViewport": false, + "VTTCue": false, + "VTTRegion": false, + "WakeLock": false, + "WakeLockSentinel": false, + "WaveShaperNode": false, + "WebAssembly": false, + "WebGL2RenderingContext": false, + "WebGLActiveInfo": false, + "WebGLBuffer": false, + "WebGLContextEvent": false, + "WebGLFramebuffer": false, + "WebGLObject": false, + "WebGLProgram": false, + "WebGLQuery": false, + "WebGLRenderbuffer": false, + "WebGLRenderingContext": false, + "WebGLSampler": false, + "WebGLShader": false, + "WebGLShaderPrecisionFormat": false, + "WebGLSync": false, + "WebGLTexture": false, + "WebGLTransformFeedback": false, + "WebGLUniformLocation": false, + "WebGLVertexArrayObject": false, + "WebSocket": false, + "WebSocketError": false, + "WebSocketStream": false, + "WebTransport": false, + "WebTransportBidirectionalStream": false, + "WebTransportDatagramDuplexStream": false, + "WebTransportError": false, + "WebTransportReceiveStream": false, + "WebTransportSendStream": false, + "WGSLLanguageFeatures": false, + "WheelEvent": false, + "when": false, + "window": false, + "Window": false, + "WindowControlsOverlay": false, + "WindowControlsOverlayGeometryChangeEvent": false, + "Worker": false, + "Worklet": false, + "WorkletGlobalScope": false, + "WritableStream": false, + "WritableStreamDefaultController": false, + "WritableStreamDefaultWriter": false, + "XMLDocument": false, + "XMLHttpRequest": false, + "XMLHttpRequestEventTarget": false, + "XMLHttpRequestUpload": false, + "XMLSerializer": false, + "XPathEvaluator": false, + "XPathExpression": false, + "XPathResult": false, + "XRAnchor": false, + "XRAnchorSet": false, + "XRBoundedReferenceSpace": false, + "XRCamera": false, + "XRCPUDepthInformation": false, + "XRDepthInformation": false, + "XRDOMOverlayState": false, + "XRFrame": false, + "XRHand": false, + "XRHitTestResult": false, + "XRHitTestSource": false, + "XRInputSource": false, + "XRInputSourceArray": false, + "XRInputSourceEvent": false, + "XRInputSourcesChangeEvent": false, + "XRJointPose": false, + "XRJointSpace": false, + "XRLayer": false, + "XRLightEstimate": false, + "XRLightProbe": false, + "XRPose": false, + "XRRay": false, + "XRReferenceSpace": false, + "XRReferenceSpaceEvent": false, + "XRRenderState": false, + "XRRigidTransform": false, + "XRSession": false, + "XRSessionEvent": false, + "XRSpace": false, + "XRSystem": false, + "XRTransientInputHitTestResult": false, + "XRTransientInputHitTestSource": false, + "XRView": false, + "XRViewerPose": false, + "XRViewport": false, + "XRWebGLBinding": false, + "XRWebGLDepthInformation": false, + "XRWebGLLayer": false, + "XSLTProcessor": false + } + }, + "errors": [ + { + "messageId": "defaultMessage", + "data": { + "name": "event" + }, + "line": 1, + "column": 64, + "endLine": 1, + "endColumn": 69 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-restricted-globals > invalid + +```js +function onClick(event) { console.log(event); console.log(globalThis.event); } +``` + +```json +{ + "options": [ + { + "globals": [ + "event" + ], + "checkGlobalObject": true + } + ], + "languageOptions": { + "ecmaVersion": 2020 + }, + "errors": [ + { + "messageId": "defaultMessage", + "data": { + "name": "event" + }, + "line": 1, + "column": 70, + "endLine": 1, + "endColumn": 75 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-restricted-globals > invalid + +```js +function onClick(event) { console.log(event); console.log(myGlobal.event); } +``` + +```json +{ + "options": [ + { + "globals": [ + "event" + ], + "checkGlobalObject": true, + "globalObjects": [ + "myGlobal" + ] + } + ], + "languageOptions": { + "globals": { + "myGlobal": "readonly" + } + }, + "errors": [ + { + "messageId": "defaultMessage", + "data": { + "name": "event" + }, + "line": 1, + "column": 68, + "endLine": 1, + "endColumn": 73 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-restricted-globals > valid + +```js +const foo: number = 1; +``` + +```json +{ + "options": [ + "foo" + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-restricted-globals > valid + +```js +function foo(): void {} +``` + +```json +{ + "options": [ + "foo" + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-restricted-globals > valid + +```js +function fn(): void { let foo; } +``` + +```json +{ + "options": [ + "foo" + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-restricted-globals > valid + +```js + +\u0009\u0009\u0009export default class Test { +\u0009\u0009\u0009\u0009private status: string; +\u0009\u0009\u0009\u0009getStatus() { +\u0009\u0009\u0009\u0009\u0009return this.status; +\u0009\u0009\u0009\u0009} +\u0009\u0009\u0009} +``` + +```json +{ + "code": "\n\t\t\texport default class Test {\n\t\t\t\tprivate status: string;\n\t\t\t\tgetStatus() {\n\t\t\t\t\treturn this.status;\n\t\t\t\t}\n\t\t\t}", + "options": [ + "status" + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-restricted-globals > valid + +```js +type Handler = (event: string) => any +``` + +```json +{ + "options": [ + "event" + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-restricted-globals > valid + +```js +let value: bigint +``` + +```json +{ + "options": [ + "bigint" + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-restricted-globals > valid + +```js +let value: boolean +``` + +```json +{ + "options": [ + "boolean" + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-restricted-globals > valid + +```js +let value: never +``` + +```json +{ + "options": [ + "never" + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-restricted-globals > valid + +```js +let value: null +``` + +```json +{ + "options": [ + "null" + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-restricted-globals > valid + +```js +let value: number +``` + +```json +{ + "options": [ + "number" + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-restricted-globals > valid + +```js +let value: object +``` + +```json +{ + "options": [ + "object" + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-restricted-globals > valid + +```js +let value: string +``` + +```json +{ + "options": [ + "string" + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-restricted-globals > valid + +```js +let value: symbol +``` + +```json +{ + "options": [ + "symbol" + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-restricted-globals > valid + +```js +let value: undefined +``` + +```json +{ + "options": [ + "undefined" + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-restricted-globals > valid + +```js +let value: unknown +``` + +```json +{ + "options": [ + "unknown" + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-restricted-globals > valid + +```js +let value: void +``` + +```json +{ + "options": [ + "void" + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-restricted-globals > valid + +```js +let value: [] +``` + +```json +{ + "options": [ + "[]" + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-restricted-globals > valid + +```js +let value: {} +``` + +```json +{ + "options": [ + "{}" + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-restricted-globals > valid + +```js +let value: Test +``` + +```json +{ + "options": [ + "Test" + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-restricted-globals > valid + +```js +let value: Test[] +``` + +```json +{ + "options": [ + "Test" + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-restricted-globals > valid + +```js +let value: [Test] +``` + +```json +{ + "options": [ + "Test" + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-restricted-globals > valid + +```js +let b: { c: Test } +``` + +```json +{ + "options": [ + "Test" + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-restricted-globals > valid + +```js +function foo(param: Test) {} +``` + +```json +{ + "options": [ + "Test" + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-restricted-globals > valid + +```js +1 as Test +``` + +```json +{ + "options": [ + "Test" + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-restricted-globals > valid + +```js +interface Derived extends Test {} +``` + +```json +{ + "options": [ + "Test" + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-restricted-globals > valid + +```js +type Intersection = Test & {} +``` + +```json +{ + "options": [ + "Test" + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-restricted-globals > valid + +```js +type Union = Test | {} +``` + +```json +{ + "options": [ + "Test" + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-restricted-globals > valid + +```js +let value: NS.Test +``` + +```json +{ + "options": [ + "NS" + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-restricted-globals > valid + +```js +let value: NS.Test +``` + +```json +{ + "options": [ + "Test" + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-restricted-globals > valid + +```js +let value: NS.Test +``` + +```json +{ + "options": [ + "NS.Test" + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-restricted-globals > valid + +```js +let value: typeof Test +``` + +```json +{ + "options": [ + "Test" + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-restricted-globals > valid + +```js +let value: Type +``` + +```json +{ + "options": [ + "Type", + "Test" + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-restricted-globals > valid + +```js +type Intersection = Test +``` + +```json +{ + "options": [ + "Test", + "any" + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-restricted-globals > valid + +```js +type Intersection = Test +``` + +```json +{ + "options": [ + "Test", + "A", + "B" + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-restricted-globals > invalid + +```js +function fn(): void { foo; } +``` + +```json +{ + "options": [ + "foo" + ], + "errors": [ + { + "messageId": "defaultMessage", + "data": { + "name": "foo" + } + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-restricted-globals > invalid + +```js +function fn(): void { foo; } +``` + +```json +{ + "options": [ + "foo" + ], + "languageOptions": { + "globals": { + "foo": false + } + }, + "errors": [ + { + "messageId": "defaultMessage", + "data": { + "name": "foo" + } + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-restricted-globals > invalid + +```js +function fn(): void { foo; } +``` + +```json +{ + "options": [ + { + "name": "foo" + } + ], + "errors": [ + { + "messageId": "defaultMessage", + "data": { + "name": "foo" + } + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-restricted-globals > invalid + +```js +function fn(): void { foo; } +``` + +```json +{ + "options": [ + { + "name": "foo" + } + ], + "languageOptions": { + "globals": { + "foo": false + } + }, + "errors": [ + { + "messageId": "defaultMessage", + "data": { + "name": "foo" + } + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-restricted-globals > invalid + +```js +function fn(): void { foo; } +``` + +```json +{ + "options": [ + { + "name": "foo", + "message": "Use bar instead." + } + ], + "errors": [ + { + "messageId": "customMessage", + "data": { + "name": "foo", + "customMessage": "Use bar instead." + } + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-restricted-globals > invalid + +```js +function fn(): void { foo; } +``` + +```json +{ + "options": [ + { + "name": "foo", + "message": "Use bar instead." + } + ], + "languageOptions": { + "globals": { + "foo": false + } + }, + "errors": [ + { + "messageId": "customMessage", + "data": { + "name": "foo", + "customMessage": "Use bar instead." + } + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-restricted-globals > invalid + +```js +const x: Promise = Promise.resolve(); +``` + +```json +{ + "options": [ + "Promise" + ], + "errors": [ + { + "messageId": "defaultMessage", + "data": { + "name": "Promise" + }, + "line": 1, + "column": 25, + "endLine": 1, + "endColumn": 32 + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +### `no-restricted-imports` + +Pass: 210 / 254 (82.7%) +Fail: 44 / 254 (17.3%) + +#### no-restricted-imports > valid + +```js +import { +AllowedObject, +DisallowedObject, // eslint-disable-line +} from "foo"; +``` + +```json +{ + "options": [ + { + "paths": [ + { + "name": "foo", + "importNames": [ + "DisallowedObject" + ] + } + ] + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-restricted-imports', + message: "'DisallowedObject' import from 'foo' is restricted.", + messageId: 'importName', + severity: 1, + nodeType: 'Identifier', + line: 3, + column: 0, + endLine: 3, + endColumn: 16, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-restricted-imports > invalid + +```js +import { Image, Text, ScrollView } from 'react-native' +``` + +```json +{ + "options": [ + { + "paths": [ + { + "name": "react-native", + "importNames": [ + "Text" + ], + "message": "import Text from ui/_components instead" + }, + { + "name": "react-native", + "importNames": [ + "TextInput" + ], + "message": "import TextInput from ui/_components instead" + }, + { + "name": "react-native", + "importNames": [ + "View" + ], + "message": "import View from ui/_components instead " + }, + { + "name": "react-native", + "importNames": [ + "ScrollView" + ], + "message": "import ScrollView from ui/_components instead" + }, + { + "name": "react-native", + "importNames": [ + "KeyboardAvoidingView" + ], + "message": "import KeyboardAvoidingView from ui/_components instead" + }, + { + "name": "react-native", + "importNames": [ + "ImageBackground" + ], + "message": "import ImageBackground from ui/_components instead" + }, + { + "name": "react-native", + "importNames": [ + "Image" + ], + "message": "import Image from ui/_components instead" + } + ] + } + ], + "errors": [ + { + "message": "'Image' import from 'react-native' is restricted. import Image from ui/_components instead", + "line": 1, + "column": 10, + "endColumn": 15 + }, + { + "message": "'Text' import from 'react-native' is restricted. import Text from ui/_components instead", + "line": 1, + "column": 17, + "endColumn": 21 + }, + { + "message": "'ScrollView' import from 'react-native' is restricted. import ScrollView from ui/_components instead", + "line": 1, + "column": 23, + "endColumn": 33 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Expected values to be strictly equal: ++ actual - expected + ++ "'Text' import from 'react-native' is restricted. import Text from ui/_components instead" +- "'Image' import from 'react-native' is restricted. import Image from ui/_components instead" + + at assertMessageMatches (apps/oxlint/dist/index.js) + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-restricted-imports > invalid + +```js +import { foo, bar, baz, qux } from 'mod' +``` + +```json +{ + "options": [ + { + "paths": [ + { + "name": "mod", + "importNames": [ + "bar" + ], + "message": "Use `barbaz` instead of `bar`." + }, + { + "name": "mod", + "importNames": [ + "foo", + "qux" + ], + "message": "Don't use 'foo' and `qux` from 'mod'." + } + ] + } + ], + "errors": [ + { + "message": "'foo' import from 'mod' is restricted. Don't use 'foo' and `qux` from 'mod'.", + "line": 1, + "column": 10, + "endColumn": 13 + }, + { + "message": "'bar' import from 'mod' is restricted. Use `barbaz` instead of `bar`.", + "line": 1, + "column": 15, + "endColumn": 18 + }, + { + "message": "'qux' import from 'mod' is restricted. Don't use 'foo' and `qux` from 'mod'.", + "line": 1, + "column": 25, + "endColumn": 28 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Expected values to be strictly equal: ++ actual - expected + ++ "'bar' import from 'mod' is restricted. Use `barbaz` instead of `bar`." +- "'foo' import from 'mod' is restricted. Don't use 'foo' and `qux` from 'mod'." + + at assertMessageMatches (apps/oxlint/dist/index.js) + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-restricted-imports > invalid + +```js +import { foo, bar, baz, qux } from 'mod' +``` + +```json +{ + "options": [ + { + "paths": [ + { + "name": "mod", + "importNames": [ + "foo", + "baz" + ], + "message": "Don't use 'foo' or 'baz' from 'mod'." + }, + { + "name": "mod", + "importNames": [ + "a", + "c" + ], + "message": "Don't use 'a' or 'c' from 'mod'." + }, + { + "name": "mod", + "importNames": [ + "b", + "bar" + ], + "message": "Use 'b' or `bar` from 'quux/mod' instead." + } + ] + } + ], + "errors": [ + { + "message": "'foo' import from 'mod' is restricted. Don't use 'foo' or 'baz' from 'mod'.", + "line": 1, + "column": 10, + "endColumn": 13 + }, + { + "message": "'bar' import from 'mod' is restricted. Use 'b' or `bar` from 'quux/mod' instead.", + "line": 1, + "column": 15, + "endColumn": 18 + }, + { + "message": "'baz' import from 'mod' is restricted. Don't use 'foo' or 'baz' from 'mod'.", + "line": 1, + "column": 20, + "endColumn": 23 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Expected values to be strictly equal: ++ actual - expected + ++ "'baz' import from 'mod' is restricted. Don't use 'foo' or 'baz' from 'mod'." +- "'bar' import from 'mod' is restricted. Use 'b' or `bar` from 'quux/mod' instead." + + at assertMessageMatches (apps/oxlint/dist/index.js) + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-restricted-imports > valid + +```js +import foo = require('foo'); +``` + +```json +{ + "options": [ + "import1", + "import2" + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-restricted-imports > valid + +```js +import foo = require('foo'); +``` + +```json +{ + "options": [ + { + "paths": [ + { + "importNames": [ + "foo" + ], + "message": "Please use Bar from /import-bar/baz/ instead.", + "name": "foo" + } + ] + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-restricted-imports > valid + +```js +import type foo from 'import-foo'; +``` + +```json +{ + "options": [ + { + "paths": [ + { + "allowTypeImports": true, + "message": "Please use import-bar instead.", + "name": "import-foo" + } + ] + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-restricted-imports > valid + +```js +import type _ = require('import-foo'); +``` + +```json +{ + "options": [ + { + "paths": [ + { + "allowTypeImports": true, + "message": "Please use import-bar instead.", + "name": "import-foo" + } + ] + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-restricted-imports > valid + +```js +import type { Bar } from 'import-foo'; +``` + +```json +{ + "options": [ + { + "paths": [ + { + "allowTypeImports": true, + "importNames": [ + "Bar" + ], + "message": "Please use Bar from /import-bar/baz/ instead.", + "name": "import-foo" + } + ] + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-restricted-imports > valid + +```js +export type { Bar } from 'import-foo'; +``` + +```json +{ + "options": [ + { + "paths": [ + { + "allowTypeImports": true, + "importNames": [ + "Bar" + ], + "message": "Please use Bar from /import-bar/baz/ instead.", + "name": "import-foo" + } + ] + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-restricted-imports > valid + +```js +import type foo from 'import1/private/bar'; +``` + +```json +{ + "options": [ + { + "patterns": [ + { + "allowTypeImports": true, + "group": [ + "import1/private/*" + ], + "message": "usage of import1 private modules not allowed." + } + ] + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-restricted-imports > valid + +```js +export type { foo } from 'import1/private/bar'; +``` + +```json +{ + "options": [ + { + "patterns": [ + { + "allowTypeImports": true, + "group": [ + "import1/private/*" + ], + "message": "usage of import1 private modules not allowed." + } + ] + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-restricted-imports > valid + +```js +import type { MyType } from './types'; +``` + +```json +{ + "options": [ + { + "patterns": [ + { + "allowTypeImports": true, + "group": [ + "fail" + ], + "message": "Please do not load from 'fail'." + } + ] + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-restricted-imports > valid + +```js + + import type { foo } from 'import1/private/bar'; + import type { foo } from 'import2/private/bar'; +\u0009\u0009 +``` + +```json +{ + "code": "\n import type { foo } from 'import1/private/bar';\n import type { foo } from 'import2/private/bar';\n\t\t", + "options": [ + { + "patterns": [ + { + "allowTypeImports": true, + "group": [ + "import1/private/*" + ], + "message": "usage of import1 private modules not allowed." + }, + { + "allowTypeImports": true, + "group": [ + "import2/private/*" + ], + "message": "usage of import2 private modules not allowed." + } + ] + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-restricted-imports > valid + +```js +import { Bar, type Baz } from "import/private/bar"; +``` + +```json +{ + "options": [ + { + "patterns": [ + { + "group": [ + "import/private/*" + ], + "importNames": [ + "Baz" + ], + "allowTypeImports": true, + "message": "Please use 'Baz' from 'import/private/*' as a type only." + } + ] + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-restricted-imports > valid + +```js +import type { Bar } from "import/private/bar"; +``` + +```json +{ + "options": [ + { + "patterns": [ + { + "group": [ + "import/private/*" + ], + "importNames": [ + "Bar" + ], + "allowTypeImports": true, + "message": "Please use 'Baz' from 'import/private/*' as a type only." + } + ] + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-restricted-imports > valid + +```js +import { Baz, type Bar } from "import/private/bar"; +``` + +```json +{ + "options": [ + { + "patterns": [ + { + "group": [ + "import/private/*" + ], + "importNames": [ + "Bar" + ], + "allowTypeImports": true, + "message": "Please use 'Baz' from 'import/private/*' as a type only." + } + ] + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-restricted-imports > valid + +```js +export { Baz, type Bar } from "import/private/bar"; +``` + +```json +{ + "options": [ + { + "patterns": [ + { + "group": [ + "import/private/*" + ], + "importNames": [ + "Bar" + ], + "allowTypeImports": true, + "message": "Please use 'Baz' from 'import/private/*' as a type only." + } + ] + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-restricted-imports > valid + +```js +import type { Bar } from "import/private/bar"; +``` + +```json +{ + "options": [ + { + "patterns": [ + { + "group": [ + "import/private/*" + ], + "allowImportNames": [ + "Foo" + ], + "allowTypeImports": true, + "message": "Please use 'Baz' from 'import/private/*' as a type only." + } + ] + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-restricted-imports > valid + +```js +import { Foo, type Bar } from "import/private/bar"; +``` + +```json +{ + "options": [ + { + "patterns": [ + { + "group": [ + "import/private/*" + ], + "allowImportNames": [ + "Foo" + ], + "allowTypeImports": true, + "message": "Please use 'Baz' from 'import/private/*' as a type only." + } + ] + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-restricted-imports > valid + +```js +export { Baz, type Bar } from "import/private/bar"; +``` + +```json +{ + "options": [ + { + "patterns": [ + { + "group": [ + "import/private/*" + ], + "allowImportNames": [ + "Baz" + ], + "allowTypeImports": true, + "message": "Please use 'Baz' from 'import/private/*' as a type only." + } + ] + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-restricted-imports > valid + +```js +import { Foo, type Bar } from "import/private/bar"; +``` + +```json +{ + "options": [ + { + "patterns": [ + { + "group": [ + "import/private/*" + ], + "allowImportNamePattern": "^Foo", + "allowTypeImports": true, + "message": "Please use 'Baz' from 'import/private/*' as a type only." + } + ] + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-restricted-imports > valid + +```js +export { Baz, type Bar } from "import/private/bar"; +``` + +```json +{ + "options": [ + { + "patterns": [ + { + "group": [ + "import/private/*" + ], + "allowImportNamePattern": "^Baz", + "allowTypeImports": true, + "message": "Please use 'Baz' from 'import/private/*' as a type only." + } + ] + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-restricted-imports > valid + +```js +export { bar, type baz } from "import-foo"; +``` + +```json +{ + "options": [ + { + "paths": [ + { + "name": "import-foo", + "allowImportNames": [ + "bar" + ], + "allowTypeImports": true + } + ] + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-restricted-imports > valid + +```js + + import type { foo } from 'import1/private/bar'; + import type { foo } from 'import2/private/bar'; +\u0009\u0009 +``` + +```json +{ + "code": "\n import type { foo } from 'import1/private/bar';\n import type { foo } from 'import2/private/bar';\n\t\t", + "options": [ + { + "patterns": [ + { + "allowTypeImports": true, + "message": "usage of import1 private modules not allowed.", + "regex": "import1/.*" + }, + { + "allowTypeImports": true, + "message": "usage of import2 private modules not allowed.", + "regex": "import2/.*" + } + ] + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-restricted-imports > valid + +```js +import { type Bar } from 'import-foo'; +``` + +```json +{ + "options": [ + { + "paths": [ + { + "allowTypeImports": true, + "importNames": [ + "Bar" + ], + "message": "Please use Bar from /import-bar/baz/ instead.", + "name": "import-foo" + } + ] + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-restricted-imports > valid + +```js +export { type Bar } from 'import-foo'; +``` + +```json +{ + "options": [ + { + "paths": [ + { + "allowTypeImports": true, + "importNames": [ + "Bar" + ], + "message": "Please use Bar from /import-bar/baz/ instead.", + "name": "import-foo" + } + ] + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-restricted-imports > valid + +```js +import Bar = Foo.Bar; +``` + +```json +{ + "options": [ + { + "paths": [ + { + "allowTypeImports": true, + "importNames": [ + "Bar" + ], + "name": "import-foo" + } + ] + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-restricted-imports > valid + +```js +export type * from "foo"; +``` + +```json +{ + "options": [ + { + "paths": [ + { + "name": "foo", + "allowTypeImports": true + } + ] + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-restricted-imports > valid + +```js +import type fs = require("fs"); +``` + +```json +{ + "options": [ + { + "patterns": [ + { + "group": [ + "f*" + ], + "allowTypeImports": true + } + ] + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-restricted-imports > valid + +```js +export { type bar, baz } from "foo"; +``` + +```json +{ + "options": [ + { + "paths": [ + { + "name": "foo", + "importNames": [ + "bar" + ], + "allowTypeImports": true + } + ] + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-restricted-imports > invalid + +```js +import foo = require('import1'); +``` + +```json +{ + "options": [ + "import1", + "import2" + ], + "errors": [ + { + "messageId": "path" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-restricted-imports > invalid + +```js +import foo = require('import-foo'); +``` + +```json +{ + "options": [ + { + "paths": [ + { + "allowTypeImports": true, + "message": "Please use import-bar instead.", + "name": "import-foo" + } + ] + } + ], + "errors": [ + { + "messageId": "pathWithCustomMessage" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-restricted-imports > invalid + +```js +import type { InvalidTestCase } from '@typescript-eslint/utils/dist/ts-eslint'; +``` + +```json +{ + "options": [ + { + "patterns": [ + "@typescript-eslint/utils/dist/*" + ] + } + ], + "errors": [ + { + "messageId": "patterns" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-restricted-imports > invalid + +```js +export type { InvalidTestCase } from '@typescript-eslint/utils/dist/ts-eslint'; +``` + +```json +{ + "options": [ + { + "patterns": [ + "@typescript-eslint/utils/dist/*" + ] + } + ], + "errors": [ + { + "messageId": "patterns" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-restricted-imports > invalid + +```js +import { Bar, type Baz } from 'import-foo'; +``` + +```json +{ + "options": [ + { + "paths": [ + { + "allowTypeImports": true, + "importNames": [ + "Bar", + "Baz" + ], + "message": "Please use Bar and Baz from /import-bar/baz/ instead.", + "name": "import-foo" + } + ] + } + ], + "errors": [ + { + "messageId": "importNameWithCustomMessage", + "line": 1, + "column": 10, + "data": { + "importSource": "import-foo", + "importName": "Bar", + "customMessage": "Please use Bar and Baz from /import-bar/baz/ instead." + } + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-restricted-imports > invalid + +```js +export { Bar, type Baz } from 'import-foo'; +``` + +```json +{ + "options": [ + { + "paths": [ + { + "allowTypeImports": true, + "importNames": [ + "Bar", + "Baz" + ], + "message": "Please use Bar and Baz from /import-bar/baz/ instead.", + "name": "import-foo" + } + ] + } + ], + "errors": [ + { + "messageId": "importNameWithCustomMessage", + "data": { + "importName": "Bar", + "importSource": "import-foo", + "customMessage": "Please use Bar and Baz from /import-bar/baz/ instead." + } + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-restricted-imports > invalid + +```js + +\u0009\u0009\u0009 // Both regular and type imports should still be restricted +\u0009\u0009\u0009 import { Foo } from 'restricted-path'; +\u0009\u0009\u0009 import type { Bar } from 'restricted-path'; +\u0009\u0009\u0009 +``` + +```json +{ + "code": "\n\t\t\t // Both regular and type imports should still be restricted\n\t\t\t import { Foo } from 'restricted-path';\n\t\t\t import type { Bar } from 'restricted-path';\n\t\t\t", + "options": [ + { + "paths": [ + { + "name": "restricted-path", + "allowTypeImports": false, + "message": "This import is restricted." + } + ] + } + ], + "errors": [ + { + "messageId": "pathWithCustomMessage", + "line": 3, + "data": { + "importSource": "restricted-path", + "customMessage": "This import is restricted." + } + }, + { + "messageId": "pathWithCustomMessage", + "line": 4, + "data": { + "importSource": "restricted-path", + "customMessage": "This import is restricted." + } + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-restricted-imports > invalid + +```js + +\u0009\u0009\u0009 // Both regular and type imports should still be restricted +\u0009\u0009\u0009 export { Foo } from 'restricted-path'; +\u0009\u0009\u0009 export type { Bar } from 'restricted-path'; +\u0009\u0009\u0009 +``` + +```json +{ + "code": "\n\t\t\t // Both regular and type imports should still be restricted\n\t\t\t export { Foo } from 'restricted-path';\n\t\t\t export type { Bar } from 'restricted-path';\n\t\t\t", + "options": [ + { + "paths": [ + { + "name": "restricted-path", + "allowTypeImports": false, + "message": "This export is restricted." + } + ] + } + ], + "errors": [ + { + "messageId": "pathWithCustomMessage", + "line": 3, + "data": { + "importSource": "restricted-path", + "customMessage": "This export is restricted." + } + }, + { + "messageId": "pathWithCustomMessage", + "line": 4, + "data": { + "importSource": "restricted-path", + "customMessage": "This export is restricted." + } + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-restricted-imports > invalid + +```js +import type { bar } from "mod"; +``` + +```json +{ + "options": [ + { + "paths": [ + { + "name": "mod", + "importNames": [ + "foo" + ], + "allowTypeImports": true, + "message": "import 'foo' only as type" + }, + { + "name": "mod", + "importNames": [ + "bar" + ], + "message": "don't import 'bar' at all" + } + ] + } + ], + "errors": [ + { + "messageId": "importNameWithCustomMessage", + "line": 1, + "data": { + "importName": "bar", + "importSource": "mod", + "customMessage": "don't import 'bar' at all" + } + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-restricted-imports > invalid + +```js +export type { bar } from "mod"; +``` + +```json +{ + "options": [ + { + "paths": [ + { + "name": "mod", + "importNames": [ + "foo" + ], + "allowTypeImports": true, + "message": "import 'foo' only as type" + }, + { + "name": "mod", + "importNames": [ + "bar" + ], + "message": "don't import 'bar' at all" + } + ] + } + ], + "errors": [ + { + "messageId": "importNameWithCustomMessage", + "line": 1, + "data": { + "importName": "bar", + "importSource": "mod", + "customMessage": "don't import 'bar' at all" + } + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-restricted-imports > invalid + +```js +import fs = require("fs"); +``` + +```json +{ + "options": [ + { + "patterns": [ + { + "group": [ + "f*" + ] + } + ] + } + ], + "errors": [ + { + "messageId": "patterns" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-restricted-imports > invalid + +```js + +\u0009\u0009\u0009export type * from "foo"; +\u0009\u0009\u0009export * from "foo"; +\u0009\u0009\u0009 +``` + +```json +{ + "code": "\n\t\t\texport type * from \"foo\";\n\t\t\texport * from \"foo\";\n\t\t\t", + "options": [ + { + "paths": [ + { + "name": "foo", + "allowTypeImports": true + } + ] + } + ], + "errors": [ + { + "messageId": "path" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-restricted-imports > invalid + +```js + +\u0009\u0009\u0009export { } from "mod"; +\u0009\u0009\u0009export type { } from "mod"; +\u0009\u0009\u0009 +``` + +```json +{ + "code": "\n\t\t\texport { } from \"mod\";\n\t\t\texport type { } from \"mod\";\n\t\t\t", + "options": [ + { + "paths": [ + { + "name": "mod", + "allowTypeImports": true + } + ] + } + ], + "errors": [ + { + "messageId": "path", + "line": 2 + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +### `no-self-assign` + +Pass: 84 / 85 (98.8%) +Fail: 1 / 85 (1.2%) + +#### no-self-assign > invalid + +```js +({a, b} = {b, a}) +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "selfAssignment", + "data": { + "name": "b" + } + }, + { + "messageId": "selfAssignment", + "data": { + "name": "a" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Hydrated message "'b' is assigned to itself." does not match "'a' is assigned to itself." ++ actual - expected + ++ "'a' is assigned to itself." +- "'b' is assigned to itself." + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +### `no-setter-return` + +Pass: 161 / 164 (98.2%) +Fail: 3 / 164 (1.8%) + +#### no-setter-return > valid + +```js +Reflect.defineProperty(foo, 'bar', { set(val) { if (val) { return 1; } } }) +``` + +```json +{ + "languageOptions": { + "globals": { + "Reflect": "off" + } + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-setter-return', + message: 'Setter cannot return a value.', + messageId: 'returnsValue', + severity: 1, + nodeType: 'ReturnStatement', + line: 1, + column: 59, + endLine: 1, + endColumn: 68, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-setter-return > valid + +```js +/* globals Object:off */ Object.defineProperty(foo, 'bar', { set(val) { return 1; } }) +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-setter-return', + message: 'Setter cannot return a value.', + messageId: 'returnsValue', + severity: 1, + nodeType: 'ReturnStatement', + line: 1, + column: 72, + endLine: 1, + endColumn: 81, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-setter-return > valid + +```js +Object.defineProperties(foo, { bar: { set(val) { try { return 1; } catch(e){} } } }) +``` + +```json +{ + "languageOptions": { + "globals": { + "Object": "off" + } + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-setter-return', + message: 'Setter cannot return a value.', + messageId: 'returnsValue', + severity: 1, + nodeType: 'ReturnStatement', + line: 1, + column: 55, + endLine: 1, + endColumn: 64, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +### `no-shadow-restricted-names` + +Pass: 41 / 44 (93.2%) +Fail: 3 / 44 (6.8%) + +#### no-shadow-restricted-names > invalid + +```js +var undefined; undefined = 5; +``` + +```json +{ + "errors": [ + { + "messageId": "shadowingRestrictedName", + "data": { + "name": "undefined" + }, + "column": 5 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-shadow-restricted-names > invalid + +```js +class undefined {} +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2015 + }, + "errors": [ + { + "messageId": "shadowingRestrictedName", + "data": { + "name": "undefined" + }, + "column": 7 + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-shadow-restricted-names > invalid + +```js +(class undefined {}) +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2015 + }, + "errors": [ + { + "messageId": "shadowingRestrictedName", + "data": { + "name": "undefined" + }, + "column": 8 + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +### `no-shadow` + +Pass: 201 / 308 (65.3%) +Fail: 107 / 308 (34.7%) + +#### no-shadow > invalid + +```js +function foo() { var top = 0; } +``` + +```json +{ + "options": [ + { + "builtinGlobals": true + } + ], + "languageOptions": { + "globals": { + "AbortController": false, + "AbortSignal": false, + "AbsoluteOrientationSensor": false, + "AbstractRange": false, + "Accelerometer": false, + "addEventListener": false, + "ai": false, + "AI": false, + "AICreateMonitor": false, + "AITextSession": false, + "alert": false, + "AnalyserNode": false, + "Animation": false, + "AnimationEffect": false, + "AnimationEvent": false, + "AnimationPlaybackEvent": false, + "AnimationTimeline": false, + "AsyncDisposableStack": false, + "atob": false, + "Attr": false, + "Audio": false, + "AudioBuffer": false, + "AudioBufferSourceNode": false, + "AudioContext": false, + "AudioData": false, + "AudioDecoder": false, + "AudioDestinationNode": false, + "AudioEncoder": false, + "AudioListener": false, + "AudioNode": false, + "AudioParam": false, + "AudioParamMap": false, + "AudioProcessingEvent": false, + "AudioScheduledSourceNode": false, + "AudioSinkInfo": false, + "AudioWorklet": false, + "AudioWorkletGlobalScope": false, + "AudioWorkletNode": false, + "AudioWorkletProcessor": false, + "AuthenticatorAssertionResponse": false, + "AuthenticatorAttestationResponse": false, + "AuthenticatorResponse": false, + "BackgroundFetchManager": false, + "BackgroundFetchRecord": false, + "BackgroundFetchRegistration": false, + "BarcodeDetector": false, + "BarProp": false, + "BaseAudioContext": false, + "BatteryManager": false, + "BeforeUnloadEvent": false, + "BiquadFilterNode": false, + "Blob": false, + "BlobEvent": false, + "Bluetooth": false, + "BluetoothCharacteristicProperties": false, + "BluetoothDevice": false, + "BluetoothRemoteGATTCharacteristic": false, + "BluetoothRemoteGATTDescriptor": false, + "BluetoothRemoteGATTServer": false, + "BluetoothRemoteGATTService": false, + "BluetoothUUID": false, + "blur": false, + "BroadcastChannel": false, + "BrowserCaptureMediaStreamTrack": false, + "btoa": false, + "ByteLengthQueuingStrategy": false, + "Cache": false, + "caches": false, + "CacheStorage": false, + "cancelAnimationFrame": false, + "cancelIdleCallback": false, + "CanvasCaptureMediaStream": false, + "CanvasCaptureMediaStreamTrack": false, + "CanvasGradient": false, + "CanvasPattern": false, + "CanvasRenderingContext2D": false, + "CaptureController": false, + "CaretPosition": false, + "CDATASection": false, + "ChannelMergerNode": false, + "ChannelSplitterNode": false, + "ChapterInformation": false, + "CharacterBoundsUpdateEvent": false, + "CharacterData": false, + "clearInterval": false, + "clearTimeout": false, + "clientInformation": false, + "Clipboard": false, + "ClipboardChangeEvent": false, + "ClipboardEvent": false, + "ClipboardItem": false, + "close": false, + "closed": false, + "CloseEvent": false, + "CloseWatcher": false, + "CommandEvent": false, + "Comment": false, + "CompositionEvent": false, + "CompressionStream": false, + "confirm": false, + "console": false, + "ConstantSourceNode": false, + "ContentVisibilityAutoStateChangeEvent": false, + "ConvolverNode": false, + "CookieChangeEvent": false, + "CookieDeprecationLabel": false, + "cookieStore": false, + "CookieStore": false, + "CookieStoreManager": false, + "CountQueuingStrategy": false, + "createImageBitmap": false, + "CreateMonitor": false, + "Credential": false, + "credentialless": false, + "CredentialsContainer": false, + "CropTarget": false, + "crossOriginIsolated": false, + "crypto": false, + "Crypto": false, + "CryptoKey": false, + "CSPViolationReportBody": false, + "CSS": false, + "CSSAnimation": false, + "CSSConditionRule": false, + "CSSContainerRule": false, + "CSSCounterStyleRule": false, + "CSSFontFaceRule": false, + "CSSFontFeatureValuesRule": false, + "CSSFontPaletteValuesRule": false, + "CSSFunctionDeclarations": false, + "CSSFunctionDescriptors": false, + "CSSFunctionRule": false, + "CSSGroupingRule": false, + "CSSImageValue": false, + "CSSImportRule": false, + "CSSKeyframeRule": false, + "CSSKeyframesRule": false, + "CSSKeywordValue": false, + "CSSLayerBlockRule": false, + "CSSLayerStatementRule": false, + "CSSMarginRule": false, + "CSSMathClamp": false, + "CSSMathInvert": false, + "CSSMathMax": false, + "CSSMathMin": false, + "CSSMathNegate": false, + "CSSMathProduct": false, + "CSSMathSum": false, + "CSSMathValue": false, + "CSSMatrixComponent": false, + "CSSMediaRule": false, + "CSSNamespaceRule": false, + "CSSNestedDeclarations": false, + "CSSNumericArray": false, + "CSSNumericValue": false, + "CSSPageDescriptors": false, + "CSSPageRule": false, + "CSSPerspective": false, + "CSSPositionTryDescriptors": false, + "CSSPositionTryRule": false, + "CSSPositionValue": false, + "CSSPropertyRule": false, + "CSSRotate": false, + "CSSRule": false, + "CSSRuleList": false, + "CSSScale": false, + "CSSScopeRule": false, + "CSSSkew": false, + "CSSSkewX": false, + "CSSSkewY": false, + "CSSStartingStyleRule": false, + "CSSStyleDeclaration": false, + "CSSStyleRule": false, + "CSSStyleSheet": false, + "CSSStyleValue": false, + "CSSSupportsRule": false, + "CSSTransformComponent": false, + "CSSTransformValue": false, + "CSSTransition": false, + "CSSTranslate": false, + "CSSUnitValue": false, + "CSSUnparsedValue": false, + "CSSVariableReferenceValue": false, + "CSSViewTransitionRule": false, + "currentFrame": false, + "currentTime": false, + "CustomElementRegistry": false, + "customElements": false, + "CustomEvent": false, + "CustomStateSet": false, + "DataTransfer": false, + "DataTransferItem": false, + "DataTransferItemList": false, + "DecompressionStream": false, + "DelayNode": false, + "DelegatedInkTrailPresenter": false, + "DeviceMotionEvent": false, + "DeviceMotionEventAcceleration": false, + "DeviceMotionEventRotationRate": false, + "DeviceOrientationEvent": false, + "devicePixelRatio": false, + "DevicePosture": false, + "DigitalCredential": false, + "dispatchEvent": false, + "DisposableStack": false, + "document": false, + "Document": false, + "DocumentFragment": false, + "documentPictureInPicture": false, + "DocumentPictureInPicture": false, + "DocumentPictureInPictureEvent": false, + "DocumentTimeline": false, + "DocumentType": false, + "DOMError": false, + "DOMException": false, + "DOMImplementation": false, + "DOMMatrix": false, + "DOMMatrixReadOnly": false, + "DOMParser": false, + "DOMPoint": false, + "DOMPointReadOnly": false, + "DOMQuad": false, + "DOMRect": false, + "DOMRectList": false, + "DOMRectReadOnly": false, + "DOMStringList": false, + "DOMStringMap": false, + "DOMTokenList": false, + "DragEvent": false, + "DynamicsCompressorNode": false, + "EditContext": false, + "Element": false, + "ElementInternals": false, + "EncodedAudioChunk": false, + "EncodedVideoChunk": false, + "ErrorEvent": false, + "event": false, + "Event": false, + "EventCounts": false, + "EventSource": false, + "EventTarget": false, + "external": false, + "External": false, + "EyeDropper": false, + "FeaturePolicy": false, + "FederatedCredential": false, + "fence": false, + "Fence": false, + "FencedFrameConfig": false, + "fetch": false, + "fetchLater": false, + "FetchLaterResult": false, + "File": false, + "FileList": false, + "FileReader": false, + "FileSystem": false, + "FileSystemDirectoryEntry": false, + "FileSystemDirectoryHandle": false, + "FileSystemDirectoryReader": false, + "FileSystemEntry": false, + "FileSystemFileEntry": false, + "FileSystemFileHandle": false, + "FileSystemHandle": false, + "FileSystemObserver": false, + "FileSystemWritableFileStream": false, + "find": false, + "focus": false, + "FocusEvent": false, + "FontData": false, + "FontFace": false, + "FontFaceSet": false, + "FontFaceSetLoadEvent": false, + "FormData": false, + "FormDataEvent": false, + "FragmentDirective": false, + "frameElement": false, + "frames": false, + "GainNode": false, + "Gamepad": false, + "GamepadAxisMoveEvent": false, + "GamepadButton": false, + "GamepadButtonEvent": false, + "GamepadEvent": false, + "GamepadHapticActuator": false, + "GamepadPose": false, + "Geolocation": false, + "GeolocationCoordinates": false, + "GeolocationPosition": false, + "GeolocationPositionError": false, + "getComputedStyle": false, + "getScreenDetails": false, + "getSelection": false, + "GPU": false, + "GPUAdapter": false, + "GPUAdapterInfo": false, + "GPUBindGroup": false, + "GPUBindGroupLayout": false, + "GPUBuffer": false, + "GPUBufferUsage": false, + "GPUCanvasContext": false, + "GPUColorWrite": false, + "GPUCommandBuffer": false, + "GPUCommandEncoder": false, + "GPUCompilationInfo": false, + "GPUCompilationMessage": false, + "GPUComputePassEncoder": false, + "GPUComputePipeline": false, + "GPUDevice": false, + "GPUDeviceLostInfo": false, + "GPUError": false, + "GPUExternalTexture": false, + "GPUInternalError": false, + "GPUMapMode": false, + "GPUOutOfMemoryError": false, + "GPUPipelineError": false, + "GPUPipelineLayout": false, + "GPUQuerySet": false, + "GPUQueue": false, + "GPURenderBundle": false, + "GPURenderBundleEncoder": false, + "GPURenderPassEncoder": false, + "GPURenderPipeline": false, + "GPUSampler": false, + "GPUShaderModule": false, + "GPUShaderStage": false, + "GPUSupportedFeatures": false, + "GPUSupportedLimits": false, + "GPUTexture": false, + "GPUTextureUsage": false, + "GPUTextureView": false, + "GPUUncapturedErrorEvent": false, + "GPUValidationError": false, + "GravitySensor": false, + "Gyroscope": false, + "HashChangeEvent": false, + "Headers": false, + "HID": false, + "HIDConnectionEvent": false, + "HIDDevice": false, + "HIDInputReportEvent": false, + "Highlight": false, + "HighlightRegistry": false, + "history": false, + "History": false, + "HTMLAllCollection": false, + "HTMLAnchorElement": false, + "HTMLAreaElement": false, + "HTMLAudioElement": false, + "HTMLBaseElement": false, + "HTMLBodyElement": false, + "HTMLBRElement": false, + "HTMLButtonElement": false, + "HTMLCanvasElement": false, + "HTMLCollection": false, + "HTMLDataElement": false, + "HTMLDataListElement": false, + "HTMLDetailsElement": false, + "HTMLDialogElement": false, + "HTMLDirectoryElement": false, + "HTMLDivElement": false, + "HTMLDListElement": false, + "HTMLDocument": false, + "HTMLElement": false, + "HTMLEmbedElement": false, + "HTMLFencedFrameElement": false, + "HTMLFieldSetElement": false, + "HTMLFontElement": false, + "HTMLFormControlsCollection": false, + "HTMLFormElement": false, + "HTMLFrameElement": false, + "HTMLFrameSetElement": false, + "HTMLHeadElement": false, + "HTMLHeadingElement": false, + "HTMLHRElement": false, + "HTMLHtmlElement": false, + "HTMLIFrameElement": false, + "HTMLImageElement": false, + "HTMLInputElement": false, + "HTMLLabelElement": false, + "HTMLLegendElement": false, + "HTMLLIElement": false, + "HTMLLinkElement": false, + "HTMLMapElement": false, + "HTMLMarqueeElement": false, + "HTMLMediaElement": false, + "HTMLMenuElement": false, + "HTMLMetaElement": false, + "HTMLMeterElement": false, + "HTMLModElement": false, + "HTMLObjectElement": false, + "HTMLOListElement": false, + "HTMLOptGroupElement": false, + "HTMLOptionElement": false, + "HTMLOptionsCollection": false, + "HTMLOutputElement": false, + "HTMLParagraphElement": false, + "HTMLParamElement": false, + "HTMLPictureElement": false, + "HTMLPreElement": false, + "HTMLProgressElement": false, + "HTMLQuoteElement": false, + "HTMLScriptElement": false, + "HTMLSelectedContentElement": false, + "HTMLSelectElement": false, + "HTMLSlotElement": false, + "HTMLSourceElement": false, + "HTMLSpanElement": false, + "HTMLStyleElement": false, + "HTMLTableCaptionElement": false, + "HTMLTableCellElement": false, + "HTMLTableColElement": false, + "HTMLTableElement": false, + "HTMLTableRowElement": false, + "HTMLTableSectionElement": false, + "HTMLTemplateElement": false, + "HTMLTextAreaElement": false, + "HTMLTimeElement": false, + "HTMLTitleElement": false, + "HTMLTrackElement": false, + "HTMLUListElement": false, + "HTMLUnknownElement": false, + "HTMLVideoElement": false, + "IDBCursor": false, + "IDBCursorWithValue": false, + "IDBDatabase": false, + "IDBFactory": false, + "IDBIndex": false, + "IDBKeyRange": false, + "IDBObjectStore": false, + "IDBOpenDBRequest": false, + "IDBRecord": false, + "IDBRequest": false, + "IDBTransaction": false, + "IDBVersionChangeEvent": false, + "IdentityCredential": false, + "IdentityCredentialError": false, + "IdentityProvider": false, + "IdleDeadline": false, + "IdleDetector": false, + "IIRFilterNode": false, + "Image": false, + "ImageBitmap": false, + "ImageBitmapRenderingContext": false, + "ImageCapture": false, + "ImageData": false, + "ImageDecoder": false, + "ImageTrack": false, + "ImageTrackList": false, + "indexedDB": false, + "Ink": false, + "innerHeight": false, + "innerWidth": false, + "InputDeviceCapabilities": false, + "InputDeviceInfo": false, + "InputEvent": false, + "IntegrityViolationReportBody": false, + "InterestEvent": false, + "IntersectionObserver": false, + "IntersectionObserverEntry": false, + "isSecureContext": false, + "Keyboard": false, + "KeyboardEvent": false, + "KeyboardLayoutMap": false, + "KeyframeEffect": false, + "LanguageDetector": false, + "LargestContentfulPaint": false, + "LaunchParams": false, + "launchQueue": false, + "LaunchQueue": false, + "LayoutShift": false, + "LayoutShiftAttribution": false, + "length": false, + "LinearAccelerationSensor": false, + "localStorage": false, + "location": true, + "Location": false, + "locationbar": false, + "Lock": false, + "LockManager": false, + "matchMedia": false, + "MathMLElement": false, + "MediaCapabilities": false, + "MediaCapabilitiesInfo": false, + "MediaDeviceInfo": false, + "MediaDevices": false, + "MediaElementAudioSourceNode": false, + "MediaEncryptedEvent": false, + "MediaError": false, + "MediaKeyError": false, + "MediaKeyMessageEvent": false, + "MediaKeys": false, + "MediaKeySession": false, + "MediaKeyStatusMap": false, + "MediaKeySystemAccess": false, + "MediaList": false, + "MediaMetadata": false, + "MediaQueryList": false, + "MediaQueryListEvent": false, + "MediaRecorder": false, + "MediaRecorderErrorEvent": false, + "MediaSession": false, + "MediaSource": false, + "MediaSourceHandle": false, + "MediaStream": false, + "MediaStreamAudioDestinationNode": false, + "MediaStreamAudioSourceNode": false, + "MediaStreamEvent": false, + "MediaStreamTrack": false, + "MediaStreamTrackAudioSourceNode": false, + "MediaStreamTrackAudioStats": false, + "MediaStreamTrackEvent": false, + "MediaStreamTrackGenerator": false, + "MediaStreamTrackProcessor": false, + "MediaStreamTrackVideoStats": false, + "menubar": false, + "MessageChannel": false, + "MessageEvent": false, + "MessagePort": false, + "MIDIAccess": false, + "MIDIConnectionEvent": false, + "MIDIInput": false, + "MIDIInputMap": false, + "MIDIMessageEvent": false, + "MIDIOutput": false, + "MIDIOutputMap": false, + "MIDIPort": false, + "MimeType": false, + "MimeTypeArray": false, + "model": false, + "ModelGenericSession": false, + "ModelManager": false, + "MouseEvent": false, + "moveBy": false, + "moveTo": false, + "MutationEvent": false, + "MutationObserver": false, + "MutationRecord": false, + "name": false, + "NamedNodeMap": false, + "NavigateEvent": false, + "navigation": false, + "Navigation": false, + "NavigationActivation": false, + "NavigationCurrentEntryChangeEvent": false, + "NavigationDestination": false, + "NavigationHistoryEntry": false, + "NavigationPrecommitController": false, + "NavigationPreloadManager": false, + "NavigationTransition": false, + "navigator": false, + "Navigator": false, + "NavigatorLogin": false, + "NavigatorManagedData": false, + "NavigatorUAData": false, + "NetworkInformation": false, + "Node": false, + "NodeFilter": false, + "NodeIterator": false, + "NodeList": false, + "Notification": false, + "NotifyPaintEvent": false, + "NotRestoredReasonDetails": false, + "NotRestoredReasons": false, + "Observable": false, + "OfflineAudioCompletionEvent": false, + "OfflineAudioContext": false, + "offscreenBuffering": false, + "OffscreenCanvas": false, + "OffscreenCanvasRenderingContext2D": false, + "onabort": true, + "onafterprint": true, + "onanimationcancel": true, + "onanimationend": true, + "onanimationiteration": true, + "onanimationstart": true, + "onappinstalled": true, + "onauxclick": true, + "onbeforeinput": true, + "onbeforeinstallprompt": true, + "onbeforematch": true, + "onbeforeprint": true, + "onbeforetoggle": true, + "onbeforeunload": true, + "onbeforexrselect": true, + "onblur": true, + "oncancel": true, + "oncanplay": true, + "oncanplaythrough": true, + "onchange": true, + "onclick": true, + "onclose": true, + "oncommand": true, + "oncontentvisibilityautostatechange": true, + "oncontextlost": true, + "oncontextmenu": true, + "oncontextrestored": true, + "oncopy": true, + "oncuechange": true, + "oncut": true, + "ondblclick": true, + "ondevicemotion": true, + "ondeviceorientation": true, + "ondeviceorientationabsolute": true, + "ondrag": true, + "ondragend": true, + "ondragenter": true, + "ondragleave": true, + "ondragover": true, + "ondragstart": true, + "ondrop": true, + "ondurationchange": true, + "onemptied": true, + "onended": true, + "onerror": true, + "onfocus": true, + "onformdata": true, + "ongamepadconnected": true, + "ongamepaddisconnected": true, + "ongotpointercapture": true, + "onhashchange": true, + "oninput": true, + "oninvalid": true, + "onkeydown": true, + "onkeypress": true, + "onkeyup": true, + "onlanguagechange": true, + "onload": true, + "onloadeddata": true, + "onloadedmetadata": true, + "onloadstart": true, + "onlostpointercapture": true, + "onmessage": true, + "onmessageerror": true, + "onmousedown": true, + "onmouseenter": true, + "onmouseleave": true, + "onmousemove": true, + "onmouseout": true, + "onmouseover": true, + "onmouseup": true, + "onmousewheel": true, + "onoffline": true, + "ononline": true, + "onpagehide": true, + "onpagereveal": true, + "onpageshow": true, + "onpageswap": true, + "onpaste": true, + "onpause": true, + "onplay": true, + "onplaying": true, + "onpointercancel": true, + "onpointerdown": true, + "onpointerenter": true, + "onpointerleave": true, + "onpointermove": true, + "onpointerout": true, + "onpointerover": true, + "onpointerrawupdate": true, + "onpointerup": true, + "onpopstate": true, + "onprogress": true, + "onratechange": true, + "onrejectionhandled": true, + "onreset": true, + "onresize": true, + "onscroll": true, + "onscrollend": true, + "onscrollsnapchange": true, + "onscrollsnapchanging": true, + "onsearch": true, + "onsecuritypolicyviolation": true, + "onseeked": true, + "onseeking": true, + "onselect": true, + "onselectionchange": true, + "onselectstart": true, + "onslotchange": true, + "onstalled": true, + "onstorage": true, + "onsubmit": true, + "onsuspend": true, + "ontimeupdate": true, + "ontoggle": true, + "ontransitioncancel": true, + "ontransitionend": true, + "ontransitionrun": true, + "ontransitionstart": true, + "onunhandledrejection": true, + "onunload": true, + "onvolumechange": true, + "onwaiting": true, + "onwheel": true, + "open": false, + "opener": false, + "Option": false, + "OrientationSensor": false, + "origin": false, + "originAgentCluster": false, + "OscillatorNode": false, + "OTPCredential": false, + "outerHeight": false, + "outerWidth": false, + "OverconstrainedError": false, + "PageRevealEvent": false, + "PageSwapEvent": false, + "PageTransitionEvent": false, + "pageXOffset": false, + "pageYOffset": false, + "PannerNode": false, + "parent": false, + "PasswordCredential": false, + "Path2D": false, + "PaymentAddress": false, + "PaymentManager": false, + "PaymentMethodChangeEvent": false, + "PaymentRequest": false, + "PaymentRequestUpdateEvent": false, + "PaymentResponse": false, + "performance": false, + "Performance": false, + "PerformanceElementTiming": false, + "PerformanceEntry": false, + "PerformanceEventTiming": false, + "PerformanceLongAnimationFrameTiming": false, + "PerformanceLongTaskTiming": false, + "PerformanceMark": false, + "PerformanceMeasure": false, + "PerformanceNavigation": false, + "PerformanceNavigationTiming": false, + "PerformanceObserver": false, + "PerformanceObserverEntryList": false, + "PerformancePaintTiming": false, + "PerformanceResourceTiming": false, + "PerformanceScriptTiming": false, + "PerformanceServerTiming": false, + "PerformanceTiming": false, + "PeriodicSyncManager": false, + "PeriodicWave": false, + "Permissions": false, + "PermissionStatus": false, + "PERSISTENT": false, + "personalbar": false, + "PictureInPictureEvent": false, + "PictureInPictureWindow": false, + "Plugin": false, + "PluginArray": false, + "PointerEvent": false, + "PopStateEvent": false, + "postMessage": false, + "Presentation": false, + "PresentationAvailability": false, + "PresentationConnection": false, + "PresentationConnectionAvailableEvent": false, + "PresentationConnectionCloseEvent": false, + "PresentationConnectionList": false, + "PresentationReceiver": false, + "PresentationRequest": false, + "PressureObserver": false, + "PressureRecord": false, + "print": false, + "ProcessingInstruction": false, + "Profiler": false, + "ProgressEvent": false, + "PromiseRejectionEvent": false, + "prompt": false, + "ProtectedAudience": false, + "PublicKeyCredential": false, + "PushManager": false, + "PushSubscription": false, + "PushSubscriptionOptions": false, + "queryLocalFonts": false, + "queueMicrotask": false, + "QuotaExceededError": false, + "RadioNodeList": false, + "Range": false, + "ReadableByteStreamController": false, + "ReadableStream": false, + "ReadableStreamBYOBReader": false, + "ReadableStreamBYOBRequest": false, + "ReadableStreamDefaultController": false, + "ReadableStreamDefaultReader": false, + "registerProcessor": false, + "RelativeOrientationSensor": false, + "RemotePlayback": false, + "removeEventListener": false, + "ReportBody": false, + "reportError": false, + "ReportingObserver": false, + "Request": false, + "requestAnimationFrame": false, + "requestIdleCallback": false, + "resizeBy": false, + "ResizeObserver": false, + "ResizeObserverEntry": false, + "ResizeObserverSize": false, + "resizeTo": false, + "Response": false, + "RestrictionTarget": false, + "RTCCertificate": false, + "RTCDataChannel": false, + "RTCDataChannelEvent": false, + "RTCDtlsTransport": false, + "RTCDTMFSender": false, + "RTCDTMFToneChangeEvent": false, + "RTCEncodedAudioFrame": false, + "RTCEncodedVideoFrame": false, + "RTCError": false, + "RTCErrorEvent": false, + "RTCIceCandidate": false, + "RTCIceTransport": false, + "RTCPeerConnection": false, + "RTCPeerConnectionIceErrorEvent": false, + "RTCPeerConnectionIceEvent": false, + "RTCRtpReceiver": false, + "RTCRtpScriptTransform": false, + "RTCRtpSender": false, + "RTCRtpTransceiver": false, + "RTCSctpTransport": false, + "RTCSessionDescription": false, + "RTCStatsReport": false, + "RTCTrackEvent": false, + "sampleRate": false, + "scheduler": false, + "Scheduler": false, + "Scheduling": false, + "screen": false, + "Screen": false, + "ScreenDetailed": false, + "ScreenDetails": false, + "screenLeft": false, + "ScreenOrientation": false, + "screenTop": false, + "screenX": false, + "screenY": false, + "ScriptProcessorNode": false, + "scroll": false, + "scrollbars": false, + "scrollBy": false, + "ScrollTimeline": false, + "scrollTo": false, + "scrollX": false, + "scrollY": false, + "SecurityPolicyViolationEvent": false, + "Selection": false, + "self": false, + "Sensor": false, + "SensorErrorEvent": false, + "Serial": false, + "SerialPort": false, + "ServiceWorker": false, + "ServiceWorkerContainer": false, + "ServiceWorkerRegistration": false, + "sessionStorage": false, + "setInterval": false, + "setTimeout": false, + "ShadowRoot": false, + "sharedStorage": false, + "SharedStorage": false, + "SharedStorageAppendMethod": false, + "SharedStorageClearMethod": false, + "SharedStorageDeleteMethod": false, + "SharedStorageModifierMethod": false, + "SharedStorageSetMethod": false, + "SharedStorageWorklet": false, + "SharedWorker": false, + "showDirectoryPicker": false, + "showOpenFilePicker": false, + "showSaveFilePicker": false, + "SnapEvent": false, + "SourceBuffer": false, + "SourceBufferList": false, + "SpeechGrammar": false, + "SpeechGrammarList": false, + "SpeechRecognition": false, + "SpeechRecognitionErrorEvent": false, + "SpeechRecognitionEvent": false, + "SpeechRecognitionPhrase": false, + "speechSynthesis": false, + "SpeechSynthesis": false, + "SpeechSynthesisErrorEvent": false, + "SpeechSynthesisEvent": false, + "SpeechSynthesisUtterance": false, + "SpeechSynthesisVoice": false, + "StaticRange": false, + "status": false, + "statusbar": false, + "StereoPannerNode": false, + "stop": false, + "Storage": false, + "StorageBucket": false, + "StorageBucketManager": false, + "StorageEvent": false, + "StorageManager": false, + "structuredClone": false, + "styleMedia": false, + "StylePropertyMap": false, + "StylePropertyMapReadOnly": false, + "StyleSheet": false, + "StyleSheetList": false, + "SubmitEvent": false, + "Subscriber": false, + "SubtleCrypto": false, + "Summarizer": false, + "SuppressedError": false, + "SVGAElement": false, + "SVGAngle": false, + "SVGAnimatedAngle": false, + "SVGAnimatedBoolean": false, + "SVGAnimatedEnumeration": false, + "SVGAnimatedInteger": false, + "SVGAnimatedLength": false, + "SVGAnimatedLengthList": false, + "SVGAnimatedNumber": false, + "SVGAnimatedNumberList": false, + "SVGAnimatedPreserveAspectRatio": false, + "SVGAnimatedRect": false, + "SVGAnimatedString": false, + "SVGAnimatedTransformList": false, + "SVGAnimateElement": false, + "SVGAnimateMotionElement": false, + "SVGAnimateTransformElement": false, + "SVGAnimationElement": false, + "SVGCircleElement": false, + "SVGClipPathElement": false, + "SVGComponentTransferFunctionElement": false, + "SVGDefsElement": false, + "SVGDescElement": false, + "SVGElement": false, + "SVGEllipseElement": false, + "SVGFEBlendElement": false, + "SVGFEColorMatrixElement": false, + "SVGFEComponentTransferElement": false, + "SVGFECompositeElement": false, + "SVGFEConvolveMatrixElement": false, + "SVGFEDiffuseLightingElement": false, + "SVGFEDisplacementMapElement": false, + "SVGFEDistantLightElement": false, + "SVGFEDropShadowElement": false, + "SVGFEFloodElement": false, + "SVGFEFuncAElement": false, + "SVGFEFuncBElement": false, + "SVGFEFuncGElement": false, + "SVGFEFuncRElement": false, + "SVGFEGaussianBlurElement": false, + "SVGFEImageElement": false, + "SVGFEMergeElement": false, + "SVGFEMergeNodeElement": false, + "SVGFEMorphologyElement": false, + "SVGFEOffsetElement": false, + "SVGFEPointLightElement": false, + "SVGFESpecularLightingElement": false, + "SVGFESpotLightElement": false, + "SVGFETileElement": false, + "SVGFETurbulenceElement": false, + "SVGFilterElement": false, + "SVGForeignObjectElement": false, + "SVGGElement": false, + "SVGGeometryElement": false, + "SVGGradientElement": false, + "SVGGraphicsElement": false, + "SVGImageElement": false, + "SVGLength": false, + "SVGLengthList": false, + "SVGLinearGradientElement": false, + "SVGLineElement": false, + "SVGMarkerElement": false, + "SVGMaskElement": false, + "SVGMatrix": false, + "SVGMetadataElement": false, + "SVGMPathElement": false, + "SVGNumber": false, + "SVGNumberList": false, + "SVGPathElement": false, + "SVGPatternElement": false, + "SVGPoint": false, + "SVGPointList": false, + "SVGPolygonElement": false, + "SVGPolylineElement": false, + "SVGPreserveAspectRatio": false, + "SVGRadialGradientElement": false, + "SVGRect": false, + "SVGRectElement": false, + "SVGScriptElement": false, + "SVGSetElement": false, + "SVGStopElement": false, + "SVGStringList": false, + "SVGStyleElement": false, + "SVGSVGElement": false, + "SVGSwitchElement": false, + "SVGSymbolElement": false, + "SVGTextContentElement": false, + "SVGTextElement": false, + "SVGTextPathElement": false, + "SVGTextPositioningElement": false, + "SVGTitleElement": false, + "SVGTransform": false, + "SVGTransformList": false, + "SVGTSpanElement": false, + "SVGUnitTypes": false, + "SVGUseElement": false, + "SVGViewElement": false, + "SyncManager": false, + "TaskAttributionTiming": false, + "TaskController": false, + "TaskPriorityChangeEvent": false, + "TaskSignal": false, + "TEMPORARY": false, + "Text": false, + "TextDecoder": false, + "TextDecoderStream": false, + "TextEncoder": false, + "TextEncoderStream": false, + "TextEvent": false, + "TextFormat": false, + "TextFormatUpdateEvent": false, + "TextMetrics": false, + "TextTrack": false, + "TextTrackCue": false, + "TextTrackCueList": false, + "TextTrackList": false, + "TextUpdateEvent": false, + "TimeEvent": false, + "TimeRanges": false, + "ToggleEvent": false, + "toolbar": false, + "top": false, + "Touch": false, + "TouchEvent": false, + "TouchList": false, + "TrackEvent": false, + "TransformStream": false, + "TransformStreamDefaultController": false, + "TransitionEvent": false, + "Translator": false, + "TreeWalker": false, + "TrustedHTML": false, + "TrustedScript": false, + "TrustedScriptURL": false, + "TrustedTypePolicy": false, + "TrustedTypePolicyFactory": false, + "trustedTypes": false, + "UIEvent": false, + "URL": false, + "URLPattern": false, + "URLSearchParams": false, + "USB": false, + "USBAlternateInterface": false, + "USBConfiguration": false, + "USBConnectionEvent": false, + "USBDevice": false, + "USBEndpoint": false, + "USBInterface": false, + "USBInTransferResult": false, + "USBIsochronousInTransferPacket": false, + "USBIsochronousInTransferResult": false, + "USBIsochronousOutTransferPacket": false, + "USBIsochronousOutTransferResult": false, + "USBOutTransferResult": false, + "UserActivation": false, + "ValidityState": false, + "VideoColorSpace": false, + "VideoDecoder": false, + "VideoEncoder": false, + "VideoFrame": false, + "VideoPlaybackQuality": false, + "viewport": false, + "Viewport": false, + "ViewTimeline": false, + "ViewTransition": false, + "ViewTransitionTypeSet": false, + "VirtualKeyboard": false, + "VirtualKeyboardGeometryChangeEvent": false, + "VisibilityStateEntry": false, + "visualViewport": false, + "VisualViewport": false, + "VTTCue": false, + "VTTRegion": false, + "WakeLock": false, + "WakeLockSentinel": false, + "WaveShaperNode": false, + "WebAssembly": false, + "WebGL2RenderingContext": false, + "WebGLActiveInfo": false, + "WebGLBuffer": false, + "WebGLContextEvent": false, + "WebGLFramebuffer": false, + "WebGLObject": false, + "WebGLProgram": false, + "WebGLQuery": false, + "WebGLRenderbuffer": false, + "WebGLRenderingContext": false, + "WebGLSampler": false, + "WebGLShader": false, + "WebGLShaderPrecisionFormat": false, + "WebGLSync": false, + "WebGLTexture": false, + "WebGLTransformFeedback": false, + "WebGLUniformLocation": false, + "WebGLVertexArrayObject": false, + "WebSocket": false, + "WebSocketError": false, + "WebSocketStream": false, + "WebTransport": false, + "WebTransportBidirectionalStream": false, + "WebTransportDatagramDuplexStream": false, + "WebTransportError": false, + "WebTransportReceiveStream": false, + "WebTransportSendStream": false, + "WGSLLanguageFeatures": false, + "WheelEvent": false, + "when": false, + "window": false, + "Window": false, + "WindowControlsOverlay": false, + "WindowControlsOverlayGeometryChangeEvent": false, + "Worker": false, + "Worklet": false, + "WorkletGlobalScope": false, + "WritableStream": false, + "WritableStreamDefaultController": false, + "WritableStreamDefaultWriter": false, + "XMLDocument": false, + "XMLHttpRequest": false, + "XMLHttpRequestEventTarget": false, + "XMLHttpRequestUpload": false, + "XMLSerializer": false, + "XPathEvaluator": false, + "XPathExpression": false, + "XPathResult": false, + "XRAnchor": false, + "XRAnchorSet": false, + "XRBoundedReferenceSpace": false, + "XRCamera": false, + "XRCPUDepthInformation": false, + "XRDepthInformation": false, + "XRDOMOverlayState": false, + "XRFrame": false, + "XRHand": false, + "XRHitTestResult": false, + "XRHitTestSource": false, + "XRInputSource": false, + "XRInputSourceArray": false, + "XRInputSourceEvent": false, + "XRInputSourcesChangeEvent": false, + "XRJointPose": false, + "XRJointSpace": false, + "XRLayer": false, + "XRLightEstimate": false, + "XRLightProbe": false, + "XRPose": false, + "XRRay": false, + "XRReferenceSpace": false, + "XRReferenceSpaceEvent": false, + "XRRenderState": false, + "XRRigidTransform": false, + "XRSession": false, + "XRSessionEvent": false, + "XRSpace": false, + "XRSystem": false, + "XRTransientInputHitTestResult": false, + "XRTransientInputHitTestSource": false, + "XRView": false, + "XRViewerPose": false, + "XRViewport": false, + "XRWebGLBinding": false, + "XRWebGLDepthInformation": false, + "XRWebGLLayer": false, + "XSLTProcessor": false + } + }, + "errors": [ + { + "messageId": "noShadowGlobal", + "data": { + "name": "top" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-shadow > invalid + +```js +var top = 0; +``` + +```json +{ + "options": [ + { + "builtinGlobals": true + } + ], + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module", + "globals": { + "AbortController": false, + "AbortSignal": false, + "AbsoluteOrientationSensor": false, + "AbstractRange": false, + "Accelerometer": false, + "addEventListener": false, + "ai": false, + "AI": false, + "AICreateMonitor": false, + "AITextSession": false, + "alert": false, + "AnalyserNode": false, + "Animation": false, + "AnimationEffect": false, + "AnimationEvent": false, + "AnimationPlaybackEvent": false, + "AnimationTimeline": false, + "AsyncDisposableStack": false, + "atob": false, + "Attr": false, + "Audio": false, + "AudioBuffer": false, + "AudioBufferSourceNode": false, + "AudioContext": false, + "AudioData": false, + "AudioDecoder": false, + "AudioDestinationNode": false, + "AudioEncoder": false, + "AudioListener": false, + "AudioNode": false, + "AudioParam": false, + "AudioParamMap": false, + "AudioProcessingEvent": false, + "AudioScheduledSourceNode": false, + "AudioSinkInfo": false, + "AudioWorklet": false, + "AudioWorkletGlobalScope": false, + "AudioWorkletNode": false, + "AudioWorkletProcessor": false, + "AuthenticatorAssertionResponse": false, + "AuthenticatorAttestationResponse": false, + "AuthenticatorResponse": false, + "BackgroundFetchManager": false, + "BackgroundFetchRecord": false, + "BackgroundFetchRegistration": false, + "BarcodeDetector": false, + "BarProp": false, + "BaseAudioContext": false, + "BatteryManager": false, + "BeforeUnloadEvent": false, + "BiquadFilterNode": false, + "Blob": false, + "BlobEvent": false, + "Bluetooth": false, + "BluetoothCharacteristicProperties": false, + "BluetoothDevice": false, + "BluetoothRemoteGATTCharacteristic": false, + "BluetoothRemoteGATTDescriptor": false, + "BluetoothRemoteGATTServer": false, + "BluetoothRemoteGATTService": false, + "BluetoothUUID": false, + "blur": false, + "BroadcastChannel": false, + "BrowserCaptureMediaStreamTrack": false, + "btoa": false, + "ByteLengthQueuingStrategy": false, + "Cache": false, + "caches": false, + "CacheStorage": false, + "cancelAnimationFrame": false, + "cancelIdleCallback": false, + "CanvasCaptureMediaStream": false, + "CanvasCaptureMediaStreamTrack": false, + "CanvasGradient": false, + "CanvasPattern": false, + "CanvasRenderingContext2D": false, + "CaptureController": false, + "CaretPosition": false, + "CDATASection": false, + "ChannelMergerNode": false, + "ChannelSplitterNode": false, + "ChapterInformation": false, + "CharacterBoundsUpdateEvent": false, + "CharacterData": false, + "clearInterval": false, + "clearTimeout": false, + "clientInformation": false, + "Clipboard": false, + "ClipboardChangeEvent": false, + "ClipboardEvent": false, + "ClipboardItem": false, + "close": false, + "closed": false, + "CloseEvent": false, + "CloseWatcher": false, + "CommandEvent": false, + "Comment": false, + "CompositionEvent": false, + "CompressionStream": false, + "confirm": false, + "console": false, + "ConstantSourceNode": false, + "ContentVisibilityAutoStateChangeEvent": false, + "ConvolverNode": false, + "CookieChangeEvent": false, + "CookieDeprecationLabel": false, + "cookieStore": false, + "CookieStore": false, + "CookieStoreManager": false, + "CountQueuingStrategy": false, + "createImageBitmap": false, + "CreateMonitor": false, + "Credential": false, + "credentialless": false, + "CredentialsContainer": false, + "CropTarget": false, + "crossOriginIsolated": false, + "crypto": false, + "Crypto": false, + "CryptoKey": false, + "CSPViolationReportBody": false, + "CSS": false, + "CSSAnimation": false, + "CSSConditionRule": false, + "CSSContainerRule": false, + "CSSCounterStyleRule": false, + "CSSFontFaceRule": false, + "CSSFontFeatureValuesRule": false, + "CSSFontPaletteValuesRule": false, + "CSSFunctionDeclarations": false, + "CSSFunctionDescriptors": false, + "CSSFunctionRule": false, + "CSSGroupingRule": false, + "CSSImageValue": false, + "CSSImportRule": false, + "CSSKeyframeRule": false, + "CSSKeyframesRule": false, + "CSSKeywordValue": false, + "CSSLayerBlockRule": false, + "CSSLayerStatementRule": false, + "CSSMarginRule": false, + "CSSMathClamp": false, + "CSSMathInvert": false, + "CSSMathMax": false, + "CSSMathMin": false, + "CSSMathNegate": false, + "CSSMathProduct": false, + "CSSMathSum": false, + "CSSMathValue": false, + "CSSMatrixComponent": false, + "CSSMediaRule": false, + "CSSNamespaceRule": false, + "CSSNestedDeclarations": false, + "CSSNumericArray": false, + "CSSNumericValue": false, + "CSSPageDescriptors": false, + "CSSPageRule": false, + "CSSPerspective": false, + "CSSPositionTryDescriptors": false, + "CSSPositionTryRule": false, + "CSSPositionValue": false, + "CSSPropertyRule": false, + "CSSRotate": false, + "CSSRule": false, + "CSSRuleList": false, + "CSSScale": false, + "CSSScopeRule": false, + "CSSSkew": false, + "CSSSkewX": false, + "CSSSkewY": false, + "CSSStartingStyleRule": false, + "CSSStyleDeclaration": false, + "CSSStyleRule": false, + "CSSStyleSheet": false, + "CSSStyleValue": false, + "CSSSupportsRule": false, + "CSSTransformComponent": false, + "CSSTransformValue": false, + "CSSTransition": false, + "CSSTranslate": false, + "CSSUnitValue": false, + "CSSUnparsedValue": false, + "CSSVariableReferenceValue": false, + "CSSViewTransitionRule": false, + "currentFrame": false, + "currentTime": false, + "CustomElementRegistry": false, + "customElements": false, + "CustomEvent": false, + "CustomStateSet": false, + "DataTransfer": false, + "DataTransferItem": false, + "DataTransferItemList": false, + "DecompressionStream": false, + "DelayNode": false, + "DelegatedInkTrailPresenter": false, + "DeviceMotionEvent": false, + "DeviceMotionEventAcceleration": false, + "DeviceMotionEventRotationRate": false, + "DeviceOrientationEvent": false, + "devicePixelRatio": false, + "DevicePosture": false, + "DigitalCredential": false, + "dispatchEvent": false, + "DisposableStack": false, + "document": false, + "Document": false, + "DocumentFragment": false, + "documentPictureInPicture": false, + "DocumentPictureInPicture": false, + "DocumentPictureInPictureEvent": false, + "DocumentTimeline": false, + "DocumentType": false, + "DOMError": false, + "DOMException": false, + "DOMImplementation": false, + "DOMMatrix": false, + "DOMMatrixReadOnly": false, + "DOMParser": false, + "DOMPoint": false, + "DOMPointReadOnly": false, + "DOMQuad": false, + "DOMRect": false, + "DOMRectList": false, + "DOMRectReadOnly": false, + "DOMStringList": false, + "DOMStringMap": false, + "DOMTokenList": false, + "DragEvent": false, + "DynamicsCompressorNode": false, + "EditContext": false, + "Element": false, + "ElementInternals": false, + "EncodedAudioChunk": false, + "EncodedVideoChunk": false, + "ErrorEvent": false, + "event": false, + "Event": false, + "EventCounts": false, + "EventSource": false, + "EventTarget": false, + "external": false, + "External": false, + "EyeDropper": false, + "FeaturePolicy": false, + "FederatedCredential": false, + "fence": false, + "Fence": false, + "FencedFrameConfig": false, + "fetch": false, + "fetchLater": false, + "FetchLaterResult": false, + "File": false, + "FileList": false, + "FileReader": false, + "FileSystem": false, + "FileSystemDirectoryEntry": false, + "FileSystemDirectoryHandle": false, + "FileSystemDirectoryReader": false, + "FileSystemEntry": false, + "FileSystemFileEntry": false, + "FileSystemFileHandle": false, + "FileSystemHandle": false, + "FileSystemObserver": false, + "FileSystemWritableFileStream": false, + "find": false, + "focus": false, + "FocusEvent": false, + "FontData": false, + "FontFace": false, + "FontFaceSet": false, + "FontFaceSetLoadEvent": false, + "FormData": false, + "FormDataEvent": false, + "FragmentDirective": false, + "frameElement": false, + "frames": false, + "GainNode": false, + "Gamepad": false, + "GamepadAxisMoveEvent": false, + "GamepadButton": false, + "GamepadButtonEvent": false, + "GamepadEvent": false, + "GamepadHapticActuator": false, + "GamepadPose": false, + "Geolocation": false, + "GeolocationCoordinates": false, + "GeolocationPosition": false, + "GeolocationPositionError": false, + "getComputedStyle": false, + "getScreenDetails": false, + "getSelection": false, + "GPU": false, + "GPUAdapter": false, + "GPUAdapterInfo": false, + "GPUBindGroup": false, + "GPUBindGroupLayout": false, + "GPUBuffer": false, + "GPUBufferUsage": false, + "GPUCanvasContext": false, + "GPUColorWrite": false, + "GPUCommandBuffer": false, + "GPUCommandEncoder": false, + "GPUCompilationInfo": false, + "GPUCompilationMessage": false, + "GPUComputePassEncoder": false, + "GPUComputePipeline": false, + "GPUDevice": false, + "GPUDeviceLostInfo": false, + "GPUError": false, + "GPUExternalTexture": false, + "GPUInternalError": false, + "GPUMapMode": false, + "GPUOutOfMemoryError": false, + "GPUPipelineError": false, + "GPUPipelineLayout": false, + "GPUQuerySet": false, + "GPUQueue": false, + "GPURenderBundle": false, + "GPURenderBundleEncoder": false, + "GPURenderPassEncoder": false, + "GPURenderPipeline": false, + "GPUSampler": false, + "GPUShaderModule": false, + "GPUShaderStage": false, + "GPUSupportedFeatures": false, + "GPUSupportedLimits": false, + "GPUTexture": false, + "GPUTextureUsage": false, + "GPUTextureView": false, + "GPUUncapturedErrorEvent": false, + "GPUValidationError": false, + "GravitySensor": false, + "Gyroscope": false, + "HashChangeEvent": false, + "Headers": false, + "HID": false, + "HIDConnectionEvent": false, + "HIDDevice": false, + "HIDInputReportEvent": false, + "Highlight": false, + "HighlightRegistry": false, + "history": false, + "History": false, + "HTMLAllCollection": false, + "HTMLAnchorElement": false, + "HTMLAreaElement": false, + "HTMLAudioElement": false, + "HTMLBaseElement": false, + "HTMLBodyElement": false, + "HTMLBRElement": false, + "HTMLButtonElement": false, + "HTMLCanvasElement": false, + "HTMLCollection": false, + "HTMLDataElement": false, + "HTMLDataListElement": false, + "HTMLDetailsElement": false, + "HTMLDialogElement": false, + "HTMLDirectoryElement": false, + "HTMLDivElement": false, + "HTMLDListElement": false, + "HTMLDocument": false, + "HTMLElement": false, + "HTMLEmbedElement": false, + "HTMLFencedFrameElement": false, + "HTMLFieldSetElement": false, + "HTMLFontElement": false, + "HTMLFormControlsCollection": false, + "HTMLFormElement": false, + "HTMLFrameElement": false, + "HTMLFrameSetElement": false, + "HTMLHeadElement": false, + "HTMLHeadingElement": false, + "HTMLHRElement": false, + "HTMLHtmlElement": false, + "HTMLIFrameElement": false, + "HTMLImageElement": false, + "HTMLInputElement": false, + "HTMLLabelElement": false, + "HTMLLegendElement": false, + "HTMLLIElement": false, + "HTMLLinkElement": false, + "HTMLMapElement": false, + "HTMLMarqueeElement": false, + "HTMLMediaElement": false, + "HTMLMenuElement": false, + "HTMLMetaElement": false, + "HTMLMeterElement": false, + "HTMLModElement": false, + "HTMLObjectElement": false, + "HTMLOListElement": false, + "HTMLOptGroupElement": false, + "HTMLOptionElement": false, + "HTMLOptionsCollection": false, + "HTMLOutputElement": false, + "HTMLParagraphElement": false, + "HTMLParamElement": false, + "HTMLPictureElement": false, + "HTMLPreElement": false, + "HTMLProgressElement": false, + "HTMLQuoteElement": false, + "HTMLScriptElement": false, + "HTMLSelectedContentElement": false, + "HTMLSelectElement": false, + "HTMLSlotElement": false, + "HTMLSourceElement": false, + "HTMLSpanElement": false, + "HTMLStyleElement": false, + "HTMLTableCaptionElement": false, + "HTMLTableCellElement": false, + "HTMLTableColElement": false, + "HTMLTableElement": false, + "HTMLTableRowElement": false, + "HTMLTableSectionElement": false, + "HTMLTemplateElement": false, + "HTMLTextAreaElement": false, + "HTMLTimeElement": false, + "HTMLTitleElement": false, + "HTMLTrackElement": false, + "HTMLUListElement": false, + "HTMLUnknownElement": false, + "HTMLVideoElement": false, + "IDBCursor": false, + "IDBCursorWithValue": false, + "IDBDatabase": false, + "IDBFactory": false, + "IDBIndex": false, + "IDBKeyRange": false, + "IDBObjectStore": false, + "IDBOpenDBRequest": false, + "IDBRecord": false, + "IDBRequest": false, + "IDBTransaction": false, + "IDBVersionChangeEvent": false, + "IdentityCredential": false, + "IdentityCredentialError": false, + "IdentityProvider": false, + "IdleDeadline": false, + "IdleDetector": false, + "IIRFilterNode": false, + "Image": false, + "ImageBitmap": false, + "ImageBitmapRenderingContext": false, + "ImageCapture": false, + "ImageData": false, + "ImageDecoder": false, + "ImageTrack": false, + "ImageTrackList": false, + "indexedDB": false, + "Ink": false, + "innerHeight": false, + "innerWidth": false, + "InputDeviceCapabilities": false, + "InputDeviceInfo": false, + "InputEvent": false, + "IntegrityViolationReportBody": false, + "InterestEvent": false, + "IntersectionObserver": false, + "IntersectionObserverEntry": false, + "isSecureContext": false, + "Keyboard": false, + "KeyboardEvent": false, + "KeyboardLayoutMap": false, + "KeyframeEffect": false, + "LanguageDetector": false, + "LargestContentfulPaint": false, + "LaunchParams": false, + "launchQueue": false, + "LaunchQueue": false, + "LayoutShift": false, + "LayoutShiftAttribution": false, + "length": false, + "LinearAccelerationSensor": false, + "localStorage": false, + "location": true, + "Location": false, + "locationbar": false, + "Lock": false, + "LockManager": false, + "matchMedia": false, + "MathMLElement": false, + "MediaCapabilities": false, + "MediaCapabilitiesInfo": false, + "MediaDeviceInfo": false, + "MediaDevices": false, + "MediaElementAudioSourceNode": false, + "MediaEncryptedEvent": false, + "MediaError": false, + "MediaKeyError": false, + "MediaKeyMessageEvent": false, + "MediaKeys": false, + "MediaKeySession": false, + "MediaKeyStatusMap": false, + "MediaKeySystemAccess": false, + "MediaList": false, + "MediaMetadata": false, + "MediaQueryList": false, + "MediaQueryListEvent": false, + "MediaRecorder": false, + "MediaRecorderErrorEvent": false, + "MediaSession": false, + "MediaSource": false, + "MediaSourceHandle": false, + "MediaStream": false, + "MediaStreamAudioDestinationNode": false, + "MediaStreamAudioSourceNode": false, + "MediaStreamEvent": false, + "MediaStreamTrack": false, + "MediaStreamTrackAudioSourceNode": false, + "MediaStreamTrackAudioStats": false, + "MediaStreamTrackEvent": false, + "MediaStreamTrackGenerator": false, + "MediaStreamTrackProcessor": false, + "MediaStreamTrackVideoStats": false, + "menubar": false, + "MessageChannel": false, + "MessageEvent": false, + "MessagePort": false, + "MIDIAccess": false, + "MIDIConnectionEvent": false, + "MIDIInput": false, + "MIDIInputMap": false, + "MIDIMessageEvent": false, + "MIDIOutput": false, + "MIDIOutputMap": false, + "MIDIPort": false, + "MimeType": false, + "MimeTypeArray": false, + "model": false, + "ModelGenericSession": false, + "ModelManager": false, + "MouseEvent": false, + "moveBy": false, + "moveTo": false, + "MutationEvent": false, + "MutationObserver": false, + "MutationRecord": false, + "name": false, + "NamedNodeMap": false, + "NavigateEvent": false, + "navigation": false, + "Navigation": false, + "NavigationActivation": false, + "NavigationCurrentEntryChangeEvent": false, + "NavigationDestination": false, + "NavigationHistoryEntry": false, + "NavigationPrecommitController": false, + "NavigationPreloadManager": false, + "NavigationTransition": false, + "navigator": false, + "Navigator": false, + "NavigatorLogin": false, + "NavigatorManagedData": false, + "NavigatorUAData": false, + "NetworkInformation": false, + "Node": false, + "NodeFilter": false, + "NodeIterator": false, + "NodeList": false, + "Notification": false, + "NotifyPaintEvent": false, + "NotRestoredReasonDetails": false, + "NotRestoredReasons": false, + "Observable": false, + "OfflineAudioCompletionEvent": false, + "OfflineAudioContext": false, + "offscreenBuffering": false, + "OffscreenCanvas": false, + "OffscreenCanvasRenderingContext2D": false, + "onabort": true, + "onafterprint": true, + "onanimationcancel": true, + "onanimationend": true, + "onanimationiteration": true, + "onanimationstart": true, + "onappinstalled": true, + "onauxclick": true, + "onbeforeinput": true, + "onbeforeinstallprompt": true, + "onbeforematch": true, + "onbeforeprint": true, + "onbeforetoggle": true, + "onbeforeunload": true, + "onbeforexrselect": true, + "onblur": true, + "oncancel": true, + "oncanplay": true, + "oncanplaythrough": true, + "onchange": true, + "onclick": true, + "onclose": true, + "oncommand": true, + "oncontentvisibilityautostatechange": true, + "oncontextlost": true, + "oncontextmenu": true, + "oncontextrestored": true, + "oncopy": true, + "oncuechange": true, + "oncut": true, + "ondblclick": true, + "ondevicemotion": true, + "ondeviceorientation": true, + "ondeviceorientationabsolute": true, + "ondrag": true, + "ondragend": true, + "ondragenter": true, + "ondragleave": true, + "ondragover": true, + "ondragstart": true, + "ondrop": true, + "ondurationchange": true, + "onemptied": true, + "onended": true, + "onerror": true, + "onfocus": true, + "onformdata": true, + "ongamepadconnected": true, + "ongamepaddisconnected": true, + "ongotpointercapture": true, + "onhashchange": true, + "oninput": true, + "oninvalid": true, + "onkeydown": true, + "onkeypress": true, + "onkeyup": true, + "onlanguagechange": true, + "onload": true, + "onloadeddata": true, + "onloadedmetadata": true, + "onloadstart": true, + "onlostpointercapture": true, + "onmessage": true, + "onmessageerror": true, + "onmousedown": true, + "onmouseenter": true, + "onmouseleave": true, + "onmousemove": true, + "onmouseout": true, + "onmouseover": true, + "onmouseup": true, + "onmousewheel": true, + "onoffline": true, + "ononline": true, + "onpagehide": true, + "onpagereveal": true, + "onpageshow": true, + "onpageswap": true, + "onpaste": true, + "onpause": true, + "onplay": true, + "onplaying": true, + "onpointercancel": true, + "onpointerdown": true, + "onpointerenter": true, + "onpointerleave": true, + "onpointermove": true, + "onpointerout": true, + "onpointerover": true, + "onpointerrawupdate": true, + "onpointerup": true, + "onpopstate": true, + "onprogress": true, + "onratechange": true, + "onrejectionhandled": true, + "onreset": true, + "onresize": true, + "onscroll": true, + "onscrollend": true, + "onscrollsnapchange": true, + "onscrollsnapchanging": true, + "onsearch": true, + "onsecuritypolicyviolation": true, + "onseeked": true, + "onseeking": true, + "onselect": true, + "onselectionchange": true, + "onselectstart": true, + "onslotchange": true, + "onstalled": true, + "onstorage": true, + "onsubmit": true, + "onsuspend": true, + "ontimeupdate": true, + "ontoggle": true, + "ontransitioncancel": true, + "ontransitionend": true, + "ontransitionrun": true, + "ontransitionstart": true, + "onunhandledrejection": true, + "onunload": true, + "onvolumechange": true, + "onwaiting": true, + "onwheel": true, + "open": false, + "opener": false, + "Option": false, + "OrientationSensor": false, + "origin": false, + "originAgentCluster": false, + "OscillatorNode": false, + "OTPCredential": false, + "outerHeight": false, + "outerWidth": false, + "OverconstrainedError": false, + "PageRevealEvent": false, + "PageSwapEvent": false, + "PageTransitionEvent": false, + "pageXOffset": false, + "pageYOffset": false, + "PannerNode": false, + "parent": false, + "PasswordCredential": false, + "Path2D": false, + "PaymentAddress": false, + "PaymentManager": false, + "PaymentMethodChangeEvent": false, + "PaymentRequest": false, + "PaymentRequestUpdateEvent": false, + "PaymentResponse": false, + "performance": false, + "Performance": false, + "PerformanceElementTiming": false, + "PerformanceEntry": false, + "PerformanceEventTiming": false, + "PerformanceLongAnimationFrameTiming": false, + "PerformanceLongTaskTiming": false, + "PerformanceMark": false, + "PerformanceMeasure": false, + "PerformanceNavigation": false, + "PerformanceNavigationTiming": false, + "PerformanceObserver": false, + "PerformanceObserverEntryList": false, + "PerformancePaintTiming": false, + "PerformanceResourceTiming": false, + "PerformanceScriptTiming": false, + "PerformanceServerTiming": false, + "PerformanceTiming": false, + "PeriodicSyncManager": false, + "PeriodicWave": false, + "Permissions": false, + "PermissionStatus": false, + "PERSISTENT": false, + "personalbar": false, + "PictureInPictureEvent": false, + "PictureInPictureWindow": false, + "Plugin": false, + "PluginArray": false, + "PointerEvent": false, + "PopStateEvent": false, + "postMessage": false, + "Presentation": false, + "PresentationAvailability": false, + "PresentationConnection": false, + "PresentationConnectionAvailableEvent": false, + "PresentationConnectionCloseEvent": false, + "PresentationConnectionList": false, + "PresentationReceiver": false, + "PresentationRequest": false, + "PressureObserver": false, + "PressureRecord": false, + "print": false, + "ProcessingInstruction": false, + "Profiler": false, + "ProgressEvent": false, + "PromiseRejectionEvent": false, + "prompt": false, + "ProtectedAudience": false, + "PublicKeyCredential": false, + "PushManager": false, + "PushSubscription": false, + "PushSubscriptionOptions": false, + "queryLocalFonts": false, + "queueMicrotask": false, + "QuotaExceededError": false, + "RadioNodeList": false, + "Range": false, + "ReadableByteStreamController": false, + "ReadableStream": false, + "ReadableStreamBYOBReader": false, + "ReadableStreamBYOBRequest": false, + "ReadableStreamDefaultController": false, + "ReadableStreamDefaultReader": false, + "registerProcessor": false, + "RelativeOrientationSensor": false, + "RemotePlayback": false, + "removeEventListener": false, + "ReportBody": false, + "reportError": false, + "ReportingObserver": false, + "Request": false, + "requestAnimationFrame": false, + "requestIdleCallback": false, + "resizeBy": false, + "ResizeObserver": false, + "ResizeObserverEntry": false, + "ResizeObserverSize": false, + "resizeTo": false, + "Response": false, + "RestrictionTarget": false, + "RTCCertificate": false, + "RTCDataChannel": false, + "RTCDataChannelEvent": false, + "RTCDtlsTransport": false, + "RTCDTMFSender": false, + "RTCDTMFToneChangeEvent": false, + "RTCEncodedAudioFrame": false, + "RTCEncodedVideoFrame": false, + "RTCError": false, + "RTCErrorEvent": false, + "RTCIceCandidate": false, + "RTCIceTransport": false, + "RTCPeerConnection": false, + "RTCPeerConnectionIceErrorEvent": false, + "RTCPeerConnectionIceEvent": false, + "RTCRtpReceiver": false, + "RTCRtpScriptTransform": false, + "RTCRtpSender": false, + "RTCRtpTransceiver": false, + "RTCSctpTransport": false, + "RTCSessionDescription": false, + "RTCStatsReport": false, + "RTCTrackEvent": false, + "sampleRate": false, + "scheduler": false, + "Scheduler": false, + "Scheduling": false, + "screen": false, + "Screen": false, + "ScreenDetailed": false, + "ScreenDetails": false, + "screenLeft": false, + "ScreenOrientation": false, + "screenTop": false, + "screenX": false, + "screenY": false, + "ScriptProcessorNode": false, + "scroll": false, + "scrollbars": false, + "scrollBy": false, + "ScrollTimeline": false, + "scrollTo": false, + "scrollX": false, + "scrollY": false, + "SecurityPolicyViolationEvent": false, + "Selection": false, + "self": false, + "Sensor": false, + "SensorErrorEvent": false, + "Serial": false, + "SerialPort": false, + "ServiceWorker": false, + "ServiceWorkerContainer": false, + "ServiceWorkerRegistration": false, + "sessionStorage": false, + "setInterval": false, + "setTimeout": false, + "ShadowRoot": false, + "sharedStorage": false, + "SharedStorage": false, + "SharedStorageAppendMethod": false, + "SharedStorageClearMethod": false, + "SharedStorageDeleteMethod": false, + "SharedStorageModifierMethod": false, + "SharedStorageSetMethod": false, + "SharedStorageWorklet": false, + "SharedWorker": false, + "showDirectoryPicker": false, + "showOpenFilePicker": false, + "showSaveFilePicker": false, + "SnapEvent": false, + "SourceBuffer": false, + "SourceBufferList": false, + "SpeechGrammar": false, + "SpeechGrammarList": false, + "SpeechRecognition": false, + "SpeechRecognitionErrorEvent": false, + "SpeechRecognitionEvent": false, + "SpeechRecognitionPhrase": false, + "speechSynthesis": false, + "SpeechSynthesis": false, + "SpeechSynthesisErrorEvent": false, + "SpeechSynthesisEvent": false, + "SpeechSynthesisUtterance": false, + "SpeechSynthesisVoice": false, + "StaticRange": false, + "status": false, + "statusbar": false, + "StereoPannerNode": false, + "stop": false, + "Storage": false, + "StorageBucket": false, + "StorageBucketManager": false, + "StorageEvent": false, + "StorageManager": false, + "structuredClone": false, + "styleMedia": false, + "StylePropertyMap": false, + "StylePropertyMapReadOnly": false, + "StyleSheet": false, + "StyleSheetList": false, + "SubmitEvent": false, + "Subscriber": false, + "SubtleCrypto": false, + "Summarizer": false, + "SuppressedError": false, + "SVGAElement": false, + "SVGAngle": false, + "SVGAnimatedAngle": false, + "SVGAnimatedBoolean": false, + "SVGAnimatedEnumeration": false, + "SVGAnimatedInteger": false, + "SVGAnimatedLength": false, + "SVGAnimatedLengthList": false, + "SVGAnimatedNumber": false, + "SVGAnimatedNumberList": false, + "SVGAnimatedPreserveAspectRatio": false, + "SVGAnimatedRect": false, + "SVGAnimatedString": false, + "SVGAnimatedTransformList": false, + "SVGAnimateElement": false, + "SVGAnimateMotionElement": false, + "SVGAnimateTransformElement": false, + "SVGAnimationElement": false, + "SVGCircleElement": false, + "SVGClipPathElement": false, + "SVGComponentTransferFunctionElement": false, + "SVGDefsElement": false, + "SVGDescElement": false, + "SVGElement": false, + "SVGEllipseElement": false, + "SVGFEBlendElement": false, + "SVGFEColorMatrixElement": false, + "SVGFEComponentTransferElement": false, + "SVGFECompositeElement": false, + "SVGFEConvolveMatrixElement": false, + "SVGFEDiffuseLightingElement": false, + "SVGFEDisplacementMapElement": false, + "SVGFEDistantLightElement": false, + "SVGFEDropShadowElement": false, + "SVGFEFloodElement": false, + "SVGFEFuncAElement": false, + "SVGFEFuncBElement": false, + "SVGFEFuncGElement": false, + "SVGFEFuncRElement": false, + "SVGFEGaussianBlurElement": false, + "SVGFEImageElement": false, + "SVGFEMergeElement": false, + "SVGFEMergeNodeElement": false, + "SVGFEMorphologyElement": false, + "SVGFEOffsetElement": false, + "SVGFEPointLightElement": false, + "SVGFESpecularLightingElement": false, + "SVGFESpotLightElement": false, + "SVGFETileElement": false, + "SVGFETurbulenceElement": false, + "SVGFilterElement": false, + "SVGForeignObjectElement": false, + "SVGGElement": false, + "SVGGeometryElement": false, + "SVGGradientElement": false, + "SVGGraphicsElement": false, + "SVGImageElement": false, + "SVGLength": false, + "SVGLengthList": false, + "SVGLinearGradientElement": false, + "SVGLineElement": false, + "SVGMarkerElement": false, + "SVGMaskElement": false, + "SVGMatrix": false, + "SVGMetadataElement": false, + "SVGMPathElement": false, + "SVGNumber": false, + "SVGNumberList": false, + "SVGPathElement": false, + "SVGPatternElement": false, + "SVGPoint": false, + "SVGPointList": false, + "SVGPolygonElement": false, + "SVGPolylineElement": false, + "SVGPreserveAspectRatio": false, + "SVGRadialGradientElement": false, + "SVGRect": false, + "SVGRectElement": false, + "SVGScriptElement": false, + "SVGSetElement": false, + "SVGStopElement": false, + "SVGStringList": false, + "SVGStyleElement": false, + "SVGSVGElement": false, + "SVGSwitchElement": false, + "SVGSymbolElement": false, + "SVGTextContentElement": false, + "SVGTextElement": false, + "SVGTextPathElement": false, + "SVGTextPositioningElement": false, + "SVGTitleElement": false, + "SVGTransform": false, + "SVGTransformList": false, + "SVGTSpanElement": false, + "SVGUnitTypes": false, + "SVGUseElement": false, + "SVGViewElement": false, + "SyncManager": false, + "TaskAttributionTiming": false, + "TaskController": false, + "TaskPriorityChangeEvent": false, + "TaskSignal": false, + "TEMPORARY": false, + "Text": false, + "TextDecoder": false, + "TextDecoderStream": false, + "TextEncoder": false, + "TextEncoderStream": false, + "TextEvent": false, + "TextFormat": false, + "TextFormatUpdateEvent": false, + "TextMetrics": false, + "TextTrack": false, + "TextTrackCue": false, + "TextTrackCueList": false, + "TextTrackList": false, + "TextUpdateEvent": false, + "TimeEvent": false, + "TimeRanges": false, + "ToggleEvent": false, + "toolbar": false, + "top": false, + "Touch": false, + "TouchEvent": false, + "TouchList": false, + "TrackEvent": false, + "TransformStream": false, + "TransformStreamDefaultController": false, + "TransitionEvent": false, + "Translator": false, + "TreeWalker": false, + "TrustedHTML": false, + "TrustedScript": false, + "TrustedScriptURL": false, + "TrustedTypePolicy": false, + "TrustedTypePolicyFactory": false, + "trustedTypes": false, + "UIEvent": false, + "URL": false, + "URLPattern": false, + "URLSearchParams": false, + "USB": false, + "USBAlternateInterface": false, + "USBConfiguration": false, + "USBConnectionEvent": false, + "USBDevice": false, + "USBEndpoint": false, + "USBInterface": false, + "USBInTransferResult": false, + "USBIsochronousInTransferPacket": false, + "USBIsochronousInTransferResult": false, + "USBIsochronousOutTransferPacket": false, + "USBIsochronousOutTransferResult": false, + "USBOutTransferResult": false, + "UserActivation": false, + "ValidityState": false, + "VideoColorSpace": false, + "VideoDecoder": false, + "VideoEncoder": false, + "VideoFrame": false, + "VideoPlaybackQuality": false, + "viewport": false, + "Viewport": false, + "ViewTimeline": false, + "ViewTransition": false, + "ViewTransitionTypeSet": false, + "VirtualKeyboard": false, + "VirtualKeyboardGeometryChangeEvent": false, + "VisibilityStateEntry": false, + "visualViewport": false, + "VisualViewport": false, + "VTTCue": false, + "VTTRegion": false, + "WakeLock": false, + "WakeLockSentinel": false, + "WaveShaperNode": false, + "WebAssembly": false, + "WebGL2RenderingContext": false, + "WebGLActiveInfo": false, + "WebGLBuffer": false, + "WebGLContextEvent": false, + "WebGLFramebuffer": false, + "WebGLObject": false, + "WebGLProgram": false, + "WebGLQuery": false, + "WebGLRenderbuffer": false, + "WebGLRenderingContext": false, + "WebGLSampler": false, + "WebGLShader": false, + "WebGLShaderPrecisionFormat": false, + "WebGLSync": false, + "WebGLTexture": false, + "WebGLTransformFeedback": false, + "WebGLUniformLocation": false, + "WebGLVertexArrayObject": false, + "WebSocket": false, + "WebSocketError": false, + "WebSocketStream": false, + "WebTransport": false, + "WebTransportBidirectionalStream": false, + "WebTransportDatagramDuplexStream": false, + "WebTransportError": false, + "WebTransportReceiveStream": false, + "WebTransportSendStream": false, + "WGSLLanguageFeatures": false, + "WheelEvent": false, + "when": false, + "window": false, + "Window": false, + "WindowControlsOverlay": false, + "WindowControlsOverlayGeometryChangeEvent": false, + "Worker": false, + "Worklet": false, + "WorkletGlobalScope": false, + "WritableStream": false, + "WritableStreamDefaultController": false, + "WritableStreamDefaultWriter": false, + "XMLDocument": false, + "XMLHttpRequest": false, + "XMLHttpRequestEventTarget": false, + "XMLHttpRequestUpload": false, + "XMLSerializer": false, + "XPathEvaluator": false, + "XPathExpression": false, + "XPathResult": false, + "XRAnchor": false, + "XRAnchorSet": false, + "XRBoundedReferenceSpace": false, + "XRCamera": false, + "XRCPUDepthInformation": false, + "XRDepthInformation": false, + "XRDOMOverlayState": false, + "XRFrame": false, + "XRHand": false, + "XRHitTestResult": false, + "XRHitTestSource": false, + "XRInputSource": false, + "XRInputSourceArray": false, + "XRInputSourceEvent": false, + "XRInputSourcesChangeEvent": false, + "XRJointPose": false, + "XRJointSpace": false, + "XRLayer": false, + "XRLightEstimate": false, + "XRLightProbe": false, + "XRPose": false, + "XRRay": false, + "XRReferenceSpace": false, + "XRReferenceSpaceEvent": false, + "XRRenderState": false, + "XRRigidTransform": false, + "XRSession": false, + "XRSessionEvent": false, + "XRSpace": false, + "XRSystem": false, + "XRTransientInputHitTestResult": false, + "XRTransientInputHitTestSource": false, + "XRView": false, + "XRViewerPose": false, + "XRViewport": false, + "XRWebGLBinding": false, + "XRWebGLDepthInformation": false, + "XRWebGLLayer": false, + "XSLTProcessor": false + } + }, + "errors": [ + { + "messageId": "noShadowGlobal", + "data": { + "name": "top" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-shadow > invalid + +```js +var Object = 0; +``` + +```json +{ + "options": [ + { + "builtinGlobals": true + } + ], + "languageOptions": { + "parserOptions": { + "ecmaFeatures": { + "globalReturn": true + } + } + }, + "errors": [ + { + "messageId": "noShadowGlobal", + "data": { + "name": "Object" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-shadow > invalid + +```js +var top = 0; +``` + +```json +{ + "options": [ + { + "builtinGlobals": true + } + ], + "languageOptions": { + "parserOptions": { + "ecmaFeatures": { + "globalReturn": true + } + }, + "globals": { + "AbortController": false, + "AbortSignal": false, + "AbsoluteOrientationSensor": false, + "AbstractRange": false, + "Accelerometer": false, + "addEventListener": false, + "ai": false, + "AI": false, + "AICreateMonitor": false, + "AITextSession": false, + "alert": false, + "AnalyserNode": false, + "Animation": false, + "AnimationEffect": false, + "AnimationEvent": false, + "AnimationPlaybackEvent": false, + "AnimationTimeline": false, + "AsyncDisposableStack": false, + "atob": false, + "Attr": false, + "Audio": false, + "AudioBuffer": false, + "AudioBufferSourceNode": false, + "AudioContext": false, + "AudioData": false, + "AudioDecoder": false, + "AudioDestinationNode": false, + "AudioEncoder": false, + "AudioListener": false, + "AudioNode": false, + "AudioParam": false, + "AudioParamMap": false, + "AudioProcessingEvent": false, + "AudioScheduledSourceNode": false, + "AudioSinkInfo": false, + "AudioWorklet": false, + "AudioWorkletGlobalScope": false, + "AudioWorkletNode": false, + "AudioWorkletProcessor": false, + "AuthenticatorAssertionResponse": false, + "AuthenticatorAttestationResponse": false, + "AuthenticatorResponse": false, + "BackgroundFetchManager": false, + "BackgroundFetchRecord": false, + "BackgroundFetchRegistration": false, + "BarcodeDetector": false, + "BarProp": false, + "BaseAudioContext": false, + "BatteryManager": false, + "BeforeUnloadEvent": false, + "BiquadFilterNode": false, + "Blob": false, + "BlobEvent": false, + "Bluetooth": false, + "BluetoothCharacteristicProperties": false, + "BluetoothDevice": false, + "BluetoothRemoteGATTCharacteristic": false, + "BluetoothRemoteGATTDescriptor": false, + "BluetoothRemoteGATTServer": false, + "BluetoothRemoteGATTService": false, + "BluetoothUUID": false, + "blur": false, + "BroadcastChannel": false, + "BrowserCaptureMediaStreamTrack": false, + "btoa": false, + "ByteLengthQueuingStrategy": false, + "Cache": false, + "caches": false, + "CacheStorage": false, + "cancelAnimationFrame": false, + "cancelIdleCallback": false, + "CanvasCaptureMediaStream": false, + "CanvasCaptureMediaStreamTrack": false, + "CanvasGradient": false, + "CanvasPattern": false, + "CanvasRenderingContext2D": false, + "CaptureController": false, + "CaretPosition": false, + "CDATASection": false, + "ChannelMergerNode": false, + "ChannelSplitterNode": false, + "ChapterInformation": false, + "CharacterBoundsUpdateEvent": false, + "CharacterData": false, + "clearInterval": false, + "clearTimeout": false, + "clientInformation": false, + "Clipboard": false, + "ClipboardChangeEvent": false, + "ClipboardEvent": false, + "ClipboardItem": false, + "close": false, + "closed": false, + "CloseEvent": false, + "CloseWatcher": false, + "CommandEvent": false, + "Comment": false, + "CompositionEvent": false, + "CompressionStream": false, + "confirm": false, + "console": false, + "ConstantSourceNode": false, + "ContentVisibilityAutoStateChangeEvent": false, + "ConvolverNode": false, + "CookieChangeEvent": false, + "CookieDeprecationLabel": false, + "cookieStore": false, + "CookieStore": false, + "CookieStoreManager": false, + "CountQueuingStrategy": false, + "createImageBitmap": false, + "CreateMonitor": false, + "Credential": false, + "credentialless": false, + "CredentialsContainer": false, + "CropTarget": false, + "crossOriginIsolated": false, + "crypto": false, + "Crypto": false, + "CryptoKey": false, + "CSPViolationReportBody": false, + "CSS": false, + "CSSAnimation": false, + "CSSConditionRule": false, + "CSSContainerRule": false, + "CSSCounterStyleRule": false, + "CSSFontFaceRule": false, + "CSSFontFeatureValuesRule": false, + "CSSFontPaletteValuesRule": false, + "CSSFunctionDeclarations": false, + "CSSFunctionDescriptors": false, + "CSSFunctionRule": false, + "CSSGroupingRule": false, + "CSSImageValue": false, + "CSSImportRule": false, + "CSSKeyframeRule": false, + "CSSKeyframesRule": false, + "CSSKeywordValue": false, + "CSSLayerBlockRule": false, + "CSSLayerStatementRule": false, + "CSSMarginRule": false, + "CSSMathClamp": false, + "CSSMathInvert": false, + "CSSMathMax": false, + "CSSMathMin": false, + "CSSMathNegate": false, + "CSSMathProduct": false, + "CSSMathSum": false, + "CSSMathValue": false, + "CSSMatrixComponent": false, + "CSSMediaRule": false, + "CSSNamespaceRule": false, + "CSSNestedDeclarations": false, + "CSSNumericArray": false, + "CSSNumericValue": false, + "CSSPageDescriptors": false, + "CSSPageRule": false, + "CSSPerspective": false, + "CSSPositionTryDescriptors": false, + "CSSPositionTryRule": false, + "CSSPositionValue": false, + "CSSPropertyRule": false, + "CSSRotate": false, + "CSSRule": false, + "CSSRuleList": false, + "CSSScale": false, + "CSSScopeRule": false, + "CSSSkew": false, + "CSSSkewX": false, + "CSSSkewY": false, + "CSSStartingStyleRule": false, + "CSSStyleDeclaration": false, + "CSSStyleRule": false, + "CSSStyleSheet": false, + "CSSStyleValue": false, + "CSSSupportsRule": false, + "CSSTransformComponent": false, + "CSSTransformValue": false, + "CSSTransition": false, + "CSSTranslate": false, + "CSSUnitValue": false, + "CSSUnparsedValue": false, + "CSSVariableReferenceValue": false, + "CSSViewTransitionRule": false, + "currentFrame": false, + "currentTime": false, + "CustomElementRegistry": false, + "customElements": false, + "CustomEvent": false, + "CustomStateSet": false, + "DataTransfer": false, + "DataTransferItem": false, + "DataTransferItemList": false, + "DecompressionStream": false, + "DelayNode": false, + "DelegatedInkTrailPresenter": false, + "DeviceMotionEvent": false, + "DeviceMotionEventAcceleration": false, + "DeviceMotionEventRotationRate": false, + "DeviceOrientationEvent": false, + "devicePixelRatio": false, + "DevicePosture": false, + "DigitalCredential": false, + "dispatchEvent": false, + "DisposableStack": false, + "document": false, + "Document": false, + "DocumentFragment": false, + "documentPictureInPicture": false, + "DocumentPictureInPicture": false, + "DocumentPictureInPictureEvent": false, + "DocumentTimeline": false, + "DocumentType": false, + "DOMError": false, + "DOMException": false, + "DOMImplementation": false, + "DOMMatrix": false, + "DOMMatrixReadOnly": false, + "DOMParser": false, + "DOMPoint": false, + "DOMPointReadOnly": false, + "DOMQuad": false, + "DOMRect": false, + "DOMRectList": false, + "DOMRectReadOnly": false, + "DOMStringList": false, + "DOMStringMap": false, + "DOMTokenList": false, + "DragEvent": false, + "DynamicsCompressorNode": false, + "EditContext": false, + "Element": false, + "ElementInternals": false, + "EncodedAudioChunk": false, + "EncodedVideoChunk": false, + "ErrorEvent": false, + "event": false, + "Event": false, + "EventCounts": false, + "EventSource": false, + "EventTarget": false, + "external": false, + "External": false, + "EyeDropper": false, + "FeaturePolicy": false, + "FederatedCredential": false, + "fence": false, + "Fence": false, + "FencedFrameConfig": false, + "fetch": false, + "fetchLater": false, + "FetchLaterResult": false, + "File": false, + "FileList": false, + "FileReader": false, + "FileSystem": false, + "FileSystemDirectoryEntry": false, + "FileSystemDirectoryHandle": false, + "FileSystemDirectoryReader": false, + "FileSystemEntry": false, + "FileSystemFileEntry": false, + "FileSystemFileHandle": false, + "FileSystemHandle": false, + "FileSystemObserver": false, + "FileSystemWritableFileStream": false, + "find": false, + "focus": false, + "FocusEvent": false, + "FontData": false, + "FontFace": false, + "FontFaceSet": false, + "FontFaceSetLoadEvent": false, + "FormData": false, + "FormDataEvent": false, + "FragmentDirective": false, + "frameElement": false, + "frames": false, + "GainNode": false, + "Gamepad": false, + "GamepadAxisMoveEvent": false, + "GamepadButton": false, + "GamepadButtonEvent": false, + "GamepadEvent": false, + "GamepadHapticActuator": false, + "GamepadPose": false, + "Geolocation": false, + "GeolocationCoordinates": false, + "GeolocationPosition": false, + "GeolocationPositionError": false, + "getComputedStyle": false, + "getScreenDetails": false, + "getSelection": false, + "GPU": false, + "GPUAdapter": false, + "GPUAdapterInfo": false, + "GPUBindGroup": false, + "GPUBindGroupLayout": false, + "GPUBuffer": false, + "GPUBufferUsage": false, + "GPUCanvasContext": false, + "GPUColorWrite": false, + "GPUCommandBuffer": false, + "GPUCommandEncoder": false, + "GPUCompilationInfo": false, + "GPUCompilationMessage": false, + "GPUComputePassEncoder": false, + "GPUComputePipeline": false, + "GPUDevice": false, + "GPUDeviceLostInfo": false, + "GPUError": false, + "GPUExternalTexture": false, + "GPUInternalError": false, + "GPUMapMode": false, + "GPUOutOfMemoryError": false, + "GPUPipelineError": false, + "GPUPipelineLayout": false, + "GPUQuerySet": false, + "GPUQueue": false, + "GPURenderBundle": false, + "GPURenderBundleEncoder": false, + "GPURenderPassEncoder": false, + "GPURenderPipeline": false, + "GPUSampler": false, + "GPUShaderModule": false, + "GPUShaderStage": false, + "GPUSupportedFeatures": false, + "GPUSupportedLimits": false, + "GPUTexture": false, + "GPUTextureUsage": false, + "GPUTextureView": false, + "GPUUncapturedErrorEvent": false, + "GPUValidationError": false, + "GravitySensor": false, + "Gyroscope": false, + "HashChangeEvent": false, + "Headers": false, + "HID": false, + "HIDConnectionEvent": false, + "HIDDevice": false, + "HIDInputReportEvent": false, + "Highlight": false, + "HighlightRegistry": false, + "history": false, + "History": false, + "HTMLAllCollection": false, + "HTMLAnchorElement": false, + "HTMLAreaElement": false, + "HTMLAudioElement": false, + "HTMLBaseElement": false, + "HTMLBodyElement": false, + "HTMLBRElement": false, + "HTMLButtonElement": false, + "HTMLCanvasElement": false, + "HTMLCollection": false, + "HTMLDataElement": false, + "HTMLDataListElement": false, + "HTMLDetailsElement": false, + "HTMLDialogElement": false, + "HTMLDirectoryElement": false, + "HTMLDivElement": false, + "HTMLDListElement": false, + "HTMLDocument": false, + "HTMLElement": false, + "HTMLEmbedElement": false, + "HTMLFencedFrameElement": false, + "HTMLFieldSetElement": false, + "HTMLFontElement": false, + "HTMLFormControlsCollection": false, + "HTMLFormElement": false, + "HTMLFrameElement": false, + "HTMLFrameSetElement": false, + "HTMLHeadElement": false, + "HTMLHeadingElement": false, + "HTMLHRElement": false, + "HTMLHtmlElement": false, + "HTMLIFrameElement": false, + "HTMLImageElement": false, + "HTMLInputElement": false, + "HTMLLabelElement": false, + "HTMLLegendElement": false, + "HTMLLIElement": false, + "HTMLLinkElement": false, + "HTMLMapElement": false, + "HTMLMarqueeElement": false, + "HTMLMediaElement": false, + "HTMLMenuElement": false, + "HTMLMetaElement": false, + "HTMLMeterElement": false, + "HTMLModElement": false, + "HTMLObjectElement": false, + "HTMLOListElement": false, + "HTMLOptGroupElement": false, + "HTMLOptionElement": false, + "HTMLOptionsCollection": false, + "HTMLOutputElement": false, + "HTMLParagraphElement": false, + "HTMLParamElement": false, + "HTMLPictureElement": false, + "HTMLPreElement": false, + "HTMLProgressElement": false, + "HTMLQuoteElement": false, + "HTMLScriptElement": false, + "HTMLSelectedContentElement": false, + "HTMLSelectElement": false, + "HTMLSlotElement": false, + "HTMLSourceElement": false, + "HTMLSpanElement": false, + "HTMLStyleElement": false, + "HTMLTableCaptionElement": false, + "HTMLTableCellElement": false, + "HTMLTableColElement": false, + "HTMLTableElement": false, + "HTMLTableRowElement": false, + "HTMLTableSectionElement": false, + "HTMLTemplateElement": false, + "HTMLTextAreaElement": false, + "HTMLTimeElement": false, + "HTMLTitleElement": false, + "HTMLTrackElement": false, + "HTMLUListElement": false, + "HTMLUnknownElement": false, + "HTMLVideoElement": false, + "IDBCursor": false, + "IDBCursorWithValue": false, + "IDBDatabase": false, + "IDBFactory": false, + "IDBIndex": false, + "IDBKeyRange": false, + "IDBObjectStore": false, + "IDBOpenDBRequest": false, + "IDBRecord": false, + "IDBRequest": false, + "IDBTransaction": false, + "IDBVersionChangeEvent": false, + "IdentityCredential": false, + "IdentityCredentialError": false, + "IdentityProvider": false, + "IdleDeadline": false, + "IdleDetector": false, + "IIRFilterNode": false, + "Image": false, + "ImageBitmap": false, + "ImageBitmapRenderingContext": false, + "ImageCapture": false, + "ImageData": false, + "ImageDecoder": false, + "ImageTrack": false, + "ImageTrackList": false, + "indexedDB": false, + "Ink": false, + "innerHeight": false, + "innerWidth": false, + "InputDeviceCapabilities": false, + "InputDeviceInfo": false, + "InputEvent": false, + "IntegrityViolationReportBody": false, + "InterestEvent": false, + "IntersectionObserver": false, + "IntersectionObserverEntry": false, + "isSecureContext": false, + "Keyboard": false, + "KeyboardEvent": false, + "KeyboardLayoutMap": false, + "KeyframeEffect": false, + "LanguageDetector": false, + "LargestContentfulPaint": false, + "LaunchParams": false, + "launchQueue": false, + "LaunchQueue": false, + "LayoutShift": false, + "LayoutShiftAttribution": false, + "length": false, + "LinearAccelerationSensor": false, + "localStorage": false, + "location": true, + "Location": false, + "locationbar": false, + "Lock": false, + "LockManager": false, + "matchMedia": false, + "MathMLElement": false, + "MediaCapabilities": false, + "MediaCapabilitiesInfo": false, + "MediaDeviceInfo": false, + "MediaDevices": false, + "MediaElementAudioSourceNode": false, + "MediaEncryptedEvent": false, + "MediaError": false, + "MediaKeyError": false, + "MediaKeyMessageEvent": false, + "MediaKeys": false, + "MediaKeySession": false, + "MediaKeyStatusMap": false, + "MediaKeySystemAccess": false, + "MediaList": false, + "MediaMetadata": false, + "MediaQueryList": false, + "MediaQueryListEvent": false, + "MediaRecorder": false, + "MediaRecorderErrorEvent": false, + "MediaSession": false, + "MediaSource": false, + "MediaSourceHandle": false, + "MediaStream": false, + "MediaStreamAudioDestinationNode": false, + "MediaStreamAudioSourceNode": false, + "MediaStreamEvent": false, + "MediaStreamTrack": false, + "MediaStreamTrackAudioSourceNode": false, + "MediaStreamTrackAudioStats": false, + "MediaStreamTrackEvent": false, + "MediaStreamTrackGenerator": false, + "MediaStreamTrackProcessor": false, + "MediaStreamTrackVideoStats": false, + "menubar": false, + "MessageChannel": false, + "MessageEvent": false, + "MessagePort": false, + "MIDIAccess": false, + "MIDIConnectionEvent": false, + "MIDIInput": false, + "MIDIInputMap": false, + "MIDIMessageEvent": false, + "MIDIOutput": false, + "MIDIOutputMap": false, + "MIDIPort": false, + "MimeType": false, + "MimeTypeArray": false, + "model": false, + "ModelGenericSession": false, + "ModelManager": false, + "MouseEvent": false, + "moveBy": false, + "moveTo": false, + "MutationEvent": false, + "MutationObserver": false, + "MutationRecord": false, + "name": false, + "NamedNodeMap": false, + "NavigateEvent": false, + "navigation": false, + "Navigation": false, + "NavigationActivation": false, + "NavigationCurrentEntryChangeEvent": false, + "NavigationDestination": false, + "NavigationHistoryEntry": false, + "NavigationPrecommitController": false, + "NavigationPreloadManager": false, + "NavigationTransition": false, + "navigator": false, + "Navigator": false, + "NavigatorLogin": false, + "NavigatorManagedData": false, + "NavigatorUAData": false, + "NetworkInformation": false, + "Node": false, + "NodeFilter": false, + "NodeIterator": false, + "NodeList": false, + "Notification": false, + "NotifyPaintEvent": false, + "NotRestoredReasonDetails": false, + "NotRestoredReasons": false, + "Observable": false, + "OfflineAudioCompletionEvent": false, + "OfflineAudioContext": false, + "offscreenBuffering": false, + "OffscreenCanvas": false, + "OffscreenCanvasRenderingContext2D": false, + "onabort": true, + "onafterprint": true, + "onanimationcancel": true, + "onanimationend": true, + "onanimationiteration": true, + "onanimationstart": true, + "onappinstalled": true, + "onauxclick": true, + "onbeforeinput": true, + "onbeforeinstallprompt": true, + "onbeforematch": true, + "onbeforeprint": true, + "onbeforetoggle": true, + "onbeforeunload": true, + "onbeforexrselect": true, + "onblur": true, + "oncancel": true, + "oncanplay": true, + "oncanplaythrough": true, + "onchange": true, + "onclick": true, + "onclose": true, + "oncommand": true, + "oncontentvisibilityautostatechange": true, + "oncontextlost": true, + "oncontextmenu": true, + "oncontextrestored": true, + "oncopy": true, + "oncuechange": true, + "oncut": true, + "ondblclick": true, + "ondevicemotion": true, + "ondeviceorientation": true, + "ondeviceorientationabsolute": true, + "ondrag": true, + "ondragend": true, + "ondragenter": true, + "ondragleave": true, + "ondragover": true, + "ondragstart": true, + "ondrop": true, + "ondurationchange": true, + "onemptied": true, + "onended": true, + "onerror": true, + "onfocus": true, + "onformdata": true, + "ongamepadconnected": true, + "ongamepaddisconnected": true, + "ongotpointercapture": true, + "onhashchange": true, + "oninput": true, + "oninvalid": true, + "onkeydown": true, + "onkeypress": true, + "onkeyup": true, + "onlanguagechange": true, + "onload": true, + "onloadeddata": true, + "onloadedmetadata": true, + "onloadstart": true, + "onlostpointercapture": true, + "onmessage": true, + "onmessageerror": true, + "onmousedown": true, + "onmouseenter": true, + "onmouseleave": true, + "onmousemove": true, + "onmouseout": true, + "onmouseover": true, + "onmouseup": true, + "onmousewheel": true, + "onoffline": true, + "ononline": true, + "onpagehide": true, + "onpagereveal": true, + "onpageshow": true, + "onpageswap": true, + "onpaste": true, + "onpause": true, + "onplay": true, + "onplaying": true, + "onpointercancel": true, + "onpointerdown": true, + "onpointerenter": true, + "onpointerleave": true, + "onpointermove": true, + "onpointerout": true, + "onpointerover": true, + "onpointerrawupdate": true, + "onpointerup": true, + "onpopstate": true, + "onprogress": true, + "onratechange": true, + "onrejectionhandled": true, + "onreset": true, + "onresize": true, + "onscroll": true, + "onscrollend": true, + "onscrollsnapchange": true, + "onscrollsnapchanging": true, + "onsearch": true, + "onsecuritypolicyviolation": true, + "onseeked": true, + "onseeking": true, + "onselect": true, + "onselectionchange": true, + "onselectstart": true, + "onslotchange": true, + "onstalled": true, + "onstorage": true, + "onsubmit": true, + "onsuspend": true, + "ontimeupdate": true, + "ontoggle": true, + "ontransitioncancel": true, + "ontransitionend": true, + "ontransitionrun": true, + "ontransitionstart": true, + "onunhandledrejection": true, + "onunload": true, + "onvolumechange": true, + "onwaiting": true, + "onwheel": true, + "open": false, + "opener": false, + "Option": false, + "OrientationSensor": false, + "origin": false, + "originAgentCluster": false, + "OscillatorNode": false, + "OTPCredential": false, + "outerHeight": false, + "outerWidth": false, + "OverconstrainedError": false, + "PageRevealEvent": false, + "PageSwapEvent": false, + "PageTransitionEvent": false, + "pageXOffset": false, + "pageYOffset": false, + "PannerNode": false, + "parent": false, + "PasswordCredential": false, + "Path2D": false, + "PaymentAddress": false, + "PaymentManager": false, + "PaymentMethodChangeEvent": false, + "PaymentRequest": false, + "PaymentRequestUpdateEvent": false, + "PaymentResponse": false, + "performance": false, + "Performance": false, + "PerformanceElementTiming": false, + "PerformanceEntry": false, + "PerformanceEventTiming": false, + "PerformanceLongAnimationFrameTiming": false, + "PerformanceLongTaskTiming": false, + "PerformanceMark": false, + "PerformanceMeasure": false, + "PerformanceNavigation": false, + "PerformanceNavigationTiming": false, + "PerformanceObserver": false, + "PerformanceObserverEntryList": false, + "PerformancePaintTiming": false, + "PerformanceResourceTiming": false, + "PerformanceScriptTiming": false, + "PerformanceServerTiming": false, + "PerformanceTiming": false, + "PeriodicSyncManager": false, + "PeriodicWave": false, + "Permissions": false, + "PermissionStatus": false, + "PERSISTENT": false, + "personalbar": false, + "PictureInPictureEvent": false, + "PictureInPictureWindow": false, + "Plugin": false, + "PluginArray": false, + "PointerEvent": false, + "PopStateEvent": false, + "postMessage": false, + "Presentation": false, + "PresentationAvailability": false, + "PresentationConnection": false, + "PresentationConnectionAvailableEvent": false, + "PresentationConnectionCloseEvent": false, + "PresentationConnectionList": false, + "PresentationReceiver": false, + "PresentationRequest": false, + "PressureObserver": false, + "PressureRecord": false, + "print": false, + "ProcessingInstruction": false, + "Profiler": false, + "ProgressEvent": false, + "PromiseRejectionEvent": false, + "prompt": false, + "ProtectedAudience": false, + "PublicKeyCredential": false, + "PushManager": false, + "PushSubscription": false, + "PushSubscriptionOptions": false, + "queryLocalFonts": false, + "queueMicrotask": false, + "QuotaExceededError": false, + "RadioNodeList": false, + "Range": false, + "ReadableByteStreamController": false, + "ReadableStream": false, + "ReadableStreamBYOBReader": false, + "ReadableStreamBYOBRequest": false, + "ReadableStreamDefaultController": false, + "ReadableStreamDefaultReader": false, + "registerProcessor": false, + "RelativeOrientationSensor": false, + "RemotePlayback": false, + "removeEventListener": false, + "ReportBody": false, + "reportError": false, + "ReportingObserver": false, + "Request": false, + "requestAnimationFrame": false, + "requestIdleCallback": false, + "resizeBy": false, + "ResizeObserver": false, + "ResizeObserverEntry": false, + "ResizeObserverSize": false, + "resizeTo": false, + "Response": false, + "RestrictionTarget": false, + "RTCCertificate": false, + "RTCDataChannel": false, + "RTCDataChannelEvent": false, + "RTCDtlsTransport": false, + "RTCDTMFSender": false, + "RTCDTMFToneChangeEvent": false, + "RTCEncodedAudioFrame": false, + "RTCEncodedVideoFrame": false, + "RTCError": false, + "RTCErrorEvent": false, + "RTCIceCandidate": false, + "RTCIceTransport": false, + "RTCPeerConnection": false, + "RTCPeerConnectionIceErrorEvent": false, + "RTCPeerConnectionIceEvent": false, + "RTCRtpReceiver": false, + "RTCRtpScriptTransform": false, + "RTCRtpSender": false, + "RTCRtpTransceiver": false, + "RTCSctpTransport": false, + "RTCSessionDescription": false, + "RTCStatsReport": false, + "RTCTrackEvent": false, + "sampleRate": false, + "scheduler": false, + "Scheduler": false, + "Scheduling": false, + "screen": false, + "Screen": false, + "ScreenDetailed": false, + "ScreenDetails": false, + "screenLeft": false, + "ScreenOrientation": false, + "screenTop": false, + "screenX": false, + "screenY": false, + "ScriptProcessorNode": false, + "scroll": false, + "scrollbars": false, + "scrollBy": false, + "ScrollTimeline": false, + "scrollTo": false, + "scrollX": false, + "scrollY": false, + "SecurityPolicyViolationEvent": false, + "Selection": false, + "self": false, + "Sensor": false, + "SensorErrorEvent": false, + "Serial": false, + "SerialPort": false, + "ServiceWorker": false, + "ServiceWorkerContainer": false, + "ServiceWorkerRegistration": false, + "sessionStorage": false, + "setInterval": false, + "setTimeout": false, + "ShadowRoot": false, + "sharedStorage": false, + "SharedStorage": false, + "SharedStorageAppendMethod": false, + "SharedStorageClearMethod": false, + "SharedStorageDeleteMethod": false, + "SharedStorageModifierMethod": false, + "SharedStorageSetMethod": false, + "SharedStorageWorklet": false, + "SharedWorker": false, + "showDirectoryPicker": false, + "showOpenFilePicker": false, + "showSaveFilePicker": false, + "SnapEvent": false, + "SourceBuffer": false, + "SourceBufferList": false, + "SpeechGrammar": false, + "SpeechGrammarList": false, + "SpeechRecognition": false, + "SpeechRecognitionErrorEvent": false, + "SpeechRecognitionEvent": false, + "SpeechRecognitionPhrase": false, + "speechSynthesis": false, + "SpeechSynthesis": false, + "SpeechSynthesisErrorEvent": false, + "SpeechSynthesisEvent": false, + "SpeechSynthesisUtterance": false, + "SpeechSynthesisVoice": false, + "StaticRange": false, + "status": false, + "statusbar": false, + "StereoPannerNode": false, + "stop": false, + "Storage": false, + "StorageBucket": false, + "StorageBucketManager": false, + "StorageEvent": false, + "StorageManager": false, + "structuredClone": false, + "styleMedia": false, + "StylePropertyMap": false, + "StylePropertyMapReadOnly": false, + "StyleSheet": false, + "StyleSheetList": false, + "SubmitEvent": false, + "Subscriber": false, + "SubtleCrypto": false, + "Summarizer": false, + "SuppressedError": false, + "SVGAElement": false, + "SVGAngle": false, + "SVGAnimatedAngle": false, + "SVGAnimatedBoolean": false, + "SVGAnimatedEnumeration": false, + "SVGAnimatedInteger": false, + "SVGAnimatedLength": false, + "SVGAnimatedLengthList": false, + "SVGAnimatedNumber": false, + "SVGAnimatedNumberList": false, + "SVGAnimatedPreserveAspectRatio": false, + "SVGAnimatedRect": false, + "SVGAnimatedString": false, + "SVGAnimatedTransformList": false, + "SVGAnimateElement": false, + "SVGAnimateMotionElement": false, + "SVGAnimateTransformElement": false, + "SVGAnimationElement": false, + "SVGCircleElement": false, + "SVGClipPathElement": false, + "SVGComponentTransferFunctionElement": false, + "SVGDefsElement": false, + "SVGDescElement": false, + "SVGElement": false, + "SVGEllipseElement": false, + "SVGFEBlendElement": false, + "SVGFEColorMatrixElement": false, + "SVGFEComponentTransferElement": false, + "SVGFECompositeElement": false, + "SVGFEConvolveMatrixElement": false, + "SVGFEDiffuseLightingElement": false, + "SVGFEDisplacementMapElement": false, + "SVGFEDistantLightElement": false, + "SVGFEDropShadowElement": false, + "SVGFEFloodElement": false, + "SVGFEFuncAElement": false, + "SVGFEFuncBElement": false, + "SVGFEFuncGElement": false, + "SVGFEFuncRElement": false, + "SVGFEGaussianBlurElement": false, + "SVGFEImageElement": false, + "SVGFEMergeElement": false, + "SVGFEMergeNodeElement": false, + "SVGFEMorphologyElement": false, + "SVGFEOffsetElement": false, + "SVGFEPointLightElement": false, + "SVGFESpecularLightingElement": false, + "SVGFESpotLightElement": false, + "SVGFETileElement": false, + "SVGFETurbulenceElement": false, + "SVGFilterElement": false, + "SVGForeignObjectElement": false, + "SVGGElement": false, + "SVGGeometryElement": false, + "SVGGradientElement": false, + "SVGGraphicsElement": false, + "SVGImageElement": false, + "SVGLength": false, + "SVGLengthList": false, + "SVGLinearGradientElement": false, + "SVGLineElement": false, + "SVGMarkerElement": false, + "SVGMaskElement": false, + "SVGMatrix": false, + "SVGMetadataElement": false, + "SVGMPathElement": false, + "SVGNumber": false, + "SVGNumberList": false, + "SVGPathElement": false, + "SVGPatternElement": false, + "SVGPoint": false, + "SVGPointList": false, + "SVGPolygonElement": false, + "SVGPolylineElement": false, + "SVGPreserveAspectRatio": false, + "SVGRadialGradientElement": false, + "SVGRect": false, + "SVGRectElement": false, + "SVGScriptElement": false, + "SVGSetElement": false, + "SVGStopElement": false, + "SVGStringList": false, + "SVGStyleElement": false, + "SVGSVGElement": false, + "SVGSwitchElement": false, + "SVGSymbolElement": false, + "SVGTextContentElement": false, + "SVGTextElement": false, + "SVGTextPathElement": false, + "SVGTextPositioningElement": false, + "SVGTitleElement": false, + "SVGTransform": false, + "SVGTransformList": false, + "SVGTSpanElement": false, + "SVGUnitTypes": false, + "SVGUseElement": false, + "SVGViewElement": false, + "SyncManager": false, + "TaskAttributionTiming": false, + "TaskController": false, + "TaskPriorityChangeEvent": false, + "TaskSignal": false, + "TEMPORARY": false, + "Text": false, + "TextDecoder": false, + "TextDecoderStream": false, + "TextEncoder": false, + "TextEncoderStream": false, + "TextEvent": false, + "TextFormat": false, + "TextFormatUpdateEvent": false, + "TextMetrics": false, + "TextTrack": false, + "TextTrackCue": false, + "TextTrackCueList": false, + "TextTrackList": false, + "TextUpdateEvent": false, + "TimeEvent": false, + "TimeRanges": false, + "ToggleEvent": false, + "toolbar": false, + "top": false, + "Touch": false, + "TouchEvent": false, + "TouchList": false, + "TrackEvent": false, + "TransformStream": false, + "TransformStreamDefaultController": false, + "TransitionEvent": false, + "Translator": false, + "TreeWalker": false, + "TrustedHTML": false, + "TrustedScript": false, + "TrustedScriptURL": false, + "TrustedTypePolicy": false, + "TrustedTypePolicyFactory": false, + "trustedTypes": false, + "UIEvent": false, + "URL": false, + "URLPattern": false, + "URLSearchParams": false, + "USB": false, + "USBAlternateInterface": false, + "USBConfiguration": false, + "USBConnectionEvent": false, + "USBDevice": false, + "USBEndpoint": false, + "USBInterface": false, + "USBInTransferResult": false, + "USBIsochronousInTransferPacket": false, + "USBIsochronousInTransferResult": false, + "USBIsochronousOutTransferPacket": false, + "USBIsochronousOutTransferResult": false, + "USBOutTransferResult": false, + "UserActivation": false, + "ValidityState": false, + "VideoColorSpace": false, + "VideoDecoder": false, + "VideoEncoder": false, + "VideoFrame": false, + "VideoPlaybackQuality": false, + "viewport": false, + "Viewport": false, + "ViewTimeline": false, + "ViewTransition": false, + "ViewTransitionTypeSet": false, + "VirtualKeyboard": false, + "VirtualKeyboardGeometryChangeEvent": false, + "VisibilityStateEntry": false, + "visualViewport": false, + "VisualViewport": false, + "VTTCue": false, + "VTTRegion": false, + "WakeLock": false, + "WakeLockSentinel": false, + "WaveShaperNode": false, + "WebAssembly": false, + "WebGL2RenderingContext": false, + "WebGLActiveInfo": false, + "WebGLBuffer": false, + "WebGLContextEvent": false, + "WebGLFramebuffer": false, + "WebGLObject": false, + "WebGLProgram": false, + "WebGLQuery": false, + "WebGLRenderbuffer": false, + "WebGLRenderingContext": false, + "WebGLSampler": false, + "WebGLShader": false, + "WebGLShaderPrecisionFormat": false, + "WebGLSync": false, + "WebGLTexture": false, + "WebGLTransformFeedback": false, + "WebGLUniformLocation": false, + "WebGLVertexArrayObject": false, + "WebSocket": false, + "WebSocketError": false, + "WebSocketStream": false, + "WebTransport": false, + "WebTransportBidirectionalStream": false, + "WebTransportDatagramDuplexStream": false, + "WebTransportError": false, + "WebTransportReceiveStream": false, + "WebTransportSendStream": false, + "WGSLLanguageFeatures": false, + "WheelEvent": false, + "when": false, + "window": false, + "Window": false, + "WindowControlsOverlay": false, + "WindowControlsOverlayGeometryChangeEvent": false, + "Worker": false, + "Worklet": false, + "WorkletGlobalScope": false, + "WritableStream": false, + "WritableStreamDefaultController": false, + "WritableStreamDefaultWriter": false, + "XMLDocument": false, + "XMLHttpRequest": false, + "XMLHttpRequestEventTarget": false, + "XMLHttpRequestUpload": false, + "XMLSerializer": false, + "XPathEvaluator": false, + "XPathExpression": false, + "XPathResult": false, + "XRAnchor": false, + "XRAnchorSet": false, + "XRBoundedReferenceSpace": false, + "XRCamera": false, + "XRCPUDepthInformation": false, + "XRDepthInformation": false, + "XRDOMOverlayState": false, + "XRFrame": false, + "XRHand": false, + "XRHitTestResult": false, + "XRHitTestSource": false, + "XRInputSource": false, + "XRInputSourceArray": false, + "XRInputSourceEvent": false, + "XRInputSourcesChangeEvent": false, + "XRJointPose": false, + "XRJointSpace": false, + "XRLayer": false, + "XRLightEstimate": false, + "XRLightProbe": false, + "XRPose": false, + "XRRay": false, + "XRReferenceSpace": false, + "XRReferenceSpaceEvent": false, + "XRRenderState": false, + "XRRigidTransform": false, + "XRSession": false, + "XRSessionEvent": false, + "XRSpace": false, + "XRSystem": false, + "XRTransientInputHitTestResult": false, + "XRTransientInputHitTestSource": false, + "XRView": false, + "XRViewerPose": false, + "XRViewport": false, + "XRWebGLBinding": false, + "XRWebGLDepthInformation": false, + "XRWebGLLayer": false, + "XSLTProcessor": false + } + }, + "errors": [ + { + "messageId": "noShadowGlobal", + "data": { + "name": "top" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-shadow > valid + +```js +function foo any>(arg: T) {} +``` + +```json +{} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-shadow > valid + +```js +function foo any>(arg: T) {} +``` + +```json +{} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-shadow > valid + +```js +function foo any>(arg: T) {} +``` + +```json +{} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-shadow > valid + +```js +function foo any>(fn: T, args: any[]) {} +``` + +```json +{} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-shadow > valid + +```js +function foo any>(fn: T, args: any[]) {} +``` + +```json +{} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-shadow > valid + +```js +function foo any>(fn: T, ...args: any[]) {} +``` + +```json +{} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-shadow > valid + +```js +function foo any>(fn: T, args: any[]) {} +``` + +```json +{} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-shadow > valid + +```js +function foo any>(fn: T, args: any[]) {} +``` + +```json +{} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-shadow > valid + +```js +function foo any>(fn: T, args: any) {} +``` + +```json +{} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-shadow > valid + +```js + + function foo any>( +\u0009fn: T, +\u0009...args: any[] + ) {} +\u0009 +``` + +```json +{ + "code": "\n function foo any>(\n\tfn: T,\n\t...args: any[]\n ) {}\n\t " +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-shadow > valid + +```js + + type Args = 1; + function foo void>(arg: T) {} +\u0009 +``` + +```json +{ + "code": "\n type Args = 1;\n function foo void>(arg: T) {}\n\t " +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-shadow > valid + +```js + + export type ArrayInput = Func extends (arg0: Array) => any +\u0009? T[] +\u0009: Func extends (...args: infer T) => any +\u0009 ? T +\u0009 : never; +\u0009 +``` + +```json +{ + "code": "\n export type ArrayInput = Func extends (arg0: Array) => any\n\t? T[]\n\t: Func extends (...args: infer T) => any\n\t ? T\n\t : never;\n\t " +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-shadow > valid + +```js + + function test(this: Foo) { +\u0009function test2(this: Bar) {} + } +\u0009 +``` + +```json +{ + "code": "\n function test(this: Foo) {\n\tfunction test2(this: Bar) {}\n }\n\t " +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-shadow > valid + +```js + + class Foo { +\u0009prop = 1; + } + namespace Foo { +\u0009export const v = 2; + } +\u0009 +``` + +```json +{ + "code": "\n class Foo {\n\tprop = 1;\n }\n namespace Foo {\n\texport const v = 2;\n }\n\t " +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-shadow > valid + +```js + + function Foo() {} + namespace Foo { +\u0009export const v = 2; + } +\u0009 +``` + +```json +{ + "code": "\n function Foo() {}\n namespace Foo {\n\texport const v = 2;\n }\n\t " +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-shadow > valid + +```js + + class Foo { +\u0009prop = 1; + } + interface Foo { +\u0009prop2: string; + } +\u0009 +``` + +```json +{ + "code": "\n class Foo {\n\tprop = 1;\n }\n interface Foo {\n\tprop2: string;\n }\n\t " +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-shadow > valid + +```js + + import type { Foo } from 'bar'; + + declare module 'bar' { +\u0009export interface Foo { +\u0009 x: string; +\u0009} + } +\u0009 +``` + +```json +{ + "code": "\n import type { Foo } from 'bar';\n \n declare module 'bar' {\n\texport interface Foo {\n\t x: string;\n\t}\n }\n\t " +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-shadow > valid + +```js + + const x = 1; + type x = string; +\u0009 +``` + +```json +{ + "code": "\n const x = 1;\n type x = string;\n\t " +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-shadow > valid + +```js + + const x = 1; + { +\u0009type x = string; + } +\u0009 +``` + +```json +{ + "code": "\n const x = 1;\n {\n\ttype x = string;\n }\n\t " +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-shadow > valid + +```js + + type Foo = 1; +\u0009\u0009 +``` + +```json +{ + "code": "\n type Foo = 1;\n\t\t", + "options": [ + { + "ignoreTypeValueShadow": true + } + ], + "languageOptions": { + "globals": { + "Foo": "writable" + } + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-shadow > valid + +```js + + type Foo = 1; +\u0009\u0009 +``` + +```json +{ + "code": "\n type Foo = 1;\n\t\t", + "options": [ + { + "builtinGlobals": false, + "ignoreTypeValueShadow": false + } + ], + "languageOptions": { + "globals": { + "Foo": "writable" + } + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-shadow > valid + +```js + + enum Direction { +\u0009left = 'left', +\u0009right = 'right', + } +\u0009 +``` + +```json +{ + "code": "\n enum Direction {\n\tleft = 'left',\n\tright = 'right',\n }\n\t " +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-shadow > valid + +```js + + const test = 1; + type Fn = (test: string) => typeof test; +\u0009\u0009 +``` + +```json +{ + "code": "\n const test = 1;\n type Fn = (test: string) => typeof test;\n\t\t", + "options": [ + { + "ignoreFunctionTypeParameterNameValueShadow": true + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-shadow > valid + +```js + + type Fn = (Foo: string) => typeof Foo; +\u0009\u0009 +``` + +```json +{ + "code": "\n type Fn = (Foo: string) => typeof Foo;\n\t\t", + "options": [ + { + "builtinGlobals": false, + "ignoreFunctionTypeParameterNameValueShadow": true + } + ], + "languageOptions": { + "globals": { + "Foo": "writable" + } + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-shadow > valid + +```js + + const arg = 0; + + interface Test { +\u0009(arg: string): typeof arg; + } +\u0009\u0009 +``` + +```json +{ + "code": "\n const arg = 0;\n \n interface Test {\n\t(arg: string): typeof arg;\n }\n\t\t", + "options": [ + { + "ignoreFunctionTypeParameterNameValueShadow": true + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-shadow > valid + +```js + + const arg = 0; + + interface Test { +\u0009p1(arg: string): typeof arg; + } +\u0009\u0009 +``` + +```json +{ + "code": "\n const arg = 0;\n \n interface Test {\n\tp1(arg: string): typeof arg;\n }\n\t\t", + "options": [ + { + "ignoreFunctionTypeParameterNameValueShadow": true + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-shadow > valid + +```js + + const arg = 0; + + declare function test(arg: string): typeof arg; +\u0009\u0009 +``` + +```json +{ + "code": "\n const arg = 0;\n \n declare function test(arg: string): typeof arg;\n\t\t", + "options": [ + { + "ignoreFunctionTypeParameterNameValueShadow": true + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-shadow > valid + +```js + + const arg = 0; + + declare const test: (arg: string) => typeof arg; +\u0009\u0009 +``` + +```json +{ + "code": "\n const arg = 0;\n \n declare const test: (arg: string) => typeof arg;\n\t\t", + "options": [ + { + "ignoreFunctionTypeParameterNameValueShadow": true + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-shadow > valid + +```js + + const arg = 0; + + declare class Test { +\u0009p1(arg: string): typeof arg; + } +\u0009\u0009 +``` + +```json +{ + "code": "\n const arg = 0;\n \n declare class Test {\n\tp1(arg: string): typeof arg;\n }\n\t\t", + "options": [ + { + "ignoreFunctionTypeParameterNameValueShadow": true + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-shadow > valid + +```js + + const arg = 0; + + declare const Test: { +\u0009new (arg: string): typeof arg; + }; +\u0009\u0009 +``` + +```json +{ + "code": "\n const arg = 0;\n \n declare const Test: {\n\tnew (arg: string): typeof arg;\n };\n\t\t", + "options": [ + { + "ignoreFunctionTypeParameterNameValueShadow": true + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-shadow > valid + +```js + + const arg = 0; + + type Bar = new (arg: number) => typeof arg; +\u0009\u0009 +``` + +```json +{ + "code": "\n const arg = 0;\n \n type Bar = new (arg: number) => typeof arg;\n\t\t", + "options": [ + { + "ignoreFunctionTypeParameterNameValueShadow": true + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-shadow > valid + +```js + + const arg = 0; + + declare namespace Lib { +\u0009function test(arg: string): typeof arg; + } +\u0009\u0009 +``` + +```json +{ + "code": "\n const arg = 0;\n \n declare namespace Lib {\n\tfunction test(arg: string): typeof arg;\n }\n\t\t", + "options": [ + { + "ignoreFunctionTypeParameterNameValueShadow": true + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-shadow > valid + +```js + +\u0009\u0009 declare global { +\u0009\u0009\u0009interface ArrayConstructor {} +\u0009\u0009 } +\u0009\u0009 export {}; +\u0009\u0009 +``` + +```json +{ + "code": "\n\t\t declare global {\n\t\t\tinterface ArrayConstructor {}\n\t\t }\n\t\t export {};\n\t\t", + "options": [ + { + "builtinGlobals": true + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-shadow > valid + +```js + +\u0009\u0009declare global { +\u0009\u0009 const a: string; + +\u0009\u0009 namespace Foo { +\u0009\u0009\u0009const a: number; +\u0009\u0009 } +\u0009\u0009} +\u0009\u0009export {}; +\u0009 +``` + +```json +{ + "code": "\n\t\tdeclare global {\n\t\t const a: string;\n \n\t\t namespace Foo {\n\t\t\tconst a: number;\n\t\t }\n\t\t}\n\t\texport {};\n\t " +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-shadow > valid + +```js + +\u0009\u0009 declare global { +\u0009\u0009\u0009type A = 'foo'; + +\u0009\u0009\u0009namespace Foo { +\u0009\u0009\u0009 type A = 'bar'; +\u0009\u0009\u0009} +\u0009\u0009 } +\u0009\u0009 export {}; +\u0009\u0009 +``` + +```json +{ + "code": "\n\t\t declare global {\n\t\t\ttype A = 'foo';\n \n\t\t\tnamespace Foo {\n\t\t\t type A = 'bar';\n\t\t\t}\n\t\t }\n\t\t export {};\n\t\t", + "options": [ + { + "ignoreTypeValueShadow": false + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-shadow > valid + +```js + +\u0009\u0009 declare global { +\u0009\u0009\u0009const foo: string; +\u0009\u0009\u0009type Fn = (foo: number) => void; +\u0009\u0009 } +\u0009\u0009 export {}; +\u0009\u0009 +``` + +```json +{ + "code": "\n\t\t declare global {\n\t\t\tconst foo: string;\n\t\t\ttype Fn = (foo: number) => void;\n\t\t }\n\t\t export {};\n\t\t", + "options": [ + { + "ignoreFunctionTypeParameterNameValueShadow": false + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-shadow > valid + +```js + + export class Wrapper { +\u0009private constructor(private readonly wrapped: Wrapped) {} + +\u0009unwrap(): Wrapped { +\u0009 return this.wrapped; +\u0009} + +\u0009static create(wrapped: Wrapped) { +\u0009 return new Wrapper(wrapped); +\u0009} + } +\u0009 +``` + +```json +{ + "code": "\n export class Wrapper {\n\tprivate constructor(private readonly wrapped: Wrapped) {}\n \n\tunwrap(): Wrapped {\n\t return this.wrapped;\n\t}\n \n\tstatic create(wrapped: Wrapped) {\n\t return new Wrapper(wrapped);\n\t}\n }\n\t " +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-shadow > valid + +```js + + function makeA() { +\u0009return class A { +\u0009 constructor(public value: T) {} + +\u0009 static make(value: T) { +\u0009\u0009return new A(value); +\u0009 } +\u0009}; + } +\u0009 +``` + +```json +{ + "code": "\n function makeA() {\n\treturn class A {\n\t constructor(public value: T) {}\n \n\t static make(value: T) {\n\t\treturn new A(value);\n\t }\n\t};\n }\n\t " +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-shadow > valid + +```js + + import type { foo } from './foo'; + type bar = number; + + // 'foo' is already declared in the upper scope + // 'bar' is fine + function doThing(foo: number, bar: number) {} +\u0009\u0009 +``` + +```json +{ + "code": "\n import type { foo } from './foo';\n type bar = number;\n \n // 'foo' is already declared in the upper scope\n // 'bar' is fine\n function doThing(foo: number, bar: number) {}\n\t\t", + "options": [ + { + "ignoreTypeValueShadow": true + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-shadow > valid + +```js + + import { type foo } from './foo'; + + // 'foo' is already declared in the upper scope + function doThing(foo: number) {} +\u0009\u0009 +``` + +```json +{ + "code": "\n import { type foo } from './foo';\n \n // 'foo' is already declared in the upper scope\n function doThing(foo: number) {}\n\t\t", + "options": [ + { + "ignoreTypeValueShadow": true + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-shadow > valid + +```js + + type Foo = 1; + type A = 1; +\u0009\u0009 +``` + +```json +{ + "code": "\n type Foo = 1;\n type A = 1;\n\t\t", + "options": [ + { + "hoist": "never" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-shadow > valid + +```js + + interface Foo {} + type A = 1; +\u0009\u0009 +``` + +```json +{ + "code": "\n interface Foo {}\n type A = 1;\n\t\t", + "options": [ + { + "hoist": "never" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-shadow > valid + +```js + + interface Foo {} + interface A {} +\u0009\u0009 +``` + +```json +{ + "code": "\n interface Foo {}\n interface A {}\n\t\t", + "options": [ + { + "hoist": "never" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-shadow > valid + +```js + + type Foo = 1; + interface A {} +\u0009\u0009 +``` + +```json +{ + "code": "\n type Foo = 1;\n interface A {}\n\t\t", + "options": [ + { + "hoist": "never" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-shadow > valid + +```js + + { +\u0009type A = 1; + } + type A = 1; +\u0009\u0009 +``` + +```json +{ + "code": "\n {\n\ttype A = 1;\n }\n type A = 1;\n\t\t", + "options": [ + { + "hoist": "never" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-shadow > valid + +```js + + { +\u0009interface Foo {} + } + type A = 1; +\u0009\u0009 +``` + +```json +{ + "code": "\n {\n\tinterface Foo {}\n }\n type A = 1;\n\t\t", + "options": [ + { + "hoist": "never" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-shadow > valid + +```js + + type Foo = 1; + type A = 1; +\u0009\u0009 +``` + +```json +{ + "code": "\n type Foo = 1;\n type A = 1;\n\t\t", + "options": [ + { + "hoist": "functions" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-shadow > valid + +```js + + interface Foo {} + type A = 1; +\u0009\u0009 +``` + +```json +{ + "code": "\n interface Foo {}\n type A = 1;\n\t\t", + "options": [ + { + "hoist": "functions" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-shadow > valid + +```js + + interface Foo {} + interface A {} +\u0009\u0009 +``` + +```json +{ + "code": "\n interface Foo {}\n interface A {}\n\t\t", + "options": [ + { + "hoist": "functions" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-shadow > valid + +```js + + type Foo = 1; + interface A {} +\u0009\u0009 +``` + +```json +{ + "code": "\n type Foo = 1;\n interface A {}\n\t\t", + "options": [ + { + "hoist": "functions" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-shadow > valid + +```js + + { +\u0009type A = 1; + } + type A = 1; +\u0009\u0009 +``` + +```json +{ + "code": "\n {\n\ttype A = 1;\n }\n type A = 1;\n\t\t", + "options": [ + { + "hoist": "functions" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-shadow > valid + +```js + + { +\u0009interface Foo {} + } + type A = 1; +\u0009\u0009 +``` + +```json +{ + "code": "\n {\n\tinterface Foo {}\n }\n type A = 1;\n\t\t", + "options": [ + { + "hoist": "functions" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-shadow > valid + +```js + + import type { Foo } from 'bar'; + + declare module 'bar' { +\u0009export type Foo = string; + } +\u0009\u0009 +``` + +```json +{ + "code": "\n import type { Foo } from 'bar';\n \n declare module 'bar' {\n\texport type Foo = string;\n }\n\t\t" +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-shadow > valid + +```js + + import type { Foo } from 'bar'; + + declare module 'bar' { +\u0009interface Foo { +\u0009 x: string; +\u0009} + } +\u0009\u0009 +``` + +```json +{ + "code": "\n import type { Foo } from 'bar';\n \n declare module 'bar' {\n\tinterface Foo {\n\t x: string;\n\t}\n }\n\t\t" +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-shadow > valid + +```js + + import { type Foo } from 'bar'; + + declare module 'bar' { +\u0009export type Foo = string; + } +\u0009\u0009 +``` + +```json +{ + "code": "\n import { type Foo } from 'bar';\n \n declare module 'bar' {\n\texport type Foo = string;\n }\n\t\t" +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-shadow > valid + +```js + + import { type Foo } from 'bar'; + + declare module 'bar' { +\u0009export interface Foo { +\u0009 x: string; +\u0009} + } +\u0009\u0009 +``` + +```json +{ + "code": "\n import { type Foo } from 'bar';\n \n declare module 'bar' {\n\texport interface Foo {\n\t x: string;\n\t}\n }\n\t\t" +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-shadow > valid + +```js + + import { type Foo } from 'bar'; + + declare module 'bar' { +\u0009type Foo = string; + } +\u0009\u0009 +``` + +```json +{ + "code": "\n import { type Foo } from 'bar';\n \n declare module 'bar' {\n\ttype Foo = string;\n }\n\t\t" +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-shadow > valid + +```js + + import { type Foo } from 'bar'; + + declare module 'bar' { +\u0009interface Foo { +\u0009 x: string; +\u0009} + } +\u0009\u0009 +``` + +```json +{ + "code": "\n import { type Foo } from 'bar';\n \n declare module 'bar' {\n\tinterface Foo {\n\t x: string;\n\t}\n }\n\t\t" +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-shadow > invalid + +```js + + type T = 1; + { +\u0009type T = 2; + } +\u0009\u0009 +``` + +```json +{ + "code": "\n type T = 1;\n {\n\ttype T = 2;\n }\n\t\t", + "errors": [ + { + "data": { + "name": "T", + "shadowedColumn": 8, + "shadowedLine": 2 + }, + "messageId": "noShadow" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-shadow > invalid + +```js + + type T = 1; + function foo(arg: T) {} +\u0009\u0009 +``` + +```json +{ + "code": "\n type T = 1;\n function foo(arg: T) {}\n\t\t", + "errors": [ + { + "data": { + "name": "T", + "shadowedColumn": 8, + "shadowedLine": 2 + }, + "messageId": "noShadow" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-shadow > invalid + +```js + + function foo() { +\u0009return function () {}; + } +\u0009\u0009 +``` + +```json +{ + "code": "\n function foo() {\n\treturn function () {};\n }\n\t\t", + "errors": [ + { + "data": { + "name": "T", + "shadowedColumn": 16, + "shadowedLine": 2 + }, + "messageId": "noShadow" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-shadow > invalid + +```js + + type T = string; + function foo void>(arg: T) {} +\u0009\u0009 +``` + +```json +{ + "code": "\n type T = string;\n function foo void>(arg: T) {}\n\t\t", + "errors": [ + { + "data": { + "name": "T", + "shadowedColumn": 8, + "shadowedLine": 2 + }, + "messageId": "noShadow" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-shadow > invalid + +```js + + const x = 1; + { +\u0009type x = string; + } +\u0009\u0009 +``` + +```json +{ + "code": "\n const x = 1;\n {\n\ttype x = string;\n }\n\t\t", + "options": [ + { + "ignoreTypeValueShadow": false + } + ], + "errors": [ + { + "data": { + "name": "x", + "shadowedColumn": 9, + "shadowedLine": 2 + }, + "messageId": "noShadow" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-shadow > invalid + +```js + + type Foo = 1; +\u0009\u0009 +``` + +```json +{ + "code": "\n type Foo = 1;\n\t\t", + "options": [ + { + "builtinGlobals": true, + "ignoreTypeValueShadow": false + } + ], + "languageOptions": { + "globals": { + "Foo": "writable" + } + }, + "errors": [ + { + "data": { + "name": "Foo" + }, + "messageId": "noShadowGlobal" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-shadow > invalid + +```js + + const test = 1; + type Fn = (test: string) => typeof test; +\u0009\u0009 +``` + +```json +{ + "code": "\n const test = 1;\n type Fn = (test: string) => typeof test;\n\t\t", + "options": [ + { + "ignoreFunctionTypeParameterNameValueShadow": false + } + ], + "errors": [ + { + "data": { + "name": "test", + "shadowedColumn": 9, + "shadowedLine": 2 + }, + "messageId": "noShadow" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-shadow > invalid + +```js + + type Fn = (Foo: string) => typeof Foo; +\u0009\u0009 +``` + +```json +{ + "code": "\n type Fn = (Foo: string) => typeof Foo;\n\t\t", + "options": [ + { + "builtinGlobals": true, + "ignoreFunctionTypeParameterNameValueShadow": false + } + ], + "languageOptions": { + "globals": { + "Foo": "writable" + } + }, + "errors": [ + { + "data": { + "name": "Foo" + }, + "messageId": "noShadowGlobal" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-shadow > invalid + +```js + + const arg = 0; + + interface Test { +\u0009(arg: string): typeof arg; + } +\u0009\u0009 +``` + +```json +{ + "code": "\n const arg = 0;\n \n interface Test {\n\t(arg: string): typeof arg;\n }\n\t\t", + "options": [ + { + "ignoreFunctionTypeParameterNameValueShadow": false + } + ], + "errors": [ + { + "data": { + "name": "arg", + "shadowedColumn": 9, + "shadowedLine": 2 + }, + "messageId": "noShadow" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-shadow > invalid + +```js + + const arg = 0; + + interface Test { +\u0009p1(arg: string): typeof arg; + } +\u0009\u0009 +``` + +```json +{ + "code": "\n const arg = 0;\n \n interface Test {\n\tp1(arg: string): typeof arg;\n }\n\t\t", + "options": [ + { + "ignoreFunctionTypeParameterNameValueShadow": false + } + ], + "errors": [ + { + "data": { + "name": "arg", + "shadowedColumn": 9, + "shadowedLine": 2 + }, + "messageId": "noShadow" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-shadow > invalid + +```js + + const arg = 0; + + declare function test(arg: string): typeof arg; +\u0009\u0009 +``` + +```json +{ + "code": "\n const arg = 0;\n \n declare function test(arg: string): typeof arg;\n\t\t", + "options": [ + { + "ignoreFunctionTypeParameterNameValueShadow": false + } + ], + "errors": [ + { + "data": { + "name": "arg", + "shadowedColumn": 9, + "shadowedLine": 2 + }, + "messageId": "noShadow" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-shadow > invalid + +```js + + const arg = 0; + + declare const test: (arg: string) => typeof arg; +\u0009\u0009 +``` + +```json +{ + "code": "\n const arg = 0;\n \n declare const test: (arg: string) => typeof arg;\n\t\t", + "options": [ + { + "ignoreFunctionTypeParameterNameValueShadow": false + } + ], + "errors": [ + { + "data": { + "name": "arg", + "shadowedColumn": 9, + "shadowedLine": 2 + }, + "messageId": "noShadow" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-shadow > invalid + +```js + + const arg = 0; + + declare class Test { +\u0009p1(arg: string): typeof arg; + } +\u0009\u0009 +``` + +```json +{ + "code": "\n const arg = 0;\n \n declare class Test {\n\tp1(arg: string): typeof arg;\n }\n\t\t", + "options": [ + { + "ignoreFunctionTypeParameterNameValueShadow": false + } + ], + "errors": [ + { + "data": { + "name": "arg", + "shadowedColumn": 9, + "shadowedLine": 2 + }, + "messageId": "noShadow" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-shadow > invalid + +```js + + const arg = 0; + + declare const Test: { +\u0009new (arg: string): typeof arg; + }; +\u0009\u0009 +``` + +```json +{ + "code": "\n const arg = 0;\n \n declare const Test: {\n\tnew (arg: string): typeof arg;\n };\n\t\t", + "options": [ + { + "ignoreFunctionTypeParameterNameValueShadow": false + } + ], + "errors": [ + { + "data": { + "name": "arg", + "shadowedColumn": 9, + "shadowedLine": 2 + }, + "messageId": "noShadow" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-shadow > invalid + +```js + + const arg = 0; + + type Bar = new (arg: number) => typeof arg; +\u0009\u0009 +``` + +```json +{ + "code": "\n const arg = 0;\n \n type Bar = new (arg: number) => typeof arg;\n\t\t", + "options": [ + { + "ignoreFunctionTypeParameterNameValueShadow": false + } + ], + "errors": [ + { + "data": { + "name": "arg", + "shadowedColumn": 9, + "shadowedLine": 2 + }, + "messageId": "noShadow" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-shadow > invalid + +```js + + const arg = 0; + + declare namespace Lib { +\u0009function test(arg: string): typeof arg; + } +\u0009\u0009 +``` + +```json +{ + "code": "\n const arg = 0;\n \n declare namespace Lib {\n\tfunction test(arg: string): typeof arg;\n }\n\t\t", + "options": [ + { + "ignoreFunctionTypeParameterNameValueShadow": false + } + ], + "errors": [ + { + "data": { + "name": "arg", + "shadowedColumn": 9, + "shadowedLine": 2 + }, + "messageId": "noShadow" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-shadow > invalid + +```js + + import type { foo } from './foo'; + function doThing(foo: number) {} +\u0009\u0009 +``` + +```json +{ + "code": "\n import type { foo } from './foo';\n function doThing(foo: number) {}\n\t\t", + "options": [ + { + "ignoreTypeValueShadow": false + } + ], + "errors": [ + { + "data": { + "name": "foo", + "shadowedColumn": 17, + "shadowedLine": 2 + }, + "messageId": "noShadow" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-shadow > invalid + +```js + + import { type foo } from './foo'; + function doThing(foo: number) {} +\u0009\u0009 +``` + +```json +{ + "code": "\n import { type foo } from './foo';\n function doThing(foo: number) {}\n\t\t", + "options": [ + { + "ignoreTypeValueShadow": false + } + ], + "errors": [ + { + "data": { + "name": "foo", + "shadowedColumn": 17, + "shadowedLine": 2 + }, + "messageId": "noShadow" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-shadow > invalid + +```js + + import { foo } from './foo'; + function doThing(foo: number, bar: number) {} +\u0009\u0009 +``` + +```json +{ + "code": "\n import { foo } from './foo';\n function doThing(foo: number, bar: number) {}\n\t\t", + "options": [ + { + "ignoreTypeValueShadow": true + } + ], + "errors": [ + { + "data": { + "name": "foo", + "shadowedColumn": 12, + "shadowedLine": 2 + }, + "messageId": "noShadow" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-shadow > invalid + +```js + + interface Foo {} + + declare module 'bar' { +\u0009export interface Foo { +\u0009 x: string; +\u0009} + } +\u0009\u0009 +``` + +```json +{ + "code": "\n interface Foo {}\n \n declare module 'bar' {\n\texport interface Foo {\n\t x: string;\n\t}\n }\n\t\t", + "errors": [ + { + "data": { + "name": "Foo", + "shadowedColumn": 13, + "shadowedLine": 2 + }, + "messageId": "noShadow" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-shadow > invalid + +```js + + import type { Foo } from 'bar'; + + declare module 'baz' { +\u0009export interface Foo { +\u0009 x: string; +\u0009} + } +\u0009\u0009 +``` + +```json +{ + "code": "\n import type { Foo } from 'bar';\n \n declare module 'baz' {\n\texport interface Foo {\n\t x: string;\n\t}\n }\n\t\t", + "errors": [ + { + "data": { + "name": "Foo", + "shadowedColumn": 17, + "shadowedLine": 2 + }, + "messageId": "noShadow" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-shadow > invalid + +```js + + import { type Foo } from 'bar'; + + declare module 'baz' { +\u0009export interface Foo { +\u0009 x: string; +\u0009} + } +\u0009\u0009 +``` + +```json +{ + "code": "\n import { type Foo } from 'bar';\n \n declare module 'baz' {\n\texport interface Foo {\n\t x: string;\n\t}\n }\n\t\t", + "errors": [ + { + "data": { + "name": "Foo", + "shadowedColumn": 17, + "shadowedLine": 2 + }, + "messageId": "noShadow" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-shadow > invalid + +```js + + type Foo = 1; + type A = 1; +\u0009\u0009 +``` + +```json +{ + "code": "\n type Foo = 1;\n type A = 1;\n\t\t", + "options": [ + { + "hoist": "types" + } + ], + "errors": [ + { + "data": { + "name": "A", + "shadowedColumn": 8, + "shadowedLine": 3 + }, + "messageId": "noShadow" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-shadow > invalid + +```js + + interface Foo {} + type A = 1; +\u0009\u0009 +``` + +```json +{ + "code": "\n interface Foo {}\n type A = 1;\n\t\t", + "options": [ + { + "hoist": "types" + } + ], + "errors": [ + { + "data": { + "name": "A", + "shadowedColumn": 8, + "shadowedLine": 3 + }, + "messageId": "noShadow" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-shadow > invalid + +```js + + interface Foo {} + interface A {} +\u0009\u0009 +``` + +```json +{ + "code": "\n interface Foo {}\n interface A {}\n\t\t", + "options": [ + { + "hoist": "types" + } + ], + "errors": [ + { + "data": { + "name": "A", + "shadowedColumn": 13, + "shadowedLine": 3 + }, + "messageId": "noShadow" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-shadow > invalid + +```js + + type Foo = 1; + interface A {} +\u0009\u0009 +``` + +```json +{ + "code": "\n type Foo = 1;\n interface A {}\n\t\t", + "options": [ + { + "hoist": "types" + } + ], + "errors": [ + { + "data": { + "name": "A", + "shadowedColumn": 13, + "shadowedLine": 3 + }, + "messageId": "noShadow" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-shadow > invalid + +```js + + { +\u0009type A = 1; + } + type A = 1; +\u0009\u0009 +``` + +```json +{ + "code": "\n {\n\ttype A = 1;\n }\n type A = 1;\n\t\t", + "options": [ + { + "hoist": "types" + } + ], + "errors": [ + { + "data": { + "name": "A", + "shadowedColumn": 8, + "shadowedLine": 5 + }, + "messageId": "noShadow" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-shadow > invalid + +```js + + { +\u0009interface A {} + } + type A = 1; +\u0009\u0009 +``` + +```json +{ + "code": "\n {\n\tinterface A {}\n }\n type A = 1;\n\t\t", + "options": [ + { + "hoist": "types" + } + ], + "errors": [ + { + "data": { + "name": "A", + "shadowedColumn": 8, + "shadowedLine": 5 + }, + "messageId": "noShadow" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-shadow > invalid + +```js + + type Foo = 1; + type A = 1; +\u0009\u0009 +``` + +```json +{ + "code": "\n type Foo = 1;\n type A = 1;\n\t\t", + "options": [ + { + "hoist": "all" + } + ], + "errors": [ + { + "data": { + "name": "A", + "shadowedColumn": 8, + "shadowedLine": 3 + }, + "messageId": "noShadow" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-shadow > invalid + +```js + + interface Foo {} + type A = 1; +\u0009\u0009 +``` + +```json +{ + "code": "\n interface Foo {}\n type A = 1;\n\t\t", + "options": [ + { + "hoist": "all" + } + ], + "errors": [ + { + "data": { + "name": "A", + "shadowedColumn": 8, + "shadowedLine": 3 + }, + "messageId": "noShadow" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-shadow > invalid + +```js + + interface Foo {} + interface A {} +\u0009\u0009 +``` + +```json +{ + "code": "\n interface Foo {}\n interface A {}\n\t\t", + "options": [ + { + "hoist": "all" + } + ], + "errors": [ + { + "data": { + "name": "A", + "shadowedColumn": 13, + "shadowedLine": 3 + }, + "messageId": "noShadow" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-shadow > invalid + +```js + + type Foo = 1; + interface A {} +\u0009\u0009 +``` + +```json +{ + "code": "\n type Foo = 1;\n interface A {}\n\t\t", + "options": [ + { + "hoist": "all" + } + ], + "errors": [ + { + "data": { + "name": "A", + "shadowedColumn": 13, + "shadowedLine": 3 + }, + "messageId": "noShadow" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-shadow > invalid + +```js + + { +\u0009type A = 1; + } + type A = 1; +\u0009\u0009 +``` + +```json +{ + "code": "\n {\n\ttype A = 1;\n }\n type A = 1;\n\t\t", + "options": [ + { + "hoist": "all" + } + ], + "errors": [ + { + "data": { + "name": "A", + "shadowedColumn": 8, + "shadowedLine": 5 + }, + "messageId": "noShadow" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-shadow > invalid + +```js + + { +\u0009interface A {} + } + type A = 1; +\u0009\u0009 +``` + +```json +{ + "code": "\n {\n\tinterface A {}\n }\n type A = 1;\n\t\t", + "options": [ + { + "hoist": "all" + } + ], + "errors": [ + { + "data": { + "name": "A", + "shadowedColumn": 8, + "shadowedLine": 5 + }, + "messageId": "noShadow" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-shadow > invalid + +```js + + type Foo = 1; + type A = 1; +\u0009\u0009 +``` + +```json +{ + "code": "\n type Foo = 1;\n type A = 1;\n\t\t", + "options": [ + { + "hoist": "functions-and-types" + } + ], + "errors": [ + { + "data": { + "name": "A", + "shadowedColumn": 8, + "shadowedLine": 3 + }, + "messageId": "noShadow" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-shadow > invalid + +```js + +\u0009// types +\u0009type Bar = 1; +\u0009type Foo = 1; + +\u0009// functions +\u0009if (true) { +\u0009\u0009const b = 6; +\u0009} + +\u0009function b() { } +\u0009\u0009 +``` + +```json +{ + "code": "\n\t// types\n\ttype Bar = 1;\n\ttype Foo = 1;\n\n\t// functions\n\tif (true) {\n\t\tconst b = 6;\n\t}\n\n\tfunction b() { }\n\t\t", + "options": [ + { + "hoist": "functions-and-types" + } + ], + "errors": [ + { + "data": { + "name": "Foo", + "shadowedColumn": 7, + "shadowedLine": 4 + }, + "messageId": "noShadow" + }, + { + "data": { + "name": "b", + "shadowedColumn": 11, + "shadowedLine": 11 + }, + "messageId": "noShadow" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-shadow > invalid + +```js + +\u0009// types +\u0009type Bar = 1; +\u0009type Foo = 1; + +\u0009// functions +\u0009if (true) { +\u0009\u0009const b = 6; +\u0009} + +\u0009function b() { } +\u0009\u0009 +``` + +```json +{ + "code": "\n\t// types\n\ttype Bar = 1;\n\ttype Foo = 1;\n\n\t// functions\n\tif (true) {\n\t\tconst b = 6;\n\t}\n\n\tfunction b() { }\n\t\t", + "options": [ + { + "hoist": "types" + } + ], + "errors": [ + { + "data": { + "name": "Foo", + "shadowedColumn": 7, + "shadowedLine": 4 + }, + "messageId": "noShadow" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-shadow > invalid + +```js + + interface Foo {} + type A = 1; +\u0009\u0009 +``` + +```json +{ + "code": "\n interface Foo {}\n type A = 1;\n\t\t", + "options": [ + { + "hoist": "functions-and-types" + } + ], + "errors": [ + { + "data": { + "name": "A", + "shadowedColumn": 8, + "shadowedLine": 3 + }, + "messageId": "noShadow" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-shadow > invalid + +```js + + interface Foo {} + interface A {} +\u0009\u0009 +``` + +```json +{ + "code": "\n interface Foo {}\n interface A {}\n\t\t", + "options": [ + { + "hoist": "functions-and-types" + } + ], + "errors": [ + { + "data": { + "name": "A", + "shadowedColumn": 13, + "shadowedLine": 3 + }, + "messageId": "noShadow" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-shadow > invalid + +```js + + type Foo = 1; + interface A {} +\u0009\u0009 +``` + +```json +{ + "code": "\n type Foo = 1;\n interface A {}\n\t\t", + "options": [ + { + "hoist": "functions-and-types" + } + ], + "errors": [ + { + "data": { + "name": "A", + "shadowedColumn": 13, + "shadowedLine": 3 + }, + "messageId": "noShadow" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-shadow > invalid + +```js + + { +\u0009type A = 1; + } + type A = 1; +\u0009\u0009 +``` + +```json +{ + "code": "\n {\n\ttype A = 1;\n }\n type A = 1;\n\t\t", + "options": [ + { + "hoist": "functions-and-types" + } + ], + "errors": [ + { + "data": { + "name": "A", + "shadowedColumn": 8, + "shadowedLine": 5 + }, + "messageId": "noShadow" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-shadow > invalid + +```js + + { +\u0009interface A {} + } + type A = 1; +\u0009\u0009 +``` + +```json +{ + "code": "\n {\n\tinterface A {}\n }\n type A = 1;\n\t\t", + "options": [ + { + "hoist": "functions-and-types" + } + ], + "errors": [ + { + "data": { + "name": "A", + "shadowedColumn": 8, + "shadowedLine": 5 + }, + "messageId": "noShadow" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-shadow > invalid + +```js + + function foo any>(fn: T, args: any[]) {} +\u0009\u0009 +``` + +```json +{ + "code": "\n function foo any>(fn: T, args: any[]) {}\n\t\t", + "options": [ + { + "builtinGlobals": true, + "ignoreTypeValueShadow": false + } + ], + "languageOptions": { + "globals": { + "args": "writable" + } + }, + "errors": [ + { + "data": { + "name": "args", + "shadowedColumn": 5, + "shadowedLine": 2 + }, + "messageId": "noShadowGlobal" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-shadow > invalid + +```js + + declare const has = (environment: 'dev' | 'prod' | 'test') => boolean; +\u0009\u0009 +``` + +```json +{ + "code": "\n declare const has = (environment: 'dev' | 'prod' | 'test') => boolean;\n\t\t", + "options": [ + { + "builtinGlobals": true + } + ], + "languageOptions": { + "globals": { + "has": false + } + }, + "errors": [ + { + "data": { + "name": "has" + }, + "messageId": "noShadowGlobal" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-shadow > invalid + +```js + +\u0009\u0009\u0009const A = 2; +\u0009\u0009\u0009enum Test { +\u0009\u0009\u0009\u0009A = 1, +\u0009\u0009\u0009\u0009B = A, +\u0009\u0009\u0009} +\u0009\u0009 +``` + +```json +{ + "code": "\n\t\t\tconst A = 2;\n\t\t\tenum Test {\n\t\t\t\tA = 1,\n\t\t\t\tB = A,\n\t\t\t}\n\t\t", + "errors": [ + { + "data": { + "name": "A", + "shadowedColumn": 10, + "shadowedLine": 2 + }, + "messageId": "noShadow" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +### `no-spaced-func` + +Pass: 16 / 28 (57.1%) +Fail: 12 / 28 (42.9%) + +#### no-spaced-func > invalid + +```js +f (); +``` + +```json +{ + "output": "f();", + "errors": [ + { + "messageId": "noSpacedFunction" + } + ] +} +``` + +TypeError: Expected `loc` to be an object with integer `line` and `column` properties. + at getOffsetFromLineColumn (apps/oxlint/dist/lint.js) + at report (apps/oxlint/dist/lint.js) + at Object.report (apps/oxlint/dist/lint.js) + at detectOpenSpaces (apps/oxlint/conformance/submodules/eslint/lib/rules/no-spaced-func.js:86:13) + + +#### no-spaced-func > invalid + +```js +f (a, b); +``` + +```json +{ + "output": "f(a, b);", + "errors": [ + { + "messageId": "noSpacedFunction" + } + ] +} +``` + +TypeError: Expected `loc` to be an object with integer `line` and `column` properties. + at getOffsetFromLineColumn (apps/oxlint/dist/lint.js) + at report (apps/oxlint/dist/lint.js) + at Object.report (apps/oxlint/dist/lint.js) + at detectOpenSpaces (apps/oxlint/conformance/submodules/eslint/lib/rules/no-spaced-func.js:86:13) + + +#### no-spaced-func > invalid + +```js +f +(); +``` + +```json +{ + "output": "f();", + "errors": [ + { + "messageId": "noSpacedFunction" + } + ] +} +``` + +TypeError: Expected `loc` to be an object with integer `line` and `column` properties. + at getOffsetFromLineColumn (apps/oxlint/dist/lint.js) + at report (apps/oxlint/dist/lint.js) + at Object.report (apps/oxlint/dist/lint.js) + at detectOpenSpaces (apps/oxlint/conformance/submodules/eslint/lib/rules/no-spaced-func.js:86:13) + + +#### no-spaced-func > invalid + +```js +f.b (); +``` + +```json +{ + "output": "f.b();", + "errors": [ + { + "messageId": "noSpacedFunction", + "column": 3 + } + ] +} +``` + +TypeError: Expected `loc` to be an object with integer `line` and `column` properties. + at getOffsetFromLineColumn (apps/oxlint/dist/lint.js) + at report (apps/oxlint/dist/lint.js) + at Object.report (apps/oxlint/dist/lint.js) + at detectOpenSpaces (apps/oxlint/conformance/submodules/eslint/lib/rules/no-spaced-func.js:86:13) + + +#### no-spaced-func > invalid + +```js +f.b().c (); +``` + +```json +{ + "output": "f.b().c();", + "errors": [ + { + "messageId": "noSpacedFunction", + "column": 7 + } + ] +} +``` + +TypeError: Expected `loc` to be an object with integer `line` and `column` properties. + at getOffsetFromLineColumn (apps/oxlint/dist/lint.js) + at report (apps/oxlint/dist/lint.js) + at Object.report (apps/oxlint/dist/lint.js) + at detectOpenSpaces (apps/oxlint/conformance/submodules/eslint/lib/rules/no-spaced-func.js:86:13) + + +#### no-spaced-func > invalid + +```js +f() () +``` + +```json +{ + "output": "f()()", + "errors": [ + { + "messageId": "noSpacedFunction" + } + ] +} +``` + +TypeError: Expected `loc` to be an object with integer `line` and `column` properties. + at getOffsetFromLineColumn (apps/oxlint/dist/lint.js) + at report (apps/oxlint/dist/lint.js) + at Object.report (apps/oxlint/dist/lint.js) + at detectOpenSpaces (apps/oxlint/conformance/submodules/eslint/lib/rules/no-spaced-func.js:86:13) + + +#### no-spaced-func > invalid + +```js +(function() {} ()) +``` + +```json +{ + "output": "(function() {}())", + "errors": [ + { + "messageId": "noSpacedFunction" + } + ] +} +``` + +TypeError: Expected `loc` to be an object with integer `line` and `column` properties. + at getOffsetFromLineColumn (apps/oxlint/dist/lint.js) + at report (apps/oxlint/dist/lint.js) + at Object.report (apps/oxlint/dist/lint.js) + at detectOpenSpaces (apps/oxlint/conformance/submodules/eslint/lib/rules/no-spaced-func.js:86:13) + + +#### no-spaced-func > invalid + +```js +var f = new Foo () +``` + +```json +{ + "output": "var f = new Foo()", + "errors": [ + { + "messageId": "noSpacedFunction" + } + ] +} +``` + +TypeError: Expected `loc` to be an object with integer `line` and `column` properties. + at getOffsetFromLineColumn (apps/oxlint/dist/lint.js) + at report (apps/oxlint/dist/lint.js) + at Object.report (apps/oxlint/dist/lint.js) + at detectOpenSpaces (apps/oxlint/conformance/submodules/eslint/lib/rules/no-spaced-func.js:86:13) + + +#### no-spaced-func > invalid + +```js +f ( (0) ) +``` + +```json +{ + "output": "f( (0) )", + "errors": [ + { + "messageId": "noSpacedFunction" + } + ] +} +``` + +TypeError: Expected `loc` to be an object with integer `line` and `column` properties. + at getOffsetFromLineColumn (apps/oxlint/dist/lint.js) + at report (apps/oxlint/dist/lint.js) + at Object.report (apps/oxlint/dist/lint.js) + at detectOpenSpaces (apps/oxlint/conformance/submodules/eslint/lib/rules/no-spaced-func.js:86:13) + + +#### no-spaced-func > invalid + +```js +f(0) (1) +``` + +```json +{ + "output": "f(0)(1)", + "errors": [ + { + "messageId": "noSpacedFunction" + } + ] +} +``` + +TypeError: Expected `loc` to be an object with integer `line` and `column` properties. + at getOffsetFromLineColumn (apps/oxlint/dist/lint.js) + at report (apps/oxlint/dist/lint.js) + at Object.report (apps/oxlint/dist/lint.js) + at detectOpenSpaces (apps/oxlint/conformance/submodules/eslint/lib/rules/no-spaced-func.js:86:13) + + +#### no-spaced-func > invalid + +```js +(f) (0) +``` + +```json +{ + "output": "(f)(0)", + "errors": [ + { + "messageId": "noSpacedFunction" + } + ] +} +``` + +TypeError: Expected `loc` to be an object with integer `line` and `column` properties. + at getOffsetFromLineColumn (apps/oxlint/dist/lint.js) + at report (apps/oxlint/dist/lint.js) + at Object.report (apps/oxlint/dist/lint.js) + at detectOpenSpaces (apps/oxlint/conformance/submodules/eslint/lib/rules/no-spaced-func.js:86:13) + + +#### no-spaced-func > invalid + +```js +f (); + t (); +``` + +```json +{ + "output": "f();\n t();", + "errors": [ + { + "messageId": "noSpacedFunction" + }, + { + "messageId": "noSpacedFunction" + } + ] +} +``` + +TypeError: Expected `loc` to be an object with integer `line` and `column` properties. + at getOffsetFromLineColumn (apps/oxlint/dist/lint.js) + at report (apps/oxlint/dist/lint.js) + at Object.report (apps/oxlint/dist/lint.js) + at detectOpenSpaces (apps/oxlint/conformance/submodules/eslint/lib/rules/no-spaced-func.js:86:13) + + +### `no-sync` + +Pass: 8 / 10 (80.0%) +Fail: 2 / 10 (20.0%) + +#### no-sync > invalid + +```js +function someFunction() {fs.fooSync();} +``` + +```json +{ + "options": [ + { + "allowAtRootLevel": true + } + ], + "errors": [ + { + "messageId": "noSync", + "data": { + "propertyName": "fooSync" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-sync > invalid + +```js +var a = function someFunction() {fs.fooSync();} +``` + +```json +{ + "options": [ + { + "allowAtRootLevel": true + } + ], + "errors": [ + { + "messageId": "noSync", + "data": { + "propertyName": "fooSync" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +### `no-tabs` + +Pass: 0 / 11 (0.0%) +Fail: 11 / 11 (100.0%) + +#### no-tabs > valid + +```js +function test(){ +} +``` + +```json +{} +``` + +TypeError: sourceCode.getLines is not a function + at Program (apps/oxlint/conformance/submodules/eslint/lib/rules/no-tabs.js:78:16) + at walkProgram (apps/oxlint/dist/lint.js) + at lintFileImpl (apps/oxlint/dist/lint.js) + at lint (apps/oxlint/dist/index.js) + + +#### no-tabs > valid + +```js +function test(){ + // sdfdsf +} +``` + +```json +{} +``` + +TypeError: sourceCode.getLines is not a function + at Program (apps/oxlint/conformance/submodules/eslint/lib/rules/no-tabs.js:78:16) + at walkProgram (apps/oxlint/dist/lint.js) + at lintFileImpl (apps/oxlint/dist/lint.js) + at lint (apps/oxlint/dist/index.js) + + +#### no-tabs > valid + +```js +\u0009doSomething(); +``` + +```json +{ + "code": "\tdoSomething();", + "options": [ + { + "allowIndentationTabs": true + } + ] +} +``` + +TypeError: sourceCode.getLines is not a function + at Program (apps/oxlint/conformance/submodules/eslint/lib/rules/no-tabs.js:78:16) + at walkProgram (apps/oxlint/dist/lint.js) + at lintFileImpl (apps/oxlint/dist/lint.js) + at lint (apps/oxlint/dist/index.js) + + +#### no-tabs > valid + +```js +\u0009// comment +``` + +```json +{ + "code": "\t// comment", + "options": [ + { + "allowIndentationTabs": true + } + ] +} +``` + +TypeError: sourceCode.getLines is not a function + at Program (apps/oxlint/conformance/submodules/eslint/lib/rules/no-tabs.js:78:16) + at walkProgram (apps/oxlint/dist/lint.js) + at lintFileImpl (apps/oxlint/dist/lint.js) + at lint (apps/oxlint/dist/index.js) + + +#### no-tabs > invalid + +```js +function test(){\u0009} +``` + +```json +{ + "code": "function test(){\t}", + "errors": [ + { + "messageId": "unexpectedTab", + "line": 1, + "column": 17, + "endLine": 1, + "endColumn": 18 + } + ] +} +``` + +TypeError: sourceCode.getLines is not a function + at Program (apps/oxlint/conformance/submodules/eslint/lib/rules/no-tabs.js:78:16) + at walkProgram (apps/oxlint/dist/lint.js) + at lintFileImpl (apps/oxlint/dist/lint.js) + at lint (apps/oxlint/dist/index.js) + + +#### no-tabs > invalid + +```js +/** \u0009 comment test */ +``` + +```json +{ + "code": "/** \t comment test */", + "errors": [ + { + "messageId": "unexpectedTab", + "line": 1, + "column": 5, + "endLine": 1, + "endColumn": 6 + } + ] +} +``` + +TypeError: sourceCode.getLines is not a function + at Program (apps/oxlint/conformance/submodules/eslint/lib/rules/no-tabs.js:78:16) + at walkProgram (apps/oxlint/dist/lint.js) + at lintFileImpl (apps/oxlint/dist/lint.js) + at lint (apps/oxlint/dist/index.js) + + +#### no-tabs > invalid + +```js +function test(){ + //\u0009sdfdsf +} +``` + +```json +{ + "code": "function test(){\n //\tsdfdsf \n}", + "errors": [ + { + "messageId": "unexpectedTab", + "line": 2, + "column": 5, + "endLine": 2, + "endColumn": 6 + } + ] +} +``` + +TypeError: sourceCode.getLines is not a function + at Program (apps/oxlint/conformance/submodules/eslint/lib/rules/no-tabs.js:78:16) + at walkProgram (apps/oxlint/dist/lint.js) + at lintFileImpl (apps/oxlint/dist/lint.js) + at lint (apps/oxlint/dist/index.js) + + +#### no-tabs > invalid + +```js +function\u0009test(){ + //sdfdsf +} +``` + +```json +{ + "code": "function\ttest(){\n //sdfdsf \n}", + "errors": [ + { + "messageId": "unexpectedTab", + "line": 1, + "column": 9, + "endLine": 1, + "endColumn": 10 + } + ] +} +``` + +TypeError: sourceCode.getLines is not a function + at Program (apps/oxlint/conformance/submodules/eslint/lib/rules/no-tabs.js:78:16) + at walkProgram (apps/oxlint/dist/lint.js) + at lintFileImpl (apps/oxlint/dist/lint.js) + at lint (apps/oxlint/dist/index.js) + + +#### no-tabs > invalid + +```js +function test(){ + //\u0009sdfdsf +\u0009} +``` + +```json +{ + "code": "function test(){\n //\tsdfdsf \n\t}", + "errors": [ + { + "messageId": "unexpectedTab", + "line": 2, + "column": 5, + "endLine": 2, + "endColumn": 6 + }, + { + "messageId": "unexpectedTab", + "line": 3, + "column": 1, + "endLine": 3, + "endColumn": 2 + } + ] +} +``` + +TypeError: sourceCode.getLines is not a function + at Program (apps/oxlint/conformance/submodules/eslint/lib/rules/no-tabs.js:78:16) + at walkProgram (apps/oxlint/dist/lint.js) + at lintFileImpl (apps/oxlint/dist/lint.js) + at lint (apps/oxlint/dist/index.js) + + +#### no-tabs > invalid + +```js +\u0009// Comment with leading tab \u0009 and inline tab +``` + +```json +{ + "code": "\t// Comment with leading tab \t and inline tab", + "options": [ + { + "allowIndentationTabs": true + } + ], + "errors": [ + { + "messageId": "unexpectedTab", + "line": 1, + "column": 30, + "endLine": 1, + "endColumn": 31 + } + ] +} +``` + +TypeError: sourceCode.getLines is not a function + at Program (apps/oxlint/conformance/submodules/eslint/lib/rules/no-tabs.js:78:16) + at walkProgram (apps/oxlint/dist/lint.js) + at lintFileImpl (apps/oxlint/dist/lint.js) + at lint (apps/oxlint/dist/index.js) + + +#### no-tabs > invalid + +```js +\u0009\u0009a =\u0009\u0009\u0009b +\u0009c\u0009\u0009;\u0009\u0009 +``` + +```json +{ + "code": "\t\ta =\t\t\tb +\tc\t\t;\t\t", + "errors": [ + { + "messageId": "unexpectedTab", + "line": 1, + "column": 1, + "endLine": 1, + "endColumn": 3 + }, + { + "messageId": "unexpectedTab", + "line": 1, + "column": 6, + "endLine": 1, + "endColumn": 9 + }, + { + "messageId": "unexpectedTab", + "line": 1, + "column": 12, + "endLine": 1, + "endColumn": 13 + }, + { + "messageId": "unexpectedTab", + "line": 1, + "column": 14, + "endLine": 1, + "endColumn": 16 + }, + { + "messageId": "unexpectedTab", + "line": 1, + "column": 17, + "endLine": 1, + "endColumn": 19 + } + ] +} +``` + +TypeError: sourceCode.getLines is not a function + at Program (apps/oxlint/conformance/submodules/eslint/lib/rules/no-tabs.js:78:16) + at walkProgram (apps/oxlint/dist/lint.js) + at lintFileImpl (apps/oxlint/dist/lint.js) + at lint (apps/oxlint/dist/index.js) + + +### `no-this-before-super` + +Pass: 40 / 63 (63.5%) +Fail: 23 / 63 (36.5%) + +#### no-this-before-super > invalid + +```js +class A extends B { constructor() { this.c = 0; } } +``` + +```json +{ + "errors": [ + { + "messageId": "noBeforeSuper", + "data": { + "kind": "this" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-this-before-super > invalid + +```js +class A extends B { constructor() { this.c(); } } +``` + +```json +{ + "errors": [ + { + "messageId": "noBeforeSuper", + "data": { + "kind": "this" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-this-before-super > invalid + +```js +class A extends B { constructor() { super.c(); } } +``` + +```json +{ + "errors": [ + { + "messageId": "noBeforeSuper", + "data": { + "kind": "super" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-this-before-super > invalid + +```js +class A extends B { constructor() { this.c = 0; super(); } } +``` + +```json +{ + "errors": [ + { + "messageId": "noBeforeSuper", + "data": { + "kind": "this" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-this-before-super > invalid + +```js +class A extends B { constructor() { this.c(); super(); } } +``` + +```json +{ + "errors": [ + { + "messageId": "noBeforeSuper", + "data": { + "kind": "this" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-this-before-super > invalid + +```js +class A extends B { constructor() { super.c(); super(); } } +``` + +```json +{ + "errors": [ + { + "messageId": "noBeforeSuper", + "data": { + "kind": "super" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-this-before-super > invalid + +```js +class A extends B { constructor() { super(this.c); } } +``` + +```json +{ + "errors": [ + { + "messageId": "noBeforeSuper", + "data": { + "kind": "this" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-this-before-super > invalid + +```js +class A extends B { constructor() { super(this.c()); } } +``` + +```json +{ + "errors": [ + { + "messageId": "noBeforeSuper", + "data": { + "kind": "this" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-this-before-super > invalid + +```js +class A extends B { constructor() { super(super.c()); } } +``` + +```json +{ + "errors": [ + { + "messageId": "noBeforeSuper", + "data": { + "kind": "super" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-this-before-super > invalid + +```js +class A extends B { constructor() { class C extends D { constructor() { super(); this.e(); } } this.f(); super(); } } +``` + +```json +{ + "errors": [ + { + "messageId": "noBeforeSuper", + "data": { + "kind": "this" + }, + "column": 96 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-this-before-super > invalid + +```js +class A extends B { constructor() { class C extends D { constructor() { this.e(); super(); } } super(); this.f(); } } +``` + +```json +{ + "errors": [ + { + "messageId": "noBeforeSuper", + "data": { + "kind": "this" + }, + "column": 73 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-this-before-super > invalid + +```js +class A extends B { constructor() { if (a) super(); this.a(); } } +``` + +```json +{ + "errors": [ + { + "messageId": "noBeforeSuper", + "data": { + "kind": "this" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-this-before-super > invalid + +```js +class A extends B { constructor() { try { super(); } finally { this.a; } } } +``` + +```json +{ + "errors": [ + { + "messageId": "noBeforeSuper", + "data": { + "kind": "this" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-this-before-super > invalid + +```js +class A extends B { constructor() { try { super(); } catch (err) { } this.a; } } +``` + +```json +{ + "errors": [ + { + "messageId": "noBeforeSuper", + "data": { + "kind": "this" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-this-before-super > invalid + +```js +class A extends B { constructor() { foo &&= super().a; this.c(); } } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2021 + }, + "errors": [ + { + "messageId": "noBeforeSuper", + "data": { + "kind": "this" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-this-before-super > invalid + +```js +class A extends B { constructor() { foo ||= super().a; this.c(); } } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2021 + }, + "errors": [ + { + "messageId": "noBeforeSuper", + "data": { + "kind": "this" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-this-before-super > invalid + +```js +class A extends B { constructor() { foo ??= super().a; this.c(); } } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2021 + }, + "errors": [ + { + "messageId": "noBeforeSuper", + "data": { + "kind": "this" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-this-before-super > invalid + +```js + + class A extends B { + constructor() { + if (foo) { + if (bar) { } + super(); + } + this.a(); + } + } +``` + +```json +{ + "errors": [ + { + "messageId": "noBeforeSuper", + "data": { + "kind": "this" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-this-before-super > invalid + +```js + + class A extends B { + constructor() { + if (foo) { + } else { + super(); + } + this.a(); + } + } +``` + +```json +{ + "errors": [ + { + "messageId": "noBeforeSuper", + "data": { + "kind": "this" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-this-before-super > invalid + +```js + + class A extends B { + constructor() { + try { + call(); + } finally { + this.a(); + } + } + } +``` + +```json +{ + "errors": [ + { + "messageId": "noBeforeSuper", + "data": { + "kind": "this" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-this-before-super > invalid + +```js + + class A extends B { + constructor() { + while (foo) { + super(); + } + this.a(); + } + } +``` + +```json +{ + "errors": [ + { + "messageId": "noBeforeSuper", + "data": { + "kind": "this" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-this-before-super > invalid + +```js + + class A extends B { + constructor() { + while (foo) { + this.a(); + super(); + } + } + } +``` + +```json +{ + "errors": [ + { + "messageId": "noBeforeSuper", + "data": { + "kind": "this" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-this-before-super > invalid + +```js + + class A extends B { + constructor() { + while (foo) { + if (init) { + this.a(); + super(); + } + } + } + } +``` + +```json +{ + "errors": [ + { + "messageId": "noBeforeSuper", + "data": { + "kind": "this" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +### `no-trailing-spaces` + +Pass: 53 / 54 (98.1%) +Fail: 1 / 54 (1.9%) + +#### no-trailing-spaces > valid + +```js +#!/usr/bin/env node +``` + +```json +{ + "options": [ + { + "ignoreComments": true + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-trailing-spaces', + message: 'Trailing spaces not allowed.', + messageId: 'trailingSpace', + severity: 1, + nodeType: null, + line: 1, + column: 19, + endLine: 1, + endColumn: 20, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +### `no-unassigned-vars` + +Pass: 15 / 23 (65.2%) +Fail: 8 / 23 (34.8%) + +#### no-unassigned-vars > valid + +```js +let z: number | undefined = undefined; log(z); +``` + +```json +{} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-unassigned-vars > valid + +```js +declare let c: string | undefined; log(c); +``` + +```json +{} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-unassigned-vars > valid + +```js +\u0009\u0009\u0009const foo = (two: string): void => { +\u0009\u0009\u0009\u0009let one: string | undefined; +\u0009\u0009\u0009\u0009if (one !== two) { +\u0009\u0009\u0009\u0009\u0009one = two; +\u0009\u0009\u0009\u0009} +\u0009\u0009\u0009} +``` + +```json +{ + "code": "\t\t\tconst foo = (two: string): void => {\n\t\t\t\tlet one: string | undefined;\n\t\t\t\tif (one !== two) {\n\t\t\t\t\tone = two;\n\t\t\t\t}\n\t\t\t}" +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-unassigned-vars > valid + +```js +\u0009\u0009\u0009declare module 'module' { +\u0009\u0009\u0009\u0009import type { T } from 'module'; +\u0009\u0009\u0009\u0009let x: T; +\u0009\u0009\u0009\u0009export = x; +\u0009\u0009\u0009} +``` + +```json +{ + "code": "\t\t\tdeclare module 'module' {\n\t\t\t\timport type { T } from 'module';\n\t\t\t\tlet x: T;\n\t\t\t\texport = x;\n\t\t\t}" +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-unassigned-vars > invalid + +```js +let x: number; log(x); +``` + +```json +{ + "errors": [ + { + "messageId": "unassigned", + "line": 1, + "column": 5, + "data": { + "name": "x" + } + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-unassigned-vars > invalid + +```js +let x: number | undefined; log(x); +``` + +```json +{ + "errors": [ + { + "messageId": "unassigned", + "line": 1, + "column": 5, + "data": { + "name": "x" + } + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-unassigned-vars > invalid + +```js +const foo = (two: string): void => { let one: string | undefined; if (one === two) {} } +``` + +```json +{ + "errors": [ + { + "messageId": "unassigned", + "line": 1, + "column": 42, + "data": { + "name": "one" + } + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-unassigned-vars > invalid + +```js +\u0009\u0009\u0009\u0009declare module 'module' { +\u0009\u0009\u0009\u0009\u0009let x: string; +\u0009\u0009\u0009\u0009} +\u0009\u0009\u0009\u0009let y: string; +\u0009\u0009\u0009\u0009console.log(y); +``` + +```json +{ + "code": "\t\t\t\tdeclare module 'module' {\n\t\t\t\t\tlet x: string;\n\t\t\t\t}\n\t\t\t\tlet y: string;\n\t\t\t\tconsole.log(y);", + "errors": [ + { + "messageId": "unassigned", + "line": 4, + "column": 9, + "data": { + "name": "y" + } + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +### `no-undef` + +Pass: 54 / 94 (57.4%) +Fail: 40 / 94 (42.6%) + +#### no-undef > valid + +```js +var a = 1, b = 2; a; +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 3: [ + { + ruleId: 'rule-to-test/no-undef', + message: "'a' is not defined.", + messageId: 'undef', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 4, + endLine: 1, + endColumn: 5, + suggestions: null + }, + { + ruleId: 'rule-to-test/no-undef', + message: "'b' is not defined.", + messageId: 'undef', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 11, + endLine: 1, + endColumn: 12, + suggestions: null + }, + { + ruleId: 'rule-to-test/no-undef', + message: "'a' is not defined.", + messageId: 'undef', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 18, + endLine: 1, + endColumn: 19, + suggestions: null + } +] + +3 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-undef > valid + +```js +/*global b*/ function f() { b; } +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-undef', + message: "'b' is not defined.", + messageId: 'undef', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 28, + endLine: 1, + endColumn: 29, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-undef > valid + +```js +function f() { b; } +``` + +```json +{ + "languageOptions": { + "globals": { + "b": false + } + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-undef', + message: "'b' is not defined.", + messageId: 'undef', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 15, + endLine: 1, + endColumn: 16, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-undef > valid + +```js +/*global b a:false*/ a; function f() { b; a; } +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 3: [ + { + ruleId: 'rule-to-test/no-undef', + message: "'a' is not defined.", + messageId: 'undef', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 22, + endLine: 1, + endColumn: 23, + suggestions: null + }, + { + ruleId: 'rule-to-test/no-undef', + message: "'b' is not defined.", + messageId: 'undef', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 41, + endLine: 1, + endColumn: 42, + suggestions: null + }, + { + ruleId: 'rule-to-test/no-undef', + message: "'a' is not defined.", + messageId: 'undef', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 44, + endLine: 1, + endColumn: 45, + suggestions: null + } +] + +3 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-undef > valid + +```js +var a; a = 1; a++; +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/no-undef', + message: "'a' is not defined.", + messageId: 'undef', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 7, + endLine: 1, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/no-undef', + message: "'a' is not defined.", + messageId: 'undef', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 14, + endLine: 1, + endColumn: 15, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-undef > valid + +```js +var a; function f() { a = 1; } +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-undef', + message: "'a' is not defined.", + messageId: 'undef', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 22, + endLine: 1, + endColumn: 23, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-undef > valid + +```js +/*global b:true*/ b++; +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-undef', + message: "'b' is not defined.", + messageId: 'undef', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 18, + endLine: 1, + endColumn: 19, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-undef > valid + +```js +window; +``` + +```json +{ + "languageOptions": { + "globals": { + "AbortController": false, + "AbortSignal": false, + "AbsoluteOrientationSensor": false, + "AbstractRange": false, + "Accelerometer": false, + "addEventListener": false, + "ai": false, + "AI": false, + "AICreateMonitor": false, + "AITextSession": false, + "alert": false, + "AnalyserNode": false, + "Animation": false, + "AnimationEffect": false, + "AnimationEvent": false, + "AnimationPlaybackEvent": false, + "AnimationTimeline": false, + "AsyncDisposableStack": false, + "atob": false, + "Attr": false, + "Audio": false, + "AudioBuffer": false, + "AudioBufferSourceNode": false, + "AudioContext": false, + "AudioData": false, + "AudioDecoder": false, + "AudioDestinationNode": false, + "AudioEncoder": false, + "AudioListener": false, + "AudioNode": false, + "AudioParam": false, + "AudioParamMap": false, + "AudioProcessingEvent": false, + "AudioScheduledSourceNode": false, + "AudioSinkInfo": false, + "AudioWorklet": false, + "AudioWorkletGlobalScope": false, + "AudioWorkletNode": false, + "AudioWorkletProcessor": false, + "AuthenticatorAssertionResponse": false, + "AuthenticatorAttestationResponse": false, + "AuthenticatorResponse": false, + "BackgroundFetchManager": false, + "BackgroundFetchRecord": false, + "BackgroundFetchRegistration": false, + "BarcodeDetector": false, + "BarProp": false, + "BaseAudioContext": false, + "BatteryManager": false, + "BeforeUnloadEvent": false, + "BiquadFilterNode": false, + "Blob": false, + "BlobEvent": false, + "Bluetooth": false, + "BluetoothCharacteristicProperties": false, + "BluetoothDevice": false, + "BluetoothRemoteGATTCharacteristic": false, + "BluetoothRemoteGATTDescriptor": false, + "BluetoothRemoteGATTServer": false, + "BluetoothRemoteGATTService": false, + "BluetoothUUID": false, + "blur": false, + "BroadcastChannel": false, + "BrowserCaptureMediaStreamTrack": false, + "btoa": false, + "ByteLengthQueuingStrategy": false, + "Cache": false, + "caches": false, + "CacheStorage": false, + "cancelAnimationFrame": false, + "cancelIdleCallback": false, + "CanvasCaptureMediaStream": false, + "CanvasCaptureMediaStreamTrack": false, + "CanvasGradient": false, + "CanvasPattern": false, + "CanvasRenderingContext2D": false, + "CaptureController": false, + "CaretPosition": false, + "CDATASection": false, + "ChannelMergerNode": false, + "ChannelSplitterNode": false, + "ChapterInformation": false, + "CharacterBoundsUpdateEvent": false, + "CharacterData": false, + "clearInterval": false, + "clearTimeout": false, + "clientInformation": false, + "Clipboard": false, + "ClipboardChangeEvent": false, + "ClipboardEvent": false, + "ClipboardItem": false, + "close": false, + "closed": false, + "CloseEvent": false, + "CloseWatcher": false, + "CommandEvent": false, + "Comment": false, + "CompositionEvent": false, + "CompressionStream": false, + "confirm": false, + "console": false, + "ConstantSourceNode": false, + "ContentVisibilityAutoStateChangeEvent": false, + "ConvolverNode": false, + "CookieChangeEvent": false, + "CookieDeprecationLabel": false, + "cookieStore": false, + "CookieStore": false, + "CookieStoreManager": false, + "CountQueuingStrategy": false, + "createImageBitmap": false, + "CreateMonitor": false, + "Credential": false, + "credentialless": false, + "CredentialsContainer": false, + "CropTarget": false, + "crossOriginIsolated": false, + "crypto": false, + "Crypto": false, + "CryptoKey": false, + "CSPViolationReportBody": false, + "CSS": false, + "CSSAnimation": false, + "CSSConditionRule": false, + "CSSContainerRule": false, + "CSSCounterStyleRule": false, + "CSSFontFaceRule": false, + "CSSFontFeatureValuesRule": false, + "CSSFontPaletteValuesRule": false, + "CSSFunctionDeclarations": false, + "CSSFunctionDescriptors": false, + "CSSFunctionRule": false, + "CSSGroupingRule": false, + "CSSImageValue": false, + "CSSImportRule": false, + "CSSKeyframeRule": false, + "CSSKeyframesRule": false, + "CSSKeywordValue": false, + "CSSLayerBlockRule": false, + "CSSLayerStatementRule": false, + "CSSMarginRule": false, + "CSSMathClamp": false, + "CSSMathInvert": false, + "CSSMathMax": false, + "CSSMathMin": false, + "CSSMathNegate": false, + "CSSMathProduct": false, + "CSSMathSum": false, + "CSSMathValue": false, + "CSSMatrixComponent": false, + "CSSMediaRule": false, + "CSSNamespaceRule": false, + "CSSNestedDeclarations": false, + "CSSNumericArray": false, + "CSSNumericValue": false, + "CSSPageDescriptors": false, + "CSSPageRule": false, + "CSSPerspective": false, + "CSSPositionTryDescriptors": false, + "CSSPositionTryRule": false, + "CSSPositionValue": false, + "CSSPropertyRule": false, + "CSSRotate": false, + "CSSRule": false, + "CSSRuleList": false, + "CSSScale": false, + "CSSScopeRule": false, + "CSSSkew": false, + "CSSSkewX": false, + "CSSSkewY": false, + "CSSStartingStyleRule": false, + "CSSStyleDeclaration": false, + "CSSStyleRule": false, + "CSSStyleSheet": false, + "CSSStyleValue": false, + "CSSSupportsRule": false, + "CSSTransformComponent": false, + "CSSTransformValue": false, + "CSSTransition": false, + "CSSTranslate": false, + "CSSUnitValue": false, + "CSSUnparsedValue": false, + "CSSVariableReferenceValue": false, + "CSSViewTransitionRule": false, + "currentFrame": false, + "currentTime": false, + "CustomElementRegistry": false, + "customElements": false, + "CustomEvent": false, + "CustomStateSet": false, + "DataTransfer": false, + "DataTransferItem": false, + "DataTransferItemList": false, + "DecompressionStream": false, + "DelayNode": false, + "DelegatedInkTrailPresenter": false, + "DeviceMotionEvent": false, + "DeviceMotionEventAcceleration": false, + "DeviceMotionEventRotationRate": false, + "DeviceOrientationEvent": false, + "devicePixelRatio": false, + "DevicePosture": false, + "DigitalCredential": false, + "dispatchEvent": false, + "DisposableStack": false, + "document": false, + "Document": false, + "DocumentFragment": false, + "documentPictureInPicture": false, + "DocumentPictureInPicture": false, + "DocumentPictureInPictureEvent": false, + "DocumentTimeline": false, + "DocumentType": false, + "DOMError": false, + "DOMException": false, + "DOMImplementation": false, + "DOMMatrix": false, + "DOMMatrixReadOnly": false, + "DOMParser": false, + "DOMPoint": false, + "DOMPointReadOnly": false, + "DOMQuad": false, + "DOMRect": false, + "DOMRectList": false, + "DOMRectReadOnly": false, + "DOMStringList": false, + "DOMStringMap": false, + "DOMTokenList": false, + "DragEvent": false, + "DynamicsCompressorNode": false, + "EditContext": false, + "Element": false, + "ElementInternals": false, + "EncodedAudioChunk": false, + "EncodedVideoChunk": false, + "ErrorEvent": false, + "event": false, + "Event": false, + "EventCounts": false, + "EventSource": false, + "EventTarget": false, + "external": false, + "External": false, + "EyeDropper": false, + "FeaturePolicy": false, + "FederatedCredential": false, + "fence": false, + "Fence": false, + "FencedFrameConfig": false, + "fetch": false, + "fetchLater": false, + "FetchLaterResult": false, + "File": false, + "FileList": false, + "FileReader": false, + "FileSystem": false, + "FileSystemDirectoryEntry": false, + "FileSystemDirectoryHandle": false, + "FileSystemDirectoryReader": false, + "FileSystemEntry": false, + "FileSystemFileEntry": false, + "FileSystemFileHandle": false, + "FileSystemHandle": false, + "FileSystemObserver": false, + "FileSystemWritableFileStream": false, + "find": false, + "focus": false, + "FocusEvent": false, + "FontData": false, + "FontFace": false, + "FontFaceSet": false, + "FontFaceSetLoadEvent": false, + "FormData": false, + "FormDataEvent": false, + "FragmentDirective": false, + "frameElement": false, + "frames": false, + "GainNode": false, + "Gamepad": false, + "GamepadAxisMoveEvent": false, + "GamepadButton": false, + "GamepadButtonEvent": false, + "GamepadEvent": false, + "GamepadHapticActuator": false, + "GamepadPose": false, + "Geolocation": false, + "GeolocationCoordinates": false, + "GeolocationPosition": false, + "GeolocationPositionError": false, + "getComputedStyle": false, + "getScreenDetails": false, + "getSelection": false, + "GPU": false, + "GPUAdapter": false, + "GPUAdapterInfo": false, + "GPUBindGroup": false, + "GPUBindGroupLayout": false, + "GPUBuffer": false, + "GPUBufferUsage": false, + "GPUCanvasContext": false, + "GPUColorWrite": false, + "GPUCommandBuffer": false, + "GPUCommandEncoder": false, + "GPUCompilationInfo": false, + "GPUCompilationMessage": false, + "GPUComputePassEncoder": false, + "GPUComputePipeline": false, + "GPUDevice": false, + "GPUDeviceLostInfo": false, + "GPUError": false, + "GPUExternalTexture": false, + "GPUInternalError": false, + "GPUMapMode": false, + "GPUOutOfMemoryError": false, + "GPUPipelineError": false, + "GPUPipelineLayout": false, + "GPUQuerySet": false, + "GPUQueue": false, + "GPURenderBundle": false, + "GPURenderBundleEncoder": false, + "GPURenderPassEncoder": false, + "GPURenderPipeline": false, + "GPUSampler": false, + "GPUShaderModule": false, + "GPUShaderStage": false, + "GPUSupportedFeatures": false, + "GPUSupportedLimits": false, + "GPUTexture": false, + "GPUTextureUsage": false, + "GPUTextureView": false, + "GPUUncapturedErrorEvent": false, + "GPUValidationError": false, + "GravitySensor": false, + "Gyroscope": false, + "HashChangeEvent": false, + "Headers": false, + "HID": false, + "HIDConnectionEvent": false, + "HIDDevice": false, + "HIDInputReportEvent": false, + "Highlight": false, + "HighlightRegistry": false, + "history": false, + "History": false, + "HTMLAllCollection": false, + "HTMLAnchorElement": false, + "HTMLAreaElement": false, + "HTMLAudioElement": false, + "HTMLBaseElement": false, + "HTMLBodyElement": false, + "HTMLBRElement": false, + "HTMLButtonElement": false, + "HTMLCanvasElement": false, + "HTMLCollection": false, + "HTMLDataElement": false, + "HTMLDataListElement": false, + "HTMLDetailsElement": false, + "HTMLDialogElement": false, + "HTMLDirectoryElement": false, + "HTMLDivElement": false, + "HTMLDListElement": false, + "HTMLDocument": false, + "HTMLElement": false, + "HTMLEmbedElement": false, + "HTMLFencedFrameElement": false, + "HTMLFieldSetElement": false, + "HTMLFontElement": false, + "HTMLFormControlsCollection": false, + "HTMLFormElement": false, + "HTMLFrameElement": false, + "HTMLFrameSetElement": false, + "HTMLHeadElement": false, + "HTMLHeadingElement": false, + "HTMLHRElement": false, + "HTMLHtmlElement": false, + "HTMLIFrameElement": false, + "HTMLImageElement": false, + "HTMLInputElement": false, + "HTMLLabelElement": false, + "HTMLLegendElement": false, + "HTMLLIElement": false, + "HTMLLinkElement": false, + "HTMLMapElement": false, + "HTMLMarqueeElement": false, + "HTMLMediaElement": false, + "HTMLMenuElement": false, + "HTMLMetaElement": false, + "HTMLMeterElement": false, + "HTMLModElement": false, + "HTMLObjectElement": false, + "HTMLOListElement": false, + "HTMLOptGroupElement": false, + "HTMLOptionElement": false, + "HTMLOptionsCollection": false, + "HTMLOutputElement": false, + "HTMLParagraphElement": false, + "HTMLParamElement": false, + "HTMLPictureElement": false, + "HTMLPreElement": false, + "HTMLProgressElement": false, + "HTMLQuoteElement": false, + "HTMLScriptElement": false, + "HTMLSelectedContentElement": false, + "HTMLSelectElement": false, + "HTMLSlotElement": false, + "HTMLSourceElement": false, + "HTMLSpanElement": false, + "HTMLStyleElement": false, + "HTMLTableCaptionElement": false, + "HTMLTableCellElement": false, + "HTMLTableColElement": false, + "HTMLTableElement": false, + "HTMLTableRowElement": false, + "HTMLTableSectionElement": false, + "HTMLTemplateElement": false, + "HTMLTextAreaElement": false, + "HTMLTimeElement": false, + "HTMLTitleElement": false, + "HTMLTrackElement": false, + "HTMLUListElement": false, + "HTMLUnknownElement": false, + "HTMLVideoElement": false, + "IDBCursor": false, + "IDBCursorWithValue": false, + "IDBDatabase": false, + "IDBFactory": false, + "IDBIndex": false, + "IDBKeyRange": false, + "IDBObjectStore": false, + "IDBOpenDBRequest": false, + "IDBRecord": false, + "IDBRequest": false, + "IDBTransaction": false, + "IDBVersionChangeEvent": false, + "IdentityCredential": false, + "IdentityCredentialError": false, + "IdentityProvider": false, + "IdleDeadline": false, + "IdleDetector": false, + "IIRFilterNode": false, + "Image": false, + "ImageBitmap": false, + "ImageBitmapRenderingContext": false, + "ImageCapture": false, + "ImageData": false, + "ImageDecoder": false, + "ImageTrack": false, + "ImageTrackList": false, + "indexedDB": false, + "Ink": false, + "innerHeight": false, + "innerWidth": false, + "InputDeviceCapabilities": false, + "InputDeviceInfo": false, + "InputEvent": false, + "IntegrityViolationReportBody": false, + "InterestEvent": false, + "IntersectionObserver": false, + "IntersectionObserverEntry": false, + "isSecureContext": false, + "Keyboard": false, + "KeyboardEvent": false, + "KeyboardLayoutMap": false, + "KeyframeEffect": false, + "LanguageDetector": false, + "LargestContentfulPaint": false, + "LaunchParams": false, + "launchQueue": false, + "LaunchQueue": false, + "LayoutShift": false, + "LayoutShiftAttribution": false, + "length": false, + "LinearAccelerationSensor": false, + "localStorage": false, + "location": true, + "Location": false, + "locationbar": false, + "Lock": false, + "LockManager": false, + "matchMedia": false, + "MathMLElement": false, + "MediaCapabilities": false, + "MediaCapabilitiesInfo": false, + "MediaDeviceInfo": false, + "MediaDevices": false, + "MediaElementAudioSourceNode": false, + "MediaEncryptedEvent": false, + "MediaError": false, + "MediaKeyError": false, + "MediaKeyMessageEvent": false, + "MediaKeys": false, + "MediaKeySession": false, + "MediaKeyStatusMap": false, + "MediaKeySystemAccess": false, + "MediaList": false, + "MediaMetadata": false, + "MediaQueryList": false, + "MediaQueryListEvent": false, + "MediaRecorder": false, + "MediaRecorderErrorEvent": false, + "MediaSession": false, + "MediaSource": false, + "MediaSourceHandle": false, + "MediaStream": false, + "MediaStreamAudioDestinationNode": false, + "MediaStreamAudioSourceNode": false, + "MediaStreamEvent": false, + "MediaStreamTrack": false, + "MediaStreamTrackAudioSourceNode": false, + "MediaStreamTrackAudioStats": false, + "MediaStreamTrackEvent": false, + "MediaStreamTrackGenerator": false, + "MediaStreamTrackProcessor": false, + "MediaStreamTrackVideoStats": false, + "menubar": false, + "MessageChannel": false, + "MessageEvent": false, + "MessagePort": false, + "MIDIAccess": false, + "MIDIConnectionEvent": false, + "MIDIInput": false, + "MIDIInputMap": false, + "MIDIMessageEvent": false, + "MIDIOutput": false, + "MIDIOutputMap": false, + "MIDIPort": false, + "MimeType": false, + "MimeTypeArray": false, + "model": false, + "ModelGenericSession": false, + "ModelManager": false, + "MouseEvent": false, + "moveBy": false, + "moveTo": false, + "MutationEvent": false, + "MutationObserver": false, + "MutationRecord": false, + "name": false, + "NamedNodeMap": false, + "NavigateEvent": false, + "navigation": false, + "Navigation": false, + "NavigationActivation": false, + "NavigationCurrentEntryChangeEvent": false, + "NavigationDestination": false, + "NavigationHistoryEntry": false, + "NavigationPrecommitController": false, + "NavigationPreloadManager": false, + "NavigationTransition": false, + "navigator": false, + "Navigator": false, + "NavigatorLogin": false, + "NavigatorManagedData": false, + "NavigatorUAData": false, + "NetworkInformation": false, + "Node": false, + "NodeFilter": false, + "NodeIterator": false, + "NodeList": false, + "Notification": false, + "NotifyPaintEvent": false, + "NotRestoredReasonDetails": false, + "NotRestoredReasons": false, + "Observable": false, + "OfflineAudioCompletionEvent": false, + "OfflineAudioContext": false, + "offscreenBuffering": false, + "OffscreenCanvas": false, + "OffscreenCanvasRenderingContext2D": false, + "onabort": true, + "onafterprint": true, + "onanimationcancel": true, + "onanimationend": true, + "onanimationiteration": true, + "onanimationstart": true, + "onappinstalled": true, + "onauxclick": true, + "onbeforeinput": true, + "onbeforeinstallprompt": true, + "onbeforematch": true, + "onbeforeprint": true, + "onbeforetoggle": true, + "onbeforeunload": true, + "onbeforexrselect": true, + "onblur": true, + "oncancel": true, + "oncanplay": true, + "oncanplaythrough": true, + "onchange": true, + "onclick": true, + "onclose": true, + "oncommand": true, + "oncontentvisibilityautostatechange": true, + "oncontextlost": true, + "oncontextmenu": true, + "oncontextrestored": true, + "oncopy": true, + "oncuechange": true, + "oncut": true, + "ondblclick": true, + "ondevicemotion": true, + "ondeviceorientation": true, + "ondeviceorientationabsolute": true, + "ondrag": true, + "ondragend": true, + "ondragenter": true, + "ondragleave": true, + "ondragover": true, + "ondragstart": true, + "ondrop": true, + "ondurationchange": true, + "onemptied": true, + "onended": true, + "onerror": true, + "onfocus": true, + "onformdata": true, + "ongamepadconnected": true, + "ongamepaddisconnected": true, + "ongotpointercapture": true, + "onhashchange": true, + "oninput": true, + "oninvalid": true, + "onkeydown": true, + "onkeypress": true, + "onkeyup": true, + "onlanguagechange": true, + "onload": true, + "onloadeddata": true, + "onloadedmetadata": true, + "onloadstart": true, + "onlostpointercapture": true, + "onmessage": true, + "onmessageerror": true, + "onmousedown": true, + "onmouseenter": true, + "onmouseleave": true, + "onmousemove": true, + "onmouseout": true, + "onmouseover": true, + "onmouseup": true, + "onmousewheel": true, + "onoffline": true, + "ononline": true, + "onpagehide": true, + "onpagereveal": true, + "onpageshow": true, + "onpageswap": true, + "onpaste": true, + "onpause": true, + "onplay": true, + "onplaying": true, + "onpointercancel": true, + "onpointerdown": true, + "onpointerenter": true, + "onpointerleave": true, + "onpointermove": true, + "onpointerout": true, + "onpointerover": true, + "onpointerrawupdate": true, + "onpointerup": true, + "onpopstate": true, + "onprogress": true, + "onratechange": true, + "onrejectionhandled": true, + "onreset": true, + "onresize": true, + "onscroll": true, + "onscrollend": true, + "onscrollsnapchange": true, + "onscrollsnapchanging": true, + "onsearch": true, + "onsecuritypolicyviolation": true, + "onseeked": true, + "onseeking": true, + "onselect": true, + "onselectionchange": true, + "onselectstart": true, + "onslotchange": true, + "onstalled": true, + "onstorage": true, + "onsubmit": true, + "onsuspend": true, + "ontimeupdate": true, + "ontoggle": true, + "ontransitioncancel": true, + "ontransitionend": true, + "ontransitionrun": true, + "ontransitionstart": true, + "onunhandledrejection": true, + "onunload": true, + "onvolumechange": true, + "onwaiting": true, + "onwheel": true, + "open": false, + "opener": false, + "Option": false, + "OrientationSensor": false, + "origin": false, + "originAgentCluster": false, + "OscillatorNode": false, + "OTPCredential": false, + "outerHeight": false, + "outerWidth": false, + "OverconstrainedError": false, + "PageRevealEvent": false, + "PageSwapEvent": false, + "PageTransitionEvent": false, + "pageXOffset": false, + "pageYOffset": false, + "PannerNode": false, + "parent": false, + "PasswordCredential": false, + "Path2D": false, + "PaymentAddress": false, + "PaymentManager": false, + "PaymentMethodChangeEvent": false, + "PaymentRequest": false, + "PaymentRequestUpdateEvent": false, + "PaymentResponse": false, + "performance": false, + "Performance": false, + "PerformanceElementTiming": false, + "PerformanceEntry": false, + "PerformanceEventTiming": false, + "PerformanceLongAnimationFrameTiming": false, + "PerformanceLongTaskTiming": false, + "PerformanceMark": false, + "PerformanceMeasure": false, + "PerformanceNavigation": false, + "PerformanceNavigationTiming": false, + "PerformanceObserver": false, + "PerformanceObserverEntryList": false, + "PerformancePaintTiming": false, + "PerformanceResourceTiming": false, + "PerformanceScriptTiming": false, + "PerformanceServerTiming": false, + "PerformanceTiming": false, + "PeriodicSyncManager": false, + "PeriodicWave": false, + "Permissions": false, + "PermissionStatus": false, + "PERSISTENT": false, + "personalbar": false, + "PictureInPictureEvent": false, + "PictureInPictureWindow": false, + "Plugin": false, + "PluginArray": false, + "PointerEvent": false, + "PopStateEvent": false, + "postMessage": false, + "Presentation": false, + "PresentationAvailability": false, + "PresentationConnection": false, + "PresentationConnectionAvailableEvent": false, + "PresentationConnectionCloseEvent": false, + "PresentationConnectionList": false, + "PresentationReceiver": false, + "PresentationRequest": false, + "PressureObserver": false, + "PressureRecord": false, + "print": false, + "ProcessingInstruction": false, + "Profiler": false, + "ProgressEvent": false, + "PromiseRejectionEvent": false, + "prompt": false, + "ProtectedAudience": false, + "PublicKeyCredential": false, + "PushManager": false, + "PushSubscription": false, + "PushSubscriptionOptions": false, + "queryLocalFonts": false, + "queueMicrotask": false, + "QuotaExceededError": false, + "RadioNodeList": false, + "Range": false, + "ReadableByteStreamController": false, + "ReadableStream": false, + "ReadableStreamBYOBReader": false, + "ReadableStreamBYOBRequest": false, + "ReadableStreamDefaultController": false, + "ReadableStreamDefaultReader": false, + "registerProcessor": false, + "RelativeOrientationSensor": false, + "RemotePlayback": false, + "removeEventListener": false, + "ReportBody": false, + "reportError": false, + "ReportingObserver": false, + "Request": false, + "requestAnimationFrame": false, + "requestIdleCallback": false, + "resizeBy": false, + "ResizeObserver": false, + "ResizeObserverEntry": false, + "ResizeObserverSize": false, + "resizeTo": false, + "Response": false, + "RestrictionTarget": false, + "RTCCertificate": false, + "RTCDataChannel": false, + "RTCDataChannelEvent": false, + "RTCDtlsTransport": false, + "RTCDTMFSender": false, + "RTCDTMFToneChangeEvent": false, + "RTCEncodedAudioFrame": false, + "RTCEncodedVideoFrame": false, + "RTCError": false, + "RTCErrorEvent": false, + "RTCIceCandidate": false, + "RTCIceTransport": false, + "RTCPeerConnection": false, + "RTCPeerConnectionIceErrorEvent": false, + "RTCPeerConnectionIceEvent": false, + "RTCRtpReceiver": false, + "RTCRtpScriptTransform": false, + "RTCRtpSender": false, + "RTCRtpTransceiver": false, + "RTCSctpTransport": false, + "RTCSessionDescription": false, + "RTCStatsReport": false, + "RTCTrackEvent": false, + "sampleRate": false, + "scheduler": false, + "Scheduler": false, + "Scheduling": false, + "screen": false, + "Screen": false, + "ScreenDetailed": false, + "ScreenDetails": false, + "screenLeft": false, + "ScreenOrientation": false, + "screenTop": false, + "screenX": false, + "screenY": false, + "ScriptProcessorNode": false, + "scroll": false, + "scrollbars": false, + "scrollBy": false, + "ScrollTimeline": false, + "scrollTo": false, + "scrollX": false, + "scrollY": false, + "SecurityPolicyViolationEvent": false, + "Selection": false, + "self": false, + "Sensor": false, + "SensorErrorEvent": false, + "Serial": false, + "SerialPort": false, + "ServiceWorker": false, + "ServiceWorkerContainer": false, + "ServiceWorkerRegistration": false, + "sessionStorage": false, + "setInterval": false, + "setTimeout": false, + "ShadowRoot": false, + "sharedStorage": false, + "SharedStorage": false, + "SharedStorageAppendMethod": false, + "SharedStorageClearMethod": false, + "SharedStorageDeleteMethod": false, + "SharedStorageModifierMethod": false, + "SharedStorageSetMethod": false, + "SharedStorageWorklet": false, + "SharedWorker": false, + "showDirectoryPicker": false, + "showOpenFilePicker": false, + "showSaveFilePicker": false, + "SnapEvent": false, + "SourceBuffer": false, + "SourceBufferList": false, + "SpeechGrammar": false, + "SpeechGrammarList": false, + "SpeechRecognition": false, + "SpeechRecognitionErrorEvent": false, + "SpeechRecognitionEvent": false, + "SpeechRecognitionPhrase": false, + "speechSynthesis": false, + "SpeechSynthesis": false, + "SpeechSynthesisErrorEvent": false, + "SpeechSynthesisEvent": false, + "SpeechSynthesisUtterance": false, + "SpeechSynthesisVoice": false, + "StaticRange": false, + "status": false, + "statusbar": false, + "StereoPannerNode": false, + "stop": false, + "Storage": false, + "StorageBucket": false, + "StorageBucketManager": false, + "StorageEvent": false, + "StorageManager": false, + "structuredClone": false, + "styleMedia": false, + "StylePropertyMap": false, + "StylePropertyMapReadOnly": false, + "StyleSheet": false, + "StyleSheetList": false, + "SubmitEvent": false, + "Subscriber": false, + "SubtleCrypto": false, + "Summarizer": false, + "SuppressedError": false, + "SVGAElement": false, + "SVGAngle": false, + "SVGAnimatedAngle": false, + "SVGAnimatedBoolean": false, + "SVGAnimatedEnumeration": false, + "SVGAnimatedInteger": false, + "SVGAnimatedLength": false, + "SVGAnimatedLengthList": false, + "SVGAnimatedNumber": false, + "SVGAnimatedNumberList": false, + "SVGAnimatedPreserveAspectRatio": false, + "SVGAnimatedRect": false, + "SVGAnimatedString": false, + "SVGAnimatedTransformList": false, + "SVGAnimateElement": false, + "SVGAnimateMotionElement": false, + "SVGAnimateTransformElement": false, + "SVGAnimationElement": false, + "SVGCircleElement": false, + "SVGClipPathElement": false, + "SVGComponentTransferFunctionElement": false, + "SVGDefsElement": false, + "SVGDescElement": false, + "SVGElement": false, + "SVGEllipseElement": false, + "SVGFEBlendElement": false, + "SVGFEColorMatrixElement": false, + "SVGFEComponentTransferElement": false, + "SVGFECompositeElement": false, + "SVGFEConvolveMatrixElement": false, + "SVGFEDiffuseLightingElement": false, + "SVGFEDisplacementMapElement": false, + "SVGFEDistantLightElement": false, + "SVGFEDropShadowElement": false, + "SVGFEFloodElement": false, + "SVGFEFuncAElement": false, + "SVGFEFuncBElement": false, + "SVGFEFuncGElement": false, + "SVGFEFuncRElement": false, + "SVGFEGaussianBlurElement": false, + "SVGFEImageElement": false, + "SVGFEMergeElement": false, + "SVGFEMergeNodeElement": false, + "SVGFEMorphologyElement": false, + "SVGFEOffsetElement": false, + "SVGFEPointLightElement": false, + "SVGFESpecularLightingElement": false, + "SVGFESpotLightElement": false, + "SVGFETileElement": false, + "SVGFETurbulenceElement": false, + "SVGFilterElement": false, + "SVGForeignObjectElement": false, + "SVGGElement": false, + "SVGGeometryElement": false, + "SVGGradientElement": false, + "SVGGraphicsElement": false, + "SVGImageElement": false, + "SVGLength": false, + "SVGLengthList": false, + "SVGLinearGradientElement": false, + "SVGLineElement": false, + "SVGMarkerElement": false, + "SVGMaskElement": false, + "SVGMatrix": false, + "SVGMetadataElement": false, + "SVGMPathElement": false, + "SVGNumber": false, + "SVGNumberList": false, + "SVGPathElement": false, + "SVGPatternElement": false, + "SVGPoint": false, + "SVGPointList": false, + "SVGPolygonElement": false, + "SVGPolylineElement": false, + "SVGPreserveAspectRatio": false, + "SVGRadialGradientElement": false, + "SVGRect": false, + "SVGRectElement": false, + "SVGScriptElement": false, + "SVGSetElement": false, + "SVGStopElement": false, + "SVGStringList": false, + "SVGStyleElement": false, + "SVGSVGElement": false, + "SVGSwitchElement": false, + "SVGSymbolElement": false, + "SVGTextContentElement": false, + "SVGTextElement": false, + "SVGTextPathElement": false, + "SVGTextPositioningElement": false, + "SVGTitleElement": false, + "SVGTransform": false, + "SVGTransformList": false, + "SVGTSpanElement": false, + "SVGUnitTypes": false, + "SVGUseElement": false, + "SVGViewElement": false, + "SyncManager": false, + "TaskAttributionTiming": false, + "TaskController": false, + "TaskPriorityChangeEvent": false, + "TaskSignal": false, + "TEMPORARY": false, + "Text": false, + "TextDecoder": false, + "TextDecoderStream": false, + "TextEncoder": false, + "TextEncoderStream": false, + "TextEvent": false, + "TextFormat": false, + "TextFormatUpdateEvent": false, + "TextMetrics": false, + "TextTrack": false, + "TextTrackCue": false, + "TextTrackCueList": false, + "TextTrackList": false, + "TextUpdateEvent": false, + "TimeEvent": false, + "TimeRanges": false, + "ToggleEvent": false, + "toolbar": false, + "top": false, + "Touch": false, + "TouchEvent": false, + "TouchList": false, + "TrackEvent": false, + "TransformStream": false, + "TransformStreamDefaultController": false, + "TransitionEvent": false, + "Translator": false, + "TreeWalker": false, + "TrustedHTML": false, + "TrustedScript": false, + "TrustedScriptURL": false, + "TrustedTypePolicy": false, + "TrustedTypePolicyFactory": false, + "trustedTypes": false, + "UIEvent": false, + "URL": false, + "URLPattern": false, + "URLSearchParams": false, + "USB": false, + "USBAlternateInterface": false, + "USBConfiguration": false, + "USBConnectionEvent": false, + "USBDevice": false, + "USBEndpoint": false, + "USBInterface": false, + "USBInTransferResult": false, + "USBIsochronousInTransferPacket": false, + "USBIsochronousInTransferResult": false, + "USBIsochronousOutTransferPacket": false, + "USBIsochronousOutTransferResult": false, + "USBOutTransferResult": false, + "UserActivation": false, + "ValidityState": false, + "VideoColorSpace": false, + "VideoDecoder": false, + "VideoEncoder": false, + "VideoFrame": false, + "VideoPlaybackQuality": false, + "viewport": false, + "Viewport": false, + "ViewTimeline": false, + "ViewTransition": false, + "ViewTransitionTypeSet": false, + "VirtualKeyboard": false, + "VirtualKeyboardGeometryChangeEvent": false, + "VisibilityStateEntry": false, + "visualViewport": false, + "VisualViewport": false, + "VTTCue": false, + "VTTRegion": false, + "WakeLock": false, + "WakeLockSentinel": false, + "WaveShaperNode": false, + "WebAssembly": false, + "WebGL2RenderingContext": false, + "WebGLActiveInfo": false, + "WebGLBuffer": false, + "WebGLContextEvent": false, + "WebGLFramebuffer": false, + "WebGLObject": false, + "WebGLProgram": false, + "WebGLQuery": false, + "WebGLRenderbuffer": false, + "WebGLRenderingContext": false, + "WebGLSampler": false, + "WebGLShader": false, + "WebGLShaderPrecisionFormat": false, + "WebGLSync": false, + "WebGLTexture": false, + "WebGLTransformFeedback": false, + "WebGLUniformLocation": false, + "WebGLVertexArrayObject": false, + "WebSocket": false, + "WebSocketError": false, + "WebSocketStream": false, + "WebTransport": false, + "WebTransportBidirectionalStream": false, + "WebTransportDatagramDuplexStream": false, + "WebTransportError": false, + "WebTransportReceiveStream": false, + "WebTransportSendStream": false, + "WGSLLanguageFeatures": false, + "WheelEvent": false, + "when": false, + "window": false, + "Window": false, + "WindowControlsOverlay": false, + "WindowControlsOverlayGeometryChangeEvent": false, + "Worker": false, + "Worklet": false, + "WorkletGlobalScope": false, + "WritableStream": false, + "WritableStreamDefaultController": false, + "WritableStreamDefaultWriter": false, + "XMLDocument": false, + "XMLHttpRequest": false, + "XMLHttpRequestEventTarget": false, + "XMLHttpRequestUpload": false, + "XMLSerializer": false, + "XPathEvaluator": false, + "XPathExpression": false, + "XPathResult": false, + "XRAnchor": false, + "XRAnchorSet": false, + "XRBoundedReferenceSpace": false, + "XRCamera": false, + "XRCPUDepthInformation": false, + "XRDepthInformation": false, + "XRDOMOverlayState": false, + "XRFrame": false, + "XRHand": false, + "XRHitTestResult": false, + "XRHitTestSource": false, + "XRInputSource": false, + "XRInputSourceArray": false, + "XRInputSourceEvent": false, + "XRInputSourcesChangeEvent": false, + "XRJointPose": false, + "XRJointSpace": false, + "XRLayer": false, + "XRLightEstimate": false, + "XRLightProbe": false, + "XRPose": false, + "XRRay": false, + "XRReferenceSpace": false, + "XRReferenceSpaceEvent": false, + "XRRenderState": false, + "XRRigidTransform": false, + "XRSession": false, + "XRSessionEvent": false, + "XRSpace": false, + "XRSystem": false, + "XRTransientInputHitTestResult": false, + "XRTransientInputHitTestSource": false, + "XRView": false, + "XRViewerPose": false, + "XRViewport": false, + "XRWebGLBinding": false, + "XRWebGLDepthInformation": false, + "XRWebGLLayer": false, + "XSLTProcessor": false + } + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-undef', + message: "'window' is not defined.", + messageId: 'undef', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 0, + endLine: 1, + endColumn: 6, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-undef > valid + +```js +require("a"); +``` + +```json +{ + "languageOptions": { + "sourceType": "commonjs" + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-undef', + message: "'require' is not defined.", + messageId: 'undef', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 0, + endLine: 1, + endColumn: 7, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-undef > valid + +```js +Object; isNaN(); +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-undef', + message: "'isNaN' is not defined.", + messageId: 'undef', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 8, + endLine: 1, + endColumn: 13, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-undef > valid + +```js +toString() +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-undef', + message: "'toString' is not defined.", + messageId: 'undef', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 0, + endLine: 1, + endColumn: 8, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-undef > valid + +```js +hasOwnProperty() +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-undef', + message: "'hasOwnProperty' is not defined.", + messageId: 'undef', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 0, + endLine: 1, + endColumn: 14, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-undef > valid + +```js +function evilEval(stuffToEval) { var ultimateAnswer; ultimateAnswer = 42; eval(stuffToEval); } +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-undef', + message: "'eval' is not defined.", + messageId: 'undef', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 74, + endLine: 1, + endColumn: 78, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-undef > valid + +```js +var b = typeof a +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-undef', + message: "'b' is not defined.", + messageId: 'undef', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 4, + endLine: 1, + endColumn: 5, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-undef > valid + +```js +var toString = 1; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-undef', + message: "'toString' is not defined.", + messageId: 'undef', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 4, + endLine: 1, + endColumn: 12, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-undef > valid + +```js +var React, App, a=1; React.render(); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "parserOptions": { + "ecmaFeatures": { + "jsx": true + } + } + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 5: [ + { + ruleId: 'rule-to-test/no-undef', + message: "'a' is not defined.", + messageId: 'undef', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 16, + endLine: 1, + endColumn: 17, + suggestions: null + }, + { + ruleId: 'rule-to-test/no-undef', + message: "'React' is not defined.", + messageId: 'undef', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 21, + endLine: 1, + endColumn: 26, + suggestions: null + }, + { + ruleId: 'rule-to-test/no-undef', + message: "'React' is not defined.", + messageId: 'undef', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 4, + endLine: 1, + endColumn: 9, + suggestions: null + }, + { + ruleId: 'rule-to-test/no-undef', + message: "'App' is not defined.", + messageId: 'undef', + severity: 1, + nodeType: 'JSXIdentifier', + line: 1, + column: 35, + endLine: 1, + endColumn: 38, + suggestions: null + }, + { + ruleId: 'rule-to-test/no-undef', + message: "'a' is not defined.", + messageId: 'undef', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 45, + endLine: 1, + endColumn: 46, + suggestions: null + } +] + +5 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-undef > valid + +```js +var console; [1,2,3].forEach(obj => { + console.log(obj); +}); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-undef', + message: "'console' is not defined.", + messageId: 'undef', + severity: 1, + nodeType: 'Identifier', + line: 2, + column: 2, + endLine: 2, + endColumn: 9, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-undef > valid + +```js +var Foo; class Bar extends Foo { constructor() { super(); }} +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-undef', + message: "'Foo' is not defined.", + messageId: 'undef', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 27, + endLine: 1, + endColumn: 30, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-undef > valid + +```js +var a; [a] = [0]; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-undef', + message: "'a' is not defined.", + messageId: 'undef', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 8, + endLine: 1, + endColumn: 9, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-undef > valid + +```js +var a; ({a} = {}); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-undef', + message: "'a' is not defined.", + messageId: 'undef', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 9, + endLine: 1, + endColumn: 10, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-undef > valid + +```js +var a; ({b: a} = {}); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-undef', + message: "'a' is not defined.", + messageId: 'undef', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 12, + endLine: 1, + endColumn: 13, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-undef > valid + +```js +var obj; [obj.a, obj.b] = [0, 1]; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/no-undef', + message: "'obj' is not defined.", + messageId: 'undef', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 10, + endLine: 1, + endColumn: 13, + suggestions: null + }, + { + ruleId: 'rule-to-test/no-undef', + message: "'obj' is not defined.", + messageId: 'undef', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 17, + endLine: 1, + endColumn: 20, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-undef > valid + +```js +URLSearchParams; +``` + +```json +{ + "languageOptions": { + "globals": { + "AbortController": false, + "AbortSignal": false, + "AbsoluteOrientationSensor": false, + "AbstractRange": false, + "Accelerometer": false, + "addEventListener": false, + "ai": false, + "AI": false, + "AICreateMonitor": false, + "AITextSession": false, + "alert": false, + "AnalyserNode": false, + "Animation": false, + "AnimationEffect": false, + "AnimationEvent": false, + "AnimationPlaybackEvent": false, + "AnimationTimeline": false, + "AsyncDisposableStack": false, + "atob": false, + "Attr": false, + "Audio": false, + "AudioBuffer": false, + "AudioBufferSourceNode": false, + "AudioContext": false, + "AudioData": false, + "AudioDecoder": false, + "AudioDestinationNode": false, + "AudioEncoder": false, + "AudioListener": false, + "AudioNode": false, + "AudioParam": false, + "AudioParamMap": false, + "AudioProcessingEvent": false, + "AudioScheduledSourceNode": false, + "AudioSinkInfo": false, + "AudioWorklet": false, + "AudioWorkletGlobalScope": false, + "AudioWorkletNode": false, + "AudioWorkletProcessor": false, + "AuthenticatorAssertionResponse": false, + "AuthenticatorAttestationResponse": false, + "AuthenticatorResponse": false, + "BackgroundFetchManager": false, + "BackgroundFetchRecord": false, + "BackgroundFetchRegistration": false, + "BarcodeDetector": false, + "BarProp": false, + "BaseAudioContext": false, + "BatteryManager": false, + "BeforeUnloadEvent": false, + "BiquadFilterNode": false, + "Blob": false, + "BlobEvent": false, + "Bluetooth": false, + "BluetoothCharacteristicProperties": false, + "BluetoothDevice": false, + "BluetoothRemoteGATTCharacteristic": false, + "BluetoothRemoteGATTDescriptor": false, + "BluetoothRemoteGATTServer": false, + "BluetoothRemoteGATTService": false, + "BluetoothUUID": false, + "blur": false, + "BroadcastChannel": false, + "BrowserCaptureMediaStreamTrack": false, + "btoa": false, + "ByteLengthQueuingStrategy": false, + "Cache": false, + "caches": false, + "CacheStorage": false, + "cancelAnimationFrame": false, + "cancelIdleCallback": false, + "CanvasCaptureMediaStream": false, + "CanvasCaptureMediaStreamTrack": false, + "CanvasGradient": false, + "CanvasPattern": false, + "CanvasRenderingContext2D": false, + "CaptureController": false, + "CaretPosition": false, + "CDATASection": false, + "ChannelMergerNode": false, + "ChannelSplitterNode": false, + "ChapterInformation": false, + "CharacterBoundsUpdateEvent": false, + "CharacterData": false, + "clearInterval": false, + "clearTimeout": false, + "clientInformation": false, + "Clipboard": false, + "ClipboardChangeEvent": false, + "ClipboardEvent": false, + "ClipboardItem": false, + "close": false, + "closed": false, + "CloseEvent": false, + "CloseWatcher": false, + "CommandEvent": false, + "Comment": false, + "CompositionEvent": false, + "CompressionStream": false, + "confirm": false, + "console": false, + "ConstantSourceNode": false, + "ContentVisibilityAutoStateChangeEvent": false, + "ConvolverNode": false, + "CookieChangeEvent": false, + "CookieDeprecationLabel": false, + "cookieStore": false, + "CookieStore": false, + "CookieStoreManager": false, + "CountQueuingStrategy": false, + "createImageBitmap": false, + "CreateMonitor": false, + "Credential": false, + "credentialless": false, + "CredentialsContainer": false, + "CropTarget": false, + "crossOriginIsolated": false, + "crypto": false, + "Crypto": false, + "CryptoKey": false, + "CSPViolationReportBody": false, + "CSS": false, + "CSSAnimation": false, + "CSSConditionRule": false, + "CSSContainerRule": false, + "CSSCounterStyleRule": false, + "CSSFontFaceRule": false, + "CSSFontFeatureValuesRule": false, + "CSSFontPaletteValuesRule": false, + "CSSFunctionDeclarations": false, + "CSSFunctionDescriptors": false, + "CSSFunctionRule": false, + "CSSGroupingRule": false, + "CSSImageValue": false, + "CSSImportRule": false, + "CSSKeyframeRule": false, + "CSSKeyframesRule": false, + "CSSKeywordValue": false, + "CSSLayerBlockRule": false, + "CSSLayerStatementRule": false, + "CSSMarginRule": false, + "CSSMathClamp": false, + "CSSMathInvert": false, + "CSSMathMax": false, + "CSSMathMin": false, + "CSSMathNegate": false, + "CSSMathProduct": false, + "CSSMathSum": false, + "CSSMathValue": false, + "CSSMatrixComponent": false, + "CSSMediaRule": false, + "CSSNamespaceRule": false, + "CSSNestedDeclarations": false, + "CSSNumericArray": false, + "CSSNumericValue": false, + "CSSPageDescriptors": false, + "CSSPageRule": false, + "CSSPerspective": false, + "CSSPositionTryDescriptors": false, + "CSSPositionTryRule": false, + "CSSPositionValue": false, + "CSSPropertyRule": false, + "CSSRotate": false, + "CSSRule": false, + "CSSRuleList": false, + "CSSScale": false, + "CSSScopeRule": false, + "CSSSkew": false, + "CSSSkewX": false, + "CSSSkewY": false, + "CSSStartingStyleRule": false, + "CSSStyleDeclaration": false, + "CSSStyleRule": false, + "CSSStyleSheet": false, + "CSSStyleValue": false, + "CSSSupportsRule": false, + "CSSTransformComponent": false, + "CSSTransformValue": false, + "CSSTransition": false, + "CSSTranslate": false, + "CSSUnitValue": false, + "CSSUnparsedValue": false, + "CSSVariableReferenceValue": false, + "CSSViewTransitionRule": false, + "currentFrame": false, + "currentTime": false, + "CustomElementRegistry": false, + "customElements": false, + "CustomEvent": false, + "CustomStateSet": false, + "DataTransfer": false, + "DataTransferItem": false, + "DataTransferItemList": false, + "DecompressionStream": false, + "DelayNode": false, + "DelegatedInkTrailPresenter": false, + "DeviceMotionEvent": false, + "DeviceMotionEventAcceleration": false, + "DeviceMotionEventRotationRate": false, + "DeviceOrientationEvent": false, + "devicePixelRatio": false, + "DevicePosture": false, + "DigitalCredential": false, + "dispatchEvent": false, + "DisposableStack": false, + "document": false, + "Document": false, + "DocumentFragment": false, + "documentPictureInPicture": false, + "DocumentPictureInPicture": false, + "DocumentPictureInPictureEvent": false, + "DocumentTimeline": false, + "DocumentType": false, + "DOMError": false, + "DOMException": false, + "DOMImplementation": false, + "DOMMatrix": false, + "DOMMatrixReadOnly": false, + "DOMParser": false, + "DOMPoint": false, + "DOMPointReadOnly": false, + "DOMQuad": false, + "DOMRect": false, + "DOMRectList": false, + "DOMRectReadOnly": false, + "DOMStringList": false, + "DOMStringMap": false, + "DOMTokenList": false, + "DragEvent": false, + "DynamicsCompressorNode": false, + "EditContext": false, + "Element": false, + "ElementInternals": false, + "EncodedAudioChunk": false, + "EncodedVideoChunk": false, + "ErrorEvent": false, + "event": false, + "Event": false, + "EventCounts": false, + "EventSource": false, + "EventTarget": false, + "external": false, + "External": false, + "EyeDropper": false, + "FeaturePolicy": false, + "FederatedCredential": false, + "fence": false, + "Fence": false, + "FencedFrameConfig": false, + "fetch": false, + "fetchLater": false, + "FetchLaterResult": false, + "File": false, + "FileList": false, + "FileReader": false, + "FileSystem": false, + "FileSystemDirectoryEntry": false, + "FileSystemDirectoryHandle": false, + "FileSystemDirectoryReader": false, + "FileSystemEntry": false, + "FileSystemFileEntry": false, + "FileSystemFileHandle": false, + "FileSystemHandle": false, + "FileSystemObserver": false, + "FileSystemWritableFileStream": false, + "find": false, + "focus": false, + "FocusEvent": false, + "FontData": false, + "FontFace": false, + "FontFaceSet": false, + "FontFaceSetLoadEvent": false, + "FormData": false, + "FormDataEvent": false, + "FragmentDirective": false, + "frameElement": false, + "frames": false, + "GainNode": false, + "Gamepad": false, + "GamepadAxisMoveEvent": false, + "GamepadButton": false, + "GamepadButtonEvent": false, + "GamepadEvent": false, + "GamepadHapticActuator": false, + "GamepadPose": false, + "Geolocation": false, + "GeolocationCoordinates": false, + "GeolocationPosition": false, + "GeolocationPositionError": false, + "getComputedStyle": false, + "getScreenDetails": false, + "getSelection": false, + "GPU": false, + "GPUAdapter": false, + "GPUAdapterInfo": false, + "GPUBindGroup": false, + "GPUBindGroupLayout": false, + "GPUBuffer": false, + "GPUBufferUsage": false, + "GPUCanvasContext": false, + "GPUColorWrite": false, + "GPUCommandBuffer": false, + "GPUCommandEncoder": false, + "GPUCompilationInfo": false, + "GPUCompilationMessage": false, + "GPUComputePassEncoder": false, + "GPUComputePipeline": false, + "GPUDevice": false, + "GPUDeviceLostInfo": false, + "GPUError": false, + "GPUExternalTexture": false, + "GPUInternalError": false, + "GPUMapMode": false, + "GPUOutOfMemoryError": false, + "GPUPipelineError": false, + "GPUPipelineLayout": false, + "GPUQuerySet": false, + "GPUQueue": false, + "GPURenderBundle": false, + "GPURenderBundleEncoder": false, + "GPURenderPassEncoder": false, + "GPURenderPipeline": false, + "GPUSampler": false, + "GPUShaderModule": false, + "GPUShaderStage": false, + "GPUSupportedFeatures": false, + "GPUSupportedLimits": false, + "GPUTexture": false, + "GPUTextureUsage": false, + "GPUTextureView": false, + "GPUUncapturedErrorEvent": false, + "GPUValidationError": false, + "GravitySensor": false, + "Gyroscope": false, + "HashChangeEvent": false, + "Headers": false, + "HID": false, + "HIDConnectionEvent": false, + "HIDDevice": false, + "HIDInputReportEvent": false, + "Highlight": false, + "HighlightRegistry": false, + "history": false, + "History": false, + "HTMLAllCollection": false, + "HTMLAnchorElement": false, + "HTMLAreaElement": false, + "HTMLAudioElement": false, + "HTMLBaseElement": false, + "HTMLBodyElement": false, + "HTMLBRElement": false, + "HTMLButtonElement": false, + "HTMLCanvasElement": false, + "HTMLCollection": false, + "HTMLDataElement": false, + "HTMLDataListElement": false, + "HTMLDetailsElement": false, + "HTMLDialogElement": false, + "HTMLDirectoryElement": false, + "HTMLDivElement": false, + "HTMLDListElement": false, + "HTMLDocument": false, + "HTMLElement": false, + "HTMLEmbedElement": false, + "HTMLFencedFrameElement": false, + "HTMLFieldSetElement": false, + "HTMLFontElement": false, + "HTMLFormControlsCollection": false, + "HTMLFormElement": false, + "HTMLFrameElement": false, + "HTMLFrameSetElement": false, + "HTMLHeadElement": false, + "HTMLHeadingElement": false, + "HTMLHRElement": false, + "HTMLHtmlElement": false, + "HTMLIFrameElement": false, + "HTMLImageElement": false, + "HTMLInputElement": false, + "HTMLLabelElement": false, + "HTMLLegendElement": false, + "HTMLLIElement": false, + "HTMLLinkElement": false, + "HTMLMapElement": false, + "HTMLMarqueeElement": false, + "HTMLMediaElement": false, + "HTMLMenuElement": false, + "HTMLMetaElement": false, + "HTMLMeterElement": false, + "HTMLModElement": false, + "HTMLObjectElement": false, + "HTMLOListElement": false, + "HTMLOptGroupElement": false, + "HTMLOptionElement": false, + "HTMLOptionsCollection": false, + "HTMLOutputElement": false, + "HTMLParagraphElement": false, + "HTMLParamElement": false, + "HTMLPictureElement": false, + "HTMLPreElement": false, + "HTMLProgressElement": false, + "HTMLQuoteElement": false, + "HTMLScriptElement": false, + "HTMLSelectedContentElement": false, + "HTMLSelectElement": false, + "HTMLSlotElement": false, + "HTMLSourceElement": false, + "HTMLSpanElement": false, + "HTMLStyleElement": false, + "HTMLTableCaptionElement": false, + "HTMLTableCellElement": false, + "HTMLTableColElement": false, + "HTMLTableElement": false, + "HTMLTableRowElement": false, + "HTMLTableSectionElement": false, + "HTMLTemplateElement": false, + "HTMLTextAreaElement": false, + "HTMLTimeElement": false, + "HTMLTitleElement": false, + "HTMLTrackElement": false, + "HTMLUListElement": false, + "HTMLUnknownElement": false, + "HTMLVideoElement": false, + "IDBCursor": false, + "IDBCursorWithValue": false, + "IDBDatabase": false, + "IDBFactory": false, + "IDBIndex": false, + "IDBKeyRange": false, + "IDBObjectStore": false, + "IDBOpenDBRequest": false, + "IDBRecord": false, + "IDBRequest": false, + "IDBTransaction": false, + "IDBVersionChangeEvent": false, + "IdentityCredential": false, + "IdentityCredentialError": false, + "IdentityProvider": false, + "IdleDeadline": false, + "IdleDetector": false, + "IIRFilterNode": false, + "Image": false, + "ImageBitmap": false, + "ImageBitmapRenderingContext": false, + "ImageCapture": false, + "ImageData": false, + "ImageDecoder": false, + "ImageTrack": false, + "ImageTrackList": false, + "indexedDB": false, + "Ink": false, + "innerHeight": false, + "innerWidth": false, + "InputDeviceCapabilities": false, + "InputDeviceInfo": false, + "InputEvent": false, + "IntegrityViolationReportBody": false, + "InterestEvent": false, + "IntersectionObserver": false, + "IntersectionObserverEntry": false, + "isSecureContext": false, + "Keyboard": false, + "KeyboardEvent": false, + "KeyboardLayoutMap": false, + "KeyframeEffect": false, + "LanguageDetector": false, + "LargestContentfulPaint": false, + "LaunchParams": false, + "launchQueue": false, + "LaunchQueue": false, + "LayoutShift": false, + "LayoutShiftAttribution": false, + "length": false, + "LinearAccelerationSensor": false, + "localStorage": false, + "location": true, + "Location": false, + "locationbar": false, + "Lock": false, + "LockManager": false, + "matchMedia": false, + "MathMLElement": false, + "MediaCapabilities": false, + "MediaCapabilitiesInfo": false, + "MediaDeviceInfo": false, + "MediaDevices": false, + "MediaElementAudioSourceNode": false, + "MediaEncryptedEvent": false, + "MediaError": false, + "MediaKeyError": false, + "MediaKeyMessageEvent": false, + "MediaKeys": false, + "MediaKeySession": false, + "MediaKeyStatusMap": false, + "MediaKeySystemAccess": false, + "MediaList": false, + "MediaMetadata": false, + "MediaQueryList": false, + "MediaQueryListEvent": false, + "MediaRecorder": false, + "MediaRecorderErrorEvent": false, + "MediaSession": false, + "MediaSource": false, + "MediaSourceHandle": false, + "MediaStream": false, + "MediaStreamAudioDestinationNode": false, + "MediaStreamAudioSourceNode": false, + "MediaStreamEvent": false, + "MediaStreamTrack": false, + "MediaStreamTrackAudioSourceNode": false, + "MediaStreamTrackAudioStats": false, + "MediaStreamTrackEvent": false, + "MediaStreamTrackGenerator": false, + "MediaStreamTrackProcessor": false, + "MediaStreamTrackVideoStats": false, + "menubar": false, + "MessageChannel": false, + "MessageEvent": false, + "MessagePort": false, + "MIDIAccess": false, + "MIDIConnectionEvent": false, + "MIDIInput": false, + "MIDIInputMap": false, + "MIDIMessageEvent": false, + "MIDIOutput": false, + "MIDIOutputMap": false, + "MIDIPort": false, + "MimeType": false, + "MimeTypeArray": false, + "model": false, + "ModelGenericSession": false, + "ModelManager": false, + "MouseEvent": false, + "moveBy": false, + "moveTo": false, + "MutationEvent": false, + "MutationObserver": false, + "MutationRecord": false, + "name": false, + "NamedNodeMap": false, + "NavigateEvent": false, + "navigation": false, + "Navigation": false, + "NavigationActivation": false, + "NavigationCurrentEntryChangeEvent": false, + "NavigationDestination": false, + "NavigationHistoryEntry": false, + "NavigationPrecommitController": false, + "NavigationPreloadManager": false, + "NavigationTransition": false, + "navigator": false, + "Navigator": false, + "NavigatorLogin": false, + "NavigatorManagedData": false, + "NavigatorUAData": false, + "NetworkInformation": false, + "Node": false, + "NodeFilter": false, + "NodeIterator": false, + "NodeList": false, + "Notification": false, + "NotifyPaintEvent": false, + "NotRestoredReasonDetails": false, + "NotRestoredReasons": false, + "Observable": false, + "OfflineAudioCompletionEvent": false, + "OfflineAudioContext": false, + "offscreenBuffering": false, + "OffscreenCanvas": false, + "OffscreenCanvasRenderingContext2D": false, + "onabort": true, + "onafterprint": true, + "onanimationcancel": true, + "onanimationend": true, + "onanimationiteration": true, + "onanimationstart": true, + "onappinstalled": true, + "onauxclick": true, + "onbeforeinput": true, + "onbeforeinstallprompt": true, + "onbeforematch": true, + "onbeforeprint": true, + "onbeforetoggle": true, + "onbeforeunload": true, + "onbeforexrselect": true, + "onblur": true, + "oncancel": true, + "oncanplay": true, + "oncanplaythrough": true, + "onchange": true, + "onclick": true, + "onclose": true, + "oncommand": true, + "oncontentvisibilityautostatechange": true, + "oncontextlost": true, + "oncontextmenu": true, + "oncontextrestored": true, + "oncopy": true, + "oncuechange": true, + "oncut": true, + "ondblclick": true, + "ondevicemotion": true, + "ondeviceorientation": true, + "ondeviceorientationabsolute": true, + "ondrag": true, + "ondragend": true, + "ondragenter": true, + "ondragleave": true, + "ondragover": true, + "ondragstart": true, + "ondrop": true, + "ondurationchange": true, + "onemptied": true, + "onended": true, + "onerror": true, + "onfocus": true, + "onformdata": true, + "ongamepadconnected": true, + "ongamepaddisconnected": true, + "ongotpointercapture": true, + "onhashchange": true, + "oninput": true, + "oninvalid": true, + "onkeydown": true, + "onkeypress": true, + "onkeyup": true, + "onlanguagechange": true, + "onload": true, + "onloadeddata": true, + "onloadedmetadata": true, + "onloadstart": true, + "onlostpointercapture": true, + "onmessage": true, + "onmessageerror": true, + "onmousedown": true, + "onmouseenter": true, + "onmouseleave": true, + "onmousemove": true, + "onmouseout": true, + "onmouseover": true, + "onmouseup": true, + "onmousewheel": true, + "onoffline": true, + "ononline": true, + "onpagehide": true, + "onpagereveal": true, + "onpageshow": true, + "onpageswap": true, + "onpaste": true, + "onpause": true, + "onplay": true, + "onplaying": true, + "onpointercancel": true, + "onpointerdown": true, + "onpointerenter": true, + "onpointerleave": true, + "onpointermove": true, + "onpointerout": true, + "onpointerover": true, + "onpointerrawupdate": true, + "onpointerup": true, + "onpopstate": true, + "onprogress": true, + "onratechange": true, + "onrejectionhandled": true, + "onreset": true, + "onresize": true, + "onscroll": true, + "onscrollend": true, + "onscrollsnapchange": true, + "onscrollsnapchanging": true, + "onsearch": true, + "onsecuritypolicyviolation": true, + "onseeked": true, + "onseeking": true, + "onselect": true, + "onselectionchange": true, + "onselectstart": true, + "onslotchange": true, + "onstalled": true, + "onstorage": true, + "onsubmit": true, + "onsuspend": true, + "ontimeupdate": true, + "ontoggle": true, + "ontransitioncancel": true, + "ontransitionend": true, + "ontransitionrun": true, + "ontransitionstart": true, + "onunhandledrejection": true, + "onunload": true, + "onvolumechange": true, + "onwaiting": true, + "onwheel": true, + "open": false, + "opener": false, + "Option": false, + "OrientationSensor": false, + "origin": false, + "originAgentCluster": false, + "OscillatorNode": false, + "OTPCredential": false, + "outerHeight": false, + "outerWidth": false, + "OverconstrainedError": false, + "PageRevealEvent": false, + "PageSwapEvent": false, + "PageTransitionEvent": false, + "pageXOffset": false, + "pageYOffset": false, + "PannerNode": false, + "parent": false, + "PasswordCredential": false, + "Path2D": false, + "PaymentAddress": false, + "PaymentManager": false, + "PaymentMethodChangeEvent": false, + "PaymentRequest": false, + "PaymentRequestUpdateEvent": false, + "PaymentResponse": false, + "performance": false, + "Performance": false, + "PerformanceElementTiming": false, + "PerformanceEntry": false, + "PerformanceEventTiming": false, + "PerformanceLongAnimationFrameTiming": false, + "PerformanceLongTaskTiming": false, + "PerformanceMark": false, + "PerformanceMeasure": false, + "PerformanceNavigation": false, + "PerformanceNavigationTiming": false, + "PerformanceObserver": false, + "PerformanceObserverEntryList": false, + "PerformancePaintTiming": false, + "PerformanceResourceTiming": false, + "PerformanceScriptTiming": false, + "PerformanceServerTiming": false, + "PerformanceTiming": false, + "PeriodicSyncManager": false, + "PeriodicWave": false, + "Permissions": false, + "PermissionStatus": false, + "PERSISTENT": false, + "personalbar": false, + "PictureInPictureEvent": false, + "PictureInPictureWindow": false, + "Plugin": false, + "PluginArray": false, + "PointerEvent": false, + "PopStateEvent": false, + "postMessage": false, + "Presentation": false, + "PresentationAvailability": false, + "PresentationConnection": false, + "PresentationConnectionAvailableEvent": false, + "PresentationConnectionCloseEvent": false, + "PresentationConnectionList": false, + "PresentationReceiver": false, + "PresentationRequest": false, + "PressureObserver": false, + "PressureRecord": false, + "print": false, + "ProcessingInstruction": false, + "Profiler": false, + "ProgressEvent": false, + "PromiseRejectionEvent": false, + "prompt": false, + "ProtectedAudience": false, + "PublicKeyCredential": false, + "PushManager": false, + "PushSubscription": false, + "PushSubscriptionOptions": false, + "queryLocalFonts": false, + "queueMicrotask": false, + "QuotaExceededError": false, + "RadioNodeList": false, + "Range": false, + "ReadableByteStreamController": false, + "ReadableStream": false, + "ReadableStreamBYOBReader": false, + "ReadableStreamBYOBRequest": false, + "ReadableStreamDefaultController": false, + "ReadableStreamDefaultReader": false, + "registerProcessor": false, + "RelativeOrientationSensor": false, + "RemotePlayback": false, + "removeEventListener": false, + "ReportBody": false, + "reportError": false, + "ReportingObserver": false, + "Request": false, + "requestAnimationFrame": false, + "requestIdleCallback": false, + "resizeBy": false, + "ResizeObserver": false, + "ResizeObserverEntry": false, + "ResizeObserverSize": false, + "resizeTo": false, + "Response": false, + "RestrictionTarget": false, + "RTCCertificate": false, + "RTCDataChannel": false, + "RTCDataChannelEvent": false, + "RTCDtlsTransport": false, + "RTCDTMFSender": false, + "RTCDTMFToneChangeEvent": false, + "RTCEncodedAudioFrame": false, + "RTCEncodedVideoFrame": false, + "RTCError": false, + "RTCErrorEvent": false, + "RTCIceCandidate": false, + "RTCIceTransport": false, + "RTCPeerConnection": false, + "RTCPeerConnectionIceErrorEvent": false, + "RTCPeerConnectionIceEvent": false, + "RTCRtpReceiver": false, + "RTCRtpScriptTransform": false, + "RTCRtpSender": false, + "RTCRtpTransceiver": false, + "RTCSctpTransport": false, + "RTCSessionDescription": false, + "RTCStatsReport": false, + "RTCTrackEvent": false, + "sampleRate": false, + "scheduler": false, + "Scheduler": false, + "Scheduling": false, + "screen": false, + "Screen": false, + "ScreenDetailed": false, + "ScreenDetails": false, + "screenLeft": false, + "ScreenOrientation": false, + "screenTop": false, + "screenX": false, + "screenY": false, + "ScriptProcessorNode": false, + "scroll": false, + "scrollbars": false, + "scrollBy": false, + "ScrollTimeline": false, + "scrollTo": false, + "scrollX": false, + "scrollY": false, + "SecurityPolicyViolationEvent": false, + "Selection": false, + "self": false, + "Sensor": false, + "SensorErrorEvent": false, + "Serial": false, + "SerialPort": false, + "ServiceWorker": false, + "ServiceWorkerContainer": false, + "ServiceWorkerRegistration": false, + "sessionStorage": false, + "setInterval": false, + "setTimeout": false, + "ShadowRoot": false, + "sharedStorage": false, + "SharedStorage": false, + "SharedStorageAppendMethod": false, + "SharedStorageClearMethod": false, + "SharedStorageDeleteMethod": false, + "SharedStorageModifierMethod": false, + "SharedStorageSetMethod": false, + "SharedStorageWorklet": false, + "SharedWorker": false, + "showDirectoryPicker": false, + "showOpenFilePicker": false, + "showSaveFilePicker": false, + "SnapEvent": false, + "SourceBuffer": false, + "SourceBufferList": false, + "SpeechGrammar": false, + "SpeechGrammarList": false, + "SpeechRecognition": false, + "SpeechRecognitionErrorEvent": false, + "SpeechRecognitionEvent": false, + "SpeechRecognitionPhrase": false, + "speechSynthesis": false, + "SpeechSynthesis": false, + "SpeechSynthesisErrorEvent": false, + "SpeechSynthesisEvent": false, + "SpeechSynthesisUtterance": false, + "SpeechSynthesisVoice": false, + "StaticRange": false, + "status": false, + "statusbar": false, + "StereoPannerNode": false, + "stop": false, + "Storage": false, + "StorageBucket": false, + "StorageBucketManager": false, + "StorageEvent": false, + "StorageManager": false, + "structuredClone": false, + "styleMedia": false, + "StylePropertyMap": false, + "StylePropertyMapReadOnly": false, + "StyleSheet": false, + "StyleSheetList": false, + "SubmitEvent": false, + "Subscriber": false, + "SubtleCrypto": false, + "Summarizer": false, + "SuppressedError": false, + "SVGAElement": false, + "SVGAngle": false, + "SVGAnimatedAngle": false, + "SVGAnimatedBoolean": false, + "SVGAnimatedEnumeration": false, + "SVGAnimatedInteger": false, + "SVGAnimatedLength": false, + "SVGAnimatedLengthList": false, + "SVGAnimatedNumber": false, + "SVGAnimatedNumberList": false, + "SVGAnimatedPreserveAspectRatio": false, + "SVGAnimatedRect": false, + "SVGAnimatedString": false, + "SVGAnimatedTransformList": false, + "SVGAnimateElement": false, + "SVGAnimateMotionElement": false, + "SVGAnimateTransformElement": false, + "SVGAnimationElement": false, + "SVGCircleElement": false, + "SVGClipPathElement": false, + "SVGComponentTransferFunctionElement": false, + "SVGDefsElement": false, + "SVGDescElement": false, + "SVGElement": false, + "SVGEllipseElement": false, + "SVGFEBlendElement": false, + "SVGFEColorMatrixElement": false, + "SVGFEComponentTransferElement": false, + "SVGFECompositeElement": false, + "SVGFEConvolveMatrixElement": false, + "SVGFEDiffuseLightingElement": false, + "SVGFEDisplacementMapElement": false, + "SVGFEDistantLightElement": false, + "SVGFEDropShadowElement": false, + "SVGFEFloodElement": false, + "SVGFEFuncAElement": false, + "SVGFEFuncBElement": false, + "SVGFEFuncGElement": false, + "SVGFEFuncRElement": false, + "SVGFEGaussianBlurElement": false, + "SVGFEImageElement": false, + "SVGFEMergeElement": false, + "SVGFEMergeNodeElement": false, + "SVGFEMorphologyElement": false, + "SVGFEOffsetElement": false, + "SVGFEPointLightElement": false, + "SVGFESpecularLightingElement": false, + "SVGFESpotLightElement": false, + "SVGFETileElement": false, + "SVGFETurbulenceElement": false, + "SVGFilterElement": false, + "SVGForeignObjectElement": false, + "SVGGElement": false, + "SVGGeometryElement": false, + "SVGGradientElement": false, + "SVGGraphicsElement": false, + "SVGImageElement": false, + "SVGLength": false, + "SVGLengthList": false, + "SVGLinearGradientElement": false, + "SVGLineElement": false, + "SVGMarkerElement": false, + "SVGMaskElement": false, + "SVGMatrix": false, + "SVGMetadataElement": false, + "SVGMPathElement": false, + "SVGNumber": false, + "SVGNumberList": false, + "SVGPathElement": false, + "SVGPatternElement": false, + "SVGPoint": false, + "SVGPointList": false, + "SVGPolygonElement": false, + "SVGPolylineElement": false, + "SVGPreserveAspectRatio": false, + "SVGRadialGradientElement": false, + "SVGRect": false, + "SVGRectElement": false, + "SVGScriptElement": false, + "SVGSetElement": false, + "SVGStopElement": false, + "SVGStringList": false, + "SVGStyleElement": false, + "SVGSVGElement": false, + "SVGSwitchElement": false, + "SVGSymbolElement": false, + "SVGTextContentElement": false, + "SVGTextElement": false, + "SVGTextPathElement": false, + "SVGTextPositioningElement": false, + "SVGTitleElement": false, + "SVGTransform": false, + "SVGTransformList": false, + "SVGTSpanElement": false, + "SVGUnitTypes": false, + "SVGUseElement": false, + "SVGViewElement": false, + "SyncManager": false, + "TaskAttributionTiming": false, + "TaskController": false, + "TaskPriorityChangeEvent": false, + "TaskSignal": false, + "TEMPORARY": false, + "Text": false, + "TextDecoder": false, + "TextDecoderStream": false, + "TextEncoder": false, + "TextEncoderStream": false, + "TextEvent": false, + "TextFormat": false, + "TextFormatUpdateEvent": false, + "TextMetrics": false, + "TextTrack": false, + "TextTrackCue": false, + "TextTrackCueList": false, + "TextTrackList": false, + "TextUpdateEvent": false, + "TimeEvent": false, + "TimeRanges": false, + "ToggleEvent": false, + "toolbar": false, + "top": false, + "Touch": false, + "TouchEvent": false, + "TouchList": false, + "TrackEvent": false, + "TransformStream": false, + "TransformStreamDefaultController": false, + "TransitionEvent": false, + "Translator": false, + "TreeWalker": false, + "TrustedHTML": false, + "TrustedScript": false, + "TrustedScriptURL": false, + "TrustedTypePolicy": false, + "TrustedTypePolicyFactory": false, + "trustedTypes": false, + "UIEvent": false, + "URL": false, + "URLPattern": false, + "URLSearchParams": false, + "USB": false, + "USBAlternateInterface": false, + "USBConfiguration": false, + "USBConnectionEvent": false, + "USBDevice": false, + "USBEndpoint": false, + "USBInterface": false, + "USBInTransferResult": false, + "USBIsochronousInTransferPacket": false, + "USBIsochronousInTransferResult": false, + "USBIsochronousOutTransferPacket": false, + "USBIsochronousOutTransferResult": false, + "USBOutTransferResult": false, + "UserActivation": false, + "ValidityState": false, + "VideoColorSpace": false, + "VideoDecoder": false, + "VideoEncoder": false, + "VideoFrame": false, + "VideoPlaybackQuality": false, + "viewport": false, + "Viewport": false, + "ViewTimeline": false, + "ViewTransition": false, + "ViewTransitionTypeSet": false, + "VirtualKeyboard": false, + "VirtualKeyboardGeometryChangeEvent": false, + "VisibilityStateEntry": false, + "visualViewport": false, + "VisualViewport": false, + "VTTCue": false, + "VTTRegion": false, + "WakeLock": false, + "WakeLockSentinel": false, + "WaveShaperNode": false, + "WebAssembly": false, + "WebGL2RenderingContext": false, + "WebGLActiveInfo": false, + "WebGLBuffer": false, + "WebGLContextEvent": false, + "WebGLFramebuffer": false, + "WebGLObject": false, + "WebGLProgram": false, + "WebGLQuery": false, + "WebGLRenderbuffer": false, + "WebGLRenderingContext": false, + "WebGLSampler": false, + "WebGLShader": false, + "WebGLShaderPrecisionFormat": false, + "WebGLSync": false, + "WebGLTexture": false, + "WebGLTransformFeedback": false, + "WebGLUniformLocation": false, + "WebGLVertexArrayObject": false, + "WebSocket": false, + "WebSocketError": false, + "WebSocketStream": false, + "WebTransport": false, + "WebTransportBidirectionalStream": false, + "WebTransportDatagramDuplexStream": false, + "WebTransportError": false, + "WebTransportReceiveStream": false, + "WebTransportSendStream": false, + "WGSLLanguageFeatures": false, + "WheelEvent": false, + "when": false, + "window": false, + "Window": false, + "WindowControlsOverlay": false, + "WindowControlsOverlayGeometryChangeEvent": false, + "Worker": false, + "Worklet": false, + "WorkletGlobalScope": false, + "WritableStream": false, + "WritableStreamDefaultController": false, + "WritableStreamDefaultWriter": false, + "XMLDocument": false, + "XMLHttpRequest": false, + "XMLHttpRequestEventTarget": false, + "XMLHttpRequestUpload": false, + "XMLSerializer": false, + "XPathEvaluator": false, + "XPathExpression": false, + "XPathResult": false, + "XRAnchor": false, + "XRAnchorSet": false, + "XRBoundedReferenceSpace": false, + "XRCamera": false, + "XRCPUDepthInformation": false, + "XRDepthInformation": false, + "XRDOMOverlayState": false, + "XRFrame": false, + "XRHand": false, + "XRHitTestResult": false, + "XRHitTestSource": false, + "XRInputSource": false, + "XRInputSourceArray": false, + "XRInputSourceEvent": false, + "XRInputSourcesChangeEvent": false, + "XRJointPose": false, + "XRJointSpace": false, + "XRLayer": false, + "XRLightEstimate": false, + "XRLightProbe": false, + "XRPose": false, + "XRRay": false, + "XRReferenceSpace": false, + "XRReferenceSpaceEvent": false, + "XRRenderState": false, + "XRRigidTransform": false, + "XRSession": false, + "XRSessionEvent": false, + "XRSpace": false, + "XRSystem": false, + "XRTransientInputHitTestResult": false, + "XRTransientInputHitTestSource": false, + "XRView": false, + "XRViewerPose": false, + "XRViewport": false, + "XRWebGLBinding": false, + "XRWebGLDepthInformation": false, + "XRWebGLLayer": false, + "XSLTProcessor": false + } + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-undef', + message: "'URLSearchParams' is not defined.", + messageId: 'undef', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 0, + endLine: 1, + endColumn: 15, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-undef > valid + +```js +IntersectionObserver; +``` + +```json +{ + "languageOptions": { + "globals": { + "AbortController": false, + "AbortSignal": false, + "AbsoluteOrientationSensor": false, + "AbstractRange": false, + "Accelerometer": false, + "addEventListener": false, + "ai": false, + "AI": false, + "AICreateMonitor": false, + "AITextSession": false, + "alert": false, + "AnalyserNode": false, + "Animation": false, + "AnimationEffect": false, + "AnimationEvent": false, + "AnimationPlaybackEvent": false, + "AnimationTimeline": false, + "AsyncDisposableStack": false, + "atob": false, + "Attr": false, + "Audio": false, + "AudioBuffer": false, + "AudioBufferSourceNode": false, + "AudioContext": false, + "AudioData": false, + "AudioDecoder": false, + "AudioDestinationNode": false, + "AudioEncoder": false, + "AudioListener": false, + "AudioNode": false, + "AudioParam": false, + "AudioParamMap": false, + "AudioProcessingEvent": false, + "AudioScheduledSourceNode": false, + "AudioSinkInfo": false, + "AudioWorklet": false, + "AudioWorkletGlobalScope": false, + "AudioWorkletNode": false, + "AudioWorkletProcessor": false, + "AuthenticatorAssertionResponse": false, + "AuthenticatorAttestationResponse": false, + "AuthenticatorResponse": false, + "BackgroundFetchManager": false, + "BackgroundFetchRecord": false, + "BackgroundFetchRegistration": false, + "BarcodeDetector": false, + "BarProp": false, + "BaseAudioContext": false, + "BatteryManager": false, + "BeforeUnloadEvent": false, + "BiquadFilterNode": false, + "Blob": false, + "BlobEvent": false, + "Bluetooth": false, + "BluetoothCharacteristicProperties": false, + "BluetoothDevice": false, + "BluetoothRemoteGATTCharacteristic": false, + "BluetoothRemoteGATTDescriptor": false, + "BluetoothRemoteGATTServer": false, + "BluetoothRemoteGATTService": false, + "BluetoothUUID": false, + "blur": false, + "BroadcastChannel": false, + "BrowserCaptureMediaStreamTrack": false, + "btoa": false, + "ByteLengthQueuingStrategy": false, + "Cache": false, + "caches": false, + "CacheStorage": false, + "cancelAnimationFrame": false, + "cancelIdleCallback": false, + "CanvasCaptureMediaStream": false, + "CanvasCaptureMediaStreamTrack": false, + "CanvasGradient": false, + "CanvasPattern": false, + "CanvasRenderingContext2D": false, + "CaptureController": false, + "CaretPosition": false, + "CDATASection": false, + "ChannelMergerNode": false, + "ChannelSplitterNode": false, + "ChapterInformation": false, + "CharacterBoundsUpdateEvent": false, + "CharacterData": false, + "clearInterval": false, + "clearTimeout": false, + "clientInformation": false, + "Clipboard": false, + "ClipboardChangeEvent": false, + "ClipboardEvent": false, + "ClipboardItem": false, + "close": false, + "closed": false, + "CloseEvent": false, + "CloseWatcher": false, + "CommandEvent": false, + "Comment": false, + "CompositionEvent": false, + "CompressionStream": false, + "confirm": false, + "console": false, + "ConstantSourceNode": false, + "ContentVisibilityAutoStateChangeEvent": false, + "ConvolverNode": false, + "CookieChangeEvent": false, + "CookieDeprecationLabel": false, + "cookieStore": false, + "CookieStore": false, + "CookieStoreManager": false, + "CountQueuingStrategy": false, + "createImageBitmap": false, + "CreateMonitor": false, + "Credential": false, + "credentialless": false, + "CredentialsContainer": false, + "CropTarget": false, + "crossOriginIsolated": false, + "crypto": false, + "Crypto": false, + "CryptoKey": false, + "CSPViolationReportBody": false, + "CSS": false, + "CSSAnimation": false, + "CSSConditionRule": false, + "CSSContainerRule": false, + "CSSCounterStyleRule": false, + "CSSFontFaceRule": false, + "CSSFontFeatureValuesRule": false, + "CSSFontPaletteValuesRule": false, + "CSSFunctionDeclarations": false, + "CSSFunctionDescriptors": false, + "CSSFunctionRule": false, + "CSSGroupingRule": false, + "CSSImageValue": false, + "CSSImportRule": false, + "CSSKeyframeRule": false, + "CSSKeyframesRule": false, + "CSSKeywordValue": false, + "CSSLayerBlockRule": false, + "CSSLayerStatementRule": false, + "CSSMarginRule": false, + "CSSMathClamp": false, + "CSSMathInvert": false, + "CSSMathMax": false, + "CSSMathMin": false, + "CSSMathNegate": false, + "CSSMathProduct": false, + "CSSMathSum": false, + "CSSMathValue": false, + "CSSMatrixComponent": false, + "CSSMediaRule": false, + "CSSNamespaceRule": false, + "CSSNestedDeclarations": false, + "CSSNumericArray": false, + "CSSNumericValue": false, + "CSSPageDescriptors": false, + "CSSPageRule": false, + "CSSPerspective": false, + "CSSPositionTryDescriptors": false, + "CSSPositionTryRule": false, + "CSSPositionValue": false, + "CSSPropertyRule": false, + "CSSRotate": false, + "CSSRule": false, + "CSSRuleList": false, + "CSSScale": false, + "CSSScopeRule": false, + "CSSSkew": false, + "CSSSkewX": false, + "CSSSkewY": false, + "CSSStartingStyleRule": false, + "CSSStyleDeclaration": false, + "CSSStyleRule": false, + "CSSStyleSheet": false, + "CSSStyleValue": false, + "CSSSupportsRule": false, + "CSSTransformComponent": false, + "CSSTransformValue": false, + "CSSTransition": false, + "CSSTranslate": false, + "CSSUnitValue": false, + "CSSUnparsedValue": false, + "CSSVariableReferenceValue": false, + "CSSViewTransitionRule": false, + "currentFrame": false, + "currentTime": false, + "CustomElementRegistry": false, + "customElements": false, + "CustomEvent": false, + "CustomStateSet": false, + "DataTransfer": false, + "DataTransferItem": false, + "DataTransferItemList": false, + "DecompressionStream": false, + "DelayNode": false, + "DelegatedInkTrailPresenter": false, + "DeviceMotionEvent": false, + "DeviceMotionEventAcceleration": false, + "DeviceMotionEventRotationRate": false, + "DeviceOrientationEvent": false, + "devicePixelRatio": false, + "DevicePosture": false, + "DigitalCredential": false, + "dispatchEvent": false, + "DisposableStack": false, + "document": false, + "Document": false, + "DocumentFragment": false, + "documentPictureInPicture": false, + "DocumentPictureInPicture": false, + "DocumentPictureInPictureEvent": false, + "DocumentTimeline": false, + "DocumentType": false, + "DOMError": false, + "DOMException": false, + "DOMImplementation": false, + "DOMMatrix": false, + "DOMMatrixReadOnly": false, + "DOMParser": false, + "DOMPoint": false, + "DOMPointReadOnly": false, + "DOMQuad": false, + "DOMRect": false, + "DOMRectList": false, + "DOMRectReadOnly": false, + "DOMStringList": false, + "DOMStringMap": false, + "DOMTokenList": false, + "DragEvent": false, + "DynamicsCompressorNode": false, + "EditContext": false, + "Element": false, + "ElementInternals": false, + "EncodedAudioChunk": false, + "EncodedVideoChunk": false, + "ErrorEvent": false, + "event": false, + "Event": false, + "EventCounts": false, + "EventSource": false, + "EventTarget": false, + "external": false, + "External": false, + "EyeDropper": false, + "FeaturePolicy": false, + "FederatedCredential": false, + "fence": false, + "Fence": false, + "FencedFrameConfig": false, + "fetch": false, + "fetchLater": false, + "FetchLaterResult": false, + "File": false, + "FileList": false, + "FileReader": false, + "FileSystem": false, + "FileSystemDirectoryEntry": false, + "FileSystemDirectoryHandle": false, + "FileSystemDirectoryReader": false, + "FileSystemEntry": false, + "FileSystemFileEntry": false, + "FileSystemFileHandle": false, + "FileSystemHandle": false, + "FileSystemObserver": false, + "FileSystemWritableFileStream": false, + "find": false, + "focus": false, + "FocusEvent": false, + "FontData": false, + "FontFace": false, + "FontFaceSet": false, + "FontFaceSetLoadEvent": false, + "FormData": false, + "FormDataEvent": false, + "FragmentDirective": false, + "frameElement": false, + "frames": false, + "GainNode": false, + "Gamepad": false, + "GamepadAxisMoveEvent": false, + "GamepadButton": false, + "GamepadButtonEvent": false, + "GamepadEvent": false, + "GamepadHapticActuator": false, + "GamepadPose": false, + "Geolocation": false, + "GeolocationCoordinates": false, + "GeolocationPosition": false, + "GeolocationPositionError": false, + "getComputedStyle": false, + "getScreenDetails": false, + "getSelection": false, + "GPU": false, + "GPUAdapter": false, + "GPUAdapterInfo": false, + "GPUBindGroup": false, + "GPUBindGroupLayout": false, + "GPUBuffer": false, + "GPUBufferUsage": false, + "GPUCanvasContext": false, + "GPUColorWrite": false, + "GPUCommandBuffer": false, + "GPUCommandEncoder": false, + "GPUCompilationInfo": false, + "GPUCompilationMessage": false, + "GPUComputePassEncoder": false, + "GPUComputePipeline": false, + "GPUDevice": false, + "GPUDeviceLostInfo": false, + "GPUError": false, + "GPUExternalTexture": false, + "GPUInternalError": false, + "GPUMapMode": false, + "GPUOutOfMemoryError": false, + "GPUPipelineError": false, + "GPUPipelineLayout": false, + "GPUQuerySet": false, + "GPUQueue": false, + "GPURenderBundle": false, + "GPURenderBundleEncoder": false, + "GPURenderPassEncoder": false, + "GPURenderPipeline": false, + "GPUSampler": false, + "GPUShaderModule": false, + "GPUShaderStage": false, + "GPUSupportedFeatures": false, + "GPUSupportedLimits": false, + "GPUTexture": false, + "GPUTextureUsage": false, + "GPUTextureView": false, + "GPUUncapturedErrorEvent": false, + "GPUValidationError": false, + "GravitySensor": false, + "Gyroscope": false, + "HashChangeEvent": false, + "Headers": false, + "HID": false, + "HIDConnectionEvent": false, + "HIDDevice": false, + "HIDInputReportEvent": false, + "Highlight": false, + "HighlightRegistry": false, + "history": false, + "History": false, + "HTMLAllCollection": false, + "HTMLAnchorElement": false, + "HTMLAreaElement": false, + "HTMLAudioElement": false, + "HTMLBaseElement": false, + "HTMLBodyElement": false, + "HTMLBRElement": false, + "HTMLButtonElement": false, + "HTMLCanvasElement": false, + "HTMLCollection": false, + "HTMLDataElement": false, + "HTMLDataListElement": false, + "HTMLDetailsElement": false, + "HTMLDialogElement": false, + "HTMLDirectoryElement": false, + "HTMLDivElement": false, + "HTMLDListElement": false, + "HTMLDocument": false, + "HTMLElement": false, + "HTMLEmbedElement": false, + "HTMLFencedFrameElement": false, + "HTMLFieldSetElement": false, + "HTMLFontElement": false, + "HTMLFormControlsCollection": false, + "HTMLFormElement": false, + "HTMLFrameElement": false, + "HTMLFrameSetElement": false, + "HTMLHeadElement": false, + "HTMLHeadingElement": false, + "HTMLHRElement": false, + "HTMLHtmlElement": false, + "HTMLIFrameElement": false, + "HTMLImageElement": false, + "HTMLInputElement": false, + "HTMLLabelElement": false, + "HTMLLegendElement": false, + "HTMLLIElement": false, + "HTMLLinkElement": false, + "HTMLMapElement": false, + "HTMLMarqueeElement": false, + "HTMLMediaElement": false, + "HTMLMenuElement": false, + "HTMLMetaElement": false, + "HTMLMeterElement": false, + "HTMLModElement": false, + "HTMLObjectElement": false, + "HTMLOListElement": false, + "HTMLOptGroupElement": false, + "HTMLOptionElement": false, + "HTMLOptionsCollection": false, + "HTMLOutputElement": false, + "HTMLParagraphElement": false, + "HTMLParamElement": false, + "HTMLPictureElement": false, + "HTMLPreElement": false, + "HTMLProgressElement": false, + "HTMLQuoteElement": false, + "HTMLScriptElement": false, + "HTMLSelectedContentElement": false, + "HTMLSelectElement": false, + "HTMLSlotElement": false, + "HTMLSourceElement": false, + "HTMLSpanElement": false, + "HTMLStyleElement": false, + "HTMLTableCaptionElement": false, + "HTMLTableCellElement": false, + "HTMLTableColElement": false, + "HTMLTableElement": false, + "HTMLTableRowElement": false, + "HTMLTableSectionElement": false, + "HTMLTemplateElement": false, + "HTMLTextAreaElement": false, + "HTMLTimeElement": false, + "HTMLTitleElement": false, + "HTMLTrackElement": false, + "HTMLUListElement": false, + "HTMLUnknownElement": false, + "HTMLVideoElement": false, + "IDBCursor": false, + "IDBCursorWithValue": false, + "IDBDatabase": false, + "IDBFactory": false, + "IDBIndex": false, + "IDBKeyRange": false, + "IDBObjectStore": false, + "IDBOpenDBRequest": false, + "IDBRecord": false, + "IDBRequest": false, + "IDBTransaction": false, + "IDBVersionChangeEvent": false, + "IdentityCredential": false, + "IdentityCredentialError": false, + "IdentityProvider": false, + "IdleDeadline": false, + "IdleDetector": false, + "IIRFilterNode": false, + "Image": false, + "ImageBitmap": false, + "ImageBitmapRenderingContext": false, + "ImageCapture": false, + "ImageData": false, + "ImageDecoder": false, + "ImageTrack": false, + "ImageTrackList": false, + "indexedDB": false, + "Ink": false, + "innerHeight": false, + "innerWidth": false, + "InputDeviceCapabilities": false, + "InputDeviceInfo": false, + "InputEvent": false, + "IntegrityViolationReportBody": false, + "InterestEvent": false, + "IntersectionObserver": false, + "IntersectionObserverEntry": false, + "isSecureContext": false, + "Keyboard": false, + "KeyboardEvent": false, + "KeyboardLayoutMap": false, + "KeyframeEffect": false, + "LanguageDetector": false, + "LargestContentfulPaint": false, + "LaunchParams": false, + "launchQueue": false, + "LaunchQueue": false, + "LayoutShift": false, + "LayoutShiftAttribution": false, + "length": false, + "LinearAccelerationSensor": false, + "localStorage": false, + "location": true, + "Location": false, + "locationbar": false, + "Lock": false, + "LockManager": false, + "matchMedia": false, + "MathMLElement": false, + "MediaCapabilities": false, + "MediaCapabilitiesInfo": false, + "MediaDeviceInfo": false, + "MediaDevices": false, + "MediaElementAudioSourceNode": false, + "MediaEncryptedEvent": false, + "MediaError": false, + "MediaKeyError": false, + "MediaKeyMessageEvent": false, + "MediaKeys": false, + "MediaKeySession": false, + "MediaKeyStatusMap": false, + "MediaKeySystemAccess": false, + "MediaList": false, + "MediaMetadata": false, + "MediaQueryList": false, + "MediaQueryListEvent": false, + "MediaRecorder": false, + "MediaRecorderErrorEvent": false, + "MediaSession": false, + "MediaSource": false, + "MediaSourceHandle": false, + "MediaStream": false, + "MediaStreamAudioDestinationNode": false, + "MediaStreamAudioSourceNode": false, + "MediaStreamEvent": false, + "MediaStreamTrack": false, + "MediaStreamTrackAudioSourceNode": false, + "MediaStreamTrackAudioStats": false, + "MediaStreamTrackEvent": false, + "MediaStreamTrackGenerator": false, + "MediaStreamTrackProcessor": false, + "MediaStreamTrackVideoStats": false, + "menubar": false, + "MessageChannel": false, + "MessageEvent": false, + "MessagePort": false, + "MIDIAccess": false, + "MIDIConnectionEvent": false, + "MIDIInput": false, + "MIDIInputMap": false, + "MIDIMessageEvent": false, + "MIDIOutput": false, + "MIDIOutputMap": false, + "MIDIPort": false, + "MimeType": false, + "MimeTypeArray": false, + "model": false, + "ModelGenericSession": false, + "ModelManager": false, + "MouseEvent": false, + "moveBy": false, + "moveTo": false, + "MutationEvent": false, + "MutationObserver": false, + "MutationRecord": false, + "name": false, + "NamedNodeMap": false, + "NavigateEvent": false, + "navigation": false, + "Navigation": false, + "NavigationActivation": false, + "NavigationCurrentEntryChangeEvent": false, + "NavigationDestination": false, + "NavigationHistoryEntry": false, + "NavigationPrecommitController": false, + "NavigationPreloadManager": false, + "NavigationTransition": false, + "navigator": false, + "Navigator": false, + "NavigatorLogin": false, + "NavigatorManagedData": false, + "NavigatorUAData": false, + "NetworkInformation": false, + "Node": false, + "NodeFilter": false, + "NodeIterator": false, + "NodeList": false, + "Notification": false, + "NotifyPaintEvent": false, + "NotRestoredReasonDetails": false, + "NotRestoredReasons": false, + "Observable": false, + "OfflineAudioCompletionEvent": false, + "OfflineAudioContext": false, + "offscreenBuffering": false, + "OffscreenCanvas": false, + "OffscreenCanvasRenderingContext2D": false, + "onabort": true, + "onafterprint": true, + "onanimationcancel": true, + "onanimationend": true, + "onanimationiteration": true, + "onanimationstart": true, + "onappinstalled": true, + "onauxclick": true, + "onbeforeinput": true, + "onbeforeinstallprompt": true, + "onbeforematch": true, + "onbeforeprint": true, + "onbeforetoggle": true, + "onbeforeunload": true, + "onbeforexrselect": true, + "onblur": true, + "oncancel": true, + "oncanplay": true, + "oncanplaythrough": true, + "onchange": true, + "onclick": true, + "onclose": true, + "oncommand": true, + "oncontentvisibilityautostatechange": true, + "oncontextlost": true, + "oncontextmenu": true, + "oncontextrestored": true, + "oncopy": true, + "oncuechange": true, + "oncut": true, + "ondblclick": true, + "ondevicemotion": true, + "ondeviceorientation": true, + "ondeviceorientationabsolute": true, + "ondrag": true, + "ondragend": true, + "ondragenter": true, + "ondragleave": true, + "ondragover": true, + "ondragstart": true, + "ondrop": true, + "ondurationchange": true, + "onemptied": true, + "onended": true, + "onerror": true, + "onfocus": true, + "onformdata": true, + "ongamepadconnected": true, + "ongamepaddisconnected": true, + "ongotpointercapture": true, + "onhashchange": true, + "oninput": true, + "oninvalid": true, + "onkeydown": true, + "onkeypress": true, + "onkeyup": true, + "onlanguagechange": true, + "onload": true, + "onloadeddata": true, + "onloadedmetadata": true, + "onloadstart": true, + "onlostpointercapture": true, + "onmessage": true, + "onmessageerror": true, + "onmousedown": true, + "onmouseenter": true, + "onmouseleave": true, + "onmousemove": true, + "onmouseout": true, + "onmouseover": true, + "onmouseup": true, + "onmousewheel": true, + "onoffline": true, + "ononline": true, + "onpagehide": true, + "onpagereveal": true, + "onpageshow": true, + "onpageswap": true, + "onpaste": true, + "onpause": true, + "onplay": true, + "onplaying": true, + "onpointercancel": true, + "onpointerdown": true, + "onpointerenter": true, + "onpointerleave": true, + "onpointermove": true, + "onpointerout": true, + "onpointerover": true, + "onpointerrawupdate": true, + "onpointerup": true, + "onpopstate": true, + "onprogress": true, + "onratechange": true, + "onrejectionhandled": true, + "onreset": true, + "onresize": true, + "onscroll": true, + "onscrollend": true, + "onscrollsnapchange": true, + "onscrollsnapchanging": true, + "onsearch": true, + "onsecuritypolicyviolation": true, + "onseeked": true, + "onseeking": true, + "onselect": true, + "onselectionchange": true, + "onselectstart": true, + "onslotchange": true, + "onstalled": true, + "onstorage": true, + "onsubmit": true, + "onsuspend": true, + "ontimeupdate": true, + "ontoggle": true, + "ontransitioncancel": true, + "ontransitionend": true, + "ontransitionrun": true, + "ontransitionstart": true, + "onunhandledrejection": true, + "onunload": true, + "onvolumechange": true, + "onwaiting": true, + "onwheel": true, + "open": false, + "opener": false, + "Option": false, + "OrientationSensor": false, + "origin": false, + "originAgentCluster": false, + "OscillatorNode": false, + "OTPCredential": false, + "outerHeight": false, + "outerWidth": false, + "OverconstrainedError": false, + "PageRevealEvent": false, + "PageSwapEvent": false, + "PageTransitionEvent": false, + "pageXOffset": false, + "pageYOffset": false, + "PannerNode": false, + "parent": false, + "PasswordCredential": false, + "Path2D": false, + "PaymentAddress": false, + "PaymentManager": false, + "PaymentMethodChangeEvent": false, + "PaymentRequest": false, + "PaymentRequestUpdateEvent": false, + "PaymentResponse": false, + "performance": false, + "Performance": false, + "PerformanceElementTiming": false, + "PerformanceEntry": false, + "PerformanceEventTiming": false, + "PerformanceLongAnimationFrameTiming": false, + "PerformanceLongTaskTiming": false, + "PerformanceMark": false, + "PerformanceMeasure": false, + "PerformanceNavigation": false, + "PerformanceNavigationTiming": false, + "PerformanceObserver": false, + "PerformanceObserverEntryList": false, + "PerformancePaintTiming": false, + "PerformanceResourceTiming": false, + "PerformanceScriptTiming": false, + "PerformanceServerTiming": false, + "PerformanceTiming": false, + "PeriodicSyncManager": false, + "PeriodicWave": false, + "Permissions": false, + "PermissionStatus": false, + "PERSISTENT": false, + "personalbar": false, + "PictureInPictureEvent": false, + "PictureInPictureWindow": false, + "Plugin": false, + "PluginArray": false, + "PointerEvent": false, + "PopStateEvent": false, + "postMessage": false, + "Presentation": false, + "PresentationAvailability": false, + "PresentationConnection": false, + "PresentationConnectionAvailableEvent": false, + "PresentationConnectionCloseEvent": false, + "PresentationConnectionList": false, + "PresentationReceiver": false, + "PresentationRequest": false, + "PressureObserver": false, + "PressureRecord": false, + "print": false, + "ProcessingInstruction": false, + "Profiler": false, + "ProgressEvent": false, + "PromiseRejectionEvent": false, + "prompt": false, + "ProtectedAudience": false, + "PublicKeyCredential": false, + "PushManager": false, + "PushSubscription": false, + "PushSubscriptionOptions": false, + "queryLocalFonts": false, + "queueMicrotask": false, + "QuotaExceededError": false, + "RadioNodeList": false, + "Range": false, + "ReadableByteStreamController": false, + "ReadableStream": false, + "ReadableStreamBYOBReader": false, + "ReadableStreamBYOBRequest": false, + "ReadableStreamDefaultController": false, + "ReadableStreamDefaultReader": false, + "registerProcessor": false, + "RelativeOrientationSensor": false, + "RemotePlayback": false, + "removeEventListener": false, + "ReportBody": false, + "reportError": false, + "ReportingObserver": false, + "Request": false, + "requestAnimationFrame": false, + "requestIdleCallback": false, + "resizeBy": false, + "ResizeObserver": false, + "ResizeObserverEntry": false, + "ResizeObserverSize": false, + "resizeTo": false, + "Response": false, + "RestrictionTarget": false, + "RTCCertificate": false, + "RTCDataChannel": false, + "RTCDataChannelEvent": false, + "RTCDtlsTransport": false, + "RTCDTMFSender": false, + "RTCDTMFToneChangeEvent": false, + "RTCEncodedAudioFrame": false, + "RTCEncodedVideoFrame": false, + "RTCError": false, + "RTCErrorEvent": false, + "RTCIceCandidate": false, + "RTCIceTransport": false, + "RTCPeerConnection": false, + "RTCPeerConnectionIceErrorEvent": false, + "RTCPeerConnectionIceEvent": false, + "RTCRtpReceiver": false, + "RTCRtpScriptTransform": false, + "RTCRtpSender": false, + "RTCRtpTransceiver": false, + "RTCSctpTransport": false, + "RTCSessionDescription": false, + "RTCStatsReport": false, + "RTCTrackEvent": false, + "sampleRate": false, + "scheduler": false, + "Scheduler": false, + "Scheduling": false, + "screen": false, + "Screen": false, + "ScreenDetailed": false, + "ScreenDetails": false, + "screenLeft": false, + "ScreenOrientation": false, + "screenTop": false, + "screenX": false, + "screenY": false, + "ScriptProcessorNode": false, + "scroll": false, + "scrollbars": false, + "scrollBy": false, + "ScrollTimeline": false, + "scrollTo": false, + "scrollX": false, + "scrollY": false, + "SecurityPolicyViolationEvent": false, + "Selection": false, + "self": false, + "Sensor": false, + "SensorErrorEvent": false, + "Serial": false, + "SerialPort": false, + "ServiceWorker": false, + "ServiceWorkerContainer": false, + "ServiceWorkerRegistration": false, + "sessionStorage": false, + "setInterval": false, + "setTimeout": false, + "ShadowRoot": false, + "sharedStorage": false, + "SharedStorage": false, + "SharedStorageAppendMethod": false, + "SharedStorageClearMethod": false, + "SharedStorageDeleteMethod": false, + "SharedStorageModifierMethod": false, + "SharedStorageSetMethod": false, + "SharedStorageWorklet": false, + "SharedWorker": false, + "showDirectoryPicker": false, + "showOpenFilePicker": false, + "showSaveFilePicker": false, + "SnapEvent": false, + "SourceBuffer": false, + "SourceBufferList": false, + "SpeechGrammar": false, + "SpeechGrammarList": false, + "SpeechRecognition": false, + "SpeechRecognitionErrorEvent": false, + "SpeechRecognitionEvent": false, + "SpeechRecognitionPhrase": false, + "speechSynthesis": false, + "SpeechSynthesis": false, + "SpeechSynthesisErrorEvent": false, + "SpeechSynthesisEvent": false, + "SpeechSynthesisUtterance": false, + "SpeechSynthesisVoice": false, + "StaticRange": false, + "status": false, + "statusbar": false, + "StereoPannerNode": false, + "stop": false, + "Storage": false, + "StorageBucket": false, + "StorageBucketManager": false, + "StorageEvent": false, + "StorageManager": false, + "structuredClone": false, + "styleMedia": false, + "StylePropertyMap": false, + "StylePropertyMapReadOnly": false, + "StyleSheet": false, + "StyleSheetList": false, + "SubmitEvent": false, + "Subscriber": false, + "SubtleCrypto": false, + "Summarizer": false, + "SuppressedError": false, + "SVGAElement": false, + "SVGAngle": false, + "SVGAnimatedAngle": false, + "SVGAnimatedBoolean": false, + "SVGAnimatedEnumeration": false, + "SVGAnimatedInteger": false, + "SVGAnimatedLength": false, + "SVGAnimatedLengthList": false, + "SVGAnimatedNumber": false, + "SVGAnimatedNumberList": false, + "SVGAnimatedPreserveAspectRatio": false, + "SVGAnimatedRect": false, + "SVGAnimatedString": false, + "SVGAnimatedTransformList": false, + "SVGAnimateElement": false, + "SVGAnimateMotionElement": false, + "SVGAnimateTransformElement": false, + "SVGAnimationElement": false, + "SVGCircleElement": false, + "SVGClipPathElement": false, + "SVGComponentTransferFunctionElement": false, + "SVGDefsElement": false, + "SVGDescElement": false, + "SVGElement": false, + "SVGEllipseElement": false, + "SVGFEBlendElement": false, + "SVGFEColorMatrixElement": false, + "SVGFEComponentTransferElement": false, + "SVGFECompositeElement": false, + "SVGFEConvolveMatrixElement": false, + "SVGFEDiffuseLightingElement": false, + "SVGFEDisplacementMapElement": false, + "SVGFEDistantLightElement": false, + "SVGFEDropShadowElement": false, + "SVGFEFloodElement": false, + "SVGFEFuncAElement": false, + "SVGFEFuncBElement": false, + "SVGFEFuncGElement": false, + "SVGFEFuncRElement": false, + "SVGFEGaussianBlurElement": false, + "SVGFEImageElement": false, + "SVGFEMergeElement": false, + "SVGFEMergeNodeElement": false, + "SVGFEMorphologyElement": false, + "SVGFEOffsetElement": false, + "SVGFEPointLightElement": false, + "SVGFESpecularLightingElement": false, + "SVGFESpotLightElement": false, + "SVGFETileElement": false, + "SVGFETurbulenceElement": false, + "SVGFilterElement": false, + "SVGForeignObjectElement": false, + "SVGGElement": false, + "SVGGeometryElement": false, + "SVGGradientElement": false, + "SVGGraphicsElement": false, + "SVGImageElement": false, + "SVGLength": false, + "SVGLengthList": false, + "SVGLinearGradientElement": false, + "SVGLineElement": false, + "SVGMarkerElement": false, + "SVGMaskElement": false, + "SVGMatrix": false, + "SVGMetadataElement": false, + "SVGMPathElement": false, + "SVGNumber": false, + "SVGNumberList": false, + "SVGPathElement": false, + "SVGPatternElement": false, + "SVGPoint": false, + "SVGPointList": false, + "SVGPolygonElement": false, + "SVGPolylineElement": false, + "SVGPreserveAspectRatio": false, + "SVGRadialGradientElement": false, + "SVGRect": false, + "SVGRectElement": false, + "SVGScriptElement": false, + "SVGSetElement": false, + "SVGStopElement": false, + "SVGStringList": false, + "SVGStyleElement": false, + "SVGSVGElement": false, + "SVGSwitchElement": false, + "SVGSymbolElement": false, + "SVGTextContentElement": false, + "SVGTextElement": false, + "SVGTextPathElement": false, + "SVGTextPositioningElement": false, + "SVGTitleElement": false, + "SVGTransform": false, + "SVGTransformList": false, + "SVGTSpanElement": false, + "SVGUnitTypes": false, + "SVGUseElement": false, + "SVGViewElement": false, + "SyncManager": false, + "TaskAttributionTiming": false, + "TaskController": false, + "TaskPriorityChangeEvent": false, + "TaskSignal": false, + "TEMPORARY": false, + "Text": false, + "TextDecoder": false, + "TextDecoderStream": false, + "TextEncoder": false, + "TextEncoderStream": false, + "TextEvent": false, + "TextFormat": false, + "TextFormatUpdateEvent": false, + "TextMetrics": false, + "TextTrack": false, + "TextTrackCue": false, + "TextTrackCueList": false, + "TextTrackList": false, + "TextUpdateEvent": false, + "TimeEvent": false, + "TimeRanges": false, + "ToggleEvent": false, + "toolbar": false, + "top": false, + "Touch": false, + "TouchEvent": false, + "TouchList": false, + "TrackEvent": false, + "TransformStream": false, + "TransformStreamDefaultController": false, + "TransitionEvent": false, + "Translator": false, + "TreeWalker": false, + "TrustedHTML": false, + "TrustedScript": false, + "TrustedScriptURL": false, + "TrustedTypePolicy": false, + "TrustedTypePolicyFactory": false, + "trustedTypes": false, + "UIEvent": false, + "URL": false, + "URLPattern": false, + "URLSearchParams": false, + "USB": false, + "USBAlternateInterface": false, + "USBConfiguration": false, + "USBConnectionEvent": false, + "USBDevice": false, + "USBEndpoint": false, + "USBInterface": false, + "USBInTransferResult": false, + "USBIsochronousInTransferPacket": false, + "USBIsochronousInTransferResult": false, + "USBIsochronousOutTransferPacket": false, + "USBIsochronousOutTransferResult": false, + "USBOutTransferResult": false, + "UserActivation": false, + "ValidityState": false, + "VideoColorSpace": false, + "VideoDecoder": false, + "VideoEncoder": false, + "VideoFrame": false, + "VideoPlaybackQuality": false, + "viewport": false, + "Viewport": false, + "ViewTimeline": false, + "ViewTransition": false, + "ViewTransitionTypeSet": false, + "VirtualKeyboard": false, + "VirtualKeyboardGeometryChangeEvent": false, + "VisibilityStateEntry": false, + "visualViewport": false, + "VisualViewport": false, + "VTTCue": false, + "VTTRegion": false, + "WakeLock": false, + "WakeLockSentinel": false, + "WaveShaperNode": false, + "WebAssembly": false, + "WebGL2RenderingContext": false, + "WebGLActiveInfo": false, + "WebGLBuffer": false, + "WebGLContextEvent": false, + "WebGLFramebuffer": false, + "WebGLObject": false, + "WebGLProgram": false, + "WebGLQuery": false, + "WebGLRenderbuffer": false, + "WebGLRenderingContext": false, + "WebGLSampler": false, + "WebGLShader": false, + "WebGLShaderPrecisionFormat": false, + "WebGLSync": false, + "WebGLTexture": false, + "WebGLTransformFeedback": false, + "WebGLUniformLocation": false, + "WebGLVertexArrayObject": false, + "WebSocket": false, + "WebSocketError": false, + "WebSocketStream": false, + "WebTransport": false, + "WebTransportBidirectionalStream": false, + "WebTransportDatagramDuplexStream": false, + "WebTransportError": false, + "WebTransportReceiveStream": false, + "WebTransportSendStream": false, + "WGSLLanguageFeatures": false, + "WheelEvent": false, + "when": false, + "window": false, + "Window": false, + "WindowControlsOverlay": false, + "WindowControlsOverlayGeometryChangeEvent": false, + "Worker": false, + "Worklet": false, + "WorkletGlobalScope": false, + "WritableStream": false, + "WritableStreamDefaultController": false, + "WritableStreamDefaultWriter": false, + "XMLDocument": false, + "XMLHttpRequest": false, + "XMLHttpRequestEventTarget": false, + "XMLHttpRequestUpload": false, + "XMLSerializer": false, + "XPathEvaluator": false, + "XPathExpression": false, + "XPathResult": false, + "XRAnchor": false, + "XRAnchorSet": false, + "XRBoundedReferenceSpace": false, + "XRCamera": false, + "XRCPUDepthInformation": false, + "XRDepthInformation": false, + "XRDOMOverlayState": false, + "XRFrame": false, + "XRHand": false, + "XRHitTestResult": false, + "XRHitTestSource": false, + "XRInputSource": false, + "XRInputSourceArray": false, + "XRInputSourceEvent": false, + "XRInputSourcesChangeEvent": false, + "XRJointPose": false, + "XRJointSpace": false, + "XRLayer": false, + "XRLightEstimate": false, + "XRLightProbe": false, + "XRPose": false, + "XRRay": false, + "XRReferenceSpace": false, + "XRReferenceSpaceEvent": false, + "XRRenderState": false, + "XRRigidTransform": false, + "XRSession": false, + "XRSessionEvent": false, + "XRSpace": false, + "XRSystem": false, + "XRTransientInputHitTestResult": false, + "XRTransientInputHitTestSource": false, + "XRView": false, + "XRViewerPose": false, + "XRViewport": false, + "XRWebGLBinding": false, + "XRWebGLDepthInformation": false, + "XRWebGLLayer": false, + "XSLTProcessor": false + } + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-undef', + message: "'IntersectionObserver' is not defined.", + messageId: 'undef', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 0, + endLine: 1, + endColumn: 20, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-undef > valid + +```js +Credential; +``` + +```json +{ + "languageOptions": { + "globals": { + "AbortController": false, + "AbortSignal": false, + "AbsoluteOrientationSensor": false, + "AbstractRange": false, + "Accelerometer": false, + "addEventListener": false, + "ai": false, + "AI": false, + "AICreateMonitor": false, + "AITextSession": false, + "alert": false, + "AnalyserNode": false, + "Animation": false, + "AnimationEffect": false, + "AnimationEvent": false, + "AnimationPlaybackEvent": false, + "AnimationTimeline": false, + "AsyncDisposableStack": false, + "atob": false, + "Attr": false, + "Audio": false, + "AudioBuffer": false, + "AudioBufferSourceNode": false, + "AudioContext": false, + "AudioData": false, + "AudioDecoder": false, + "AudioDestinationNode": false, + "AudioEncoder": false, + "AudioListener": false, + "AudioNode": false, + "AudioParam": false, + "AudioParamMap": false, + "AudioProcessingEvent": false, + "AudioScheduledSourceNode": false, + "AudioSinkInfo": false, + "AudioWorklet": false, + "AudioWorkletGlobalScope": false, + "AudioWorkletNode": false, + "AudioWorkletProcessor": false, + "AuthenticatorAssertionResponse": false, + "AuthenticatorAttestationResponse": false, + "AuthenticatorResponse": false, + "BackgroundFetchManager": false, + "BackgroundFetchRecord": false, + "BackgroundFetchRegistration": false, + "BarcodeDetector": false, + "BarProp": false, + "BaseAudioContext": false, + "BatteryManager": false, + "BeforeUnloadEvent": false, + "BiquadFilterNode": false, + "Blob": false, + "BlobEvent": false, + "Bluetooth": false, + "BluetoothCharacteristicProperties": false, + "BluetoothDevice": false, + "BluetoothRemoteGATTCharacteristic": false, + "BluetoothRemoteGATTDescriptor": false, + "BluetoothRemoteGATTServer": false, + "BluetoothRemoteGATTService": false, + "BluetoothUUID": false, + "blur": false, + "BroadcastChannel": false, + "BrowserCaptureMediaStreamTrack": false, + "btoa": false, + "ByteLengthQueuingStrategy": false, + "Cache": false, + "caches": false, + "CacheStorage": false, + "cancelAnimationFrame": false, + "cancelIdleCallback": false, + "CanvasCaptureMediaStream": false, + "CanvasCaptureMediaStreamTrack": false, + "CanvasGradient": false, + "CanvasPattern": false, + "CanvasRenderingContext2D": false, + "CaptureController": false, + "CaretPosition": false, + "CDATASection": false, + "ChannelMergerNode": false, + "ChannelSplitterNode": false, + "ChapterInformation": false, + "CharacterBoundsUpdateEvent": false, + "CharacterData": false, + "clearInterval": false, + "clearTimeout": false, + "clientInformation": false, + "Clipboard": false, + "ClipboardChangeEvent": false, + "ClipboardEvent": false, + "ClipboardItem": false, + "close": false, + "closed": false, + "CloseEvent": false, + "CloseWatcher": false, + "CommandEvent": false, + "Comment": false, + "CompositionEvent": false, + "CompressionStream": false, + "confirm": false, + "console": false, + "ConstantSourceNode": false, + "ContentVisibilityAutoStateChangeEvent": false, + "ConvolverNode": false, + "CookieChangeEvent": false, + "CookieDeprecationLabel": false, + "cookieStore": false, + "CookieStore": false, + "CookieStoreManager": false, + "CountQueuingStrategy": false, + "createImageBitmap": false, + "CreateMonitor": false, + "Credential": false, + "credentialless": false, + "CredentialsContainer": false, + "CropTarget": false, + "crossOriginIsolated": false, + "crypto": false, + "Crypto": false, + "CryptoKey": false, + "CSPViolationReportBody": false, + "CSS": false, + "CSSAnimation": false, + "CSSConditionRule": false, + "CSSContainerRule": false, + "CSSCounterStyleRule": false, + "CSSFontFaceRule": false, + "CSSFontFeatureValuesRule": false, + "CSSFontPaletteValuesRule": false, + "CSSFunctionDeclarations": false, + "CSSFunctionDescriptors": false, + "CSSFunctionRule": false, + "CSSGroupingRule": false, + "CSSImageValue": false, + "CSSImportRule": false, + "CSSKeyframeRule": false, + "CSSKeyframesRule": false, + "CSSKeywordValue": false, + "CSSLayerBlockRule": false, + "CSSLayerStatementRule": false, + "CSSMarginRule": false, + "CSSMathClamp": false, + "CSSMathInvert": false, + "CSSMathMax": false, + "CSSMathMin": false, + "CSSMathNegate": false, + "CSSMathProduct": false, + "CSSMathSum": false, + "CSSMathValue": false, + "CSSMatrixComponent": false, + "CSSMediaRule": false, + "CSSNamespaceRule": false, + "CSSNestedDeclarations": false, + "CSSNumericArray": false, + "CSSNumericValue": false, + "CSSPageDescriptors": false, + "CSSPageRule": false, + "CSSPerspective": false, + "CSSPositionTryDescriptors": false, + "CSSPositionTryRule": false, + "CSSPositionValue": false, + "CSSPropertyRule": false, + "CSSRotate": false, + "CSSRule": false, + "CSSRuleList": false, + "CSSScale": false, + "CSSScopeRule": false, + "CSSSkew": false, + "CSSSkewX": false, + "CSSSkewY": false, + "CSSStartingStyleRule": false, + "CSSStyleDeclaration": false, + "CSSStyleRule": false, + "CSSStyleSheet": false, + "CSSStyleValue": false, + "CSSSupportsRule": false, + "CSSTransformComponent": false, + "CSSTransformValue": false, + "CSSTransition": false, + "CSSTranslate": false, + "CSSUnitValue": false, + "CSSUnparsedValue": false, + "CSSVariableReferenceValue": false, + "CSSViewTransitionRule": false, + "currentFrame": false, + "currentTime": false, + "CustomElementRegistry": false, + "customElements": false, + "CustomEvent": false, + "CustomStateSet": false, + "DataTransfer": false, + "DataTransferItem": false, + "DataTransferItemList": false, + "DecompressionStream": false, + "DelayNode": false, + "DelegatedInkTrailPresenter": false, + "DeviceMotionEvent": false, + "DeviceMotionEventAcceleration": false, + "DeviceMotionEventRotationRate": false, + "DeviceOrientationEvent": false, + "devicePixelRatio": false, + "DevicePosture": false, + "DigitalCredential": false, + "dispatchEvent": false, + "DisposableStack": false, + "document": false, + "Document": false, + "DocumentFragment": false, + "documentPictureInPicture": false, + "DocumentPictureInPicture": false, + "DocumentPictureInPictureEvent": false, + "DocumentTimeline": false, + "DocumentType": false, + "DOMError": false, + "DOMException": false, + "DOMImplementation": false, + "DOMMatrix": false, + "DOMMatrixReadOnly": false, + "DOMParser": false, + "DOMPoint": false, + "DOMPointReadOnly": false, + "DOMQuad": false, + "DOMRect": false, + "DOMRectList": false, + "DOMRectReadOnly": false, + "DOMStringList": false, + "DOMStringMap": false, + "DOMTokenList": false, + "DragEvent": false, + "DynamicsCompressorNode": false, + "EditContext": false, + "Element": false, + "ElementInternals": false, + "EncodedAudioChunk": false, + "EncodedVideoChunk": false, + "ErrorEvent": false, + "event": false, + "Event": false, + "EventCounts": false, + "EventSource": false, + "EventTarget": false, + "external": false, + "External": false, + "EyeDropper": false, + "FeaturePolicy": false, + "FederatedCredential": false, + "fence": false, + "Fence": false, + "FencedFrameConfig": false, + "fetch": false, + "fetchLater": false, + "FetchLaterResult": false, + "File": false, + "FileList": false, + "FileReader": false, + "FileSystem": false, + "FileSystemDirectoryEntry": false, + "FileSystemDirectoryHandle": false, + "FileSystemDirectoryReader": false, + "FileSystemEntry": false, + "FileSystemFileEntry": false, + "FileSystemFileHandle": false, + "FileSystemHandle": false, + "FileSystemObserver": false, + "FileSystemWritableFileStream": false, + "find": false, + "focus": false, + "FocusEvent": false, + "FontData": false, + "FontFace": false, + "FontFaceSet": false, + "FontFaceSetLoadEvent": false, + "FormData": false, + "FormDataEvent": false, + "FragmentDirective": false, + "frameElement": false, + "frames": false, + "GainNode": false, + "Gamepad": false, + "GamepadAxisMoveEvent": false, + "GamepadButton": false, + "GamepadButtonEvent": false, + "GamepadEvent": false, + "GamepadHapticActuator": false, + "GamepadPose": false, + "Geolocation": false, + "GeolocationCoordinates": false, + "GeolocationPosition": false, + "GeolocationPositionError": false, + "getComputedStyle": false, + "getScreenDetails": false, + "getSelection": false, + "GPU": false, + "GPUAdapter": false, + "GPUAdapterInfo": false, + "GPUBindGroup": false, + "GPUBindGroupLayout": false, + "GPUBuffer": false, + "GPUBufferUsage": false, + "GPUCanvasContext": false, + "GPUColorWrite": false, + "GPUCommandBuffer": false, + "GPUCommandEncoder": false, + "GPUCompilationInfo": false, + "GPUCompilationMessage": false, + "GPUComputePassEncoder": false, + "GPUComputePipeline": false, + "GPUDevice": false, + "GPUDeviceLostInfo": false, + "GPUError": false, + "GPUExternalTexture": false, + "GPUInternalError": false, + "GPUMapMode": false, + "GPUOutOfMemoryError": false, + "GPUPipelineError": false, + "GPUPipelineLayout": false, + "GPUQuerySet": false, + "GPUQueue": false, + "GPURenderBundle": false, + "GPURenderBundleEncoder": false, + "GPURenderPassEncoder": false, + "GPURenderPipeline": false, + "GPUSampler": false, + "GPUShaderModule": false, + "GPUShaderStage": false, + "GPUSupportedFeatures": false, + "GPUSupportedLimits": false, + "GPUTexture": false, + "GPUTextureUsage": false, + "GPUTextureView": false, + "GPUUncapturedErrorEvent": false, + "GPUValidationError": false, + "GravitySensor": false, + "Gyroscope": false, + "HashChangeEvent": false, + "Headers": false, + "HID": false, + "HIDConnectionEvent": false, + "HIDDevice": false, + "HIDInputReportEvent": false, + "Highlight": false, + "HighlightRegistry": false, + "history": false, + "History": false, + "HTMLAllCollection": false, + "HTMLAnchorElement": false, + "HTMLAreaElement": false, + "HTMLAudioElement": false, + "HTMLBaseElement": false, + "HTMLBodyElement": false, + "HTMLBRElement": false, + "HTMLButtonElement": false, + "HTMLCanvasElement": false, + "HTMLCollection": false, + "HTMLDataElement": false, + "HTMLDataListElement": false, + "HTMLDetailsElement": false, + "HTMLDialogElement": false, + "HTMLDirectoryElement": false, + "HTMLDivElement": false, + "HTMLDListElement": false, + "HTMLDocument": false, + "HTMLElement": false, + "HTMLEmbedElement": false, + "HTMLFencedFrameElement": false, + "HTMLFieldSetElement": false, + "HTMLFontElement": false, + "HTMLFormControlsCollection": false, + "HTMLFormElement": false, + "HTMLFrameElement": false, + "HTMLFrameSetElement": false, + "HTMLHeadElement": false, + "HTMLHeadingElement": false, + "HTMLHRElement": false, + "HTMLHtmlElement": false, + "HTMLIFrameElement": false, + "HTMLImageElement": false, + "HTMLInputElement": false, + "HTMLLabelElement": false, + "HTMLLegendElement": false, + "HTMLLIElement": false, + "HTMLLinkElement": false, + "HTMLMapElement": false, + "HTMLMarqueeElement": false, + "HTMLMediaElement": false, + "HTMLMenuElement": false, + "HTMLMetaElement": false, + "HTMLMeterElement": false, + "HTMLModElement": false, + "HTMLObjectElement": false, + "HTMLOListElement": false, + "HTMLOptGroupElement": false, + "HTMLOptionElement": false, + "HTMLOptionsCollection": false, + "HTMLOutputElement": false, + "HTMLParagraphElement": false, + "HTMLParamElement": false, + "HTMLPictureElement": false, + "HTMLPreElement": false, + "HTMLProgressElement": false, + "HTMLQuoteElement": false, + "HTMLScriptElement": false, + "HTMLSelectedContentElement": false, + "HTMLSelectElement": false, + "HTMLSlotElement": false, + "HTMLSourceElement": false, + "HTMLSpanElement": false, + "HTMLStyleElement": false, + "HTMLTableCaptionElement": false, + "HTMLTableCellElement": false, + "HTMLTableColElement": false, + "HTMLTableElement": false, + "HTMLTableRowElement": false, + "HTMLTableSectionElement": false, + "HTMLTemplateElement": false, + "HTMLTextAreaElement": false, + "HTMLTimeElement": false, + "HTMLTitleElement": false, + "HTMLTrackElement": false, + "HTMLUListElement": false, + "HTMLUnknownElement": false, + "HTMLVideoElement": false, + "IDBCursor": false, + "IDBCursorWithValue": false, + "IDBDatabase": false, + "IDBFactory": false, + "IDBIndex": false, + "IDBKeyRange": false, + "IDBObjectStore": false, + "IDBOpenDBRequest": false, + "IDBRecord": false, + "IDBRequest": false, + "IDBTransaction": false, + "IDBVersionChangeEvent": false, + "IdentityCredential": false, + "IdentityCredentialError": false, + "IdentityProvider": false, + "IdleDeadline": false, + "IdleDetector": false, + "IIRFilterNode": false, + "Image": false, + "ImageBitmap": false, + "ImageBitmapRenderingContext": false, + "ImageCapture": false, + "ImageData": false, + "ImageDecoder": false, + "ImageTrack": false, + "ImageTrackList": false, + "indexedDB": false, + "Ink": false, + "innerHeight": false, + "innerWidth": false, + "InputDeviceCapabilities": false, + "InputDeviceInfo": false, + "InputEvent": false, + "IntegrityViolationReportBody": false, + "InterestEvent": false, + "IntersectionObserver": false, + "IntersectionObserverEntry": false, + "isSecureContext": false, + "Keyboard": false, + "KeyboardEvent": false, + "KeyboardLayoutMap": false, + "KeyframeEffect": false, + "LanguageDetector": false, + "LargestContentfulPaint": false, + "LaunchParams": false, + "launchQueue": false, + "LaunchQueue": false, + "LayoutShift": false, + "LayoutShiftAttribution": false, + "length": false, + "LinearAccelerationSensor": false, + "localStorage": false, + "location": true, + "Location": false, + "locationbar": false, + "Lock": false, + "LockManager": false, + "matchMedia": false, + "MathMLElement": false, + "MediaCapabilities": false, + "MediaCapabilitiesInfo": false, + "MediaDeviceInfo": false, + "MediaDevices": false, + "MediaElementAudioSourceNode": false, + "MediaEncryptedEvent": false, + "MediaError": false, + "MediaKeyError": false, + "MediaKeyMessageEvent": false, + "MediaKeys": false, + "MediaKeySession": false, + "MediaKeyStatusMap": false, + "MediaKeySystemAccess": false, + "MediaList": false, + "MediaMetadata": false, + "MediaQueryList": false, + "MediaQueryListEvent": false, + "MediaRecorder": false, + "MediaRecorderErrorEvent": false, + "MediaSession": false, + "MediaSource": false, + "MediaSourceHandle": false, + "MediaStream": false, + "MediaStreamAudioDestinationNode": false, + "MediaStreamAudioSourceNode": false, + "MediaStreamEvent": false, + "MediaStreamTrack": false, + "MediaStreamTrackAudioSourceNode": false, + "MediaStreamTrackAudioStats": false, + "MediaStreamTrackEvent": false, + "MediaStreamTrackGenerator": false, + "MediaStreamTrackProcessor": false, + "MediaStreamTrackVideoStats": false, + "menubar": false, + "MessageChannel": false, + "MessageEvent": false, + "MessagePort": false, + "MIDIAccess": false, + "MIDIConnectionEvent": false, + "MIDIInput": false, + "MIDIInputMap": false, + "MIDIMessageEvent": false, + "MIDIOutput": false, + "MIDIOutputMap": false, + "MIDIPort": false, + "MimeType": false, + "MimeTypeArray": false, + "model": false, + "ModelGenericSession": false, + "ModelManager": false, + "MouseEvent": false, + "moveBy": false, + "moveTo": false, + "MutationEvent": false, + "MutationObserver": false, + "MutationRecord": false, + "name": false, + "NamedNodeMap": false, + "NavigateEvent": false, + "navigation": false, + "Navigation": false, + "NavigationActivation": false, + "NavigationCurrentEntryChangeEvent": false, + "NavigationDestination": false, + "NavigationHistoryEntry": false, + "NavigationPrecommitController": false, + "NavigationPreloadManager": false, + "NavigationTransition": false, + "navigator": false, + "Navigator": false, + "NavigatorLogin": false, + "NavigatorManagedData": false, + "NavigatorUAData": false, + "NetworkInformation": false, + "Node": false, + "NodeFilter": false, + "NodeIterator": false, + "NodeList": false, + "Notification": false, + "NotifyPaintEvent": false, + "NotRestoredReasonDetails": false, + "NotRestoredReasons": false, + "Observable": false, + "OfflineAudioCompletionEvent": false, + "OfflineAudioContext": false, + "offscreenBuffering": false, + "OffscreenCanvas": false, + "OffscreenCanvasRenderingContext2D": false, + "onabort": true, + "onafterprint": true, + "onanimationcancel": true, + "onanimationend": true, + "onanimationiteration": true, + "onanimationstart": true, + "onappinstalled": true, + "onauxclick": true, + "onbeforeinput": true, + "onbeforeinstallprompt": true, + "onbeforematch": true, + "onbeforeprint": true, + "onbeforetoggle": true, + "onbeforeunload": true, + "onbeforexrselect": true, + "onblur": true, + "oncancel": true, + "oncanplay": true, + "oncanplaythrough": true, + "onchange": true, + "onclick": true, + "onclose": true, + "oncommand": true, + "oncontentvisibilityautostatechange": true, + "oncontextlost": true, + "oncontextmenu": true, + "oncontextrestored": true, + "oncopy": true, + "oncuechange": true, + "oncut": true, + "ondblclick": true, + "ondevicemotion": true, + "ondeviceorientation": true, + "ondeviceorientationabsolute": true, + "ondrag": true, + "ondragend": true, + "ondragenter": true, + "ondragleave": true, + "ondragover": true, + "ondragstart": true, + "ondrop": true, + "ondurationchange": true, + "onemptied": true, + "onended": true, + "onerror": true, + "onfocus": true, + "onformdata": true, + "ongamepadconnected": true, + "ongamepaddisconnected": true, + "ongotpointercapture": true, + "onhashchange": true, + "oninput": true, + "oninvalid": true, + "onkeydown": true, + "onkeypress": true, + "onkeyup": true, + "onlanguagechange": true, + "onload": true, + "onloadeddata": true, + "onloadedmetadata": true, + "onloadstart": true, + "onlostpointercapture": true, + "onmessage": true, + "onmessageerror": true, + "onmousedown": true, + "onmouseenter": true, + "onmouseleave": true, + "onmousemove": true, + "onmouseout": true, + "onmouseover": true, + "onmouseup": true, + "onmousewheel": true, + "onoffline": true, + "ononline": true, + "onpagehide": true, + "onpagereveal": true, + "onpageshow": true, + "onpageswap": true, + "onpaste": true, + "onpause": true, + "onplay": true, + "onplaying": true, + "onpointercancel": true, + "onpointerdown": true, + "onpointerenter": true, + "onpointerleave": true, + "onpointermove": true, + "onpointerout": true, + "onpointerover": true, + "onpointerrawupdate": true, + "onpointerup": true, + "onpopstate": true, + "onprogress": true, + "onratechange": true, + "onrejectionhandled": true, + "onreset": true, + "onresize": true, + "onscroll": true, + "onscrollend": true, + "onscrollsnapchange": true, + "onscrollsnapchanging": true, + "onsearch": true, + "onsecuritypolicyviolation": true, + "onseeked": true, + "onseeking": true, + "onselect": true, + "onselectionchange": true, + "onselectstart": true, + "onslotchange": true, + "onstalled": true, + "onstorage": true, + "onsubmit": true, + "onsuspend": true, + "ontimeupdate": true, + "ontoggle": true, + "ontransitioncancel": true, + "ontransitionend": true, + "ontransitionrun": true, + "ontransitionstart": true, + "onunhandledrejection": true, + "onunload": true, + "onvolumechange": true, + "onwaiting": true, + "onwheel": true, + "open": false, + "opener": false, + "Option": false, + "OrientationSensor": false, + "origin": false, + "originAgentCluster": false, + "OscillatorNode": false, + "OTPCredential": false, + "outerHeight": false, + "outerWidth": false, + "OverconstrainedError": false, + "PageRevealEvent": false, + "PageSwapEvent": false, + "PageTransitionEvent": false, + "pageXOffset": false, + "pageYOffset": false, + "PannerNode": false, + "parent": false, + "PasswordCredential": false, + "Path2D": false, + "PaymentAddress": false, + "PaymentManager": false, + "PaymentMethodChangeEvent": false, + "PaymentRequest": false, + "PaymentRequestUpdateEvent": false, + "PaymentResponse": false, + "performance": false, + "Performance": false, + "PerformanceElementTiming": false, + "PerformanceEntry": false, + "PerformanceEventTiming": false, + "PerformanceLongAnimationFrameTiming": false, + "PerformanceLongTaskTiming": false, + "PerformanceMark": false, + "PerformanceMeasure": false, + "PerformanceNavigation": false, + "PerformanceNavigationTiming": false, + "PerformanceObserver": false, + "PerformanceObserverEntryList": false, + "PerformancePaintTiming": false, + "PerformanceResourceTiming": false, + "PerformanceScriptTiming": false, + "PerformanceServerTiming": false, + "PerformanceTiming": false, + "PeriodicSyncManager": false, + "PeriodicWave": false, + "Permissions": false, + "PermissionStatus": false, + "PERSISTENT": false, + "personalbar": false, + "PictureInPictureEvent": false, + "PictureInPictureWindow": false, + "Plugin": false, + "PluginArray": false, + "PointerEvent": false, + "PopStateEvent": false, + "postMessage": false, + "Presentation": false, + "PresentationAvailability": false, + "PresentationConnection": false, + "PresentationConnectionAvailableEvent": false, + "PresentationConnectionCloseEvent": false, + "PresentationConnectionList": false, + "PresentationReceiver": false, + "PresentationRequest": false, + "PressureObserver": false, + "PressureRecord": false, + "print": false, + "ProcessingInstruction": false, + "Profiler": false, + "ProgressEvent": false, + "PromiseRejectionEvent": false, + "prompt": false, + "ProtectedAudience": false, + "PublicKeyCredential": false, + "PushManager": false, + "PushSubscription": false, + "PushSubscriptionOptions": false, + "queryLocalFonts": false, + "queueMicrotask": false, + "QuotaExceededError": false, + "RadioNodeList": false, + "Range": false, + "ReadableByteStreamController": false, + "ReadableStream": false, + "ReadableStreamBYOBReader": false, + "ReadableStreamBYOBRequest": false, + "ReadableStreamDefaultController": false, + "ReadableStreamDefaultReader": false, + "registerProcessor": false, + "RelativeOrientationSensor": false, + "RemotePlayback": false, + "removeEventListener": false, + "ReportBody": false, + "reportError": false, + "ReportingObserver": false, + "Request": false, + "requestAnimationFrame": false, + "requestIdleCallback": false, + "resizeBy": false, + "ResizeObserver": false, + "ResizeObserverEntry": false, + "ResizeObserverSize": false, + "resizeTo": false, + "Response": false, + "RestrictionTarget": false, + "RTCCertificate": false, + "RTCDataChannel": false, + "RTCDataChannelEvent": false, + "RTCDtlsTransport": false, + "RTCDTMFSender": false, + "RTCDTMFToneChangeEvent": false, + "RTCEncodedAudioFrame": false, + "RTCEncodedVideoFrame": false, + "RTCError": false, + "RTCErrorEvent": false, + "RTCIceCandidate": false, + "RTCIceTransport": false, + "RTCPeerConnection": false, + "RTCPeerConnectionIceErrorEvent": false, + "RTCPeerConnectionIceEvent": false, + "RTCRtpReceiver": false, + "RTCRtpScriptTransform": false, + "RTCRtpSender": false, + "RTCRtpTransceiver": false, + "RTCSctpTransport": false, + "RTCSessionDescription": false, + "RTCStatsReport": false, + "RTCTrackEvent": false, + "sampleRate": false, + "scheduler": false, + "Scheduler": false, + "Scheduling": false, + "screen": false, + "Screen": false, + "ScreenDetailed": false, + "ScreenDetails": false, + "screenLeft": false, + "ScreenOrientation": false, + "screenTop": false, + "screenX": false, + "screenY": false, + "ScriptProcessorNode": false, + "scroll": false, + "scrollbars": false, + "scrollBy": false, + "ScrollTimeline": false, + "scrollTo": false, + "scrollX": false, + "scrollY": false, + "SecurityPolicyViolationEvent": false, + "Selection": false, + "self": false, + "Sensor": false, + "SensorErrorEvent": false, + "Serial": false, + "SerialPort": false, + "ServiceWorker": false, + "ServiceWorkerContainer": false, + "ServiceWorkerRegistration": false, + "sessionStorage": false, + "setInterval": false, + "setTimeout": false, + "ShadowRoot": false, + "sharedStorage": false, + "SharedStorage": false, + "SharedStorageAppendMethod": false, + "SharedStorageClearMethod": false, + "SharedStorageDeleteMethod": false, + "SharedStorageModifierMethod": false, + "SharedStorageSetMethod": false, + "SharedStorageWorklet": false, + "SharedWorker": false, + "showDirectoryPicker": false, + "showOpenFilePicker": false, + "showSaveFilePicker": false, + "SnapEvent": false, + "SourceBuffer": false, + "SourceBufferList": false, + "SpeechGrammar": false, + "SpeechGrammarList": false, + "SpeechRecognition": false, + "SpeechRecognitionErrorEvent": false, + "SpeechRecognitionEvent": false, + "SpeechRecognitionPhrase": false, + "speechSynthesis": false, + "SpeechSynthesis": false, + "SpeechSynthesisErrorEvent": false, + "SpeechSynthesisEvent": false, + "SpeechSynthesisUtterance": false, + "SpeechSynthesisVoice": false, + "StaticRange": false, + "status": false, + "statusbar": false, + "StereoPannerNode": false, + "stop": false, + "Storage": false, + "StorageBucket": false, + "StorageBucketManager": false, + "StorageEvent": false, + "StorageManager": false, + "structuredClone": false, + "styleMedia": false, + "StylePropertyMap": false, + "StylePropertyMapReadOnly": false, + "StyleSheet": false, + "StyleSheetList": false, + "SubmitEvent": false, + "Subscriber": false, + "SubtleCrypto": false, + "Summarizer": false, + "SuppressedError": false, + "SVGAElement": false, + "SVGAngle": false, + "SVGAnimatedAngle": false, + "SVGAnimatedBoolean": false, + "SVGAnimatedEnumeration": false, + "SVGAnimatedInteger": false, + "SVGAnimatedLength": false, + "SVGAnimatedLengthList": false, + "SVGAnimatedNumber": false, + "SVGAnimatedNumberList": false, + "SVGAnimatedPreserveAspectRatio": false, + "SVGAnimatedRect": false, + "SVGAnimatedString": false, + "SVGAnimatedTransformList": false, + "SVGAnimateElement": false, + "SVGAnimateMotionElement": false, + "SVGAnimateTransformElement": false, + "SVGAnimationElement": false, + "SVGCircleElement": false, + "SVGClipPathElement": false, + "SVGComponentTransferFunctionElement": false, + "SVGDefsElement": false, + "SVGDescElement": false, + "SVGElement": false, + "SVGEllipseElement": false, + "SVGFEBlendElement": false, + "SVGFEColorMatrixElement": false, + "SVGFEComponentTransferElement": false, + "SVGFECompositeElement": false, + "SVGFEConvolveMatrixElement": false, + "SVGFEDiffuseLightingElement": false, + "SVGFEDisplacementMapElement": false, + "SVGFEDistantLightElement": false, + "SVGFEDropShadowElement": false, + "SVGFEFloodElement": false, + "SVGFEFuncAElement": false, + "SVGFEFuncBElement": false, + "SVGFEFuncGElement": false, + "SVGFEFuncRElement": false, + "SVGFEGaussianBlurElement": false, + "SVGFEImageElement": false, + "SVGFEMergeElement": false, + "SVGFEMergeNodeElement": false, + "SVGFEMorphologyElement": false, + "SVGFEOffsetElement": false, + "SVGFEPointLightElement": false, + "SVGFESpecularLightingElement": false, + "SVGFESpotLightElement": false, + "SVGFETileElement": false, + "SVGFETurbulenceElement": false, + "SVGFilterElement": false, + "SVGForeignObjectElement": false, + "SVGGElement": false, + "SVGGeometryElement": false, + "SVGGradientElement": false, + "SVGGraphicsElement": false, + "SVGImageElement": false, + "SVGLength": false, + "SVGLengthList": false, + "SVGLinearGradientElement": false, + "SVGLineElement": false, + "SVGMarkerElement": false, + "SVGMaskElement": false, + "SVGMatrix": false, + "SVGMetadataElement": false, + "SVGMPathElement": false, + "SVGNumber": false, + "SVGNumberList": false, + "SVGPathElement": false, + "SVGPatternElement": false, + "SVGPoint": false, + "SVGPointList": false, + "SVGPolygonElement": false, + "SVGPolylineElement": false, + "SVGPreserveAspectRatio": false, + "SVGRadialGradientElement": false, + "SVGRect": false, + "SVGRectElement": false, + "SVGScriptElement": false, + "SVGSetElement": false, + "SVGStopElement": false, + "SVGStringList": false, + "SVGStyleElement": false, + "SVGSVGElement": false, + "SVGSwitchElement": false, + "SVGSymbolElement": false, + "SVGTextContentElement": false, + "SVGTextElement": false, + "SVGTextPathElement": false, + "SVGTextPositioningElement": false, + "SVGTitleElement": false, + "SVGTransform": false, + "SVGTransformList": false, + "SVGTSpanElement": false, + "SVGUnitTypes": false, + "SVGUseElement": false, + "SVGViewElement": false, + "SyncManager": false, + "TaskAttributionTiming": false, + "TaskController": false, + "TaskPriorityChangeEvent": false, + "TaskSignal": false, + "TEMPORARY": false, + "Text": false, + "TextDecoder": false, + "TextDecoderStream": false, + "TextEncoder": false, + "TextEncoderStream": false, + "TextEvent": false, + "TextFormat": false, + "TextFormatUpdateEvent": false, + "TextMetrics": false, + "TextTrack": false, + "TextTrackCue": false, + "TextTrackCueList": false, + "TextTrackList": false, + "TextUpdateEvent": false, + "TimeEvent": false, + "TimeRanges": false, + "ToggleEvent": false, + "toolbar": false, + "top": false, + "Touch": false, + "TouchEvent": false, + "TouchList": false, + "TrackEvent": false, + "TransformStream": false, + "TransformStreamDefaultController": false, + "TransitionEvent": false, + "Translator": false, + "TreeWalker": false, + "TrustedHTML": false, + "TrustedScript": false, + "TrustedScriptURL": false, + "TrustedTypePolicy": false, + "TrustedTypePolicyFactory": false, + "trustedTypes": false, + "UIEvent": false, + "URL": false, + "URLPattern": false, + "URLSearchParams": false, + "USB": false, + "USBAlternateInterface": false, + "USBConfiguration": false, + "USBConnectionEvent": false, + "USBDevice": false, + "USBEndpoint": false, + "USBInterface": false, + "USBInTransferResult": false, + "USBIsochronousInTransferPacket": false, + "USBIsochronousInTransferResult": false, + "USBIsochronousOutTransferPacket": false, + "USBIsochronousOutTransferResult": false, + "USBOutTransferResult": false, + "UserActivation": false, + "ValidityState": false, + "VideoColorSpace": false, + "VideoDecoder": false, + "VideoEncoder": false, + "VideoFrame": false, + "VideoPlaybackQuality": false, + "viewport": false, + "Viewport": false, + "ViewTimeline": false, + "ViewTransition": false, + "ViewTransitionTypeSet": false, + "VirtualKeyboard": false, + "VirtualKeyboardGeometryChangeEvent": false, + "VisibilityStateEntry": false, + "visualViewport": false, + "VisualViewport": false, + "VTTCue": false, + "VTTRegion": false, + "WakeLock": false, + "WakeLockSentinel": false, + "WaveShaperNode": false, + "WebAssembly": false, + "WebGL2RenderingContext": false, + "WebGLActiveInfo": false, + "WebGLBuffer": false, + "WebGLContextEvent": false, + "WebGLFramebuffer": false, + "WebGLObject": false, + "WebGLProgram": false, + "WebGLQuery": false, + "WebGLRenderbuffer": false, + "WebGLRenderingContext": false, + "WebGLSampler": false, + "WebGLShader": false, + "WebGLShaderPrecisionFormat": false, + "WebGLSync": false, + "WebGLTexture": false, + "WebGLTransformFeedback": false, + "WebGLUniformLocation": false, + "WebGLVertexArrayObject": false, + "WebSocket": false, + "WebSocketError": false, + "WebSocketStream": false, + "WebTransport": false, + "WebTransportBidirectionalStream": false, + "WebTransportDatagramDuplexStream": false, + "WebTransportError": false, + "WebTransportReceiveStream": false, + "WebTransportSendStream": false, + "WGSLLanguageFeatures": false, + "WheelEvent": false, + "when": false, + "window": false, + "Window": false, + "WindowControlsOverlay": false, + "WindowControlsOverlayGeometryChangeEvent": false, + "Worker": false, + "Worklet": false, + "WorkletGlobalScope": false, + "WritableStream": false, + "WritableStreamDefaultController": false, + "WritableStreamDefaultWriter": false, + "XMLDocument": false, + "XMLHttpRequest": false, + "XMLHttpRequestEventTarget": false, + "XMLHttpRequestUpload": false, + "XMLSerializer": false, + "XPathEvaluator": false, + "XPathExpression": false, + "XPathResult": false, + "XRAnchor": false, + "XRAnchorSet": false, + "XRBoundedReferenceSpace": false, + "XRCamera": false, + "XRCPUDepthInformation": false, + "XRDepthInformation": false, + "XRDOMOverlayState": false, + "XRFrame": false, + "XRHand": false, + "XRHitTestResult": false, + "XRHitTestSource": false, + "XRInputSource": false, + "XRInputSourceArray": false, + "XRInputSourceEvent": false, + "XRInputSourcesChangeEvent": false, + "XRJointPose": false, + "XRJointSpace": false, + "XRLayer": false, + "XRLightEstimate": false, + "XRLightProbe": false, + "XRPose": false, + "XRRay": false, + "XRReferenceSpace": false, + "XRReferenceSpaceEvent": false, + "XRRenderState": false, + "XRRigidTransform": false, + "XRSession": false, + "XRSessionEvent": false, + "XRSpace": false, + "XRSystem": false, + "XRTransientInputHitTestResult": false, + "XRTransientInputHitTestSource": false, + "XRView": false, + "XRViewerPose": false, + "XRViewport": false, + "XRWebGLBinding": false, + "XRWebGLDepthInformation": false, + "XRWebGLLayer": false, + "XSLTProcessor": false + } + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-undef', + message: "'Credential' is not defined.", + messageId: 'undef', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 0, + endLine: 1, + endColumn: 10, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-undef > valid + +```js +requestIdleCallback; +``` + +```json +{ + "languageOptions": { + "globals": { + "AbortController": false, + "AbortSignal": false, + "AbsoluteOrientationSensor": false, + "AbstractRange": false, + "Accelerometer": false, + "addEventListener": false, + "ai": false, + "AI": false, + "AICreateMonitor": false, + "AITextSession": false, + "alert": false, + "AnalyserNode": false, + "Animation": false, + "AnimationEffect": false, + "AnimationEvent": false, + "AnimationPlaybackEvent": false, + "AnimationTimeline": false, + "AsyncDisposableStack": false, + "atob": false, + "Attr": false, + "Audio": false, + "AudioBuffer": false, + "AudioBufferSourceNode": false, + "AudioContext": false, + "AudioData": false, + "AudioDecoder": false, + "AudioDestinationNode": false, + "AudioEncoder": false, + "AudioListener": false, + "AudioNode": false, + "AudioParam": false, + "AudioParamMap": false, + "AudioProcessingEvent": false, + "AudioScheduledSourceNode": false, + "AudioSinkInfo": false, + "AudioWorklet": false, + "AudioWorkletGlobalScope": false, + "AudioWorkletNode": false, + "AudioWorkletProcessor": false, + "AuthenticatorAssertionResponse": false, + "AuthenticatorAttestationResponse": false, + "AuthenticatorResponse": false, + "BackgroundFetchManager": false, + "BackgroundFetchRecord": false, + "BackgroundFetchRegistration": false, + "BarcodeDetector": false, + "BarProp": false, + "BaseAudioContext": false, + "BatteryManager": false, + "BeforeUnloadEvent": false, + "BiquadFilterNode": false, + "Blob": false, + "BlobEvent": false, + "Bluetooth": false, + "BluetoothCharacteristicProperties": false, + "BluetoothDevice": false, + "BluetoothRemoteGATTCharacteristic": false, + "BluetoothRemoteGATTDescriptor": false, + "BluetoothRemoteGATTServer": false, + "BluetoothRemoteGATTService": false, + "BluetoothUUID": false, + "blur": false, + "BroadcastChannel": false, + "BrowserCaptureMediaStreamTrack": false, + "btoa": false, + "ByteLengthQueuingStrategy": false, + "Cache": false, + "caches": false, + "CacheStorage": false, + "cancelAnimationFrame": false, + "cancelIdleCallback": false, + "CanvasCaptureMediaStream": false, + "CanvasCaptureMediaStreamTrack": false, + "CanvasGradient": false, + "CanvasPattern": false, + "CanvasRenderingContext2D": false, + "CaptureController": false, + "CaretPosition": false, + "CDATASection": false, + "ChannelMergerNode": false, + "ChannelSplitterNode": false, + "ChapterInformation": false, + "CharacterBoundsUpdateEvent": false, + "CharacterData": false, + "clearInterval": false, + "clearTimeout": false, + "clientInformation": false, + "Clipboard": false, + "ClipboardChangeEvent": false, + "ClipboardEvent": false, + "ClipboardItem": false, + "close": false, + "closed": false, + "CloseEvent": false, + "CloseWatcher": false, + "CommandEvent": false, + "Comment": false, + "CompositionEvent": false, + "CompressionStream": false, + "confirm": false, + "console": false, + "ConstantSourceNode": false, + "ContentVisibilityAutoStateChangeEvent": false, + "ConvolverNode": false, + "CookieChangeEvent": false, + "CookieDeprecationLabel": false, + "cookieStore": false, + "CookieStore": false, + "CookieStoreManager": false, + "CountQueuingStrategy": false, + "createImageBitmap": false, + "CreateMonitor": false, + "Credential": false, + "credentialless": false, + "CredentialsContainer": false, + "CropTarget": false, + "crossOriginIsolated": false, + "crypto": false, + "Crypto": false, + "CryptoKey": false, + "CSPViolationReportBody": false, + "CSS": false, + "CSSAnimation": false, + "CSSConditionRule": false, + "CSSContainerRule": false, + "CSSCounterStyleRule": false, + "CSSFontFaceRule": false, + "CSSFontFeatureValuesRule": false, + "CSSFontPaletteValuesRule": false, + "CSSFunctionDeclarations": false, + "CSSFunctionDescriptors": false, + "CSSFunctionRule": false, + "CSSGroupingRule": false, + "CSSImageValue": false, + "CSSImportRule": false, + "CSSKeyframeRule": false, + "CSSKeyframesRule": false, + "CSSKeywordValue": false, + "CSSLayerBlockRule": false, + "CSSLayerStatementRule": false, + "CSSMarginRule": false, + "CSSMathClamp": false, + "CSSMathInvert": false, + "CSSMathMax": false, + "CSSMathMin": false, + "CSSMathNegate": false, + "CSSMathProduct": false, + "CSSMathSum": false, + "CSSMathValue": false, + "CSSMatrixComponent": false, + "CSSMediaRule": false, + "CSSNamespaceRule": false, + "CSSNestedDeclarations": false, + "CSSNumericArray": false, + "CSSNumericValue": false, + "CSSPageDescriptors": false, + "CSSPageRule": false, + "CSSPerspective": false, + "CSSPositionTryDescriptors": false, + "CSSPositionTryRule": false, + "CSSPositionValue": false, + "CSSPropertyRule": false, + "CSSRotate": false, + "CSSRule": false, + "CSSRuleList": false, + "CSSScale": false, + "CSSScopeRule": false, + "CSSSkew": false, + "CSSSkewX": false, + "CSSSkewY": false, + "CSSStartingStyleRule": false, + "CSSStyleDeclaration": false, + "CSSStyleRule": false, + "CSSStyleSheet": false, + "CSSStyleValue": false, + "CSSSupportsRule": false, + "CSSTransformComponent": false, + "CSSTransformValue": false, + "CSSTransition": false, + "CSSTranslate": false, + "CSSUnitValue": false, + "CSSUnparsedValue": false, + "CSSVariableReferenceValue": false, + "CSSViewTransitionRule": false, + "currentFrame": false, + "currentTime": false, + "CustomElementRegistry": false, + "customElements": false, + "CustomEvent": false, + "CustomStateSet": false, + "DataTransfer": false, + "DataTransferItem": false, + "DataTransferItemList": false, + "DecompressionStream": false, + "DelayNode": false, + "DelegatedInkTrailPresenter": false, + "DeviceMotionEvent": false, + "DeviceMotionEventAcceleration": false, + "DeviceMotionEventRotationRate": false, + "DeviceOrientationEvent": false, + "devicePixelRatio": false, + "DevicePosture": false, + "DigitalCredential": false, + "dispatchEvent": false, + "DisposableStack": false, + "document": false, + "Document": false, + "DocumentFragment": false, + "documentPictureInPicture": false, + "DocumentPictureInPicture": false, + "DocumentPictureInPictureEvent": false, + "DocumentTimeline": false, + "DocumentType": false, + "DOMError": false, + "DOMException": false, + "DOMImplementation": false, + "DOMMatrix": false, + "DOMMatrixReadOnly": false, + "DOMParser": false, + "DOMPoint": false, + "DOMPointReadOnly": false, + "DOMQuad": false, + "DOMRect": false, + "DOMRectList": false, + "DOMRectReadOnly": false, + "DOMStringList": false, + "DOMStringMap": false, + "DOMTokenList": false, + "DragEvent": false, + "DynamicsCompressorNode": false, + "EditContext": false, + "Element": false, + "ElementInternals": false, + "EncodedAudioChunk": false, + "EncodedVideoChunk": false, + "ErrorEvent": false, + "event": false, + "Event": false, + "EventCounts": false, + "EventSource": false, + "EventTarget": false, + "external": false, + "External": false, + "EyeDropper": false, + "FeaturePolicy": false, + "FederatedCredential": false, + "fence": false, + "Fence": false, + "FencedFrameConfig": false, + "fetch": false, + "fetchLater": false, + "FetchLaterResult": false, + "File": false, + "FileList": false, + "FileReader": false, + "FileSystem": false, + "FileSystemDirectoryEntry": false, + "FileSystemDirectoryHandle": false, + "FileSystemDirectoryReader": false, + "FileSystemEntry": false, + "FileSystemFileEntry": false, + "FileSystemFileHandle": false, + "FileSystemHandle": false, + "FileSystemObserver": false, + "FileSystemWritableFileStream": false, + "find": false, + "focus": false, + "FocusEvent": false, + "FontData": false, + "FontFace": false, + "FontFaceSet": false, + "FontFaceSetLoadEvent": false, + "FormData": false, + "FormDataEvent": false, + "FragmentDirective": false, + "frameElement": false, + "frames": false, + "GainNode": false, + "Gamepad": false, + "GamepadAxisMoveEvent": false, + "GamepadButton": false, + "GamepadButtonEvent": false, + "GamepadEvent": false, + "GamepadHapticActuator": false, + "GamepadPose": false, + "Geolocation": false, + "GeolocationCoordinates": false, + "GeolocationPosition": false, + "GeolocationPositionError": false, + "getComputedStyle": false, + "getScreenDetails": false, + "getSelection": false, + "GPU": false, + "GPUAdapter": false, + "GPUAdapterInfo": false, + "GPUBindGroup": false, + "GPUBindGroupLayout": false, + "GPUBuffer": false, + "GPUBufferUsage": false, + "GPUCanvasContext": false, + "GPUColorWrite": false, + "GPUCommandBuffer": false, + "GPUCommandEncoder": false, + "GPUCompilationInfo": false, + "GPUCompilationMessage": false, + "GPUComputePassEncoder": false, + "GPUComputePipeline": false, + "GPUDevice": false, + "GPUDeviceLostInfo": false, + "GPUError": false, + "GPUExternalTexture": false, + "GPUInternalError": false, + "GPUMapMode": false, + "GPUOutOfMemoryError": false, + "GPUPipelineError": false, + "GPUPipelineLayout": false, + "GPUQuerySet": false, + "GPUQueue": false, + "GPURenderBundle": false, + "GPURenderBundleEncoder": false, + "GPURenderPassEncoder": false, + "GPURenderPipeline": false, + "GPUSampler": false, + "GPUShaderModule": false, + "GPUShaderStage": false, + "GPUSupportedFeatures": false, + "GPUSupportedLimits": false, + "GPUTexture": false, + "GPUTextureUsage": false, + "GPUTextureView": false, + "GPUUncapturedErrorEvent": false, + "GPUValidationError": false, + "GravitySensor": false, + "Gyroscope": false, + "HashChangeEvent": false, + "Headers": false, + "HID": false, + "HIDConnectionEvent": false, + "HIDDevice": false, + "HIDInputReportEvent": false, + "Highlight": false, + "HighlightRegistry": false, + "history": false, + "History": false, + "HTMLAllCollection": false, + "HTMLAnchorElement": false, + "HTMLAreaElement": false, + "HTMLAudioElement": false, + "HTMLBaseElement": false, + "HTMLBodyElement": false, + "HTMLBRElement": false, + "HTMLButtonElement": false, + "HTMLCanvasElement": false, + "HTMLCollection": false, + "HTMLDataElement": false, + "HTMLDataListElement": false, + "HTMLDetailsElement": false, + "HTMLDialogElement": false, + "HTMLDirectoryElement": false, + "HTMLDivElement": false, + "HTMLDListElement": false, + "HTMLDocument": false, + "HTMLElement": false, + "HTMLEmbedElement": false, + "HTMLFencedFrameElement": false, + "HTMLFieldSetElement": false, + "HTMLFontElement": false, + "HTMLFormControlsCollection": false, + "HTMLFormElement": false, + "HTMLFrameElement": false, + "HTMLFrameSetElement": false, + "HTMLHeadElement": false, + "HTMLHeadingElement": false, + "HTMLHRElement": false, + "HTMLHtmlElement": false, + "HTMLIFrameElement": false, + "HTMLImageElement": false, + "HTMLInputElement": false, + "HTMLLabelElement": false, + "HTMLLegendElement": false, + "HTMLLIElement": false, + "HTMLLinkElement": false, + "HTMLMapElement": false, + "HTMLMarqueeElement": false, + "HTMLMediaElement": false, + "HTMLMenuElement": false, + "HTMLMetaElement": false, + "HTMLMeterElement": false, + "HTMLModElement": false, + "HTMLObjectElement": false, + "HTMLOListElement": false, + "HTMLOptGroupElement": false, + "HTMLOptionElement": false, + "HTMLOptionsCollection": false, + "HTMLOutputElement": false, + "HTMLParagraphElement": false, + "HTMLParamElement": false, + "HTMLPictureElement": false, + "HTMLPreElement": false, + "HTMLProgressElement": false, + "HTMLQuoteElement": false, + "HTMLScriptElement": false, + "HTMLSelectedContentElement": false, + "HTMLSelectElement": false, + "HTMLSlotElement": false, + "HTMLSourceElement": false, + "HTMLSpanElement": false, + "HTMLStyleElement": false, + "HTMLTableCaptionElement": false, + "HTMLTableCellElement": false, + "HTMLTableColElement": false, + "HTMLTableElement": false, + "HTMLTableRowElement": false, + "HTMLTableSectionElement": false, + "HTMLTemplateElement": false, + "HTMLTextAreaElement": false, + "HTMLTimeElement": false, + "HTMLTitleElement": false, + "HTMLTrackElement": false, + "HTMLUListElement": false, + "HTMLUnknownElement": false, + "HTMLVideoElement": false, + "IDBCursor": false, + "IDBCursorWithValue": false, + "IDBDatabase": false, + "IDBFactory": false, + "IDBIndex": false, + "IDBKeyRange": false, + "IDBObjectStore": false, + "IDBOpenDBRequest": false, + "IDBRecord": false, + "IDBRequest": false, + "IDBTransaction": false, + "IDBVersionChangeEvent": false, + "IdentityCredential": false, + "IdentityCredentialError": false, + "IdentityProvider": false, + "IdleDeadline": false, + "IdleDetector": false, + "IIRFilterNode": false, + "Image": false, + "ImageBitmap": false, + "ImageBitmapRenderingContext": false, + "ImageCapture": false, + "ImageData": false, + "ImageDecoder": false, + "ImageTrack": false, + "ImageTrackList": false, + "indexedDB": false, + "Ink": false, + "innerHeight": false, + "innerWidth": false, + "InputDeviceCapabilities": false, + "InputDeviceInfo": false, + "InputEvent": false, + "IntegrityViolationReportBody": false, + "InterestEvent": false, + "IntersectionObserver": false, + "IntersectionObserverEntry": false, + "isSecureContext": false, + "Keyboard": false, + "KeyboardEvent": false, + "KeyboardLayoutMap": false, + "KeyframeEffect": false, + "LanguageDetector": false, + "LargestContentfulPaint": false, + "LaunchParams": false, + "launchQueue": false, + "LaunchQueue": false, + "LayoutShift": false, + "LayoutShiftAttribution": false, + "length": false, + "LinearAccelerationSensor": false, + "localStorage": false, + "location": true, + "Location": false, + "locationbar": false, + "Lock": false, + "LockManager": false, + "matchMedia": false, + "MathMLElement": false, + "MediaCapabilities": false, + "MediaCapabilitiesInfo": false, + "MediaDeviceInfo": false, + "MediaDevices": false, + "MediaElementAudioSourceNode": false, + "MediaEncryptedEvent": false, + "MediaError": false, + "MediaKeyError": false, + "MediaKeyMessageEvent": false, + "MediaKeys": false, + "MediaKeySession": false, + "MediaKeyStatusMap": false, + "MediaKeySystemAccess": false, + "MediaList": false, + "MediaMetadata": false, + "MediaQueryList": false, + "MediaQueryListEvent": false, + "MediaRecorder": false, + "MediaRecorderErrorEvent": false, + "MediaSession": false, + "MediaSource": false, + "MediaSourceHandle": false, + "MediaStream": false, + "MediaStreamAudioDestinationNode": false, + "MediaStreamAudioSourceNode": false, + "MediaStreamEvent": false, + "MediaStreamTrack": false, + "MediaStreamTrackAudioSourceNode": false, + "MediaStreamTrackAudioStats": false, + "MediaStreamTrackEvent": false, + "MediaStreamTrackGenerator": false, + "MediaStreamTrackProcessor": false, + "MediaStreamTrackVideoStats": false, + "menubar": false, + "MessageChannel": false, + "MessageEvent": false, + "MessagePort": false, + "MIDIAccess": false, + "MIDIConnectionEvent": false, + "MIDIInput": false, + "MIDIInputMap": false, + "MIDIMessageEvent": false, + "MIDIOutput": false, + "MIDIOutputMap": false, + "MIDIPort": false, + "MimeType": false, + "MimeTypeArray": false, + "model": false, + "ModelGenericSession": false, + "ModelManager": false, + "MouseEvent": false, + "moveBy": false, + "moveTo": false, + "MutationEvent": false, + "MutationObserver": false, + "MutationRecord": false, + "name": false, + "NamedNodeMap": false, + "NavigateEvent": false, + "navigation": false, + "Navigation": false, + "NavigationActivation": false, + "NavigationCurrentEntryChangeEvent": false, + "NavigationDestination": false, + "NavigationHistoryEntry": false, + "NavigationPrecommitController": false, + "NavigationPreloadManager": false, + "NavigationTransition": false, + "navigator": false, + "Navigator": false, + "NavigatorLogin": false, + "NavigatorManagedData": false, + "NavigatorUAData": false, + "NetworkInformation": false, + "Node": false, + "NodeFilter": false, + "NodeIterator": false, + "NodeList": false, + "Notification": false, + "NotifyPaintEvent": false, + "NotRestoredReasonDetails": false, + "NotRestoredReasons": false, + "Observable": false, + "OfflineAudioCompletionEvent": false, + "OfflineAudioContext": false, + "offscreenBuffering": false, + "OffscreenCanvas": false, + "OffscreenCanvasRenderingContext2D": false, + "onabort": true, + "onafterprint": true, + "onanimationcancel": true, + "onanimationend": true, + "onanimationiteration": true, + "onanimationstart": true, + "onappinstalled": true, + "onauxclick": true, + "onbeforeinput": true, + "onbeforeinstallprompt": true, + "onbeforematch": true, + "onbeforeprint": true, + "onbeforetoggle": true, + "onbeforeunload": true, + "onbeforexrselect": true, + "onblur": true, + "oncancel": true, + "oncanplay": true, + "oncanplaythrough": true, + "onchange": true, + "onclick": true, + "onclose": true, + "oncommand": true, + "oncontentvisibilityautostatechange": true, + "oncontextlost": true, + "oncontextmenu": true, + "oncontextrestored": true, + "oncopy": true, + "oncuechange": true, + "oncut": true, + "ondblclick": true, + "ondevicemotion": true, + "ondeviceorientation": true, + "ondeviceorientationabsolute": true, + "ondrag": true, + "ondragend": true, + "ondragenter": true, + "ondragleave": true, + "ondragover": true, + "ondragstart": true, + "ondrop": true, + "ondurationchange": true, + "onemptied": true, + "onended": true, + "onerror": true, + "onfocus": true, + "onformdata": true, + "ongamepadconnected": true, + "ongamepaddisconnected": true, + "ongotpointercapture": true, + "onhashchange": true, + "oninput": true, + "oninvalid": true, + "onkeydown": true, + "onkeypress": true, + "onkeyup": true, + "onlanguagechange": true, + "onload": true, + "onloadeddata": true, + "onloadedmetadata": true, + "onloadstart": true, + "onlostpointercapture": true, + "onmessage": true, + "onmessageerror": true, + "onmousedown": true, + "onmouseenter": true, + "onmouseleave": true, + "onmousemove": true, + "onmouseout": true, + "onmouseover": true, + "onmouseup": true, + "onmousewheel": true, + "onoffline": true, + "ononline": true, + "onpagehide": true, + "onpagereveal": true, + "onpageshow": true, + "onpageswap": true, + "onpaste": true, + "onpause": true, + "onplay": true, + "onplaying": true, + "onpointercancel": true, + "onpointerdown": true, + "onpointerenter": true, + "onpointerleave": true, + "onpointermove": true, + "onpointerout": true, + "onpointerover": true, + "onpointerrawupdate": true, + "onpointerup": true, + "onpopstate": true, + "onprogress": true, + "onratechange": true, + "onrejectionhandled": true, + "onreset": true, + "onresize": true, + "onscroll": true, + "onscrollend": true, + "onscrollsnapchange": true, + "onscrollsnapchanging": true, + "onsearch": true, + "onsecuritypolicyviolation": true, + "onseeked": true, + "onseeking": true, + "onselect": true, + "onselectionchange": true, + "onselectstart": true, + "onslotchange": true, + "onstalled": true, + "onstorage": true, + "onsubmit": true, + "onsuspend": true, + "ontimeupdate": true, + "ontoggle": true, + "ontransitioncancel": true, + "ontransitionend": true, + "ontransitionrun": true, + "ontransitionstart": true, + "onunhandledrejection": true, + "onunload": true, + "onvolumechange": true, + "onwaiting": true, + "onwheel": true, + "open": false, + "opener": false, + "Option": false, + "OrientationSensor": false, + "origin": false, + "originAgentCluster": false, + "OscillatorNode": false, + "OTPCredential": false, + "outerHeight": false, + "outerWidth": false, + "OverconstrainedError": false, + "PageRevealEvent": false, + "PageSwapEvent": false, + "PageTransitionEvent": false, + "pageXOffset": false, + "pageYOffset": false, + "PannerNode": false, + "parent": false, + "PasswordCredential": false, + "Path2D": false, + "PaymentAddress": false, + "PaymentManager": false, + "PaymentMethodChangeEvent": false, + "PaymentRequest": false, + "PaymentRequestUpdateEvent": false, + "PaymentResponse": false, + "performance": false, + "Performance": false, + "PerformanceElementTiming": false, + "PerformanceEntry": false, + "PerformanceEventTiming": false, + "PerformanceLongAnimationFrameTiming": false, + "PerformanceLongTaskTiming": false, + "PerformanceMark": false, + "PerformanceMeasure": false, + "PerformanceNavigation": false, + "PerformanceNavigationTiming": false, + "PerformanceObserver": false, + "PerformanceObserverEntryList": false, + "PerformancePaintTiming": false, + "PerformanceResourceTiming": false, + "PerformanceScriptTiming": false, + "PerformanceServerTiming": false, + "PerformanceTiming": false, + "PeriodicSyncManager": false, + "PeriodicWave": false, + "Permissions": false, + "PermissionStatus": false, + "PERSISTENT": false, + "personalbar": false, + "PictureInPictureEvent": false, + "PictureInPictureWindow": false, + "Plugin": false, + "PluginArray": false, + "PointerEvent": false, + "PopStateEvent": false, + "postMessage": false, + "Presentation": false, + "PresentationAvailability": false, + "PresentationConnection": false, + "PresentationConnectionAvailableEvent": false, + "PresentationConnectionCloseEvent": false, + "PresentationConnectionList": false, + "PresentationReceiver": false, + "PresentationRequest": false, + "PressureObserver": false, + "PressureRecord": false, + "print": false, + "ProcessingInstruction": false, + "Profiler": false, + "ProgressEvent": false, + "PromiseRejectionEvent": false, + "prompt": false, + "ProtectedAudience": false, + "PublicKeyCredential": false, + "PushManager": false, + "PushSubscription": false, + "PushSubscriptionOptions": false, + "queryLocalFonts": false, + "queueMicrotask": false, + "QuotaExceededError": false, + "RadioNodeList": false, + "Range": false, + "ReadableByteStreamController": false, + "ReadableStream": false, + "ReadableStreamBYOBReader": false, + "ReadableStreamBYOBRequest": false, + "ReadableStreamDefaultController": false, + "ReadableStreamDefaultReader": false, + "registerProcessor": false, + "RelativeOrientationSensor": false, + "RemotePlayback": false, + "removeEventListener": false, + "ReportBody": false, + "reportError": false, + "ReportingObserver": false, + "Request": false, + "requestAnimationFrame": false, + "requestIdleCallback": false, + "resizeBy": false, + "ResizeObserver": false, + "ResizeObserverEntry": false, + "ResizeObserverSize": false, + "resizeTo": false, + "Response": false, + "RestrictionTarget": false, + "RTCCertificate": false, + "RTCDataChannel": false, + "RTCDataChannelEvent": false, + "RTCDtlsTransport": false, + "RTCDTMFSender": false, + "RTCDTMFToneChangeEvent": false, + "RTCEncodedAudioFrame": false, + "RTCEncodedVideoFrame": false, + "RTCError": false, + "RTCErrorEvent": false, + "RTCIceCandidate": false, + "RTCIceTransport": false, + "RTCPeerConnection": false, + "RTCPeerConnectionIceErrorEvent": false, + "RTCPeerConnectionIceEvent": false, + "RTCRtpReceiver": false, + "RTCRtpScriptTransform": false, + "RTCRtpSender": false, + "RTCRtpTransceiver": false, + "RTCSctpTransport": false, + "RTCSessionDescription": false, + "RTCStatsReport": false, + "RTCTrackEvent": false, + "sampleRate": false, + "scheduler": false, + "Scheduler": false, + "Scheduling": false, + "screen": false, + "Screen": false, + "ScreenDetailed": false, + "ScreenDetails": false, + "screenLeft": false, + "ScreenOrientation": false, + "screenTop": false, + "screenX": false, + "screenY": false, + "ScriptProcessorNode": false, + "scroll": false, + "scrollbars": false, + "scrollBy": false, + "ScrollTimeline": false, + "scrollTo": false, + "scrollX": false, + "scrollY": false, + "SecurityPolicyViolationEvent": false, + "Selection": false, + "self": false, + "Sensor": false, + "SensorErrorEvent": false, + "Serial": false, + "SerialPort": false, + "ServiceWorker": false, + "ServiceWorkerContainer": false, + "ServiceWorkerRegistration": false, + "sessionStorage": false, + "setInterval": false, + "setTimeout": false, + "ShadowRoot": false, + "sharedStorage": false, + "SharedStorage": false, + "SharedStorageAppendMethod": false, + "SharedStorageClearMethod": false, + "SharedStorageDeleteMethod": false, + "SharedStorageModifierMethod": false, + "SharedStorageSetMethod": false, + "SharedStorageWorklet": false, + "SharedWorker": false, + "showDirectoryPicker": false, + "showOpenFilePicker": false, + "showSaveFilePicker": false, + "SnapEvent": false, + "SourceBuffer": false, + "SourceBufferList": false, + "SpeechGrammar": false, + "SpeechGrammarList": false, + "SpeechRecognition": false, + "SpeechRecognitionErrorEvent": false, + "SpeechRecognitionEvent": false, + "SpeechRecognitionPhrase": false, + "speechSynthesis": false, + "SpeechSynthesis": false, + "SpeechSynthesisErrorEvent": false, + "SpeechSynthesisEvent": false, + "SpeechSynthesisUtterance": false, + "SpeechSynthesisVoice": false, + "StaticRange": false, + "status": false, + "statusbar": false, + "StereoPannerNode": false, + "stop": false, + "Storage": false, + "StorageBucket": false, + "StorageBucketManager": false, + "StorageEvent": false, + "StorageManager": false, + "structuredClone": false, + "styleMedia": false, + "StylePropertyMap": false, + "StylePropertyMapReadOnly": false, + "StyleSheet": false, + "StyleSheetList": false, + "SubmitEvent": false, + "Subscriber": false, + "SubtleCrypto": false, + "Summarizer": false, + "SuppressedError": false, + "SVGAElement": false, + "SVGAngle": false, + "SVGAnimatedAngle": false, + "SVGAnimatedBoolean": false, + "SVGAnimatedEnumeration": false, + "SVGAnimatedInteger": false, + "SVGAnimatedLength": false, + "SVGAnimatedLengthList": false, + "SVGAnimatedNumber": false, + "SVGAnimatedNumberList": false, + "SVGAnimatedPreserveAspectRatio": false, + "SVGAnimatedRect": false, + "SVGAnimatedString": false, + "SVGAnimatedTransformList": false, + "SVGAnimateElement": false, + "SVGAnimateMotionElement": false, + "SVGAnimateTransformElement": false, + "SVGAnimationElement": false, + "SVGCircleElement": false, + "SVGClipPathElement": false, + "SVGComponentTransferFunctionElement": false, + "SVGDefsElement": false, + "SVGDescElement": false, + "SVGElement": false, + "SVGEllipseElement": false, + "SVGFEBlendElement": false, + "SVGFEColorMatrixElement": false, + "SVGFEComponentTransferElement": false, + "SVGFECompositeElement": false, + "SVGFEConvolveMatrixElement": false, + "SVGFEDiffuseLightingElement": false, + "SVGFEDisplacementMapElement": false, + "SVGFEDistantLightElement": false, + "SVGFEDropShadowElement": false, + "SVGFEFloodElement": false, + "SVGFEFuncAElement": false, + "SVGFEFuncBElement": false, + "SVGFEFuncGElement": false, + "SVGFEFuncRElement": false, + "SVGFEGaussianBlurElement": false, + "SVGFEImageElement": false, + "SVGFEMergeElement": false, + "SVGFEMergeNodeElement": false, + "SVGFEMorphologyElement": false, + "SVGFEOffsetElement": false, + "SVGFEPointLightElement": false, + "SVGFESpecularLightingElement": false, + "SVGFESpotLightElement": false, + "SVGFETileElement": false, + "SVGFETurbulenceElement": false, + "SVGFilterElement": false, + "SVGForeignObjectElement": false, + "SVGGElement": false, + "SVGGeometryElement": false, + "SVGGradientElement": false, + "SVGGraphicsElement": false, + "SVGImageElement": false, + "SVGLength": false, + "SVGLengthList": false, + "SVGLinearGradientElement": false, + "SVGLineElement": false, + "SVGMarkerElement": false, + "SVGMaskElement": false, + "SVGMatrix": false, + "SVGMetadataElement": false, + "SVGMPathElement": false, + "SVGNumber": false, + "SVGNumberList": false, + "SVGPathElement": false, + "SVGPatternElement": false, + "SVGPoint": false, + "SVGPointList": false, + "SVGPolygonElement": false, + "SVGPolylineElement": false, + "SVGPreserveAspectRatio": false, + "SVGRadialGradientElement": false, + "SVGRect": false, + "SVGRectElement": false, + "SVGScriptElement": false, + "SVGSetElement": false, + "SVGStopElement": false, + "SVGStringList": false, + "SVGStyleElement": false, + "SVGSVGElement": false, + "SVGSwitchElement": false, + "SVGSymbolElement": false, + "SVGTextContentElement": false, + "SVGTextElement": false, + "SVGTextPathElement": false, + "SVGTextPositioningElement": false, + "SVGTitleElement": false, + "SVGTransform": false, + "SVGTransformList": false, + "SVGTSpanElement": false, + "SVGUnitTypes": false, + "SVGUseElement": false, + "SVGViewElement": false, + "SyncManager": false, + "TaskAttributionTiming": false, + "TaskController": false, + "TaskPriorityChangeEvent": false, + "TaskSignal": false, + "TEMPORARY": false, + "Text": false, + "TextDecoder": false, + "TextDecoderStream": false, + "TextEncoder": false, + "TextEncoderStream": false, + "TextEvent": false, + "TextFormat": false, + "TextFormatUpdateEvent": false, + "TextMetrics": false, + "TextTrack": false, + "TextTrackCue": false, + "TextTrackCueList": false, + "TextTrackList": false, + "TextUpdateEvent": false, + "TimeEvent": false, + "TimeRanges": false, + "ToggleEvent": false, + "toolbar": false, + "top": false, + "Touch": false, + "TouchEvent": false, + "TouchList": false, + "TrackEvent": false, + "TransformStream": false, + "TransformStreamDefaultController": false, + "TransitionEvent": false, + "Translator": false, + "TreeWalker": false, + "TrustedHTML": false, + "TrustedScript": false, + "TrustedScriptURL": false, + "TrustedTypePolicy": false, + "TrustedTypePolicyFactory": false, + "trustedTypes": false, + "UIEvent": false, + "URL": false, + "URLPattern": false, + "URLSearchParams": false, + "USB": false, + "USBAlternateInterface": false, + "USBConfiguration": false, + "USBConnectionEvent": false, + "USBDevice": false, + "USBEndpoint": false, + "USBInterface": false, + "USBInTransferResult": false, + "USBIsochronousInTransferPacket": false, + "USBIsochronousInTransferResult": false, + "USBIsochronousOutTransferPacket": false, + "USBIsochronousOutTransferResult": false, + "USBOutTransferResult": false, + "UserActivation": false, + "ValidityState": false, + "VideoColorSpace": false, + "VideoDecoder": false, + "VideoEncoder": false, + "VideoFrame": false, + "VideoPlaybackQuality": false, + "viewport": false, + "Viewport": false, + "ViewTimeline": false, + "ViewTransition": false, + "ViewTransitionTypeSet": false, + "VirtualKeyboard": false, + "VirtualKeyboardGeometryChangeEvent": false, + "VisibilityStateEntry": false, + "visualViewport": false, + "VisualViewport": false, + "VTTCue": false, + "VTTRegion": false, + "WakeLock": false, + "WakeLockSentinel": false, + "WaveShaperNode": false, + "WebAssembly": false, + "WebGL2RenderingContext": false, + "WebGLActiveInfo": false, + "WebGLBuffer": false, + "WebGLContextEvent": false, + "WebGLFramebuffer": false, + "WebGLObject": false, + "WebGLProgram": false, + "WebGLQuery": false, + "WebGLRenderbuffer": false, + "WebGLRenderingContext": false, + "WebGLSampler": false, + "WebGLShader": false, + "WebGLShaderPrecisionFormat": false, + "WebGLSync": false, + "WebGLTexture": false, + "WebGLTransformFeedback": false, + "WebGLUniformLocation": false, + "WebGLVertexArrayObject": false, + "WebSocket": false, + "WebSocketError": false, + "WebSocketStream": false, + "WebTransport": false, + "WebTransportBidirectionalStream": false, + "WebTransportDatagramDuplexStream": false, + "WebTransportError": false, + "WebTransportReceiveStream": false, + "WebTransportSendStream": false, + "WGSLLanguageFeatures": false, + "WheelEvent": false, + "when": false, + "window": false, + "Window": false, + "WindowControlsOverlay": false, + "WindowControlsOverlayGeometryChangeEvent": false, + "Worker": false, + "Worklet": false, + "WorkletGlobalScope": false, + "WritableStream": false, + "WritableStreamDefaultController": false, + "WritableStreamDefaultWriter": false, + "XMLDocument": false, + "XMLHttpRequest": false, + "XMLHttpRequestEventTarget": false, + "XMLHttpRequestUpload": false, + "XMLSerializer": false, + "XPathEvaluator": false, + "XPathExpression": false, + "XPathResult": false, + "XRAnchor": false, + "XRAnchorSet": false, + "XRBoundedReferenceSpace": false, + "XRCamera": false, + "XRCPUDepthInformation": false, + "XRDepthInformation": false, + "XRDOMOverlayState": false, + "XRFrame": false, + "XRHand": false, + "XRHitTestResult": false, + "XRHitTestSource": false, + "XRInputSource": false, + "XRInputSourceArray": false, + "XRInputSourceEvent": false, + "XRInputSourcesChangeEvent": false, + "XRJointPose": false, + "XRJointSpace": false, + "XRLayer": false, + "XRLightEstimate": false, + "XRLightProbe": false, + "XRPose": false, + "XRRay": false, + "XRReferenceSpace": false, + "XRReferenceSpaceEvent": false, + "XRRenderState": false, + "XRRigidTransform": false, + "XRSession": false, + "XRSessionEvent": false, + "XRSpace": false, + "XRSystem": false, + "XRTransientInputHitTestResult": false, + "XRTransientInputHitTestSource": false, + "XRView": false, + "XRViewerPose": false, + "XRViewport": false, + "XRWebGLBinding": false, + "XRWebGLDepthInformation": false, + "XRWebGLLayer": false, + "XSLTProcessor": false + } + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-undef', + message: "'requestIdleCallback' is not defined.", + messageId: 'undef', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 0, + endLine: 1, + endColumn: 19, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-undef > valid + +```js +customElements; +``` + +```json +{ + "languageOptions": { + "globals": { + "AbortController": false, + "AbortSignal": false, + "AbsoluteOrientationSensor": false, + "AbstractRange": false, + "Accelerometer": false, + "addEventListener": false, + "ai": false, + "AI": false, + "AICreateMonitor": false, + "AITextSession": false, + "alert": false, + "AnalyserNode": false, + "Animation": false, + "AnimationEffect": false, + "AnimationEvent": false, + "AnimationPlaybackEvent": false, + "AnimationTimeline": false, + "AsyncDisposableStack": false, + "atob": false, + "Attr": false, + "Audio": false, + "AudioBuffer": false, + "AudioBufferSourceNode": false, + "AudioContext": false, + "AudioData": false, + "AudioDecoder": false, + "AudioDestinationNode": false, + "AudioEncoder": false, + "AudioListener": false, + "AudioNode": false, + "AudioParam": false, + "AudioParamMap": false, + "AudioProcessingEvent": false, + "AudioScheduledSourceNode": false, + "AudioSinkInfo": false, + "AudioWorklet": false, + "AudioWorkletGlobalScope": false, + "AudioWorkletNode": false, + "AudioWorkletProcessor": false, + "AuthenticatorAssertionResponse": false, + "AuthenticatorAttestationResponse": false, + "AuthenticatorResponse": false, + "BackgroundFetchManager": false, + "BackgroundFetchRecord": false, + "BackgroundFetchRegistration": false, + "BarcodeDetector": false, + "BarProp": false, + "BaseAudioContext": false, + "BatteryManager": false, + "BeforeUnloadEvent": false, + "BiquadFilterNode": false, + "Blob": false, + "BlobEvent": false, + "Bluetooth": false, + "BluetoothCharacteristicProperties": false, + "BluetoothDevice": false, + "BluetoothRemoteGATTCharacteristic": false, + "BluetoothRemoteGATTDescriptor": false, + "BluetoothRemoteGATTServer": false, + "BluetoothRemoteGATTService": false, + "BluetoothUUID": false, + "blur": false, + "BroadcastChannel": false, + "BrowserCaptureMediaStreamTrack": false, + "btoa": false, + "ByteLengthQueuingStrategy": false, + "Cache": false, + "caches": false, + "CacheStorage": false, + "cancelAnimationFrame": false, + "cancelIdleCallback": false, + "CanvasCaptureMediaStream": false, + "CanvasCaptureMediaStreamTrack": false, + "CanvasGradient": false, + "CanvasPattern": false, + "CanvasRenderingContext2D": false, + "CaptureController": false, + "CaretPosition": false, + "CDATASection": false, + "ChannelMergerNode": false, + "ChannelSplitterNode": false, + "ChapterInformation": false, + "CharacterBoundsUpdateEvent": false, + "CharacterData": false, + "clearInterval": false, + "clearTimeout": false, + "clientInformation": false, + "Clipboard": false, + "ClipboardChangeEvent": false, + "ClipboardEvent": false, + "ClipboardItem": false, + "close": false, + "closed": false, + "CloseEvent": false, + "CloseWatcher": false, + "CommandEvent": false, + "Comment": false, + "CompositionEvent": false, + "CompressionStream": false, + "confirm": false, + "console": false, + "ConstantSourceNode": false, + "ContentVisibilityAutoStateChangeEvent": false, + "ConvolverNode": false, + "CookieChangeEvent": false, + "CookieDeprecationLabel": false, + "cookieStore": false, + "CookieStore": false, + "CookieStoreManager": false, + "CountQueuingStrategy": false, + "createImageBitmap": false, + "CreateMonitor": false, + "Credential": false, + "credentialless": false, + "CredentialsContainer": false, + "CropTarget": false, + "crossOriginIsolated": false, + "crypto": false, + "Crypto": false, + "CryptoKey": false, + "CSPViolationReportBody": false, + "CSS": false, + "CSSAnimation": false, + "CSSConditionRule": false, + "CSSContainerRule": false, + "CSSCounterStyleRule": false, + "CSSFontFaceRule": false, + "CSSFontFeatureValuesRule": false, + "CSSFontPaletteValuesRule": false, + "CSSFunctionDeclarations": false, + "CSSFunctionDescriptors": false, + "CSSFunctionRule": false, + "CSSGroupingRule": false, + "CSSImageValue": false, + "CSSImportRule": false, + "CSSKeyframeRule": false, + "CSSKeyframesRule": false, + "CSSKeywordValue": false, + "CSSLayerBlockRule": false, + "CSSLayerStatementRule": false, + "CSSMarginRule": false, + "CSSMathClamp": false, + "CSSMathInvert": false, + "CSSMathMax": false, + "CSSMathMin": false, + "CSSMathNegate": false, + "CSSMathProduct": false, + "CSSMathSum": false, + "CSSMathValue": false, + "CSSMatrixComponent": false, + "CSSMediaRule": false, + "CSSNamespaceRule": false, + "CSSNestedDeclarations": false, + "CSSNumericArray": false, + "CSSNumericValue": false, + "CSSPageDescriptors": false, + "CSSPageRule": false, + "CSSPerspective": false, + "CSSPositionTryDescriptors": false, + "CSSPositionTryRule": false, + "CSSPositionValue": false, + "CSSPropertyRule": false, + "CSSRotate": false, + "CSSRule": false, + "CSSRuleList": false, + "CSSScale": false, + "CSSScopeRule": false, + "CSSSkew": false, + "CSSSkewX": false, + "CSSSkewY": false, + "CSSStartingStyleRule": false, + "CSSStyleDeclaration": false, + "CSSStyleRule": false, + "CSSStyleSheet": false, + "CSSStyleValue": false, + "CSSSupportsRule": false, + "CSSTransformComponent": false, + "CSSTransformValue": false, + "CSSTransition": false, + "CSSTranslate": false, + "CSSUnitValue": false, + "CSSUnparsedValue": false, + "CSSVariableReferenceValue": false, + "CSSViewTransitionRule": false, + "currentFrame": false, + "currentTime": false, + "CustomElementRegistry": false, + "customElements": false, + "CustomEvent": false, + "CustomStateSet": false, + "DataTransfer": false, + "DataTransferItem": false, + "DataTransferItemList": false, + "DecompressionStream": false, + "DelayNode": false, + "DelegatedInkTrailPresenter": false, + "DeviceMotionEvent": false, + "DeviceMotionEventAcceleration": false, + "DeviceMotionEventRotationRate": false, + "DeviceOrientationEvent": false, + "devicePixelRatio": false, + "DevicePosture": false, + "DigitalCredential": false, + "dispatchEvent": false, + "DisposableStack": false, + "document": false, + "Document": false, + "DocumentFragment": false, + "documentPictureInPicture": false, + "DocumentPictureInPicture": false, + "DocumentPictureInPictureEvent": false, + "DocumentTimeline": false, + "DocumentType": false, + "DOMError": false, + "DOMException": false, + "DOMImplementation": false, + "DOMMatrix": false, + "DOMMatrixReadOnly": false, + "DOMParser": false, + "DOMPoint": false, + "DOMPointReadOnly": false, + "DOMQuad": false, + "DOMRect": false, + "DOMRectList": false, + "DOMRectReadOnly": false, + "DOMStringList": false, + "DOMStringMap": false, + "DOMTokenList": false, + "DragEvent": false, + "DynamicsCompressorNode": false, + "EditContext": false, + "Element": false, + "ElementInternals": false, + "EncodedAudioChunk": false, + "EncodedVideoChunk": false, + "ErrorEvent": false, + "event": false, + "Event": false, + "EventCounts": false, + "EventSource": false, + "EventTarget": false, + "external": false, + "External": false, + "EyeDropper": false, + "FeaturePolicy": false, + "FederatedCredential": false, + "fence": false, + "Fence": false, + "FencedFrameConfig": false, + "fetch": false, + "fetchLater": false, + "FetchLaterResult": false, + "File": false, + "FileList": false, + "FileReader": false, + "FileSystem": false, + "FileSystemDirectoryEntry": false, + "FileSystemDirectoryHandle": false, + "FileSystemDirectoryReader": false, + "FileSystemEntry": false, + "FileSystemFileEntry": false, + "FileSystemFileHandle": false, + "FileSystemHandle": false, + "FileSystemObserver": false, + "FileSystemWritableFileStream": false, + "find": false, + "focus": false, + "FocusEvent": false, + "FontData": false, + "FontFace": false, + "FontFaceSet": false, + "FontFaceSetLoadEvent": false, + "FormData": false, + "FormDataEvent": false, + "FragmentDirective": false, + "frameElement": false, + "frames": false, + "GainNode": false, + "Gamepad": false, + "GamepadAxisMoveEvent": false, + "GamepadButton": false, + "GamepadButtonEvent": false, + "GamepadEvent": false, + "GamepadHapticActuator": false, + "GamepadPose": false, + "Geolocation": false, + "GeolocationCoordinates": false, + "GeolocationPosition": false, + "GeolocationPositionError": false, + "getComputedStyle": false, + "getScreenDetails": false, + "getSelection": false, + "GPU": false, + "GPUAdapter": false, + "GPUAdapterInfo": false, + "GPUBindGroup": false, + "GPUBindGroupLayout": false, + "GPUBuffer": false, + "GPUBufferUsage": false, + "GPUCanvasContext": false, + "GPUColorWrite": false, + "GPUCommandBuffer": false, + "GPUCommandEncoder": false, + "GPUCompilationInfo": false, + "GPUCompilationMessage": false, + "GPUComputePassEncoder": false, + "GPUComputePipeline": false, + "GPUDevice": false, + "GPUDeviceLostInfo": false, + "GPUError": false, + "GPUExternalTexture": false, + "GPUInternalError": false, + "GPUMapMode": false, + "GPUOutOfMemoryError": false, + "GPUPipelineError": false, + "GPUPipelineLayout": false, + "GPUQuerySet": false, + "GPUQueue": false, + "GPURenderBundle": false, + "GPURenderBundleEncoder": false, + "GPURenderPassEncoder": false, + "GPURenderPipeline": false, + "GPUSampler": false, + "GPUShaderModule": false, + "GPUShaderStage": false, + "GPUSupportedFeatures": false, + "GPUSupportedLimits": false, + "GPUTexture": false, + "GPUTextureUsage": false, + "GPUTextureView": false, + "GPUUncapturedErrorEvent": false, + "GPUValidationError": false, + "GravitySensor": false, + "Gyroscope": false, + "HashChangeEvent": false, + "Headers": false, + "HID": false, + "HIDConnectionEvent": false, + "HIDDevice": false, + "HIDInputReportEvent": false, + "Highlight": false, + "HighlightRegistry": false, + "history": false, + "History": false, + "HTMLAllCollection": false, + "HTMLAnchorElement": false, + "HTMLAreaElement": false, + "HTMLAudioElement": false, + "HTMLBaseElement": false, + "HTMLBodyElement": false, + "HTMLBRElement": false, + "HTMLButtonElement": false, + "HTMLCanvasElement": false, + "HTMLCollection": false, + "HTMLDataElement": false, + "HTMLDataListElement": false, + "HTMLDetailsElement": false, + "HTMLDialogElement": false, + "HTMLDirectoryElement": false, + "HTMLDivElement": false, + "HTMLDListElement": false, + "HTMLDocument": false, + "HTMLElement": false, + "HTMLEmbedElement": false, + "HTMLFencedFrameElement": false, + "HTMLFieldSetElement": false, + "HTMLFontElement": false, + "HTMLFormControlsCollection": false, + "HTMLFormElement": false, + "HTMLFrameElement": false, + "HTMLFrameSetElement": false, + "HTMLHeadElement": false, + "HTMLHeadingElement": false, + "HTMLHRElement": false, + "HTMLHtmlElement": false, + "HTMLIFrameElement": false, + "HTMLImageElement": false, + "HTMLInputElement": false, + "HTMLLabelElement": false, + "HTMLLegendElement": false, + "HTMLLIElement": false, + "HTMLLinkElement": false, + "HTMLMapElement": false, + "HTMLMarqueeElement": false, + "HTMLMediaElement": false, + "HTMLMenuElement": false, + "HTMLMetaElement": false, + "HTMLMeterElement": false, + "HTMLModElement": false, + "HTMLObjectElement": false, + "HTMLOListElement": false, + "HTMLOptGroupElement": false, + "HTMLOptionElement": false, + "HTMLOptionsCollection": false, + "HTMLOutputElement": false, + "HTMLParagraphElement": false, + "HTMLParamElement": false, + "HTMLPictureElement": false, + "HTMLPreElement": false, + "HTMLProgressElement": false, + "HTMLQuoteElement": false, + "HTMLScriptElement": false, + "HTMLSelectedContentElement": false, + "HTMLSelectElement": false, + "HTMLSlotElement": false, + "HTMLSourceElement": false, + "HTMLSpanElement": false, + "HTMLStyleElement": false, + "HTMLTableCaptionElement": false, + "HTMLTableCellElement": false, + "HTMLTableColElement": false, + "HTMLTableElement": false, + "HTMLTableRowElement": false, + "HTMLTableSectionElement": false, + "HTMLTemplateElement": false, + "HTMLTextAreaElement": false, + "HTMLTimeElement": false, + "HTMLTitleElement": false, + "HTMLTrackElement": false, + "HTMLUListElement": false, + "HTMLUnknownElement": false, + "HTMLVideoElement": false, + "IDBCursor": false, + "IDBCursorWithValue": false, + "IDBDatabase": false, + "IDBFactory": false, + "IDBIndex": false, + "IDBKeyRange": false, + "IDBObjectStore": false, + "IDBOpenDBRequest": false, + "IDBRecord": false, + "IDBRequest": false, + "IDBTransaction": false, + "IDBVersionChangeEvent": false, + "IdentityCredential": false, + "IdentityCredentialError": false, + "IdentityProvider": false, + "IdleDeadline": false, + "IdleDetector": false, + "IIRFilterNode": false, + "Image": false, + "ImageBitmap": false, + "ImageBitmapRenderingContext": false, + "ImageCapture": false, + "ImageData": false, + "ImageDecoder": false, + "ImageTrack": false, + "ImageTrackList": false, + "indexedDB": false, + "Ink": false, + "innerHeight": false, + "innerWidth": false, + "InputDeviceCapabilities": false, + "InputDeviceInfo": false, + "InputEvent": false, + "IntegrityViolationReportBody": false, + "InterestEvent": false, + "IntersectionObserver": false, + "IntersectionObserverEntry": false, + "isSecureContext": false, + "Keyboard": false, + "KeyboardEvent": false, + "KeyboardLayoutMap": false, + "KeyframeEffect": false, + "LanguageDetector": false, + "LargestContentfulPaint": false, + "LaunchParams": false, + "launchQueue": false, + "LaunchQueue": false, + "LayoutShift": false, + "LayoutShiftAttribution": false, + "length": false, + "LinearAccelerationSensor": false, + "localStorage": false, + "location": true, + "Location": false, + "locationbar": false, + "Lock": false, + "LockManager": false, + "matchMedia": false, + "MathMLElement": false, + "MediaCapabilities": false, + "MediaCapabilitiesInfo": false, + "MediaDeviceInfo": false, + "MediaDevices": false, + "MediaElementAudioSourceNode": false, + "MediaEncryptedEvent": false, + "MediaError": false, + "MediaKeyError": false, + "MediaKeyMessageEvent": false, + "MediaKeys": false, + "MediaKeySession": false, + "MediaKeyStatusMap": false, + "MediaKeySystemAccess": false, + "MediaList": false, + "MediaMetadata": false, + "MediaQueryList": false, + "MediaQueryListEvent": false, + "MediaRecorder": false, + "MediaRecorderErrorEvent": false, + "MediaSession": false, + "MediaSource": false, + "MediaSourceHandle": false, + "MediaStream": false, + "MediaStreamAudioDestinationNode": false, + "MediaStreamAudioSourceNode": false, + "MediaStreamEvent": false, + "MediaStreamTrack": false, + "MediaStreamTrackAudioSourceNode": false, + "MediaStreamTrackAudioStats": false, + "MediaStreamTrackEvent": false, + "MediaStreamTrackGenerator": false, + "MediaStreamTrackProcessor": false, + "MediaStreamTrackVideoStats": false, + "menubar": false, + "MessageChannel": false, + "MessageEvent": false, + "MessagePort": false, + "MIDIAccess": false, + "MIDIConnectionEvent": false, + "MIDIInput": false, + "MIDIInputMap": false, + "MIDIMessageEvent": false, + "MIDIOutput": false, + "MIDIOutputMap": false, + "MIDIPort": false, + "MimeType": false, + "MimeTypeArray": false, + "model": false, + "ModelGenericSession": false, + "ModelManager": false, + "MouseEvent": false, + "moveBy": false, + "moveTo": false, + "MutationEvent": false, + "MutationObserver": false, + "MutationRecord": false, + "name": false, + "NamedNodeMap": false, + "NavigateEvent": false, + "navigation": false, + "Navigation": false, + "NavigationActivation": false, + "NavigationCurrentEntryChangeEvent": false, + "NavigationDestination": false, + "NavigationHistoryEntry": false, + "NavigationPrecommitController": false, + "NavigationPreloadManager": false, + "NavigationTransition": false, + "navigator": false, + "Navigator": false, + "NavigatorLogin": false, + "NavigatorManagedData": false, + "NavigatorUAData": false, + "NetworkInformation": false, + "Node": false, + "NodeFilter": false, + "NodeIterator": false, + "NodeList": false, + "Notification": false, + "NotifyPaintEvent": false, + "NotRestoredReasonDetails": false, + "NotRestoredReasons": false, + "Observable": false, + "OfflineAudioCompletionEvent": false, + "OfflineAudioContext": false, + "offscreenBuffering": false, + "OffscreenCanvas": false, + "OffscreenCanvasRenderingContext2D": false, + "onabort": true, + "onafterprint": true, + "onanimationcancel": true, + "onanimationend": true, + "onanimationiteration": true, + "onanimationstart": true, + "onappinstalled": true, + "onauxclick": true, + "onbeforeinput": true, + "onbeforeinstallprompt": true, + "onbeforematch": true, + "onbeforeprint": true, + "onbeforetoggle": true, + "onbeforeunload": true, + "onbeforexrselect": true, + "onblur": true, + "oncancel": true, + "oncanplay": true, + "oncanplaythrough": true, + "onchange": true, + "onclick": true, + "onclose": true, + "oncommand": true, + "oncontentvisibilityautostatechange": true, + "oncontextlost": true, + "oncontextmenu": true, + "oncontextrestored": true, + "oncopy": true, + "oncuechange": true, + "oncut": true, + "ondblclick": true, + "ondevicemotion": true, + "ondeviceorientation": true, + "ondeviceorientationabsolute": true, + "ondrag": true, + "ondragend": true, + "ondragenter": true, + "ondragleave": true, + "ondragover": true, + "ondragstart": true, + "ondrop": true, + "ondurationchange": true, + "onemptied": true, + "onended": true, + "onerror": true, + "onfocus": true, + "onformdata": true, + "ongamepadconnected": true, + "ongamepaddisconnected": true, + "ongotpointercapture": true, + "onhashchange": true, + "oninput": true, + "oninvalid": true, + "onkeydown": true, + "onkeypress": true, + "onkeyup": true, + "onlanguagechange": true, + "onload": true, + "onloadeddata": true, + "onloadedmetadata": true, + "onloadstart": true, + "onlostpointercapture": true, + "onmessage": true, + "onmessageerror": true, + "onmousedown": true, + "onmouseenter": true, + "onmouseleave": true, + "onmousemove": true, + "onmouseout": true, + "onmouseover": true, + "onmouseup": true, + "onmousewheel": true, + "onoffline": true, + "ononline": true, + "onpagehide": true, + "onpagereveal": true, + "onpageshow": true, + "onpageswap": true, + "onpaste": true, + "onpause": true, + "onplay": true, + "onplaying": true, + "onpointercancel": true, + "onpointerdown": true, + "onpointerenter": true, + "onpointerleave": true, + "onpointermove": true, + "onpointerout": true, + "onpointerover": true, + "onpointerrawupdate": true, + "onpointerup": true, + "onpopstate": true, + "onprogress": true, + "onratechange": true, + "onrejectionhandled": true, + "onreset": true, + "onresize": true, + "onscroll": true, + "onscrollend": true, + "onscrollsnapchange": true, + "onscrollsnapchanging": true, + "onsearch": true, + "onsecuritypolicyviolation": true, + "onseeked": true, + "onseeking": true, + "onselect": true, + "onselectionchange": true, + "onselectstart": true, + "onslotchange": true, + "onstalled": true, + "onstorage": true, + "onsubmit": true, + "onsuspend": true, + "ontimeupdate": true, + "ontoggle": true, + "ontransitioncancel": true, + "ontransitionend": true, + "ontransitionrun": true, + "ontransitionstart": true, + "onunhandledrejection": true, + "onunload": true, + "onvolumechange": true, + "onwaiting": true, + "onwheel": true, + "open": false, + "opener": false, + "Option": false, + "OrientationSensor": false, + "origin": false, + "originAgentCluster": false, + "OscillatorNode": false, + "OTPCredential": false, + "outerHeight": false, + "outerWidth": false, + "OverconstrainedError": false, + "PageRevealEvent": false, + "PageSwapEvent": false, + "PageTransitionEvent": false, + "pageXOffset": false, + "pageYOffset": false, + "PannerNode": false, + "parent": false, + "PasswordCredential": false, + "Path2D": false, + "PaymentAddress": false, + "PaymentManager": false, + "PaymentMethodChangeEvent": false, + "PaymentRequest": false, + "PaymentRequestUpdateEvent": false, + "PaymentResponse": false, + "performance": false, + "Performance": false, + "PerformanceElementTiming": false, + "PerformanceEntry": false, + "PerformanceEventTiming": false, + "PerformanceLongAnimationFrameTiming": false, + "PerformanceLongTaskTiming": false, + "PerformanceMark": false, + "PerformanceMeasure": false, + "PerformanceNavigation": false, + "PerformanceNavigationTiming": false, + "PerformanceObserver": false, + "PerformanceObserverEntryList": false, + "PerformancePaintTiming": false, + "PerformanceResourceTiming": false, + "PerformanceScriptTiming": false, + "PerformanceServerTiming": false, + "PerformanceTiming": false, + "PeriodicSyncManager": false, + "PeriodicWave": false, + "Permissions": false, + "PermissionStatus": false, + "PERSISTENT": false, + "personalbar": false, + "PictureInPictureEvent": false, + "PictureInPictureWindow": false, + "Plugin": false, + "PluginArray": false, + "PointerEvent": false, + "PopStateEvent": false, + "postMessage": false, + "Presentation": false, + "PresentationAvailability": false, + "PresentationConnection": false, + "PresentationConnectionAvailableEvent": false, + "PresentationConnectionCloseEvent": false, + "PresentationConnectionList": false, + "PresentationReceiver": false, + "PresentationRequest": false, + "PressureObserver": false, + "PressureRecord": false, + "print": false, + "ProcessingInstruction": false, + "Profiler": false, + "ProgressEvent": false, + "PromiseRejectionEvent": false, + "prompt": false, + "ProtectedAudience": false, + "PublicKeyCredential": false, + "PushManager": false, + "PushSubscription": false, + "PushSubscriptionOptions": false, + "queryLocalFonts": false, + "queueMicrotask": false, + "QuotaExceededError": false, + "RadioNodeList": false, + "Range": false, + "ReadableByteStreamController": false, + "ReadableStream": false, + "ReadableStreamBYOBReader": false, + "ReadableStreamBYOBRequest": false, + "ReadableStreamDefaultController": false, + "ReadableStreamDefaultReader": false, + "registerProcessor": false, + "RelativeOrientationSensor": false, + "RemotePlayback": false, + "removeEventListener": false, + "ReportBody": false, + "reportError": false, + "ReportingObserver": false, + "Request": false, + "requestAnimationFrame": false, + "requestIdleCallback": false, + "resizeBy": false, + "ResizeObserver": false, + "ResizeObserverEntry": false, + "ResizeObserverSize": false, + "resizeTo": false, + "Response": false, + "RestrictionTarget": false, + "RTCCertificate": false, + "RTCDataChannel": false, + "RTCDataChannelEvent": false, + "RTCDtlsTransport": false, + "RTCDTMFSender": false, + "RTCDTMFToneChangeEvent": false, + "RTCEncodedAudioFrame": false, + "RTCEncodedVideoFrame": false, + "RTCError": false, + "RTCErrorEvent": false, + "RTCIceCandidate": false, + "RTCIceTransport": false, + "RTCPeerConnection": false, + "RTCPeerConnectionIceErrorEvent": false, + "RTCPeerConnectionIceEvent": false, + "RTCRtpReceiver": false, + "RTCRtpScriptTransform": false, + "RTCRtpSender": false, + "RTCRtpTransceiver": false, + "RTCSctpTransport": false, + "RTCSessionDescription": false, + "RTCStatsReport": false, + "RTCTrackEvent": false, + "sampleRate": false, + "scheduler": false, + "Scheduler": false, + "Scheduling": false, + "screen": false, + "Screen": false, + "ScreenDetailed": false, + "ScreenDetails": false, + "screenLeft": false, + "ScreenOrientation": false, + "screenTop": false, + "screenX": false, + "screenY": false, + "ScriptProcessorNode": false, + "scroll": false, + "scrollbars": false, + "scrollBy": false, + "ScrollTimeline": false, + "scrollTo": false, + "scrollX": false, + "scrollY": false, + "SecurityPolicyViolationEvent": false, + "Selection": false, + "self": false, + "Sensor": false, + "SensorErrorEvent": false, + "Serial": false, + "SerialPort": false, + "ServiceWorker": false, + "ServiceWorkerContainer": false, + "ServiceWorkerRegistration": false, + "sessionStorage": false, + "setInterval": false, + "setTimeout": false, + "ShadowRoot": false, + "sharedStorage": false, + "SharedStorage": false, + "SharedStorageAppendMethod": false, + "SharedStorageClearMethod": false, + "SharedStorageDeleteMethod": false, + "SharedStorageModifierMethod": false, + "SharedStorageSetMethod": false, + "SharedStorageWorklet": false, + "SharedWorker": false, + "showDirectoryPicker": false, + "showOpenFilePicker": false, + "showSaveFilePicker": false, + "SnapEvent": false, + "SourceBuffer": false, + "SourceBufferList": false, + "SpeechGrammar": false, + "SpeechGrammarList": false, + "SpeechRecognition": false, + "SpeechRecognitionErrorEvent": false, + "SpeechRecognitionEvent": false, + "SpeechRecognitionPhrase": false, + "speechSynthesis": false, + "SpeechSynthesis": false, + "SpeechSynthesisErrorEvent": false, + "SpeechSynthesisEvent": false, + "SpeechSynthesisUtterance": false, + "SpeechSynthesisVoice": false, + "StaticRange": false, + "status": false, + "statusbar": false, + "StereoPannerNode": false, + "stop": false, + "Storage": false, + "StorageBucket": false, + "StorageBucketManager": false, + "StorageEvent": false, + "StorageManager": false, + "structuredClone": false, + "styleMedia": false, + "StylePropertyMap": false, + "StylePropertyMapReadOnly": false, + "StyleSheet": false, + "StyleSheetList": false, + "SubmitEvent": false, + "Subscriber": false, + "SubtleCrypto": false, + "Summarizer": false, + "SuppressedError": false, + "SVGAElement": false, + "SVGAngle": false, + "SVGAnimatedAngle": false, + "SVGAnimatedBoolean": false, + "SVGAnimatedEnumeration": false, + "SVGAnimatedInteger": false, + "SVGAnimatedLength": false, + "SVGAnimatedLengthList": false, + "SVGAnimatedNumber": false, + "SVGAnimatedNumberList": false, + "SVGAnimatedPreserveAspectRatio": false, + "SVGAnimatedRect": false, + "SVGAnimatedString": false, + "SVGAnimatedTransformList": false, + "SVGAnimateElement": false, + "SVGAnimateMotionElement": false, + "SVGAnimateTransformElement": false, + "SVGAnimationElement": false, + "SVGCircleElement": false, + "SVGClipPathElement": false, + "SVGComponentTransferFunctionElement": false, + "SVGDefsElement": false, + "SVGDescElement": false, + "SVGElement": false, + "SVGEllipseElement": false, + "SVGFEBlendElement": false, + "SVGFEColorMatrixElement": false, + "SVGFEComponentTransferElement": false, + "SVGFECompositeElement": false, + "SVGFEConvolveMatrixElement": false, + "SVGFEDiffuseLightingElement": false, + "SVGFEDisplacementMapElement": false, + "SVGFEDistantLightElement": false, + "SVGFEDropShadowElement": false, + "SVGFEFloodElement": false, + "SVGFEFuncAElement": false, + "SVGFEFuncBElement": false, + "SVGFEFuncGElement": false, + "SVGFEFuncRElement": false, + "SVGFEGaussianBlurElement": false, + "SVGFEImageElement": false, + "SVGFEMergeElement": false, + "SVGFEMergeNodeElement": false, + "SVGFEMorphologyElement": false, + "SVGFEOffsetElement": false, + "SVGFEPointLightElement": false, + "SVGFESpecularLightingElement": false, + "SVGFESpotLightElement": false, + "SVGFETileElement": false, + "SVGFETurbulenceElement": false, + "SVGFilterElement": false, + "SVGForeignObjectElement": false, + "SVGGElement": false, + "SVGGeometryElement": false, + "SVGGradientElement": false, + "SVGGraphicsElement": false, + "SVGImageElement": false, + "SVGLength": false, + "SVGLengthList": false, + "SVGLinearGradientElement": false, + "SVGLineElement": false, + "SVGMarkerElement": false, + "SVGMaskElement": false, + "SVGMatrix": false, + "SVGMetadataElement": false, + "SVGMPathElement": false, + "SVGNumber": false, + "SVGNumberList": false, + "SVGPathElement": false, + "SVGPatternElement": false, + "SVGPoint": false, + "SVGPointList": false, + "SVGPolygonElement": false, + "SVGPolylineElement": false, + "SVGPreserveAspectRatio": false, + "SVGRadialGradientElement": false, + "SVGRect": false, + "SVGRectElement": false, + "SVGScriptElement": false, + "SVGSetElement": false, + "SVGStopElement": false, + "SVGStringList": false, + "SVGStyleElement": false, + "SVGSVGElement": false, + "SVGSwitchElement": false, + "SVGSymbolElement": false, + "SVGTextContentElement": false, + "SVGTextElement": false, + "SVGTextPathElement": false, + "SVGTextPositioningElement": false, + "SVGTitleElement": false, + "SVGTransform": false, + "SVGTransformList": false, + "SVGTSpanElement": false, + "SVGUnitTypes": false, + "SVGUseElement": false, + "SVGViewElement": false, + "SyncManager": false, + "TaskAttributionTiming": false, + "TaskController": false, + "TaskPriorityChangeEvent": false, + "TaskSignal": false, + "TEMPORARY": false, + "Text": false, + "TextDecoder": false, + "TextDecoderStream": false, + "TextEncoder": false, + "TextEncoderStream": false, + "TextEvent": false, + "TextFormat": false, + "TextFormatUpdateEvent": false, + "TextMetrics": false, + "TextTrack": false, + "TextTrackCue": false, + "TextTrackCueList": false, + "TextTrackList": false, + "TextUpdateEvent": false, + "TimeEvent": false, + "TimeRanges": false, + "ToggleEvent": false, + "toolbar": false, + "top": false, + "Touch": false, + "TouchEvent": false, + "TouchList": false, + "TrackEvent": false, + "TransformStream": false, + "TransformStreamDefaultController": false, + "TransitionEvent": false, + "Translator": false, + "TreeWalker": false, + "TrustedHTML": false, + "TrustedScript": false, + "TrustedScriptURL": false, + "TrustedTypePolicy": false, + "TrustedTypePolicyFactory": false, + "trustedTypes": false, + "UIEvent": false, + "URL": false, + "URLPattern": false, + "URLSearchParams": false, + "USB": false, + "USBAlternateInterface": false, + "USBConfiguration": false, + "USBConnectionEvent": false, + "USBDevice": false, + "USBEndpoint": false, + "USBInterface": false, + "USBInTransferResult": false, + "USBIsochronousInTransferPacket": false, + "USBIsochronousInTransferResult": false, + "USBIsochronousOutTransferPacket": false, + "USBIsochronousOutTransferResult": false, + "USBOutTransferResult": false, + "UserActivation": false, + "ValidityState": false, + "VideoColorSpace": false, + "VideoDecoder": false, + "VideoEncoder": false, + "VideoFrame": false, + "VideoPlaybackQuality": false, + "viewport": false, + "Viewport": false, + "ViewTimeline": false, + "ViewTransition": false, + "ViewTransitionTypeSet": false, + "VirtualKeyboard": false, + "VirtualKeyboardGeometryChangeEvent": false, + "VisibilityStateEntry": false, + "visualViewport": false, + "VisualViewport": false, + "VTTCue": false, + "VTTRegion": false, + "WakeLock": false, + "WakeLockSentinel": false, + "WaveShaperNode": false, + "WebAssembly": false, + "WebGL2RenderingContext": false, + "WebGLActiveInfo": false, + "WebGLBuffer": false, + "WebGLContextEvent": false, + "WebGLFramebuffer": false, + "WebGLObject": false, + "WebGLProgram": false, + "WebGLQuery": false, + "WebGLRenderbuffer": false, + "WebGLRenderingContext": false, + "WebGLSampler": false, + "WebGLShader": false, + "WebGLShaderPrecisionFormat": false, + "WebGLSync": false, + "WebGLTexture": false, + "WebGLTransformFeedback": false, + "WebGLUniformLocation": false, + "WebGLVertexArrayObject": false, + "WebSocket": false, + "WebSocketError": false, + "WebSocketStream": false, + "WebTransport": false, + "WebTransportBidirectionalStream": false, + "WebTransportDatagramDuplexStream": false, + "WebTransportError": false, + "WebTransportReceiveStream": false, + "WebTransportSendStream": false, + "WGSLLanguageFeatures": false, + "WheelEvent": false, + "when": false, + "window": false, + "Window": false, + "WindowControlsOverlay": false, + "WindowControlsOverlayGeometryChangeEvent": false, + "Worker": false, + "Worklet": false, + "WorkletGlobalScope": false, + "WritableStream": false, + "WritableStreamDefaultController": false, + "WritableStreamDefaultWriter": false, + "XMLDocument": false, + "XMLHttpRequest": false, + "XMLHttpRequestEventTarget": false, + "XMLHttpRequestUpload": false, + "XMLSerializer": false, + "XPathEvaluator": false, + "XPathExpression": false, + "XPathResult": false, + "XRAnchor": false, + "XRAnchorSet": false, + "XRBoundedReferenceSpace": false, + "XRCamera": false, + "XRCPUDepthInformation": false, + "XRDepthInformation": false, + "XRDOMOverlayState": false, + "XRFrame": false, + "XRHand": false, + "XRHitTestResult": false, + "XRHitTestSource": false, + "XRInputSource": false, + "XRInputSourceArray": false, + "XRInputSourceEvent": false, + "XRInputSourcesChangeEvent": false, + "XRJointPose": false, + "XRJointSpace": false, + "XRLayer": false, + "XRLightEstimate": false, + "XRLightProbe": false, + "XRPose": false, + "XRRay": false, + "XRReferenceSpace": false, + "XRReferenceSpaceEvent": false, + "XRRenderState": false, + "XRRigidTransform": false, + "XRSession": false, + "XRSessionEvent": false, + "XRSpace": false, + "XRSystem": false, + "XRTransientInputHitTestResult": false, + "XRTransientInputHitTestSource": false, + "XRView": false, + "XRViewerPose": false, + "XRViewport": false, + "XRWebGLBinding": false, + "XRWebGLDepthInformation": false, + "XRWebGLLayer": false, + "XSLTProcessor": false + } + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-undef', + message: "'customElements' is not defined.", + messageId: 'undef', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 0, + endLine: 1, + endColumn: 14, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-undef > valid + +```js +PromiseRejectionEvent; +``` + +```json +{ + "languageOptions": { + "globals": { + "AbortController": false, + "AbortSignal": false, + "AbsoluteOrientationSensor": false, + "AbstractRange": false, + "Accelerometer": false, + "addEventListener": false, + "ai": false, + "AI": false, + "AICreateMonitor": false, + "AITextSession": false, + "alert": false, + "AnalyserNode": false, + "Animation": false, + "AnimationEffect": false, + "AnimationEvent": false, + "AnimationPlaybackEvent": false, + "AnimationTimeline": false, + "AsyncDisposableStack": false, + "atob": false, + "Attr": false, + "Audio": false, + "AudioBuffer": false, + "AudioBufferSourceNode": false, + "AudioContext": false, + "AudioData": false, + "AudioDecoder": false, + "AudioDestinationNode": false, + "AudioEncoder": false, + "AudioListener": false, + "AudioNode": false, + "AudioParam": false, + "AudioParamMap": false, + "AudioProcessingEvent": false, + "AudioScheduledSourceNode": false, + "AudioSinkInfo": false, + "AudioWorklet": false, + "AudioWorkletGlobalScope": false, + "AudioWorkletNode": false, + "AudioWorkletProcessor": false, + "AuthenticatorAssertionResponse": false, + "AuthenticatorAttestationResponse": false, + "AuthenticatorResponse": false, + "BackgroundFetchManager": false, + "BackgroundFetchRecord": false, + "BackgroundFetchRegistration": false, + "BarcodeDetector": false, + "BarProp": false, + "BaseAudioContext": false, + "BatteryManager": false, + "BeforeUnloadEvent": false, + "BiquadFilterNode": false, + "Blob": false, + "BlobEvent": false, + "Bluetooth": false, + "BluetoothCharacteristicProperties": false, + "BluetoothDevice": false, + "BluetoothRemoteGATTCharacteristic": false, + "BluetoothRemoteGATTDescriptor": false, + "BluetoothRemoteGATTServer": false, + "BluetoothRemoteGATTService": false, + "BluetoothUUID": false, + "blur": false, + "BroadcastChannel": false, + "BrowserCaptureMediaStreamTrack": false, + "btoa": false, + "ByteLengthQueuingStrategy": false, + "Cache": false, + "caches": false, + "CacheStorage": false, + "cancelAnimationFrame": false, + "cancelIdleCallback": false, + "CanvasCaptureMediaStream": false, + "CanvasCaptureMediaStreamTrack": false, + "CanvasGradient": false, + "CanvasPattern": false, + "CanvasRenderingContext2D": false, + "CaptureController": false, + "CaretPosition": false, + "CDATASection": false, + "ChannelMergerNode": false, + "ChannelSplitterNode": false, + "ChapterInformation": false, + "CharacterBoundsUpdateEvent": false, + "CharacterData": false, + "clearInterval": false, + "clearTimeout": false, + "clientInformation": false, + "Clipboard": false, + "ClipboardChangeEvent": false, + "ClipboardEvent": false, + "ClipboardItem": false, + "close": false, + "closed": false, + "CloseEvent": false, + "CloseWatcher": false, + "CommandEvent": false, + "Comment": false, + "CompositionEvent": false, + "CompressionStream": false, + "confirm": false, + "console": false, + "ConstantSourceNode": false, + "ContentVisibilityAutoStateChangeEvent": false, + "ConvolverNode": false, + "CookieChangeEvent": false, + "CookieDeprecationLabel": false, + "cookieStore": false, + "CookieStore": false, + "CookieStoreManager": false, + "CountQueuingStrategy": false, + "createImageBitmap": false, + "CreateMonitor": false, + "Credential": false, + "credentialless": false, + "CredentialsContainer": false, + "CropTarget": false, + "crossOriginIsolated": false, + "crypto": false, + "Crypto": false, + "CryptoKey": false, + "CSPViolationReportBody": false, + "CSS": false, + "CSSAnimation": false, + "CSSConditionRule": false, + "CSSContainerRule": false, + "CSSCounterStyleRule": false, + "CSSFontFaceRule": false, + "CSSFontFeatureValuesRule": false, + "CSSFontPaletteValuesRule": false, + "CSSFunctionDeclarations": false, + "CSSFunctionDescriptors": false, + "CSSFunctionRule": false, + "CSSGroupingRule": false, + "CSSImageValue": false, + "CSSImportRule": false, + "CSSKeyframeRule": false, + "CSSKeyframesRule": false, + "CSSKeywordValue": false, + "CSSLayerBlockRule": false, + "CSSLayerStatementRule": false, + "CSSMarginRule": false, + "CSSMathClamp": false, + "CSSMathInvert": false, + "CSSMathMax": false, + "CSSMathMin": false, + "CSSMathNegate": false, + "CSSMathProduct": false, + "CSSMathSum": false, + "CSSMathValue": false, + "CSSMatrixComponent": false, + "CSSMediaRule": false, + "CSSNamespaceRule": false, + "CSSNestedDeclarations": false, + "CSSNumericArray": false, + "CSSNumericValue": false, + "CSSPageDescriptors": false, + "CSSPageRule": false, + "CSSPerspective": false, + "CSSPositionTryDescriptors": false, + "CSSPositionTryRule": false, + "CSSPositionValue": false, + "CSSPropertyRule": false, + "CSSRotate": false, + "CSSRule": false, + "CSSRuleList": false, + "CSSScale": false, + "CSSScopeRule": false, + "CSSSkew": false, + "CSSSkewX": false, + "CSSSkewY": false, + "CSSStartingStyleRule": false, + "CSSStyleDeclaration": false, + "CSSStyleRule": false, + "CSSStyleSheet": false, + "CSSStyleValue": false, + "CSSSupportsRule": false, + "CSSTransformComponent": false, + "CSSTransformValue": false, + "CSSTransition": false, + "CSSTranslate": false, + "CSSUnitValue": false, + "CSSUnparsedValue": false, + "CSSVariableReferenceValue": false, + "CSSViewTransitionRule": false, + "currentFrame": false, + "currentTime": false, + "CustomElementRegistry": false, + "customElements": false, + "CustomEvent": false, + "CustomStateSet": false, + "DataTransfer": false, + "DataTransferItem": false, + "DataTransferItemList": false, + "DecompressionStream": false, + "DelayNode": false, + "DelegatedInkTrailPresenter": false, + "DeviceMotionEvent": false, + "DeviceMotionEventAcceleration": false, + "DeviceMotionEventRotationRate": false, + "DeviceOrientationEvent": false, + "devicePixelRatio": false, + "DevicePosture": false, + "DigitalCredential": false, + "dispatchEvent": false, + "DisposableStack": false, + "document": false, + "Document": false, + "DocumentFragment": false, + "documentPictureInPicture": false, + "DocumentPictureInPicture": false, + "DocumentPictureInPictureEvent": false, + "DocumentTimeline": false, + "DocumentType": false, + "DOMError": false, + "DOMException": false, + "DOMImplementation": false, + "DOMMatrix": false, + "DOMMatrixReadOnly": false, + "DOMParser": false, + "DOMPoint": false, + "DOMPointReadOnly": false, + "DOMQuad": false, + "DOMRect": false, + "DOMRectList": false, + "DOMRectReadOnly": false, + "DOMStringList": false, + "DOMStringMap": false, + "DOMTokenList": false, + "DragEvent": false, + "DynamicsCompressorNode": false, + "EditContext": false, + "Element": false, + "ElementInternals": false, + "EncodedAudioChunk": false, + "EncodedVideoChunk": false, + "ErrorEvent": false, + "event": false, + "Event": false, + "EventCounts": false, + "EventSource": false, + "EventTarget": false, + "external": false, + "External": false, + "EyeDropper": false, + "FeaturePolicy": false, + "FederatedCredential": false, + "fence": false, + "Fence": false, + "FencedFrameConfig": false, + "fetch": false, + "fetchLater": false, + "FetchLaterResult": false, + "File": false, + "FileList": false, + "FileReader": false, + "FileSystem": false, + "FileSystemDirectoryEntry": false, + "FileSystemDirectoryHandle": false, + "FileSystemDirectoryReader": false, + "FileSystemEntry": false, + "FileSystemFileEntry": false, + "FileSystemFileHandle": false, + "FileSystemHandle": false, + "FileSystemObserver": false, + "FileSystemWritableFileStream": false, + "find": false, + "focus": false, + "FocusEvent": false, + "FontData": false, + "FontFace": false, + "FontFaceSet": false, + "FontFaceSetLoadEvent": false, + "FormData": false, + "FormDataEvent": false, + "FragmentDirective": false, + "frameElement": false, + "frames": false, + "GainNode": false, + "Gamepad": false, + "GamepadAxisMoveEvent": false, + "GamepadButton": false, + "GamepadButtonEvent": false, + "GamepadEvent": false, + "GamepadHapticActuator": false, + "GamepadPose": false, + "Geolocation": false, + "GeolocationCoordinates": false, + "GeolocationPosition": false, + "GeolocationPositionError": false, + "getComputedStyle": false, + "getScreenDetails": false, + "getSelection": false, + "GPU": false, + "GPUAdapter": false, + "GPUAdapterInfo": false, + "GPUBindGroup": false, + "GPUBindGroupLayout": false, + "GPUBuffer": false, + "GPUBufferUsage": false, + "GPUCanvasContext": false, + "GPUColorWrite": false, + "GPUCommandBuffer": false, + "GPUCommandEncoder": false, + "GPUCompilationInfo": false, + "GPUCompilationMessage": false, + "GPUComputePassEncoder": false, + "GPUComputePipeline": false, + "GPUDevice": false, + "GPUDeviceLostInfo": false, + "GPUError": false, + "GPUExternalTexture": false, + "GPUInternalError": false, + "GPUMapMode": false, + "GPUOutOfMemoryError": false, + "GPUPipelineError": false, + "GPUPipelineLayout": false, + "GPUQuerySet": false, + "GPUQueue": false, + "GPURenderBundle": false, + "GPURenderBundleEncoder": false, + "GPURenderPassEncoder": false, + "GPURenderPipeline": false, + "GPUSampler": false, + "GPUShaderModule": false, + "GPUShaderStage": false, + "GPUSupportedFeatures": false, + "GPUSupportedLimits": false, + "GPUTexture": false, + "GPUTextureUsage": false, + "GPUTextureView": false, + "GPUUncapturedErrorEvent": false, + "GPUValidationError": false, + "GravitySensor": false, + "Gyroscope": false, + "HashChangeEvent": false, + "Headers": false, + "HID": false, + "HIDConnectionEvent": false, + "HIDDevice": false, + "HIDInputReportEvent": false, + "Highlight": false, + "HighlightRegistry": false, + "history": false, + "History": false, + "HTMLAllCollection": false, + "HTMLAnchorElement": false, + "HTMLAreaElement": false, + "HTMLAudioElement": false, + "HTMLBaseElement": false, + "HTMLBodyElement": false, + "HTMLBRElement": false, + "HTMLButtonElement": false, + "HTMLCanvasElement": false, + "HTMLCollection": false, + "HTMLDataElement": false, + "HTMLDataListElement": false, + "HTMLDetailsElement": false, + "HTMLDialogElement": false, + "HTMLDirectoryElement": false, + "HTMLDivElement": false, + "HTMLDListElement": false, + "HTMLDocument": false, + "HTMLElement": false, + "HTMLEmbedElement": false, + "HTMLFencedFrameElement": false, + "HTMLFieldSetElement": false, + "HTMLFontElement": false, + "HTMLFormControlsCollection": false, + "HTMLFormElement": false, + "HTMLFrameElement": false, + "HTMLFrameSetElement": false, + "HTMLHeadElement": false, + "HTMLHeadingElement": false, + "HTMLHRElement": false, + "HTMLHtmlElement": false, + "HTMLIFrameElement": false, + "HTMLImageElement": false, + "HTMLInputElement": false, + "HTMLLabelElement": false, + "HTMLLegendElement": false, + "HTMLLIElement": false, + "HTMLLinkElement": false, + "HTMLMapElement": false, + "HTMLMarqueeElement": false, + "HTMLMediaElement": false, + "HTMLMenuElement": false, + "HTMLMetaElement": false, + "HTMLMeterElement": false, + "HTMLModElement": false, + "HTMLObjectElement": false, + "HTMLOListElement": false, + "HTMLOptGroupElement": false, + "HTMLOptionElement": false, + "HTMLOptionsCollection": false, + "HTMLOutputElement": false, + "HTMLParagraphElement": false, + "HTMLParamElement": false, + "HTMLPictureElement": false, + "HTMLPreElement": false, + "HTMLProgressElement": false, + "HTMLQuoteElement": false, + "HTMLScriptElement": false, + "HTMLSelectedContentElement": false, + "HTMLSelectElement": false, + "HTMLSlotElement": false, + "HTMLSourceElement": false, + "HTMLSpanElement": false, + "HTMLStyleElement": false, + "HTMLTableCaptionElement": false, + "HTMLTableCellElement": false, + "HTMLTableColElement": false, + "HTMLTableElement": false, + "HTMLTableRowElement": false, + "HTMLTableSectionElement": false, + "HTMLTemplateElement": false, + "HTMLTextAreaElement": false, + "HTMLTimeElement": false, + "HTMLTitleElement": false, + "HTMLTrackElement": false, + "HTMLUListElement": false, + "HTMLUnknownElement": false, + "HTMLVideoElement": false, + "IDBCursor": false, + "IDBCursorWithValue": false, + "IDBDatabase": false, + "IDBFactory": false, + "IDBIndex": false, + "IDBKeyRange": false, + "IDBObjectStore": false, + "IDBOpenDBRequest": false, + "IDBRecord": false, + "IDBRequest": false, + "IDBTransaction": false, + "IDBVersionChangeEvent": false, + "IdentityCredential": false, + "IdentityCredentialError": false, + "IdentityProvider": false, + "IdleDeadline": false, + "IdleDetector": false, + "IIRFilterNode": false, + "Image": false, + "ImageBitmap": false, + "ImageBitmapRenderingContext": false, + "ImageCapture": false, + "ImageData": false, + "ImageDecoder": false, + "ImageTrack": false, + "ImageTrackList": false, + "indexedDB": false, + "Ink": false, + "innerHeight": false, + "innerWidth": false, + "InputDeviceCapabilities": false, + "InputDeviceInfo": false, + "InputEvent": false, + "IntegrityViolationReportBody": false, + "InterestEvent": false, + "IntersectionObserver": false, + "IntersectionObserverEntry": false, + "isSecureContext": false, + "Keyboard": false, + "KeyboardEvent": false, + "KeyboardLayoutMap": false, + "KeyframeEffect": false, + "LanguageDetector": false, + "LargestContentfulPaint": false, + "LaunchParams": false, + "launchQueue": false, + "LaunchQueue": false, + "LayoutShift": false, + "LayoutShiftAttribution": false, + "length": false, + "LinearAccelerationSensor": false, + "localStorage": false, + "location": true, + "Location": false, + "locationbar": false, + "Lock": false, + "LockManager": false, + "matchMedia": false, + "MathMLElement": false, + "MediaCapabilities": false, + "MediaCapabilitiesInfo": false, + "MediaDeviceInfo": false, + "MediaDevices": false, + "MediaElementAudioSourceNode": false, + "MediaEncryptedEvent": false, + "MediaError": false, + "MediaKeyError": false, + "MediaKeyMessageEvent": false, + "MediaKeys": false, + "MediaKeySession": false, + "MediaKeyStatusMap": false, + "MediaKeySystemAccess": false, + "MediaList": false, + "MediaMetadata": false, + "MediaQueryList": false, + "MediaQueryListEvent": false, + "MediaRecorder": false, + "MediaRecorderErrorEvent": false, + "MediaSession": false, + "MediaSource": false, + "MediaSourceHandle": false, + "MediaStream": false, + "MediaStreamAudioDestinationNode": false, + "MediaStreamAudioSourceNode": false, + "MediaStreamEvent": false, + "MediaStreamTrack": false, + "MediaStreamTrackAudioSourceNode": false, + "MediaStreamTrackAudioStats": false, + "MediaStreamTrackEvent": false, + "MediaStreamTrackGenerator": false, + "MediaStreamTrackProcessor": false, + "MediaStreamTrackVideoStats": false, + "menubar": false, + "MessageChannel": false, + "MessageEvent": false, + "MessagePort": false, + "MIDIAccess": false, + "MIDIConnectionEvent": false, + "MIDIInput": false, + "MIDIInputMap": false, + "MIDIMessageEvent": false, + "MIDIOutput": false, + "MIDIOutputMap": false, + "MIDIPort": false, + "MimeType": false, + "MimeTypeArray": false, + "model": false, + "ModelGenericSession": false, + "ModelManager": false, + "MouseEvent": false, + "moveBy": false, + "moveTo": false, + "MutationEvent": false, + "MutationObserver": false, + "MutationRecord": false, + "name": false, + "NamedNodeMap": false, + "NavigateEvent": false, + "navigation": false, + "Navigation": false, + "NavigationActivation": false, + "NavigationCurrentEntryChangeEvent": false, + "NavigationDestination": false, + "NavigationHistoryEntry": false, + "NavigationPrecommitController": false, + "NavigationPreloadManager": false, + "NavigationTransition": false, + "navigator": false, + "Navigator": false, + "NavigatorLogin": false, + "NavigatorManagedData": false, + "NavigatorUAData": false, + "NetworkInformation": false, + "Node": false, + "NodeFilter": false, + "NodeIterator": false, + "NodeList": false, + "Notification": false, + "NotifyPaintEvent": false, + "NotRestoredReasonDetails": false, + "NotRestoredReasons": false, + "Observable": false, + "OfflineAudioCompletionEvent": false, + "OfflineAudioContext": false, + "offscreenBuffering": false, + "OffscreenCanvas": false, + "OffscreenCanvasRenderingContext2D": false, + "onabort": true, + "onafterprint": true, + "onanimationcancel": true, + "onanimationend": true, + "onanimationiteration": true, + "onanimationstart": true, + "onappinstalled": true, + "onauxclick": true, + "onbeforeinput": true, + "onbeforeinstallprompt": true, + "onbeforematch": true, + "onbeforeprint": true, + "onbeforetoggle": true, + "onbeforeunload": true, + "onbeforexrselect": true, + "onblur": true, + "oncancel": true, + "oncanplay": true, + "oncanplaythrough": true, + "onchange": true, + "onclick": true, + "onclose": true, + "oncommand": true, + "oncontentvisibilityautostatechange": true, + "oncontextlost": true, + "oncontextmenu": true, + "oncontextrestored": true, + "oncopy": true, + "oncuechange": true, + "oncut": true, + "ondblclick": true, + "ondevicemotion": true, + "ondeviceorientation": true, + "ondeviceorientationabsolute": true, + "ondrag": true, + "ondragend": true, + "ondragenter": true, + "ondragleave": true, + "ondragover": true, + "ondragstart": true, + "ondrop": true, + "ondurationchange": true, + "onemptied": true, + "onended": true, + "onerror": true, + "onfocus": true, + "onformdata": true, + "ongamepadconnected": true, + "ongamepaddisconnected": true, + "ongotpointercapture": true, + "onhashchange": true, + "oninput": true, + "oninvalid": true, + "onkeydown": true, + "onkeypress": true, + "onkeyup": true, + "onlanguagechange": true, + "onload": true, + "onloadeddata": true, + "onloadedmetadata": true, + "onloadstart": true, + "onlostpointercapture": true, + "onmessage": true, + "onmessageerror": true, + "onmousedown": true, + "onmouseenter": true, + "onmouseleave": true, + "onmousemove": true, + "onmouseout": true, + "onmouseover": true, + "onmouseup": true, + "onmousewheel": true, + "onoffline": true, + "ononline": true, + "onpagehide": true, + "onpagereveal": true, + "onpageshow": true, + "onpageswap": true, + "onpaste": true, + "onpause": true, + "onplay": true, + "onplaying": true, + "onpointercancel": true, + "onpointerdown": true, + "onpointerenter": true, + "onpointerleave": true, + "onpointermove": true, + "onpointerout": true, + "onpointerover": true, + "onpointerrawupdate": true, + "onpointerup": true, + "onpopstate": true, + "onprogress": true, + "onratechange": true, + "onrejectionhandled": true, + "onreset": true, + "onresize": true, + "onscroll": true, + "onscrollend": true, + "onscrollsnapchange": true, + "onscrollsnapchanging": true, + "onsearch": true, + "onsecuritypolicyviolation": true, + "onseeked": true, + "onseeking": true, + "onselect": true, + "onselectionchange": true, + "onselectstart": true, + "onslotchange": true, + "onstalled": true, + "onstorage": true, + "onsubmit": true, + "onsuspend": true, + "ontimeupdate": true, + "ontoggle": true, + "ontransitioncancel": true, + "ontransitionend": true, + "ontransitionrun": true, + "ontransitionstart": true, + "onunhandledrejection": true, + "onunload": true, + "onvolumechange": true, + "onwaiting": true, + "onwheel": true, + "open": false, + "opener": false, + "Option": false, + "OrientationSensor": false, + "origin": false, + "originAgentCluster": false, + "OscillatorNode": false, + "OTPCredential": false, + "outerHeight": false, + "outerWidth": false, + "OverconstrainedError": false, + "PageRevealEvent": false, + "PageSwapEvent": false, + "PageTransitionEvent": false, + "pageXOffset": false, + "pageYOffset": false, + "PannerNode": false, + "parent": false, + "PasswordCredential": false, + "Path2D": false, + "PaymentAddress": false, + "PaymentManager": false, + "PaymentMethodChangeEvent": false, + "PaymentRequest": false, + "PaymentRequestUpdateEvent": false, + "PaymentResponse": false, + "performance": false, + "Performance": false, + "PerformanceElementTiming": false, + "PerformanceEntry": false, + "PerformanceEventTiming": false, + "PerformanceLongAnimationFrameTiming": false, + "PerformanceLongTaskTiming": false, + "PerformanceMark": false, + "PerformanceMeasure": false, + "PerformanceNavigation": false, + "PerformanceNavigationTiming": false, + "PerformanceObserver": false, + "PerformanceObserverEntryList": false, + "PerformancePaintTiming": false, + "PerformanceResourceTiming": false, + "PerformanceScriptTiming": false, + "PerformanceServerTiming": false, + "PerformanceTiming": false, + "PeriodicSyncManager": false, + "PeriodicWave": false, + "Permissions": false, + "PermissionStatus": false, + "PERSISTENT": false, + "personalbar": false, + "PictureInPictureEvent": false, + "PictureInPictureWindow": false, + "Plugin": false, + "PluginArray": false, + "PointerEvent": false, + "PopStateEvent": false, + "postMessage": false, + "Presentation": false, + "PresentationAvailability": false, + "PresentationConnection": false, + "PresentationConnectionAvailableEvent": false, + "PresentationConnectionCloseEvent": false, + "PresentationConnectionList": false, + "PresentationReceiver": false, + "PresentationRequest": false, + "PressureObserver": false, + "PressureRecord": false, + "print": false, + "ProcessingInstruction": false, + "Profiler": false, + "ProgressEvent": false, + "PromiseRejectionEvent": false, + "prompt": false, + "ProtectedAudience": false, + "PublicKeyCredential": false, + "PushManager": false, + "PushSubscription": false, + "PushSubscriptionOptions": false, + "queryLocalFonts": false, + "queueMicrotask": false, + "QuotaExceededError": false, + "RadioNodeList": false, + "Range": false, + "ReadableByteStreamController": false, + "ReadableStream": false, + "ReadableStreamBYOBReader": false, + "ReadableStreamBYOBRequest": false, + "ReadableStreamDefaultController": false, + "ReadableStreamDefaultReader": false, + "registerProcessor": false, + "RelativeOrientationSensor": false, + "RemotePlayback": false, + "removeEventListener": false, + "ReportBody": false, + "reportError": false, + "ReportingObserver": false, + "Request": false, + "requestAnimationFrame": false, + "requestIdleCallback": false, + "resizeBy": false, + "ResizeObserver": false, + "ResizeObserverEntry": false, + "ResizeObserverSize": false, + "resizeTo": false, + "Response": false, + "RestrictionTarget": false, + "RTCCertificate": false, + "RTCDataChannel": false, + "RTCDataChannelEvent": false, + "RTCDtlsTransport": false, + "RTCDTMFSender": false, + "RTCDTMFToneChangeEvent": false, + "RTCEncodedAudioFrame": false, + "RTCEncodedVideoFrame": false, + "RTCError": false, + "RTCErrorEvent": false, + "RTCIceCandidate": false, + "RTCIceTransport": false, + "RTCPeerConnection": false, + "RTCPeerConnectionIceErrorEvent": false, + "RTCPeerConnectionIceEvent": false, + "RTCRtpReceiver": false, + "RTCRtpScriptTransform": false, + "RTCRtpSender": false, + "RTCRtpTransceiver": false, + "RTCSctpTransport": false, + "RTCSessionDescription": false, + "RTCStatsReport": false, + "RTCTrackEvent": false, + "sampleRate": false, + "scheduler": false, + "Scheduler": false, + "Scheduling": false, + "screen": false, + "Screen": false, + "ScreenDetailed": false, + "ScreenDetails": false, + "screenLeft": false, + "ScreenOrientation": false, + "screenTop": false, + "screenX": false, + "screenY": false, + "ScriptProcessorNode": false, + "scroll": false, + "scrollbars": false, + "scrollBy": false, + "ScrollTimeline": false, + "scrollTo": false, + "scrollX": false, + "scrollY": false, + "SecurityPolicyViolationEvent": false, + "Selection": false, + "self": false, + "Sensor": false, + "SensorErrorEvent": false, + "Serial": false, + "SerialPort": false, + "ServiceWorker": false, + "ServiceWorkerContainer": false, + "ServiceWorkerRegistration": false, + "sessionStorage": false, + "setInterval": false, + "setTimeout": false, + "ShadowRoot": false, + "sharedStorage": false, + "SharedStorage": false, + "SharedStorageAppendMethod": false, + "SharedStorageClearMethod": false, + "SharedStorageDeleteMethod": false, + "SharedStorageModifierMethod": false, + "SharedStorageSetMethod": false, + "SharedStorageWorklet": false, + "SharedWorker": false, + "showDirectoryPicker": false, + "showOpenFilePicker": false, + "showSaveFilePicker": false, + "SnapEvent": false, + "SourceBuffer": false, + "SourceBufferList": false, + "SpeechGrammar": false, + "SpeechGrammarList": false, + "SpeechRecognition": false, + "SpeechRecognitionErrorEvent": false, + "SpeechRecognitionEvent": false, + "SpeechRecognitionPhrase": false, + "speechSynthesis": false, + "SpeechSynthesis": false, + "SpeechSynthesisErrorEvent": false, + "SpeechSynthesisEvent": false, + "SpeechSynthesisUtterance": false, + "SpeechSynthesisVoice": false, + "StaticRange": false, + "status": false, + "statusbar": false, + "StereoPannerNode": false, + "stop": false, + "Storage": false, + "StorageBucket": false, + "StorageBucketManager": false, + "StorageEvent": false, + "StorageManager": false, + "structuredClone": false, + "styleMedia": false, + "StylePropertyMap": false, + "StylePropertyMapReadOnly": false, + "StyleSheet": false, + "StyleSheetList": false, + "SubmitEvent": false, + "Subscriber": false, + "SubtleCrypto": false, + "Summarizer": false, + "SuppressedError": false, + "SVGAElement": false, + "SVGAngle": false, + "SVGAnimatedAngle": false, + "SVGAnimatedBoolean": false, + "SVGAnimatedEnumeration": false, + "SVGAnimatedInteger": false, + "SVGAnimatedLength": false, + "SVGAnimatedLengthList": false, + "SVGAnimatedNumber": false, + "SVGAnimatedNumberList": false, + "SVGAnimatedPreserveAspectRatio": false, + "SVGAnimatedRect": false, + "SVGAnimatedString": false, + "SVGAnimatedTransformList": false, + "SVGAnimateElement": false, + "SVGAnimateMotionElement": false, + "SVGAnimateTransformElement": false, + "SVGAnimationElement": false, + "SVGCircleElement": false, + "SVGClipPathElement": false, + "SVGComponentTransferFunctionElement": false, + "SVGDefsElement": false, + "SVGDescElement": false, + "SVGElement": false, + "SVGEllipseElement": false, + "SVGFEBlendElement": false, + "SVGFEColorMatrixElement": false, + "SVGFEComponentTransferElement": false, + "SVGFECompositeElement": false, + "SVGFEConvolveMatrixElement": false, + "SVGFEDiffuseLightingElement": false, + "SVGFEDisplacementMapElement": false, + "SVGFEDistantLightElement": false, + "SVGFEDropShadowElement": false, + "SVGFEFloodElement": false, + "SVGFEFuncAElement": false, + "SVGFEFuncBElement": false, + "SVGFEFuncGElement": false, + "SVGFEFuncRElement": false, + "SVGFEGaussianBlurElement": false, + "SVGFEImageElement": false, + "SVGFEMergeElement": false, + "SVGFEMergeNodeElement": false, + "SVGFEMorphologyElement": false, + "SVGFEOffsetElement": false, + "SVGFEPointLightElement": false, + "SVGFESpecularLightingElement": false, + "SVGFESpotLightElement": false, + "SVGFETileElement": false, + "SVGFETurbulenceElement": false, + "SVGFilterElement": false, + "SVGForeignObjectElement": false, + "SVGGElement": false, + "SVGGeometryElement": false, + "SVGGradientElement": false, + "SVGGraphicsElement": false, + "SVGImageElement": false, + "SVGLength": false, + "SVGLengthList": false, + "SVGLinearGradientElement": false, + "SVGLineElement": false, + "SVGMarkerElement": false, + "SVGMaskElement": false, + "SVGMatrix": false, + "SVGMetadataElement": false, + "SVGMPathElement": false, + "SVGNumber": false, + "SVGNumberList": false, + "SVGPathElement": false, + "SVGPatternElement": false, + "SVGPoint": false, + "SVGPointList": false, + "SVGPolygonElement": false, + "SVGPolylineElement": false, + "SVGPreserveAspectRatio": false, + "SVGRadialGradientElement": false, + "SVGRect": false, + "SVGRectElement": false, + "SVGScriptElement": false, + "SVGSetElement": false, + "SVGStopElement": false, + "SVGStringList": false, + "SVGStyleElement": false, + "SVGSVGElement": false, + "SVGSwitchElement": false, + "SVGSymbolElement": false, + "SVGTextContentElement": false, + "SVGTextElement": false, + "SVGTextPathElement": false, + "SVGTextPositioningElement": false, + "SVGTitleElement": false, + "SVGTransform": false, + "SVGTransformList": false, + "SVGTSpanElement": false, + "SVGUnitTypes": false, + "SVGUseElement": false, + "SVGViewElement": false, + "SyncManager": false, + "TaskAttributionTiming": false, + "TaskController": false, + "TaskPriorityChangeEvent": false, + "TaskSignal": false, + "TEMPORARY": false, + "Text": false, + "TextDecoder": false, + "TextDecoderStream": false, + "TextEncoder": false, + "TextEncoderStream": false, + "TextEvent": false, + "TextFormat": false, + "TextFormatUpdateEvent": false, + "TextMetrics": false, + "TextTrack": false, + "TextTrackCue": false, + "TextTrackCueList": false, + "TextTrackList": false, + "TextUpdateEvent": false, + "TimeEvent": false, + "TimeRanges": false, + "ToggleEvent": false, + "toolbar": false, + "top": false, + "Touch": false, + "TouchEvent": false, + "TouchList": false, + "TrackEvent": false, + "TransformStream": false, + "TransformStreamDefaultController": false, + "TransitionEvent": false, + "Translator": false, + "TreeWalker": false, + "TrustedHTML": false, + "TrustedScript": false, + "TrustedScriptURL": false, + "TrustedTypePolicy": false, + "TrustedTypePolicyFactory": false, + "trustedTypes": false, + "UIEvent": false, + "URL": false, + "URLPattern": false, + "URLSearchParams": false, + "USB": false, + "USBAlternateInterface": false, + "USBConfiguration": false, + "USBConnectionEvent": false, + "USBDevice": false, + "USBEndpoint": false, + "USBInterface": false, + "USBInTransferResult": false, + "USBIsochronousInTransferPacket": false, + "USBIsochronousInTransferResult": false, + "USBIsochronousOutTransferPacket": false, + "USBIsochronousOutTransferResult": false, + "USBOutTransferResult": false, + "UserActivation": false, + "ValidityState": false, + "VideoColorSpace": false, + "VideoDecoder": false, + "VideoEncoder": false, + "VideoFrame": false, + "VideoPlaybackQuality": false, + "viewport": false, + "Viewport": false, + "ViewTimeline": false, + "ViewTransition": false, + "ViewTransitionTypeSet": false, + "VirtualKeyboard": false, + "VirtualKeyboardGeometryChangeEvent": false, + "VisibilityStateEntry": false, + "visualViewport": false, + "VisualViewport": false, + "VTTCue": false, + "VTTRegion": false, + "WakeLock": false, + "WakeLockSentinel": false, + "WaveShaperNode": false, + "WebAssembly": false, + "WebGL2RenderingContext": false, + "WebGLActiveInfo": false, + "WebGLBuffer": false, + "WebGLContextEvent": false, + "WebGLFramebuffer": false, + "WebGLObject": false, + "WebGLProgram": false, + "WebGLQuery": false, + "WebGLRenderbuffer": false, + "WebGLRenderingContext": false, + "WebGLSampler": false, + "WebGLShader": false, + "WebGLShaderPrecisionFormat": false, + "WebGLSync": false, + "WebGLTexture": false, + "WebGLTransformFeedback": false, + "WebGLUniformLocation": false, + "WebGLVertexArrayObject": false, + "WebSocket": false, + "WebSocketError": false, + "WebSocketStream": false, + "WebTransport": false, + "WebTransportBidirectionalStream": false, + "WebTransportDatagramDuplexStream": false, + "WebTransportError": false, + "WebTransportReceiveStream": false, + "WebTransportSendStream": false, + "WGSLLanguageFeatures": false, + "WheelEvent": false, + "when": false, + "window": false, + "Window": false, + "WindowControlsOverlay": false, + "WindowControlsOverlayGeometryChangeEvent": false, + "Worker": false, + "Worklet": false, + "WorkletGlobalScope": false, + "WritableStream": false, + "WritableStreamDefaultController": false, + "WritableStreamDefaultWriter": false, + "XMLDocument": false, + "XMLHttpRequest": false, + "XMLHttpRequestEventTarget": false, + "XMLHttpRequestUpload": false, + "XMLSerializer": false, + "XPathEvaluator": false, + "XPathExpression": false, + "XPathResult": false, + "XRAnchor": false, + "XRAnchorSet": false, + "XRBoundedReferenceSpace": false, + "XRCamera": false, + "XRCPUDepthInformation": false, + "XRDepthInformation": false, + "XRDOMOverlayState": false, + "XRFrame": false, + "XRHand": false, + "XRHitTestResult": false, + "XRHitTestSource": false, + "XRInputSource": false, + "XRInputSourceArray": false, + "XRInputSourceEvent": false, + "XRInputSourcesChangeEvent": false, + "XRJointPose": false, + "XRJointSpace": false, + "XRLayer": false, + "XRLightEstimate": false, + "XRLightProbe": false, + "XRPose": false, + "XRRay": false, + "XRReferenceSpace": false, + "XRReferenceSpaceEvent": false, + "XRRenderState": false, + "XRRigidTransform": false, + "XRSession": false, + "XRSessionEvent": false, + "XRSpace": false, + "XRSystem": false, + "XRTransientInputHitTestResult": false, + "XRTransientInputHitTestSource": false, + "XRView": false, + "XRViewerPose": false, + "XRViewport": false, + "XRWebGLBinding": false, + "XRWebGLDepthInformation": false, + "XRWebGLLayer": false, + "XSLTProcessor": false + } + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-undef', + message: "'PromiseRejectionEvent' is not defined.", + messageId: 'undef', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 0, + endLine: 1, + endColumn: 21, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-undef > valid + +```js +/*global b:false*/ function f() { b = 1; } +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-undef', + message: "'b' is not defined.", + messageId: 'undef', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 34, + endLine: 1, + endColumn: 35, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-undef > valid + +```js +function f() { b = 1; } +``` + +```json +{ + "languageOptions": { + "globals": { + "b": false + } + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-undef', + message: "'b' is not defined.", + messageId: 'undef', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 15, + endLine: 1, + endColumn: 16, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-undef > valid + +```js +/*global b:false*/ function f() { b++; } +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-undef', + message: "'b' is not defined.", + messageId: 'undef', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 34, + endLine: 1, + endColumn: 35, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-undef > valid + +```js +/*global b*/ b = 1; +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-undef', + message: "'b' is not defined.", + messageId: 'undef', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 13, + endLine: 1, + endColumn: 14, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-undef > valid + +```js +/*global b:false*/ var b = 1; +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-undef', + message: "'b' is not defined.", + messageId: 'undef', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 23, + endLine: 1, + endColumn: 24, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-undef > valid + +```js +var {bacon, ...others} = stuff; foo(others) +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2018, + "globals": { + "stuff": false, + "foo": false + } + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 5: [ + { + ruleId: 'rule-to-test/no-undef', + message: "'bacon' is not defined.", + messageId: 'undef', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 5, + endLine: 1, + endColumn: 10, + suggestions: null + }, + { + ruleId: 'rule-to-test/no-undef', + message: "'others' is not defined.", + messageId: 'undef', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 15, + endLine: 1, + endColumn: 21, + suggestions: null + }, + { + ruleId: 'rule-to-test/no-undef', + message: "'stuff' is not defined.", + messageId: 'undef', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 25, + endLine: 1, + endColumn: 30, + suggestions: null + }, + { + ruleId: 'rule-to-test/no-undef', + message: "'foo' is not defined.", + messageId: 'undef', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 32, + endLine: 1, + endColumn: 35, + suggestions: null + }, + { + ruleId: 'rule-to-test/no-undef', + message: "'others' is not defined.", + messageId: 'undef', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 36, + endLine: 1, + endColumn: 42, + suggestions: null + } +] + +5 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-undef > valid + +```js +var a; class C { static {} } a; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2022 + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-undef', + message: "'a' is not defined.", + messageId: 'undef', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 29, + endLine: 1, + endColumn: 30, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-undef > valid + +```js +a; class C { static {} } var a; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2022 + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-undef', + message: "'a' is not defined.", + messageId: 'undef', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 0, + endLine: 1, + endColumn: 1, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-undef > invalid + +```js +var a = b; +``` + +```json +{ + "errors": [ + { + "messageId": "undef", + "data": { + "name": "b" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 2: [ + { + ruleId: 'rule-to-test/no-undef', + message: "'a' is not defined.", + messageId: 'undef', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 4, + endLine: 1, + endColumn: 5, + suggestions: null + }, + { + ruleId: 'rule-to-test/no-undef', + message: "'b' is not defined.", + messageId: 'undef', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 8, + endLine: 1, + endColumn: 9, + suggestions: null + } +] + +2 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-undef > invalid + +```js +Intl; +``` + +```json +{ + "errors": [ + { + "messageId": "undef", + "data": { + "name": "Intl" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-undef > invalid + +```js +var React; React.render(); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "parserOptions": { + "ecmaFeatures": { + "jsx": true + } + } + }, + "errors": [ + { + "messageId": "undef", + "data": { + "name": "a" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 3: [ + { + ruleId: 'rule-to-test/no-undef', + message: "'React' is not defined.", + messageId: 'undef', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 11, + endLine: 1, + endColumn: 16, + suggestions: null + }, + { + ruleId: 'rule-to-test/no-undef', + message: "'React' is not defined.", + messageId: 'undef', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 4, + endLine: 1, + endColumn: 9, + suggestions: null + }, + { + ruleId: 'rule-to-test/no-undef', + message: "'a' is not defined.", + messageId: 'undef', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 35, + endLine: 1, + endColumn: 36, + suggestions: null + } +] + +3 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-undef > invalid + +```js +var React, App; React.render(); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "parserOptions": { + "ecmaFeatures": { + "jsx": true + } + } + }, + "errors": [ + { + "messageId": "undef", + "data": { + "name": "a" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 4: [ + { + ruleId: 'rule-to-test/no-undef', + message: "'React' is not defined.", + messageId: 'undef', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 16, + endLine: 1, + endColumn: 21, + suggestions: null + }, + { + ruleId: 'rule-to-test/no-undef', + message: "'React' is not defined.", + messageId: 'undef', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 4, + endLine: 1, + endColumn: 9, + suggestions: null + }, + { + ruleId: 'rule-to-test/no-undef', + message: "'App' is not defined.", + messageId: 'undef', + severity: 1, + nodeType: 'JSXIdentifier', + line: 1, + column: 30, + endLine: 1, + endColumn: 33, + suggestions: null + }, + { + ruleId: 'rule-to-test/no-undef', + message: "'a' is not defined.", + messageId: 'undef', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 40, + endLine: 1, + endColumn: 41, + suggestions: null + } +] + +4 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +### `no-undefined` + +Pass: 36 / 53 (67.9%) +Fail: 17 / 53 (32.1%) + +#### no-undefined > invalid + +```js +undefined +``` + +```json +{ + "errors": [ + { + "messageId": "unexpectedUndefined" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-undefined > invalid + +```js +undefined.a +``` + +```json +{ + "errors": [ + { + "messageId": "unexpectedUndefined" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-undefined > invalid + +```js +a[undefined] +``` + +```json +{ + "errors": [ + { + "messageId": "unexpectedUndefined" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-undefined > invalid + +```js +undefined[0] +``` + +```json +{ + "errors": [ + { + "messageId": "unexpectedUndefined" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-undefined > invalid + +```js +f(undefined) +``` + +```json +{ + "errors": [ + { + "messageId": "unexpectedUndefined" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-undefined > invalid + +```js +function f() { undefined = true; } +``` + +```json +{ + "errors": [ + { + "messageId": "unexpectedUndefined" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-undefined > invalid + +```js +undefined = true +``` + +```json +{ + "errors": [ + { + "messageId": "unexpectedUndefined" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-undefined > invalid + +```js +({ undefined }) +``` + +```json +{ + "errors": [ + { + "messageId": "unexpectedUndefined" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-undefined > invalid + +```js +({ [undefined]: foo }) +``` + +```json +{ + "errors": [ + { + "messageId": "unexpectedUndefined" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-undefined > invalid + +```js +({ bar: undefined }) +``` + +```json +{ + "errors": [ + { + "messageId": "unexpectedUndefined" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-undefined > invalid + +```js +({ bar: undefined } = foo) +``` + +```json +{ + "errors": [ + { + "messageId": "unexpectedUndefined" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-undefined > invalid + +```js +class Foo { [undefined]() {} } +``` + +```json +{ + "errors": [ + { + "messageId": "unexpectedUndefined" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-undefined > invalid + +```js +(class { [undefined]() {} }) +``` + +```json +{ + "errors": [ + { + "messageId": "unexpectedUndefined" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-undefined > invalid + +```js +var undefined = true; undefined = false; +``` + +```json +{ + "errors": [ + { + "messageId": "unexpectedUndefined", + "column": 5 + }, + { + "messageId": "unexpectedUndefined", + "column": 23 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Actual error location does not match expected error location. ++ actual - expected + + { ++ column: 23 +- column: 5 + } + + at assertInvalidTestCaseLocationIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-undefined > invalid + +```js +let a = [b, ...undefined] +``` + +```json +{ + "errors": [ + { + "messageId": "unexpectedUndefined" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-undefined > invalid + +```js +[a, ...undefined] = b +``` + +```json +{ + "errors": [ + { + "messageId": "unexpectedUndefined" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-undefined > invalid + +```js +[a = undefined] = b +``` + +```json +{ + "errors": [ + { + "messageId": "unexpectedUndefined" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +### `no-unexpected-multiline` + +Pass: 55 / 56 (98.2%) +Fail: 1 / 56 (1.8%) + +#### no-unexpected-multiline > invalid + +```js +const x = aaaa< + test +>/* +test +*/`foo` +``` + +```json +{ + "languageOptions": { + "parser": {} + }, + "errors": [ + { + "line": 5, + "column": 3, + "endLine": 5, + "endColumn": 4, + "messageId": "taggedTemplate" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +### `no-unneeded-ternary` + +Pass: 45 / 47 (95.7%) +Fail: 2 / 47 (4.3%) + +#### no-unneeded-ternary > invalid + +```js +foo as any ? false : true +``` + +```json +{ + "output": "!(foo as any)", + "languageOptions": { + "parser": {}, + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "unnecessaryConditionalExpression" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-unneeded-ternary > invalid + +```js +foo ? foo : bar as any +``` + +```json +{ + "output": "foo || (bar as any)", + "options": [ + { + "defaultAssignment": false + } + ], + "languageOptions": { + "parser": {}, + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "unnecessaryConditionalAssignment" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +### `no-unreachable-loop` + +Pass: 800 / 1628 (49.1%) +Fail: 828 / 1628 (50.9%) + +#### no-unreachable-loop > invalid + +```js +while (a) break; +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +while (a) { break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { while (a) return; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { while (a) { return; } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +while (a) throw err; +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +while (a) { throw err; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +while (a) { foo(); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +while (a) { break; foo(); } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { while (a) if (foo) break; else return; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { while (a) { if (foo) { return; } else { break; } bar(); } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { while (a) { if (foo) { return; } throw err; } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +while (a) { switch (foo) { default: throw err; } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { while (a) { switch (foo) { case 1: throw err; default: return; } } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { while (a) { switch (foo) { case 1: something(); default: return; } } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { while (a) { try { return bar(); } catch (e) { break; } } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +while (a) { break; continue; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +while (a) { () => a; break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +while (a) { (() => a)(); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +while (a) { while (a); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +while (a) { do ; while (a) break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +while (a) { for (a; b; c); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +while (a) { for (; b;); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +while (a) { for (; ; c) if (foo) break; break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +while (a) { for(;;) if (foo) break; break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +while (a) { for (a in b); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +while (a) { for (a of b); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +while (a) for (;;); +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +while (a) { for (var i = 0; ; i< 10) { foo(); } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +while (a) while (true); +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +while (a && b) break; +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +while (a && b) { break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { while (a && b) return; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { while (a && b) { return; } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +while (a && b) throw err; +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +while (a && b) { throw err; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +while (a && b) { foo(); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +while (a && b) { break; foo(); } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { while (a && b) if (foo) break; else return; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { while (a && b) { if (foo) { return; } else { break; } bar(); } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { while (a && b) { if (foo) { return; } throw err; } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +while (a && b) { switch (foo) { default: throw err; } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { while (a && b) { switch (foo) { case 1: throw err; default: return; } } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { while (a && b) { switch (foo) { case 1: something(); default: return; } } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { while (a && b) { try { return bar(); } catch (e) { break; } } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +while (a && b) { break; continue; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +while (a && b) { () => a; break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +while (a && b) { (() => a)(); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +while (a && b) { while (a); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +while (a && b) { do ; while (a) break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +while (a && b) { for (a; b; c); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +while (a && b) { for (; b;); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +while (a && b) { for (; ; c) if (foo) break; break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +while (a && b) { for(;;) if (foo) break; break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +while (a && b) { for (a in b); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +while (a && b) { for (a of b); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +while (a && b) for (;;); +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +while (a && b) { for (var i = 0; ; i< 10) { foo(); } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +while (a && b) while (true); +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +do break; while (a) +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +do { break; } while (a) +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { do return; while (a) } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { do { return; } while (a) } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +do throw err; while (a) +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +do { throw err; } while (a) +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +do { foo(); break; } while (a) +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +do { break; foo(); } while (a) +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { do if (foo) break; else return; while (a) } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { do { if (foo) { return; } else { break; } bar(); } while (a) } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { do { if (foo) { return; } throw err; } while (a) } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +do { switch (foo) { default: throw err; } } while (a) +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { do { switch (foo) { case 1: throw err; default: return; } } while (a) } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { do { switch (foo) { case 1: something(); default: return; } } while (a) } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { do { try { return bar(); } catch (e) { break; } } while (a) } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +do { break; continue; } while (a) +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +do { () => a; break; } while (a) +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +do { (() => a)(); break; } while (a) +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +do { while (a); break; } while (a) +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +do { do ; while (a) break; } while (a) +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +do { for (a; b; c); break; } while (a) +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +do { for (; b;); break; } while (a) +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +do { for (; ; c) if (foo) break; break; } while (a) +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +do { for(;;) if (foo) break; break; } while (a) +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +do { for (a in b); break; } while (a) +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +do { for (a of b); break; } while (a) +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +do for (;;); while (a) +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +do { for (var i = 0; ; i< 10) { foo(); } } while (a) +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +do while (true); while (a) +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +do break; while (a && b) +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +do { break; } while (a && b) +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { do return; while (a && b) } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { do { return; } while (a && b) } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +do throw err; while (a && b) +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +do { throw err; } while (a && b) +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +do { foo(); break; } while (a && b) +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +do { break; foo(); } while (a && b) +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { do if (foo) break; else return; while (a && b) } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { do { if (foo) { return; } else { break; } bar(); } while (a && b) } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { do { if (foo) { return; } throw err; } while (a && b) } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +do { switch (foo) { default: throw err; } } while (a && b) +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { do { switch (foo) { case 1: throw err; default: return; } } while (a && b) } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { do { switch (foo) { case 1: something(); default: return; } } while (a && b) } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { do { try { return bar(); } catch (e) { break; } } while (a && b) } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +do { break; continue; } while (a && b) +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +do { () => a; break; } while (a && b) +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +do { (() => a)(); break; } while (a && b) +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +do { while (a); break; } while (a && b) +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +do { do ; while (a) break; } while (a && b) +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +do { for (a; b; c); break; } while (a && b) +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +do { for (; b;); break; } while (a && b) +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +do { for (; ; c) if (foo) break; break; } while (a && b) +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +do { for(;;) if (foo) break; break; } while (a && b) +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +do { for (a in b); break; } while (a && b) +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +do { for (a of b); break; } while (a && b) +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +do for (;;); while (a && b) +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +do { for (var i = 0; ; i< 10) { foo(); } } while (a && b) +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +do while (true); while (a && b) +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a; b; c) break; +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a; b; c) { break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (a; b; c) return; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (a; b; c) { return; } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a; b; c) throw err; +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a; b; c) { throw err; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a; b; c) { foo(); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a; b; c) { break; foo(); } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (a; b; c) if (foo) break; else return; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (a; b; c) { if (foo) { return; } else { break; } bar(); } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (a; b; c) { if (foo) { return; } throw err; } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a; b; c) { switch (foo) { default: throw err; } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (a; b; c) { switch (foo) { case 1: throw err; default: return; } } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (a; b; c) { switch (foo) { case 1: something(); default: return; } } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (a; b; c) { try { return bar(); } catch (e) { break; } } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a; b; c) { break; continue; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a; b; c) { () => a; break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a; b; c) { (() => a)(); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a; b; c) { while (a); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a; b; c) { do ; while (a) break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a; b; c) { for (a; b; c); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a; b; c) { for (; b;); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a; b; c) { for (; ; c) if (foo) break; break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a; b; c) { for(;;) if (foo) break; break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a; b; c) { for (a in b); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a; b; c) { for (a of b); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a; b; c) for (;;); +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a; b; c) { for (var i = 0; ; i< 10) { foo(); } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a; b; c) while (true); +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (var i = 0; i < a.length; i++) break; +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (var i = 0; i < a.length; i++) { break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (var i = 0; i < a.length; i++) return; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (var i = 0; i < a.length; i++) { return; } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (var i = 0; i < a.length; i++) throw err; +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (var i = 0; i < a.length; i++) { throw err; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (var i = 0; i < a.length; i++) { foo(); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (var i = 0; i < a.length; i++) { break; foo(); } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (var i = 0; i < a.length; i++) if (foo) break; else return; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (var i = 0; i < a.length; i++) { if (foo) { return; } else { break; } bar(); } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (var i = 0; i < a.length; i++) { if (foo) { return; } throw err; } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (var i = 0; i < a.length; i++) { switch (foo) { default: throw err; } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (var i = 0; i < a.length; i++) { switch (foo) { case 1: throw err; default: return; } } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (var i = 0; i < a.length; i++) { switch (foo) { case 1: something(); default: return; } } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (var i = 0; i < a.length; i++) { try { return bar(); } catch (e) { break; } } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (var i = 0; i < a.length; i++) { break; continue; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (var i = 0; i < a.length; i++) { () => a; break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (var i = 0; i < a.length; i++) { (() => a)(); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (var i = 0; i < a.length; i++) { while (a); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (var i = 0; i < a.length; i++) { do ; while (a) break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (var i = 0; i < a.length; i++) { for (a; b; c); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (var i = 0; i < a.length; i++) { for (; b;); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (var i = 0; i < a.length; i++) { for (; ; c) if (foo) break; break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (var i = 0; i < a.length; i++) { for(;;) if (foo) break; break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (var i = 0; i < a.length; i++) { for (a in b); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (var i = 0; i < a.length; i++) { for (a of b); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (var i = 0; i < a.length; i++) for (;;); +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (var i = 0; i < a.length; i++) { for (var i = 0; ; i< 10) { foo(); } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (var i = 0; i < a.length; i++) while (true); +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (; b; c) break; +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (; b; c) { break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (; b; c) return; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (; b; c) { return; } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (; b; c) throw err; +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (; b; c) { throw err; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (; b; c) { foo(); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (; b; c) { break; foo(); } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (; b; c) if (foo) break; else return; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (; b; c) { if (foo) { return; } else { break; } bar(); } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (; b; c) { if (foo) { return; } throw err; } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (; b; c) { switch (foo) { default: throw err; } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (; b; c) { switch (foo) { case 1: throw err; default: return; } } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (; b; c) { switch (foo) { case 1: something(); default: return; } } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (; b; c) { try { return bar(); } catch (e) { break; } } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (; b; c) { break; continue; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (; b; c) { () => a; break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (; b; c) { (() => a)(); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (; b; c) { while (a); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (; b; c) { do ; while (a) break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (; b; c) { for (a; b; c); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (; b; c) { for (; b;); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (; b; c) { for (; ; c) if (foo) break; break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (; b; c) { for(;;) if (foo) break; break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (; b; c) { for (a in b); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (; b; c) { for (a of b); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (; b; c) for (;;); +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (; b; c) { for (var i = 0; ; i< 10) { foo(); } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (; b; c) while (true); +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (; b < foo; c++) break; +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (; b < foo; c++) { break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (; b < foo; c++) return; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (; b < foo; c++) { return; } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (; b < foo; c++) throw err; +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (; b < foo; c++) { throw err; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (; b < foo; c++) { foo(); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (; b < foo; c++) { break; foo(); } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (; b < foo; c++) if (foo) break; else return; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (; b < foo; c++) { if (foo) { return; } else { break; } bar(); } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (; b < foo; c++) { if (foo) { return; } throw err; } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (; b < foo; c++) { switch (foo) { default: throw err; } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (; b < foo; c++) { switch (foo) { case 1: throw err; default: return; } } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (; b < foo; c++) { switch (foo) { case 1: something(); default: return; } } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (; b < foo; c++) { try { return bar(); } catch (e) { break; } } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (; b < foo; c++) { break; continue; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (; b < foo; c++) { () => a; break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (; b < foo; c++) { (() => a)(); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (; b < foo; c++) { while (a); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (; b < foo; c++) { do ; while (a) break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (; b < foo; c++) { for (a; b; c); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (; b < foo; c++) { for (; b;); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (; b < foo; c++) { for (; ; c) if (foo) break; break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (; b < foo; c++) { for(;;) if (foo) break; break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (; b < foo; c++) { for (a in b); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (; b < foo; c++) { for (a of b); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (; b < foo; c++) for (;;); +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (; b < foo; c++) { for (var i = 0; ; i< 10) { foo(); } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (; b < foo; c++) while (true); +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a; ; c) break; +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a; ; c) { break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (a; ; c) return; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (a; ; c) { return; } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a; ; c) throw err; +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a; ; c) { throw err; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a; ; c) { foo(); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a; ; c) { break; foo(); } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (a; ; c) if (foo) break; else return; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (a; ; c) { if (foo) { return; } else { break; } bar(); } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (a; ; c) { if (foo) { return; } throw err; } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a; ; c) { switch (foo) { default: throw err; } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (a; ; c) { switch (foo) { case 1: throw err; default: return; } } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (a; ; c) { switch (foo) { case 1: something(); default: return; } } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (a; ; c) { try { return bar(); } catch (e) { break; } } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a; ; c) { break; continue; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a; ; c) { () => a; break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a; ; c) { (() => a)(); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a; ; c) { while (a); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a; ; c) { do ; while (a) break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a; ; c) { for (a; b; c); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a; ; c) { for (; b;); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a; ; c) { for (; ; c) if (foo) break; break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a; ; c) { for(;;) if (foo) break; break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a; ; c) { for (a in b); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a; ; c) { for (a of b); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a; ; c) for (;;); +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a; ; c) { for (var i = 0; ; i< 10) { foo(); } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a; ; c) while (true); +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a = 0; ; c++) break; +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a = 0; ; c++) { break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (a = 0; ; c++) return; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (a = 0; ; c++) { return; } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a = 0; ; c++) throw err; +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a = 0; ; c++) { throw err; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a = 0; ; c++) { foo(); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a = 0; ; c++) { break; foo(); } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (a = 0; ; c++) if (foo) break; else return; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (a = 0; ; c++) { if (foo) { return; } else { break; } bar(); } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (a = 0; ; c++) { if (foo) { return; } throw err; } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a = 0; ; c++) { switch (foo) { default: throw err; } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (a = 0; ; c++) { switch (foo) { case 1: throw err; default: return; } } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (a = 0; ; c++) { switch (foo) { case 1: something(); default: return; } } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (a = 0; ; c++) { try { return bar(); } catch (e) { break; } } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a = 0; ; c++) { break; continue; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a = 0; ; c++) { () => a; break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a = 0; ; c++) { (() => a)(); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a = 0; ; c++) { while (a); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a = 0; ; c++) { do ; while (a) break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a = 0; ; c++) { for (a; b; c); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a = 0; ; c++) { for (; b;); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a = 0; ; c++) { for (; ; c) if (foo) break; break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a = 0; ; c++) { for(;;) if (foo) break; break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a = 0; ; c++) { for (a in b); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a = 0; ; c++) { for (a of b); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a = 0; ; c++) for (;;); +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a = 0; ; c++) { for (var i = 0; ; i< 10) { foo(); } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a = 0; ; c++) while (true); +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a; b;) break; +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a; b;) { break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (a; b;) return; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (a; b;) { return; } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a; b;) throw err; +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a; b;) { throw err; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a; b;) { foo(); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a; b;) { break; foo(); } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (a; b;) if (foo) break; else return; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (a; b;) { if (foo) { return; } else { break; } bar(); } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (a; b;) { if (foo) { return; } throw err; } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a; b;) { switch (foo) { default: throw err; } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (a; b;) { switch (foo) { case 1: throw err; default: return; } } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (a; b;) { switch (foo) { case 1: something(); default: return; } } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (a; b;) { try { return bar(); } catch (e) { break; } } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a; b;) { break; continue; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a; b;) { () => a; break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a; b;) { (() => a)(); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a; b;) { while (a); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a; b;) { do ; while (a) break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a; b;) { for (a; b; c); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a; b;) { for (; b;); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a; b;) { for (; ; c) if (foo) break; break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a; b;) { for(;;) if (foo) break; break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a; b;) { for (a in b); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a; b;) { for (a of b); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a; b;) for (;;); +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a; b;) { for (var i = 0; ; i< 10) { foo(); } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a; b;) while (true); +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a = 0; b < foo; ) break; +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a = 0; b < foo; ) { break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (a = 0; b < foo; ) return; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (a = 0; b < foo; ) { return; } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a = 0; b < foo; ) throw err; +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a = 0; b < foo; ) { throw err; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a = 0; b < foo; ) { foo(); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a = 0; b < foo; ) { break; foo(); } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (a = 0; b < foo; ) if (foo) break; else return; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (a = 0; b < foo; ) { if (foo) { return; } else { break; } bar(); } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (a = 0; b < foo; ) { if (foo) { return; } throw err; } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a = 0; b < foo; ) { switch (foo) { default: throw err; } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (a = 0; b < foo; ) { switch (foo) { case 1: throw err; default: return; } } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (a = 0; b < foo; ) { switch (foo) { case 1: something(); default: return; } } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (a = 0; b < foo; ) { try { return bar(); } catch (e) { break; } } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a = 0; b < foo; ) { break; continue; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a = 0; b < foo; ) { () => a; break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a = 0; b < foo; ) { (() => a)(); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a = 0; b < foo; ) { while (a); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a = 0; b < foo; ) { do ; while (a) break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a = 0; b < foo; ) { for (a; b; c); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a = 0; b < foo; ) { for (; b;); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a = 0; b < foo; ) { for (; ; c) if (foo) break; break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a = 0; b < foo; ) { for(;;) if (foo) break; break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a = 0; b < foo; ) { for (a in b); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a = 0; b < foo; ) { for (a of b); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a = 0; b < foo; ) for (;;); +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a = 0; b < foo; ) { for (var i = 0; ; i< 10) { foo(); } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a = 0; b < foo; ) while (true); +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (; ; c) break; +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (; ; c) { break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (; ; c) return; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (; ; c) { return; } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (; ; c) throw err; +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (; ; c) { throw err; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (; ; c) { foo(); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (; ; c) { break; foo(); } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (; ; c) if (foo) break; else return; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (; ; c) { if (foo) { return; } else { break; } bar(); } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (; ; c) { if (foo) { return; } throw err; } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (; ; c) { switch (foo) { default: throw err; } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (; ; c) { switch (foo) { case 1: throw err; default: return; } } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (; ; c) { switch (foo) { case 1: something(); default: return; } } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (; ; c) { try { return bar(); } catch (e) { break; } } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (; ; c) { break; continue; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (; ; c) { () => a; break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (; ; c) { (() => a)(); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (; ; c) { while (a); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (; ; c) { do ; while (a) break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (; ; c) { for (a; b; c); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (; ; c) { for (; b;); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (; ; c) { for (; ; c) if (foo) break; break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (; ; c) { for(;;) if (foo) break; break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (; ; c) { for (a in b); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (; ; c) { for (a of b); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (; ; c) for (;;); +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (; ; c) { for (var i = 0; ; i< 10) { foo(); } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (; ; c) while (true); +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (; ; c++) break; +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (; ; c++) { break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (; ; c++) return; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (; ; c++) { return; } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (; ; c++) throw err; +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (; ; c++) { throw err; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (; ; c++) { foo(); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (; ; c++) { break; foo(); } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (; ; c++) if (foo) break; else return; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (; ; c++) { if (foo) { return; } else { break; } bar(); } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (; ; c++) { if (foo) { return; } throw err; } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (; ; c++) { switch (foo) { default: throw err; } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (; ; c++) { switch (foo) { case 1: throw err; default: return; } } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (; ; c++) { switch (foo) { case 1: something(); default: return; } } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (; ; c++) { try { return bar(); } catch (e) { break; } } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (; ; c++) { break; continue; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (; ; c++) { () => a; break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (; ; c++) { (() => a)(); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (; ; c++) { while (a); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (; ; c++) { do ; while (a) break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (; ; c++) { for (a; b; c); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (; ; c++) { for (; b;); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (; ; c++) { for (; ; c) if (foo) break; break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (; ; c++) { for(;;) if (foo) break; break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (; ; c++) { for (a in b); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (; ; c++) { for (a of b); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (; ; c++) for (;;); +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (; ; c++) { for (var i = 0; ; i< 10) { foo(); } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (; ; c++) while (true); +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (; b;) break; +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (; b;) { break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (; b;) return; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (; b;) { return; } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (; b;) throw err; +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (; b;) { throw err; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (; b;) { foo(); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (; b;) { break; foo(); } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (; b;) if (foo) break; else return; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (; b;) { if (foo) { return; } else { break; } bar(); } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (; b;) { if (foo) { return; } throw err; } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (; b;) { switch (foo) { default: throw err; } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (; b;) { switch (foo) { case 1: throw err; default: return; } } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (; b;) { switch (foo) { case 1: something(); default: return; } } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (; b;) { try { return bar(); } catch (e) { break; } } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (; b;) { break; continue; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (; b;) { () => a; break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (; b;) { (() => a)(); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (; b;) { while (a); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (; b;) { do ; while (a) break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (; b;) { for (a; b; c); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (; b;) { for (; b;); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (; b;) { for (; ; c) if (foo) break; break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (; b;) { for(;;) if (foo) break; break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (; b;) { for (a in b); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (; b;) { for (a of b); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (; b;) for (;;); +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (; b;) { for (var i = 0; ; i< 10) { foo(); } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (; b;) while (true); +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (; b < foo; ) break; +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (; b < foo; ) { break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (; b < foo; ) return; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (; b < foo; ) { return; } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (; b < foo; ) throw err; +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (; b < foo; ) { throw err; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (; b < foo; ) { foo(); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (; b < foo; ) { break; foo(); } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (; b < foo; ) if (foo) break; else return; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (; b < foo; ) { if (foo) { return; } else { break; } bar(); } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (; b < foo; ) { if (foo) { return; } throw err; } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (; b < foo; ) { switch (foo) { default: throw err; } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (; b < foo; ) { switch (foo) { case 1: throw err; default: return; } } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (; b < foo; ) { switch (foo) { case 1: something(); default: return; } } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (; b < foo; ) { try { return bar(); } catch (e) { break; } } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (; b < foo; ) { break; continue; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (; b < foo; ) { () => a; break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (; b < foo; ) { (() => a)(); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (; b < foo; ) { while (a); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (; b < foo; ) { do ; while (a) break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (; b < foo; ) { for (a; b; c); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (; b < foo; ) { for (; b;); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (; b < foo; ) { for (; ; c) if (foo) break; break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (; b < foo; ) { for(;;) if (foo) break; break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (; b < foo; ) { for (a in b); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (; b < foo; ) { for (a of b); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (; b < foo; ) for (;;); +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (; b < foo; ) { for (var i = 0; ; i< 10) { foo(); } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (; b < foo; ) while (true); +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a; ;) break; +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a; ;) { break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (a; ;) return; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (a; ;) { return; } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a; ;) throw err; +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a; ;) { throw err; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a; ;) { foo(); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a; ;) { break; foo(); } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (a; ;) if (foo) break; else return; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (a; ;) { if (foo) { return; } else { break; } bar(); } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (a; ;) { if (foo) { return; } throw err; } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a; ;) { switch (foo) { default: throw err; } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (a; ;) { switch (foo) { case 1: throw err; default: return; } } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (a; ;) { switch (foo) { case 1: something(); default: return; } } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (a; ;) { try { return bar(); } catch (e) { break; } } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a; ;) { break; continue; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a; ;) { () => a; break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a; ;) { (() => a)(); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a; ;) { while (a); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a; ;) { do ; while (a) break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a; ;) { for (a; b; c); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a; ;) { for (; b;); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a; ;) { for (; ; c) if (foo) break; break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a; ;) { for(;;) if (foo) break; break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a; ;) { for (a in b); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a; ;) { for (a of b); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a; ;) for (;;); +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a; ;) { for (var i = 0; ; i< 10) { foo(); } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a; ;) while (true); +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a = 0; ;) break; +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a = 0; ;) { break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (a = 0; ;) return; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (a = 0; ;) { return; } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a = 0; ;) throw err; +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a = 0; ;) { throw err; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a = 0; ;) { foo(); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a = 0; ;) { break; foo(); } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (a = 0; ;) if (foo) break; else return; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (a = 0; ;) { if (foo) { return; } else { break; } bar(); } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (a = 0; ;) { if (foo) { return; } throw err; } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a = 0; ;) { switch (foo) { default: throw err; } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (a = 0; ;) { switch (foo) { case 1: throw err; default: return; } } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (a = 0; ;) { switch (foo) { case 1: something(); default: return; } } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (a = 0; ;) { try { return bar(); } catch (e) { break; } } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a = 0; ;) { break; continue; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a = 0; ;) { () => a; break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a = 0; ;) { (() => a)(); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a = 0; ;) { while (a); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a = 0; ;) { do ; while (a) break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a = 0; ;) { for (a; b; c); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a = 0; ;) { for (; b;); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a = 0; ;) { for (; ; c) if (foo) break; break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a = 0; ;) { for(;;) if (foo) break; break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a = 0; ;) { for (a in b); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a = 0; ;) { for (a of b); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a = 0; ;) for (;;); +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a = 0; ;) { for (var i = 0; ; i< 10) { foo(); } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a = 0; ;) while (true); +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (;;) break; +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (;;) { break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (;;) return; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (;;) { return; } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (;;) throw err; +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (;;) { throw err; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (;;) { foo(); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (;;) { break; foo(); } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (;;) if (foo) break; else return; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (;;) { if (foo) { return; } else { break; } bar(); } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (;;) { if (foo) { return; } throw err; } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (;;) { switch (foo) { default: throw err; } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (;;) { switch (foo) { case 1: throw err; default: return; } } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (;;) { switch (foo) { case 1: something(); default: return; } } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (;;) { try { return bar(); } catch (e) { break; } } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (;;) { break; continue; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (;;) { () => a; break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (;;) { (() => a)(); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (;;) { while (a); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (;;) { do ; while (a) break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (;;) { for (a; b; c); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (;;) { for (; b;); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (;;) { for (; ; c) if (foo) break; break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (;;) { for(;;) if (foo) break; break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (;;) { for (a in b); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (;;) { for (a of b); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (;;) for (;;); +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (;;) { for (var i = 0; ; i< 10) { foo(); } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (;;) while (true); +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a in b) break; +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a in b) { break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (a in b) return; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (a in b) { return; } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a in b) throw err; +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a in b) { throw err; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a in b) { foo(); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a in b) { break; foo(); } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (a in b) if (foo) break; else return; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (a in b) { if (foo) { return; } else { break; } bar(); } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (a in b) { if (foo) { return; } throw err; } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a in b) { switch (foo) { default: throw err; } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (a in b) { switch (foo) { case 1: throw err; default: return; } } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (a in b) { switch (foo) { case 1: something(); default: return; } } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (a in b) { try { return bar(); } catch (e) { break; } } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a in b) { break; continue; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a in b) { () => a; break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a in b) { (() => a)(); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a in b) { while (a); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a in b) { do ; while (a) break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a in b) { for (a; b; c); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a in b) { for (; b;); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a in b) { for (; ; c) if (foo) break; break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a in b) { for(;;) if (foo) break; break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a in b) { for (a in b); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a in b) { for (a of b); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a in b) for (;;); +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a in b) { for (var i = 0; ; i< 10) { foo(); } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a in b) while (true); +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a in f(b)) break; +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a in f(b)) { break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (a in f(b)) return; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (a in f(b)) { return; } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a in f(b)) throw err; +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a in f(b)) { throw err; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a in f(b)) { foo(); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a in f(b)) { break; foo(); } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (a in f(b)) if (foo) break; else return; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (a in f(b)) { if (foo) { return; } else { break; } bar(); } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (a in f(b)) { if (foo) { return; } throw err; } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a in f(b)) { switch (foo) { default: throw err; } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (a in f(b)) { switch (foo) { case 1: throw err; default: return; } } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (a in f(b)) { switch (foo) { case 1: something(); default: return; } } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (a in f(b)) { try { return bar(); } catch (e) { break; } } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a in f(b)) { break; continue; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a in f(b)) { () => a; break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a in f(b)) { (() => a)(); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a in f(b)) { while (a); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a in f(b)) { do ; while (a) break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a in f(b)) { for (a; b; c); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a in f(b)) { for (; b;); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a in f(b)) { for (; ; c) if (foo) break; break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a in f(b)) { for(;;) if (foo) break; break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a in f(b)) { for (a in b); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a in f(b)) { for (a of b); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a in f(b)) for (;;); +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a in f(b)) { for (var i = 0; ; i< 10) { foo(); } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a in f(b)) while (true); +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (var a in b) break; +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (var a in b) { break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (var a in b) return; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (var a in b) { return; } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (var a in b) throw err; +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (var a in b) { throw err; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (var a in b) { foo(); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (var a in b) { break; foo(); } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (var a in b) if (foo) break; else return; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (var a in b) { if (foo) { return; } else { break; } bar(); } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (var a in b) { if (foo) { return; } throw err; } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (var a in b) { switch (foo) { default: throw err; } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (var a in b) { switch (foo) { case 1: throw err; default: return; } } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (var a in b) { switch (foo) { case 1: something(); default: return; } } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (var a in b) { try { return bar(); } catch (e) { break; } } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (var a in b) { break; continue; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (var a in b) { () => a; break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (var a in b) { (() => a)(); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (var a in b) { while (a); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (var a in b) { do ; while (a) break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (var a in b) { for (a; b; c); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (var a in b) { for (; b;); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (var a in b) { for (; ; c) if (foo) break; break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (var a in b) { for(;;) if (foo) break; break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (var a in b) { for (a in b); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (var a in b) { for (a of b); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (var a in b) for (;;); +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (var a in b) { for (var i = 0; ; i< 10) { foo(); } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (var a in b) while (true); +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (let a in f(b)) break; +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (let a in f(b)) { break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (let a in f(b)) return; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (let a in f(b)) { return; } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (let a in f(b)) throw err; +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (let a in f(b)) { throw err; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (let a in f(b)) { foo(); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (let a in f(b)) { break; foo(); } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (let a in f(b)) if (foo) break; else return; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (let a in f(b)) { if (foo) { return; } else { break; } bar(); } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (let a in f(b)) { if (foo) { return; } throw err; } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (let a in f(b)) { switch (foo) { default: throw err; } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (let a in f(b)) { switch (foo) { case 1: throw err; default: return; } } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (let a in f(b)) { switch (foo) { case 1: something(); default: return; } } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (let a in f(b)) { try { return bar(); } catch (e) { break; } } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (let a in f(b)) { break; continue; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (let a in f(b)) { () => a; break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (let a in f(b)) { (() => a)(); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (let a in f(b)) { while (a); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (let a in f(b)) { do ; while (a) break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (let a in f(b)) { for (a; b; c); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (let a in f(b)) { for (; b;); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (let a in f(b)) { for (; ; c) if (foo) break; break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (let a in f(b)) { for(;;) if (foo) break; break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (let a in f(b)) { for (a in b); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (let a in f(b)) { for (a of b); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (let a in f(b)) for (;;); +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (let a in f(b)) { for (var i = 0; ; i< 10) { foo(); } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (let a in f(b)) while (true); +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a of b) break; +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a of b) { break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (a of b) return; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (a of b) { return; } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a of b) throw err; +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a of b) { throw err; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a of b) { foo(); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a of b) { break; foo(); } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (a of b) if (foo) break; else return; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (a of b) { if (foo) { return; } else { break; } bar(); } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (a of b) { if (foo) { return; } throw err; } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a of b) { switch (foo) { default: throw err; } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (a of b) { switch (foo) { case 1: throw err; default: return; } } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (a of b) { switch (foo) { case 1: something(); default: return; } } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (a of b) { try { return bar(); } catch (e) { break; } } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a of b) { break; continue; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a of b) { () => a; break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a of b) { (() => a)(); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a of b) { while (a); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a of b) { do ; while (a) break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a of b) { for (a; b; c); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a of b) { for (; b;); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a of b) { for (; ; c) if (foo) break; break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a of b) { for(;;) if (foo) break; break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a of b) { for (a in b); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a of b) { for (a of b); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a of b) for (;;); +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a of b) { for (var i = 0; ; i< 10) { foo(); } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a of b) while (true); +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a of f(b)) break; +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a of f(b)) { break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (a of f(b)) return; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (a of f(b)) { return; } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a of f(b)) throw err; +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a of f(b)) { throw err; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a of f(b)) { foo(); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a of f(b)) { break; foo(); } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (a of f(b)) if (foo) break; else return; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (a of f(b)) { if (foo) { return; } else { break; } bar(); } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (a of f(b)) { if (foo) { return; } throw err; } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a of f(b)) { switch (foo) { default: throw err; } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (a of f(b)) { switch (foo) { case 1: throw err; default: return; } } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (a of f(b)) { switch (foo) { case 1: something(); default: return; } } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (a of f(b)) { try { return bar(); } catch (e) { break; } } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a of f(b)) { break; continue; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a of f(b)) { () => a; break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a of f(b)) { (() => a)(); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a of f(b)) { while (a); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a of f(b)) { do ; while (a) break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a of f(b)) { for (a; b; c); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a of f(b)) { for (; b;); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a of f(b)) { for (; ; c) if (foo) break; break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a of f(b)) { for(;;) if (foo) break; break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a of f(b)) { for (a in b); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a of f(b)) { for (a of b); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a of f(b)) for (;;); +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a of f(b)) { for (var i = 0; ; i< 10) { foo(); } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a of f(b)) while (true); +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for ({ a, b } of c) break; +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for ({ a, b } of c) { break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for ({ a, b } of c) return; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for ({ a, b } of c) { return; } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for ({ a, b } of c) throw err; +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for ({ a, b } of c) { throw err; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for ({ a, b } of c) { foo(); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for ({ a, b } of c) { break; foo(); } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for ({ a, b } of c) if (foo) break; else return; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for ({ a, b } of c) { if (foo) { return; } else { break; } bar(); } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for ({ a, b } of c) { if (foo) { return; } throw err; } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for ({ a, b } of c) { switch (foo) { default: throw err; } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for ({ a, b } of c) { switch (foo) { case 1: throw err; default: return; } } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for ({ a, b } of c) { switch (foo) { case 1: something(); default: return; } } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for ({ a, b } of c) { try { return bar(); } catch (e) { break; } } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for ({ a, b } of c) { break; continue; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for ({ a, b } of c) { () => a; break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for ({ a, b } of c) { (() => a)(); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for ({ a, b } of c) { while (a); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for ({ a, b } of c) { do ; while (a) break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for ({ a, b } of c) { for (a; b; c); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for ({ a, b } of c) { for (; b;); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for ({ a, b } of c) { for (; ; c) if (foo) break; break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for ({ a, b } of c) { for(;;) if (foo) break; break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for ({ a, b } of c) { for (a in b); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for ({ a, b } of c) { for (a of b); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for ({ a, b } of c) for (;;); +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for ({ a, b } of c) { for (var i = 0; ; i< 10) { foo(); } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for ({ a, b } of c) while (true); +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (var a of f(b)) break; +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (var a of f(b)) { break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (var a of f(b)) return; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (var a of f(b)) { return; } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (var a of f(b)) throw err; +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (var a of f(b)) { throw err; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (var a of f(b)) { foo(); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (var a of f(b)) { break; foo(); } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (var a of f(b)) if (foo) break; else return; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (var a of f(b)) { if (foo) { return; } else { break; } bar(); } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (var a of f(b)) { if (foo) { return; } throw err; } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (var a of f(b)) { switch (foo) { default: throw err; } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (var a of f(b)) { switch (foo) { case 1: throw err; default: return; } } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (var a of f(b)) { switch (foo) { case 1: something(); default: return; } } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function someFunc() { for (var a of f(b)) { try { return bar(); } catch (e) { break; } } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (var a of f(b)) { break; continue; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (var a of f(b)) { () => a; break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (var a of f(b)) { (() => a)(); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (var a of f(b)) { while (a); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (var a of f(b)) { do ; while (a) break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (var a of f(b)) { for (a; b; c); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (var a of f(b)) { for (; b;); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (var a of f(b)) { for (; ; c) if (foo) break; break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (var a of f(b)) { for(;;) if (foo) break; break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (var a of f(b)) { for (a in b); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (var a of f(b)) { for (a of b); break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (var a of f(b)) for (;;); +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (var a of f(b)) { for (var i = 0; ; i< 10) { foo(); } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (var a of f(b)) while (true); +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +async function foo() { for await (const a of b) break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +async function foo() { for await (const a of b) { break; } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +async function foo() { for await (const a of b) return; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +async function foo() { for await (const a of b) { return; } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +async function foo() { for await (const a of b) throw err; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +async function foo() { for await (const a of b) { throw err; } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +async function foo() { for await (const a of b) { foo(); break; } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +async function foo() { for await (const a of b) { break; foo(); } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +async function foo() { for await (const a of b) if (foo) break; else return; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +async function foo() { for await (const a of b) { if (foo) { return; } else { break; } bar(); } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +async function foo() { for await (const a of b) { if (foo) { return; } throw err; } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +async function foo() { for await (const a of b) { switch (foo) { default: throw err; } } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +async function foo() { for await (const a of b) { switch (foo) { case 1: throw err; default: return; } } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +async function foo() { for await (const a of b) { switch (foo) { case 1: something(); default: return; } } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +async function foo() { for await (const a of b) { try { return bar(); } catch (e) { break; } } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +async function foo() { for await (const a of b) { break; continue; } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +async function foo() { for await (const a of b) { () => a; break; } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +async function foo() { for await (const a of b) { (() => a)(); break; } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +async function foo() { for await (const a of b) { while (a); break; } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +async function foo() { for await (const a of b) { do ; while (a) break; } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +async function foo() { for await (const a of b) { for (a; b; c); break; } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +async function foo() { for await (const a of b) { for (; b;); break; } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +async function foo() { for await (const a of b) { for (; ; c) if (foo) break; break; } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +async function foo() { for await (const a of b) { for(;;) if (foo) break; break; } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +async function foo() { for await (const a of b) { for (a in b); break; } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +async function foo() { for await (const a of b) { for (a of b); break; } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +async function foo() { for await (const a of b) for (;;); } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +async function foo() { for await (const a of b) { for (var i = 0; ; i< 10) { foo(); } } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +async function foo() { for await (const a of b) while (true); } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +while (foo) { for (a of b) { if (baz) { break; } else { throw err; } } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +lbl: for (var i = 0; i < 10; i++) { while (foo) break lbl; } /* outer is valid because inner can have 0 iterations */ +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a in b) { while (foo) { if(baz) { break; } else { break; } } break; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + }, + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 2 errors but had 0: [] + +0 !== 2 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function foo() { for (var i = 0; i < 10; i++) { do { return; } while(i) } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + }, + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 2 errors but had 0: [] + +0 !== 2 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +lbl: while(foo) { do { break lbl; } while(baz) } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + }, + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 2 errors but had 0: [] + +0 !== 2 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +lbl: for (a in b) { while(foo) { continue lbl; } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a of b) { for(;;) { if (foo) { throw err; } } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +function foo () { for (a in b) { while (true) { if (bar) { return; } } } } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +do for (var i = 1; i < 10; i++) break; while(foo) +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +do { for (var i = 1; i < 10; i++) continue; break; } while(foo) +``` + +```json +{ + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (;;) { for (var i = 1; i < 10; i ++) break; if (foo) break; continue; } +``` + +```json +{ + "errors": [ + { + "messageId": "invalid", + "column": 12 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +while (a) break; do break; while (b); for (;;) break; for (c in d) break; for (e of f) break; +``` + +```json +{ + "options": [ + { + "ignore": [] + } + ], + "errors": [ + { + "messageId": "invalid" + }, + { + "messageId": "invalid" + }, + { + "messageId": "invalid" + }, + { + "messageId": "invalid" + }, + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 5 errors but had 0: [] + +0 !== 5 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +while (a) break; +``` + +```json +{ + "options": [ + { + "ignore": [ + "DoWhileStatement" + ] + } + ], + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +do break; while (a) +``` + +```json +{ + "options": [ + { + "ignore": [ + "WhileStatement" + ] + } + ], + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a in b) break; for (c of d) break; +``` + +```json +{ + "options": [ + { + "ignore": [ + "ForStatement" + ] + } + ], + "errors": [ + { + "messageId": "invalid" + }, + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 2 errors but had 0: [] + +0 !== 2 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable-loop > invalid + +```js +for (a in b) break; for (;;) break; for (c of d) break; +``` + +```json +{ + "options": [ + { + "ignore": [ + "ForInStatement", + "ForOfStatement" + ] + } + ], + "errors": [ + { + "messageId": "invalid" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +### `no-unreachable` + +Pass: 20 / 67 (29.9%) +Fail: 47 / 67 (70.1%) + +#### no-unreachable > valid + +```js +function foo() { function bar() { return 1; } return bar(); } +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-unreachable', + message: 'Unreachable code.', + messageId: 'unreachableCode', + severity: 1, + nodeType: 'BlockStatement', + line: 1, + column: 15, + endLine: 1, + endColumn: 61, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable > valid + +```js +function foo() { return bar(); function bar() { return 1; } } +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-unreachable', + message: 'Unreachable code.', + messageId: 'unreachableCode', + severity: 1, + nodeType: 'BlockStatement', + line: 1, + column: 15, + endLine: 1, + endColumn: 61, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable > valid + +```js +function foo() { return x; var x; } +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-unreachable', + message: 'Unreachable code.', + messageId: 'unreachableCode', + severity: 1, + nodeType: 'BlockStatement', + line: 1, + column: 15, + endLine: 1, + endColumn: 35, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable > valid + +```js +function foo() { var x = 1; var y = 2; } +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-unreachable', + message: 'Unreachable code.', + messageId: 'unreachableCode', + severity: 1, + nodeType: 'BlockStatement', + line: 1, + column: 15, + endLine: 1, + endColumn: 40, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable > valid + +```js +function foo() { var x = 1; var y = 2; return; } +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-unreachable', + message: 'Unreachable code.', + messageId: 'unreachableCode', + severity: 1, + nodeType: 'BlockStatement', + line: 1, + column: 15, + endLine: 1, + endColumn: 48, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable > valid + +```js +while (true) { switch (foo) { case 1: x = 1; x = 2;} } +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-unreachable', + message: 'Unreachable code.', + messageId: 'unreachableCode', + severity: 1, + nodeType: 'WhileStatement', + line: 1, + column: 0, + endLine: 1, + endColumn: 54, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable > valid + +```js +while (true) { break; var x; } +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-unreachable', + message: 'Unreachable code.', + messageId: 'unreachableCode', + severity: 1, + nodeType: 'WhileStatement', + line: 1, + column: 0, + endLine: 1, + endColumn: 30, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable > valid + +```js +while (true) { continue; var x, y; } +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-unreachable', + message: 'Unreachable code.', + messageId: 'unreachableCode', + severity: 1, + nodeType: 'WhileStatement', + line: 1, + column: 0, + endLine: 1, + endColumn: 36, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable > valid + +```js +while (true) { throw 'message'; var x; } +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-unreachable', + message: 'Unreachable code.', + messageId: 'unreachableCode', + severity: 1, + nodeType: 'WhileStatement', + line: 1, + column: 0, + endLine: 1, + endColumn: 40, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable > valid + +```js +while (true) { if (true) break; var x = 1; } +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-unreachable', + message: 'Unreachable code.', + messageId: 'unreachableCode', + severity: 1, + nodeType: 'WhileStatement', + line: 1, + column: 0, + endLine: 1, + endColumn: 44, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable > valid + +```js +while (true) continue; +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-unreachable', + message: 'Unreachable code.', + messageId: 'unreachableCode', + severity: 1, + nodeType: 'WhileStatement', + line: 1, + column: 0, + endLine: 1, + endColumn: 22, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable > valid + +```js +switch (foo) { case 1: break; var x; } +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-unreachable', + message: 'Unreachable code.', + messageId: 'unreachableCode', + severity: 1, + nodeType: 'SwitchStatement', + line: 1, + column: 0, + endLine: 1, + endColumn: 38, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable > valid + +```js +switch (foo) { case 1: break; var x; default: throw true; }; +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-unreachable', + message: 'Unreachable code.', + messageId: 'unreachableCode', + severity: 1, + nodeType: 'SwitchStatement', + line: 1, + column: 0, + endLine: 1, + endColumn: 59, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable > valid + +```js +const arrow_direction = arrow => { switch (arrow) { default: throw new Error(); };} +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-unreachable', + message: 'Unreachable code.', + messageId: 'unreachableCode', + severity: 1, + nodeType: 'VariableDeclaration', + line: 1, + column: 0, + endLine: 1, + endColumn: 85, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable > valid + +```js +var x = 1; y = 2; throw 'uh oh'; var y; +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-unreachable', + message: 'Unreachable code.', + messageId: 'unreachableCode', + severity: 1, + nodeType: 'VariableDeclaration', + line: 1, + column: 0, + endLine: 1, + endColumn: 32, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable > valid + +```js +function foo() { var x = 1; if (x) { return; } x = 2; } +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-unreachable', + message: 'Unreachable code.', + messageId: 'unreachableCode', + severity: 1, + nodeType: 'BlockStatement', + line: 1, + column: 15, + endLine: 1, + endColumn: 55, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable > valid + +```js +function foo() { var x = 1; if (x) { } else { return; } x = 2; } +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-unreachable', + message: 'Unreachable code.', + messageId: 'unreachableCode', + severity: 1, + nodeType: 'BlockStatement', + line: 1, + column: 15, + endLine: 1, + endColumn: 64, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable > valid + +```js +function foo() { var x = 1; switch (x) { case 0: break; default: return; } x = 2; } +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-unreachable', + message: 'Unreachable code.', + messageId: 'unreachableCode', + severity: 1, + nodeType: 'BlockStatement', + line: 1, + column: 15, + endLine: 1, + endColumn: 83, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable > valid + +```js +function foo() { var x = 1; while (x) { return; } x = 2; } +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-unreachable', + message: 'Unreachable code.', + messageId: 'unreachableCode', + severity: 1, + nodeType: 'BlockStatement', + line: 1, + column: 15, + endLine: 1, + endColumn: 58, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable > valid + +```js +function foo() { var x = 1; for (x in {}) { return; } x = 2; } +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-unreachable', + message: 'Unreachable code.', + messageId: 'unreachableCode', + severity: 1, + nodeType: 'BlockStatement', + line: 1, + column: 15, + endLine: 1, + endColumn: 62, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable > valid + +```js +function foo() { var x = 1; try { return; } finally { x = 2; } } +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-unreachable', + message: 'Unreachable code.', + messageId: 'unreachableCode', + severity: 1, + nodeType: 'BlockStatement', + line: 1, + column: 15, + endLine: 1, + endColumn: 64, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable > valid + +```js +function foo() { var x = 1; for (;;) { if (x) break; } x = 2; } +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-unreachable', + message: 'Unreachable code.', + messageId: 'unreachableCode', + severity: 1, + nodeType: 'BlockStatement', + line: 1, + column: 15, + endLine: 1, + endColumn: 63, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable > valid + +```js +A: { break A; } foo() +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-unreachable', + message: 'Unreachable code.', + messageId: 'unreachableCode', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 0, + endLine: 1, + endColumn: 21, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable > valid + +```js +function* foo() { try { yield 1; return; } catch (err) { return err; } } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-unreachable', + message: 'Unreachable code.', + messageId: 'unreachableCode', + severity: 1, + nodeType: 'BlockStatement', + line: 1, + column: 16, + endLine: 1, + endColumn: 72, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable > valid + +```js +function foo() { try { bar(); return; } catch (err) { return err; } } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-unreachable', + message: 'Unreachable code.', + messageId: 'unreachableCode', + severity: 1, + nodeType: 'BlockStatement', + line: 1, + column: 15, + endLine: 1, + endColumn: 69, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable > valid + +```js +function foo() { try { a.b.c = 1; return; } catch (err) { return err; } } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-unreachable', + message: 'Unreachable code.', + messageId: 'unreachableCode', + severity: 1, + nodeType: 'BlockStatement', + line: 1, + column: 15, + endLine: 1, + endColumn: 73, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable > valid + +```js +class C { foo = reachable; } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2022 + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-unreachable', + message: 'Unreachable code.', + messageId: 'unreachableCode', + severity: 1, + nodeType: 'ClassDeclaration', + line: 1, + column: 0, + endLine: 1, + endColumn: 28, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable > valid + +```js +class C { foo = reachable; constructor() {} } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2022 + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-unreachable', + message: 'Unreachable code.', + messageId: 'unreachableCode', + severity: 1, + nodeType: 'ClassDeclaration', + line: 1, + column: 0, + endLine: 1, + endColumn: 45, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable > valid + +```js +class C extends B { foo = reachable; } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2022 + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-unreachable', + message: 'Unreachable code.', + messageId: 'unreachableCode', + severity: 1, + nodeType: 'ClassDeclaration', + line: 1, + column: 0, + endLine: 1, + endColumn: 38, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable > valid + +```js +class C extends B { foo = reachable; constructor() { super(); } } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2022 + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-unreachable', + message: 'Unreachable code.', + messageId: 'unreachableCode', + severity: 1, + nodeType: 'ClassDeclaration', + line: 1, + column: 0, + endLine: 1, + endColumn: 65, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable > valid + +```js +class C extends B { static foo = reachable; constructor() {} } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2022 + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-unreachable', + message: 'Unreachable code.', + messageId: 'unreachableCode', + severity: 1, + nodeType: 'ClassDeclaration', + line: 1, + column: 0, + endLine: 1, + endColumn: 62, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable > invalid + +```js +const arrow_direction = arrow => { switch (arrow) { default: throw new Error(); }; g() } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "unreachableCode", + "line": 1, + "column": 86, + "endLine": 1, + "endColumn": 89 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Actual error location does not match expected error location. ++ actual - expected + + { ++ column: 1, ++ endColumn: 91, +- column: 86, +- endColumn: 89, + endLine: 1, + line: 1 + } + + at assertInvalidTestCaseLocationIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable > invalid + +```js + + function foo() { + return; + + a(); // ← ERROR: Unreachable code. (no-unreachable) + + b() // ↑ ';' token is included in the unreachable code, so this statement will be merged. + // comment + c(); // ↑ ')' token is included in the unreachable code, so this statement will be merged. + } + +``` + +```json +{ + "errors": [ + { + "messageId": "unreachableCode", + "line": 5, + "column": 21, + "endLine": 9, + "endColumn": 25 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Actual error location does not match expected error location. ++ actual - expected + + { ++ column: 32, ++ endColumn: 18, ++ endLine: 10, ++ line: 2 +- column: 21, +- endColumn: 25, +- endLine: 9, +- line: 5 + } + + at assertInvalidTestCaseLocationIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable > invalid + +```js + + function foo() { + return; + + a(); + + if (b()) { + c() + } else { + d() + } + } + +``` + +```json +{ + "errors": [ + { + "messageId": "unreachableCode", + "line": 5, + "column": 21, + "endLine": 11, + "endColumn": 22 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Actual error location does not match expected error location. ++ actual - expected + + { ++ column: 32, ++ endColumn: 18, ++ endLine: 12, ++ line: 2 +- column: 21, +- endColumn: 22, +- endLine: 11, +- line: 5 + } + + at assertInvalidTestCaseLocationIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable > invalid + +```js + + function foo() { + if (a) { + return + b(); + c(); + } else { + throw err + d(); + } + } + +``` + +```json +{ + "errors": [ + { + "messageId": "unreachableCode", + "line": 5, + "column": 25, + "endLine": 6, + "endColumn": 29 + }, + { + "messageId": "unreachableCode", + "line": 9, + "column": 25, + "endLine": 9, + "endColumn": 29 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 2 errors but had 1: [ + { + ruleId: 'rule-to-test/no-unreachable', + message: 'Unreachable code.', + messageId: 'unreachableCode', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 31, + endLine: 11, + endColumn: 17, + suggestions: null + } +] + +1 !== 2 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable > invalid + +```js + + function foo() { + if (a) { + return + b(); + c(); + } else { + throw err + d(); + } + e(); + } + +``` + +```json +{ + "errors": [ + { + "messageId": "unreachableCode", + "line": 5, + "column": 25, + "endLine": 6, + "endColumn": 29 + }, + { + "messageId": "unreachableCode", + "line": 9, + "column": 25, + "endLine": 9, + "endColumn": 29 + }, + { + "messageId": "unreachableCode", + "line": 11, + "column": 21, + "endLine": 11, + "endColumn": 25 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 3 errors but had 1: [ + { + ruleId: 'rule-to-test/no-unreachable', + message: 'Unreachable code.', + messageId: 'unreachableCode', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 31, + endLine: 12, + endColumn: 17, + suggestions: null + } +] + +1 !== 3 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable > invalid + +```js + + function* foo() { + try { + return; + } catch (err) { + return err; + } + } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "unreachableCode", + "line": 5, + "column": 35, + "endLine": 7, + "endColumn": 22 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Actual error location does not match expected error location. ++ actual - expected + + { ++ column: 33, ++ endColumn: 18, ++ endLine: 8, ++ line: 2 +- column: 35, +- endColumn: 22, +- endLine: 7, +- line: 5 + } + + at assertInvalidTestCaseLocationIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable > invalid + +```js + + function foo() { + try { + return; + } catch (err) { + return err; + } + } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "unreachableCode", + "line": 5, + "column": 35, + "endLine": 7, + "endColumn": 22 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Actual error location does not match expected error location. ++ actual - expected + + { ++ column: 32, ++ endColumn: 18, ++ endLine: 8, ++ line: 2 +- column: 35, +- endColumn: 22, +- endLine: 7, +- line: 5 + } + + at assertInvalidTestCaseLocationIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable > invalid + +```js + + function foo() { + try { + return; + let a = 1; + } catch (err) { + return err; + } + } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "unreachableCode", + "line": 5, + "column": 25, + "endLine": 5, + "endColumn": 35 + }, + { + "messageId": "unreachableCode", + "line": 6, + "column": 35, + "endLine": 8, + "endColumn": 22 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 2 errors but had 1: [ + { + ruleId: 'rule-to-test/no-unreachable', + message: 'Unreachable code.', + messageId: 'unreachableCode', + severity: 1, + nodeType: 'BlockStatement', + line: 2, + column: 31, + endLine: 9, + endColumn: 17, + suggestions: null + } +] + +1 !== 2 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable > invalid + +```js +class C extends B { foo; constructor() {} } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2022 + }, + "errors": [ + { + "messageId": "unreachableCode", + "column": 21, + "endColumn": 25 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Actual error location does not match expected error location. ++ actual - expected + + { ++ column: 1, ++ endColumn: 44 +- column: 21, +- endColumn: 25 + } + + at assertInvalidTestCaseLocationIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable > invalid + +```js +class C extends B { foo = unreachable + code; constructor() {} } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2022 + }, + "errors": [ + { + "messageId": "unreachableCode", + "column": 21, + "endColumn": 46 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Actual error location does not match expected error location. ++ actual - expected + + { ++ column: 1, ++ endColumn: 65 +- column: 21, +- endColumn: 46 + } + + at assertInvalidTestCaseLocationIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable > invalid + +```js +class C extends B { foo; bar; constructor() {} } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2022 + }, + "errors": [ + { + "messageId": "unreachableCode", + "column": 21, + "endColumn": 30 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Actual error location does not match expected error location. ++ actual - expected + + { ++ column: 1, ++ endColumn: 49 +- column: 21, +- endColumn: 30 + } + + at assertInvalidTestCaseLocationIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable > invalid + +```js +class C extends B { foo; constructor() {} bar; } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2022 + }, + "errors": [ + { + "messageId": "unreachableCode", + "column": 21, + "endColumn": 25 + }, + { + "messageId": "unreachableCode", + "column": 43, + "endColumn": 47 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 2 errors but had 1: [ + { + ruleId: 'rule-to-test/no-unreachable', + message: 'Unreachable code.', + messageId: 'unreachableCode', + severity: 1, + nodeType: 'ClassDeclaration', + line: 1, + column: 0, + endLine: 1, + endColumn: 48, + suggestions: null + } +] + +1 !== 2 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable > invalid + +```js +(class extends B { foo; constructor() {} bar; }) +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2022 + }, + "errors": [ + { + "messageId": "unreachableCode", + "column": 20, + "endColumn": 24 + }, + { + "messageId": "unreachableCode", + "column": 42, + "endColumn": 46 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 2 errors but had 1: [ + { + ruleId: 'rule-to-test/no-unreachable', + message: 'Unreachable code.', + messageId: 'unreachableCode', + severity: 1, + nodeType: 'ExpressionStatement', + line: 1, + column: 0, + endLine: 1, + endColumn: 48, + suggestions: null + } +] + +1 !== 2 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable > invalid + +```js +class B extends A { x; constructor() { class C extends D { [super().x]; constructor() {} } } } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2022 + }, + "errors": [ + { + "messageId": "unreachableCode", + "column": 60, + "endColumn": 72 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Actual error location does not match expected error location. ++ actual - expected + + { ++ column: 1, ++ endColumn: 95 +- column: 60, +- endColumn: 72 + } + + at assertInvalidTestCaseLocationIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable > invalid + +```js +class B extends A { x; constructor() { class C extends super().x { y; constructor() {} } } } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2022 + }, + "errors": [ + { + "messageId": "unreachableCode", + "column": 68, + "endColumn": 70 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Actual error location does not match expected error location. ++ actual - expected + + { ++ column: 1, ++ endColumn: 93 +- column: 68, +- endColumn: 70 + } + + at assertInvalidTestCaseLocationIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unreachable > invalid + +```js +class B extends A { x; static y; z; static q; constructor() {} } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2022 + }, + "errors": [ + { + "messageId": "unreachableCode", + "column": 21, + "endColumn": 23 + }, + { + "messageId": "unreachableCode", + "column": 34, + "endColumn": 36 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 2 errors but had 1: [ + { + ruleId: 'rule-to-test/no-unreachable', + message: 'Unreachable code.', + messageId: 'unreachableCode', + severity: 1, + nodeType: 'ClassDeclaration', + line: 1, + column: 0, + endLine: 1, + endColumn: 64, + suggestions: null + } +] + +1 !== 2 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +### `no-unused-expressions` + +Pass: 105 / 124 (84.7%) +Fail: 19 / 124 (15.3%) + +#### no-unused-expressions > invalid + +```js +"use strict"; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 3, + "sourceType": "script" + }, + "errors": [ + { + "messageId": "unusedExpression" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unused-expressions > invalid + +```js +"directive one"; "directive two"; f(); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 3, + "sourceType": "script" + }, + "errors": [ + { + "messageId": "unusedExpression" + }, + { + "messageId": "unusedExpression" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 2 errors but had 0: [] + +0 !== 2 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unused-expressions > invalid + +```js +function foo() {"use strict"; return true; } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 3, + "sourceType": "script" + }, + "errors": [ + { + "messageId": "unusedExpression" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unused-expressions > invalid + +```js +function foo() {"directive one"; "directive two"; f(); } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 3, + "sourceType": "script" + }, + "errors": [ + { + "messageId": "unusedExpression" + }, + { + "messageId": "unusedExpression" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 2 errors but had 0: [] + +0 !== 2 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unused-expressions > valid + +```js + +\u0009\u0009module Foo { +\u0009\u0009 'use strict'; +\u0009\u0009} +\u0009 +``` + +```json +{ + "code": "\n\t\tmodule Foo {\n\t\t 'use strict';\n\t\t}\n\t " +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-unused-expressions > valid + +```js + +\u0009\u0009namespace Foo { +\u0009\u0009 'use strict'; + +\u0009\u0009 export class Foo {} +\u0009\u0009 export class Bar {} +\u0009\u0009} +\u0009 +``` + +```json +{ + "code": "\n\t\tnamespace Foo {\n\t\t 'use strict';\n \n\t\t export class Foo {}\n\t\t export class Bar {}\n\t\t}\n\t " +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-unused-expressions > valid + +```js + +\u0009\u0009class Foo {} +\u0009\u0009new Foo(); +\u0009 +``` + +```json +{ + "code": "\n\t\tclass Foo {}\n\t\tnew Foo();\n\t " +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-unused-expressions > valid + +```js +
as any +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "parserOptions": { + "ecmaFeatures": { + "jsx": true + } + } + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-unused-expressions > valid + +```js +foo && foo()!; +``` + +```json +{ + "options": [ + { + "allowShortCircuit": true + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-unused-expressions > valid + +```js + +\u0009\u0009\u0009\u0009declare const foo: Function | undefined; +\u0009\u0009\u0009\u0009(foo && foo()!) +\u0009\u0009\u0009 +``` + +```json +{ + "code": "\n\t\t\t\tdeclare const foo: Function | undefined;\n\t\t\t\t(foo && foo()!)\n\t\t\t", + "options": [ + { + "allowShortCircuit": true + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-unused-expressions > valid + +```js + +\u0009\u0009\u0009\u0009(Foo && Foo()); +\u0009\u0009\u0009 +``` + +```json +{ + "code": "\n\t\t\t\t(Foo && Foo());\n\t\t\t", + "options": [ + { + "allowShortCircuit": true + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-unused-expressions > invalid + +```js + + module Foo { +\u0009const foo = true; +\u0009'use strict'; + } +\u0009\u0009 +``` + +```json +{ + "code": "\n module Foo {\n\tconst foo = true;\n\t'use strict';\n }\n\t\t", + "errors": [ + { + "column": 2, + "endColumn": 15, + "endLine": 4, + "line": 4, + "message": "Expected an assignment or function call and instead saw an expression." + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-unused-expressions > invalid + +```js + + namespace Foo { +\u0009export class Foo {} +\u0009export class Bar {} + +\u0009'use strict'; + } +\u0009\u0009 +``` + +```json +{ + "code": "\n namespace Foo {\n\texport class Foo {}\n\texport class Bar {}\n \n\t'use strict';\n }\n\t\t", + "errors": [ + { + "column": 2, + "endColumn": 15, + "endLine": 6, + "line": 6, + "message": "Expected an assignment or function call and instead saw an expression." + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-unused-expressions > invalid + +```js + + class Foo {} + Foo; +\u0009\u0009 +``` + +```json +{ + "code": "\n class Foo {}\n Foo;\n\t\t", + "errors": [ + { + "column": 3, + "endColumn": 15, + "endLine": 3, + "line": 3, + "message": "Expected an assignment or function call and instead saw an expression." + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-unused-expressions > invalid + +```js +Map; +``` + +```json +{ + "errors": [ + { + "column": 1, + "endColumn": 21, + "endLine": 1, + "line": 1, + "message": "Expected an assignment or function call and instead saw an expression." + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-unused-expressions > invalid + +```js + + declare const foo: number | undefined; + foo; +\u0009\u0009 +``` + +```json +{ + "code": "\n declare const foo: number | undefined;\n foo;\n\t\t", + "errors": [ + { + "column": 3, + "endColumn": 7, + "endLine": 3, + "line": 3, + "message": "Expected an assignment or function call and instead saw an expression." + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-unused-expressions > invalid + +```js + + declare const foo: number | undefined; + foo as any; +\u0009\u0009 +``` + +```json +{ + "code": "\n declare const foo: number | undefined;\n foo as any;\n\t\t", + "errors": [ + { + "column": 3, + "endColumn": 14, + "endLine": 3, + "line": 3, + "message": "Expected an assignment or function call and instead saw an expression." + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-unused-expressions > invalid + +```js + + declare const foo: number | undefined; + foo; +\u0009\u0009 +``` + +```json +{ + "code": "\n declare const foo: number | undefined;\n foo;\n\t\t", + "errors": [ + { + "column": 3, + "endColumn": 12, + "endLine": 3, + "line": 3, + "message": "Expected an assignment or function call and instead saw an expression." + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-unused-expressions > invalid + +```js + + declare const foo: number | undefined; + foo!; +\u0009\u0009 +``` + +```json +{ + "code": "\n declare const foo: number | undefined;\n foo!;\n\t\t", + "errors": [ + { + "column": 3, + "endColumn": 8, + "endLine": 3, + "line": 3, + "message": "Expected an assignment or function call and instead saw an expression." + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +### `no-unused-vars` + +Pass: 339 / 436 (77.8%) +Fail: 97 / 436 (22.2%) + +#### no-unused-vars > valid + +```js +var foo = 5; + +label: while (true) { + console.log(foo); + break label; +} +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-unused-vars', + message: "'foo' is defined but never used.", + messageId: 'unusedVar', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 4, + endLine: 1, + endColumn: 7, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unused-vars > valid + +```js +var foo = 5; + +while (true) { + console.log(foo); + break; +} +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-unused-vars', + message: "'foo' is defined but never used.", + messageId: 'unusedVar', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 4, + endLine: 1, + endColumn: 7, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unused-vars > valid + +```js +var box = {a: 2}; + for (var prop in box) { + box[prop] = parseInt(box[prop]); +} +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/no-unused-vars', + message: "'box' is defined but never used.", + messageId: 'unusedVar', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 4, + endLine: 1, + endColumn: 7, + suggestions: null + }, + { + ruleId: 'rule-to-test/no-unused-vars', + message: "'prop' is defined but never used.", + messageId: 'unusedVar', + severity: 1, + nodeType: 'Identifier', + line: 2, + column: 13, + endLine: 2, + endColumn: 17, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unused-vars > valid + +```js +a; var a; +``` + +```json +{ + "options": [ + "all" + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-unused-vars', + message: "'a' is defined but never used.", + messageId: 'unusedVar', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 7, + endLine: 1, + endColumn: 8, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unused-vars > valid + +```js +var a=10; alert(a); +``` + +```json +{ + "options": [ + "all" + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-unused-vars', + message: "'a' is defined but never used.", + messageId: 'unusedVar', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 4, + endLine: 1, + endColumn: 5, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unused-vars > valid + +```js +var a=10; (function() { alert(a); })(); +``` + +```json +{ + "options": [ + "all" + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-unused-vars', + message: "'a' is defined but never used.", + messageId: 'unusedVar', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 4, + endLine: 1, + endColumn: 5, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unused-vars > valid + +```js +var a=10; (function() { setTimeout(function() { alert(a); }, 0); })(); +``` + +```json +{ + "options": [ + "all" + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-unused-vars', + message: "'a' is defined but never used.", + messageId: 'unusedVar', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 4, + endLine: 1, + endColumn: 5, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unused-vars > valid + +```js +var a=10; d[a] = 0; +``` + +```json +{ + "options": [ + "all" + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-unused-vars', + message: "'a' is defined but never used.", + messageId: 'unusedVar', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 4, + endLine: 1, + endColumn: 5, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unused-vars > valid + +```js +var c = 0; function f(a){ var b = a; return b; }; f(c); +``` + +```json +{ + "options": [ + "all" + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-unused-vars', + message: "'c' is defined but never used.", + messageId: 'unusedVar', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 4, + endLine: 1, + endColumn: 5, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unused-vars > valid + +```js +var arr1 = [1, 2]; var arr2 = [3, 4]; for (var i in arr1) { arr1[i] = 5; } for (var i in arr2) { arr2[i] = 10; } +``` + +```json +{ + "options": [ + "all" + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 3: [ + { + ruleId: 'rule-to-test/no-unused-vars', + message: "'arr1' is defined but never used.", + messageId: 'unusedVar', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 4, + endLine: 1, + endColumn: 8, + suggestions: null + }, + { + ruleId: 'rule-to-test/no-unused-vars', + message: "'arr2' is defined but never used.", + messageId: 'unusedVar', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 23, + endLine: 1, + endColumn: 27, + suggestions: null + }, + { + ruleId: 'rule-to-test/no-unused-vars', + message: "'i' is defined but never used.", + messageId: 'unusedVar', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 47, + endLine: 1, + endColumn: 48, + suggestions: null + } +] + +3 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unused-vars > valid + +```js +var min = "min"; Math[min]; +``` + +```json +{ + "options": [ + "all" + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-unused-vars', + message: "'min' is defined but never used.", + messageId: 'unusedVar', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 4, + endLine: 1, + endColumn: 7, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unused-vars > valid + +```js +var a=10; (function() { alert(a); })(); +``` + +```json +{ + "options": [ + { + "vars": "all" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-unused-vars', + message: "'a' is defined but never used.", + messageId: 'unusedVar', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 4, + endLine: 1, + endColumn: 5, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unused-vars > valid + +```js +var g = function(bar, baz) { return 2; }; g(); +``` + +```json +{ + "options": [ + { + "vars": "all", + "args": "none" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-unused-vars', + message: "'g' is defined but never used.", + messageId: 'unusedVar', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 4, + endLine: 1, + endColumn: 5, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unused-vars > valid + +```js +var who = "Paul"; +module.exports = `Hello ${who}!`; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-unused-vars', + message: "'who' is defined but never used.", + messageId: 'unusedVar', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 4, + endLine: 1, + endColumn: 7, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unused-vars > valid + +```js +class Foo{}; var x = new Foo(); x.foo() +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-unused-vars', + message: "'x' is defined but never used.", + messageId: 'unusedVar', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 17, + endLine: 1, + endColumn: 18, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unused-vars > valid + +```js +function Foo(){}; var x = new Foo(); x.foo() +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-unused-vars', + message: "'x' is defined but never used.", + messageId: 'unusedVar', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 22, + endLine: 1, + endColumn: 23, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unused-vars > valid + +```js +var x = 1; var [y = x] = []; foo(y); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/no-unused-vars', + message: "'x' is defined but never used.", + messageId: 'unusedVar', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 4, + endLine: 1, + endColumn: 5, + suggestions: null + }, + { + ruleId: 'rule-to-test/no-unused-vars', + message: "'y' is defined but never used.", + messageId: 'unusedVar', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 16, + endLine: 1, + endColumn: 17, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unused-vars > valid + +```js +var x = 1; var {y = x} = {}; foo(y); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/no-unused-vars', + message: "'x' is defined but never used.", + messageId: 'unusedVar', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 4, + endLine: 1, + endColumn: 5, + suggestions: null + }, + { + ruleId: 'rule-to-test/no-unused-vars', + message: "'y' is defined but never used.", + messageId: 'unusedVar', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 16, + endLine: 1, + endColumn: 17, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unused-vars > valid + +```js +var x = 1; var {z: [y = x]} = {}; foo(y); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/no-unused-vars', + message: "'x' is defined but never used.", + messageId: 'unusedVar', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 4, + endLine: 1, + endColumn: 5, + suggestions: null + }, + { + ruleId: 'rule-to-test/no-unused-vars', + message: "'y' is defined but never used.", + messageId: 'unusedVar', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 20, + endLine: 1, + endColumn: 21, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unused-vars > valid + +```js +var x = []; var {z: [y] = x} = {}; foo(y); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/no-unused-vars', + message: "'x' is defined but never used.", + messageId: 'unusedVar', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 4, + endLine: 1, + endColumn: 5, + suggestions: null + }, + { + ruleId: 'rule-to-test/no-unused-vars', + message: "'y' is defined but never used.", + messageId: 'unusedVar', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 21, + endLine: 1, + endColumn: 22, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unused-vars > valid + +```js +var x = 1, y; [y = x] = []; foo(y); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/no-unused-vars', + message: "'x' is defined but never used.", + messageId: 'unusedVar', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 4, + endLine: 1, + endColumn: 5, + suggestions: null + }, + { + ruleId: 'rule-to-test/no-unused-vars', + message: "'y' is defined but never used.", + messageId: 'unusedVar', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 11, + endLine: 1, + endColumn: 12, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unused-vars > valid + +```js +var x = 1, y; ({z: [y = x]} = {}); foo(y); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/no-unused-vars', + message: "'x' is defined but never used.", + messageId: 'unusedVar', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 4, + endLine: 1, + endColumn: 5, + suggestions: null + }, + { + ruleId: 'rule-to-test/no-unused-vars', + message: "'y' is defined but never used.", + messageId: 'unusedVar', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 11, + endLine: 1, + endColumn: 12, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unused-vars > valid + +```js +var x = [], y; ({z: [y] = x} = {}); foo(y); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/no-unused-vars', + message: "'x' is defined but never used.", + messageId: 'unusedVar', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 4, + endLine: 1, + endColumn: 5, + suggestions: null + }, + { + ruleId: 'rule-to-test/no-unused-vars', + message: "'y' is defined but never used.", + messageId: 'unusedVar', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 12, + endLine: 1, + endColumn: 13, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unused-vars > valid + +```js +var x = 1; function foo(y = x) { bar(y); } foo(); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-unused-vars', + message: "'x' is defined but never used.", + messageId: 'unusedVar', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 4, + endLine: 1, + endColumn: 5, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unused-vars > valid + +```js +var x = 1; function foo({y = x} = {}) { bar(y); } foo(); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-unused-vars', + message: "'x' is defined but never used.", + messageId: 'unusedVar', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 4, + endLine: 1, + endColumn: 5, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unused-vars > valid + +```js +var x = 1; function foo(y = function(z = x) { bar(z); }) { y(); } foo(); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-unused-vars', + message: "'x' is defined but never used.", + messageId: 'unusedVar', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 4, + endLine: 1, + endColumn: 5, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unused-vars > valid + +```js +var x = 1; function foo(y = function() { bar(x); }) { y(); } foo(); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-unused-vars', + message: "'x' is defined but never used.", + messageId: 'unusedVar', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 4, + endLine: 1, + endColumn: 5, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unused-vars > valid + +```js +/*exported toaster*/ var toaster = 'great' +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-unused-vars', + message: "'toaster' is defined but never used.", + messageId: 'unusedVar', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 25, + endLine: 1, + endColumn: 32, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unused-vars > valid + +```js +/*exported toaster, poster*/ var toaster = 1; poster = 0; +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-unused-vars', + message: "'toaster' is defined but never used.", + messageId: 'unusedVar', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 33, + endLine: 1, + endColumn: 40, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unused-vars > valid + +```js +/*exported x*/ var { x } = y +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-unused-vars', + message: "'x' is defined but never used.", + messageId: 'unusedVar', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 21, + endLine: 1, + endColumn: 22, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unused-vars > valid + +```js +/*exported x, y*/ var { x, y } = z +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/no-unused-vars', + message: "'x' is defined but never used.", + messageId: 'unusedVar', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 25, + endLine: 1, + endColumn: 26, + suggestions: null + }, + { + ruleId: 'rule-to-test/no-unused-vars', + message: "'y' is defined but never used.", + messageId: 'unusedVar', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 28, + endLine: 1, + endColumn: 29, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unused-vars > valid + +```js +/*eslint custom/use-every-a:1*/ var a; +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-unused-vars', + message: "'a' is defined but never used.", + messageId: 'unusedVar', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 36, + endLine: 1, + endColumn: 37, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unused-vars > valid + +```js +/*eslint custom/use-every-a:1*/ !function(a) { return 1; } +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-unused-vars', + message: "'a' is defined but never used.", + messageId: 'unusedVar', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 42, + endLine: 1, + endColumn: 43, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unused-vars > valid + +```js +/*eslint custom/use-every-a:1*/ !function() { var a; return 1 } +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-unused-vars', + message: "'a' is defined but never used.", + messageId: 'unusedVar', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 50, + endLine: 1, + endColumn: 51, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unused-vars > valid + +```js +var [ firstItemIgnored, secondItem ] = items; +console.log(secondItem); +``` + +```json +{ + "options": [ + { + "vars": "all", + "varsIgnorePattern": "[iI]gnored" + } + ], + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-unused-vars', + message: "'secondItem' is defined but never used. Allowed unused vars must match /[iI]gnored/u.", + messageId: 'unusedVar', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 24, + endLine: 1, + endColumn: 34, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unused-vars > valid + +```js +try {} catch ([firstError]) {} +``` + +```json +{ + "options": [ + { + "destructuredArrayIgnorePattern": "Error$" + } + ], + "languageOptions": { + "ecmaVersion": 2015 + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-unused-vars', + message: "'firstError' is defined but never used.", + messageId: 'unusedVar', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 15, + endLine: 1, + endColumn: 25, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unused-vars > valid + +```js +try {} catch ({ message, stack }) {} +``` + +```json +{ + "options": [ + { + "caughtErrorsIgnorePattern": "message|stack" + } + ], + "languageOptions": { + "ecmaVersion": 2015 + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/no-unused-vars', + message: "'message' is defined but never used. Allowed unused caught errors must match /message|stack/u.", + messageId: 'unusedVar', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 16, + endLine: 1, + endColumn: 23, + suggestions: null + }, + { + ruleId: 'rule-to-test/no-unused-vars', + message: "'stack' is defined but never used. Allowed unused caught errors must match /message|stack/u.", + messageId: 'unusedVar', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 25, + endLine: 1, + endColumn: 30, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unused-vars > valid + +```js +try {} catch ({ errors: [firstError] }) {} +``` + +```json +{ + "options": [ + { + "caughtErrorsIgnorePattern": "Error$" + } + ], + "languageOptions": { + "ecmaVersion": 2015 + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-unused-vars', + message: "'firstError' is defined but never used. Allowed unused caught errors must match /Error$/u.", + messageId: 'unusedVar', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 25, + endLine: 1, + endColumn: 35, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unused-vars > valid + +```js +try {} catch ({ foo, ...bar }) { console.log(bar); } +``` + +```json +{ + "options": [ + { + "ignoreRestSiblings": true + } + ], + "languageOptions": { + "ecmaVersion": 2018 + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-unused-vars', + message: "'foo' is defined but never used.", + messageId: 'unusedVar', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 16, + endLine: 1, + endColumn: 19, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unused-vars > valid + +```js +var a = 0, b; b = a = a + 1; foo(b); +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/no-unused-vars', + message: "'a' is defined but never used.", + messageId: 'unusedVar', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 4, + endLine: 1, + endColumn: 5, + suggestions: null + }, + { + ruleId: 'rule-to-test/no-unused-vars', + message: "'b' is defined but never used.", + messageId: 'unusedVar', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 11, + endLine: 1, + endColumn: 12, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unused-vars > valid + +```js +var a = 0, b; b = a += a + 1; foo(b); +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/no-unused-vars', + message: "'a' is defined but never used.", + messageId: 'unusedVar', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 4, + endLine: 1, + endColumn: 5, + suggestions: null + }, + { + ruleId: 'rule-to-test/no-unused-vars', + message: "'b' is defined but never used.", + messageId: 'unusedVar', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 11, + endLine: 1, + endColumn: 12, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unused-vars > valid + +```js +var a = 0, b; b = a++; foo(b); +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/no-unused-vars', + message: "'a' is defined but never used.", + messageId: 'unusedVar', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 4, + endLine: 1, + endColumn: 5, + suggestions: null + }, + { + ruleId: 'rule-to-test/no-unused-vars', + message: "'b' is defined but never used.", + messageId: 'unusedVar', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 11, + endLine: 1, + endColumn: 12, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unused-vars > valid + +```js +var unregisterFooWatcher; +// ... +unregisterFooWatcher = $scope.$watch( "foo", function() { + // ...some code.. + unregisterFooWatcher(); +}); +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-unused-vars', + message: "'unregisterFooWatcher' is defined but never used.", + messageId: 'unusedVar', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 4, + endLine: 1, + endColumn: 24, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unused-vars > valid + +```js +var ref; +ref = setInterval( + function(){ + clearInterval(ref); + }, 10); +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-unused-vars', + message: "'ref' is defined but never used.", + messageId: 'unusedVar', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 4, + endLine: 1, + endColumn: 7, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unused-vars > valid + +```js +var _timer; +function f() { + _timer = setTimeout(function () {}, _timer ? 100 : 0); +} +f(); +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-unused-vars', + message: "'_timer' is defined but never used.", + messageId: 'unusedVar', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 4, + endLine: 1, + endColumn: 10, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unused-vars > valid + +```js +/*eslint custom/use-every-a:1*/ !function(b, a) { return 1 } +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/no-unused-vars', + message: "'b' is defined but never used.", + messageId: 'unusedVar', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 42, + endLine: 1, + endColumn: 43, + suggestions: null + }, + { + ruleId: 'rule-to-test/no-unused-vars', + message: "'a' is defined but never used.", + messageId: 'unusedVar', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 45, + endLine: 1, + endColumn: 46, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unused-vars > valid + +```js +var a = function () { a(); }; a(); +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-unused-vars', + message: "'a' is defined but never used.", + messageId: 'unusedVar', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 4, + endLine: 1, + endColumn: 5, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unused-vars > valid + +```js +var a = function(){ return function () { a(); } }; a(); +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-unused-vars', + message: "'a' is defined but never used.", + messageId: 'unusedVar', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 4, + endLine: 1, + endColumn: 5, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unused-vars > valid + +```js +var a; a ||= 1; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2021 + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-unused-vars', + message: "'a' is defined but never used.", + messageId: 'unusedVar', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 4, + endLine: 1, + endColumn: 5, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unused-vars > valid + +```js +var a; a &&= 1; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2021 + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-unused-vars', + message: "'a' is defined but never used.", + messageId: 'unusedVar', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 4, + endLine: 1, + endColumn: 5, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unused-vars > valid + +```js +var a; a ??= 1; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2021 + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-unused-vars', + message: "'a' is defined but never used.", + messageId: 'unusedVar', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 4, + endLine: 1, + endColumn: 5, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unused-vars > invalid + +```js +var a=10 +``` + +```json +{ + "errors": [ + { + "messageId": "unusedVar", + "data": { + "varName": "a", + "action": "assigned a value", + "additional": "" + }, + "suggestions": [ + { + "output": "", + "messageId": "removeVar", + "data": { + "varName": "a" + } + } + ] + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Hydrated message "'a' is assigned a value but never used." does not match "'a' is defined but never used." ++ actual - expected + ++ "'a' is defined but never used." +- "'a' is assigned a value but never used." + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unused-vars > invalid + +```js +/*global a */ +``` + +```json +{ + "errors": [ + { + "messageId": "unusedVar", + "data": { + "varName": "a", + "action": "defined", + "additional": "" + }, + "suggestions": [] + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unused-vars > invalid + +```js +var a=10; +``` + +```json +{ + "options": [ + "all" + ], + "errors": [ + { + "messageId": "unusedVar", + "data": { + "varName": "a", + "action": "assigned a value", + "additional": "" + }, + "suggestions": [ + { + "output": "", + "messageId": "removeVar", + "data": { + "varName": "a" + } + } + ] + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Hydrated message "'a' is assigned a value but never used." does not match "'a' is defined but never used." ++ actual - expected + ++ "'a' is defined but never used." +- "'a' is assigned a value but never used." + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unused-vars > invalid + +```js +var a=10; a=20; +``` + +```json +{ + "options": [ + "all" + ], + "errors": [ + { + "messageId": "unusedVar", + "data": { + "varName": "a", + "action": "assigned a value", + "additional": "" + }, + "suggestions": [] + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Hydrated message "'a' is assigned a value but never used." does not match "'a' is defined but never used." ++ actual - expected + ++ "'a' is defined but never used." +- "'a' is assigned a value but never used." + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unused-vars > invalid + +```js +var a=10; (function() { var a = 1; alert(a); })(); +``` + +```json +{ + "options": [ + "all" + ], + "errors": [ + { + "messageId": "unusedVar", + "data": { + "varName": "a", + "action": "assigned a value", + "additional": "" + }, + "suggestions": [ + { + "output": " (function() { var a = 1; alert(a); })();", + "messageId": "removeVar", + "data": { + "varName": "a" + } + } + ] + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Hydrated message "'a' is assigned a value but never used." does not match "'a' is defined but never used." ++ actual - expected + ++ "'a' is defined but never used." +- "'a' is assigned a value but never used." + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unused-vars > invalid + +```js +var a=10, b=0, c=null; alert(a+b) +``` + +```json +{ + "options": [ + "all" + ], + "errors": [ + { + "messageId": "unusedVar", + "data": { + "varName": "c", + "action": "assigned a value", + "additional": "" + }, + "suggestions": [ + { + "output": "var a=10, b=0; alert(a+b)", + "messageId": "removeVar", + "data": { + "varName": "c" + } + } + ] + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 3: [ + { + ruleId: 'rule-to-test/no-unused-vars', + message: "'a' is defined but never used.", + messageId: 'unusedVar', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 4, + endLine: 1, + endColumn: 5, + suggestions: null + }, + { + ruleId: 'rule-to-test/no-unused-vars', + message: "'b' is defined but never used.", + messageId: 'unusedVar', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 10, + endLine: 1, + endColumn: 11, + suggestions: null + }, + { + ruleId: 'rule-to-test/no-unused-vars', + message: "'c' is defined but never used.", + messageId: 'unusedVar', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 15, + endLine: 1, + endColumn: 16, + suggestions: null + } +] + +3 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unused-vars > invalid + +```js +var a=10, b=0, c=null; setTimeout(function() { var b=2; alert(a+b+c); }, 0); +``` + +```json +{ + "options": [ + "all" + ], + "errors": [ + { + "messageId": "unusedVar", + "data": { + "varName": "b", + "action": "assigned a value", + "additional": "" + }, + "suggestions": [ + { + "output": "var a=10, c=null; setTimeout(function() { var b=2; alert(a+b+c); }, 0);", + "messageId": "removeVar", + "data": { + "varName": "b" + } + } + ] + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 3: [ + { + ruleId: 'rule-to-test/no-unused-vars', + message: "'a' is defined but never used.", + messageId: 'unusedVar', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 4, + endLine: 1, + endColumn: 5, + suggestions: null + }, + { + ruleId: 'rule-to-test/no-unused-vars', + message: "'b' is defined but never used.", + messageId: 'unusedVar', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 10, + endLine: 1, + endColumn: 11, + suggestions: null + }, + { + ruleId: 'rule-to-test/no-unused-vars', + message: "'c' is defined but never used.", + messageId: 'unusedVar', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 15, + endLine: 1, + endColumn: 16, + suggestions: null + } +] + +3 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unused-vars > invalid + +```js +var a=10, b=0, c=null; setTimeout(function() { var b=2; var c=2; alert(a+b+c); }, 0); +``` + +```json +{ + "options": [ + "all" + ], + "errors": [ + { + "messageId": "unusedVar", + "data": { + "varName": "b", + "action": "assigned a value", + "additional": "" + }, + "suggestions": [ + { + "output": "var a=10, c=null; setTimeout(function() { var b=2; var c=2; alert(a+b+c); }, 0);", + "messageId": "removeVar", + "data": { + "varName": "b" + } + } + ] + }, + { + "messageId": "unusedVar", + "data": { + "varName": "c", + "action": "assigned a value", + "additional": "" + }, + "suggestions": [ + { + "output": "var a=10, b=0; setTimeout(function() { var b=2; var c=2; alert(a+b+c); }, 0);", + "messageId": "removeVar", + "data": { + "varName": "c" + } + } + ] + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 2 errors but had 3: [ + { + ruleId: 'rule-to-test/no-unused-vars', + message: "'a' is defined but never used.", + messageId: 'unusedVar', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 4, + endLine: 1, + endColumn: 5, + suggestions: null + }, + { + ruleId: 'rule-to-test/no-unused-vars', + message: "'b' is defined but never used.", + messageId: 'unusedVar', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 10, + endLine: 1, + endColumn: 11, + suggestions: null + }, + { + ruleId: 'rule-to-test/no-unused-vars', + message: "'c' is defined but never used.", + messageId: 'unusedVar', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 15, + endLine: 1, + endColumn: 16, + suggestions: null + } +] + +3 !== 2 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unused-vars > invalid + +```js +var min = Math.min +``` + +```json +{ + "options": [ + "all" + ], + "errors": [ + { + "messageId": "unusedVar", + "data": { + "varName": "min", + "action": "assigned a value", + "additional": "" + }, + "suggestions": [ + { + "output": "", + "messageId": "removeVar", + "data": { + "varName": "min" + } + } + ] + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Hydrated message "'min' is assigned a value but never used." does not match "'min' is defined but never used." ++ actual - expected + ++ "'min' is defined but never used." +- "'min' is assigned a value but never used." + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unused-vars > invalid + +```js +var min = {min: 1} +``` + +```json +{ + "options": [ + "all" + ], + "errors": [ + { + "messageId": "unusedVar", + "data": { + "varName": "min", + "action": "assigned a value", + "additional": "" + }, + "suggestions": [ + { + "output": "", + "messageId": "removeVar", + "data": { + "varName": "min" + } + } + ] + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Hydrated message "'min' is assigned a value but never used." does not match "'min' is defined but never used." ++ actual - expected + ++ "'min' is defined but never used." +- "'min' is assigned a value but never used." + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unused-vars > invalid + +```js +var min = {min: 1} +``` + +```json +{ + "options": [ + { + "vars": "all" + } + ], + "errors": [ + { + "messageId": "unusedVar", + "data": { + "varName": "min", + "action": "assigned a value", + "additional": "" + }, + "suggestions": [ + { + "output": "", + "messageId": "removeVar", + "data": { + "varName": "min" + } + } + ] + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Hydrated message "'min' is assigned a value but never used." does not match "'min' is defined but never used." ++ actual - expected + ++ "'min' is defined but never used." +- "'min' is assigned a value but never used." + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unused-vars > invalid + +```js +/*exported max*/ var max = 1, min = {min: 1} +``` + +```json +{ + "errors": [ + { + "messageId": "unusedVar", + "data": { + "varName": "min", + "action": "assigned a value", + "additional": "" + }, + "suggestions": [ + { + "output": "/*exported max*/ var max = 1", + "messageId": "removeVar", + "data": { + "varName": "min" + } + } + ] + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 2: [ + { + ruleId: 'rule-to-test/no-unused-vars', + message: "'max' is defined but never used.", + messageId: 'unusedVar', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 21, + endLine: 1, + endColumn: 24, + suggestions: null + }, + { + ruleId: 'rule-to-test/no-unused-vars', + message: "'min' is defined but never used.", + messageId: 'unusedVar', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 30, + endLine: 1, + endColumn: 33, + suggestions: null + } +] + +2 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unused-vars > invalid + +```js +/*exported x*/ var { x, y } = z +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "unusedVar", + "data": { + "varName": "y", + "action": "assigned a value", + "additional": "" + }, + "suggestions": [ + { + "output": "/*exported x*/ var { x } = z", + "messageId": "removeVar", + "data": { + "varName": "y" + } + } + ] + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 2: [ + { + ruleId: 'rule-to-test/no-unused-vars', + message: "'x' is defined but never used.", + messageId: 'unusedVar', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 21, + endLine: 1, + endColumn: 22, + suggestions: null + }, + { + ruleId: 'rule-to-test/no-unused-vars', + message: "'y' is defined but never used.", + messageId: 'unusedVar', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 24, + endLine: 1, + endColumn: 25, + suggestions: null + } +] + +2 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unused-vars > invalid + +```js +var [ firstItemIgnored, secondItem ] = items; +``` + +```json +{ + "options": [ + { + "vars": "all", + "varsIgnorePattern": "[iI]gnored" + } + ], + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "line": 1, + "column": 25, + "messageId": "unusedVar", + "data": { + "varName": "secondItem", + "action": "assigned a value", + "additional": ". Allowed unused vars must match /[iI]gnored/u" + }, + "suggestions": [ + { + "output": "var [ firstItemIgnored ] = items;", + "messageId": "removeVar", + "data": { + "varName": "secondItem" + } + } + ] + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Hydrated message "'secondItem' is assigned a value but never used. Allowed unused vars must match /[iI]gnored/u." does not match "'secondItem' is defined but never used. Allowed unused vars must match /[iI]gnored/u." ++ actual - expected + ++ "'secondItem' is defined but never used. Allowed unused vars must match /[iI]gnored/u." +- "'secondItem' is assigned a value but never used. Allowed unused vars must match /[iI]gnored/u." + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unused-vars > invalid + +```js +for ( var { foo } in bar ) { } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "line": 1, + "column": 13, + "messageId": "unusedVar", + "data": { + "varName": "foo", + "action": "assigned a value", + "additional": "" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Hydrated message "'foo' is assigned a value but never used." does not match "'foo' is defined but never used." ++ actual - expected + ++ "'foo' is defined but never used." +- "'foo' is assigned a value but never used." + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unused-vars > invalid + +```js +for ( var [ foo ] in bar ) { } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "line": 1, + "column": 13, + "messageId": "unusedVar", + "data": { + "varName": "foo", + "action": "assigned a value", + "additional": "" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Hydrated message "'foo' is assigned a value but never used." does not match "'foo' is defined but never used." ++ actual - expected + ++ "'foo' is defined but never used." +- "'foo' is assigned a value but never used." + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unused-vars > invalid + +```js +for ( var { foo } of bar ) { } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "line": 1, + "column": 13, + "messageId": "unusedVar", + "data": { + "varName": "foo", + "action": "assigned a value", + "additional": "" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Hydrated message "'foo' is assigned a value but never used." does not match "'foo' is defined but never used." ++ actual - expected + ++ "'foo' is defined but never used." +- "'foo' is assigned a value but never used." + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unused-vars > invalid + +```js +for ( var [ foo ] of bar ) { } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "line": 1, + "column": 13, + "messageId": "unusedVar", + "data": { + "varName": "foo", + "action": "assigned a value", + "additional": "" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Hydrated message "'foo' is assigned a value but never used." does not match "'foo' is defined but never used." ++ actual - expected + ++ "'foo' is defined but never used." +- "'foo' is assigned a value but never used." + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unused-vars > invalid + +```js + +/* global foobar, foo, bar */ +foobar; +``` + +```json +{ + "errors": [ + { + "line": 2, + "endLine": 2, + "column": 19, + "endColumn": 22, + "messageId": "unusedVar", + "data": { + "varName": "foo", + "action": "defined", + "additional": "" + } + }, + { + "line": 2, + "endLine": 2, + "column": 24, + "endColumn": 27, + "messageId": "unusedVar", + "data": { + "varName": "bar", + "action": "defined", + "additional": "" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 2 errors but had 0: [] + +0 !== 2 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unused-vars > invalid + +```js + +/* global foobar, + foo, + bar + */ +foobar; +``` + +```json +{ + "errors": [ + { + "line": 3, + "column": 4, + "endLine": 3, + "endColumn": 7, + "messageId": "unusedVar", + "data": { + "varName": "foo", + "action": "defined", + "additional": "" + } + }, + { + "line": 4, + "column": 4, + "endLine": 4, + "endColumn": 7, + "messageId": "unusedVar", + "data": { + "varName": "bar", + "action": "defined", + "additional": "" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 2 errors but had 0: [] + +0 !== 2 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unused-vars > invalid + +```js +/* global a$fooz,$foo */ +a$fooz; +``` + +```json +{ + "errors": [ + { + "line": 1, + "column": 18, + "endLine": 1, + "endColumn": 22, + "messageId": "unusedVar", + "data": { + "varName": "$foo", + "action": "defined", + "additional": "" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unused-vars > invalid + +```js +/* globals a$fooz, $ */ +a$fooz; +``` + +```json +{ + "errors": [ + { + "line": 1, + "column": 20, + "endLine": 1, + "endColumn": 21, + "messageId": "unusedVar", + "data": { + "varName": "$", + "action": "defined", + "additional": "" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unused-vars > invalid + +```js +/*globals $foo*/ +``` + +```json +{ + "errors": [ + { + "line": 1, + "column": 11, + "endLine": 1, + "endColumn": 15, + "messageId": "unusedVar", + "data": { + "varName": "$foo", + "action": "defined", + "additional": "" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unused-vars > invalid + +```js +/* global global*/ +``` + +```json +{ + "errors": [ + { + "line": 1, + "column": 11, + "endLine": 1, + "endColumn": 17, + "messageId": "unusedVar", + "data": { + "varName": "global", + "action": "defined", + "additional": "" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unused-vars > invalid + +```js +/*global foo:true*/ +``` + +```json +{ + "errors": [ + { + "line": 1, + "column": 10, + "endLine": 1, + "endColumn": 13, + "messageId": "unusedVar", + "data": { + "varName": "foo", + "action": "defined", + "additional": "" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unused-vars > invalid + +```js +/*global 変数, 数*/ +変数; +``` + +```json +{ + "errors": [ + { + "line": 1, + "column": 14, + "endLine": 1, + "endColumn": 15, + "messageId": "unusedVar", + "data": { + "varName": "数", + "action": "defined", + "additional": "" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unused-vars > invalid + +```js +/*global 𠮷𩸽, 𠮷*/ +\u{20BB7}\u{29E3D}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "line": 1, + "column": 16, + "endLine": 1, + "endColumn": 18, + "messageId": "unusedVar", + "data": { + "varName": "𠮷", + "action": "defined", + "additional": "" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unused-vars > invalid + +```js +var a = 0; a = a + 1; +``` + +```json +{ + "errors": [ + { + "messageId": "unusedVar", + "data": { + "varName": "a", + "action": "assigned a value", + "additional": "" + }, + "suggestions": [] + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Hydrated message "'a' is assigned a value but never used." does not match "'a' is defined but never used." ++ actual - expected + ++ "'a' is defined but never used." +- "'a' is assigned a value but never used." + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unused-vars > invalid + +```js +var a = 0; a = a + a; +``` + +```json +{ + "errors": [ + { + "messageId": "unusedVar", + "data": { + "varName": "a", + "action": "assigned a value", + "additional": "" + }, + "suggestions": [] + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Hydrated message "'a' is assigned a value but never used." does not match "'a' is defined but never used." ++ actual - expected + ++ "'a' is defined but never used." +- "'a' is assigned a value but never used." + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unused-vars > invalid + +```js +var a = 0; a += a + 1; +``` + +```json +{ + "errors": [ + { + "messageId": "unusedVar", + "data": { + "varName": "a", + "action": "assigned a value", + "additional": "" + }, + "suggestions": [] + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Hydrated message "'a' is assigned a value but never used." does not match "'a' is defined but never used." ++ actual - expected + ++ "'a' is defined but never used." +- "'a' is assigned a value but never used." + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unused-vars > invalid + +```js +var a = 0; a++; +``` + +```json +{ + "errors": [ + { + "messageId": "unusedVar", + "data": { + "varName": "a", + "action": "assigned a value", + "additional": "" + }, + "suggestions": [] + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Hydrated message "'a' is assigned a value but never used." does not match "'a' is defined but never used." ++ actual - expected + ++ "'a' is defined but never used." +- "'a' is assigned a value but never used." + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unused-vars > invalid + +```js +var a = 3; a = a * 5 + 6; +``` + +```json +{ + "errors": [ + { + "messageId": "unusedVar", + "data": { + "varName": "a", + "action": "assigned a value", + "additional": "" + }, + "suggestions": [] + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Hydrated message "'a' is assigned a value but never used." does not match "'a' is defined but never used." ++ actual - expected + ++ "'a' is defined but never used." +- "'a' is assigned a value but never used." + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unused-vars > invalid + +```js +var a = 2, b = 4; a = a * 2 + b; +``` + +```json +{ + "errors": [ + { + "messageId": "unusedVar", + "data": { + "varName": "a", + "action": "assigned a value", + "additional": "" + }, + "suggestions": [] + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 2: [ + { + ruleId: 'rule-to-test/no-unused-vars', + message: "'a' is defined but never used.", + messageId: 'unusedVar', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 4, + endLine: 1, + endColumn: 5, + suggestions: null + }, + { + ruleId: 'rule-to-test/no-unused-vars', + message: "'b' is defined but never used.", + messageId: 'unusedVar', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 11, + endLine: 1, + endColumn: 12, + suggestions: null + } +] + +2 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unused-vars > invalid + +```js +/*global\u000dfoo*/ +``` + +```json +{ + "code": "/*global\rfoo*/", + "errors": [ + { + "line": 2, + "column": 1, + "endLine": 2, + "endColumn": 4, + "messageId": "unusedVar", + "data": { + "varName": "foo", + "action": "defined", + "additional": "" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unused-vars > invalid + +```js +var a = function() { a(); }; +``` + +```json +{ + "errors": [ + { + "messageId": "unusedVar", + "data": { + "varName": "a", + "action": "assigned a value", + "additional": "" + }, + "suggestions": [ + { + "output": "", + "messageId": "removeVar", + "data": { + "varName": "a" + } + } + ], + "line": 1, + "column": 5 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Hydrated message "'a' is assigned a value but never used." does not match "'a' is defined but never used." ++ actual - expected + ++ "'a' is defined but never used." +- "'a' is assigned a value but never used." + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unused-vars > invalid + +```js +var a = function(){ return function() { a(); } }; +``` + +```json +{ + "errors": [ + { + "messageId": "unusedVar", + "data": { + "varName": "a", + "action": "assigned a value", + "additional": "" + }, + "suggestions": [ + { + "output": "", + "messageId": "removeVar", + "data": { + "varName": "a" + } + } + ], + "line": 1, + "column": 5 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Hydrated message "'a' is assigned a value but never used." does not match "'a' is defined but never used." ++ actual - expected + ++ "'a' is defined but never used." +- "'a' is assigned a value but never used." + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unused-vars > invalid + +```js +try {} catch ({ message }) { console.error(message); } +``` + +```json +{ + "options": [ + { + "caughtErrorsIgnorePattern": "message", + "reportUsedIgnorePattern": true + } + ], + "languageOptions": { + "ecmaVersion": 2015 + }, + "errors": [ + { + "messageId": "usedIgnoredVar", + "data": { + "varName": "message", + "additional": ". Used caught errors must not match /message/u" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unused-vars > invalid + +```js +try {} catch ([_a, _b]) { doSomething(_a, _b); } +``` + +```json +{ + "options": [ + { + "caughtErrorsIgnorePattern": "^_", + "reportUsedIgnorePattern": true + } + ], + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "usedIgnoredVar", + "data": { + "varName": "_a", + "additional": ". Used caught errors must not match /^_/u" + } + }, + { + "messageId": "usedIgnoredVar", + "data": { + "varName": "_b", + "additional": ". Used caught errors must not match /^_/u" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 2 errors but had 0: [] + +0 !== 2 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unused-vars > invalid + +```js +try {} catch ([_a, _b]) { doSomething(_a, _b); } +``` + +```json +{ + "options": [ + { + "destructuredArrayIgnorePattern": "^_", + "reportUsedIgnorePattern": true + } + ], + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "usedIgnoredVar", + "data": { + "varName": "_a", + "additional": ". Used elements of array destructuring must not match /^_/u" + } + }, + { + "messageId": "usedIgnoredVar", + "data": { + "varName": "_b", + "additional": ". Used elements of array destructuring must not match /^_/u" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 2 errors but had 0: [] + +0 !== 2 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unused-vars > invalid + +```js +try {} catch ({ stack: $ }) { $ = 'Something broke: ' + $; } +``` + +```json +{ + "options": [ + { + "caughtErrorsIgnorePattern": "\\w" + } + ], + "languageOptions": { + "ecmaVersion": 2015 + }, + "errors": [ + { + "message": "'$' is assigned a value but never used. Allowed unused caught errors must match /\\w/u.", + "column": 31, + "endColumn": 32 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unused-vars > invalid + +```js +var [a] = foo;'use strict';b(00); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "unusedVar", + "data": { + "varName": "a", + "action": "assigned a value", + "additional": "" + }, + "suggestions": [] + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Hydrated message "'a' is assigned a value but never used." does not match "'a' is defined but never used." ++ actual - expected + ++ "'a' is defined but never used." +- "'a' is assigned a value but never used." + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unused-vars > invalid + +```js +var [...a] = foo;'use strict';b(00); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "unusedVar", + "data": { + "varName": "a", + "action": "assigned a value", + "additional": "" + }, + "suggestions": [] + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Hydrated message "'a' is assigned a value but never used." does not match "'a' is defined but never used." ++ actual - expected + ++ "'a' is defined but never used." +- "'a' is assigned a value but never used." + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unused-vars > invalid + +```js +var {a} = foo;'use strict';b(00); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "unusedVar", + "data": { + "varName": "a", + "action": "assigned a value", + "additional": "" + }, + "suggestions": [] + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Hydrated message "'a' is assigned a value but never used." does not match "'a' is defined but never used." ++ actual - expected + ++ "'a' is defined but never used." +- "'a' is assigned a value but never used." + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unused-vars > invalid + +```js +console.log('foo') +var [a] = foo; ++b > 0 ? bar() : baz() +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "unusedVar", + "data": { + "varName": "a", + "action": "assigned a value", + "additional": "" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Hydrated message "'a' is assigned a value but never used." does not match "'a' is defined but never used." ++ actual - expected + ++ "'a' is defined but never used." +- "'a' is assigned a value but never used." + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unused-vars > invalid + +```js +console.log('foo') +var {a} = foo; ++b > 0 ? bar() : baz() +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "unusedVar", + "data": { + "varName": "a", + "action": "assigned a value", + "additional": "" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Hydrated message "'a' is assigned a value but never used." does not match "'a' is defined but never used." ++ actual - expected + ++ "'a' is defined but never used." +- "'a' is assigned a value but never used." + ^ + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-unused-vars > invalid + +```js +function foo(a = 1, b) {a = 2;} foo(); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "unusedVar", + "data": { + "varName": "b", + "action": "defined", + "additional": "" + }, + "suggestions": [ + { + "output": "function foo(a = 1) {a = 2;} foo();", + "messageId": "removeVar", + "data": { + "varName": "b" + } + } + ] + }, + { + "messageId": "unusedVar", + "data": { + "varName": "a", + "action": "assigned a value", + "additional": "" + }, + "suggestions": [] + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Hydrated message "'b' is defined but never used." does not match "'a' is assigned a value but never used." ++ actual - expected + ++ "'a' is assigned a value but never used." +- "'b' is defined but never used." + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +### `no-use-before-define` + +Pass: 284 / 347 (81.8%) +Fail: 63 / 347 (18.2%) + +#### no-use-before-define > invalid + +```js +a++; var a=19; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "usedBeforeDefined", + "data": { + "name": "a" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-use-before-define > invalid + +```js +a++; var a=19; +``` + +```json +{ + "errors": [ + { + "messageId": "usedBeforeDefined", + "data": { + "name": "a" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-use-before-define > invalid + +```js +a(); var a=function() {}; +``` + +```json +{ + "errors": [ + { + "messageId": "usedBeforeDefined", + "data": { + "name": "a" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-use-before-define > invalid + +```js +alert(a[1]); var a=[1,3]; +``` + +```json +{ + "errors": [ + { + "messageId": "usedBeforeDefined", + "data": { + "name": "a" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-use-before-define > invalid + +```js +a(); var a=function() {}; +``` + +```json +{ + "options": [ + "nofunc" + ], + "errors": [ + { + "messageId": "usedBeforeDefined", + "data": { + "name": "a" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-use-before-define > invalid + +```js +"use strict"; a(); { function a() {} } +``` + +```json +{ + "errors": [ + { + "messageId": "usedBeforeDefined", + "data": { + "name": "a" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-use-before-define > invalid + +```js +a(); try { throw new Error() } catch (foo) {var a;} +``` + +```json +{ + "errors": [ + { + "messageId": "usedBeforeDefined", + "data": { + "name": "a" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-use-before-define > invalid + +```js +var f = () => a; var a; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "usedBeforeDefined", + "data": { + "name": "a" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-use-before-define > invalid + +```js +new A(); var A = class {}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "usedBeforeDefined", + "data": { + "name": "A" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-use-before-define > invalid + +```js +function foo() { new A(); } var A = class {}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "usedBeforeDefined", + "data": { + "name": "A" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-use-before-define > invalid + +```js +a++; { var a; } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "usedBeforeDefined", + "data": { + "name": "a" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-use-before-define > invalid + +```js +a(); var a=function() {}; +``` + +```json +{ + "options": [ + { + "functions": false, + "classes": false + } + ], + "errors": [ + { + "messageId": "usedBeforeDefined", + "data": { + "name": "a" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-use-before-define > invalid + +```js +new A(); var A = class {}; +``` + +```json +{ + "options": [ + { + "classes": false + } + ], + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "usedBeforeDefined", + "data": { + "name": "A" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-use-before-define > invalid + +```js +function foo() { new A(); } var A = class {}; +``` + +```json +{ + "options": [ + { + "classes": false + } + ], + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "usedBeforeDefined", + "data": { + "name": "A" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-use-before-define > invalid + +```js +var a = a; +``` + +```json +{ + "errors": [ + { + "messageId": "usedBeforeDefined", + "data": { + "name": "a" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-use-before-define > invalid + +```js +var {a = a} = []; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "usedBeforeDefined", + "data": { + "name": "a" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-use-before-define > invalid + +```js +var [a = a] = []; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "usedBeforeDefined", + "data": { + "name": "a" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-use-before-define > invalid + +```js +var {b = a, a} = {}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "usedBeforeDefined", + "data": { + "name": "a" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-use-before-define > invalid + +```js +var [b = a, a] = {}; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "usedBeforeDefined", + "data": { + "name": "a" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-use-before-define > invalid + +```js +var {a = 0} = a; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "usedBeforeDefined", + "data": { + "name": "a" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-use-before-define > invalid + +```js +var [a = 0] = a; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "usedBeforeDefined", + "data": { + "name": "a" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-use-before-define > invalid + +```js +for (var a in a) {} +``` + +```json +{ + "errors": [ + { + "messageId": "usedBeforeDefined", + "data": { + "name": "a" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-use-before-define > invalid + +```js +for (var a of a) {} +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "usedBeforeDefined", + "data": { + "name": "a" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-use-before-define > invalid + +```js +foo; var foo; +``` + +```json +{ + "options": [ + { + "variables": false + } + ], + "errors": [ + { + "messageId": "usedBeforeDefined", + "data": { + "name": "foo" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-use-before-define > valid + +```js + +\u0009type foo = 1; +\u0009const x: foo = 1; +\u0009\u0009 +``` + +```json +{ + "code": "\n\ttype foo = 1;\n\tconst x: foo = 1;\n\t\t" +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-use-before-define > valid + +```js + +\u0009type foo = 1; +\u0009type bar = foo; +\u0009\u0009 +``` + +```json +{ + "code": "\n\ttype foo = 1;\n\ttype bar = foo;\n\t\t" +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-use-before-define > valid + +```js + +\u0009interface Foo {} +\u0009const x: Foo = {}; +\u0009\u0009 +``` + +```json +{ + "code": "\n\tinterface Foo {}\n\tconst x: Foo = {};\n\t\t" +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-use-before-define > valid + +```js +declare function a(); +``` + +```json +{} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-use-before-define > valid + +```js + +\u0009declare class a { +\u0009 foo(); +\u0009} +\u0009\u0009 +``` + +```json +{ + "code": "\n\tdeclare class a {\n\t foo();\n\t}\n\t\t" +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-use-before-define > valid + +```js + +\u0009var x: Foo = 2; +\u0009type Foo = string | number; +\u0009\u0009 +``` + +```json +{ + "code": "\n\tvar x: Foo = 2;\n\ttype Foo = string | number;\n\t\t ", + "options": [ + { + "typedefs": false + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-use-before-define > valid + +```js + +\u0009var x: Foo = {}; +\u0009interface Foo {} +\u0009\u0009 +``` + +```json +{ + "code": "\n\tvar x: Foo = {};\n\tinterface Foo {}\n\t\t ", + "options": [ + { + "typedefs": false, + "ignoreTypeReferences": false + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-use-before-define > valid + +```js + +\u0009let myVar: String; +\u0009type String = string; +\u0009\u0009 +``` + +```json +{ + "code": "\n\tlet myVar: String;\n\ttype String = string;\n\t\t ", + "options": [ + { + "typedefs": false, + "ignoreTypeReferences": false + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-use-before-define > valid + +```js + +\u0009interface Bar { +\u0009 type: typeof Foo; +\u0009} +\u0009 +\u0009const Foo = 2; +\u0009\u0009 +``` + +```json +{ + "code": "\n\tinterface Bar {\n\t type: typeof Foo;\n\t}\n\t\n\tconst Foo = 2;\n\t\t ", + "options": [ + { + "ignoreTypeReferences": true + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-use-before-define > valid + +```js + +\u0009interface Bar { +\u0009 type: typeof Foo.FOO; +\u0009} +\u0009 +\u0009class Foo { +\u0009 public static readonly FOO = ''; +\u0009} +\u0009\u0009 +``` + +```json +{ + "code": "\n\tinterface Bar {\n\t type: typeof Foo.FOO;\n\t}\n\t\n\tclass Foo {\n\t public static readonly FOO = '';\n\t}\n\t\t ", + "options": [ + { + "ignoreTypeReferences": true + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-use-before-define > valid + +```js + +\u0009interface Bar { +\u0009 type: typeof Foo.Bar.Baz; +\u0009} +\u0009 +\u0009const Foo = { +\u0009 Bar: { +\u0009\u0009Baz: 1, +\u0009 }, +\u0009}; +\u0009\u0009 +``` + +```json +{ + "code": "\n\tinterface Bar {\n\t type: typeof Foo.Bar.Baz;\n\t}\n\t\n\tconst Foo = {\n\t Bar: {\n\t\tBaz: 1,\n\t },\n\t};\n\t\t ", + "options": [ + { + "ignoreTypeReferences": true + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-use-before-define > valid + +```js + +\u0009interface ITest { +\u0009 first: boolean; +\u0009 second: string; +\u0009 third: boolean; +\u0009} +\u0009 +\u0009let first = () => console.log('first'); +\u0009 +\u0009export let second = () => console.log('second'); +\u0009 +\u0009export namespace Third { +\u0009 export let third = () => console.log('third'); +\u0009} +\u0009\u0009 +``` + +```json +{ + "code": "\n\tinterface ITest {\n\t first: boolean;\n\t second: string;\n\t third: boolean;\n\t}\n\t\n\tlet first = () => console.log('first');\n\t\n\texport let second = () => console.log('second');\n\t\n\texport namespace Third {\n\t export let third = () => console.log('third');\n\t}\n\t\t ", + "languageOptions": { + "parserOptions": { + "ecmaVersion": 6, + "sourceType": "module" + } + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-use-before-define > valid + +```js + +\u0009function test(file: Blob) { +\u0009 const slice: typeof file.slice = +\u0009\u0009file.slice || (file as any).webkitSlice || (file as any).mozSlice; +\u0009 return slice; +\u0009} +\u0009\u0009 +``` + +```json +{ + "code": "\n\tfunction test(file: Blob) {\n\t const slice: typeof file.slice =\n\t\tfile.slice || (file as any).webkitSlice || (file as any).mozSlice;\n\t return slice;\n\t}\n\t\t" +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-use-before-define > valid + +```js + +\u0009interface Foo { +\u0009 bar: string; +\u0009} +\u0009const bar = 'blah'; +\u0009\u0009 +``` + +```json +{ + "code": "\n\tinterface Foo {\n\t bar: string;\n\t}\n\tconst bar = 'blah';\n\t\t" +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-use-before-define > valid + +```js + +\u0009function foo(): Foo { +\u0009 return Foo.FOO; +\u0009} +\u0009 +\u0009enum Foo { +\u0009 FOO, +\u0009} +\u0009\u0009 +``` + +```json +{ + "code": "\n\tfunction foo(): Foo {\n\t return Foo.FOO;\n\t}\n\t\n\tenum Foo {\n\t FOO,\n\t}\n\t\t ", + "options": [ + { + "enums": false + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-use-before-define > valid + +```js + +\u0009let foo: Foo; +\u0009 +\u0009enum Foo { +\u0009 FOO, +\u0009} +\u0009\u0009 +``` + +```json +{ + "code": "\n\tlet foo: Foo;\n\t\n\tenum Foo {\n\t FOO,\n\t}\n\t\t ", + "options": [ + { + "enums": false + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-use-before-define > valid + +```js + +\u0009class Test { +\u0009 foo(args: Foo): Foo { +\u0009\u0009return Foo.FOO; +\u0009 } +\u0009} +\u0009 +\u0009enum Foo { +\u0009 FOO, +\u0009} +\u0009\u0009 +``` + +```json +{ + "code": "\n\tclass Test {\n\t foo(args: Foo): Foo {\n\t\treturn Foo.FOO;\n\t }\n\t}\n\t\n\tenum Foo {\n\t FOO,\n\t}\n\t\t ", + "options": [ + { + "enums": false + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-use-before-define > valid + +```js + +\u0009export { Foo }; +\u0009 +\u0009enum Foo { +\u0009 BAR, +\u0009} +\u0009\u0009 +``` + +```json +{ + "code": "\n\texport { Foo };\n\t\n\tenum Foo {\n\t BAR,\n\t}\n\t\t ", + "options": [ + { + "allowNamedExports": true + } + ], + "languageOptions": { + "parserOptions": { + "ecmaVersion": 6 + } + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-use-before-define > valid + +```js + +\u0009export { Foo }; +\u0009 +\u0009namespace Foo { +\u0009 export let bar = () => console.log('bar'); +\u0009} +\u0009\u0009 +``` + +```json +{ + "code": "\n\texport { Foo };\n\t\n\tnamespace Foo {\n\t export let bar = () => console.log('bar');\n\t}\n\t\t ", + "options": [ + { + "allowNamedExports": true + } + ], + "languageOptions": { + "parserOptions": { + "ecmaVersion": 6 + } + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-use-before-define > valid + +```js + +\u0009export { Foo, baz }; +\u0009 +\u0009enum Foo { +\u0009 BAR, +\u0009} +\u0009 +\u0009let baz: Enum; +\u0009enum Enum {} +\u0009\u0009 +``` + +```json +{ + "code": "\n\texport { Foo, baz };\n\t\n\tenum Foo {\n\t BAR,\n\t}\n\t\n\tlet baz: Enum;\n\tenum Enum {}\n\t\t ", + "options": [ + { + "allowNamedExports": true + } + ], + "languageOptions": { + "parserOptions": { + "ecmaVersion": 6 + } + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-use-before-define > valid + +```js + +\u0009type T = (value: unknown) => value is Id; +\u0009\u0009 +``` + +```json +{ + "code": "\n\ttype T = (value: unknown) => value is Id;\n\t\t" +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-use-before-define > valid + +```js + +\u0009global.foo = true; +\u0009 +\u0009declare global { +\u0009 namespace NodeJS { +\u0009\u0009interface Global { +\u0009\u0009 foo?: boolean; +\u0009\u0009} +\u0009 } +\u0009} +\u0009\u0009 +``` + +```json +{ + "code": "\n\tglobal.foo = true;\n\t\n\tdeclare global {\n\t namespace NodeJS {\n\t\tinterface Global {\n\t\t foo?: boolean;\n\t\t}\n\t }\n\t}\n\t\t" +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-use-before-define > valid + +```js + +\u0009const obj = { +\u0009 foo: 'foo-value', +\u0009 bar: 'bar-value', +\u0009} satisfies { +\u0009 [key in 'foo' | 'bar']: `${key}-value`; +\u0009}; +\u0009\u0009 +``` + +```json +{ + "code": "\n\tconst obj = {\n\t foo: 'foo-value',\n\t bar: 'bar-value',\n\t} satisfies {\n\t [key in 'foo' | 'bar']: `${key}-value`;\n\t};\n\t\t ", + "options": [ + { + "ignoreTypeReferences": false + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-use-before-define > valid + +```js + +\u0009const obj = { +\u0009 foo: 'foo-value', +\u0009 bar: 'bar-value', +\u0009} as { +\u0009 [key in 'foo' | 'bar']: `${key}-value`; +\u0009}; +\u0009\u0009 +``` + +```json +{ + "code": "\n\tconst obj = {\n\t foo: 'foo-value',\n\t bar: 'bar-value',\n\t} as {\n\t [key in 'foo' | 'bar']: `${key}-value`;\n\t};\n\t\t ", + "options": [ + { + "ignoreTypeReferences": false + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-use-before-define > valid + +```js + +\u0009const obj = { +\u0009 foo: { +\u0009\u0009foo: 'foo', +\u0009 } as { +\u0009\u0009[key in 'foo' | 'bar']: key; +\u0009 }, +\u0009}; +\u0009\u0009 +``` + +```json +{ + "code": "\n\tconst obj = {\n\t foo: {\n\t\tfoo: 'foo',\n\t } as {\n\t\t[key in 'foo' | 'bar']: key;\n\t },\n\t};\n\t\t ", + "options": [ + { + "ignoreTypeReferences": false + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-use-before-define > valid + +```js + +\u0009const foo = { +\u0009 bar: 'bar', +\u0009} satisfies { +\u0009 bar: typeof baz; +\u0009}; +\u0009 +\u0009const baz = ''; +\u0009\u0009 +``` + +```json +{ + "code": "\n\tconst foo = {\n\t bar: 'bar',\n\t} satisfies {\n\t bar: typeof baz;\n\t};\n\t\n\tconst baz = '';\n\t\t ", + "options": [ + { + "ignoreTypeReferences": true + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-use-before-define > valid + +```js + +\u0009namespace A.X.Y {} +\u0009 +\u0009import Z = A.X.Y; +\u0009 +\u0009const X = 23; +\u0009\u0009 +``` + +```json +{ + "code": "\n\tnamespace A.X.Y {}\n\t\n\timport Z = A.X.Y;\n\t\n\tconst X = 23;\n\t\t" +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-use-before-define > valid + +```js + +\u0009\u0009namespace A { +\u0009\u0009\u0009export namespace X { +\u0009\u0009\u0009\u0009export namespace Y { +\u0009\u0009\u0009\u0009\u0009export const foo = 40; +\u0009\u0009\u0009\u0009} +\u0009\u0009\u0009} +\u0009\u0009} + +\u0009\u0009import Z = A.X.Y; + +\u0009\u0009const X = 23; +\u0009\u0009 +``` + +```json +{ + "code": "\n\t\tnamespace A {\n\t\t\texport namespace X {\n\t\t\t\texport namespace Y {\n\t\t\t\t\texport const foo = 40;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\timport Z = A.X.Y;\n\n\t\tconst X = 23;\n\t\t" +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-use-before-define > invalid + +```js + +\u0009interface Bar { +\u0009 type: typeof Foo; +\u0009} +\u0009 +\u0009const Foo = 2; +\u0009\u0009 +``` + +```json +{ + "code": "\n\tinterface Bar {\n\t type: typeof Foo;\n\t}\n\t\n\tconst Foo = 2;\n\t\t ", + "options": [ + { + "ignoreTypeReferences": false + } + ], + "errors": [ + { + "data": { + "name": "Foo" + }, + "messageId": "usedBeforeDefined" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-use-before-define > invalid + +```js + +\u0009let var1: StringOrNumber; + +type StringOrNumber = string | number; +\u0009\u0009 +``` + +```json +{ + "code": "\n\tlet var1: StringOrNumber;\n\ntype StringOrNumber = string | number;\n\t\t ", + "options": [ + { + "ignoreTypeReferences": false, + "typedefs": true + } + ], + "errors": [ + { + "data": { + "name": "StringOrNumber" + }, + "messageId": "usedBeforeDefined" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-use-before-define > invalid + +```js + +\u0009interface Bar { +\u0009 type: typeof Foo.FOO; +\u0009} +\u0009 +\u0009class Foo { +\u0009 public static readonly FOO = ''; +\u0009} +\u0009\u0009 +``` + +```json +{ + "code": "\n\tinterface Bar {\n\t type: typeof Foo.FOO;\n\t}\n\t\n\tclass Foo {\n\t public static readonly FOO = '';\n\t}\n\t\t ", + "options": [ + { + "ignoreTypeReferences": false + } + ], + "errors": [ + { + "data": { + "name": "Foo" + }, + "messageId": "usedBeforeDefined" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-use-before-define > invalid + +```js + +\u0009interface Bar { +\u0009 type: typeof Foo.Bar.Baz; +\u0009} +\u0009 +\u0009const Foo = { +\u0009 Bar: { +\u0009\u0009Baz: 1, +\u0009 }, +\u0009}; +\u0009\u0009 +``` + +```json +{ + "code": "\n\tinterface Bar {\n\t type: typeof Foo.Bar.Baz;\n\t}\n\t\n\tconst Foo = {\n\t Bar: {\n\t\tBaz: 1,\n\t },\n\t};\n\t\t ", + "options": [ + { + "ignoreTypeReferences": false + } + ], + "errors": [ + { + "data": { + "name": "Foo" + }, + "messageId": "usedBeforeDefined" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-use-before-define > invalid + +```js + +\u0009const foo = { +\u0009 bar: 'bar', +\u0009} satisfies { +\u0009 bar: typeof baz; +\u0009}; +\u0009 +\u0009const baz = ''; +\u0009\u0009 +``` + +```json +{ + "code": "\n\tconst foo = {\n\t bar: 'bar',\n\t} satisfies {\n\t bar: typeof baz;\n\t};\n\t\n\tconst baz = '';\n\t\t ", + "options": [ + { + "ignoreTypeReferences": false + } + ], + "errors": [ + { + "data": { + "name": "baz" + }, + "messageId": "usedBeforeDefined" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-use-before-define > invalid + +```js + +\u0009class Test { +\u0009 foo(args: Foo): Foo { +\u0009\u0009return Foo.FOO; +\u0009 } +\u0009} +\u0009 +\u0009enum Foo { +\u0009 FOO, +\u0009} +\u0009\u0009 +``` + +```json +{ + "code": "\n\tclass Test {\n\t foo(args: Foo): Foo {\n\t\treturn Foo.FOO;\n\t }\n\t}\n\t\n\tenum Foo {\n\t FOO,\n\t}\n\t\t ", + "options": [ + { + "enums": true + } + ], + "errors": [ + { + "data": { + "name": "Foo" + }, + "line": 4, + "messageId": "usedBeforeDefined" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-use-before-define > invalid + +```js + +\u0009function foo(): Foo { +\u0009 return Foo.FOO; +\u0009} +\u0009 +\u0009enum Foo { +\u0009 FOO, +\u0009 } +\u0009 +``` + +```json +{ + "code": "\n\tfunction foo(): Foo {\n\t return Foo.FOO;\n\t}\n\t\n\tenum Foo {\n\t FOO,\n\t }\n\t", + "options": [ + { + "enums": true + } + ], + "errors": [ + { + "data": { + "name": "Foo" + }, + "line": 3, + "messageId": "usedBeforeDefined" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-use-before-define > invalid + +```js + +\u0009const foo = Foo.Foo; +\u0009 +\u0009enum Foo { +\u0009 FOO, +\u0009} +\u0009\u0009 +``` + +```json +{ + "code": "\n\tconst foo = Foo.Foo;\n\t\n\tenum Foo {\n\t FOO,\n\t}\n\t\t ", + "options": [ + { + "enums": true + } + ], + "errors": [ + { + "data": { + "name": "Foo" + }, + "line": 2, + "messageId": "usedBeforeDefined" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-use-before-define > invalid + +```js + +\u0009export { Foo }; +\u0009 +\u0009enum Foo { +\u0009 BAR, +\u0009} +\u0009\u0009 +``` + +```json +{ + "code": "\n\texport { Foo };\n\t\n\tenum Foo {\n\t BAR,\n\t}\n\t\t ", + "languageOptions": { + "parserOptions": { + "ecmaVersion": 6 + } + }, + "errors": [ + { + "data": { + "name": "Foo" + }, + "messageId": "usedBeforeDefined" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-use-before-define > invalid + +```js + +\u0009export { Foo }; +\u0009 +\u0009namespace Foo { +\u0009 export let bar = () => console.log('bar'); +\u0009} +\u0009\u0009 +``` + +```json +{ + "code": "\n\texport { Foo };\n\t\n\tnamespace Foo {\n\t export let bar = () => console.log('bar');\n\t}\n\t\t ", + "languageOptions": { + "parserOptions": { + "ecmaVersion": 6 + } + }, + "errors": [ + { + "data": { + "name": "Foo" + }, + "messageId": "usedBeforeDefined" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-use-before-define > invalid + +```js + +\u0009export { Foo, baz }; +\u0009 +\u0009enum Foo { +\u0009 BAR, +\u0009} +\u0009 +\u0009let baz: Enum; +\u0009enum Enum {} +\u0009\u0009 +``` + +```json +{ + "code": "\n\texport { Foo, baz };\n\t\n\tenum Foo {\n\t BAR,\n\t}\n\t\n\tlet baz: Enum;\n\tenum Enum {}\n\t\t ", + "options": [ + { + "allowNamedExports": false, + "ignoreTypeReferences": true + } + ], + "languageOptions": { + "parserOptions": { + "ecmaVersion": 6 + } + }, + "errors": [ + { + "data": { + "name": "Foo" + }, + "messageId": "usedBeforeDefined" + }, + { + "data": { + "name": "baz" + }, + "messageId": "usedBeforeDefined" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +### `no-useless-assignment` + +Pass: 0 / 85 (0.0%) +Fail: 85 / 85 (100.0%) + +#### no-useless-assignment > valid + +```js +let v = 'used'; + console.log(v); + v = 'used-2' + console.log(v); +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-assignment.js:533:38) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkVariableDeclarator (apps/oxlint/dist/lint.js) + + +#### no-useless-assignment > valid + +```js +function foo() { + let v = 'used'; + console.log(v); + v = 'used-2'; + console.log(v); + } +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-assignment.js:533:38) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkFunctionDeclaration (apps/oxlint/dist/lint.js) + + +#### no-useless-assignment > valid + +```js +function foo() { + let v = 'used'; + if (condition) { + v = 'used-2'; + console.log(v); + return + } + console.log(v); + } +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-assignment.js:533:38) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkFunctionDeclaration (apps/oxlint/dist/lint.js) + + +#### no-useless-assignment > valid + +```js +function foo() { + let v = 'used'; + if (condition) { + console.log(v); + } else { + v = 'used-2'; + console.log(v); + } + } +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-assignment.js:533:38) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkFunctionDeclaration (apps/oxlint/dist/lint.js) + + +#### no-useless-assignment > valid + +```js +function foo() { + let v = 'used'; + if (condition) { + // + } else { + v = 'used-2'; + } + console.log(v); + } +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-assignment.js:533:38) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkFunctionDeclaration (apps/oxlint/dist/lint.js) + + +#### no-useless-assignment > valid + +```js +var foo = function () { + let v = 'used'; + console.log(v); + v = 'used-2' + console.log(v); + } +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-assignment.js:533:38) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkVariableDeclarator (apps/oxlint/dist/lint.js) + + +#### no-useless-assignment > valid + +```js +var foo = () => { + let v = 'used'; + console.log(v); + v = 'used-2' + console.log(v); + } +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-assignment.js:533:38) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkVariableDeclarator (apps/oxlint/dist/lint.js) + + +#### no-useless-assignment > valid + +```js +class foo { + static { + let v = 'used'; + console.log(v); + v = 'used-2' + console.log(v); + } + } +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-assignment.js:533:38) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkClassDeclaration (apps/oxlint/dist/lint.js) + + +#### no-useless-assignment > valid + +```js +function foo () { + let v = 'used'; + for (let i = 0; i < 10; i++) { + console.log(v); + v = 'used in next iteration'; + } + } +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-assignment.js:533:38) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkFunctionDeclaration (apps/oxlint/dist/lint.js) + + +#### no-useless-assignment > valid + +```js +function foo () { + let i = 0; + i++; + i++; + console.log(i); + } +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-assignment.js:533:38) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkFunctionDeclaration (apps/oxlint/dist/lint.js) + + +#### no-useless-assignment > valid + +```js +export let foo = 'used'; + console.log(foo); + foo = 'unused like but exported'; +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-assignment.js:533:38) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkVariableDeclarator (apps/oxlint/dist/lint.js) + + +#### no-useless-assignment > valid + +```js +export function foo () {}; + console.log(foo); + foo = 'unused like but exported'; +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-assignment.js:533:38) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkFunctionDeclaration (apps/oxlint/dist/lint.js) + + +#### no-useless-assignment > valid + +```js +export class foo {}; + console.log(foo); + foo = 'unused like but exported'; +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-assignment.js:533:38) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkClassDeclaration (apps/oxlint/dist/lint.js) + + +#### no-useless-assignment > valid + +```js +export default function foo () {}; + console.log(foo); + foo = 'unused like but exported'; +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-assignment.js:533:38) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkFunctionDeclaration (apps/oxlint/dist/lint.js) + + +#### no-useless-assignment > valid + +```js +export default class foo {}; + console.log(foo); + foo = 'unused like but exported'; +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-assignment.js:533:38) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkClassDeclaration (apps/oxlint/dist/lint.js) + + +#### no-useless-assignment > valid + +```js +let foo = 'used'; + export { foo }; + console.log(foo); + foo = 'unused like but exported'; +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-assignment.js:533:38) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkVariableDeclarator (apps/oxlint/dist/lint.js) + + +#### no-useless-assignment > valid + +```js +function foo () {}; + export { foo }; + console.log(foo); + foo = 'unused like but exported'; +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-assignment.js:533:38) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkFunctionDeclaration (apps/oxlint/dist/lint.js) + + +#### no-useless-assignment > valid + +```js +class foo {}; + export { foo }; + console.log(foo); + foo = 'unused like but exported'; +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-assignment.js:533:38) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkClassDeclaration (apps/oxlint/dist/lint.js) + + +#### no-useless-assignment > valid + +```js +/* exported foo */ + let foo = 'used'; + console.log(foo); + foo = 'unused like but exported with directive'; +``` + +```json +{ + "languageOptions": { + "sourceType": "script" + } +} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-assignment.js:533:38) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkVariableDeclarator (apps/oxlint/dist/lint.js) + + +#### no-useless-assignment > valid + +```js +/*eslint test/use-a:1*/ + let a = 'used'; + console.log(a); + a = 'unused like but marked by markVariableAsUsed()'; + +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-assignment.js:533:38) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkVariableDeclarator (apps/oxlint/dist/lint.js) + + +#### no-useless-assignment > valid + +```js +v = 'used'; + console.log(v); + v = 'unused' +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-assignment.js:533:38) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkAssignmentExpression (apps/oxlint/dist/lint.js) + + +#### no-useless-assignment > valid + +```js +let v = 'used variable'; +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-assignment.js:533:38) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkVariableDeclarator (apps/oxlint/dist/lint.js) + + +#### no-useless-assignment > valid + +```js +function foo() { + return; + + const x = 1; + if (y) { + bar(x); + } + } +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-assignment.js:533:38) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkFunctionDeclaration (apps/oxlint/dist/lint.js) + + +#### no-useless-assignment > valid + +```js +function foo() { + const x = 1; + console.log(x); + return; + + x = 'Foo' + } +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-assignment.js:533:38) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkFunctionDeclaration (apps/oxlint/dist/lint.js) + + +#### no-useless-assignment > valid + +```js +function foo() { + let a = 42; + console.log(a); + a++; + console.log(a); + } +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-assignment.js:533:38) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkFunctionDeclaration (apps/oxlint/dist/lint.js) + + +#### no-useless-assignment > valid + +```js +function foo() { + let a = 42; + console.log(a); + a--; + console.log(a); + } +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-assignment.js:533:38) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkFunctionDeclaration (apps/oxlint/dist/lint.js) + + +#### no-useless-assignment > valid + +```js +function foo() { + let a = 42; + console.log(a); + a = 10; + a = a + 1; + console.log(a); + } +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-assignment.js:533:38) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkFunctionDeclaration (apps/oxlint/dist/lint.js) + + +#### no-useless-assignment > valid + +```js +function foo() { + let a = 42; + console.log(a); + a = 10; + if (cond) { + a = a + 1; + } else { + a = 2 + a; + } + console.log(a); + } +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-assignment.js:533:38) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkFunctionDeclaration (apps/oxlint/dist/lint.js) + + +#### no-useless-assignment > valid + +```js +function foo() { + let a = 'used', b = 'used', c = 'used', d = 'used'; + console.log(a, b, c, d); + ({ a, arr: [b, c, ...d] } = fn()); + console.log(a, b, c, d); + } +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-assignment.js:533:38) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkFunctionDeclaration (apps/oxlint/dist/lint.js) + + +#### no-useless-assignment > valid + +```js +function foo() { + let a = 'used', b = 'used', c = 'used'; + console.log(a, b, c); + ({ a = 'unused', foo: b, ...c } = fn()); + console.log(a, b, c); + } +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-assignment.js:533:38) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkFunctionDeclaration (apps/oxlint/dist/lint.js) + + +#### no-useless-assignment > valid + +```js +function foo() { + let a = {}; + console.log(a); + a.b = 'unused like, but maybe used in setter'; + } +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-assignment.js:533:38) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkFunctionDeclaration (apps/oxlint/dist/lint.js) + + +#### no-useless-assignment > valid + +```js +function foo() { + let a = { b: 42 }; + console.log(a); + a.b++; + } +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-assignment.js:533:38) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkFunctionDeclaration (apps/oxlint/dist/lint.js) + + +#### no-useless-assignment > valid + +```js +function foo () { + let v = 'used'; + console.log(v); + function bar() { + v = 'used in outer scope'; + } + bar(); + console.log(v); + } +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-assignment.js:533:38) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkFunctionDeclaration (apps/oxlint/dist/lint.js) + + +#### no-useless-assignment > valid + +```js +function foo () { + let v = 'used'; + console.log(v); + setTimeout(() => console.log(v), 1); + v = 'used in other scope'; + } +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-assignment.js:533:38) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkFunctionDeclaration (apps/oxlint/dist/lint.js) + + +#### no-useless-assignment > valid + +```js +function foo () { + let v = 'used'; + console.log(v); + for (let i = 0; i < 10; i++) { + if (condition) { + v = 'maybe used'; + continue; + } + console.log(v); + } + } +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-assignment.js:533:38) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkFunctionDeclaration (apps/oxlint/dist/lint.js) + + +#### no-useless-assignment > valid + +```js +/* globals foo */ + const bk = foo; + foo = 42; + try { + // process + } finally { + foo = bk; + } +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-assignment.js:533:38) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkVariableDeclarator (apps/oxlint/dist/lint.js) + + +#### no-useless-assignment > valid + +```js + + const bk = console; + console = { log () {} }; + try { + // process + } finally { + console = bk; + } +``` + +```json +{ + "languageOptions": { + "globals": { + "console": false + } + } +} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-assignment.js:533:38) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkVariableDeclarator (apps/oxlint/dist/lint.js) + + +#### no-useless-assignment > valid + +```js +let message = 'init'; + try { + const result = call(); + message = result.message; + } catch (e) { + // ignore + } + console.log(message) +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-assignment.js:533:38) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkVariableDeclarator (apps/oxlint/dist/lint.js) + + +#### no-useless-assignment > valid + +```js +let message = 'init'; + try { + message = call().message; + } catch (e) { + // ignore + } + console.log(message) +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-assignment.js:533:38) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkVariableDeclarator (apps/oxlint/dist/lint.js) + + +#### no-useless-assignment > valid + +```js +let v = 'init'; + try { + v = callA(); + try { + v = callB(); + } catch (e) { + // ignore + } + } catch (e) { + // ignore + } + console.log(v) +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-assignment.js:533:38) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkVariableDeclarator (apps/oxlint/dist/lint.js) + + +#### no-useless-assignment > valid + +```js +let v = 'init'; + try { + try { + v = callA(); + } catch (e) { + // ignore + } + } catch (e) { + // ignore + } + console.log(v) +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-assignment.js:533:38) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkVariableDeclarator (apps/oxlint/dist/lint.js) + + +#### no-useless-assignment > valid + +```js +let a; + try { + foo(); + } finally { + a = 5; + } + console.log(a); +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-assignment.js:533:38) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkVariableDeclarator (apps/oxlint/dist/lint.js) + + +#### no-useless-assignment > valid + +```js +const obj = { a: 5 }; + const { a, b = a } = obj; + console.log(b); // 5 +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-assignment.js:533:38) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkVariableDeclarator (apps/oxlint/dist/lint.js) + + +#### no-useless-assignment > valid + +```js +const arr = [6]; + const [c, d = c] = arr; + console.log(d); // 6 +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-assignment.js:533:38) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkVariableDeclarator (apps/oxlint/dist/lint.js) + + +#### no-useless-assignment > valid + +```js +const obj = { a: 1 }; + let { + a, + b = (a = 2) + } = obj; + console.log(a, b); +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-assignment.js:533:38) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkVariableDeclarator (apps/oxlint/dist/lint.js) + + +#### no-useless-assignment > valid + +```js +let { a, b: {c = a} = {} } = obj; + console.log(c); +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-assignment.js:533:38) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkProperty (apps/oxlint/dist/lint.js) + + +#### no-useless-assignment > valid + +```js +function foo(){ + let bar; + try { + bar = 2; + unsafeFn(); + return { error: undefined }; + } catch { + return { bar }; + } + } + function unsafeFn() { + throw new Error(); + } +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-assignment.js:533:38) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkFunctionDeclaration (apps/oxlint/dist/lint.js) + + +#### no-useless-assignment > valid + +```js +function foo(){ + let bar, baz; + try { + bar = 2; + unsafeFn(); + return { error: undefined }; + } catch { + baz = bar; + } + return baz; + } + function unsafeFn() { + throw new Error(); + } +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-assignment.js:533:38) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkFunctionDeclaration (apps/oxlint/dist/lint.js) + + +#### no-useless-assignment > valid + +```js +function foo(){ + let bar; + try { + bar = 2; + unsafeFn(); + bar = 4; + } catch { + // handle error + } + return bar; + } + function unsafeFn() { + throw new Error(); + } +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-assignment.js:533:38) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkFunctionDeclaration (apps/oxlint/dist/lint.js) + + +#### no-useless-assignment > valid + +```js +/*eslint test/jsx:1*/ + function App() { + const A = ""; + return ; + } + +``` + +```json +{ + "languageOptions": { + "parserOptions": { + "ecmaFeatures": { + "jsx": true + } + } + } +} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-assignment.js:533:38) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkFunctionDeclaration (apps/oxlint/dist/lint.js) + + +#### no-useless-assignment > valid + +```js +/*eslint test/jsx:1*/ + function App() { + let A = ""; + foo(A); + A = "A"; + return ; + } + +``` + +```json +{ + "languageOptions": { + "parserOptions": { + "ecmaFeatures": { + "jsx": true + } + } + } +} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-assignment.js:533:38) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkFunctionDeclaration (apps/oxlint/dist/lint.js) + + +#### no-useless-assignment > valid + +```js +/*eslint test/jsx:1*/ + function App() { + let A = "a"; + A = "b"; + A = "c"; + foo(A); + return ; + } + +``` + +```json +{ + "languageOptions": { + "parserOptions": { + "ecmaFeatures": { + "jsx": true + } + } + } +} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-assignment.js:533:38) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkFunctionDeclaration (apps/oxlint/dist/lint.js) + + +#### no-useless-assignment > invalid + +```js +let v = 'used'; + console.log(v); + v = 'unused' +``` + +```json +{ + "errors": [ + { + "messageId": "unnecessaryAssignment", + "line": 3, + "column": 13 + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-assignment.js:533:38) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkVariableDeclarator (apps/oxlint/dist/lint.js) + + +#### no-useless-assignment > invalid + +```js +function foo() { + let v = 'used'; + console.log(v); + v = 'unused'; + } +``` + +```json +{ + "errors": [ + { + "messageId": "unnecessaryAssignment", + "line": 4, + "column": 17 + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-assignment.js:533:38) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkFunctionDeclaration (apps/oxlint/dist/lint.js) + + +#### no-useless-assignment > invalid + +```js +function foo() { + let v = 'used'; + if (condition) { + v = 'unused'; + return + } + console.log(v); + } +``` + +```json +{ + "errors": [ + { + "messageId": "unnecessaryAssignment", + "line": 4, + "column": 21 + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-assignment.js:533:38) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkFunctionDeclaration (apps/oxlint/dist/lint.js) + + +#### no-useless-assignment > invalid + +```js +function foo() { + let v = 'used'; + if (condition) { + console.log(v); + } else { + v = 'unused'; + } + } +``` + +```json +{ + "errors": [ + { + "messageId": "unnecessaryAssignment", + "line": 6, + "column": 21 + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-assignment.js:533:38) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkFunctionDeclaration (apps/oxlint/dist/lint.js) + + +#### no-useless-assignment > invalid + +```js +var foo = function () { + let v = 'used'; + console.log(v); + v = 'unused' + } +``` + +```json +{ + "errors": [ + { + "messageId": "unnecessaryAssignment", + "line": 4, + "column": 17 + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-assignment.js:533:38) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkVariableDeclarator (apps/oxlint/dist/lint.js) + + +#### no-useless-assignment > invalid + +```js +var foo = () => { + let v = 'used'; + console.log(v); + v = 'unused' + } +``` + +```json +{ + "errors": [ + { + "messageId": "unnecessaryAssignment", + "line": 4, + "column": 17 + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-assignment.js:533:38) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkVariableDeclarator (apps/oxlint/dist/lint.js) + + +#### no-useless-assignment > invalid + +```js +class foo { + static { + let v = 'used'; + console.log(v); + v = 'unused' + } + } +``` + +```json +{ + "errors": [ + { + "messageId": "unnecessaryAssignment", + "line": 5, + "column": 21 + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-assignment.js:533:38) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkClassDeclaration (apps/oxlint/dist/lint.js) + + +#### no-useless-assignment > invalid + +```js +function foo() { + let v = 'unused'; + if (condition) { + v = 'used'; + console.log(v); + return + } + } +``` + +```json +{ + "errors": [ + { + "messageId": "unnecessaryAssignment", + "line": 2, + "column": 21 + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-assignment.js:533:38) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkFunctionDeclaration (apps/oxlint/dist/lint.js) + + +#### no-useless-assignment > invalid + +```js +function foo() { + let v = 'used'; + console.log(v); + v = 'unused'; + v = 'unused'; + } +``` + +```json +{ + "errors": [ + { + "messageId": "unnecessaryAssignment", + "line": 4, + "column": 17 + }, + { + "messageId": "unnecessaryAssignment", + "line": 5, + "column": 17 + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-assignment.js:533:38) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkFunctionDeclaration (apps/oxlint/dist/lint.js) + + +#### no-useless-assignment > invalid + +```js +function foo() { + let v = 'used'; + console.log(v); + v = 'unused'; + v = 'used'; + console.log(v); + v = 'used'; + console.log(v); + } +``` + +```json +{ + "errors": [ + { + "messageId": "unnecessaryAssignment", + "line": 4, + "column": 17 + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-assignment.js:533:38) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkFunctionDeclaration (apps/oxlint/dist/lint.js) + + +#### no-useless-assignment > invalid + +```js + + let v; + v = 'unused'; + if (foo) { + v = 'used'; + } else { + v = 'used'; + } + console.log(v); +``` + +```json +{ + "errors": [ + { + "messageId": "unnecessaryAssignment", + "line": 3, + "column": 13 + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-assignment.js:533:38) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkVariableDeclarator (apps/oxlint/dist/lint.js) + + +#### no-useless-assignment > invalid + +```js +function foo() { + let v = 'used'; + console.log(v); + v = 'unused'; + v = 'unused'; + v = 'used'; + console.log(v); + } +``` + +```json +{ + "errors": [ + { + "messageId": "unnecessaryAssignment", + "line": 4, + "column": 17 + }, + { + "messageId": "unnecessaryAssignment", + "line": 5, + "column": 17 + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-assignment.js:533:38) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkFunctionDeclaration (apps/oxlint/dist/lint.js) + + +#### no-useless-assignment > invalid + +```js +function foo() { + let v = 'unused'; + if (condition) { + if (condition2) { + v = 'used-2'; + } else { + v = 'used-3'; + } + } else { + v = 'used-4'; + } + console.log(v); + } +``` + +```json +{ + "errors": [ + { + "messageId": "unnecessaryAssignment", + "line": 2, + "column": 21 + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-assignment.js:533:38) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkFunctionDeclaration (apps/oxlint/dist/lint.js) + + +#### no-useless-assignment > invalid + +```js +function foo() { + let v; + if (condition) { + v = 'unused'; + } else { + // + } + if (condition2) { + v = 'used-1'; + } else { + v = 'used-2'; + } + console.log(v); + } +``` + +```json +{ + "errors": [ + { + "messageId": "unnecessaryAssignment", + "line": 4, + "column": 21 + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-assignment.js:533:38) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkFunctionDeclaration (apps/oxlint/dist/lint.js) + + +#### no-useless-assignment > invalid + +```js +function foo() { + let v = 'used'; + if (condition) { + v = 'unused'; + v = 'unused'; + v = 'used'; + } + console.log(v); + } +``` + +```json +{ + "errors": [ + { + "messageId": "unnecessaryAssignment", + "line": 4, + "column": 21 + }, + { + "messageId": "unnecessaryAssignment", + "line": 5, + "column": 21 + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-assignment.js:533:38) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkFunctionDeclaration (apps/oxlint/dist/lint.js) + + +#### no-useless-assignment > invalid + +```js +function foo() { + let a = 42; + console.log(a); + a++; + } +``` + +```json +{ + "errors": [ + { + "messageId": "unnecessaryAssignment", + "line": 4, + "column": 17 + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-assignment.js:533:38) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkFunctionDeclaration (apps/oxlint/dist/lint.js) + + +#### no-useless-assignment > invalid + +```js +function foo() { + let a = 42; + console.log(a); + a--; + } +``` + +```json +{ + "errors": [ + { + "messageId": "unnecessaryAssignment", + "line": 4, + "column": 17 + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-assignment.js:533:38) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkFunctionDeclaration (apps/oxlint/dist/lint.js) + + +#### no-useless-assignment > invalid + +```js +function foo() { + let a = 'used', b = 'used', c = 'used', d = 'used'; + console.log(a, b, c, d); + ({ a, arr: [b, c,, ...d] } = fn()); + console.log(c); + } +``` + +```json +{ + "errors": [ + { + "messageId": "unnecessaryAssignment", + "line": 4, + "column": 20 + }, + { + "messageId": "unnecessaryAssignment", + "line": 4, + "column": 29 + }, + { + "messageId": "unnecessaryAssignment", + "line": 4, + "column": 39 + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-assignment.js:533:38) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkFunctionDeclaration (apps/oxlint/dist/lint.js) + + +#### no-useless-assignment > invalid + +```js +function foo() { + let a = 'used', b = 'used', c = 'used'; + console.log(a, b, c); + ({ a = 'unused', foo: b, ...c } = fn()); + } +``` + +```json +{ + "errors": [ + { + "messageId": "unnecessaryAssignment", + "line": 4, + "column": 20 + }, + { + "messageId": "unnecessaryAssignment", + "line": 4, + "column": 39 + }, + { + "messageId": "unnecessaryAssignment", + "line": 4, + "column": 45 + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-assignment.js:533:38) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkFunctionDeclaration (apps/oxlint/dist/lint.js) + + +#### no-useless-assignment > invalid + +```js +function foo () { + let v = 'used'; + console.log(v); + setTimeout(() => v = 42, 1); + v = 'unused and variable is only updated in other scopes'; + } +``` + +```json +{ + "errors": [ + { + "messageId": "unnecessaryAssignment", + "line": 5, + "column": 17 + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-assignment.js:533:38) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkFunctionDeclaration (apps/oxlint/dist/lint.js) + + +#### no-useless-assignment > invalid + +```js +function foo() { + let v = 'used'; + if (condition) { + let v = 'used'; + console.log(v); + v = 'unused'; + } + console.log(v); + v = 'unused'; + } +``` + +```json +{ + "errors": [ + { + "messageId": "unnecessaryAssignment", + "line": 6, + "column": 21 + }, + { + "messageId": "unnecessaryAssignment", + "line": 9, + "column": 17 + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-assignment.js:533:38) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkFunctionDeclaration (apps/oxlint/dist/lint.js) + + +#### no-useless-assignment > invalid + +```js +function foo() { + let v = 'used'; + if (condition) { + console.log(v); + v = 'unused'; + } else { + v = 'unused'; + } + } +``` + +```json +{ + "errors": [ + { + "messageId": "unnecessaryAssignment", + "line": 5, + "column": 21 + }, + { + "messageId": "unnecessaryAssignment", + "line": 7, + "column": 21 + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-assignment.js:533:38) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkFunctionDeclaration (apps/oxlint/dist/lint.js) + + +#### no-useless-assignment > invalid + +```js +function foo () { + let v = 'used'; + console.log(v); + v = 'unused'; + return; + console.log(v); + } +``` + +```json +{ + "errors": [ + { + "messageId": "unnecessaryAssignment", + "line": 4, + "column": 17 + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-assignment.js:533:38) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkFunctionDeclaration (apps/oxlint/dist/lint.js) + + +#### no-useless-assignment > invalid + +```js +function foo () { + let v = 'used'; + console.log(v); + v = 'unused'; + throw new Error(); + console.log(v); + } +``` + +```json +{ + "errors": [ + { + "messageId": "unnecessaryAssignment", + "line": 4, + "column": 17 + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-assignment.js:533:38) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkFunctionDeclaration (apps/oxlint/dist/lint.js) + + +#### no-useless-assignment > invalid + +```js +function foo () { + let v = 'used'; + console.log(v); + for (let i = 0; i < 10; i++) { + v = 'unused'; + continue; + console.log(v); + } + } + function bar () { + let v = 'used'; + console.log(v); + for (let i = 0; i < 10; i++) { + v = 'unused'; + break; + console.log(v); + } + } +``` + +```json +{ + "errors": [ + { + "messageId": "unnecessaryAssignment", + "line": 5, + "column": 21 + }, + { + "messageId": "unnecessaryAssignment", + "line": 14, + "column": 21 + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-assignment.js:533:38) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkFunctionDeclaration (apps/oxlint/dist/lint.js) + + +#### no-useless-assignment > invalid + +```js +function foo () { + let v = 'used'; + console.log(v); + for (let i = 0; i < 10; i++) { + if (condition) { + v = 'unused'; + break; + } + console.log(v); + } + } +``` + +```json +{ + "errors": [ + { + "messageId": "unnecessaryAssignment", + "line": 6, + "column": 25 + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-assignment.js:533:38) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkFunctionDeclaration (apps/oxlint/dist/lint.js) + + +#### no-useless-assignment > invalid + +```js +let message = 'unused'; + try { + const result = call(); + message = result.message; + } catch (e) { + message = 'used'; + } + console.log(message) +``` + +```json +{ + "errors": [ + { + "messageId": "unnecessaryAssignment", + "line": 1, + "column": 5 + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-assignment.js:533:38) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkVariableDeclarator (apps/oxlint/dist/lint.js) + + +#### no-useless-assignment > invalid + +```js +let message = 'unused'; + try { + message = 'used'; + console.log(message) + } catch (e) { + } +``` + +```json +{ + "errors": [ + { + "messageId": "unnecessaryAssignment", + "line": 1, + "column": 5 + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-assignment.js:533:38) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkVariableDeclarator (apps/oxlint/dist/lint.js) + + +#### no-useless-assignment > invalid + +```js +let message = 'unused'; + try { + message = call(); + } catch (e) { + message = 'used'; + } + console.log(message) +``` + +```json +{ + "errors": [ + { + "messageId": "unnecessaryAssignment", + "line": 1, + "column": 5 + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-assignment.js:533:38) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkVariableDeclarator (apps/oxlint/dist/lint.js) + + +#### no-useless-assignment > invalid + +```js +let v = 'unused'; + try { + v = callA(); + try { + v = callB(); + } catch (e) { + // ignore + } + } catch (e) { + v = 'used'; + } + console.log(v) +``` + +```json +{ + "errors": [ + { + "messageId": "unnecessaryAssignment", + "line": 1, + "column": 5 + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-assignment.js:533:38) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkVariableDeclarator (apps/oxlint/dist/lint.js) + + +#### no-useless-assignment > invalid + +```js + + var x = 1; // used + x = x + 1; // unused + x = 5; // used + f(x); +``` + +```json +{ + "errors": [ + { + "messageId": "unnecessaryAssignment", + "line": 3, + "column": 13 + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-assignment.js:533:38) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkVariableDeclarator (apps/oxlint/dist/lint.js) + + +#### no-useless-assignment > invalid + +```js + + var x = 1; // used + x = // used + x++; // unused + f(x); +``` + +```json +{ + "errors": [ + { + "messageId": "unnecessaryAssignment", + "line": 4, + "column": 17 + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-assignment.js:533:38) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkVariableDeclarator (apps/oxlint/dist/lint.js) + + +#### no-useless-assignment > invalid + +```js +const obj = { a: 1 }; + let { + a, + b = (a = 2) + } = obj; + a = 3 + console.log(a, b); +``` + +```json +{ + "errors": [ + { + "messageId": "unnecessaryAssignment", + "line": 3, + "column": 17 + }, + { + "messageId": "unnecessaryAssignment", + "line": 4, + "column": 22 + } + ] +} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-assignment.js:533:38) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkVariableDeclarator (apps/oxlint/dist/lint.js) + + +### `no-useless-backreference` + +Pass: 187 / 190 (98.4%) +Fail: 3 / 190 (1.6%) + +#### no-useless-backreference > valid + +```js +/* globals RegExp:off */ new RegExp('\\1(a)'); +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-useless-backreference', + message: "Backreference '\\1' will be ignored. It references group '(a)' which appears later in the pattern.", + messageId: 'forward', + severity: 1, + nodeType: 'NewExpression', + line: 1, + column: 25, + endLine: 1, + endColumn: 45, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-useless-backreference > valid + +```js +RegExp('\\1(a)'); +``` + +```json +{ + "languageOptions": { + "globals": { + "RegExp": "off" + } + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/no-useless-backreference', + message: "Backreference '\\1' will be ignored. It references group '(a)' which appears later in the pattern.", + messageId: 'forward', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 0, + endLine: 1, + endColumn: 16, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-useless-backreference > invalid + +```js +/(a)\2(b)/; RegExp('(\\1)'); +``` + +```json +{ + "errors": [ + { + "messageId": "forward", + "data": { + "bref": "\\2", + "group": "(b)", + "otherGroups": "" + } + }, + { + "messageId": "nested", + "data": { + "bref": "\\1", + "group": "(\\1)", + "otherGroups": "" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: messageId 'nested' does not match expected messageId 'forward' ++ actual - expected + ++ 'nested' +- 'forward' + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +### `no-useless-computed-key` + +Pass: 95 / 96 (99.0%) +Fail: 1 / 96 (1.0%) + +#### no-useless-computed-key > invalid + +```js +class Foo { ['x']() {} } +``` + +```json +{ + "output": "class Foo { 'x'() {} }", + "options": [ + {} + ], + "errors": [ + { + "messageId": "unnecessarilyComputedProperty", + "data": { + "property": "'x'" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +### `no-useless-concat` + +Pass: 19 / 20 (95.0%) +Fail: 1 / 20 (5.0%) + +#### no-useless-concat > invalid + +```js +'a' + 'b' + 'c' +``` + +```json +{ + "errors": [ + { + "messageId": "unexpectedConcat", + "line": 1, + "column": 5, + "endLine": 1, + "endColumn": 6 + }, + { + "messageId": "unexpectedConcat", + "line": 1, + "column": 11, + "endLine": 1, + "endColumn": 12 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Actual error location does not match expected error location. ++ actual - expected + + { ++ column: 11, ++ endColumn: 12, +- column: 5, +- endColumn: 6, + endLine: 1, + line: 1 + } + + at assertInvalidTestCaseLocationIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +### `no-useless-constructor` + +Pass: 37 / 49 (75.5%) +Fail: 12 / 49 (24.5%) + +#### no-useless-constructor > valid + +```js +declare class A { constructor(options: any); } +``` + +```json +{ + "languageOptions": { + "parser": {} + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-useless-constructor > valid + +```js + + declare class A { + constructor(); + } + +``` + +```json +{} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-useless-constructor > valid + +```js + + class A { + constructor(); + } + +``` + +```json +{} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-useless-constructor > valid + +```js + + abstract class A { + constructor(); + } + +``` + +```json +{} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-useless-constructor > valid + +```js + + class A { + constructor(private name: string) {} + } + +``` + +```json +{} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-useless-constructor > valid + +```js + + class A { + constructor(public name: string) {} + } + +``` + +```json +{} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-useless-constructor > valid + +```js + + class A { + constructor(protected name: string) {} + } + +``` + +```json +{} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-useless-constructor > valid + +```js + + class A { + constructor(foo); + } + +``` + +```json +{} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-useless-constructor > valid + +```js + + class A { + constructor(@Foo foo) {} + } + +``` + +```json +{} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-useless-constructor > valid + +```js + + class A { + constructor(@Foo foo: string) {} + } + +``` + +```json +{} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-useless-constructor > valid + +```js + + class A extends Object { + constructor(@Foo foo: string) { + super(foo); + } + } + +``` + +```json +{} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-useless-constructor > valid + +```js + + class A extends Object { + constructor(foo: string, @Bar() bar) { + super(foo, bar); + } + } + +``` + +```json +{} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +### `no-useless-rename` + +Pass: 161 / 163 (98.8%) +Fail: 2 / 163 (1.2%) + +#### no-useless-rename > invalid + +```js +let {foo: {bar: bar}, baz: baz} = obj; +``` + +```json +{ + "output": "let {foo: {bar}, baz} = obj;", + "errors": [ + { + "messageId": "unnecessarilyRenamed", + "data": { + "type": "Destructuring assignment", + "name": "bar" + } + }, + { + "messageId": "unnecessarilyRenamed", + "data": { + "type": "Destructuring assignment", + "name": "baz" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Hydrated message "Destructuring assignment bar unnecessarily renamed." does not match "Destructuring assignment baz unnecessarily renamed." ++ actual - expected + ++ 'Destructuring assignment baz unnecessarily renamed.' +- 'Destructuring assignment bar unnecessarily renamed.' + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### no-useless-rename > invalid + +```js +let {'foo': {'bar': bar}, 'baz': baz} = obj; +``` + +```json +{ + "output": "let {'foo': {bar}, baz} = obj;", + "errors": [ + { + "messageId": "unnecessarilyRenamed", + "data": { + "type": "Destructuring assignment", + "name": "bar" + } + }, + { + "messageId": "unnecessarilyRenamed", + "data": { + "type": "Destructuring assignment", + "name": "baz" + } + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Hydrated message "Destructuring assignment bar unnecessarily renamed." does not match "Destructuring assignment baz unnecessarily renamed." ++ actual - expected + ++ 'Destructuring assignment baz unnecessarily renamed.' +- 'Destructuring assignment bar unnecessarily renamed.' + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +### `no-useless-return` + +Pass: 0 / 49 (0.0%) +Fail: 49 / 49 (100.0%) + +#### no-useless-return > valid + +```js +function foo() { return 5; } +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at markReturnStatementsOnCurrentSegmentsAsUsed (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-return.js:257:14) + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-return.js:342:6) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-useless-return > valid + +```js +function foo() { return null; } +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at markReturnStatementsOnCurrentSegmentsAsUsed (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-return.js:257:14) + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-return.js:342:6) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-useless-return > valid + +```js +function foo() { return doSomething(); } +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at markReturnStatementsOnCurrentSegmentsAsUsed (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-return.js:257:14) + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-return.js:342:6) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-useless-return > valid + +```js + + function foo() { + if (bar) { + doSomething(); + return; + } else { + doSomethingElse(); + } + qux(); + } + +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at markReturnStatementsOnCurrentSegmentsAsUsed (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-return.js:257:14) + at walkIfStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-useless-return > valid + +```js + + function foo() { + switch (bar) { + case 1: + doSomething(); + return; + default: + doSomethingElse(); + } + } + +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at markReturnStatementsOnCurrentSegmentsAsUsed (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-return.js:257:14) + at walkSwitchStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-useless-return > valid + +```js + + function foo() { + switch (bar) { + default: + doSomething(); + return; + case 1: + doSomethingElse(); + } + } + +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at markReturnStatementsOnCurrentSegmentsAsUsed (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-return.js:257:14) + at walkSwitchStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-useless-return > valid + +```js + + function foo() { + switch (bar) { + case 1: + if (a) { + doSomething(); + return; + } else { + doSomething(); + return; + } + default: + doSomethingElse(); + } + } + +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at markReturnStatementsOnCurrentSegmentsAsUsed (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-return.js:257:14) + at walkSwitchStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-useless-return > valid + +```js + + function foo() { + for (var foo = 0; foo < 10; foo++) { + return; + } + } + +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at markReturnStatementsOnCurrentSegmentsAsUsed (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-return.js:257:14) + at walkForStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-useless-return > valid + +```js + + function foo() { + for (var foo in bar) { + return; + } + } + +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at markReturnStatementsOnCurrentSegmentsAsUsed (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-return.js:257:14) + at walkForInStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-useless-return > valid + +```js + + function foo() { + try { + return 5; + } finally { + return; // This is allowed because it can override the returned value of 5 + } + } + +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at markReturnStatementsOnCurrentSegmentsAsUsed (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-return.js:257:14) + at walkTryStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-useless-return > valid + +```js + + function foo() { + try { + bar(); + return; + } catch (err) {} + baz(); + } + +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at markReturnStatementsOnCurrentSegmentsAsUsed (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-return.js:257:14) + at walkTryStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-useless-return > valid + +```js + + function foo() { + if (something) { + try { + bar(); + return; + } catch (err) {} + } + baz(); + } + +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at markReturnStatementsOnCurrentSegmentsAsUsed (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-return.js:257:14) + at walkIfStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-useless-return > valid + +```js + + function foo() { + return; + doSomething(); + } + +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-return.js:349:39) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-useless-return > valid + +```js + + function foo() { + for (var foo of bar) return; + } + +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at markReturnStatementsOnCurrentSegmentsAsUsed (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-return.js:257:14) + at walkForOfStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-useless-return > valid + +```js +() => { if (foo) return; bar(); } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at markReturnStatementsOnCurrentSegmentsAsUsed (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-return.js:257:14) + at walkExpressionStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-useless-return > valid + +```js +() => 5 +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at markReturnStatementsOnCurrentSegmentsAsUsed (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-return.js:257:14) + at walkExpressionStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-useless-return > valid + +```js +() => { return; doSomething(); } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at markReturnStatementsOnCurrentSegmentsAsUsed (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-return.js:257:14) + at walkExpressionStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-useless-return > valid + +```js +if (foo) { return; } doSomething(); +``` + +```json +{ + "languageOptions": { + "parserOptions": { + "ecmaFeatures": { + "globalReturn": true + } + } + } +} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at markReturnStatementsOnCurrentSegmentsAsUsed (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-return.js:257:14) + at walkIfStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-useless-return > valid + +```js + + function foo() { + if (bar) return; + return baz; + } + +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at markReturnStatementsOnCurrentSegmentsAsUsed (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-return.js:257:14) + at walkIfStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-useless-return > valid + +```js + + function foo() { + if (bar) { + return; + } + return baz; + } + +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at markReturnStatementsOnCurrentSegmentsAsUsed (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-return.js:257:14) + at walkIfStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-useless-return > valid + +```js + + function foo() { + if (bar) baz(); + else return; + return 5; + } + +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at markReturnStatementsOnCurrentSegmentsAsUsed (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-return.js:257:14) + at walkIfStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-useless-return > valid + +```js + + function foo() { + return; + while (foo) return; + foo; + } + +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-return.js:349:39) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-useless-return > valid + +```js + + try { + throw new Error('foo'); + while (false); + } catch (err) {} + +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at markReturnStatementsOnCurrentSegmentsAsUsed (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-return.js:257:14) + at walkTryStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-useless-return > valid + +```js + + function foo(arg) { + throw new Error("Debugging..."); + if (!arg) { + return; + } + console.log(arg); + } + +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at markReturnStatementsOnCurrentSegmentsAsUsed (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-return.js:257:14) + at walkThrowStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-useless-return > valid + +```js + + function foo() { + try { + bar(); + return; + } finally { + baz(); + } + qux(); + } + +``` + +```json +{} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at markReturnStatementsOnCurrentSegmentsAsUsed (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-return.js:257:14) + at walkTryStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-useless-return > invalid + +```js +function foo() { return; } +``` + +```json +{ + "errors": [ + { + "messageId": "unnecessaryReturn" + } + ], + "output": "function foo() { }" +} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-return.js:349:39) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-useless-return > invalid + +```js +function foo() { doSomething(); return; } +``` + +```json +{ + "errors": [ + { + "messageId": "unnecessaryReturn" + } + ], + "output": "function foo() { doSomething(); }" +} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at markReturnStatementsOnCurrentSegmentsAsUsed (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-return.js:257:14) + at walkExpressionStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-useless-return > invalid + +```js +function foo() { if (condition) { bar(); return; } else { baz(); } } +``` + +```json +{ + "errors": [ + { + "messageId": "unnecessaryReturn" + } + ], + "output": "function foo() { if (condition) { bar(); } else { baz(); } }" +} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at markReturnStatementsOnCurrentSegmentsAsUsed (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-return.js:257:14) + at walkIfStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-useless-return > invalid + +```js +function foo() { if (foo) return; } +``` + +```json +{ + "errors": [ + { + "messageId": "unnecessaryReturn" + } + ], + "output": null +} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at markReturnStatementsOnCurrentSegmentsAsUsed (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-return.js:257:14) + at walkIfStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-useless-return > invalid + +```js +function foo() { bar(); return/**/; } +``` + +```json +{ + "errors": [ + { + "messageId": "unnecessaryReturn" + } + ], + "output": null +} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at markReturnStatementsOnCurrentSegmentsAsUsed (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-return.js:257:14) + at walkExpressionStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-useless-return > invalid + +```js +function foo() { bar(); return// +; } +``` + +```json +{ + "errors": [ + { + "messageId": "unnecessaryReturn" + } + ], + "output": null +} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at markReturnStatementsOnCurrentSegmentsAsUsed (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-return.js:257:14) + at walkExpressionStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-useless-return > invalid + +```js +foo(); return; +``` + +```json +{ + "errors": [ + { + "messageId": "unnecessaryReturn" + } + ], + "output": "foo(); ", + "languageOptions": { + "parserOptions": { + "ecmaFeatures": { + "globalReturn": true + } + } + } +} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at markReturnStatementsOnCurrentSegmentsAsUsed (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-return.js:257:14) + at walkExpressionStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-useless-return > invalid + +```js +if (foo) { bar(); return; } else { baz(); } +``` + +```json +{ + "errors": [ + { + "messageId": "unnecessaryReturn" + } + ], + "output": "if (foo) { bar(); } else { baz(); }", + "languageOptions": { + "parserOptions": { + "ecmaFeatures": { + "globalReturn": true + } + } + } +} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at markReturnStatementsOnCurrentSegmentsAsUsed (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-return.js:257:14) + at walkIfStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-useless-return > invalid + +```js + + function foo() { + if (foo) { + return; + } + return; + } + +``` + +```json +{ + "errors": [ + { + "messageId": "unnecessaryReturn" + }, + { + "messageId": "unnecessaryReturn" + } + ], + "output": "\n function foo() {\n if (foo) {\n \n }\n return;\n }\n " +} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at markReturnStatementsOnCurrentSegmentsAsUsed (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-return.js:257:14) + at walkIfStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-useless-return > invalid + +```js + + function foo() { + switch (bar) { + case 1: + doSomething(); + default: + doSomethingElse(); + return; + } + } + +``` + +```json +{ + "errors": [ + { + "messageId": "unnecessaryReturn" + } + ], + "output": "\n function foo() {\n switch (bar) {\n case 1:\n doSomething();\n default:\n doSomethingElse();\n \n }\n }\n " +} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at markReturnStatementsOnCurrentSegmentsAsUsed (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-return.js:257:14) + at walkSwitchStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-useless-return > invalid + +```js + + function foo() { + switch (bar) { + default: + doSomething(); + case 1: + doSomething(); + return; + } + } + +``` + +```json +{ + "errors": [ + { + "messageId": "unnecessaryReturn" + } + ], + "output": "\n function foo() {\n switch (bar) {\n default:\n doSomething();\n case 1:\n doSomething();\n \n }\n }\n " +} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at markReturnStatementsOnCurrentSegmentsAsUsed (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-return.js:257:14) + at walkSwitchStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-useless-return > invalid + +```js + + function foo() { + switch (bar) { + case 1: + if (a) { + doSomething(); + return; + } + break; + default: + doSomethingElse(); + } + } + +``` + +```json +{ + "errors": [ + { + "messageId": "unnecessaryReturn" + } + ], + "output": "\n function foo() {\n switch (bar) {\n case 1:\n if (a) {\n doSomething();\n \n }\n break;\n default:\n doSomethingElse();\n }\n }\n " +} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at markReturnStatementsOnCurrentSegmentsAsUsed (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-return.js:257:14) + at walkSwitchStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-useless-return > invalid + +```js + + function foo() { + switch (bar) { + case 1: + if (a) { + doSomething(); + return; + } else { + doSomething(); + } + break; + default: + doSomethingElse(); + } + } + +``` + +```json +{ + "errors": [ + { + "messageId": "unnecessaryReturn" + } + ], + "output": "\n function foo() {\n switch (bar) {\n case 1:\n if (a) {\n doSomething();\n \n } else {\n doSomething();\n }\n break;\n default:\n doSomethingElse();\n }\n }\n " +} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at markReturnStatementsOnCurrentSegmentsAsUsed (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-return.js:257:14) + at walkSwitchStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-useless-return > invalid + +```js + + function foo() { + switch (bar) { + case 1: + if (a) { + doSomething(); + return; + } + default: + } + } + +``` + +```json +{ + "errors": [ + { + "messageId": "unnecessaryReturn" + } + ], + "output": "\n function foo() {\n switch (bar) {\n case 1:\n if (a) {\n doSomething();\n \n }\n default:\n }\n }\n " +} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at markReturnStatementsOnCurrentSegmentsAsUsed (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-return.js:257:14) + at walkSwitchStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-useless-return > invalid + +```js + + function foo() { + try {} catch (err) { return; } + } + +``` + +```json +{ + "errors": [ + { + "messageId": "unnecessaryReturn" + } + ], + "output": "\n function foo() {\n try {} catch (err) { }\n }\n " +} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at markReturnStatementsOnCurrentSegmentsAsUsed (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-return.js:257:14) + at walkTryStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-useless-return > invalid + +```js + + function foo() { + try { + foo(); + return; + } catch (err) { + return 5; + } + } + +``` + +```json +{ + "errors": [ + { + "messageId": "unnecessaryReturn" + } + ], + "output": "\n function foo() {\n try {\n foo();\n \n } catch (err) {\n return 5;\n }\n }\n " +} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at markReturnStatementsOnCurrentSegmentsAsUsed (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-return.js:257:14) + at walkTryStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-useless-return > invalid + +```js + + function foo() { + if (something) { + try { + bar(); + return; + } catch (err) {} + } + } + +``` + +```json +{ + "errors": [ + { + "messageId": "unnecessaryReturn" + } + ], + "output": "\n function foo() {\n if (something) {\n try {\n bar();\n \n } catch (err) {}\n }\n }\n " +} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at markReturnStatementsOnCurrentSegmentsAsUsed (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-return.js:257:14) + at walkIfStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-useless-return > invalid + +```js + + function foo() { + try { + return; + } catch (err) { + foo(); + } + } + +``` + +```json +{ + "errors": [ + { + "messageId": "unnecessaryReturn" + } + ], + "output": "\n function foo() {\n try {\n \n } catch (err) {\n foo();\n }\n }\n " +} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at markReturnStatementsOnCurrentSegmentsAsUsed (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-return.js:257:14) + at walkTryStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-useless-return > invalid + +```js + + function foo() { + try { + return; + } finally { + bar(); + } + } + +``` + +```json +{ + "errors": [ + { + "messageId": "unnecessaryReturn" + } + ], + "output": "\n function foo() {\n try {\n \n } finally {\n bar();\n }\n }\n " +} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at markReturnStatementsOnCurrentSegmentsAsUsed (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-return.js:257:14) + at walkTryStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-useless-return > invalid + +```js + + function foo() { + try { + bar(); + } catch (e) { + try { + baz(); + return; + } catch (e) { + qux(); + } + } + } + +``` + +```json +{ + "errors": [ + { + "messageId": "unnecessaryReturn" + } + ], + "output": "\n function foo() {\n try {\n bar();\n } catch (e) {\n try {\n baz();\n \n } catch (e) {\n qux();\n }\n }\n }\n " +} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at markReturnStatementsOnCurrentSegmentsAsUsed (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-return.js:257:14) + at walkTryStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-useless-return > invalid + +```js + + function foo() { + try {} finally {} + return; + } + +``` + +```json +{ + "errors": [ + { + "messageId": "unnecessaryReturn" + } + ], + "output": "\n function foo() {\n try {} finally {}\n \n }\n " +} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at markReturnStatementsOnCurrentSegmentsAsUsed (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-return.js:257:14) + at walkTryStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-useless-return > invalid + +```js + + function foo() { + try { + return 5; + } finally { + function bar() { + return; + } + } + } + +``` + +```json +{ + "errors": [ + { + "messageId": "unnecessaryReturn" + } + ], + "output": "\n function foo() {\n try {\n return 5;\n } finally {\n function bar() {\n \n }\n }\n }\n " +} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at markReturnStatementsOnCurrentSegmentsAsUsed (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-return.js:257:14) + at walkTryStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-useless-return > invalid + +```js +() => { return; } +``` + +```json +{ + "errors": [ + { + "messageId": "unnecessaryReturn" + } + ], + "output": "() => { }", + "languageOptions": { + "ecmaVersion": 6 + } +} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at markReturnStatementsOnCurrentSegmentsAsUsed (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-return.js:257:14) + at walkExpressionStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +#### no-useless-return > invalid + +```js +function foo() { return; return; } +``` + +```json +{ + "errors": [ + { + "messageId": "unnecessaryReturn", + "column": 18 + } + ], + "output": "function foo() { return; }" +} +``` + +TypeError: Cannot read properties of null (reading 'currentSegments') + at ReturnStatement (apps/oxlint/conformance/submodules/eslint/lib/rules/no-useless-return.js:349:39) + at walkReturnStatement (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + + +### `no-var` + +Pass: 48 / 52 (92.3%) +Fail: 4 / 52 (7.7%) + +#### no-var > invalid + +```js +declare var foo = 2; +``` + +```json +{ + "output": "declare let foo = 2;", + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module", + "parser": {} + }, + "errors": [ + { + "messageId": "unexpectedVar" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-var > valid + +```js +declare global { var bar: 'car' } +``` + +```json +{} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### no-var > invalid + +```js +declare namespace ns { var bar: 'car' } +``` + +```json +{ + "errors": [ + { + "messageId": "unexpectedVar" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### no-var > invalid + +```js +declare module 'module' { var bar: 'car' } +``` + +```json +{ + "errors": [ + { + "messageId": "unexpectedVar" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +### `no-whitespace-before-property` + +Pass: 189 / 192 (98.4%) +Fail: 3 / 192 (1.6%) + +#### no-whitespace-before-property > invalid + +```js +08 .toExponential() +``` + +```json +{ + "output": null, + "languageOptions": { + "sourceType": "script" + }, + "errors": [ + { + "messageId": "unexpectedWhitespace", + "data": { + "propName": "toExponential" + } + } + ] +} +``` + +TSError: Decimals with leading zeros are not allowed. + at B (apps/oxlint/dist/ts_eslint.cjs) + at d (apps/oxlint/dist/ts_eslint.cjs) + at a (apps/oxlint/dist/ts_eslint.cjs) + at C (apps/oxlint/dist/ts_eslint.cjs) + + +#### no-whitespace-before-property > invalid + +```js +0192 .toExponential() +``` + +```json +{ + "output": null, + "languageOptions": { + "sourceType": "script" + }, + "errors": [ + { + "messageId": "unexpectedWhitespace", + "data": { + "propName": "toExponential" + } + } + ] +} +``` + +TSError: Decimals with leading zeros are not allowed. + at B (apps/oxlint/dist/ts_eslint.cjs) + at d (apps/oxlint/dist/ts_eslint.cjs) + at a (apps/oxlint/dist/ts_eslint.cjs) + at C (apps/oxlint/dist/ts_eslint.cjs) + + +#### no-whitespace-before-property > invalid + +```js +05 .toExponential() +``` + +```json +{ + "output": "05.toExponential()", + "languageOptions": { + "sourceType": "script" + }, + "errors": [ + { + "messageId": "unexpectedWhitespace", + "data": { + "propName": "toExponential" + } + } + ] +} +``` + +TSError: Octal literals are not allowed. Use the syntax '0o5'. + at B (apps/oxlint/dist/ts_eslint.cjs) + at d (apps/oxlint/dist/ts_eslint.cjs) + at a (apps/oxlint/dist/ts_eslint.cjs) + at C (apps/oxlint/dist/ts_eslint.cjs) + + +### `object-curly-newline` + +Pass: 136 / 144 (94.4%) +Fail: 8 / 144 (5.6%) + +#### object-curly-newline > valid + +```js +function foo({ + a, + b +} : MyType) {} +``` + +```json +{ + "options": [ + "always" + ], + "languageOptions": { + "parser": {} + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### object-curly-newline > valid + +```js +function foo({ + a, + b +} : { a : string, b : string }) {} +``` + +```json +{ + "options": [ + "always" + ], + "languageOptions": { + "parser": {} + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### object-curly-newline > valid + +```js +function foo({ a, b } : MyType) {} +``` + +```json +{ + "options": [ + "never" + ], + "languageOptions": { + "parser": {} + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### object-curly-newline > valid + +```js +function foo({ a, b } : { a : string, b : string }) {} +``` + +```json +{ + "options": [ + "never" + ], + "languageOptions": { + "parser": {} + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### object-curly-newline > invalid + +```js +function foo({ a, b } : MyType) {} +``` + +```json +{ + "output": "function foo({\n a, b \n} : MyType) {}", + "options": [ + "always" + ], + "languageOptions": { + "parser": {} + }, + "errors": [ + { + "line": 1, + "column": 14, + "messageId": "expectedLinebreakAfterOpeningBrace" + }, + { + "line": 1, + "column": 21, + "messageId": "expectedLinebreakBeforeClosingBrace" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### object-curly-newline > invalid + +```js +function foo({ a, b } : { a : string, b : string }) {} +``` + +```json +{ + "output": "function foo({\n a, b \n} : { a : string, b : string }) {}", + "options": [ + "always" + ], + "languageOptions": { + "parser": {} + }, + "errors": [ + { + "line": 1, + "column": 14, + "messageId": "expectedLinebreakAfterOpeningBrace" + }, + { + "line": 1, + "column": 21, + "messageId": "expectedLinebreakBeforeClosingBrace" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### object-curly-newline > invalid + +```js +function foo({ + a, + b +} : MyType) {} +``` + +```json +{ + "output": "function foo({a,\n b} : MyType) {}", + "options": [ + "never" + ], + "languageOptions": { + "parser": {} + }, + "errors": [ + { + "line": 1, + "column": 14, + "messageId": "unexpectedLinebreakAfterOpeningBrace" + }, + { + "line": 4, + "column": 1, + "messageId": "unexpectedLinebreakBeforeClosingBrace" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### object-curly-newline > invalid + +```js +function foo({ + a, + b +} : { a : string, b : string }) {} +``` + +```json +{ + "output": "function foo({a,\n b} : { a : string, b : string }) {}", + "options": [ + "never" + ], + "languageOptions": { + "parser": {} + }, + "errors": [ + { + "line": 1, + "column": 14, + "messageId": "unexpectedLinebreakAfterOpeningBrace" + }, + { + "line": 4, + "column": 1, + "messageId": "unexpectedLinebreakBeforeClosingBrace" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +### `object-curly-spacing` + +Pass: 175 / 178 (98.3%) +Fail: 3 / 178 (1.7%) + +#### object-curly-spacing > valid + +```js +function foo ({a, b}: Props) { +} +``` + +```json +{ + "options": [ + "never" + ], + "languageOptions": { + "parser": {} + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### object-curly-spacing > invalid + +```js +var obj = {foo: {bar: quxx }, baz: qux }; +``` + +```json +{ + "output": "var obj = {foo: {bar: quxx}, baz: qux};", + "options": [ + "never" + ], + "errors": [ + { + "messageId": "unexpectedSpaceBefore", + "data": { + "token": "}" + }, + "line": 1, + "column": 27, + "endLine": 1, + "endColumn": 28 + }, + { + "messageId": "unexpectedSpaceBefore", + "data": { + "token": "}" + }, + "line": 1, + "column": 39, + "endLine": 1, + "endColumn": 40 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Actual error location does not match expected error location. ++ actual - expected + + { ++ column: 39, ++ endColumn: 40, +- column: 27, +- endColumn: 28, + endLine: 1, + line: 1 + } + + at assertInvalidTestCaseLocationIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### object-curly-spacing > invalid + +```js +function foo ({a, b }: Props) { +} +``` + +```json +{ + "output": "function foo ({a, b}: Props) {\n}", + "options": [ + "never" + ], + "languageOptions": { + "parser": {} + }, + "errors": [ + { + "messageId": "unexpectedSpaceBefore", + "data": { + "token": "}" + }, + "line": 1, + "column": 20, + "endLine": 1, + "endColumn": 21 + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +### `object-property-newline` + +Pass: 74 / 75 (98.7%) +Fail: 1 / 75 (1.3%) + +#### object-property-newline > invalid + +```js +var obj = { +k1: 'val1', k2: {e1: 'foo', e2: 'bar'}, k3: 'val2' +}; +``` + +```json +{ + "output": "var obj = {\nk1: 'val1',\nk2: {e1: 'foo',\ne2: 'bar'},\nk3: 'val2'\n};", + "errors": [ + { + "messageId": "propertiesOnNewline", + "line": 2, + "column": 13, + "endLine": 2, + "endColumn": 15 + }, + { + "messageId": "propertiesOnNewline", + "line": 2, + "column": 29, + "endLine": 2, + "endColumn": 31 + }, + { + "messageId": "propertiesOnNewline", + "line": 2, + "column": 41, + "endLine": 2, + "endColumn": 43 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Actual error location does not match expected error location. ++ actual - expected + + { ++ column: 41, ++ endColumn: 43, +- column: 29, +- endColumn: 31, + endLine: 2, + line: 2 + } + + at assertInvalidTestCaseLocationIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +### `object-shorthand` + +Pass: 260 / 262 (99.2%) +Fail: 2 / 262 (0.8%) + +#### object-shorthand > invalid + +```js +const test = { + key: (): void => { }, + key: async (): Promise => { }, + + key: (arg: T): T => { return arg }, + key: async (arg: T): Promise => { return arg }, +} +``` + +```json +{ + "output": "const test = {\n key(): void { },\n async key(): Promise { },\n\n key(arg: T): T { return arg },\n async key(arg: T): Promise { return arg },\n}", + "options": [ + "always", + { + "avoidExplicitReturnArrows": true + } + ], + "languageOptions": { + "parser": {} + }, + "errors": [ + { + "messageId": "expectedMethodShorthand" + }, + { + "messageId": "expectedMethodShorthand" + }, + { + "messageId": "expectedMethodShorthand" + }, + { + "messageId": "expectedMethodShorthand" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### object-shorthand > invalid + +```js +const test = { + key: (): void => {x()}, + key: ( (): void => {x()} ), + key: ( (): (void) => {x()} ), + + key: (arg: t): void => {x()}, + key: ( (arg: t): void => {x()} ), + key: ( (arg: t): (void) => {x()} ), + + key: (arg: t, arg2: t): void => {x()}, + key: ( (arg: t, arg2: t): void => {x()} ), + key: ( (arg: t, arg2: t): (void) => {x()} ), + + key: async (): void => {x()}, + key: ( async (): void => {x()} ), + key: ( async (): (void) => {x()} ), + + key: async (arg: t): void => {x()}, + key: ( async (arg: t): void => {x()} ), + key: ( async (arg: t): (void) => {x()} ), + + key: async (arg: t, arg2: t): void => {x()}, + key: ( async (arg: t, arg2: t): void => {x()} ), + key: ( async (arg: t, arg2: t): (void) => {x()} ), +} +``` + +```json +{ + "output": "const test = {\n key(): void {x()},\n key(): void {x()},\n key(): (void) {x()},\n\n key(arg: t): void {x()},\n key(arg: t): void {x()},\n key(arg: t): (void) {x()},\n\n key(arg: t, arg2: t): void {x()},\n key(arg: t, arg2: t): void {x()},\n key(arg: t, arg2: t): (void) {x()},\n\n async key(): void {x()},\n async key(): void {x()},\n async key(): (void) {x()},\n\n async key(arg: t): void {x()},\n async key(arg: t): void {x()},\n async key(arg: t): (void) {x()},\n\n async key(arg: t, arg2: t): void {x()},\n async key(arg: t, arg2: t): void {x()},\n async key(arg: t, arg2: t): (void) {x()},\n}", + "options": [ + "always", + { + "avoidExplicitReturnArrows": true + } + ], + "languageOptions": { + "parser": {} + }, + "errors": [ + { + "messageId": "expectedMethodShorthand" + }, + { + "messageId": "expectedMethodShorthand" + }, + { + "messageId": "expectedMethodShorthand" + }, + { + "messageId": "expectedMethodShorthand" + }, + { + "messageId": "expectedMethodShorthand" + }, + { + "messageId": "expectedMethodShorthand" + }, + { + "messageId": "expectedMethodShorthand" + }, + { + "messageId": "expectedMethodShorthand" + }, + { + "messageId": "expectedMethodShorthand" + }, + { + "messageId": "expectedMethodShorthand" + }, + { + "messageId": "expectedMethodShorthand" + }, + { + "messageId": "expectedMethodShorthand" + }, + { + "messageId": "expectedMethodShorthand" + }, + { + "messageId": "expectedMethodShorthand" + }, + { + "messageId": "expectedMethodShorthand" + }, + { + "messageId": "expectedMethodShorthand" + }, + { + "messageId": "expectedMethodShorthand" + }, + { + "messageId": "expectedMethodShorthand" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +### `padded-blocks` + +Pass: 131 / 133 (98.5%) +Fail: 2 / 133 (1.5%) + +#### padded-blocks > invalid + +```js +class A { + +constructor(){ + +foo(); + +} + +} +``` + +```json +{ + "output": "class A {\nconstructor(){\nfoo();\n}\n}", + "options": [ + "never" + ], + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "neverPadBlock", + "line": 1, + "column": 9, + "endLine": 3, + "endColumn": 1 + }, + { + "messageId": "neverPadBlock", + "line": 3, + "column": 14, + "endLine": 5, + "endColumn": 1 + }, + { + "messageId": "neverPadBlock", + "line": 5, + "column": 7, + "endLine": 7, + "endColumn": 1 + }, + { + "messageId": "neverPadBlock", + "line": 7, + "column": 2, + "endLine": 9, + "endColumn": 1 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Actual error location does not match expected error location. ++ actual - expected + + { ++ column: 2, +- column: 14, + endColumn: 1, ++ endLine: 9, ++ line: 7 +- endLine: 5, +- line: 3 + } + + at assertInvalidTestCaseLocationIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padded-blocks > invalid + +```js +class A { + +constructor(){ + +foo(); + +} + +} +``` + +```json +{ + "output": "class A {\nconstructor(){\nfoo();\n}\n}", + "options": [ + { + "blocks": "never", + "classes": "never" + } + ], + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "neverPadBlock", + "line": 1, + "column": 9, + "endLine": 3, + "endColumn": 1 + }, + { + "messageId": "neverPadBlock", + "line": 3, + "column": 14, + "endLine": 5, + "endColumn": 1 + }, + { + "messageId": "neverPadBlock", + "line": 5, + "column": 7, + "endLine": 7, + "endColumn": 1 + }, + { + "messageId": "neverPadBlock", + "line": 7, + "column": 2, + "endLine": 9, + "endColumn": 1 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Actual error location does not match expected error location. ++ actual - expected + + { ++ column: 2, +- column: 14, + endColumn: 1, ++ endLine: 9, ++ line: 7 +- endLine: 5, +- line: 3 + } + + at assertInvalidTestCaseLocationIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +### `padding-line-between-statements` + +Pass: 364 / 624 (58.3%) +Fail: 260 / 624 (41.7%) + +#### padding-line-between-statements > invalid + +```js +foo(); + +foo(); +``` + +```json +{ + "output": "foo();\nfoo();", + "options": [ + { + "blankLine": "never", + "prev": "*", + "next": "*" + } + ], + "errors": [ + { + "messageId": "unexpectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +foo(); + +//comment +foo(); +``` + +```json +{ + "output": "foo();\n//comment\nfoo();", + "options": [ + { + "blankLine": "never", + "prev": "*", + "next": "*" + } + ], + "errors": [ + { + "messageId": "unexpectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js + foo(); + + //comment + foo(); +``` + +```json +{ + "output": " foo();\n //comment\n foo();", + "options": [ + { + "blankLine": "never", + "prev": "*", + "next": "*" + } + ], + "errors": [ + { + "messageId": "unexpectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +if (a) {} + +for (;;) {} +``` + +```json +{ + "output": "if (a) {}\nfor (;;) {}", + "options": [ + { + "blankLine": "never", + "prev": "*", + "next": "*" + } + ], + "errors": [ + { + "messageId": "unexpectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +foo(); +foo(); +``` + +```json +{ + "output": "foo();\n\nfoo();", + "options": [ + { + "blankLine": "always", + "prev": "*", + "next": "*" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js + function a() {} + do {} while (a) +``` + +```json +{ + "output": " function a() {}\n\n do {} while (a)", + "options": [ + { + "blankLine": "always", + "prev": "*", + "next": "*" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +foo();//trailing-comment +//comment +//comment +foo(); +``` + +```json +{ + "output": "foo();//trailing-comment\n\n//comment\n//comment\nfoo();", + "options": [ + { + "blankLine": "always", + "prev": "*", + "next": "*" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +{} + +foo() +``` + +```json +{ + "output": "{}\nfoo()", + "options": [ + { + "blankLine": "never", + "prev": "block-like", + "next": "*" + } + ], + "errors": [ + { + "messageId": "unexpectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +{} +foo() +``` + +```json +{ + "output": "{}\n\nfoo()", + "options": [ + { + "blankLine": "always", + "prev": "block-like", + "next": "*" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +if(a){} +foo() +``` + +```json +{ + "output": "if(a){}\n\nfoo()", + "options": [ + { + "blankLine": "always", + "prev": "block-like", + "next": "*" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +if(a){}else{} +foo() +``` + +```json +{ + "output": "if(a){}else{}\n\nfoo()", + "options": [ + { + "blankLine": "always", + "prev": "block-like", + "next": "*" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +if(a){}else if(b){} +foo() +``` + +```json +{ + "output": "if(a){}else if(b){}\n\nfoo()", + "options": [ + { + "blankLine": "always", + "prev": "block-like", + "next": "*" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +if(a){}else if(b){}else{} +foo() +``` + +```json +{ + "output": "if(a){}else if(b){}else{}\n\nfoo()", + "options": [ + { + "blankLine": "always", + "prev": "block-like", + "next": "*" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +switch(a){} +foo() +``` + +```json +{ + "output": "switch(a){}\n\nfoo()", + "options": [ + { + "blankLine": "always", + "prev": "block-like", + "next": "*" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +switch(a){case 0:} +foo() +``` + +```json +{ + "output": "switch(a){case 0:}\n\nfoo()", + "options": [ + { + "blankLine": "always", + "prev": "block-like", + "next": "*" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +try{}catch(e){} +foo() +``` + +```json +{ + "output": "try{}catch(e){}\n\nfoo()", + "options": [ + { + "blankLine": "always", + "prev": "block-like", + "next": "*" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +try{}finally{} +foo() +``` + +```json +{ + "output": "try{}finally{}\n\nfoo()", + "options": [ + { + "blankLine": "always", + "prev": "block-like", + "next": "*" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +try{}catch(e){}finally{} +foo() +``` + +```json +{ + "output": "try{}catch(e){}finally{}\n\nfoo()", + "options": [ + { + "blankLine": "always", + "prev": "block-like", + "next": "*" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +while(a){} +foo() +``` + +```json +{ + "output": "while(a){}\n\nfoo()", + "options": [ + { + "blankLine": "always", + "prev": "block-like", + "next": "*" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +do{}while(a) +foo() +``` + +```json +{ + "output": "do{}while(a)\n\nfoo()", + "options": [ + { + "blankLine": "always", + "prev": "block-like", + "next": "*" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +for(;;){} +foo() +``` + +```json +{ + "output": "for(;;){}\n\nfoo()", + "options": [ + { + "blankLine": "always", + "prev": "block-like", + "next": "*" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +for(a in b){} +foo() +``` + +```json +{ + "output": "for(a in b){}\n\nfoo()", + "options": [ + { + "blankLine": "always", + "prev": "block-like", + "next": "*" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +for(a of b){} +foo() +``` + +```json +{ + "output": "for(a of b){}\n\nfoo()", + "options": [ + { + "blankLine": "always", + "prev": "block-like", + "next": "*" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +a=function(){} +foo() +``` + +```json +{ + "output": "a=function(){}\n\nfoo()", + "options": [ + { + "blankLine": "always", + "prev": "block-like", + "next": "*" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +a=()=>{} +foo() +``` + +```json +{ + "output": "a=()=>{}\n\nfoo()", + "options": [ + { + "blankLine": "always", + "prev": "block-like", + "next": "*" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +function a(){} +foo() +``` + +```json +{ + "output": "function a(){}\n\nfoo()", + "options": [ + { + "blankLine": "always", + "prev": "block-like", + "next": "*" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +let a=function(){} +foo() +``` + +```json +{ + "output": "let a=function(){}\n\nfoo()", + "options": [ + { + "blankLine": "always", + "prev": "block-like", + "next": "*" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +module.exports=1 + +foo() +``` + +```json +{ + "output": "module.exports=1\nfoo()", + "options": [ + { + "blankLine": "never", + "prev": "cjs-export", + "next": "*" + } + ], + "errors": [ + { + "messageId": "unexpectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +module.exports=1 +foo() +``` + +```json +{ + "output": "module.exports=1\n\nfoo()", + "options": [ + { + "blankLine": "always", + "prev": "cjs-export", + "next": "*" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +module.exports.foo=1 +foo() +``` + +```json +{ + "output": "module.exports.foo=1\n\nfoo()", + "options": [ + { + "blankLine": "always", + "prev": "cjs-export", + "next": "*" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +module.exports[foo]=1 +foo() +``` + +```json +{ + "output": "module.exports[foo]=1\n\nfoo()", + "options": [ + { + "blankLine": "always", + "prev": "cjs-export", + "next": "*" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +exports.foo=1 +foo() +``` + +```json +{ + "output": "exports.foo=1\n\nfoo()", + "options": [ + { + "blankLine": "always", + "prev": "cjs-export", + "next": "*" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +exports[foo]=1 +foo() +``` + +```json +{ + "output": "exports[foo]=1\n\nfoo()", + "options": [ + { + "blankLine": "always", + "prev": "cjs-export", + "next": "*" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +const foo=require("foo") + +foo() +``` + +```json +{ + "output": "const foo=require(\"foo\")\nfoo()", + "options": [ + { + "blankLine": "never", + "prev": "cjs-import", + "next": "*" + } + ], + "errors": [ + { + "messageId": "unexpectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +const foo=require("foo") +foo() +``` + +```json +{ + "output": "const foo=require(\"foo\")\n\nfoo()", + "options": [ + { + "blankLine": "always", + "prev": "cjs-import", + "next": "*" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +const foo=require("foo").Foo +foo() +``` + +```json +{ + "output": "const foo=require(\"foo\").Foo\n\nfoo()", + "options": [ + { + "blankLine": "always", + "prev": "cjs-import", + "next": "*" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +const foo=require("foo")[a] +foo() +``` + +```json +{ + "output": "const foo=require(\"foo\")[a]\n\nfoo()", + "options": [ + { + "blankLine": "always", + "prev": "cjs-import", + "next": "*" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +"use strict" + +foo() +``` + +```json +{ + "output": "\"use strict\"\nfoo()", + "options": [ + { + "blankLine": "never", + "prev": "directive", + "next": "*" + } + ], + "errors": [ + { + "messageId": "unexpectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +"use strict" +foo() +``` + +```json +{ + "output": "\"use strict\"\n\nfoo()", + "options": [ + { + "blankLine": "always", + "prev": "directive", + "next": "*" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +'use strict' +foo() +``` + +```json +{ + "output": "'use strict'\n\nfoo()", + "options": [ + { + "blankLine": "always", + "prev": "directive", + "next": "*" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +'use asm' +foo() +``` + +```json +{ + "output": "'use asm'\n\nfoo()", + "options": [ + { + "blankLine": "always", + "prev": "directive", + "next": "*" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +{ +} + +foo() +``` + +```json +{ + "output": "{\n}\nfoo()", + "options": [ + { + "blankLine": "never", + "prev": "block-like", + "next": "*" + } + ], + "errors": [ + { + "messageId": "unexpectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +{ +} +foo() +``` + +```json +{ + "output": "{\n}\n\nfoo()", + "options": [ + { + "blankLine": "always", + "prev": "block-like", + "next": "*" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +if(a){ +} +foo() +``` + +```json +{ + "output": "if(a){\n}\n\nfoo()", + "options": [ + { + "blankLine": "always", + "prev": "block-like", + "next": "*" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +if(a){ +}else{ +} +foo() +``` + +```json +{ + "output": "if(a){\n}else{\n}\n\nfoo()", + "options": [ + { + "blankLine": "always", + "prev": "block-like", + "next": "*" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +if(a){ +}else if(b){ +} +foo() +``` + +```json +{ + "output": "if(a){\n}else if(b){\n}\n\nfoo()", + "options": [ + { + "blankLine": "always", + "prev": "block-like", + "next": "*" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +if(a){ +}else if(b){ +}else{ +} +foo() +``` + +```json +{ + "output": "if(a){\n}else if(b){\n}else{\n}\n\nfoo()", + "options": [ + { + "blankLine": "always", + "prev": "block-like", + "next": "*" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +switch(a){ +} +foo() +``` + +```json +{ + "output": "switch(a){\n}\n\nfoo()", + "options": [ + { + "blankLine": "always", + "prev": "block-like", + "next": "*" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +try{ +}catch(e){ +} +foo() +``` + +```json +{ + "output": "try{\n}catch(e){\n}\n\nfoo()", + "options": [ + { + "blankLine": "always", + "prev": "block-like", + "next": "*" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +try{ +}finally{ +} +foo() +``` + +```json +{ + "output": "try{\n}finally{\n}\n\nfoo()", + "options": [ + { + "blankLine": "always", + "prev": "block-like", + "next": "*" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +try{ +}catch(e){ +}finally{ +} +foo() +``` + +```json +{ + "output": "try{\n}catch(e){\n}finally{\n}\n\nfoo()", + "options": [ + { + "blankLine": "always", + "prev": "block-like", + "next": "*" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +while(a){ +} +foo() +``` + +```json +{ + "output": "while(a){\n}\n\nfoo()", + "options": [ + { + "blankLine": "always", + "prev": "block-like", + "next": "*" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +do{ +}while(a) +foo() +``` + +```json +{ + "output": "do{\n}while(a)\n\nfoo()", + "options": [ + { + "blankLine": "always", + "prev": "block-like", + "next": "*" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +for(;;){ +} +foo() +``` + +```json +{ + "output": "for(;;){\n}\n\nfoo()", + "options": [ + { + "blankLine": "always", + "prev": "block-like", + "next": "*" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +for(a in b){ +} +foo() +``` + +```json +{ + "output": "for(a in b){\n}\n\nfoo()", + "options": [ + { + "blankLine": "always", + "prev": "block-like", + "next": "*" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +for(a of b){ +} +foo() +``` + +```json +{ + "output": "for(a of b){\n}\n\nfoo()", + "options": [ + { + "blankLine": "always", + "prev": "block-like", + "next": "*" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +a=function(){ +} +foo() +``` + +```json +{ + "output": "a=function(){\n}\n\nfoo()", + "options": [ + { + "blankLine": "always", + "prev": "block-like", + "next": "*" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +a=()=>{ +} +foo() +``` + +```json +{ + "output": "a=()=>{\n}\n\nfoo()", + "options": [ + { + "blankLine": "always", + "prev": "block-like", + "next": "*" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +function a(){ +} +foo() +``` + +```json +{ + "output": "function a(){\n}\n\nfoo()", + "options": [ + { + "blankLine": "always", + "prev": "block-like", + "next": "*" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +let a=function(){ +} +foo() +``` + +```json +{ + "output": "let a=function(){\n}\n\nfoo()", + "options": [ + { + "blankLine": "always", + "prev": "block-like", + "next": "*" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +{} + +foo() +``` + +```json +{ + "output": "{}\nfoo()", + "options": [ + { + "blankLine": "never", + "prev": "block", + "next": "*" + } + ], + "errors": [ + { + "messageId": "unexpectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +{} +foo() +``` + +```json +{ + "output": "{}\n\nfoo()", + "options": [ + { + "blankLine": "always", + "prev": "block", + "next": "*" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +; + +foo() +``` + +```json +{ + "output": ";\nfoo()", + "options": [ + { + "blankLine": "never", + "prev": "empty", + "next": "*" + } + ], + "errors": [ + { + "messageId": "unexpectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +; +foo() +``` + +```json +{ + "output": ";\n\nfoo()", + "options": [ + { + "blankLine": "always", + "prev": "empty", + "next": "*" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +foo() + +foo() +``` + +```json +{ + "output": "foo()\nfoo()", + "options": [ + { + "blankLine": "never", + "prev": "expression", + "next": "*" + } + ], + "errors": [ + { + "messageId": "unexpectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +foo() +foo() +``` + +```json +{ + "output": "foo()\n\nfoo()", + "options": [ + { + "blankLine": "always", + "prev": "expression", + "next": "*" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +foo() + +foo( +\u0009x, +\u0009y +) +``` + +```json +{ + "code": "foo()\n\nfoo(\n\tx,\n\ty\n)", + "output": "foo()\nfoo(\n\tx,\n\ty\n)", + "options": [ + { + "blankLine": "never", + "prev": "*", + "next": "multiline-expression" + } + ], + "errors": [ + { + "messageId": "unexpectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +foo() +foo( +\u0009x, +\u0009y +) +``` + +```json +{ + "code": "foo()\nfoo(\n\tx,\n\ty\n)", + "output": "foo()\n\nfoo(\n\tx,\n\ty\n)", + "options": [ + { + "blankLine": "always", + "prev": "*", + "next": "multiline-expression" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +() => { +\u0009someArray.forEach( +\u0009\u0009x => doSomething(x) +\u0009); +\u0009return theThing; +} +``` + +```json +{ + "code": "() => {\n\tsomeArray.forEach(\n\t\tx => doSomething(x)\n\t);\n\treturn theThing;\n}", + "output": "() => {\n\tsomeArray.forEach(\n\t\tx => doSomething(x)\n\t);\n\n\treturn theThing;\n}", + "options": [ + { + "blankLine": "always", + "prev": "multiline-expression", + "next": "return" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +while(a){break + +foo()} +``` + +```json +{ + "output": "while(a){break\nfoo()}", + "options": [ + { + "blankLine": "never", + "prev": "break", + "next": "*" + } + ], + "errors": [ + { + "messageId": "unexpectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +switch(a){case 0:break + +foo()} +``` + +```json +{ + "output": "switch(a){case 0:break\nfoo()}", + "options": [ + { + "blankLine": "never", + "prev": "break", + "next": "*" + } + ], + "errors": [ + { + "messageId": "unexpectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +while(a){break +foo()} +``` + +```json +{ + "output": "while(a){break\n\nfoo()}", + "options": [ + { + "blankLine": "always", + "prev": "break", + "next": "*" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +switch(a){case 0:break +foo()} +``` + +```json +{ + "output": "switch(a){case 0:break\n\nfoo()}", + "options": [ + { + "blankLine": "always", + "prev": "break", + "next": "*" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +class A{} + +foo() +``` + +```json +{ + "output": "class A{}\nfoo()", + "options": [ + { + "blankLine": "never", + "prev": "class", + "next": "*" + } + ], + "errors": [ + { + "messageId": "unexpectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +class A{} +foo() +``` + +```json +{ + "output": "class A{}\n\nfoo()", + "options": [ + { + "blankLine": "always", + "prev": "class", + "next": "*" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +const a=1 + +foo() +``` + +```json +{ + "output": "const a=1\nfoo()", + "options": [ + { + "blankLine": "never", + "prev": "const", + "next": "*" + } + ], + "errors": [ + { + "messageId": "unexpectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +const a=1 +foo() +``` + +```json +{ + "output": "const a=1\n\nfoo()", + "options": [ + { + "blankLine": "always", + "prev": "const", + "next": "*" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +while(a){continue + +foo()} +``` + +```json +{ + "output": "while(a){continue\nfoo()}", + "options": [ + { + "blankLine": "never", + "prev": "continue", + "next": "*" + } + ], + "errors": [ + { + "messageId": "unexpectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +while(a){continue +foo()} +``` + +```json +{ + "output": "while(a){continue\n\nfoo()}", + "options": [ + { + "blankLine": "always", + "prev": "continue", + "next": "*" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +debugger + +foo() +``` + +```json +{ + "output": "debugger\nfoo()", + "options": [ + { + "blankLine": "never", + "prev": "debugger", + "next": "*" + } + ], + "errors": [ + { + "messageId": "unexpectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +debugger +foo() +``` + +```json +{ + "output": "debugger\n\nfoo()", + "options": [ + { + "blankLine": "always", + "prev": "debugger", + "next": "*" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +do;while(a) + +foo() +``` + +```json +{ + "output": "do;while(a)\nfoo()", + "options": [ + { + "blankLine": "never", + "prev": "do", + "next": "*" + } + ], + "errors": [ + { + "messageId": "unexpectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +do;while(a) +foo() +``` + +```json +{ + "output": "do;while(a)\n\nfoo()", + "options": [ + { + "blankLine": "always", + "prev": "do", + "next": "*" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +export default 1 + +foo() +``` + +```json +{ + "output": "export default 1\nfoo()", + "options": [ + { + "blankLine": "never", + "prev": "export", + "next": "*" + } + ], + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + }, + "errors": [ + { + "messageId": "unexpectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +export let a=1 + +foo() +``` + +```json +{ + "output": "export let a=1\nfoo()", + "options": [ + { + "blankLine": "never", + "prev": "export", + "next": "*" + } + ], + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + }, + "errors": [ + { + "messageId": "unexpectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +var a = 0;export {a} + +foo() +``` + +```json +{ + "output": "var a = 0;export {a}\nfoo()", + "options": [ + { + "blankLine": "never", + "prev": "export", + "next": "*" + } + ], + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + }, + "errors": [ + { + "messageId": "unexpectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +export default 1 +foo() +``` + +```json +{ + "output": "export default 1\n\nfoo()", + "options": [ + { + "blankLine": "always", + "prev": "export", + "next": "*" + } + ], + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + }, + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +export let a=1 +foo() +``` + +```json +{ + "output": "export let a=1\n\nfoo()", + "options": [ + { + "blankLine": "always", + "prev": "export", + "next": "*" + } + ], + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + }, + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +var a = 0;export {a} +foo() +``` + +```json +{ + "output": "var a = 0;export {a}\n\nfoo()", + "options": [ + { + "blankLine": "always", + "prev": "export", + "next": "*" + } + ], + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + }, + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +for(;;); + +foo() +``` + +```json +{ + "output": "for(;;);\nfoo()", + "options": [ + { + "blankLine": "never", + "prev": "for", + "next": "*" + } + ], + "errors": [ + { + "messageId": "unexpectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +for(a in b); + +foo() +``` + +```json +{ + "output": "for(a in b);\nfoo()", + "options": [ + { + "blankLine": "never", + "prev": "for", + "next": "*" + } + ], + "errors": [ + { + "messageId": "unexpectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +for(a of b); + +foo() +``` + +```json +{ + "output": "for(a of b);\nfoo()", + "options": [ + { + "blankLine": "never", + "prev": "for", + "next": "*" + } + ], + "errors": [ + { + "messageId": "unexpectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +for(;;); +foo() +``` + +```json +{ + "output": "for(;;);\n\nfoo()", + "options": [ + { + "blankLine": "always", + "prev": "for", + "next": "*" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +for(a in b); +foo() +``` + +```json +{ + "output": "for(a in b);\n\nfoo()", + "options": [ + { + "blankLine": "always", + "prev": "for", + "next": "*" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +for(a of b); +foo() +``` + +```json +{ + "output": "for(a of b);\n\nfoo()", + "options": [ + { + "blankLine": "always", + "prev": "for", + "next": "*" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +function foo(){} + +foo() +``` + +```json +{ + "output": "function foo(){}\nfoo()", + "options": [ + { + "blankLine": "never", + "prev": "function", + "next": "*" + } + ], + "errors": [ + { + "messageId": "unexpectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +function foo(){} +foo() +``` + +```json +{ + "output": "function foo(){}\n\nfoo()", + "options": [ + { + "blankLine": "always", + "prev": "function", + "next": "*" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +async function foo(){} +foo() +``` + +```json +{ + "output": "async function foo(){}\n\nfoo()", + "options": [ + { + "blankLine": "never", + "prev": "*", + "next": "*" + }, + { + "blankLine": "always", + "prev": "function", + "next": "*" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +if(a); + +foo() +``` + +```json +{ + "output": "if(a);\nfoo()", + "options": [ + { + "blankLine": "never", + "prev": "if", + "next": "*" + } + ], + "errors": [ + { + "messageId": "unexpectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +if(a);else; + +foo() +``` + +```json +{ + "output": "if(a);else;\nfoo()", + "options": [ + { + "blankLine": "never", + "prev": "if", + "next": "*" + } + ], + "errors": [ + { + "messageId": "unexpectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +if(a); +foo() +``` + +```json +{ + "output": "if(a);\n\nfoo()", + "options": [ + { + "blankLine": "always", + "prev": "if", + "next": "*" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +if(a);else; +foo() +``` + +```json +{ + "output": "if(a);else;\n\nfoo()", + "options": [ + { + "blankLine": "always", + "prev": "if", + "next": "*" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +(function(){ +})() + +var a = 2; +``` + +```json +{ + "output": "(function(){\n})()\nvar a = 2;", + "options": [ + { + "blankLine": "never", + "prev": "iife", + "next": "*" + } + ], + "errors": [ + { + "messageId": "unexpectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js ++(function(){ +})() + +var a = 2; +``` + +```json +{ + "output": "+(function(){\n})()\nvar a = 2;", + "options": [ + { + "blankLine": "never", + "prev": "iife", + "next": "*" + } + ], + "errors": [ + { + "messageId": "unexpectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +(function(){ +})() +var a = 2; +``` + +```json +{ + "output": "(function(){\n})()\n\nvar a = 2;", + "options": [ + { + "blankLine": "always", + "prev": "iife", + "next": "*" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js ++(function(){ +})() +var a = 2; +``` + +```json +{ + "output": "+(function(){\n})()\n\nvar a = 2;", + "options": [ + { + "blankLine": "always", + "prev": "iife", + "next": "*" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +(function(){ +})?.() +var a = 2; +``` + +```json +{ + "output": "(function(){\n})?.()\n\nvar a = 2;", + "options": [ + { + "blankLine": "always", + "prev": "iife", + "next": "*" + } + ], + "languageOptions": { + "ecmaVersion": 2020 + }, + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +void (function(){ +})?.() +var a = 2; +``` + +```json +{ + "output": "void (function(){\n})?.()\n\nvar a = 2;", + "options": [ + { + "blankLine": "always", + "prev": "iife", + "next": "*" + } + ], + "languageOptions": { + "ecmaVersion": 2020 + }, + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +import a from 'a' + +foo() +``` + +```json +{ + "output": "import a from 'a'\nfoo()", + "options": [ + { + "blankLine": "never", + "prev": "import", + "next": "*" + } + ], + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + }, + "errors": [ + { + "messageId": "unexpectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +import * as a from 'a' + +foo() +``` + +```json +{ + "output": "import * as a from 'a'\nfoo()", + "options": [ + { + "blankLine": "never", + "prev": "import", + "next": "*" + } + ], + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + }, + "errors": [ + { + "messageId": "unexpectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +import {a} from 'a' + +foo() +``` + +```json +{ + "output": "import {a} from 'a'\nfoo()", + "options": [ + { + "blankLine": "never", + "prev": "import", + "next": "*" + } + ], + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + }, + "errors": [ + { + "messageId": "unexpectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +import a from 'a' +foo() +``` + +```json +{ + "output": "import a from 'a'\n\nfoo()", + "options": [ + { + "blankLine": "always", + "prev": "import", + "next": "*" + } + ], + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + }, + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +import * as a from 'a' +foo() +``` + +```json +{ + "output": "import * as a from 'a'\n\nfoo()", + "options": [ + { + "blankLine": "always", + "prev": "import", + "next": "*" + } + ], + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + }, + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +import {a} from 'a' +foo() +``` + +```json +{ + "output": "import {a} from 'a'\n\nfoo()", + "options": [ + { + "blankLine": "always", + "prev": "import", + "next": "*" + } + ], + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + }, + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +let a + +foo() +``` + +```json +{ + "output": "let a\nfoo()", + "options": [ + { + "blankLine": "never", + "prev": "let", + "next": "*" + } + ], + "errors": [ + { + "messageId": "unexpectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +let a +foo() +``` + +```json +{ + "output": "let a\n\nfoo()", + "options": [ + { + "blankLine": "always", + "prev": "let", + "next": "*" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +function foo(){return + +foo()} +``` + +```json +{ + "output": "function foo(){return\nfoo()}", + "options": [ + { + "blankLine": "never", + "prev": "return", + "next": "*" + } + ], + "errors": [ + { + "messageId": "unexpectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +function foo(){return +foo()} +``` + +```json +{ + "output": "function foo(){return\n\nfoo()}", + "options": [ + { + "blankLine": "always", + "prev": "return", + "next": "*" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +switch(a){} + +foo() +``` + +```json +{ + "output": "switch(a){}\nfoo()", + "options": [ + { + "blankLine": "never", + "prev": "switch", + "next": "*" + } + ], + "errors": [ + { + "messageId": "unexpectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +switch(a){} +foo() +``` + +```json +{ + "output": "switch(a){}\n\nfoo()", + "options": [ + { + "blankLine": "always", + "prev": "switch", + "next": "*" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +throw a + +foo() +``` + +```json +{ + "output": "throw a\nfoo()", + "options": [ + { + "blankLine": "never", + "prev": "throw", + "next": "*" + } + ], + "errors": [ + { + "messageId": "unexpectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +throw a +foo() +``` + +```json +{ + "output": "throw a\n\nfoo()", + "options": [ + { + "blankLine": "always", + "prev": "throw", + "next": "*" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +try{}catch(e){} + +foo() +``` + +```json +{ + "output": "try{}catch(e){}\nfoo()", + "options": [ + { + "blankLine": "never", + "prev": "try", + "next": "*" + } + ], + "errors": [ + { + "messageId": "unexpectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +try{}finally{} + +foo() +``` + +```json +{ + "output": "try{}finally{}\nfoo()", + "options": [ + { + "blankLine": "never", + "prev": "try", + "next": "*" + } + ], + "errors": [ + { + "messageId": "unexpectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +try{}catch(e){}finally{} + +foo() +``` + +```json +{ + "output": "try{}catch(e){}finally{}\nfoo()", + "options": [ + { + "blankLine": "never", + "prev": "try", + "next": "*" + } + ], + "errors": [ + { + "messageId": "unexpectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +try{}catch(e){} +foo() +``` + +```json +{ + "output": "try{}catch(e){}\n\nfoo()", + "options": [ + { + "blankLine": "always", + "prev": "try", + "next": "*" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +try{}finally{} +foo() +``` + +```json +{ + "output": "try{}finally{}\n\nfoo()", + "options": [ + { + "blankLine": "always", + "prev": "try", + "next": "*" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +try{}catch(e){}finally{} +foo() +``` + +```json +{ + "output": "try{}catch(e){}finally{}\n\nfoo()", + "options": [ + { + "blankLine": "always", + "prev": "try", + "next": "*" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +var a + +foo() +``` + +```json +{ + "output": "var a\nfoo()", + "options": [ + { + "blankLine": "never", + "prev": "var", + "next": "*" + } + ], + "errors": [ + { + "messageId": "unexpectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +var a +foo() +``` + +```json +{ + "output": "var a\n\nfoo()", + "options": [ + { + "blankLine": "always", + "prev": "var", + "next": "*" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +while(a); + +foo() +``` + +```json +{ + "output": "while(a);\nfoo()", + "options": [ + { + "blankLine": "never", + "prev": "while", + "next": "*" + } + ], + "errors": [ + { + "messageId": "unexpectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +while(a); +foo() +``` + +```json +{ + "output": "while(a);\n\nfoo()", + "options": [ + { + "blankLine": "always", + "prev": "while", + "next": "*" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +with(a); + +foo() +``` + +```json +{ + "output": "with(a);\nfoo()", + "options": [ + { + "blankLine": "never", + "prev": "with", + "next": "*" + } + ], + "errors": [ + { + "messageId": "unexpectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +with(a); +foo() +``` + +```json +{ + "output": "with(a);\n\nfoo()", + "options": [ + { + "blankLine": "always", + "prev": "with", + "next": "*" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +const a={ +b:1, +c:2 +} + +const d=3 +``` + +```json +{ + "output": "const a={\nb:1,\nc:2\n}\nconst d=3", + "options": [ + { + "blankLine": "never", + "prev": "multiline-const", + "next": "*" + } + ], + "errors": [ + { + "messageId": "unexpectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +const a={ +b:1, +c:2 +} +const d=3 +``` + +```json +{ + "output": "const a={\nb:1,\nc:2\n}\n\nconst d=3", + "options": [ + { + "blankLine": "always", + "prev": "multiline-const", + "next": "*" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +const a=1 + +const b={ +c:2, +d:3 +} +``` + +```json +{ + "output": "const a=1\nconst b={\nc:2,\nd:3\n}", + "options": [ + { + "blankLine": "never", + "prev": "*", + "next": "multiline-const" + } + ], + "errors": [ + { + "messageId": "unexpectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +const a=1 +const b={ +c:2, +d:3 +} +``` + +```json +{ + "output": "const a=1\n\nconst b={\nc:2,\nd:3\n}", + "options": [ + { + "blankLine": "always", + "prev": "*", + "next": "multiline-const" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +let a={ +b:1, +c:2 +} + +let d=3 +``` + +```json +{ + "output": "let a={\nb:1,\nc:2\n}\nlet d=3", + "options": [ + { + "blankLine": "never", + "prev": "multiline-let", + "next": "*" + } + ], + "errors": [ + { + "messageId": "unexpectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +let a={ +b:1, +c:2 +} +let d=3 +``` + +```json +{ + "output": "let a={\nb:1,\nc:2\n}\n\nlet d=3", + "options": [ + { + "blankLine": "always", + "prev": "multiline-let", + "next": "*" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +let a=1 + +let b={ +c:2, +d:3 +} +``` + +```json +{ + "output": "let a=1\nlet b={\nc:2,\nd:3\n}", + "options": [ + { + "blankLine": "never", + "prev": "*", + "next": "multiline-let" + } + ], + "errors": [ + { + "messageId": "unexpectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +let a=1 +let b={ +c:2, +d:3 +} +``` + +```json +{ + "output": "let a=1\n\nlet b={\nc:2,\nd:3\n}", + "options": [ + { + "blankLine": "always", + "prev": "*", + "next": "multiline-let" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +var a={ +b:1, +c:2 +} + +var d=3 +``` + +```json +{ + "output": "var a={\nb:1,\nc:2\n}\nvar d=3", + "options": [ + { + "blankLine": "never", + "prev": "multiline-var", + "next": "*" + } + ], + "errors": [ + { + "messageId": "unexpectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +var a={ +b:1, +c:2 +} +var d=3 +``` + +```json +{ + "output": "var a={\nb:1,\nc:2\n}\n\nvar d=3", + "options": [ + { + "blankLine": "always", + "prev": "multiline-var", + "next": "*" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +var a=1 + +var b={ +c:2, +d:3 +} +``` + +```json +{ + "output": "var a=1\nvar b={\nc:2,\nd:3\n}", + "options": [ + { + "blankLine": "never", + "prev": "*", + "next": "multiline-var" + } + ], + "errors": [ + { + "messageId": "unexpectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +var a=1 +var b={ +c:2, +d:3 +} +``` + +```json +{ + "output": "var a=1\n\nvar b={\nc:2,\nd:3\n}", + "options": [ + { + "blankLine": "always", + "prev": "*", + "next": "multiline-var" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +const a=1 + +const b=2 +``` + +```json +{ + "output": "const a=1\nconst b=2", + "options": [ + { + "blankLine": "never", + "prev": "singleline-const", + "next": "*" + } + ], + "errors": [ + { + "messageId": "unexpectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +const a=1 +const b=2 +``` + +```json +{ + "output": "const a=1\n\nconst b=2", + "options": [ + { + "blankLine": "always", + "prev": "singleline-const", + "next": "*" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +const a=1 + +const b=2 +``` + +```json +{ + "output": "const a=1\nconst b=2", + "options": [ + { + "blankLine": "never", + "prev": "*", + "next": "singleline-const" + } + ], + "errors": [ + { + "messageId": "unexpectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +const a=1 +const b=2 +``` + +```json +{ + "output": "const a=1\n\nconst b=2", + "options": [ + { + "blankLine": "always", + "prev": "*", + "next": "singleline-const" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +let a=1 + +let b=2 +``` + +```json +{ + "output": "let a=1\nlet b=2", + "options": [ + { + "blankLine": "never", + "prev": "singleline-let", + "next": "*" + } + ], + "errors": [ + { + "messageId": "unexpectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +let a=1 +let b=2 +``` + +```json +{ + "output": "let a=1\n\nlet b=2", + "options": [ + { + "blankLine": "always", + "prev": "singleline-let", + "next": "*" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +let a=1 + +let b=2 +``` + +```json +{ + "output": "let a=1\nlet b=2", + "options": [ + { + "blankLine": "never", + "prev": "*", + "next": "singleline-let" + } + ], + "errors": [ + { + "messageId": "unexpectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +let a=1 +let b=2 +``` + +```json +{ + "output": "let a=1\n\nlet b=2", + "options": [ + { + "blankLine": "always", + "prev": "*", + "next": "singleline-let" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +var a=1 + +var b=2 +``` + +```json +{ + "output": "var a=1\nvar b=2", + "options": [ + { + "blankLine": "never", + "prev": "singleline-var", + "next": "*" + } + ], + "errors": [ + { + "messageId": "unexpectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +var a=1 +var b=2 +``` + +```json +{ + "output": "var a=1\n\nvar b=2", + "options": [ + { + "blankLine": "always", + "prev": "singleline-var", + "next": "*" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +var a=1 + +var b=2 +``` + +```json +{ + "output": "var a=1\nvar b=2", + "options": [ + { + "blankLine": "never", + "prev": "*", + "next": "singleline-var" + } + ], + "errors": [ + { + "messageId": "unexpectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +var a=1 +var b=2 +``` + +```json +{ + "output": "var a=1\n\nvar b=2", + "options": [ + { + "blankLine": "always", + "prev": "*", + "next": "singleline-var" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +var greet = 'hello';console.log(greet); +``` + +```json +{ + "output": "var greet = 'hello';\n\nconsole.log(greet);", + "options": [ + { + "blankLine": "always", + "prev": [ + "const", + "let", + "var" + ], + "next": "*" + }, + { + "blankLine": "any", + "prev": [ + "const", + "let", + "var" + ], + "next": [ + "const", + "let", + "var" + ] + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +var greet = 'hello';var name = 'world';console.log(greet, name); +``` + +```json +{ + "output": "var greet = 'hello';var name = 'world';\n\nconsole.log(greet, name);", + "options": [ + { + "blankLine": "always", + "prev": [ + "const", + "let", + "var" + ], + "next": "*" + }, + { + "blankLine": "any", + "prev": [ + "const", + "let", + "var" + ], + "next": [ + "const", + "let", + "var" + ] + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +var greet = 'hello', name = 'world';console.log(greet, name); +``` + +```json +{ + "output": "var greet = 'hello', name = 'world';\n\nconsole.log(greet, name);", + "options": [ + { + "blankLine": "always", + "prev": [ + "const", + "let", + "var" + ], + "next": "*" + }, + { + "blankLine": "any", + "prev": [ + "const", + "let", + "var" + ], + "next": [ + "const", + "let", + "var" + ] + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +var greet = 'hello'; +console.log(greet); +``` + +```json +{ + "output": "var greet = 'hello';\n\nconsole.log(greet);", + "options": [ + { + "blankLine": "always", + "prev": [ + "const", + "let", + "var" + ], + "next": "*" + }, + { + "blankLine": "any", + "prev": [ + "const", + "let", + "var" + ], + "next": [ + "const", + "let", + "var" + ] + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +var greet = 'hello'; +console.log(greet); +``` + +```json +{ + "output": "var greet = 'hello';\n \nconsole.log(greet);", + "options": [ + { + "blankLine": "always", + "prev": [ + "const", + "let", + "var" + ], + "next": "*" + }, + { + "blankLine": "any", + "prev": [ + "const", + "let", + "var" + ], + "next": [ + "const", + "let", + "var" + ] + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +var greet = 'hello'; // inline comment +console.log(greet); +``` + +```json +{ + "output": "var greet = 'hello'; // inline comment\n\nconsole.log(greet);", + "options": [ + { + "blankLine": "always", + "prev": [ + "const", + "let", + "var" + ], + "next": "*" + }, + { + "blankLine": "any", + "prev": [ + "const", + "let", + "var" + ], + "next": [ + "const", + "let", + "var" + ] + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +var greet = 'hello'; +var name = 'world'; +console.log(greet, name); +``` + +```json +{ + "output": "var greet = 'hello';\nvar name = 'world';\n\nconsole.log(greet, name);", + "options": [ + { + "blankLine": "always", + "prev": [ + "const", + "let", + "var" + ], + "next": "*" + }, + { + "blankLine": "any", + "prev": [ + "const", + "let", + "var" + ], + "next": [ + "const", + "let", + "var" + ] + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +var greet = 'hello', name = 'world'; +console.log(greet, name); +``` + +```json +{ + "output": "var greet = 'hello', name = 'world';\n\nconsole.log(greet, name);", + "options": [ + { + "blankLine": "always", + "prev": [ + "const", + "let", + "var" + ], + "next": "*" + }, + { + "blankLine": "any", + "prev": [ + "const", + "let", + "var" + ], + "next": [ + "const", + "let", + "var" + ] + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +var greet = 'hello', +name = 'world'; +console.log(greet, name); +``` + +```json +{ + "output": "var greet = 'hello',\nname = 'world';\n\nconsole.log(greet, name);", + "options": [ + { + "blankLine": "always", + "prev": [ + "const", + "let", + "var" + ], + "next": "*" + }, + { + "blankLine": "any", + "prev": [ + "const", + "let", + "var" + ], + "next": [ + "const", + "let", + "var" + ] + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +let greet = 'hello'; +console.log(greet); +``` + +```json +{ + "output": "let greet = 'hello';\n\nconsole.log(greet);", + "options": [ + { + "blankLine": "always", + "prev": [ + "const", + "let", + "var" + ], + "next": "*" + }, + { + "blankLine": "any", + "prev": [ + "const", + "let", + "var" + ], + "next": [ + "const", + "let", + "var" + ] + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +const greet = 'hello'; +console.log(greet); +``` + +```json +{ + "output": "const greet = 'hello';\n\nconsole.log(greet);", + "options": [ + { + "blankLine": "always", + "prev": [ + "const", + "let", + "var" + ], + "next": "*" + }, + { + "blankLine": "any", + "prev": [ + "const", + "let", + "var" + ], + "next": [ + "const", + "let", + "var" + ] + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +function example() { +var greet = 'hello'; +console.log(greet); +} +``` + +```json +{ + "output": "function example() {\nvar greet = 'hello';\n\nconsole.log(greet);\n}", + "options": [ + { + "blankLine": "always", + "prev": [ + "const", + "let", + "var" + ], + "next": "*" + }, + { + "blankLine": "any", + "prev": [ + "const", + "let", + "var" + ], + "next": [ + "const", + "let", + "var" + ] + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +var f = function() { +var greet = 'hello'; +console.log(greet); +}; +``` + +```json +{ + "output": "var f = function() {\nvar greet = 'hello';\n\nconsole.log(greet);\n};", + "options": [ + { + "blankLine": "always", + "prev": [ + "const", + "let", + "var" + ], + "next": "*" + }, + { + "blankLine": "any", + "prev": [ + "const", + "let", + "var" + ], + "next": [ + "const", + "let", + "var" + ] + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +() => { +var greet = 'hello'; +console.log(greet); +} +``` + +```json +{ + "output": "() => {\nvar greet = 'hello';\n\nconsole.log(greet);\n}", + "options": [ + { + "blankLine": "always", + "prev": [ + "const", + "let", + "var" + ], + "next": "*" + }, + { + "blankLine": "any", + "prev": [ + "const", + "let", + "var" + ], + "next": [ + "const", + "let", + "var" + ] + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +var greet = 'hello'; + +console.log(greet); +``` + +```json +{ + "output": "var greet = 'hello';\nconsole.log(greet);", + "options": [ + { + "blankLine": "never", + "prev": [ + "const", + "let", + "var" + ], + "next": "*" + }, + { + "blankLine": "any", + "prev": [ + "const", + "let", + "var" + ], + "next": [ + "const", + "let", + "var" + ] + } + ], + "errors": [ + { + "messageId": "unexpectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +var greet = 'hello'; + + +console.log(greet); +``` + +```json +{ + "output": "var greet = 'hello';\nconsole.log(greet);", + "options": [ + { + "blankLine": "never", + "prev": [ + "const", + "let", + "var" + ], + "next": "*" + }, + { + "blankLine": "any", + "prev": [ + "const", + "let", + "var" + ], + "next": [ + "const", + "let", + "var" + ] + } + ], + "errors": [ + { + "messageId": "unexpectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +var greet = 'hello'; + + + +console.log(greet); +``` + +```json +{ + "output": "var greet = 'hello';\nconsole.log(greet);", + "options": [ + { + "blankLine": "never", + "prev": [ + "const", + "let", + "var" + ], + "next": "*" + }, + { + "blankLine": "any", + "prev": [ + "const", + "let", + "var" + ], + "next": [ + "const", + "let", + "var" + ] + } + ], + "errors": [ + { + "messageId": "unexpectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +var greet = 'hello'; + +console.log(greet); +``` + +```json +{ + "output": "var greet = 'hello'; \nconsole.log(greet);", + "options": [ + { + "blankLine": "never", + "prev": [ + "const", + "let", + "var" + ], + "next": "*" + }, + { + "blankLine": "any", + "prev": [ + "const", + "let", + "var" + ], + "next": [ + "const", + "let", + "var" + ] + } + ], + "errors": [ + { + "messageId": "unexpectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +var greet = 'hello'; // inline comment + +console.log(greet); +``` + +```json +{ + "output": "var greet = 'hello'; // inline comment\nconsole.log(greet);", + "options": [ + { + "blankLine": "never", + "prev": [ + "const", + "let", + "var" + ], + "next": "*" + }, + { + "blankLine": "any", + "prev": [ + "const", + "let", + "var" + ], + "next": [ + "const", + "let", + "var" + ] + } + ], + "errors": [ + { + "messageId": "unexpectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +var greet = 'hello'; +var name = 'world'; + +console.log(greet, name); +``` + +```json +{ + "output": "var greet = 'hello';\nvar name = 'world';\nconsole.log(greet, name);", + "options": [ + { + "blankLine": "never", + "prev": [ + "const", + "let", + "var" + ], + "next": "*" + }, + { + "blankLine": "any", + "prev": [ + "const", + "let", + "var" + ], + "next": [ + "const", + "let", + "var" + ] + } + ], + "errors": [ + { + "messageId": "unexpectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +var greet = 'hello', name = 'world'; + +console.log(greet, name); +``` + +```json +{ + "output": "var greet = 'hello', name = 'world';\nconsole.log(greet, name);", + "options": [ + { + "blankLine": "never", + "prev": [ + "const", + "let", + "var" + ], + "next": "*" + }, + { + "blankLine": "any", + "prev": [ + "const", + "let", + "var" + ], + "next": [ + "const", + "let", + "var" + ] + } + ], + "errors": [ + { + "messageId": "unexpectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +var greet = 'hello', +name = 'world'; + +console.log(greet, name); +``` + +```json +{ + "output": "var greet = 'hello',\nname = 'world';\nconsole.log(greet, name);", + "options": [ + { + "blankLine": "never", + "prev": [ + "const", + "let", + "var" + ], + "next": "*" + }, + { + "blankLine": "any", + "prev": [ + "const", + "let", + "var" + ], + "next": [ + "const", + "let", + "var" + ] + } + ], + "errors": [ + { + "messageId": "unexpectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +var greet = 'hello', // inline comment +name = 'world'; // inline comment + +console.log(greet, name); +``` + +```json +{ + "output": "var greet = 'hello', // inline comment\nname = 'world'; // inline comment\nconsole.log(greet, name);", + "options": [ + { + "blankLine": "never", + "prev": [ + "const", + "let", + "var" + ], + "next": "*" + }, + { + "blankLine": "any", + "prev": [ + "const", + "let", + "var" + ], + "next": [ + "const", + "let", + "var" + ] + } + ], + "errors": [ + { + "messageId": "unexpectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +let greet = 'hello'; + +console.log(greet); +``` + +```json +{ + "output": "let greet = 'hello';\nconsole.log(greet);", + "options": [ + { + "blankLine": "never", + "prev": [ + "const", + "let", + "var" + ], + "next": "*" + }, + { + "blankLine": "any", + "prev": [ + "const", + "let", + "var" + ], + "next": [ + "const", + "let", + "var" + ] + } + ], + "errors": [ + { + "messageId": "unexpectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +const greet = 'hello'; + +console.log(greet); +``` + +```json +{ + "output": "const greet = 'hello';\nconsole.log(greet);", + "options": [ + { + "blankLine": "never", + "prev": [ + "const", + "let", + "var" + ], + "next": "*" + }, + { + "blankLine": "any", + "prev": [ + "const", + "let", + "var" + ], + "next": [ + "const", + "let", + "var" + ] + } + ], + "errors": [ + { + "messageId": "unexpectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +var greet = 'hello'; +// next-line comment +console.log(greet); +``` + +```json +{ + "output": "var greet = 'hello';\n\n// next-line comment\nconsole.log(greet);", + "options": [ + { + "blankLine": "always", + "prev": [ + "const", + "let", + "var" + ], + "next": "*" + }, + { + "blankLine": "any", + "prev": [ + "const", + "let", + "var" + ], + "next": [ + "const", + "let", + "var" + ] + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +var greet = 'hello'; +/* block comment +block comment */ +console.log(greet); +``` + +```json +{ + "output": "var greet = 'hello';\n\n/* block comment\nblock comment */\nconsole.log(greet);", + "options": [ + { + "blankLine": "always", + "prev": [ + "const", + "let", + "var" + ], + "next": "*" + }, + { + "blankLine": "any", + "prev": [ + "const", + "let", + "var" + ], + "next": [ + "const", + "let", + "var" + ] + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +var greet = 'hello', +name = 'world'; +// next-line comment +console.log(greet); +``` + +```json +{ + "output": "var greet = 'hello',\nname = 'world';\n\n// next-line comment\nconsole.log(greet);", + "options": [ + { + "blankLine": "always", + "prev": [ + "const", + "let", + "var" + ], + "next": "*" + }, + { + "blankLine": "any", + "prev": [ + "const", + "let", + "var" + ], + "next": [ + "const", + "let", + "var" + ] + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +var greet = 'hello', +name = 'world'; +/* block comment +block comment */ +console.log(greet); +``` + +```json +{ + "output": "var greet = 'hello',\nname = 'world';\n\n/* block comment\nblock comment */\nconsole.log(greet);", + "options": [ + { + "blankLine": "always", + "prev": [ + "const", + "let", + "var" + ], + "next": "*" + }, + { + "blankLine": "any", + "prev": [ + "const", + "let", + "var" + ], + "next": [ + "const", + "let", + "var" + ] + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +var greet = 'hello'; +// next-line comment +// second-line comment +console.log(greet); +``` + +```json +{ + "output": "var greet = 'hello';\n\n// next-line comment\n// second-line comment\nconsole.log(greet);", + "options": [ + { + "blankLine": "always", + "prev": [ + "const", + "let", + "var" + ], + "next": "*" + }, + { + "blankLine": "any", + "prev": [ + "const", + "let", + "var" + ], + "next": [ + "const", + "let", + "var" + ] + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +var greet = 'hello'; +// next-line comment +/* block comment +block comment */ +console.log(greet); +``` + +```json +{ + "output": "var greet = 'hello';\n\n// next-line comment\n/* block comment\nblock comment */\nconsole.log(greet);", + "options": [ + { + "blankLine": "always", + "prev": [ + "const", + "let", + "var" + ], + "next": "*" + }, + { + "blankLine": "any", + "prev": [ + "const", + "let", + "var" + ], + "next": [ + "const", + "let", + "var" + ] + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js + + var a = 1 + ;(b || c).doSomething() + +``` + +```json +{ + "output": "\n var a = 1\n\n ;(b || c).doSomething()\n ", + "options": [ + { + "blankLine": "always", + "prev": [ + "const", + "let", + "var" + ], + "next": "*" + }, + { + "blankLine": "any", + "prev": [ + "const", + "let", + "var" + ], + "next": [ + "const", + "let", + "var" + ] + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js + + var a = 1 + + ;(b || c).doSomething() + +``` + +```json +{ + "output": "\n var a = 1\n ;(b || c).doSomething()\n ", + "options": [ + { + "blankLine": "never", + "prev": [ + "const", + "let", + "var" + ], + "next": "*" + }, + { + "blankLine": "any", + "prev": [ + "const", + "let", + "var" + ], + "next": [ + "const", + "let", + "var" + ] + } + ], + "errors": [ + { + "messageId": "unexpectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +function a() { +var b; return; +} +``` + +```json +{ + "output": "function a() {\nvar b;\n\n return;\n}", + "options": [ + { + "blankLine": "always", + "prev": "*", + "next": "return" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +function a() { +var b; +return; +} +``` + +```json +{ + "output": "function a() {\nvar b;\n\nreturn;\n}", + "options": [ + { + "blankLine": "always", + "prev": "*", + "next": "return" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +function a() { +if (b) return b; +else if (c) return c; +else { +e(); +return d; +} +} +``` + +```json +{ + "output": "function a() {\nif (b) return b;\nelse if (c) return c;\nelse {\ne();\n\nreturn d;\n}\n}", + "options": [ + { + "blankLine": "always", + "prev": "*", + "next": "return" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +function a() { +if (b) return b; +else if (c) return c; +else { +e(); return d; +} +} +``` + +```json +{ + "output": "function a() {\nif (b) return b;\nelse if (c) return c;\nelse {\ne();\n\n return d;\n}\n}", + "options": [ + { + "blankLine": "always", + "prev": "*", + "next": "return" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +function a() { + while (b) { +c(); +return; +} +} +``` + +```json +{ + "output": "function a() {\n while (b) {\nc();\n\nreturn;\n}\n}", + "options": [ + { + "blankLine": "always", + "prev": "*", + "next": "return" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +function a() { +do { +c(); +return; +} while (b); +} +``` + +```json +{ + "output": "function a() {\ndo {\nc();\n\nreturn;\n} while (b);\n}", + "options": [ + { + "blankLine": "always", + "prev": "*", + "next": "return" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +function a() { +for (var b; b < c; b++) { +c(); +return; +} +} +``` + +```json +{ + "output": "function a() {\nfor (var b; b < c; b++) {\nc();\n\nreturn;\n}\n}", + "options": [ + { + "blankLine": "always", + "prev": "*", + "next": "return" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +function a() { +for (b in c) { +d(); +return; +} +} +``` + +```json +{ + "output": "function a() {\nfor (b in c) {\nd();\n\nreturn;\n}\n}", + "options": [ + { + "blankLine": "always", + "prev": "*", + "next": "return" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +function a() { +for (b of c) { +d(); +return; +} +} +``` + +```json +{ + "output": "function a() {\nfor (b of c) {\nd();\n\nreturn;\n}\n}", + "options": [ + { + "blankLine": "always", + "prev": "*", + "next": "return" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +function a() { +if (b) { +c(); +} +//comment +return b; +} +``` + +```json +{ + "output": "function a() {\nif (b) {\nc();\n}\n\n//comment\nreturn b;\n}", + "options": [ + { + "blankLine": "always", + "prev": "*", + "next": "return" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +function a() { +/*comment +comment*/ +if (b) { +c(); +return b; +} else { +//comment + +return d; +} +/*multi-line +comment*/ +return e; +} +``` + +```json +{ + "output": "function a() {\n/*comment\ncomment*/\nif (b) {\nc();\n\nreturn b;\n} else {\n//comment\n\nreturn d;\n}\n\n/*multi-line\ncomment*/\nreturn e;\n}", + "options": [ + { + "blankLine": "always", + "prev": "*", + "next": "return" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + }, + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 2 errors but had 0: [] + +0 !== 2 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +function a() { +if (b) { return; } //comment +return c; +} +``` + +```json +{ + "output": "function a() {\nif (b) { return; } //comment\n\nreturn c;\n}", + "options": [ + { + "blankLine": "always", + "prev": "*", + "next": "return" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +function a() { +if (b) { return; } /*multi-line +comment*/ +return c; +} +``` + +```json +{ + "output": "function a() {\nif (b) { return; } /*multi-line\ncomment*/\n\nreturn c;\n}", + "options": [ + { + "blankLine": "always", + "prev": "*", + "next": "return" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +function a() { +if (b) { return; } +/*multi-line +comment*/ return c; +} +``` + +```json +{ + "output": "function a() {\nif (b) { return; }\n\n/*multi-line\ncomment*/ return c;\n}", + "options": [ + { + "blankLine": "always", + "prev": "*", + "next": "return" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +function a() { +if (b) { return; } /*multi-line +comment*/ return c; +} +``` + +```json +{ + "output": "function a() {\nif (b) { return; } /*multi-line\ncomment*/\n\n return c;\n}", + "options": [ + { + "blankLine": "always", + "prev": "*", + "next": "return" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +var a; +return; +``` + +```json +{ + "output": "var a;\n\nreturn;", + "options": [ + { + "blankLine": "always", + "prev": "*", + "next": "return" + } + ], + "languageOptions": { + "parserOptions": { + "ecmaFeatures": { + "globalReturn": true + } + } + }, + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +var a; return; +``` + +```json +{ + "output": "var a;\n\n return;", + "options": [ + { + "blankLine": "always", + "prev": "*", + "next": "return" + } + ], + "languageOptions": { + "parserOptions": { + "ecmaFeatures": { + "globalReturn": true + } + } + }, + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +function a() { +{ +//comment +} +return +} +``` + +```json +{ + "output": "function a() {\n{\n//comment\n}\n\nreturn\n}", + "options": [ + { + "blankLine": "always", + "prev": "*", + "next": "return" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +function a() { +{ +//comment +} return +} +``` + +```json +{ + "output": "function a() {\n{\n//comment\n}\n\n return\n}", + "options": [ + { + "blankLine": "always", + "prev": "*", + "next": "return" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +function a() { +var c; +while (b) { + c = d; //comment +} +return c; +} +``` + +```json +{ + "output": "function a() {\nvar c;\nwhile (b) {\n c = d; //comment\n}\n\nreturn c;\n}", + "options": [ + { + "blankLine": "always", + "prev": "*", + "next": "return" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +function a() { +for (var b; b < c; b++) { +if (d) { +break; //comment +} +return; +} +} +``` + +```json +{ + "output": "function a() {\nfor (var b; b < c; b++) {\nif (d) {\nbreak; //comment\n}\n\nreturn;\n}\n}", + "options": [ + { + "blankLine": "always", + "prev": "*", + "next": "return" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +function a() { +var b; /*multi-line +comment*/ +return c; +} +``` + +```json +{ + "output": "function a() {\nvar b; /*multi-line\ncomment*/\n\nreturn c;\n}", + "options": [ + { + "blankLine": "always", + "prev": "*", + "next": "return" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +function a() { +var b; +/*multi-line +comment*/ return c; +} +``` + +```json +{ + "output": "function a() {\nvar b;\n\n/*multi-line\ncomment*/ return c;\n}", + "options": [ + { + "blankLine": "always", + "prev": "*", + "next": "return" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +function a() { +var b; /*multi-line +comment*/ return c; +} +``` + +```json +{ + "output": "function a() {\nvar b; /*multi-line\ncomment*/\n\n return c;\n}", + "options": [ + { + "blankLine": "always", + "prev": "*", + "next": "return" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +function a() { +var b; +//comment +return; +} +``` + +```json +{ + "output": "function a() {\nvar b;\n\n//comment\nreturn;\n}", + "options": [ + { + "blankLine": "always", + "prev": "*", + "next": "return" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +function a() { +var b; //comment +return; +} +``` + +```json +{ + "output": "function a() {\nvar b; //comment\n\nreturn;\n}", + "options": [ + { + "blankLine": "always", + "prev": "*", + "next": "return" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +function a() { +var b; +/* comment */ return; +} +``` + +```json +{ + "output": "function a() {\nvar b;\n\n/* comment */ return;\n}", + "options": [ + { + "blankLine": "always", + "prev": "*", + "next": "return" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +function a() { +var b; +//comment +/* comment */ return; +} +``` + +```json +{ + "output": "function a() {\nvar b;\n\n//comment\n/* comment */ return;\n}", + "options": [ + { + "blankLine": "always", + "prev": "*", + "next": "return" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +function a() { +var b; /* comment */ return; +} +``` + +```json +{ + "output": "function a() {\nvar b; /* comment */\n\n return;\n}", + "options": [ + { + "blankLine": "always", + "prev": "*", + "next": "return" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +function a() { +var b; /* comment */ +return; +} +``` + +```json +{ + "output": "function a() {\nvar b; /* comment */\n\nreturn;\n}", + "options": [ + { + "blankLine": "always", + "prev": "*", + "next": "return" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +function a() { +var b; +return; //comment +} +``` + +```json +{ + "output": "function a() {\nvar b;\n\nreturn; //comment\n}", + "options": [ + { + "blankLine": "always", + "prev": "*", + "next": "return" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +function a() { +var b; return; //comment +} +``` + +```json +{ + "output": "function a() {\nvar b;\n\n return; //comment\n}", + "options": [ + { + "blankLine": "always", + "prev": "*", + "next": "return" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +if(true){} + +var a = 2; +``` + +```json +{ + "output": "if(true){}\nvar a = 2;", + "options": [ + { + "blankLine": "never", + "prev": "block-like", + "next": "*" + } + ], + "errors": [ + { + "messageId": "unexpectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +if(true){ +if(true) {} + +var a = 2;} +``` + +```json +{ + "output": "if(true){\nif(true) {}\nvar a = 2;}", + "options": [ + { + "blankLine": "never", + "prev": "block-like", + "next": "*" + } + ], + "errors": [ + { + "messageId": "unexpectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +(function(){ +})() + +var a = 2; +``` + +```json +{ + "output": "(function(){\n})()\nvar a = 2;", + "options": [ + { + "blankLine": "never", + "prev": "block-like", + "next": "*" + } + ], + "errors": [ + { + "messageId": "unexpectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js ++(function(){ +})() + +var a = 2; +``` + +```json +{ + "output": "+(function(){\n})()\nvar a = 2;", + "options": [ + { + "blankLine": "never", + "prev": "block-like", + "next": "*" + } + ], + "errors": [ + { + "messageId": "unexpectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +var a = function() {}; + +var b = 2; +``` + +```json +{ + "output": "var a = function() {};\nvar b = 2;", + "options": [ + { + "blankLine": "never", + "prev": "block-like", + "next": "*" + } + ], + "errors": [ + { + "messageId": "unexpectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +var a = 2; + +module.exports = a; +``` + +```json +{ + "output": "var a = 2;\nmodule.exports = a;", + "options": [ + { + "blankLine": "never", + "prev": "*", + "next": "cjs-export" + } + ], + "errors": [ + { + "messageId": "unexpectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +function x() { var a; + +return; } +``` + +```json +{ + "output": "function x() { var a;\nreturn; }", + "options": [ + { + "blankLine": "never", + "prev": "*", + "next": [ + "if", + "for", + "return", + "switch", + "case", + "break", + "throw" + ] + } + ], + "errors": [ + { + "messageId": "unexpectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +function x() { var a = true; + +if (a) { a = !a; }; } +``` + +```json +{ + "output": "function x() { var a = true;\nif (a) { a = !a; }; }", + "options": [ + { + "blankLine": "never", + "prev": "*", + "next": [ + "if", + "for", + "return", + "switch", + "case", + "break", + "throw" + ] + } + ], + "errors": [ + { + "messageId": "unexpectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +function x() { var a = true; + +for (var i = 0; i < 10; i++) { a = !a; }; } +``` + +```json +{ + "output": "function x() { var a = true;\nfor (var i = 0; i < 10; i++) { a = !a; }; }", + "options": [ + { + "blankLine": "never", + "prev": "*", + "next": [ + "if", + "for", + "return", + "switch", + "case", + "break", + "throw" + ] + } + ], + "errors": [ + { + "messageId": "unexpectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +function x() { var y = true; + +switch ("Oranges") { case "Oranges": y = !y; + +break; + +case "Apples": y = !y; + +break; default: y = !y; } } +``` + +```json +{ + "output": "function x() { var y = true;\nswitch (\"Oranges\") { case \"Oranges\": y = !y;\nbreak;\ncase \"Apples\": y = !y;\nbreak; default: y = !y; } }", + "options": [ + { + "blankLine": "never", + "prev": "*", + "next": [ + "if", + "for", + "return", + "switch", + "case", + "break", + "throw" + ] + } + ], + "errors": [ + { + "messageId": "unexpectedBlankLine" + }, + { + "messageId": "unexpectedBlankLine" + }, + { + "messageId": "unexpectedBlankLine" + }, + { + "messageId": "unexpectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 4 errors but had 1: [ + { + ruleId: 'rule-to-test/padding-line-between-statements', + message: 'Unexpected blank line before this statement.', + messageId: 'unexpectedBlankLine', + severity: 1, + nodeType: 'SwitchCase', + line: 7, + column: 0, + endLine: 9, + endColumn: 6, + suggestions: null + } +] + +1 !== 4 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +function x() {try { var a; + +throw 0; } catch (e) { var b = 0; + +throw e; } } +``` + +```json +{ + "output": "function x() {try { var a;\nthrow 0; } catch (e) { var b = 0;\nthrow e; } }", + "options": [ + { + "blankLine": "never", + "prev": "*", + "next": [ + "if", + "for", + "return", + "switch", + "case", + "break", + "throw" + ] + } + ], + "errors": [ + { + "messageId": "unexpectedBlankLine" + }, + { + "messageId": "unexpectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 2 errors but had 0: [] + +0 !== 2 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +function x(a) { var b = 0; + +if (!a) { return false; }; + +for (var i = 0; i < b; i++) { if (!a[i]) return false; } + +return true; } +``` + +```json +{ + "output": "function x(a) { var b = 0;\nif (!a) { return false; };\nfor (var i = 0; i < b; i++) { if (!a[i]) return false; }\nreturn true; }", + "options": [ + { + "blankLine": "never", + "prev": "*", + "next": [ + "if", + "for", + "return", + "switch", + "case", + "break", + "throw" + ] + } + ], + "errors": [ + { + "messageId": "unexpectedBlankLine" + }, + { + "messageId": "unexpectedBlankLine" + }, + { + "messageId": "unexpectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 3 errors but had 0: [] + +0 !== 3 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +if(true){} +var a = 2; +``` + +```json +{ + "output": "if(true){}\n\nvar a = 2;", + "options": [ + { + "blankLine": "always", + "prev": "block-like", + "next": "*" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +var a = function() { +}; +var b = 2; +``` + +```json +{ + "output": "var a = function() {\n};\n\nvar b = 2;", + "options": [ + { + "blankLine": "always", + "prev": "block-like", + "next": "*" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +if(true){ +if(true) {} +var a = 2;} +``` + +```json +{ + "output": "if(true){\nif(true) {}\n\nvar a = 2;}", + "options": [ + { + "blankLine": "always", + "prev": "block-like", + "next": "*" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +(function(){ +})() +var a = 2; +``` + +```json +{ + "output": "(function(){\n})()\n\nvar a = 2;", + "options": [ + { + "blankLine": "always", + "prev": "block-like", + "next": "*" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +var a = function() { +}; +var b = 2; +``` + +```json +{ + "output": "var a = function() {\n};\n\nvar b = 2;", + "options": [ + { + "blankLine": "always", + "prev": "multiline-block-like", + "next": "*" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +(function(){ +})() +var a = 2; +``` + +```json +{ + "output": "(function(){\n})()\n\nvar a = 2;", + "options": [ + { + "blankLine": "always", + "prev": "multiline-block-like", + "next": "*" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +var a = 2; +module.exports = a; +``` + +```json +{ + "output": "var a = 2;\n\nmodule.exports = a;", + "options": [ + { + "blankLine": "always", + "prev": "*", + "next": "cjs-export" + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +function x() { var a; return; } +``` + +```json +{ + "output": "function x() { var a;\n\n return; }", + "options": [ + { + "blankLine": "always", + "prev": "*", + "next": [ + "if", + "for", + "return", + "switch", + "case", + "break", + "throw", + "while", + "default" + ] + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +function x() { var a = true; for (var i = 0; i < 10; i++) { a = !a; }; } +``` + +```json +{ + "output": "function x() { var a = true;\n\n for (var i = 0; i < 10; i++) { a = !a; }; }", + "options": [ + { + "blankLine": "always", + "prev": "*", + "next": [ + "if", + "for", + "return", + "switch", + "case", + "break", + "throw", + "while", + "default" + ] + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +function x() { var y = true; switch ("Oranges") { case "Oranges": y = !y; break; case "Apples": y = !y; break; default: y = !y; } } +``` + +```json +{ + "output": "function x() { var y = true;\n\n switch (\"Oranges\") { case \"Oranges\": y = !y;\n\n break;\n\n case \"Apples\": y = !y;\n\n break;\n\n default: y = !y; } }", + "options": [ + { + "blankLine": "always", + "prev": "*", + "next": [ + "if", + "for", + "return", + "switch", + "case", + "break", + "throw", + "while", + "default" + ] + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + }, + { + "messageId": "expectedBlankLine" + }, + { + "messageId": "expectedBlankLine" + }, + { + "messageId": "expectedBlankLine" + }, + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 5 errors but had 2: [ + { + ruleId: 'rule-to-test/padding-line-between-statements', + message: 'Expected blank line before this statement.', + messageId: 'expectedBlankLine', + severity: 1, + nodeType: 'SwitchCase', + line: 1, + column: 81, + endLine: 1, + endColumn: 110, + suggestions: null + }, + { + ruleId: 'rule-to-test/padding-line-between-statements', + message: 'Expected blank line before this statement.', + messageId: 'expectedBlankLine', + severity: 1, + nodeType: 'SwitchCase', + line: 1, + column: 111, + endLine: 1, + endColumn: 127, + suggestions: null + } +] + +2 !== 5 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +function x() { var a = true; while (!a) { a = !a; }; } +``` + +```json +{ + "output": "function x() { var a = true;\n\n while (!a) { a = !a; }; }", + "options": [ + { + "blankLine": "always", + "prev": "*", + "next": [ + "if", + "for", + "return", + "switch", + "case", + "break", + "throw", + "while", + "default" + ] + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +function x() {try { var a; throw 0; } catch (e) { var b = 0; throw e; } } +``` + +```json +{ + "output": "function x() {try { var a;\n\n throw 0; } catch (e) { var b = 0;\n\n throw e; } }", + "options": [ + { + "blankLine": "always", + "prev": "*", + "next": [ + "if", + "for", + "return", + "switch", + "case", + "break", + "throw", + "while", + "default" + ] + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + }, + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 2 errors but had 0: [] + +0 !== 2 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +function x(a) { var b = 0; if (!a) { return false; }; for (var i = 0; i < b; i++) { if (!a[i]) return false; } return true; } +``` + +```json +{ + "output": "function x(a) { var b = 0;\n\n if (!a) { return false; };\n\n for (var i = 0; i < b; i++) { if (!a[i]) return false; }\n\n return true; }", + "options": [ + { + "blankLine": "always", + "prev": "*", + "next": [ + "if", + "for", + "return", + "switch", + "case", + "break", + "throw", + "while", + "default" + ] + } + ], + "errors": [ + { + "messageId": "expectedBlankLine" + }, + { + "messageId": "expectedBlankLine" + }, + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 3 errors but had 0: [] + +0 !== 3 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +class C { + static { + let x; + foo(); + } + } +``` + +```json +{ + "output": "class C {\n static {\n let x;\n\n foo();\n }\n }", + "options": [ + { + "blankLine": "always", + "prev": "let", + "next": "expression" + } + ], + "languageOptions": { + "ecmaVersion": 2022 + }, + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +class C { + static { + let x; + + foo(); + } + } +``` + +```json +{ + "output": "class C {\n static {\n let x;\n foo();\n }\n }", + "options": [ + { + "blankLine": "never", + "prev": "let", + "next": "expression" + } + ], + "languageOptions": { + "ecmaVersion": 2022 + }, + "errors": [ + { + "messageId": "unexpectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +class C { + static { + let x; + foo(); + const y = 1; + } + } +``` + +```json +{ + "output": "class C {\n static {\n let x;\n foo();\n\n const y = 1;\n }\n }", + "options": [ + { + "blankLine": "always", + "prev": "expression", + "next": "const" + } + ], + "languageOptions": { + "ecmaVersion": 2022 + }, + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +class C { + static { + let x; + foo(); + + const y = 1; + } + } +``` + +```json +{ + "output": "class C {\n static {\n let x;\n foo();\n const y = 1;\n }\n }", + "options": [ + { + "blankLine": "never", + "prev": "expression", + "next": "const" + } + ], + "languageOptions": { + "ecmaVersion": 2022 + }, + "errors": [ + { + "messageId": "unexpectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +class C { + static { + let x; + foo(); + const y = 1; + const z = 1; + } + } +``` + +```json +{ + "output": "class C {\n static {\n let x;\n foo();\n\n const y = 1;\n const z = 1;\n }\n }", + "options": [ + { + "blankLine": "always", + "prev": "expression", + "next": "const" + } + ], + "languageOptions": { + "ecmaVersion": 2022 + }, + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +class C { + static { + let x; + foo(); + + const y = 1; + const z = 1; + } + } +``` + +```json +{ + "output": "class C {\n static {\n let x;\n foo();\n const y = 1;\n const z = 1;\n }\n }", + "options": [ + { + "blankLine": "never", + "prev": "expression", + "next": "const" + } + ], + "languageOptions": { + "ecmaVersion": 2022 + }, + "errors": [ + { + "messageId": "unexpectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +class C { + static { + let a = 0; + bar(); + } + } +``` + +```json +{ + "output": "class C {\n static {\n let a = 0;\n\n bar();\n }\n }", + "options": [ + { + "blankLine": "always", + "prev": [ + "const", + "let", + "var" + ], + "next": "*" + }, + { + "blankLine": "any", + "prev": [ + "const", + "let", + "var" + ], + "next": [ + "const", + "let", + "var" + ] + } + ], + "languageOptions": { + "ecmaVersion": 2022 + }, + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +class C { static { let x; { let y; let z; } let q; } } +``` + +```json +{ + "output": "class C { static { let x; { let y;\n\n let z; } let q; } }", + "options": [ + { + "blankLine": "always", + "prev": "let", + "next": "let" + } + ], + "languageOptions": { + "ecmaVersion": 2022 + }, + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +class C { static { { let x; } let y; let z; } } +``` + +```json +{ + "output": "class C { static { { let x; } let y;\n\n let z; } }", + "options": [ + { + "blankLine": "always", + "prev": "let", + "next": "let" + } + ], + "languageOptions": { + "ecmaVersion": 2022 + }, + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +class C { static { foo(); if (bar) {} } } +``` + +```json +{ + "output": "class C { static { foo();\n\n if (bar) {} } }", + "options": [ + { + "blankLine": "always", + "prev": "expression", + "next": "block-like" + } + ], + "languageOptions": { + "ecmaVersion": 2022 + }, + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +class C { static { let x; } } let y; +``` + +```json +{ + "output": "class C { static { let x; } }\n\n let y;", + "options": [ + { + "blankLine": "always", + "prev": "class", + "next": "let" + } + ], + "languageOptions": { + "ecmaVersion": 2022 + }, + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### padding-line-between-statements > invalid + +```js +class C { static { 'use strict'; let x; } } +``` + +```json +{ + "output": "class C { static { 'use strict';\n\n let x; } }", + "options": [ + { + "blankLine": "always", + "prev": "expression", + "next": "let" + } + ], + "languageOptions": { + "ecmaVersion": 2022 + }, + "errors": [ + { + "messageId": "expectedBlankLine" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +### `prefer-arrow-callback` + +Pass: 90 / 107 (84.1%) +Fail: 17 / 107 (15.9%) + +#### prefer-arrow-callback > valid + +```js +foo((a:string) => a); +``` + +```json +{} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### prefer-arrow-callback > valid + +```js +foo(function bar(a:string) {}); +``` + +```json +{ + "options": [ + { + "allowNamedFunctions": true + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### prefer-arrow-callback > valid + +```js +test('clean', function (this: any) { this.foo = 'Cleaned!';}); +``` + +```json +{} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### prefer-arrow-callback > invalid + +```js +foo(function(a:string) {}); +``` + +```json +{ + "output": "foo((a:string) => {});", + "options": [ + { + "allowNamedFunctions": true + } + ], + "errors": [ + { + "messageId": "preferArrowCallback" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### prefer-arrow-callback > invalid + +```js +foo(function bar(a:string) { a; }); +``` + +```json +{ + "output": "foo((a:string) => { a; });", + "errors": [ + { + "messageId": "preferArrowCallback" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### prefer-arrow-callback > invalid + +```js +foo(function(a:any) { a; }); +``` + +```json +{ + "output": "foo((a:any) => { a; });", + "errors": [ + { + "messageId": "preferArrowCallback" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### prefer-arrow-callback > invalid + +```js +foo(function(arguments:any) { arguments; }); +``` + +```json +{ + "output": "foo((arguments:any) => { arguments; });", + "errors": [ + { + "messageId": "preferArrowCallback" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### prefer-arrow-callback > invalid + +```js +foo(function(a:string) { this; }); +``` + +```json +{ + "output": null, + "options": [ + { + "allowUnboundThis": false + } + ], + "errors": [ + { + "messageId": "preferArrowCallback" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### prefer-arrow-callback > invalid + +```js +qux(function(foo:string, bar:number, baz:string) { return foo * 2; }) +``` + +```json +{ + "output": "qux((foo:string, bar:number, baz:string) => { return foo * 2; })", + "errors": [ + { + "messageId": "preferArrowCallback" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### prefer-arrow-callback > invalid + +```js +qux(function(foo:number, bar:number, baz:number) { return foo * bar; }.bind(this)) +``` + +```json +{ + "output": "qux((foo:number, bar:number, baz:number) => { return foo * bar; })", + "errors": [ + { + "messageId": "preferArrowCallback" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### prefer-arrow-callback > invalid + +```js +qux(function(foo:any, bar:any, baz:any) { return foo * this.qux; }.bind(this)) +``` + +```json +{ + "output": "qux((foo:any, bar:any, baz:any) => { return foo * this.qux; })", + "errors": [ + { + "messageId": "preferArrowCallback" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### prefer-arrow-callback > invalid + +```js +qux(function(baz:string, baz:string) { }) +``` + +```json +{ + "output": null, + "errors": [ + { + "messageId": "preferArrowCallback" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### prefer-arrow-callback > invalid + +```js +qux(function( /* a */ foo:string /* b */ , /* c */ bar:string /* d */ , /* e */ baz:string /* f */ ) { return foo; }) +``` + +```json +{ + "output": "qux(( /* a */ foo:string /* b */ , /* c */ bar:string /* d */ , /* e */ baz:string /* f */ ) => { return foo; })", + "errors": [ + { + "messageId": "preferArrowCallback" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### prefer-arrow-callback > invalid + +```js +qux(async function (foo:number = 1, bar:number = 2, baz:number = 3) { return baz; }) +``` + +```json +{ + "output": "qux(async (foo:number = 1, bar:number = 2, baz:number = 3) => { return baz; })", + "errors": [ + { + "messageId": "preferArrowCallback" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### prefer-arrow-callback > invalid + +```js +qux(async function (foo:number = 1, bar:number = 2, baz:number = 3) { return this; }.bind(this)) +``` + +```json +{ + "output": "qux(async (foo:number = 1, bar:number = 2, baz:number = 3) => { return this; })", + "errors": [ + { + "messageId": "preferArrowCallback" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### prefer-arrow-callback > invalid + +```js +foo(function():string { return 'foo' }); +``` + +```json +{ + "output": "foo(():string => { return 'foo' });", + "errors": [ + { + "messageId": "preferArrowCallback" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### prefer-arrow-callback > invalid + +```js +test('foo', function (this: any) {}); +``` + +```json +{ + "output": null, + "errors": [ + { + "messageId": "preferArrowCallback" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +### `prefer-const` + +Pass: 136 / 138 (98.6%) +Fail: 2 / 138 (1.4%) + +#### prefer-const > valid + +```js +/*exported a*/ let a = 1 +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/prefer-const', + message: "'a' is never reassigned. Use 'const' instead.", + messageId: 'useConst', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 19, + endLine: 1, + endColumn: 20, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### prefer-const > invalid + +```js +/*eslint no-undef-init:error*/ let foo = undefined; +``` + +```json +{ + "output": "/*eslint no-undef-init:error*/ const foo = undefined;", + "errors": 2 +} +``` + +AssertionError [ERR_ASSERTION]: Should have 2 errors but had 1: [ + { + ruleId: 'rule-to-test/prefer-const', + message: "'foo' is never reassigned. Use 'const' instead.", + messageId: 'useConst', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 35, + endLine: 1, + endColumn: 38, + suggestions: null + } +] + +1 !== 2 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +### `prefer-exponentiation-operator` + +Pass: 161 / 167 (96.4%) +Fail: 6 / 167 (3.6%) + +#### prefer-exponentiation-operator > valid + +```js +/* globals Math:off*/ Math.pow(a, b) +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/prefer-exponentiation-operator', + message: "Use the '**' operator instead of 'Math.pow'.", + messageId: 'useExponentiation', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 22, + endLine: 1, + endColumn: 36, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### prefer-exponentiation-operator > invalid + +```js +globalThis.Math.pow(a, b) +``` + +```json +{ + "output": "a**b", + "languageOptions": { + "ecmaVersion": 2020 + }, + "errors": [ + { + "messageId": "useExponentiation", + "line": 1, + "column": 1, + "endLine": 1, + "endColumn": 26 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### prefer-exponentiation-operator > invalid + +```js +globalThis.Math['pow'](a, b) +``` + +```json +{ + "output": "a**b", + "languageOptions": { + "ecmaVersion": 2020 + }, + "errors": [ + { + "messageId": "useExponentiation", + "line": 1, + "column": 1, + "endLine": 1, + "endColumn": 29 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### prefer-exponentiation-operator > invalid + +```js +Math.pow(a, b as any) +``` + +```json +{ + "output": "a**(b as any)", + "languageOptions": { + "parser": {} + }, + "errors": [ + { + "messageId": "useExponentiation" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### prefer-exponentiation-operator > invalid + +```js +Math.pow(a as any, b) +``` + +```json +{ + "output": "(a as any)**b", + "languageOptions": { + "parser": {} + }, + "errors": [ + { + "messageId": "useExponentiation" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### prefer-exponentiation-operator > invalid + +```js +Math.pow(a, b) as any +``` + +```json +{ + "output": "(a**b) as any", + "languageOptions": { + "parser": {} + }, + "errors": [ + { + "messageId": "useExponentiation" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +### `prefer-named-capture-group` + +Pass: 54 / 57 (94.7%) +Fail: 3 / 57 (5.3%) + +#### prefer-named-capture-group > invalid + +```js +new globalThis.RegExp('([0-9]{4})') +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2020 + }, + "errors": [ + { + "messageId": "required", + "data": { + "group": "([0-9]{4})" + }, + "line": 1, + "column": 1, + "endColumn": 36, + "suggestions": [ + { + "messageId": "addGroupName", + "output": "new globalThis.RegExp('(?[0-9]{4})')" + }, + { + "messageId": "addNonCapture", + "output": "new globalThis.RegExp('(?:[0-9]{4})')" + } + ] + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### prefer-named-capture-group > invalid + +```js +globalThis.RegExp('([0-9]{4})') +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2020 + }, + "errors": [ + { + "messageId": "required", + "data": { + "group": "([0-9]{4})" + }, + "line": 1, + "column": 1, + "endColumn": 32, + "suggestions": [ + { + "messageId": "addGroupName", + "output": "globalThis.RegExp('(?[0-9]{4})')" + }, + { + "messageId": "addNonCapture", + "output": "globalThis.RegExp('(?:[0-9]{4})')" + } + ] + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### prefer-named-capture-group > invalid + +```js + + function foo() { var globalThis = bar; } + new globalThis.RegExp('([0-9]{4})'); + +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2020 + }, + "errors": [ + { + "messageId": "required", + "data": { + "group": "([0-9]{4})" + }, + "line": 3, + "column": 17, + "endColumn": 52, + "suggestions": [ + { + "messageId": "addGroupName", + "output": "\n function foo() { var globalThis = bar; }\n new globalThis.RegExp('(?[0-9]{4})');\n " + }, + { + "messageId": "addNonCapture", + "output": "\n function foo() { var globalThis = bar; }\n new globalThis.RegExp('(?:[0-9]{4})');\n " + } + ] + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +### `prefer-object-has-own` + +Pass: 91 / 92 (98.9%) +Fail: 1 / 92 (1.1%) + +#### prefer-object-has-own > valid + +```js +/* global Object: off */ + ({}).hasOwnProperty.call(a, b); +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/prefer-object-has-own', + message: "Use 'Object.hasOwn()' instead of 'Object.prototype.hasOwnProperty.call()'.", + messageId: 'useHasOwn', + severity: 1, + nodeType: 'MemberExpression', + line: 2, + column: 8, + endLine: 2, + endColumn: 38, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +### `prefer-object-spread` + +Pass: 80 / 87 (92.0%) +Fail: 7 / 87 (8.0%) + +#### prefer-object-spread > invalid + +```js +const test = Object.assign({ ...bar }, { + weird + }) +``` + +```json +{ + "output": "const test = {...bar, weird\n }", + "languageOptions": { + "sourceType": "script" + }, + "errors": [ + { + "messageId": "useSpreadMessage", + "line": 1, + "column": 14 + } + ] +} +``` + +TSError: Property assignment expected. + at B (apps/oxlint/dist/ts_eslint.cjs) + at d (apps/oxlint/dist/ts_eslint.cjs) + at a (apps/oxlint/dist/ts_eslint.cjs) + at C (apps/oxlint/dist/ts_eslint.cjs) + + +#### prefer-object-spread > invalid + +```js +globalThis.Object.assign({ }); +``` + +```json +{ + "output": "({});", + "languageOptions": { + "ecmaVersion": 2020 + }, + "errors": [ + { + "messageId": "useLiteralMessage", + "line": 1, + "column": 1 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### prefer-object-spread > invalid + +```js +globalThis.Object.assign({ +}); +``` + +```json +{ + "output": "({});", + "languageOptions": { + "ecmaVersion": 2020 + }, + "errors": [ + { + "messageId": "useLiteralMessage", + "line": 1, + "column": 1 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### prefer-object-spread > invalid + +```js + + function foo () { var globalThis = bar; } + globalThis.Object.assign({ }); + +``` + +```json +{ + "output": "\n function foo () { var globalThis = bar; }\n ({});\n ", + "languageOptions": { + "ecmaVersion": 2020 + }, + "errors": [ + { + "messageId": "useLiteralMessage", + "line": 3, + "column": 17 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### prefer-object-spread > invalid + +```js + + const Foo = require('foo'); + globalThis.Object.assign({ foo: Foo }); + +``` + +```json +{ + "output": "\n const Foo = require('foo');\n ({foo: Foo});\n ", + "languageOptions": { + "ecmaVersion": 2020 + }, + "errors": [ + { + "messageId": "useLiteralMessage", + "line": 3, + "column": 17 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### prefer-object-spread > invalid + +```js +const obj = Object.assign<{}, Record>({}, getObject()); +``` + +```json +{ + "output": "const obj = { ...getObject()};", + "languageOptions": { + "parser": {} + }, + "errors": [ + { + "messageId": "useSpreadMessage", + "line": 1, + "column": 13 + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### prefer-object-spread > invalid + +```js +Object.assign<{}, A>({}, foo); +``` + +```json +{ + "output": "({ ...foo});", + "languageOptions": { + "parser": {} + }, + "errors": [ + { + "messageId": "useSpreadMessage", + "line": 1, + "column": 1 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +### `prefer-regex-literals` + +Pass: 239 / 251 (95.2%) +Fail: 12 / 251 (4.8%) + +#### prefer-regex-literals > valid + +```js +/* globals String:off */ new RegExp(String.raw`a`); +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/prefer-regex-literals', + message: "Use a regular expression literal instead of the 'RegExp' constructor.", + messageId: 'unexpectedRegExp', + severity: 1, + nodeType: 'NewExpression', + line: 1, + column: 25, + endLine: 1, + endColumn: 50, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### prefer-regex-literals > valid + +```js +RegExp('a', String.raw`g`); +``` + +```json +{ + "languageOptions": { + "globals": { + "String": "off" + } + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/prefer-regex-literals', + message: "Use a regular expression literal instead of the 'RegExp' constructor.", + messageId: 'unexpectedRegExp', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 0, + endLine: 1, + endColumn: 26, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### prefer-regex-literals > valid + +```js +/* globals RegExp:off */ new RegExp('a'); +``` + +```json +{} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/prefer-regex-literals', + message: "Use a regular expression literal instead of the 'RegExp' constructor.", + messageId: 'unexpectedRegExp', + severity: 1, + nodeType: 'NewExpression', + line: 1, + column: 25, + endLine: 1, + endColumn: 40, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### prefer-regex-literals > valid + +```js +RegExp('a'); +``` + +```json +{ + "languageOptions": { + "globals": { + "RegExp": "off" + } + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/prefer-regex-literals', + message: "Use a regular expression literal instead of the 'RegExp' constructor.", + messageId: 'unexpectedRegExp', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 0, + endLine: 1, + endColumn: 11, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### prefer-regex-literals > invalid + +```js +new globalThis.RegExp('a'); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2020 + }, + "errors": [ + { + "messageId": "unexpectedRegExp", + "suggestions": [ + { + "messageId": "replaceWithLiteral", + "output": "/a/;" + } + ] + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### prefer-regex-literals > invalid + +```js +globalThis.RegExp('a'); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2020 + }, + "errors": [ + { + "messageId": "unexpectedRegExp", + "suggestions": [ + { + "messageId": "replaceWithLiteral", + "output": "/a/;" + } + ] + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### prefer-regex-literals > invalid + +```js +new globalThis.RegExp('\\W', ''); +``` + +```json +{ + "languageOptions": { + "globals": { + "globalThis": "readonly" + } + }, + "errors": [ + { + "messageId": "unexpectedRegExp", + "suggestions": [ + { + "messageId": "replaceWithLiteral", + "output": "/\\W/;" + } + ] + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### prefer-regex-literals > invalid + +```js +globalThis.RegExp('\\d', ''); +``` + +```json +{ + "languageOptions": { + "globals": { + "globalThis": "readonly" + } + }, + "errors": [ + { + "messageId": "unexpectedRegExp", + "suggestions": [ + { + "messageId": "replaceWithLiteral", + "output": "/\\d/;" + } + ] + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### prefer-regex-literals > invalid + +```js +globalThis.RegExp('\\D', '') +``` + +```json +{ + "languageOptions": { + "globals": { + "globalThis": "readonly" + } + }, + "errors": [ + { + "messageId": "unexpectedRegExp", + "suggestions": [ + { + "messageId": "replaceWithLiteral", + "output": "/\\D/" + } + ] + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### prefer-regex-literals > invalid + +```js +globalThis.RegExp('\\\\\\D', '') +``` + +```json +{ + "languageOptions": { + "globals": { + "globalThis": "readonly" + } + }, + "errors": [ + { + "messageId": "unexpectedRegExp", + "suggestions": [ + { + "messageId": "replaceWithLiteral", + "output": "/\\\\\\D/" + } + ] + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### prefer-regex-literals > invalid + +```js +new globalThis.RegExp('\\0\\0', ''); +``` + +```json +{ + "languageOptions": { + "globals": { + "globalThis": "writable" + } + }, + "errors": [ + { + "messageId": "unexpectedRegExp", + "suggestions": [ + { + "messageId": "replaceWithLiteral", + "output": "/\\0\\0/;" + } + ] + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### prefer-regex-literals > invalid + +```js +new window['RegExp']('\\x56\\x78\\x45', ''); +``` + +```json +{ + "languageOptions": { + "globals": { + "window": "readonly" + } + }, + "errors": [ + { + "messageId": "unexpectedRegExp", + "suggestions": [ + { + "messageId": "replaceWithLiteral", + "output": "/\\x56\\x78\\x45/;" + } + ] + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +### `radix` + +Pass: 33 / 54 (61.1%) +Fail: 21 / 54 (38.9%) + +#### radix > valid + +```js +Number.parseInt(foo); +``` + +```json +{ + "languageOptions": { + "globals": { + "Number": "off" + } + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/radix', + message: 'Missing radix parameter.', + messageId: 'missingRadix', + severity: 1, + nodeType: 'Identifier', + line: 1, + column: 0, + endLine: 1, + endColumn: 20, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### radix > invalid + +```js +parseInt(); +``` + +```json +{ + "errors": [ + { + "messageId": "missingParameters" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### radix > invalid + +```js +parseInt("10"); +``` + +```json +{ + "errors": [ + { + "messageId": "missingRadix", + "suggestions": [ + { + "messageId": "addRadixParameter10", + "output": "parseInt(\"10\", 10);" + } + ] + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### radix > invalid + +```js +parseInt("10",); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2017 + }, + "errors": [ + { + "messageId": "missingRadix", + "suggestions": [ + { + "messageId": "addRadixParameter10", + "output": "parseInt(\"10\", 10,);" + } + ] + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### radix > invalid + +```js +parseInt((0, "10")); +``` + +```json +{ + "errors": [ + { + "messageId": "missingRadix", + "suggestions": [ + { + "messageId": "addRadixParameter10", + "output": "parseInt((0, \"10\"), 10);" + } + ] + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### radix > invalid + +```js +parseInt((0, "10"),); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2017 + }, + "errors": [ + { + "messageId": "missingRadix", + "suggestions": [ + { + "messageId": "addRadixParameter10", + "output": "parseInt((0, \"10\"), 10,);" + } + ] + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### radix > invalid + +```js +parseInt("10", null); +``` + +```json +{ + "errors": [ + { + "messageId": "invalidRadix" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### radix > invalid + +```js +parseInt("10", undefined); +``` + +```json +{ + "errors": [ + { + "messageId": "invalidRadix" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### radix > invalid + +```js +parseInt("10", true); +``` + +```json +{ + "errors": [ + { + "messageId": "invalidRadix" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### radix > invalid + +```js +parseInt("10", "foo"); +``` + +```json +{ + "errors": [ + { + "messageId": "invalidRadix" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### radix > invalid + +```js +parseInt("10", "123"); +``` + +```json +{ + "errors": [ + { + "messageId": "invalidRadix" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### radix > invalid + +```js +parseInt("10", 1); +``` + +```json +{ + "errors": [ + { + "messageId": "invalidRadix" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### radix > invalid + +```js +parseInt("10", 37); +``` + +```json +{ + "errors": [ + { + "messageId": "invalidRadix" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### radix > invalid + +```js +parseInt("10", 10.5); +``` + +```json +{ + "errors": [ + { + "messageId": "invalidRadix" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### radix > invalid + +```js +parseInt?.("10"); +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2020 + }, + "errors": [ + { + "messageId": "missingRadix", + "suggestions": [ + { + "messageId": "addRadixParameter10", + "output": "parseInt?.(\"10\", 10);" + } + ] + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### radix > invalid + +```js +parseInt(); +``` + +```json +{ + "options": [ + "always" + ], + "errors": [ + { + "messageId": "missingParameters" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### radix > invalid + +```js +parseInt(); +``` + +```json +{ + "options": [ + "as-needed" + ], + "errors": [ + { + "messageId": "missingParameters" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### radix > invalid + +```js +parseInt("10"); +``` + +```json +{ + "options": [ + "always" + ], + "errors": [ + { + "messageId": "missingRadix", + "suggestions": [ + { + "messageId": "addRadixParameter10", + "output": "parseInt(\"10\", 10);" + } + ] + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### radix > invalid + +```js +parseInt("10"); +``` + +```json +{ + "options": [ + "as-needed" + ], + "errors": [ + { + "messageId": "missingRadix", + "suggestions": [ + { + "messageId": "addRadixParameter10", + "output": "parseInt(\"10\", 10);" + } + ] + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### radix > invalid + +```js +parseInt("10", 1); +``` + +```json +{ + "options": [ + "always" + ], + "errors": [ + { + "messageId": "invalidRadix" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### radix > invalid + +```js +parseInt("10", 1); +``` + +```json +{ + "options": [ + "as-needed" + ], + "errors": [ + { + "messageId": "invalidRadix" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +### `require-atomic-updates` + +Pass: 0 / 63 (0.0%) +Fail: 63 / 63 (100.0%) + +#### require-atomic-updates > valid + +```js +let foo; async function x() { foo += bar; } +``` + +```json +{} +``` + +TypeError: Cannot destructure property 'referenceMap' of 'stack' as it is null. + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/require-atomic-updates.js:266:13) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkVariableDeclarator (apps/oxlint/dist/lint.js) + + +#### require-atomic-updates > valid + +```js +let foo; async function x() { foo = foo + bar; } +``` + +```json +{} +``` + +TypeError: Cannot destructure property 'referenceMap' of 'stack' as it is null. + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/require-atomic-updates.js:266:13) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkVariableDeclarator (apps/oxlint/dist/lint.js) + + +#### require-atomic-updates > valid + +```js +let foo; async function x() { foo = await bar + foo; } +``` + +```json +{} +``` + +TypeError: Cannot destructure property 'referenceMap' of 'stack' as it is null. + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/require-atomic-updates.js:266:13) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkVariableDeclarator (apps/oxlint/dist/lint.js) + + +#### require-atomic-updates > valid + +```js +async function x() { let foo; foo += await bar; } +``` + +```json +{} +``` + +TypeError: Cannot destructure property 'referenceMap' of 'stack' as it is null. + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/require-atomic-updates.js:266:13) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkFunctionDeclaration (apps/oxlint/dist/lint.js) + + +#### require-atomic-updates > valid + +```js +let foo; async function x() { foo = (await result)(foo); } +``` + +```json +{} +``` + +TypeError: Cannot destructure property 'referenceMap' of 'stack' as it is null. + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/require-atomic-updates.js:266:13) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkVariableDeclarator (apps/oxlint/dist/lint.js) + + +#### require-atomic-updates > valid + +```js +let foo; async function x() { foo = bar(await something, foo) } +``` + +```json +{} +``` + +TypeError: Cannot destructure property 'referenceMap' of 'stack' as it is null. + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/require-atomic-updates.js:266:13) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkVariableDeclarator (apps/oxlint/dist/lint.js) + + +#### require-atomic-updates > valid + +```js +function* x() { let foo; foo += yield bar; } +``` + +```json +{} +``` + +TypeError: Cannot destructure property 'referenceMap' of 'stack' as it is null. + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/require-atomic-updates.js:266:13) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkFunctionDeclaration (apps/oxlint/dist/lint.js) + + +#### require-atomic-updates > valid + +```js +const foo = {}; async function x() { foo.bar = await baz; } +``` + +```json +{} +``` + +TypeError: Cannot destructure property 'referenceMap' of 'stack' as it is null. + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/require-atomic-updates.js:266:13) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkVariableDeclarator (apps/oxlint/dist/lint.js) + + +#### require-atomic-updates > valid + +```js +const foo = []; async function x() { foo[x] += 1; } +``` + +```json +{} +``` + +TypeError: Cannot destructure property 'referenceMap' of 'stack' as it is null. + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/require-atomic-updates.js:266:13) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkVariableDeclarator (apps/oxlint/dist/lint.js) + + +#### require-atomic-updates > valid + +```js +let foo; function* x() { foo = bar + foo; } +``` + +```json +{} +``` + +TypeError: Cannot destructure property 'referenceMap' of 'stack' as it is null. + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/require-atomic-updates.js:266:13) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkVariableDeclarator (apps/oxlint/dist/lint.js) + + +#### require-atomic-updates > valid + +```js +async function x() { let foo; bar(() => baz += 1); foo += await amount; } +``` + +```json +{} +``` + +TypeError: Cannot destructure property 'referenceMap' of 'stack' as it is null. + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/require-atomic-updates.js:266:13) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkFunctionDeclaration (apps/oxlint/dist/lint.js) + + +#### require-atomic-updates > valid + +```js +let foo; async function x() { foo = condition ? foo : await bar; } +``` + +```json +{} +``` + +TypeError: Cannot destructure property 'referenceMap' of 'stack' as it is null. + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/require-atomic-updates.js:266:13) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkVariableDeclarator (apps/oxlint/dist/lint.js) + + +#### require-atomic-updates > valid + +```js +async function x() { let foo; bar(() => { let foo; blah(foo); }); foo += await result; } +``` + +```json +{} +``` + +TypeError: Cannot destructure property 'referenceMap' of 'stack' as it is null. + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/require-atomic-updates.js:266:13) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkFunctionDeclaration (apps/oxlint/dist/lint.js) + + +#### require-atomic-updates > valid + +```js +let foo; async function x() { foo = foo + 1; await bar; } +``` + +```json +{} +``` + +TypeError: Cannot destructure property 'referenceMap' of 'stack' as it is null. + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/require-atomic-updates.js:266:13) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkVariableDeclarator (apps/oxlint/dist/lint.js) + + +#### require-atomic-updates > valid + +```js +async function x() { foo += await bar; } +``` + +```json +{} +``` + +TypeError: Cannot destructure property 'referenceMap' of 'stack' as it is null. + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/require-atomic-updates.js:266:13) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkFunctionDeclaration (apps/oxlint/dist/lint.js) + + +#### require-atomic-updates > valid + +```js + + async function foo() { + if (1); + if (2); + if (3); + if (4); + if (5); + if (6); + if (7); + if (8); + if (9); + if (10); + if (11); + if (12); + if (13); + if (14); + if (15); + if (16); + if (17); + if (18); + if (19); + if (20); + } + +``` + +```json +{} +``` + +TypeError: Cannot destructure property 'referenceMap' of 'stack' as it is null. + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/require-atomic-updates.js:266:13) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkFunctionDeclaration (apps/oxlint/dist/lint.js) + + +#### require-atomic-updates > valid + +```js + + async function foo() { + return [ + 1 ? a : b, + 2 ? a : b, + 3 ? a : b, + 4 ? a : b, + 5 ? a : b, + 6 ? a : b, + 7 ? a : b, + 8 ? a : b, + 9 ? a : b, + 10 ? a : b, + 11 ? a : b, + 12 ? a : b, + 13 ? a : b, + 14 ? a : b, + 15 ? a : b, + 16 ? a : b, + 17 ? a : b, + 18 ? a : b, + 19 ? a : b, + 20 ? a : b + ]; + } + +``` + +```json +{} +``` + +TypeError: Cannot destructure property 'referenceMap' of 'stack' as it is null. + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/require-atomic-updates.js:266:13) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkFunctionDeclaration (apps/oxlint/dist/lint.js) + + +#### require-atomic-updates > valid + +```js + + async function f() { + let records + records = await a.records + g(() => { records }) + } + +``` + +```json +{} +``` + +TypeError: Cannot destructure property 'referenceMap' of 'stack' as it is null. + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/require-atomic-updates.js:266:13) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkFunctionDeclaration (apps/oxlint/dist/lint.js) + + +#### require-atomic-updates > valid + +```js + + async function f() { + try { + this.foo = doSomething(); + } catch (e) { + this.foo = null; + await doElse(); + } + } + +``` + +```json +{} +``` + +TypeError: Cannot destructure property 'referenceMap' of 'stack' as it is null. + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/require-atomic-updates.js:266:13) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkFunctionDeclaration (apps/oxlint/dist/lint.js) + + +#### require-atomic-updates > valid + +```js + + async function f(foo) { + let bar = await get(foo.id); + bar.prop = foo.prop; + } + +``` + +```json +{} +``` + +TypeError: Cannot destructure property 'referenceMap' of 'stack' as it is null. + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/require-atomic-updates.js:266:13) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkFunctionDeclaration (apps/oxlint/dist/lint.js) + + +#### require-atomic-updates > valid + +```js + + async function f(foo) { + let bar = await get(foo.id); + foo = bar.prop; + } + +``` + +```json +{} +``` + +TypeError: Cannot destructure property 'referenceMap' of 'stack' as it is null. + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/require-atomic-updates.js:266:13) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkFunctionDeclaration (apps/oxlint/dist/lint.js) + + +#### require-atomic-updates > valid + +```js + + async function f() { + let foo = {} + let bar = await get(foo.id); + foo.prop = bar.prop; + } + +``` + +```json +{} +``` + +TypeError: Cannot destructure property 'referenceMap' of 'stack' as it is null. + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/require-atomic-updates.js:266:13) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkFunctionDeclaration (apps/oxlint/dist/lint.js) + + +#### require-atomic-updates > valid + +```js + + let count = 0 + let queue = [] + async function A(...args) { + count += 1 + await new Promise(resolve=>resolve()) + count -= 1 + return + } + +``` + +```json +{} +``` + +TypeError: Cannot destructure property 'referenceMap' of 'stack' as it is null. + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/require-atomic-updates.js:266:13) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkVariableDeclarator (apps/oxlint/dist/lint.js) + + +#### require-atomic-updates > valid + +```js + + async function foo(e) { + } + + async function run() { + const input = []; + const props = []; + + for(const entry of input) { + const prop = props.find(a => a.id === entry.id) || null; + await foo(entry); + } + + for(const entry of input) { + const prop = props.find(a => a.id === entry.id) || null; + } + + for(const entry2 of input) { + const prop = props.find(a => a.id === entry2.id) || null; + } + } + +``` + +```json +{} +``` + +TypeError: Cannot destructure property 'referenceMap' of 'stack' as it is null. + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/require-atomic-updates.js:266:13) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkFunctionDeclaration (apps/oxlint/dist/lint.js) + + +#### require-atomic-updates > valid + +```js + + async function run() { + { + let entry; + await entry; + } + { + let entry; + () => entry; + + entry = 1; + } + } + +``` + +```json +{} +``` + +TypeError: Cannot destructure property 'referenceMap' of 'stack' as it is null. + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/require-atomic-updates.js:266:13) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkFunctionDeclaration (apps/oxlint/dist/lint.js) + + +#### require-atomic-updates > valid + +```js + + async function run() { + await a; + b = 1; + } + +``` + +```json +{} +``` + +TypeError: Cannot destructure property 'referenceMap' of 'stack' as it is null. + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/require-atomic-updates.js:266:13) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkFunctionDeclaration (apps/oxlint/dist/lint.js) + + +#### require-atomic-updates > valid + +```js + + async function a(foo) { + if (foo.bar) { + foo.bar = await something; + } + } + +``` + +```json +{ + "options": [ + { + "allowProperties": true + } + ] +} +``` + +TypeError: Cannot destructure property 'referenceMap' of 'stack' as it is null. + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/require-atomic-updates.js:266:13) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkFunctionDeclaration (apps/oxlint/dist/lint.js) + + +#### require-atomic-updates > valid + +```js + + function* g(foo) { + baz = foo.bar; + yield something; + foo.bar = 1; + } + +``` + +```json +{ + "options": [ + { + "allowProperties": true + } + ] +} +``` + +TypeError: Cannot destructure property 'referenceMap' of 'stack' as it is null. + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/require-atomic-updates.js:266:13) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkFunctionDeclaration (apps/oxlint/dist/lint.js) + + +#### require-atomic-updates > invalid + +```js +let foo; async function x() { foo += await amount; } +``` + +```json +{ + "errors": [ + { + "messageId": "nonAtomicUpdate", + "data": { + "value": "foo" + } + } + ] +} +``` + +TypeError: Cannot destructure property 'referenceMap' of 'stack' as it is null. + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/require-atomic-updates.js:266:13) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkVariableDeclarator (apps/oxlint/dist/lint.js) + + +#### require-atomic-updates > invalid + +```js +if (1); let foo; async function x() { foo += await amount; } +``` + +```json +{ + "errors": [ + { + "messageId": "nonAtomicUpdate", + "data": { + "value": "foo" + } + } + ] +} +``` + +TypeError: Cannot destructure property 'referenceMap' of 'stack' as it is null. + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/require-atomic-updates.js:266:13) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkVariableDeclarator (apps/oxlint/dist/lint.js) + + +#### require-atomic-updates > invalid + +```js +let foo; async function x() { while (condition) { foo += await amount; } } +``` + +```json +{ + "errors": [ + { + "messageId": "nonAtomicUpdate", + "data": { + "value": "foo" + } + } + ] +} +``` + +TypeError: Cannot destructure property 'referenceMap' of 'stack' as it is null. + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/require-atomic-updates.js:266:13) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkVariableDeclarator (apps/oxlint/dist/lint.js) + + +#### require-atomic-updates > invalid + +```js +let foo; async function x() { foo = foo + await amount; } +``` + +```json +{ + "errors": [ + { + "messageId": "nonAtomicUpdate", + "data": { + "value": "foo" + } + } + ] +} +``` + +TypeError: Cannot destructure property 'referenceMap' of 'stack' as it is null. + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/require-atomic-updates.js:266:13) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkVariableDeclarator (apps/oxlint/dist/lint.js) + + +#### require-atomic-updates > invalid + +```js +let foo; async function x() { foo = foo + (bar ? baz : await amount); } +``` + +```json +{ + "errors": [ + { + "messageId": "nonAtomicUpdate", + "data": { + "value": "foo" + } + } + ] +} +``` + +TypeError: Cannot destructure property 'referenceMap' of 'stack' as it is null. + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/require-atomic-updates.js:266:13) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkVariableDeclarator (apps/oxlint/dist/lint.js) + + +#### require-atomic-updates > invalid + +```js +let foo; async function x() { foo = foo + (bar ? await amount : baz); } +``` + +```json +{ + "errors": [ + { + "messageId": "nonAtomicUpdate", + "data": { + "value": "foo" + } + } + ] +} +``` + +TypeError: Cannot destructure property 'referenceMap' of 'stack' as it is null. + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/require-atomic-updates.js:266:13) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkVariableDeclarator (apps/oxlint/dist/lint.js) + + +#### require-atomic-updates > invalid + +```js +let foo; async function x() { foo = condition ? foo + await amount : somethingElse; } +``` + +```json +{ + "errors": [ + { + "messageId": "nonAtomicUpdate", + "data": { + "value": "foo" + } + } + ] +} +``` + +TypeError: Cannot destructure property 'referenceMap' of 'stack' as it is null. + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/require-atomic-updates.js:266:13) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkVariableDeclarator (apps/oxlint/dist/lint.js) + + +#### require-atomic-updates > invalid + +```js +let foo; async function x() { foo = (condition ? foo : await bar) + await bar; } +``` + +```json +{ + "errors": [ + { + "messageId": "nonAtomicUpdate", + "data": { + "value": "foo" + } + } + ] +} +``` + +TypeError: Cannot destructure property 'referenceMap' of 'stack' as it is null. + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/require-atomic-updates.js:266:13) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkVariableDeclarator (apps/oxlint/dist/lint.js) + + +#### require-atomic-updates > invalid + +```js +let foo; async function x() { foo += bar + await amount; } +``` + +```json +{ + "errors": [ + { + "messageId": "nonAtomicUpdate", + "data": { + "value": "foo" + } + } + ] +} +``` + +TypeError: Cannot destructure property 'referenceMap' of 'stack' as it is null. + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/require-atomic-updates.js:266:13) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkVariableDeclarator (apps/oxlint/dist/lint.js) + + +#### require-atomic-updates > invalid + +```js +async function x() { let foo; bar(() => foo); foo += await amount; } +``` + +```json +{ + "errors": [ + { + "messageId": "nonAtomicUpdate", + "data": { + "value": "foo" + } + } + ] +} +``` + +TypeError: Cannot destructure property 'referenceMap' of 'stack' as it is null. + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/require-atomic-updates.js:266:13) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkFunctionDeclaration (apps/oxlint/dist/lint.js) + + +#### require-atomic-updates > invalid + +```js +let foo; function* x() { foo += yield baz } +``` + +```json +{ + "errors": [ + { + "messageId": "nonAtomicUpdate", + "data": { + "value": "foo" + } + } + ] +} +``` + +TypeError: Cannot destructure property 'referenceMap' of 'stack' as it is null. + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/require-atomic-updates.js:266:13) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkVariableDeclarator (apps/oxlint/dist/lint.js) + + +#### require-atomic-updates > invalid + +```js +let foo; async function x() { foo = bar(foo, await something) } +``` + +```json +{ + "errors": [ + { + "messageId": "nonAtomicUpdate", + "data": { + "value": "foo" + } + } + ] +} +``` + +TypeError: Cannot destructure property 'referenceMap' of 'stack' as it is null. + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/require-atomic-updates.js:266:13) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkVariableDeclarator (apps/oxlint/dist/lint.js) + + +#### require-atomic-updates > invalid + +```js +const foo = {}; async function x() { foo.bar += await baz } +``` + +```json +{ + "errors": [ + { + "messageId": "nonAtomicObjectUpdate", + "data": { + "value": "foo.bar", + "object": "foo" + } + } + ] +} +``` + +TypeError: Cannot destructure property 'referenceMap' of 'stack' as it is null. + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/require-atomic-updates.js:266:13) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkVariableDeclarator (apps/oxlint/dist/lint.js) + + +#### require-atomic-updates > invalid + +```js +const foo = []; async function x() { foo[bar].baz += await result; } +``` + +```json +{ + "errors": [ + { + "messageId": "nonAtomicObjectUpdate", + "data": { + "value": "foo[bar].baz", + "object": "foo" + } + } + ] +} +``` + +TypeError: Cannot destructure property 'referenceMap' of 'stack' as it is null. + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/require-atomic-updates.js:266:13) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkVariableDeclarator (apps/oxlint/dist/lint.js) + + +#### require-atomic-updates > invalid + +```js +const foo = {}; class C { #bar; async wrap() { foo.#bar += await baz } } +``` + +```json +{ + "errors": [ + { + "messageId": "nonAtomicObjectUpdate", + "data": { + "value": "foo.#bar", + "object": "foo" + } + } + ] +} +``` + +TypeError: Cannot destructure property 'referenceMap' of 'stack' as it is null. + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/require-atomic-updates.js:266:13) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkVariableDeclarator (apps/oxlint/dist/lint.js) + + +#### require-atomic-updates > invalid + +```js +let foo; async function* x() { foo = (yield foo) + await bar; } +``` + +```json +{ + "errors": [ + { + "messageId": "nonAtomicUpdate", + "data": { + "value": "foo" + } + } + ] +} +``` + +TypeError: Cannot destructure property 'referenceMap' of 'stack' as it is null. + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/require-atomic-updates.js:266:13) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkVariableDeclarator (apps/oxlint/dist/lint.js) + + +#### require-atomic-updates > invalid + +```js +let foo; async function x() { foo = foo + await result(foo); } +``` + +```json +{ + "errors": [ + { + "messageId": "nonAtomicUpdate", + "data": { + "value": "foo" + } + } + ] +} +``` + +TypeError: Cannot destructure property 'referenceMap' of 'stack' as it is null. + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/require-atomic-updates.js:266:13) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkVariableDeclarator (apps/oxlint/dist/lint.js) + + +#### require-atomic-updates > invalid + +```js +let foo; async function x() { foo = await result(foo, await somethingElse); } +``` + +```json +{ + "errors": [ + { + "messageId": "nonAtomicUpdate", + "data": { + "value": "foo" + } + } + ] +} +``` + +TypeError: Cannot destructure property 'referenceMap' of 'stack' as it is null. + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/require-atomic-updates.js:266:13) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkVariableDeclarator (apps/oxlint/dist/lint.js) + + +#### require-atomic-updates > invalid + +```js +function* x() { let foo; yield async function y() { foo += await bar; } } +``` + +```json +{ + "errors": [ + { + "messageId": "nonAtomicUpdate", + "data": { + "value": "foo" + } + } + ] +} +``` + +TypeError: Cannot destructure property 'referenceMap' of 'stack' as it is null. + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/require-atomic-updates.js:266:13) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkFunctionDeclaration (apps/oxlint/dist/lint.js) + + +#### require-atomic-updates > invalid + +```js +let foo; async function* x() { foo = await foo + (yield bar); } +``` + +```json +{ + "errors": [ + { + "messageId": "nonAtomicUpdate", + "data": { + "value": "foo" + } + } + ] +} +``` + +TypeError: Cannot destructure property 'referenceMap' of 'stack' as it is null. + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/require-atomic-updates.js:266:13) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkVariableDeclarator (apps/oxlint/dist/lint.js) + + +#### require-atomic-updates > invalid + +```js +let foo; async function x() { foo = bar + await foo; } +``` + +```json +{ + "errors": [ + { + "messageId": "nonAtomicUpdate", + "data": { + "value": "foo" + } + } + ] +} +``` + +TypeError: Cannot destructure property 'referenceMap' of 'stack' as it is null. + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/require-atomic-updates.js:266:13) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkVariableDeclarator (apps/oxlint/dist/lint.js) + + +#### require-atomic-updates > invalid + +```js +let foo = {}; async function x() { foo[bar].baz = await (foo.bar += await foo[bar].baz) } +``` + +```json +{ + "errors": [ + { + "messageId": "nonAtomicObjectUpdate", + "data": { + "value": "foo[bar].baz", + "object": "foo" + } + }, + { + "messageId": "nonAtomicObjectUpdate", + "data": { + "value": "foo.bar", + "object": "foo" + } + } + ] +} +``` + +TypeError: Cannot destructure property 'referenceMap' of 'stack' as it is null. + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/require-atomic-updates.js:266:13) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkVariableDeclarator (apps/oxlint/dist/lint.js) + + +#### require-atomic-updates > invalid + +```js +let foo = ''; async function x() { foo += await bar; } +``` + +```json +{ + "errors": [ + { + "messageId": "nonAtomicUpdate", + "data": { + "value": "foo" + } + } + ] +} +``` + +TypeError: Cannot destructure property 'referenceMap' of 'stack' as it is null. + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/require-atomic-updates.js:266:13) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkVariableDeclarator (apps/oxlint/dist/lint.js) + + +#### require-atomic-updates > invalid + +```js +let foo = 0; async function x() { foo = (a ? b : foo) + await bar; if (baz); } +``` + +```json +{ + "errors": [ + { + "messageId": "nonAtomicUpdate", + "data": { + "value": "foo" + } + } + ] +} +``` + +TypeError: Cannot destructure property 'referenceMap' of 'stack' as it is null. + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/require-atomic-updates.js:266:13) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkVariableDeclarator (apps/oxlint/dist/lint.js) + + +#### require-atomic-updates > invalid + +```js +let foo = 0; async function x() { foo = (a ? b ? c ? d ? foo : e : f : g : h) + await bar; if (baz); } +``` + +```json +{ + "errors": [ + { + "messageId": "nonAtomicUpdate", + "data": { + "value": "foo" + } + } + ] +} +``` + +TypeError: Cannot destructure property 'referenceMap' of 'stack' as it is null. + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/require-atomic-updates.js:266:13) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkVariableDeclarator (apps/oxlint/dist/lint.js) + + +#### require-atomic-updates > invalid + +```js + + async function f(foo) { + let buz = await get(foo.id); + foo.bar = buz.bar; + } + +``` + +```json +{ + "errors": [ + { + "messageId": "nonAtomicObjectUpdate", + "data": { + "value": "foo.bar", + "object": "foo" + } + } + ] +} +``` + +TypeError: Cannot destructure property 'referenceMap' of 'stack' as it is null. + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/require-atomic-updates.js:266:13) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkFunctionDeclaration (apps/oxlint/dist/lint.js) + + +#### require-atomic-updates > invalid + +```js + + async () => { + opts.spec = process.stdin; + try { + const { exit_code } = await run(opts); + process.exitCode = exit_code; + } catch (e) { + process.exitCode = 1; + } + }; + +``` + +```json +{ + "languageOptions": { + "sourceType": "commonjs", + "globals": { + "process": "readonly" + } + }, + "errors": [ + { + "messageId": "nonAtomicObjectUpdate", + "data": { + "value": "process.exitCode", + "object": "process" + }, + "line": 6 + }, + { + "messageId": "nonAtomicObjectUpdate", + "data": { + "value": "process.exitCode", + "object": "process" + }, + "line": 8 + } + ] +} +``` + +TypeError: Cannot destructure property 'referenceMap' of 'stack' as it is null. + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/require-atomic-updates.js:266:13) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkMemberExpression (apps/oxlint/dist/lint.js) + + +#### require-atomic-updates > invalid + +```js + + async function a(foo) { + if (foo.bar) { + foo.bar = await something; + } + } + +``` + +```json +{ + "errors": [ + { + "messageId": "nonAtomicObjectUpdate", + "data": { + "value": "foo.bar", + "object": "foo" + } + } + ] +} +``` + +TypeError: Cannot destructure property 'referenceMap' of 'stack' as it is null. + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/require-atomic-updates.js:266:13) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkFunctionDeclaration (apps/oxlint/dist/lint.js) + + +#### require-atomic-updates > invalid + +```js + + function* g(foo) { + baz = foo.bar; + yield something; + foo.bar = 1; + } + +``` + +```json +{ + "errors": [ + { + "messageId": "nonAtomicObjectUpdate", + "data": { + "value": "foo.bar", + "object": "foo" + } + } + ] +} +``` + +TypeError: Cannot destructure property 'referenceMap' of 'stack' as it is null. + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/require-atomic-updates.js:266:13) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkFunctionDeclaration (apps/oxlint/dist/lint.js) + + +#### require-atomic-updates > invalid + +```js + + async function a(foo) { + if (foo.bar) { + foo.bar = await something; + } + } + +``` + +```json +{ + "options": [ + {} + ], + "errors": [ + { + "messageId": "nonAtomicObjectUpdate", + "data": { + "value": "foo.bar", + "object": "foo" + } + } + ] +} +``` + +TypeError: Cannot destructure property 'referenceMap' of 'stack' as it is null. + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/require-atomic-updates.js:266:13) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkFunctionDeclaration (apps/oxlint/dist/lint.js) + + +#### require-atomic-updates > invalid + +```js + + function* g(foo) { + baz = foo.bar; + yield something; + foo.bar = 1; + } + +``` + +```json +{ + "options": [ + {} + ], + "errors": [ + { + "messageId": "nonAtomicObjectUpdate", + "data": { + "value": "foo.bar", + "object": "foo" + } + } + ] +} +``` + +TypeError: Cannot destructure property 'referenceMap' of 'stack' as it is null. + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/require-atomic-updates.js:266:13) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkFunctionDeclaration (apps/oxlint/dist/lint.js) + + +#### require-atomic-updates > invalid + +```js + + async function a(foo) { + if (foo.bar) { + foo.bar = await something; + } + } + +``` + +```json +{ + "options": [ + { + "allowProperties": false + } + ], + "errors": [ + { + "messageId": "nonAtomicObjectUpdate", + "data": { + "value": "foo.bar", + "object": "foo" + } + } + ] +} +``` + +TypeError: Cannot destructure property 'referenceMap' of 'stack' as it is null. + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/require-atomic-updates.js:266:13) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkFunctionDeclaration (apps/oxlint/dist/lint.js) + + +#### require-atomic-updates > invalid + +```js + + function* g(foo) { + baz = foo.bar; + yield something; + foo.bar = 1; + } + +``` + +```json +{ + "options": [ + { + "allowProperties": false + } + ], + "errors": [ + { + "messageId": "nonAtomicObjectUpdate", + "data": { + "value": "foo.bar", + "object": "foo" + } + } + ] +} +``` + +TypeError: Cannot destructure property 'referenceMap' of 'stack' as it is null. + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/require-atomic-updates.js:266:13) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkFunctionDeclaration (apps/oxlint/dist/lint.js) + + +#### require-atomic-updates > invalid + +```js + + let foo; + async function a() { + if (foo) { + foo = await something; + } + } + +``` + +```json +{ + "options": [ + { + "allowProperties": true + } + ], + "errors": [ + { + "messageId": "nonAtomicUpdate", + "data": { + "value": "foo" + } + } + ] +} +``` + +TypeError: Cannot destructure property 'referenceMap' of 'stack' as it is null. + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/require-atomic-updates.js:266:13) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkVariableDeclarator (apps/oxlint/dist/lint.js) + + +#### require-atomic-updates > invalid + +```js + + let foo; + function* g() { + baz = foo; + yield something; + foo = 1; + } + +``` + +```json +{ + "options": [ + { + "allowProperties": true + } + ], + "errors": [ + { + "messageId": "nonAtomicUpdate", + "data": { + "value": "foo" + } + } + ] +} +``` + +TypeError: Cannot destructure property 'referenceMap' of 'stack' as it is null. + at Identifier (apps/oxlint/conformance/submodules/eslint/lib/rules/require-atomic-updates.js:266:13) + at walkIdentifier (apps/oxlint/dist/lint.js) + at walkNode (apps/oxlint/dist/lint.js) + at walkVariableDeclarator (apps/oxlint/dist/lint.js) + + +### `require-unicode-regexp` + +Pass: 76 / 79 (96.2%) +Fail: 3 / 79 (3.8%) + +#### require-unicode-regexp > invalid + +```js +new window.RegExp('foo') +``` + +```json +{ + "languageOptions": { + "globals": { + "AbortController": false, + "AbortSignal": false, + "AbsoluteOrientationSensor": false, + "AbstractRange": false, + "Accelerometer": false, + "addEventListener": false, + "ai": false, + "AI": false, + "AICreateMonitor": false, + "AITextSession": false, + "alert": false, + "AnalyserNode": false, + "Animation": false, + "AnimationEffect": false, + "AnimationEvent": false, + "AnimationPlaybackEvent": false, + "AnimationTimeline": false, + "AsyncDisposableStack": false, + "atob": false, + "Attr": false, + "Audio": false, + "AudioBuffer": false, + "AudioBufferSourceNode": false, + "AudioContext": false, + "AudioData": false, + "AudioDecoder": false, + "AudioDestinationNode": false, + "AudioEncoder": false, + "AudioListener": false, + "AudioNode": false, + "AudioParam": false, + "AudioParamMap": false, + "AudioProcessingEvent": false, + "AudioScheduledSourceNode": false, + "AudioSinkInfo": false, + "AudioWorklet": false, + "AudioWorkletGlobalScope": false, + "AudioWorkletNode": false, + "AudioWorkletProcessor": false, + "AuthenticatorAssertionResponse": false, + "AuthenticatorAttestationResponse": false, + "AuthenticatorResponse": false, + "BackgroundFetchManager": false, + "BackgroundFetchRecord": false, + "BackgroundFetchRegistration": false, + "BarcodeDetector": false, + "BarProp": false, + "BaseAudioContext": false, + "BatteryManager": false, + "BeforeUnloadEvent": false, + "BiquadFilterNode": false, + "Blob": false, + "BlobEvent": false, + "Bluetooth": false, + "BluetoothCharacteristicProperties": false, + "BluetoothDevice": false, + "BluetoothRemoteGATTCharacteristic": false, + "BluetoothRemoteGATTDescriptor": false, + "BluetoothRemoteGATTServer": false, + "BluetoothRemoteGATTService": false, + "BluetoothUUID": false, + "blur": false, + "BroadcastChannel": false, + "BrowserCaptureMediaStreamTrack": false, + "btoa": false, + "ByteLengthQueuingStrategy": false, + "Cache": false, + "caches": false, + "CacheStorage": false, + "cancelAnimationFrame": false, + "cancelIdleCallback": false, + "CanvasCaptureMediaStream": false, + "CanvasCaptureMediaStreamTrack": false, + "CanvasGradient": false, + "CanvasPattern": false, + "CanvasRenderingContext2D": false, + "CaptureController": false, + "CaretPosition": false, + "CDATASection": false, + "ChannelMergerNode": false, + "ChannelSplitterNode": false, + "ChapterInformation": false, + "CharacterBoundsUpdateEvent": false, + "CharacterData": false, + "clearInterval": false, + "clearTimeout": false, + "clientInformation": false, + "Clipboard": false, + "ClipboardChangeEvent": false, + "ClipboardEvent": false, + "ClipboardItem": false, + "close": false, + "closed": false, + "CloseEvent": false, + "CloseWatcher": false, + "CommandEvent": false, + "Comment": false, + "CompositionEvent": false, + "CompressionStream": false, + "confirm": false, + "console": false, + "ConstantSourceNode": false, + "ContentVisibilityAutoStateChangeEvent": false, + "ConvolverNode": false, + "CookieChangeEvent": false, + "CookieDeprecationLabel": false, + "cookieStore": false, + "CookieStore": false, + "CookieStoreManager": false, + "CountQueuingStrategy": false, + "createImageBitmap": false, + "CreateMonitor": false, + "Credential": false, + "credentialless": false, + "CredentialsContainer": false, + "CropTarget": false, + "crossOriginIsolated": false, + "crypto": false, + "Crypto": false, + "CryptoKey": false, + "CSPViolationReportBody": false, + "CSS": false, + "CSSAnimation": false, + "CSSConditionRule": false, + "CSSContainerRule": false, + "CSSCounterStyleRule": false, + "CSSFontFaceRule": false, + "CSSFontFeatureValuesRule": false, + "CSSFontPaletteValuesRule": false, + "CSSFunctionDeclarations": false, + "CSSFunctionDescriptors": false, + "CSSFunctionRule": false, + "CSSGroupingRule": false, + "CSSImageValue": false, + "CSSImportRule": false, + "CSSKeyframeRule": false, + "CSSKeyframesRule": false, + "CSSKeywordValue": false, + "CSSLayerBlockRule": false, + "CSSLayerStatementRule": false, + "CSSMarginRule": false, + "CSSMathClamp": false, + "CSSMathInvert": false, + "CSSMathMax": false, + "CSSMathMin": false, + "CSSMathNegate": false, + "CSSMathProduct": false, + "CSSMathSum": false, + "CSSMathValue": false, + "CSSMatrixComponent": false, + "CSSMediaRule": false, + "CSSNamespaceRule": false, + "CSSNestedDeclarations": false, + "CSSNumericArray": false, + "CSSNumericValue": false, + "CSSPageDescriptors": false, + "CSSPageRule": false, + "CSSPerspective": false, + "CSSPositionTryDescriptors": false, + "CSSPositionTryRule": false, + "CSSPositionValue": false, + "CSSPropertyRule": false, + "CSSRotate": false, + "CSSRule": false, + "CSSRuleList": false, + "CSSScale": false, + "CSSScopeRule": false, + "CSSSkew": false, + "CSSSkewX": false, + "CSSSkewY": false, + "CSSStartingStyleRule": false, + "CSSStyleDeclaration": false, + "CSSStyleRule": false, + "CSSStyleSheet": false, + "CSSStyleValue": false, + "CSSSupportsRule": false, + "CSSTransformComponent": false, + "CSSTransformValue": false, + "CSSTransition": false, + "CSSTranslate": false, + "CSSUnitValue": false, + "CSSUnparsedValue": false, + "CSSVariableReferenceValue": false, + "CSSViewTransitionRule": false, + "currentFrame": false, + "currentTime": false, + "CustomElementRegistry": false, + "customElements": false, + "CustomEvent": false, + "CustomStateSet": false, + "DataTransfer": false, + "DataTransferItem": false, + "DataTransferItemList": false, + "DecompressionStream": false, + "DelayNode": false, + "DelegatedInkTrailPresenter": false, + "DeviceMotionEvent": false, + "DeviceMotionEventAcceleration": false, + "DeviceMotionEventRotationRate": false, + "DeviceOrientationEvent": false, + "devicePixelRatio": false, + "DevicePosture": false, + "DigitalCredential": false, + "dispatchEvent": false, + "DisposableStack": false, + "document": false, + "Document": false, + "DocumentFragment": false, + "documentPictureInPicture": false, + "DocumentPictureInPicture": false, + "DocumentPictureInPictureEvent": false, + "DocumentTimeline": false, + "DocumentType": false, + "DOMError": false, + "DOMException": false, + "DOMImplementation": false, + "DOMMatrix": false, + "DOMMatrixReadOnly": false, + "DOMParser": false, + "DOMPoint": false, + "DOMPointReadOnly": false, + "DOMQuad": false, + "DOMRect": false, + "DOMRectList": false, + "DOMRectReadOnly": false, + "DOMStringList": false, + "DOMStringMap": false, + "DOMTokenList": false, + "DragEvent": false, + "DynamicsCompressorNode": false, + "EditContext": false, + "Element": false, + "ElementInternals": false, + "EncodedAudioChunk": false, + "EncodedVideoChunk": false, + "ErrorEvent": false, + "event": false, + "Event": false, + "EventCounts": false, + "EventSource": false, + "EventTarget": false, + "external": false, + "External": false, + "EyeDropper": false, + "FeaturePolicy": false, + "FederatedCredential": false, + "fence": false, + "Fence": false, + "FencedFrameConfig": false, + "fetch": false, + "fetchLater": false, + "FetchLaterResult": false, + "File": false, + "FileList": false, + "FileReader": false, + "FileSystem": false, + "FileSystemDirectoryEntry": false, + "FileSystemDirectoryHandle": false, + "FileSystemDirectoryReader": false, + "FileSystemEntry": false, + "FileSystemFileEntry": false, + "FileSystemFileHandle": false, + "FileSystemHandle": false, + "FileSystemObserver": false, + "FileSystemWritableFileStream": false, + "find": false, + "focus": false, + "FocusEvent": false, + "FontData": false, + "FontFace": false, + "FontFaceSet": false, + "FontFaceSetLoadEvent": false, + "FormData": false, + "FormDataEvent": false, + "FragmentDirective": false, + "frameElement": false, + "frames": false, + "GainNode": false, + "Gamepad": false, + "GamepadAxisMoveEvent": false, + "GamepadButton": false, + "GamepadButtonEvent": false, + "GamepadEvent": false, + "GamepadHapticActuator": false, + "GamepadPose": false, + "Geolocation": false, + "GeolocationCoordinates": false, + "GeolocationPosition": false, + "GeolocationPositionError": false, + "getComputedStyle": false, + "getScreenDetails": false, + "getSelection": false, + "GPU": false, + "GPUAdapter": false, + "GPUAdapterInfo": false, + "GPUBindGroup": false, + "GPUBindGroupLayout": false, + "GPUBuffer": false, + "GPUBufferUsage": false, + "GPUCanvasContext": false, + "GPUColorWrite": false, + "GPUCommandBuffer": false, + "GPUCommandEncoder": false, + "GPUCompilationInfo": false, + "GPUCompilationMessage": false, + "GPUComputePassEncoder": false, + "GPUComputePipeline": false, + "GPUDevice": false, + "GPUDeviceLostInfo": false, + "GPUError": false, + "GPUExternalTexture": false, + "GPUInternalError": false, + "GPUMapMode": false, + "GPUOutOfMemoryError": false, + "GPUPipelineError": false, + "GPUPipelineLayout": false, + "GPUQuerySet": false, + "GPUQueue": false, + "GPURenderBundle": false, + "GPURenderBundleEncoder": false, + "GPURenderPassEncoder": false, + "GPURenderPipeline": false, + "GPUSampler": false, + "GPUShaderModule": false, + "GPUShaderStage": false, + "GPUSupportedFeatures": false, + "GPUSupportedLimits": false, + "GPUTexture": false, + "GPUTextureUsage": false, + "GPUTextureView": false, + "GPUUncapturedErrorEvent": false, + "GPUValidationError": false, + "GravitySensor": false, + "Gyroscope": false, + "HashChangeEvent": false, + "Headers": false, + "HID": false, + "HIDConnectionEvent": false, + "HIDDevice": false, + "HIDInputReportEvent": false, + "Highlight": false, + "HighlightRegistry": false, + "history": false, + "History": false, + "HTMLAllCollection": false, + "HTMLAnchorElement": false, + "HTMLAreaElement": false, + "HTMLAudioElement": false, + "HTMLBaseElement": false, + "HTMLBodyElement": false, + "HTMLBRElement": false, + "HTMLButtonElement": false, + "HTMLCanvasElement": false, + "HTMLCollection": false, + "HTMLDataElement": false, + "HTMLDataListElement": false, + "HTMLDetailsElement": false, + "HTMLDialogElement": false, + "HTMLDirectoryElement": false, + "HTMLDivElement": false, + "HTMLDListElement": false, + "HTMLDocument": false, + "HTMLElement": false, + "HTMLEmbedElement": false, + "HTMLFencedFrameElement": false, + "HTMLFieldSetElement": false, + "HTMLFontElement": false, + "HTMLFormControlsCollection": false, + "HTMLFormElement": false, + "HTMLFrameElement": false, + "HTMLFrameSetElement": false, + "HTMLHeadElement": false, + "HTMLHeadingElement": false, + "HTMLHRElement": false, + "HTMLHtmlElement": false, + "HTMLIFrameElement": false, + "HTMLImageElement": false, + "HTMLInputElement": false, + "HTMLLabelElement": false, + "HTMLLegendElement": false, + "HTMLLIElement": false, + "HTMLLinkElement": false, + "HTMLMapElement": false, + "HTMLMarqueeElement": false, + "HTMLMediaElement": false, + "HTMLMenuElement": false, + "HTMLMetaElement": false, + "HTMLMeterElement": false, + "HTMLModElement": false, + "HTMLObjectElement": false, + "HTMLOListElement": false, + "HTMLOptGroupElement": false, + "HTMLOptionElement": false, + "HTMLOptionsCollection": false, + "HTMLOutputElement": false, + "HTMLParagraphElement": false, + "HTMLParamElement": false, + "HTMLPictureElement": false, + "HTMLPreElement": false, + "HTMLProgressElement": false, + "HTMLQuoteElement": false, + "HTMLScriptElement": false, + "HTMLSelectedContentElement": false, + "HTMLSelectElement": false, + "HTMLSlotElement": false, + "HTMLSourceElement": false, + "HTMLSpanElement": false, + "HTMLStyleElement": false, + "HTMLTableCaptionElement": false, + "HTMLTableCellElement": false, + "HTMLTableColElement": false, + "HTMLTableElement": false, + "HTMLTableRowElement": false, + "HTMLTableSectionElement": false, + "HTMLTemplateElement": false, + "HTMLTextAreaElement": false, + "HTMLTimeElement": false, + "HTMLTitleElement": false, + "HTMLTrackElement": false, + "HTMLUListElement": false, + "HTMLUnknownElement": false, + "HTMLVideoElement": false, + "IDBCursor": false, + "IDBCursorWithValue": false, + "IDBDatabase": false, + "IDBFactory": false, + "IDBIndex": false, + "IDBKeyRange": false, + "IDBObjectStore": false, + "IDBOpenDBRequest": false, + "IDBRecord": false, + "IDBRequest": false, + "IDBTransaction": false, + "IDBVersionChangeEvent": false, + "IdentityCredential": false, + "IdentityCredentialError": false, + "IdentityProvider": false, + "IdleDeadline": false, + "IdleDetector": false, + "IIRFilterNode": false, + "Image": false, + "ImageBitmap": false, + "ImageBitmapRenderingContext": false, + "ImageCapture": false, + "ImageData": false, + "ImageDecoder": false, + "ImageTrack": false, + "ImageTrackList": false, + "indexedDB": false, + "Ink": false, + "innerHeight": false, + "innerWidth": false, + "InputDeviceCapabilities": false, + "InputDeviceInfo": false, + "InputEvent": false, + "IntegrityViolationReportBody": false, + "InterestEvent": false, + "IntersectionObserver": false, + "IntersectionObserverEntry": false, + "isSecureContext": false, + "Keyboard": false, + "KeyboardEvent": false, + "KeyboardLayoutMap": false, + "KeyframeEffect": false, + "LanguageDetector": false, + "LargestContentfulPaint": false, + "LaunchParams": false, + "launchQueue": false, + "LaunchQueue": false, + "LayoutShift": false, + "LayoutShiftAttribution": false, + "length": false, + "LinearAccelerationSensor": false, + "localStorage": false, + "location": true, + "Location": false, + "locationbar": false, + "Lock": false, + "LockManager": false, + "matchMedia": false, + "MathMLElement": false, + "MediaCapabilities": false, + "MediaCapabilitiesInfo": false, + "MediaDeviceInfo": false, + "MediaDevices": false, + "MediaElementAudioSourceNode": false, + "MediaEncryptedEvent": false, + "MediaError": false, + "MediaKeyError": false, + "MediaKeyMessageEvent": false, + "MediaKeys": false, + "MediaKeySession": false, + "MediaKeyStatusMap": false, + "MediaKeySystemAccess": false, + "MediaList": false, + "MediaMetadata": false, + "MediaQueryList": false, + "MediaQueryListEvent": false, + "MediaRecorder": false, + "MediaRecorderErrorEvent": false, + "MediaSession": false, + "MediaSource": false, + "MediaSourceHandle": false, + "MediaStream": false, + "MediaStreamAudioDestinationNode": false, + "MediaStreamAudioSourceNode": false, + "MediaStreamEvent": false, + "MediaStreamTrack": false, + "MediaStreamTrackAudioSourceNode": false, + "MediaStreamTrackAudioStats": false, + "MediaStreamTrackEvent": false, + "MediaStreamTrackGenerator": false, + "MediaStreamTrackProcessor": false, + "MediaStreamTrackVideoStats": false, + "menubar": false, + "MessageChannel": false, + "MessageEvent": false, + "MessagePort": false, + "MIDIAccess": false, + "MIDIConnectionEvent": false, + "MIDIInput": false, + "MIDIInputMap": false, + "MIDIMessageEvent": false, + "MIDIOutput": false, + "MIDIOutputMap": false, + "MIDIPort": false, + "MimeType": false, + "MimeTypeArray": false, + "model": false, + "ModelGenericSession": false, + "ModelManager": false, + "MouseEvent": false, + "moveBy": false, + "moveTo": false, + "MutationEvent": false, + "MutationObserver": false, + "MutationRecord": false, + "name": false, + "NamedNodeMap": false, + "NavigateEvent": false, + "navigation": false, + "Navigation": false, + "NavigationActivation": false, + "NavigationCurrentEntryChangeEvent": false, + "NavigationDestination": false, + "NavigationHistoryEntry": false, + "NavigationPrecommitController": false, + "NavigationPreloadManager": false, + "NavigationTransition": false, + "navigator": false, + "Navigator": false, + "NavigatorLogin": false, + "NavigatorManagedData": false, + "NavigatorUAData": false, + "NetworkInformation": false, + "Node": false, + "NodeFilter": false, + "NodeIterator": false, + "NodeList": false, + "Notification": false, + "NotifyPaintEvent": false, + "NotRestoredReasonDetails": false, + "NotRestoredReasons": false, + "Observable": false, + "OfflineAudioCompletionEvent": false, + "OfflineAudioContext": false, + "offscreenBuffering": false, + "OffscreenCanvas": false, + "OffscreenCanvasRenderingContext2D": false, + "onabort": true, + "onafterprint": true, + "onanimationcancel": true, + "onanimationend": true, + "onanimationiteration": true, + "onanimationstart": true, + "onappinstalled": true, + "onauxclick": true, + "onbeforeinput": true, + "onbeforeinstallprompt": true, + "onbeforematch": true, + "onbeforeprint": true, + "onbeforetoggle": true, + "onbeforeunload": true, + "onbeforexrselect": true, + "onblur": true, + "oncancel": true, + "oncanplay": true, + "oncanplaythrough": true, + "onchange": true, + "onclick": true, + "onclose": true, + "oncommand": true, + "oncontentvisibilityautostatechange": true, + "oncontextlost": true, + "oncontextmenu": true, + "oncontextrestored": true, + "oncopy": true, + "oncuechange": true, + "oncut": true, + "ondblclick": true, + "ondevicemotion": true, + "ondeviceorientation": true, + "ondeviceorientationabsolute": true, + "ondrag": true, + "ondragend": true, + "ondragenter": true, + "ondragleave": true, + "ondragover": true, + "ondragstart": true, + "ondrop": true, + "ondurationchange": true, + "onemptied": true, + "onended": true, + "onerror": true, + "onfocus": true, + "onformdata": true, + "ongamepadconnected": true, + "ongamepaddisconnected": true, + "ongotpointercapture": true, + "onhashchange": true, + "oninput": true, + "oninvalid": true, + "onkeydown": true, + "onkeypress": true, + "onkeyup": true, + "onlanguagechange": true, + "onload": true, + "onloadeddata": true, + "onloadedmetadata": true, + "onloadstart": true, + "onlostpointercapture": true, + "onmessage": true, + "onmessageerror": true, + "onmousedown": true, + "onmouseenter": true, + "onmouseleave": true, + "onmousemove": true, + "onmouseout": true, + "onmouseover": true, + "onmouseup": true, + "onmousewheel": true, + "onoffline": true, + "ononline": true, + "onpagehide": true, + "onpagereveal": true, + "onpageshow": true, + "onpageswap": true, + "onpaste": true, + "onpause": true, + "onplay": true, + "onplaying": true, + "onpointercancel": true, + "onpointerdown": true, + "onpointerenter": true, + "onpointerleave": true, + "onpointermove": true, + "onpointerout": true, + "onpointerover": true, + "onpointerrawupdate": true, + "onpointerup": true, + "onpopstate": true, + "onprogress": true, + "onratechange": true, + "onrejectionhandled": true, + "onreset": true, + "onresize": true, + "onscroll": true, + "onscrollend": true, + "onscrollsnapchange": true, + "onscrollsnapchanging": true, + "onsearch": true, + "onsecuritypolicyviolation": true, + "onseeked": true, + "onseeking": true, + "onselect": true, + "onselectionchange": true, + "onselectstart": true, + "onslotchange": true, + "onstalled": true, + "onstorage": true, + "onsubmit": true, + "onsuspend": true, + "ontimeupdate": true, + "ontoggle": true, + "ontransitioncancel": true, + "ontransitionend": true, + "ontransitionrun": true, + "ontransitionstart": true, + "onunhandledrejection": true, + "onunload": true, + "onvolumechange": true, + "onwaiting": true, + "onwheel": true, + "open": false, + "opener": false, + "Option": false, + "OrientationSensor": false, + "origin": false, + "originAgentCluster": false, + "OscillatorNode": false, + "OTPCredential": false, + "outerHeight": false, + "outerWidth": false, + "OverconstrainedError": false, + "PageRevealEvent": false, + "PageSwapEvent": false, + "PageTransitionEvent": false, + "pageXOffset": false, + "pageYOffset": false, + "PannerNode": false, + "parent": false, + "PasswordCredential": false, + "Path2D": false, + "PaymentAddress": false, + "PaymentManager": false, + "PaymentMethodChangeEvent": false, + "PaymentRequest": false, + "PaymentRequestUpdateEvent": false, + "PaymentResponse": false, + "performance": false, + "Performance": false, + "PerformanceElementTiming": false, + "PerformanceEntry": false, + "PerformanceEventTiming": false, + "PerformanceLongAnimationFrameTiming": false, + "PerformanceLongTaskTiming": false, + "PerformanceMark": false, + "PerformanceMeasure": false, + "PerformanceNavigation": false, + "PerformanceNavigationTiming": false, + "PerformanceObserver": false, + "PerformanceObserverEntryList": false, + "PerformancePaintTiming": false, + "PerformanceResourceTiming": false, + "PerformanceScriptTiming": false, + "PerformanceServerTiming": false, + "PerformanceTiming": false, + "PeriodicSyncManager": false, + "PeriodicWave": false, + "Permissions": false, + "PermissionStatus": false, + "PERSISTENT": false, + "personalbar": false, + "PictureInPictureEvent": false, + "PictureInPictureWindow": false, + "Plugin": false, + "PluginArray": false, + "PointerEvent": false, + "PopStateEvent": false, + "postMessage": false, + "Presentation": false, + "PresentationAvailability": false, + "PresentationConnection": false, + "PresentationConnectionAvailableEvent": false, + "PresentationConnectionCloseEvent": false, + "PresentationConnectionList": false, + "PresentationReceiver": false, + "PresentationRequest": false, + "PressureObserver": false, + "PressureRecord": false, + "print": false, + "ProcessingInstruction": false, + "Profiler": false, + "ProgressEvent": false, + "PromiseRejectionEvent": false, + "prompt": false, + "ProtectedAudience": false, + "PublicKeyCredential": false, + "PushManager": false, + "PushSubscription": false, + "PushSubscriptionOptions": false, + "queryLocalFonts": false, + "queueMicrotask": false, + "QuotaExceededError": false, + "RadioNodeList": false, + "Range": false, + "ReadableByteStreamController": false, + "ReadableStream": false, + "ReadableStreamBYOBReader": false, + "ReadableStreamBYOBRequest": false, + "ReadableStreamDefaultController": false, + "ReadableStreamDefaultReader": false, + "registerProcessor": false, + "RelativeOrientationSensor": false, + "RemotePlayback": false, + "removeEventListener": false, + "ReportBody": false, + "reportError": false, + "ReportingObserver": false, + "Request": false, + "requestAnimationFrame": false, + "requestIdleCallback": false, + "resizeBy": false, + "ResizeObserver": false, + "ResizeObserverEntry": false, + "ResizeObserverSize": false, + "resizeTo": false, + "Response": false, + "RestrictionTarget": false, + "RTCCertificate": false, + "RTCDataChannel": false, + "RTCDataChannelEvent": false, + "RTCDtlsTransport": false, + "RTCDTMFSender": false, + "RTCDTMFToneChangeEvent": false, + "RTCEncodedAudioFrame": false, + "RTCEncodedVideoFrame": false, + "RTCError": false, + "RTCErrorEvent": false, + "RTCIceCandidate": false, + "RTCIceTransport": false, + "RTCPeerConnection": false, + "RTCPeerConnectionIceErrorEvent": false, + "RTCPeerConnectionIceEvent": false, + "RTCRtpReceiver": false, + "RTCRtpScriptTransform": false, + "RTCRtpSender": false, + "RTCRtpTransceiver": false, + "RTCSctpTransport": false, + "RTCSessionDescription": false, + "RTCStatsReport": false, + "RTCTrackEvent": false, + "sampleRate": false, + "scheduler": false, + "Scheduler": false, + "Scheduling": false, + "screen": false, + "Screen": false, + "ScreenDetailed": false, + "ScreenDetails": false, + "screenLeft": false, + "ScreenOrientation": false, + "screenTop": false, + "screenX": false, + "screenY": false, + "ScriptProcessorNode": false, + "scroll": false, + "scrollbars": false, + "scrollBy": false, + "ScrollTimeline": false, + "scrollTo": false, + "scrollX": false, + "scrollY": false, + "SecurityPolicyViolationEvent": false, + "Selection": false, + "self": false, + "Sensor": false, + "SensorErrorEvent": false, + "Serial": false, + "SerialPort": false, + "ServiceWorker": false, + "ServiceWorkerContainer": false, + "ServiceWorkerRegistration": false, + "sessionStorage": false, + "setInterval": false, + "setTimeout": false, + "ShadowRoot": false, + "sharedStorage": false, + "SharedStorage": false, + "SharedStorageAppendMethod": false, + "SharedStorageClearMethod": false, + "SharedStorageDeleteMethod": false, + "SharedStorageModifierMethod": false, + "SharedStorageSetMethod": false, + "SharedStorageWorklet": false, + "SharedWorker": false, + "showDirectoryPicker": false, + "showOpenFilePicker": false, + "showSaveFilePicker": false, + "SnapEvent": false, + "SourceBuffer": false, + "SourceBufferList": false, + "SpeechGrammar": false, + "SpeechGrammarList": false, + "SpeechRecognition": false, + "SpeechRecognitionErrorEvent": false, + "SpeechRecognitionEvent": false, + "SpeechRecognitionPhrase": false, + "speechSynthesis": false, + "SpeechSynthesis": false, + "SpeechSynthesisErrorEvent": false, + "SpeechSynthesisEvent": false, + "SpeechSynthesisUtterance": false, + "SpeechSynthesisVoice": false, + "StaticRange": false, + "status": false, + "statusbar": false, + "StereoPannerNode": false, + "stop": false, + "Storage": false, + "StorageBucket": false, + "StorageBucketManager": false, + "StorageEvent": false, + "StorageManager": false, + "structuredClone": false, + "styleMedia": false, + "StylePropertyMap": false, + "StylePropertyMapReadOnly": false, + "StyleSheet": false, + "StyleSheetList": false, + "SubmitEvent": false, + "Subscriber": false, + "SubtleCrypto": false, + "Summarizer": false, + "SuppressedError": false, + "SVGAElement": false, + "SVGAngle": false, + "SVGAnimatedAngle": false, + "SVGAnimatedBoolean": false, + "SVGAnimatedEnumeration": false, + "SVGAnimatedInteger": false, + "SVGAnimatedLength": false, + "SVGAnimatedLengthList": false, + "SVGAnimatedNumber": false, + "SVGAnimatedNumberList": false, + "SVGAnimatedPreserveAspectRatio": false, + "SVGAnimatedRect": false, + "SVGAnimatedString": false, + "SVGAnimatedTransformList": false, + "SVGAnimateElement": false, + "SVGAnimateMotionElement": false, + "SVGAnimateTransformElement": false, + "SVGAnimationElement": false, + "SVGCircleElement": false, + "SVGClipPathElement": false, + "SVGComponentTransferFunctionElement": false, + "SVGDefsElement": false, + "SVGDescElement": false, + "SVGElement": false, + "SVGEllipseElement": false, + "SVGFEBlendElement": false, + "SVGFEColorMatrixElement": false, + "SVGFEComponentTransferElement": false, + "SVGFECompositeElement": false, + "SVGFEConvolveMatrixElement": false, + "SVGFEDiffuseLightingElement": false, + "SVGFEDisplacementMapElement": false, + "SVGFEDistantLightElement": false, + "SVGFEDropShadowElement": false, + "SVGFEFloodElement": false, + "SVGFEFuncAElement": false, + "SVGFEFuncBElement": false, + "SVGFEFuncGElement": false, + "SVGFEFuncRElement": false, + "SVGFEGaussianBlurElement": false, + "SVGFEImageElement": false, + "SVGFEMergeElement": false, + "SVGFEMergeNodeElement": false, + "SVGFEMorphologyElement": false, + "SVGFEOffsetElement": false, + "SVGFEPointLightElement": false, + "SVGFESpecularLightingElement": false, + "SVGFESpotLightElement": false, + "SVGFETileElement": false, + "SVGFETurbulenceElement": false, + "SVGFilterElement": false, + "SVGForeignObjectElement": false, + "SVGGElement": false, + "SVGGeometryElement": false, + "SVGGradientElement": false, + "SVGGraphicsElement": false, + "SVGImageElement": false, + "SVGLength": false, + "SVGLengthList": false, + "SVGLinearGradientElement": false, + "SVGLineElement": false, + "SVGMarkerElement": false, + "SVGMaskElement": false, + "SVGMatrix": false, + "SVGMetadataElement": false, + "SVGMPathElement": false, + "SVGNumber": false, + "SVGNumberList": false, + "SVGPathElement": false, + "SVGPatternElement": false, + "SVGPoint": false, + "SVGPointList": false, + "SVGPolygonElement": false, + "SVGPolylineElement": false, + "SVGPreserveAspectRatio": false, + "SVGRadialGradientElement": false, + "SVGRect": false, + "SVGRectElement": false, + "SVGScriptElement": false, + "SVGSetElement": false, + "SVGStopElement": false, + "SVGStringList": false, + "SVGStyleElement": false, + "SVGSVGElement": false, + "SVGSwitchElement": false, + "SVGSymbolElement": false, + "SVGTextContentElement": false, + "SVGTextElement": false, + "SVGTextPathElement": false, + "SVGTextPositioningElement": false, + "SVGTitleElement": false, + "SVGTransform": false, + "SVGTransformList": false, + "SVGTSpanElement": false, + "SVGUnitTypes": false, + "SVGUseElement": false, + "SVGViewElement": false, + "SyncManager": false, + "TaskAttributionTiming": false, + "TaskController": false, + "TaskPriorityChangeEvent": false, + "TaskSignal": false, + "TEMPORARY": false, + "Text": false, + "TextDecoder": false, + "TextDecoderStream": false, + "TextEncoder": false, + "TextEncoderStream": false, + "TextEvent": false, + "TextFormat": false, + "TextFormatUpdateEvent": false, + "TextMetrics": false, + "TextTrack": false, + "TextTrackCue": false, + "TextTrackCueList": false, + "TextTrackList": false, + "TextUpdateEvent": false, + "TimeEvent": false, + "TimeRanges": false, + "ToggleEvent": false, + "toolbar": false, + "top": false, + "Touch": false, + "TouchEvent": false, + "TouchList": false, + "TrackEvent": false, + "TransformStream": false, + "TransformStreamDefaultController": false, + "TransitionEvent": false, + "Translator": false, + "TreeWalker": false, + "TrustedHTML": false, + "TrustedScript": false, + "TrustedScriptURL": false, + "TrustedTypePolicy": false, + "TrustedTypePolicyFactory": false, + "trustedTypes": false, + "UIEvent": false, + "URL": false, + "URLPattern": false, + "URLSearchParams": false, + "USB": false, + "USBAlternateInterface": false, + "USBConfiguration": false, + "USBConnectionEvent": false, + "USBDevice": false, + "USBEndpoint": false, + "USBInterface": false, + "USBInTransferResult": false, + "USBIsochronousInTransferPacket": false, + "USBIsochronousInTransferResult": false, + "USBIsochronousOutTransferPacket": false, + "USBIsochronousOutTransferResult": false, + "USBOutTransferResult": false, + "UserActivation": false, + "ValidityState": false, + "VideoColorSpace": false, + "VideoDecoder": false, + "VideoEncoder": false, + "VideoFrame": false, + "VideoPlaybackQuality": false, + "viewport": false, + "Viewport": false, + "ViewTimeline": false, + "ViewTransition": false, + "ViewTransitionTypeSet": false, + "VirtualKeyboard": false, + "VirtualKeyboardGeometryChangeEvent": false, + "VisibilityStateEntry": false, + "visualViewport": false, + "VisualViewport": false, + "VTTCue": false, + "VTTRegion": false, + "WakeLock": false, + "WakeLockSentinel": false, + "WaveShaperNode": false, + "WebAssembly": false, + "WebGL2RenderingContext": false, + "WebGLActiveInfo": false, + "WebGLBuffer": false, + "WebGLContextEvent": false, + "WebGLFramebuffer": false, + "WebGLObject": false, + "WebGLProgram": false, + "WebGLQuery": false, + "WebGLRenderbuffer": false, + "WebGLRenderingContext": false, + "WebGLSampler": false, + "WebGLShader": false, + "WebGLShaderPrecisionFormat": false, + "WebGLSync": false, + "WebGLTexture": false, + "WebGLTransformFeedback": false, + "WebGLUniformLocation": false, + "WebGLVertexArrayObject": false, + "WebSocket": false, + "WebSocketError": false, + "WebSocketStream": false, + "WebTransport": false, + "WebTransportBidirectionalStream": false, + "WebTransportDatagramDuplexStream": false, + "WebTransportError": false, + "WebTransportReceiveStream": false, + "WebTransportSendStream": false, + "WGSLLanguageFeatures": false, + "WheelEvent": false, + "when": false, + "window": false, + "Window": false, + "WindowControlsOverlay": false, + "WindowControlsOverlayGeometryChangeEvent": false, + "Worker": false, + "Worklet": false, + "WorkletGlobalScope": false, + "WritableStream": false, + "WritableStreamDefaultController": false, + "WritableStreamDefaultWriter": false, + "XMLDocument": false, + "XMLHttpRequest": false, + "XMLHttpRequestEventTarget": false, + "XMLHttpRequestUpload": false, + "XMLSerializer": false, + "XPathEvaluator": false, + "XPathExpression": false, + "XPathResult": false, + "XRAnchor": false, + "XRAnchorSet": false, + "XRBoundedReferenceSpace": false, + "XRCamera": false, + "XRCPUDepthInformation": false, + "XRDepthInformation": false, + "XRDOMOverlayState": false, + "XRFrame": false, + "XRHand": false, + "XRHitTestResult": false, + "XRHitTestSource": false, + "XRInputSource": false, + "XRInputSourceArray": false, + "XRInputSourceEvent": false, + "XRInputSourcesChangeEvent": false, + "XRJointPose": false, + "XRJointSpace": false, + "XRLayer": false, + "XRLightEstimate": false, + "XRLightProbe": false, + "XRPose": false, + "XRRay": false, + "XRReferenceSpace": false, + "XRReferenceSpaceEvent": false, + "XRRenderState": false, + "XRRigidTransform": false, + "XRSession": false, + "XRSessionEvent": false, + "XRSpace": false, + "XRSystem": false, + "XRTransientInputHitTestResult": false, + "XRTransientInputHitTestSource": false, + "XRView": false, + "XRViewerPose": false, + "XRViewport": false, + "XRWebGLBinding": false, + "XRWebGLDepthInformation": false, + "XRWebGLLayer": false, + "XSLTProcessor": false + } + }, + "errors": [ + { + "messageId": "requireUFlag", + "suggestions": [ + { + "messageId": "addUFlag", + "output": "new window.RegExp('foo', \"u\")" + } + ] + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### require-unicode-regexp > invalid + +```js +new global.RegExp('foo') +``` + +```json +{ + "languageOptions": { + "sourceType": "commonjs" + }, + "errors": [ + { + "messageId": "requireUFlag", + "suggestions": [ + { + "messageId": "addUFlag", + "output": "new global.RegExp('foo', \"u\")" + } + ] + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### require-unicode-regexp > invalid + +```js +new globalThis.RegExp('foo') +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 2020 + }, + "errors": [ + { + "messageId": "requireUFlag", + "suggestions": [ + { + "messageId": "addUFlag", + "output": "new globalThis.RegExp('foo', \"u\")" + } + ] + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +### `semi` + +Pass: 284 / 308 (92.2%) +Fail: 24 / 308 (7.8%) + +#### semi > invalid + +```js +import * as utils from './utils' +``` + +```json +{ + "output": "import * as utils from './utils';", + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + }, + "errors": [ + { + "messageId": "missingSemi", + "line": 1, + "column": 33 + } + ] +} +``` + +TypeError: Expected `loc` to be an object with integer `line` and `column` properties. + at getOffsetFromLineColumn (apps/oxlint/dist/lint.js) + at report (apps/oxlint/dist/lint.js) + at Object.report (apps/oxlint/dist/lint.js) + at report (apps/oxlint/conformance/submodules/eslint/lib/rules/semi.js:158:12) + + +#### semi > invalid + +```js +import { square, diag } from 'lib' +``` + +```json +{ + "output": "import { square, diag } from 'lib';", + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + }, + "errors": [ + { + "messageId": "missingSemi", + "line": 1, + "column": 35 + } + ] +} +``` + +TypeError: Expected `loc` to be an object with integer `line` and `column` properties. + at getOffsetFromLineColumn (apps/oxlint/dist/lint.js) + at report (apps/oxlint/dist/lint.js) + at Object.report (apps/oxlint/dist/lint.js) + at report (apps/oxlint/conformance/submodules/eslint/lib/rules/semi.js:158:12) + + +#### semi > invalid + +```js +import { default as foo } from 'lib' +``` + +```json +{ + "output": "import { default as foo } from 'lib';", + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + }, + "errors": [ + { + "messageId": "missingSemi", + "line": 1, + "column": 37 + } + ] +} +``` + +TypeError: Expected `loc` to be an object with integer `line` and `column` properties. + at getOffsetFromLineColumn (apps/oxlint/dist/lint.js) + at report (apps/oxlint/dist/lint.js) + at Object.report (apps/oxlint/dist/lint.js) + at report (apps/oxlint/conformance/submodules/eslint/lib/rules/semi.js:158:12) + + +#### semi > invalid + +```js +import 'src/mylib' +``` + +```json +{ + "output": "import 'src/mylib';", + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + }, + "errors": [ + { + "messageId": "missingSemi", + "line": 1, + "column": 19 + } + ] +} +``` + +TypeError: Expected `loc` to be an object with integer `line` and `column` properties. + at getOffsetFromLineColumn (apps/oxlint/dist/lint.js) + at report (apps/oxlint/dist/lint.js) + at Object.report (apps/oxlint/dist/lint.js) + at report (apps/oxlint/conformance/submodules/eslint/lib/rules/semi.js:158:12) + + +#### semi > invalid + +```js +import theDefault, { named1, named2 } from 'src/mylib' +``` + +```json +{ + "output": "import theDefault, { named1, named2 } from 'src/mylib';", + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + }, + "errors": [ + { + "messageId": "missingSemi", + "line": 1, + "column": 55 + } + ] +} +``` + +TypeError: Expected `loc` to be an object with integer `line` and `column` properties. + at getOffsetFromLineColumn (apps/oxlint/dist/lint.js) + at report (apps/oxlint/dist/lint.js) + at Object.report (apps/oxlint/dist/lint.js) + at report (apps/oxlint/conformance/submodules/eslint/lib/rules/semi.js:158:12) + + +#### semi > invalid + +```js +let x = 5 +``` + +```json +{ + "output": "let x = 5;", + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "missingSemi", + "line": 1, + "column": 10 + } + ] +} +``` + +TypeError: Expected `loc` to be an object with integer `line` and `column` properties. + at getOffsetFromLineColumn (apps/oxlint/dist/lint.js) + at report (apps/oxlint/dist/lint.js) + at Object.report (apps/oxlint/dist/lint.js) + at report (apps/oxlint/conformance/submodules/eslint/lib/rules/semi.js:158:12) + + +#### semi > invalid + +```js +var x = 5 +``` + +```json +{ + "output": "var x = 5;", + "errors": [ + { + "messageId": "missingSemi", + "line": 1, + "column": 10 + } + ] +} +``` + +TypeError: Expected `loc` to be an object with integer `line` and `column` properties. + at getOffsetFromLineColumn (apps/oxlint/dist/lint.js) + at report (apps/oxlint/dist/lint.js) + at Object.report (apps/oxlint/dist/lint.js) + at report (apps/oxlint/conformance/submodules/eslint/lib/rules/semi.js:158:12) + + +#### semi > invalid + +```js +var x = 5, y +``` + +```json +{ + "output": "var x = 5, y;", + "errors": [ + { + "messageId": "missingSemi", + "line": 1, + "column": 13 + } + ] +} +``` + +TypeError: Expected `loc` to be an object with integer `line` and `column` properties. + at getOffsetFromLineColumn (apps/oxlint/dist/lint.js) + at report (apps/oxlint/dist/lint.js) + at Object.report (apps/oxlint/dist/lint.js) + at report (apps/oxlint/conformance/submodules/eslint/lib/rules/semi.js:158:12) + + +#### semi > invalid + +```js +debugger +``` + +```json +{ + "output": "debugger;", + "errors": [ + { + "messageId": "missingSemi", + "line": 1, + "column": 9 + } + ] +} +``` + +TypeError: Expected `loc` to be an object with integer `line` and `column` properties. + at getOffsetFromLineColumn (apps/oxlint/dist/lint.js) + at report (apps/oxlint/dist/lint.js) + at Object.report (apps/oxlint/dist/lint.js) + at report (apps/oxlint/conformance/submodules/eslint/lib/rules/semi.js:158:12) + + +#### semi > invalid + +```js +foo() +``` + +```json +{ + "output": "foo();", + "errors": [ + { + "messageId": "missingSemi", + "line": 1, + "column": 6 + } + ] +} +``` + +TypeError: Expected `loc` to be an object with integer `line` and `column` properties. + at getOffsetFromLineColumn (apps/oxlint/dist/lint.js) + at report (apps/oxlint/dist/lint.js) + at Object.report (apps/oxlint/dist/lint.js) + at report (apps/oxlint/conformance/submodules/eslint/lib/rules/semi.js:158:12) + + +#### semi > invalid + +```js +var foo = { + bar: baz +} +``` + +```json +{ + "output": "var foo = {\n bar: baz\n};", + "errors": [ + { + "messageId": "missingSemi", + "line": 3, + "column": 2 + } + ] +} +``` + +TypeError: Expected `loc` to be an object with integer `line` and `column` properties. + at getOffsetFromLineColumn (apps/oxlint/dist/lint.js) + at report (apps/oxlint/dist/lint.js) + at Object.report (apps/oxlint/dist/lint.js) + at report (apps/oxlint/conformance/submodules/eslint/lib/rules/semi.js:158:12) + + +#### semi > invalid + +```js +throw new Error('foo') +``` + +```json +{ + "output": "throw new Error('foo');", + "errors": [ + { + "messageId": "missingSemi", + "line": 1, + "column": 23 + } + ] +} +``` + +TypeError: Expected `loc` to be an object with integer `line` and `column` properties. + at getOffsetFromLineColumn (apps/oxlint/dist/lint.js) + at report (apps/oxlint/dist/lint.js) + at Object.report (apps/oxlint/dist/lint.js) + at report (apps/oxlint/conformance/submodules/eslint/lib/rules/semi.js:158:12) + + +#### semi > invalid + +```js +do{}while(true) +``` + +```json +{ + "output": "do{}while(true);", + "errors": [ + { + "messageId": "missingSemi", + "line": 1, + "column": 16 + } + ] +} +``` + +TypeError: Expected `loc` to be an object with integer `line` and `column` properties. + at getOffsetFromLineColumn (apps/oxlint/dist/lint.js) + at report (apps/oxlint/dist/lint.js) + at Object.report (apps/oxlint/dist/lint.js) + at report (apps/oxlint/conformance/submodules/eslint/lib/rules/semi.js:158:12) + + +#### semi > invalid + +```js +export * from 'foo' +``` + +```json +{ + "output": "export * from 'foo';", + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + }, + "errors": [ + { + "messageId": "missingSemi", + "line": 1, + "column": 20 + } + ] +} +``` + +TypeError: Expected `loc` to be an object with integer `line` and `column` properties. + at getOffsetFromLineColumn (apps/oxlint/dist/lint.js) + at report (apps/oxlint/dist/lint.js) + at Object.report (apps/oxlint/dist/lint.js) + at report (apps/oxlint/conformance/submodules/eslint/lib/rules/semi.js:158:12) + + +#### semi > invalid + +```js +export { foo } from 'foo' +``` + +```json +{ + "output": "export { foo } from 'foo';", + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + }, + "errors": [ + { + "messageId": "missingSemi", + "line": 1, + "column": 26 + } + ] +} +``` + +TypeError: Expected `loc` to be an object with integer `line` and `column` properties. + at getOffsetFromLineColumn (apps/oxlint/dist/lint.js) + at report (apps/oxlint/dist/lint.js) + at Object.report (apps/oxlint/dist/lint.js) + at report (apps/oxlint/conformance/submodules/eslint/lib/rules/semi.js:158:12) + + +#### semi > invalid + +```js +var foo = 0;export { foo } +``` + +```json +{ + "output": "var foo = 0;export { foo };", + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + }, + "errors": [ + { + "messageId": "missingSemi", + "line": 1, + "column": 27 + } + ] +} +``` + +TypeError: Expected `loc` to be an object with integer `line` and `column` properties. + at getOffsetFromLineColumn (apps/oxlint/dist/lint.js) + at report (apps/oxlint/dist/lint.js) + at Object.report (apps/oxlint/dist/lint.js) + at report (apps/oxlint/conformance/submodules/eslint/lib/rules/semi.js:158:12) + + +#### semi > invalid + +```js +export var foo +``` + +```json +{ + "output": "export var foo;", + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + }, + "errors": [ + { + "messageId": "missingSemi", + "line": 1, + "column": 15 + } + ] +} +``` + +TypeError: Expected `loc` to be an object with integer `line` and `column` properties. + at getOffsetFromLineColumn (apps/oxlint/dist/lint.js) + at report (apps/oxlint/dist/lint.js) + at Object.report (apps/oxlint/dist/lint.js) + at report (apps/oxlint/conformance/submodules/eslint/lib/rules/semi.js:158:12) + + +#### semi > invalid + +```js +export let foo +``` + +```json +{ + "output": "export let foo;", + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + }, + "errors": [ + { + "messageId": "missingSemi", + "line": 1, + "column": 15 + } + ] +} +``` + +TypeError: Expected `loc` to be an object with integer `line` and `column` properties. + at getOffsetFromLineColumn (apps/oxlint/dist/lint.js) + at report (apps/oxlint/dist/lint.js) + at Object.report (apps/oxlint/dist/lint.js) + at report (apps/oxlint/conformance/submodules/eslint/lib/rules/semi.js:158:12) + + +#### semi > invalid + +```js +export const FOO = 42 +``` + +```json +{ + "output": "export const FOO = 42;", + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + }, + "errors": [ + { + "messageId": "missingSemi", + "line": 1, + "column": 22 + } + ] +} +``` + +TypeError: Expected `loc` to be an object with integer `line` and `column` properties. + at getOffsetFromLineColumn (apps/oxlint/dist/lint.js) + at report (apps/oxlint/dist/lint.js) + at Object.report (apps/oxlint/dist/lint.js) + at report (apps/oxlint/conformance/submodules/eslint/lib/rules/semi.js:158:12) + + +#### semi > invalid + +```js +export default foo || bar +``` + +```json +{ + "output": "export default foo || bar;", + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + }, + "errors": [ + { + "messageId": "missingSemi", + "line": 1, + "column": 26 + } + ] +} +``` + +TypeError: Expected `loc` to be an object with integer `line` and `column` properties. + at getOffsetFromLineColumn (apps/oxlint/dist/lint.js) + at report (apps/oxlint/dist/lint.js) + at Object.report (apps/oxlint/dist/lint.js) + at report (apps/oxlint/conformance/submodules/eslint/lib/rules/semi.js:158:12) + + +#### semi > invalid + +```js +export default (foo) => foo.bar() +``` + +```json +{ + "output": "export default (foo) => foo.bar();", + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + }, + "errors": [ + { + "messageId": "missingSemi", + "line": 1, + "column": 34 + } + ] +} +``` + +TypeError: Expected `loc` to be an object with integer `line` and `column` properties. + at getOffsetFromLineColumn (apps/oxlint/dist/lint.js) + at report (apps/oxlint/dist/lint.js) + at Object.report (apps/oxlint/dist/lint.js) + at report (apps/oxlint/conformance/submodules/eslint/lib/rules/semi.js:158:12) + + +#### semi > invalid + +```js +export default foo = 42 +``` + +```json +{ + "output": "export default foo = 42;", + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + }, + "errors": [ + { + "messageId": "missingSemi", + "line": 1, + "column": 24 + } + ] +} +``` + +TypeError: Expected `loc` to be an object with integer `line` and `column` properties. + at getOffsetFromLineColumn (apps/oxlint/dist/lint.js) + at report (apps/oxlint/dist/lint.js) + at Object.report (apps/oxlint/dist/lint.js) + at report (apps/oxlint/conformance/submodules/eslint/lib/rules/semi.js:158:12) + + +#### semi > invalid + +```js +export default foo += 42 +``` + +```json +{ + "output": "export default foo += 42;", + "languageOptions": { + "ecmaVersion": 6, + "sourceType": "module" + }, + "errors": [ + { + "messageId": "missingSemi", + "line": 1, + "column": 25 + } + ] +} +``` + +TypeError: Expected `loc` to be an object with integer `line` and `column` properties. + at getOffsetFromLineColumn (apps/oxlint/dist/lint.js) + at report (apps/oxlint/dist/lint.js) + at Object.report (apps/oxlint/dist/lint.js) + at report (apps/oxlint/conformance/submodules/eslint/lib/rules/semi.js:158:12) + + +#### semi > invalid + +```js +/*eslint no-extra-semi: error */ +foo(); +;[0,1,2].forEach(bar) +``` + +```json +{ + "output": "/*eslint no-extra-semi: error */\nfoo()\n;[0,1,2].forEach(bar)", + "options": [ + "never" + ], + "errors": [ + { + "messageId": "extraSemi", + "line": 2, + "column": 6, + "endLine": 2, + "endColumn": 7 + }, + { + "message": "Unnecessary semicolon.", + "line": 3, + "column": 1, + "endLine": 3, + "endColumn": 2 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 2 errors but had 1: [ + { + ruleId: 'rule-to-test/semi', + message: 'Extra semicolon.', + messageId: 'extraSemi', + severity: 1, + nodeType: 'ExpressionStatement', + line: 2, + column: 5, + endLine: 2, + endColumn: 6, + suggestions: null + } +] + +1 !== 2 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +### `space-before-blocks` + +Pass: 159 / 161 (98.8%) +Fail: 2 / 161 (1.2%) + +#### space-before-blocks > invalid + +```js +class A { foo(bar: string): void{} } +``` + +```json +{ + "output": "class A { foo(bar: string): void {} }", + "languageOptions": { + "parser": {} + }, + "errors": [ + { + "messageId": "missingSpace" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### space-before-blocks > invalid + +```js +function foo(): null {} +``` + +```json +{ + "output": "function foo(): null{}", + "options": [ + "never" + ], + "languageOptions": { + "parser": {} + }, + "errors": [ + { + "messageId": "unexpectedSpace" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +### `space-before-function-paren` + +Pass: 74 / 75 (98.7%) +Fail: 1 / 75 (1.3%) + +#### space-before-function-paren > valid + +```js +type TransformFunction = (el: ASTElement, code: string) => string; +``` + +```json +{ + "languageOptions": { + "parser": {} + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +### `space-infix-ops` + +Pass: 66 / 74 (89.2%) +Fail: 8 / 74 (10.8%) + +#### space-infix-ops > valid + +```js +function foo(a: number = 0) { } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "parser": {} + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### space-infix-ops > valid + +```js +function foo(): Bar { } +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "parser": {} + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### space-infix-ops > valid + +```js +var foo: Bar = ''; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "parser": {} + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### space-infix-ops > valid + +```js +const foo = function(a: number = 0): Bar { }; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "parser": {} + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### space-infix-ops > valid + +```js +type Foo = T; +``` + +```json +{ + "languageOptions": { + "ecmaVersion": 6, + "parser": {} + } +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + + +#### space-infix-ops > invalid + +```js +var {a=0}=bar; +``` + +```json +{ + "output": "var {a = 0} = bar;", + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "missingSpace", + "data": { + "operator": "=" + }, + "line": 1, + "column": 7 + }, + { + "messageId": "missingSpace", + "data": { + "operator": "=" + }, + "line": 1, + "column": 10 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Actual error location does not match expected error location. ++ actual - expected + + { ++ column: 10, +- column: 7, + line: 1 + } + + at assertInvalidTestCaseLocationIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### space-infix-ops > invalid + +```js +var a: Foo= b; +``` + +```json +{ + "output": "var a: Foo = b;", + "languageOptions": { + "parser": {} + }, + "errors": [ + { + "messageId": "missingSpace", + "data": { + "operator": "=" + }, + "line": 1, + "column": 11 + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### space-infix-ops > invalid + +```js +function foo(a: number=0): Foo { } +``` + +```json +{ + "output": "function foo(a: number = 0): Foo { }", + "languageOptions": { + "ecmaVersion": 6, + "parser": {} + }, + "errors": [ + { + "messageId": "missingSpace", + "data": { + "operator": "=" + }, + "line": 1, + "column": 23 + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +### `strict` + +Pass: 99 / 126 (78.6%) +Fail: 27 / 126 (21.4%) + +#### strict > valid + +```js +function foo() { return; } +``` + +```json +{ + "options": [ + "global" + ], + "languageOptions": { + "parserOptions": { + "ecmaFeatures": { + "impliedStrict": true + } + } + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/strict', + message: "Use the global form of 'use strict'.", + messageId: 'global', + severity: 1, + nodeType: 'FunctionDeclaration', + line: 1, + column: 0, + endLine: 1, + endColumn: 26, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### strict > valid + +```js +function foo() { return; } +``` + +```json +{ + "options": [ + "function" + ], + "languageOptions": { + "parserOptions": { + "ecmaFeatures": { + "impliedStrict": true + } + } + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/strict', + message: "Use the function form of 'use strict'.", + messageId: 'function', + severity: 1, + nodeType: 'FunctionDeclaration', + line: 1, + column: 0, + endLine: 1, + endColumn: 26, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### strict > valid + +```js +'use strict'; function foo() { return; } +``` + +```json +{ + "options": [ + "safe" + ], + "languageOptions": { + "parserOptions": { + "ecmaFeatures": { + "globalReturn": true + } + } + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/strict', + message: "Use the function form of 'use strict'.", + messageId: 'function', + severity: 1, + nodeType: 'Literal', + line: 1, + column: 0, + endLine: 1, + endColumn: 13, + suggestions: null + }, + { + ruleId: 'rule-to-test/strict', + message: "Use the function form of 'use strict'.", + messageId: 'function', + severity: 1, + nodeType: 'FunctionDeclaration', + line: 1, + column: 14, + endLine: 1, + endColumn: 40, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### strict > valid + +```js +function foo() { return; } +``` + +```json +{ + "options": [ + "safe" + ], + "languageOptions": { + "parserOptions": { + "ecmaFeatures": { + "impliedStrict": true + } + } + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/strict', + message: "Use the function form of 'use strict'.", + messageId: 'function', + severity: 1, + nodeType: 'FunctionDeclaration', + line: 1, + column: 0, + endLine: 1, + endColumn: 26, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### strict > valid + +```js +'use strict'; function foo() { return; } +``` + +```json +{ + "languageOptions": { + "parserOptions": { + "ecmaFeatures": { + "globalReturn": true + } + } + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/strict', + message: "Use the function form of 'use strict'.", + messageId: 'function', + severity: 1, + nodeType: 'Literal', + line: 1, + column: 0, + endLine: 1, + endColumn: 13, + suggestions: null + }, + { + ruleId: 'rule-to-test/strict', + message: "Use the function form of 'use strict'.", + messageId: 'function', + severity: 1, + nodeType: 'FunctionDeclaration', + line: 1, + column: 14, + endLine: 1, + endColumn: 40, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### strict > valid + +```js +function foo() { return; } +``` + +```json +{ + "languageOptions": { + "parserOptions": { + "ecmaFeatures": { + "impliedStrict": true + } + } + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 1: [ + { + ruleId: 'rule-to-test/strict', + message: "Use the function form of 'use strict'.", + messageId: 'function', + severity: 1, + nodeType: 'FunctionDeclaration', + line: 1, + column: 0, + endLine: 1, + endColumn: 26, + suggestions: null + } +] + +1 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### strict > valid + +```js +'use strict'; module.exports = function identity (value) { return value; } +``` + +```json +{ + "languageOptions": { + "sourceType": "commonjs" + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/strict', + message: "Use the function form of 'use strict'.", + messageId: 'function', + severity: 1, + nodeType: 'Literal', + line: 1, + column: 0, + endLine: 1, + endColumn: 13, + suggestions: null + }, + { + ruleId: 'rule-to-test/strict', + message: "Use the function form of 'use strict'.", + messageId: 'function', + severity: 1, + nodeType: 'FunctionExpression', + line: 1, + column: 31, + endLine: 1, + endColumn: 74, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### strict > valid + +```js +'use strict'; module.exports = function identity (value) { return value; } +``` + +```json +{ + "options": [ + "safe" + ], + "languageOptions": { + "sourceType": "commonjs" + } +} +``` + +AssertionError [ERR_ASSERTION]: Should have no errors but had 2: [ + { + ruleId: 'rule-to-test/strict', + message: "Use the function form of 'use strict'.", + messageId: 'function', + severity: 1, + nodeType: 'Literal', + line: 1, + column: 0, + endLine: 1, + endColumn: 13, + suggestions: null + }, + { + ruleId: 'rule-to-test/strict', + message: "Use the function form of 'use strict'.", + messageId: 'function', + severity: 1, + nodeType: 'FunctionExpression', + line: 1, + column: 31, + endLine: 1, + endColumn: 74, + suggestions: null + } +] + +2 !== 0 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertValidTestCasePasses (apps/oxlint/dist/index.js) + at runValidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### strict > invalid + +```js +'use strict'; function foo() { 'use strict'; return; } +``` + +```json +{ + "output": " function foo() { return; }", + "options": [ + "never" + ], + "languageOptions": { + "parserOptions": { + "ecmaFeatures": { + "impliedStrict": true + } + } + }, + "errors": [ + { + "messageId": "implied" + }, + { + "messageId": "implied" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: messageId 'never' does not match expected messageId 'implied' + +'never' !== 'implied' + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### strict > invalid + +```js +'use strict'; function foo() { 'use strict'; return; } +``` + +```json +{ + "output": " function foo() { return; }", + "options": [ + "global" + ], + "languageOptions": { + "parserOptions": { + "ecmaFeatures": { + "impliedStrict": true + } + } + }, + "errors": [ + { + "messageId": "implied" + }, + { + "messageId": "implied" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 2 errors but had 1: [ + { + ruleId: 'rule-to-test/strict', + message: "Use the global form of 'use strict'.", + messageId: 'global', + severity: 1, + nodeType: 'Literal', + line: 1, + column: 31, + endLine: 1, + endColumn: 44, + suggestions: null + } +] + +1 !== 2 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### strict > invalid + +```js +'use strict'; function foo() { 'use strict'; return; } +``` + +```json +{ + "output": " function foo() { return; }", + "options": [ + "function" + ], + "languageOptions": { + "parserOptions": { + "ecmaFeatures": { + "impliedStrict": true + } + } + }, + "errors": [ + { + "messageId": "implied" + }, + { + "messageId": "implied" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 2 errors but had 1: [ + { + ruleId: 'rule-to-test/strict', + message: "Use the function form of 'use strict'.", + messageId: 'function', + severity: 1, + nodeType: 'Literal', + line: 1, + column: 0, + endLine: 1, + endColumn: 13, + suggestions: null + } +] + +1 !== 2 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### strict > invalid + +```js +function foo() { 'use strict'; return; } +``` + +```json +{ + "output": null, + "options": [ + "safe" + ], + "languageOptions": { + "parserOptions": { + "ecmaFeatures": { + "globalReturn": true + } + } + }, + "errors": [ + { + "messageId": "global" + }, + { + "messageId": "global" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 2 errors but had 0: [] + +0 !== 2 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### strict > invalid + +```js +'use strict'; function foo() { 'use strict'; return; } +``` + +```json +{ + "output": " function foo() { return; }", + "options": [ + "safe" + ], + "languageOptions": { + "parserOptions": { + "ecmaFeatures": { + "impliedStrict": true + } + } + }, + "errors": [ + { + "messageId": "implied" + }, + { + "messageId": "implied" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 2 errors but had 1: [ + { + ruleId: 'rule-to-test/strict', + message: "Use the function form of 'use strict'.", + messageId: 'function', + severity: 1, + nodeType: 'Literal', + line: 1, + column: 0, + endLine: 1, + endColumn: 13, + suggestions: null + } +] + +1 !== 2 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### strict > invalid + +```js +function foo() { 'use strict'; return; } +``` + +```json +{ + "output": null, + "languageOptions": { + "parserOptions": { + "ecmaFeatures": { + "globalReturn": true + } + } + }, + "errors": [ + { + "messageId": "global" + }, + { + "messageId": "global" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 2 errors but had 0: [] + +0 !== 2 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### strict > invalid + +```js +'use strict'; function foo() { 'use strict'; return; } +``` + +```json +{ + "output": " function foo() { return; }", + "languageOptions": { + "parserOptions": { + "ecmaFeatures": { + "impliedStrict": true + } + } + }, + "errors": [ + { + "messageId": "implied" + }, + { + "messageId": "implied" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 2 errors but had 1: [ + { + ruleId: 'rule-to-test/strict', + message: "Use the function form of 'use strict'.", + messageId: 'function', + severity: 1, + nodeType: 'Literal', + line: 1, + column: 0, + endLine: 1, + endColumn: 13, + suggestions: null + } +] + +1 !== 2 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### strict > invalid + +```js +function foo(a = 0) { 'use strict' } +``` + +```json +{ + "output": null, + "options": [], + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "nonSimpleParameterList" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### strict > invalid + +```js +(function() { 'use strict'; function foo(a = 0) { 'use strict' } }()) +``` + +```json +{ + "output": null, + "options": [], + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "nonSimpleParameterList" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### strict > invalid + +```js +function foo(a = 0) { 'use strict' } +``` + +```json +{ + "output": null, + "options": [], + "languageOptions": { + "ecmaVersion": 6, + "parserOptions": { + "ecmaFeatures": { + "globalReturn": true + } + } + }, + "errors": [ + "Use the global form of 'use strict'.", + { + "messageId": "nonSimpleParameterList" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### strict > invalid + +```js +'use strict'; function foo(a = 0) { 'use strict' } +``` + +```json +{ + "output": null, + "options": [], + "languageOptions": { + "ecmaVersion": 6, + "parserOptions": { + "ecmaFeatures": { + "globalReturn": true + } + } + }, + "errors": [ + { + "messageId": "nonSimpleParameterList" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### strict > invalid + +```js +function foo(a = 0) { 'use strict' } +``` + +```json +{ + "output": null, + "options": [ + "never" + ], + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "nonSimpleParameterList" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### strict > invalid + +```js +function foo(a = 0) { 'use strict' } +``` + +```json +{ + "output": null, + "options": [ + "global" + ], + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + "Use the global form of 'use strict'.", + { + "messageId": "nonSimpleParameterList" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### strict > invalid + +```js +'use strict'; function foo(a = 0) { 'use strict' } +``` + +```json +{ + "output": null, + "options": [ + "global" + ], + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "nonSimpleParameterList" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### strict > invalid + +```js +function foo(a = 0) { 'use strict' } +``` + +```json +{ + "output": null, + "options": [ + "function" + ], + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "nonSimpleParameterList" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### strict > invalid + +```js +(function() { 'use strict'; function foo(a = 0) { 'use strict' } }()) +``` + +```json +{ + "output": null, + "options": [ + "function" + ], + "languageOptions": { + "ecmaVersion": 6 + }, + "errors": [ + { + "messageId": "nonSimpleParameterList" + } + ] +} +``` + +Error: Parsing failed + at parse (apps/oxlint/dist/index.js) + at lint (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + + +#### strict > invalid + +```js +class C { static { function foo() { +'use strict'; } } } +``` + +```json +{ + "output": "class C { static { function foo() { \n } } }", + "options": [ + "safe" + ], + "languageOptions": { + "ecmaVersion": 2022, + "parserOptions": { + "ecmaFeatures": { + "impliedStrict": true + } + } + }, + "errors": [ + { + "messageId": "implied", + "line": 2 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: messageId 'unnecessaryInClasses' does not match expected messageId 'implied' ++ actual - expected + ++ 'unnecessaryInClasses' +- 'implied' + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### strict > invalid + +```js +module.exports = function identity (value) { return value; } +``` + +```json +{ + "output": null, + "options": [ + "safe" + ], + "languageOptions": { + "sourceType": "commonjs" + }, + "errors": [ + { + "messageId": "global", + "line": 1 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: messageId 'function' does not match expected messageId 'global' ++ actual - expected + ++ 'function' +- 'global' + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### strict > invalid + +```js +module.exports = function identity (value) { return value; } +``` + +```json +{ + "output": null, + "languageOptions": { + "sourceType": "commonjs" + }, + "errors": [ + { + "messageId": "global", + "line": 1 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: messageId 'function' does not match expected messageId 'global' ++ actual - expected + ++ 'function' +- 'global' + + at assertInvalidTestCaseMessageIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +### `symbol-description` + +Pass: 6 / 8 (75.0%) +Fail: 2 / 8 (25.0%) + +#### symbol-description > invalid + +```js +Symbol(); +``` + +```json +{ + "errors": [ + { + "messageId": "expected" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### symbol-description > invalid + +```js +Symbol(); Symbol = function () {}; +``` + +```json +{ + "errors": [ + { + "messageId": "expected" + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +### `unicode-bom` + +Pass: 2 / 7 (28.6%) +Fail: 5 / 7 (71.4%) + +#### unicode-bom > valid + +```js + var a = 123; +``` + +```json +{ + "options": [ + "always" + ] +} +``` + +TypeError: Expected `loc` to be an object with integer `line` and `column` properties. + at getOffsetFromLineColumn (apps/oxlint/dist/lint.js) + at report (apps/oxlint/dist/lint.js) + at Object.report (apps/oxlint/dist/lint.js) + at checkUnicodeBOM (apps/oxlint/conformance/submodules/eslint/lib/rules/unicode-bom.js:49:14) + + +#### unicode-bom > invalid + +```js +var a = 123; +``` + +```json +{ + "output": "var a = 123;", + "options": [ + "always" + ], + "errors": [ + { + "messageId": "expected", + "line": 1, + "column": 1 + } + ] +} +``` + +TypeError: Expected `loc` to be an object with integer `line` and `column` properties. + at getOffsetFromLineColumn (apps/oxlint/dist/lint.js) + at report (apps/oxlint/dist/lint.js) + at Object.report (apps/oxlint/dist/lint.js) + at checkUnicodeBOM (apps/oxlint/conformance/submodules/eslint/lib/rules/unicode-bom.js:49:14) + + +#### unicode-bom > invalid + +```js + // here's a comment +var a = 123; +``` + +```json +{ + "output": " // here's a comment \nvar a = 123;", + "options": [ + "always" + ], + "errors": [ + { + "messageId": "expected", + "line": 1, + "column": 1 + } + ] +} +``` + +TypeError: Expected `loc` to be an object with integer `line` and `column` properties. + at getOffsetFromLineColumn (apps/oxlint/dist/lint.js) + at report (apps/oxlint/dist/lint.js) + at Object.report (apps/oxlint/dist/lint.js) + at checkUnicodeBOM (apps/oxlint/conformance/submodules/eslint/lib/rules/unicode-bom.js:49:14) + + +#### unicode-bom > invalid + +```js + var a = 123; +``` + +```json +{ + "output": " var a = 123;", + "errors": [ + { + "messageId": "unexpected", + "line": 1, + "column": 1 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +#### unicode-bom > invalid + +```js + var a = 123; +``` + +```json +{ + "output": " var a = 123;", + "options": [ + "never" + ], + "errors": [ + { + "messageId": "unexpected", + "line": 1, + "column": 1 + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + + +### `valid-typeof` + +Pass: 53 / 54 (98.1%) +Fail: 1 / 54 (1.9%) + +#### valid-typeof > invalid + +```js +if (typeof bar !== undefined) {} +``` + +```json +{ + "errors": [ + { + "messageId": "invalidValue", + "suggestions": [ + { + "messageId": "suggestString", + "data": { + "type": "undefined" + }, + "output": "if (typeof bar !== \"undefined\") {}" + } + ] + } + ] +} +``` + +AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: [] + +0 !== 1 + + at assertErrorCountIsCorrect (apps/oxlint/dist/index.js) + at assertInvalidTestCasePasses (apps/oxlint/dist/index.js) + at runInvalidTestCase (apps/oxlint/dist/index.js) + at apps/oxlint/dist/index.js + diff --git a/apps/oxlint/conformance/src/capture.ts b/apps/oxlint/conformance/src/capture.ts new file mode 100644 index 0000000000000..164826466cfb7 --- /dev/null +++ b/apps/oxlint/conformance/src/capture.ts @@ -0,0 +1,92 @@ +/* + * `describe` and `it` functions for capturing test results. + */ + +import type { TestCase } from "./rule_tester.ts"; + +/** + * Result of running all tests in a rule file. + */ +export interface RuleResult { + ruleName: string; + isLoadError: boolean; + loadError: Error | null; + tests: TestResult[]; +} + +/** + * Result of running a single test. + */ +export interface TestResult { + groupName: string; + code: string; + isPassed: boolean; + error: Error | null; + testCase: TestCase | null; +} + +// Tracks what nested `describe` blocks currently in +const describeStack: string[] = []; + +// Current rule being tested +let currentRule: RuleResult | null = null; + +/** + * Set the current rule being tested. + * Call before loading a file containing tests. + * @param rule - `RuleResult` object + */ +export function setCurrentRule(rule: RuleResult): void { + currentRule = rule; +} + +/** + * Reset the current rule being tested. + * Call after loading a file containing tests. + */ +export function resetCurrentRule(): void { + currentRule = null; +} + +/** + * `describe` function that tracks the test hierarchy. + * @param name - Name of the test group + * @param fn - Function to run tests in the group + */ +export function describe(name: string, fn: () => void): void { + describeStack.push(name); + try { + fn(); + } finally { + describeStack.pop(); + } +} + +/** + * `it` function that runs and records individual tests. + * @param name - Name of the test + * @param fn - Function to run test + */ +export function it(code: string, fn: () => void): void { + const testResult: TestResult = { + groupName: describeStack.join(" > "), + code, + isPassed: false, + error: null, + testCase: null, + }; + + try { + fn(); + testResult.isPassed = true; + } catch (err) { + testResult.error = err as Error; + testResult.testCase = err?.__testCase ?? null; + } + + currentRule!.tests.push(testResult); +} + +// Add `it.only` property for compatibility. +// `it.only` behaves the same as `it`. +it.only = (name: string, fn: () => void): void => it(name, fn); diff --git a/apps/oxlint/conformance/src/filter.ts b/apps/oxlint/conformance/src/filter.ts new file mode 100644 index 0000000000000..b393a65f2c121 --- /dev/null +++ b/apps/oxlint/conformance/src/filter.ts @@ -0,0 +1,6 @@ +// Options to filter tests to a specific rule or specific code. +// Useful for debugging a particular test case. +type Filter = string | string[]; + +export const FILTER_ONLY_RULE: Filter | null = null; +export const FILTER_ONLY_CODE: Filter | null = null; diff --git a/apps/oxlint/conformance/src/index.ts b/apps/oxlint/conformance/src/index.ts new file mode 100644 index 0000000000000..b7e6ac7719aad --- /dev/null +++ b/apps/oxlint/conformance/src/index.ts @@ -0,0 +1,60 @@ +/* + * ESLint Rule Tester Conformance Script + * + * This script runs ESLint's rule tests using Oxlint's RuleTester to verify API compatibility. + * + * It works by: + * 1. Patching NodeJS's CommonJS loader to substitute ESLint's `RuleTester` with Oxlint's. + * 2. Hooking `describe` and `it` to capture test results. + * 3. Loading each ESLint rule test file. + * 4. Recording success/failure of each test. + * 5. Outputting results to a markdown file. + */ + +import Module from "node:module"; +import { join as pathJoin } from "node:path"; +import fs from "node:fs"; +import { runAllTests, CONFORMANCE_DIR_PATH, ESLINT_ROOT_DIR_PATH } from "./run.ts"; +import { generateReport } from "./report.ts"; +import { RuleTester } from "./rule_tester.ts"; + +// NodeJS's `assert` seems to produce garbled error messages when colors are enabled in some cases. +// Stop it using control characters. +process.env.FORCE_COLOR = "0"; + +// Patch NodeJS's CommonJS loader to substitute ESLint's `RuleTester` with our own +const RULE_TESTER_PATH = pathJoin(ESLINT_ROOT_DIR_PATH, "lib/rule-tester/rule-tester.js"); + +const jsLoaderOriginal = (Module as any)._extensions[".js"]; +(Module as any)._extensions[".js"] = function (module: Module, path: string, ...args: any[]) { + if (path === RULE_TESTER_PATH) { + module.exports = RuleTester; + } else { + return jsLoaderOriginal.call(this, module, path, ...args); + } +}; + +// Run tests +const results = runAllTests(); + +// Write results to markdown file +// oxlint-disable no-console +const OUTPUT_FILE_PATH = pathJoin(CONFORMANCE_DIR_PATH, "snapshot.md"); + +const report = generateReport(results); +fs.writeFileSync(OUTPUT_FILE_PATH, report); +console.log(`\nResults written to: ${OUTPUT_FILE_PATH}`); + +// Print summary +const totalRuleCount = results.length; +const fullyPassingCount = results.filter( + (r) => !r.isLoadError && r.tests.length > 0 && r.tests.every((t) => t.isPassed), +).length; +const loadErrorCount = results.filter((r) => r.isLoadError).length; + +console.log("\n====================================="); +console.log("Summary:"); +console.log(` Total rules: ${totalRuleCount}`); +console.log(` Fully passing: ${fullyPassingCount}`); +console.log(` Load errors: ${loadErrorCount}`); +console.log(` With failures: ${totalRuleCount - fullyPassingCount - loadErrorCount}`); diff --git a/apps/oxlint/conformance/src/report.ts b/apps/oxlint/conformance/src/report.ts new file mode 100644 index 0000000000000..361bbbd87f104 --- /dev/null +++ b/apps/oxlint/conformance/src/report.ts @@ -0,0 +1,286 @@ +/* + * Function to generate a report of test results as markdown. + */ + +import { join as pathJoin, sep as pathSep } from "node:path"; +import { pathToFileURL } from "node:url"; +import { CONFORMANCE_DIR_PATH } from "./run.ts"; + +import type { RuleResult } from "./capture.ts"; +import type { TestCase } from "./rule_tester.ts"; + +// Number of lines of stack trace to show in report for each error +const STACK_TRACE_LINES = 4; + +const ROOT_DIR_PATH = pathJoin(CONFORMANCE_DIR_PATH, "../../../"); +const ROOT_DIR_URL = pathToFileURL(ROOT_DIR_PATH).href; +const DIST_DIR_SUBPATH = "apps/oxlint/dist"; + +// Replace backslashes with forward slashes on Windows. Do nothing on Mac/Linux. +const normalizeSlashes = + pathSep === "\\" ? (path: string) => path.replaceAll("\\", "/") : (path: string) => path; + +/** + * Generate report of test results as markdown. + * @param results - Results of running tests + * @returns Report as markdown + */ +export function generateReport(results: RuleResult[]): string { + const lines: string[] = []; + + // Header + lines.push("# ESLint Rule Tester Conformance Results"); + lines.push(""); + + // Summary statistics + const totalRuleCount = results.length; + const loadErrorCount = results.filter((r) => r.isLoadError).length; + const fullyPassingCount = results.filter( + (r) => !r.isLoadError && r.tests.length > 0 && r.tests.every((t) => t.isPassed), + ).length; + const partiallyPassingCount = results.filter( + (r) => + !r.isLoadError && + r.tests.length > 0 && + r.tests.some((t) => t.isPassed) && + r.tests.some((t) => !t.isPassed), + ).length; + const fullyFailingCount = results.filter( + (r) => !r.isLoadError && r.tests.length > 0 && r.tests.every((t) => !t.isPassed), + ).length; + const noTestsCount = results.filter((r) => !r.isLoadError && r.tests.length === 0).length; + + const totalTestCount = results.reduce((sum, r) => sum + r.tests.length, 0); + const passingTestCount = results.reduce( + (sum, r) => sum + r.tests.filter((t) => t.isPassed).length, + 0, + ); + const failingTestCount = totalTestCount - passingTestCount; + + lines.push("## Summary"); + lines.push(""); + lines.push("### Rules"); + lines.push(""); + lines.push(`| Status | Count |`); + lines.push(`| ----------------- | ----- |`); + lines.push(`| Total rules | ${String(totalRuleCount).padStart(5)} |`); + lines.push(`| Fully passing | ${String(fullyPassingCount).padStart(5)} |`); + lines.push(`| Partially passing | ${String(partiallyPassingCount).padStart(5)} |`); + lines.push(`| Fully failing | ${String(fullyFailingCount).padStart(5)} |`); + lines.push(`| Load errors | ${String(loadErrorCount).padStart(5)} |`); + lines.push(`| No tests run | ${String(noTestsCount).padStart(5)} |`); + lines.push(""); + + lines.push("### Tests"); + lines.push(""); + lines.push(`| Status | Count |`); + lines.push(`| ----------- | ----- |`); + lines.push(`| Total tests | ${String(totalTestCount).padStart(5)} |`); + lines.push(`| Passing | ${String(passingTestCount).padStart(5)} |`); + lines.push(`| Failing | ${String(failingTestCount).padStart(5)} |`); + lines.push(""); + + // Fully passing rules + lines.push("## Fully Passing Rules"); + lines.push(""); + const passingRules = results.filter( + (r) => !r.isLoadError && r.tests.length > 0 && r.tests.every((t) => t.isPassed), + ); + if (passingRules.length === 0) { + lines.push("No rules fully passing"); + } else { + for (const rule of passingRules) { + lines.push(`- \`${rule.ruleName}\` (${rule.tests.length} tests)`); + } + } + lines.push(""); + + // Rules with failures + lines.push("## Rules with Failures"); + lines.push(""); + const failingRules = results.filter( + (r) => r.tests.length > 0 && r.tests.some((t) => !t.isPassed), + ); + if (failingRules.length === 0) { + lines.push("No rules with failures"); + } else { + for (const rule of failingRules) { + const passedCount = rule.tests.filter((t) => t.isPassed).length; + const failedCount = rule.tests.filter((t) => !t.isPassed).length; + const totalCount = rule.tests.length; + const passPercent = ((passedCount / totalCount) * 100).toFixed(1); + const failPercent = ((failedCount / totalCount) * 100).toFixed(1); + + lines.push(`### \`${rule.ruleName}\``); + lines.push(""); + lines.push(`Pass: ${passedCount} / ${totalCount} (${passPercent}%)`); + lines.push(`Fail: ${failedCount} / ${totalCount} (${failPercent}%)`); + lines.push(""); + + // List failed tests inline + for (const test of rule.tests) { + if (test.isPassed) continue; + + lines.push(`#### ${test.groupName}`); + lines.push(""); + + lines.push("```js"); + lines.push(test.code); + lines.push("```"); + lines.push(""); + + const testCaseStr = formatTestCase(test.testCase, test.code); + if (testCaseStr !== null) { + lines.push("```json"); + lines.push(testCaseStr); + lines.push("```"); + lines.push(""); + } + + lines.push(formatError(test.error)); + lines.push(""); + } + } + } + + // Load errors + const loadErrorRules = results.filter((r) => r.isLoadError); + if (loadErrorRules.length > 0) { + lines.push("## Load Errors"); + lines.push(""); + + for (const rule of loadErrorRules) { + lines.push(`### \`${rule.ruleName}\``); + lines.push(""); + lines.push(formatError(rule.loadError)); + lines.push(""); + } + + lines.push(""); + } + + // Rules with no tests + const noTestRules = results.filter((r) => !r.isLoadError && r.tests.length === 0); + if (noTestRules.length > 0) { + lines.push("## Rules with no tests run"); + lines.push(""); + + for (const rule of noTestRules) { + lines.push(`- \`${rule.ruleName}\``); + } + + lines.push(""); + } + + return lines.join("\n"); +} + +// Regex to match ANSI escape sequences (colors, formatting, etc.) +// Matches ESC[ followed by parameters and command letter +// eslint-disable-next-line no-control-regex +const ANSI_ESCAPE_REGEX = /\x1B\[[0-9;]*[a-zA-Z]/gu; + +// Regex to match other control characters (except tab, newline, carriage return) +// eslint-disable-next-line no-control-regex +const CONTROL_CHAR_REGEX = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F]/gu; + +/** + * Clean a string for output. + * Remove ANSI escape sequences and control characters from a string. + * Keeps tab, newline, and carriage return. + * @param str - String to clean + * @returns Cleaned string + */ +function cleanString(str: string): string { + return str.replace(ANSI_ESCAPE_REGEX, "").replace(CONTROL_CHAR_REGEX, ""); +} + +const STACK_LINE_REGEX = /^ at ([^ ]+ \()(.+)(:\d+:\d+)\)$/u; +const STACK_LINE_REGEX2 = /^ at (.+)(:\d+:\d+)$/u; + +/** + * Format an error for markdown output. + * Includes error message followed by stack trace lines. + * Number of lines of stack trace is limited to max `STACK_TRACE_LINES`. + * + * @param err - Error to format + * @returns Error formatted as string + */ +function formatError(err: Error | null): string { + if (!err) return "Unknown error"; + + const stack = err.stack || ""; + const lines = stack.split("\n"); + + // Print error message + let out = "", + lineIndex = 0; + for (; lineIndex < lines.length; lineIndex++) { + const line = lines[lineIndex]; + if (line.startsWith(" at ")) break; + out += `${cleanString(line)}\n`; + } + + // Print stack trace. + // Limit to first `STACK_TRACE_LINES` lines. + // Convert paths to relative to repo root, and forward slashes on Windows. + // For files in `apps/oxlint/dist`, remove line column - it produces churn in report when Oxc's code is altered. + for (let i = 0; i < STACK_TRACE_LINES && lineIndex < lines.length; i++) { + const line = lines[lineIndex]; + + let prefix, path, lineCol, postfix; + let match = line.match(STACK_LINE_REGEX); + if (match) { + [, prefix, path, lineCol] = match; + postfix = ")"; + } else { + match = line.match(STACK_LINE_REGEX2); + if (!match) break; + [, path, lineCol] = match; + prefix = ""; + postfix = ""; + } + + if (path.startsWith("file://")) { + if (path.startsWith(ROOT_DIR_URL)) { + path = path.slice(ROOT_DIR_URL.length); + if (path.startsWith(DIST_DIR_SUBPATH)) lineCol = ""; + } + } else { + if (path.startsWith(ROOT_DIR_PATH)) { + path = normalizeSlashes(path.slice(ROOT_DIR_PATH.length)); + if (path.startsWith(DIST_DIR_SUBPATH)) lineCol = ""; + } else { + path = normalizeSlashes(path); + } + } + + out += ` at ${prefix}${path}${lineCol}${postfix}\n`; + lineIndex++; + } + + return out; +} + +/** + * Format a test case as JSON. + * @param testCase - Test case to format + * @returns Test case formatted as JSON string, or `null` if not present, or could not format + */ +function formatTestCase(testCase: TestCase | null, code: string): string | null { + if (!testCase) return null; + + testCase = { ...testCase }; + + // Remove `eslintCompat` option - it's always `true` + testCase.eslintCompat = undefined; + + // Remove `code` property if it's the same as the test case's code + if (testCase.code === code) (testCase as { code?: string }).code = undefined; + + try { + return JSON.stringify(testCase, null, 2); + } catch { + return null; + } +} diff --git a/apps/oxlint/conformance/src/rule_tester.ts b/apps/oxlint/conformance/src/rule_tester.ts new file mode 100644 index 0000000000000..6723b9c66557b --- /dev/null +++ b/apps/oxlint/conformance/src/rule_tester.ts @@ -0,0 +1,85 @@ +/* + * Shim of `RuleTester` class. + */ + +import { RuleTester } from "#oxlint"; +import { describe, it } from "./capture.ts"; +import { FILTER_ONLY_CODE } from "./filter.ts"; + +import type { Rule } from "#oxlint"; + +type DescribeFn = RuleTester.DescribeFn; +type ItFn = RuleTester.ItFn; +type TestCases = RuleTester.TestCases; +type ValidTestCase = RuleTester.ValidTestCase; +type InvalidTestCase = RuleTester.InvalidTestCase; +export type TestCase = ValidTestCase | InvalidTestCase; + +const { isArray } = Array; + +// Set up `RuleTester` to use our hooks +RuleTester.describe = describe; +RuleTester.it = it; + +/** + * Shim of `RuleTester` class. + * Prevents overriding `describe` and `it` properties. + */ +class RuleTesterShim extends RuleTester { + // Prevent changing `describe` or `it` properties + + static get describe(): DescribeFn { + return describe; + } + + static set describe(_value: DescribeFn) { + throw new Error("Cannot override `describe` property"); + } + + static get it(): ItFn { + return it; + } + + static set it(_value: ItFn) { + throw new Error("Cannot override `it` property"); + } + + static get itOnly(): ItFn { + return it.only; + } + + static set itOnly(_value: ItFn) { + throw new Error("Cannot override `itOnly` property"); + } + + // Apply filter to test cases. + run(ruleName: string, rule: Rule, tests: TestCases): void { + if (FILTER_ONLY_CODE !== null) { + const codeMatchesFilter = isArray(FILTER_ONLY_CODE) + ? (code: string) => FILTER_ONLY_CODE!.includes(code) + : (code: string) => code === FILTER_ONLY_CODE; + + tests = { + valid: tests.valid.filter((test) => { + const code = typeof test === "string" ? test : test.code; + return codeMatchesFilter(code); + }), + invalid: tests.invalid.filter((test) => codeMatchesFilter(test.code)), + }; + } + + super.run(ruleName, rule, tests); + } +} + +// Register hook to modify test cases before they are run. +// `registerModifyTestCaseHook` is only present in debug builds, so it's not part of the `RuleTester` type def. +(RuleTester as any).registerModifyTestCaseHook(modifyTestCase); + +function modifyTestCase(test: TestCase): void { + // Enable ESLint compat mode. + // This makes `RuleTester` adjust column indexes in diagnostics to match ESLint's behavior. + test.eslintCompat = true; +} + +export { RuleTesterShim as RuleTester }; diff --git a/apps/oxlint/conformance/src/run.ts b/apps/oxlint/conformance/src/run.ts new file mode 100644 index 0000000000000..be272364978e8 --- /dev/null +++ b/apps/oxlint/conformance/src/run.ts @@ -0,0 +1,110 @@ +/* + * Function to run all ESLint rule tests. + */ + +import fs from "node:fs"; +import { join as pathJoin } from "node:path"; +import { fileURLToPath } from "node:url"; +import Module from "node:module"; +import { setCurrentRule, resetCurrentRule } from "./capture.ts"; +import { FILTER_ONLY_RULE } from "./filter.ts"; + +import type { RuleResult } from "./capture.ts"; + +const { isArray } = Array; + +// Paths +export const CONFORMANCE_DIR_PATH = pathJoin(fileURLToPath(import.meta.url), "../.."); +export const ESLINT_ROOT_DIR_PATH = pathJoin(CONFORMANCE_DIR_PATH, "submodules/eslint"); +const ESLINT_RULES_TESTS_DIR_PATH = pathJoin(ESLINT_ROOT_DIR_PATH, "tests/lib/rules"); + +// Create require function for loading CommonJS modules +const require = Module.createRequire(import.meta.url); + +/** + * Run all ESLint rule tests. + * @returns Results of running tests + */ +// oxlint-disable no-console +export function runAllTests(): RuleResult[] { + console.log("Finding ESLint rule test files..."); + + const ruleNames = findTestFiles(); + + console.log(`Found ${ruleNames.length} test files\n`); + + const results = []; + for (let i = 0; i < ruleNames.length; i++) { + const ruleName = ruleNames[i]; + process.stdout.write(`[${i + 1}/${ruleNames.length}] Testing ${ruleName}...`); + + const result = runRuleTests(ruleName); + results.push(result); + + if (result.isLoadError) { + console.log(" LOAD ERROR"); + } else { + const passed = result.tests.filter((t) => t.isPassed).length; + const total = result.tests.length; + const status = passed === total ? "PASS" : "FAIL"; + console.log(` ${status} (${passed}/${total})`); + } + } + + return results; +} +// oxlint-enable no-console + +/** + * Find all ESLint rule test files. + * @returns Names of rule test files (without `.js` extension) + */ +function findTestFiles(): string[] { + const filenames = fs.readdirSync(ESLINT_RULES_TESTS_DIR_PATH); + + const ruleNameMatchesFilter = + FILTER_ONLY_RULE === null + ? null + : isArray(FILTER_ONLY_RULE) + ? (ruleName: string) => FILTER_ONLY_RULE!.includes(ruleName) + : (ruleName: string) => ruleName === FILTER_ONLY_RULE; + + const ruleNames = []; + for (const filename of filenames) { + if (!filename.endsWith(".js")) continue; + const ruleName = filename.slice(0, -3); + if (ruleNameMatchesFilter !== null && !ruleNameMatchesFilter(ruleName)) continue; + ruleNames.push(ruleName); + } + return ruleNames; +} + +/** + * Run tests for a single rule file. + * @param ruleName - Rule name + * @returns Results of running tests for rule + */ +function runRuleTests(ruleName: string): RuleResult { + const result: RuleResult = { + ruleName, + isLoadError: false, + loadError: null, + tests: [], + }; + + setCurrentRule(result); + + // Load the test file - this will execute the tests + const path = pathJoin(ESLINT_RULES_TESTS_DIR_PATH, `${ruleName}.js`); + + try { + require(path); + } catch (err) { + result.isLoadError = true; + result.loadError = err as Error; + } + + resetCurrentRule(); + + return result; +} diff --git a/apps/oxlint/fixtures/overrides_env_globals/.oxlintrc.json b/apps/oxlint/fixtures/overrides_env_globals/.oxlintrc.json index 2e10a114b917d..cb2b8800befcd 100644 --- a/apps/oxlint/fixtures/overrides_env_globals/.oxlintrc.json +++ b/apps/oxlint/fixtures/overrides_env_globals/.oxlintrc.json @@ -14,7 +14,7 @@ "jquery": false }, "globals": { - "Foo": "writeable" + "Foo": "writable" } }, { @@ -25,8 +25,8 @@ "jquery": false }, "globals": { - "Foo": "writeable" + "Foo": "writable" } } ] -} \ No newline at end of file +} diff --git a/apps/oxlint/package.json b/apps/oxlint/package.json index 850fc5684bd9c..ea852858c14de 100644 --- a/apps/oxlint/package.json +++ b/apps/oxlint/package.json @@ -1,6 +1,6 @@ { "name": "oxlint-app", - "version": "1.31.0", + "version": "1.32.0", "private": true, "type": "module", "main": "dist/index.js", @@ -14,7 +14,9 @@ "build-napi-test": "pnpm run build-napi --features force_test_reporter", "build-napi-release": "pnpm run build-napi --release --features allocator", "build-js": "node scripts/build.ts", - "test": "tsc && vitest --dir ./test run" + "test": "tsc && vitest --dir ./test run", + "init-conformance": "cd conformance; ./init.sh", + "conformance": "node ./conformance/src/index.ts" }, "engines": { "node": "^20.19.0 || >=22.12.0" @@ -23,7 +25,7 @@ "@types/esquery": "^1.5.4", "@types/estree": "^1.0.8", "@types/json-stable-stringify-without-jsonify": "^1.0.2", - "@typescript-eslint/scope-manager": "8.46.2", + "@typescript-eslint/scope-manager": "8.48.1", "@typescript-eslint/typescript-estree": "^8.47.0", "cross-env": "catalog:", "eslint": "^9.36.0", @@ -31,7 +33,7 @@ "execa": "^9.6.0", "jiti": "^2.6.0", "json-stable-stringify-without-jsonify": "^1.0.1", - "oxc-parser": "^0.101.0", + "oxc-parser": "^0.102.0", "rolldown": "catalog:", "tsdown": "catalog:", "type-fest": "^5.2.0", diff --git a/apps/oxlint/src-js/bindings.d.ts b/apps/oxlint/src-js/bindings.d.ts index 7464d4460cc59..bf10a985b6b4c 100644 --- a/apps/oxlint/src-js/bindings.d.ts +++ b/apps/oxlint/src-js/bindings.d.ts @@ -1,5 +1,31 @@ /* auto-generated by NAPI-RS */ /* eslint-disable */ +export interface Comment { + type: 'Line' | 'Block' + value: string + start: number + end: number +} + +export interface ErrorLabel { + message: string | null + start: number + end: number +} + +export interface OxcError { + severity: Severity + message: string + labels: Array + helpMessage: string | null + codeframe: string | null +} + +export declare const enum Severity { + Error = 'Error', + Warning = 'Warning', + Advice = 'Advice' +} /** * Get offset within a `Uint8Array` which is aligned on `BUFFER_ALIGN`. * @@ -59,7 +85,16 @@ export declare function lint(args: Array, loadPlugin: JsLoadPluginCb, se * * Panics if source text is too long, or AST takes more memory than is available in the buffer. */ -export declare function parseRawSync(filename: string, buffer: Uint8Array, sourceLen: number): void +export declare function parseRawSync(filename: string, buffer: Uint8Array, sourceLen: number, options?: ParserOptions | undefined | null): void + +export interface ParserOptions { + /** Treat the source text as `js`, `jsx`, `ts`, `tsx` or `dts`. */ + lang?: 'js' | 'jsx' | 'ts' | 'tsx' | 'dts' + /** Treat the source text as `script` or `module` code. */ + sourceType?: 'script' | 'module' | 'unambiguous' | undefined + /** Ignore non-fatal parsing errors */ + ignoreNonFatalErrors?: boolean +} /** Returns `true` if raw transfer is supported on this platform. */ export declare function rawTransferSupported(): boolean diff --git a/apps/oxlint/src-js/bindings.js b/apps/oxlint/src-js/bindings.js index 1a8d9a943d228..945c56239287e 100644 --- a/apps/oxlint/src-js/bindings.js +++ b/apps/oxlint/src-js/bindings.js @@ -81,8 +81,8 @@ function requireNative() { try { const binding = require('@oxlint/android-arm64') const bindingPackageVersion = require('@oxlint/android-arm64/package.json').version - if (bindingPackageVersion !== '1.31.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 1.31.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '1.32.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 1.32.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -97,8 +97,8 @@ function requireNative() { try { const binding = require('@oxlint/android-arm-eabi') const bindingPackageVersion = require('@oxlint/android-arm-eabi/package.json').version - if (bindingPackageVersion !== '1.31.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 1.31.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '1.32.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 1.32.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -118,8 +118,8 @@ function requireNative() { try { const binding = require('@oxlint/win32-x64-gnu') const bindingPackageVersion = require('@oxlint/win32-x64-gnu/package.json').version - if (bindingPackageVersion !== '1.31.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 1.31.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '1.32.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 1.32.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -134,8 +134,8 @@ function requireNative() { try { const binding = require('@oxlint/win32-x64') const bindingPackageVersion = require('@oxlint/win32-x64/package.json').version - if (bindingPackageVersion !== '1.31.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 1.31.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '1.32.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 1.32.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -151,8 +151,8 @@ function requireNative() { try { const binding = require('@oxlint/win32-ia32') const bindingPackageVersion = require('@oxlint/win32-ia32/package.json').version - if (bindingPackageVersion !== '1.31.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 1.31.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '1.32.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 1.32.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -167,8 +167,8 @@ function requireNative() { try { const binding = require('@oxlint/win32-arm64') const bindingPackageVersion = require('@oxlint/win32-arm64/package.json').version - if (bindingPackageVersion !== '1.31.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 1.31.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '1.32.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 1.32.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -186,8 +186,8 @@ function requireNative() { try { const binding = require('@oxlint/darwin-universal') const bindingPackageVersion = require('@oxlint/darwin-universal/package.json').version - if (bindingPackageVersion !== '1.31.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 1.31.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '1.32.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 1.32.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -202,8 +202,8 @@ function requireNative() { try { const binding = require('@oxlint/darwin-x64') const bindingPackageVersion = require('@oxlint/darwin-x64/package.json').version - if (bindingPackageVersion !== '1.31.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 1.31.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '1.32.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 1.32.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -218,8 +218,8 @@ function requireNative() { try { const binding = require('@oxlint/darwin-arm64') const bindingPackageVersion = require('@oxlint/darwin-arm64/package.json').version - if (bindingPackageVersion !== '1.31.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 1.31.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '1.32.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 1.32.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -238,8 +238,8 @@ function requireNative() { try { const binding = require('@oxlint/freebsd-x64') const bindingPackageVersion = require('@oxlint/freebsd-x64/package.json').version - if (bindingPackageVersion !== '1.31.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 1.31.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '1.32.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 1.32.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -254,8 +254,8 @@ function requireNative() { try { const binding = require('@oxlint/freebsd-arm64') const bindingPackageVersion = require('@oxlint/freebsd-arm64/package.json').version - if (bindingPackageVersion !== '1.31.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 1.31.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '1.32.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 1.32.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -275,8 +275,8 @@ function requireNative() { try { const binding = require('@oxlint/linux-x64-musl') const bindingPackageVersion = require('@oxlint/linux-x64-musl/package.json').version - if (bindingPackageVersion !== '1.31.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 1.31.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '1.32.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 1.32.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -291,8 +291,8 @@ function requireNative() { try { const binding = require('@oxlint/linux-x64-gnu') const bindingPackageVersion = require('@oxlint/linux-x64-gnu/package.json').version - if (bindingPackageVersion !== '1.31.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 1.31.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '1.32.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 1.32.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -309,8 +309,8 @@ function requireNative() { try { const binding = require('@oxlint/linux-arm64-musl') const bindingPackageVersion = require('@oxlint/linux-arm64-musl/package.json').version - if (bindingPackageVersion !== '1.31.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 1.31.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '1.32.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 1.32.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -325,8 +325,8 @@ function requireNative() { try { const binding = require('@oxlint/linux-arm64-gnu') const bindingPackageVersion = require('@oxlint/linux-arm64-gnu/package.json').version - if (bindingPackageVersion !== '1.31.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 1.31.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '1.32.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 1.32.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -343,8 +343,8 @@ function requireNative() { try { const binding = require('@oxlint/linux-arm-musleabihf') const bindingPackageVersion = require('@oxlint/linux-arm-musleabihf/package.json').version - if (bindingPackageVersion !== '1.31.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 1.31.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '1.32.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 1.32.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -359,8 +359,8 @@ function requireNative() { try { const binding = require('@oxlint/linux-arm-gnueabihf') const bindingPackageVersion = require('@oxlint/linux-arm-gnueabihf/package.json').version - if (bindingPackageVersion !== '1.31.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 1.31.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '1.32.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 1.32.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -377,8 +377,8 @@ function requireNative() { try { const binding = require('@oxlint/linux-loong64-musl') const bindingPackageVersion = require('@oxlint/linux-loong64-musl/package.json').version - if (bindingPackageVersion !== '1.31.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 1.31.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '1.32.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 1.32.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -393,8 +393,8 @@ function requireNative() { try { const binding = require('@oxlint/linux-loong64-gnu') const bindingPackageVersion = require('@oxlint/linux-loong64-gnu/package.json').version - if (bindingPackageVersion !== '1.31.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 1.31.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '1.32.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 1.32.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -411,8 +411,8 @@ function requireNative() { try { const binding = require('@oxlint/linux-riscv64-musl') const bindingPackageVersion = require('@oxlint/linux-riscv64-musl/package.json').version - if (bindingPackageVersion !== '1.31.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 1.31.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '1.32.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 1.32.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -427,8 +427,8 @@ function requireNative() { try { const binding = require('@oxlint/linux-riscv64-gnu') const bindingPackageVersion = require('@oxlint/linux-riscv64-gnu/package.json').version - if (bindingPackageVersion !== '1.31.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 1.31.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '1.32.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 1.32.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -444,8 +444,8 @@ function requireNative() { try { const binding = require('@oxlint/linux-ppc64-gnu') const bindingPackageVersion = require('@oxlint/linux-ppc64-gnu/package.json').version - if (bindingPackageVersion !== '1.31.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 1.31.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '1.32.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 1.32.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -460,8 +460,8 @@ function requireNative() { try { const binding = require('@oxlint/linux-s390x-gnu') const bindingPackageVersion = require('@oxlint/linux-s390x-gnu/package.json').version - if (bindingPackageVersion !== '1.31.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 1.31.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '1.32.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 1.32.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -480,8 +480,8 @@ function requireNative() { try { const binding = require('@oxlint/openharmony-arm64') const bindingPackageVersion = require('@oxlint/openharmony-arm64/package.json').version - if (bindingPackageVersion !== '1.31.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 1.31.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '1.32.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 1.32.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -496,8 +496,8 @@ function requireNative() { try { const binding = require('@oxlint/openharmony-x64') const bindingPackageVersion = require('@oxlint/openharmony-x64/package.json').version - if (bindingPackageVersion !== '1.31.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 1.31.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '1.32.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 1.32.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -512,8 +512,8 @@ function requireNative() { try { const binding = require('@oxlint/openharmony-arm') const bindingPackageVersion = require('@oxlint/openharmony-arm/package.json').version - if (bindingPackageVersion !== '1.31.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 1.31.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '1.32.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 1.32.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -575,7 +575,8 @@ if (!nativeBinding) { throw new Error(`Failed to load native binding`) } -const { getBufferOffset, lint, parseRawSync, rawTransferSupported } = nativeBinding +const { Severity, getBufferOffset, lint, parseRawSync, rawTransferSupported } = nativeBinding +export { Severity } export { getBufferOffset } export { lint } export { parseRawSync } diff --git a/apps/oxlint/src-js/generated/deserialize.js b/apps/oxlint/src-js/generated/deserialize.js index eeb50e6b2d993..5d2f24a3bcf08 100644 --- a/apps/oxlint/src-js/generated/deserialize.js +++ b/apps/oxlint/src-js/generated/deserialize.js @@ -5651,6 +5651,8 @@ function deserializeCommentKind(pos) { return "Line"; case 1: return "Block"; + case 2: + return "Block"; default: throw Error(`Unexpected discriminant ${uint8[pos]} for CommentKind`); } diff --git a/apps/oxlint/src-js/generated/keys.ts b/apps/oxlint/src-js/generated/keys.ts index 572848bc09f1b..8c9d47af97690 100644 --- a/apps/oxlint/src-js/generated/keys.ts +++ b/apps/oxlint/src-js/generated/keys.ts @@ -177,7 +177,7 @@ export default freeze({ TSExternalModuleReference: EXPRESSION, TSFunctionType: TYPE_PARAMETERS__PARAMS__RETURN_TYPE, TSImportEqualsDeclaration: freeze(["id", "moduleReference"]), - TSImportType: freeze(["argument", "options", "qualifier", "typeArguments"]), + TSImportType: freeze(["source", "options", "qualifier", "typeArguments"]), TSIndexSignature: freeze(["parameters", "typeAnnotation"]), TSIndexedAccessType: freeze(["objectType", "indexType"]), TSInferType: freeze(["typeParameter"]), diff --git a/apps/oxlint/src-js/generated/walk.js b/apps/oxlint/src-js/generated/walk.js index 06dffb5f37688..0fb607b2fc930 100644 --- a/apps/oxlint/src-js/generated/walk.js +++ b/apps/oxlint/src-js/generated/walk.js @@ -2152,7 +2152,7 @@ function walkTSImportType(node, visitors) { enter !== null && enter(node); } ancestors.unshift(node); - walkNode(node.argument, visitors); + walkNode(node.source, visitors); walkNode(node.options, visitors); walkNode(node.qualifier, visitors); walkNode(node.typeArguments, visitors); diff --git a/apps/oxlint/src-js/package/parse.ts b/apps/oxlint/src-js/package/parse.ts index 21cc6783864c3..0a2d03af3543f 100644 --- a/apps/oxlint/src-js/package/parse.ts +++ b/apps/oxlint/src-js/package/parse.ts @@ -8,6 +8,9 @@ import { buffers } from "../plugins/lint.ts"; import { BUFFER_SIZE, BUFFER_ALIGN, DATA_POINTER_POS_32 } from "../generated/constants.ts"; import type { BufferWithArrays } from "../plugins/types.ts"; +import type { ParserOptions as ParseOptions } from "../bindings.js"; + +export type { ParseOptions }; // Size array buffer for raw transfer const ARRAY_BUFFER_SIZE = BUFFER_SIZE + BUFFER_ALIGN; @@ -28,9 +31,10 @@ let rawTransferIsSupported: boolean | null = null; * Parser source text into buffer. * @param path - Path of file to parse * @param sourceText - Source text to parse + * @param options - Parsing options * @throws {Error} If raw transfer is not supported on this platform, or parsing failed */ -export function parse(path: string, sourceText: string) { +export function parse(path: string, sourceText: string, options?: ParseOptions) { if (!rawTransferSupported()) { throw new Error( "`RuleTester` is not supported on 32-bit or big-endian systems, versions of NodeJS prior to v22.0.0, " + @@ -50,7 +54,7 @@ export function parse(path: string, sourceText: string) { if (read !== sourceText.length) throw new Error("Failed to write source text into buffer"); // Parse into buffer - parseRawSync(path, buffer, sourceByteLen); + parseRawSync(path, buffer, sourceByteLen, options); // Check parsing succeeded. // 0 is used as sentinel value to indicate parsing failed. diff --git a/apps/oxlint/src-js/package/rule_tester.ts b/apps/oxlint/src-js/package/rule_tester.ts index d6bd12c4bc3ab..3993aa4bfe203 100644 --- a/apps/oxlint/src-js/package/rule_tester.ts +++ b/apps/oxlint/src-js/package/rule_tester.ts @@ -27,6 +27,7 @@ import type { RequireAtLeastOne } from "type-fest"; import type { Plugin, Rule } from "../plugins/load.ts"; import type { Options } from "../plugins/options.ts"; import type { DiagnosticData, Suggestion } from "../plugins/report.ts"; +import type { ParseOptions } from "./parse.ts"; const { hasOwn } = Object, { isArray } = Array; @@ -117,26 +118,93 @@ interface Config { * If `true`, column offsets in diagnostics are incremented by 1, to match ESLint's behavior. */ eslintCompat?: boolean; - [key: string]: unknown; + languageOptions?: LanguageOptions; } -// Default shared config -const DEFAULT_SHARED_CONFIG: Config = { - eslintCompat: false, -}; +/** + * Language options config. + */ +interface LanguageOptions { + ecmaVersion?: number | "latest"; + sourceType?: SourceType; + globals?: Record< + string, + boolean | "true" | "writable" | "writeable" | "false" | "readonly" | "readable" | "off" | null + >; + parser?: { + parse?: (code: string, options?: Record) => unknown; + parseForESLint?: (code: string, options?: Record) => unknown; + }; + parserOptions?: ParserOptions; +} + +/** + * Source type. + * + * - `'unambiguous'` is not supported in ESLint compatibility mode. + * - `'commonjs'` is only supported in ESLint compatibility mode. + */ +type SourceType = "script" | "module" | "unambiguous" | "commonjs"; + +/** + * Parser options config. + */ +interface ParserOptions { + ecmaFeatures?: EcmaFeatures; + /** + * Language variant to parse file as. + */ + lang?: Language; + /** + * `true` to ignore non-fatal parsing errors. + */ + ignoreNonFatalErrors?: boolean; +} + +/** + * ECMA features config. + */ +interface EcmaFeatures { + /** + * `true` to enable JSX parsing. + * + * `parserOptions.lang` takes priority over this option, if `lang` is specified. + */ + jsx?: boolean; +} + +/** + * Parser language. + */ +type Language = "js" | "jsx" | "ts" | "tsx" | "dts"; // `RuleTester` uses this config as its default. Can be overwritten via `RuleTester.setDefaultConfig()`. -// Clone, so that user can't get `DEFAULT_SHARED_CONFIG` with `getDefaultConfig()` and modify it. -let sharedConfig: Config = { ...DEFAULT_SHARED_CONFIG }; +let sharedConfig: Config = {}; // ------------------------------------------------------------------------------ // Test cases // ------------------------------------------------------------------------------ +// List of keys that `ValidTestCase` or `InvalidTestCase` can have. +// Must be kept in sync with properties of `ValidTestCase` and `InvalidTestCase` interfaces. +const TEST_CASE_PROP_KEYS = new Set([ + "code", + "name", + "only", + "filename", + "options", + "before", + "after", + "output", + "errors", + // Not a valid key for `TestCase` interface, but present here to prevent prototype pollution in `createConfigForRun` + "__proto__", +]); + /** * Test case. */ -interface TestCase { +interface TestCase extends Config { code: string; name?: string; only?: boolean; @@ -144,11 +212,6 @@ interface TestCase { options?: Options; before?: (this: this) => void; after?: (this: this) => void; - /** - * `true` to enable ESLint compatibility mode. - * See `Config` type. - */ - eslintCompat?: boolean; } /** @@ -208,8 +271,8 @@ interface Diagnostic { suggestions: Suggestion[] | null; } -// Default path for test cases if not provided -const DEFAULT_PATH = "file.js"; +// Default path (without extension) for test cases if not provided +const DEFAULT_FILENAME_BASE = "file"; // ------------------------------------------------------------------------------ // `RuleTester` class @@ -225,8 +288,14 @@ export class RuleTester { * Creates a new instance of RuleTester. * @param config? - Extra configuration for the tester (optional) */ - constructor(config?: Config) { - this.#config = config === undefined ? null : config; + constructor(config?: Config | null) { + if (config === undefined) { + config = null; + } else if (config !== null && typeof config !== "object") { + throw new TypeError("`config` must be an object if provided"); + } + + this.#config = config; } /** @@ -255,8 +324,7 @@ export class RuleTester { * @returns {void} */ static resetDefaultConfig() { - // Clone, so that user can't get `DEFAULT_SHARED_CONFIG` with `getDefaultConfig()` and modify it - sharedConfig = { ...DEFAULT_SHARED_CONFIG }; + sharedConfig = {}; } // Getters/setters for `describe` and `it` functions @@ -315,7 +383,7 @@ export class RuleTester { rules: { [ruleName]: rule }, }; - const config: Config = createConfigForRun(this.#config); + const config = createConfigForRun(this.#config); describe(ruleName, () => { if (tests.valid.length > 0) { @@ -347,6 +415,17 @@ export class RuleTester { } } +// In debug builds only, we provide a hook to modify test cases before they're run. +// Hook can be registered by calling `RuleTester.registerModifyTestCaseHook`. +// This is used in conformance tester. +let modifyTestCase: ((test: TestCase) => void) | null = null; + +if (DEBUG) { + (RuleTester as any).registerModifyTestCaseHook = (alter: (test: TestCase) => void) => { + modifyTestCase = alter; + }; +} + /** * Run valid test case. * @param test - Valid test case @@ -378,9 +457,9 @@ function runValidTestCase( * @throws {AssertionError} If the test case fails */ function assertValidTestCasePasses(test: ValidTestCase, plugin: Plugin, config: Config): void { - config = createConfigForTest(test, config); + test = mergeConfigIntoTestCase(test, config); - const diagnostics = lint(test, plugin, config); + const diagnostics = lint(test, plugin); assertErrorCountIsCorrect(diagnostics, 0); } @@ -416,9 +495,9 @@ function runInvalidTestCase( * @throws {AssertionError} If the test case fails */ function assertInvalidTestCasePasses(test: InvalidTestCase, plugin: Plugin, config: Config): void { - config = createConfigForTest(test, config); + test = mergeConfigIntoTestCase(test, config); - const diagnostics = lint(test, plugin, config); + const diagnostics = lint(test, plugin); const { errors } = test; if (typeof errors === "number") { @@ -445,7 +524,7 @@ function assertInvalidTestCasePasses(test: InvalidTestCase, plugin: Plugin, conf } else { // `error` is an error object assertInvalidTestCaseMessageIsCorrect(diagnostic, error, messages); - assertInvalidTestCaseLocationIsCorrect(diagnostic, error, config); + assertInvalidTestCaseLocationIsCorrect(diagnostic, error, test); // TODO: Test suggestions } @@ -543,7 +622,7 @@ function assertInvalidTestCaseMessageIsCorrect( function assertInvalidTestCaseLocationIsCorrect( diagnostic: Diagnostic, error: Error, - config: Config, + test: TestCase, ) { interface Location { line?: number; @@ -555,7 +634,7 @@ function assertInvalidTestCaseLocationIsCorrect( const actualLocation: Location = {}; const expectedLocation: Location = {}; - const columnOffset = config.eslintCompat === true ? 1 : 0; + const columnOffset = test.eslintCompat === true ? 1 : 0; if (hasOwn(error, "line")) { actualLocation.line = diagnostic.line; @@ -655,54 +734,170 @@ function getMessagePlaceholders(message: string): string[] { return Array.from(message.matchAll(PLACEHOLDER_REGEX), ([, name]) => name.trim()); } +// In debug builds, wrap `runValidTestCase` and `runInvalidTestCase` to add test case to error object. +// This is used in conformance tests. +type RunFunction = (test: T, plugin: Plugin, config: Config, seenTestCases: Set) => void; + +function wrapRunTestCaseFunction( + run: RunFunction, +): RunFunction { + return function (test, plugin, config, seenTestCases) { + try { + run(test, plugin, config, seenTestCases); + } catch (err) { + // oxlint-disable-next-line no-ex-assign + if (typeof err !== "object" || err === null) err = new Error("Unknown error"); + err.__testCase = test; + throw err; + } + }; +} + +if (DEBUG) { + // oxlint-disable-next-line no-func-assign + (runValidTestCase as any) = wrapRunTestCaseFunction(runValidTestCase); + // oxlint-disable-next-line no-func-assign + (runInvalidTestCase as any) = wrapRunTestCaseFunction(runInvalidTestCase); +} + /** * Create config for a test run. - * Merges config from `RuleTester` instance with shared config. + * Merges config from `RuleTester` instance on top of shared config. + * Removes properties which are not allowed in `Config`s, as they can only be properties of `TestCase`. * * @param config - Config from `RuleTester` instance * @returns Merged config */ function createConfigForRun(config: Config | null): Config { - if (config === null) return sharedConfig; - // TODO: Merge deeply - return Object.assign({}, sharedConfig, config); + const merged: Config = {}; + addConfigPropsFrom(sharedConfig, merged); + if (config !== null) addConfigPropsFrom(config, merged); + return merged; +} + +function addConfigPropsFrom(config: Config, merged: Config): void { + // Note: `TEST_CASE_PROP_KEYS` includes `"__proto__"`, so using assignment `merged[key] = ...` + // cannot set prototype of `merged`, instead of setting a property + for (const key of Object.keys(config) as (keyof Config)[]) { + if (TEST_CASE_PROP_KEYS.has(key)) continue; + if (key === "languageOptions") { + merged.languageOptions = mergeLanguageOptions(config.languageOptions, merged.languageOptions); + } else { + (merged as Record)[key] = config[key]; + } + } } /** * Create config for a test case. - * Merges config from `RuleTester` instance / shared config with properties of `test`. + * Merges properties of test case on top of config from `RuleTester` instance. * * @param test - Test case * @param config - Config from `RuleTester` instance / shared config * @returns Merged config */ -function createConfigForTest(test: TestCase, config: Config): Config { - let isCloned = false; - function clone(): void { - if (!isCloned) { - config = { ...config }; - isCloned = true; - } - } +function mergeConfigIntoTestCase( + test: T, + config: Config, +): T { + // `config` has already been cleansed of properties which are exclusive to `TestCase`, + // so no danger here of `config` having a property called e.g. `errors` which would affect the test case + const merged = { + ...config, + ...test, + languageOptions: mergeLanguageOptions(test.languageOptions, config.languageOptions), + }; + + // Call hook to modify test case before it is run. + // `modifyTestCase` is only available in debug builds - it's only for conformance testing. + if (DEBUG && modifyTestCase !== null) modifyTestCase(merged); + + return merged; +} - // TODO: Merge more properties of `test` into `config` - if (hasOwn(test, "eslintCompat")) { - clone(); - config.eslintCompat = test.eslintCompat; - } - return config; +/** + * Merge language options from test case / config onto language options from base config. + * @param localLanguageOptions - Language options from test case / config + * @param baseLanguageOptions - Language options from base config + * @returns Merged language options, or `undefined` if neither has language options + */ +function mergeLanguageOptions( + localLanguageOptions?: LanguageOptions | null, + baseLanguageOptions?: LanguageOptions | null, +): LanguageOptions | undefined { + if (localLanguageOptions == null) return baseLanguageOptions ?? undefined; + if (baseLanguageOptions == null) return localLanguageOptions; + + return { + ...baseLanguageOptions, + ...localLanguageOptions, + parserOptions: mergeParserOptions( + localLanguageOptions.parserOptions, + baseLanguageOptions.parserOptions, + ), + }; +} + +/** + * Merge parser options from test case / config onto language options from base config. + * @param localParserOptions - Parser options from test case / config + * @param baseParserOptions - Parser options from base config + * @returns Merged parser options, or `undefined` if neither has parser options + */ +function mergeParserOptions( + localParserOptions?: ParserOptions | null, + baseParserOptions?: ParserOptions | null, +): ParserOptions | undefined { + if (localParserOptions == null) return baseParserOptions ?? undefined; + if (baseParserOptions == null) return localParserOptions; + + return { + ...baseParserOptions, + ...localParserOptions, + ecmaFeatures: mergeEcmaFeatures( + localParserOptions.ecmaFeatures, + baseParserOptions.ecmaFeatures, + ), + }; +} + +/** + * Merge ecma features from test case / config onto ecma features from base config. + * @param localEcmaFeatures - Ecma features from test case / config + * @param baseEcmaFeatures - Ecma features from base config + * @returns Merged ecma features, or `undefined` if neither has ecma features + */ +function mergeEcmaFeatures( + localEcmaFeatures?: EcmaFeatures | null, + baseEcmaFeatures?: EcmaFeatures | null, +): EcmaFeatures | undefined { + if (localEcmaFeatures == null) return baseEcmaFeatures ?? undefined; + if (baseEcmaFeatures == null) return localEcmaFeatures; + return { ...baseEcmaFeatures, ...localEcmaFeatures }; } /** * Lint a test case. * @param test - Test case * @param plugin - Plugin containing rule being tested - * @param config - Config from `RuleTester` instance * @returns Array of diagnostics */ -function lint(test: TestCase, plugin: Plugin, config: Config): Diagnostic[] { - // TODO: Use config to set language options - const _ = config; +function lint(test: TestCase, plugin: Plugin): Diagnostic[] { + // Get parse options + const parseOptions = getParseOptions(test); + + // Determine filename. + // If not provided, use default filename based on `parseOptions.lang`. + let { filename } = test; + if (filename == null) { + let ext: string | undefined = parseOptions.lang; + if (ext == null) { + ext = "js"; + } else if (ext === "dts") { + ext = "d.ts"; + } + filename = `${DEFAULT_FILENAME_BASE}.${ext}`; + } // Initialize `allOptions` if not already initialized if (allOptions === null) initAllOptions(); @@ -726,14 +921,13 @@ function lint(test: TestCase, plugin: Plugin, config: Config): Diagnostic[] { } // Parse file into buffer - const path = test.filename ?? DEFAULT_PATH; - parse(path, test.code); + parse(filename, test.code, parseOptions); // Lint file. // Buffer is stored already, at index 0. No need to pass it. const settingsJSON = "{}"; // TODO const globalsJSON = "{}"; // TODO - lintFileImpl(path, 0, null, [0], [optionsId], settingsJSON, globalsJSON); + lintFileImpl(filename, 0, null, [0], [optionsId], settingsJSON, globalsJSON); // Return diagnostics const ruleId = `${plugin.meta!.name!}/${Object.keys(plugin.rules)[0]}`; @@ -764,6 +958,63 @@ function lint(test: TestCase, plugin: Plugin, config: Config): Diagnostic[] { } } +/** + * Get parse options for a test case. + * @param test - Test case + * @returns Parse options + */ +function getParseOptions(test: TestCase): ParseOptions { + const parseOptions: ParseOptions = {}; + + const { languageOptions } = test; + if (languageOptions != null) { + // Handle `languageOptions.sourceType` + let { sourceType } = languageOptions; + if (sourceType != null) { + if (test.eslintCompat === true) { + // ESLint compatibility mode. + // `unambiguous` is disallowed. Treat `commonjs` as `script`. + if (sourceType === "commonjs") { + sourceType = "script"; + } else if (sourceType === "unambiguous") { + throw new Error( + "'unambiguous' source type is not supported in ESLint compatibility mode.\n" + + "Disable ESLint compatibility mode by setting `eslintCompat` to `false` in the config / test case.", + ); + } + } else { + // Not ESLint compatibility mode. + // `commonjs` is disallowed. + if (sourceType === "commonjs") { + throw new Error( + "'commonjs' source type is only supported in ESLint compatibility mode.\n" + + "Enable ESLint compatibility mode by setting `eslintCompat` to `true` in the config / test case.", + ); + } + } + + parseOptions.sourceType = sourceType; + } + + // Handle `languageOptions.parserOptions` + const { parserOptions } = languageOptions; + if (parserOptions != null) { + // Handle `parserOptions.ignoreNonFatalErrors` + if (parserOptions.ignoreNonFatalErrors === true) parseOptions.ignoreNonFatalErrors = true; + + // Handle `parserOptions.lang` + const { lang } = parserOptions; + if (lang != null) { + parseOptions.lang = lang; + } else if (parserOptions.ecmaFeatures?.jsx === true) { + parseOptions.lang = "jsx"; + } + } + } + + return parseOptions; +} + /** * Get name of test case. * Control characters in name are replaced with `\u00xx` form. @@ -994,6 +1245,11 @@ function isSerializablePrimitiveOrPlainObject(value: unknown): boolean { // Add types to `RuleTester` namespace type _Config = Config; +type _LanguageOptions = LanguageOptions; +type _ParserOptions = ParserOptions; +type _SourceType = SourceType; +type _Language = Language; +type _EcmaFeatures = EcmaFeatures; type _DescribeFn = DescribeFn; type _ItFn = ItFn; type _ValidTestCase = ValidTestCase; @@ -1003,6 +1259,11 @@ type _Error = Error; export namespace RuleTester { export type Config = _Config; + export type LanguageOptions = _LanguageOptions; + export type ParserOptions = _ParserOptions; + export type SourceType = _SourceType; + export type Language = _Language; + export type EcmaFeatures = _EcmaFeatures; export type DescribeFn = _DescribeFn; export type ItFn = _ItFn; export type ValidTestCase = _ValidTestCase; diff --git a/apps/oxlint/src-js/plugins/globals.ts b/apps/oxlint/src-js/plugins/globals.ts index 97cb720c70d23..76b2a0bd37263 100644 --- a/apps/oxlint/src-js/plugins/globals.ts +++ b/apps/oxlint/src-js/plugins/globals.ts @@ -4,9 +4,8 @@ import { debugAssert, debugAssertIsNonNull } from "../utils/asserts.ts"; -import { Writable } from "type-fest"; - -const { freeze } = Object; +const { freeze } = Object, + { isArray } = Array; /** * Globals for the file being linted. @@ -46,27 +45,21 @@ export function setGlobalsForFile(globalsJSONInput: string): undefined { export function initGlobals(): void { debugAssertIsNonNull(globalsJSON); - // `EMPTY_GLOBALS` is a placeholder meaning "no globals defined". - // `globals` getter on `LanguageOptions` returns `null` if `globals === EMPTY_GLOBALS`. if (globalsJSON === "{}") { + // `EMPTY_GLOBALS` is a placeholder meaning "no globals defined". + // `globals` getter on `LanguageOptions` returns `null` if `globals === EMPTY_GLOBALS`. + // No need to freeze `EMPTY_GLOBALS`, since it's never passed to user. globals = EMPTY_GLOBALS; - return; - } - - globals = JSON.parse(globalsJSON); - debugAssert(globals !== null && typeof globals === "object"); + } else { + globals = JSON.parse(globalsJSON); - // `globals` was deserialized from JSON, so we can use a simple `for..in` loop here - for (const key in globals) { - if ((globals[key] as string) === "writeable") { - // `globals` is not frozen yet - (globals as Writable)[key] = "writable"; - } + // Freeze the globals object, to prevent any mutation of `globals` by plugins. + // No need to deep freeze since all keys are just strings. + freeze(globals); } - // Freeze the globals object, to prevent any mutation of `globals` by plugins. - // No need to deep freeze since all keys are just strings. - freeze(globals); + debugAssertIsNonNull(globals); + debugAssert(typeof globals === "object" && !isArray(globals)); } /** diff --git a/apps/oxlint/src/js_plugins/parse.rs b/apps/oxlint/src/js_plugins/parse.rs index 973caf8193833..f1281d1af47c6 100644 --- a/apps/oxlint/src/js_plugins/parse.rs +++ b/apps/oxlint/src/js_plugins/parse.rs @@ -9,9 +9,9 @@ use napi_derive::napi; use oxc_allocator::Allocator; use oxc_ast_visit::utf8_to_utf16::Utf8ToUtf16; use oxc_linter::RawTransferMetadata2 as RawTransferMetadata; +use oxc_napi::get_source_type; use oxc_parser::{ParseOptions, Parser}; use oxc_semantic::SemanticBuilder; -use oxc_span::SourceType; use crate::generated::raw_transfer_constants::{BLOCK_ALIGN as BUFFER_ALIGN, BUFFER_SIZE}; @@ -23,6 +23,22 @@ const BUMP_ALIGN: usize = 16; /// Allocator bumps downwards, so if source text was empty, the program would be somewhere at end of the buffer. const PARSE_FAIL_SENTINEL: u32 = 0; +// Parser options +#[napi(object)] +#[derive(Default)] +pub struct ParserOptions { + /// Treat the source text as `js`, `jsx`, `ts`, `tsx` or `dts`. + #[napi(ts_type = "'js' | 'jsx' | 'ts' | 'tsx' | 'dts'")] + pub lang: Option, + + /// Treat the source text as `script` or `module` code. + #[napi(ts_type = "'script' | 'module' | 'unambiguous' | undefined")] + pub source_type: Option, + + /// Ignore non-fatal parsing errors + pub ignore_non_fatal_errors: Option, +} + /// Get offset within a `Uint8Array` which is aligned on `BUFFER_ALIGN`. /// /// Does not check that the offset is within bounds of `buffer`. @@ -62,13 +78,18 @@ pub fn get_buffer_offset(buffer: Uint8Array) -> u32 { /// Panics if source text is too long, or AST takes more memory than is available in the buffer. #[napi] #[allow(clippy::needless_pass_by_value, clippy::allow_attributes)] -pub unsafe fn parse_raw_sync(filename: String, mut buffer: Uint8Array, source_len: u32) { +pub unsafe fn parse_raw_sync( + filename: String, + mut buffer: Uint8Array, + source_len: u32, + options: Option, +) { // SAFETY: This function is called synchronously, so buffer cannot be mutated outside this function // during the time this `&mut [u8]` exists let buffer = unsafe { buffer.as_mut() }; // SAFETY: `parse_raw_impl` has same safety requirements as this function - unsafe { parse_raw_impl(&filename, buffer, source_len) }; + unsafe { parse_raw_impl(&filename, buffer, source_len, options) }; } /// Parse AST into buffer. @@ -83,7 +104,12 @@ pub unsafe fn parse_raw_sync(filename: String, mut buffer: Uint8Array, source_le /// If source text is originally a JS string on JS side, and converted to a buffer with /// `Buffer.from(str)` or `new TextEncoder().encode(str)`, this guarantees it's valid UTF-8. #[allow(clippy::items_after_statements, clippy::allow_attributes)] -unsafe fn parse_raw_impl(filename: &str, buffer: &mut [u8], source_len: u32) { +unsafe fn parse_raw_impl( + filename: &str, + buffer: &mut [u8], + source_len: u32, + options: Option, +) { // Check buffer has expected size and alignment assert_eq!(buffer.len(), BUFFER_SIZE); let buffer_ptr = ptr::from_mut(buffer).cast::(); @@ -117,10 +143,14 @@ unsafe fn parse_raw_impl(filename: &str, buffer: &mut [u8], source_len: u32) { unsafe { Allocator::from_raw_parts(NonNull::new_unchecked(data_ptr), data_size) }; let allocator = ManuallyDrop::new(allocator); + // Get source type + let options = options.unwrap_or_default(); + let source_type = + get_source_type(filename, options.lang.as_deref(), options.source_type.as_deref()); + let ignore_non_fatal_errors = options.ignore_non_fatal_errors.unwrap_or(false); + // Parse source. // Enclose parsing logic in a scope to make 100% sure no references to within `Allocator` exist after this. - let source_type = SourceType::from_path(filename).unwrap_or_default(); - let program_offset = { // SAFETY: We checked above that `source_len` does not exceed length of buffer let source_text = unsafe { buffer.get_unchecked(..source_len) }; @@ -137,10 +167,12 @@ unsafe fn parse_raw_impl(filename: &str, buffer: &mut [u8], source_len: u32) { .parse(); let program = allocator.alloc(parser_ret.program); - let mut parsing_failed = parser_ret.panicked || !parser_ret.errors.is_empty(); + let mut parsing_failed = + parser_ret.panicked || (!parser_ret.errors.is_empty() && !ignore_non_fatal_errors); - // Check for semantic errors - if !parsing_failed { + // Check for semantic errors. + // If `ignore_non_fatal_errors` is `true`, skip running semantic, as any errors will be ignored anyway. + if !parsing_failed && !ignore_non_fatal_errors { let semantic_ret = SemanticBuilder::new().with_check_syntax_error(true).build(program); parsing_failed = !semantic_ret.errors.is_empty(); } diff --git a/apps/oxlint/src/lint.rs b/apps/oxlint/src/lint.rs index d640460601a88..5422a19f95905 100644 --- a/apps/oxlint/src/lint.rs +++ b/apps/oxlint/src/lint.rs @@ -1437,9 +1437,6 @@ mod test { #[test] #[cfg(all(not(target_os = "windows"), not(target_endian = "big")))] fn test_tsgolint_fix() { - // Note: tsgolint fixes this lint rule by providing two string manipulations - // the first removing `as` and the second removing `string` This results in the two spaces - // after `str` but before `;`, this is ok, as it's not guaranteed that our fixers are stylistically correct. Tester::test_fix_with_args( "fixtures/tsgolint_fix/fix.ts", "// This file has a fixable tsgolint error: no-unnecessary-type-assertion @@ -1452,7 +1449,7 @@ export { redundant }; "// This file has a fixable tsgolint error: no-unnecessary-type-assertion // The type assertion `as string` is unnecessary because str is already a string const str: string = 'hello'; -const redundant = str ; +const redundant = str; export { redundant }; ", diff --git a/apps/oxlint/src/snapshots/_--ignore-path fixtures__linter__.customignore --no-ignore fixtures__linter__nan.js@oxlint.snap b/apps/oxlint/src/snapshots/_--ignore-path fixtures__linter__.customignore --no-ignore fixtures__linter__nan.js@oxlint.snap index 2e0cc9779b9e4..9f321571492f5 100644 --- a/apps/oxlint/src/snapshots/_--ignore-path fixtures__linter__.customignore --no-ignore fixtures__linter__nan.js@oxlint.snap +++ b/apps/oxlint/src/snapshots/_--ignore-path fixtures__linter__.customignore --no-ignore fixtures__linter__nan.js@oxlint.snap @@ -21,7 +21,7 @@ working directory: help: Use the `isNaN` function to compare with NaN. Found 2 warnings and 0 errors. -Finished in ms on 1 file with 89 rules using 1 threads. +Finished in ms on 1 file with 90 rules using 1 threads. ---------- CLI result: LintSucceeded ---------- diff --git a/apps/oxlint/src/snapshots/_--ignore-pattern _____.js --ignore-pattern _____.vue fixtures__linter@oxlint.snap b/apps/oxlint/src/snapshots/_--ignore-pattern _____.js --ignore-pattern _____.vue fixtures__linter@oxlint.snap index 6f72f11c56089..b3f067bddb9cb 100644 --- a/apps/oxlint/src/snapshots/_--ignore-pattern _____.js --ignore-pattern _____.vue fixtures__linter@oxlint.snap +++ b/apps/oxlint/src/snapshots/_--ignore-pattern _____.js --ignore-pattern _____.vue fixtures__linter@oxlint.snap @@ -6,7 +6,7 @@ arguments: --ignore-pattern **/*.js --ignore-pattern **/*.vue fixtures/linter working directory: ---------- Found 0 warnings and 0 errors. -Finished in ms on 0 files with 89 rules using 1 threads. +Finished in ms on 0 files with 90 rules using 1 threads. ---------- CLI result: LintSucceeded ---------- diff --git a/apps/oxlint/src/snapshots/_--import-plugin -A all -D no-cycle fixtures__flow__@oxlint.snap b/apps/oxlint/src/snapshots/_--import-plugin -A all -D no-cycle fixtures__flow__@oxlint.snap index 91b8e3942dc74..c57b9f8d341d8 100644 --- a/apps/oxlint/src/snapshots/_--import-plugin -A all -D no-cycle fixtures__flow__@oxlint.snap +++ b/apps/oxlint/src/snapshots/_--import-plugin -A all -D no-cycle fixtures__flow__@oxlint.snap @@ -6,7 +6,7 @@ arguments: --import-plugin -A all -D no-cycle fixtures/flow/ working directory: ---------- Found 0 warnings and 0 errors. -Finished in ms on 2 files with 91 rules using 1 threads. +Finished in ms on 2 files with 92 rules using 1 threads. ---------- CLI result: LintSucceeded ---------- diff --git a/apps/oxlint/src/snapshots/_--import-plugin fixtures__flow__index.mjs@oxlint.snap b/apps/oxlint/src/snapshots/_--import-plugin fixtures__flow__index.mjs@oxlint.snap index 8374a8a41ed5a..2bab12e62eac9 100644 --- a/apps/oxlint/src/snapshots/_--import-plugin fixtures__flow__index.mjs@oxlint.snap +++ b/apps/oxlint/src/snapshots/_--import-plugin fixtures__flow__index.mjs@oxlint.snap @@ -6,7 +6,7 @@ arguments: --import-plugin fixtures/flow/index.mjs working directory: ---------- Found 0 warnings and 0 errors. -Finished in ms on 1 file with 91 rules using 1 threads. +Finished in ms on 1 file with 92 rules using 1 threads. ---------- CLI result: LintSucceeded ---------- diff --git a/apps/oxlint/src/snapshots/_--vitest-plugin -c fixtures__eslintrc_vitest_replace__eslintrc.json fixtures__eslintrc_vitest_replace__foo.test.js@oxlint.snap b/apps/oxlint/src/snapshots/_--vitest-plugin -c fixtures__eslintrc_vitest_replace__eslintrc.json fixtures__eslintrc_vitest_replace__foo.test.js@oxlint.snap index 8d8ea6722e75a..2e676b3e1bc8e 100644 --- a/apps/oxlint/src/snapshots/_--vitest-plugin -c fixtures__eslintrc_vitest_replace__eslintrc.json fixtures__eslintrc_vitest_replace__foo.test.js@oxlint.snap +++ b/apps/oxlint/src/snapshots/_--vitest-plugin -c fixtures__eslintrc_vitest_replace__eslintrc.json fixtures__eslintrc_vitest_replace__foo.test.js@oxlint.snap @@ -23,7 +23,7 @@ working directory: help: Remove the appending `.skip` Found 1 warning and 1 error. -Finished in ms on 1 file with 101 rules using 1 threads. +Finished in ms on 1 file with 102 rules using 1 threads. ---------- CLI result: LintFoundErrors ---------- diff --git a/apps/oxlint/src/snapshots/_-D correctness fixtures__linter__debugger.js@oxlint.snap b/apps/oxlint/src/snapshots/_-D correctness fixtures__linter__debugger.js@oxlint.snap index 7455b2d26efd0..df1cbdd2e3e92 100644 --- a/apps/oxlint/src/snapshots/_-D correctness fixtures__linter__debugger.js@oxlint.snap +++ b/apps/oxlint/src/snapshots/_-D correctness fixtures__linter__debugger.js@oxlint.snap @@ -14,7 +14,7 @@ working directory: help: Remove the debugger statement Found 0 warnings and 1 error. -Finished in ms on 1 file with 89 rules using 1 threads. +Finished in ms on 1 file with 90 rules using 1 threads. ---------- CLI result: LintFoundErrors ---------- diff --git a/apps/oxlint/src/snapshots/_-W correctness -A no-debugger fixtures__linter__debugger.js@oxlint.snap b/apps/oxlint/src/snapshots/_-W correctness -A no-debugger fixtures__linter__debugger.js@oxlint.snap index 25b62837f3535..71a09abed9cd8 100644 --- a/apps/oxlint/src/snapshots/_-W correctness -A no-debugger fixtures__linter__debugger.js@oxlint.snap +++ b/apps/oxlint/src/snapshots/_-W correctness -A no-debugger fixtures__linter__debugger.js@oxlint.snap @@ -6,7 +6,7 @@ arguments: -W correctness -A no-debugger fixtures/linter/debugger.js working directory: ---------- Found 0 warnings and 0 errors. -Finished in ms on 1 file with 88 rules using 1 threads. +Finished in ms on 1 file with 89 rules using 1 threads. ---------- CLI result: LintSucceeded ---------- diff --git a/apps/oxlint/src/snapshots/_-W no-undef -c fixtures__eslintrc_env__eslintrc_no_env.json fixtures__eslintrc_env__test.js@oxlint.snap b/apps/oxlint/src/snapshots/_-W no-undef -c fixtures__eslintrc_env__eslintrc_no_env.json fixtures__eslintrc_env__test.js@oxlint.snap index a759468185a81..a83d806e2850b 100644 --- a/apps/oxlint/src/snapshots/_-W no-undef -c fixtures__eslintrc_env__eslintrc_no_env.json fixtures__eslintrc_env__test.js@oxlint.snap +++ b/apps/oxlint/src/snapshots/_-W no-undef -c fixtures__eslintrc_env__eslintrc_no_env.json fixtures__eslintrc_env__test.js@oxlint.snap @@ -13,7 +13,7 @@ working directory: `---- Found 1 warning and 0 errors. -Finished in ms on 1 file with 90 rules using 1 threads. +Finished in ms on 1 file with 91 rules using 1 threads. ---------- CLI result: LintSucceeded ---------- diff --git a/apps/oxlint/src/snapshots/_-W no-undef -c fixtures__no_undef__eslintrc.json fixtures__no_undef__test.js@oxlint.snap b/apps/oxlint/src/snapshots/_-W no-undef -c fixtures__no_undef__eslintrc.json fixtures__no_undef__test.js@oxlint.snap index 2ec8506bdf335..bb6b27b26c6cf 100644 --- a/apps/oxlint/src/snapshots/_-W no-undef -c fixtures__no_undef__eslintrc.json fixtures__no_undef__test.js@oxlint.snap +++ b/apps/oxlint/src/snapshots/_-W no-undef -c fixtures__no_undef__eslintrc.json fixtures__no_undef__test.js@oxlint.snap @@ -13,7 +13,7 @@ working directory: `---- Found 1 warning and 0 errors. -Finished in ms on 1 file with 90 rules using 1 threads. +Finished in ms on 1 file with 91 rules using 1 threads. ---------- CLI result: LintSucceeded ---------- diff --git a/apps/oxlint/src/snapshots/_-c fixtures__config_ignore_patterns__ignore_extension__eslintrc.json fixtures__config_ignore_patterns__ignore_extension@oxlint.snap b/apps/oxlint/src/snapshots/_-c fixtures__config_ignore_patterns__ignore_extension__eslintrc.json fixtures__config_ignore_patterns__ignore_extension@oxlint.snap index cb5da05408814..ad5b152f21a18 100644 --- a/apps/oxlint/src/snapshots/_-c fixtures__config_ignore_patterns__ignore_extension__eslintrc.json fixtures__config_ignore_patterns__ignore_extension@oxlint.snap +++ b/apps/oxlint/src/snapshots/_-c fixtures__config_ignore_patterns__ignore_extension__eslintrc.json fixtures__config_ignore_patterns__ignore_extension@oxlint.snap @@ -12,7 +12,7 @@ working directory: help: Delete this file or add some code to it. Found 1 warning and 0 errors. -Finished in ms on 1 file with 89 rules using 1 threads. +Finished in ms on 1 file with 90 rules using 1 threads. ---------- CLI result: LintSucceeded ---------- diff --git a/apps/oxlint/src/snapshots/_-c fixtures__config_ignore_patterns__ignore_extension__eslintrc.json fixtures__config_ignore_patterns__ignore_extension__main.js@oxlint.snap b/apps/oxlint/src/snapshots/_-c fixtures__config_ignore_patterns__ignore_extension__eslintrc.json fixtures__config_ignore_patterns__ignore_extension__main.js@oxlint.snap index 97815492fafaa..38ed18851cd68 100644 --- a/apps/oxlint/src/snapshots/_-c fixtures__config_ignore_patterns__ignore_extension__eslintrc.json fixtures__config_ignore_patterns__ignore_extension__main.js@oxlint.snap +++ b/apps/oxlint/src/snapshots/_-c fixtures__config_ignore_patterns__ignore_extension__eslintrc.json fixtures__config_ignore_patterns__ignore_extension__main.js@oxlint.snap @@ -6,7 +6,7 @@ arguments: -c fixtures/config_ignore_patterns/ignore_extension/eslintrc.json fix working directory: ---------- Found 0 warnings and 0 errors. -Finished in ms on 0 files with 89 rules using 1 threads. +Finished in ms on 0 files with 90 rules using 1 threads. ---------- CLI result: LintSucceeded ---------- diff --git a/apps/oxlint/src/snapshots/_-c fixtures__eslintrc_env__eslintrc_env_browser.json fixtures__eslintrc_env__test.js@oxlint.snap b/apps/oxlint/src/snapshots/_-c fixtures__eslintrc_env__eslintrc_env_browser.json fixtures__eslintrc_env__test.js@oxlint.snap index 8394a14d71b68..e87c948edcdc2 100644 --- a/apps/oxlint/src/snapshots/_-c fixtures__eslintrc_env__eslintrc_env_browser.json fixtures__eslintrc_env__test.js@oxlint.snap +++ b/apps/oxlint/src/snapshots/_-c fixtures__eslintrc_env__eslintrc_env_browser.json fixtures__eslintrc_env__test.js@oxlint.snap @@ -6,7 +6,7 @@ arguments: -c fixtures/eslintrc_env/eslintrc_env_browser.json fixtures/eslintrc_ working directory: ---------- Found 0 warnings and 0 errors. -Finished in ms on 1 file with 90 rules using 1 threads. +Finished in ms on 1 file with 91 rules using 1 threads. ---------- CLI result: LintSucceeded ---------- diff --git a/apps/oxlint/src/snapshots/_-c fixtures__eslintrc_off__eslintrc.json fixtures__eslintrc_off__test.js@oxlint.snap b/apps/oxlint/src/snapshots/_-c fixtures__eslintrc_off__eslintrc.json fixtures__eslintrc_off__test.js@oxlint.snap index c1765a94085f4..b0e4e44da9f2f 100644 --- a/apps/oxlint/src/snapshots/_-c fixtures__eslintrc_off__eslintrc.json fixtures__eslintrc_off__test.js@oxlint.snap +++ b/apps/oxlint/src/snapshots/_-c fixtures__eslintrc_off__eslintrc.json fixtures__eslintrc_off__test.js@oxlint.snap @@ -12,7 +12,7 @@ working directory: help: Delete this file or add some code to it. Found 1 warning and 0 errors. -Finished in ms on 1 file with 89 rules using 1 threads. +Finished in ms on 1 file with 90 rules using 1 threads. ---------- CLI result: LintSucceeded ---------- diff --git a/apps/oxlint/src/snapshots/_-c fixtures__eslintrc_vitest_replace__eslintrc.json fixtures__eslintrc_vitest_replace__foo.test.js@oxlint.snap b/apps/oxlint/src/snapshots/_-c fixtures__eslintrc_vitest_replace__eslintrc.json fixtures__eslintrc_vitest_replace__foo.test.js@oxlint.snap index 3d9e2534b2042..68d62a70c23a9 100644 --- a/apps/oxlint/src/snapshots/_-c fixtures__eslintrc_vitest_replace__eslintrc.json fixtures__eslintrc_vitest_replace__foo.test.js@oxlint.snap +++ b/apps/oxlint/src/snapshots/_-c fixtures__eslintrc_vitest_replace__eslintrc.json fixtures__eslintrc_vitest_replace__foo.test.js@oxlint.snap @@ -6,7 +6,7 @@ arguments: -c fixtures/eslintrc_vitest_replace/eslintrc.json fixtures/eslintrc_v working directory: ---------- Found 0 warnings and 0 errors. -Finished in ms on 1 file with 89 rules using 1 threads. +Finished in ms on 1 file with 90 rules using 1 threads. ---------- CLI result: LintSucceeded ---------- diff --git a/apps/oxlint/src/snapshots/_-c fixtures__linter__eslintrc.json fixtures__linter__debugger.js@oxlint.snap b/apps/oxlint/src/snapshots/_-c fixtures__linter__eslintrc.json fixtures__linter__debugger.js@oxlint.snap index 555c316648462..4e64bb8ab0de3 100644 --- a/apps/oxlint/src/snapshots/_-c fixtures__linter__eslintrc.json fixtures__linter__debugger.js@oxlint.snap +++ b/apps/oxlint/src/snapshots/_-c fixtures__linter__eslintrc.json fixtures__linter__debugger.js@oxlint.snap @@ -14,7 +14,7 @@ working directory: help: Remove the debugger statement Found 0 warnings and 1 error. -Finished in ms on 1 file with 89 rules using 1 threads. +Finished in ms on 1 file with 90 rules using 1 threads. ---------- CLI result: LintFoundErrors ---------- diff --git a/apps/oxlint/src/snapshots/_-c fixtures__no_console_off__eslintrc.json fixtures__no_console_off__test.js@oxlint.snap b/apps/oxlint/src/snapshots/_-c fixtures__no_console_off__eslintrc.json fixtures__no_console_off__test.js@oxlint.snap index 3d521921ff354..db31643b5d850 100644 --- a/apps/oxlint/src/snapshots/_-c fixtures__no_console_off__eslintrc.json fixtures__no_console_off__test.js@oxlint.snap +++ b/apps/oxlint/src/snapshots/_-c fixtures__no_console_off__eslintrc.json fixtures__no_console_off__test.js@oxlint.snap @@ -6,7 +6,7 @@ arguments: -c fixtures/no_console_off/eslintrc.json fixtures/no_console_off/test working directory: ---------- Found 0 warnings and 0 errors. -Finished in ms on 1 file with 89 rules using 1 threads. +Finished in ms on 1 file with 90 rules using 1 threads. ---------- CLI result: LintSucceeded ---------- diff --git a/apps/oxlint/src/snapshots/_-c fixtures__no_empty_allow_empty_catch__eslintrc.json -W no-empty fixtures__no_empty_allow_empty_catch__test.js@oxlint.snap b/apps/oxlint/src/snapshots/_-c fixtures__no_empty_allow_empty_catch__eslintrc.json -W no-empty fixtures__no_empty_allow_empty_catch__test.js@oxlint.snap index 3143d3c2efb85..774b48cd2fb0a 100644 --- a/apps/oxlint/src/snapshots/_-c fixtures__no_empty_allow_empty_catch__eslintrc.json -W no-empty fixtures__no_empty_allow_empty_catch__test.js@oxlint.snap +++ b/apps/oxlint/src/snapshots/_-c fixtures__no_empty_allow_empty_catch__eslintrc.json -W no-empty fixtures__no_empty_allow_empty_catch__test.js@oxlint.snap @@ -6,7 +6,7 @@ arguments: -c fixtures/no_empty_allow_empty_catch/eslintrc.json -W no-empty fixt working directory: ---------- Found 0 warnings and 0 errors. -Finished in ms on 1 file with 90 rules using 1 threads. +Finished in ms on 1 file with 91 rules using 1 threads. ---------- CLI result: LintSucceeded ---------- diff --git a/apps/oxlint/src/snapshots/_-c fixtures__no_empty_disallow_empty_catch__eslintrc.json -W no-empty fixtures__no_empty_disallow_empty_catch__test.js@oxlint.snap b/apps/oxlint/src/snapshots/_-c fixtures__no_empty_disallow_empty_catch__eslintrc.json -W no-empty fixtures__no_empty_disallow_empty_catch__test.js@oxlint.snap index 5dccb075c282e..b8cde1e77a156 100644 --- a/apps/oxlint/src/snapshots/_-c fixtures__no_empty_disallow_empty_catch__eslintrc.json -W no-empty fixtures__no_empty_disallow_empty_catch__test.js@oxlint.snap +++ b/apps/oxlint/src/snapshots/_-c fixtures__no_empty_disallow_empty_catch__eslintrc.json -W no-empty fixtures__no_empty_disallow_empty_catch__test.js@oxlint.snap @@ -14,7 +14,7 @@ working directory: help: Remove this block or add a comment inside it Found 1 warning and 0 errors. -Finished in ms on 1 file with 90 rules using 1 threads. +Finished in ms on 1 file with 91 rules using 1 threads. ---------- CLI result: LintSucceeded ---------- diff --git a/apps/oxlint/src/snapshots/_-c fixtures__overrides__.oxlintrc.json fixtures__overrides__test.js -c fixtures__overrides__.oxlintrc.json fixtures__overrides__test.ts -c fixtures__overrides__.oxlintrc.json fixtures__overrides__other.jsx@oxlint.snap b/apps/oxlint/src/snapshots/_-c fixtures__overrides__.oxlintrc.json fixtures__overrides__test.js -c fixtures__overrides__.oxlintrc.json fixtures__overrides__test.ts -c fixtures__overrides__.oxlintrc.json fixtures__overrides__other.jsx@oxlint.snap index 8fdeaf3a58cda..b092fb1cf0749 100644 --- a/apps/oxlint/src/snapshots/_-c fixtures__overrides__.oxlintrc.json fixtures__overrides__test.js -c fixtures__overrides__.oxlintrc.json fixtures__overrides__test.ts -c fixtures__overrides__.oxlintrc.json fixtures__overrides__other.jsx@oxlint.snap +++ b/apps/oxlint/src/snapshots/_-c fixtures__overrides__.oxlintrc.json fixtures__overrides__test.js -c fixtures__overrides__.oxlintrc.json fixtures__overrides__test.ts -c fixtures__overrides__.oxlintrc.json fixtures__overrides__other.jsx@oxlint.snap @@ -15,7 +15,7 @@ working directory: help: Replace var with let or const Found 0 warnings and 1 error. -Finished in ms on 1 file with 91 rules using 1 threads. +Finished in ms on 1 file with 92 rules using 1 threads. ---------- CLI result: LintFoundErrors ---------- @@ -42,7 +42,7 @@ working directory: help: Delete this console statement. Found 1 warning and 1 error. -Finished in ms on 1 file with 91 rules using 1 threads. +Finished in ms on 1 file with 92 rules using 1 threads. ---------- CLI result: LintFoundErrors ---------- @@ -61,7 +61,7 @@ working directory: help: Replace var with let or const Found 0 warnings and 1 error. -Finished in ms on 1 file with 91 rules using 1 threads. +Finished in ms on 1 file with 92 rules using 1 threads. ---------- CLI result: LintFoundErrors ---------- diff --git a/apps/oxlint/src/snapshots/_-c fixtures__overrides__directories-config.json fixtures__overrides@oxlint.snap b/apps/oxlint/src/snapshots/_-c fixtures__overrides__directories-config.json fixtures__overrides@oxlint.snap index 3663fce39d5e0..82d7af71ba652 100644 --- a/apps/oxlint/src/snapshots/_-c fixtures__overrides__directories-config.json fixtures__overrides@oxlint.snap +++ b/apps/oxlint/src/snapshots/_-c fixtures__overrides__directories-config.json fixtures__overrides@oxlint.snap @@ -35,7 +35,7 @@ working directory: help: Remove the debugger statement Found 2 warnings and 2 errors. -Finished in ms on 7 files with 88 rules using 1 threads. +Finished in ms on 7 files with 89 rules using 1 threads. ---------- CLI result: LintFoundErrors ---------- diff --git a/apps/oxlint/src/snapshots/_-c fixtures__typescript_eslint__eslintrc.json --disable-typescript-plugin fixtures__typescript_eslint__test.ts@oxlint.snap b/apps/oxlint/src/snapshots/_-c fixtures__typescript_eslint__eslintrc.json --disable-typescript-plugin fixtures__typescript_eslint__test.ts@oxlint.snap index e3d962b74f97a..79664803f2143 100644 --- a/apps/oxlint/src/snapshots/_-c fixtures__typescript_eslint__eslintrc.json --disable-typescript-plugin fixtures__typescript_eslint__test.ts@oxlint.snap +++ b/apps/oxlint/src/snapshots/_-c fixtures__typescript_eslint__eslintrc.json --disable-typescript-plugin fixtures__typescript_eslint__test.ts@oxlint.snap @@ -31,7 +31,7 @@ working directory: help: Consider using this expression or removing it Found 2 warnings and 1 error. -Finished in ms on 1 file with 52 rules using 1 threads. +Finished in ms on 1 file with 53 rules using 1 threads. ---------- CLI result: LintFoundErrors ---------- diff --git a/apps/oxlint/src/snapshots/_-c fixtures__typescript_eslint__eslintrc.json fixtures__typescript_eslint__test.ts@oxlint.snap b/apps/oxlint/src/snapshots/_-c fixtures__typescript_eslint__eslintrc.json fixtures__typescript_eslint__test.ts@oxlint.snap index 69ab524a322b1..bc6ee6d8a775e 100644 --- a/apps/oxlint/src/snapshots/_-c fixtures__typescript_eslint__eslintrc.json fixtures__typescript_eslint__test.ts@oxlint.snap +++ b/apps/oxlint/src/snapshots/_-c fixtures__typescript_eslint__eslintrc.json fixtures__typescript_eslint__test.ts@oxlint.snap @@ -39,7 +39,7 @@ working directory: help: Consider using this expression or removing it Found 3 warnings and 1 error. -Finished in ms on 1 file with 64 rules using 1 threads. +Finished in ms on 1 file with 65 rules using 1 threads. ---------- CLI result: LintFoundErrors ---------- diff --git a/apps/oxlint/src/snapshots/_fixtures__astro__debugger.astro@oxlint.snap b/apps/oxlint/src/snapshots/_fixtures__astro__debugger.astro@oxlint.snap index f894a60f2dfb8..2d8129f3944c3 100644 --- a/apps/oxlint/src/snapshots/_fixtures__astro__debugger.astro@oxlint.snap +++ b/apps/oxlint/src/snapshots/_fixtures__astro__debugger.astro@oxlint.snap @@ -43,7 +43,7 @@ working directory: help: Remove the debugger statement Found 4 warnings and 0 errors. -Finished in ms on 1 file with 89 rules using 1 threads. +Finished in ms on 1 file with 90 rules using 1 threads. ---------- CLI result: LintSucceeded ---------- diff --git a/apps/oxlint/src/snapshots/_fixtures__linter@oxlint.snap b/apps/oxlint/src/snapshots/_fixtures__linter@oxlint.snap index 70f43ccde0e36..1601e33d0fe6b 100644 --- a/apps/oxlint/src/snapshots/_fixtures__linter@oxlint.snap +++ b/apps/oxlint/src/snapshots/_fixtures__linter@oxlint.snap @@ -36,7 +36,7 @@ working directory: help: Use the `isNaN` function to compare with NaN. Found 4 warnings and 0 errors. -Finished in ms on 3 files with 89 rules using 1 threads. +Finished in ms on 3 files with 90 rules using 1 threads. ---------- CLI result: LintSucceeded ---------- diff --git a/apps/oxlint/src/snapshots/_fixtures__linter__debugger.js fixtures__linter__nan.js@oxlint.snap b/apps/oxlint/src/snapshots/_fixtures__linter__debugger.js fixtures__linter__nan.js@oxlint.snap index 33b39d57d01a1..e3994eb887e1e 100644 --- a/apps/oxlint/src/snapshots/_fixtures__linter__debugger.js fixtures__linter__nan.js@oxlint.snap +++ b/apps/oxlint/src/snapshots/_fixtures__linter__debugger.js fixtures__linter__nan.js@oxlint.snap @@ -28,7 +28,7 @@ working directory: help: Use the `isNaN` function to compare with NaN. Found 3 warnings and 0 errors. -Finished in ms on 2 files with 89 rules using 1 threads. +Finished in ms on 2 files with 90 rules using 1 threads. ---------- CLI result: LintSucceeded ---------- diff --git a/apps/oxlint/src/snapshots/_fixtures__linter__debugger.js@oxlint.snap b/apps/oxlint/src/snapshots/_fixtures__linter__debugger.js@oxlint.snap index 322a6991bc45e..3e1ef66173400 100644 --- a/apps/oxlint/src/snapshots/_fixtures__linter__debugger.js@oxlint.snap +++ b/apps/oxlint/src/snapshots/_fixtures__linter__debugger.js@oxlint.snap @@ -14,7 +14,7 @@ working directory: help: Remove the debugger statement Found 1 warning and 0 errors. -Finished in ms on 1 file with 89 rules using 1 threads. +Finished in ms on 1 file with 90 rules using 1 threads. ---------- CLI result: LintSucceeded ---------- diff --git a/apps/oxlint/src/snapshots/_fixtures__linter__js_as_jsx.js@oxlint.snap b/apps/oxlint/src/snapshots/_fixtures__linter__js_as_jsx.js@oxlint.snap index 58f9eeb45e9b7..45990490bad7e 100644 --- a/apps/oxlint/src/snapshots/_fixtures__linter__js_as_jsx.js@oxlint.snap +++ b/apps/oxlint/src/snapshots/_fixtures__linter__js_as_jsx.js@oxlint.snap @@ -15,7 +15,7 @@ working directory: help: Remove the debugger statement Found 1 warning and 0 errors. -Finished in ms on 1 file with 89 rules using 1 threads. +Finished in ms on 1 file with 90 rules using 1 threads. ---------- CLI result: LintSucceeded ---------- diff --git a/apps/oxlint/src/snapshots/_fixtures__svelte__debugger.svelte@oxlint.snap b/apps/oxlint/src/snapshots/_fixtures__svelte__debugger.svelte@oxlint.snap index a92865b47cc81..71c6fb90c4dda 100644 --- a/apps/oxlint/src/snapshots/_fixtures__svelte__debugger.svelte@oxlint.snap +++ b/apps/oxlint/src/snapshots/_fixtures__svelte__debugger.svelte@oxlint.snap @@ -34,7 +34,7 @@ working directory: help: Variable declared without assignment. Either assign a value or remove the declaration. Found 3 warnings and 0 errors. -Finished in ms on 1 file with 89 rules using 1 threads. +Finished in ms on 1 file with 90 rules using 1 threads. ---------- CLI result: LintSucceeded ---------- diff --git a/apps/oxlint/src/snapshots/_fixtures__vue__debugger.vue@oxlint.snap b/apps/oxlint/src/snapshots/_fixtures__vue__debugger.vue@oxlint.snap index 6fe80af145242..a8d9c5f1a1e73 100644 --- a/apps/oxlint/src/snapshots/_fixtures__vue__debugger.vue@oxlint.snap +++ b/apps/oxlint/src/snapshots/_fixtures__vue__debugger.vue@oxlint.snap @@ -25,7 +25,7 @@ working directory: help: Remove the debugger statement Found 2 warnings and 0 errors. -Finished in ms on 1 file with 89 rules using 1 threads. +Finished in ms on 1 file with 90 rules using 1 threads. ---------- CLI result: LintSucceeded ---------- diff --git a/apps/oxlint/src/snapshots/_fixtures__vue__empty.vue@oxlint.snap b/apps/oxlint/src/snapshots/_fixtures__vue__empty.vue@oxlint.snap index fc458c656cd06..766865545a488 100644 --- a/apps/oxlint/src/snapshots/_fixtures__vue__empty.vue@oxlint.snap +++ b/apps/oxlint/src/snapshots/_fixtures__vue__empty.vue@oxlint.snap @@ -6,7 +6,7 @@ arguments: fixtures/vue/empty.vue working directory: ---------- Found 0 warnings and 0 errors. -Finished in ms on 1 file with 89 rules using 1 threads. +Finished in ms on 1 file with 90 rules using 1 threads. ---------- CLI result: LintSucceeded ---------- diff --git a/apps/oxlint/src/snapshots/_fixtures__vue__invalid.vue@oxlint.snap b/apps/oxlint/src/snapshots/_fixtures__vue__invalid.vue@oxlint.snap index b99ce34acfdbc..79ac410cf32e1 100644 --- a/apps/oxlint/src/snapshots/_fixtures__vue__invalid.vue@oxlint.snap +++ b/apps/oxlint/src/snapshots/_fixtures__vue__invalid.vue@oxlint.snap @@ -16,7 +16,7 @@ working directory: help: Add an initializer (e.g. ` = undefined`) here Found 0 warnings and 1 error. -Finished in ms on 1 file with 89 rules using 1 threads. +Finished in ms on 1 file with 90 rules using 1 threads. ---------- CLI result: LintFoundErrors ---------- diff --git a/apps/oxlint/src/snapshots/_foo.asdf@oxlint.snap b/apps/oxlint/src/snapshots/_foo.asdf@oxlint.snap index 1ac700cd30329..1b798a7c43d1e 100644 --- a/apps/oxlint/src/snapshots/_foo.asdf@oxlint.snap +++ b/apps/oxlint/src/snapshots/_foo.asdf@oxlint.snap @@ -6,7 +6,7 @@ arguments: foo.asdf working directory: ---------- Found 0 warnings and 0 errors. -Finished in ms on 0 files with 89 rules using 1 threads. +Finished in ms on 0 files with 90 rules using 1 threads. ---------- CLI result: LintSucceeded ---------- diff --git a/apps/oxlint/src/snapshots/fixtures__config_ignore_patterns__ignore_directory_-c eslintrc.json@oxlint.snap b/apps/oxlint/src/snapshots/fixtures__config_ignore_patterns__ignore_directory_-c eslintrc.json@oxlint.snap index 24165e78ad716..7572fbc6ecb2f 100644 --- a/apps/oxlint/src/snapshots/fixtures__config_ignore_patterns__ignore_directory_-c eslintrc.json@oxlint.snap +++ b/apps/oxlint/src/snapshots/fixtures__config_ignore_patterns__ignore_directory_-c eslintrc.json@oxlint.snap @@ -14,7 +14,7 @@ working directory: fixtures/config_ignore_patterns/ignore_directory help: Delete this file or add some code to it. Found 1 warning and 0 errors. -Finished in ms on 1 file with 89 rules using 1 threads. +Finished in ms on 1 file with 90 rules using 1 threads. ---------- CLI result: LintSucceeded ---------- diff --git a/apps/oxlint/src/snapshots/fixtures__config_ignore_patterns__with_oxlintrc_-c .__test__eslintrc.json --ignore-pattern _.ts .@oxlint.snap b/apps/oxlint/src/snapshots/fixtures__config_ignore_patterns__with_oxlintrc_-c .__test__eslintrc.json --ignore-pattern _.ts .@oxlint.snap index 0c25b00e41462..2ac7be61bcddb 100644 --- a/apps/oxlint/src/snapshots/fixtures__config_ignore_patterns__with_oxlintrc_-c .__test__eslintrc.json --ignore-pattern _.ts .@oxlint.snap +++ b/apps/oxlint/src/snapshots/fixtures__config_ignore_patterns__with_oxlintrc_-c .__test__eslintrc.json --ignore-pattern _.ts .@oxlint.snap @@ -6,7 +6,7 @@ arguments: -c ./test/eslintrc.json --ignore-pattern *.ts . working directory: fixtures/config_ignore_patterns/with_oxlintrc ---------- Found 0 warnings and 0 errors. -Finished in ms on 0 files with 89 rules using 1 threads. +Finished in ms on 0 files with 90 rules using 1 threads. ---------- CLI result: LintSucceeded ---------- diff --git a/apps/oxlint/src/snapshots/fixtures__disable_eslint_and_unicorn_alias_rules_-c .oxlintrc-eslint.json test.js -c .oxlintrc-unicorn.json test.js@oxlint.snap b/apps/oxlint/src/snapshots/fixtures__disable_eslint_and_unicorn_alias_rules_-c .oxlintrc-eslint.json test.js -c .oxlintrc-unicorn.json test.js@oxlint.snap index ea4c1acbde57a..51e151046ecc5 100644 --- a/apps/oxlint/src/snapshots/fixtures__disable_eslint_and_unicorn_alias_rules_-c .oxlintrc-eslint.json test.js -c .oxlintrc-unicorn.json test.js@oxlint.snap +++ b/apps/oxlint/src/snapshots/fixtures__disable_eslint_and_unicorn_alias_rules_-c .oxlintrc-eslint.json test.js -c .oxlintrc-unicorn.json test.js@oxlint.snap @@ -6,7 +6,7 @@ arguments: -c .oxlintrc-eslint.json test.js working directory: fixtures/disable_eslint_and_unicorn_alias_rules ---------- Found 0 warnings and 0 errors. -Finished in ms on 1 file with 52 rules using 1 threads. +Finished in ms on 1 file with 53 rules using 1 threads. ---------- CLI result: LintSucceeded ---------- @@ -16,7 +16,7 @@ arguments: -c .oxlintrc-unicorn.json test.js working directory: fixtures/disable_eslint_and_unicorn_alias_rules ---------- Found 0 warnings and 0 errors. -Finished in ms on 1 file with 65 rules using 1 threads. +Finished in ms on 1 file with 66 rules using 1 threads. ---------- CLI result: LintSucceeded ---------- diff --git a/apps/oxlint/src/snapshots/fixtures__dot_folder_@oxlint.snap b/apps/oxlint/src/snapshots/fixtures__dot_folder_@oxlint.snap index 3c3c8c8952bdd..3167c76ad465e 100644 --- a/apps/oxlint/src/snapshots/fixtures__dot_folder_@oxlint.snap +++ b/apps/oxlint/src/snapshots/fixtures__dot_folder_@oxlint.snap @@ -14,7 +14,7 @@ working directory: fixtures/dot_folder help: Remove the debugger statement Found 1 warning and 0 errors. -Finished in ms on 1 file with 89 rules using 1 threads. +Finished in ms on 1 file with 90 rules using 1 threads. ---------- CLI result: LintSucceeded ---------- diff --git a/apps/oxlint/src/snapshots/fixtures__extends_config_--config extends_rules_config.json console.js@oxlint.snap b/apps/oxlint/src/snapshots/fixtures__extends_config_--config extends_rules_config.json console.js@oxlint.snap index b893f937717fc..032402f4a2881 100644 --- a/apps/oxlint/src/snapshots/fixtures__extends_config_--config extends_rules_config.json console.js@oxlint.snap +++ b/apps/oxlint/src/snapshots/fixtures__extends_config_--config extends_rules_config.json console.js@oxlint.snap @@ -14,7 +14,7 @@ working directory: fixtures/extends_config help: Delete this console statement. Found 0 warnings and 1 error. -Finished in ms on 1 file with 90 rules using 1 threads. +Finished in ms on 1 file with 91 rules using 1 threads. ---------- CLI result: LintFoundErrors ---------- diff --git a/apps/oxlint/src/snapshots/fixtures__extends_config_--config relative_paths__extends_extends_config.json console.js@oxlint.snap b/apps/oxlint/src/snapshots/fixtures__extends_config_--config relative_paths__extends_extends_config.json console.js@oxlint.snap index 57087bc5f4956..29b9715227ea2 100644 --- a/apps/oxlint/src/snapshots/fixtures__extends_config_--config relative_paths__extends_extends_config.json console.js@oxlint.snap +++ b/apps/oxlint/src/snapshots/fixtures__extends_config_--config relative_paths__extends_extends_config.json console.js@oxlint.snap @@ -14,7 +14,7 @@ working directory: fixtures/extends_config help: Delete this console statement. Found 0 warnings and 1 error. -Finished in ms on 1 file with 90 rules using 1 threads. +Finished in ms on 1 file with 91 rules using 1 threads. ---------- CLI result: LintFoundErrors ---------- diff --git a/apps/oxlint/src/snapshots/fixtures__extends_config_--disable-nested-config@oxlint.snap b/apps/oxlint/src/snapshots/fixtures__extends_config_--disable-nested-config@oxlint.snap index e9e54b6e0eab5..4bb00eaf4aea3 100644 --- a/apps/oxlint/src/snapshots/fixtures__extends_config_--disable-nested-config@oxlint.snap +++ b/apps/oxlint/src/snapshots/fixtures__extends_config_--disable-nested-config@oxlint.snap @@ -31,7 +31,7 @@ working directory: fixtures/extends_config help: Remove the debugger statement Found 3 warnings and 0 errors. -Finished in ms on 4 files with 89 rules using 1 threads. +Finished in ms on 4 files with 90 rules using 1 threads. ---------- CLI result: LintSucceeded ---------- diff --git a/apps/oxlint/src/snapshots/fixtures__import-cycle_--import-plugin -D import__no-cycle@oxlint.snap b/apps/oxlint/src/snapshots/fixtures__import-cycle_--import-plugin -D import__no-cycle@oxlint.snap index 011c6f95fcc41..e6fea08e00f0e 100644 --- a/apps/oxlint/src/snapshots/fixtures__import-cycle_--import-plugin -D import__no-cycle@oxlint.snap +++ b/apps/oxlint/src/snapshots/fixtures__import-cycle_--import-plugin -D import__no-cycle@oxlint.snap @@ -27,7 +27,7 @@ working directory: fixtures/import-cycle -> ./b - fixtures/import-cycle/b.ts Found 0 warnings and 2 errors. -Finished in ms on 2 files with 92 rules using 1 threads. +Finished in ms on 2 files with 93 rules using 1 threads. ---------- CLI result: LintFoundErrors ---------- diff --git a/apps/oxlint/src/snapshots/fixtures__import_-c .oxlintrc.json test.js -c .oxlintrc-import-x.json test.js@oxlint.snap b/apps/oxlint/src/snapshots/fixtures__import_-c .oxlintrc.json test.js -c .oxlintrc-import-x.json test.js@oxlint.snap index 05fcf131dd43a..82064d0e4423b 100644 --- a/apps/oxlint/src/snapshots/fixtures__import_-c .oxlintrc.json test.js -c .oxlintrc-import-x.json test.js@oxlint.snap +++ b/apps/oxlint/src/snapshots/fixtures__import_-c .oxlintrc.json test.js -c .oxlintrc-import-x.json test.js@oxlint.snap @@ -15,7 +15,7 @@ working directory: fixtures/import `---- Found 0 warnings and 1 error. -Finished in ms on 1 file with 54 rules using 1 threads. +Finished in ms on 1 file with 55 rules using 1 threads. ---------- CLI result: LintFoundErrors ---------- @@ -34,7 +34,7 @@ working directory: fixtures/import `---- Found 0 warnings and 1 error. -Finished in ms on 1 file with 54 rules using 1 threads. +Finished in ms on 1 file with 55 rules using 1 threads. ---------- CLI result: LintFoundErrors ---------- diff --git a/apps/oxlint/src/snapshots/fixtures__issue_10394_-c .oxlintrc.json@oxlint.snap b/apps/oxlint/src/snapshots/fixtures__issue_10394_-c .oxlintrc.json@oxlint.snap index aa1360e8034f6..0d59c92f05309 100644 --- a/apps/oxlint/src/snapshots/fixtures__issue_10394_-c .oxlintrc.json@oxlint.snap +++ b/apps/oxlint/src/snapshots/fixtures__issue_10394_-c .oxlintrc.json@oxlint.snap @@ -15,7 +15,7 @@ working directory: fixtures/issue_10394 help: "Write a meaningful title for your test" Found 1 warning and 0 errors. -Finished in ms on 1 file with 89 rules using 1 threads. +Finished in ms on 1 file with 90 rules using 1 threads. ---------- CLI result: LintSucceeded ---------- diff --git a/apps/oxlint/src/snapshots/fixtures__issue_11054_-c .oxlintrc.json@oxlint.snap b/apps/oxlint/src/snapshots/fixtures__issue_11054_-c .oxlintrc.json@oxlint.snap index 2e5d872ebf147..dbe461e527897 100644 --- a/apps/oxlint/src/snapshots/fixtures__issue_11054_-c .oxlintrc.json@oxlint.snap +++ b/apps/oxlint/src/snapshots/fixtures__issue_11054_-c .oxlintrc.json@oxlint.snap @@ -6,7 +6,7 @@ arguments: -c .oxlintrc.json working directory: fixtures/issue_11054 ---------- Found 0 warnings and 0 errors. -Finished in ms on 1 file with 89 rules using 1 threads. +Finished in ms on 1 file with 90 rules using 1 threads. ---------- CLI result: LintSucceeded ---------- diff --git a/apps/oxlint/src/snapshots/fixtures__issue_11644_-c .oxlintrc.json@oxlint.snap b/apps/oxlint/src/snapshots/fixtures__issue_11644_-c .oxlintrc.json@oxlint.snap index 9fa98d0346d17..4eaedefe525c9 100644 --- a/apps/oxlint/src/snapshots/fixtures__issue_11644_-c .oxlintrc.json@oxlint.snap +++ b/apps/oxlint/src/snapshots/fixtures__issue_11644_-c .oxlintrc.json@oxlint.snap @@ -6,7 +6,7 @@ arguments: -c .oxlintrc.json working directory: fixtures/issue_11644 ---------- Found 0 warnings and 0 errors. -Finished in ms on 1 file with 160 rules using 1 threads. +Finished in ms on 1 file with 161 rules using 1 threads. ---------- CLI result: LintSucceeded ---------- diff --git a/apps/oxlint/src/snapshots/fixtures__linter_debugger.js@oxlint.snap b/apps/oxlint/src/snapshots/fixtures__linter_debugger.js@oxlint.snap index 7e47887164c7e..bce2b1e290040 100644 --- a/apps/oxlint/src/snapshots/fixtures__linter_debugger.js@oxlint.snap +++ b/apps/oxlint/src/snapshots/fixtures__linter_debugger.js@oxlint.snap @@ -14,7 +14,7 @@ working directory: fixtures/linter help: Remove the debugger statement Found 1 warning and 0 errors. -Finished in ms on 1 file with 89 rules using 1 threads. +Finished in ms on 1 file with 90 rules using 1 threads. ---------- CLI result: LintSucceeded ---------- diff --git a/apps/oxlint/src/snapshots/fixtures__overrides_env_globals_-c .oxlintrc.json .@oxlint.snap b/apps/oxlint/src/snapshots/fixtures__overrides_env_globals_-c .oxlintrc.json .@oxlint.snap index 4903ee7637f33..ddf1223a37fc1 100644 --- a/apps/oxlint/src/snapshots/fixtures__overrides_env_globals_-c .oxlintrc.json .@oxlint.snap +++ b/apps/oxlint/src/snapshots/fixtures__overrides_env_globals_-c .oxlintrc.json .@oxlint.snap @@ -51,7 +51,7 @@ working directory: fixtures/overrides_env_globals `---- Found 5 warnings and 0 errors. -Finished in ms on 3 files with 89 rules using 1 threads. +Finished in ms on 3 files with 90 rules using 1 threads. ---------- CLI result: LintSucceeded ---------- diff --git a/apps/oxlint/src/snapshots/fixtures__overrides_with_plugin_-c .oxlintrc.json@oxlint.snap b/apps/oxlint/src/snapshots/fixtures__overrides_with_plugin_-c .oxlintrc.json@oxlint.snap index ce0d0fbc19104..9081d0e8d7caf 100644 --- a/apps/oxlint/src/snapshots/fixtures__overrides_with_plugin_-c .oxlintrc.json@oxlint.snap +++ b/apps/oxlint/src/snapshots/fixtures__overrides_with_plugin_-c .oxlintrc.json@oxlint.snap @@ -42,7 +42,7 @@ working directory: fixtures/overrides_with_plugin help: Consider removing this declaration. Found 2 warnings and 2 errors. -Finished in ms on 2 files with 89 rules using 1 threads. +Finished in ms on 2 files with 90 rules using 1 threads. ---------- CLI result: LintFoundErrors ---------- diff --git a/apps/oxlint/src/snapshots/fixtures__report_unused_directives_-c .oxlintrc.json --report-unused-disable-directives@oxlint.snap b/apps/oxlint/src/snapshots/fixtures__report_unused_directives_-c .oxlintrc.json --report-unused-disable-directives@oxlint.snap index 36295442dd460..5444bbff8daa6 100644 --- a/apps/oxlint/src/snapshots/fixtures__report_unused_directives_-c .oxlintrc.json --report-unused-disable-directives@oxlint.snap +++ b/apps/oxlint/src/snapshots/fixtures__report_unused_directives_-c .oxlintrc.json --report-unused-disable-directives@oxlint.snap @@ -321,7 +321,7 @@ working directory: fixtures/report_unused_directives `---- Found 38 warnings and 0 errors. -Finished in ms on 5 files with 90 rules using 1 threads. +Finished in ms on 5 files with 91 rules using 1 threads. ---------- CLI result: LintSucceeded ---------- diff --git a/apps/oxlint/src/snapshots/fixtures__tsgolint_config_error_--type-aware@oxlint.snap b/apps/oxlint/src/snapshots/fixtures__tsgolint_config_error_--type-aware@oxlint.snap index d3bc5bc8cb726..dd203e39868da 100644 --- a/apps/oxlint/src/snapshots/fixtures__tsgolint_config_error_--type-aware@oxlint.snap +++ b/apps/oxlint/src/snapshots/fixtures__tsgolint_config_error_--type-aware@oxlint.snap @@ -17,7 +17,7 @@ working directory: fixtures/tsgolint_config_error See https://github.com/oxc-project/tsgolint/issues/351 for more information. Found 0 warnings and 1 error. -Finished in ms on 1 file with 103 rules using 1 threads. +Finished in ms on 1 file with 104 rules using 1 threads. ---------- CLI result: LintFoundErrors ---------- diff --git a/apps/oxlint/src/snapshots/fixtures__tsgolint_disable_directives_--type-aware --report-unused-disable-directives unused.ts@oxlint.snap b/apps/oxlint/src/snapshots/fixtures__tsgolint_disable_directives_--type-aware --report-unused-disable-directives unused.ts@oxlint.snap index 31d4d6654fbc3..b0458085853ce 100644 --- a/apps/oxlint/src/snapshots/fixtures__tsgolint_disable_directives_--type-aware --report-unused-disable-directives unused.ts@oxlint.snap +++ b/apps/oxlint/src/snapshots/fixtures__tsgolint_disable_directives_--type-aware --report-unused-disable-directives unused.ts@oxlint.snap @@ -77,7 +77,7 @@ working directory: fixtures/tsgolint_disable_directives `---- Found 8 warnings and 0 errors. -Finished in ms on 1 file with 103 rules using 1 threads. +Finished in ms on 1 file with 104 rules using 1 threads. ---------- CLI result: LintSucceeded ---------- diff --git a/apps/oxlint/src/snapshots/fixtures__tsgolint_disable_directives_--type-aware test.ts@oxlint.snap b/apps/oxlint/src/snapshots/fixtures__tsgolint_disable_directives_--type-aware test.ts@oxlint.snap index df632fedbc22c..22b827cfa9567 100644 --- a/apps/oxlint/src/snapshots/fixtures__tsgolint_disable_directives_--type-aware test.ts@oxlint.snap +++ b/apps/oxlint/src/snapshots/fixtures__tsgolint_disable_directives_--type-aware test.ts@oxlint.snap @@ -96,7 +96,7 @@ working directory: fixtures/tsgolint_disable_directives help: The promise must end with a call to .catch, or end with a call to .then with a rejection handler, or be explicitly marked as ignored with the `void` operator. Found 10 warnings and 0 errors. -Finished in ms on 1 file with 103 rules using 1 threads. +Finished in ms on 1 file with 104 rules using 1 threads. ---------- CLI result: LintSucceeded ---------- diff --git a/apps/oxlint/src/snapshots/fixtures__tsgolint_tsconfig_extends_config_err_--type-aware -D no-floating-promises@oxlint.snap b/apps/oxlint/src/snapshots/fixtures__tsgolint_tsconfig_extends_config_err_--type-aware -D no-floating-promises@oxlint.snap index 2801f5d349570..af2feb5093f6a 100644 --- a/apps/oxlint/src/snapshots/fixtures__tsgolint_tsconfig_extends_config_err_--type-aware -D no-floating-promises@oxlint.snap +++ b/apps/oxlint/src/snapshots/fixtures__tsgolint_tsconfig_extends_config_err_--type-aware -D no-floating-promises@oxlint.snap @@ -11,7 +11,7 @@ working directory: fixtures/tsgolint_tsconfig_extends_config_err See https://github.com/oxc-project/tsgolint/issues/351 for more information. Found 0 warnings and 1 error. -Finished in ms on 1 file with 103 rules using 1 threads. +Finished in ms on 1 file with 104 rules using 1 threads. ---------- CLI result: LintFoundErrors ---------- diff --git a/apps/oxlint/src/snapshots/fixtures__two_rules_with_same_rule_name_-c .oxlintrc.json test.js@oxlint.snap b/apps/oxlint/src/snapshots/fixtures__two_rules_with_same_rule_name_-c .oxlintrc.json test.js@oxlint.snap index 36d0766f8748d..82ea3c9a0e2f4 100644 --- a/apps/oxlint/src/snapshots/fixtures__two_rules_with_same_rule_name_-c .oxlintrc.json test.js@oxlint.snap +++ b/apps/oxlint/src/snapshots/fixtures__two_rules_with_same_rule_name_-c .oxlintrc.json test.js@oxlint.snap @@ -6,7 +6,7 @@ arguments: -c .oxlintrc.json test.js working directory: fixtures/two_rules_with_same_rule_name ---------- Found 0 warnings and 0 errors. -Finished in ms on 1 file with 65 rules using 1 threads. +Finished in ms on 1 file with 66 rules using 1 threads. ---------- CLI result: LintSucceeded ---------- diff --git a/apps/oxlint/test/fixtures/languageOptions/output.snap.md b/apps/oxlint/test/fixtures/languageOptions/output.snap.md index 26a8c8e77102a..fd2b6753c9a20 100644 --- a/apps/oxlint/test/fixtures/languageOptions/output.snap.md +++ b/apps/oxlint/test/fixtures/languageOptions/output.snap.md @@ -634,7 +634,7 @@ | "moduleReference" | ], | "TSImportType": [ - | "argument", + | "source", | "options", | "qualifier", | "typeArguments" diff --git a/apps/oxlint/test/rule_tester.test.ts b/apps/oxlint/test/rule_tester.test.ts index 502e7dc304a3b..e37385cb99bc7 100644 --- a/apps/oxlint/test/rule_tester.test.ts +++ b/apps/oxlint/test/rule_tester.test.ts @@ -150,29 +150,27 @@ describe("RuleTester", () => { }); describe("config", () => { - // TODO: More tests for config - it("can be set globally", () => { - const config = { whatever: true }; + const config = { eslintCompat: true }; RuleTester.setDefaultConfig(config); expect(RuleTester.getDefaultConfig()).toBe(config); }); it("is reset to default by `resetDefaultConfig`", () => { - RuleTester.setDefaultConfig({ whatever: true }); - expect(RuleTester.getDefaultConfig()).toHaveProperty("whatever", true); + RuleTester.setDefaultConfig({ eslintCompat: true }); + expect(RuleTester.getDefaultConfig()).toHaveProperty("eslintCompat", true); RuleTester.resetDefaultConfig(); - expect(RuleTester.getDefaultConfig()).not.toHaveProperty("whatever"); + expect(RuleTester.getDefaultConfig()).not.toHaveProperty("eslintCompat"); }); it("cannot permanently change default config", () => { const defaultConfig = RuleTester.getDefaultConfig(); - defaultConfig.whatever = true; + defaultConfig.eslintCompat = true; expect(RuleTester.getDefaultConfig()).toBe(defaultConfig); RuleTester.resetDefaultConfig(); - expect(RuleTester.getDefaultConfig()).not.toHaveProperty("whatever"); + expect(RuleTester.getDefaultConfig()).not.toHaveProperty("eslintCompat"); }); }); @@ -940,4 +938,1878 @@ describe("RuleTester", () => { expect(runCases()).toEqual([null, null, null]); }); }); + + describe("parsing options", () => { + describe("sourceType", () => { + it("default (module)", () => { + const tester = new RuleTester(); + tester.run("no-foo", simpleRule, { + valid: ["with (obj) {}", "import x from 'foo';"], + invalid: [], + }); + + expect(runCases()).toMatchInlineSnapshot(` + [ + [Error: Parsing failed], + null, + ] + `); + }); + + describe("module", () => { + it("set globally", () => { + RuleTester.setDefaultConfig({ + languageOptions: { sourceType: "module" }, + }); + + const tester = new RuleTester(); + tester.run("no-foo", simpleRule, { + valid: ["with (obj) {}", "import x from 'foo';"], + invalid: [], + }); + + expect(runCases()).toMatchInlineSnapshot(` + [ + [Error: Parsing failed], + null, + ] + `); + }); + + it("set in `RuleTester` options", () => { + const tester = new RuleTester({ + languageOptions: { sourceType: "module" }, + }); + tester.run("no-foo", simpleRule, { + valid: ["with (obj) {}", "import x from 'foo';"], + invalid: [], + }); + + expect(runCases()).toMatchInlineSnapshot(` + [ + [Error: Parsing failed], + null, + ] + `); + }); + + it("set in `RuleTester` options, overriding global setting", () => { + RuleTester.setDefaultConfig({ + languageOptions: { sourceType: "script" }, + }); + + const tester = new RuleTester({ + languageOptions: { sourceType: "module" }, + }); + tester.run("no-foo", simpleRule, { + valid: ["with (obj) {}", "import x from 'foo';"], + invalid: [], + }); + + expect(runCases()).toMatchInlineSnapshot(` + [ + [Error: Parsing failed], + null, + ] + `); + }); + + it("set in individual test cases", () => { + const tester = new RuleTester(); + tester.run("no-foo", simpleRule, { + valid: [ + { + code: "with (obj) {}", + languageOptions: { sourceType: "module" }, + }, + { + code: "import x from 'foo';", + languageOptions: { sourceType: "module" }, + }, + ], + invalid: [], + }); + + expect(runCases()).toMatchInlineSnapshot(` + [ + [Error: Parsing failed], + null, + ] + `); + }); + + it("set in individual test cases, overriding global setting", () => { + RuleTester.setDefaultConfig({ + languageOptions: { sourceType: "script" }, + }); + + const tester = new RuleTester(); + tester.run("no-foo", simpleRule, { + valid: [ + { + code: "with (obj) {}", + languageOptions: { sourceType: "module" }, + }, + { + code: "import x from 'foo';", + languageOptions: { sourceType: "module" }, + }, + ], + invalid: [], + }); + + expect(runCases()).toMatchInlineSnapshot(` + [ + [Error: Parsing failed], + null, + ] + `); + }); + + it("set in individual test cases, overriding `RuleTester` options", () => { + const tester = new RuleTester({ + languageOptions: { sourceType: "script" }, + }); + tester.run("no-foo", simpleRule, { + valid: [ + { + code: "with (obj) {}", + languageOptions: { sourceType: "module" }, + }, + { + code: "import x from 'foo';", + languageOptions: { sourceType: "module" }, + }, + ], + invalid: [], + }); + + expect(runCases()).toMatchInlineSnapshot(` + [ + [Error: Parsing failed], + null, + ] + `); + }); + }); + + describe("script", () => { + it("set globally", () => { + RuleTester.setDefaultConfig({ + languageOptions: { sourceType: "script" }, + }); + + const tester = new RuleTester(); + tester.run("no-foo", simpleRule, { + valid: ["with (obj) {}", "import x from 'foo';"], + invalid: [], + }); + + expect(runCases()).toMatchInlineSnapshot(` + [ + null, + [Error: Parsing failed], + ] + `); + }); + + it("set in `RuleTester` options", () => { + const tester = new RuleTester({ + languageOptions: { sourceType: "script" }, + }); + tester.run("no-foo", simpleRule, { + valid: ["with (obj) {}", "import x from 'foo';"], + invalid: [], + }); + + expect(runCases()).toMatchInlineSnapshot(` + [ + null, + [Error: Parsing failed], + ] + `); + }); + + it("set in individual test cases", () => { + const tester = new RuleTester(); + tester.run("no-foo", simpleRule, { + valid: [ + { + code: "with (obj) {}", + languageOptions: { sourceType: "script" }, + }, + { + code: "import x from 'foo';", + languageOptions: { sourceType: "script" }, + }, + ], + invalid: [], + }); + + expect(runCases()).toMatchInlineSnapshot(` + [ + null, + [Error: Parsing failed], + ] + `); + }); + }); + + describe("commonjs", () => { + describe("with `eslintCompat` option", () => { + it("set globally", () => { + RuleTester.setDefaultConfig({ + languageOptions: { sourceType: "commonjs" }, + eslintCompat: true, + }); + + const tester = new RuleTester(); + tester.run("no-foo", simpleRule, { + valid: ["with (obj) {}", "import x from 'foo';"], + invalid: [], + }); + + expect(runCases()).toMatchInlineSnapshot(` + [ + null, + [Error: Parsing failed], + ] + `); + }); + + it("set in `RuleTester` options", () => { + const tester = new RuleTester({ + languageOptions: { sourceType: "commonjs" }, + eslintCompat: true, + }); + tester.run("no-foo", simpleRule, { + valid: ["with (obj) {}", "import x from 'foo';"], + invalid: [], + }); + + expect(runCases()).toMatchInlineSnapshot(` + [ + null, + [Error: Parsing failed], + ] + `); + }); + + it("set in individual test cases", () => { + const tester = new RuleTester(); + tester.run("no-foo", simpleRule, { + valid: [ + { + code: "with (obj) {}", + languageOptions: { sourceType: "commonjs" }, + eslintCompat: true, + }, + { + code: "import x from 'foo';", + languageOptions: { sourceType: "commonjs" }, + eslintCompat: true, + }, + ], + invalid: [], + }); + + expect(runCases()).toMatchInlineSnapshot(` + [ + null, + [Error: Parsing failed], + ] + `); + }); + }); + + describe("without `eslintCompat` option", () => { + it("set globally", () => { + RuleTester.setDefaultConfig({ + languageOptions: { sourceType: "commonjs" }, + }); + + const tester = new RuleTester(); + tester.run("no-foo", simpleRule, { + valid: ["with (obj) {}", "import x from 'foo';"], + invalid: [], + }); + + expect(runCases()).toMatchInlineSnapshot(` + [ + [Error: 'commonjs' source type is only supported in ESLint compatibility mode. + Enable ESLint compatibility mode by setting \`eslintCompat\` to \`true\` in the config / test case.], + [Error: 'commonjs' source type is only supported in ESLint compatibility mode. + Enable ESLint compatibility mode by setting \`eslintCompat\` to \`true\` in the config / test case.], + ] + `); + }); + + it("set in `RuleTester` options", () => { + const tester = new RuleTester({ + languageOptions: { sourceType: "commonjs" }, + }); + tester.run("no-foo", simpleRule, { + valid: ["with (obj) {}", "import x from 'foo';"], + invalid: [], + }); + + expect(runCases()).toMatchInlineSnapshot(` + [ + [Error: 'commonjs' source type is only supported in ESLint compatibility mode. + Enable ESLint compatibility mode by setting \`eslintCompat\` to \`true\` in the config / test case.], + [Error: 'commonjs' source type is only supported in ESLint compatibility mode. + Enable ESLint compatibility mode by setting \`eslintCompat\` to \`true\` in the config / test case.], + ] + `); + }); + + it("set in individual test cases", () => { + const tester = new RuleTester(); + tester.run("no-foo", simpleRule, { + valid: [ + { + code: "with (obj) {}", + languageOptions: { sourceType: "commonjs" }, + }, + { + code: "import x from 'foo';", + languageOptions: { sourceType: "commonjs" }, + }, + ], + invalid: [], + }); + + expect(runCases()).toMatchInlineSnapshot(` + [ + [Error: 'commonjs' source type is only supported in ESLint compatibility mode. + Enable ESLint compatibility mode by setting \`eslintCompat\` to \`true\` in the config / test case.], + [Error: 'commonjs' source type is only supported in ESLint compatibility mode. + Enable ESLint compatibility mode by setting \`eslintCompat\` to \`true\` in the config / test case.], + ] + `); + }); + }); + }); + + describe("unambiguous", () => { + describe("with `eslintCompat` option", () => { + it("set globally", () => { + RuleTester.setDefaultConfig({ + languageOptions: { sourceType: "unambiguous" }, + eslintCompat: true, + }); + + const tester = new RuleTester(); + tester.run("no-foo", simpleRule, { + valid: ["with (obj) {}", "import x from 'foo';"], + invalid: [], + }); + + expect(runCases()).toMatchInlineSnapshot(` + [ + [Error: 'unambiguous' source type is not supported in ESLint compatibility mode. + Disable ESLint compatibility mode by setting \`eslintCompat\` to \`false\` in the config / test case.], + [Error: 'unambiguous' source type is not supported in ESLint compatibility mode. + Disable ESLint compatibility mode by setting \`eslintCompat\` to \`false\` in the config / test case.], + ] + `); + }); + + it("set in `RuleTester` options", () => { + const tester = new RuleTester({ + languageOptions: { sourceType: "unambiguous" }, + eslintCompat: true, + }); + tester.run("no-foo", simpleRule, { + valid: ["with (obj) {}", "import x from 'foo';"], + invalid: [], + }); + + expect(runCases()).toMatchInlineSnapshot(` + [ + [Error: 'unambiguous' source type is not supported in ESLint compatibility mode. + Disable ESLint compatibility mode by setting \`eslintCompat\` to \`false\` in the config / test case.], + [Error: 'unambiguous' source type is not supported in ESLint compatibility mode. + Disable ESLint compatibility mode by setting \`eslintCompat\` to \`false\` in the config / test case.], + ] + `); + }); + + it("set in individual test cases", () => { + const tester = new RuleTester(); + tester.run("no-foo", simpleRule, { + valid: [ + { + code: "with (obj) {}", + languageOptions: { sourceType: "unambiguous" }, + eslintCompat: true, + }, + { + code: "import x from 'foo';", + languageOptions: { sourceType: "unambiguous" }, + eslintCompat: true, + }, + ], + invalid: [], + }); + + expect(runCases()).toMatchInlineSnapshot(` + [ + [Error: 'unambiguous' source type is not supported in ESLint compatibility mode. + Disable ESLint compatibility mode by setting \`eslintCompat\` to \`false\` in the config / test case.], + [Error: 'unambiguous' source type is not supported in ESLint compatibility mode. + Disable ESLint compatibility mode by setting \`eslintCompat\` to \`false\` in the config / test case.], + ] + `); + }); + }); + + describe("without `eslintCompat` option", () => { + it("set globally", () => { + RuleTester.setDefaultConfig({ + languageOptions: { sourceType: "unambiguous" }, + }); + + const tester = new RuleTester(); + tester.run("no-foo", simpleRule, { + valid: ["with (obj) {}", "import x from 'foo';"], + invalid: [], + }); + + expect(runCases()).toEqual([null, null]); + }); + + it("set in `RuleTester` options", () => { + const tester = new RuleTester({ + languageOptions: { sourceType: "unambiguous" }, + }); + tester.run("no-foo", simpleRule, { + valid: ["with (obj) {}", "import x from 'foo';"], + invalid: [], + }); + + expect(runCases()).toEqual([null, null]); + }); + + it("set in individual test cases", () => { + const tester = new RuleTester(); + tester.run("no-foo", simpleRule, { + valid: [ + { + code: "with (obj) {}", + languageOptions: { sourceType: "unambiguous" }, + }, + { + code: "import x from 'foo';", + languageOptions: { sourceType: "unambiguous" }, + }, + ], + invalid: [], + }); + + expect(runCases()).toEqual([null, null]); + }); + }); + }); + + it("mixed across test cases", () => { + const tester = new RuleTester(); + tester.run("no-foo", simpleRule, { + valid: [ + "with (obj) {}", + { + code: "with (obj) {}", + languageOptions: { sourceType: "script" }, + }, + { + code: "import x from 'foo';", + languageOptions: { sourceType: "module" }, + }, + { + code: "with (obj) {}", + languageOptions: { sourceType: "module" }, + }, + { + code: "import x from 'foo';", + languageOptions: { sourceType: "script" }, + }, + { + code: "with (obj) {}", + languageOptions: { sourceType: "unambiguous" }, + }, + { + code: "import x from 'foo';", + languageOptions: { sourceType: "unambiguous" }, + }, + ], + invalid: [], + }); + + expect(runCases()).toMatchInlineSnapshot(` + [ + [Error: Parsing failed], + null, + null, + [Error: Parsing failed], + [Error: Parsing failed], + null, + null, + ] + `); + }); + }); + + describe("lang", () => { + it("default (js)", () => { + const tester = new RuleTester(); + tester.run("no-foo", simpleRule, { + valid: [ + "let x;", + "
", + "let x: number;", + "let x: T =
;", + "class C { f(): void }", + ], + invalid: [], + }); + + expect(runCases()).toMatchInlineSnapshot(` + [ + null, + [Error: Parsing failed], + [Error: Parsing failed], + [Error: Parsing failed], + [Error: Parsing failed], + ] + `); + }); + + describe("js", () => { + it("set globally", () => { + RuleTester.setDefaultConfig({ + languageOptions: { parserOptions: { lang: "js" } }, + }); + + const tester = new RuleTester(); + tester.run("no-foo", simpleRule, { + valid: [ + "let x;", + "
", + "let x: number;", + "let x: T =
;", + "class C { f(): void }", + ], + invalid: [], + }); + + expect(runCases()).toMatchInlineSnapshot(` + [ + null, + [Error: Parsing failed], + [Error: Parsing failed], + [Error: Parsing failed], + [Error: Parsing failed], + ] + `); + }); + + it("set in `RuleTester` options", () => { + const tester = new RuleTester({ + languageOptions: { parserOptions: { lang: "js" } }, + }); + tester.run("no-foo", simpleRule, { + valid: [ + "let x;", + "
", + "let x: number;", + "let x: T =
;", + "class C { f(): void }", + ], + invalid: [], + }); + + expect(runCases()).toMatchInlineSnapshot(` + [ + null, + [Error: Parsing failed], + [Error: Parsing failed], + [Error: Parsing failed], + [Error: Parsing failed], + ] + `); + }); + + it("set in `RuleTester` options, overriding global setting", () => { + RuleTester.setDefaultConfig({ + languageOptions: { parserOptions: { lang: "jsx" } }, + }); + + const tester = new RuleTester({ + languageOptions: { parserOptions: { lang: "js" } }, + }); + tester.run("no-foo", simpleRule, { + valid: [ + "let x;", + "
", + "let x: number;", + "let x: T =
;", + "class C { f(): void }", + ], + invalid: [], + }); + + expect(runCases()).toMatchInlineSnapshot(` + [ + null, + [Error: Parsing failed], + [Error: Parsing failed], + [Error: Parsing failed], + [Error: Parsing failed], + ] + `); + }); + + it("set in individual test cases", () => { + const tester = new RuleTester(); + tester.run("no-foo", simpleRule, { + valid: [ + { + code: "let x;", + languageOptions: { parserOptions: { lang: "js" } }, + }, + { + code: "
", + languageOptions: { parserOptions: { lang: "js" } }, + }, + { + code: "let x: number;", + languageOptions: { parserOptions: { lang: "js" } }, + }, + { + code: "let x: T =
;", + languageOptions: { parserOptions: { lang: "js" } }, + }, + { + code: "class C { f(): void }", + languageOptions: { parserOptions: { lang: "js" } }, + }, + ], + invalid: [], + }); + + expect(runCases()).toMatchInlineSnapshot(` + [ + null, + [Error: Parsing failed], + [Error: Parsing failed], + [Error: Parsing failed], + [Error: Parsing failed], + ] + `); + }); + + it("set in individual test cases, overriding global setting", () => { + RuleTester.setDefaultConfig({ + languageOptions: { parserOptions: { lang: "jsx" } }, + }); + + const tester = new RuleTester(); + tester.run("no-foo", simpleRule, { + valid: [ + { + code: "let x;", + languageOptions: { parserOptions: { lang: "js" } }, + }, + { + code: "
", + languageOptions: { parserOptions: { lang: "js" } }, + }, + { + code: "let x: number;", + languageOptions: { parserOptions: { lang: "js" } }, + }, + { + code: "let x: T =
;", + languageOptions: { parserOptions: { lang: "js" } }, + }, + { + code: "class C { f(): void }", + languageOptions: { parserOptions: { lang: "js" } }, + }, + ], + invalid: [], + }); + + expect(runCases()).toMatchInlineSnapshot(` + [ + null, + [Error: Parsing failed], + [Error: Parsing failed], + [Error: Parsing failed], + [Error: Parsing failed], + ] + `); + }); + + it("set in individual test cases, overriding `RuleTester` options", () => { + const tester = new RuleTester({ + languageOptions: { parserOptions: { lang: "jsx" } }, + }); + tester.run("no-foo", simpleRule, { + valid: [ + { + code: "let x;", + languageOptions: { parserOptions: { lang: "js" } }, + }, + { + code: "
", + languageOptions: { parserOptions: { lang: "js" } }, + }, + { + code: "let x: number;", + languageOptions: { parserOptions: { lang: "js" } }, + }, + { + code: "let x: T =
;", + languageOptions: { parserOptions: { lang: "js" } }, + }, + { + code: "class C { f(): void }", + languageOptions: { parserOptions: { lang: "js" } }, + }, + ], + invalid: [], + }); + + expect(runCases()).toMatchInlineSnapshot(` + [ + null, + [Error: Parsing failed], + [Error: Parsing failed], + [Error: Parsing failed], + [Error: Parsing failed], + ] + `); + }); + }); + + describe("jsx", () => { + it("set globally", () => { + RuleTester.setDefaultConfig({ + languageOptions: { parserOptions: { lang: "jsx" } }, + }); + + const tester = new RuleTester(); + tester.run("no-foo", simpleRule, { + valid: [ + "let x;", + "
", + "let x: number;", + "let x: T =
;", + "class C { f(): void }", + ], + invalid: [], + }); + + expect(runCases()).toMatchInlineSnapshot(` + [ + null, + null, + [Error: Parsing failed], + [Error: Parsing failed], + [Error: Parsing failed], + ] + `); + }); + + it("set in `RuleTester` options", () => { + const tester = new RuleTester({ + languageOptions: { parserOptions: { lang: "jsx" } }, + }); + tester.run("no-foo", simpleRule, { + valid: [ + "let x;", + "
", + "let x: number;", + "let x: T =
;", + "class C { f(): void }", + ], + invalid: [], + }); + + expect(runCases()).toMatchInlineSnapshot(` + [ + null, + null, + [Error: Parsing failed], + [Error: Parsing failed], + [Error: Parsing failed], + ] + `); + }); + + it("set in individual test cases", () => { + const tester = new RuleTester(); + tester.run("no-foo", simpleRule, { + valid: [ + { + code: "let x;", + languageOptions: { parserOptions: { lang: "jsx" } }, + }, + { + code: "
", + languageOptions: { parserOptions: { lang: "jsx" } }, + }, + { + code: "let x: number;", + languageOptions: { parserOptions: { lang: "jsx" } }, + }, + { + code: "let x: T =
;", + languageOptions: { parserOptions: { lang: "jsx" } }, + }, + { + code: "class C { f(): void }", + languageOptions: { parserOptions: { lang: "jsx" } }, + }, + ], + invalid: [], + }); + + expect(runCases()).toMatchInlineSnapshot(` + [ + null, + null, + [Error: Parsing failed], + [Error: Parsing failed], + [Error: Parsing failed], + ] + `); + }); + }); + + describe("ts", () => { + it("set globally", () => { + RuleTester.setDefaultConfig({ + languageOptions: { parserOptions: { lang: "ts" } }, + }); + + const tester = new RuleTester(); + tester.run("no-foo", simpleRule, { + valid: [ + "let x;", + "
", + "let x: number;", + "let x: T =
;", + "class C { f(): void }", + ], + invalid: [], + }); + + expect(runCases()).toMatchInlineSnapshot(` + [ + null, + [Error: Parsing failed], + null, + [Error: Parsing failed], + [Error: Parsing failed], + ] + `); + }); + + it("set in `RuleTester` options", () => { + const tester = new RuleTester({ + languageOptions: { parserOptions: { lang: "ts" } }, + }); + tester.run("no-foo", simpleRule, { + valid: [ + "let x;", + "
", + "let x: number;", + "let x: T =
;", + "class C { f(): void }", + ], + invalid: [], + }); + + expect(runCases()).toMatchInlineSnapshot(` + [ + null, + [Error: Parsing failed], + null, + [Error: Parsing failed], + [Error: Parsing failed], + ] + `); + }); + + it("set in individual test cases", () => { + const tester = new RuleTester(); + tester.run("no-foo", simpleRule, { + valid: [ + { + code: "let x;", + languageOptions: { parserOptions: { lang: "ts" } }, + }, + { + code: "
", + languageOptions: { parserOptions: { lang: "ts" } }, + }, + { + code: "let x: number;", + languageOptions: { parserOptions: { lang: "ts" } }, + }, + { + code: "let x: T =
;", + languageOptions: { parserOptions: { lang: "ts" } }, + }, + { + code: "class C { f(): void }", + languageOptions: { parserOptions: { lang: "ts" } }, + }, + ], + invalid: [], + }); + + expect(runCases()).toMatchInlineSnapshot(` + [ + null, + [Error: Parsing failed], + null, + [Error: Parsing failed], + [Error: Parsing failed], + ] + `); + }); + }); + + describe("tsx", () => { + it("set globally", () => { + RuleTester.setDefaultConfig({ + languageOptions: { parserOptions: { lang: "tsx" } }, + }); + + const tester = new RuleTester(); + tester.run("no-foo", simpleRule, { + valid: [ + "let x;", + "
", + "let x: number;", + "let x: T =
;", + "class C { f(): void }", + ], + invalid: [], + }); + + expect(runCases()).toMatchInlineSnapshot(` + [ + null, + null, + null, + null, + [Error: Parsing failed], + ] + `); + }); + + it("set in `RuleTester` options", () => { + const tester = new RuleTester({ + languageOptions: { parserOptions: { lang: "tsx" } }, + }); + tester.run("no-foo", simpleRule, { + valid: [ + "let x;", + "
", + "let x: number;", + "let x: T =
;", + "class C { f(): void }", + ], + invalid: [], + }); + + expect(runCases()).toMatchInlineSnapshot(` + [ + null, + null, + null, + null, + [Error: Parsing failed], + ] + `); + }); + + it("set in individual test cases", () => { + const tester = new RuleTester(); + tester.run("no-foo", simpleRule, { + valid: [ + { + code: "let x;", + languageOptions: { parserOptions: { lang: "tsx" } }, + }, + { + code: "
", + languageOptions: { parserOptions: { lang: "tsx" } }, + }, + { + code: "let x: number;", + languageOptions: { parserOptions: { lang: "tsx" } }, + }, + { + code: "let x: T =
;", + languageOptions: { parserOptions: { lang: "tsx" } }, + }, + { + code: "class C { f(): void }", + languageOptions: { parserOptions: { lang: "tsx" } }, + }, + ], + invalid: [], + }); + + expect(runCases()).toMatchInlineSnapshot(` + [ + null, + null, + null, + null, + [Error: Parsing failed], + ] + `); + }); + }); + + describe("dts", () => { + it("set globally", () => { + RuleTester.setDefaultConfig({ + languageOptions: { parserOptions: { lang: "dts" } }, + }); + + const tester = new RuleTester(); + tester.run("no-foo", simpleRule, { + valid: [ + "let x;", + "
", + "let x: number;", + "let x: T =
;", + "class C { f(): void }", + ], + invalid: [], + }); + + expect(runCases()).toMatchInlineSnapshot(` + [ + null, + [Error: Parsing failed], + null, + [Error: Parsing failed], + null, + ] + `); + }); + + it("set in `RuleTester` options", () => { + const tester = new RuleTester({ + languageOptions: { parserOptions: { lang: "dts" } }, + }); + tester.run("no-foo", simpleRule, { + valid: [ + "let x;", + "
", + "let x: number;", + "let x: T =
;", + "class C { f(): void }", + ], + invalid: [], + }); + + expect(runCases()).toMatchInlineSnapshot(` + [ + null, + [Error: Parsing failed], + null, + [Error: Parsing failed], + null, + ] + `); + }); + + it("set in individual test cases", () => { + const tester = new RuleTester(); + tester.run("no-foo", simpleRule, { + valid: [ + { + code: "let x;", + languageOptions: { parserOptions: { lang: "dts" } }, + }, + { + code: "
", + languageOptions: { parserOptions: { lang: "dts" } }, + }, + { + code: "let x: number;", + languageOptions: { parserOptions: { lang: "dts" } }, + }, + { + code: "let x: T =
;", + languageOptions: { parserOptions: { lang: "dts" } }, + }, + { + code: "class C { f(): void }", + languageOptions: { parserOptions: { lang: "dts" } }, + }, + ], + invalid: [], + }); + + expect(runCases()).toMatchInlineSnapshot(` + [ + null, + [Error: Parsing failed], + null, + [Error: Parsing failed], + null, + ] + `); + }); + }); + + it("mixed across test cases", () => { + const tester = new RuleTester(); + tester.run("no-foo", simpleRule, { + valid: [ + // Default (js) + "let x;", + "
", + "let x: number;", + "let x: T =
;", + "class C { f(): void }", + // JS + { + code: "let x;", + languageOptions: { parserOptions: { lang: "js" } }, + }, + { + code: "
", + languageOptions: { parserOptions: { lang: "js" } }, + }, + { + code: "let x: number;", + languageOptions: { parserOptions: { lang: "js" } }, + }, + { + code: "let x: T =
;", + languageOptions: { parserOptions: { lang: "js" } }, + }, + { + code: "class C { f(): void }", + languageOptions: { parserOptions: { lang: "js" } }, + }, + // JSX + { + code: "let x;", + languageOptions: { parserOptions: { lang: "jsx" } }, + }, + { + code: "
", + languageOptions: { parserOptions: { lang: "jsx" } }, + }, + { + code: "let x: number;", + languageOptions: { parserOptions: { lang: "jsx" } }, + }, + { + code: "let x: T =
;", + languageOptions: { parserOptions: { lang: "jsx" } }, + }, + { + code: "class C { f(): void }", + languageOptions: { parserOptions: { lang: "jsx" } }, + }, + // TS + { + code: "let x;", + languageOptions: { parserOptions: { lang: "ts" } }, + }, + { + code: "
", + languageOptions: { parserOptions: { lang: "ts" } }, + }, + { + code: "let x: number;", + languageOptions: { parserOptions: { lang: "ts" } }, + }, + { + code: "let x: T =
;", + languageOptions: { parserOptions: { lang: "ts" } }, + }, + { + code: "class C { f(): void }", + languageOptions: { parserOptions: { lang: "ts" } }, + }, + // TSX + { + code: "let x;", + languageOptions: { parserOptions: { lang: "tsx" } }, + }, + { + code: "
", + languageOptions: { parserOptions: { lang: "tsx" } }, + }, + { + code: "let x: number;", + languageOptions: { parserOptions: { lang: "tsx" } }, + }, + { + code: "let x: T =
;", + languageOptions: { parserOptions: { lang: "tsx" } }, + }, + { + code: "class C { f(): void }", + languageOptions: { parserOptions: { lang: "tsx" } }, + }, + // DTS + { + code: "let x;", + languageOptions: { parserOptions: { lang: "dts" } }, + }, + { + code: "
", + languageOptions: { parserOptions: { lang: "dts" } }, + }, + { + code: "let x: number;", + languageOptions: { parserOptions: { lang: "dts" } }, + }, + { + code: "let x: T =
;", + languageOptions: { parserOptions: { lang: "dts" } }, + }, + { + code: "class C { f(): void }", + languageOptions: { parserOptions: { lang: "dts" } }, + }, + ], + invalid: [], + }); + + expect(runCases()).toMatchInlineSnapshot(` + [ + null, + [Error: Parsing failed], + [Error: Parsing failed], + [Error: Parsing failed], + [Error: Parsing failed], + null, + [Error: Parsing failed], + [Error: Parsing failed], + [Error: Parsing failed], + [Error: Parsing failed], + null, + null, + [Error: Parsing failed], + [Error: Parsing failed], + [Error: Parsing failed], + null, + [Error: Parsing failed], + null, + [Error: Parsing failed], + [Error: Parsing failed], + null, + null, + null, + null, + [Error: Parsing failed], + null, + [Error: Parsing failed], + null, + [Error: Parsing failed], + null, + ] + `); + }); + }); + + describe("ecmaFeatures.jsx", () => { + it("default (false)", () => { + const tester = new RuleTester(); + tester.run("no-foo", simpleRule, { + valid: ["let x;", "
"], + invalid: [], + }); + + expect(runCases()).toMatchInlineSnapshot(` + [ + null, + [Error: Parsing failed], + ] + `); + }); + + describe("false", () => { + it("set globally", () => { + RuleTester.setDefaultConfig({ + languageOptions: { parserOptions: { ecmaFeatures: { jsx: false } } }, + }); + + const tester = new RuleTester(); + tester.run("no-foo", simpleRule, { + valid: ["let x;", "
"], + invalid: [], + }); + + expect(runCases()).toMatchInlineSnapshot(` + [ + null, + [Error: Parsing failed], + ] + `); + }); + + it("set in `RuleTester` options", () => { + const tester = new RuleTester({ + languageOptions: { parserOptions: { ecmaFeatures: { jsx: false } } }, + }); + tester.run("no-foo", simpleRule, { + valid: ["let x;", "
"], + invalid: [], + }); + + expect(runCases()).toMatchInlineSnapshot(` + [ + null, + [Error: Parsing failed], + ] + `); + }); + + it("set in `RuleTester` options, overriding global setting", () => { + RuleTester.setDefaultConfig({ + languageOptions: { parserOptions: { ecmaFeatures: { jsx: true } } }, + }); + + const tester = new RuleTester({ + languageOptions: { parserOptions: { ecmaFeatures: { jsx: false } } }, + }); + tester.run("no-foo", simpleRule, { + valid: ["let x;", "
"], + invalid: [], + }); + + expect(runCases()).toMatchInlineSnapshot(` + [ + null, + [Error: Parsing failed], + ] + `); + }); + + it("set in individual test cases", () => { + const tester = new RuleTester(); + tester.run("no-foo", simpleRule, { + valid: [ + { + code: "let x;", + languageOptions: { parserOptions: { ecmaFeatures: { jsx: false } } }, + }, + { + code: "
", + languageOptions: { parserOptions: { ecmaFeatures: { jsx: false } } }, + }, + ], + invalid: [], + }); + + expect(runCases()).toMatchInlineSnapshot(` + [ + null, + [Error: Parsing failed], + ] + `); + }); + + it("set in individual test cases, overriding global setting", () => { + RuleTester.setDefaultConfig({ + languageOptions: { parserOptions: { ecmaFeatures: { jsx: true } } }, + }); + + const tester = new RuleTester(); + tester.run("no-foo", simpleRule, { + valid: [ + { + code: "let x;", + languageOptions: { parserOptions: { ecmaFeatures: { jsx: false } } }, + }, + { + code: "
", + languageOptions: { parserOptions: { ecmaFeatures: { jsx: false } } }, + }, + ], + invalid: [], + }); + + expect(runCases()).toMatchInlineSnapshot(` + [ + null, + [Error: Parsing failed], + ] + `); + }); + + it("set in individual test cases, overriding `RuleTester` options", () => { + const tester = new RuleTester({ + languageOptions: { parserOptions: { ecmaFeatures: { jsx: true } } }, + }); + tester.run("no-foo", simpleRule, { + valid: [ + { + code: "let x;", + languageOptions: { parserOptions: { ecmaFeatures: { jsx: false } } }, + }, + { + code: "
", + languageOptions: { parserOptions: { ecmaFeatures: { jsx: false } } }, + }, + ], + invalid: [], + }); + + expect(runCases()).toMatchInlineSnapshot(` + [ + null, + [Error: Parsing failed], + ] + `); + }); + }); + + describe("true", () => { + it("set globally", () => { + RuleTester.setDefaultConfig({ + languageOptions: { parserOptions: { ecmaFeatures: { jsx: true } } }, + }); + + const tester = new RuleTester(); + tester.run("no-foo", simpleRule, { + valid: ["let x;", "
"], + invalid: [], + }); + + expect(runCases()).toEqual([null, null]); + }); + + it("set in `RuleTester` options", () => { + const tester = new RuleTester({ + languageOptions: { parserOptions: { ecmaFeatures: { jsx: true } } }, + }); + tester.run("no-foo", simpleRule, { + valid: ["let x;", "
"], + invalid: [], + }); + + expect(runCases()).toEqual([null, null]); + }); + + it("set in individual test cases", () => { + const tester = new RuleTester(); + tester.run("no-foo", simpleRule, { + valid: [ + { + code: "let x;", + languageOptions: { parserOptions: { ecmaFeatures: { jsx: true } } }, + }, + { + code: "
", + languageOptions: { parserOptions: { ecmaFeatures: { jsx: true } } }, + }, + ], + invalid: [], + }); + + expect(runCases()).toEqual([null, null]); + }); + }); + + it("mixed across test cases", () => { + const tester = new RuleTester(); + tester.run("no-foo", simpleRule, { + valid: [ + "let x;", + "
", + { + code: "let x;", + languageOptions: { parserOptions: { ecmaFeatures: { jsx: false } } }, + }, + { + code: "
", + languageOptions: { parserOptions: { ecmaFeatures: { jsx: false } } }, + }, + { + code: "let x;", + languageOptions: { parserOptions: { ecmaFeatures: { jsx: true } } }, + }, + { + code: "
", + languageOptions: { parserOptions: { ecmaFeatures: { jsx: true } } }, + }, + ], + invalid: [], + }); + + expect(runCases()).toMatchInlineSnapshot(` + [ + null, + [Error: Parsing failed], + null, + [Error: Parsing failed], + null, + null, + ] + `); + }); + + describe("does not take priority over `lang` option", () => { + it("set globally", () => { + RuleTester.setDefaultConfig({ + languageOptions: { parserOptions: { lang: "js", ecmaFeatures: { jsx: true } } }, + }); + + const tester = new RuleTester(); + tester.run("no-foo", simpleRule, { + valid: ["let x;", "
"], + invalid: [], + }); + + expect(runCases()).toMatchInlineSnapshot(` + [ + null, + [Error: Parsing failed], + ] + `); + }); + + it("set in `RuleTester` options", () => { + const tester = new RuleTester({ + languageOptions: { parserOptions: { lang: "js", ecmaFeatures: { jsx: true } } }, + }); + tester.run("no-foo", simpleRule, { + valid: ["let x;", "
"], + invalid: [], + }); + + expect(runCases()).toMatchInlineSnapshot(` + [ + null, + [Error: Parsing failed], + ] + `); + }); + + it("set in individual test cases", () => { + const tester = new RuleTester(); + tester.run("no-foo", simpleRule, { + valid: [ + { + code: "let x;", + languageOptions: { parserOptions: { lang: "js", ecmaFeatures: { jsx: true } } }, + }, + { + code: "
", + languageOptions: { parserOptions: { lang: "js", ecmaFeatures: { jsx: true } } }, + }, + ], + invalid: [], + }); + + expect(runCases()).toMatchInlineSnapshot(` + [ + null, + [Error: Parsing failed], + ] + `); + }); + + it("set in individual test cases with `lang` defined in `RuleTester` options", () => { + const tester = new RuleTester({ + languageOptions: { parserOptions: { lang: "js" } }, + }); + tester.run("no-foo", simpleRule, { + valid: [ + { + code: "let x;", + languageOptions: { parserOptions: { ecmaFeatures: { jsx: true } } }, + }, + { + code: "
", + languageOptions: { parserOptions: { ecmaFeatures: { jsx: true } } }, + }, + ], + invalid: [], + }); + + expect(runCases()).toMatchInlineSnapshot(` + [ + null, + [Error: Parsing failed], + ] + `); + }); + }); + }); + + describe("ignoreNonFatalErrors", () => { + it("default (off)", () => { + const tester = new RuleTester(); + tester.run("no-foo", simpleRule, { + valid: ["function f(x, x) {}"], + invalid: [], + }); + + expect(runCases()).toMatchInlineSnapshot(` + [ + [Error: Parsing failed], + ] + `); + }); + + describe("disabled", () => { + it("set globally", () => { + RuleTester.setDefaultConfig({ + languageOptions: { parserOptions: { ignoreNonFatalErrors: false } }, + }); + + const tester = new RuleTester(); + tester.run("no-foo", simpleRule, { + valid: ["function f(x, x) {}"], + invalid: [], + }); + + expect(runCases()).toMatchInlineSnapshot(` + [ + [Error: Parsing failed], + ] + `); + }); + + it("set in `RuleTester` options", () => { + const tester = new RuleTester({ + languageOptions: { parserOptions: { ignoreNonFatalErrors: false } }, + }); + tester.run("no-foo", simpleRule, { + valid: ["function f(x, x) {}"], + invalid: [], + }); + + expect(runCases()).toMatchInlineSnapshot(` + [ + [Error: Parsing failed], + ] + `); + }); + + it("set in `RuleTester` options, overriding global setting", () => { + RuleTester.setDefaultConfig({ + languageOptions: { parserOptions: { ignoreNonFatalErrors: true } }, + }); + + const tester = new RuleTester({ + languageOptions: { parserOptions: { ignoreNonFatalErrors: false } }, + }); + tester.run("no-foo", simpleRule, { + valid: ["function f(x, x) {}"], + invalid: [], + }); + + expect(runCases()).toMatchInlineSnapshot(` + [ + [Error: Parsing failed], + ] + `); + }); + + it("set in individual test cases", () => { + const tester = new RuleTester(); + tester.run("no-foo", simpleRule, { + valid: [ + { + code: "function f(x, x) {}", + languageOptions: { parserOptions: { ignoreNonFatalErrors: false } }, + }, + ], + invalid: [], + }); + + expect(runCases()).toMatchInlineSnapshot(` + [ + [Error: Parsing failed], + ] + `); + }); + + it("set in individual test cases, overriding global setting", () => { + RuleTester.setDefaultConfig({ + languageOptions: { parserOptions: { ignoreNonFatalErrors: true } }, + }); + + const tester = new RuleTester(); + tester.run("no-foo", simpleRule, { + valid: [ + { + code: "function f(x, x) {}", + languageOptions: { parserOptions: { ignoreNonFatalErrors: false } }, + }, + ], + invalid: [], + }); + + expect(runCases()).toMatchInlineSnapshot(` + [ + [Error: Parsing failed], + ] + `); + }); + + it("set in individual test cases, overriding `RuleTester` options", () => { + const tester = new RuleTester({ + languageOptions: { parserOptions: { ignoreNonFatalErrors: true } }, + }); + tester.run("no-foo", simpleRule, { + valid: [ + { + code: "function f(x, x) {}", + languageOptions: { parserOptions: { ignoreNonFatalErrors: false } }, + }, + ], + invalid: [], + }); + + expect(runCases()).toMatchInlineSnapshot(` + [ + [Error: Parsing failed], + ] + `); + }); + }); + + describe("enabled", () => { + it("set globally", () => { + RuleTester.setDefaultConfig({ + languageOptions: { parserOptions: { ignoreNonFatalErrors: true } }, + }); + + const tester = new RuleTester(); + tester.run("no-foo", simpleRule, { + valid: ["function f(x, x) {}"], + invalid: [], + }); + + expect(runCases()).toEqual([null]); + }); + + it("set in `RuleTester` options", () => { + const tester = new RuleTester({ + languageOptions: { parserOptions: { ignoreNonFatalErrors: true } }, + }); + tester.run("no-foo", simpleRule, { + valid: ["function f(x, x) {}"], + invalid: [], + }); + + expect(runCases()).toEqual([null]); + }); + + it("set in `RuleTester` options, overriding global setting", () => { + RuleTester.setDefaultConfig({ + languageOptions: { parserOptions: { ignoreNonFatalErrors: false } }, + }); + + const tester = new RuleTester({ + languageOptions: { parserOptions: { ignoreNonFatalErrors: true } }, + }); + tester.run("no-foo", simpleRule, { + valid: ["function f(x, x) {}"], + invalid: [], + }); + + expect(runCases()).toEqual([null]); + }); + + it("set in individual test cases", () => { + const tester = new RuleTester(); + tester.run("no-foo", simpleRule, { + valid: [ + { + code: "function f(x, x) {}", + languageOptions: { parserOptions: { ignoreNonFatalErrors: true } }, + }, + ], + invalid: [], + }); + + expect(runCases()).toEqual([null]); + }); + + it("set in individual test cases, overriding global setting", () => { + RuleTester.setDefaultConfig({ + languageOptions: { parserOptions: { ignoreNonFatalErrors: false } }, + }); + + const tester = new RuleTester(); + tester.run("no-foo", simpleRule, { + valid: [ + { + code: "function f(x, x) {}", + languageOptions: { parserOptions: { ignoreNonFatalErrors: true } }, + }, + ], + invalid: [], + }); + + expect(runCases()).toEqual([null]); + }); + + it("set in individual test cases, overriding `RuleTester` options", () => { + const tester = new RuleTester({ + languageOptions: { parserOptions: { ignoreNonFatalErrors: false } }, + }); + tester.run("no-foo", simpleRule, { + valid: [ + { + code: "function f(x, x) {}", + languageOptions: { parserOptions: { ignoreNonFatalErrors: true } }, + }, + ], + invalid: [], + }); + + expect(runCases()).toEqual([null]); + }); + }); + + it("mixed across test cases", () => { + const tester = new RuleTester(); + tester.run("no-foo", simpleRule, { + valid: [ + "function f(x, x) {}", + { + code: "function f(x, x) {}", + languageOptions: { parserOptions: { ignoreNonFatalErrors: false } }, + }, + { + code: "function f(x, x) {}", + languageOptions: { parserOptions: { ignoreNonFatalErrors: true } }, + }, + ], + invalid: [], + }); + + expect(runCases()).toMatchInlineSnapshot(` + [ + [Error: Parsing failed], + [Error: Parsing failed], + null, + ] + `); + }); + }); + }); }); diff --git a/apps/oxlint/tsconfig.json b/apps/oxlint/tsconfig.json index 1eb56c04c131d..08a0cf9e72415 100644 --- a/apps/oxlint/tsconfig.json +++ b/apps/oxlint/tsconfig.json @@ -12,6 +12,7 @@ "exclude": [ "node_modules", "fixtures", - "test/fixtures/*/files" + "test/fixtures/*/files", + "conformance/submodules" ] } diff --git a/apps/oxlint/tsdown.config.ts b/apps/oxlint/tsdown.config.ts index 45c5f1605a307..a45d59aa5d71b 100644 --- a/apps/oxlint/tsdown.config.ts +++ b/apps/oxlint/tsdown.config.ts @@ -37,7 +37,7 @@ export default defineConfig([ codegen: { removeWhitespace: false }, }, dts: { resolve: true }, - attw: true, + attw: { profile: "esm-only" }, define: { DEBUG: DEBUG ? "true" : "false" }, plugins: DEBUG ? [] : [createReplaceAssertsPlugin()], inputOptions: { diff --git a/crates/oxc/Cargo.toml b/crates/oxc/Cargo.toml index c0e91b803a762..b1d25db1982e7 100644 --- a/crates/oxc/Cargo.toml +++ b/crates/oxc/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "oxc" -version = "0.101.0" +version = "0.102.0" authors.workspace = true categories.workspace = true edition.workspace = true diff --git a/crates/oxc_allocator/Cargo.toml b/crates/oxc_allocator/Cargo.toml index 5aa826749826f..6d32dc13f3633 100644 --- a/crates/oxc_allocator/Cargo.toml +++ b/crates/oxc_allocator/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "oxc_allocator" -version = "0.101.0" +version = "0.102.0" authors.workspace = true categories.workspace = true edition.workspace = true diff --git a/crates/oxc_ast/CHANGELOG.md b/crates/oxc_ast/CHANGELOG.md index 8e96fa9456f75..fd3ed28b7a3ef 100644 --- a/crates/oxc_ast/CHANGELOG.md +++ b/crates/oxc_ast/CHANGELOG.md @@ -4,6 +4,13 @@ All notable changes to this package will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0). +## [0.102.0] - 2025-12-08 + +### 🚀 Features + +- 8c10694 semantic: Expose get_comment_at method (#16439) (camc314) +- 3981e7a ast: Add get_comment_at to lookup a comment by span (#16438) (camc314) + ## [0.100.0] - 2025-12-01 ### 💥 BREAKING CHANGES diff --git a/crates/oxc_ast/Cargo.toml b/crates/oxc_ast/Cargo.toml index 0939095cc7ece..320fea6b4830e 100644 --- a/crates/oxc_ast/Cargo.toml +++ b/crates/oxc_ast/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "oxc_ast" -version = "0.101.0" +version = "0.102.0" authors.workspace = true categories.workspace = true edition.workspace = true diff --git a/crates/oxc_ast/src/ast/comment.rs b/crates/oxc_ast/src/ast/comment.rs index 541d1c3223b68..4758c945daa18 100644 --- a/crates/oxc_ast/src/ast/comment.rs +++ b/crates/oxc_ast/src/ast/comment.rs @@ -15,8 +15,12 @@ pub enum CommentKind { /// Line comment #[default] Line = 0, - /// Block comment - Block = 1, + /// Single-line comment + #[estree(rename = "Block")] + SingleLineBlock = 1, + /// Multi-line block comment (contains line breaks) + #[estree(rename = "Block")] + MultiLineBlock = 2, } /// Information about a comment's position relative to a token. @@ -172,7 +176,9 @@ impl Comment { pub fn content_span(&self) -> Span { match self.kind { CommentKind::Line => Span::new(self.span.start + 2, self.span.end), - CommentKind::Block => Span::new(self.span.start + 2, self.span.end - 2), + CommentKind::SingleLineBlock | CommentKind::MultiLineBlock => { + Span::new(self.span.start + 2, self.span.end - 2) + } } } @@ -182,10 +188,16 @@ impl Comment { self.kind == CommentKind::Line } - /// Returns `true` if this is a block comment. + /// Returns `true` if this is a block comment (either single-line or multi-line). #[inline] pub fn is_block(self) -> bool { - self.kind == CommentKind::Block + matches!(self.kind, CommentKind::SingleLineBlock | CommentKind::MultiLineBlock) + } + + /// Returns `true` if this is a multi-line block comment. + #[inline] + pub fn is_multiline_block(self) -> bool { + self.kind == CommentKind::MultiLineBlock } /// Returns `true` if this comment is before a token. diff --git a/crates/oxc_ast/src/generated/derive_estree.rs b/crates/oxc_ast/src/generated/derive_estree.rs index 427e169d561b0..1d0cadc00a1be 100644 --- a/crates/oxc_ast/src/generated/derive_estree.rs +++ b/crates/oxc_ast/src/generated/derive_estree.rs @@ -3233,7 +3233,8 @@ impl ESTree for CommentKind { fn serialize(&self, serializer: S) { match self { Self::Line => JsonSafeString("Line").serialize(serializer), - Self::Block => JsonSafeString("Block").serialize(serializer), + Self::SingleLineBlock => JsonSafeString("Block").serialize(serializer), + Self::MultiLineBlock => JsonSafeString("Block").serialize(serializer), } } } diff --git a/crates/oxc_ast/src/trivia.rs b/crates/oxc_ast/src/trivia.rs index 67f0c9f6c942e..2431a80651491 100644 --- a/crates/oxc_ast/src/trivia.rs +++ b/crates/oxc_ast/src/trivia.rs @@ -225,9 +225,11 @@ mod test { #[test] fn test_is_inside_comment() { - let comments = - vec![Comment::new(0, 4, CommentKind::Line), Comment::new(10, 20, CommentKind::Block)] - .into_boxed_slice(); + let comments = vec![ + Comment::new(0, 4, CommentKind::Line), + Comment::new(10, 20, CommentKind::SingleLineBlock), + ] + .into_boxed_slice(); assert!(is_inside_comment(&comments, 2)); assert!(!is_inside_comment(&comments, 5)); @@ -237,9 +239,11 @@ mod test { #[test] fn test_get_comment_at() { - let comments = - vec![Comment::new(0, 4, CommentKind::Line), Comment::new(10, 20, CommentKind::Block)] - .into_boxed_slice(); + let comments = vec![ + Comment::new(0, 4, CommentKind::Line), + Comment::new(10, 20, CommentKind::SingleLineBlock), + ] + .into_boxed_slice(); // Inside first comment let comment = get_comment_at(&comments, 2); diff --git a/crates/oxc_ast_macros/Cargo.toml b/crates/oxc_ast_macros/Cargo.toml index b452984bf480e..44c32a957c54b 100644 --- a/crates/oxc_ast_macros/Cargo.toml +++ b/crates/oxc_ast_macros/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "oxc_ast_macros" -version = "0.101.0" +version = "0.102.0" authors.workspace = true categories.workspace = true edition.workspace = true diff --git a/crates/oxc_ast_visit/Cargo.toml b/crates/oxc_ast_visit/Cargo.toml index c5739121f5326..a20a91453bcc3 100644 --- a/crates/oxc_ast_visit/Cargo.toml +++ b/crates/oxc_ast_visit/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "oxc_ast_visit" -version = "0.101.0" +version = "0.102.0" authors.workspace = true categories.workspace = true edition.workspace = true diff --git a/crates/oxc_cfg/Cargo.toml b/crates/oxc_cfg/Cargo.toml index 47d9b6c18f467..e8de7c525ad88 100644 --- a/crates/oxc_cfg/Cargo.toml +++ b/crates/oxc_cfg/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "oxc_cfg" -version = "0.101.0" +version = "0.102.0" authors.workspace = true categories.workspace = true edition.workspace = true diff --git a/crates/oxc_codegen/CHANGELOG.md b/crates/oxc_codegen/CHANGELOG.md index b1f5d0c320878..0ae9aaf6ee9dc 100644 --- a/crates/oxc_codegen/CHANGELOG.md +++ b/crates/oxc_codegen/CHANGELOG.md @@ -4,6 +4,12 @@ All notable changes to this package will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0). +## [0.102.0] - 2025-12-08 + +### 🚀 Features + +- a607cc4 codegen: Preserve comments between CatchClause's param and body (#16167) (copilot-swe-agent) + ## [0.100.0] - 2025-12-01 ### 💥 BREAKING CHANGES diff --git a/crates/oxc_codegen/Cargo.toml b/crates/oxc_codegen/Cargo.toml index 80ab62a973201..5e24473daa0a8 100644 --- a/crates/oxc_codegen/Cargo.toml +++ b/crates/oxc_codegen/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "oxc_codegen" -version = "0.101.0" +version = "0.102.0" authors.workspace = true categories.workspace = true edition.workspace = true diff --git a/crates/oxc_codegen/src/comment.rs b/crates/oxc_codegen/src/comment.rs index 289e5ed7a29ab..d96f732bd3480 100644 --- a/crates/oxc_codegen/src/comment.rs +++ b/crates/oxc_codegen/src/comment.rs @@ -3,7 +3,7 @@ use std::borrow::Cow; use rustc_hash::{FxHashMap, FxHashSet}; use oxc_ast::{Comment, CommentKind, ast::Program}; -use oxc_syntax::line_terminator::{LineTerminatorSplitter, is_line_terminator}; +use oxc_syntax::line_terminator::LineTerminatorSplitter; use crate::{Codegen, LegalComment, options::CommentOptions}; @@ -128,10 +128,10 @@ impl Codegen<'_> { }; let comment_source = comment.span.source_text(source_text); match comment.kind { - CommentKind::Line => { + CommentKind::Line | CommentKind::SingleLineBlock => { self.print_str_escaping_script_close_tag(comment_source); } - CommentKind::Block => { + CommentKind::MultiLineBlock => { for line in LineTerminatorSplitter::new(comment_source) { if !line.starts_with("/*") { self.print_indent(); @@ -163,7 +163,7 @@ impl Codegen<'_> { let source_text = program.source_text; for comment in program.comments.iter().filter(|c| c.is_legal()) { let mut text = Cow::Borrowed(comment.span.source_text(source_text)); - if comment.is_block() && text.contains(is_line_terminator) { + if comment.is_multiline_block() { let mut buffer = String::with_capacity(text.len()); // Print block comments with our own indentation. for line in LineTerminatorSplitter::new(&text) { diff --git a/crates/oxc_compat/Cargo.toml b/crates/oxc_compat/Cargo.toml index d244b77a2a77d..1ce45e564b562 100644 --- a/crates/oxc_compat/Cargo.toml +++ b/crates/oxc_compat/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "oxc_compat" -version = "0.101.0" +version = "0.102.0" authors.workspace = true categories.workspace = true edition.workspace = true diff --git a/crates/oxc_data_structures/Cargo.toml b/crates/oxc_data_structures/Cargo.toml index ae300a4d979d7..e7d32bf36e846 100644 --- a/crates/oxc_data_structures/Cargo.toml +++ b/crates/oxc_data_structures/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "oxc_data_structures" -version = "0.101.0" +version = "0.102.0" authors.workspace = true categories.workspace = true edition.workspace = true diff --git a/crates/oxc_diagnostics/Cargo.toml b/crates/oxc_diagnostics/Cargo.toml index 067e8f498fc25..771502774c788 100644 --- a/crates/oxc_diagnostics/Cargo.toml +++ b/crates/oxc_diagnostics/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "oxc_diagnostics" -version = "0.101.0" +version = "0.102.0" authors.workspace = true categories.workspace = true edition.workspace = true diff --git a/crates/oxc_ecmascript/CHANGELOG.md b/crates/oxc_ecmascript/CHANGELOG.md index a029b708b4b23..b1d6bcedd0a12 100644 --- a/crates/oxc_ecmascript/CHANGELOG.md +++ b/crates/oxc_ecmascript/CHANGELOG.md @@ -4,6 +4,12 @@ All notable changes to this package will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0). +## [0.102.0] - 2025-12-08 + +### 🚀 Features + +- c90f053 minfier: Support `.` separated values for `compress.treeshake.manualPureFunctions` (#16529) (sapphi-red) + ## [0.99.0] - 2025-11-24 ### 💥 BREAKING CHANGES diff --git a/crates/oxc_ecmascript/Cargo.toml b/crates/oxc_ecmascript/Cargo.toml index 4ab5b03f4df78..c09c027309cdf 100644 --- a/crates/oxc_ecmascript/Cargo.toml +++ b/crates/oxc_ecmascript/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "oxc_ecmascript" -version = "0.101.0" +version = "0.102.0" authors.workspace = true categories.workspace = true edition.workspace = true diff --git a/crates/oxc_estree/Cargo.toml b/crates/oxc_estree/Cargo.toml index 9f139efb1d93d..17716581c4965 100644 --- a/crates/oxc_estree/Cargo.toml +++ b/crates/oxc_estree/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "oxc_estree" -version = "0.101.0" +version = "0.102.0" authors.workspace = true categories.workspace = true edition.workspace = true diff --git a/crates/oxc_formatter/CHANGELOG.md b/crates/oxc_formatter/CHANGELOG.md index 19e08870da1e5..d6f75ff3b02ee 100644 --- a/crates/oxc_formatter/CHANGELOG.md +++ b/crates/oxc_formatter/CHANGELOG.md @@ -4,6 +4,28 @@ All notable changes to this package will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0). +## [0.17.0] - 2025-12-08 + +### 🚀 Features + +- 7bb3304 oxfmt: Pass populated config to prettier formatting (#16584) (leaysgur) +- 69f84d2 oxfmt: Pass raw config to prettier formatting (#16582) (leaysgur) +- 930533f formatter: Convert single `\r` to `\n` in string and add a debug assertion to ensure that there is no `\r` in the text (#16531) (Dunqing) +- 80e6999 formatter: Add debug assertion to ensure that there is no empty content is passed in (#16475) (Dunqing) +- 7374856 formatter/sort-imports: Support `options.internalPattern` (#16372) (leaysgur) + +### 🐛 Bug Fixes + +- 40b0134 formatter: Incorrect formatting of `useImperativeHandle` hook (#16533) (Dunqing) +- 75393e7 formatter: Incorrect handling of `CRLF` for multiline block comment (#16528) (Dunqing) +- ee0756b formatter: JSX text wrapping incorrect 2 (#16320) (Dunqing) +- 36308b8 formatter: Fix indent for new expression with type cast (#16380) (leaysgur) + +### ⚡ Performance + +- 6f16a8f formatter: Avoid using an indent with a empty content (#16474) (Dunqing) +- 201c98f formatter: Early return when no comments need to be printed (#16432) (Dunqing) + ## [0.16.0] - 2025-12-01 ### 💥 BREAKING CHANGES diff --git a/crates/oxc_formatter/Cargo.toml b/crates/oxc_formatter/Cargo.toml index b1f89374adf70..153a1ec29ab71 100644 --- a/crates/oxc_formatter/Cargo.toml +++ b/crates/oxc_formatter/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "oxc_formatter" -version = "0.16.0" +version = "0.17.0" authors.workspace = true categories.workspace = true edition.workspace = true diff --git a/crates/oxc_formatter/src/formatter/format_element/mod.rs b/crates/oxc_formatter/src/formatter/format_element/mod.rs index dddb96e3efa03..74d39e0667f6c 100644 --- a/crates/oxc_formatter/src/formatter/format_element/mod.rs +++ b/crates/oxc_formatter/src/formatter/format_element/mod.rs @@ -25,7 +25,11 @@ const _: () = { size_of::() == 40, "`FormatElement` size exceeds 40 bytes, expected 40 bytes in 64-bit platforms" ); - } else { + } else if cfg!(target_family = "wasm") || align_of::() == 8 { + // Some 32-bit platforms have 8-byte alignment for `u64` and `f64`, while others have 4-byte alignment. + // + // Skip these assertions on 32-bit platforms where `u64` / `f64` have 4-byte alignment, because + // some layout calculations may be incorrect. https://github.com/oxc-project/oxc/pull/13716 assert!( size_of::() == 24, "`FormatElement` size exceeds 24 bytes, expected 24 bytes in 32-bit platforms" @@ -40,7 +44,11 @@ const _: () = { size_of::() == 24, "`FormatElement` size exceeds 24 bytes, expected 24 bytes in 64-bit platforms" ); - } else { + } else if cfg!(target_family = "wasm") || align_of::() == 8 { + // Some 32-bit platforms have 8-byte alignment for `u64` and `f64`, while others have 4-byte alignment. + // + // Skip these assertions on 32-bit platforms where `u64` / `f64` have 4-byte alignment, because + // some layout calculations may be incorrect. https://github.com/oxc-project/oxc/pull/13716 assert!( size_of::() == 16, "`FormatElement` size exceeds 16 bytes, expected 16 bytes in 32-bit platforms" diff --git a/crates/oxc_formatter/src/formatter/trivia.rs b/crates/oxc_formatter/src/formatter/trivia.rs index bc376f9d49155..db164d5cd2e96 100644 --- a/crates/oxc_formatter/src/formatter/trivia.rs +++ b/crates/oxc_formatter/src/formatter/trivia.rs @@ -63,7 +63,7 @@ use oxc_syntax::line_terminator::LineTerminatorSplitter; use crate::write; -use super::{SourceText, prelude::*}; +use super::prelude::*; /// Returns true if: /// - `next_comment` is Some, and @@ -78,18 +78,12 @@ use super::{SourceText, prelude::*}; /// There isn't much documentation about this behavior, but it is mentioned on the JSDoc repo /// for documentation: . Prettier also /// implements the same behavior: -#[expect(clippy::suspicious_operation_groupings)] -// `current.span.end == next.span.start` is correct, which checks whether the next comment starts exactly where the current comment ends. -fn should_nestle_adjacent_doc_comments( - current: &Comment, - next: &Comment, - source_text: SourceText, -) -> bool { +fn should_nestle_adjacent_doc_comments(current: &Comment, next: &Comment) -> bool { matches!(current.content, CommentContent::Jsdoc) && matches!(next.content, CommentContent::Jsdoc) + && current.is_multiline_block() + && next.is_multiline_block() && current.span.end == next.span.start - && source_text.contains_newline(current.span) - && source_text.contains_newline(next.span) } /// Formats the leading comments of `node` @@ -117,28 +111,27 @@ impl<'a> Format<'a> for FormatLeadingComments<'a> { write!(f, comment); match comment.kind { - CommentKind::Block => match f.source_text().lines_after(comment.span.end) { - 0 => { - let should_nestle = - leading_comments_iter.peek().is_some_and(|next_comment| { - should_nestle_adjacent_doc_comments( - comment, - next_comment, - f.source_text(), - ) - }); - - write!(f, [maybe_space(!should_nestle)]); - } - 1 => { - if f.source_text().get_lines_before(comment.span, f.comments()) == 0 { - write!(f, [soft_line_break_or_space()]); - } else { - write!(f, [hard_line_break()]); + CommentKind::SingleLineBlock | CommentKind::MultiLineBlock => { + match f.source_text().lines_after(comment.span.end) { + 0 => { + let should_nestle = + leading_comments_iter.peek().is_some_and(|next_comment| { + should_nestle_adjacent_doc_comments(comment, next_comment) + }); + + write!(f, [maybe_space(!should_nestle)]); + } + 1 => { + if f.source_text().get_lines_before(comment.span, f.comments()) == 0 + { + write!(f, [soft_line_break_or_space()]); + } else { + write!(f, [hard_line_break()]); + } } + _ => write!(f, [empty_line()]), } - _ => write!(f, [empty_line()]), - }, + } CommentKind::Line => match f.source_text().lines_after(comment.span.end) { 0 | 1 => write!(f, [hard_line_break()]), _ => write!(f, [empty_line()]), @@ -199,7 +192,7 @@ impl<'a> Format<'a> for FormatTrailingComments<'a> { total_lines_before += lines_before; let should_nestle = previous_comment.is_some_and(|previous_comment| { - should_nestle_adjacent_doc_comments(previous_comment, comment, f.source_text()) + should_nestle_adjacent_doc_comments(previous_comment, comment) }); // This allows comments at the end of nested structures: @@ -370,11 +363,7 @@ impl<'a> Format<'a> for FormatDanglingComments<'a> { f.context_mut().comments_mut().increment_printed_count(); let should_nestle = previous_comment.is_some_and(|previous_comment| { - should_nestle_adjacent_doc_comments( - previous_comment, - comment, - f.source_text(), - ) + should_nestle_adjacent_doc_comments(previous_comment, comment) }); write!( @@ -430,7 +419,7 @@ impl<'a> Format<'a> for FormatDanglingComments<'a> { impl<'a> Format<'a> for Comment { fn fmt(&self, f: &mut Formatter<'_, 'a>) { let content = f.source_text().text_for(&self.span); - if content.bytes().any(|b| b == b'\n' || b == b'\r') { + if self.is_multiline_block() { let mut lines = LineTerminatorSplitter::new(content); if is_alignable_comment(content) { // `unwrap` is safe because `content` contains at least one line. diff --git a/crates/oxc_formatter/src/ir_transform/sort_imports/mod.rs b/crates/oxc_formatter/src/ir_transform/sort_imports/mod.rs index 76543a11bc032..9abdb05245279 100644 --- a/crates/oxc_formatter/src/ir_transform/sort_imports/mod.rs +++ b/crates/oxc_formatter/src/ir_transform/sort_imports/mod.rs @@ -153,8 +153,8 @@ impl SortImportsTransform { // After sorting, flatten everything back to `FormatElement`s. let mut next_elements = ArenaVec::with_capacity_in(prev_elements.len(), allocator); - let mut chunks_iter = chunks.into_iter().enumerate().peekable(); - while let Some((_idx, chunk)) = chunks_iter.next() { + let mut chunks_iter = chunks.into_iter().peekable(); + while let Some(chunk) = chunks_iter.next() { match chunk { // Boundary chunks: Just output as-is PartitionedChunk::Boundary(line) => { @@ -162,32 +162,43 @@ impl SortImportsTransform { } // Import chunks: Sort and output PartitionedChunk::Imports(_) => { - // For ease of implementation, we will convert `ImportChunk` into multiple `SortableImport`s. + // Convert `ImportChunk` into `SortableImport`s. + // + // `SortableImport` is a logical unit of 1 import statement with its leading lines. + // `OrphanContent` tracks comments separated by empty lines with their slot positions. + // + // Comments attach based on empty line separation: + // - Comments directly before an `import` (no empty line) → `SortableImport.leading_lines` + // - Comments followed by an empty line → `orphan_contents` (stay at slot position) // - // `SortableImport` is a logical unit of 1 import statement + its N leading lines. - // And there may be trailing lines after all import statements in the chunk. // e.g. // ``` - // const THIS_IS_BOUNDARY = true; - // // comment for A - // import A from "a"; // sortable1 - // import B from "b"; // sortable2 - // - // // comment for C and empty line above + below + // // orphan (after_slot: None) // - // // another comment for C - // import C from "c"; // sortable3 - // // trailing comment and empty line below for this chunk + // // leading for A + // import A from "a"; + // // orphan (after_slot: Some(0)) // - // const YET_ANOTHER_BOUNDARY = true; + // // leading for B + // import B from "b"; + // // chunk trailing // ``` - let (sorted_imports, trailing_lines) = + let (sorted_imports, orphan_contents, trailing_lines) = chunk.into_sorted_import_units(&self.groups, &self.options); - // Output sorted import units + // Output leading orphan content (after_slot: None) + for orphan in &orphan_contents { + if orphan.after_slot.is_none() { + for line in &orphan.lines { + line.write(prev_elements, &mut next_elements, true); + } + } + } + + // Output sorted import units with orphan content at their slot positions let mut prev_group_idx = None; let mut prev_was_ignored = false; - for sorted_import in sorted_imports { + for (slot_idx, sorted_import) in sorted_imports.iter().enumerate() { // Insert newline when: // 1. Group changes // 2. Previous import was not ignored (don't insert after ignored) @@ -204,7 +215,7 @@ impl SortImportsTransform { } // Output leading lines and import line - for line in sorted_import.leading_lines { + for line in &sorted_import.leading_lines { line.write( prev_elements, &mut next_elements, @@ -212,8 +223,17 @@ impl SortImportsTransform { ); } sorted_import.import_line.write(prev_elements, &mut next_elements, false); + + // Output orphan content that belongs after this slot + for orphan in &orphan_contents { + if orphan.after_slot == Some(slot_idx) { + for line in &orphan.lines { + line.write(prev_elements, &mut next_elements, false); + } + } + } } - // And output trailing lines + // And output chunk's trailing lines // // Special care is needed for the last empty line. // We should preserve it only if the next chunk is a boundary. @@ -235,7 +255,7 @@ impl SortImportsTransform { // ``` let next_chunk_is_boundary = chunks_iter .peek() - .is_some_and(|(_, c)| matches!(c, PartitionedChunk::Boundary(_))); + .is_some_and(|c| matches!(c, PartitionedChunk::Boundary(_))); for (idx, line) in trailing_lines.iter().enumerate() { let is_last_empty_line = idx == trailing_lines.len() - 1 && matches!(line, SourceLine::Empty); diff --git a/crates/oxc_formatter/src/ir_transform/sort_imports/partitioned_chunk.rs b/crates/oxc_formatter/src/ir_transform/sort_imports/partitioned_chunk.rs index b5acd4fd5c5d5..a01f4b8c91a85 100644 --- a/crates/oxc_formatter/src/ir_transform/sort_imports/partitioned_chunk.rs +++ b/crates/oxc_formatter/src/ir_transform/sort_imports/partitioned_chunk.rs @@ -1,11 +1,25 @@ -use crate::ir_transform::sort_imports::{ - compute_metadata::compute_import_metadata, - group_config::GroupName, - options::SortImportsOptions, - sortable_imports::{SortSortableImports, SortableImport}, - source_line::SourceLine, +use crate::{ + formatter::format_element::LineMode, + ir_transform::sort_imports::{ + compute_metadata::compute_import_metadata, + group_config::GroupName, + options::SortImportsOptions, + sortable_imports::{SortSortableImports, SortableImport}, + source_line::SourceLine, + }, }; +/// Orphan content (comments/empty lines separated by empty line from the next import). +/// These stay at their original slot position after sorting. +#[derive(Debug)] +pub struct OrphanContent<'a> { + pub lines: Vec>, + /// The slot position: + /// - `None`: before the first import (leading orphan) + /// - `Some(n)`: after the Nth import (0-indexed) + pub after_slot: Option, +} + #[derive(Debug)] pub enum PartitionedChunk<'a> { /// A chunk containing import statements, @@ -42,30 +56,75 @@ impl<'a> PartitionedChunk<'a> { matches!(self, Self::Imports(lines) if lines.is_empty()) } - /// Convert this import chunk into a list of sortable import units and trailing lines. - /// Returns a tuple of `(sortable_imports, trailing_lines)`. + /// Convert this import chunk into `SortableImport` units with `OrphanContent`. + /// Returns a tuple of `(sortable_imports, orphan_contents, trailing_lines)`. + /// + /// - `sortable_imports`: Import statements with their attached leading lines. + /// - `leading_lines`: Comments directly before this import (no empty line between). + /// - `orphan_contents`: Orphan comments (separated by empty line from next import) with their slot positions. + /// - `after_slot: None` = before first import, `Some(n)` = after slot n + /// - `trailing_lines`: Lines at the end of the chunk after all imports. #[must_use] pub fn into_sorted_import_units( self, groups: &[Vec], options: &SortImportsOptions, - ) -> (Vec>, Vec>) { + ) -> (Vec>, Vec>, Vec>) { let Self::Imports(lines) = self else { unreachable!( "`into_import_units()` must be called on `PartitionedChunk::Imports` only." ); }; - let mut sortable_imports = vec![]; - let mut current_leading_lines = vec![]; + let mut sortable_imports: Vec> = vec![]; + let mut orphan_contents: Vec> = vec![]; + + // Comments separated from the next import by empty line. + // These stay at their slot position, not attached to any import. + let mut orphan_pending: Vec> = vec![]; + // Comments directly before the next import (no empty line between). + // These attach to the next import as leading lines. + let mut current_pending: Vec> = vec![]; + for line in lines { match line { SourceLine::Import(_, ref metadata) => { + // Handle orphan content (separated by empty line from this import) + // These stay at their original slot position, not attached to any import. + if !orphan_pending.is_empty() { + // Slot position: None = before first import, Some(n) = after slot n + let after_slot = if sortable_imports.is_empty() { + None + } else { + Some(sortable_imports.len() - 1) + }; + // For leading orphans (None), keep all lines including empty lines + // For other orphans, keep only comments + let lines: Vec<_> = if after_slot.is_none() { + std::mem::take(&mut orphan_pending) + } else { + std::mem::take(&mut orphan_pending) + .into_iter() + .filter_map(|orphan| { + if let SourceLine::CommentOnly(range, _) = orphan { + Some(SourceLine::CommentOnly(range, LineMode::Hard)) + } else { + None + } + }) + .collect() + }; + if !lines.is_empty() { + orphan_contents.push(OrphanContent { lines, after_slot }); + } + } + let is_side_effect = metadata.is_side_effect; let (group_idx, normalized_source, is_ignored) = compute_import_metadata(metadata, groups, options); + sortable_imports.push(SortableImport { - leading_lines: std::mem::take(&mut current_leading_lines), + leading_lines: std::mem::take(&mut current_pending), import_line: line, is_side_effect, group_idx, @@ -73,8 +132,14 @@ impl<'a> PartitionedChunk<'a> { is_ignored, }); } - SourceLine::CommentOnly(..) | SourceLine::Empty => { - current_leading_lines.push(line); + SourceLine::Empty => { + // Empty line separates comments from the next import. + // Move `current_pending` to `orphan_pending`, then add empty line. + orphan_pending.append(&mut current_pending); + orphan_pending.push(line); + } + SourceLine::CommentOnly(..) => { + current_pending.push(line); } SourceLine::Others(..) => { unreachable!( @@ -84,12 +149,14 @@ impl<'a> PartitionedChunk<'a> { } } - // Any remaining comments/lines are trailing - let trailing_lines = current_leading_lines; + // Any remaining lines are trailing + // Combine orphan and current pending as trailing lines + orphan_pending.append(&mut current_pending); + let trailing_lines = orphan_pending; // Let's sort this chunk! sortable_imports.sort(options); - (sortable_imports, trailing_lines) + (sortable_imports, orphan_contents, trailing_lines) } } diff --git a/crates/oxc_formatter/src/ir_transform/sort_imports/sortable_imports.rs b/crates/oxc_formatter/src/ir_transform/sort_imports/sortable_imports.rs index 5070a9a46388d..e7412db49d36b 100644 --- a/crates/oxc_formatter/src/ir_transform/sort_imports/sortable_imports.rs +++ b/crates/oxc_formatter/src/ir_transform/sort_imports/sortable_imports.rs @@ -6,6 +6,7 @@ use crate::ir_transform::sort_imports::{options::SortImportsOptions, source_line #[derive(Debug)] pub struct SortableImport<'a> { + /// Comments directly before this import (no empty line between). pub leading_lines: Vec>, pub import_line: SourceLine<'a>, // These are used for sorting and computed by `compute_import_metadata()` diff --git a/crates/oxc_formatter/src/lib.rs b/crates/oxc_formatter/src/lib.rs index 0cc809a3901a5..40f45444c3136 100644 --- a/crates/oxc_formatter/src/lib.rs +++ b/crates/oxc_formatter/src/lib.rs @@ -18,7 +18,7 @@ use oxc_ast::ast::*; pub use crate::embedded_formatter::{EmbeddedFormatter, EmbeddedFormatterCallback}; pub use crate::ir_transform::options::*; pub use crate::options::*; -pub use crate::service::{oxfmtrc::Oxfmtrc, parse_utils::*}; +pub use crate::service::{oxfmtrc::OxfmtOptions, oxfmtrc::Oxfmtrc, parse_utils::*}; use crate::{ ast_nodes::{AstNode, AstNodes}, formatter::{FormatContext, Formatted}, diff --git a/crates/oxc_formatter/src/service/oxfmtrc.rs b/crates/oxc_formatter/src/service/oxfmtrc.rs index 345ed7fbccc25..3374ff27eacb1 100644 --- a/crates/oxc_formatter/src/service/oxfmtrc.rs +++ b/crates/oxc_formatter/src/service/oxfmtrc.rs @@ -1,7 +1,8 @@ use std::path::Path; -use schemars::JsonSchema; +use schemars::{JsonSchema, schema_for}; use serde::{Deserialize, Deserializer, Serialize}; +use serde_json::Value; use crate::{ ArrowParentheses, AttributePosition, BracketSameLine, BracketSpacing, @@ -10,53 +11,56 @@ use crate::{ TrailingCommas, default_groups, default_internal_patterns, }; -/// Configuration options for the formatter. +/// Configuration options for the Oxfmt. /// Most options are the same as Prettier's options. /// See also +/// But some options are our own extensions. +// All fields are typed as `Option` to distinguish between user-specified values and defaults. #[derive(Debug, Default, Clone, Deserialize, Serialize, JsonSchema)] #[serde(rename_all = "camelCase", default)] pub struct Oxfmtrc { - /// Use tabs for indentation or spaces. (Default: false) + /// Use tabs for indentation or spaces. (Default: `false`) #[serde(skip_serializing_if = "Option::is_none")] pub use_tabs: Option, - /// Number of spaces per indentation level. (Default: 2) + /// Number of spaces per indentation level. (Default: `2`) #[serde(skip_serializing_if = "Option::is_none")] pub tab_width: Option, - /// Which end of line characters to apply. (Default: "lf") + /// Which end of line characters to apply. (Default: `"lf"`) #[serde(skip_serializing_if = "Option::is_none")] pub end_of_line: Option, - /// The line length that the printer will wrap on. (Default: 100) + /// The line length that the printer will wrap on. (Default: `100`) #[serde(skip_serializing_if = "Option::is_none")] pub print_width: Option, - /// Use single quotes instead of double quotes. (Default: false) + /// Use single quotes instead of double quotes. (Default: `false`) #[serde(skip_serializing_if = "Option::is_none")] pub single_quote: Option, - /// Use single quotes instead of double quotes in JSX. (Default: false) + /// Use single quotes instead of double quotes in JSX. (Default: `false`) #[serde(skip_serializing_if = "Option::is_none")] pub jsx_single_quote: Option, - /// Change when properties in objects are quoted. (Default: "as-needed") + /// Change when properties in objects are quoted. (Default: `"as-needed"`) #[serde(skip_serializing_if = "Option::is_none")] pub quote_props: Option, - /// Print trailing commas wherever possible. (Default: "all") + /// Print trailing commas wherever possible. (Default: `"all"`) #[serde(skip_serializing_if = "Option::is_none")] pub trailing_comma: Option, - /// Print semicolons at the ends of statements. (Default: true) + /// Print semicolons at the ends of statements. (Default: `true`) #[serde(skip_serializing_if = "Option::is_none")] pub semi: Option, - /// Include parentheses around a sole arrow function parameter. (Default: "always") + /// Include parentheses around a sole arrow function parameter. (Default: `"always"`) #[serde(skip_serializing_if = "Option::is_none")] pub arrow_parens: Option, - /// Print spaces between brackets in object literals. (Default: true) + /// Print spaces between brackets in object literals. (Default: `true`) #[serde(skip_serializing_if = "Option::is_none")] pub bracket_spacing: Option, - /// Put the > of a multi-line JSX element at the end of the last line instead of being alone on the next line. (Default: false) + /// Put the `>` of a multi-line JSX element at the end of the last line + /// instead of being alone on the next line. (Default: `false`) #[serde(skip_serializing_if = "Option::is_none")] pub bracket_same_line: Option, - /// How to wrap object literals when they could fit on one line or span multiple lines. (Default: "preserve") - /// NOTE: In addition to Prettier's "preserve" and "collapse", we also support "always". + /// How to wrap object literals when they could fit on one line or span multiple lines. (Default: `"preserve"`) + /// NOTE: In addition to Prettier's `"preserve"` and `"collapse"`, we also support `"always"`. #[serde(skip_serializing_if = "Option::is_none")] pub object_wrap: Option, - /// Put each attribute on a new line in JSX. (Default: false) + /// Put each attribute on a new line in JSX. (Default: `false`) #[serde(skip_serializing_if = "Option::is_none")] pub single_attribute_per_line: Option, @@ -69,7 +73,7 @@ pub struct Oxfmtrc { #[schemars(skip)] pub experimental_ternaries: Option, - /// Control whether formats quoted code embedded in the file. (Default: "auto") + /// Control whether formats quoted code embedded in the file. (Default: `"auto"`) #[serde(skip_serializing_if = "Option::is_none")] pub embedded_language_formatting: Option, @@ -77,6 +81,10 @@ pub struct Oxfmtrc { #[serde(skip_serializing_if = "Option::is_none")] pub experimental_sort_imports: Option, + /// Experimental: Sort `package.json` keys. (Default: `true`) + #[serde(skip_serializing_if = "Option::is_none")] + pub experimental_sort_package_json: Option, + /// Ignore files matching these glob patterns. Current working directory is used as the root. #[serde(skip_serializing_if = "Option::is_none")] pub ignore_patterns: Option>, @@ -221,14 +229,32 @@ pub enum SortOrderConfig { // --- +/// Additional options specific to Oxfmt. +/// These options are not part of Prettier's configuration, +/// and `oxc_formatter` also does not use these options. +#[derive(Debug, Clone)] +pub struct OxfmtOptions { + pub ignore_patterns: Vec, + pub sort_package_json: bool, +} + +impl Default for OxfmtOptions { + fn default() -> Self { + Self { ignore_patterns: vec![], sort_package_json: true } + } +} + +// --- + impl Oxfmtrc { + // TODO: Since `oxc_language_server/ServerFormatterBuilder` is the only user of this, + // use `Oxfmtrc` directly and remove. /// # Errors /// Returns error if: /// - file cannot be found or read /// - file content is not valid JSONC /// - deserialization fails for string enum values pub fn from_file(path: &Path) -> Result { - // TODO: Use `simdutf8` like `oxc_linter`? let mut string = std::fs::read_to_string(path) // Do not include OS error, it differs between platforms .map_err(|_| format!("Failed to read config {}: File not found", path.display()))?; @@ -244,7 +270,7 @@ impl Oxfmtrc { /// # Errors /// Returns error if any option value is invalid - pub fn into_format_options(self) -> Result { + pub fn into_options(self) -> Result<(FormatOptions, OxfmtOptions), String> { // Not yet supported options: // [Prettier] experimentalOperatorPosition: "start" | "end" // [Prettier] experimentalTernaries: boolean @@ -255,23 +281,24 @@ impl Oxfmtrc { return Err("Unsupported option: `experimentalTernaries`".to_string()); } - let mut options = FormatOptions::default(); + let mut format_options = FormatOptions::default(); // [Prettier] useTabs: boolean if let Some(use_tabs) = self.use_tabs { - options.indent_style = if use_tabs { IndentStyle::Tab } else { IndentStyle::Space }; + format_options.indent_style = + if use_tabs { IndentStyle::Tab } else { IndentStyle::Space }; } // [Prettier] tabWidth: number if let Some(width) = self.tab_width { - options.indent_width = + format_options.indent_width = IndentWidth::try_from(width).map_err(|e| format!("Invalid tabWidth: {e}"))?; } // [Prettier] endOfLine: "lf" | "cr" | "crlf" | "auto" // NOTE: "auto" is not supported if let Some(ending) = self.end_of_line { - options.line_ending = match ending { + format_options.line_ending = match ending { EndOfLineConfig::Lf => LineEnding::Lf, EndOfLineConfig::Crlf => LineEnding::Crlf, EndOfLineConfig::Cr => LineEnding::Cr, @@ -280,26 +307,26 @@ impl Oxfmtrc { // [Prettier] printWidth: number if let Some(width) = self.print_width { - options.line_width = + format_options.line_width = LineWidth::try_from(width).map_err(|e| format!("Invalid printWidth: {e}"))?; } // [Prettier] singleQuote: boolean if let Some(single_quote) = self.single_quote { - options.quote_style = + format_options.quote_style = if single_quote { QuoteStyle::Single } else { QuoteStyle::Double }; } // [Prettier] jsxSingleQuote: boolean if let Some(jsx_single_quote) = self.jsx_single_quote { - options.jsx_quote_style = + format_options.jsx_quote_style = if jsx_single_quote { QuoteStyle::Single } else { QuoteStyle::Double }; } // [Prettier] quoteProps: "as-needed" | "consistent" | "preserve" // NOTE: "consistent" is not supported if let Some(props) = self.quote_props { - options.quote_properties = match props { + format_options.quote_properties = match props { QuotePropsConfig::AsNeeded => QuoteProperties::AsNeeded, QuotePropsConfig::Preserve => QuoteProperties::Preserve, }; @@ -307,7 +334,7 @@ impl Oxfmtrc { // [Prettier] trailingComma: "all" | "es5" | "none" if let Some(commas) = self.trailing_comma { - options.trailing_commas = match commas { + format_options.trailing_commas = match commas { TrailingCommaConfig::All => TrailingCommas::All, TrailingCommaConfig::Es5 => TrailingCommas::Es5, TrailingCommaConfig::None => TrailingCommas::None, @@ -316,12 +343,13 @@ impl Oxfmtrc { // [Prettier] semi: boolean if let Some(semi) = self.semi { - options.semicolons = if semi { Semicolons::Always } else { Semicolons::AsNeeded }; + format_options.semicolons = + if semi { Semicolons::Always } else { Semicolons::AsNeeded }; } // [Prettier] arrowParens: "avoid" | "always" if let Some(parens) = self.arrow_parens { - options.arrow_parentheses = match parens { + format_options.arrow_parentheses = match parens { ArrowParensConfig::Avoid => ArrowParentheses::AsNeeded, ArrowParensConfig::Always => ArrowParentheses::Always, }; @@ -329,17 +357,17 @@ impl Oxfmtrc { // [Prettier] bracketSpacing: boolean if let Some(spacing) = self.bracket_spacing { - options.bracket_spacing = BracketSpacing::from(spacing); + format_options.bracket_spacing = BracketSpacing::from(spacing); } // [Prettier] bracketSameLine: boolean if let Some(same_line) = self.bracket_same_line { - options.bracket_same_line = BracketSameLine::from(same_line); + format_options.bracket_same_line = BracketSameLine::from(same_line); } // [Prettier] singleAttributePerLine: boolean if let Some(single_attribute_per_line) = self.single_attribute_per_line { - options.attribute_position = if single_attribute_per_line { + format_options.attribute_position = if single_attribute_per_line { AttributePosition::Multiline } else { AttributePosition::Auto @@ -348,7 +376,7 @@ impl Oxfmtrc { // [Prettier] objectWrap: "preserve" | "collapse" if let Some(object_wrap) = self.object_wrap { - options.expand = match object_wrap { + format_options.expand = match object_wrap { ObjectWrapConfig::Preserve => Expand::Auto, ObjectWrapConfig::Collapse => Expand::Never, // NOTE: Our own extension @@ -356,8 +384,9 @@ impl Oxfmtrc { }; } + // [Prettier] embeddedLanguageFormatting: "auto" | "off" if let Some(embedded_language_formatting) = self.embedded_language_formatting { - options.embedded_language_formatting = match embedded_language_formatting { + format_options.embedded_language_formatting = match embedded_language_formatting { EmbeddedLanguageFormattingConfig::Auto => EmbeddedLanguageFormatting::Auto, EmbeddedLanguageFormattingConfig::Off => EmbeddedLanguageFormatting::Off, }; @@ -371,7 +400,7 @@ impl Oxfmtrc { return Err("Invalid `sortImports` configuration: `partitionByNewline: true` and `newlinesBetween: true` cannot be used together".to_string()); } - options.experimental_sort_imports = Some(SortImportsOptions { + format_options.experimental_sort_imports = Some(SortImportsOptions { partition_by_newline: sort_imports_config.partition_by_newline, partition_by_comment: sort_imports_config.partition_by_comment, sort_side_effects: sort_imports_config.sort_side_effects, @@ -388,7 +417,222 @@ impl Oxfmtrc { }); } - Ok(options) + let oxfmt_options = OxfmtOptions { + ignore_patterns: self.ignore_patterns.unwrap_or_default(), + sort_package_json: self.experimental_sort_package_json.unwrap_or(true), + }; + + Ok((format_options, oxfmt_options)) + } + + /// Populates the raw config JSON with resolved `FormatOptions` values. + /// This ensures `external_formatter`(Prettier) receives the same options that `oxc_formatter` uses. + /// Roughly the reverse of `into_format_options`. + pub fn populate_prettier_config(options: &FormatOptions, config: &mut Value) { + let Some(obj) = config.as_object_mut() else { + return; + }; + + // [Prettier] useTabs: boolean + obj.insert( + "useTabs".to_string(), + Value::from(match options.indent_style { + IndentStyle::Tab => true, + IndentStyle::Space => false, + }), + ); + + // [Prettier] tabWidth: number + obj.insert("tabWidth".to_string(), Value::from(options.indent_width.value())); + + // [Prettier] endOfLine: "lf" | "cr" | "crlf" | "auto" + // NOTE: "auto" is not supported by `oxc_formatter` + obj.insert( + "endOfLine".to_string(), + Value::from(match options.line_ending { + LineEnding::Lf => "lf", + LineEnding::Crlf => "crlf", + LineEnding::Cr => "cr", + }), + ); + + // [Prettier] printWidth: number + obj.insert("printWidth".to_string(), Value::from(options.line_width.value())); + + // [Prettier] singleQuote: boolean + obj.insert( + "singleQuote".to_string(), + Value::from(match options.quote_style { + QuoteStyle::Single => true, + QuoteStyle::Double => false, + }), + ); + + // [Prettier] jsxSingleQuote: boolean + obj.insert( + "jsxSingleQuote".to_string(), + Value::from(match options.jsx_quote_style { + QuoteStyle::Single => true, + QuoteStyle::Double => false, + }), + ); + + // [Prettier] quoteProps: "as-needed" | "consistent" | "preserve" + obj.insert( + "quoteProps".to_string(), + Value::from(match options.quote_properties { + QuoteProperties::AsNeeded => "as-needed", + QuoteProperties::Preserve => "preserve", + QuoteProperties::Consistent => "consistent", + }), + ); + + // [Prettier] trailingComma: "all" | "es5" | "none" + obj.insert( + "trailingComma".to_string(), + Value::from(match options.trailing_commas { + TrailingCommas::All => "all", + TrailingCommas::Es5 => "es5", + TrailingCommas::None => "none", + }), + ); + + // [Prettier] semi: boolean + obj.insert( + "semi".to_string(), + Value::from(match options.semicolons { + Semicolons::Always => true, + Semicolons::AsNeeded => false, + }), + ); + + // [Prettier] arrowParens: "avoid" | "always" + obj.insert( + "arrowParens".to_string(), + Value::from(match options.arrow_parentheses { + ArrowParentheses::AsNeeded => "avoid", + ArrowParentheses::Always => "always", + }), + ); + + // [Prettier] bracketSpacing: boolean + obj.insert("bracketSpacing".to_string(), Value::from(options.bracket_spacing.value())); + + // [Prettier] bracketSameLine: boolean + obj.insert("bracketSameLine".to_string(), Value::from(options.bracket_same_line.value())); + + // [Prettier] singleAttributePerLine: boolean + obj.insert( + "singleAttributePerLine".to_string(), + Value::from(match options.attribute_position { + AttributePosition::Multiline => true, + AttributePosition::Auto => false, + }), + ); + + // [Prettier] objectWrap: "preserve" | "collapse" + // NOTE: "always" is our extension and not supported by Prettier, fallback to "preserve" for now + obj.insert( + "objectWrap".to_string(), + Value::from(match options.expand { + Expand::Auto | Expand::Always => "preserve", + Expand::Never => "collapse", + }), + ); + + // [Prettier] embeddedLanguageFormatting: "auto" | "off" + obj.insert( + "embeddedLanguageFormatting".to_string(), + Value::from(match options.embedded_language_formatting { + EmbeddedLanguageFormatting::Auto => "auto", + EmbeddedLanguageFormatting::Off => "off", + }), + ); + + // Below are our own extensions, just remove them + obj.remove("ignorePatterns"); + obj.remove("experimentalSortImports"); + obj.remove("experimentalSortPackageJson"); + + // Any other unknown fields are preserved as-is. + // e.g. `plugins`, `htmlWhitespaceSensitivity`, `vueIndentScriptAndStyle`, etc. + // Other options defined independently by plugins are also left as they are. + } + + /// Generates the JSON schema for Oxfmtrc configuration files. + /// + /// # Panics + /// Panics if the schema generation fails. + pub fn generate_schema_json() -> String { + let mut schema = schema_for!(Oxfmtrc); + + // Allow comments and trailing commas for vscode-json-languageservice + // NOTE: This is NOT part of standard JSON Schema specification + // https://github.com/microsoft/vscode-json-languageservice/blob/fb83547762901f32d8449d57e24666573016b10c/src/jsonLanguageTypes.ts#L151-L159 + schema.schema.extensions.insert("allowComments".to_string(), serde_json::Value::Bool(true)); + schema + .schema + .extensions + .insert("allowTrailingCommas".to_string(), serde_json::Value::Bool(true)); + + // Inject markdownDescription fields for better editor support (e.g., VS Code) + let mut json = serde_json::to_value(&schema).unwrap(); + Self::inject_markdown_descriptions(&mut json); + + // Sort keys for deterministic output across different environments. + // Without this, CI and local environments may produce different key orders, + // causing snapshot tests to fail. + let sorted_json = Self::sort_json_keys(&json); + + serde_json::to_string_pretty(&sorted_json).unwrap() + } + + /// Recursively sort all object keys in the JSON value for deterministic output. + fn sort_json_keys(value: &serde_json::Value) -> serde_json::Value { + match value { + serde_json::Value::Object(map) => { + let mut sorted: Vec<_> = map.iter().collect(); + sorted.sort_by(|(a, _), (b, _)| a.cmp(b)); + serde_json::Value::Object( + sorted.into_iter().map(|(k, v)| (k.clone(), Self::sort_json_keys(v))).collect(), + ) + } + serde_json::Value::Array(arr) => { + serde_json::Value::Array(arr.iter().map(Self::sort_json_keys).collect()) + } + _ => value.clone(), + } + } + + /// Recursively inject `markdownDescription` fields into the JSON schema. + /// This is a non-standard field that some editors (like VS Code) use to render + /// markdown in hover tooltips. + fn inject_markdown_descriptions(value: &mut serde_json::Value) { + match value { + serde_json::Value::Object(map) => { + // If this object has a `description` field, copy it to `markdownDescription` + if let Some(serde_json::Value::String(desc_str)) = map.get("description") { + map.insert( + "markdownDescription".to_string(), + serde_json::Value::String(desc_str.clone()), + ); + } + + // Recursively process all values in the object + for value in map.values_mut() { + Self::inject_markdown_descriptions(value); + } + } + serde_json::Value::Array(items) => { + // Recursively process all items in the array + for item in items { + Self::inject_markdown_descriptions(item); + } + } + _ => { + // Primitive values don't need processing + } + } } } @@ -415,15 +659,15 @@ mod tests { }"#; let config: Oxfmtrc = serde_json::from_str(json).unwrap(); - let options = config.into_format_options().unwrap(); + let (format_options, _) = config.into_options().unwrap(); - assert!(options.indent_style.is_tab()); - assert_eq!(options.indent_width.value(), 4); - assert_eq!(options.line_width.value(), 100); - assert!(!options.quote_style.is_double()); - assert!(options.semicolons.is_as_needed()); + assert!(format_options.indent_style.is_tab()); + assert_eq!(format_options.indent_width.value(), 4); + assert_eq!(format_options.line_width.value(), 100); + assert!(!format_options.quote_style.is_double()); + assert!(format_options.semicolons.is_as_needed()); - let sort_imports = options.experimental_sort_imports.unwrap(); + let sort_imports = format_options.experimental_sort_imports.unwrap(); assert!(sort_imports.partition_by_newline); assert!(sort_imports.order.is_desc()); assert!(!sort_imports.ignore_case); @@ -439,56 +683,56 @@ mod tests { }"#, ) .unwrap(); - let options = config.into_format_options().unwrap(); + let (format_options, _) = config.into_options().unwrap(); // Should use defaults - assert!(options.indent_style.is_space()); - assert_eq!(options.indent_width.value(), 2); - assert_eq!(options.line_width.value(), 100); - assert_eq!(options.experimental_sort_imports, None); + assert!(format_options.indent_style.is_space()); + assert_eq!(format_options.indent_width.value(), 2); + assert_eq!(format_options.line_width.value(), 100); + assert_eq!(format_options.experimental_sort_imports, None); } #[test] fn test_empty_config() { let config: Oxfmtrc = serde_json::from_str("{}").unwrap(); - let options = config.into_format_options().unwrap(); + let (format_options, _) = config.into_options().unwrap(); // Should use defaults - assert!(options.indent_style.is_space()); - assert_eq!(options.indent_width.value(), 2); - assert_eq!(options.line_width.value(), 100); - assert_eq!(options.experimental_sort_imports, None); + assert!(format_options.indent_style.is_space()); + assert_eq!(format_options.indent_width.value(), 2); + assert_eq!(format_options.line_width.value(), 100); + assert_eq!(format_options.experimental_sort_imports, None); } #[test] fn test_arrow_parens_normalization() { // Test "avoid" -> "as-needed" normalization let config: Oxfmtrc = serde_json::from_str(r#"{"arrowParens": "avoid"}"#).unwrap(); - let options = config.into_format_options().unwrap(); - assert!(options.arrow_parentheses.is_as_needed()); + let (format_options, _) = config.into_options().unwrap(); + assert!(format_options.arrow_parentheses.is_as_needed()); // Test "always" remains unchanged let config: Oxfmtrc = serde_json::from_str(r#"{"arrowParens": "always"}"#).unwrap(); - let options = config.into_format_options().unwrap(); - assert!(options.arrow_parentheses.is_always()); + let (format_options, _) = config.into_options().unwrap(); + assert!(format_options.arrow_parentheses.is_always()); } #[test] fn test_object_wrap_normalization() { // Test "preserve" -> "auto" normalization let config: Oxfmtrc = serde_json::from_str(r#"{"objectWrap": "preserve"}"#).unwrap(); - let options = config.into_format_options().unwrap(); - assert_eq!(options.expand, Expand::Auto); + let (format_options, _) = config.into_options().unwrap(); + assert_eq!(format_options.expand, Expand::Auto); // Test "collapse" -> "never" normalization let config: Oxfmtrc = serde_json::from_str(r#"{"objectWrap": "collapse"}"#).unwrap(); - let options = config.into_format_options().unwrap(); - assert_eq!(options.expand, Expand::Never); + let (format_options, _) = config.into_options().unwrap(); + assert_eq!(format_options.expand, Expand::Never); // Test "always" remains unchanged let config: Oxfmtrc = serde_json::from_str(r#"{"objectWrap": "always"}"#).unwrap(); - let options = config.into_format_options().unwrap(); - assert_eq!(options.expand, Expand::Always); + let (format_options, _) = config.into_options().unwrap(); + assert_eq!(format_options.expand, Expand::Always); } #[test] @@ -499,7 +743,8 @@ mod tests { }"#, ) .unwrap(); - let sort_imports = config.into_format_options().unwrap().experimental_sort_imports.unwrap(); + let (format_options, _) = config.into_options().unwrap(); + let sort_imports = format_options.experimental_sort_imports.unwrap(); assert!(sort_imports.newlines_between); assert!(!sort_imports.partition_by_newline); @@ -512,7 +757,8 @@ mod tests { }"#, ) .unwrap(); - let sort_imports = config.into_format_options().unwrap().experimental_sort_imports.unwrap(); + let (format_options, _) = config.into_options().unwrap(); + let sort_imports = format_options.experimental_sort_imports.unwrap(); assert!(!sort_imports.newlines_between); assert!(!sort_imports.partition_by_newline); @@ -525,7 +771,8 @@ mod tests { }"#, ) .unwrap(); - let sort_imports = config.into_format_options().unwrap().experimental_sort_imports.unwrap(); + let (format_options, _) = config.into_options().unwrap(); + let sort_imports = format_options.experimental_sort_imports.unwrap(); assert!(sort_imports.newlines_between); assert!(!sort_imports.partition_by_newline); @@ -538,7 +785,7 @@ mod tests { }"#, ) .unwrap(); - assert!(config.into_format_options().is_ok()); + assert!(config.into_options().is_ok()); let config: Oxfmtrc = serde_json::from_str( r#"{ "experimentalSortImports": { @@ -548,7 +795,7 @@ mod tests { }"#, ) .unwrap(); - assert!(config.into_format_options().is_err_and(|e| e.contains("newlinesBetween"))); + assert!(config.into_options().is_err_and(|e| e.contains("newlinesBetween"))); let config: Oxfmtrc = serde_json::from_str( r#"{ @@ -564,10 +811,45 @@ mod tests { }"#, ) .unwrap(); - let sort_imports = config.into_format_options().unwrap().experimental_sort_imports.unwrap(); + let (format_options, _) = config.into_options().unwrap(); + let sort_imports = format_options.experimental_sort_imports.unwrap(); assert_eq!(sort_imports.groups.len(), 5); assert_eq!(sort_imports.groups[0], vec!["builtin".to_string()]); assert_eq!(sort_imports.groups[1], vec!["external".to_string(), "internal".to_string()]); assert_eq!(sort_imports.groups[4], vec!["index".to_string()]); } + + #[test] + fn test_populate_prettier_config_defaults() { + let json_string = r"{}"; + let mut raw_config: Value = serde_json::from_str(json_string).unwrap(); + let oxfmtrc: Oxfmtrc = serde_json::from_str(json_string).unwrap(); + let (format_options, _) = oxfmtrc.into_options().unwrap(); + + Oxfmtrc::populate_prettier_config(&format_options, &mut raw_config); + + let obj = raw_config.as_object().unwrap(); + assert_eq!(obj.get("printWidth").unwrap(), 100); + } + + #[test] + fn test_populate_prettier_config_with_user_values() { + let json_string = r#"{ + "printWidth": 80, + "ignorePatterns": ["*.min.js"], + "experimentalSortImports": { "order": "asc" } + }"#; + let mut raw_config: Value = serde_json::from_str(json_string).unwrap(); + let oxfmtrc: Oxfmtrc = serde_json::from_str(json_string).unwrap(); + let (format_options, _) = oxfmtrc.into_options().unwrap(); + + Oxfmtrc::populate_prettier_config(&format_options, &mut raw_config); + + let obj = raw_config.as_object().unwrap(); + // User-specified value is preserved via FormatOptions + assert_eq!(obj.get("printWidth").unwrap(), 80); + // oxfmt extensions are removed + assert!(!obj.contains_key("ignorePatterns")); + assert!(!obj.contains_key("experimentalSortImports")); + } } diff --git a/crates/oxc_formatter/src/utils/assignment_like.rs b/crates/oxc_formatter/src/utils/assignment_like.rs index 494c4bbf8306c..dc06093e84f19 100644 --- a/crates/oxc_formatter/src/utils/assignment_like.rs +++ b/crates/oxc_formatter/src/utils/assignment_like.rs @@ -26,6 +26,7 @@ pub enum AssignmentLike<'a, 'b> { VariableDeclarator(&'b AstNode<'a, VariableDeclarator<'a>>), AssignmentExpression(&'b AstNode<'a, AssignmentExpression<'a>>), ObjectProperty(&'b AstNode<'a, ObjectProperty<'a>>), + BindingProperty(&'b AstNode<'a, BindingProperty<'a>>), PropertyDefinition(&'b AstNode<'a, PropertyDefinition<'a>>), TSTypeAliasDeclaration(&'b AstNode<'a, TSTypeAliasDeclaration<'a>>), } @@ -38,16 +39,6 @@ pub enum AssignmentLike<'a, 'b> { /// - Variable declaration #[derive(Debug, Clone, Copy, PartialEq, Eq)] pub enum AssignmentLikeLayout { - /// This is a special layout usually used for variable declarations. - /// This layout is hit, usually, when a variable declarator doesn't have initializer: - /// ```js - /// let variable; - /// ``` - /// ```ts - /// let variable: Map; - /// ``` - OnlyLeft, - /// First break right-hand side, then after operator. /// ```js /// { @@ -175,6 +166,9 @@ fn should_print_as_leading(expr: &Expression) -> bool { ) } +/// The minimum number of overlapping characters between left and right hand side +const MIN_OVERLAP_FOR_BREAK: u8 = 3; + impl<'a> AssignmentLike<'a, '_> { fn write_left(&self, f: &mut Formatter<'_, 'a>) -> bool { match self { @@ -201,7 +195,34 @@ impl<'a> AssignmentLike<'a, '_> { false } AssignmentLike::ObjectProperty(property) => { - const MIN_OVERLAP_FOR_BREAK: u8 = 3; + let text_width_for_break = + (f.options().indent_width.value() + MIN_OVERLAP_FOR_BREAK) as usize; + + // Handle computed properties + if property.computed { + write!(f, ["[", property.key(), "]"]); + if property.shorthand { + false + } else { + f.source_text().span_width(property.key.span()) + 2 < text_width_for_break + } + } else if property.shorthand { + write!(f, property.key()); + false + } else { + let width = write_member_name(property.key(), f); + + width < text_width_for_break + } + } + AssignmentLike::BindingProperty(property) => { + if property.shorthand { + // Left-hand side only + if property.value.kind.is_binding_identifier() { + write!(f, property.key()); + } + return false; + } let text_width_for_break = (f.options().indent_width.value() + MIN_OVERLAP_FOR_BREAK) as usize; @@ -292,25 +313,30 @@ impl<'a> AssignmentLike<'a, '_> { fn write_operator(&self, f: &mut Formatter<'_, 'a>) { match self { - Self::VariableDeclarator(variable_declarator) if variable_declarator.init.is_some() => { + Self::VariableDeclarator(variable_declarator) => { + debug_assert!(variable_declarator.init.is_some()); write!(f, [space(), "="]); } Self::AssignmentExpression(assignment) => { let operator = assignment.operator.as_str(); write!(f, [space(), operator]); } - Self::ObjectProperty(property) if !property.shorthand => { + Self::ObjectProperty(property) => { + debug_assert!(!property.shorthand); write!(f, [":", space()]); } - Self::PropertyDefinition(property_class_member) - if property_class_member.value().is_some() => - { + Self::BindingProperty(property) => { + if !property.shorthand { + write!(f, [":", space()]); + } + } + Self::PropertyDefinition(property_class_member) => { + debug_assert!(property_class_member.value().is_some()); write!(f, [space(), "="]); } Self::TSTypeAliasDeclaration(_) => { write!(f, [space(), "="]); } - _ => (), } } @@ -330,6 +356,9 @@ impl<'a> AssignmentLike<'a, '_> { let value = property.value(); write!(f, [with_assignment_layout(value, Some(layout))]); } + Self::BindingProperty(property) => { + write!(f, property.value()); + } Self::PropertyDefinition(property) => { write!( f, @@ -355,10 +384,6 @@ impl<'a> AssignmentLike<'a, '_> { left_may_break: bool, f: &Formatter<'_, 'a>, ) -> AssignmentLikeLayout { - if self.has_only_left_hand_side() { - return AssignmentLikeLayout::OnlyLeft; - } - let right_expression = self.get_right_expression(); if let Some(expr) = right_expression { if let Some(layout) = self.chain_formatting_layout(expr) { @@ -443,7 +468,7 @@ impl<'a> AssignmentLike<'a, '_> { AssignmentLike::PropertyDefinition(property_class_member) => { property_class_member.value() } - AssignmentLike::TSTypeAliasDeclaration(_) => None, + AssignmentLike::BindingProperty(_) | AssignmentLike::TSTypeAliasDeclaration(_) => None, } } @@ -454,6 +479,9 @@ impl<'a> AssignmentLike<'a, '_> { Self::AssignmentExpression(_) | Self::TSTypeAliasDeclaration(_) => false, Self::VariableDeclarator(declarator) => declarator.init.is_none(), Self::PropertyDefinition(property) => property.value().is_none(), + Self::BindingProperty(property) => { + property.shorthand && property.value.kind.is_binding_identifier() + } Self::ObjectProperty(property) => property.shorthand, } } @@ -618,6 +646,7 @@ impl<'a> AssignmentLike<'a, '_> { }) } AssignmentLike::ObjectProperty(_) + | AssignmentLike::BindingProperty(_) | AssignmentLike::PropertyDefinition(_) | AssignmentLike::TSTypeAliasDeclaration(_) => false, } @@ -701,6 +730,12 @@ fn get_last_non_unary_argument<'a, 'b>( impl<'a> Format<'a> for AssignmentLike<'a, '_> { fn fmt(&self, f: &mut Formatter<'_, 'a>) { + // If there's only left hand side, we just write it and return + if self.has_only_left_hand_side() { + self.write_left(f); + return; + } + let format_content = format_with(|f| { // We create a temporary buffer because the left hand side has to conditionally add // a group based on the layout, but the layout can only be computed by knowing the @@ -727,10 +762,7 @@ impl<'a> Format<'a> for AssignmentLike<'a, '_> { let right = format_with(|f| self.write_right(f, layout)); let inner_content = format_with(|f| { - if matches!( - &layout, - AssignmentLikeLayout::BreakLeftHandSide | AssignmentLikeLayout::OnlyLeft - ) { + if matches!(&layout, AssignmentLikeLayout::BreakLeftHandSide) { write!(f, [left]); } else { write!(f, [group(&left)]); @@ -742,7 +774,6 @@ impl<'a> Format<'a> for AssignmentLike<'a, '_> { #[expect(clippy::match_same_arms)] match layout { - AssignmentLikeLayout::OnlyLeft => (), AssignmentLikeLayout::Fluid => { let group_id = f.group_id("assignment_like"); write!( @@ -784,8 +815,7 @@ impl<'a> Format<'a> for AssignmentLike<'a, '_> { // Layouts that don't need enclosing group AssignmentLikeLayout::Chain | AssignmentLikeLayout::ChainTail - | AssignmentLikeLayout::SuppressedInitializer - | AssignmentLikeLayout::OnlyLeft => { + | AssignmentLikeLayout::SuppressedInitializer => { write!(f, [&inner_content]); } _ => { diff --git a/crates/oxc_formatter/src/utils/call_expression.rs b/crates/oxc_formatter/src/utils/call_expression.rs index 68698ad9a9aa4..355c624dc1a04 100644 --- a/crates/oxc_formatter/src/utils/call_expression.rs +++ b/crates/oxc_formatter/src/utils/call_expression.rs @@ -115,29 +115,40 @@ fn is_unit_test_set_up_callee(callee: &Expression) -> bool { /// /// # Examples /// +/// Some: +/// +/// ```javascript +/// it.only() -> [`only`, `it`]; +/// describe.skip() -> [`skip`, `describe`]; +/// ``` +/// +/// None: +/// /// ```javascript -/// it.only() -> [`only`, `it`] +/// it().only(); +/// describe().skip(); /// ``` /// /// Same as . -pub fn callee_name_iterator<'b>(expr: &'b Expression<'_>) -> impl Iterator { +pub fn callee_name_iterator<'b>(expr: &'b Expression<'_>) -> Option> { + let mut names = [Option::None; 5]; let mut current = Some(expr); - let mut names = std::iter::from_fn(move || match current { - Some(Expression::Identifier(ident)) => { - current = None; - Some(ident.name.as_str()) - } - Some(Expression::StaticMemberExpression(static_member)) => { - current = Some(&static_member.object); - Some(static_member.property.name.as_str()) + + for index in 0..5 { + match current { + Some(Expression::Identifier(ident)) => { + names[index] = Some(ident.name.as_str()); + return Some(names.into_iter().rev().flatten()); + } + Some(Expression::StaticMemberExpression(member)) => { + current = Some(&member.object); + names[index] = Some(member.property.name.as_str()); + } + _ => break, } - _ => None, - }); + } - [names.next(), names.next(), names.next(), names.next(), names.next()] - .into_iter() - .rev() - .flatten() + None } /// This function checks if a call expressions has one of the following members: @@ -170,7 +181,7 @@ pub fn callee_name_iterator<'b>(expr: &'b Expression<'_>) -> impl Iterator) -> bool { - let mut names = callee_name_iterator(expr); + let Some(mut names) = callee_name_iterator(expr) else { return false }; match names.next() { Some("it" | "describe" | "Deno") => match names.next() { @@ -199,7 +210,9 @@ pub fn contains_a_test_pattern(expr: &Expression<'_>) -> bool { } pub fn is_test_each_pattern(expr: &Expression<'_>) -> bool { - let mut names = callee_name_iterator(expr); + let Some(mut names) = callee_name_iterator(expr) else { + return false; + }; let first = names.next(); let second = names.next(); diff --git a/crates/oxc_formatter/src/utils/string.rs b/crates/oxc_formatter/src/utils/string.rs index e20c73fe46561..7ccf4708e83cf 100644 --- a/crates/oxc_formatter/src/utils/string.rs +++ b/crates/oxc_formatter/src/utils/string.rs @@ -1,7 +1,7 @@ use std::borrow::Cow; use oxc_span::SourceType; -use oxc_syntax::identifier::is_identifier_name; +use oxc_syntax::identifier::{is_identifier_part, is_identifier_start}; use unicode_width::UnicodeWidthStr; use crate::{ @@ -16,7 +16,6 @@ pub enum StringLiteralParentKind { /// Variant to track tokens that are inside a member Member, /// Variant to track tokens that are inside an import attribute - #[expect(unused)] ImportAttribute, /// Variant used when the string literal is inside a directive. This will apply /// a simplified logic of normalisation @@ -197,9 +196,9 @@ impl<'a> LiteralStringNormalizer<'a> { fn normalize_import_attribute(&self, string_information: StringInformation) -> Cow<'a, str> { let quoteless = self.raw_content(); let can_remove_quotes = - !self.is_preserve_quote_properties() && is_identifier_name(quoteless); + !self.is_preserve_quote_properties() && Self::is_identifier_name_patched(quoteless); if can_remove_quotes { - Cow::Owned(quoteless.to_string()) + Cow::Borrowed(quoteless) } else { self.normalize_string_literal(string_information) } @@ -254,9 +253,9 @@ impl<'a> LiteralStringNormalizer<'a> { let quoteless = self.raw_content(); let can_remove_quotes = !self.is_preserve_quote_properties() && (self.can_remove_number_quotes_by_file_type(source_type) - || is_identifier_name(quoteless)); + || Self::is_identifier_name_patched(quoteless)); if can_remove_quotes { - Cow::Owned(quoteless.to_string()) + Cow::Borrowed(quoteless) } else { self.normalize_string_literal(string_information) } @@ -298,6 +297,16 @@ impl<'a> LiteralStringNormalizer<'a> { Cow::Owned(std::format!("{preferred_quote}{content_to_use}{preferred_quote}",)) } } + + /// `is_identifier_name` patched with KATAKANA MIDDLE DOT and HALFWIDTH KATAKANA MIDDLE DOT + /// Otherwise `({ 'x・': 0 })` gets converted to `({ x・: 0 })`, which breaks in Unicode 4.1 to + /// 15. + /// + fn is_identifier_name_patched(content: &str) -> bool { + let mut chars = content.chars(); + chars.next().is_some_and(is_identifier_start) + && chars.all(|c| is_identifier_part(c) && c != '・' && c != '・') + } } impl<'a> Format<'a> for FormatLiteralStringToken<'a> { diff --git a/crates/oxc_formatter/src/write/as_or_satisfies_expression.rs b/crates/oxc_formatter/src/write/as_or_satisfies_expression.rs index 76195be39b197..9ab3f57615f59 100644 --- a/crates/oxc_formatter/src/write/as_or_satisfies_expression.rs +++ b/crates/oxc_formatter/src/write/as_or_satisfies_expression.rs @@ -49,8 +49,7 @@ fn format_as_or_satisfies_expression<'a>( // https://github.com/prettier/prettier/blob/fdfa6701767f5140a85902ecc9fb6444f5b4e3f8/src/language-js/comments/handle-comments.js#L1131 // See also https://github.com/prettier/prettier/blob/3.7.3/tests/format/typescript/as/comments/18160.ts let comments = f.context().comments().comments_in_range(expression.span().end, type_start); - let multiline_comment_position = - comments.iter().position(|c| c.is_block() && f.source_text().contains_newline(c.span)); + let multiline_comment_position = comments.iter().position(|c| c.is_multiline_block()); let block_comments = if let Some(pos) = multiline_comment_position { &comments[..pos] } else { comments }; diff --git a/crates/oxc_formatter/src/write/import_declaration.rs b/crates/oxc_formatter/src/write/import_declaration.rs index 2522028fa77ae..1c0ced5962536 100644 --- a/crates/oxc_formatter/src/write/import_declaration.rs +++ b/crates/oxc_formatter/src/write/import_declaration.rs @@ -1,15 +1,15 @@ use oxc_allocator::Vec; use oxc_ast::ast::*; use oxc_span::GetSpan; -use oxc_syntax::identifier::is_identifier_name; use crate::{ - Format, FormatTrailingCommas, JsLabels, QuoteProperties, TrailingSeparator, + Format, FormatTrailingCommas, JsLabels, TrailingSeparator, ast_nodes::{AstNode, AstNodes}, format_args, formatter::{ Formatter, prelude::*, separated::FormatSeparatedIter, trivia::FormatLeadingComments, }, + utils::string::{FormatLiteralStringToken, StringLiteralParentKind}, write, write::semicolon::OptionalSemicolon, }; @@ -251,14 +251,17 @@ impl<'a> Format<'a> for AstNode<'a, Vec<'a, ImportAttribute<'a>>> { impl<'a> FormatWrite<'a> for AstNode<'a, ImportAttribute<'a>> { fn write(&self, f: &mut Formatter<'_, 'a>) { - if let AstNodes::StringLiteral(s) = self.key().as_ast_nodes() { - if f.options().quote_properties == QuoteProperties::AsNeeded - && is_identifier_name(s.value().as_str()) - { - text(s.value().as_str()).fmt(f); - } else { - s.fmt(f); - } + if let AstNodes::StringLiteral(string) = self.key().as_ast_nodes() { + let format = FormatLiteralStringToken::new( + f.source_text().text_for(string), + false, + StringLiteralParentKind::ImportAttribute, + ) + .clean_text(f.context().source_type(), f.options()); + + string.format_leading_comments(f); + write!(f, format); + string.format_trailing_comments(f); } else { write!(f, self.key()); } diff --git a/crates/oxc_formatter/src/write/jsx/child_list.rs b/crates/oxc_formatter/src/write/jsx/child_list.rs index 07f4a65c4f9d5..9a448d3293255 100644 --- a/crates/oxc_formatter/src/write/jsx/child_list.rs +++ b/crates/oxc_formatter/src/write/jsx/child_list.rs @@ -31,11 +31,11 @@ impl FormatJsxChildList { self } - pub fn fmt_children<'a>( + pub fn fmt_children<'a, 'b>( &self, - children: &AstNode<'a, ArenaVec<'a, JSXChild<'a>>>, + children: &'b AstNode<'a, ArenaVec<'a, JSXChild<'a>>>, f: &mut Formatter<'_, 'a>, - ) -> FormatChildrenResult<'a> { + ) -> FormatChildrenResult<'a, 'b> { // Use Biome's exact approach - no need for jsx_split_children at this stage let children_meta = Self::children_meta(children, f.context().comments()); let layout = self.layout(children_meta); @@ -46,10 +46,9 @@ impl FormatJsxChildList { MultilineLayout::NoFill }; - let mut flat = FlatBuilder::new(f.context().allocator()); - let mut multiline = MultilineBuilder::new(multiline_layout, f.context().allocator()); - let mut force_multiline = layout.is_multiline(); + let mut flat = FlatBuilder::new(force_multiline, f.context().allocator()); + let mut multiline = MultilineBuilder::new(multiline_layout, f.context().allocator()); let mut children = jsx_split_children(children, f.context().comments()); @@ -58,6 +57,13 @@ impl FormatJsxChildList { children.pop(); } + if children.len() == 1 { + return FormatChildrenResult::SingleChild(FormatSingleChild { + child: children.pop().unwrap(), + force_multiline, + }); + } + let mut is_next_child_suppressed = false; let mut last: Option<&JsxChild> = None; let mut children_iter = JsxChildrenIterator::new(children.iter()); @@ -310,8 +316,11 @@ impl FormatJsxChildList { } else { let memoized = non_text.memoized(); - force_multiline = memoized.inspect(f).will_break(); - flat.write(&format_args!(memoized, format_separator), f); + child_breaks = memoized.inspect(f).will_break(); + + if !child_breaks { + flat.write(&format_args!(memoized, format_separator), f); + } if let Some(format_separator) = format_separator { multiline.write_with_separator(&memoized, &format_separator, f); @@ -388,7 +397,7 @@ impl FormatJsxChildList { /// The result of formatting the children of a JSX child list. #[derive(Debug)] -pub enum FormatChildrenResult<'a> { +pub enum FormatChildrenResult<'a, 'b> { /// Force the children to be formatted over multiple lines. /// /// For example: @@ -407,6 +416,8 @@ pub enum FormatChildrenResult<'a> { flat_children: FormatFlatChildren<'a>, expanded_children: FormatMultilineChildren<'a>, }, + + SingleChild(FormatSingleChild<'a, 'b>), } #[derive(Debug, Default, Copy, Clone)] @@ -669,8 +680,8 @@ struct FlatBuilder<'a> { } impl<'a> FlatBuilder<'a> { - fn new(allocator: &'a Allocator) -> Self { - Self { result: ArenaVec::new_in(allocator), disabled: false } + fn new(disabled: bool, allocator: &'a Allocator) -> Self { + Self { result: ArenaVec::new_in(allocator), disabled } } fn write(&mut self, content: &dyn Format<'a>, f: &mut Formatter<'_, 'a>) { @@ -718,3 +729,42 @@ impl<'a> Format<'a> for FormatFlatChildren<'a> { } } } + +/// Optimized formatting for a single JSX child. +/// +/// When there is only a single child, we do not need to write the child into a temporary buffer +/// and then take it when formatting. Instead, we can directly write the child into the root buffer. +/// +/// Also, this can avoid calling costly `best_fitting!` formatting in some situations. +#[derive(Debug)] +pub struct FormatSingleChild<'a, 'b> { + child: JsxChild<'a, 'b>, + force_multiline: bool, +} + +impl<'a> Format<'a> for FormatSingleChild<'a, '_> { + fn fmt(&self, f: &mut Formatter<'_, 'a>) { + let format_inner = format_with(|f| match &self.child { + JsxChild::Word(word) => { + word.fmt(f); + } + JsxChild::Whitespace => { + JsxSpace.fmt(f); + } + JsxChild::NonText(non_text) => { + non_text.fmt(f); + } + JsxChild::Newline | JsxChild::EmptyLine => { + unreachable!( + "`Newline` or `EmptyLine` should have been trimmed for single child formatting" + ); + } + }); + + if self.force_multiline { + write!(f, [block_indent(&format_inner)]); + } else { + write!(f, [soft_block_indent(&format_inner)]); + } + } +} diff --git a/crates/oxc_formatter/src/write/jsx/element.rs b/crates/oxc_formatter/src/write/jsx/element.rs index c4c4a1d3b6b48..67f9b300bf3f7 100644 --- a/crates/oxc_formatter/src/write/jsx/element.rs +++ b/crates/oxc_formatter/src/write/jsx/element.rs @@ -138,6 +138,9 @@ impl<'a> Format<'a> for AnyJsxTagWithChildren<'a, '_> { .fmt_children(children, f); match format_children { + FormatChildrenResult::SingleChild(child) => { + write!(f, group(&format_args!(format_opening, child, format_closing))); + } FormatChildrenResult::ForceMultiline(multiline) => { write!(f, [format_opening, multiline, format_closing]); } diff --git a/crates/oxc_formatter/src/write/mod.rs b/crates/oxc_formatter/src/write/mod.rs index 981d962079451..2d0088463100c 100644 --- a/crates/oxc_formatter/src/write/mod.rs +++ b/crates/oxc_formatter/src/write/mod.rs @@ -221,7 +221,6 @@ impl<'a> FormatWrite<'a> for AstNode<'a, CallExpression<'a>> { callee.as_ref(), Expression::StaticMemberExpression(_) | Expression::ComputedMemberExpression(_) ) - && !callee.needs_parentheses(f) && !is_simple_module_import(self.arguments(), f.comments()) && !is_test_call_expression(self) { @@ -948,32 +947,7 @@ impl<'a> FormatWrite<'a> for AstNode<'a, ObjectPattern<'a>> { impl<'a> FormatWrite<'a> for AstNode<'a, BindingProperty<'a>> { fn write(&self, f: &mut Formatter<'_, 'a>) { - let group_id = f.group_id("assignment"); - let format_inner = format_with(|f| { - if self.computed() { - write!(f, "["); - } - if !self.shorthand() { - write!(f, self.key()); - } - if self.computed() { - write!(f, "]"); - } - if self.shorthand() { - write!(f, self.value()); - } else { - write!( - f, - [ - ":", - group(&indent(&soft_line_break_or_space())).with_group_id(Some(group_id)), - line_suffix_boundary(), - indent_if_group_breaks(&self.value(), group_id) - ] - ); - } - }); - write!(f, group(&format_inner)); + AssignmentLike::BindingProperty(self).fmt(f); } } diff --git a/crates/oxc_formatter/src/write/object_pattern_like.rs b/crates/oxc_formatter/src/write/object_pattern_like.rs index d164bc9aa74e9..fa42a8ed9027c 100644 --- a/crates/oxc_formatter/src/write/object_pattern_like.rs +++ b/crates/oxc_formatter/src/write/object_pattern_like.rs @@ -51,28 +51,28 @@ impl<'a> ObjectPatternLike<'a, '_> { } } + /// Based on fn should_break_properties(&self) -> bool { - // Check parent node type - let parent_is_catch_or_parameter = match self { - Self::ObjectPattern(node) => { - matches!(node.parent, AstNodes::CatchParameter(_) | AstNodes::FormalParameter(_)) - } - Self::ObjectAssignmentTarget(_) => false, - }; - - if parent_is_catch_or_parameter { - return false; - } - match self { - Self::ObjectPattern(node) => node.properties.iter().any(|property| { - // + Self::ObjectPattern(node) => { + let parent_is_parameter_or_assignment_pattern = matches!( + node.parent, + AstNodes::CatchParameter(_) + | AstNodes::FormalParameter(_) + | AstNodes::AssignmentPattern(_) + ); + + if parent_is_parameter_or_assignment_pattern { + return false; + } - matches!( - property.value.kind, - BindingPatternKind::ArrayPattern(_) | BindingPatternKind::ObjectPattern(_) - ) - }), + node.properties.iter().any(|property| { + matches!( + property.value.kind, + BindingPatternKind::ArrayPattern(_) | BindingPatternKind::ObjectPattern(_) + ) + }) + } Self::ObjectAssignmentTarget(node) => { node.properties.iter().any(|property| match property { AssignmentTargetProperty::AssignmentTargetPropertyIdentifier(_) => false, diff --git a/crates/oxc_formatter/src/write/return_or_throw_statement.rs b/crates/oxc_formatter/src/write/return_or_throw_statement.rs index 74c9217ea9451..76f37d41053b3 100644 --- a/crates/oxc_formatter/src/write/return_or_throw_statement.rs +++ b/crates/oxc_formatter/src/write/return_or_throw_statement.rs @@ -114,25 +114,22 @@ impl<'a> Format<'a> for FormatAdjacentArgument<'a, '_> { /// Traversing the left nodes is necessary in case the first node is parenthesized because /// parentheses will be removed (and be re-added by the return statement, but only if the argument breaks) fn has_argument_leading_comments(argument: &AstNode, f: &Formatter<'_, '_>) -> bool { - let source_text = f.source_text(); - for left_side in ExpressionLeftSide::from(argument).iter() { let start = left_side.span().start; let comments = f.context().comments(); let leading_comments = comments.comments_before(start); - if leading_comments.iter().any(|comment| { - (comment.is_block() && source_text.contains_newline(comment.span)) - || comment.followed_by_newline() - }) { + if leading_comments + .iter() + .any(|comment| comment.is_multiline_block() || comment.followed_by_newline()) + { return true; } let is_own_line_comment_or_multi_line_comment = |leading_comments: &[Comment]| { - leading_comments.iter().any(|comment| { - comment.preceded_by_newline() - || (comment.is_block() && source_text.contains_newline(comment.span)) - }) + leading_comments + .iter() + .any(|comment| comment.is_multiline_block() || comment.preceded_by_newline()) }; // Yield expressions only need to check the leading comments on the left side. diff --git a/crates/oxc_formatter/tests/fixtures/js/assignments/issue-16520.js b/crates/oxc_formatter/tests/fixtures/js/assignments/issue-16520.js new file mode 100644 index 0000000000000..9a8c588b0a07d --- /dev/null +++ b/crates/oxc_formatter/tests/fixtures/js/assignments/issue-16520.js @@ -0,0 +1,5 @@ +const { + data: { args: { something } } = { + args: { something: []}, + } +} = obj; diff --git a/crates/oxc_formatter/tests/fixtures/js/assignments/issue-16520.js.snap b/crates/oxc_formatter/tests/fixtures/js/assignments/issue-16520.js.snap new file mode 100644 index 0000000000000..d9bcb6fcc9af3 --- /dev/null +++ b/crates/oxc_formatter/tests/fixtures/js/assignments/issue-16520.js.snap @@ -0,0 +1,30 @@ +--- +source: crates/oxc_formatter/tests/fixtures/mod.rs +--- +==================== Input ==================== +const { + data: { args: { something } } = { + args: { something: []}, + } +} = obj; + +==================== Output ==================== +------------------ +{ printWidth: 80 } +------------------ +const { + data: { args: { something } } = { + args: { something: [] }, + }, +} = obj; + +------------------- +{ printWidth: 100 } +------------------- +const { + data: { args: { something } } = { + args: { something: [] }, + }, +} = obj; + +===================== End ===================== diff --git a/crates/oxc_formatter/tests/fixtures/js/calls/test.js b/crates/oxc_formatter/tests/fixtures/js/calls/test.js index a29a66bcfafba..92f6a189a2340 100644 --- a/crates/oxc_formatter/tests/fixtures/js/calls/test.js +++ b/crates/oxc_formatter/tests/fixtures/js/calls/test.js @@ -27,3 +27,21 @@ test(code.replace((c) => ""), () => {}); expect(content) .toMatch(`props: /*@__PURE__*/_mergeDefaults(['foo', 'bar', 'baz'], { })`) + + +// https://github.com/oxc-project/oxc/issues/16521 +string().required().test('foobarbazqux', async (value, { createError }) => { + // +}) + +const schema = object({ + foo: string().required().test('foobarbazqux', async (value, { createError }) => { + // + }), +}); + +global().longcalllongcall().property + .test + .only('foobarbazqux', async () => { + // + }) diff --git a/crates/oxc_formatter/tests/fixtures/js/calls/test.js.snap b/crates/oxc_formatter/tests/fixtures/js/calls/test.js.snap index b8980f7c792a9..2d6ac93bf782b 100644 --- a/crates/oxc_formatter/tests/fixtures/js/calls/test.js.snap +++ b/crates/oxc_formatter/tests/fixtures/js/calls/test.js.snap @@ -32,6 +32,24 @@ expect(content) .toMatch(`props: /*@__PURE__*/_mergeDefaults(['foo', 'bar', 'baz'], { })`) + +// https://github.com/oxc-project/oxc/issues/16521 +string().required().test('foobarbazqux', async (value, { createError }) => { + // +}) + +const schema = object({ + foo: string().required().test('foobarbazqux', async (value, { createError }) => { + // + }), +}); + +global().longcalllongcall().property + .test + .only('foobarbazqux', async () => { + // + }) + ==================== Output ==================== ------------------ { printWidth: 80 } @@ -69,6 +87,27 @@ expect(content) .toMatch(`props: /*@__PURE__*/_mergeDefaults(['foo', 'bar', 'baz'], { })`); +// https://github.com/oxc-project/oxc/issues/16521 +string() + .required() + .test("foobarbazqux", async (value, { createError }) => { + // + }); + +const schema = object({ + foo: string() + .required() + .test("foobarbazqux", async (value, { createError }) => { + // + }), +}); + +global() + .longcalllongcall() + .property.test.only("foobarbazqux", async () => { + // + }); + ------------------- { printWidth: 100 } ------------------- @@ -104,4 +143,25 @@ test( expect(content).toMatch(`props: /*@__PURE__*/_mergeDefaults(['foo', 'bar', 'baz'], { })`); +// https://github.com/oxc-project/oxc/issues/16521 +string() + .required() + .test("foobarbazqux", async (value, { createError }) => { + // + }); + +const schema = object({ + foo: string() + .required() + .test("foobarbazqux", async (value, { createError }) => { + // + }), +}); + +global() + .longcalllongcall() + .property.test.only("foobarbazqux", async () => { + // + }); + ===================== End ===================== diff --git a/crates/oxc_formatter/tests/fixtures/js/unicode/katakana-middle-dot.js b/crates/oxc_formatter/tests/fixtures/js/unicode/katakana-middle-dot.js new file mode 100644 index 0000000000000..20bfc598ef9dd --- /dev/null +++ b/crates/oxc_formatter/tests/fixtures/js/unicode/katakana-middle-dot.js @@ -0,0 +1,7 @@ +// https://github.com/oxc-project/oxc/issues/16527 +x = { 'x・': 0, 'x・': 1 }; +x = y['x・', 'x・']; +class A { + 'x・'() {} + 'x・'() {} +} diff --git a/crates/oxc_formatter/tests/fixtures/js/unicode/katakana-middle-dot.js.snap b/crates/oxc_formatter/tests/fixtures/js/unicode/katakana-middle-dot.js.snap new file mode 100644 index 0000000000000..e79690a986658 --- /dev/null +++ b/crates/oxc_formatter/tests/fixtures/js/unicode/katakana-middle-dot.js.snap @@ -0,0 +1,36 @@ +--- +source: crates/oxc_formatter/tests/fixtures/mod.rs +--- +==================== Input ==================== +// https://github.com/oxc-project/oxc/issues/16527 +x = { 'x・': 0, 'x・': 1 }; +x = y['x・', 'x・']; +class A { + 'x・'() {} + 'x・'() {} +} + +==================== Output ==================== +------------------ +{ printWidth: 80 } +------------------ +// https://github.com/oxc-project/oxc/issues/16527 +x = { "x・": 0, "x・": 1 }; +x = y[("x・", "x・")]; +class A { + "x・"() {} + "x・"() {} +} + +------------------- +{ printWidth: 100 } +------------------- +// https://github.com/oxc-project/oxc/issues/16527 +x = { "x・": 0, "x・": 1 }; +x = y[("x・", "x・")]; +class A { + "x・"() {} + "x・"() {} +} + +===================== End ===================== diff --git a/crates/oxc_formatter/tests/ir_transform/mod.rs b/crates/oxc_formatter/tests/ir_transform/mod.rs index c6707984d2e45..d1b189464943b 100644 --- a/crates/oxc_formatter/tests/ir_transform/mod.rs +++ b/crates/oxc_formatter/tests/ir_transform/mod.rs @@ -8,13 +8,15 @@ pub fn assert_format(code: &str, config_json: &str, expected: &str) { let expected = expected.strip_prefix('\n').expect("Expected code should start with a newline"); let config: Oxfmtrc = serde_json::from_str(config_json).expect("Invalid JSON config"); - let options = config.into_format_options().expect("Failed to convert config to FormatOptions"); + let (options, _) = config.into_options().expect("Failed to convert config to FormatOptions"); let actual = format_code(code, &options); assert_eq!( actual, expected, r" 💥 First format does not match expected! +============== input ============== +{code} ============== actual ============= {actual} ============= expected ============ @@ -25,13 +27,15 @@ pub fn assert_format(code: &str, config_json: &str, expected: &str) { ); // Check idempotency - let actual = format_code(&actual, &options); + let actual2 = format_code(&actual, &options); assert_eq!( - actual, expected, + actual2, expected, r" 💥 Formatting is not idempotent! -============== actual ============= +============== input ============== {actual} +============== actual ============= +{actual2} ============= expected ============ {expected} ============== config ============= diff --git a/crates/oxc_formatter/tests/ir_transform/sort_imports.rs b/crates/oxc_formatter/tests/ir_transform/sort_imports.rs index d19cf2b0a3998..8d22a389b50a6 100644 --- a/crates/oxc_formatter/tests/ir_transform/sort_imports.rs +++ b/crates/oxc_formatter/tests/ir_transform/sort_imports.rs @@ -643,6 +643,167 @@ import B from "b"; // --- +#[test] +fn should_not_attach_comment_if_newline_between_import() { + assert_format( + r#" +// THIS IS NOT MOVED + +import b from "b"; +// AND ALSO THIS IS NOT MOVED + +import a from "a"; +"#, + r#"{ "experimentalSortImports": {} }"#, + r#" +// THIS IS NOT MOVED + +import a from "a"; +// AND ALSO THIS IS NOT MOVED +import b from "b"; +"#, + ); + assert_format( + r#" +// THIS CAN BE MOVED +// BECAUSE OF THIS +import b from "b"; +// AND ALSO THIS CAN BE MOVED +import a from "a"; +"#, + r#"{ "experimentalSortImports": {} }"#, + r#" +// AND ALSO THIS CAN BE MOVED +import a from "a"; +// THIS CAN BE MOVED +// BECAUSE OF THIS +import b from "b"; +"#, + ); + assert_format( + r#" +// THIS IS A GENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. + +import { apiClient } from "../../apiClient"; +import { useMutation, UseMutationOptions } from "@tanstack/react-query"; +import { ApiErrorDisconnected, ApiError } from "../../apiErrors"; +import { validateResponse } from "../../validateResponse"; +// Use zod + +import { z } from "zod"; +"#, + r#"{ "experimentalSortImports": {} }"#, + r#" +// THIS IS A GENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. + +import { useMutation, UseMutationOptions } from "@tanstack/react-query"; +import { z } from "zod"; + +import { apiClient } from "../../apiClient"; +import { ApiErrorDisconnected, ApiError } from "../../apiErrors"; +// Use zod +import { validateResponse } from "../../validateResponse"; +"#, + ); + assert_format( + r#" +// THIS IS A GENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. + +import { useMutation, UseMutationOptions } from "@tanstack/react-query"; +// Use zod + +import { z } from "zod"; +"#, + r#"{ + "experimentalSortImports": { + "partitionByNewline": true, + "newlinesBetween": false + } + }"#, + r#" +// THIS IS A GENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. + +import { useMutation, UseMutationOptions } from "@tanstack/react-query"; +// Use zod + +import { z } from "zod"; +"#, + ); + assert_format( + r#" +// THIS IS A GENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. + +import { useMutation, UseMutationOptions } from "@tanstack/react-query"; +// Use zod + +import { z } from "zod"; +"#, + r#"{ + "experimentalSortImports": { + "newlinesBetween": false + } + }"#, + r#" +// THIS IS A GENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. + +import { useMutation, UseMutationOptions } from "@tanstack/react-query"; +// Use zod +import { z } from "zod"; +"#, + ); + assert_format( + r#" +// FIXED + +import { useMutation, UseMutationOptions } from "@tanstack/react-query"; +// C1 + +// C2 + +import { z } from "zod"; +"#, + r#"{ "experimentalSortImports": {} }"#, + r#" +// FIXED + +import { useMutation, UseMutationOptions } from "@tanstack/react-query"; +// C1 +// C2 +import { z } from "zod"; +"#, + ); + assert_format( + r#" +// FIXED + +import { useMutation, UseMutationOptions } from "@tanstack/react-query"; +// C1 + +// C2 + +import { z } from "zod"; +"#, + r#"{ + "experimentalSortImports": { + "newlinesBetween": false, + "partitionByNewline": true + } + }"#, + r#" +// FIXED + +import { useMutation, UseMutationOptions } from "@tanstack/react-query"; +// C1 + +// C2 + +import { z } from "zod"; +"#, + ); +} + +// --- + #[test] fn should_sort_by_order() { // Z-A (natural order reversed) diff --git a/crates/oxc_formatter/tests/schema.rs b/crates/oxc_formatter/tests/schema.rs index c068d8c491233..af6ec02a21412 100644 --- a/crates/oxc_formatter/tests/schema.rs +++ b/crates/oxc_formatter/tests/schema.rs @@ -8,16 +8,7 @@ use project_root::get_project_root; #[test] fn test_schema_json() { let path = get_project_root().unwrap().join("npm/oxfmt/configuration_schema.json"); - let mut schema = schemars::schema_for!(Oxfmtrc); - // Allow comments and trailing commas for vscode-json-languageservice - // NOTE: This is NOT part of standard JSON Schema specification - // https://github.com/microsoft/vscode-json-languageservice/blob/fb83547762901f32d8449d57e24666573016b10c/src/jsonLanguageTypes.ts#L151-L159 - schema.schema.extensions.insert("allowComments".to_string(), serde_json::Value::Bool(true)); - schema - .schema - .extensions - .insert("allowTrailingCommas".to_string(), serde_json::Value::Bool(true)); - let json = serde_json::to_string_pretty(&schema).unwrap(); + let json = Oxfmtrc::generate_schema_json(); let existing_json = fs::read_to_string(&path).unwrap_or_default(); if existing_json.trim() != json.trim() { std::fs::write(&path, &json).unwrap(); diff --git a/crates/oxc_formatter/tests/snapshots/schema_json.snap b/crates/oxc_formatter/tests/snapshots/schema_json.snap index 08a1e582179d4..3527a25287516 100644 --- a/crates/oxc_formatter/tests/snapshots/schema_json.snap +++ b/crates/oxc_formatter/tests/snapshots/schema_json.snap @@ -4,12 +4,124 @@ expression: json --- { "$schema": "http://json-schema.org/draft-07/schema#", - "title": "Oxfmtrc", - "description": "Configuration options for the formatter.\nMost options are the same as Prettier's options.\nSee also ", - "type": "object", + "allowComments": true, + "allowTrailingCommas": true, + "definitions": { + "ArrowParensConfig": { + "enum": [ + "always", + "avoid" + ], + "type": "string" + }, + "EmbeddedLanguageFormattingConfig": { + "enum": [ + "auto", + "off" + ], + "type": "string" + }, + "EndOfLineConfig": { + "enum": [ + "lf", + "crlf", + "cr" + ], + "type": "string" + }, + "ObjectWrapConfig": { + "enum": [ + "preserve", + "collapse", + "always" + ], + "type": "string" + }, + "QuotePropsConfig": { + "enum": [ + "as-needed", + "preserve" + ], + "type": "string" + }, + "SortImportsConfig": { + "properties": { + "groups": { + "description": "Custom groups configuration for organizing imports.\nEach array element represents a group, and multiple group names in the same array are treated as one.\nAccepts both `string` and `string[]` as group elements.", + "items": { + "items": { + "type": "string" + }, + "type": "array" + }, + "markdownDescription": "Custom groups configuration for organizing imports.\nEach array element represents a group, and multiple group names in the same array are treated as one.\nAccepts both `string` and `string[]` as group elements.", + "type": [ + "array", + "null" + ] + }, + "ignoreCase": { + "default": true, + "type": "boolean" + }, + "internalPattern": { + "items": { + "type": "string" + }, + "type": [ + "array", + "null" + ] + }, + "newlinesBetween": { + "default": true, + "type": "boolean" + }, + "order": { + "anyOf": [ + { + "$ref": "#/definitions/SortOrderConfig" + }, + { + "type": "null" + } + ] + }, + "partitionByComment": { + "default": false, + "type": "boolean" + }, + "partitionByNewline": { + "default": false, + "type": "boolean" + }, + "sortSideEffects": { + "default": false, + "type": "boolean" + } + }, + "type": "object" + }, + "SortOrderConfig": { + "enum": [ + "asc", + "desc" + ], + "type": "string" + }, + "TrailingCommaConfig": { + "enum": [ + "all", + "es5", + "none" + ], + "type": "string" + } + }, + "description": "Configuration options for the Oxfmt.\nMost options are the same as Prettier's options.\nSee also \nBut some options are our own extensions.", + "markdownDescription": "Configuration options for the Oxfmt.\nMost options are the same as Prettier's options.\nSee also \nBut some options are our own extensions.", "properties": { "arrowParens": { - "description": "Include parentheses around a sole arrow function parameter. (Default: \"always\")", "anyOf": [ { "$ref": "#/definitions/ArrowParensConfig" @@ -17,24 +129,27 @@ expression: json { "type": "null" } - ] + ], + "description": "Include parentheses around a sole arrow function parameter. (Default: `\"always\"`)", + "markdownDescription": "Include parentheses around a sole arrow function parameter. (Default: `\"always\"`)" }, "bracketSameLine": { - "description": "Put the > of a multi-line JSX element at the end of the last line instead of being alone on the next line. (Default: false)", + "description": "Put the `>` of a multi-line JSX element at the end of the last line\ninstead of being alone on the next line. (Default: `false`)", + "markdownDescription": "Put the `>` of a multi-line JSX element at the end of the last line\ninstead of being alone on the next line. (Default: `false`)", "type": [ "boolean", "null" ] }, "bracketSpacing": { - "description": "Print spaces between brackets in object literals. (Default: true)", + "description": "Print spaces between brackets in object literals. (Default: `true`)", + "markdownDescription": "Print spaces between brackets in object literals. (Default: `true`)", "type": [ "boolean", "null" ] }, "embeddedLanguageFormatting": { - "description": "Control whether formats quoted code embedded in the file. (Default: \"auto\")", "anyOf": [ { "$ref": "#/definitions/EmbeddedLanguageFormattingConfig" @@ -42,10 +157,11 @@ expression: json { "type": "null" } - ] + ], + "description": "Control whether formats quoted code embedded in the file. (Default: `\"auto\"`)", + "markdownDescription": "Control whether formats quoted code embedded in the file. (Default: `\"auto\"`)" }, "endOfLine": { - "description": "Which end of line characters to apply. (Default: \"lf\")", "anyOf": [ { "$ref": "#/definitions/EndOfLineConfig" @@ -53,10 +169,11 @@ expression: json { "type": "null" } - ] + ], + "description": "Which end of line characters to apply. (Default: `\"lf\"`)", + "markdownDescription": "Which end of line characters to apply. (Default: `\"lf\"`)" }, "experimentalSortImports": { - "description": "Experimental: Sort import statements. Disabled by default.", "anyOf": [ { "$ref": "#/definitions/SortImportsConfig" @@ -64,27 +181,38 @@ expression: json { "type": "null" } + ], + "description": "Experimental: Sort import statements. Disabled by default.", + "markdownDescription": "Experimental: Sort import statements. Disabled by default." + }, + "experimentalSortPackageJson": { + "description": "Experimental: Sort `package.json` keys. (Default: `true`)", + "markdownDescription": "Experimental: Sort `package.json` keys. (Default: `true`)", + "type": [ + "boolean", + "null" ] }, "ignorePatterns": { "description": "Ignore files matching these glob patterns. Current working directory is used as the root.", + "items": { + "type": "string" + }, + "markdownDescription": "Ignore files matching these glob patterns. Current working directory is used as the root.", "type": [ "array", "null" - ], - "items": { - "type": "string" - } + ] }, "jsxSingleQuote": { - "description": "Use single quotes instead of double quotes in JSX. (Default: false)", + "description": "Use single quotes instead of double quotes in JSX. (Default: `false`)", + "markdownDescription": "Use single quotes instead of double quotes in JSX. (Default: `false`)", "type": [ "boolean", "null" ] }, "objectWrap": { - "description": "How to wrap object literals when they could fit on one line or span multiple lines. (Default: \"preserve\")\nNOTE: In addition to Prettier's \"preserve\" and \"collapse\", we also support \"always\".", "anyOf": [ { "$ref": "#/definitions/ObjectWrapConfig" @@ -92,19 +220,21 @@ expression: json { "type": "null" } - ] + ], + "description": "How to wrap object literals when they could fit on one line or span multiple lines. (Default: `\"preserve\"`)\nNOTE: In addition to Prettier's `\"preserve\"` and `\"collapse\"`, we also support `\"always\"`.", + "markdownDescription": "How to wrap object literals when they could fit on one line or span multiple lines. (Default: `\"preserve\"`)\nNOTE: In addition to Prettier's `\"preserve\"` and `\"collapse\"`, we also support `\"always\"`." }, "printWidth": { - "description": "The line length that the printer will wrap on. (Default: 100)", + "description": "The line length that the printer will wrap on. (Default: `100`)", + "format": "uint16", + "markdownDescription": "The line length that the printer will wrap on. (Default: `100`)", + "minimum": 0.0, "type": [ "integer", "null" - ], - "format": "uint16", - "minimum": 0.0 + ] }, "quoteProps": { - "description": "Change when properties in objects are quoted. (Default: \"as-needed\")", "anyOf": [ { "$ref": "#/definitions/QuotePropsConfig" @@ -112,40 +242,45 @@ expression: json { "type": "null" } - ] + ], + "description": "Change when properties in objects are quoted. (Default: `\"as-needed\"`)", + "markdownDescription": "Change when properties in objects are quoted. (Default: `\"as-needed\"`)" }, "semi": { - "description": "Print semicolons at the ends of statements. (Default: true)", + "description": "Print semicolons at the ends of statements. (Default: `true`)", + "markdownDescription": "Print semicolons at the ends of statements. (Default: `true`)", "type": [ "boolean", "null" ] }, "singleAttributePerLine": { - "description": "Put each attribute on a new line in JSX. (Default: false)", + "description": "Put each attribute on a new line in JSX. (Default: `false`)", + "markdownDescription": "Put each attribute on a new line in JSX. (Default: `false`)", "type": [ "boolean", "null" ] }, "singleQuote": { - "description": "Use single quotes instead of double quotes. (Default: false)", + "description": "Use single quotes instead of double quotes. (Default: `false`)", + "markdownDescription": "Use single quotes instead of double quotes. (Default: `false`)", "type": [ "boolean", "null" ] }, "tabWidth": { - "description": "Number of spaces per indentation level. (Default: 2)", + "description": "Number of spaces per indentation level. (Default: `2`)", + "format": "uint8", + "markdownDescription": "Number of spaces per indentation level. (Default: `2`)", + "minimum": 0.0, "type": [ "integer", "null" - ], - "format": "uint8", - "minimum": 0.0 + ] }, "trailingComma": { - "description": "Print trailing commas wherever possible. (Default: \"all\")", "anyOf": [ { "$ref": "#/definitions/TrailingCommaConfig" @@ -153,127 +288,19 @@ expression: json { "type": "null" } - ] + ], + "description": "Print trailing commas wherever possible. (Default: `\"all\"`)", + "markdownDescription": "Print trailing commas wherever possible. (Default: `\"all\"`)" }, "useTabs": { - "description": "Use tabs for indentation or spaces. (Default: false)", + "description": "Use tabs for indentation or spaces. (Default: `false`)", + "markdownDescription": "Use tabs for indentation or spaces. (Default: `false`)", "type": [ "boolean", "null" ] } }, - "allowComments": true, - "allowTrailingCommas": true, - "definitions": { - "ArrowParensConfig": { - "type": "string", - "enum": [ - "always", - "avoid" - ] - }, - "EmbeddedLanguageFormattingConfig": { - "type": "string", - "enum": [ - "auto", - "off" - ] - }, - "EndOfLineConfig": { - "type": "string", - "enum": [ - "lf", - "crlf", - "cr" - ] - }, - "ObjectWrapConfig": { - "type": "string", - "enum": [ - "preserve", - "collapse", - "always" - ] - }, - "QuotePropsConfig": { - "type": "string", - "enum": [ - "as-needed", - "preserve" - ] - }, - "SortImportsConfig": { - "type": "object", - "properties": { - "groups": { - "description": "Custom groups configuration for organizing imports.\nEach array element represents a group, and multiple group names in the same array are treated as one.\nAccepts both `string` and `string[]` as group elements.", - "type": [ - "array", - "null" - ], - "items": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "ignoreCase": { - "default": true, - "type": "boolean" - }, - "internalPattern": { - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - } - }, - "newlinesBetween": { - "default": true, - "type": "boolean" - }, - "order": { - "anyOf": [ - { - "$ref": "#/definitions/SortOrderConfig" - }, - { - "type": "null" - } - ] - }, - "partitionByComment": { - "default": false, - "type": "boolean" - }, - "partitionByNewline": { - "default": false, - "type": "boolean" - }, - "sortSideEffects": { - "default": false, - "type": "boolean" - } - } - }, - "SortOrderConfig": { - "type": "string", - "enum": [ - "asc", - "desc" - ] - }, - "TrailingCommaConfig": { - "type": "string", - "enum": [ - "all", - "es5", - "none" - ] - } - } + "title": "Oxfmtrc", + "type": "object" } diff --git a/crates/oxc_isolated_declarations/Cargo.toml b/crates/oxc_isolated_declarations/Cargo.toml index 2897c6bdb6ac2..8e0db1d1605ab 100644 --- a/crates/oxc_isolated_declarations/Cargo.toml +++ b/crates/oxc_isolated_declarations/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "oxc_isolated_declarations" -version = "0.101.0" +version = "0.102.0" authors.workspace = true categories.workspace = true edition.workspace = true diff --git a/crates/oxc_language_server/CHANGELOG.md b/crates/oxc_language_server/CHANGELOG.md index 7cdba9fdd37bf..635057297d6b8 100644 --- a/crates/oxc_language_server/CHANGELOG.md +++ b/crates/oxc_language_server/CHANGELOG.md @@ -4,6 +4,26 @@ All notable changes to this package will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0). +## [1.32.0] - 2025-12-08 + +### 🐛 Bug Fixes + +- 0c14531 oxlint/lsp: Revalidate all known files after internal restart (#16407) (Sysix) +- 5fd3096 lsp: Skip (un)registering file watcher when not dynamic watchers are supported (#16406) (Sysix) +- 804144f lsp: Respect `null` as invalid settings for `workspace/didChangeConfiguration` (#16361) (Sysix) +- 114665d lsp: Watch for files when workspace folder is added & `workspace/configuration` is not supported (#16307) (Sysix) + +### ⚡ Performance + +- 67cfa58 lsp: Avoid some clones (#16519) (Sysix) +- 2a09665 oxlint/lsp: Store only `LinterCodeAction` instead of the complete `DiagnosticReport` (#16516) (Sysix) +- 0ca9754 lsp: Avoid `Uri` to `String` and back to `Uri` conversion (#16470) (Sysix) +- 2736636 lsp: Avoid cloning when revalidating diagnostics (#16469) (Sysix) + +### 📚 Documentation + +- c0766df linter: Add config option docs for `unicorn/filename-case` rule. (#16280) (connorshea) + ## [1.31.0] - 2025-12-01 ### 🐛 Bug Fixes diff --git a/crates/oxc_language_server/Cargo.toml b/crates/oxc_language_server/Cargo.toml index d471d5e63d8dc..611fb5476d55d 100644 --- a/crates/oxc_language_server/Cargo.toml +++ b/crates/oxc_language_server/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "oxc_language_server" -version = "1.31.0" +version = "1.32.0" authors.workspace = true categories.workspace = true edition.workspace = true @@ -22,17 +22,17 @@ test = true doctest = false [dependencies] -oxc_allocator = { workspace = true } -oxc_data_structures = { workspace = true, features = ["rope"] } -oxc_diagnostics = { workspace = true } +oxc_allocator = { workspace = true, optional = true } +oxc_data_structures = { workspace = true, features = ["rope"], optional = true } +oxc_diagnostics = { workspace = true, optional = true } oxc_formatter = { workspace = true, optional = true } oxc_linter = { workspace = true, optional = true } -oxc_parser = { workspace = true } +oxc_parser = { workspace = true, optional = true } # env_logger = { workspace = true, features = ["humantime"] } futures = { workspace = true } -ignore = { workspace = true, features = ["simd-accel"] } +ignore = { workspace = true, features = ["simd-accel"], optional = true } log = { workspace = true } papaya = { workspace = true } rustc-hash = { workspace = true } @@ -47,5 +47,19 @@ tokio = { workspace = true, features = ["rt-multi-thread", "io-std", "io-util", [features] default = ["linter", "formatter"] -linter = ["dep:oxc_linter"] -formatter = ["dep:oxc_formatter"] +linter = [ + "dep:oxc_allocator", + "dep:oxc_data_structures", + "dep:oxc_diagnostics", + "dep:oxc_linter", + # + "dep:ignore", +] +formatter = [ + "dep:oxc_allocator", + "dep:oxc_data_structures", + "dep:oxc_formatter", + "dep:oxc_parser", + # + "dep:ignore", +] diff --git a/crates/oxc_language_server/fixtures/linter/astro/debugger.astro b/crates/oxc_language_server/fixtures/linter/frameworks/astro/debugger.astro similarity index 100% rename from crates/oxc_language_server/fixtures/linter/astro/debugger.astro rename to crates/oxc_language_server/fixtures/linter/frameworks/astro/debugger.astro diff --git a/crates/oxc_language_server/fixtures/linter/frameworks/nextjs/[[..rest]]/debugger.ts b/crates/oxc_language_server/fixtures/linter/frameworks/nextjs/[[..rest]]/debugger.ts new file mode 100644 index 0000000000000..eab74692130a6 --- /dev/null +++ b/crates/oxc_language_server/fixtures/linter/frameworks/nextjs/[[..rest]]/debugger.ts @@ -0,0 +1 @@ +debugger; diff --git a/crates/oxc_language_server/fixtures/linter/svelte/debugger.svelte b/crates/oxc_language_server/fixtures/linter/frameworks/svelte/debugger.svelte similarity index 100% rename from crates/oxc_language_server/fixtures/linter/svelte/debugger.svelte rename to crates/oxc_language_server/fixtures/linter/frameworks/svelte/debugger.svelte diff --git a/crates/oxc_language_server/fixtures/linter/vue/debugger.vue b/crates/oxc_language_server/fixtures/linter/frameworks/vue/debugger.vue similarity index 100% rename from crates/oxc_language_server/fixtures/linter/vue/debugger.vue rename to crates/oxc_language_server/fixtures/linter/frameworks/vue/debugger.vue diff --git a/crates/oxc_language_server/src/backend.rs b/crates/oxc_language_server/src/backend.rs index c1a2f762fce6f..42582dd6d12a2 100644 --- a/crates/oxc_language_server/src/backend.rs +++ b/crates/oxc_language_server/src/backend.rs @@ -8,7 +8,7 @@ use tokio::sync::{OnceCell, RwLock, SetError}; use tower_lsp_server::{ Client, LanguageServer, jsonrpc::{Error, ErrorCode, Result}, - lsp_types::{ + ls_types::{ CodeActionParams, CodeActionResponse, ConfigurationItem, Diagnostic, DidChangeConfigurationParams, DidChangeTextDocumentParams, DidChangeWatchedFilesParams, DidChangeWorkspaceFoldersParams, DidCloseTextDocumentParams, DidOpenTextDocumentParams, @@ -86,14 +86,14 @@ impl LanguageServer for Backend { return Some(new_settings); } - let deprecated_settings = value.get("settings"); - // the client has deprecated settings and has a deprecated root uri. // handle all things like the old way - if deprecated_settings.is_some() && params.root_uri.is_some() { + if let (Some(deprecated_settings), Some(root_uri)) = + (value.get("settings"), params.root_uri.as_ref()) + { return Some(vec![WorkspaceOption { - workspace_uri: params.root_uri.clone().unwrap(), - options: deprecated_settings.unwrap().clone(), + workspace_uri: root_uri.clone(), + options: deprecated_settings.clone(), }]); } @@ -129,10 +129,10 @@ impl LanguageServer for Backend { // start the linter. We do not start the linter when the client support the request, // we will init the linter after requesting for the workspace configuration. if !capabilities.workspace_configuration || options.is_some() { + let options = options.unwrap_or_default(); + for worker in &workers { let option = options - .as_deref() - .unwrap_or_default() .iter() .find(|workspace_option| { worker.is_responsible_for_uri(&workspace_option.workspace_uri) @@ -522,7 +522,7 @@ impl LanguageServer for Backend { let content = params.content_changes.first().map(|c| c.text.clone()); if let Some(content) = &content { - self.file_system.write().await.set(&uri, content.clone()); + self.file_system.write().await.set(uri.clone(), content.clone()); } if let Some(diagnostics) = worker.run_diagnostic_on_change(&uri, content.as_deref()).await { @@ -545,7 +545,7 @@ impl LanguageServer for Backend { let content = params.text_document.text; - self.file_system.write().await.set(&uri, content.clone()); + self.file_system.write().await.set(uri.clone(), content.clone()); if let Some(diagnostics) = worker.run_diagnostic(&uri, Some(&content)).await { self.client @@ -566,7 +566,7 @@ impl LanguageServer for Backend { }; self.file_system.write().await.remove(uri); - worker.remove_diagnostics(¶ms.text_document.uri).await; + worker.remove_uri_cache(¶ms.text_document.uri).await; } /// It will return code actions or commands for the given range. diff --git a/crates/oxc_language_server/src/capabilities.rs b/crates/oxc_language_server/src/capabilities.rs index e2073d99c2b22..8d49086cad33a 100644 --- a/crates/oxc_language_server/src/capabilities.rs +++ b/crates/oxc_language_server/src/capabilities.rs @@ -1,10 +1,10 @@ -use tower_lsp_server::lsp_types::{ +use tower_lsp_server::ls_types::{ ClientCapabilities, OneOf, SaveOptions, ServerCapabilities, TextDocumentSyncCapability, TextDocumentSyncKind, TextDocumentSyncOptions, TextDocumentSyncSaveOptions, WorkspaceFoldersServerCapabilities, WorkspaceServerCapabilities, }; -#[derive(Clone, Default)] +#[derive(Default)] pub struct Capabilities { pub workspace_apply_edit: bool, pub workspace_configuration: bool, @@ -52,7 +52,7 @@ pub fn server_capabilities() -> ServerCapabilities { #[cfg(test)] mod test { - use tower_lsp_server::lsp_types::{ + use tower_lsp_server::ls_types::{ ClientCapabilities, DidChangeWatchedFilesClientCapabilities, WorkspaceClientCapabilities, }; diff --git a/crates/oxc_language_server/src/file_system.rs b/crates/oxc_language_server/src/file_system.rs index 66df02cce693d..4fdfc100ddca5 100644 --- a/crates/oxc_language_server/src/file_system.rs +++ b/crates/oxc_language_server/src/file_system.rs @@ -1,4 +1,4 @@ -use tower_lsp_server::lsp_types::Uri; +use tower_lsp_server::ls_types::Uri; use crate::ConcurrentHashMap; @@ -12,8 +12,8 @@ impl LSPFileSystem { self.files.pin().clear(); } - pub fn set(&self, uri: &Uri, content: String) { - self.files.pin().insert(uri.clone(), content); + pub fn set(&self, uri: Uri, content: String) { + self.files.pin().insert(uri, content); } pub fn get(&self, uri: &Uri) -> Option { diff --git a/crates/oxc_language_server/src/formatter/server_formatter.rs b/crates/oxc_language_server/src/formatter/server_formatter.rs index 01dfd7cb5d298..89537e06040c1 100644 --- a/crates/oxc_language_server/src/formatter/server_formatter.rs +++ b/crates/oxc_language_server/src/formatter/server_formatter.rs @@ -5,14 +5,11 @@ use log::{debug, warn}; use oxc_allocator::Allocator; use oxc_data_structures::rope::{Rope, get_line_column}; use oxc_formatter::{ - FormatOptions, Formatter, Oxfmtrc, enable_jsx_source_type, get_parse_options, + FormatOptions, Formatter, OxfmtOptions, Oxfmtrc, enable_jsx_source_type, get_parse_options, get_supported_source_type, }; use oxc_parser::Parser; -use tower_lsp_server::{ - UriExt, - lsp_types::{Pattern, Position, Range, ServerCapabilities, TextEdit, Uri}, -}; +use tower_lsp_server::ls_types::{Pattern, Position, Range, ServerCapabilities, TextEdit, Uri}; use crate::{ formatter::{FORMAT_CONFIG_FILES, options::FormatOptions as LSPFormatOptions}, @@ -40,12 +37,10 @@ impl ServerFormatterBuilder { } let root_path = root_uri.to_file_path().unwrap(); let oxfmtrc = Self::get_config(&root_path, options.config_path.as_ref()); + let (format_options, oxfmt_options) = Self::get_options(oxfmtrc); let gitignore_glob = if options.experimental { - match Self::create_ignore_globs( - &root_path, - oxfmtrc.ignore_patterns.as_deref().unwrap_or(&[]), - ) { + match Self::create_ignore_globs(&root_path, &oxfmt_options.ignore_patterns) { Ok(glob) => Some(glob), Err(err) => { warn!( @@ -58,18 +53,14 @@ impl ServerFormatterBuilder { None }; - ServerFormatter::new( - Self::get_format_options(oxfmtrc), - options.experimental, - gitignore_glob, - ) + ServerFormatter::new(format_options, options.experimental, gitignore_glob) } } impl ToolBuilder for ServerFormatterBuilder { fn server_capabilities(&self, capabilities: &mut ServerCapabilities) { capabilities.document_formatting_provider = - Some(tower_lsp_server::lsp_types::OneOf::Left(true)); + Some(tower_lsp_server::ls_types::OneOf::Left(true)); } fn build_boxed(&self, root_uri: &Uri, options: serde_json::Value) -> Box { Box::new(ServerFormatterBuilder::build(root_uri, options)) @@ -93,12 +84,12 @@ impl ServerFormatterBuilder { Oxfmtrc::default() } } - fn get_format_options(oxfmtrc: Oxfmtrc) -> FormatOptions { - match oxfmtrc.into_format_options() { - Ok(options) => options, + fn get_options(oxfmtrc: Oxfmtrc) -> (FormatOptions, OxfmtOptions) { + match oxfmtrc.into_options() { + Ok(opts) => opts, Err(err) => { warn!("Failed to parse oxfmtrc config: {err}, fallback to default config"); - FormatOptions::default() + (FormatOptions::default(), OxfmtOptions::default()) } } } @@ -380,7 +371,7 @@ mod tests_builder { #[test] fn test_server_capabilities() { - use tower_lsp_server::lsp_types::{OneOf, ServerCapabilities}; + use tower_lsp_server::ls_types::{OneOf, ServerCapabilities}; let builder = ServerFormatterBuilder; let mut capabilities = ServerCapabilities::default(); diff --git a/crates/oxc_language_server/src/formatter/tester.rs b/crates/oxc_language_server/src/formatter/tester.rs index 037ab55c7e1d1..585d250ea5b1f 100644 --- a/crates/oxc_language_server/src/formatter/tester.rs +++ b/crates/oxc_language_server/src/formatter/tester.rs @@ -1,9 +1,6 @@ use std::{fmt::Write, path::PathBuf}; -use tower_lsp_server::{ - UriExt, - lsp_types::{TextEdit, Uri}, -}; +use tower_lsp_server::ls_types::{TextEdit, Uri}; use crate::{ ToolRestartChanges, diff --git a/crates/oxc_language_server/src/lib.rs b/crates/oxc_language_server/src/lib.rs index ba1ef900a7339..aee925815d18a 100644 --- a/crates/oxc_language_server/src/lib.rs +++ b/crates/oxc_language_server/src/lib.rs @@ -1,5 +1,5 @@ use rustc_hash::FxBuildHasher; -use tower_lsp_server::{LspService, Server, lsp_types::ServerInfo}; +use tower_lsp_server::{LspService, Server, ls_types::ServerInfo}; mod backend; mod capabilities; diff --git a/crates/oxc_language_server/src/linter/code_actions.rs b/crates/oxc_language_server/src/linter/code_actions.rs index e6e25c5e01110..c0fa742ce7c36 100644 --- a/crates/oxc_language_server/src/linter/code_actions.rs +++ b/crates/oxc_language_server/src/linter/code_actions.rs @@ -1,5 +1,5 @@ use log::debug; -use tower_lsp_server::lsp_types::{CodeAction, CodeActionKind, TextEdit, Uri, WorkspaceEdit}; +use tower_lsp_server::ls_types::{CodeAction, CodeActionKind, TextEdit, Uri, WorkspaceEdit}; use crate::linter::error_with_position::{FixedContent, LinterCodeAction}; diff --git a/crates/oxc_language_server/src/linter/error_with_position.rs b/crates/oxc_language_server/src/linter/error_with_position.rs index f76ba0630ea4a..1851d68f42e50 100644 --- a/crates/oxc_language_server/src/linter/error_with_position.rs +++ b/crates/oxc_language_server/src/linter/error_with_position.rs @@ -1,6 +1,6 @@ -use std::{borrow::Cow, str::FromStr}; +use std::borrow::Cow; -use tower_lsp_server::lsp_types::{ +use tower_lsp_server::ls_types::{ self, CodeDescription, Diagnostic, DiagnosticRelatedInformation, DiagnosticSeverity, NumberOrString, Position, Range, Uri, }; @@ -38,8 +38,8 @@ pub fn message_to_lsp_diagnostic( rope: &Rope, ) -> DiagnosticReport { let severity = match message.error.severity { - Severity::Error => Some(lsp_types::DiagnosticSeverity::ERROR), - _ => Some(lsp_types::DiagnosticSeverity::WARNING), + Severity::Error => Some(ls_types::DiagnosticSeverity::ERROR), + _ => Some(ls_types::DiagnosticSeverity::WARNING), }; let related_information = message.error.labels.as_ref().map(|spans| { @@ -51,10 +51,10 @@ pub fn message_to_lsp_diagnostic( let end_position = offset_to_position(rope, offset + span.len() as u32, source_text); - lsp_types::DiagnosticRelatedInformation { - location: lsp_types::Location { + ls_types::DiagnosticRelatedInformation { + location: ls_types::Location { uri: uri.clone(), - range: lsp_types::Range::new(start_position, end_position), + range: ls_types::Range::new(start_position, end_position), }, message: span .label() @@ -73,7 +73,8 @@ pub fn message_to_lsp_diagnostic( .error .url .as_ref() - .map(|url| CodeDescription { href: Uri::from_str(url).ok().unwrap() }); + .and_then(|url| url.parse().ok()) + .map(|href| CodeDescription { href }); let diagnostic_message = match &message.error.help { Some(help) => { @@ -187,7 +188,7 @@ pub fn generate_inverted_diagnostics( continue; }; let related_information = Some(vec![DiagnosticRelatedInformation { - location: lsp_types::Location { uri: uri.clone(), range: d.diagnostic.range }, + location: ls_types::Location { uri: uri.clone(), range: d.diagnostic.range }, message: "original diagnostic".to_string(), }]); for r in related_info { diff --git a/crates/oxc_language_server/src/linter/isolated_lint_handler.rs b/crates/oxc_language_server/src/linter/isolated_lint_handler.rs index fc60fa5b1dae7..03dda7d0aed6f 100644 --- a/crates/oxc_language_server/src/linter/isolated_lint_handler.rs +++ b/crates/oxc_language_server/src/linter/isolated_lint_handler.rs @@ -6,7 +6,7 @@ use std::{ use log::{debug, warn}; use oxc_data_structures::rope::Rope; use rustc_hash::FxHashSet; -use tower_lsp_server::{UriExt, lsp_types::Uri}; +use tower_lsp_server::ls_types::Uri; use oxc_allocator::Allocator; use oxc_linter::{ diff --git a/crates/oxc_language_server/src/linter/server_linter.rs b/crates/oxc_language_server/src/linter/server_linter.rs index 23f64e0611144..30dbcc0c1a0a0 100644 --- a/crates/oxc_language_server/src/linter/server_linter.rs +++ b/crates/oxc_language_server/src/linter/server_linter.rs @@ -1,14 +1,12 @@ use std::path::{Path, PathBuf}; -use std::str::FromStr; use std::sync::Arc; use ignore::gitignore::Gitignore; use log::{debug, warn}; use rustc_hash::{FxBuildHasher, FxHashMap, FxHashSet}; use tower_lsp_server::{ - UriExt, jsonrpc::ErrorCode, - lsp_types::{ + ls_types::{ CodeActionKind, CodeActionOptions, CodeActionOrCommand, CodeActionProviderCapability, Diagnostic, ExecuteCommandOptions, Pattern, Range, ServerCapabilities, Uri, WorkDoneProgressOptions, WorkspaceEdit, @@ -428,7 +426,7 @@ impl Tool for ServerLinter { } let args = FixAllCommandArgs::try_from(arguments).map_err(|_| ErrorCode::InvalidParams)?; - let uri = Uri::from_str(&args.uri).map_err(|_| ErrorCode::InvalidParams)?; + let uri: Uri = args.uri.parse().map_err(|_| ErrorCode::InvalidParams)?; if !self.is_responsible_for_uri(&uri) { return Ok(None); @@ -458,7 +456,7 @@ impl Tool for ServerLinter { &self, uri: &Uri, range: &Range, - only_code_action_kinds: Option>, + only_code_action_kinds: Option<&Vec>, ) -> Vec { let actions = self.get_code_actions_for_uri(uri); @@ -525,7 +523,7 @@ impl Tool for ServerLinter { self.run_diagnostic(uri, content) } - fn remove_diagnostics(&self, uri: &Uri) { + fn remove_uri_cache(&self, uri: &Uri) { self.code_actions.pin().remove(uri); } } @@ -640,7 +638,7 @@ fn range_overlaps(a: Range, b: Range) -> bool { #[cfg(test)] mod tests_builder { - use tower_lsp_server::lsp_types::{ + use tower_lsp_server::ls_types::{ CodeActionKind, CodeActionOptions, CodeActionProviderCapability, ExecuteCommandOptions, ServerCapabilities, WorkDoneProgressOptions, }; @@ -959,13 +957,12 @@ mod test { #[test] fn test_frameworks() { - Tester::new("fixtures/linter/astro", json!({})) - .test_and_snapshot_single_file("debugger.astro"); - Tester::new("fixtures/linter/vue", json!({})).test_and_snapshot_single_file("debugger.vue"); - Tester::new("fixtures/linter/svelte", json!({})) - .test_and_snapshot_single_file("debugger.svelte"); - // ToDo: fix Tester to work only with Uris and do not access the file system - // Tester::new("fixtures/linter/nextjs").test_and_snapshot_single_file("%5B%5B..rest%5D%5D/debugger.ts"); + Tester::new("fixtures/linter/frameworks", json!({})).test_and_snapshot_multiple_file(&[ + "astro/debugger.astro", + "vue/debugger.vue", + "svelte/debugger.svelte", + "nextjs/[[..rest]]/debugger.ts", + ]); } #[test] diff --git a/crates/oxc_language_server/src/linter/snapshots/fixtures_linter_astro@debugger.astro.snap b/crates/oxc_language_server/src/linter/snapshots/fixtures_linter_astro@debugger.astro.snap deleted file mode 100644 index dbd34addf1e31..0000000000000 --- a/crates/oxc_language_server/src/linter/snapshots/fixtures_linter_astro@debugger.astro.snap +++ /dev/null @@ -1,266 +0,0 @@ ---- -source: crates/oxc_language_server/src/linter/tester.rs ---- -########## -file: fixtures/linter/astro/debugger.astro ----------- -########## Diagnostic Reports - -code: "eslint(no-debugger)" -code_description.href: "https://oxc.rs/docs/guide/usage/linter/rules/eslint/no-debugger.html" -message: "`debugger` statement is not allowed\nhelp: Remove the debugger statement" -range: Range { start: Position { line: 1, character: 0 }, end: Position { line: 1, character: 8 } } -related_information[0].message: "" -related_information[0].location.uri: "file:///fixtures/linter/astro/debugger.astro" -related_information[0].location.range: Range { start: Position { line: 1, character: 0 }, end: Position { line: 1, character: 8 } } -severity: Some(Warning) -source: Some("oxc") -tags: None - -code: "eslint(no-debugger)" -code_description.href: "https://oxc.rs/docs/guide/usage/linter/rules/eslint/no-debugger.html" -message: "`debugger` statement is not allowed\nhelp: Remove the debugger statement" -range: Range { start: Position { line: 10, character: 2 }, end: Position { line: 10, character: 10 } } -related_information[0].message: "" -related_information[0].location.uri: "file:///fixtures/linter/astro/debugger.astro" -related_information[0].location.range: Range { start: Position { line: 10, character: 2 }, end: Position { line: 10, character: 10 } } -severity: Some(Warning) -source: Some("oxc") -tags: None - -code: "eslint(no-debugger)" -code_description.href: "https://oxc.rs/docs/guide/usage/linter/rules/eslint/no-debugger.html" -message: "`debugger` statement is not allowed\nhelp: Remove the debugger statement" -range: Range { start: Position { line: 14, character: 2 }, end: Position { line: 14, character: 10 } } -related_information[0].message: "" -related_information[0].location.uri: "file:///fixtures/linter/astro/debugger.astro" -related_information[0].location.range: Range { start: Position { line: 14, character: 2 }, end: Position { line: 14, character: 10 } } -severity: Some(Warning) -source: Some("oxc") -tags: None - -code: "eslint(no-debugger)" -code_description.href: "https://oxc.rs/docs/guide/usage/linter/rules/eslint/no-debugger.html" -message: "`debugger` statement is not allowed\nhelp: Remove the debugger statement" -range: Range { start: Position { line: 18, character: 2 }, end: Position { line: 18, character: 10 } } -related_information[0].message: "" -related_information[0].location.uri: "file:///fixtures/linter/astro/debugger.astro" -related_information[0].location.range: Range { start: Position { line: 18, character: 2 }, end: Position { line: 18, character: 10 } } -severity: Some(Warning) -source: Some("oxc") -tags: None -########### Code Actions/Commands -CodeAction: -Title: Remove the debugger statement -Is Preferred: Some(true) -TextEdit: TextEdit { - range: Range { - start: Position { - line: 1, - character: 0, - }, - end: Position { - line: 1, - character: 8, - }, - }, - new_text: "", -} - - -CodeAction: -Title: Disable no-debugger for this line -Is Preferred: Some(false) -TextEdit: TextEdit { - range: Range { - start: Position { - line: 1, - character: 0, - }, - end: Position { - line: 1, - character: 0, - }, - }, - new_text: "// oxlint-disable-next-line no-debugger\n", -} - - -CodeAction: -Title: Disable no-debugger for this whole file -Is Preferred: Some(false) -TextEdit: TextEdit { - range: Range { - start: Position { - line: 1, - character: 0, - }, - end: Position { - line: 1, - character: 0, - }, - }, - new_text: "// oxlint-disable no-debugger\n", -} - - -CodeAction: -Title: Remove the debugger statement -Is Preferred: Some(true) -TextEdit: TextEdit { - range: Range { - start: Position { - line: 10, - character: 2, - }, - end: Position { - line: 10, - character: 10, - }, - }, - new_text: "", -} - - -CodeAction: -Title: Disable no-debugger for this line -Is Preferred: Some(false) -TextEdit: TextEdit { - range: Range { - start: Position { - line: 10, - character: 0, - }, - end: Position { - line: 10, - character: 0, - }, - }, - new_text: " // oxlint-disable-next-line no-debugger\n", -} - - -CodeAction: -Title: Disable no-debugger for this whole file -Is Preferred: Some(false) -TextEdit: TextEdit { - range: Range { - start: Position { - line: 10, - character: 0, - }, - end: Position { - line: 10, - character: 0, - }, - }, - new_text: "// oxlint-disable no-debugger\n", -} - - -CodeAction: -Title: Remove the debugger statement -Is Preferred: Some(true) -TextEdit: TextEdit { - range: Range { - start: Position { - line: 14, - character: 2, - }, - end: Position { - line: 14, - character: 10, - }, - }, - new_text: "", -} - - -CodeAction: -Title: Disable no-debugger for this line -Is Preferred: Some(false) -TextEdit: TextEdit { - range: Range { - start: Position { - line: 14, - character: 0, - }, - end: Position { - line: 14, - character: 0, - }, - }, - new_text: " // oxlint-disable-next-line no-debugger\n", -} - - -CodeAction: -Title: Disable no-debugger for this whole file -Is Preferred: Some(false) -TextEdit: TextEdit { - range: Range { - start: Position { - line: 14, - character: 0, - }, - end: Position { - line: 14, - character: 0, - }, - }, - new_text: "// oxlint-disable no-debugger\n", -} - - -CodeAction: -Title: Remove the debugger statement -Is Preferred: Some(true) -TextEdit: TextEdit { - range: Range { - start: Position { - line: 18, - character: 2, - }, - end: Position { - line: 18, - character: 10, - }, - }, - new_text: "", -} - - -CodeAction: -Title: Disable no-debugger for this line -Is Preferred: Some(false) -TextEdit: TextEdit { - range: Range { - start: Position { - line: 18, - character: 0, - }, - end: Position { - line: 18, - character: 0, - }, - }, - new_text: " // oxlint-disable-next-line no-debugger\n", -} - - -CodeAction: -Title: Disable no-debugger for this whole file -Is Preferred: Some(false) -TextEdit: TextEdit { - range: Range { - start: Position { - line: 18, - character: 0, - }, - end: Position { - line: 18, - character: 0, - }, - }, - new_text: "// oxlint-disable no-debugger\n", -} diff --git a/crates/oxc_language_server/src/linter/snapshots/fixtures_linter_frameworks@astro__debugger.astro_vue__debugger.vue_svelte__debugger.svelte_nextjs__[[..rest]]__debugger.ts.snap b/crates/oxc_language_server/src/linter/snapshots/fixtures_linter_frameworks@astro__debugger.astro_vue__debugger.vue_svelte__debugger.svelte_nextjs__[[..rest]]__debugger.ts.snap new file mode 100644 index 0000000000000..f393e6fd1c374 --- /dev/null +++ b/crates/oxc_language_server/src/linter/snapshots/fixtures_linter_frameworks@astro__debugger.astro_vue__debugger.vue_svelte__debugger.svelte_nextjs__[[..rest]]__debugger.ts.snap @@ -0,0 +1,635 @@ +--- +source: crates/oxc_language_server/src/linter/tester.rs +--- +########## +file: fixtures/linter/frameworks/astro/debugger.astro +---------- +########## Diagnostic Reports + +code: "eslint(no-debugger)" +code_description.href: "https://oxc.rs/docs/guide/usage/linter/rules/eslint/no-debugger.html" +message: "`debugger` statement is not allowed\nhelp: Remove the debugger statement" +range: Range { start: Position { line: 1, character: 0 }, end: Position { line: 1, character: 8 } } +related_information[0].message: "" +related_information[0].location.uri: "file:///fixtures/linter/frameworks/astro/debugger.astro" +related_information[0].location.range: Range { start: Position { line: 1, character: 0 }, end: Position { line: 1, character: 8 } } +severity: Some(Warning) +source: Some("oxc") +tags: None + +code: "eslint(no-debugger)" +code_description.href: "https://oxc.rs/docs/guide/usage/linter/rules/eslint/no-debugger.html" +message: "`debugger` statement is not allowed\nhelp: Remove the debugger statement" +range: Range { start: Position { line: 10, character: 2 }, end: Position { line: 10, character: 10 } } +related_information[0].message: "" +related_information[0].location.uri: "file:///fixtures/linter/frameworks/astro/debugger.astro" +related_information[0].location.range: Range { start: Position { line: 10, character: 2 }, end: Position { line: 10, character: 10 } } +severity: Some(Warning) +source: Some("oxc") +tags: None + +code: "eslint(no-debugger)" +code_description.href: "https://oxc.rs/docs/guide/usage/linter/rules/eslint/no-debugger.html" +message: "`debugger` statement is not allowed\nhelp: Remove the debugger statement" +range: Range { start: Position { line: 14, character: 2 }, end: Position { line: 14, character: 10 } } +related_information[0].message: "" +related_information[0].location.uri: "file:///fixtures/linter/frameworks/astro/debugger.astro" +related_information[0].location.range: Range { start: Position { line: 14, character: 2 }, end: Position { line: 14, character: 10 } } +severity: Some(Warning) +source: Some("oxc") +tags: None + +code: "eslint(no-debugger)" +code_description.href: "https://oxc.rs/docs/guide/usage/linter/rules/eslint/no-debugger.html" +message: "`debugger` statement is not allowed\nhelp: Remove the debugger statement" +range: Range { start: Position { line: 18, character: 2 }, end: Position { line: 18, character: 10 } } +related_information[0].message: "" +related_information[0].location.uri: "file:///fixtures/linter/frameworks/astro/debugger.astro" +related_information[0].location.range: Range { start: Position { line: 18, character: 2 }, end: Position { line: 18, character: 10 } } +severity: Some(Warning) +source: Some("oxc") +tags: None +########### Code Actions/Commands +CodeAction: +Title: Remove the debugger statement +Is Preferred: Some(true) +TextEdit: TextEdit { + range: Range { + start: Position { + line: 1, + character: 0, + }, + end: Position { + line: 1, + character: 8, + }, + }, + new_text: "", +} + + +CodeAction: +Title: Disable no-debugger for this line +Is Preferred: Some(false) +TextEdit: TextEdit { + range: Range { + start: Position { + line: 1, + character: 0, + }, + end: Position { + line: 1, + character: 0, + }, + }, + new_text: "// oxlint-disable-next-line no-debugger\n", +} + + +CodeAction: +Title: Disable no-debugger for this whole file +Is Preferred: Some(false) +TextEdit: TextEdit { + range: Range { + start: Position { + line: 1, + character: 0, + }, + end: Position { + line: 1, + character: 0, + }, + }, + new_text: "// oxlint-disable no-debugger\n", +} + + +CodeAction: +Title: Remove the debugger statement +Is Preferred: Some(true) +TextEdit: TextEdit { + range: Range { + start: Position { + line: 10, + character: 2, + }, + end: Position { + line: 10, + character: 10, + }, + }, + new_text: "", +} + + +CodeAction: +Title: Disable no-debugger for this line +Is Preferred: Some(false) +TextEdit: TextEdit { + range: Range { + start: Position { + line: 10, + character: 0, + }, + end: Position { + line: 10, + character: 0, + }, + }, + new_text: " // oxlint-disable-next-line no-debugger\n", +} + + +CodeAction: +Title: Disable no-debugger for this whole file +Is Preferred: Some(false) +TextEdit: TextEdit { + range: Range { + start: Position { + line: 10, + character: 0, + }, + end: Position { + line: 10, + character: 0, + }, + }, + new_text: "// oxlint-disable no-debugger\n", +} + + +CodeAction: +Title: Remove the debugger statement +Is Preferred: Some(true) +TextEdit: TextEdit { + range: Range { + start: Position { + line: 14, + character: 2, + }, + end: Position { + line: 14, + character: 10, + }, + }, + new_text: "", +} + + +CodeAction: +Title: Disable no-debugger for this line +Is Preferred: Some(false) +TextEdit: TextEdit { + range: Range { + start: Position { + line: 14, + character: 0, + }, + end: Position { + line: 14, + character: 0, + }, + }, + new_text: " // oxlint-disable-next-line no-debugger\n", +} + + +CodeAction: +Title: Disable no-debugger for this whole file +Is Preferred: Some(false) +TextEdit: TextEdit { + range: Range { + start: Position { + line: 14, + character: 0, + }, + end: Position { + line: 14, + character: 0, + }, + }, + new_text: "// oxlint-disable no-debugger\n", +} + + +CodeAction: +Title: Remove the debugger statement +Is Preferred: Some(true) +TextEdit: TextEdit { + range: Range { + start: Position { + line: 18, + character: 2, + }, + end: Position { + line: 18, + character: 10, + }, + }, + new_text: "", +} + + +CodeAction: +Title: Disable no-debugger for this line +Is Preferred: Some(false) +TextEdit: TextEdit { + range: Range { + start: Position { + line: 18, + character: 0, + }, + end: Position { + line: 18, + character: 0, + }, + }, + new_text: " // oxlint-disable-next-line no-debugger\n", +} + + +CodeAction: +Title: Disable no-debugger for this whole file +Is Preferred: Some(false) +TextEdit: TextEdit { + range: Range { + start: Position { + line: 18, + character: 0, + }, + end: Position { + line: 18, + character: 0, + }, + }, + new_text: "// oxlint-disable no-debugger\n", +} + + +########## +file: fixtures/linter/frameworks/vue/debugger.vue +---------- +########## Diagnostic Reports + +code: "eslint(no-debugger)" +code_description.href: "https://oxc.rs/docs/guide/usage/linter/rules/eslint/no-debugger.html" +message: "`debugger` statement is not allowed\nhelp: Remove the debugger statement" +range: Range { start: Position { line: 4, character: 8 }, end: Position { line: 4, character: 17 } } +related_information[0].message: "" +related_information[0].location.uri: "file:///fixtures/linter/frameworks/vue/debugger.vue" +related_information[0].location.range: Range { start: Position { line: 4, character: 8 }, end: Position { line: 4, character: 17 } } +severity: Some(Warning) +source: Some("oxc") +tags: None + +code: "eslint(no-debugger)" +code_description.href: "https://oxc.rs/docs/guide/usage/linter/rules/eslint/no-debugger.html" +message: "`debugger` statement is not allowed\nhelp: Remove the debugger statement" +range: Range { start: Position { line: 8, character: 4 }, end: Position { line: 8, character: 13 } } +related_information[0].message: "" +related_information[0].location.uri: "file:///fixtures/linter/frameworks/vue/debugger.vue" +related_information[0].location.range: Range { start: Position { line: 8, character: 4 }, end: Position { line: 8, character: 13 } } +severity: Some(Warning) +source: Some("oxc") +tags: None +########### Code Actions/Commands +CodeAction: +Title: Remove the debugger statement +Is Preferred: Some(true) +TextEdit: TextEdit { + range: Range { + start: Position { + line: 4, + character: 8, + }, + end: Position { + line: 4, + character: 17, + }, + }, + new_text: "", +} + + +CodeAction: +Title: Disable no-debugger for this line +Is Preferred: Some(false) +TextEdit: TextEdit { + range: Range { + start: Position { + line: 4, + character: 8, + }, + end: Position { + line: 4, + character: 8, + }, + }, + new_text: "\n// oxlint-disable-next-line no-debugger\n", +} + + +CodeAction: +Title: Disable no-debugger for this whole file +Is Preferred: Some(false) +TextEdit: TextEdit { + range: Range { + start: Position { + line: 4, + character: 8, + }, + end: Position { + line: 4, + character: 8, + }, + }, + new_text: "\n// oxlint-disable no-debugger\n", +} + + +CodeAction: +Title: Remove the debugger statement +Is Preferred: Some(true) +TextEdit: TextEdit { + range: Range { + start: Position { + line: 8, + character: 4, + }, + end: Position { + line: 8, + character: 13, + }, + }, + new_text: "", +} + + +CodeAction: +Title: Disable no-debugger for this line +Is Preferred: Some(false) +TextEdit: TextEdit { + range: Range { + start: Position { + line: 8, + character: 0, + }, + end: Position { + line: 8, + character: 0, + }, + }, + new_text: " // oxlint-disable-next-line no-debugger\n", +} + + +CodeAction: +Title: Disable no-debugger for this whole file +Is Preferred: Some(false) +TextEdit: TextEdit { + range: Range { + start: Position { + line: 7, + character: 0, + }, + end: Position { + line: 7, + character: 0, + }, + }, + new_text: "// oxlint-disable no-debugger\n", +} + + +########## +file: fixtures/linter/frameworks/svelte/debugger.svelte +---------- +########## Diagnostic Reports + +code: "eslint(no-unassigned-vars)" +code_description.href: "https://oxc.rs/docs/guide/usage/linter/rules/eslint/no-unassigned-vars.html" +message: "'title' is always 'undefined' because it's never assigned.\nhelp: Variable declared without assignment. Either assign a value or remove the declaration." +range: Range { start: Position { line: 3, character: 12 }, end: Position { line: 3, character: 17 } } +related_information[0].message: "" +related_information[0].location.uri: "file:///fixtures/linter/frameworks/svelte/debugger.svelte" +related_information[0].location.range: Range { start: Position { line: 3, character: 12 }, end: Position { line: 3, character: 17 } } +severity: Some(Warning) +source: Some("oxc") +tags: None + +code: "eslint(no-unassigned-vars)" +code_description.href: "https://oxc.rs/docs/guide/usage/linter/rules/eslint/no-unassigned-vars.html" +message: "'person' is always 'undefined' because it's never assigned.\nhelp: Variable declared without assignment. Either assign a value or remove the declaration." +range: Range { start: Position { line: 4, character: 12 }, end: Position { line: 4, character: 18 } } +related_information[0].message: "" +related_information[0].location.uri: "file:///fixtures/linter/frameworks/svelte/debugger.svelte" +related_information[0].location.range: Range { start: Position { line: 4, character: 12 }, end: Position { line: 4, character: 18 } } +severity: Some(Warning) +source: Some("oxc") +tags: None + +code: "eslint(no-debugger)" +code_description.href: "https://oxc.rs/docs/guide/usage/linter/rules/eslint/no-debugger.html" +message: "`debugger` statement is not allowed\nhelp: Remove the debugger statement" +range: Range { start: Position { line: 1, character: 1 }, end: Position { line: 1, character: 10 } } +related_information[0].message: "" +related_information[0].location.uri: "file:///fixtures/linter/frameworks/svelte/debugger.svelte" +related_information[0].location.range: Range { start: Position { line: 1, character: 1 }, end: Position { line: 1, character: 10 } } +severity: Some(Warning) +source: Some("oxc") +tags: None +########### Code Actions/Commands +CodeAction: +Title: Disable no-unassigned-vars for this line +Is Preferred: Some(true) +TextEdit: TextEdit { + range: Range { + start: Position { + line: 3, + character: 0, + }, + end: Position { + line: 3, + character: 0, + }, + }, + new_text: "\t// oxlint-disable-next-line no-unassigned-vars\n", +} + + +CodeAction: +Title: Disable no-unassigned-vars for this whole file +Is Preferred: Some(false) +TextEdit: TextEdit { + range: Range { + start: Position { + line: 1, + character: 0, + }, + end: Position { + line: 1, + character: 0, + }, + }, + new_text: "// oxlint-disable no-unassigned-vars\n", +} + + +CodeAction: +Title: Disable no-unassigned-vars for this line +Is Preferred: Some(true) +TextEdit: TextEdit { + range: Range { + start: Position { + line: 4, + character: 0, + }, + end: Position { + line: 4, + character: 0, + }, + }, + new_text: "\t// oxlint-disable-next-line no-unassigned-vars\n", +} + + +CodeAction: +Title: Disable no-unassigned-vars for this whole file +Is Preferred: Some(false) +TextEdit: TextEdit { + range: Range { + start: Position { + line: 1, + character: 0, + }, + end: Position { + line: 1, + character: 0, + }, + }, + new_text: "// oxlint-disable no-unassigned-vars\n", +} + + +CodeAction: +Title: Remove the debugger statement +Is Preferred: Some(true) +TextEdit: TextEdit { + range: Range { + start: Position { + line: 1, + character: 1, + }, + end: Position { + line: 1, + character: 10, + }, + }, + new_text: "", +} + + +CodeAction: +Title: Disable no-debugger for this line +Is Preferred: Some(false) +TextEdit: TextEdit { + range: Range { + start: Position { + line: 1, + character: 0, + }, + end: Position { + line: 1, + character: 0, + }, + }, + new_text: "\t// oxlint-disable-next-line no-debugger\n", +} + + +CodeAction: +Title: Disable no-debugger for this whole file +Is Preferred: Some(false) +TextEdit: TextEdit { + range: Range { + start: Position { + line: 1, + character: 0, + }, + end: Position { + line: 1, + character: 0, + }, + }, + new_text: "// oxlint-disable no-debugger\n", +} + + +########## +file: fixtures/linter/frameworks/nextjs/[[..rest]]/debugger.ts +---------- +########## Diagnostic Reports + +code: "eslint(no-debugger)" +code_description.href: "https://oxc.rs/docs/guide/usage/linter/rules/eslint/no-debugger.html" +message: "`debugger` statement is not allowed\nhelp: Remove the debugger statement" +range: Range { start: Position { line: 0, character: 0 }, end: Position { line: 0, character: 9 } } +related_information[0].message: "" +related_information[0].location.uri: "file:///fixtures/linter/frameworks/nextjs/%5B%5B..rest%5D%5D/debugger.ts" +related_information[0].location.range: Range { start: Position { line: 0, character: 0 }, end: Position { line: 0, character: 9 } } +severity: Some(Warning) +source: Some("oxc") +tags: None +########### Code Actions/Commands +CodeAction: +Title: Remove the debugger statement +Is Preferred: Some(true) +TextEdit: TextEdit { + range: Range { + start: Position { + line: 0, + character: 0, + }, + end: Position { + line: 0, + character: 9, + }, + }, + new_text: "", +} + + +CodeAction: +Title: Disable no-debugger for this line +Is Preferred: Some(false) +TextEdit: TextEdit { + range: Range { + start: Position { + line: 0, + character: 0, + }, + end: Position { + line: 0, + character: 0, + }, + }, + new_text: "// oxlint-disable-next-line no-debugger\n", +} + + +CodeAction: +Title: Disable no-debugger for this whole file +Is Preferred: Some(false) +TextEdit: TextEdit { + range: Range { + start: Position { + line: 0, + character: 0, + }, + end: Position { + line: 0, + character: 0, + }, + }, + new_text: "// oxlint-disable no-debugger\n", +} diff --git a/crates/oxc_language_server/src/linter/snapshots/fixtures_linter_svelte@debugger.svelte.snap b/crates/oxc_language_server/src/linter/snapshots/fixtures_linter_svelte@debugger.svelte.snap deleted file mode 100644 index d978a469e40a1..0000000000000 --- a/crates/oxc_language_server/src/linter/snapshots/fixtures_linter_svelte@debugger.svelte.snap +++ /dev/null @@ -1,165 +0,0 @@ ---- -source: crates/oxc_language_server/src/linter/tester.rs ---- -########## -file: fixtures/linter/svelte/debugger.svelte ----------- -########## Diagnostic Reports - -code: "eslint(no-unassigned-vars)" -code_description.href: "https://oxc.rs/docs/guide/usage/linter/rules/eslint/no-unassigned-vars.html" -message: "'title' is always 'undefined' because it's never assigned.\nhelp: Variable declared without assignment. Either assign a value or remove the declaration." -range: Range { start: Position { line: 3, character: 12 }, end: Position { line: 3, character: 17 } } -related_information[0].message: "" -related_information[0].location.uri: "file:///fixtures/linter/svelte/debugger.svelte" -related_information[0].location.range: Range { start: Position { line: 3, character: 12 }, end: Position { line: 3, character: 17 } } -severity: Some(Warning) -source: Some("oxc") -tags: None - -code: "eslint(no-unassigned-vars)" -code_description.href: "https://oxc.rs/docs/guide/usage/linter/rules/eslint/no-unassigned-vars.html" -message: "'person' is always 'undefined' because it's never assigned.\nhelp: Variable declared without assignment. Either assign a value or remove the declaration." -range: Range { start: Position { line: 4, character: 12 }, end: Position { line: 4, character: 18 } } -related_information[0].message: "" -related_information[0].location.uri: "file:///fixtures/linter/svelte/debugger.svelte" -related_information[0].location.range: Range { start: Position { line: 4, character: 12 }, end: Position { line: 4, character: 18 } } -severity: Some(Warning) -source: Some("oxc") -tags: None - -code: "eslint(no-debugger)" -code_description.href: "https://oxc.rs/docs/guide/usage/linter/rules/eslint/no-debugger.html" -message: "`debugger` statement is not allowed\nhelp: Remove the debugger statement" -range: Range { start: Position { line: 1, character: 1 }, end: Position { line: 1, character: 10 } } -related_information[0].message: "" -related_information[0].location.uri: "file:///fixtures/linter/svelte/debugger.svelte" -related_information[0].location.range: Range { start: Position { line: 1, character: 1 }, end: Position { line: 1, character: 10 } } -severity: Some(Warning) -source: Some("oxc") -tags: None -########### Code Actions/Commands -CodeAction: -Title: Disable no-unassigned-vars for this line -Is Preferred: Some(true) -TextEdit: TextEdit { - range: Range { - start: Position { - line: 3, - character: 0, - }, - end: Position { - line: 3, - character: 0, - }, - }, - new_text: "\t// oxlint-disable-next-line no-unassigned-vars\n", -} - - -CodeAction: -Title: Disable no-unassigned-vars for this whole file -Is Preferred: Some(false) -TextEdit: TextEdit { - range: Range { - start: Position { - line: 1, - character: 0, - }, - end: Position { - line: 1, - character: 0, - }, - }, - new_text: "// oxlint-disable no-unassigned-vars\n", -} - - -CodeAction: -Title: Disable no-unassigned-vars for this line -Is Preferred: Some(true) -TextEdit: TextEdit { - range: Range { - start: Position { - line: 4, - character: 0, - }, - end: Position { - line: 4, - character: 0, - }, - }, - new_text: "\t// oxlint-disable-next-line no-unassigned-vars\n", -} - - -CodeAction: -Title: Disable no-unassigned-vars for this whole file -Is Preferred: Some(false) -TextEdit: TextEdit { - range: Range { - start: Position { - line: 1, - character: 0, - }, - end: Position { - line: 1, - character: 0, - }, - }, - new_text: "// oxlint-disable no-unassigned-vars\n", -} - - -CodeAction: -Title: Remove the debugger statement -Is Preferred: Some(true) -TextEdit: TextEdit { - range: Range { - start: Position { - line: 1, - character: 1, - }, - end: Position { - line: 1, - character: 10, - }, - }, - new_text: "", -} - - -CodeAction: -Title: Disable no-debugger for this line -Is Preferred: Some(false) -TextEdit: TextEdit { - range: Range { - start: Position { - line: 1, - character: 0, - }, - end: Position { - line: 1, - character: 0, - }, - }, - new_text: "\t// oxlint-disable-next-line no-debugger\n", -} - - -CodeAction: -Title: Disable no-debugger for this whole file -Is Preferred: Some(false) -TextEdit: TextEdit { - range: Range { - start: Position { - line: 1, - character: 0, - }, - end: Position { - line: 1, - character: 0, - }, - }, - new_text: "// oxlint-disable no-debugger\n", -} diff --git a/crates/oxc_language_server/src/linter/snapshots/fixtures_linter_vue@debugger.vue.snap b/crates/oxc_language_server/src/linter/snapshots/fixtures_linter_vue@debugger.vue.snap deleted file mode 100644 index 1de592f662cf7..0000000000000 --- a/crates/oxc_language_server/src/linter/snapshots/fixtures_linter_vue@debugger.vue.snap +++ /dev/null @@ -1,136 +0,0 @@ ---- -source: crates/oxc_language_server/src/linter/tester.rs ---- -########## -file: fixtures/linter/vue/debugger.vue ----------- -########## Diagnostic Reports - -code: "eslint(no-debugger)" -code_description.href: "https://oxc.rs/docs/guide/usage/linter/rules/eslint/no-debugger.html" -message: "`debugger` statement is not allowed\nhelp: Remove the debugger statement" -range: Range { start: Position { line: 4, character: 8 }, end: Position { line: 4, character: 17 } } -related_information[0].message: "" -related_information[0].location.uri: "file:///fixtures/linter/vue/debugger.vue" -related_information[0].location.range: Range { start: Position { line: 4, character: 8 }, end: Position { line: 4, character: 17 } } -severity: Some(Warning) -source: Some("oxc") -tags: None - -code: "eslint(no-debugger)" -code_description.href: "https://oxc.rs/docs/guide/usage/linter/rules/eslint/no-debugger.html" -message: "`debugger` statement is not allowed\nhelp: Remove the debugger statement" -range: Range { start: Position { line: 8, character: 4 }, end: Position { line: 8, character: 13 } } -related_information[0].message: "" -related_information[0].location.uri: "file:///fixtures/linter/vue/debugger.vue" -related_information[0].location.range: Range { start: Position { line: 8, character: 4 }, end: Position { line: 8, character: 13 } } -severity: Some(Warning) -source: Some("oxc") -tags: None -########### Code Actions/Commands -CodeAction: -Title: Remove the debugger statement -Is Preferred: Some(true) -TextEdit: TextEdit { - range: Range { - start: Position { - line: 4, - character: 8, - }, - end: Position { - line: 4, - character: 17, - }, - }, - new_text: "", -} - - -CodeAction: -Title: Disable no-debugger for this line -Is Preferred: Some(false) -TextEdit: TextEdit { - range: Range { - start: Position { - line: 4, - character: 8, - }, - end: Position { - line: 4, - character: 8, - }, - }, - new_text: "\n// oxlint-disable-next-line no-debugger\n", -} - - -CodeAction: -Title: Disable no-debugger for this whole file -Is Preferred: Some(false) -TextEdit: TextEdit { - range: Range { - start: Position { - line: 4, - character: 8, - }, - end: Position { - line: 4, - character: 8, - }, - }, - new_text: "\n// oxlint-disable no-debugger\n", -} - - -CodeAction: -Title: Remove the debugger statement -Is Preferred: Some(true) -TextEdit: TextEdit { - range: Range { - start: Position { - line: 8, - character: 4, - }, - end: Position { - line: 8, - character: 13, - }, - }, - new_text: "", -} - - -CodeAction: -Title: Disable no-debugger for this line -Is Preferred: Some(false) -TextEdit: TextEdit { - range: Range { - start: Position { - line: 8, - character: 0, - }, - end: Position { - line: 8, - character: 0, - }, - }, - new_text: " // oxlint-disable-next-line no-debugger\n", -} - - -CodeAction: -Title: Disable no-debugger for this whole file -Is Preferred: Some(false) -TextEdit: TextEdit { - range: Range { - start: Position { - line: 7, - character: 0, - }, - end: Position { - line: 7, - character: 0, - }, - }, - new_text: "// oxlint-disable no-debugger\n", -} diff --git a/crates/oxc_language_server/src/linter/tester.rs b/crates/oxc_language_server/src/linter/tester.rs index bd5e3996746f5..72780575ffe96 100644 --- a/crates/oxc_language_server/src/linter/tester.rs +++ b/crates/oxc_language_server/src/linter/tester.rs @@ -1,11 +1,8 @@ use std::{fmt::Write, path::PathBuf}; -use tower_lsp_server::{ - UriExt, - lsp_types::{ - CodeAction, CodeActionOrCommand, CodeDescription, Diagnostic, NumberOrString, Position, - Range, Uri, - }, +use tower_lsp_server::ls_types::{ + CodeAction, CodeActionOrCommand, CodeDescription, Diagnostic, NumberOrString, Position, Range, + Uri, }; use crate::{ diff --git a/crates/oxc_language_server/src/options.rs b/crates/oxc_language_server/src/options.rs index 60ee0c55153b7..f68da5fb42a5f 100644 --- a/crates/oxc_language_server/src/options.rs +++ b/crates/oxc_language_server/src/options.rs @@ -1,7 +1,7 @@ use serde::{Deserialize, Serialize}; -use tower_lsp_server::lsp_types::Uri; +use tower_lsp_server::ls_types::Uri; -#[derive(Debug, Serialize, Deserialize, Clone)] +#[derive(Debug, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct WorkspaceOption { pub workspace_uri: Uri, diff --git a/crates/oxc_language_server/src/tests.rs b/crates/oxc_language_server/src/tests.rs index 267093db58b3d..4d79fe6b2ff9a 100644 --- a/crates/oxc_language_server/src/tests.rs +++ b/crates/oxc_language_server/src/tests.rs @@ -5,7 +5,7 @@ use tokio::io::{AsyncReadExt, AsyncWriteExt, DuplexStream}; use tower_lsp_server::{ Client, LspService, Server, jsonrpc::{ErrorCode, Id, Request, Response}, - lsp_types::*, + ls_types::*, }; use crate::{Tool, ToolBuilder, ToolRestartChanges, backend::Backend}; @@ -24,6 +24,8 @@ pub const FAKE_COMMAND: &str = "fake.command"; const WORKSPACE: &str = "file:///path/to/workspace"; +const WORKSPACE_2: &str = "file:///path/to/another_workspace"; + impl Tool for FakeTool { fn name(&self) -> &'static str { "FakeTool" @@ -73,7 +75,7 @@ impl Tool for FakeTool { fn get_watcher_patterns( &self, options: serde_json::Value, - ) -> Vec { + ) -> Vec { if !matches!(options, serde_json::Value::Null) { return vec![]; } @@ -108,7 +110,7 @@ impl Tool for FakeTool { &self, uri: &Uri, _range: &Range, - _only_code_action_kinds: Option>, + _only_code_action_kinds: Option<&Vec>, ) -> Vec { if uri.as_str().ends_with("code_action.config") { return vec![CodeActionOrCommand::CodeAction(CodeAction { @@ -295,17 +297,15 @@ impl TestServer { } } -fn initialize_request( +fn initialize_request_workspace_folders( workspace_configuration: bool, dynamic_watchers: bool, workspace_edit: bool, initialization_options: Option, + workspace_folders: Vec, ) -> Request { let params = InitializeParams { - workspace_folders: Some(vec![WorkspaceFolder { - uri: WORKSPACE.parse().unwrap(), - name: "workspace".to_string(), - }]), + workspace_folders: Some(workspace_folders), capabilities: ClientCapabilities { workspace: Some(WorkspaceClientCapabilities { apply_edit: Some(workspace_edit), @@ -327,6 +327,21 @@ fn initialize_request( Request::build("initialize").params(json!(params)).id(1).finish() } +fn initialize_request( + workspace_configuration: bool, + dynamic_watchers: bool, + workspace_edit: bool, + initialization_options: Option, +) -> Request { + initialize_request_workspace_folders( + workspace_configuration, + dynamic_watchers, + workspace_edit, + initialization_options, + vec![WorkspaceFolder { uri: WORKSPACE.parse().unwrap(), name: "workspace".to_string() }], + ) +} + fn initialized_notification() -> Request { let params = InitializedParams {}; @@ -472,7 +487,7 @@ mod test_suite { use serde_json::{Value, json}; use tower_lsp_server::{ jsonrpc::{Id, Response}, - lsp_types::{ + ls_types::{ ApplyWorkspaceEditResponse, InitializeResult, PublishDiagnosticsParams, ServerInfo, WorkspaceEdit, WorkspaceFolder, }, @@ -481,11 +496,12 @@ mod test_suite { use crate::{ backend::Backend, tests::{ - FAKE_COMMAND, FakeToolBuilder, TestServer, WORKSPACE, acknowledge_registrations, - acknowledge_unregistrations, code_action, did_change, did_change_configuration, - did_change_watched_files, did_close, did_open, did_save, execute_command_request, - initialize_request, initialized_notification, response_to_configuration, - shutdown_request, test_configuration_request, workspace_folders_changed, + FAKE_COMMAND, FakeToolBuilder, TestServer, WORKSPACE, WORKSPACE_2, + acknowledge_registrations, acknowledge_unregistrations, code_action, did_change, + did_change_configuration, did_change_watched_files, did_close, did_open, did_save, + execute_command_request, initialize_request, initialize_request_workspace_folders, + initialized_notification, response_to_configuration, shutdown_request, + test_configuration_request, workspace_folders_changed, }, }; @@ -741,6 +757,74 @@ mod test_suite { server.shutdown(4).await; } + #[tokio::test] + async fn test_initialize_with_options_and_multiple_workspace_folders() { + let init_options = json!([ + // correctly matches options to workspace folders regardless of order + { + "workspaceUri": WORKSPACE_2, + "options": { + "run": false, + "configPath": "./another_custom.json", + "fmt.experimental": false + } + }, + { + "workspaceUri": WORKSPACE, + "options": { + "run": true, + "configPath": "./custom.json", + "fmt.experimental": true + } + }, + ]); + + let mut server = TestServer::new_initialized( + |client| Backend::new(client, server_info(), vec![]), + initialize_request_workspace_folders( + false, + false, + false, + Some(init_options.clone()), + vec![ + WorkspaceFolder { + uri: WORKSPACE.parse().unwrap(), + name: "workspace".to_string(), + }, + WorkspaceFolder { + uri: WORKSPACE_2.parse().unwrap(), + name: "workspace_2".to_string(), + }, + ], + ), + ) + .await; + + server.send_request(test_configuration_request(2)).await; + let config_response = server.recv_response().await; + + assert!(config_response.is_ok()); + assert_eq!(config_response.id(), &Id::Number(2)); + assert_eq!( + *config_response.result().unwrap(), + json!([ + { + "run": true, + "configPath": "./custom.json", + "fmt.experimental": true + }, + { + "run": false, + "configPath": "./another_custom.json", + "fmt.experimental": false + } + ]) + ); + + // shutdown request + server.shutdown(3).await; + } + #[tokio::test] async fn test_execute_workspace_command_with_no_edit() { let mut server = TestServer::new_initialized( diff --git a/crates/oxc_language_server/src/tool.rs b/crates/oxc_language_server/src/tool.rs index 5667320e4546d..51c9b893fee6e 100644 --- a/crates/oxc_language_server/src/tool.rs +++ b/crates/oxc_language_server/src/tool.rs @@ -1,6 +1,6 @@ use tower_lsp_server::{ jsonrpc::ErrorCode, - lsp_types::{ + ls_types::{ CodeActionKind, CodeActionOrCommand, Diagnostic, Pattern, Range, ServerCapabilities, TextEdit, Uri, WorkspaceEdit, }, @@ -68,7 +68,7 @@ pub trait Tool: Send + Sync { &self, _uri: &Uri, _range: &Range, - _only_code_action_kinds: Option>, + _only_code_action_kinds: Option<&Vec>, ) -> Vec { Vec::new() } @@ -114,8 +114,8 @@ pub trait Tool: Send + Sync { None } - /// Remove diagnostics associated with the given URI. - fn remove_diagnostics(&self, _uri: &Uri) { + /// Remove internal cache for the given URI, if any. + fn remove_uri_cache(&self, _uri: &Uri) { // Default implementation does nothing. } diff --git a/crates/oxc_language_server/src/worker.rs b/crates/oxc_language_server/src/worker.rs index fc9ebaa97d40f..cfeb2caf23b5e 100644 --- a/crates/oxc_language_server/src/worker.rs +++ b/crates/oxc_language_server/src/worker.rs @@ -2,9 +2,8 @@ use log::debug; use serde_json::json; use tokio::sync::{Mutex, RwLock}; use tower_lsp_server::{ - UriExt, jsonrpc::ErrorCode, - lsp_types::{ + ls_types::{ CodeActionKind, CodeActionOrCommand, Diagnostic, DidChangeWatchedFilesRegistrationOptions, FileEvent, FileSystemWatcher, GlobPattern, OneOf, Range, Registration, RelativePattern, TextEdit, Unregistration, Uri, WatchKind, WorkspaceEdit, @@ -94,10 +93,10 @@ impl WorkspaceWorker { self.options.lock().await.is_none() } - /// Remove all diagnostics for the given URI - pub async fn remove_diagnostics(&self, uri: &Uri) { + /// Remove all internal cache for the given URI, if any. + pub async fn remove_uri_cache(&self, uri: &Uri) { self.tools.read().await.iter().for_each(|tool| { - tool.remove_diagnostics(uri); + tool.remove_uri_cache(uri); }); } @@ -202,7 +201,7 @@ impl WorkspaceWorker { actions.extend(tool.get_code_actions_or_commands( uri, range, - only_code_action_kinds.clone(), + only_code_action_kinds.as_ref(), )); } actions @@ -380,7 +379,7 @@ fn registration_tool_watcher_id(tool: &str, root_uri: &Uri, patterns: Vec( let arg_span = target_arg.span(); node_span.start >= arg_span.start && node_span.end <= arg_span.end } + +/// Determines if a semicolon is needed before inserting code that starts with +/// certain characters (`[`, `(`, `/`, `+`, `-`, `` ` ``) that could be misinterpreted +/// due to Automatic Semicolon Insertion (ASI) rules. +/// +/// Returns `true` if the node is at the start of an `ExpressionStatement` and the +/// character before it could cause the replacement to be parsed as a continuation +/// of the previous expression. +pub fn could_be_asi_hazard(node: &AstNode, ctx: &LintContext) -> bool { + let node_span = node.span(); + + // Find the enclosing ExpressionStatement, bailing early for nodes that can't + // be at statement start position + let mut expr_stmt_span = None; + for ancestor in ctx.nodes().ancestors(node.id()) { + match ancestor.kind() { + AstKind::ExpressionStatement(expr_stmt) => { + expr_stmt_span = Some(expr_stmt.span); + break; + } + // Expression types that can have our node at their start position + AstKind::CallExpression(_) + | AstKind::ComputedMemberExpression(_) + | AstKind::StaticMemberExpression(_) + | AstKind::PrivateFieldExpression(_) + | AstKind::ChainExpression(_) + | AstKind::TaggedTemplateExpression(_) + | AstKind::SequenceExpression(_) + | AstKind::AssignmentExpression(_) + | AstKind::LogicalExpression(_) + | AstKind::BinaryExpression(_) + | AstKind::ConditionalExpression(_) + | AstKind::AwaitExpression(_) + | AstKind::ParenthesizedExpression(_) + | AstKind::TSAsExpression(_) + | AstKind::TSSatisfiesExpression(_) + | AstKind::TSNonNullExpression(_) + | AstKind::TSTypeAssertion(_) + | AstKind::TSInstantiationExpression(_) => {} + _ => return false, + } + } + + let Some(expr_stmt_span) = expr_stmt_span else { + return false; + }; + + // Node must be at the start of the statement for ASI hazard to apply + if node_span.start != expr_stmt_span.start { + return false; + } + + if expr_stmt_span.start == 0 { + return false; + } + + let source_text = ctx.source_text(); + let last_char = find_last_meaningful_char(source_text, expr_stmt_span.start, ctx); + + let Some(last_char) = last_char else { + return false; + }; + + // Characters that could cause ASI issues when followed by `[`, `(`, `/`, etc. + matches!(last_char, ')' | ']' | '}' | '"' | '\'' | '`' | '+' | '-' | '/' | '.') + || last_char.is_alphanumeric() + || last_char == '_' + || last_char == '$' +} + +#[inline] +#[expect(clippy::cast_possible_wrap)] +fn is_utf8_char_boundary(b: u8) -> bool { + (b as i8) >= -0x40 +} + +/// Find the last meaningful (non-whitespace, non-comment) character before `end_pos`. +fn find_last_meaningful_char(source_text: &str, end_pos: u32, ctx: &LintContext) -> Option { + let bytes = source_text.as_bytes(); + let comments = ctx.semantic().comments(); + + let mut comment_idx = comments.partition_point(|c| c.span.start < end_pos); + let mut current_comment_end: u32 = 0; + let mut i = end_pos; + + // Handle case where end_pos is inside a comment + if comment_idx > 0 { + let prev_comment = &comments[comment_idx - 1]; + if end_pos <= prev_comment.span.end { + i = prev_comment.span.start; + comment_idx -= 1; + if comment_idx > 0 { + current_comment_end = comments[comment_idx - 1].span.end; + } + } + } + + while i > 0 { + if i <= current_comment_end && comment_idx > 0 { + comment_idx -= 1; + current_comment_end = comments[comment_idx].span.start; + i = current_comment_end; + continue; + } + + i -= 1; + + let byte = bytes[i as usize]; + + if byte.is_ascii_whitespace() { + continue; + } + + // Check if we're entering a comment from the end + if comment_idx > 0 { + let comment = &comments[comment_idx - 1]; + if i >= comment.span.start && i < comment.span.end { + i = comment.span.start; + comment_idx -= 1; + if comment_idx > 0 { + current_comment_end = comments[comment_idx - 1].span.end; + } + continue; + } + } + + if byte.is_ascii() { + return Some(byte as char); + } + + // Multi-byte UTF-8: find the start byte (max 4 bytes per char) + let i_usize = i as usize; + let char_start = if is_utf8_char_boundary(bytes[i_usize.saturating_sub(1)]) { + i_usize - 1 + } else if is_utf8_char_boundary(bytes[i_usize.saturating_sub(2)]) { + i_usize - 2 + } else { + i_usize - 3 + }; + + let c = source_text[char_start..].chars().next().unwrap(); + + // Skip irregular whitespace (NBSP, ZWNBSP, etc.) + if is_irregular_whitespace(c) { + #[expect(clippy::cast_possible_truncation)] + { + i = char_start as u32; + } + continue; + } + + return Some(c); + } + + None +} diff --git a/crates/oxc_linter/src/config/config_store.rs b/crates/oxc_linter/src/config/config_store.rs index 824c2ef8c5756..1187eb80de863 100644 --- a/crates/oxc_linter/src/config/config_store.rs +++ b/crates/oxc_linter/src/config/config_store.rs @@ -673,7 +673,7 @@ mod test { files: GlobSet::new(vec!["*.tsx"]), env: None, plugins: None, - globals: Some(from_json!({ "React": "readonly", "Secret": "writeable" })), + globals: Some(from_json!({ "React": "readonly", "Secret": "writable" })), rules: ResolvedOxlintOverrideRules { builtin_rules: vec![], external_rules: vec![] }, }]); @@ -739,7 +739,7 @@ mod test { plugins: LintPlugins::ESLINT, globals: from_json!({ "React": "readonly", - "Secret": "writeable" + "Secret": "writable" }), ..Default::default() }; diff --git a/crates/oxc_linter/src/config/globals.rs b/crates/oxc_linter/src/config/globals.rs index 2f0e995116b2a..9e39973a8acbf 100644 --- a/crates/oxc_linter/src/config/globals.rs +++ b/crates/oxc_linter/src/config/globals.rs @@ -61,8 +61,7 @@ impl OxlintGlobals { #[serde(rename_all = "lowercase")] pub enum GlobalValue { Readonly, - // TODO: #[serde(rename = "writable")] for ESLint compatibility - Writeable, + Writable, Off, } @@ -70,7 +69,7 @@ impl GlobalValue { pub const fn as_str(self) -> &'static str { match self { Self::Readonly => "readonly", - Self::Writeable => "writeable", + Self::Writable => "writable", Self::Off => "off", } } @@ -88,7 +87,7 @@ impl<'de> Deserialize<'de> for GlobalValue { impl From for GlobalValue { #[inline] fn from(value: bool) -> Self { - if value { GlobalValue::Writeable } else { GlobalValue::Readonly } + if value { GlobalValue::Writable } else { GlobalValue::Readonly } } } @@ -98,7 +97,7 @@ impl TryFrom<&str> for GlobalValue { fn try_from(value: &str) -> Result { match value { "readonly" | "readable" => Ok(GlobalValue::Readonly), - "writable" | "writeable" => Ok(GlobalValue::Writeable), + "writable" | "writeable" => Ok(GlobalValue::Writable), "off" => Ok(GlobalValue::Off), _ => Err("Invalid global value"), } @@ -181,7 +180,7 @@ mod test { #[test] fn test_override_globals() { let mut globals = OxlintGlobals::deserialize(&serde_json::json!({ - "Foo": "writeable", + "Foo": "writable", })) .unwrap(); let override_globals = OxlintGlobals::deserialize(&serde_json::json!({ diff --git a/crates/oxc_linter/src/generated/rule_runner_impls.rs b/crates/oxc_linter/src/generated/rule_runner_impls.rs index 31c015b833e2b..aa8ce170c1bc3 100644 --- a/crates/oxc_linter/src/generated/rule_runner_impls.rs +++ b/crates/oxc_linter/src/generated/rule_runner_impls.rs @@ -2334,6 +2334,14 @@ impl RuleRunner for crate::rules::react::no_namespace::NoNamespace { const RUN_FUNCTIONS: RuleRunFunctionsImplemented = RuleRunFunctionsImplemented::Run; } +impl RuleRunner + for crate::rules::react::no_redundant_should_component_update::NoRedundantShouldComponentUpdate +{ + const NODE_TYPES: Option<&AstTypesBitset> = + Some(&AstTypesBitset::from_types(&[AstType::Class])); + const RUN_FUNCTIONS: RuleRunFunctionsImplemented = RuleRunFunctionsImplemented::Run; +} + impl RuleRunner for crate::rules::react::no_render_return_value::NoRenderReturnValue { const NODE_TYPES: Option<&AstTypesBitset> = Some(&AstTypesBitset::from_types(&[AstType::CallExpression])); @@ -3544,6 +3552,14 @@ impl RuleRunner for crate::rules::unicorn::prefer_date_now::PreferDateNow { const RUN_FUNCTIONS: RuleRunFunctionsImplemented = RuleRunFunctionsImplemented::Run; } +impl RuleRunner for crate::rules::unicorn::prefer_default_parameters::PreferDefaultParameters { + const NODE_TYPES: Option<&AstTypesBitset> = Some(&AstTypesBitset::from_types(&[ + AstType::AssignmentExpression, + AstType::VariableDeclaration, + ])); + const RUN_FUNCTIONS: RuleRunFunctionsImplemented = RuleRunFunctionsImplemented::Run; +} + impl RuleRunner for crate::rules::unicorn::prefer_dom_node_append::PreferDomNodeAppend { const NODE_TYPES: Option<&AstTypesBitset> = Some(&AstTypesBitset::from_types(&[AstType::CallExpression])); @@ -3589,6 +3605,14 @@ impl RuleRunner for crate::rules::unicorn::prefer_includes::PreferIncludes { const RUN_FUNCTIONS: RuleRunFunctionsImplemented = RuleRunFunctionsImplemented::Run; } +impl RuleRunner for crate::rules::unicorn::prefer_keyboard_event_key::PreferKeyboardEventKey { + const NODE_TYPES: Option<&AstTypesBitset> = Some(&AstTypesBitset::from_types(&[ + AstType::BindingProperty, + AstType::StaticMemberExpression, + ])); + const RUN_FUNCTIONS: RuleRunFunctionsImplemented = RuleRunFunctionsImplemented::Run; +} + impl RuleRunner for crate::rules::unicorn::prefer_logical_operator_over_ternary::PreferLogicalOperatorOverTernary { const NODE_TYPES: Option<&AstTypesBitset> = Some(&AstTypesBitset::from_types(&[AstType::ConditionalExpression])); const RUN_FUNCTIONS: RuleRunFunctionsImplemented = RuleRunFunctionsImplemented::Run; diff --git a/crates/oxc_linter/src/rules.rs b/crates/oxc_linter/src/rules.rs index fa0385ec3241e..a3925edbfcf85 100644 --- a/crates/oxc_linter/src/rules.rs +++ b/crates/oxc_linter/src/rules.rs @@ -372,6 +372,7 @@ pub(crate) mod react { pub mod no_find_dom_node; pub mod no_is_mounted; pub mod no_namespace; + pub mod no_redundant_should_component_update; pub mod no_render_return_value; pub mod no_set_state; pub mod no_string_refs; @@ -472,6 +473,7 @@ pub(crate) mod unicorn { pub mod prefer_classlist_toggle; pub mod prefer_code_point; pub mod prefer_date_now; + pub mod prefer_default_parameters; pub mod prefer_dom_node_append; pub mod prefer_dom_node_dataset; pub mod prefer_dom_node_remove; @@ -479,6 +481,7 @@ pub(crate) mod unicorn { pub mod prefer_event_target; pub mod prefer_global_this; pub mod prefer_includes; + pub mod prefer_keyboard_event_key; pub mod prefer_logical_operator_over_ternary; pub mod prefer_math_min_max; pub mod prefer_math_trunc; @@ -1050,6 +1053,7 @@ oxc_macros::declare_all_lint_rules! { react::no_direct_mutation_state, react::no_find_dom_node, react::no_is_mounted, + react::no_redundant_should_component_update, react::no_render_return_value, react::no_set_state, react::no_string_refs, @@ -1221,10 +1225,12 @@ oxc_macros::declare_all_lint_rules! { unicorn::prefer_classlist_toggle, unicorn::prefer_class_fields, unicorn::prefer_bigint_literals, + unicorn::prefer_default_parameters, unicorn::prefer_response_static_json, unicorn::prefer_top_level_await, unicorn::prefer_at, unicorn::prefer_global_this, + unicorn::prefer_keyboard_event_key, unicorn::prefer_object_from_entries, unicorn::prefer_array_find, unicorn::prefer_array_index_of, diff --git a/crates/oxc_linter/src/rules/eslint/constructor_super.rs b/crates/oxc_linter/src/rules/eslint/constructor_super.rs index 13ca10a7e2a24..644223857ca4b 100644 --- a/crates/oxc_linter/src/rules/eslint/constructor_super.rs +++ b/crates/oxc_linter/src/rules/eslint/constructor_super.rs @@ -107,7 +107,7 @@ declare_oxc_lint!( /// ``` ConstructorSuper, eslint, - nursery, + correctness, ); #[derive(Debug, Clone, Copy, PartialEq, Eq)] diff --git a/crates/oxc_linter/src/rules/eslint/no_extra_boolean_cast.rs b/crates/oxc_linter/src/rules/eslint/no_extra_boolean_cast.rs index 87bb5a6aa848d..65562a75a94dc 100644 --- a/crates/oxc_linter/src/rules/eslint/no_extra_boolean_cast.rs +++ b/crates/oxc_linter/src/rules/eslint/no_extra_boolean_cast.rs @@ -1,13 +1,13 @@ use oxc_ast::{ AstKind, - ast::{CallExpression, Expression, NewExpression, match_member_expression}, + ast::{CallExpression, Expression, NewExpression}, }; use oxc_diagnostics::OxcDiagnostic; use oxc_macros::declare_oxc_lint; use oxc_span::{GetSpan, Span}; use oxc_syntax::{ operator::{LogicalOperator, UnaryOperator}, - precedence::{GetPrecedence, Precedence}, + precedence::Precedence, }; use schemars::JsonSchema; use serde::Deserialize; @@ -16,6 +16,7 @@ use crate::{ AstNode, context::LintContext, rule::{DefaultRuleConfig, Rule}, + utils::get_precedence, }; fn no_extra_double_negation_cast_diagnostic(span: Span) -> OxcDiagnostic { @@ -246,28 +247,6 @@ fn without_not<'a, 'b>(expr: &'b Expression<'a>) -> Option<&'b Expression<'a>> { } } -/// Returns the precedence of an expression if it has one. -/// Returns `None` for "atomic" expressions (literals, identifiers, etc.) that have -/// the highest precedence and never need parentheses. -fn get_precedence(expr: &Expression) -> Option { - match expr { - Expression::SequenceExpression(e) => Some(e.precedence()), - Expression::AssignmentExpression(e) => Some(e.precedence()), - Expression::YieldExpression(e) => Some(e.precedence()), - Expression::ConditionalExpression(e) => Some(e.precedence()), - Expression::LogicalExpression(e) => Some(e.precedence()), - Expression::BinaryExpression(e) => Some(e.precedence()), - Expression::UnaryExpression(e) => Some(e.precedence()), - Expression::UpdateExpression(e) => Some(e.precedence()), - Expression::AwaitExpression(e) => Some(e.precedence()), - Expression::NewExpression(e) => Some(e.precedence()), - Expression::CallExpression(e) => Some(e.precedence()), - match_member_expression!(Expression) => Some(expr.to_member_expression().precedence()), - // Literals, identifiers, and other atomic expressions have highest precedence - _ => None, - } -} - #[test] fn test() { use crate::tester::Tester; diff --git a/crates/oxc_linter/src/rules/jest/max_expects.rs b/crates/oxc_linter/src/rules/jest/max_expects.rs index 8407224d9036b..1b0cea2bac106 100644 --- a/crates/oxc_linter/src/rules/jest/max_expects.rs +++ b/crates/oxc_linter/src/rules/jest/max_expects.rs @@ -66,6 +66,17 @@ declare_oxc_lint!( /// expect(true).toBeDefined(); /// }); /// ``` + /// + /// This rule is compatible with [eslint-plugin-vitest](https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/max-expects.md), + /// to use it, add the following configuration to your `.oxlintrc.json`: + /// + /// ```json + /// { + /// "rules": { + /// "vitest/max-expects": "error" + /// } + /// } + /// ``` MaxExpects, jest, style, diff --git a/crates/oxc_linter/src/rules/jest/max_nested_describe.rs b/crates/oxc_linter/src/rules/jest/max_nested_describe.rs index d08cbeb1b6fe2..a40ede13b2088 100644 --- a/crates/oxc_linter/src/rules/jest/max_nested_describe.rs +++ b/crates/oxc_linter/src/rules/jest/max_nested_describe.rs @@ -120,6 +120,17 @@ declare_oxc_lint!( /// }); /// }); /// ``` + /// + /// This rule is compatible with [eslint-plugin-vitest](https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/max-nested-describe.md), + /// to use it, add the following configuration to your `.oxlintrc.json`: + /// + /// ```json + /// { + /// "rules": { + /// "vitest/max-nested-describe": "error" + /// } + /// } + /// ``` MaxNestedDescribe, jest, style, diff --git a/crates/oxc_linter/src/rules/jest/no_conditional_expect.rs b/crates/oxc_linter/src/rules/jest/no_conditional_expect.rs index d22a99e1b38eb..80fb890b59b01 100644 --- a/crates/oxc_linter/src/rules/jest/no_conditional_expect.rs +++ b/crates/oxc_linter/src/rules/jest/no_conditional_expect.rs @@ -93,6 +93,17 @@ declare_oxc_lint!( /// await expect(foo).rejects.toThrow(Error); /// }); /// ``` + /// + /// This rule is compatible with [eslint-plugin-vitest](https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-conditional-expect.md), + /// to use it, add the following configuration to your `.oxlintrc.json`: + /// + /// ```json + /// { + /// "rules": { + /// "vitest/no-conditional-expect": "error" + /// } + /// } + /// ``` NoConditionalExpect, jest, correctness diff --git a/crates/oxc_linter/src/rules/jest/no_conditional_in_test.rs b/crates/oxc_linter/src/rules/jest/no_conditional_in_test.rs index 81dbaf7c67527..d81d4e88a14f5 100644 --- a/crates/oxc_linter/src/rules/jest/no_conditional_in_test.rs +++ b/crates/oxc_linter/src/rules/jest/no_conditional_in_test.rs @@ -92,6 +92,17 @@ declare_oxc_lint!( /// await expect(promiseValue()).resolves.toBe(1); /// }); /// ``` + /// + /// This rule is compatible with [eslint-plugin-vitest](https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-conditional-in-test.md), + /// to use it, add the following configuration to your `.oxlintrc.json`: + /// + /// ```json + /// { + /// "rules": { + /// "vitest/no-conditional-in-test": "error" + /// } + /// } + /// ``` NoConditionalInTest, jest, pedantic, diff --git a/crates/oxc_linter/src/rules/jest/no_duplicate_hooks.rs b/crates/oxc_linter/src/rules/jest/no_duplicate_hooks.rs index 01c227a58f4ed..d6c33b8316ca8 100644 --- a/crates/oxc_linter/src/rules/jest/no_duplicate_hooks.rs +++ b/crates/oxc_linter/src/rules/jest/no_duplicate_hooks.rs @@ -100,6 +100,17 @@ declare_oxc_lint!( /// }); /// }); /// ``` + /// + /// This rule is compatible with [eslint-plugin-vitest](https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-duplicate-hooks.md), + /// to use it, add the following configuration to your `.oxlintrc.json`: + /// + /// ```json + /// { + /// "rules": { + /// "vitest/no-duplicate-hooks": "error" + /// } + /// } + /// ``` NoDuplicateHooks, jest, style, diff --git a/crates/oxc_linter/src/rules/jest/no_hooks.rs b/crates/oxc_linter/src/rules/jest/no_hooks.rs index e1e79e13e25ae..f13ddef42d5f4 100644 --- a/crates/oxc_linter/src/rules/jest/no_hooks.rs +++ b/crates/oxc_linter/src/rules/jest/no_hooks.rs @@ -83,6 +83,17 @@ declare_oxc_lint!( /// }); /// }); /// ``` + /// + /// This rule is compatible with [eslint-plugin-vitest](https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-hooks.md), + /// to use it, add the following configuration to your `.oxlintrc.json`: + /// + /// ```json + /// { + /// "rules": { + /// "vitest/no-hooks": "error" + /// } + /// } + /// ``` NoHooks, jest, style, diff --git a/crates/oxc_linter/src/rules/jest/no_interpolation_in_snapshots.rs b/crates/oxc_linter/src/rules/jest/no_interpolation_in_snapshots.rs index 4ec0de90b52b4..0b54f423a61c4 100644 --- a/crates/oxc_linter/src/rules/jest/no_interpolation_in_snapshots.rs +++ b/crates/oxc_linter/src/rules/jest/no_interpolation_in_snapshots.rs @@ -51,6 +51,17 @@ declare_oxc_lint!( /// `${interpolated}`, /// ); /// ``` + /// + /// This rule is compatible with [eslint-plugin-vitest](https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-interpolation-in-snapshots.md), + /// to use it, add the following configuration to your `.oxlintrc.json`: + /// + /// ```json + /// { + /// "rules": { + /// "vitest/no-interpolation-in-snapshots": "error" + /// } + /// } + /// ``` NoInterpolationInSnapshots, jest, style diff --git a/crates/oxc_linter/src/rules/jest/no_mocks_import.rs b/crates/oxc_linter/src/rules/jest/no_mocks_import.rs index 939c0e8dfbf79..71cd1926dfaf8 100644 --- a/crates/oxc_linter/src/rules/jest/no_mocks_import.rs +++ b/crates/oxc_linter/src/rules/jest/no_mocks_import.rs @@ -9,7 +9,7 @@ use crate::{context::LintContext, rule::Rule}; fn no_mocks_import_diagnostic(span: Span) -> OxcDiagnostic { OxcDiagnostic::warn("Mocks should not be manually imported from a `__mocks__` directory.") - .with_help("Instead use `jest.mock` and import from the original module path.") + .with_help("Instead use `jest.mock` or `vi.mock` and import from the original module path.") .with_label(span) } @@ -43,6 +43,17 @@ declare_oxc_lint!( /// import thing from 'thing'; /// require('thing'); /// ``` + /// + /// This rule is compatible with [eslint-plugin-vitest](https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-mocks-import.md), + /// to use it, add the following configuration to your `.oxlintrc.json`: + /// + /// ```json + /// { + /// "rules": { + /// "vitest/no-mocks-import": "error" + /// } + /// } + /// ``` NoMocksImport, jest, style @@ -93,7 +104,7 @@ fn contains_mocks_dir(value: &str) -> bool { fn test() { use crate::tester::Tester; - let pass = vec![ + let mut pass = vec![ ("import something from 'something'", None), ("require('somethingElse')", None), ("require('./__mocks__.js')", None), @@ -106,7 +117,7 @@ fn test() { ("entirelyDifferent(fn)", None), ]; - let fail = vec![ + let mut fail = vec![ ("require('./__mocks__')", None), ("require('./__mocks__/')", None), ("require('./__mocks__/index')", None), @@ -116,7 +127,34 @@ fn test() { ("import thing from './__mocks__/index'", None), ]; + let pass_vitest = vec![ + ("import something from 'something'", None), + ("require('somethingElse')", None), + ("require('./__mocks__.js')", None), + ("require('./__mocks__x')", None), + ("require('./__mocks__x/x')", None), + ("require('./x__mocks__')", None), + ("require('./x__mocks__/x')", None), + ("require()", None), + ("var path = './__mocks__.js'; require(path)", None), + ("entirelyDifferent(fn)", None), + ]; + + let fail_vitest = vec![ + ("require('./__mocks__')", None), + ("require('./__mocks__/')", None), + ("require('./__mocks__/index')", None), + ("require('__mocks__')", None), + ("require('__mocks__/')", None), + ("require('__mocks__/index')", None), + ("import thing from './__mocks__/index'", None), + ]; + + pass.extend(pass_vitest); + fail.extend(fail_vitest); + Tester::new(NoMocksImport::NAME, NoMocksImport::PLUGIN, pass, fail) .with_jest_plugin(true) + .with_vitest_plugin(true) .test_and_snapshot(); } diff --git a/crates/oxc_linter/src/rules/jest/no_restricted_jest_methods.rs b/crates/oxc_linter/src/rules/jest/no_restricted_jest_methods.rs index 595f147f2a0ee..c09ff9e1f42c4 100644 --- a/crates/oxc_linter/src/rules/jest/no_restricted_jest_methods.rs +++ b/crates/oxc_linter/src/rules/jest/no_restricted_jest_methods.rs @@ -68,6 +68,17 @@ declare_oxc_lint!( /// // ... /// }); /// ``` + /// + /// This rule is compatible with [eslint-plugin-vitest](https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-restricted-vi-methods.md), + /// to use it, add the following configuration to your `.oxlintrc.json`: + /// + /// ```json + /// { + /// "rules": { + /// "vitest/no-restricted-vi-methods": "error" + /// } + /// } + /// ``` NoRestrictedJestMethods, jest, style, diff --git a/crates/oxc_linter/src/rules/jest/no_restricted_matchers.rs b/crates/oxc_linter/src/rules/jest/no_restricted_matchers.rs index b13639bfff398..9a69277d274dd 100644 --- a/crates/oxc_linter/src/rules/jest/no_restricted_matchers.rs +++ b/crates/oxc_linter/src/rules/jest/no_restricted_matchers.rs @@ -105,6 +105,17 @@ declare_oxc_lint!( /// }); /// }); /// ``` + /// + /// This rule is compatible with [eslint-plugin-vitest](https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-restricted-matchers.md), + /// to use it, add the following configuration to your `.oxlintrc.json`: + /// + /// ```json + /// { + /// "rules": { + /// "vitest/no-restricted-matchers": "error" + /// } + /// } + /// ``` NoRestrictedMatchers, jest, style, diff --git a/crates/oxc_linter/src/rules/jest/no_standalone_expect/mod.rs b/crates/oxc_linter/src/rules/jest/no_standalone_expect/mod.rs index a8e0a1ac8757c..894b64468c2ad 100644 --- a/crates/oxc_linter/src/rules/jest/no_standalone_expect/mod.rs +++ b/crates/oxc_linter/src/rules/jest/no_standalone_expect/mod.rs @@ -70,6 +70,17 @@ declare_oxc_lint!( /// expect(1).toBe(1); /// }); /// ``` + /// + /// This rule is compatible with [eslint-plugin-vitest](https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-standalone-expect.md), + /// to use it, add the following configuration to your `.oxlintrc.json`: + /// + /// ```json + /// { + /// "rules": { + /// "vitest/no-standalone-expect": "error" + /// } + /// } + /// ``` NoStandaloneExpect, jest, correctness, diff --git a/crates/oxc_linter/src/rules/jest/no_test_return_statement.rs b/crates/oxc_linter/src/rules/jest/no_test_return_statement.rs index 553a96d539300..3126e3a72ea39 100644 --- a/crates/oxc_linter/src/rules/jest/no_test_return_statement.rs +++ b/crates/oxc_linter/src/rules/jest/no_test_return_statement.rs @@ -47,6 +47,17 @@ declare_oxc_lint!( /// expect(1).toBe(1); /// }); /// ``` + /// + /// This rule is compatible with [eslint-plugin-vitest](https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-test-return-statement.md), + /// to use it, add the following configuration to your `.oxlintrc.json`: + /// + /// ```json + /// { + /// "rules": { + /// "vitest/no-test-return-statement": "error" + /// } + /// } + /// ``` NoTestReturnStatement, jest, style, diff --git a/crates/oxc_linter/src/rules/jest/prefer_comparison_matcher.rs b/crates/oxc_linter/src/rules/jest/prefer_comparison_matcher.rs index 93701ea94316e..07bf2ec8167cb 100644 --- a/crates/oxc_linter/src/rules/jest/prefer_comparison_matcher.rs +++ b/crates/oxc_linter/src/rules/jest/prefer_comparison_matcher.rs @@ -60,6 +60,17 @@ declare_oxc_lint!( /// // special case - see below /// expect(x < 'Carl').toBe(true); /// ``` + /// + /// This rule is compatible with [eslint-plugin-vitest](https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-comparison-matcher.md), + /// to use it, add the following configuration to your `.oxlintrc.json`: + /// + /// ```json + /// { + /// "rules": { + /// "vitest/prefer-comparison-matcher": "error" + /// } + /// } + /// ``` PreferComparisonMatcher, jest, style, diff --git a/crates/oxc_linter/src/rules/jest/prefer_each.rs b/crates/oxc_linter/src/rules/jest/prefer_each.rs index 045280dd35d21..3c2b62b9c7757 100644 --- a/crates/oxc_linter/src/rules/jest/prefer_each.rs +++ b/crates/oxc_linter/src/rules/jest/prefer_each.rs @@ -63,6 +63,17 @@ declare_oxc_lint!( /// expect(item).toBe('foo') /// }) /// ``` + /// + /// This rule is compatible with [eslint-plugin-vitest](https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-each.md), + /// to use it, add the following configuration to your `.oxlintrc.json`: + /// + /// ```json + /// { + /// "rules": { + /// "vitest/prefer-each": "error" + /// } + /// } + /// ``` PreferEach, jest, style, diff --git a/crates/oxc_linter/src/rules/jest/prefer_equality_matcher.rs b/crates/oxc_linter/src/rules/jest/prefer_equality_matcher.rs index 105c3077d3284..24f510985b5d9 100644 --- a/crates/oxc_linter/src/rules/jest/prefer_equality_matcher.rs +++ b/crates/oxc_linter/src/rules/jest/prefer_equality_matcher.rs @@ -51,6 +51,17 @@ declare_oxc_lint!( /// expect(name).not.toEqual('Carl'); /// expect(myObj).toStrictEqual(thatObj); /// ``` + /// + /// This rule is compatible with [eslint-plugin-vitest](https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-equality-matcher.md), + /// to use it, add the following configuration to your `.oxlintrc.json`: + /// + /// ```json + /// { + /// "rules": { + /// "vitest/prefer-equality-matcher": "error" + /// } + /// } + /// ``` PreferEqualityMatcher, jest, style, diff --git a/crates/oxc_linter/src/rules/jest/prefer_expect_resolves.rs b/crates/oxc_linter/src/rules/jest/prefer_expect_resolves.rs index 735aca093f669..e4e95282b8d35 100644 --- a/crates/oxc_linter/src/rules/jest/prefer_expect_resolves.rs +++ b/crates/oxc_linter/src/rules/jest/prefer_expect_resolves.rs @@ -72,6 +72,17 @@ declare_oxc_lint!( /// ); /// }); /// ``` + /// + /// This rule is compatible with [eslint-plugin-vitest](https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-expect-resolves.md), + /// to use it, add the following configuration to your `.oxlintrc.json`: + /// + /// ```json + /// { + /// "rules": { + /// "vitest/prefer-expect-resolves": "error" + /// } + /// } + /// ``` PreferExpectResolves, jest, style, diff --git a/crates/oxc_linter/src/rules/jest/prefer_hooks_on_top.rs b/crates/oxc_linter/src/rules/jest/prefer_hooks_on_top.rs index 75d5ed70519a3..2307ad04fe396 100644 --- a/crates/oxc_linter/src/rules/jest/prefer_hooks_on_top.rs +++ b/crates/oxc_linter/src/rules/jest/prefer_hooks_on_top.rs @@ -144,6 +144,17 @@ declare_oxc_lint!( /// }); /// }); /// ``` + /// + /// This rule is compatible with [eslint-plugin-vitest](https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-hooks-on-top.md), + /// to use it, add the following configuration to your `.oxlintrc.json`: + /// + /// ```json + /// { + /// "rules": { + /// "vitest/prefer-hooks-on-top": "error" + /// } + /// } + /// ``` PreferHooksOnTop, jest, style, diff --git a/crates/oxc_linter/src/rules/jest/prefer_lowercase_title/mod.rs b/crates/oxc_linter/src/rules/jest/prefer_lowercase_title/mod.rs index 9e96b44f508a1..51121ef2b5353 100644 --- a/crates/oxc_linter/src/rules/jest/prefer_lowercase_title/mod.rs +++ b/crates/oxc_linter/src/rules/jest/prefer_lowercase_title/mod.rs @@ -151,6 +151,17 @@ declare_oxc_lint!( /// expect(sum(1, 2)).toBe(3); /// }); /// ``` + /// + /// This rule is compatible with [eslint-plugin-vitest](https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-lowercase-title.md), + /// to use it, add the following configuration to your `.oxlintrc.json`: + /// + /// ```json + /// { + /// "rules": { + /// "vitest/prefer-lowercase-title": "error" + /// } + /// } + /// ``` PreferLowercaseTitle, jest, style, diff --git a/crates/oxc_linter/src/rules/jest/prefer_mock_promise_shorthand.rs b/crates/oxc_linter/src/rules/jest/prefer_mock_promise_shorthand.rs index bd7e825a2dcbb..11b71c8be9792 100644 --- a/crates/oxc_linter/src/rules/jest/prefer_mock_promise_shorthand.rs +++ b/crates/oxc_linter/src/rules/jest/prefer_mock_promise_shorthand.rs @@ -57,6 +57,17 @@ declare_oxc_lint!( /// .mockResolvedValueOnce(42) /// .mockRejectedValue(new Error('too many calls!')); /// ``` + /// + /// This rule is compatible with [eslint-plugin-vitest](https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-mock-promise-shorthand.md), + /// to use it, add the following configuration to your `.oxlintrc.json`: + /// + /// ```json + /// { + /// "rules": { + /// "vitest/prefer-mock-promise-shorthand": "error" + /// } + /// } + /// ``` PreferMockPromiseShorthand, jest, style, diff --git a/crates/oxc_linter/src/rules/jest/prefer_strict_equal.rs b/crates/oxc_linter/src/rules/jest/prefer_strict_equal.rs index 5ea69665688c1..d80a2ebe02a21 100644 --- a/crates/oxc_linter/src/rules/jest/prefer_strict_equal.rs +++ b/crates/oxc_linter/src/rules/jest/prefer_strict_equal.rs @@ -40,6 +40,17 @@ declare_oxc_lint!( /// ```javascript /// expect({ a: 'a', b: undefined }).toStrictEqual({ a: 'a' }); /// ``` + /// + /// This rule is compatible with [eslint-plugin-vitest](https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-strict-equal.md), + /// to use it, add the following configuration to your `.oxlintrc.json`: + /// + /// ```json + /// { + /// "rules": { + /// "vitest/prefer-strict-equal": "error" + /// } + /// } + /// ``` PreferStrictEqual, jest, style, diff --git a/crates/oxc_linter/src/rules/jest/prefer_to_be.rs b/crates/oxc_linter/src/rules/jest/prefer_to_be.rs index a8395df45a637..15c6da2c2d33b 100644 --- a/crates/oxc_linter/src/rules/jest/prefer_to_be.rs +++ b/crates/oxc_linter/src/rules/jest/prefer_to_be.rs @@ -82,6 +82,17 @@ declare_oxc_lint!( /// expect(didError).not.toBe(true); /// expect(catchError()).toStrictEqual({ message: 'oh noes!' }); /// ``` + /// + /// This rule is compatible with [eslint-plugin-vitest](https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-to-be.md), + /// to use it, add the following configuration to your `.oxlintrc.json`: + /// + /// ```json + /// { + /// "rules": { + /// "vitest/prefer-to-be": "error" + /// } + /// } + /// ``` PreferToBe, jest, style, diff --git a/crates/oxc_linter/src/rules/jest/prefer_to_have_length.rs b/crates/oxc_linter/src/rules/jest/prefer_to_have_length.rs index 07549170ae530..864ce427d2ea0 100644 --- a/crates/oxc_linter/src/rules/jest/prefer_to_have_length.rs +++ b/crates/oxc_linter/src/rules/jest/prefer_to_have_length.rs @@ -43,6 +43,17 @@ declare_oxc_lint!( /// ```javascript /// expect(files).toHaveLength(1); /// ``` + /// + /// This rule is compatible with [eslint-plugin-vitest](https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-to-have-length.md), + /// to use it, add the following configuration to your `.oxlintrc.json`: + /// + /// ```json + /// { + /// "rules": { + /// "vitest/prefer-to-have-length": "error" + /// } + /// } + /// ``` PreferToHaveLength, jest, style, diff --git a/crates/oxc_linter/src/rules/jest/prefer_todo.rs b/crates/oxc_linter/src/rules/jest/prefer_todo.rs index 5fb97edaa7e7e..5de4f7477e96d 100644 --- a/crates/oxc_linter/src/rules/jest/prefer_todo.rs +++ b/crates/oxc_linter/src/rules/jest/prefer_todo.rs @@ -42,6 +42,17 @@ declare_oxc_lint!( /// ```javascript /// test.todo('i need to write this test'); /// ``` + /// + /// This rule is compatible with [eslint-plugin-vitest](https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-todo.md), + /// to use it, add the following configuration to your `.oxlintrc.json`: + /// + /// ```json + /// { + /// "rules": { + /// "vitest/prefer-todo": "error" + /// } + /// } + /// ``` PreferTodo, jest, style, diff --git a/crates/oxc_linter/src/rules/jest/require_to_throw_message.rs b/crates/oxc_linter/src/rules/jest/require_to_throw_message.rs index 31335c53c8f4e..834a2f8150824 100644 --- a/crates/oxc_linter/src/rules/jest/require_to_throw_message.rs +++ b/crates/oxc_linter/src/rules/jest/require_to_throw_message.rs @@ -52,6 +52,17 @@ declare_oxc_lint!( /// await expect(a()).rejects.toThrowError('a'); /// }); /// ``` + /// + /// This rule is compatible with [eslint-plugin-vitest](https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/require-to-throw-message.md), + /// to use it, add the following configuration to your `.oxlintrc.json`: + /// + /// ```json + /// { + /// "rules": { + /// "vitest/require-to-throw-message": "error" + /// } + /// } + /// ``` RequireToThrowMessage, jest, correctness diff --git a/crates/oxc_linter/src/rules/jest/require_top_level_describe.rs b/crates/oxc_linter/src/rules/jest/require_top_level_describe.rs index bc832df5c1a63..f85da506f7cc0 100644 --- a/crates/oxc_linter/src/rules/jest/require_top_level_describe.rs +++ b/crates/oxc_linter/src/rules/jest/require_top_level_describe.rs @@ -99,6 +99,17 @@ declare_oxc_lint!( /// }); /// }); /// ``` + /// + /// This rule is compatible with [eslint-plugin-vitest](https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/require-top-level-describe.md), + /// to use it, add the following configuration to your `.oxlintrc.json`: + /// + /// ```json + /// { + /// "rules": { + /// "vitest/require-top-level-describe": "error" + /// } + /// } + /// ``` RequireTopLevelDescribe, jest, style, diff --git a/crates/oxc_linter/src/rules/jsx_a11y/iframe_has_title.rs b/crates/oxc_linter/src/rules/jsx_a11y/iframe_has_title.rs index 731bd82041599..2677ee0048f01 100644 --- a/crates/oxc_linter/src/rules/jsx_a11y/iframe_has_title.rs +++ b/crates/oxc_linter/src/rules/jsx_a11y/iframe_has_title.rs @@ -96,12 +96,17 @@ impl Rule for IframeHasTitle { return; } } - JSXExpression::CallExpression(_) => return, expr @ JSXExpression::Identifier(_) => { if !expr.is_undefined() { return; } } + // Call expressions and member expressions are considered valid + // (e.g., titleGenerator('hello'), file.name, obj.prop, obj['key']) + JSXExpression::CallExpression(_) + | JSXExpression::StaticMemberExpression(_) + | JSXExpression::ComputedMemberExpression(_) + | JSXExpression::PrivateFieldExpression(_) => return, _ => {} } } @@ -123,6 +128,10 @@ fn test() { (r"