Skip to content

Change WordPress.WP.EnqueuedResourceParameters.MissingVersion to warning #1472

@GaryJones

Description

@GaryJones

EnqueuedResourceParameters is included in WordPress-Extra.

It was recently added via #1378.

While I agree that it's a best practice to add a script version (WP will use its own version anyway if not given), I think we should reconsider this being reported as an error.

Example case, would be registering a script from a CDN e.g. https://cdn.bootcss.com/backgrid.js/0.3.8/backgrid.min.js - this already contains the version number, so having to add a version number as a separate argument doesn't make sense.

The arg is optional - if it was something that someone must do (for which not doing would be an error), then it wouldn't be optional.

I realise this is for Extra, not Core, and that there are ways for individual projects to ignore, disable or change the type for this violation, but I'd like to see us re-consider changing it in WPCS.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions