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

feat(eslint-plugin-template): [attributes-order] add rule with fixer #1066

Merged
merged 12 commits into from Sep 26, 2022
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 3 additions & 2 deletions packages/eslint-plugin-template/src/configs/all.json
Expand Up @@ -7,7 +7,9 @@
"@angular-eslint/template/accessibility-label-has-associated-control": "error",
"@angular-eslint/template/accessibility-table-scope": "error",
"@angular-eslint/template/accessibility-valid-aria": "error",
"@angular-eslint/template/attributes-order": "error",
"@angular-eslint/template/banana-in-box": "error",
"@angular-eslint/template/button-has-type": "error",
"@angular-eslint/template/click-events-have-key-events": "error",
"@angular-eslint/template/conditional-complexity": "error",
"@angular-eslint/template/cyclomatic-complexity": "error",
Expand All @@ -21,7 +23,6 @@
"@angular-eslint/template/no-duplicate-attributes": "error",
"@angular-eslint/template/no-negated-async": "error",
"@angular-eslint/template/no-positive-tabindex": "error",
"@angular-eslint/template/use-track-by-function": "error",
"@angular-eslint/template/button-has-type": "error"
"@angular-eslint/template/use-track-by-function": "error"
}
}
12 changes: 8 additions & 4 deletions packages/eslint-plugin-template/src/index.ts
Expand Up @@ -21,9 +21,15 @@ import accessibilityTableScope, {
import accessibilityValidAria, {
RULE_NAME as accessibilityValidAriaRuleName,
} from './rules/accessibility-valid-aria';
import attributesOrder, {
RULE_NAME as attributesOrderRuleName,
} from './rules/attributes-order';
import bananaInBox, {
RULE_NAME as bananaInBoxRuleName,
} from './rules/banana-in-box';
import buttonHasType, {
RULE_NAME as buttonHasTypeRuleName,
} from './rules/button-has-type';
import clickEventsHaveKeyEvents, {
RULE_NAME as clickEventsHaveKeyEventsRuleName,
} from './rules/click-events-have-key-events';
Expand Down Expand Up @@ -60,9 +66,6 @@ import noPositiveTabindex, {
import useTrackByFunction, {
RULE_NAME as useTrackByFunctionRuleName,
} from './rules/use-track-by-function';
import buttonHasType, {
RULE_NAME as buttonHasTypeRuleName,
} from './rules/button-has-type';

export default {
configs: {
Expand All @@ -80,7 +83,9 @@ export default {
accessibilityLabelHasAssociatedControl,
[accessibilityTableScopeRuleName]: accessibilityTableScope,
[accessibilityValidAriaRuleName]: accessibilityValidAria,
[attributesOrderRuleName]: attributesOrder,
[bananaInBoxRuleName]: bananaInBox,
[buttonHasTypeRuleName]: buttonHasType,
[conditionalComplexityRuleName]: conditionalComplexity,
[clickEventsHaveKeyEventsRuleName]: clickEventsHaveKeyEvents,
[cyclomaticComplexityRuleName]: cyclomaticComplexity,
Expand All @@ -95,6 +100,5 @@ export default {
[noNegatedAsyncRuleName]: noNegatedAsync,
[noPositiveTabindexRuleName]: noPositiveTabindex,
[useTrackByFunctionRuleName]: useTrackByFunction,
[buttonHasTypeRuleName]: buttonHasType,
},
};