Closed glenflorendo closed 7 months ago
@bzzz-coding Let's convert the PropTypes into TypeScript. That should also resolve this issue.
@glenflorendo I don't see PropTypes being used in our project. Are you okay with turning off the prop-types rule (change react/prop-types: warn
to react/prop-types: off
)? This rule seems redundant to me since we use TypeScript. When I run pnpm ci:lint
, the rule warns about the Loader props missing in props validation, but I have defined the Loader props using TypeScript interfaces, which are used for type checking. What are your thoughts?
@glenflorendo I don't see PropTypes being used in our project. Are you okay with turning off the prop-types rule (change
react/prop-types: warn
toreact/prop-types: off
)? This rule seems redundant to me since we use TypeScript. When I runpnpm ci:lint
, the rule warns about the Loader props missing in props validation, but I have defined the Loader props using TypeScript interfaces, which are used for type checking. What are your thoughts?
Ah, I see what you mean.
I took a look at the Loader
component, and I think it's how we used React.FC
here. Instead, let's rewrite the function declaration to how this article does it. I think that should remove this error.
Also, could you move the prop comments to the interface instead?
User Story
As a developer, I want to adhere to our linting rules, so that I can ensure I am writing clean, correct code and following best practices.
Description
ESLint is a popular tool that is used to analyze code and find problems based on our configured rules, which includes several nice recommendations.
This ticket focuses on the
react/prop-types
.You will need to understand this rule and go through the code to resolve any problems.
To see all violations for all rules, run the following command:
This rule should be removed from our configuration to allow the default settings to come into affect. It was merely added as an override to not block development.
Additional Context
This work is being done now in part to Ci/CD efforts. We want to enable linting in our pipeline, however, it will always fail since we currently have errors.
Acceptance Criteria
Technical References