/
recommended.js
129 lines (128 loc) · 5.31 KB
/
recommended.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
export default {
rules: {
'builtin-component-arguments': 'error',
'deprecated-inline-view-helper': 'error',
'deprecated-render-helper': 'error',
'link-href-attributes': 'error',
'link-rel-noopener': 'error',
'no-abstract-roles': 'error',
'no-accesskey-attribute': 'error',
'no-action': 'error',
'no-action-on-submit-button': 'error',
'no-args-paths': 'error',
'no-arguments-for-html-elements': 'error',
'no-aria-hidden-body': 'error',
'no-aria-unsupported-elements': 'error',
'no-array-prototype-extensions': 'error',
'no-at-ember-render-modifiers': 'error',
'no-attrs-in-components': 'error',
'no-autofocus-attribute': 'error',
'no-block-params-for-html-elements': 'error',
'no-builtin-form-components': 'error',
'no-capital-arguments': 'error',
'no-class-bindings': 'error',
'no-curly-component-invocation': 'error',
'no-debugger': 'error',
'no-duplicate-attributes': 'error',
'no-duplicate-id': 'error',
'no-duplicate-landmark-elements': 'error',
'no-empty-headings': 'error',
'no-extra-mut-helper-argument': 'error',
'no-forbidden-elements': 'error',
'no-heading-inside-button': 'error',
'no-html-comments': 'error',
'no-implicit-this': 'error',
'no-index-component-invocation': 'error',
'no-inline-styles': 'error',
'no-input-block': 'error',
'no-input-tagname': 'error',
'no-invalid-aria-attributes': 'error',
'no-invalid-interactive': 'error',
'no-invalid-link-text': 'error',
'no-invalid-link-title': 'error',
'no-invalid-meta': 'error',
'no-invalid-role': 'error',
'no-link-to-positional-params': 'error',
'no-link-to-tagname': 'error',
'no-log': 'error',
'no-negated-condition': 'error',
'no-nested-interactive': 'error',
'no-nested-landmark': 'error',
'no-nested-splattributes': 'error',
'no-obscure-array-access': 'error',
'no-obsolete-elements': 'error',
'no-outlet-outside-routes': 'error',
'no-partial': 'error',
'no-passed-in-event-handlers': 'error',
'no-pointer-down-event-binding': 'error',
'no-positional-data-test-selectors': 'error',
'no-positive-tabindex': 'error',
'no-potential-path-strings': 'error',
'no-quoteless-attributes': 'error',
'no-redundant-fn': 'error',
'no-redundant-role': 'error',
'no-route-action': 'error',
'no-scope-outside-table-headings': 'error',
'no-shadowed-elements': 'error',
'no-triple-curlies': 'error',
'no-unbalanced-curlies': 'error',
'no-unbound': 'error',
'no-unknown-arguments-for-builtin-components': 'error',
'no-unnecessary-component-helper': 'error',
'no-unnecessary-curly-parens': 'error',
'no-unnecessary-curly-strings': 'error',
'no-unsupported-role-attributes': 'error',
'no-unused-block-params': 'error',
'no-valueless-arguments': 'error',
'no-whitespace-for-layout': 'error',
'no-whitespace-within-word': 'error',
'no-with': 'error',
'no-yield-only': 'error',
'no-yield-to-default': 'error',
'require-aria-activedescendant-tabindex': 'error',
'require-button-type': 'error',
'require-context-role': 'error',
'require-has-block-helper': 'error',
'require-iframe-title': 'error',
'require-input-label': 'error',
'require-lang-attribute': 'error',
'require-mandatory-role-attributes': 'error',
'require-media-caption': 'error',
'require-presentational-children': 'error',
'require-valid-alt-text': 'error',
'require-valid-named-block-naming-format': 'error',
'simple-modifiers': 'error',
'simple-unless': 'error',
'splat-attributes-only': 'error',
'style-concatenation': 'error',
'table-groups': 'error',
},
overrides: [
{
files: ['**/*.gjs', '**/*.gts'],
rules: {
// in gjs/gts, curly-component-invocation, and no-implicit-this were incorrectly triggered,
// because {{foo}}, which is ambiguous in loose-mode templates could have "foo" defined in JS scope.
// For example:
//
// const foo = "hello there";
// <template>{{foo}}</template>
//
// template-lint *only* looks at what is between the <template> tags, and doesn't know about the surrounding context.
// so these two rules are regularly false-negatives.
// additionally, because eslint-plugin-ember looks at the intermediate/transformed code of <template>,
// eslint is responsible for reporting when "foo" would be undefined (which is the only thing it can be (other than defined)
// in strict mode -- there is no implicit this ever)
'no-curly-component-invocation': 'off',
'no-implicit-this': 'off',
// This rule is not enabled here (but it is enabled in the "stylistic" preset). However, the rule is
// essentially malfunctioning in gjs/gts context, so it makes sense to always add this override to
// disable it for gjs/gts files, in case the rule is enabled. Ideally, a better fix would be to give
// the rule enough information to determine the context, so it can disable itself, but that would
// require a bigger overhaul. In the meantime, this will prevent a broken experience for <template>
// tags. See https://github.com/ember-template-lint/ember-template-lint/issues/2436.
'modifier-name-case': 'off',
},
},
],
};