Skip to content

Commit b14a193

Browse files
committed
Simplify index.cjs
1 parent 618965c commit b14a193

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "eslint-plugin-react-you-might-not-need-an-effect",
3-
"version": "0.0.42",
3+
"version": "0.0.43",
44
"description": "ESLint rule to warn against unnecessary React useEffect hooks.",
55
"author": "Nick van Dyke",
66
"license": "MIT",

src/index.cjs

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
const { name, rule } = require("./rule.js");
2-
3-
module.exports = {
4-
rules: {
5-
[name]: rule,
6-
},
7-
};
1+
// `build.js` will bundle everything into CJS.
2+
// Would be nice to have it use `index.js` directly, but then `esbuild` doesn't
3+
// seem capable of structuring the CJS export the way ESLint expects.
4+
module.exports = require("./index.js").default;

0 commit comments

Comments
 (0)