[REF] web: eslint syntax applied on views/graph

Part-of: odoo/odoo#97394
This commit is contained in:
Dardenne Florent (dafl)
2022-08-10 12:07:19 +02:00
parent 8676fed6a7
commit cef8cf87b4
2 changed files with 4 additions and 4 deletions
@@ -37,7 +37,7 @@ export class GraphArchParser extends XMLParser {
break;
}
case "field": {
let fieldName = node.getAttribute("name"); // exists (rng validation)
const fieldName = node.getAttribute("name"); // exists (rng validation)
if (fieldName === "id") {
break;
}
@@ -2101,7 +2101,7 @@ QUnit.module("Views", (hooks) => {
mode: "line",
order: "ASC",
});
let arch2 = `<graph disable_linking="0" string="Title" stacked="False"/>`;
const arch2 = `<graph disable_linking="0" string="Title" stacked="False"/>`;
propsFromArch = new GraphArchParser().parse(arch2, fields);
assert.deepEqual(propsFromArch, {
@@ -2118,7 +2118,7 @@ QUnit.module("Views", (hooks) => {
assert.expect(1);
const fields = serverData.models.foo.fields;
fields.fighters = { type: "text", string: "Fighters" };
let arch = `
const arch = `
<graph type="pie">
<field name="revenue" type="measure"/>
<field name="date" interval="day"/>
@@ -2128,7 +2128,7 @@ QUnit.module("Views", (hooks) => {
<field name="fighters" string="FooFighters"/>
</graph>
`;
let propsFromArch = new GraphArchParser().parse(arch, fields);
const propsFromArch = new GraphArchParser().parse(arch, fields);
assert.deepEqual(propsFromArch, {
fields,
fieldAttrs: {