Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
wants to merge 16 commits into from

Conversation

bradp
Copy link
Contributor

@bradp bradp commented Dec 5, 2023

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 bradp added the enhancement New feature or request label Dec 5, 2023
Copy link

cypress bot commented Dec 5, 2023

Copy link

cypress bot commented Dec 5, 2023

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

Base automatically changed from develop to main January 22, 2024 23:42
- Adds .editorconfig to make things consistent
- Adds .phpcs.dist.xml and .php-cs-fixers.dist.php for PHP linting
- Adds jsconfig.json to allow IDE eslint to correctly associate aliases

- Updates Composer and NPM commands to include linting
@circlecube circlecube marked this pull request as draft June 19, 2024 18:40
@circlecube
Copy link
Member

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

@bradp
Copy link
Contributor Author

bradp commented Sep 25, 2024

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

@bradp bradp force-pushed the feature/code-standards branch from 39a440d to 23e4ea7 Compare October 2, 2024 01:01
@bradp
Copy link
Contributor Author

bradp commented Oct 2, 2024

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

@bradp bradp marked this pull request as ready for review October 2, 2024 01:02
@circlecube circlecube added this to the October 9, 2024 Release milestone Oct 3, 2024
@wpscholar wpscholar removed this from the October 9, 2024 Release milestone Oct 16, 2024
@circlecube circlecube marked this pull request as draft November 8, 2024 22:07
@circlecube
Copy link
Member

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 circlecube closed this Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants