How TypeScript Compiler Options Influence Code Quality: A Correlation Study with Git Repositories
DOI:
https://doi.org/10.5753/jserd.2026.5985Keywords:
JavaScript, TypeScript, Compiler Configurations, Code Quality, Static Analysis, GitHub MiningAbstract
TypeScript is widely adopted in modern software development to improve code reliability through static typing. However, its effectiveness in promoting code quality depends heavily on the compiler options configured within each project. Despite its popularity, little is known about how these compiler configurations influence code quality in practice. This study investigates the relationship between TypeScript compiler options and code quality metrics in real-world software projects. We analyzed over 4,000 public GitHub repositories that use TypeScript, through an automated four-stage pipeline comprising data mining, compiler configuration extraction, static quality assessment, and statistical correlation analysis. Projects were selected based on predefined criteria, and their tsconfig.json files were parsed to extract compiler settings. SonarQube was employed to evaluate bugs and code smells, aggregated into a composite Static Issues Index (SII), which was then correlated with specific compiler options. The results show that stricter compiler settings, such as noImplicitAny and noUnusedParameters, tend to correlate with fewer bugs and code smells. However, some options behave counterintuitively at scale; for instance, enabling noFallthroughCasesInSwitch and noUncheckedIndexedAccess correlated positively with bug counts in our dataset, suggesting the presence of confounding factors rather than a direct causal effect. These findings provide large-scale empirical evidence that compiler configurations in TypeScript are associated with measurable differences in static code quality. The study offers practical guidance for developers seeking to enforce best practices through TypeScript's configuration mechanisms and contributes an empirical perspective to the software engineering community.
Downloads
References
Ayewah, N., Pugh, W., Hovemeyer, D., Morgenthaler, J. D., and Penix, J. (2008). Using static analysis to find bugs. IEEE Software, 25(5):22–29.
Bierman, G., Abadi, M., and Torgersen, M. (2014). Understanding TypeScript. Proceedings of the ACM on Programming Languages, 1(OOPSLA):1–27.
Black, N. (2020). Boris Cherny on TypeScript. IEEE Software, 37(2):98–100. Accessed: 2025-04-14.
Bogner, J. and Merkel, M. (2022). To type or not to type? A systematic comparison of the software quality of JavaScript and TypeScript applications on GitHub. In Proceedings of the 19th International Conference on Mining Software Repositories, MSR ’22, pages 658–669, New York, NY, USA. Association for Computing Machinery.
Bonino Quintana, J. and Fagerlind, S. (2020). Datamining GitHub: Examining time-to-solve for issues in relation to group size. KTH DiVA Portal.
Chacon, S. and Straub, B. (2014). Pro Git. Apress, 2nd edition.
Chess, B. and McGraw, G. (2004). Static analysis for security. IEEE Security & Privacy, 2(6):76–79.
Desmazières, A., Di Cosmo, R., and Lorentz, V. (2025). 50 years of programming language evolution through the Software Heritage Looking Glass. In Mining Software Repositories 2025.
Fard, A. M. and Mesbah, A. (2013). JSNose: Detecting JavaScript code smells. In 2013 IEEE 13th International Working Conference on Source Code Analysis and Manipulation (SCAM), pages 116–125. IEEE.
Fernandes, E., Chávez, A., Garcia, A., Ferreira, I., Cedrim, D., Sousa, L., and Oizumi, W. (2020). Refactoring effect on internal quality attributes: What haven't they told you yet? Information and Software Technology, 126:106347.
Gao, Z., Bird, C., and Barr, E. T. (2017). To type or not to type: Quantifying detectable bugs in JavaScript. In Proceedings of the 39th International Conference on Software Engineering (ICSE ’17), pages 758–769. IEEE Press.
GitHub, Inc. (2025). GitHub Docs. [link]. Accessed: 2025-04-14.
Goldberg, J. (2022). Learning TypeScript. O’Reilly Media.
Hu, H., Wang, Y., Rubin, J., and Pradel, M. (2025). An empirical study of suppressed static analysis warnings. Proceedings of the ACM on Software Engineering, 2(FSE):290–311.
International, E. (2025). ECMAScript Language Specification. [link]. ECMA-262, 12th Edition, 2025.
International Organization for Standardization and International Electrotechnical Commission (2024). ISO/IEC 25002:2024 Systems and Software Engineering — Systems and Software Quality Requirements and Evaluation (SQuaRE) — Quality Model Overview and Usage. [link]. International Standard, Edition 1, March 2024.
Jalote, P. (2025). Industry-strength software. In A Concise Introduction to Software Engineering: With Open Source and GenAI, pages 1–22. Springer.
JetBrains (2024). The State of Developer Ecosystem in 2024. [link]. Accessed: 2025-04-14.
New, M. S., Licata, D. R., and Ahmed, A. (2021). Gradual type theory. Journal of Functional Programming, 31:e21.
Oliveira, A., Oizumi, W., Sousa, L., Assunção, W. K., Garcia, A., Lucena, C., and Cedrim, D. (2022). Smell patterns as indicators of design degradation: Do developers agree? In Proceedings of the XXXVI Brazilian Symposium on Software Engineering, pages 311–320.
Prescott, K. (2018). How we gradually migrated to TypeScript at Unsplash. [link]. Accessed: 2025-04-14.
Rastogi, A., Swamy, N., Fournet, C., Bierman, G., and Vekris, P. (2015). Safe & efficient gradual typing for TypeScript. In Proceedings of the 42nd Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL ’15, pages 167–180, New York, NY, USA. Association for Computing Machinery.
Ray, B., Posnett, D., Devanbu, P., and Filkov, V. (2017). A large-scale study of programming languages and code quality in GitHub. Communications of the ACM, 60(10):91–100.
SonarSource (2025). SonarQube Documentation. [link]. Accessed: 2025-04-14.
Stack Overflow (2024). 2024 Stack Overflow Developer Survey: Programming, Scripting, and Markup Languages. [link]. Accessed: 2025-04-14.
Tilkov, S. and Vinoski, S. (2010). Node.js: Using JavaScript to build high-performance network programs. IEEE Internet Computing, 14(6):80–83.
TypeScript Project (2025). TypeScript Docs – Documentation. [link]. Accessed: 2025-04-14.
W3Techs (2025). Usage statistics of JavaScript as client-side programming language on websites. [link]. Accessed: 2025-04-14.
Wang, Z., Fang, Y., and Wang, N. (2025). An empirical study on bugs in TypeScript programming language. Journal of Systems and Software, 226:112445.
Wirfs-Brock, A. and Eich, B. (2020). JavaScript: The first 20 years. In Proceedings of the ACM on Programming Languages (HOPL-IV). ACM.
Downloads
Published
How to Cite
Issue
Section
License
Copyright (c) 2026 Thomaz Zandonotto, Alex Roehrs, Kleinner Silva Farias de Oliveira, Jorge Luis Victória Barbosa, Cristiano André da Costa, Rodrigo da Rosa Righi

This work is licensed under a Creative Commons Attribution 4.0 International License.

