Skip to content

Commit

Permalink
style: cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
MattCMcCoy committed Feb 11, 2024
1 parent 93716eb commit 7d57514
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 12 deletions.
18 changes: 8 additions & 10 deletions client/.eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -23,38 +23,36 @@
"plugin:prettier/recommended"
],
"rules": {
"import/no-unresolved": "error",
"react/jsx-no-bind": [
"error",
{
"allowArrowFunctions": true
}
],
// Enforces function for components
"react/function-component-definition": [
"error",
{
"namedComponents": "function-declaration",
"unnamedComponents": "arrow-function"
}
],
// Enforces no * imports
"no-restricted-syntax": [
"error",
{
"selector": ":matches(ImportNamespaceSpecifier, ExportAllDeclaration, ExportNamespaceSpecifier)",
"message": "Import/export only modules you need"
}
],
// Enforces no default export
"import/no-default-export": "error",
"arrow-body-style": ["error", "as-needed"],
// Enforces react not being added to files where it isnt needed
"react/jsx-uses-react": "error",
// Enforces const, if a variable isnt reassigned
"prefer-const": "error",
"react/jsx-no-useless-fragment": "error",
"react/jsx-uses-vars": "error"
// enforces preventing <><div></div></>
"react/jsx-no-useless-fragment": "error"
},
"overrides": [
{
"files": ["screens/**/*", "App.tsx", "declaration.d.ts"],
"rules": {
// Allows default exports for the above files
"import/no-default-export": "off"
}
}
Expand Down
4 changes: 2 additions & 2 deletions client/.prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
"prettier-plugin-tailwindcss"
],
"importOrder": [
"(react|react-native)$",
"^(react|react-native)$",
"<BUILTIN_MODULES>",
"<THIRD_PARTY_MODULES>",
"^[./](.*)$"
"^[.]"
],
"importOrderSeparation": true,
"importOrderSortSpecifiers": true,
Expand Down

0 comments on commit 7d57514

Please sign in to comment.