Problem
app/models/apikey.model.js, apimaster.model.js, and
customer.model.js were the first three model files in the
codebase and pre-date the current style conventions. They differ
from the other 15 models in two cosmetic ways:
'use strict'; (single-quoted) vs the rest of the
codebase's "use strict"; (double-quoted).
- Trailing whitespace on every field declaration. Disagrees
with .editorconfig's trim_trailing_whitespace = true for
*.js — the first contributor with an EditorConfig-aware
editor opening one of these files for an unrelated change
would see noisy whitespace diffs they didn't intend.
ESLint has no no-trailing-spaces rule configured (style debates
are kept out of CI), so the inconsistency doesn't trip lint — it
just lurks until a contributor's editor "fixes" it as a side
effect of something else.
Fix
Mechanically strip the trailing whitespace and switch the three
files to "use strict";. No behavior change. The Sequelize field
declarations stay verbatim (no allowNull / defaultValue
overrides added — those would be real behavior changes, and the
DDL in setup/TimeTracker.sql is authoritative for what the DB
physically enforces).
Acceptance
Proudly Made in Nebraska. Go Big Red! 🌽 https://xkcd.com/2347/
Problem
app/models/apikey.model.js,apimaster.model.js, andcustomer.model.jswere the first three model files in thecodebase and pre-date the current style conventions. They differ
from the other 15 models in two cosmetic ways:
'use strict';(single-quoted) vs the rest of thecodebase's
"use strict";(double-quoted).with
.editorconfig'strim_trailing_whitespace = truefor*.js— the first contributor with an EditorConfig-awareeditor opening one of these files for an unrelated change
would see noisy whitespace diffs they didn't intend.
ESLint has no
no-trailing-spacesrule configured (style debatesare kept out of CI), so the inconsistency doesn't trip lint — it
just lurks until a contributor's editor "fixes" it as a side
effect of something else.
Fix
Mechanically strip the trailing whitespace and switch the three
files to
"use strict";. No behavior change. The Sequelize fielddeclarations stay verbatim (no
allowNull/defaultValueoverrides added — those would be real behavior changes, and the
DDL in
setup/TimeTracker.sqlis authoritative for what the DBphysically enforces).
Acceptance
"use strict";(double-quoted)allowNull/defaultValueadditionsProudly Made in Nebraska. Go Big Red! 🌽 https://xkcd.com/2347/