chore: update prettier configuration for print width (#519)
* feat: update prettier configuration for print width * chore: apply code formatting to entire repository * fix: remove build files * fix: format issue --------- Co-authored-by: Meier Lukas <meierschlumpf@gmail.com>
This commit is contained in:
@@ -27,18 +27,12 @@ const config = {
|
||||
],
|
||||
"@typescript-eslint/prefer-nullish-coalescing": "off",
|
||||
"turbo/no-undeclared-env-vars": "off",
|
||||
"@typescript-eslint/no-unused-vars": [
|
||||
"error",
|
||||
{ argsIgnorePattern: "^_", varsIgnorePattern: "^_" },
|
||||
],
|
||||
"@typescript-eslint/no-unused-vars": ["error", { argsIgnorePattern: "^_", varsIgnorePattern: "^_" }],
|
||||
"@typescript-eslint/consistent-type-imports": [
|
||||
"warn",
|
||||
{ prefer: "type-imports", fixStyle: "separate-type-imports" },
|
||||
],
|
||||
"@typescript-eslint/no-misused-promises": [
|
||||
2,
|
||||
{ checksVoidReturn: { attributes: false } },
|
||||
],
|
||||
"@typescript-eslint/no-misused-promises": [2, { checksVoidReturn: { attributes: false } }],
|
||||
"import/consistent-type-specifier-style": ["error", "prefer-top-level"],
|
||||
"no-restricted-syntax": [
|
||||
"error",
|
||||
@@ -49,8 +43,7 @@ const config = {
|
||||
{
|
||||
selector:
|
||||
"FunctionDeclaration[async=true][id.name=/^[a-z].*$/][id.name=/ ^(?!generateMetadata$)[a-z].*$/][id.name!=/Async$/]",
|
||||
message:
|
||||
"Async function name must end in 'Async' (function declaration)",
|
||||
message: "Async function name must end in 'Async' (function declaration)",
|
||||
},
|
||||
{
|
||||
selector: "MethodDefinition[value.async=false][key.name=/Async$/]",
|
||||
@@ -61,8 +54,7 @@ const config = {
|
||||
message: "Async method name must end in 'Async'",
|
||||
},
|
||||
{
|
||||
selector:
|
||||
"Property[value.type=/FunctionExpression$/][value.async=false][key.name=/Async$/]",
|
||||
selector: "Property[value.type=/FunctionExpression$/][value.async=false][key.name=/Async$/]",
|
||||
message: "Function ending in 'Async' must be declared async",
|
||||
},
|
||||
{
|
||||
@@ -71,26 +63,17 @@ const config = {
|
||||
message: "Async function name must end in 'Async' (property)",
|
||||
},
|
||||
{
|
||||
selector:
|
||||
"VariableDeclarator[init.type=/FunctionExpression$/][init.async=false][id.name=/Async$/]",
|
||||
selector: "VariableDeclarator[init.type=/FunctionExpression$/][init.async=false][id.name=/Async$/]",
|
||||
message: "Function ending in 'Async' must be declared async",
|
||||
},
|
||||
{
|
||||
selector:
|
||||
"VariableDeclarator[init.type=/FunctionExpression$/][init.async=true][id.name=/^[a-z].*$/][id.name!=/Async$/]",
|
||||
message:
|
||||
"Async function name must end in 'Async' (variable declarator)",
|
||||
message: "Async function name must end in 'Async' (variable declarator)",
|
||||
},
|
||||
],
|
||||
},
|
||||
ignorePatterns: [
|
||||
"**/.eslintrc.cjs",
|
||||
"**/*.config.js",
|
||||
"**/*.config.cjs",
|
||||
".next",
|
||||
"dist",
|
||||
"pnpm-lock.yaml",
|
||||
],
|
||||
ignorePatterns: ["**/.eslintrc.cjs", "**/*.config.js", "**/*.config.cjs", ".next", "dist", "pnpm-lock.yaml"],
|
||||
reportUnusedDisableDirectives: true,
|
||||
};
|
||||
|
||||
|
||||
6
tooling/eslint/react.js
vendored
6
tooling/eslint/react.js
vendored
@@ -1,10 +1,6 @@
|
||||
/** @type {import('eslint').Linter.Config} */
|
||||
const config = {
|
||||
extends: [
|
||||
"plugin:react/recommended",
|
||||
"plugin:react-hooks/recommended",
|
||||
"plugin:jsx-a11y/recommended",
|
||||
],
|
||||
extends: ["plugin:react/recommended", "plugin:react-hooks/recommended", "plugin:jsx-a11y/recommended"],
|
||||
rules: {
|
||||
"react/prop-types": "off",
|
||||
},
|
||||
|
||||
@@ -16,6 +16,7 @@ const config = {
|
||||
"^[./]",
|
||||
],
|
||||
importOrderParserPlugins: ["typescript", "jsx", "decorators-legacy"],
|
||||
printWidth: 120,
|
||||
importOrderTypeScriptVersion: "4.4.0",
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user