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

chore(datastore): remove tslint and enable eslint #13316

Merged
merged 7 commits into from May 8, 2024

Conversation

HuiSF
Copy link
Contributor

@HuiSF HuiSF commented Apr 30, 2024

Description of changes

Details see commit messages in this PR.

E2E test run against the changes included in this PR: https://github.com/aws-amplify/amplify-js/actions/runs/8900079676

Issue #, if available

Description of how you validated changes

Checklist

  • PR description included
  • yarn test passes
  • Tests are changed or added
  • Relevant documentation is changed or added (and PR referenced)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@HuiSF HuiSF requested review from a team as code owners April 30, 2024 18:35
svidgen
svidgen previously approved these changes May 1, 2024
Comment on lines -204 to +217
const result: T[] = await new Promise((resolve, reject) => {
const result: T[] = await new Promise((_resolve, _reject) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Not thrilled with this. With _ prefixed names indicating an unused variable, this just reads wrong. This feels like a consequence of the linter rule I complained about a little previously which prevents resolve, reject from being named anything else.

Does it make sense to drop that rule?

Copy link
Contributor

@svidgen svidgen May 1, 2024

Choose a reason for hiding this comment

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

I see lots of other places the _ was also used for disambiguation between contexts. Not super thrilling. And, I'd still be interested in turning off the promise arg naming rule, personally. But, I don't want to block on this at all.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We can discuss this and adjust the settings. Though this particular change was for the variable shadowing rule - that we had nested promise executors implementation.

@HuiSF HuiSF force-pushed the hui/chore/datastore/eslint branch 3 times, most recently from ad3b7b3 to 7c1970c Compare May 7, 2024 16:32
jimblanc
jimblanc previously approved these changes May 7, 2024
svidgen
svidgen previously approved these changes May 8, 2024
@HuiSF HuiSF dismissed stale reviews from svidgen and jimblanc via 43f6102 May 8, 2024 16:21
@HuiSF HuiSF force-pushed the hui/chore/datastore/eslint branch from 7c1970c to 43f6102 Compare May 8, 2024 16:21
@HuiSF HuiSF merged commit 2ce82f9 into main May 8, 2024
30 checks passed
@HuiSF HuiSF deleted the hui/chore/datastore/eslint branch May 8, 2024 17:05
HuiSF added a commit that referenced this pull request May 8, 2024
* chore(datastore): remove tslint and enable eslint

* chore(datastore): run yarn lint:fix

* chore(datastore): manual fix of linter reported issues (issues that requries refactoring are suppresed by eslint ignore comment for stability)

* chore(data-storage-adapter): remove tslint and enable eslint

* chore(data-storage-adapter): run yarn lint:fix

* chore(data-storage-adapter): manual fix of linter reported issues

* chore(repo): remove eslint muanl suppression
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.

None yet

3 participants