Skip to content

Commit

Permalink
Remove ineffective excludes from typescript-config (#42375)
Browse files Browse the repository at this point in the history
Summary:
This removes the 4 ineffective and redundant entries from the `exclude` list in `tsconfig.json` (`typescript-config` package).

These entries have no effect as they are relative to the typescript-config package. Explained in detail here: tsconfig/bases#207

A newly generated RN app shows this config:

```
$ yarn tsc --showConfig | grep -A 5 exclude
    "exclude": [
        "node_modules/tsconfig/react-native/node_modules",
        "node_modules/tsconfig/react-native/babel.config.js",
        "node_modules/tsconfig/react-native/metro.config.js",
        "node_modules/tsconfig/react-native/jest.config.js"
    ]
```

Clearly, none of these files exist, therefore to remove ambiguity and reduce the complexity of the config, they should be removed.

## Changelog:

[GENERAL] [REMOVED] - Remove ineffective excludes from typescript-config

Pull Request resolved: #42375

Test Plan:
- Create new RN app (`npx react-native init`), install dependencies, run `yarn tsc`
- It works
- Recreate config, but _without_ the `exclude` section
- Everything works exactly the same

Reviewed By: huntie

Differential Revision: D52904713

Pulled By: NickGerleman

fbshipit-source-id: d1d6f65b164053f9a1e611022178ced032a38aef
  • Loading branch information
friederbluemle authored and facebook-github-bot committed Jan 19, 2024
1 parent 90df90e commit b962197
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions packages/typescript-config/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,5 @@
"skipLibCheck": true,
// Causes issues with package.json "exports"
"forceConsistentCasingInFileNames": false
},
"exclude": [
"node_modules",
"babel.config.js",
"metro.config.js",
"jest.config.js"
]
}
}

0 comments on commit b962197

Please sign in to comment.