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

build: update base tsconfig rules #63

Merged
merged 6 commits into from
Feb 13, 2025

Conversation

BhumikP
Copy link
Contributor

@BhumikP BhumikP commented Feb 13, 2025

What

This PR includes strict type checking by adding some rules in tsconfig.base.json

 "noFallthroughCasesInSwitch": true, // pevents execution from falling through to the next case in a switch without an explicit break
 "noUnusedParameters": true,   // Throws an error if a function parameter is declared but never used.
 "noUnusedLocals": true, // Throws an error if a local variable is declared but never used.
 "strictFunctionTypes": true, //   Enforces stricter type checking for function parameters and return types to prevent unsafe assignments.

Why

Related Issue(s):

https://github.com/rtCamp/headless/issues/317

How

Testing Instructions

Screenshots

Additional Info

Checklist

  • I have read the Contribution Guidelines.
  • My code is tested to the best of my abilities.
  • My code passes all lints (ESLint, tsc, prettier etc.).
  • [] My code has detailed inline documentation.
  • I have added unit tests to verify the code works as intended.
  • I have updated the project documentation accordingly.

justlevine
justlevine previously approved these changes Feb 13, 2025
Copy link
Collaborator

@justlevine justlevine left a comment

Choose a reason for hiding this comment

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

A single nitpick

@justlevine justlevine changed the title refactor: ad ts rules in base tsconfig build: update base tsconfig rules Feb 13, 2025
Copy link
Collaborator

@justlevine justlevine left a comment

Choose a reason for hiding this comment

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

Only change in c1a7f1f was formatting the compilerOptions (per the TS spec), no changes to properties.

@justlevine justlevine merged commit 068cab5 into rtCamp:develop Feb 13, 2025
16 checks passed
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.

2 participants