@angular-eslint/eslint-plugin-template 21.4.1-alpha.8 → 22.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/index.d.ts +0 -83
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -10
- package/package.json +8 -8
- package/dist/configs/README.md +0 -48
- package/dist/configs/accessibility.json +0 -17
- package/dist/configs/all.json +0 -45
- package/dist/configs/process-inline-templates.json +0 -9
- package/dist/configs/recommended.json +0 -10
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@ Please see https://github.com/angular-eslint/angular-eslint for full usage instr
|
|
|
4
4
|
|
|
5
5
|
## Premade configs
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
The premade flat configs that combine these rules are provided by the umbrella [`angular-eslint`](https://github.com/angular-eslint/angular-eslint/blob/main/packages/angular-eslint/src/configs/README.md) package.
|
|
8
8
|
|
|
9
9
|
## Rules
|
|
10
10
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1,87 +1,4 @@
|
|
|
1
1
|
declare const _default: {
|
|
2
|
-
configs: {
|
|
3
|
-
all: {
|
|
4
|
-
parser: string;
|
|
5
|
-
plugins: string[];
|
|
6
|
-
rules: {
|
|
7
|
-
"@angular-eslint/template/alt-text": string;
|
|
8
|
-
"@angular-eslint/template/attributes-order": string;
|
|
9
|
-
"@angular-eslint/template/banana-in-box": string;
|
|
10
|
-
"@angular-eslint/template/button-has-type": string;
|
|
11
|
-
"@angular-eslint/template/click-events-have-key-events": string;
|
|
12
|
-
"@angular-eslint/template/conditional-complexity": string;
|
|
13
|
-
"@angular-eslint/template/cyclomatic-complexity": string;
|
|
14
|
-
"@angular-eslint/template/elements-content": string;
|
|
15
|
-
"@angular-eslint/template/eqeqeq": string;
|
|
16
|
-
"@angular-eslint/template/i18n": string;
|
|
17
|
-
"@angular-eslint/template/interactive-supports-focus": string;
|
|
18
|
-
"@angular-eslint/template/label-has-associated-control": string;
|
|
19
|
-
"@angular-eslint/template/mouse-events-have-key-events": string;
|
|
20
|
-
"@angular-eslint/template/no-any": string;
|
|
21
|
-
"@angular-eslint/template/no-autofocus": string;
|
|
22
|
-
"@angular-eslint/template/no-call-expression": string;
|
|
23
|
-
"@angular-eslint/template/no-distracting-elements": string;
|
|
24
|
-
"@angular-eslint/template/no-duplicate-attributes": string;
|
|
25
|
-
"@angular-eslint/template/no-empty-control-flow": string;
|
|
26
|
-
"@angular-eslint/template/no-inline-styles": string;
|
|
27
|
-
"@angular-eslint/template/no-interpolation-in-attributes": string;
|
|
28
|
-
"@angular-eslint/template/no-negated-async": string;
|
|
29
|
-
"@angular-eslint/template/no-nested-tags": string;
|
|
30
|
-
"@angular-eslint/template/no-non-null-assertion": string;
|
|
31
|
-
"@angular-eslint/template/no-positive-tabindex": string;
|
|
32
|
-
"@angular-eslint/template/prefer-at-else": string;
|
|
33
|
-
"@angular-eslint/template/prefer-at-empty": string;
|
|
34
|
-
"@angular-eslint/template/prefer-built-in-pipes": string;
|
|
35
|
-
"@angular-eslint/template/prefer-class-binding": string;
|
|
36
|
-
"@angular-eslint/template/prefer-contextual-for-variables": string;
|
|
37
|
-
"@angular-eslint/template/prefer-control-flow": string;
|
|
38
|
-
"@angular-eslint/template/prefer-ngsrc": string;
|
|
39
|
-
"@angular-eslint/template/prefer-self-closing-tags": string;
|
|
40
|
-
"@angular-eslint/template/prefer-static-string-properties": string;
|
|
41
|
-
"@angular-eslint/template/prefer-template-literal": string;
|
|
42
|
-
"@angular-eslint/template/role-has-required-aria": string;
|
|
43
|
-
"@angular-eslint/template/table-scope": string;
|
|
44
|
-
"@angular-eslint/template/use-track-by-function": string;
|
|
45
|
-
"@angular-eslint/template/valid-aria": string;
|
|
46
|
-
};
|
|
47
|
-
};
|
|
48
|
-
recommended: {
|
|
49
|
-
parser: string;
|
|
50
|
-
plugins: string[];
|
|
51
|
-
rules: {
|
|
52
|
-
"@angular-eslint/template/banana-in-box": string;
|
|
53
|
-
"@angular-eslint/template/eqeqeq": string;
|
|
54
|
-
"@angular-eslint/template/no-negated-async": string;
|
|
55
|
-
"@angular-eslint/template/prefer-control-flow": string;
|
|
56
|
-
};
|
|
57
|
-
};
|
|
58
|
-
accessibility: {
|
|
59
|
-
parser: string;
|
|
60
|
-
plugins: string[];
|
|
61
|
-
rules: {
|
|
62
|
-
"@angular-eslint/template/alt-text": string;
|
|
63
|
-
"@angular-eslint/template/click-events-have-key-events": string;
|
|
64
|
-
"@angular-eslint/template/elements-content": string;
|
|
65
|
-
"@angular-eslint/template/interactive-supports-focus": string;
|
|
66
|
-
"@angular-eslint/template/label-has-associated-control": string;
|
|
67
|
-
"@angular-eslint/template/mouse-events-have-key-events": string;
|
|
68
|
-
"@angular-eslint/template/no-autofocus": string;
|
|
69
|
-
"@angular-eslint/template/no-distracting-elements": string;
|
|
70
|
-
"@angular-eslint/template/role-has-required-aria": string;
|
|
71
|
-
"@angular-eslint/template/table-scope": string;
|
|
72
|
-
"@angular-eslint/template/valid-aria": string;
|
|
73
|
-
};
|
|
74
|
-
};
|
|
75
|
-
'process-inline-templates': {
|
|
76
|
-
parser: string;
|
|
77
|
-
parserOptions: {
|
|
78
|
-
ecmaVersion: number;
|
|
79
|
-
sourceType: string;
|
|
80
|
-
};
|
|
81
|
-
plugins: string[];
|
|
82
|
-
processor: string;
|
|
83
|
-
};
|
|
84
|
-
};
|
|
85
2
|
processors: {
|
|
86
3
|
'extract-inline-html': {
|
|
87
4
|
meta: {
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6GA,kBA2CE"}
|
package/dist/index.js
CHANGED
|
@@ -35,10 +35,6 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
35
35
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
36
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
37
|
};
|
|
38
|
-
const accessibility_json_1 = __importDefault(require("./configs/accessibility.json"));
|
|
39
|
-
const all_json_1 = __importDefault(require("./configs/all.json"));
|
|
40
|
-
const process_inline_templates_json_1 = __importDefault(require("./configs/process-inline-templates.json"));
|
|
41
|
-
const recommended_json_1 = __importDefault(require("./configs/recommended.json"));
|
|
42
38
|
const processors_1 = __importDefault(require("./processors"));
|
|
43
39
|
const alt_text_1 = __importStar(require("./rules/alt-text"));
|
|
44
40
|
const attributes_order_1 = __importStar(require("./rules/attributes-order"));
|
|
@@ -80,12 +76,6 @@ const table_scope_1 = __importStar(require("./rules/table-scope"));
|
|
|
80
76
|
const use_track_by_function_1 = __importStar(require("./rules/use-track-by-function"));
|
|
81
77
|
const valid_aria_1 = __importStar(require("./rules/valid-aria"));
|
|
82
78
|
module.exports = {
|
|
83
|
-
configs: {
|
|
84
|
-
all: all_json_1.default,
|
|
85
|
-
recommended: recommended_json_1.default,
|
|
86
|
-
accessibility: accessibility_json_1.default,
|
|
87
|
-
'process-inline-templates': process_inline_templates_json_1.default,
|
|
88
|
-
},
|
|
89
79
|
processors: processors_1.default,
|
|
90
80
|
rules: {
|
|
91
81
|
[alt_text_1.RULE_NAME]: alt_text_1.default,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular-eslint/eslint-plugin-template",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "22.0.0",
|
|
4
4
|
"description": "ESLint plugin for Angular Templates",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -20,19 +20,19 @@
|
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"aria-query": "5.3.2",
|
|
22
22
|
"axobject-query": "4.1.0",
|
|
23
|
-
"@angular-eslint/bundled-angular-compiler": "
|
|
24
|
-
"@angular-eslint/utils": "
|
|
23
|
+
"@angular-eslint/bundled-angular-compiler": "22.0.0",
|
|
24
|
+
"@angular-eslint/utils": "22.0.0"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"@types/aria-query": "5.0.4",
|
|
28
|
-
"@angular-eslint/test-utils": "
|
|
28
|
+
"@angular-eslint/test-utils": "22.0.0"
|
|
29
29
|
},
|
|
30
30
|
"peerDependencies": {
|
|
31
|
-
"@typescript-eslint/types": "^
|
|
32
|
-
"@typescript-eslint/utils": "^
|
|
33
|
-
"eslint": "^
|
|
31
|
+
"@typescript-eslint/types": "^8.0.0",
|
|
32
|
+
"@typescript-eslint/utils": "^8.0.0",
|
|
33
|
+
"eslint": "^9.0.0 || ^10.0.0",
|
|
34
34
|
"typescript": "*",
|
|
35
|
-
"@angular-eslint/template-parser": "
|
|
35
|
+
"@angular-eslint/template-parser": "22.0.0"
|
|
36
36
|
},
|
|
37
37
|
"gitHead": "e2006e5e9c99e5a943d1a999e0efa5247d29ec24"
|
|
38
38
|
}
|
package/dist/configs/README.md
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
# Premade configs
|
|
2
|
-
|
|
3
|
-
These configs exist for your convenience. They contain configuration intended to save you time and effort when configuring your project by disabling rules known to conflict with this repository, or cause issues in Angular codebases.
|
|
4
|
-
|
|
5
|
-
## `accessibility`
|
|
6
|
-
|
|
7
|
-
These are all the rules within `@angular-eslint/eslint-plugin-template` which deal with things impacting the accessibility of your Angular apps.
|
|
8
|
-
|
|
9
|
-
The rules are based on a number of best practice recommendations and resources including:
|
|
10
|
-
|
|
11
|
-
- [W3C - Web Accessibility Initiative (WAI)](https://www.w3.org/WAI/)
|
|
12
|
-
- [Mozilla Developer Network - Accessibility](https://developer.mozilla.org/en-US/docs/Web/Accessibility)
|
|
13
|
-
- [Google Chrome - Audit Rules](https://github.com/GoogleChrome/accessibility-developer-tools/wiki/Audit-Rules)
|
|
14
|
-
|
|
15
|
-
## `recommended`
|
|
16
|
-
|
|
17
|
-
The recommended set is an **_opinionated_** set of rules that we think you should use because:
|
|
18
|
-
|
|
19
|
-
1. They help you adhere to Angular template best practices.
|
|
20
|
-
2. They help catch probable issue vectors in your code.
|
|
21
|
-
|
|
22
|
-
That being said, it is not the only way to use `@angular-eslint/eslint-plugin-template`, nor is it the way that will necessarily work 100% for your project/company. It has been built based off of two main things:
|
|
23
|
-
|
|
24
|
-
1. Angular best practices collected and collated from places like:
|
|
25
|
-
- [Angular repo](https://github.com/angular/angular).
|
|
26
|
-
- [Angular documentation](https://angular.dev).
|
|
27
|
-
- Advice from the Angular Team at Google.
|
|
28
|
-
2. The combined state of community contributed rulesets at the time of creation.
|
|
29
|
-
|
|
30
|
-
We will not add new rules to the recommended set unless we release a major package version (i.e. it is seen as a breaking change).
|
|
31
|
-
|
|
32
|
-
### Altering the recommended set to suit your project
|
|
33
|
-
|
|
34
|
-
If you disagree with a rule (or it disagrees with your codebase), consider using your local config to change the rule config so it works for your project.
|
|
35
|
-
|
|
36
|
-
```cjson
|
|
37
|
-
{
|
|
38
|
-
"extends": ["plugin:@angular-eslint/template/recommended"],
|
|
39
|
-
"rules": {
|
|
40
|
-
// our project thinks using negated async pipes is ok
|
|
41
|
-
"@angular-eslint/template/no-negated-async": "off"
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
### Suggesting changes to the recommended set
|
|
47
|
-
|
|
48
|
-
If you feel _very_, **very**, **_very_** strongly that a specific rule should (or should not) be in the recommended ruleset, please feel free to file an issue along with a **detailed** argument explaining your reasoning. We expect to see you citing concrete evidence supporting why (or why not) a rule is considered best practice. **Please note that if your reasoning is along the lines of "it's what my project/company does", or "I don't like the rule", then we will likely close the request without discussion.**
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"parser": "@angular-eslint/template-parser",
|
|
3
|
-
"plugins": ["@angular-eslint/template"],
|
|
4
|
-
"rules": {
|
|
5
|
-
"@angular-eslint/template/alt-text": "error",
|
|
6
|
-
"@angular-eslint/template/click-events-have-key-events": "error",
|
|
7
|
-
"@angular-eslint/template/elements-content": "error",
|
|
8
|
-
"@angular-eslint/template/interactive-supports-focus": "error",
|
|
9
|
-
"@angular-eslint/template/label-has-associated-control": "error",
|
|
10
|
-
"@angular-eslint/template/mouse-events-have-key-events": "error",
|
|
11
|
-
"@angular-eslint/template/no-autofocus": "error",
|
|
12
|
-
"@angular-eslint/template/no-distracting-elements": "error",
|
|
13
|
-
"@angular-eslint/template/role-has-required-aria": "error",
|
|
14
|
-
"@angular-eslint/template/table-scope": "error",
|
|
15
|
-
"@angular-eslint/template/valid-aria": "error"
|
|
16
|
-
}
|
|
17
|
-
}
|
package/dist/configs/all.json
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"parser": "@angular-eslint/template-parser",
|
|
3
|
-
"plugins": ["@angular-eslint/template"],
|
|
4
|
-
"rules": {
|
|
5
|
-
"@angular-eslint/template/alt-text": "error",
|
|
6
|
-
"@angular-eslint/template/attributes-order": "error",
|
|
7
|
-
"@angular-eslint/template/banana-in-box": "error",
|
|
8
|
-
"@angular-eslint/template/button-has-type": "error",
|
|
9
|
-
"@angular-eslint/template/click-events-have-key-events": "error",
|
|
10
|
-
"@angular-eslint/template/conditional-complexity": "error",
|
|
11
|
-
"@angular-eslint/template/cyclomatic-complexity": "error",
|
|
12
|
-
"@angular-eslint/template/elements-content": "error",
|
|
13
|
-
"@angular-eslint/template/eqeqeq": "error",
|
|
14
|
-
"@angular-eslint/template/i18n": "error",
|
|
15
|
-
"@angular-eslint/template/interactive-supports-focus": "error",
|
|
16
|
-
"@angular-eslint/template/label-has-associated-control": "error",
|
|
17
|
-
"@angular-eslint/template/mouse-events-have-key-events": "error",
|
|
18
|
-
"@angular-eslint/template/no-any": "error",
|
|
19
|
-
"@angular-eslint/template/no-autofocus": "error",
|
|
20
|
-
"@angular-eslint/template/no-call-expression": "error",
|
|
21
|
-
"@angular-eslint/template/no-distracting-elements": "error",
|
|
22
|
-
"@angular-eslint/template/no-duplicate-attributes": "error",
|
|
23
|
-
"@angular-eslint/template/no-empty-control-flow": "error",
|
|
24
|
-
"@angular-eslint/template/no-inline-styles": "error",
|
|
25
|
-
"@angular-eslint/template/no-interpolation-in-attributes": "error",
|
|
26
|
-
"@angular-eslint/template/no-negated-async": "error",
|
|
27
|
-
"@angular-eslint/template/no-nested-tags": "error",
|
|
28
|
-
"@angular-eslint/template/no-non-null-assertion": "error",
|
|
29
|
-
"@angular-eslint/template/no-positive-tabindex": "error",
|
|
30
|
-
"@angular-eslint/template/prefer-at-else": "error",
|
|
31
|
-
"@angular-eslint/template/prefer-at-empty": "error",
|
|
32
|
-
"@angular-eslint/template/prefer-built-in-pipes": "error",
|
|
33
|
-
"@angular-eslint/template/prefer-class-binding": "error",
|
|
34
|
-
"@angular-eslint/template/prefer-contextual-for-variables": "error",
|
|
35
|
-
"@angular-eslint/template/prefer-control-flow": "error",
|
|
36
|
-
"@angular-eslint/template/prefer-ngsrc": "error",
|
|
37
|
-
"@angular-eslint/template/prefer-self-closing-tags": "error",
|
|
38
|
-
"@angular-eslint/template/prefer-static-string-properties": "error",
|
|
39
|
-
"@angular-eslint/template/prefer-template-literal": "error",
|
|
40
|
-
"@angular-eslint/template/role-has-required-aria": "error",
|
|
41
|
-
"@angular-eslint/template/table-scope": "error",
|
|
42
|
-
"@angular-eslint/template/use-track-by-function": "error",
|
|
43
|
-
"@angular-eslint/template/valid-aria": "error"
|
|
44
|
-
}
|
|
45
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"parser": "@angular-eslint/template-parser",
|
|
3
|
-
"plugins": ["@angular-eslint/template"],
|
|
4
|
-
"rules": {
|
|
5
|
-
"@angular-eslint/template/banana-in-box": "error",
|
|
6
|
-
"@angular-eslint/template/eqeqeq": "error",
|
|
7
|
-
"@angular-eslint/template/no-negated-async": "error",
|
|
8
|
-
"@angular-eslint/template/prefer-control-flow": "error"
|
|
9
|
-
}
|
|
10
|
-
}
|