You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file. The format
4
4
5
5
## [Unreleased]
6
6
7
+
### Added
8
+
9
+
-**ESLint Plugin:** add 6 new rules for emits, components and options ([#728](https://github.com/studiometa/js-toolkit/pull/728), [4a7d657f](https://github.com/studiometa/js-toolkit/commit/4a7d657f))
| <spanclass="text-nowrap">`js-toolkit/require-config`</span> | Requires a `static config` property with a `name` on every class extending `Base`. | ❌ |
78
-
| <spanclass="text-nowrap">`js-toolkit/require-config-name-pascal-case`</span> | Requires `config.name` to be PascalCase. | 🔧 |
79
-
| <spanclass="text-nowrap">`js-toolkit/refs-camel-case`</span> | Requires ref names in `config.refs` to be camelCase. Supports the `[]` multiple-ref suffix. | 🔧 |
80
-
| <spanclass="text-nowrap">`js-toolkit/refs-plural-multiple`</span> | Requires refs using the `[]` multiple-ref suffix to be pluralized (e.g. `links[]` not `link[]`). | ❌ |
81
-
| <spanclass="text-nowrap">`js-toolkit/options-camel-case`</span> | Requires option keys in `config.options` to be camelCase. | 🔧 |
88
+
#### `js-toolkit/require-config`
89
+
90
+
**Recommended:** error
91
+
92
+
Requires a `static config` property with a `name` on every class extending `Base`.
93
+
94
+
#### `js-toolkit/require-config-name-pascal-case`
95
+
96
+
**Recommended:** error · **Fixable** 🔧
97
+
98
+
Requires `config.name` to be PascalCase.
99
+
100
+
### Refs
101
+
102
+
#### `js-toolkit/refs-camel-case`
103
+
104
+
**Recommended:** error · **Fixable** 🔧
105
+
106
+
Requires ref names in `config.refs` to be camelCase. Supports the `[]` multiple-ref suffix.
107
+
108
+
#### `js-toolkit/refs-plural-multiple`
109
+
110
+
**Recommended:** error
111
+
112
+
Requires refs using the `[]` multiple-ref suffix to be pluralized (e.g. `links[]` not `link[]`).
113
+
114
+
#### `js-toolkit/refs-no-bracket-access`
115
+
116
+
**Recommended:** error · **Fixable** 🔧
117
+
118
+
Disallows bracket access with a `[]` suffix on `this.$refs` (e.g. `this.$refs['items[]']`). Rewrites to dot notation camelCase.
119
+
120
+
#### `js-toolkit/require-refs-declared-in-config`
121
+
122
+
**Recommended:** error
123
+
124
+
Requires all `this.$refs.<name>` accesses to be declared in `static config.refs`.
125
+
126
+
#### `js-toolkit/prefer-ref-over-query-selector`
127
+
128
+
**Recommended:** warn
129
+
130
+
Warns when `this.$el.querySelector()` or `this.$el.querySelectorAll()` is used inside a `Base` subclass. Declare a ref in `static config` and use `this.$refs` instead.
131
+
132
+
### Options
133
+
134
+
#### `js-toolkit/options-camel-case`
135
+
136
+
**Recommended:** error · **Fixable** 🔧
137
+
138
+
Requires option keys in `config.options` to be camelCase.
| <spanclass="text-nowrap">`js-toolkit/on-handler-naming`</span> | Requires event handler methods to follow the `onXxxYyy` camelCase convention. | ❌ |
94
-
| <spanclass="text-nowrap">`js-toolkit/on-global-handler-prefix`</span> | Requires handlers for window-only events (e.g. `resize`) to use the `onWindow` or `onDocument` prefix. | ❌ |
190
+
#### `js-toolkit/on-handler-naming`
191
+
192
+
**Recommended:** error
193
+
194
+
Requires event handler methods to follow the `onXxxYyy` camelCase convention.
195
+
196
+
#### `js-toolkit/on-global-handler-prefix`
197
+
198
+
**Recommended:** warn
199
+
200
+
Requires handlers for window-only events (e.g. `resize`) to use the `onWindow` or `onDocument` prefix.
0 commit comments