Skip to content

Commit

Permalink
dev: prettier configs
Browse files Browse the repository at this point in the history
  • Loading branch information
TyIsI committed Sep 23, 2024
1 parent a8e17f7 commit 38b8d10
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 148 deletions.
164 changes: 32 additions & 132 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
"eslint-config-next",
"plugin:react/recommended",
"eslint:recommended",
"next/core-web-vitals"
"next/core-web-vitals",
"prettier"
],
"parserOptions": {
"ecmaVersion": 2020,
Expand All @@ -30,19 +31,11 @@
"React": "readonly",
"fetch": true
},
"plugins": [
"promise"
],
"plugins": ["promise"],
"settings": {
"import/resolver": {
"node": {
"paths": [
"components",
"lib",
"pages",
"types",
"."
]
"paths": ["components", "lib", "pages", "types", "."]
}
}
},
Expand All @@ -55,10 +48,7 @@
"enforceForClassMembers": true
}
],
"array-bracket-spacing": [
"error",
"never"
],
"array-bracket-spacing": ["error", "never"],
"array-callback-return": [
"error",
{
Expand All @@ -73,10 +63,7 @@
"after": true
}
],
"block-spacing": [
"error",
"always"
],
"block-spacing": ["error", "always"],
"brace-style": [
"error",
"1tbs",
Expand All @@ -87,9 +74,7 @@
"camelcase": [
"error",
{
"allow": [
"^UNSAFE_"
],
"allow": ["^UNSAFE_"],
"properties": "never",
"ignoreGlobals": true
}
Expand All @@ -111,10 +96,7 @@
"after": true
}
],
"comma-style": [
"error",
"last"
],
"comma-style": ["error", "last"],
"computed-property-spacing": [
"error",
"never",
Expand All @@ -123,15 +105,9 @@
}
],
"constructor-super": "error",
"curly": [
"error",
"multi-line"
],
"curly": ["error", "multi-line"],
"default-case-last": "error",
"dot-location": [
"error",
"property"
],
"dot-location": ["error", "property"],
"dot-notation": [
"error",
{
Expand All @@ -146,10 +122,7 @@
"null": "ignore"
}
],
"func-call-spacing": [
"error",
"never"
],
"func-call-spacing": ["error", "never"],
"generator-star-spacing": [
"error",
{
Expand Down Expand Up @@ -224,10 +197,7 @@
"exceptAfterSingleLine": true
}
],
"multiline-ternary": [
"error",
"always-multiline"
],
"multiline-ternary": ["error", "always-multiline"],
"new-cap": [
"error",
{
Expand Down Expand Up @@ -272,10 +242,7 @@
"no-extend-native": "error",
"no-extra-bind": "error",
"no-extra-boolean-cast": "error",
"no-extra-parens": [
"error",
"functions"
],
"no-extra-parens": ["error", "functions"],
"no-fallthrough": "error",
"no-floating-decimal": "error",
"no-func-assign": "error",
Expand All @@ -301,24 +268,9 @@
"error",
{
"groups": [
[
"==",
"!=",
"===",
"!==",
">",
">=",
"<",
"<="
],
[
"&&",
"||"
],
[
"in",
"instanceof"
]
["==", "!=", "===", "!==", ">", ">=", "<", "<="],
["&&", "||"],
["in", "instanceof"]
],
"allowSamePrecedence": true
}
Expand Down Expand Up @@ -349,10 +301,7 @@
}
],
"no-regex-spaces": "error",
"no-return-assign": [
"error",
"except-parens"
],
"no-return-assign": ["error", "except-parens"],
"no-self-assign": [
"error",
{
Expand Down Expand Up @@ -423,10 +372,7 @@
"consistent": true
}
],
"object-curly-spacing": [
"error",
"always"
],
"object-curly-spacing": ["error", "always"],
"object-property-newline": [
"error",
{
Expand Down Expand Up @@ -471,10 +417,7 @@
"disallowRedundantWrapping": true
}
],
"quote-props": [
"error",
"as-needed"
],
"quote-props": ["error", "as-needed"],
"quotes": [
"error",
"single",
Expand All @@ -483,33 +426,18 @@
"allowTemplateLiterals": false
}
],
"rest-spread-spacing": [
"error",
"never"
],
"semi": [
"error",
"never"
],
"rest-spread-spacing": ["error", "never"],
"semi": ["error", "never"],
"semi-spacing": [
"error",
{
"before": false,
"after": true
}
],
"space-before-blocks": [
"error",
"always"
],
"space-before-function-paren": [
"error",
"always"
],
"space-in-parens": [
"error",
"never"
],
"space-before-blocks": ["error", "always"],
"space-before-function-paren": ["error", "always"],
"space-in-parens": ["error", "never"],
"space-infix-ops": "error",
"space-unary-ops": [
"error",
Expand All @@ -523,13 +451,7 @@
"always",
{
"line": {
"markers": [
"*package",
"!",
"/",
",",
"="
]
"markers": ["*package", "!", "/", ",", "="]
},
"block": {
"balanced": true,
Expand All @@ -541,25 +463,14 @@
"::",
"flow-include"
],
"exceptions": [
"*"
]
"exceptions": ["*"]
}
}
],
"symbol-description": "error",
"template-curly-spacing": [
"error",
"never"
],
"template-tag-spacing": [
"error",
"never"
],
"unicode-bom": [
"error",
"never"
],
"template-curly-spacing": ["error", "never"],
"template-tag-spacing": ["error", "never"],
"unicode-bom": ["error", "never"],
"use-isnan": [
"error",
{
Expand All @@ -580,14 +491,8 @@
"functionPrototypeMethods": true
}
],
"yield-star-spacing": [
"error",
"both"
],
"yoda": [
"error",
"never"
],
"yield-star-spacing": ["error", "both"],
"yoda": ["error", "never"],
"import/export": "error",
"import/first": "error",
"import/no-absolute-path": [
Expand All @@ -608,12 +513,7 @@
"react/jsx-filename-extension": [
1,
{
"extensions": [
".js",
".jsx",
".ts",
".tsx"
]
"extensions": [".js", ".jsx", ".ts", ".tsx"]
}
]
}
Expand Down
4 changes: 4 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Ignore artifacts:
build
coverage
.yarn/releases/yarn-1.22.22.cjs
10 changes: 10 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"$schema": "https://json.schemastore.org/prettierrc",
"semi": false,
"singleQuote": true,
"quoteProps": "as-needed",
"jsxSingleQuote": true,
"trailingComma": "none",
"bracketSpacing": true,
"arrowParens": "always"
}
21 changes: 5 additions & 16 deletions jsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,9 @@
"target": "es2020",
"module": "es2015",
"paths": {
"@/components/*": [
"components/*"
],
"@/styles/*": [
"styles/*"
],
"@/pages/*": [
"pages/*"
]
"@/components/*": ["components/*"],
"@/styles/*": ["styles/*"],
"@/pages/*": ["pages/*"]
}
},
"exclude": [
Expand All @@ -28,14 +22,9 @@
".npm",
".yarn"
],
"include": [
"."
],
"include": ["."],
"typeAcquisition": {
"enable": true,
"include": [
"react",
"react-dom"
]
"include": ["react", "react-dom"]
}
}

0 comments on commit 38b8d10

Please sign in to comment.