Skip to content

Commit

Permalink
Fix:스토리북 실행 시 esLint 오류 해결
Browse files Browse the repository at this point in the history
  • Loading branch information
wokbjso committed Dec 7, 2023
1 parent 3ff32b8 commit c25133d
Show file tree
Hide file tree
Showing 11 changed files with 272 additions and 194 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
!.yarn/sdks
!.yarn/versions

node_modules

# testing
/coverage

Expand Down
369 changes: 187 additions & 182 deletions .pnp.cjs

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"recommendations": [
"arcanis.vscode-zipfs"
"arcanis.vscode-zipfs",
"dbaeumer.vscode-eslint"
]
}
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@
"**/.pnp.*": true
},
"typescript.tsdk": ".yarn/sdks/typescript/lib",
"typescript.enablePromptUseWorkspaceTsdk": true
"typescript.enablePromptUseWorkspaceTsdk": true,
"eslint.nodePath": ".yarn/sdks"
}
20 changes: 20 additions & 0 deletions .yarn/sdks/eslint/bin/eslint.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/usr/bin/env node

const {existsSync} = require(`fs`);
const {createRequire} = require(`module`);
const {resolve} = require(`path`);

const relPnpApiPath = "../../../../.pnp.cjs";

const absPnpApiPath = resolve(__dirname, relPnpApiPath);
const absRequire = createRequire(absPnpApiPath);

if (existsSync(absPnpApiPath)) {
if (!process.versions.pnp) {
// Setup the environment to be able to require eslint/bin/eslint.js
require(absPnpApiPath).setup();
}
}

// Defer to the real eslint/bin/eslint.js your application uses
module.exports = absRequire(`eslint/bin/eslint.js`);
20 changes: 20 additions & 0 deletions .yarn/sdks/eslint/lib/api.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/usr/bin/env node

const {existsSync} = require(`fs`);
const {createRequire} = require(`module`);
const {resolve} = require(`path`);

const relPnpApiPath = "../../../../.pnp.cjs";

const absPnpApiPath = resolve(__dirname, relPnpApiPath);
const absRequire = createRequire(absPnpApiPath);

if (existsSync(absPnpApiPath)) {
if (!process.versions.pnp) {
// Setup the environment to be able to require eslint
require(absPnpApiPath).setup();
}
}

// Defer to the real eslint your application uses
module.exports = absRequire(`eslint`);
20 changes: 20 additions & 0 deletions .yarn/sdks/eslint/lib/unsupported-api.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/usr/bin/env node

const {existsSync} = require(`fs`);
const {createRequire} = require(`module`);
const {resolve} = require(`path`);

const relPnpApiPath = "../../../../.pnp.cjs";

const absPnpApiPath = resolve(__dirname, relPnpApiPath);
const absRequire = createRequire(absPnpApiPath);

if (existsSync(absPnpApiPath)) {
if (!process.versions.pnp) {
// Setup the environment to be able to require eslint/use-at-your-own-risk
require(absPnpApiPath).setup();
}
}

// Defer to the real eslint/use-at-your-own-risk your application uses
module.exports = absRequire(`eslint/use-at-your-own-risk`);
14 changes: 14 additions & 0 deletions .yarn/sdks/eslint/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"name": "eslint",
"version": "8.55.0-sdk",
"main": "./lib/api.js",
"type": "commonjs",
"bin": {
"eslint": "./bin/eslint.js"
},
"exports": {
"./package.json": "./package.json",
".": "./lib/api.js",
"./use-at-your-own-risk": "./lib/unsupported-api.js"
}
}
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@
"@storybook/testing-library": "^0.2.2",
"@vitejs/plugin-react": "^4.2.0",
"babel-plugin-named-exports-order": "^0.0.2",
"eslint": "^8.55.0",
"eslint-config-react-app": "^7.0.1",
"prop-types": "^15.8.1",
"storybook": "^7.5.3",
"vite": "^5.0.4",
Expand Down
9 changes: 0 additions & 9 deletions src/App.test.tsx

This file was deleted.

4 changes: 3 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9162,7 +9162,7 @@ __metadata:
languageName: node
linkType: hard

"eslint@npm:^8.3.0":
"eslint@npm:^8.3.0, eslint@npm:^8.55.0":
version: 8.55.0
resolution: "eslint@npm:8.55.0"
dependencies:
Expand Down Expand Up @@ -15159,6 +15159,8 @@ __metadata:
"@types/react-dom": ^18.2.17
"@vitejs/plugin-react": ^4.2.0
babel-plugin-named-exports-order: ^0.0.2
eslint: ^8.55.0
eslint-config-react-app: ^7.0.1
prop-types: ^15.8.1
react: ^18.2.0
react-dom: ^18.2.0
Expand Down

0 comments on commit c25133d

Please sign in to comment.