Comments (7)
Any objection for this being a Composer script rather than a gulp task? That will be a simpler solution as PHPCS is installed via Composer. We might be able to make a gulp task that calls the Composer script as well.
from wprig.
Tentatively yes, though I'd like to see someone do a test to figure out if the fixing is clean or it it can cause new issues.
from wprig.
I am using phpcbf with vscode and it is working.
from wprig.
After thinking on this I think we should use gulp. If we were to use PHPCBF directly of via Composer then it will attempt to fix all PHP files, including vendor
.
We could list out which files to include and exclude but that would be duplicating the same declarations in gulp and we should not repeat ourselves in this way.
However, I tried using gulp-phpcbf
but could not get it working.
I also tried changing the bin
in [gulp-phpcs
] (https://www.npmjs.com/package/gulp-phpcs) to be phpcbf
but that did not work.
It seems we will either need to fork gulp-phpcs
project to work with phpcbf
or figure out what is wring with gulp-phpcbf
, which hasn't been updated in 4 years.
Either way that is too much work than I can commit to. If someone else wants to take a stab at this please do.
from wprig.
@felixarntz has convinced me that my opinion in November is better than my opinion in December. So, not that it is January I am switching back to being in favor of this being in Composer, not gulp
from wprig.
What needs to be done to close this issue?
from wprig.
What needs to be done to close this issue?
A task similar to the existing run-phpcs
needs to be added to the scripts
section of composer.json
that will run PHP code beautifier.
from wprig.
Related Issues (20)
- theme.json HOT 1
- Can't extend any core classes HOT 2
- Integrate Theme.Json into WP-Rig HOT 2
- Bug blank page editor with 5.9 .. HOT 4
- Styles task hangs and never seems to complete HOT 1
- Inline SVG undefined properties HOT 1
- Change out colors to use block theme colors HOT 4
- Mobile menu obscures content when toggled off HOT 2
- Running production version changes part of string to 'undefined' HOT 3
- Update Deprecated Node Modules HOT 5
- Help instalation HOT 25
- PHP Fatal error on fresh install (`WP_Rig\WP_Rig\JavaScript\Component`) HOT 1
- Why is it so hard (read impossible) to change the color of the mobile menu toggle? HOT 1
- Upgrade Babel and eslint
- I installed but it stays in scripts HOT 3
- watch process freezes after "Finished 'editorStyles'.... " HOT 2
- mobile menu clickable under text when hamburger menu is folded up HOT 4
- Seemingly incomplete collapsible sub menu items feature in mobile nav
- Use intersection observer to swap the submenu direction so items do not go offscreen
- Version not updating when running production bundle due to mismatch in constants.js
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wprig.