Skip to content

Commit

Permalink
react v0.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
woohm402 committed Jun 26, 2024
1 parent 8862807 commit 98a2a51
Show file tree
Hide file tree
Showing 9 changed files with 70 additions and 202 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/publish-base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,8 @@ jobs:
- name: Publish to npm
run: |
yarn
yarn build
jq '.name = "@woohm402/eslint-config-base"' packages/base/package.json > package.json.temp && mv package.json.temp packages/base/package.json
echo "//registry.npmjs.org/:_authToken=${{secrets.NPM_TOKEN}}" > ~/.npmrc
yarn publish:base --registry=https://registry.npmjs.org/
yarn
yarn workspace @woohm402/eslint-config-base publish
7 changes: 5 additions & 2 deletions .github/workflows/publish-react.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ jobs:
# npm 공용 레지스트리에 배포
- name: Publish to npm
run: |
yarn
yarn
yarn build
jq '.name = "@woohm402/eslint-config-react"' packages/react/package.json > package.json.temp && mv package.json.temp packages/react/package.json
echo "//registry.npmjs.org/:_authToken=${{secrets.NPM_TOKEN}}" > ~/.npmrc
yarn publish:react --registry=https://registry.npmjs.org/
yarn
yarn workspace @woohm402/eslint-config-react publish
4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@
"scripts": {
"test": "turbo run test",
"build": "turbo run build",
"prettier": "prettier . --check",
"publish:base": "yarn build && yarn workspace @woohm402/eslint-config-base publish",
"publish:react": "yarn build && yarn workspace @woohm402/eslint-config-react publish"
"prettier": "prettier . --check"
},
"devDependencies": {
"prettier": "3.3.2",
Expand Down
5 changes: 2 additions & 3 deletions packages/base/package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
{
"name": "@woohm402/eslint-config-base",
"name": "base",
"version": "0.3.0",
"description": "Base config for TypeScript",
"scripts": {
"build": "tsup",
"test": "vitest run",
"publish": "npm publish"
"test": "vitest run"
},
"type": "module",
"main": "dist/index.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/react/__tests__/base.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const eslint = new ESLint({
overrideConfigFile: path.resolve(__dirname, '_config.js'),
});

describe('@woohm402/eslint-config-base', function () {
describe('@woohm402/eslint-config-react', function () {
it('right', async function () {
const [result] = await eslint.lintFiles([`${__dirname}/right.tsx`]);

Expand Down
2 changes: 1 addition & 1 deletion packages/react/__tests__/right.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export const Component = ({ name }: { name: string }) => {
useEffect(() => {
let ignore = false;

fetchData(name).then((data) => !ignore && setData(data));
fetchData(name).then((newData) => !ignore && setData(newData));

return () => {
ignore = true;
Expand Down
2 changes: 1 addition & 1 deletion packages/react/__tests__/wrong.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export const Component = ({ name }: { name: string }) => {
useEffect(() => {
let ignore = false;

fetchData(name).then((data) => !ignore && setData(data));
fetchData(name).then((newData) => !ignore && setData(newData));

return () => {
ignore = true;
Expand Down
9 changes: 4 additions & 5 deletions packages/react/package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
{
"name": "@woohm402/eslint-config-react",
"version": "0.1.0",
"name": "react",
"version": "0.3.0",
"description": "Base config for TypeScript React",
"scripts": {
"build": "tsup",
"test": "vitest run",
"publish": "npm publish"
"test": "vitest run"
},
"type": "module",
"main": "dist/index.js",
Expand Down Expand Up @@ -35,7 +34,7 @@
"homepage": "https://github.com/woohm402/eslint-config-woohm402#readme",
"dependencies": {
"@eslint/compat": "1.1.0",
"@woohm402/eslint-config-base": "0.2.5",
"@woohm402/eslint-config-base": "0.3.0",
"eslint-plugin-react-hooks": "4.6.2"
},
"peerDependencies": {
Expand Down
Loading

0 comments on commit 98a2a51

Please sign in to comment.