Skip to content

phpcs: Expected at least 1 space after "<"; 0 found in PhpStorm #3959

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
badtiger opened this issue Feb 20, 2025 · 2 comments
Closed

phpcs: Expected at least 1 space after "<"; 0 found in PhpStorm #3959

badtiger opened this issue Feb 20, 2025 · 2 comments

Comments

@badtiger
Copy link

badtiger commented Feb 20, 2025

Image

Good afternoon. I am encountering an incorrect error in PhpStorm. When using HTML inside JS files, I get the following PHPCS error:


![Image](https://github.com/user-attachments/assets/2efa4609-509b-4d33-85ba-1ab18ca09c38)

"Expected at least 1 space after '<'; 0 found."

When I try to fix it, I get the following result:

return (
    < div >
        < h1 > Data Table < / h1 >
        < table border = "1" >
            < thead >
            < tr >
                < th > < / th >
                < th > < / th >
                < th > Planned Shipment Date < / th >
            < / tr >
            < / thead >
            < tbody >
            {data.map((item) => (
                < tr key = {item.id} >
                    < td > {item.serial_number} < / td >
                    < td > {new Date(item.deadline).toLocaleString()} < / td >
                    < td > {item.productionItemPartStages ? .length || 0} < / td >
                < / tr >
            ))}
            < / tbody >
        < / table >
    < / div >
);

Could you please help me resolve this issue?

@jrfnl
Copy link
Contributor

jrfnl commented Feb 20, 2025

Please don't open issues in this repo anymore. This repo is abandoned and https://github.com/PHPCSStandards/PHP_CodeSniffer is its successor. See: #3932

As for your issue above: sounds like you have a parse error in your file.

@jrfnl
Copy link
Contributor

jrfnl commented Feb 21, 2025

Superseded by: PHPCSStandards/PHP_CodeSniffer#839

@jrfnl jrfnl closed this as not planned Won't fix, can't repro, duplicate, stale Feb 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants