Skip to content

Commit

Permalink
chore(deps): update dependency eslint to v6 (#1160)
Browse files Browse the repository at this point in the history
  • Loading branch information
renovate[bot] authored and douglasduteil committed Aug 25, 2019
1 parent cfcdef5 commit 8e4a648
Show file tree
Hide file tree
Showing 15 changed files with 146 additions and 99 deletions.
1 change: 1 addition & 0 deletions packages/code-du-travail-api/.eslintrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ extends:
- "@socialgouv/eslint-config-recommended"
rules:
prefer-const: 2
require-atomic-updates: off

overrides:
- files: ["*.spec.js"]
Expand Down
2 changes: 1 addition & 1 deletion packages/code-du-travail-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"@zeit/ncc": "^0.20.4",
"axios": "^0.19.0",
"csvtojson": "^2.0.10",
"eslint": "^5.13.0",
"eslint": "^6.2.2",
"google-spreadsheets": "^2.0.0",
"json2csv": "^4.5.2",
"nodemon": "^1.19.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,16 +66,18 @@ router.get("/themes/:slug/items", async ctx => {
ctx.throw(404, `there is no theme that match ${slug}`);
}
const body = getSearchByThemeBody({ slug });
const response = await elasticsearchClient.search({ index, body });
const {
body: { hits }
} = await elasticsearchClient.search({ index, body });

if (response.body.hits.total.value === 0) {
if (hits.total.value === 0) {
ctx.throw(204, `there is no documents associated to the theme ${slug}`);
}
ctx.body = {
...theme,
children: getChildren(slug),
breadcrumbs: getBreadcrumbs(slug),
documents: response.body.hits.hits
documents: hits.hits
};
});

Expand Down
2 changes: 1 addition & 1 deletion packages/code-du-travail-data/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"@zeit/ncc": "^0.1.16",
"babel-eslint": "^10.0.3",
"babel-jest": "^24.9.0",
"eslint": "^5.13.0",
"eslint": "^6.2.2",
"jest": "^24.9.0"
},
"jest": {
Expand Down
6 changes: 3 additions & 3 deletions packages/code-du-travail-frontend/.eslintrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ rules:
]

overrides:
env:
jest: true
files: ["*.test.js"]
- files: ["*.test.js"]
env:
jest: true
2 changes: 1 addition & 1 deletion packages/code-du-travail-frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"babel-eslint": "^10.0.3",
"babel-jest": "^24.9.0",
"babel-plugin-styled-components": "^1.10.6",
"eslint": "^5.13.0",
"eslint": "^6.2.2",
"jest": "^24.9.0",
"jest-styled-components": "^6.3.3",
"prettier": "^1.18.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export function getIndemnite({
let error;
let indemniteConventionnelle = 0;
let formula = "-";
let labels = {
const labels = {
"salaire de référence (Sref)": salaireRef,
...(!tamDuration &&
!cadreDuration && { "ancienneté totale, en année, (A)": anciennete }),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export function getIndemnite({
const anneeAncienete = Math.floor(anciennete);
let indemniteConventionnelle = 0;
let formula = "-";
let labels = {
const labels = {
"Salaire de référence (Sref)": salaireRef,
"ancienneté totale": round(anciennete),
"ancienneté (en année entière)": anneeAncienete,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ export function getIndemniteConventionnelle(data) {
});

let salaireRefConventionnel;
let formula;
let error;
if (brancheCategorie === "CEI") {
salaireRefConventionnel = round(getSalaireRef(data));
Expand Down Expand Up @@ -150,7 +149,7 @@ export function getIndemniteConventionnelle(data) {
? indemniteMax
: indemniteConventionnelleNotCeiled;

let labels = {
const labels = {
"Salaire de référence (Sref)": round(salaireRefConventionnel),
...(isCeilingReached && {
"Plafond d'indemnité conventionnel en mois (Pmois)": maxMonthIndemnite
Expand All @@ -167,7 +166,7 @@ export function getIndemniteConventionnelle(data) {
})
};

formula = isCeilingReached
const formula = isCeilingReached
? `Pmois * Sref`
: `(C * Sref * A${previousIndemnites ? " - I" : ""})`;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ function getIndemnite({
let indemniteConventionnelle = 0;
let formula = "";
let error;
let labels = {
const labels = {
"Salaire de référence (Sref)": round(salaireRef),
"Motif du licenciement": optionMotifs[motif],
Catégorie: optionCategorie[categorie]
Expand Down Expand Up @@ -110,7 +110,7 @@ function getIndemnite({
const isEmbaucheAfter1999 = isAfter(dEntree, new Date("1999-12-31"));

if (isEmbaucheAfter1999) {
let plafond = {
const plafond = {
[CADRE]: 24,
[NON_CADRE]: 18,
[NE_SAIT_PAS]: 18
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ export function getSalaireRef({ salaireRefLegal }) {
export function getIndemnite({ salaireRef, anciennete }) {
let error;
let indemniteConventionnelle = 0;
let formula = [];
const formula = [];
const trancheAnciennete = {
a10: Math.max(0, round(anciennete - 10)),
a5: Math.min(5, Math.max(0, round(anciennete - 5))),
a2: Math.min(5, round(anciennete))
};

let labels = {
const labels = {
"Salaire de référence (Sref)": round(salaireRef),
"Ancienneté entre 2 et 5ans (A1)": trancheAnciennete.a2,
"Ancienneté 6 ens 10ans (A2)": trancheAnciennete.a5,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ function getIndemnite({
}) {
const dNotification = parse(dateNotification);
let formula = "-";
let labels = {
const labels = {
"Salaire de réference (Sref)": round(salaireRef),
"Licenciement pour inaptitude": inaptitude ? "oui" : "non",
"Ancienneté totale (A)": round(anciennete),
Expand Down
2 changes: 1 addition & 1 deletion packages/code-du-travail-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"babel-jest": "^24.9.0",
"docz": "1.2.0",
"docz-theme-default": "1.2.0",
"eslint": "^5.13.0",
"eslint": "^6.2.2",
"jest": "^24.9.0",
"jest-styled-components": "^6.3.3",
"prettier": "^1.18.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/react-fiche-service-public/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"babel-jest": "^24.9.0",
"docz": "1.2.0",
"docz-theme-default": "1.2.0",
"eslint": "^5.13.0",
"eslint": "^6.2.2",
"jest": "^24.9.0",
"jest-styled-components": "^6.3.3",
"prettier": "^1.18.2",
Expand Down
Loading

0 comments on commit 8e4a648

Please sign in to comment.