Skip to content

Commit

Permalink
fix: format
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Catinaud Taris committed Apr 21, 2024
1 parent 41a54e5 commit 8502908
Show file tree
Hide file tree
Showing 56 changed files with 42,940 additions and 16,485 deletions.
84 changes: 42 additions & 42 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,74 +4,74 @@ module.exports = {
es2021: true,
node: true,
},
plugins: ['@typescript-eslint', 'simple-import-sort', 'unused-imports'],
plugins: ["@typescript-eslint", "simple-import-sort", "unused-imports"],
extends: [
'eslint:recommended',
'next',
'next/core-web-vitals',
'plugin:@typescript-eslint/recommended',
'prettier',
"eslint:recommended",
"next",
"next/core-web-vitals",
"plugin:@typescript-eslint/recommended",
"prettier",
],
rules: {
'no-unused-vars': 'off',
'no-console': 'warn',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'react/no-unescaped-entities': 'off',
"no-unused-vars": "off",
"no-console": "warn",
"@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' },
"react/display-name": "off",
"react/jsx-curly-brace-presence": [
"warn",
{ props: "never", children: "never" },
],

//#region //*=========== Unused Import ===========
'@typescript-eslint/no-unused-vars': 'off',
'unused-imports/no-unused-imports': 'warn',
'unused-imports/no-unused-vars': [
'warn',
"@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: '^_',
vars: "all",
varsIgnorePattern: "^_",
args: "after-used",
argsIgnorePattern: "^_",
},
],
//#endregion //*======== Unused Import ===========

//#region //*=========== Import Sort ===========
'simple-import-sort/exports': 'warn',
'simple-import-sort/imports': [
'warn',
"simple-import-sort/exports": "warn",
"simple-import-sort/imports": [
"warn",
{
groups: [
// ext library & side effect imports
['^@?\\w', '^\\u0000'],
["^@?\\w", "^\\u0000"],
// {s}css files
['^.+\\.s?css$'],
["^.+\\.s?css$"],
// Lib and hooks
['^@/lib', '^@/hooks'],
["^@/lib", "^@/hooks"],
// static data
['^@/data'],
["^@/data"],
// components
['^@/components', '^@/container'],
["^@/components", "^@/container"],
// zustand store
['^@/store'],
["^@/store"],
// Other imports
['^@/'],
["^@/"],
// relative paths up until 3 level
[
'^\\./?$',
'^\\.(?!/?$)',
'^\\.\\./?$',
'^\\.\\.(?!/?$)',
'^\\.\\./\\.\\./?$',
'^\\.\\./\\.\\.(?!/?$)',
'^\\.\\./\\.\\./\\.\\./?$',
'^\\.\\./\\.\\./\\.\\.(?!/?$)',
"^\\./?$",
"^\\.(?!/?$)",
"^\\.\\./?$",
"^\\.\\.(?!/?$)",
"^\\.\\./\\.\\./?$",
"^\\.\\./\\.\\.(?!/?$)",
"^\\.\\./\\.\\./\\.\\./?$",
"^\\.\\./\\.\\./\\.\\.(?!/?$)",
],
['^@/types'],
["^@/types"],
// other that didnt fit in
['^'],
["^"],
],
},
],
Expand Down
2 changes: 1 addition & 1 deletion .github/FUNDING.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
custom: ['https://saweria.co/theodorusclarence']
custom: ["https://saweria.co/theodorusclarence"]
2 changes: 1 addition & 1 deletion .github/issue-branch.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# https://github.com/robvanderleek/create-issue-branch#option-2-configure-github-action

# ex: i4-lower_camel_upper
branchName: 'i${issue.number}-${issue.title,}'
branchName: "i${issue.number}-${issue.title,}"
branches:
- label: epic
skip: true
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/issue-autolink.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: 'Issue Autolink'
name: "Issue Autolink"
on:
pull_request:
types: [opened]
Expand All @@ -11,6 +11,6 @@ jobs:
steps:
- uses: tkt-actions/[email protected]
with:
repo-token: '${{ secrets.GITHUB_TOKEN }}'
branch-prefix: 'i'
resolve: 'true'
repo-token: "${{ secrets.GITHUB_TOKEN }}"
branch-prefix: "i"
resolve: "true"
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: 20
cache: 'pnpm'
cache: "pnpm"

- name: 📥 Download deps
run: pnpm install --frozen-lockfile
Expand Down
2 changes: 1 addition & 1 deletion .prettierrc.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module.exports = {
arrowParens: 'always',
arrowParens: "always",
singleQuote: true,
jsxSingleQuote: true,
tabWidth: 2,
Expand Down
6 changes: 3 additions & 3 deletions .vscode/css.code-snippets
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"body": [
"/* #region /**=========== ${1} =========== */",
"$0",
"/* #endregion /**======== ${1} =========== */"
]
}
"/* #endregion /**======== ${1} =========== */",
],
},
}
72 changes: 36 additions & 36 deletions .vscode/typescriptreact.code-snippets
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,29 @@
//#region //*=========== React ===========
"import React": {
"prefix": "ir",
"body": ["import * as React from 'react';"]
"body": ["import * as React from 'react';"],
},
"React.useState": {
"prefix": "us",
"body": [
"const [${1}, set${1/(^[a-zA-Z])(.*)/${1:/upcase}${2}/}] = React.useState<$3>(${2:initial${1/(^[a-zA-Z])(.*)/${1:/upcase}${2}/}})$0"
]
"const [${1}, set${1/(^[a-zA-Z])(.*)/${1:/upcase}${2}/}] = React.useState<$3>(${2:initial${1/(^[a-zA-Z])(.*)/${1:/upcase}${2}/}})$0",
],
},
"React.useEffect": {
"prefix": "uf",
"body": ["React.useEffect(() => {", " $0", "}, []);"]
"body": ["React.useEffect(() => {", " $0", "}, []);"],
},
"React.useReducer": {
"prefix": "ur",
"body": [
"const [state, dispatch] = React.useReducer(${0:someReducer}, {",
" ",
"})"
]
"})",
],
},
"React.useRef": {
"prefix": "urf",
"body": ["const ${1:someRef} = React.useRef($0)"]
"body": ["const ${1:someRef} = React.useRef($0)"],
},
"React Functional Component": {
"prefix": "rc",
Expand All @@ -36,8 +36,8 @@
" $0",
" </div>",
" )",
"}"
]
"}",
],
},
"React Functional Component with Props": {
"prefix": "rcp",
Expand All @@ -52,8 +52,8 @@
" $0",
" </div>",
" )",
"}"
]
"}",
],
},
//#endregion //*======== React ===========

