-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Dev - Lint is running on node_modules #24018
Comments
Triggered auto assignment to @flaviadefaria ( |
Bug0 Triage Checklist (Main S/O)
|
Proposal from Contributor @rayane-djouah ProposalPlease re-state the problem that we are trying to solve in this issue.In our current configuration of the .eslintrc.js file, we are only instructing ESLint to ignore the node_modules/.bin/ and node_modules/.cache/ directories. However, we are not ignoring the entirety of the node_modules directory. As a result, this slows down lint execution significantly and also causes ESLint to display error messages originating from the node_modules directory. Line 5 in 30fc9bf
What is the root cause of that problem?The root cause of this problem is the missing 'node_modules/**' pattern in the ignorePatterns array of the .eslintrc.js configuration file. Without this pattern, ESLint does not know to ignore all files and directories inside node_modules, leading to slower execution and unnecessary error messages. What changes do you think we should make in order to solve the problem?To solve this problem, we should add 'node_modules/' to the ignorePatterns array in the .eslintrc.js file. This pattern tells ESLint to ignore all files and directories recursively inside the node_modules directory. By implementing this change, we can speed up ESLint execution and avoid error messages from the node_modules directory. What alternative solutions did you explore? (Optional) |
I believe this issue is resolved after #20179 PR merge (adding .eslintignore) |
@hayata-suenaga since you worked on the issue with the linked PR do you agree with the above? |
wow we actually wasn't ignoring node_module at all for linter all this time??? @flaviadefaria anyway, yes that PR should fix the issue |
Cool so closing this! |
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Action Performed:
Expected Result:
Lint should not run on node_modules
Actual Result:
Lint is running on node_modules
Workaround:
unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number: Latest Main

Reproducible in staging?: N
Reproducible in production?: N
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation
Expensify/Expensify Issue URL:
Issue reported by: @rayane-djouah
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1690636757149339
View all open jobs on GitHub
The text was updated successfully, but these errors were encountered: