Skip to content

APP-50 - Enforce specific linting rules for app development.#192

Open
aligent-lturner wants to merge 1 commit into
mainfrom
feature/APP-50_lint_aio_sdk_anti_patterns
Open

APP-50 - Enforce specific linting rules for app development.#192
aligent-lturner wants to merge 1 commit into
mainfrom
feature/APP-50_lint_aio_sdk_anti_patterns

Conversation

@aligent-lturner

Copy link
Copy Markdown
Contributor

Description of the proposed changes
Add linting rules for App Builder app development:

  • no-restricted-imports on @adobe/aio-sdk, preventing bringing in the whole sdk just for a specific function
  • @typescript-eslint/no-non-null-assertion, preventing !. usage
  • @typescript-eslint/prefer-nullish-coalescing, preventing accidental mistreatment of valid falsy values
  • no-restricted-syntax (process.env), process.env is not reliable in OpenWhisk runtime, and should not be used.

Screenshots
N/A

Other solutions considered (if any)
The prefer-nullish-coalescing rule is the most tenuous, but I think it's probably best to be explicit if we really need to check for empty strings/0/etc.

Notes to reviewers

  • 🛈 Toggl Code: APP-50: Code Review
  • 🛈 When you've finished leaving feedback, please add a final comment to the PR tagging the author, letting them know that you have finished leaving feedback

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.

1 participant