Currently we're not running eslint on any files, this changes that and fixes any issues that arise.
It also proposes a new structure for the make commands in JS:
make lint - runs npm run lint and npm run format:check, both will run even if the other fails. This is now used in CI to check that there are no lint errors and no formatting issues
make format runs npm run lint:fix and npm run format:fix, both will run even if the other fails. This is most likely best used locally on a dev machine to have eslint/prettier fix what they can and then we review what's left.
I leaned on the side of removing code rather than disabling rules, but happy to revert some changes if desired.
[ ] I have added documentation for new/changed functionality in this PR or in a PR to openfga.dev [Provide a link to any relevant PRs in the references section above]
[x] The correct base branch is being used, if not main
[ ] I have added tests to validate that the change in functionality is working as expected
Description
Currently we're not running eslint on any files, this changes that and fixes any issues that arise.
It also proposes a new structure for the make commands in JS:
make lint
- runsnpm run lint
andnpm run format:check
, both will run even if the other fails. This is now used in CI to check that there are no lint errors and no formatting issuesmake format
runsnpm run lint:fix
andnpm run format:fix
, both will run even if the other fails. This is most likely best used locally on a dev machine to have eslint/prettier fix what they can and then we review what's left.I leaned on the side of removing code rather than disabling rules, but happy to revert some changes if desired.
References
Review Checklist
main