feat: build the client head snapshot from the DOM without html-react-parser - #4
Quality Gate passed
Annotations
Check warning on line 84 in src/root-attributes.ts
sonarqubecloud / SonarCloud Code Analysis
'value' will use Object's default stringification format ('[object Object]') when stringified.
See more on https://sonarcloud.io/project/issues?id=react-head-manager&issues=AaBzMazp50elM9qDoaxK&open=AaBzMazp50elM9qDoaxK&pullRequest=4
Check warning on line 539 in src/manager.ts
sonarqubecloud / SonarCloud Code Analysis
Extract this nested ternary operation into an independent statement.
See more on https://sonarcloud.io/project/issues?id=react-head-manager&issues=AaBzMaz850elM9qDoaxQ&open=AaBzMaz850elM9qDoaxQ&pullRequest=4
Check warning on line 101 in src/manager.ts
sonarqubecloud / SonarCloud Code Analysis
Mark this member as `readonly`.
See more on https://sonarcloud.io/project/issues?id=react-head-manager&issues=AaBzMaz850elM9qDoaxO&open=AaBzMaz850elM9qDoaxO&pullRequest=4
Check warning on line 134 in __tests__/client-head.tsx
sonarqubecloud / SonarCloud Code Analysis
Prefer "expect(expectedNodes[index]).to.not.be.null" over this generic assertion; dedicated matchers read better and report clearer failures.
See more on https://sonarcloud.io/project/issues?id=react-head-manager&issues=AaBzMazh50elM9qDoaxG&open=AaBzMazh50elM9qDoaxG&pullRequest=4
Check warning on line 267 in __tests__/root-attributes.tsx
sonarqubecloud / SonarCloud Code Analysis
Prefer "expect(document.querySelector('[classname]')).to.be.null" over this generic assertion; dedicated matchers read better and report clearer failures.
See more on https://sonarcloud.io/project/issues?id=react-head-manager&issues=AaBzMaxf50elM9qDoaxF&open=AaBzMaxf50elM9qDoaxF&pullRequest=4
Check warning on line 11 in src/root-attributes.ts
sonarqubecloud / SonarCloud Code Analysis
Mark these members as `readonly`.
See more on https://sonarcloud.io/project/issues?id=react-head-manager&issues=AaBzMazp50elM9qDoaxH&open=AaBzMazp50elM9qDoaxH&pullRequest=4
Check failure on line 381 in src/manager.ts
sonarqubecloud / SonarCloud Code Analysis
Refactor this function to reduce its Cognitive Complexity from 19 to the 15 allowed.
See more on https://sonarcloud.io/project/issues?id=react-head-manager&issues=AaBzMaz850elM9qDoaxP&open=AaBzMaz850elM9qDoaxP&pullRequest=4
Check warning on line 33 in src/root-attributes.ts
sonarqubecloud / SonarCloud Code Analysis
Prefer using an optional chain expression instead, as it's more concise and easier to read.
See more on https://sonarcloud.io/project/issues?id=react-head-manager&issues=AaBzMazp50elM9qDoaxJ&open=AaBzMazp50elM9qDoaxJ&pullRequest=4
Check warning on line 110 in src/root-attributes.ts
sonarqubecloud / SonarCloud Code Analysis
Refactor this code to not use nested template literals.
See more on https://sonarcloud.io/project/issues?id=react-head-manager&issues=AaBzMazp50elM9qDoaxM&open=AaBzMazp50elM9qDoaxM&pullRequest=4
Check warning on line 113 in src/root-attributes.ts
sonarqubecloud / SonarCloud Code Analysis
Simplify this regular expression to reduce its runtime, as it has super-linear performance due to backtracking.
See more on https://sonarcloud.io/project/issues?id=react-head-manager&issues=AaBzMazp50elM9qDoaxN&open=AaBzMazp50elM9qDoaxN&pullRequest=4
Check warning on line 58 in __tests__/root-attributes.tsx
sonarqubecloud / SonarCloud Code Analysis
Prefer "expect(document.querySelector('[classname]')).to.be.null" over this generic assertion; dedicated matchers read better and report clearer failures.
See more on https://sonarcloud.io/project/issues?id=react-head-manager&issues=AaBzMaxf50elM9qDoaxE&open=AaBzMaxf50elM9qDoaxE&pullRequest=4
Check warning on line 110 in src/root-attributes.ts
sonarqubecloud / SonarCloud Code Analysis
Extract this nested ternary operation into an independent statement.
See more on https://sonarcloud.io/project/issues?id=react-head-manager&issues=AaBzMazp50elM9qDoaxL&open=AaBzMazp50elM9qDoaxL&pullRequest=4
Check failure on line 19 in src/root-attributes.ts
sonarqubecloud / SonarCloud Code Analysis
Refactor this function to reduce its Cognitive Complexity from 23 to the 15 allowed.
See more on https://sonarcloud.io/project/issues?id=react-head-manager&issues=AaBzMazp50elM9qDoaxI&open=AaBzMazp50elM9qDoaxI&pullRequest=4