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

feature Create Linting Package #44

Merged
merged 15 commits into from
Dec 7, 2023
Merged

Conversation

TimRoe
Copy link
Contributor

@TimRoe TimRoe commented Nov 30, 2023

Ticket 6988

App PR

Description of Change

  • Created new linting package with one rule for deprecating VAButton with Button
  • No rule for SegmentedControl as it has already been removed from the app
  • Miscellaneous note: the package name is @department-of-veterans-affairs/eslint-config-mobile, a little different than other packages to follow ESLint naming guidance
  • Created bug for GHA workflow failure (that's rare enough to maybe never be worth fixing)

Testing Packages

0.0.1-alpha.0
0.2.0-alpha.0

Testing

Tested it worked as expected within VA Mobile repo w/ alpha build. It yields deprecation warnings for VAButton (and for semicolons used for testing behavior which has been removed for v0.1.0 to be published with this PR).

PR Checklist

Code reviewer validation:

  • General
    • PR is linked to ticket(s)
    • PR has changelog label applied if it's to be included in the changelog
    • Acceptance criteria:
      • All satisfied or
      • Documented reason for not being performed or
      • Split to separate ticket and ticket is linked by relevant AC(s)
    • Above PR sections adequately filled out
    • If any breaking changes, in accordance with the pre-1.0.0 versioning guidelines: a CU ticket has been created for the VA Mobile App detailing necessary adjustments with the package version that will be published by this ticket
  • Code
    • Tests are included if appropriate (or split to separate ticket)
    • New functions have proper TSDoc annotations

Publish

If changes warrant a new version per the versioning guidelines and the PR is approved and ready to merge:

@TimRoe TimRoe changed the title Feature/6988 roettger linting package feature Create Linting Package Nov 30, 2023
@TimRoe TimRoe force-pushed the feature/6988-roettger-LintingPackage branch from aee9174 to 71676f3 Compare December 5, 2023 18:29
@@ -31,9 +31,9 @@ export const webStorybookColorScheme = () => {
if (colorScheme !== 'light' && colorScheme !== 'dark') {
return null
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Playing with linting did it, I swear. 😆

@TimRoe TimRoe marked this pull request as ready for review December 5, 2023 23:08
@TimRoe TimRoe requested a review from a team as a code owner December 5, 2023 23:08
@TimRoe TimRoe changed the title feature Create Linting Package feature/Create Linting Package Dec 5, 2023
Copy link
Contributor

@narin narin left a comment

Choose a reason for hiding this comment

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

A couple of questions but overall looks great.


## Getting Started
These steps assume you already have `eslint` installed for your project as a devDependency and configured correctly.
1. Add `eslint-plugin-deprecate` as a devDependency to your project (peerDependency of package)
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a way to modify our package.json to include eslint-plugin-deprecate so consumers don't have to add both packages?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Possibly. Thought I saw something recommending having ESLint plugins as peerDependencies, but was maybe crossing streams. I can see if it works including as a dependency.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Appears to work, changes are here/reflected in the 0.2.0-alpha.0 and I just committed them the app-side review (which will need to be bumped one more time after this is merged and published as 0.3.0).

@@ -0,0 +1,34 @@
{
"name": "@department-of-veterans-affairs/eslint-config-mobile",
"version": "0.0.1-alpha.0",
Copy link
Contributor

Choose a reason for hiding this comment

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

You mentioned bumping this to 0.1.0 once complete, but should we consider keeping this version in line with the corresponding components packages that contain the same components? I've seen some typescript packages do this.

Copy link
Contributor Author

@TimRoe TimRoe Dec 6, 2023

Choose a reason for hiding this comment

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

That makes sense to me with the acknowledgment it'll hop around somewhat randomly to chase components which'll have plenty of updates that do not require updating the linting.

That said, the existing publish workflow can't handle hopping to whatever version matches without us manually seeding it in a way that would align (e.g. committing on the branch up to 0.2.0 to ensure it goes to 0.3.0 alongside Button release).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Bumped to 0.2.0 testing above so it'll be 0.3.0 when published in main in alignment with the addition of Button to the components package.

@TimRoe TimRoe changed the title feature/Create Linting Package feature Create Linting Package Dec 7, 2023
@TimRoe TimRoe merged commit 3ba63b8 into main Dec 7, 2023
7 of 9 checks passed
@narin narin deleted the feature/6988-roettger-LintingPackage branch December 28, 2023 20:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants