Automattic / Automattic/VIP-Coding-Standards

4.0 | Remove JS/CSS Sniffs

Open
#442 6 comments 0 reactions 0 assignees View on GitHub
JS/CSS
Dominant language
PHP
Stars
261
Forks
44
Avg merge
19m
Merged PRs (30d)
1

Description

With JS and CSS tokenizers slated to be removed in 4.0 of PHPCS, we may have to remove our JS/CSS sniffs for compatibility: https://github.com/squizlabs/PHP_CodeSniffer/issues/2448

JS sniffs:

* JS/WindowSniff.php
* JS/DangerouslySetInnerHTMLSniff.php
* JS/HTMLExecutingFunctionsSniff.php
* JS/InnerHTMLSniff.php
* JS/StringConcatSniff.php
* JS/StrippingTagsSniff.php

CSS Sniffs:

* UserExperience/AdminBarRemovalSniff.php

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the linked PHP_CodeSniffer compatibility issue and the listed JS and CSS sniff files: JS/WindowSniff.php, JS/DangerouslySetInnerHTMLSniff.php, JS/HTMLExecutingFunctionsSniff.php, JS/InnerHTMLSniff.php, JS/StringConcatSniff.php, JS/StrippingTagsSniff.php, and UserExperience/AdminBarRemovalSniff.php. Confirm whether PHPCS 4.0 requires their removal; done means the affected sniffs are handled consistently with that compatibility decision.

Written by the indexing model from the issue text.

Assessment

Tech stack
css, javascript, php
Domain
tooling
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.