Skip to content

Set up JS linting for repo#104

Merged
felixarntz merged 5 commits into
trunkfrom
fix/scripts
Mar 29, 2023
Merged

Set up JS linting for repo#104
felixarntz merged 5 commits into
trunkfrom
fix/scripts

Conversation

@spacedmonkey
Copy link
Copy Markdown
Member

@spacedmonkey spacedmonkey commented Mar 24, 2023

Description of the Change

As documented in the WordPress handbook, wp-scripts, as lots of handy linters and checkers. See. Copy and pasted the format npm command in our project and run it. This is the result. Going forward developers can use this command to lint js/md/yml files.

Closes #102

How to test the Change

Changelog Entry

Added - New feature
Changed - Existing functionality
Deprecated - Soon-to-be removed feature
Removed - Feature
Fixed - Bug fix
Security - Vulnerability

Credits

Props @spacedmonkey

Checklist:

  • I agree to follow this project's Code of Conduct.
  • I have updated the documentation accordingly.
  • I have added tests to cover my change.
  • All new and existing tests pass.

Comment thread .eslintrc.js
globals: {
wp: 'off',
ajaxurl: 'readonly',
FormData: 'readonly',
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When we revisit this, we need to import this correctly.

Copy link
Copy Markdown
Member

@felixarntz felixarntz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @spacedmonkey! Mostly looks great, just a few small questions.

Comment thread package.json Outdated
Comment thread .github/workflows/php-lint.yml Outdated
Comment thread .github/workflows/php-test.yml Outdated
@spacedmonkey
Copy link
Copy Markdown
Member Author

@felixarntz Feedback complete.

Copy link
Copy Markdown
Member

@felixarntz felixarntz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@spacedmonkey Two naming suggestions here, but code-wise looks good.

Comment thread package.json Outdated
@spacedmonkey spacedmonkey requested a review from felixarntz March 27, 2023 14:46
Copy link
Copy Markdown
Contributor

@jjgrainger jjgrainger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @spacedmonkey approved! This will be great to get this merged in today once @felixarntz has approved as this will have a positive impact on the remaining work 👍

Copy link
Copy Markdown
Member

@felixarntz felixarntz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @spacedmonkey!

@felixarntz felixarntz merged commit 977f785 into trunk Mar 29, 2023
@felixarntz felixarntz deleted the fix/scripts branch March 29, 2023 17:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Set up JS linting for repo

3 participants