mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-27 10:42:45 +03:00
Updated migration eslint rule to catch bad filenames
- We had an incident where a migration file was misnamed. - This is caused by using slimer with spaces rather than hyphens - We didn't imagine this case when writing the regex for matching filenames - However, now we know it, it's easy to tweak the regex to match this case - This requires adding an override to the one badly named file
This commit is contained in:
parent
aeea3a3d76
commit
ac32944dc6
@ -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]+)+$', true]
|
||||
'ghost/filenames/match-regex': ['error', '^(?:\\d{2}|\\d{4}(?:-\\d{2}){4})(?:-[a-zA-Z]+){2,}$', true]
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -1,3 +1,8 @@
|
||||
// ESLint Override Notice
|
||||
// This file was named incorrectly and it didn't flag up in our eslint rules.
|
||||
// The ESLint match-regex rule has now been updated to catch this, but this file has to be excluded.
|
||||
/* eslint-disable ghost/filenames/match-regex */
|
||||
|
||||
const {addTable} = require('../../utils');
|
||||
|
||||
module.exports = addTable('newsletters', {
|
||||
|
Loading…
Reference in New Issue
Block a user