forked from ni/javascript-styleguide
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathoptions.js
142 lines (124 loc) · 3.04 KB
/
options.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
130
131
132
133
134
135
136
137
138
139
140
141
142
// This is a list of standard element attributes to ignore
// when applying the @angular-eslint/template/i18n rule
// that requires attributes to be tagged as localizable.
//
// New attributes can be added here that are for element
// configuration and not for display, where localizing
// the attribute value would result in broken functionality.
//
// In cases of attribute collisions, the rule supports
// CSS selector style element[attribute] ignore entries
// which can be used to scope attribute ignores to specific
// elements.
const ignoreAttributeSets = {
web: [
'accept',
'aria-describedby',
'aria-labelledby',
'aria-live',
'rel',
'sizes',
// Not possible for Angular i18n to handle meta tags yet
// https://github.com/angular/angular-cli/issues/8947
'meta[content]'
],
nimble: [
// shared
'appearance',
'appearance-variant',
'orientation',
'severity',
'slot',
// combobox
'autocomplete',
// drawer
'location',
// rich text
'nimble-mapping-user[display-name]',
'pattern',
// select
'filter-mode',
// table
'action-menu-slot',
'column-id',
'field-name',
'format',
'href-field-name',
'icon',
'id-field-name',
'key',
'key-type',
'label-field-name',
'menu-slot',
'parent-id-field-name',
'selection-mode',
'sort-direction',
'width-mode',
// tabs
'activeid',
// text area
'resize',
// theme provider
'theme',
// tooltips
'anchor',
// angular-specific
'nimbleRouterLink',
'queryParamsHandling'
],
systemlink: [
// sl-workspace-selector
'action',
// sl-table
'columnId',
'decimalDigits',
'fieldName',
'format',
'groupableParentColumnId',
'hrefFieldName',
'idFieldName',
'keyType',
'labelFieldName',
'parentIdFieldName',
'selectionMode',
'slTableColumnId',
'widthMode',
// sl-grid
'columnSizeMode',
'dataRowId',
'dataSourceFingerprint',
'gridId',
'loadColumnStateBehavior',
'parentDataField',
// sl-split-button
'appearanceVariant',
// sl-query-builder
'dropdownWidth',
],
jqx: [
// smart-table
'sortMode',
// smart-query-builder
'applyMode',
'fieldsMode'
],
material: [
'cdkDragBoundary',
'cdkDragLockAxis',
'cdkDragPreviewContainer',
'cdkDragPreviewClass',
'cdkDragRootElement'
'floatLabel',
'fontIcon',
'fontSet',
'matColumnDef',
'matTooltipClass',
]
};
const ignoreAttributes = {
...ignoreAttributeSets,
all: Object.values(ignoreAttributeSets).flat()
};
module.exports = {
ignoreAttributes
};