Skip to content

Commit

Permalink
chore: 하나의 packages 폴더를 configs, packages 두 폴더로 분리
Browse files Browse the repository at this point in the history
  • Loading branch information
lsj0202 committed Aug 8, 2024
1 parent a72726b commit 29cc999
Show file tree
Hide file tree
Showing 18 changed files with 303 additions and 206 deletions.
4 changes: 2 additions & 2 deletions apps/docs/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/** @type {import("eslint").Linter.Config} */
module.exports = {
root: true,
extends: ["@repo/eslint-config/next.js"],
parser: "@typescript-eslint/parser",
extends: ['@jjoing/eslint-config/next.js'],
parser: '@typescript-eslint/parser',
parserOptions: {
project: true,
},
Expand Down
22 changes: 5 additions & 17 deletions apps/docs/app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Image from "next/image";
import { Button } from "@repo/ui/button";
import styles from "./page.module.css";
import Image from 'next/image';
import styles from './page.module.css';
import { Button } from '@jjoing/ui/button';

export default function Home() {
return (
Expand Down Expand Up @@ -70,27 +70,15 @@ export default function Home() {
target="_blank"
rel="noopener noreferrer"
>
<Image
aria-hidden
src="/window.svg"
alt="Window icon"
width={16}
height={16}
/>
<Image aria-hidden src="/window.svg" alt="Window icon" width={16} height={16} />
Examples
</a>
<a
href="https://nextjs.org?utm_source=create-next-app&utm_medium=appdir-template&utm_campaign=create-next-app"
target="_blank"
rel="noopener noreferrer"
>
<Image
aria-hidden
src="/globe.svg"
alt="Globe icon"
width={16}
height={16}
/>
<Image aria-hidden src="/globe.svg" alt="Globe icon" width={16} height={16} />
Go to nextjs.org →
</a>
</footer>
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "@repo/typescript-config/nextjs.json",
"extends": "@jjoing/typescript-config/nextjs.json",
"compilerOptions": {
"plugins": [
{
Expand Down
4 changes: 2 additions & 2 deletions apps/web/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/** @type {import("eslint").Linter.Config} */
module.exports = {
root: true,
extends: ["@repo/eslint-config/next.js"],
parser: "@typescript-eslint/parser",
extends: ['@jjoing/eslint-config/next.js'],
parser: '@typescript-eslint/parser',
parserOptions: {
project: true,
},
Expand Down
22 changes: 5 additions & 17 deletions apps/web/app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Image from "next/image";
import { Button } from "@repo/ui/button";
import styles from "./page.module.css";
import Image from 'next/image';
import styles from './page.module.css';
import { Button } from '@jjoing/ui/button';

export default function Home() {
return (
Expand Down Expand Up @@ -70,27 +70,15 @@ export default function Home() {
target="_blank"
rel="noopener noreferrer"
>
<Image
aria-hidden
src="/window.svg"
alt="Window icon"
width={16}
height={16}
/>
<Image aria-hidden src="/window.svg" alt="Window icon" width={16} height={16} />
Examples
</a>
<a
href="https://nextjs.org?utm_source=create-next-app&utm_medium=appdir-template&utm_campaign=create-next-app"
target="_blank"
rel="noopener noreferrer"
>
<Image
aria-hidden
src="/globe.svg"
alt="Globe icon"
width={16}
height={16}
/>
<Image aria-hidden src="/globe.svg" alt="Globe icon" width={16} height={16} />
Go to nextjs.org →
</a>
</footer>
Expand Down
2 changes: 1 addition & 1 deletion apps/web/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "@repo/typescript-config/nextjs.json",
"extends": "@jjoing/typescript-config/nextjs.json",
"compilerOptions": {
"plugins": [
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
const { resolve } = require("node:path");
const { resolve } = require('node:path');

const project = resolve(process.cwd(), "tsconfig.json");
const project = resolve(process.cwd(), 'tsconfig.json');

/** @type {import("eslint").Linter.Config} */
module.exports = {
extends: ["eslint:recommended", "prettier", "turbo"],
plugins: ["only-warn"],
extends: ['eslint:recommended', 'prettier', 'turbo'],
plugins: ['only-warn'],
globals: {
React: true,
JSX: true,
Expand All @@ -14,21 +14,21 @@ module.exports = {
node: true,
},
settings: {
"import/resolver": {
'import/resolver': {
typescript: {
project,
},
},
},
ignorePatterns: [
// Ignore dotfiles
".*.js",
"node_modules/",
"dist/",
'.*.js',
'node_modules/',
'dist/',
],
overrides: [
{
files: ["*.js?(x)", "*.ts?(x)"],
files: ['*.js?(x)', '*.ts?(x)'],
},
],
};
35 changes: 35 additions & 0 deletions configs/eslint-config/next.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
const { resolve } = require('node:path');

const project = resolve(process.cwd(), 'tsconfig.json');

/** @type {import("eslint").Linter.Config} */
module.exports = {
extends: [
'eslint:recommended',
'prettier',
require.resolve('@vercel/style-guide/eslint/next'),
'turbo',
],
globals: {
React: true,
JSX: true,
},
env: {
node: true,
browser: true,
},
plugins: ['only-warn'],
settings: {
'import/resolver': {
typescript: {
project,
},
},
},
ignorePatterns: [
// Ignore dotfiles
'.*.js',
'node_modules/',
],
overrides: [{ files: ['*.js?(x)', '*.ts?(x)'] }],
};
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const { resolve } = require("node:path");
const { resolve } = require('node:path');

const project = resolve(process.cwd(), "tsconfig.json");
const project = resolve(process.cwd(), 'tsconfig.json');

/*
* This is a custom ESLint configuration for use with
Expand All @@ -10,8 +10,8 @@ const project = resolve(process.cwd(), "tsconfig.json");

/** @type {import("eslint").Linter.Config} */
module.exports = {
extends: ["eslint:recommended", "prettier", "turbo"],
plugins: ["only-warn"],
extends: ['eslint:recommended', 'prettier', 'turbo'],
plugins: ['only-warn'],
globals: {
React: true,
JSX: true,
Expand All @@ -20,20 +20,20 @@ module.exports = {
browser: true,
},
settings: {
"import/resolver": {
'import/resolver': {
typescript: {
project,
},
},
},
ignorePatterns: [
// Ignore dotfiles
".*.js",
"node_modules/",
"dist/",
'.*.js',
'node_modules/',
'dist/',
],
overrides: [
// Force ESLint to detect .tsx files
{ files: ["*.js?(x)", "*.ts?(x)"] },
{ files: ['*.js?(x)', '*.ts?(x)'] },
],
};
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@
"skipLibCheck": true,
"strict": true,
"target": "ES2022"
}
},
"exclude": ["node_modules"]
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,7 @@
"allowJs": true,
"jsx": "preserve",
"noEmit": true
}
},
"include": ["src"],
"exclude": ["node_modules"]
}
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
"display": "React Library",
"extends": "./base.json",
"compilerOptions": {
"jsx": "react-jsx"
"jsx": "react-jsx",
"lib": ["ES2015", "DOM"],
"module": "ESNext",
"target": "es6"
}
}
3 changes: 0 additions & 3 deletions packages/eslint-config/README.md

This file was deleted.

35 changes: 0 additions & 35 deletions packages/eslint-config/next.js

This file was deleted.

8 changes: 5 additions & 3 deletions packages/ui/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
{
"extends": "@repo/typescript-config/react-library.json",
"extends": "@jjoing/typescript-config/react-library.json",
"compilerOptions": {
"outDir": "dist"
"outDir": "dist",
"moduleResolution": "NodeNext",
"module": "NodeNext"
},
"include": ["src"],
"exclude": ["node_modules", "dist"]
}
}
Loading

0 comments on commit 29cc999

Please sign in to comment.