Closed matejchalk closed 2 months ago
๐คจ Code PushUp report has both improvements and regressions โ compared target commit c2b66917958cfbcc8c268490bfd3d65d4a185623 with source commit 2db9a5c4c3b26365bc276c5c11b350a32e9d5f06.
๐ต๏ธ See full comparison in Code PushUp portal ๐
๐ท๏ธ Category | โญ Previous score | โญ Current score | ๐ Score change |
---|---|---|---|
Performance | ๐ก 51 | ๐ก 54 | |
Code style | ๐ข 99 | ๐ข 99 | |
Code coverage | ๐ก 90 | ๐ก 90 | |
Custom checks | ๐ก 67 | ๐ก 67 | โ |
Security | ๐ข 98 | ๐ข 98 | โ |
Updates | ๐ก 78 | ๐ก 78 | โ |
Accessibility | ๐ข 91 | ๐ข 91 | โ |
Best Practices | ๐ข 100 | ๐ข 100 | โ |
SEO | ๐ก 61 | ๐ก 61 | โ |
Bug prevention | ๐ข 100 | ๐ข 100 | โ |
Motivation - see Consistent Type Imports and Exports: Why and How.
Enabled
verbatimModuleSyntax
flag and autofixed imports and exports by temporarily enablingconsistent-type-imports
andconsistent-type-exports
ESLint rules. The TypeScript ESLint docs don't recommend combining lint rules with compiler flag, so I went with compiler flag for all ESM-compatible projects. The CommonJS-onlynx-plugin
is the exception, so lint rules are used instead of compiler flag in this case.IDEs should automatically suggest type imports and provide suggestions when there's an error (tested with VSCode), so it should make for good DX :crossed_fingers:
Also added an ESLint config for
tools
folder, since quite a lot of code exists there which could benefit from linting. It's not enforced in CI as it's not an Nx project, but the errors and warnings are now shown in IDE.Almost all the changed files in this PR are result of autofix, the only other changes are to files:
tsconfig.base.json
.eslintrc.json
packages/nx-plugin/.eslintrc.json
packages/nx-plugin/tsconfig.json
tools/.eslintrc.json