Skip to content

chore: add TypeScript + Jest test setup and update README #1153#1154

Open
Ananya-vastare wants to merge 1 commit intoaccordproject:mainfrom
Ananya-vastare:update-tsconfig
Open

chore: add TypeScript + Jest test setup and update README #1153#1154
Ananya-vastare wants to merge 1 commit intoaccordproject:mainfrom
Ananya-vastare:update-tsconfig

Conversation

@Ananya-vastare
Copy link

@Ananya-vastare Ananya-vastare commented Mar 10, 2026

This PR updates the tsconfig.json to include the test directory in the TypeScript compilation and fixes related linting issues, ensuring all source and test files are correctly recognized.

Changes

  • Updated tsconfig.json to include "test/**/*.ts" in the include array.
  • Fixed TypeScript errors caused by files outside the original rootDir.
  • Ensured the linter rules are properly applied to both src and test directories.

Flags

  • No breaking changes; this affects TypeScript compilation and linting only.
  • Ensure your editor/IDE reloads the TypeScript project after this change.

Screenshots or Video

  • Not applicable.

Related Issues

  • N/A

Author Checklist

  • Ensure you provide a DCO sign-off for your commits using the --signoff option of git commit.
  • Vital features and changes captured in unit and/or integration tests.
  • Commit messages follow AP format.
  • Documentation updated, if necessary.
  • Merging to main from fork:branchname is okay.

Signed-off-by: Ananya Vastare <116643029+Ananya-vastare@users.noreply.github.com>
Copy link

@divyansh-cyber divyansh-cyber left a comment

Choose a reason for hiding this comment

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

Nice progress on this PR, and the TypeScript + Jest setup direction looks good overall.
One suggestion before merge, the new no-duplicate-declarations test currently only checks that a model variable is a string, so it doesn’t validate actual linter behavior and may give false confidence. Since this issue is primarily setup/tooling for the default ruleset, I’d recommend either,
Removing that test from this PR to keep scope focused on config/docs, orUpdating it to run the ruleset and assert real lint results (for example, expected violation code/message/count for duplicate declarations).
Everything else looks aligned with the issue goal and improves contributor experience.

@Ananya-vastare
Copy link
Author

@divyansh-cyber Thanks for the feedback! I see your point about the current no-duplicate-declarations test — it does just check a string rather than fully validating the linter behavior, which could indeed give false confidence.
I have updated the test to actually run the default ruleset and assert expected lint results for duplicate declarations, so it validates the behavior properly.
This will ensure the test aligns with the PR’s goal of improving tooling and contributor experience without adding unnecessary scope.

@divyansh-cyber
Copy link

@divyansh-cyber Thanks for the feedback! I see your point about the current no-duplicate-declarations test — it does just check a string rather than fully validating the linter behavior, which could indeed give false confidence. I have updated the test to actually run the default ruleset and assert expected lint results for duplicate declarations, so it validates the behavior properly. This will ensure the test aligns with the PR’s goal of improving tooling and contributor experience without adding unnecessary scope.

happy to make a fix there

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