Expand All @@ -64,17 +64,17 @@
"body": [
"//#region //*=========== ${1} ===========",
"${TM_SELECTED_TEXT}$0",
"//#endregion //*======== ${1} ==========="
]
"//#endregion //*======== ${1} ===========",
],
},
"Region CSS": {
"prefix": "regc",
"scope": "css, scss",
"body": [
"/* #region /**=========== ${1} =========== */",
"${TM_SELECTED_TEXT}$0",
"/* #endregion /**======== ${1} =========== */"
]
"/* #endregion /**======== ${1} =========== */",
],
},
//#endregion //*======== Commons ===========

Expand All @@ -98,8 +98,8 @@
" </main>",
" </Layout>",
" )",
"}"
]
"}",
],
},
"Next API": {
"prefix": "napi",
Expand All @@ -111,8 +111,8 @@
" } else {",
" res.status(405).json({ message: 'Method Not Allowed' });",
" }",
"}"
]
"}",
],
},
"Get Static Props": {
"prefix": "gsp",
Expand All @@ -121,8 +121,8 @@
" return {",
" props: {}",
" };",
"}"
]
"}",
],
},
"Get Static Paths": {
"prefix": "gspa",
Expand All @@ -134,8 +134,8 @@
" ],",
" fallback: ",
" };",
"}"
]
"}",
],
},
"Get Server Side Props": {
"prefix": "gssp",
Expand All @@ -144,50 +144,50 @@
" return {",
" props: {}",
" };",
"}"
]
"}",
],
},
"Infer Get Static Props": {
"prefix": "igsp",
"body": "InferGetStaticPropsType<typeof getStaticProps>"
"body": "InferGetStaticPropsType<typeof getStaticProps>",
},
"Infer Get Server Side Props": {
"prefix": "igssp",
"body": "InferGetServerSidePropsType<typeof getServerSideProps>"
"body": "InferGetServerSidePropsType<typeof getServerSideProps>",
},
"Import useRouter": {
"prefix": "imust",
"body": ["import { useRouter } from 'next/router';"]
"body": ["import { useRouter } from 'next/router';"],
},
"Import Next Image": {
"prefix": "imimg",
"body": ["import Image from 'next/image';"]
"body": ["import Image from 'next/image';"],
},
"Import Next Link": {
"prefix": "iml",
"body": ["import Link from 'next/link';"]
"body": ["import Link from 'next/link';"],
},
//#endregion //*======== Next.js ===========

//#region //*=========== Snippet Wrap ===========
"Wrap with Fragment": {
"prefix": "ff",
"body": ["<>", "\t${TM_SELECTED_TEXT}", "</>"]
"body": ["<>", "\t${TM_SELECTED_TEXT}", "</>"],
},
"Wrap with clsx": {
"prefix": "cx",
"body": ["{clsx([${TM_SELECTED_TEXT}$0])}"]
"body": ["{clsx([${TM_SELECTED_TEXT}$0])}"],
},
"Wrap with clsxm": {
"prefix": "cxm",
"body": ["{clsxm([${TM_SELECTED_TEXT}$0, className])}"]
"body": ["{clsxm([${TM_SELECTED_TEXT}$0, className])}"],
},
//#endregion //*======== Snippet Wrap ===========

"Logger": {
"prefix": "lg",
"body": [
"logger({ ${1:${CLIPBOARD}} }, '${TM_FILENAME} line ${TM_LINE_NUMBER}')"
]
}
"logger({ ${1:${CLIPBOARD}} }, '${TM_FILENAME} line ${TM_LINE_NUMBER}')",
],
},
}
Loading

0 comments on commit 8502908

Please sign in to comment.