Skip to content

Conversation

@TillaTheHun0
Copy link
Member

@TillaTheHun0 TillaTheHun0 commented Jun 7, 2021

This PR:

  • adds necessary eslint plugins (eslint was already added)
  • runs eslint --fix to autofix linting issues
  • manually update files to adhere to linting or comment an exception to the rule (ie. global fetch)
  • enforce linting via lint-staged and husky pre-commit hook
  • enforces package.json key order via lint-staged and husky pre-commit hook
  • remove unused lockfiles across the repo

no functionality should be changed as part of this PR

I attempted to keep the linting as "non-custom" as possible by minimizing eslint plugins used. Later on, we might revisit this ie. lint order of dependencies in files, or even linting package.jsons to to be in a consistent order.

Some files, I wasn't sure on whether we wanted to remove the unused variables, as I think they are being used to demonstrate the contract of the service/adapter. Instead of that, we should use jsdoc and module types, eventually. I will create an issue to track revisiting those instances where I disabled linting rules and to resolve them where applicable. Would be good first issue for a contributor, I think.

@TillaTheHun0
Copy link
Member Author

The adapter-fs tests seem to have been broken for a while. I think we should revisit those tests in a separate PR. Thoughts @tripott

@TillaTheHun0
Copy link
Member Author

TillaTheHun0 commented Jun 7, 2021

Also, it looks like there are per adapter github actions that publish to npm when it's directory is changed on main. Perhaps this PR needs to contain version bumps for each adapter? Perhaps it's a good idea to add something like lerna sooner rather than later to automate bumping versions across packages. 🤔

@tripott
Copy link
Contributor

tripott commented Jun 7, 2021

@TillaTheHun0 Yes, auto semver bumps would be good.

@TillaTheHun0
Copy link
Member Author

I am going to manually bump the version of each adapter for now, until we can all meet to discuss what sort of tooling we want to us for automatically bumping versions.

I will do this as a single commit on the tip of this branch.

@TillaTheHun0 TillaTheHun0 changed the title chore: add eslint and enforce via husky chore: add eslint, styling checks, and enforce via husky Jun 8, 2021
- Remove unused lockfiles
- Add sorting goal to all package.json files to ensure consistency
- manual linting fixes
@TillaTheHun0
Copy link
Member Author

bumped versions in 9945043

@TillaTheHun0 TillaTheHun0 merged commit 9dd753f into main Jun 8, 2021
@TillaTheHun0 TillaTheHun0 deleted the chore/lint branch June 8, 2021 12:55
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.

4 participants