Skip to content

Commit

Permalink
Merge pull request #32 from it-goats/chore/eslint-config-update
Browse files Browse the repository at this point in the history
[NOJIRA] Update ESLint config
  • Loading branch information
john-sonz committed Apr 30, 2022
2 parents 0e0aa21 + f52ed31 commit 87ace71
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 8 deletions.
8 changes: 8 additions & 0 deletions cabra/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,15 @@
},
"plugins": ["@typescript-eslint", "prettier"],
"rules": {
"camelcase": "error",
"eqeqeq": "error",
"no-console": "error",
"prefer-const": "error",
"no-var": "error",
"react/function-component-definition": [
"error",
{ "namedComponents": "function-declaration" }
],
"react/react-in-jsx-scope": "off",
"sort-imports": "error",
"@typescript-eslint/no-inferrable-types": "off",
Expand Down
14 changes: 8 additions & 6 deletions cabra/src/pages/components/CardField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,13 @@ interface Props {
align?: Align;
}

const CardField = ({ className, children, title, span, align }: Props) => (
<Field className={className} $span={span} $align={align}>
{title && <Title>{title}</Title>}
{children}
</Field>
);
function CardField({ className, children, title, span, align }: Props) {
return (
<Field className={className} $span={span} $align={align}>
{title && <Title>{title}</Title>}
{children}
</Field>
);
}

export default CardField;
2 changes: 1 addition & 1 deletion cabra/src/pages/components/RelatedTaskList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export default function RelatedTasksList({

const subtasks = data.data.slice().reverse();

if (subtasks.length == 0) {
if (subtasks.length === 0) {
return <div>{"<No tasks>"}</div>;
}

Expand Down
2 changes: 1 addition & 1 deletion cabra/src/pages/components/TasksList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export default function TasksList() {

const tasks = data.data;

const hasNoTasks = !tasks || tasks.length == 0;
const hasNoTasks = !tasks || tasks.length === 0;
return (
<Container>
{hasNoTasks ? (
Expand Down

0 comments on commit 87ace71

Please sign in to comment.