This was initially reported as a false linter error on T266406 but further debugging revealed that Parsoid and Gallery are "eating" the words left, center or right (which make no sense anyway in the context of a Gallery image). Parsoid and Gallery provides a default halign value of none which when followed with a left, center or right word is parsed as an alignment, instead of passing through. These words get detected early on as an halign values and are consumed - so no longer available as a caption. They are also seen as a duplicate alignment parameter and flagged as a bogus parameter which the linter finds and reports erroneously.
The following wikitext demonstrates the issue:
<gallery> File:Foobar.jpg|left File:Foobar.jpg|notaleft </gallery>