Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update metadata for the external rules #4107

Merged
merged 5 commits into from
Aug 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions its/plugin/projects/eslint_report/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
"browser": true,
"es6": true
},
"extends": "eslint:recommended",
"extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended"],
"parserOptions": {
"sourceType": "module"
},
"parser": "typescript-eslint-parser",
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint"],
"rules": {
"linebreak-style": [
"error",
Expand Down
2,009 changes: 1,135 additions & 874 deletions its/plugin/projects/eslint_report/package-lock.json

Large diffs are not rendered by default.

7 changes: 4 additions & 3 deletions its/plugin/projects/eslint_report/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@
"author": "",
"license": "ISC",
"dependencies": {
"eslint": "^4.19.1",
"typescript": "^2.8.3",
"typescript-eslint-parser": "^15.0.0"
"@typescript-eslint/eslint-plugin": "^6.4.1",
"@typescript-eslint/parser": "^6.4.1",
"eslint": "^8.48.0",
"typescript": "^5.1.0"
}
}
56 changes: 34 additions & 22 deletions its/plugin/projects/eslint_report/report.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
"filePath": "src/file.js",
"messages": [
{
"ruleId": "no-unused-vars",
"ruleId": "@typescript-eslint/no-unused-vars",
"severity": 2,
"message": "'addOne' is defined but never used.",
"line": 1,
"column": 10,
"nodeType": "Identifier",
"source": "function addOne(i) {",
"messageId": "unusedVar",
"endLine": 1,
"endColumn": 16
},
Expand All @@ -20,7 +20,7 @@
"line": 2,
"column": 7,
"nodeType": "BinaryExpression",
"source": " if (i != NaN) {",
"messageId": "comparisonWithNaN",
"endLine": 2,
"endColumn": 15
},
Expand All @@ -31,7 +31,9 @@
"line": 3,
"column": 18,
"nodeType": "ReturnStatement",
"source": " return i ++",
"messageId": "missingSemi",
"endLine": 4,
"endColumn": 1,
"fix": {
"range": [
56,
Expand All @@ -47,7 +49,9 @@
"line": 5,
"column": 11,
"nodeType": "ReturnStatement",
"source": " return",
"messageId": "missingSemi",
"endLine": 6,
"endColumn": 1,
"fix": {
"range": [
78,
Expand All @@ -63,7 +67,6 @@
"line": 7,
"column": 2,
"nodeType": "EmptyStatement",
"source": "};",
"messageId": "unexpected",
"endLine": 7,
"endColumn": 3,
Expand All @@ -76,23 +79,26 @@
}
}
],
"suppressedMessages": [],
"errorCount": 5,
"fatalErrorCount": 0,
"warningCount": 0,
"fixableErrorCount": 3,
"fixableWarningCount": 0,
"source": "function addOne(i) {\n if (i != NaN) {\n return i ++\n } else {\n return\n }\n};\n"
"source": "function addOne(i) {\n if (i != NaN) {\n return i ++\n } else {\n return\n }\n};\n",
"usedDeprecatedRules": []
},
{
"filePath": "src/file.ts",
"messages": [
{
"ruleId": "no-unused-vars",
"ruleId": "@typescript-eslint/no-unused-vars",
"severity": 2,
"message": "'addOne' is defined but never used.",
"line": 1,
"column": 10,
"nodeType": "Identifier",
"source": "function addOne(i: number) {",
"messageId": "unusedVar",
"endLine": 1,
"endColumn": 16
},
Expand All @@ -103,7 +109,7 @@
"line": 2,
"column": 7,
"nodeType": "BinaryExpression",
"source": " if (i != NaN) {",
"messageId": "comparisonWithNaN",
"endLine": 2,
"endColumn": 15
},
Expand All @@ -112,13 +118,15 @@
"severity": 2,
"message": "Missing semicolon.",
"line": 3,
"column": 18,
"column": 16,
"nodeType": "ReturnStatement",
"source": " return i ++",
"messageId": "missingSemi",
"endLine": 4,
"endColumn": 1,
"fix": {
"range": [
64,
64
62,
62
],
"text": ";"
}
Expand All @@ -130,11 +138,13 @@
"line": 5,
"column": 11,
"nodeType": "ReturnStatement",
"source": " return",
"messageId": "missingSemi",
"endLine": 6,
"endColumn": 1,
"fix": {
"range": [
86,
86
84,
84
],
"text": ";"
}
Expand All @@ -146,23 +156,25 @@
"line": 7,
"column": 2,
"nodeType": "EmptyStatement",
"source": "};",
"messageId": "unexpected",
"endLine": 7,
"endColumn": 3,
"fix": {
"range": [
91,
93
89,
91
],
"text": "}"
}
}
],
"suppressedMessages": [],
"errorCount": 5,
"fatalErrorCount": 0,
"warningCount": 0,
"fixableErrorCount": 3,
"fixableWarningCount": 0,
"source": "function addOne(i: number) {\n if (i != NaN) {\n return i ++\n } else {\n return\n }\n};"
"source": "function addOne(i: number) {\n if (i != NaN) {\n return i ++\n } else {\n return\n }\n};",
"usedDeprecatedRules": []
}
]
]
2 changes: 1 addition & 1 deletion its/plugin/projects/eslint_report/src/file.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
function addOne(i: number) {
if (i != NaN) {
return i ++
return i ++
} else {
return
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ private void assertIssues(String projectKey) {
assertThat(jsIssuesList)
.extracting(Issue::getLine, Issue::getRule)
.containsExactlyInAnyOrder(
tuple(1, "external_eslint_repo:no-unused-vars"),
tuple(1, "external_eslint_repo:@typescript-eslint/no-unused-vars"),
tuple(2, "external_eslint_repo:use-isnan"),
tuple(3, "external_eslint_repo:semi"),
tuple(5, "external_eslint_repo:semi"),
Expand All @@ -104,7 +104,7 @@ private void assertIssues(String projectKey) {
assertThat(tsIssuesList)
.extracting(Issue::getLine, Issue::getRule)
.containsExactlyInAnyOrder(
tuple(1, "external_eslint_repo:no-unused-vars"),
tuple(1, "external_eslint_repo:@typescript-eslint/no-unused-vars"),
tuple(2, "external_eslint_repo:use-isnan"),
tuple(3, "external_eslint_repo:semi"),
tuple(5, "external_eslint_repo:semi"),
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,138 @@
[
{
"key": "@angular-eslint/template/alt-text",
"name": "[Accessibility] Enforces alternate text for elements which require the alt, aria-label, aria-labelledby attributes.",
"description": "See description of ESLint rule <code>@angular-eslint/template/alt-text</code> at the <a href=\"https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin-template/docs/rules/alt-text.md\">@angular-eslint/eslint-plugin-template website</a>"
},
{
"key": "@angular-eslint/template/attributes-order",
"name": "Ensures that HTML attributes and Angular bindings are sorted based on an expected order",
"description": "See description of ESLint rule <code>@angular-eslint/template/attributes-order</code> at the <a href=\"https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin-template/docs/rules/attributes-order.md\">@angular-eslint/eslint-plugin-template website</a>"
},
{
"key": "@angular-eslint/template/banana-in-box",
"name": "Ensures that the two-way data binding syntax is correct",
"description": "See description of ESLint rule <code>@angular-eslint/template/banana-in-box</code> at the <a href=\"https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin-template/docs/rules/banana-in-box.md\">@angular-eslint/eslint-plugin-template website</a>"
},
{
"key": "@angular-eslint/template/button-has-type",
"name": "Ensures that a button has a valid type specified",
"description": "See description of ESLint rule <code>@angular-eslint/template/button-has-type</code> at the <a href=\"https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin-template/docs/rules/button-has-type.md\">@angular-eslint/eslint-plugin-template website</a>"
},
{
"key": "@angular-eslint/template/click-events-have-key-events",
"name": "[Accessibility] Ensures that the click event is accompanied with at least one key event keyup, keydown or keypress.",
"description": "See description of ESLint rule <code>@angular-eslint/template/click-events-have-key-events</code> at the <a href=\"https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin-template/docs/rules/click-events-have-key-events.md\">@angular-eslint/eslint-plugin-template website</a>"
},
{
"key": "@angular-eslint/template/conditional-complexity",
"name": "The conditional complexity should not exceed a rational limit",
"description": "See description of ESLint rule <code>@angular-eslint/template/conditional-complexity</code> at the <a href=\"https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin-template/docs/rules/conditional-complexity.md\">@angular-eslint/eslint-plugin-template website</a>"
},
{
"key": "@angular-eslint/template/cyclomatic-complexity",
"name": "Checks cyclomatic complexity against a specified limit. It is a quantitative measure of the number of linearly independent paths through a program's source code",
"description": "See description of ESLint rule <code>@angular-eslint/template/cyclomatic-complexity</code> at the <a href=\"https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin-template/docs/rules/cyclomatic-complexity.md\">@angular-eslint/eslint-plugin-template website</a>"
},
{
"key": "@angular-eslint/template/elements-content",
"name": "[Accessibility] Ensures that the heading, anchor and button elements have content in it",
"description": "See description of ESLint rule <code>@angular-eslint/template/elements-content</code> at the <a href=\"https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin-template/docs/rules/elements-content.md\">@angular-eslint/eslint-plugin-template website</a>"
},
{
"key": "@angular-eslint/template/eqeqeq",
"name": "Requires `===` and `!==` in place of `==` and `!=`",
"description": "See description of ESLint rule <code>@angular-eslint/template/eqeqeq</code> at the <a href=\"https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin-template/docs/rules/eqeqeq.md\">@angular-eslint/eslint-plugin-template website</a>"
},
{
"key": "@angular-eslint/template/i18n",
"name": "Ensures following best practices for i18n. Checks for missing i18n attributes on elements and attributes containing texts. Can also check for texts without i18n attribute, elements that do not use cus",
"description": "See description of ESLint rule <code>@angular-eslint/template/i18n</code> at the <a href=\"https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin-template/docs/rules/i18n.md\">@angular-eslint/eslint-plugin-template website</a>"
},
{
"key": "@angular-eslint/template/interactive-supports-focus",
"name": "[Accessibility] Ensures that elements with interactive handlers like `(click)` are focusable.",
"description": "See description of ESLint rule <code>@angular-eslint/template/interactive-supports-focus</code> at the <a href=\"https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin-template/docs/rules/interactive-supports-focus.md\">@angular-eslint/eslint-plugin-template website</a>"
},
{
"key": "@angular-eslint/template/label-has-associated-control",
"name": "[Accessibility] Ensures that a label element/component is associated with a form element",
"description": "See description of ESLint rule <code>@angular-eslint/template/label-has-associated-control</code> at the <a href=\"https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin-template/docs/rules/label-has-associated-control.md\">@angular-eslint/eslint-plugin-template website</a>"
},
{
"key": "@angular-eslint/template/mouse-events-have-key-events",
"name": "[Accessibility] Ensures that the mouse events `mouseout` and `mouseover` are accompanied by `focus` and `blur` events respectively. Coding for the keyboard is important for users with physical disabil",
"description": "See description of ESLint rule <code>@angular-eslint/template/mouse-events-have-key-events</code> at the <a href=\"https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin-template/docs/rules/mouse-events-have-key-events.md\">@angular-eslint/eslint-plugin-template website</a>"
},
{
"key": "@angular-eslint/template/no-any",
"name": "The use of \"$any\" nullifies the compile-time benefits of Angular's type system",
"description": "See description of ESLint rule <code>@angular-eslint/template/no-any</code> at the <a href=\"https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin-template/docs/rules/no-any.md\">@angular-eslint/eslint-plugin-template website</a>"
},
{
"key": "@angular-eslint/template/no-autofocus",
"name": "[Accessibility] Ensures that the `autofocus` attribute is not used",
"description": "See description of ESLint rule <code>@angular-eslint/template/no-autofocus</code> at the <a href=\"https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin-template/docs/rules/no-autofocus.md\">@angular-eslint/eslint-plugin-template website</a>"
},
{
"key": "@angular-eslint/template/no-call-expression",
"name": "Disallows calling expressions in templates, except for output handlers",
"description": "See description of ESLint rule <code>@angular-eslint/template/no-call-expression</code> at the <a href=\"https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin-template/docs/rules/no-call-expression.md\">@angular-eslint/eslint-plugin-template website</a>"
},
{
"key": "@angular-eslint/template/no-distracting-elements",
"name": "[Accessibility] Enforces that no distracting elements are used",
"description": "See description of ESLint rule <code>@angular-eslint/template/no-distracting-elements</code> at the <a href=\"https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin-template/docs/rules/no-distracting-elements.md\">@angular-eslint/eslint-plugin-template website</a>"
},
{
"key": "@angular-eslint/template/no-duplicate-attributes",
"name": "Ensures that there are no duplicate input properties or output event listeners",
"type": "BUG",
"description": "See description of ESLint rule <code>@angular-eslint/template/no-duplicate-attributes</code> at the <a href=\"https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin-template/docs/rules/no-duplicate-attributes.md\">@angular-eslint/eslint-plugin-template website</a>"
},
{
"key": "@angular-eslint/template/no-inline-styles",
"name": "Disallows the use of inline styles in HTML templates",
"description": "See description of ESLint rule <code>@angular-eslint/template/no-inline-styles</code> at the <a href=\"https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin-template/docs/rules/no-inline-styles.md\">@angular-eslint/eslint-plugin-template website</a>"
},
{
"key": "@angular-eslint/template/no-interpolation-in-attributes",
"name": "Ensures that property-binding is used instead of interpolation in attributes.",
"description": "See description of ESLint rule <code>@angular-eslint/template/no-interpolation-in-attributes</code> at the <a href=\"https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin-template/docs/rules/no-interpolation-in-attributes.md\">@angular-eslint/eslint-plugin-template website</a>"
},
{
"key": "@angular-eslint/template/no-negated-async",
"name": "Ensures that async pipe results are not negated",
"description": "See description of ESLint rule <code>@angular-eslint/template/no-negated-async</code> at the <a href=\"https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin-template/docs/rules/no-negated-async.md\">@angular-eslint/eslint-plugin-template website</a>"
},
{
"key": "@angular-eslint/template/no-positive-tabindex",
"name": "Ensures that the `tabindex` attribute is not positive",
"description": "See description of ESLint rule <code>@angular-eslint/template/no-positive-tabindex</code> at the <a href=\"https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin-template/docs/rules/no-positive-tabindex.md\">@angular-eslint/eslint-plugin-template website</a>"
},
{
"key": "@angular-eslint/template/prefer-self-closing-tags",
"name": "Ensures that self-closing tags are used for elements with a closing tag but no content.",
"description": "See description of ESLint rule <code>@angular-eslint/template/prefer-self-closing-tags</code> at the <a href=\"https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin-template/docs/rules/prefer-self-closing-tags.md\">@angular-eslint/eslint-plugin-template website</a>"
},
{
"key": "@angular-eslint/template/role-has-required-aria",
"name": "[Accessibility] Ensures elements with ARIA roles have all required properties for that role.",
"description": "See description of ESLint rule <code>@angular-eslint/template/role-has-required-aria</code> at the <a href=\"https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin-template/docs/rules/role-has-required-aria.md\">@angular-eslint/eslint-plugin-template website</a>"
},
{
"key": "@angular-eslint/template/table-scope",
"name": "[Accessibility] Ensures that the `scope` attribute is only used on the `<th>` element",
"description": "See description of ESLint rule <code>@angular-eslint/template/table-scope</code> at the <a href=\"https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin-template/docs/rules/table-scope.md\">@angular-eslint/eslint-plugin-template website</a>"
},
{
"key": "@angular-eslint/template/use-track-by-function",
"name": "Ensures trackBy function is used",
"description": "See description of ESLint rule <code>@angular-eslint/template/use-track-by-function</code> at the <a href=\"https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin-template/docs/rules/use-track-by-function.md\">@angular-eslint/eslint-plugin-template website</a>"
},
{
"key": "@angular-eslint/template/valid-aria",
"name": "[Accessibility] Ensures that correct ARIA attributes and respective values are used",
"description": "See description of ESLint rule <code>@angular-eslint/template/valid-aria</code> at the <a href=\"https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin-template/docs/rules/valid-aria.md\">@angular-eslint/eslint-plugin-template website</a>"
}
]
Loading