Skip to content

Commit

Permalink
fixing lint on files
Browse files Browse the repository at this point in the history
  • Loading branch information
mlfaa committed Dec 17, 2021
1 parent 0f486e2 commit db1790d
Show file tree
Hide file tree
Showing 9 changed files with 24 additions and 19 deletions.
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ module.exports = {
'react/jsx-filename-extension': [1, { extensions: ['.js', '.jsx'] }],
'react/jsx-props-no-spreading': 'off',
'react/forbid-prop-types': 'off',
'jsx-a11y/click-events-have-key-events': 'off',
'import/no-extraneous-dependencies': ["error", {"devDependencies": ["**/*.js","**/*.test.js", "**/*.spec.js"]}]
},
};
8 changes: 6 additions & 2 deletions src/components/Carousel/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
/* eslint-disable react/prop-types */
/* eslint-disable jsx-a11y/no-noninteractive-element-interactions */

import React from 'react';
import { isDesktop, isTablet } from 'react-device-detect';
import Carousel from 'react-multi-carousel';
Expand All @@ -16,15 +18,16 @@ const CustomDot = ({ onClick, active }) => {
className={`${classes.dot} ${
active ? classes.dotActive : classes.dotInactive
}`}
onClick={() => onClick()}
></li>
onClick={onClick}
/>
);
};

const CustomLeft = ({ onClick }) => {
const classes = useStyles();
return (
<button
type="button"
className={`${classes.arrow} ${classes.arrowLeft}`}
onClick={onClick}
>
Expand All @@ -51,6 +54,7 @@ const CustomRight = ({ onClick }) => {
const classes = useStyles();
return (
<button
type="button"
className={`${classes.arrow} ${classes.arrowRight}`}
onClick={onClick}
>
Expand Down
2 changes: 1 addition & 1 deletion src/components/ChartAndReport/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export default function ChartAndReport(props) {
<>
<Box display="flex" flexDirection="row-reverse">
<FormControlRadioOptions
handleChange={handleWayOfVisualizeDataChange}
handleChange={() => handleWayOfVisualizeDataChange()}
value={wayOfVisualizeData}
/>
</Box>
Expand Down
8 changes: 4 additions & 4 deletions src/components/ChartTotalRoomsWithFilter/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ export default function ChartTotalRoomsWithFilter(props) {
<>
<Box display="flex" flexDirection="row-reverse">
<FormControlRadioOptions
handleChange={handleWayOfVisualizeDataChange}
handleChange={() => handleWayOfVisualizeDataChange()}
value={wayOfVisualizeData}
/>
</Box>
Expand All @@ -163,15 +163,15 @@ export default function ChartTotalRoomsWithFilter(props) {
</Box>
<Box width="100%" display="flex" justifyContent="center">
<FormControlLabel
control={<WhiteCheckbox checked={!(columnsToNotShow).includes('Canceladas')} onChange={handleShowColumsChange} name="Canceladas" />}
control={<WhiteCheckbox checked={!(columnsToNotShow).includes('Canceladas')} onChange={() => handleShowColumsChange()} name="Canceladas" />}
label="Canceladas"
/>
<FormControlLabel
control={<WhiteCheckbox checked={!(columnsToNotShow).includes('Realizadas')} onChange={handleShowColumsChange} name="Realizadas" />}
control={<WhiteCheckbox checked={!(columnsToNotShow).includes('Realizadas')} onChange={() => handleShowColumsChange()} name="Realizadas" />}
label="Realizadas"
/>
<FormControlLabel
control={<WhiteCheckbox checked={!(columnsToNotShow).includes('Total')} onChange={handleShowColumsChange} name="Total" />}
control={<WhiteCheckbox checked={!(columnsToNotShow).includes('Total')} onChange={() => handleShowColumsChange} name="Total" />}
label="Total"
/>
</Box>
Expand Down
9 changes: 5 additions & 4 deletions src/components/Frames/TotalFrame/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/* eslint-disable no-confusing-arrow */

import React, { useEffect, useState } from 'react';
import PropTypes from 'prop-types';
import CircularProgress from '@material-ui/core/CircularProgress';
Expand All @@ -23,10 +25,9 @@ function TotalsDataFrame(props) {
const handleClose = () => setOpen(false);

useEffect(() => {
const setResponsiveness = () =>
window.innerWidth < 1024
? setMobileView(true)
: setMobileView(false);
const setResponsiveness = () => window.innerWidth < 1024
? setMobileView(true)
: setMobileView(false);

setResponsiveness();

Expand Down
2 changes: 1 addition & 1 deletion src/containers/Audiencias/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -596,7 +596,7 @@ function Audiencias(props) {
<div className={classes.root}>
<Header
title={TEXTCONSTANTS.pageToolTitle}
handlePeriodChange={handlePeriodChange}
handlePeriodChange={() => handlePeriodChange()}
year={defaultYearPeriod}
monthPeriod={defaultMonthPeriod}
headerColors={headerColors}
Expand Down
2 changes: 1 addition & 1 deletion src/containers/Wikilegis/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@ function Wikilegis(props) {
<div className={classes.root}>
<Header
title={TEXTCONSTANTS.pageToolTitle}
handlePeriodChange={handlePeriodChange}
handlePeriodChange={() => handlePeriodChange()}
year={defaultYearPeriod}
monthPeriod={defaultMonthPeriod}
headerColors={headerColors}
Expand Down
9 changes: 4 additions & 5 deletions src/layouts/Navbar/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/* eslint-disable react/prop-types */
/* eslint-disable no-confusing-arrow */
import React, { useState, useEffect } from 'react';
import {
Toolbar,
Expand Down Expand Up @@ -51,7 +52,6 @@ function a11yProps(index) {

export default function PageNavbar(props) {
const {
header,
drawerContainer,
drawerMobile,
offset,
Expand All @@ -75,10 +75,9 @@ export default function PageNavbar(props) {
const { mobileView, drawerOpen } = state;

useEffect(() => {
const setResponsiveness = () =>
window.innerWidth < 1024
? setState((prevState) => ({ ...prevState, mobileView: true }))
: setState((prevState) => ({ ...prevState, mobileView: false }));
const setResponsiveness = () => window.innerWidth < 1024
? setState((prevState) => ({ ...prevState, mobileView: true }))
: setState((prevState) => ({ ...prevState, mobileView: false }));

setResponsiveness();

Expand Down
2 changes: 1 addition & 1 deletion src/pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import React from 'react';
import Head from 'next/head';
import { Grid, Typography, Box } from '@material-ui/core';
import { format, subDays } from 'date-fns';
import Footer from '../components/Footer/index';
import ptBR from 'date-fns/locale/pt-BR';
import Footer from '../components/Footer/index';
import { apiInstance } from '../services/api/apiInstance';
import Carousel from '../components/Carousel/index';
import PageNavbar from '../layouts/Navbar/index';
Expand Down

0 comments on commit db1790d

Please sign in to comment.