diff --git a/ivette/.eslintrc.js b/ivette/.eslintrc.js index 43b7e75da3f5c0d9444b7630e9833109c5d0cdd0..5ceebe2f3bcc62a347f25840bc542a93a6d0004f 100644 --- a/ivette/.eslintrc.js +++ b/ivette/.eslintrc.js @@ -40,17 +40,15 @@ module.exports = { "lines-between-class-members": [ "error", "always", { "exceptAfterSingleLine": true } ], - // Disallow the use of var in favor of let and const - "no-var": "error", // Force curly brackets on newline if some item is "object-curly-newline": ["error", { "multiline": true }], + // Allow infinite loops but disallow constant if-then-else + "no-constant-condition": ["error", { "checkLoops": false }], // --- Safety rules --- // Be more strict on usage of useMemo and useRef "react-hooks/exhaustive-deps": "error", - // Forbid shadowing concerning variables - "no-shadow": "off", // Requires '+' to be applied on 2 numbers or 2 strings only "@typescript-eslint/restrict-plus-operands": "error", // Only use type safe comparison === as == between distinct type is not so obvious @@ -64,12 +62,7 @@ module.exports = { "varsIgnorePattern": "^_", "argsIgnorePattern": "^_" } ], - - // --- Laxism --- - - // Allow type any until we have types for every external library - "@typescript-eslint/no-explicit-any": "off", - // Actually, allow any function without return type for now - "@typescript-eslint/explicit-function-return-type": "off", + // Disallow the use of var in favor of let and const + "no-var": "error", } }; diff --git a/ivette/src/dome/.eslintrc.json b/ivette/src/dome/.eslintrc.json new file mode 100644 index 0000000000000000000000000000000000000000..fb24a7a0c7575b4542d30ec947c809f3bc8332a0 --- /dev/null +++ b/ivette/src/dome/.eslintrc.json @@ -0,0 +1,6 @@ +{ + "rules": { + "@typescript-eslint/no-explicit-any": "off", + "@typescript-eslint/explicit-function-return-type": "off" + } +} \ No newline at end of file diff --git a/ivette/src/dome/renderer/data/json.ts b/ivette/src/dome/renderer/data/json.ts index 1d0a52ad8928d2ba45d11b8d1259e2532fed246a..8983e09488c3c3984aa68a06be5ac59186027ef7 100644 --- a/ivette/src/dome/renderer/data/json.ts +++ b/ivette/src/dome/renderer/data/json.ts @@ -453,6 +453,7 @@ export function eObject<A>(fp: EProps<A>): Encoder<A> { } // Intentionnaly internal and only declared +// eslint-disable-next-line @typescript-eslint/no-unused-vars declare const tag: unique symbol; /** Phantom type. */ diff --git a/ivette/src/frama-c/.eslintrc.json b/ivette/src/frama-c/.eslintrc.json new file mode 100644 index 0000000000000000000000000000000000000000..fb24a7a0c7575b4542d30ec947c809f3bc8332a0 --- /dev/null +++ b/ivette/src/frama-c/.eslintrc.json @@ -0,0 +1,6 @@ +{ + "rules": { + "@typescript-eslint/no-explicit-any": "off", + "@typescript-eslint/explicit-function-return-type": "off" + } +} \ No newline at end of file diff --git a/ivette/src/frama-c/plugins/eva/cells.ts b/ivette/src/frama-c/plugins/eva/cells.ts index 6de74f52a707d4381b7d187dc1ac465192f9a283..d972e64e0e692bba3c11a1c5260098558201b480 100644 --- a/ivette/src/frama-c/plugins/eva/cells.ts +++ b/ivette/src/frama-c/plugins/eva/cells.ts @@ -98,15 +98,15 @@ export type Evaluation = Values.evaluation; const emptyEvaluation: Values.evaluation = { value: '', alarms: [], - pointed_vars: [], + pointedVars: [], }; export interface EvaValues { errors?: string; - v_before: Evaluation; - v_after?: Evaluation; - v_then?: Evaluation; - v_else?: Evaluation; + vBefore: Evaluation; + vAfter?: Evaluation; + vThen?: Evaluation; + vElse?: Evaluation; size: Size; } @@ -166,7 +166,7 @@ export class ValueCache { const cache = this.vcache; const cached = cache.get(key); if (cached) return cached; - const newValue: EvaValues = { v_before: emptyEvaluation, size: EMPTY }; + const newValue: EvaValues = { vBefore: emptyEvaluation, size: EMPTY }; if (callstack !== undefined && fct === undefined) return newValue; // callstack !== undefined ==> fct !== undefined) @@ -175,7 +175,7 @@ export class ValueCache { .send(Values.getValues, { target: marker, callstack }) .then((r) => { newValue.errors = undefined; - if (r.v_before) newValue.v_before = r.v_before; + if (r.vBefore) newValue.vBefore = r.v_before; newValue.v_after = r.v_after; newValue.v_then = r.v_then; newValue.v_else = r.v_else; diff --git a/ivette/src/ivette/.eslintrc.json b/ivette/src/ivette/.eslintrc.json new file mode 100644 index 0000000000000000000000000000000000000000..fb24a7a0c7575b4542d30ec947c809f3bc8332a0 --- /dev/null +++ b/ivette/src/ivette/.eslintrc.json @@ -0,0 +1,6 @@ +{ + "rules": { + "@typescript-eslint/no-explicit-any": "off", + "@typescript-eslint/explicit-function-return-type": "off" + } +} \ No newline at end of file diff --git a/ivette/src/renderer/.eslintrc.json b/ivette/src/renderer/.eslintrc.json new file mode 100644 index 0000000000000000000000000000000000000000..fb24a7a0c7575b4542d30ec947c809f3bc8332a0 --- /dev/null +++ b/ivette/src/renderer/.eslintrc.json @@ -0,0 +1,6 @@ +{ + "rules": { + "@typescript-eslint/no-explicit-any": "off", + "@typescript-eslint/explicit-function-return-type": "off" + } +} \ No newline at end of file