Page MenuHomePhabricator

Decide on the standard name for a JSDoc settings file: .jsdoc.json or jsdoc.json
Closed, ResolvedPublic

Description

Doing a survey of the entire codebase (CodeSearch), there are...

  • 15 x jsdoc.json files
  • 7 x .jsdoc.json files (note the period at the beginning)

I propose we pick one, and then edit the others to conform. That way everything is standardized.

I propose we pick jsdoc.json, so that there are less files to edit.

Is everyone OK with this?

Event Timeline

Jdforrester-WMF subscribed.

Didn't you already propose a standard here (of no leading .) with https://gerrit.wikimedia.org/r/c/mediawiki/core/+/1039647 ? Happy for that to stand.

For that gerrit patch, I searched CodeSearch using the "MediaWiki & services at WMF" filter, which made it seem like no period was the obvious choice.

But today I did the same search again using the "Everything" filter, and I found a bunch more with periods in front, making the choice less obvious.

Some of the ones in the "Everything" filter are repos that are published to doc.wikimedia.org, such as VisualEditor/VisualEditor, oojs/core, and oojs/ui.

So I want to double check with the group :)

I've never really understood the hidden file standard (leading .) so happy to go without it. Other tools are inconsistent, so I don't think it matters too much which we pick:

  • .eslintrc.json
  • .stylelintrc.json
  • .bananaconfig.json
  • tsconf.json
  • package.json
  • bundlesize.config.json

Thanks for the feedback. I see a consensus for jsdoc.json without a period. I will write some patches to implement this so that everything is standardized.

Change #1048839 had a related patch set uploaded (by Novem Linguae; author: Novem Linguae):

[mediawiki/extensions/Echo@master] rename .jsdoc.json to jsdoc.json

https://gerrit.wikimedia.org/r/1048839

Change #1048841 had a related patch set uploaded (by Novem Linguae; author: Novem Linguae):

[mediawiki/extensions/VisualEditor@master] rename .jsdoc.json to jsdoc.json

https://gerrit.wikimedia.org/r/1048841

Change #1048844 had a related patch set uploaded (by Novem Linguae; author: Novem Linguae):

[VisualEditor/VisualEditor@master] rename .jsdoc.json to jsdoc.json

https://gerrit.wikimedia.org/r/1048844

Change #1048849 had a related patch set uploaded (by Novem Linguae; author: Novem Linguae):

[jquery-client@master] rename .jsdoc.json to jsdoc.json

https://gerrit.wikimedia.org/r/1048849

Change #1048853 had a related patch set uploaded (by Novem Linguae; author: Novem Linguae):

[mediawiki/tools/api-testing@master] rename .jsdoc.json to jsdoc.json

https://gerrit.wikimedia.org/r/1048853

Change #1048856 had a related patch set uploaded (by Novem Linguae; author: Novem Linguae):

[oojs/core@master] JSDoc: rename .jsdoc.json to jsdoc.json

https://gerrit.wikimedia.org/r/1048856

Change #1048860 had a related patch set uploaded (by Novem Linguae; author: Novem Linguae):

[oojs/ui@master] JSDoc: rename .jsdoc.json to jsdoc.json

https://gerrit.wikimedia.org/r/1048860

Change #1048853 merged by jenkins-bot:

[mediawiki/tools/api-testing@master] rename .jsdoc.json to jsdoc.json

https://gerrit.wikimedia.org/r/1048853

Change #1048841 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] rename .jsdoc.json to jsdoc.json

https://gerrit.wikimedia.org/r/1048841

Change #1048839 merged by jenkins-bot:

[mediawiki/extensions/Echo@master] rename .jsdoc.json to jsdoc.json

https://gerrit.wikimedia.org/r/1048839

Change #1048856 merged by jenkins-bot:

[oojs/core@master] JSDoc: rename .jsdoc.json to jsdoc.json

https://gerrit.wikimedia.org/r/1048856

Change #1048860 merged by jenkins-bot:

[oojs/ui@master] JSDoc: rename .jsdoc.json to jsdoc.json

https://gerrit.wikimedia.org/r/1048860

I've never really understood the hidden file standard (leading .) so happy to go without it. Other tools are inconsistent, so I don't think it matters too much which we pick:

  • .eslintrc.json
  • .stylelintrc.json
  • .bananaconfig.json
  • tsconf.json
  • package.json
  • bundlesize.config.json

Standardizing is great. The . start would order the build specific instruction files and separate them from folders and readmes or AUTHORS.txt et al. In a perfect world, all of those would start with a .. That's cleaner to me. But ohay.

image.png (1×558 px, 112 KB)

Change #1048849 merged by jenkins-bot:

[jquery-client@master] rename .jsdoc.json to jsdoc.json

https://gerrit.wikimedia.org/r/1048849

Change #1048844 merged by jenkins-bot:

[VisualEditor/VisualEditor@master] rename .jsdoc.json to jsdoc.json

https://gerrit.wikimedia.org/r/1048844

Novem_Linguae claimed this task.

Change #1051174 had a related patch set uploaded (by DLynch; author: DLynch):

[mediawiki/extensions/VisualEditor@master] Update VE core submodule to master (84477b4b9)

https://gerrit.wikimedia.org/r/1051174

Change #1051174 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] Update VE core submodule to master (84477b4b9)

https://gerrit.wikimedia.org/r/1051174