fix: add build generated files to *ignore config#41826
fix: add build generated files to *ignore config#41826okwasniewski wants to merge 1 commit intofacebook:mainfrom
Conversation
|
cc: @huntie |
|
@cortinico has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
| packages/react-native/Libraries/vendor/**/* | ||
| node_modules/ | ||
| packages/*/node_modules | ||
| packages/*/dist |
There was a problem hiding this comment.
As a note, this hasn't been added globally because: 1/ not all of our packages follow this pattern yet, 2/ ideally (and open to debate!) even though we're in a monorepo, packages should self-specify their paths (e.g. in .gitignore, package.json#files), as if they were isolated.
However, I see there is a functional need to set this in .flowconfig and .prettierignore.
Requesting PR changes, to either:
- Include
.flowconfigand.prettierignorechanges but drop this entry (personal preference but again open to debate). - Leave this entry included, but delete redundant
.gitignoreentries that are covered by this rule in each package.
There was a problem hiding this comment.
Packages that self-specify their ignore paths would be ideal however, eslint doesn't support that (eslint/eslint#13389, neither do prettier: prettier/prettier#4081).
If we delete this entry you are unable to run yarn lint locally, that's the output for me:
✖ 710 problems (18 errors, 692 warnings)
18 errors and 655 warnings potentially fixable with the `--fix` option
And if we delete .gitignore from packages/ we will add dist folders to source control. If you don't want to duplicate this maybe we could remove packages .gitignore and move it to global .gitignore?
There was a problem hiding this comment.
Ah my bad! I'm in line with the above 👍🏻👍🏻
I missed that this is .eslintignore and not .gitignore 😅
Base commit: 38d07eb |
37124fb to
1372df1
Compare
|
@cortinico has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
|
This pull request was successfully merged by @okwasniewski in 1e0fc76. When will my fix make it into a release? | Upcoming Releases |
Summary: This PR adds build generated files to *ignore config files. This allows to locally run `yarn lint` ## Changelog: [INTERNAL] [ADDED] - Add build generated files to local config files Pull Request resolved: facebook#41826 Test Plan: CI Green Reviewed By: huntie Differential Revision: D51939024 Pulled By: cortinico fbshipit-source-id: cfd6c1c13dd23c692859cd06fa5955024fafc522
Summary:
This PR adds build generated files to *ignore config files. This allows to locally run
yarn lintChangelog:
[INTERNAL] [ADDED] - Add build generated files to local config files
Test Plan:
CI Green