Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NOJIRA] Update ESLint config #32

Merged
merged 1 commit into from
Apr 30, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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",
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dedicated to @tgargula ❤️

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

<3

"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