-
-
Notifications
You must be signed in to change notification settings - Fork 521
Closed as not planned
Closed as not planned
Copy link
Description
Is your feature request related to a problem?
Enforcing spaces for indentation
Describe the solution you'd like
I want to introduce WP standards in a codebase that is using spaces for indentation, so instead of converting all indentation to tabs, I'd like to enforce 2 spaces as per existing style.
this config gets me nearly there https://gist.github.com/pdewouters/39d6b4f1c2d60e5c1538163774c8ed18
But I still get some errors related to array indentation, it thinks it should be 4 spaces instead of 2.
function update_admin_labels() {
wp_register_script(
'update-some-admin-labels-js',
plugins_url( 'my-plugin/js/update-some-admin-labels.js' ),
[
'wp-plugins',
'wp-edit-post',
'wp-element',
'wp-components',
'wp-i18n',
],
1
);
}
add_action( 'init', 'pdate_admin_labels' );
Additional context (optional)
See screenshot: the first line has no errors because it has 4 spaces indent but the next ones throw an error. It should be the reverse
- I intend to create a pull request to implement this feature.
Metadata
Metadata
Assignees
Labels
No labels
