Devendra174's picture
Upload folder using huggingface_hub
1e92f2d verified

Ensure JSX className adheres to CSS namespace guidelines

If JSX element includes className, it must follow the Block-Element-Modifier naming principle.

Rule Details

The following patterns are considered warnings:

// 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:

// 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>
    );
}