File tree Expand file tree Collapse file tree 6 files changed +11
-8
lines changed
examples/recommended-config
packages/eslint-plugin-react-prefer-function-component Expand file tree Collapse file tree 6 files changed +11
-8
lines changed Original file line number Diff line number Diff line change 1616 node-version-file : " .nvmrc"
1717 cache : " pnpm"
1818 - run : pnpm install --frozen-lockfile
19- - run : (cd packages/eslint-react-prefer-function-component && pnpm package:build)
19+ - run : (cd packages/eslint-plugin- react-prefer-function-component && pnpm package:build)
2020 # run again to link bin that is now available after package:build
2121 - run : pnpm install --frozen-lockfile
2222 - run : pnpm lint
Original file line number Diff line number Diff line change 1414 cache : " pnpm"
1515 registry-url : " https://registry.npmjs.org"
1616 - run : pnpm install --frozen-lockfile
17- - run : cp README.md LICENSE CHANGELOG.md packages/eslint-react-prefer-function-component
18- - run : cd packages/eslint-react-prefer-function-component && pnpm package:build && npm publish
17+ - run : cp README.md LICENSE CHANGELOG.md packages/eslint-plugin- react-prefer-function-component
18+ - run : cd packages/eslint-plugin- react-prefer-function-component && pnpm package:build && npm publish
1919 env :
2020 NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
Original file line number Diff line number Diff line change @@ -7,6 +7,5 @@ module.exports = {
77 jsx : true ,
88 } ,
99 } ,
10- plugins : [ "react-prefer-function-component" ] ,
1110 extends : [ "plugin:react-prefer-function-component/recommended" ] ,
1211} ;
Original file line number Diff line number Diff line change 1919 "prepare" : " husky install" ,
2020 "test" : " pnpm jest" ,
2121 "test:ci" : " pnpm test --coverage" ,
22- "typecheck" : " pnpm tsc --noEmit "
22+ "typecheck" : " pnpm run --recursive typecheck "
2323 },
2424 "devDependencies" : {
2525 "@babel/preset-env" : " ^7.22.9" ,
Original file line number Diff line number Diff line change 1212 "bugs" : {
1313 "url" : " https://github.com/tatethurston/eslint-plugin-react-prefer-function-component/issues"
1414 },
15- "main" : " index.js" ,
15+ "main" : " dist/ index.js" ,
1616 "scripts" : {
1717 "build" : " pnpm clean && pnpm tsc" ,
1818 "clean" : " rm -rf dist/*" ,
1919 "package:build" : " pnpm build && pnpm package:prune" ,
20- "package:prune" : " find dist -name test.* -delete"
20+ "package:prune" : " find dist -name test.* -delete" ,
21+ "typecheck" : " tsc --noEmit"
2122 },
2223 "types" : " index.d.ts" ,
2324 "keywords" : [
Original file line number Diff line number Diff line change 1+ import type { ESLint } from "eslint" ;
12import PreferFunctionComponent from "./prefer-function-component" ;
23
3- module . exports = {
4+ const plugin : ESLint . Plugin = {
45 configs : {
56 recommended : {
67 plugins : [ "react-prefer-function-component" ] ,
@@ -14,3 +15,5 @@ module.exports = {
1415 "react-prefer-function-component" : PreferFunctionComponent ,
1516 } ,
1617} ;
18+
19+ module . exports = plugin ;
You can’t perform that action at this time.
0 commit comments