Define documentable types in eslintrc instead of inline

These types can be passed a parameters to any file without
creating a dependency, so it makes more sense to allow
the globally.

Change-Id: I5504465fd997b46547642e7046993b370b85586e
This commit is contained in:
Ed Sanders 2021-10-17 14:38:39 +01:00
parent aa8ed1d469
commit f4c12e120a
13 changed files with 13 additions and 57 deletions

View file

@ -12,5 +12,18 @@
"rules": {
"no-implicit-globals": "off",
"max-len": "off"
},
"settings": {
"jsdoc": {
"preferredTypes": {
"CommentController": "CommentController",
"CommentDetails": "CommentDetails",
"CommentItem": "CommentItem",
"DmMWPingNode": "DmMWPingNode",
"HeadingItem": "HeadingItem",
"moment": "moment",
"ThreadItem": "ThreadItem"
}
}
}
}

View file

@ -1,9 +1,3 @@
/**
* @external CommentItem
* @external CommentDetails
* @external ThreadItem
*/
var
controller = require( './controller.js' ),
modifier = require( './modifier.js' ),

View file

@ -1,10 +1,5 @@
var ThreadItem = require( './ThreadItem.js' );
/**
* @external moment
* @external HeadingItem
*/
/**
* A comment item
*

View file

@ -1,10 +1,6 @@
'use strict';
/* global $:off */
/**
* @external ThreadItem
*/
var
utils = require( './utils.js' ),
codePointLength = require( 'mediawiki.String' ).codePointLength,

View file

@ -1,7 +1,4 @@
/* global moment */
/**
* @external CommentItem
*/
var utils = require( './utils.js' );

View file

@ -1,10 +1,5 @@
'use strict';
/**
* @external CommentItem
* @external CommentDetails
*/
var
$pageContainer, linksController,
featuresEnabled = mw.config.get( 'wgDiscussionToolsFeaturesEnabled' ) || {},

View file

@ -5,10 +5,6 @@
* @license The MIT License (MIT); see LICENSE.txt
*/
/**
* @external DmMWPingNode
*/
/**
* ContentEditable MediaWiki ping node.
*

View file

@ -10,12 +10,6 @@ var controller = require( 'ext.discussionTools.init' ).controller,
require( './AbandonCommentDialog.js' );
require( './AbandonTopicDialog.js' );
/**
* @external CommentController
* @external CommentItem
* @external CommentDetails
*/
/**
* DiscussionTools ReplyWidget class
*

View file

@ -1,9 +1,3 @@
/**
* @external CommentController
* @external CommentItem
* @external CommentDetails
*/
var utils = require( 'ext.discussionTools.init' ).utils;
/**

View file

@ -8,12 +8,6 @@ require( './dt-ve/dt.ui.UsernameCompletionTool.js' );
require( './dt-ve/dt.dm.PingNode.js' );
require( './dt-ve/dt.ce.PingNode.js' );
/**
* @external CommentController
* @external CommentItem
* @external CommentDetails
*/
/**
* DiscussionTools ReplyWidgetVisual class
*

View file

@ -1,10 +1,6 @@
'use strict';
/* global $:off */
/**
* @external CommentItem
*/
var utils = require( './utils.js' );
/**

View file

@ -1,10 +1,6 @@
'use strict';
/* global $:off */
/**
* @external ThreadItem
*/
/**
* @constant
*/

View file

@ -1,7 +1,3 @@
/**
* @external CommentItem
*/
var utils = require( 'ext.discussionTools.init' ).utils;
module.exports = {};