0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-06 22:40:14 -05:00

Updated linting and migration comment to improve practices

refs https://github.com/TryGhost/Toolbox/issues/602

- the new regex allows for the filename to contain seconds, which would have
  helped prevent a bug we had with migrations being in the wrong order
- mentioned filename ordering in the migration review comment to bring
  that to the forefront of the mind
This commit is contained in:
Daniel Lockyer 2023-06-26 13:04:21 +02:00
parent 9601285c3d
commit 1bce363bd3
No known key found for this signature in database
2 changed files with 2 additions and 2 deletions

View file

@ -32,7 +32,7 @@ jobs:
- [ ] Satisfies idempotency requirement (both `up()` and `down()`)
- [ ] Does not reference models
- [ ] Filename is in the correct format
- [ ] Filename is in the correct format (and correctly ordered)
- [ ] Targets the next minor version
- [ ] All code paths have appropriate log messages
- [ ] Uses the correct utils

View file

@ -30,7 +30,7 @@ module.exports = {
'core/server/data/migrations/versions/3.*/*'
],
rules: {
'ghost/filenames/match-regex': ['error', '^(?:\\d{2}|\\d{4}(?:-\\d{2}){4})(?:-[a-zA-Z]+){2,}$', true]
'ghost/filenames/match-regex': ['error', '^(?:\\d{4}(?:-\\d{2}){4,5}|\\d{2})(?:-[a-zA-Z]+){2,}$', true]
}
},
{