Skip to content

Commit

Permalink
🔧 set-up lint rules
Browse files Browse the repository at this point in the history
  • Loading branch information
wook-hyung committed Dec 11, 2023
1 parent cbb2e46 commit 9804bd8
Show file tree
Hide file tree
Showing 12 changed files with 836 additions and 405 deletions.
3 changes: 3 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.next
.eslintrc.js
next.config.js
68 changes: 67 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,69 @@
module.exports = {
extends: 'next/core-web-vitals',
env: {
browser: true,
es2021: true,
node: true,
},
extends: [
'next/core-web-vitals',
'plugin:react/recommended',
'standard-with-typescript',
'plugin:import/recommended',
'plugin:@tanstack/eslint-plugin-query/recommended',
'prettier',
],
overrides: [],
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
},
plugins: ['react', 'import', '@tanstack/query'],
rules: {
curly: ['error', 'all'],
eqeqeq: [
'error',
'always',
{
null: 'ignore',
},
],
'no-warning-comments': [
'warn',
{
terms: ['todo', 'fixme', 'xxx'],
location: 'anywhere',
},
],
'import/order': [
'error',
{
groups: ['builtin', 'external', 'internal', 'parent', 'sibling', 'index'],
pathGroups: [
{
pattern: 'next/**',
group: 'external',
position: 'before',
},
{
pattern: 'react',
group: 'external',
position: 'before',
},
{
pattern: '@/components/**',
group: 'internal',
position: 'before',
},
],
pathGroupsExcludedImportTypes: ['react'],
alphabetize: {
order: 'asc',
caseInsensitive: true,
},
'newlines-between': 'always',
},
],
'react/react-in-jsx-scope': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
},
}
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.next
3 changes: 2 additions & 1 deletion app/(route)/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import type { Metadata } from 'next'
import { Inter } from 'next/font/google'

import type { Metadata } from 'next'
import '../_styles/globals.css'

const inter = Inter({ subsets: ['latin'] })
Expand Down
Empty file added app/_utils/.gitkeep
Empty file.
9 changes: 8 additions & 1 deletion next.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
/** @type {import('next').NextConfig} */
const nextConfig = {}
const nextConfig = {
eslint: {
ignoreDuringBuilds: true,
},
typescript: {
ignoreBuildErrors: true,
},
}

module.exports = nextConfig
13 changes: 11 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,25 @@
"react-dom": "^18"
},
"devDependencies": {
"@tailwindcss/forms": "^0.5.7",
"@tanstack/eslint-plugin-query": "^5.12.1",
"@types/node": "^20",
"@types/react": "^18",
"@types/react-dom": "^18",
"@typescript-eslint/eslint-plugin": "^6.4.0",
"autoprefixer": "^10.0.1",
"eslint": "^8",
"eslint": "^8.55.0",
"eslint-config-next": "14.0.4",
"eslint-config-prettier": "^9.1.0",
"eslint-config-standard-with-typescript": "^42.0.0",
"eslint-plugin-import": "^2.29.0",
"eslint-plugin-n": "^15.0.0 || ^16.0.0 ",
"eslint-plugin-promise": "^6.0.0",
"eslint-plugin-react": "^7.33.2",
"postcss": "^8",
"prettier": "^3.1.0",
"prettier-plugin-tailwindcss": "^0.5.9",
"tailwindcss": "^3.3.0",
"typescript": "^5"
"typescript": "^5.3.3"
}
}
Loading

0 comments on commit 9804bd8

Please sign in to comment.