Skip to content

Commit

Permalink
Merge pull request #82 from betagouv/dependabot/npm_and_yarn/prettier…
Browse files Browse the repository at this point in the history
…-3.0.0

build(deps-dev): bump prettier from 2.8.8 to 3.0.0
  • Loading branch information
baptou12 authored Jul 12, 2023
2 parents b5370bd + bb570c5 commit 60da5ca
Show file tree
Hide file tree
Showing 16 changed files with 87 additions and 78 deletions.
8 changes: 4 additions & 4 deletions components/bikeTypeNumberAndBikeTypeTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class BikeTypeNumberAndBikeTypeTable extends Component {
{this.state.countGroupByBikeTypeNumberAndByBikeType.categories.map(
(_, index) => (
<th key={`category_${index}`}>Par {index + 1}</th>
)
),
)}
</tr>
</thead>
Expand Down Expand Up @@ -72,10 +72,10 @@ class BikeTypeNumberAndBikeTypeTable extends Component {
</>
)}
</td>
)
),
)}
</tr>
)
),
)}
{this.state.percentage && (
<tr>
Expand All @@ -89,7 +89,7 @@ class BikeTypeNumberAndBikeTypeTable extends Component {
}
&nbsp;%
</td>
)
),
)}
</tr>
)}
Expand Down
6 changes: 3 additions & 3 deletions components/bikeTypeNumberTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class BikeTypeNumberTable extends Component {

componentDidMount() {
const countGroupByBikeTypeNumber = BikeData.countGroupByBikeTypeNumber(
this.props.bikeData
this.props.bikeData,
)
this.setState({ countGroupByBikeTypeNumber })
}
Expand All @@ -21,7 +21,7 @@ class BikeTypeNumberTable extends Component {
return null
}
const countGroupByBikeTypeNumber = BikeData.countGroupByBikeTypeNumber(
this.props.bikeData
this.props.bikeData,
)
this.setState({ countGroupByBikeTypeNumber })
return null
Expand Down Expand Up @@ -56,7 +56,7 @@ class BikeTypeNumberTable extends Component {
<td>{value.percentageWithoutZero} %</td>
)}
</tr>
)
),
)}
</tbody>
</table>
Expand Down
12 changes: 6 additions & 6 deletions components/surveyDetails.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,16 @@ class SurveyDetails extends Component {

filterBenefits(
institution_type = DataFilter.DEFAULT_FILTER_VALUE,
institution = DataFilter.DEFAULT_FILTER_VALUE
institution = DataFilter.DEFAULT_FILTER_VALUE,
) {
this.setState(
DataFilter.benefits(
this.state.surveyDetails,
this.state.institutions,
institution_type,
institution
institution,
),
() => this.sortTable("total")
() => this.sortTable("total"),
)
}

Expand All @@ -73,14 +73,14 @@ class SurveyDetails extends Component {
const sortAscending = DataFilter.getSortAscending(
sortingBy,
this.state.sortBy,
this.state.sortAscending
this.state.sortAscending,
)

const output = DataFilter.sort(
this.state.filteredBenefits,
sortingBy,
sortAscending,
["id"]
["id"],
)

this.setState({
Expand Down Expand Up @@ -144,7 +144,7 @@ class SurveyDetails extends Component {
onChange={(e) =>
this.filterBenefits(
this.state.currentInstitutionType,
e.target.value
e.target.value,
)
}
value={this.state.currentInstitution}
Expand Down
2 changes: 1 addition & 1 deletion components/surveyResults.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class SurveyResults extends Component {
<ResponsiveBar
label={(entry) =>
`${entry.value} (${Math.round(
(100 * entry.value) / this.state.summary.total
(100 * entry.value) / this.state.summary.total,
)}%)`
}
data={Object.keys(Config.surveyLabels).map((key) => {
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/behaviours.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ describe("Behaviour Page", () => {
cy.checkTable(
"behaviours-table",
0,
"eure_et_loir_eligibilite_aide_menagere_personne_handicap"
"eure_et_loir_eligibilite_aide_menagere_personne_handicap",
)
})
})
Expand Down
10 changes: 5 additions & 5 deletions cypress/e2e/survey.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ describe("Survey Page", () => {

cy.get("[data-testid=survey-details-table] tbody tr").should(
"have.length",
3
3,
)
cy.checkTable("survey-details-table", 0, "depart1825 montant maximum")
cy.checkTable(
"survey-details-table",
1,
"eure et loir eligibilite aide menagere personne handicap"
"eure et loir eligibilite aide menagere personne handicap",
)
cy.checkTable("survey-details-table", 2, "gratuite musees monuments")
})
Expand All @@ -41,12 +41,12 @@ describe("Survey Page", () => {
it("displays filtered rows", () => {
cy.get("[data-testid=survey-details-table] tbody tr").should(
"have.length",
1
1,
)
cy.checkTable(
"survey-details-table",
0,
"eure et loir eligibilite aide menagere personne handicap"
"eure et loir eligibilite aide menagere personne handicap",
)
})
})
Expand All @@ -61,7 +61,7 @@ describe("Survey Page", () => {
cy.checkGraph(
"chart-eure_et_loir_eligibilite_aide_menagere_personne_handicap",
"D. réussie",
"142"
"142",
)
cy.checkGraph("chart-gratuite_musees_monuments", "D. réussie", "148")
})
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/visites.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ describe("Visites Page", () => {
cy.checkTable(
"visits-table",
0,
"/individu/demandeur/ressources/montants/revenusActivite"
"/individu/demandeur/ressources/montants/revenusActivite",
)
cy.checkTable("visits-table", 0, "426")
cy.checkTable("visits-table", 0, "47")
Expand Down
10 changes: 5 additions & 5 deletions cypress/support/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,29 +13,29 @@ function createFetchInterceptor(interceptIdentifier, url, fixture) {
export const interceptUsageStatistics = createFetchInterceptor(
"interceptUsageStatistics",
configuration.env.usageStatisticsURL,
"usageStatistics.json"
"usageStatistics.json",
)

export const interceptSurveyStatistics = createFetchInterceptor(
"interceptSurveyStatistics",
configuration.env.surveyStatisticsURL,
"surveyStatistics.json"
"surveyStatistics.json",
)

export const interceptRecorderStatistics = createFetchInterceptor(
"interceptRecorderStatistics",
new RegExp(`${configuration.env.recorderStatisticsURL}/benefits?.*`),
"recorderStatistics.json"
"recorderStatistics.json",
)

export const interceptBenefits = createFetchInterceptor(
"interceptBenefits",
configuration.env.benefitsURL,
"benefits.json"
"benefits.json",
)

export const interceptPagesStats = createFetchInterceptor(
"interceptPagesStats",
new RegExp(`${configuration.env.pagesStatsURL.replace("?", "\\?")}.*`),
"pagesStats.json"
"pagesStats.json",
)
51 changes: 30 additions & 21 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@
"cypress": "^12.16.0",
"eslint": "^8.44.0",
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-prettier": "^5.0.0",
"eslint-plugin-react": "^7.32.2",
"gh-pages": "^2.0.1",
"prettier": "^2.8.8",
"prettier": "^3.0.0",
"start-server-and-test": "^2.0.0"
}
}
Loading

0 comments on commit 60da5ca

Please sign in to comment.