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:
parent
9601285c3d
commit
1bce363bd3
2 changed files with 2 additions and 2 deletions
2
.github/workflows/migration-review.yml
vendored
2
.github/workflows/migration-review.yml
vendored
|
@ -32,7 +32,7 @@ jobs:
|
||||||
|
|
||||||
- [ ] Satisfies idempotency requirement (both `up()` and `down()`)
|
- [ ] Satisfies idempotency requirement (both `up()` and `down()`)
|
||||||
- [ ] Does not reference models
|
- [ ] Does not reference models
|
||||||
- [ ] Filename is in the correct format
|
- [ ] Filename is in the correct format (and correctly ordered)
|
||||||
- [ ] Targets the next minor version
|
- [ ] Targets the next minor version
|
||||||
- [ ] All code paths have appropriate log messages
|
- [ ] All code paths have appropriate log messages
|
||||||
- [ ] Uses the correct utils
|
- [ ] Uses the correct utils
|
||||||
|
|
|
@ -30,7 +30,7 @@ module.exports = {
|
||||||
'core/server/data/migrations/versions/3.*/*'
|
'core/server/data/migrations/versions/3.*/*'
|
||||||
],
|
],
|
||||||
rules: {
|
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]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue