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

Fix default ajv options, eslint react warning #961

Merged
merged 2 commits into from
Mar 1, 2022

Conversation

zakpatterson
Copy link
Collaborator

What kind of change does this PR introduce? (delete not applicable)

  • Bugfix

At some point after an AJV update, we started seeing many console warnings like this one:

    console.warn
      strict mode: use allowUnionTypes to allow union type keyword at "#/definitions/ItemizedDeductions/properties/medicalAndDental" (strictTypes)

      at checkStrictMode (node_modules/ajv/lib/compile/util.ts:212:18)
      at strictTypesError (node_modules/ajv/lib/compile/validate/index.ts:322:18)
      at checkMultipleTypes (node_modules/ajv/lib/compile/validate/index.ts:294:5)
      at checkStrictTypes (node_modules/ajv/lib/compile/validate/index.ts:274:33)
      at schemaKeywords (node_modules/ajv/lib/compile/validate/index.ts:231:18)
      at typeAndKeywords (node_modules/ajv/lib/compile/validate/index.ts:161:3)
      at subSchemaObjCode (node_modules/ajv/lib/compile/validate/index.ts:147:3)
      at subschemaCode (node_modules/ajv/lib/compile/validate/index.ts:124:7)

For example at this test run

There are a lot of ajv options that we could use. See this doc

We were seeing a warning in test:

console.warn
strict mode: use allowUnionTypes to allow union type keyword at "#/definitions/ItemizedDeductions/properties/medicalAndDental" (strictTypes)

at checkStrictMode (node_modules/ajv/lib/compile/util.ts:212:18)
at strictTypesError (node_modules/ajv/lib/compile/validate/index.ts:322:18)
at checkMultipleTypes (node_modules/ajv/lib/compile/validate/index.ts:294:5)
at checkStrictTypes (node_modules/ajv/lib/compile/validate/index.ts:274:33)
at schemaKeywords (node_modules/ajv/lib/compile/validate/index.ts:231:18)
at typeAndKeywords (node_modules/ajv/lib/compile/validate/index.ts:161:3)
at subSchemaObjCode (node_modules/ajv/lib/compile/validate/index.ts:147:3)
at subschemaCode (node_modules/ajv/lib/compile/validate/index.ts:124:7)
@codecov
Copy link

codecov bot commented Mar 1, 2022

Codecov Report

Merging #961 (e8e615f) into master (a7d9db9) will increase coverage by 0.21%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #961      +/-   ##
==========================================
+ Coverage   53.23%   53.44%   +0.21%     
==========================================
  Files         216      216              
  Lines        9864     9864              
  Branches     1365     1365              
==========================================
+ Hits         5251     5272      +21     
+ Misses       4599     4578      -21     
  Partials       14       14              
Impacted Files Coverage Δ
src/core/data/validate.ts 100.00% <100.00%> (ø)
src/core/util.ts 80.24% <0.00%> (-1.24%) ⬇️
src/components/TaxPayer/SpouseAndDependent.tsx 92.85% <0.00%> (-1.20%) ⬇️
src/forms/Y2021/irsForms/ScheduleEIC.ts 79.32% <0.00%> (-0.56%) ⬇️
src/forms/Y2021/irsForms/F6251.ts 85.96% <0.00%> (-0.30%) ⬇️
src/forms/Y2020/irsForms/ScheduleEIC.ts 78.77% <0.00%> (+0.55%) ⬆️
...orms/Y2020/irsForms/worksheets/Pub596Worksheet1.ts 97.77% <0.00%> (+53.33%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 04bece0...e8e615f. Read the comment docs.

@zakpatterson zakpatterson merged commit a42107b into ustaxes:master Mar 1, 2022
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.

None yet

1 participant