bluehost-wordpress-plugin icon indicating copy to clipboard operation
bluehost-wordpress-plugin copied to clipboard

Update code standards, add misc dev files, make linting more good-er

Open bradp opened this issue 1 year ago • 5 comments

huh

Changes

Brad Parbs is a code standards nerd and I like to automate as many things as possible.

  • Adds .editorconfig to consisten-ize things (docs: PHPStorm EditorConfig plugin VS Code extension)
  • Updates package.json with some new goodies
    • Adds lint:php and lint:php:fix that call the composer scripts
    • Adds lint and lint:fix that will run all the different linting scripts (JS, php, etc) concurrently
    • Adds i18n and test commands that will also run all the relevant <command>:<subcommand> scripts
  • Adds jsconfig.json to allow IDE eslint to correctly associate aliases
  • Fixes imports in package.json to directly pull in dependencies rather than relying on transient dependencies
  • Introduces PHP CS Fixer to lint and automatically fix some things that phpcs isn't great at.

Checklist

  • [ ] I have read the CONTRIBUTING doc
  • [ ] Linting and tests pass locally with my changes
  • [ ] I have added tests that prove my fix is effective or that my feature works
  • [ ] I have added necessary documentation (if appropriate) TODO @bradp add info to README.md or create a CONTRIBUTING.md file to outline the standards

Further comments

Standards fixes and linting changes for the code base are being handled in #852 to keep the diff clearer here.

bradp avatar Dec 05 '23 20:12 bradp

Bluehost Brand Plugin    Run #10981

Run Properties:  status check failed Failed #10981  •  git commit 183590388b ℹ️: Merge 362018364749d05281a03555d496f1e376408085 into f94f7e89f4c720149255a8f25847...
Project Bluehost Brand Plugin
Branch Review feature/code-standards
Run status status check failed Failed #10981
Run duration 33m 17s
Commit git commit 183590388b ℹ️: Merge 362018364749d05281a03555d496f1e376408085 into f94f7e89f4c720149255a8f25847...
Committer Brad Parbs
View all properties for this run ↗︎

Test results
Tests that failed  Failures 1
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 36
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 416
View all changes introduced in this branch ↗︎

Tests for review

Failed  vendor/newfold-labs/wp-module-migration/tests/cypress/integration/Migration/landIntoMigrationFromAM.cy.js • 1 failed test

View Output Video

Test Artifacts
Verify Migration- emulating AM flow > Verify Migration page is loaded Test Replay Screenshots Video

cypress[bot] avatar Dec 05 '23 21:12 cypress[bot]

@bradp - I'd love to get this merged, do you have time to resolve the conflicts?

circlecube avatar Sep 25 '24 19:09 circlecube

@circlecube I should have time later this week to do it! 🎉

bradp avatar Sep 25 '24 19:09 bradp

For ease of review, #1009 is only the added code standards file, while this PR is that plus fixed files.

bradp avatar Oct 02 '24 01:10 bradp

Based on the lack of updates on this and the now number of conflicts, I think we can close this and reopen or restart if we have the need in the future.

circlecube avatar Nov 12 '24 21:11 circlecube