-
Notifications
You must be signed in to change notification settings - Fork 47.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build(eslint-plugin-react-hooks): remove tsup
This change removes tsup from the devloop of `eslint-plugin-react-hooks`. I was originally using it to quickly run tests and builds as I was doing the migration, but now that we've added support to the larger rollup build process, there's no longer a need for it. I've added an index.js to the root of the package folder that's just a proxy for the `src/index.ts`. It uses tsx to load it for other consumers in the monorepo (e.g. the eventual e2e tests fixtures). For jest, the index.js is able to load the ts file due to the added configuration in the package's babel and jest configs. This `index.js` will only be used for dev purposes. The `index.js` that's in the `npm` folder is what will actually make it into the published package.
- Loading branch information
1 parent
ad617f9
commit bddfebf
Showing
8 changed files
with
10 additions
and
495 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
module.exports = require('./build/index.js'); | ||
module.exports = require('./src/index.ts'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,7 @@ | ||
/* eslint-disable */ | ||
|
||
const {join} = require('path'); | ||
const {exec} = require('child-process-promise'); | ||
|
||
module.exports = async () => { | ||
module.exports = () => { | ||
// can use beforeEach/afterEach or setupEnvironment.js in node >= 13: https://github.com/nodejs/node/pull/20026 | ||
// jest's `setupFiles` is too late: https://stackoverflow.com/a/56482581/3406963 | ||
process.env.TZ = 'UTC'; | ||
|
||
const cwd = join( | ||
__dirname, | ||
'..', | ||
'..', | ||
'packages', | ||
'eslint-plugin-react-hooks' | ||
); | ||
// Run TypeScript on eslint-plugin-react-hooks prior to tests | ||
return await exec('yarn build', {cwd}); | ||
}; |