The words "Center", "Left", or "Right" used as a caption for a gallery image work fine but are detected as a Linter error.
https://www.mediawiki.org/wiki/Help:Images#Rendering_a_gallery_of_images does not contain a workaround like "caption=" or "1=" for gallery image captions.
This is actually a Parsoid/Gallery bug which consumes the captions if they are the words left, center or right and treats them as halign values that are invalid, and also causes erroneous linter errors. See:
for further details