From 7f114d4d98b0ef8c6c4e4121d2d8c0555a7577d5 Mon Sep 17 00:00:00 2001 From: Boshen Date: Thu, 25 Jan 2024 17:01:17 +0800 Subject: [PATCH] chore(linter): clean up unused snapshots --- .../src/snapshots/anchor_has_content.snap | 1 - .../src/snapshots/anchor_is_valid.snap | 1 - .../oxc_linter/src/snapshots/aria_role.snap | 1 - .../snapshots/consistent_type_exports.snap | 37 --- crates/oxc_linter/src/snapshots/export.snap | 141 ---------- .../src/snapshots/html_has_lang.snap | 1 - .../src/snapshots/img_redundant_alt.snap | 1 - .../snapshots/jsx_no_comment_text_nodes.snap | 66 ----- .../src/snapshots/jsx_no_undef.snap | 1 - crates/oxc_linter/src/snapshots/lang.snap | 1 - .../oxc_linter/src/snapshots/max_expects.snap | 1 - crates/oxc_linter/src/snapshots/no_amd.snap | 1 - .../src/snapshots/no_autofocus.snap | 1 - .../no_dangerously_set_inner_html.snap | 33 --- .../snapshots/no_deprecated_functions.snap | 1 - .../snapshots/no_direct_mutation_state.snap | 1 - .../snapshots/no_distracting_elements.snap | 1 - .../snapshots/no_empty_character_class.snap | 1 - .../src/snapshots/no_extra_boolean_cast.snap | 1 - .../src/snapshots/no_find_dom_node.snap | 1 - crates/oxc_linter/src/snapshots/no_hooks.snap | 1 - .../snapshots/no_irregular_whitespace.snap | 1 - .../src/snapshots/no_jsx_as_prop.snap | 33 --- .../src/snapshots/no_named_as_default.snap | 1 - .../src/snapshots/no_new_array_as_prop.snap | 47 ---- .../snapshots/no_new_function_as_props.snap | 68 ----- .../src/snapshots/no_new_object_as_prop.snap | 54 ---- .../snapshots/no_restricted_jest_methods.snap | 1 - .../src/snapshots/no_restricted_matchers.snap | 1 - .../src/snapshots/no_return_await.snap | 1 - .../src/snapshots/no_self_import.snap | 47 ---- .../snapshots/no_test_return_statement.snap | 1 - .../src/snapshots/no_unknown_property.snap | 1 - crates/oxc_linter/src/snapshots/no_var.snap | 1 - crates/oxc_linter/src/snapshots/no_void.snap | 1 - .../src/snapshots/number_literal_case.snap | 1 - .../src/snapshots/prefer_called_with.snap | 1 - .../oxc_linter/src/snapshots/prefer_todo.snap | 1 - .../snapshots/role_support_aria_props.snap | 257 ------------------ crates/oxc_linter/src/snapshots/scope.snap | 1 - .../src/snapshots/tab_index_no_positive.snap | 40 --- 41 files changed, 853 deletions(-) delete mode 100644 crates/oxc_linter/src/snapshots/consistent_type_exports.snap delete mode 100644 crates/oxc_linter/src/snapshots/export.snap delete mode 100644 crates/oxc_linter/src/snapshots/jsx_no_comment_text_nodes.snap delete mode 100644 crates/oxc_linter/src/snapshots/no_dangerously_set_inner_html.snap delete mode 100644 crates/oxc_linter/src/snapshots/no_jsx_as_prop.snap delete mode 100644 crates/oxc_linter/src/snapshots/no_new_array_as_prop.snap delete mode 100644 crates/oxc_linter/src/snapshots/no_new_function_as_props.snap delete mode 100644 crates/oxc_linter/src/snapshots/no_new_object_as_prop.snap delete mode 100644 crates/oxc_linter/src/snapshots/no_self_import.snap delete mode 100644 crates/oxc_linter/src/snapshots/role_support_aria_props.snap delete mode 100644 crates/oxc_linter/src/snapshots/tab_index_no_positive.snap diff --git a/crates/oxc_linter/src/snapshots/anchor_has_content.snap b/crates/oxc_linter/src/snapshots/anchor_has_content.snap index d631b39f779da..f00941008dc46 100644 --- a/crates/oxc_linter/src/snapshots/anchor_has_content.snap +++ b/crates/oxc_linter/src/snapshots/anchor_has_content.snap @@ -1,6 +1,5 @@ --- source: crates/oxc_linter/src/tester.rs -assertion_line: 119 expression: anchor_has_content --- ⚠ eslint-plugin-jsx-a11y(anchor-has-content): Missing accessible content when using `a` elements. diff --git a/crates/oxc_linter/src/snapshots/anchor_is_valid.snap b/crates/oxc_linter/src/snapshots/anchor_is_valid.snap index ebd30a7537b62..8acae448535a1 100644 --- a/crates/oxc_linter/src/snapshots/anchor_is_valid.snap +++ b/crates/oxc_linter/src/snapshots/anchor_is_valid.snap @@ -1,6 +1,5 @@ --- source: crates/oxc_linter/src/tester.rs -assertion_line: 119 expression: anchor_is_valid --- ⚠ eslint-plugin-jsx-a11y(anchor-is-valid): Missing `href` attribute for the `a` element. diff --git a/crates/oxc_linter/src/snapshots/aria_role.snap b/crates/oxc_linter/src/snapshots/aria_role.snap index a9a78ede3ccce..1565a38198433 100644 --- a/crates/oxc_linter/src/snapshots/aria_role.snap +++ b/crates/oxc_linter/src/snapshots/aria_role.snap @@ -1,6 +1,5 @@ --- source: crates/oxc_linter/src/tester.rs -assertion_line: 144 expression: aria_role --- ⚠ eslint-plugin-jsx-a11y(aria-role): Elements with ARIA roles must use a valid, non-abstract ARIA role. diff --git a/crates/oxc_linter/src/snapshots/consistent_type_exports.snap b/crates/oxc_linter/src/snapshots/consistent_type_exports.snap deleted file mode 100644 index a32c0f704e1da..0000000000000 --- a/crates/oxc_linter/src/snapshots/consistent_type_exports.snap +++ /dev/null @@ -1,37 +0,0 @@ ---- -source: crates/oxc_linter/src/tester.rs -expression: consistent_type_exports ---- - ⚠ typescript-eslint(consistent-type-exports): Consistent type exports - ╭─[consistent_type_exports.tsx:1:1] - 1 │ type foo = number; export {foo} - · ─── - ╰──── - help: Consistent type export - - ⚠ typescript-eslint(consistent-type-exports): Consistent type exports - ╭─[consistent_type_exports.tsx:4:1] - 4 │ } - 5 │ export {TypeNS} - · ────── - 6 │ - ╰──── - help: Consistent type export - - ⚠ typescript-eslint(consistent-type-exports): Consistent type exports - ╭─[consistent_type_exports.tsx:7:1] - 7 │ - 8 │ export { Alias, IFace, TypeNS }; - · ───── - ╰──── - help: Consistent type export - - ⚠ typescript-eslint(consistent-type-exports): Consistent type exports - ╭─[consistent_type_exports.tsx:7:1] - 7 │ - 8 │ export { Alias, IFace, TypeNS }; - · ───── - ╰──── - help: Consistent type export - - diff --git a/crates/oxc_linter/src/snapshots/export.snap b/crates/oxc_linter/src/snapshots/export.snap deleted file mode 100644 index 4abbcfd18a3bd..0000000000000 --- a/crates/oxc_linter/src/snapshots/export.snap +++ /dev/null @@ -1,141 +0,0 @@ ---- -source: crates/oxc_linter/src/tester.rs -expression: export ---- - ⚠ eslint-plugin-import(export): Multiple exports of name 'foo'. - ╭─[index.js:1:1] - 1 │ let foo; export { foo }; export * from "./export-all" - · ─── - ╰──── - - ⚠ eslint-plugin-import(export): No named exports found in module './default-export' - ╭─[index.js:1:1] - 1 │ export * from "./default-export" - · ────────────────── - ╰──── - - ⚠ eslint-plugin-import(export): Multiple exports of name 'foo'. - ╭─[index.js:1:1] - 1 │ let foo; export { foo as "foo" }; export * from "./export-all" - · ───── - ╰──── - - × Identifier `Foo` has already been declared - ╭─[index.js:1:1] - 1 │ - 2 │ export type Foo = string; - · ─┬─ - · ╰── `Foo` has already been declared here - 3 │ export type Foo = number; - · ─┬─ - · ╰── It can not be redeclared here - 4 │ - ╰──── - - × Identifier `a` has already been declared - ╭─[index.js:3:1] - 3 │ export namespace Foo { - 4 │ export const a = 2; - · ┬ - · ╰── `a` has already been declared here - 5 │ export const a = 3; - · ┬ - · ╰── It can not be redeclared here - 6 │ } - ╰──── - - × Expected a semicolon or an implicit semicolon after a statement, but found none - ╭─[index.js:1:1] - 1 │ - 2 │ declare module 'foo' { - · ─ - 3 │ const Foo = 1; - ╰──── - help: Try insert a semicolon here - - × Identifier `Foo` has already been declared - ╭─[index.js:3:1] - 3 │ export namespace Bar { - 4 │ export const Foo = 1; - · ─┬─ - · ╰── `Foo` has already been declared here - 5 │ export const Foo = 2; - · ─┬─ - · ╰── It can not be redeclared here - 6 │ } - ╰──── - - × Identifier `Bar` has already been declared - ╭─[index.js:7:1] - 7 │ export namespace Baz { - 8 │ export const Bar = 3; - · ─┬─ - · ╰── `Bar` has already been declared here - 9 │ export const Bar = 4; - · ─┬─ - · ╰── It can not be redeclared here - 10 │ } - ╰──── - - × Identifier `Foo` has already been declared - ╭─[index.js:1:1] - 1 │ - 2 │ export class Foo { } - · ─┬─ - · ╰── `Foo` has already been declared here - 3 │ export class Foo { } - · ─┬─ - · ╰── It can not be redeclared here - 4 │ export namespace Foo { } - ╰──── - - × Identifier `Foo` has already been declared - ╭─[index.js:1:1] - 1 │ - 2 │ export enum Foo { } - · ─┬─ - · ╰── `Foo` has already been declared here - 3 │ export class Foo { } - · ─┬─ - · ╰── It can not be redeclared here - 4 │ export namespace Foo { } - ╰──── - - × Identifier `Foo` has already been declared - ╭─[index.js:1:1] - 1 │ - 2 │ export const Foo = 'bar'; - · ─┬─ - · ╰── `Foo` has already been declared here - 3 │ export class Foo { } - · ─┬─ - · ╰── It can not be redeclared here - 4 │ export namespace Foo { } - ╰──── - - × Unexpected token - ╭─[index.js:1:1] - 1 │ - 2 │ export function Foo(); - · ─ - 3 │ export class Foo { } - ╰──── - - × Unexpected token - ╭─[index.js:2:1] - 2 │ export const Foo = 'bar'; - 3 │ export function Foo(); - · ─ - 4 │ export namespace Foo { } - ╰──── - - × Expected a semicolon or an implicit semicolon after a statement, but found none - ╭─[index.js:1:1] - 1 │ - 2 │ declare module "a" { - · ─ - 3 │ const Foo = 1; - ╰──── - help: Try insert a semicolon here - - diff --git a/crates/oxc_linter/src/snapshots/html_has_lang.snap b/crates/oxc_linter/src/snapshots/html_has_lang.snap index 91fa0c6205268..c87ffb90cc4da 100644 --- a/crates/oxc_linter/src/snapshots/html_has_lang.snap +++ b/crates/oxc_linter/src/snapshots/html_has_lang.snap @@ -1,6 +1,5 @@ --- source: crates/oxc_linter/src/tester.rs -assertion_line: 144 expression: html_has_lang --- ⚠ eslint-plugin-jsx-a11y(html-has-lang): Missing lang attribute. diff --git a/crates/oxc_linter/src/snapshots/img_redundant_alt.snap b/crates/oxc_linter/src/snapshots/img_redundant_alt.snap index bd6a6819ea2cd..f9933c376098d 100644 --- a/crates/oxc_linter/src/snapshots/img_redundant_alt.snap +++ b/crates/oxc_linter/src/snapshots/img_redundant_alt.snap @@ -1,6 +1,5 @@ --- source: crates/oxc_linter/src/tester.rs -assertion_line: 143 expression: img_redundant_alt --- ⚠ eslint-plugin-jsx-a11y(img-redundant-alt): Redundant alt attribute. diff --git a/crates/oxc_linter/src/snapshots/jsx_no_comment_text_nodes.snap b/crates/oxc_linter/src/snapshots/jsx_no_comment_text_nodes.snap deleted file mode 100644 index b0a0db8d18536..0000000000000 --- a/crates/oxc_linter/src/snapshots/jsx_no_comment_text_nodes.snap +++ /dev/null @@ -1,66 +0,0 @@ ---- -source: crates/oxc_linter/src/tester.rs -expression: jsx_no_comment_text_nodes ---- - ⚠ eslint-plugin-react(jsx-no-comment-TextNodes): Comments inside children section of tag should be placed inside braces - ╭─[jsx_no_comment_text_nodes.tsx:3:1] - 3 │ render() { - 4 │ return (
// invalid
); - · ────────── - 5 │ } - ╰──── - - ⚠ eslint-plugin-react(jsx-no-comment-TextNodes): Comments inside children section of tag should be placed inside braces - ╭─[jsx_no_comment_text_nodes.tsx:3:1] - 3 │ render() { - 4 │ return (<>// invalid); - · ────────── - 5 │ } - ╰──── - - ⚠ eslint-plugin-react(jsx-no-comment-TextNodes): Comments inside children section of tag should be placed inside braces - ╭─[jsx_no_comment_text_nodes.tsx:3:1] - 3 │ render() { - 4 │ return (
/* invalid */
); - · ───────────── - 5 │ } - ╰──── - - ⚠ eslint-plugin-react(jsx-no-comment-TextNodes): Comments inside children section of tag should be placed inside braces - ╭─[jsx_no_comment_text_nodes.tsx:4:1] - 4 │ return ( - 5 │ ╭─▶
- 6 │ │ // invalid - 7 │ ╰─▶
- 8 │ ); - ╰──── - - ⚠ eslint-plugin-react(jsx-no-comment-TextNodes): Comments inside children section of tag should be placed inside braces - ╭─[jsx_no_comment_text_nodes.tsx:4:1] - 4 │ return ( - 5 │ ╭─▶
- 6 │ │ asdjfl - 7 │ │ /* invalid */ - 8 │ │ foo - 9 │ ╰─▶
- 10 │ ); - ╰──── - - ⚠ eslint-plugin-react(jsx-no-comment-TextNodes): Comments inside children section of tag should be placed inside braces - ╭─[jsx_no_comment_text_nodes.tsx:5:1] - 5 │
- 6 │ ╭─▶ {'asdjfl'} - 7 │ │ // invalid - 8 │ ╰─▶ {'foo'} - 9 │
- ╰──── - - ⚠ eslint-plugin-react(jsx-no-comment-TextNodes): Comments inside children section of tag should be placed inside braces - ╭─[jsx_no_comment_text_nodes.tsx:2:1] - 2 │ const Component2 = () => { - 3 │ return /*; - · ── - 4 │ }; - ╰──── - - diff --git a/crates/oxc_linter/src/snapshots/jsx_no_undef.snap b/crates/oxc_linter/src/snapshots/jsx_no_undef.snap index 3b3467c3c53fc..ca6edade59a9f 100644 --- a/crates/oxc_linter/src/snapshots/jsx_no_undef.snap +++ b/crates/oxc_linter/src/snapshots/jsx_no_undef.snap @@ -1,6 +1,5 @@ --- source: crates/oxc_linter/src/tester.rs -assertion_line: 144 expression: jsx_no_undef --- ⚠ eslint-plugin-react(jsx-no-undef): Disallow undeclared variables in JSX diff --git a/crates/oxc_linter/src/snapshots/lang.snap b/crates/oxc_linter/src/snapshots/lang.snap index 6887f06228929..3ed0971e7a980 100644 --- a/crates/oxc_linter/src/snapshots/lang.snap +++ b/crates/oxc_linter/src/snapshots/lang.snap @@ -1,6 +1,5 @@ --- source: crates/oxc_linter/src/tester.rs -assertion_line: 144 expression: lang --- ⚠ eslint-plugin-jsx-a11y(lang): Lang attribute must have a valid value. diff --git a/crates/oxc_linter/src/snapshots/max_expects.snap b/crates/oxc_linter/src/snapshots/max_expects.snap index ed12689187d6d..ec7343a651da8 100644 --- a/crates/oxc_linter/src/snapshots/max_expects.snap +++ b/crates/oxc_linter/src/snapshots/max_expects.snap @@ -1,6 +1,5 @@ --- source: crates/oxc_linter/src/tester.rs -assertion_line: 119 expression: max_expects --- ⚠ eslint-plugin-jest(max-expects): Enforces a maximum number assertion calls in a test body. diff --git a/crates/oxc_linter/src/snapshots/no_amd.snap b/crates/oxc_linter/src/snapshots/no_amd.snap index 1ee6cc98d1a3b..ab93ac5d32d1f 100644 --- a/crates/oxc_linter/src/snapshots/no_amd.snap +++ b/crates/oxc_linter/src/snapshots/no_amd.snap @@ -1,6 +1,5 @@ --- source: crates/oxc_linter/src/tester.rs -assertion_line: 119 expression: no_amd --- ⚠ eslint-plugin-import(no-amd): Do not use AMD `require` and `define` calls. diff --git a/crates/oxc_linter/src/snapshots/no_autofocus.snap b/crates/oxc_linter/src/snapshots/no_autofocus.snap index 6c530ea21328e..58cdf5e1d0d5c 100644 --- a/crates/oxc_linter/src/snapshots/no_autofocus.snap +++ b/crates/oxc_linter/src/snapshots/no_autofocus.snap @@ -1,6 +1,5 @@ --- source: crates/oxc_linter/src/tester.rs -assertion_line: 130 expression: no_autofocus --- ⚠ eslint-plugin-jsx-a11y(no-autofocus): The `autofocus` attribute is found here, which can cause usability issues for sighted and non-sighted users diff --git a/crates/oxc_linter/src/snapshots/no_dangerously_set_inner_html.snap b/crates/oxc_linter/src/snapshots/no_dangerously_set_inner_html.snap deleted file mode 100644 index b1f592db27bc6..0000000000000 --- a/crates/oxc_linter/src/snapshots/no_dangerously_set_inner_html.snap +++ /dev/null @@ -1,33 +0,0 @@ ---- -source: crates/oxc_linter/src/tester.rs -expression: no_dangerously_set_inner_html ---- - ⚠ eslint-plugin-react(no-danger): Do not use `dangerouslySetInnerHTML` prop - ╭─[no_dangerously_set_inner_html.tsx:1:1] - 1 │
; - · ─────────────────────── - ╰──── - help: `dangerouslySetInnerHTML` is a way to inject HTML into your React component. This is dangerous because it can easily lead to XSS vulnerabilities. - - ⚠ eslint-plugin-react(no-danger): Do not use `dangerouslySetInnerHTML` prop - ╭─[no_dangerously_set_inner_html.tsx:1:1] - 1 │ ; - · ─────────────────────── - ╰──── - help: `dangerouslySetInnerHTML` is a way to inject HTML into your React component. This is dangerous because it can easily lead to XSS vulnerabilities. - - ⚠ eslint-plugin-react(no-danger): Do not use `dangerouslySetInnerHTML` prop - ╭─[no_dangerously_set_inner_html.tsx:1:1] - 1 │ React.createElement("div", { dangerouslySetInnerHTML: { __html: "" } }); - · ─────────────────────── - ╰──── - help: `dangerouslySetInnerHTML` is a way to inject HTML into your React component. This is dangerous because it can easily lead to XSS vulnerabilities. - - ⚠ eslint-plugin-react(no-danger): Do not use `dangerouslySetInnerHTML` prop - ╭─[no_dangerously_set_inner_html.tsx:1:1] - 1 │ React.createElement("button", { dangerouslySetInnerHTML: { __html: "baz" } }, "Foo"); - · ─────────────────────── - ╰──── - help: `dangerouslySetInnerHTML` is a way to inject HTML into your React component. This is dangerous because it can easily lead to XSS vulnerabilities. - - diff --git a/crates/oxc_linter/src/snapshots/no_deprecated_functions.snap b/crates/oxc_linter/src/snapshots/no_deprecated_functions.snap index 0fe9f30e86c8a..2625d8fe47a60 100644 --- a/crates/oxc_linter/src/snapshots/no_deprecated_functions.snap +++ b/crates/oxc_linter/src/snapshots/no_deprecated_functions.snap @@ -1,6 +1,5 @@ --- source: crates/oxc_linter/src/tester.rs -assertion_line: 119 expression: no_deprecated_functions --- ⚠ eslint-plugin-jest(no-deprecated-functions): Disallow use of deprecated functions diff --git a/crates/oxc_linter/src/snapshots/no_direct_mutation_state.snap b/crates/oxc_linter/src/snapshots/no_direct_mutation_state.snap index dd3db8454f887..6abf4ad2631b2 100644 --- a/crates/oxc_linter/src/snapshots/no_direct_mutation_state.snap +++ b/crates/oxc_linter/src/snapshots/no_direct_mutation_state.snap @@ -1,6 +1,5 @@ --- source: crates/oxc_linter/src/tester.rs -assertion_line: 144 expression: no_direct_mutation_state --- ⚠ eslint-plugin-react(no-direct-mutation-state): never mutate this.state directly. diff --git a/crates/oxc_linter/src/snapshots/no_distracting_elements.snap b/crates/oxc_linter/src/snapshots/no_distracting_elements.snap index c9d11dae508cc..ee8f9809e1967 100644 --- a/crates/oxc_linter/src/snapshots/no_distracting_elements.snap +++ b/crates/oxc_linter/src/snapshots/no_distracting_elements.snap @@ -1,6 +1,5 @@ --- source: crates/oxc_linter/src/tester.rs -assertion_line: 144 expression: no_distracting_elements --- ⚠ eslint-plugin-jsx-a11y(no-distracting-elements): Do not use or elements as they can create visual accessibility issues and are deprecated. diff --git a/crates/oxc_linter/src/snapshots/no_empty_character_class.snap b/crates/oxc_linter/src/snapshots/no_empty_character_class.snap index 2a798c20ff69d..d9ec2c2bebac0 100644 --- a/crates/oxc_linter/src/snapshots/no_empty_character_class.snap +++ b/crates/oxc_linter/src/snapshots/no_empty_character_class.snap @@ -1,6 +1,5 @@ --- source: crates/oxc_linter/src/tester.rs -assertion_line: 80 expression: no_empty_character_class --- ⚠ eslint(no-empty-character-class): Empty character class diff --git a/crates/oxc_linter/src/snapshots/no_extra_boolean_cast.snap b/crates/oxc_linter/src/snapshots/no_extra_boolean_cast.snap index af3566db6b220..f714bc4843a35 100644 --- a/crates/oxc_linter/src/snapshots/no_extra_boolean_cast.snap +++ b/crates/oxc_linter/src/snapshots/no_extra_boolean_cast.snap @@ -1,6 +1,5 @@ --- source: crates/oxc_linter/src/tester.rs -assertion_line: 80 expression: no_extra_boolean_cast --- ⚠ eslint(no-extra-boolean-cast): Redundant double negation diff --git a/crates/oxc_linter/src/snapshots/no_find_dom_node.snap b/crates/oxc_linter/src/snapshots/no_find_dom_node.snap index acd94d40dd03a..4cdafa29509cb 100644 --- a/crates/oxc_linter/src/snapshots/no_find_dom_node.snap +++ b/crates/oxc_linter/src/snapshots/no_find_dom_node.snap @@ -1,6 +1,5 @@ --- source: crates/oxc_linter/src/tester.rs -assertion_line: 105 expression: no_find_dom_node --- ⚠ eslint-plugin-react(no-find-dom-node): Unexpected call to `findDOMNode`. diff --git a/crates/oxc_linter/src/snapshots/no_hooks.snap b/crates/oxc_linter/src/snapshots/no_hooks.snap index df6b81c07f8c6..7a6508d6b9f18 100644 --- a/crates/oxc_linter/src/snapshots/no_hooks.snap +++ b/crates/oxc_linter/src/snapshots/no_hooks.snap @@ -1,6 +1,5 @@ --- source: crates/oxc_linter/src/tester.rs -assertion_line: 119 expression: no_hooks --- ⚠ eslint-plugin-jest(no-hooks): Disallow setup and teardown hooks. diff --git a/crates/oxc_linter/src/snapshots/no_irregular_whitespace.snap b/crates/oxc_linter/src/snapshots/no_irregular_whitespace.snap index 6a4cd9ee24efe..5ded537b75a91 100644 --- a/crates/oxc_linter/src/snapshots/no_irregular_whitespace.snap +++ b/crates/oxc_linter/src/snapshots/no_irregular_whitespace.snap @@ -1,6 +1,5 @@ --- source: crates/oxc_linter/src/tester.rs -assertion_line: 144 expression: no_irregular_whitespace --- ⚠ eslint(no-irregular-whitespace): Unexpected irregular whitespace diff --git a/crates/oxc_linter/src/snapshots/no_jsx_as_prop.snap b/crates/oxc_linter/src/snapshots/no_jsx_as_prop.snap deleted file mode 100644 index 07912913be418..0000000000000 --- a/crates/oxc_linter/src/snapshots/no_jsx_as_prop.snap +++ /dev/null @@ -1,33 +0,0 @@ ---- -source: crates/oxc_linter/src/tester.rs -expression: no_jsx_as_prop ---- - ⚠ eslint-plugin-react-perf(no-jsx-as-prop): JSX attribute values should not contain other JSX. - ╭─[no_jsx_as_prop.tsx:1:1] - 1 │ } /> - · ─────────── - ╰──── - help: simplify props or memoize props in the parent component (https://react.dev/reference/react/memo#my-component-rerenders-when-a-prop-is-an-object-or-array). - - ⚠ eslint-plugin-react-perf(no-jsx-as-prop): JSX attribute values should not contain other JSX. - ╭─[no_jsx_as_prop.tsx:1:1] - 1 │ } /> - · ─────────── - ╰──── - help: simplify props or memoize props in the parent component (https://react.dev/reference/react/memo#my-component-rerenders-when-a-prop-is-an-object-or-array). - - ⚠ eslint-plugin-react-perf(no-jsx-as-prop): JSX attribute values should not contain other JSX. - ╭─[no_jsx_as_prop.tsx:1:1] - 1 │ } /> - · ─────────── - ╰──── - help: simplify props or memoize props in the parent component (https://react.dev/reference/react/memo#my-component-rerenders-when-a-prop-is-an-object-or-array). - - ⚠ eslint-plugin-react-perf(no-jsx-as-prop): JSX attribute values should not contain other JSX. - ╭─[no_jsx_as_prop.tsx:1:1] - 1 │ )} /> - · ─────────── - ╰──── - help: simplify props or memoize props in the parent component (https://react.dev/reference/react/memo#my-component-rerenders-when-a-prop-is-an-object-or-array). - - diff --git a/crates/oxc_linter/src/snapshots/no_named_as_default.snap b/crates/oxc_linter/src/snapshots/no_named_as_default.snap index d3deae08faf2f..36f7c502b0ad4 100644 --- a/crates/oxc_linter/src/snapshots/no_named_as_default.snap +++ b/crates/oxc_linter/src/snapshots/no_named_as_default.snap @@ -1,6 +1,5 @@ --- source: crates/oxc_linter/src/tester.rs -assertion_line: 143 expression: no_named_as_default --- ⚠ eslint-plugin-import(no-named-as-default): Module "./bar" has named export "foo". Using default import as "foo" can be confusing diff --git a/crates/oxc_linter/src/snapshots/no_new_array_as_prop.snap b/crates/oxc_linter/src/snapshots/no_new_array_as_prop.snap deleted file mode 100644 index 3d2f6c3f894be..0000000000000 --- a/crates/oxc_linter/src/snapshots/no_new_array_as_prop.snap +++ /dev/null @@ -1,47 +0,0 @@ ---- -source: crates/oxc_linter/src/tester.rs -expression: no_new_array_as_prop ---- - ⚠ eslint-plugin-react-perf(no-new-array-as-prop): JSX attribute values should not contain Arrays created in the same scope. - ╭─[no_new_array_as_prop.tsx:1:1] - 1 │ - · ── - ╰──── - help: simplify props or memoize props in the parent component (https://react.dev/reference/react/memo#my-component-rerenders-when-a-prop-is-an-object-or-array). - - ⚠ eslint-plugin-react-perf(no-new-array-as-prop): JSX attribute values should not contain Arrays created in the same scope. - ╭─[no_new_array_as_prop.tsx:1:1] - 1 │ - · ─────────── - ╰──── - help: simplify props or memoize props in the parent component (https://react.dev/reference/react/memo#my-component-rerenders-when-a-prop-is-an-object-or-array). - - ⚠ eslint-plugin-react-perf(no-new-array-as-prop): JSX attribute values should not contain Arrays created in the same scope. - ╭─[no_new_array_as_prop.tsx:1:1] - 1 │ - · ─────── - ╰──── - help: simplify props or memoize props in the parent component (https://react.dev/reference/react/memo#my-component-rerenders-when-a-prop-is-an-object-or-array). - - ⚠ eslint-plugin-react-perf(no-new-array-as-prop): JSX attribute values should not contain Arrays created in the same scope. - ╭─[no_new_array_as_prop.tsx:1:1] - 1 │ - · ── - ╰──── - help: simplify props or memoize props in the parent component (https://react.dev/reference/react/memo#my-component-rerenders-when-a-prop-is-an-object-or-array). - - ⚠ eslint-plugin-react-perf(no-new-array-as-prop): JSX attribute values should not contain Arrays created in the same scope. - ╭─[no_new_array_as_prop.tsx:1:1] - 1 │ - · ── - ╰──── - help: simplify props or memoize props in the parent component (https://react.dev/reference/react/memo#my-component-rerenders-when-a-prop-is-an-object-or-array). - - ⚠ eslint-plugin-react-perf(no-new-array-as-prop): JSX attribute values should not contain Arrays created in the same scope. - ╭─[no_new_array_as_prop.tsx:1:1] - 1 │ - · ── - ╰──── - help: simplify props or memoize props in the parent component (https://react.dev/reference/react/memo#my-component-rerenders-when-a-prop-is-an-object-or-array). - - diff --git a/crates/oxc_linter/src/snapshots/no_new_function_as_props.snap b/crates/oxc_linter/src/snapshots/no_new_function_as_props.snap deleted file mode 100644 index 184183d306b0b..0000000000000 --- a/crates/oxc_linter/src/snapshots/no_new_function_as_props.snap +++ /dev/null @@ -1,68 +0,0 @@ ---- -source: crates/oxc_linter/src/tester.rs -expression: no_new_function_as_props ---- - ⚠ eslint-plugin-react-perf(no-new-function-as-props): JSX attribute values should not contain functions created in the same scope. - ╭─[no_new_function_as_props.tsx:1:1] - 1 │ - · ─────────────────────── - ╰──── - help: simplify props or memoize props in the parent component (https://react.dev/reference/react/memo#my-component-rerenders-when-a-prop-is-an-object-or-array). - - ⚠ eslint-plugin-react-perf(no-new-function-as-props): JSX attribute values should not contain functions created in the same scope. - ╭─[no_new_function_as_props.tsx:1:1] - 1 │ true} /> - · ────────── - ╰──── - help: simplify props or memoize props in the parent component (https://react.dev/reference/react/memo#my-component-rerenders-when-a-prop-is-an-object-or-array). - - ⚠ eslint-plugin-react-perf(no-new-function-as-props): JSX attribute values should not contain functions created in the same scope. - ╭─[no_new_function_as_props.tsx:1:1] - 1 │ - · ───────────────────────────── - ╰──── - help: simplify props or memoize props in the parent component (https://react.dev/reference/react/memo#my-component-rerenders-when-a-prop-is-an-object-or-array). - - ⚠ eslint-plugin-react-perf(no-new-function-as-props): JSX attribute values should not contain functions created in the same scope. - ╭─[no_new_function_as_props.tsx:1:1] - 1 │ - · ────────── - ╰──── - help: simplify props or memoize props in the parent component (https://react.dev/reference/react/memo#my-component-rerenders-when-a-prop-is-an-object-or-array). - - ⚠ eslint-plugin-react-perf(no-new-function-as-props): JSX attribute values should not contain functions created in the same scope. - ╭─[no_new_function_as_props.tsx:1:1] - 1 │ - · ──────────────────────────── - ╰──── - help: simplify props or memoize props in the parent component (https://react.dev/reference/react/memo#my-component-rerenders-when-a-prop-is-an-object-or-array). - - ⚠ eslint-plugin-react-perf(no-new-function-as-props): JSX attribute values should not contain functions created in the same scope. - ╭─[no_new_function_as_props.tsx:1:1] - 1 │ - · ───────────── - ╰──── - help: simplify props or memoize props in the parent component (https://react.dev/reference/react/memo#my-component-rerenders-when-a-prop-is-an-object-or-array). - - ⚠ eslint-plugin-react-perf(no-new-function-as-props): JSX attribute values should not contain functions created in the same scope. - ╭─[no_new_function_as_props.tsx:1:1] - 1 │ - · ───────────── - ╰──── - help: simplify props or memoize props in the parent component (https://react.dev/reference/react/memo#my-component-rerenders-when-a-prop-is-an-object-or-array). - - ⚠ eslint-plugin-react-perf(no-new-function-as-props): JSX attribute values should not contain functions created in the same scope. - ╭─[no_new_function_as_props.tsx:1:1] - 1 │ - · ──────────── - ╰──── - help: simplify props or memoize props in the parent component (https://react.dev/reference/react/memo#my-component-rerenders-when-a-prop-is-an-object-or-array). - - ⚠ eslint-plugin-react-perf(no-new-function-as-props): JSX attribute values should not contain functions created in the same scope. - ╭─[no_new_function_as_props.tsx:1:1] - 1 │ - · ──────────── - ╰──── - help: simplify props or memoize props in the parent component (https://react.dev/reference/react/memo#my-component-rerenders-when-a-prop-is-an-object-or-array). - - diff --git a/crates/oxc_linter/src/snapshots/no_new_object_as_prop.snap b/crates/oxc_linter/src/snapshots/no_new_object_as_prop.snap deleted file mode 100644 index 3e76bf107b5d2..0000000000000 --- a/crates/oxc_linter/src/snapshots/no_new_object_as_prop.snap +++ /dev/null @@ -1,54 +0,0 @@ ---- -source: crates/oxc_linter/src/tester.rs -expression: no_new_object_as_prop ---- - ⚠ eslint-plugin-react-perf(no-new-object-as-prop): JSX attribute values should not contain objects created in the same scope. - ╭─[no_new_object_as_prop.tsx:1:1] - 1 │ - · ── - ╰──── - help: simplify props or memoize props in the parent component (https://react.dev/reference/react/memo#my-component-rerenders-when-a-prop-is-an-object-or-array). - - ⚠ eslint-plugin-react-perf(no-new-object-as-prop): JSX attribute values should not contain objects created in the same scope. - ╭─[no_new_object_as_prop.tsx:1:1] - 1 │ - · ──────────── - ╰──── - help: simplify props or memoize props in the parent component (https://react.dev/reference/react/memo#my-component-rerenders-when-a-prop-is-an-object-or-array). - - ⚠ eslint-plugin-react-perf(no-new-object-as-prop): JSX attribute values should not contain objects created in the same scope. - ╭─[no_new_object_as_prop.tsx:1:1] - 1 │ - · ──────── - ╰──── - help: simplify props or memoize props in the parent component (https://react.dev/reference/react/memo#my-component-rerenders-when-a-prop-is-an-object-or-array). - - ⚠ eslint-plugin-react-perf(no-new-object-as-prop): JSX attribute values should not contain objects created in the same scope. - ╭─[no_new_object_as_prop.tsx:1:1] - 1 │
- · ───────────────── - ╰──── - help: simplify props or memoize props in the parent component (https://react.dev/reference/react/memo#my-component-rerenders-when-a-prop-is-an-object-or-array). - - ⚠ eslint-plugin-react-perf(no-new-object-as-prop): JSX attribute values should not contain objects created in the same scope. - ╭─[no_new_object_as_prop.tsx:1:1] - 1 │ - · ── - ╰──── - help: simplify props or memoize props in the parent component (https://react.dev/reference/react/memo#my-component-rerenders-when-a-prop-is-an-object-or-array). - - ⚠ eslint-plugin-react-perf(no-new-object-as-prop): JSX attribute values should not contain objects created in the same scope. - ╭─[no_new_object_as_prop.tsx:1:1] - 1 │ - · ── - ╰──── - help: simplify props or memoize props in the parent component (https://react.dev/reference/react/memo#my-component-rerenders-when-a-prop-is-an-object-or-array). - - ⚠ eslint-plugin-react-perf(no-new-object-as-prop): JSX attribute values should not contain objects created in the same scope. - ╭─[no_new_object_as_prop.tsx:1:1] - 1 │ - · ── - ╰──── - help: simplify props or memoize props in the parent component (https://react.dev/reference/react/memo#my-component-rerenders-when-a-prop-is-an-object-or-array). - - diff --git a/crates/oxc_linter/src/snapshots/no_restricted_jest_methods.snap b/crates/oxc_linter/src/snapshots/no_restricted_jest_methods.snap index 3eaa7b25991d7..8e00cc5b9ab91 100644 --- a/crates/oxc_linter/src/snapshots/no_restricted_jest_methods.snap +++ b/crates/oxc_linter/src/snapshots/no_restricted_jest_methods.snap @@ -1,6 +1,5 @@ --- source: crates/oxc_linter/src/tester.rs -assertion_line: 143 expression: no_restricted_jest_methods --- ⚠ eslint-plugin-jest(no-restricted-jest-methods): Disallow specific `jest.` methods diff --git a/crates/oxc_linter/src/snapshots/no_restricted_matchers.snap b/crates/oxc_linter/src/snapshots/no_restricted_matchers.snap index 3f30bb2225d9d..5c389d45707d1 100644 --- a/crates/oxc_linter/src/snapshots/no_restricted_matchers.snap +++ b/crates/oxc_linter/src/snapshots/no_restricted_matchers.snap @@ -1,6 +1,5 @@ --- source: crates/oxc_linter/src/tester.rs -assertion_line: 143 expression: no_restricted_matchers --- ⚠ eslint-plugin-jest(no-restricted-matchers): Disallow specific matchers & modifiers diff --git a/crates/oxc_linter/src/snapshots/no_return_await.snap b/crates/oxc_linter/src/snapshots/no_return_await.snap index 414abf41a247f..fbd306f38ea09 100644 --- a/crates/oxc_linter/src/snapshots/no_return_await.snap +++ b/crates/oxc_linter/src/snapshots/no_return_await.snap @@ -1,6 +1,5 @@ --- source: crates/oxc_linter/src/tester.rs -assertion_line: 67 expression: no_return_await --- ⚠ eslint(no-return-await): Redundant use of `await` on a return value. diff --git a/crates/oxc_linter/src/snapshots/no_self_import.snap b/crates/oxc_linter/src/snapshots/no_self_import.snap deleted file mode 100644 index a8eae130c6ff8..0000000000000 --- a/crates/oxc_linter/src/snapshots/no_self_import.snap +++ /dev/null @@ -1,47 +0,0 @@ ---- -source: crates/oxc_linter/src/tester.rs -expression: no_self_import ---- - ⚠ eslint-plugin-import(no-self-import): module importing itself is not allowed - ╭─[no-self-import.js:1:1] - 1 │ import bar from './no-self-import' - · ────────────────── - ╰──── - - ⚠ eslint-plugin-import(no-self-import): module importing itself is not allowed - ╭─[no-self-import.js:1:1] - 1 │ var bar = require('./no-self-import') - · ────────────────── - ╰──── - - ⚠ eslint-plugin-import(no-self-import): module importing itself is not allowed - ╭─[no-self-import.js:1:1] - 1 │ var bar = require('./no-self-import.js') - · ───────────────────── - ╰──── - - ⚠ eslint-plugin-import(no-self-import): module importing itself is not allowed - ╭─[index.js:1:1] - 1 │ var bar = require('.') - · ─── - ╰──── - - ⚠ eslint-plugin-import(no-self-import): module importing itself is not allowed - ╭─[index.js:1:1] - 1 │ var bar = require('./') - · ──── - ╰──── - - ⚠ eslint-plugin-import(no-self-import): module importing itself is not allowed - ╭─[index.js:1:1] - 1 │ var bar = require('././././') - · ────────── - ╰──── - - ⚠ eslint-plugin-import(no-self-import): module importing itself is not allowed - ╭─[no-self-import-folder/index.js:1:1] - 1 │ var bar = require('../no-self-import-folder') - · ────────────────────────── - ╰──── - - diff --git a/crates/oxc_linter/src/snapshots/no_test_return_statement.snap b/crates/oxc_linter/src/snapshots/no_test_return_statement.snap index 3addbb9af47ed..0c7e04698e486 100644 --- a/crates/oxc_linter/src/snapshots/no_test_return_statement.snap +++ b/crates/oxc_linter/src/snapshots/no_test_return_statement.snap @@ -1,6 +1,5 @@ --- source: crates/oxc_linter/src/tester.rs -assertion_line: 144 expression: no_test_return_statement --- ⚠ eslint-plugin-jest(no-test-return-statement): Jest tests should not return a value diff --git a/crates/oxc_linter/src/snapshots/no_unknown_property.snap b/crates/oxc_linter/src/snapshots/no_unknown_property.snap index 9e2f3525bfaa4..ec81b910f1da3 100644 --- a/crates/oxc_linter/src/snapshots/no_unknown_property.snap +++ b/crates/oxc_linter/src/snapshots/no_unknown_property.snap @@ -1,6 +1,5 @@ --- source: crates/oxc_linter/src/tester.rs -assertion_line: 144 expression: no_unknown_property --- ⚠ eslint-plugin-react(no-unknown-property): Unknown property found diff --git a/crates/oxc_linter/src/snapshots/no_var.snap b/crates/oxc_linter/src/snapshots/no_var.snap index 0e5983e905936..4a48da2f7ade1 100644 --- a/crates/oxc_linter/src/snapshots/no_var.snap +++ b/crates/oxc_linter/src/snapshots/no_var.snap @@ -1,6 +1,5 @@ --- source: crates/oxc_linter/src/tester.rs -assertion_line: 144 expression: no_var --- ⚠ eslint(no-var): Unexpected var, use let or const instead. diff --git a/crates/oxc_linter/src/snapshots/no_void.snap b/crates/oxc_linter/src/snapshots/no_void.snap index b22680b2fe177..1f3dd1b84369f 100644 --- a/crates/oxc_linter/src/snapshots/no_void.snap +++ b/crates/oxc_linter/src/snapshots/no_void.snap @@ -1,6 +1,5 @@ --- source: crates/oxc_linter/src/tester.rs -assertion_line: 150 expression: no_void --- ⚠ eslint(no-void): Disallow `void` operators diff --git a/crates/oxc_linter/src/snapshots/number_literal_case.snap b/crates/oxc_linter/src/snapshots/number_literal_case.snap index ad23373a71c23..f610eff544371 100644 --- a/crates/oxc_linter/src/snapshots/number_literal_case.snap +++ b/crates/oxc_linter/src/snapshots/number_literal_case.snap @@ -1,6 +1,5 @@ --- source: crates/oxc_linter/src/tester.rs -assertion_line: 119 expression: number_literal_case --- ⚠ eslint-plugin-unicorn(number-literal-case): Unexpected number literal prefix in uppercase. diff --git a/crates/oxc_linter/src/snapshots/prefer_called_with.snap b/crates/oxc_linter/src/snapshots/prefer_called_with.snap index 70af1aaf98094..b741646aaee54 100644 --- a/crates/oxc_linter/src/snapshots/prefer_called_with.snap +++ b/crates/oxc_linter/src/snapshots/prefer_called_with.snap @@ -1,6 +1,5 @@ --- source: crates/oxc_linter/src/tester.rs -assertion_line: 150 expression: prefer_called_with --- ⚠ eslint-plugin-jest(prefer-called-with): Suggest using `toBeCalledWith()` or `toHaveBeenCalledWith()`. diff --git a/crates/oxc_linter/src/snapshots/prefer_todo.snap b/crates/oxc_linter/src/snapshots/prefer_todo.snap index f08e1866bb70e..a071e4e16175e 100644 --- a/crates/oxc_linter/src/snapshots/prefer_todo.snap +++ b/crates/oxc_linter/src/snapshots/prefer_todo.snap @@ -1,6 +1,5 @@ --- source: crates/oxc_linter/src/tester.rs -assertion_line: 105 expression: prefer_todo --- ⚠ eslint-plugin-jest(prefer-todo): Suggest using `test.todo`. diff --git a/crates/oxc_linter/src/snapshots/role_support_aria_props.snap b/crates/oxc_linter/src/snapshots/role_support_aria_props.snap deleted file mode 100644 index 30926a3fb86da..0000000000000 --- a/crates/oxc_linter/src/snapshots/role_support_aria_props.snap +++ /dev/null @@ -1,257 +0,0 @@ ---- -source: crates/oxc_linter/src/tester.rs -expression: role_support_aria_props ---- - ⚠ eslint-plugin-jsx-a11y(role-support-aria-props): The attribute aria-checked is not supported by the role link. This role is implicit on the element a. - ╭─[role_support_aria_props.tsx:1:1] - 1 │ - · ──────────── - ╰──── - help: Try to remove invalid attribute aria-checked. - - ⚠ eslint-plugin-jsx-a11y(role-support-aria-props): The attribute aria-checked is not supported by the role link. This role is implicit on the element area. - ╭─[role_support_aria_props.tsx:1:1] - 1 │ - · ──────────── - ╰──── - help: Try to remove invalid attribute aria-checked. - - ⚠ eslint-plugin-jsx-a11y(role-support-aria-props): The attribute aria-checked is not supported by the role link. This role is implicit on the element link. - ╭─[role_support_aria_props.tsx:1:1] - 1 │ - · ──────────── - ╰──── - help: Try to remove invalid attribute aria-checked. - - ⚠ eslint-plugin-jsx-a11y(role-support-aria-props): The attribute aria-checked is not supported by the role img. This role is implicit on the element img. - ╭─[role_support_aria_props.tsx:1:1] - 1 │ foobar - · ──────────── - ╰──── - help: Try to remove invalid attribute aria-checked. - - ⚠ eslint-plugin-jsx-a11y(role-support-aria-props): The attribute aria-checked is not supported by the role toolbar. This role is implicit on the element menu. - ╭─[role_support_aria_props.tsx:1:1] - 1 │ - · ──────────── - ╰──── - help: Try to remove invalid attribute aria-checked. - - ⚠ eslint-plugin-jsx-a11y(role-support-aria-props): The attribute aria-checked is not supported by the role complementary. This role is implicit on the element aside. - ╭─[role_support_aria_props.tsx:1:1] - 1 │