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: fix eslint and ts errors in dev and introduce tsconfig.prod.ts file #74

Conversation

mkarajohn
Copy link
Contributor

@mkarajohn mkarajohn commented Oct 10, 2023

Resolves DSTRBTN-540

Generated summary (powered by Graphite)

TL;DR

This pull request updates the ESLint configuration, package.json, and TypeScript configuration files to improve the build process and linting rules.

What changed

  • Updated ESLint rules to disable unnecessary rules for React 17+ and added TypeScript specific rules under the overrides section.
  • Added "types" to the exports field in package.json.
  • Updated the build scripts in package.json to use a new tsconfig.prod.json file.
  • Simplified the tsconfig.json file and created a new tsconfig.prod.json file for production builds.
  • The tsconfig.prod.json file excludes test files from the build process.

How to test

  1. Pull down the changes from this branch.
  2. Run npm install to update your packages.
  3. Run npm run lint to check the linting rules.
  4. Run npm run build to test the build process.

Why make this change

These changes improve the build process by excluding test files and improve the linting rules to better match our usage of React and TypeScript. This will help maintain code quality and reduce build times.

Copy link
Contributor Author

mkarajohn commented Oct 10, 2023

Current dependencies on/for this PR:

This comment was auto-generated by Graphite.

panvourtsis
panvourtsis previously approved these changes Oct 19, 2023
@panvourtsis panvourtsis dismissed their stale review October 23, 2023 10:33

i am pulling my approval as this will be the point to fix any tests

@mkarajohn mkarajohn force-pushed the 10-09-chore_fix_eslint_and_ts_errors_in_dev_and_introduce_tsconfig.prod.ts_file branch from 7bf9dde to bf89cd4 Compare October 24, 2023 12:54
@orfium-sonarqube-app
Copy link

SonarQube Quality Gate

Quality Gate failed

Failed condition 4.4% 4.4% Coverage on New Code (is less than 80%)

See analysis details on SonarQube

@mkarajohn mkarajohn force-pushed the 10-09-chore_fix_eslint_and_ts_errors_in_dev_and_introduce_tsconfig.prod.ts_file branch from bf89cd4 to 3754372 Compare October 24, 2023 14:16
@mkarajohn mkarajohn closed this Oct 24, 2023
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