WPBP / WordPress-Plugin-Boilerplate-Powered

Wordpress Plugin Boilerplate but Powered with examples and a generator!
https://wpbp.github.io/
GNU General Public License v3.0
791 stars 114 forks source link

Update the editor config to match wordpress standard #233

Closed erikyo closed 1 year ago

erikyo commented 1 year ago

Description

This PR simplifies the .editorconfig code and updates the CI workflow to make it compatible with the new configuration.

Reasoning

The previous .editorconfig file was unnecessarily complex and contained duplicated rules. This made it difficult to maintain and understand. By simplifying the configuration, we can reduce the cognitive load on developers and make it easier for them to adhere to the code style guidelines.

In addition to this, I noticed that the existing CI workflow was not able to recognize the configuration that was inside package.json and it was throwing a deprecation error like

EditorConfig adherence
Node.js 12 actions are deprecated. 
Please update the following actions to use Node.js 16: actions/checkout@v2.3.1, actions/setup-node@v2-beta. 

For more information see: 
https://github.blog/changelog/2022-09-22-github-actions-all-actions-will-begin-running-on-node16-instead-of-node12/

To address this issue, I updated the workflow to use the npx prettier --check command instead of npx eclint check. This ensures that the correct configuration is used when running lint checks in the CI environment.

Changes Made

I tested the changes locally by running the lint checks and verifying that they pass. I also tested the CI workflow by creating a new branch and submitting a PR with the changes. The workflow ran successfully and reported the lint checks as passing.

Follow up of https://github.com/WPBP/WordPress-Plugin-Boilerplate-Powered/pull/232#issuecomment-1538647455

Mte90 commented 1 year ago

Thanks!