Skip to content

ci: Add ci to the project - #70

Closed
amareshsm wants to merge 5 commits into
mainfrom
add-ci
Closed

amareshsm wants to merge 5 commits into
mainfrom
add-ci

Conversation

@amareshsm

Copy link
Copy Markdown
Member

Prerequisites checklist

What is the purpose of this pull request?

Set up CI Workflow for Linting and Formatting.

What changes did you make? (Give an overview)

Related Issues

Is there anything you'd like reviewers to focus on?

@amareshsm
amareshsm marked this pull request as ready for review October 19, 2024 18:44
@netlify

netlify Bot commented Oct 19, 2024 •

Copy link
Copy Markdown

✅ Deploy Preview for eslint-code-explorer ready!

Name Link
🔨 Latest commit de215bb
🔍 Latest deploy log https://app.netlify.com/sites/eslint-code-explorer/deploys/67b4d5eb6dd0d000085f10be
😎 Deploy Preview https://deploy-preview-70--eslint-code-explorer.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@nzakas nzakas left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like this triggered some linting errors. Check the "Files changed" tab to see them.

@amareshsm

amareshsm commented Oct 22, 2024 •

Copy link
Copy Markdown
Member Author

It looks like this triggered some linting errors. Check the "Files changed" tab to see them.
I checked, and there were two warnings

  1. React Hook useCallback received a function whose dependencies are unknown. Pass an inline function instead
    const debouncedOnChange = useCallback(
    debounce((value: string) => {
    onChange?.(value);
    }, 400),
    [onChange],

    In the editor.tsx file, the onChange function we pass to useCallback receives a value as a prop to the component, which makes it unknown. Therefore, we can't use it as an inline function, so let's disregard this warning.

EDIT: we can remove useCallback I don't see much of a difference.

  1. React Hook useEffect has a missing dependency: 'fetchCodePath'. Either include it or remove the dependency array
    useEffect(() => {
    fetchCodePath();
    }, []);

    In the useEffect code block, we can't include fetchCodePath in the dependency array because we only want to call it during the initial render, not every time its dependencies change. Therefore, this change is unnecessary.

Therefore let's ignore both warnings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants