io-app icon indicating copy to clipboard operation
io-app copied to clipboard

chore: [IAI-231] Add `eslint-plugin-react-native` to detect unused style and/or bad practices

Open dmnplb opened this issue 3 years ago • 2 comments

Short description

⚠️ This PR depends on #4076

This PR adds the plugin eslint-plugin-react-native to automatically detect all the unused styles and/or bad practices (listed in the respective repository). It also removes some hardcoded color values, involuntarily skipped during the previous PR.

List of changes proposed in this pull request

  • Add relative rules to .eslintrc to enable the plugin
  • Remove all the unused styles properties in the entire codebase
  • Remove all the single element style arrays
  • Remove all short HEX color values, involuntarily skipped in the previous PRs, and replace them with respective color values of the IOColors object
  • Add the new hexToRgba function to convert IOColors values to RGBa format. All the previous harcoded RGBa values have been replaced.

How to test

  • Start the IO app with yarn run-ios
  • Login to the app

dmnplb avatar Jul 26 '22 14:07 dmnplb

Affected stories

  • ⚙️ IAI-231: Aggiunta di eslint-plugin-react-native per trovare classi non usate e/o altre bad practices
    subtask of

Generated by :no_entry_sign: dangerJS against 18f28c169fa73f19dbddec35c56c07661e0d486d

pagopa-github-bot avatar Jul 26 '22 14:07 pagopa-github-bot

This pull request is stale because it has been open for 60 days with no activity. If the pull request is still valid, please update it within 14 days to keep it open or merge it, otherwise it will be closed automatically.

github-actions[bot] avatar Sep 29 '22 03:09 github-actions[bot]

:tada: All dependencies have been resolved !

dpulls[bot] avatar Nov 04 '22 15:11 dpulls[bot]

Codecov Report

Merging #4081 (18f28c1) into master (8838f7d) will increase coverage by 0.04%. The diff coverage is 78.94%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #4081      +/-   ##
==========================================
+ Coverage   47.57%   47.61%   +0.04%     
==========================================
  Files        1275     1275              
  Lines       25205    25227      +22     
  Branches     6604     6605       +1     
==========================================
+ Hits        11991    12013      +22     
  Misses      13164    13164              
  Partials       50       50              
Impacted Files Coverage Δ
ts/components/BarcodeCamera.tsx 30.43% <ø> (ø)
ts/components/CiePinpad/index.tsx 22.22% <ø> (ø)
ts/components/FiscalCodeComponent.tsx 85.29% <ø> (ø)
ts/components/LoadingSpinnerOverlay.tsx 100.00% <ø> (ø)
ts/components/PinCreationForm.tsx 88.37% <ø> (ø)
ts/components/Pinpad/index.tsx 5.88% <ø> (ø)
ts/components/RegionServiceWebView.tsx 4.16% <ø> (ø)
ts/components/RemindEmailValidationOverlay.tsx 7.82% <ø> (ø)
ts/components/cie/CieNfcOverlay.tsx 14.28% <ø> (ø)
ts/components/core/IOBadge.tsx 82.35% <ø> (ø)
... and 131 more

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 8838f7d...18f28c1. Read the comment docs.

codecov[bot] avatar Nov 04 '22 18:11 codecov[bot]