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: packages/eslint-plugin/docs/rules/naming-convention.md
+121-1Lines changed: 121 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -101,8 +101,10 @@ If these are provided, the identifier must start with one of the provided values
101
101
-`modifiers` allows you to specify which modifiers to granularly apply to, such as the accessibility (`private`/`public`/`protected`), or if the thing is `static`, etc.
102
102
- The name must match _all_ of the modifiers.
103
103
- For example, if you provide `{ modifiers: ['private', 'static', 'readonly'] }`, then it will only match something that is `private static readonly`, and something that is just `private` will not match.
104
-
-`types` allows you to specify which types to match. This option supports simple, primitive types only (`boolean`, `string`, `number`, `array`, `function`). This lets you do things like enforce that `boolean` variables are prefixed with a verb.
104
+
-`types` allows you to specify which types to match. This option supports simple, primitive types only (`boolean`, `string`, `number`, `array`, `function`).
105
+
- The name must match _one_ of the types.
105
106
-**_NOTE - Using this option will require that you lint with type information._**
107
+
- For example, this lets you do things like enforce that `boolean` variables are prefixed with a verb.
106
108
-`boolean` matches any type assignable to `boolean | null | undefined`
107
109
-`string` matches any type assignable to `string | null | undefined`
108
110
-`number` matches any type assignable to `number | null | undefined`
@@ -189,6 +191,124 @@ Group Selectors are provided for convenience, and essentially bundle up sets of
189
191
- Allowed `modifiers`: `abstract`.
190
192
- Allowed `types`: none.
191
193
194
+
## Examples
195
+
196
+
### Enforce that all variables, functions and properties follow are camelCase
0 commit comments