Closed G-Rath closed 1 year ago
Whoops, forgot to fix the type errors in the tests 😅:
serverless-azure-functions on update-typescript-eslint [?] is 📦 v2.2.1 via v18.11.0 took 5s
❯ npx tsc
src/plugins/func/azureFuncPlugin.test.ts:65:78 - error TS2554: Expected 0 arguments, but got 1.
65 MockFactory.updateService(sls, MockFactory.createTestSlsFunctionConfig(false))
~~~~~
src/plugins/func/azureFuncPlugin.test.ts:69:76 - error TS2554: Expected 0 arguments, but got 1.
69 const expectedFunctionsYml = MockFactory.createTestSlsFunctionConfig(false);
~~~~~
src/services/apimService.test.ts:716:46 - error TS2339: Property 'apim' does not exist on type 'unknown'.
716 const expected = slsFunctions[index].apim.operations[0] as OperationContract;
~~~~
src/services/funcService.test.ts:60:78 - error TS2554: Expected 0 arguments, but got 1.
60 MockFactory.updateService(sls, MockFactory.createTestSlsFunctionConfig(false))
~~~~~
src/services/funcService.test.ts:64:76 - error TS2554: Expected 0 arguments, but got 1.
64 const expectedFunctionsYml = MockFactory.createTestSlsFunctionConfig(false);
~~~~~
Found 5 errors.
@gligorkot let me know if you'd like the TypeScript build change pulled out into its own PR for tidiness :)
Good work @G-Rath, thank you for this.
What did you implement:
Updates to the next major version of
@typescript-eslint
- it's not the highest, but it's higher :)How did you implement it:
Because of changes in how linting works, I had to create a new configuration for TypeScript to use when building that just includes the project files - that way the main config can include all files which is needed for
@typescript-eslint
to be able to lint them properly with typechecking.This is a common pattern that I use in my most of my projects, and has the same build output.
How can we verify it:
Run the linting and compiling commands.
Also, running
colordiff -r
against thelib
generated bynpm run compile
onmaster
vs this branch shows no differences:Todos:
Note: Run
npm run test:ci
to run all validation checks on proposed changesValidate via
npm run lint
Note: Some reported issues can be automatically fixed by running
npm run lint:fix
Validate via
npm test
Is this ready for review?: YES Is it a breaking change?: NO