Skip to content

Commit

Permalink
Merge pull request #12 from yogyy/update-eslint
Browse files Browse the repository at this point in the history
Update eslint
  • Loading branch information
yogyy authored Apr 16, 2024
2 parents 712aaf7 + f82055a commit c913340
Show file tree
Hide file tree
Showing 46 changed files with 654 additions and 211 deletions.
68 changes: 67 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,69 @@
{
"extends": "next/core-web-vitals"
"env": {
"browser": true,
"es2021": true,
"node": true
},
"plugins": ["@typescript-eslint", "simple-import-sort", "unused-imports"],
"extends": [
"eslint:recommended",
"next",
"next/core-web-vitals",
"plugin:@typescript-eslint/recommended",
"prettier"
],
"rules": {
"no-unused-vars": "off",
"no-console": "off",
"prefer-const": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"react/no-unescaped-entities": "off",
"react/display-name": "off",
"react/jsx-curly-brace-presence": ["warn", { "props": "never", "children": "never" }],
"@typescript-eslint/ban-ts-comment": "warn",

"@typescript-eslint/no-var-requires": "off",
//#region //*=========== Unused Import ===========
"@typescript-eslint/no-unused-vars": "off",
"unused-imports/no-unused-imports": "warn",
"unused-imports/no-unused-vars": [
"warn",
{
"vars": "all",
"varsIgnorePattern": "^_",
"args": "after-used",
"argsIgnorePattern": "^_"
}
],
//#endregion //*======== Unused Import ===========

//#region //*=========== Sort Import ===========
"simple-import-sort/exports": "warn",
"simple-import-sort/imports": [
"warn",
{
"groups": [
[
"^@?\\w",
"^\\u0000",
"^.+\\.s?css$",
"^@/lib",
"^@/hooks",
"^@/components",
"^@/",
"^\\./?$",
"^\\.(?!/?$)",
"^\\.\\./?$",
"^\\.\\.(?!/?$)",
"^\\.\\./\\.\\./?$",
"^\\.\\./\\.\\.(?!/?$)",
"^\\.\\./\\.\\./\\.\\./?$",
"^\\.\\./\\.\\./\\.\\.(?!/?$)",
"^@/types"
]
]
}
]
//#endregion //*======== Sort Import ===========
}
}
14 changes: 6 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
node_modules
.pnp
.pnp.js

# testing
/coverage
coverage

# next.js
/.next/
/out/
.next/
out/

# production
/build
build

# misc
.DS_Store
Expand Down Expand Up @@ -42,5 +42,3 @@ next-env.d.ts
sitemap*.xml
robots.txt

/src/pages/.not-used
/src/globals.css
44 changes: 44 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
node_modules
.pnp
.pnp.js

# testing
coverage

# next.js
.next/
out/

# production
build

# misc
.DS_Store
*.pem

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*

# local env files
.env*.local

# vercel
.vercel

# typescript
*.tsbuildinfo
next-env.d.ts


# Contentlayer
.contentlayer

sitemap*.xml
robots.txt

Loading

0 comments on commit c913340

Please sign in to comment.