File size: 921 Bytes
1e92f2d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
# Ensure JSX className adheres to CSS namespace guidelines

If JSX element includes `className`, it must follow the [Block-Element-Modifier](https://en.bem.info/methodology/naming-convention/) naming principle.

## Rule Details

The following patterns are considered warnings:

```jsx
// client/sample-component/index.js
export function myComponent1() {
	return <div className="sampleVisibleDiv" />;
}

// client/another-sample/index.js
export function myComponent2() {
	return (
		<div className="another-sample">
			<div className="another-sample-child" />
		</div>
	);
}
```

The following patterns are not warnings:

```jsx
// client/sample-component/index.js
export function myComponent1() {
	return <div className="sample__visible" />;
}

// client/another-sample/index.js
export function myComponent2() {
	return (
		<div className="another-sample">
			<div className="another-sample__child" />
		</div>
	);
}
```