Skip to content

chore(models): strip trailing whitespace + standardize "use strict" in legacy models#184

Merged
CryptoJones merged 1 commit into
masterfrom
chore/models-strip-trailing-whitespace-and-standardize-use-strict
May 19, 2026
Merged

chore(models): strip trailing whitespace + standardize "use strict" in legacy models#184
CryptoJones merged 1 commit into
masterfrom
chore/models-strip-trailing-whitespace-and-standardize-use-strict

Conversation

@CryptoJones
Copy link
Copy Markdown
Owner

Closes #183.

Summary

The 3 oldest model files (apikey, apimaster, customer) used
'use strict'; (single-quoted) and carried trailing whitespace on
every field. The other 15 models follow the current convention:
"use strict"; (double-quoted) and no trailing whitespace per
.editorconfig.

Mechanical cleanup only. Field declarations stay verbatim — no
allowNull / defaultValue additions (those would be real behavior
changes, and the DDL is authoritative for what the DB enforces).

Test plan

  • npm run lint clean
  • npm test — 632 passed (no test surface affected)
  • No allowNull / defaultValue additions
  • Module shape, options block, defaultScope, tableName unchanged

Proudly Made in Nebraska. Go Big Red! 🌽 https://xkcd.com/2347/

… in the 3 legacy models

apikey, apimaster, and customer were the first three model files
written and pre-date the codebase's current style conventions:

- `'use strict';` (single-quoted) vs every other model's
  `"use strict";` (double-quoted)
- Trailing whitespace on every property line — disagrees with
  `.editorconfig`'s `trim_trailing_whitespace = true` for `*.js`,
  so the first contributor with an EditorConfig-aware editor would
  see a noisy diff on save unrelated to the change they're making.

Pure mechanical cleanup. No behavior change:
- Sequelize field declarations untouched (still no `allowNull` /
  `defaultValue` overrides — those would be real behavior changes
  the DDL in `setup/TimeTracker.sql` is authoritative for).
- Module shape, options block, `defaultScope`, `tableName` all
  preserved verbatim.
- 632 tests still pass.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@CryptoJones CryptoJones merged commit 69d1c60 into master May 19, 2026
3 checks passed
@CryptoJones CryptoJones deleted the chore/models-strip-trailing-whitespace-and-standardize-use-strict branch May 19, 2026 09:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

models: 3 legacy model files disagree with .editorconfig + codebase "use strict" convention

1 participant