Skip to content

Commit

Permalink
fix(plugin-eslint): consider defaultOptions to ensure rule slugs from…
Browse files Browse the repository at this point in the history
… runner match
  • Loading branch information
matejchalk committed Dec 17, 2024
1 parent 03f5e61 commit 13de4b5
Show file tree
Hide file tree
Showing 14 changed files with 157 additions and 116 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ exports[`eslintPlugin > should initialize ESLint plugin for React application 1`
{
"description": "ESLint rule **no-cond-assign**.",
"docsUrl": "https://eslint.org/docs/latest/rules/no-cond-assign",
"slug": "no-cond-assign",
"slug": "no-cond-assign-4da1eac06e945b1a",
"title": "Disallow assignment operators in conditional expressions",
},
{
Expand All @@ -24,31 +24,31 @@ exports[`eslintPlugin > should initialize ESLint plugin for React application 1`
{
"description": "ESLint rule **no-invalid-regexp**.",
"docsUrl": "https://eslint.org/docs/latest/rules/no-invalid-regexp",
"slug": "no-invalid-regexp",
"slug": "no-invalid-regexp-9b874a94de5d65c6",
"title": "Disallow invalid regular expression strings in \`RegExp\` constructors",
},
{
"description": "ESLint rule **no-undef**.",
"docsUrl": "https://eslint.org/docs/latest/rules/no-undef",
"slug": "no-undef",
"slug": "no-undef-1c0a571cbd314966",
"title": "Disallow the use of undeclared variables unless mentioned in \`/*global */\` comments",
},
{
"description": "ESLint rule **no-unreachable-loop**.",
"docsUrl": "https://eslint.org/docs/latest/rules/no-unreachable-loop",
"slug": "no-unreachable-loop",
"slug": "no-unreachable-loop-6bd5152d46f5cba7",
"title": "Disallow loops with a body that allows only one iteration",
},
{
"description": "ESLint rule **no-unsafe-negation**.",
"docsUrl": "https://eslint.org/docs/latest/rules/no-unsafe-negation",
"slug": "no-unsafe-negation",
"slug": "no-unsafe-negation-1c3a548d96c1e95f",
"title": "Disallow negating the left operand of relational operators",
},
{
"description": "ESLint rule **no-unsafe-optional-chaining**.",
"docsUrl": "https://eslint.org/docs/latest/rules/no-unsafe-optional-chaining",
"slug": "no-unsafe-optional-chaining",
"slug": "no-unsafe-optional-chaining-0724d742fbe97cb2",
"title": "Disallow use of optional chaining in contexts where the \`undefined\` value is not allowed",
},
{
Expand All @@ -60,31 +60,31 @@ exports[`eslintPlugin > should initialize ESLint plugin for React application 1`
{
"description": "ESLint rule **use-isnan**.",
"docsUrl": "https://eslint.org/docs/latest/rules/use-isnan",
"slug": "use-isnan",
"slug": "use-isnan-20b8ba68b5cc1ea7",
"title": "Require calls to \`isNaN()\` when checking for \`NaN\`",
},
{
"description": "ESLint rule **valid-typeof**.",
"docsUrl": "https://eslint.org/docs/latest/rules/valid-typeof",
"slug": "valid-typeof",
"slug": "valid-typeof-19926c783be07085",
"title": "Enforce comparing \`typeof\` expressions against valid strings",
},
{
"description": "ESLint rule **arrow-body-style**.",
"docsUrl": "https://eslint.org/docs/latest/rules/arrow-body-style",
"slug": "arrow-body-style",
"slug": "arrow-body-style-61b676e8783b0a34",
"title": "Require braces around arrow function bodies",
},
{
"description": "ESLint rule **camelcase**.",
"docsUrl": "https://eslint.org/docs/latest/rules/camelcase",
"slug": "camelcase",
"slug": "camelcase-3568b92e56d6fcb0",
"title": "Enforce camelcase naming convention",
},
{
"description": "ESLint rule **curly**.",
"docsUrl": "https://eslint.org/docs/latest/rules/curly",
"slug": "curly",
"slug": "curly-da196f7d88e0421b",
"title": "Enforce consistent brace style for all control statements",
},
{
Expand All @@ -108,7 +108,7 @@ exports[`eslintPlugin > should initialize ESLint plugin for React application 1`
{
"description": "ESLint rule **no-shadow**.",
"docsUrl": "https://eslint.org/docs/latest/rules/no-shadow",
"slug": "no-shadow",
"slug": "no-shadow-b9e07f46bb0b5444",
"title": "Disallow variable declarations from shadowing variables declared in the outer scope",
},
{
Expand All @@ -126,13 +126,13 @@ exports[`eslintPlugin > should initialize ESLint plugin for React application 1`
{
"description": "ESLint rule **prefer-arrow-callback**.",
"docsUrl": "https://eslint.org/docs/latest/rules/prefer-arrow-callback",
"slug": "prefer-arrow-callback",
"slug": "prefer-arrow-callback-81999cc2a4967394",
"title": "Require using arrow functions for callbacks",
},
{
"description": "ESLint rule **prefer-const**.",
"docsUrl": "https://eslint.org/docs/latest/rules/prefer-const",
"slug": "prefer-const",
"slug": "prefer-const-519d0b1dc698e7d6",
"title": "Require \`const\` declarations for variables that are never reassigned after declared",
},
{
Expand All @@ -144,7 +144,7 @@ exports[`eslintPlugin > should initialize ESLint plugin for React application 1`
{
"description": "ESLint rule **yoda**.",
"docsUrl": "https://eslint.org/docs/latest/rules/yoda",
"slug": "yoda",
"slug": "yoda-e0d68df5f54f65ab",
"title": "Require or disallow "Yoda" conditions",
},
{
Expand Down Expand Up @@ -197,7 +197,7 @@ exports[`eslintPlugin > should initialize ESLint plugin for React application 1`
"description": "Code that either will cause an error or may cause confusing behavior. Developers should consider this a high priority to resolve.",
"refs": [
{
"slug": "no-cond-assign",
"slug": "no-cond-assign-4da1eac06e945b1a",
"weight": 1,
},
{
Expand All @@ -209,35 +209,35 @@ exports[`eslintPlugin > should initialize ESLint plugin for React application 1`
"weight": 1,
},
{
"slug": "no-invalid-regexp",
"slug": "no-invalid-regexp-9b874a94de5d65c6",
"weight": 1,
},
{
"slug": "no-undef",
"slug": "no-undef-1c0a571cbd314966",
"weight": 1,
},
{
"slug": "no-unreachable-loop",
"slug": "no-unreachable-loop-6bd5152d46f5cba7",
"weight": 1,
},
{
"slug": "no-unsafe-negation",
"slug": "no-unsafe-negation-1c3a548d96c1e95f",
"weight": 1,
},
{
"slug": "no-unsafe-optional-chaining",
"slug": "no-unsafe-optional-chaining-0724d742fbe97cb2",
"weight": 1,
},
{
"slug": "no-unused-vars",
"weight": 1,
},
{
"slug": "use-isnan",
"slug": "use-isnan-20b8ba68b5cc1ea7",
"weight": 1,
},
{
"slug": "valid-typeof",
"slug": "valid-typeof-19926c783be07085",
"weight": 1,
},
{
Expand All @@ -252,15 +252,15 @@ exports[`eslintPlugin > should initialize ESLint plugin for React application 1`
"description": "Something that could be done in a better way but no errors will occur if the code isn't changed.",
"refs": [
{
"slug": "arrow-body-style",
"slug": "arrow-body-style-61b676e8783b0a34",
"weight": 1,
},
{
"slug": "camelcase",
"slug": "camelcase-3568b92e56d6fcb0",
"weight": 1,
},
{
"slug": "curly",
"slug": "curly-da196f7d88e0421b",
"weight": 1,
},
{
Expand All @@ -276,7 +276,7 @@ exports[`eslintPlugin > should initialize ESLint plugin for React application 1`
"weight": 1,
},
{
"slug": "no-shadow",
"slug": "no-shadow-b9e07f46bb0b5444",
"weight": 1,
},
{
Expand All @@ -288,19 +288,19 @@ exports[`eslintPlugin > should initialize ESLint plugin for React application 1`
"weight": 1,
},
{
"slug": "prefer-arrow-callback",
"slug": "prefer-arrow-callback-81999cc2a4967394",
"weight": 1,
},
{
"slug": "prefer-const",
"slug": "prefer-const-519d0b1dc698e7d6",
"weight": 1,
},
{
"slug": "prefer-object-spread",
"weight": 1,
},
{
"slug": "yoda",
"slug": "yoda-e0d68df5f54f65ab",
"weight": 1,
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ exports[`executeRunner > should execute ESLint and create audit results for Reac
},
"displayValue": "passed",
"score": 1,
"slug": "no-cond-assign",
"slug": "no-cond-assign-4da1eac06e945b1a",
"value": 0,
},
{
Expand All @@ -35,7 +35,7 @@ exports[`executeRunner > should execute ESLint and create audit results for Reac
},
"displayValue": "passed",
"score": 1,
"slug": "no-invalid-regexp",
"slug": "no-invalid-regexp-9b874a94de5d65c6",
"value": 0,
},
{
Expand All @@ -44,7 +44,7 @@ exports[`executeRunner > should execute ESLint and create audit results for Reac
},
"displayValue": "passed",
"score": 1,
"slug": "no-undef",
"slug": "no-undef-1c0a571cbd314966",
"value": 0,
},
{
Expand All @@ -53,7 +53,7 @@ exports[`executeRunner > should execute ESLint and create audit results for Reac
},
"displayValue": "passed",
"score": 1,
"slug": "no-unreachable-loop",
"slug": "no-unreachable-loop-6bd5152d46f5cba7",
"value": 0,
},
{
Expand All @@ -62,7 +62,7 @@ exports[`executeRunner > should execute ESLint and create audit results for Reac
},
"displayValue": "passed",
"score": 1,
"slug": "no-unsafe-negation",
"slug": "no-unsafe-negation-1c3a548d96c1e95f",
"value": 0,
},
{
Expand All @@ -71,7 +71,7 @@ exports[`executeRunner > should execute ESLint and create audit results for Reac
},
"displayValue": "passed",
"score": 1,
"slug": "no-unsafe-optional-chaining",
"slug": "no-unsafe-optional-chaining-0724d742fbe97cb2",
"value": 0,
},
{
Expand Down Expand Up @@ -103,7 +103,7 @@ exports[`executeRunner > should execute ESLint and create audit results for Reac
},
"displayValue": "passed",
"score": 1,
"slug": "use-isnan",
"slug": "use-isnan-20b8ba68b5cc1ea7",
"value": 0,
},
{
Expand All @@ -112,7 +112,7 @@ exports[`executeRunner > should execute ESLint and create audit results for Reac
},
"displayValue": "passed",
"score": 1,
"slug": "valid-typeof",
"slug": "valid-typeof-19926c783be07085",
"value": 0,
},
{
Expand All @@ -135,7 +135,7 @@ exports[`executeRunner > should execute ESLint and create audit results for Reac
},
"displayValue": "1 warning",
"score": 0,
"slug": "arrow-body-style",
"slug": "arrow-body-style-61b676e8783b0a34",
"value": 1,
},
{
Expand All @@ -144,7 +144,7 @@ exports[`executeRunner > should execute ESLint and create audit results for Reac
},
"displayValue": "passed",
"score": 1,
"slug": "camelcase",
"slug": "camelcase-3568b92e56d6fcb0",
"value": 0,
},
{
Expand All @@ -153,7 +153,7 @@ exports[`executeRunner > should execute ESLint and create audit results for Reac
},
"displayValue": "passed",
"score": 1,
"slug": "curly",
"slug": "curly-da196f7d88e0421b",
"value": 0,
},
{
Expand Down Expand Up @@ -257,7 +257,7 @@ exports[`executeRunner > should execute ESLint and create audit results for Reac
},
"displayValue": "3 warnings",
"score": 0,
"slug": "no-shadow",
"slug": "no-shadow-b9e07f46bb0b5444",
"value": 3,
},
{
Expand Down Expand Up @@ -324,7 +324,7 @@ exports[`executeRunner > should execute ESLint and create audit results for Reac
},
"displayValue": "passed",
"score": 1,
"slug": "prefer-arrow-callback",
"slug": "prefer-arrow-callback-81999cc2a4967394",
"value": 0,
},
{
Expand All @@ -347,7 +347,7 @@ exports[`executeRunner > should execute ESLint and create audit results for Reac
},
"displayValue": "1 warning",
"score": 0,
"slug": "prefer-const",
"slug": "prefer-const-519d0b1dc698e7d6",
"value": 1,
},
{
Expand All @@ -365,7 +365,7 @@ exports[`executeRunner > should execute ESLint and create audit results for Reac
},
"displayValue": "passed",
"score": 1,
"slug": "yoda",
"slug": "yoda-e0d68df5f54f65ab",
"value": 0,
},
{
Expand Down
Loading

0 comments on commit 13de4b5

Please sign in to comment.