Skip to content

Commit

Permalink
Merge pull request #3 from YAPP-Github/feature/BAR-3
Browse files Browse the repository at this point in the history
[Feature/BAR-3] 린트 룰 설정
  • Loading branch information
dongkyun-dev committed Dec 7, 2023
2 parents 265750c + d172424 commit b0743a7
Show file tree
Hide file tree
Showing 4 changed files with 728 additions and 1,438 deletions.
70 changes: 69 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,71 @@
{
"extends": "next/core-web-vitals"
"extends": [
"next/core-web-vitals",
"prettier",
"eslint:recommended",
"plugin:react-hooks/recommended",
"plugin:jsx-a11y/recommended"
],
"parser": "@typescript-eslint/parser",
"plugins": [
"import",
"simple-import-sort",
"unused-imports",
"@typescript-eslint"
],
"rules": {
"import/first": "error",
"import/newline-after-import": "error",
"import/no-useless-path-segments": [
"error",
{
"noUselessIndex": true
}
],
"unused-imports/no-unused-imports": "error",
"no-else-return": ["error", { "allowElseIf": false }],
"no-restricted-imports": [
"error",
{
"patterns": [
{
"group": [".*"],
"message": "Please use absolute path."
}
]
}
],
"@typescript-eslint/consistent-type-imports": "error",
"@typescript-eslint/no-unused-vars": "error",
"@typescript-eslint/naming-convention": [
"error",
{
"selector": "variableLike",
"format": ["camelCase", "PascalCase", "UPPER_CASE"],
"leadingUnderscore": "allow"
},
{
"selector": "typeLike",
"format": ["PascalCase"]
}
]
},
"overrides": [
{
"files": ["*.ts", "*.tsx"],
"rules": {
"simple-import-sort/imports": [
"warn",
{
"groups": [
// Library imports (related with next is first)
["next", "^\\w"],
// Side effect imports
["^\\u0000"]
]
}
]
}
}
]
}
8 changes: 8 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,17 @@
"@types/node": "^20",
"@types/react": "^18",
"@types/react-dom": "^18",
"@typescript-eslint/eslint-plugin": "^6.13.2",
"@typescript-eslint/parser": "^6.13.2",
"@vanilla-extract/css": "^1.14.0",
"eslint": "^8",
"eslint-config-next": "14.0.3",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-import": "^2.29.0",
"eslint-plugin-jsx-a11y": "^6.8.0",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-simple-import-sort": "^10.0.0",
"eslint-plugin-unused-imports": "^3.0.0",
"prettier": "^3.1.0",
"typescript": "^5"
}
Expand Down
2 changes: 1 addition & 1 deletion pages/_document.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Html, Head, Main, NextScript } from 'next/document';
import { Head, Html, Main, NextScript } from 'next/document';

const Document = () => {
return (
Expand Down
Loading

0 comments on commit b0743a7

Please sign in to comment.