Page MenuHomePhabricator

Eslint : unnecessary "eslint-disable-next-line camelcase" comments
Closed, ResolvedPublic


I see lots in lots of pieces of code this line:

// eslint-disable-next-line camelcase

This is due to properties in objects being in snakecase.

But there is an option provided by eslint for this case: { "properties": "never" }

With this option:

					const wrong_name = 42; // This reports an error
					myFunction( {
						wikilambdafn_zfunction_id: 'Z801', // This is accepted by Eslint
					} );

Event Timeline

Change 826809 had a related patch set uploaded (by Teleosteen; author: Teleosteen):

[mediawiki/extensions/WikiLambda@master] ESLint : Allow snakecase names for properties

This is not "unnecessary"; it's an awkward mis-match between how the MediaWiki Action API names things and the Wikimedia coding standards. I've tweaked your commit to limit the over-ride.

Change 826809 merged by jenkins-bot:

[mediawiki/extensions/WikiLambda@master] ESLint: Allow snakecase names for properties in the Vuex store code