Skip to content

Commit

Permalink
enable jsdoc/check-tag-names
Browse files Browse the repository at this point in the history
  • Loading branch information
stanislav-atr committed Dec 28, 2022
1 parent 286558e commit 034db74
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 14 deletions.
3 changes: 1 addition & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ module.exports = {
'no-await-in-loop': 0,
'no-restricted-syntax': 0,
// jsdoc rules
// 'jsdoc/check-tag-names': ['error', { definedTags: ['scriptlet', 'trustedScriptlet', 'redirect'] }],
'jsdoc/check-tag-names': 0,
'jsdoc/check-tag-names': ['error', { definedTags: ['scriptlet', 'trustedScriptlet', 'redirect'] }],
'jsdoc/require-returns-description': 0,
'jsdoc/newline-after-description': 0,
'jsdoc/require-param': 0,
Expand Down
2 changes: 1 addition & 1 deletion src/helpers/create-on-error-handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Generates function which silents global errors on page generated by scriptlet
* If error doesn't belong to our error we transfer it to the native onError handler
* @param {string} rid - unique identifier of scriptlet
* @return {onError}
* @returns {onError}
*/
export function createOnErrorHandler(rid) {
// eslint-disable-next-line consistent-return
Expand Down
2 changes: 1 addition & 1 deletion src/helpers/get-descriptor-addon.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { randomId } from './random-id';
* https://github.com/AdguardTeam/Scriptlets/issues/226
* https://github.com/AdguardTeam/Scriptlets/issues/232
*
* @return {object}
* @returns {object}
*/
export function getDescriptorAddon() {
return {
Expand Down
14 changes: 7 additions & 7 deletions src/helpers/noop-utils.js
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
/**
* Noop function
* @return {undefined} undefined
* @returns {undefined} undefined
*/
export const noopFunc = () => { };

/**
* Function returns null
* @return {null} null
* @returns {null} null
*/
export const noopNull = () => null;

/**
* Function returns true
* @return {boolean} true
* @returns {boolean} true
*/
export const trueFunc = () => true;

/**
* Function returns false
* @return {boolean} false
* @returns {boolean} false
*/
export const falseFunc = () => false;

Expand All @@ -31,19 +31,19 @@ export function noopThis() {

/**
* Function returns empty string
* @return {string} empty string
* @returns {string} empty string
*/
export const noopStr = () => '';

/**
* Function returns empty array
* @return {Array} empty array
* @returns {Array} empty array
*/
export const noopArray = () => [];

/**
* Function returns empty object
* @return {object} empty object
* @returns {object} empty object
*/
export const noopObject = () => ({});

Expand Down
2 changes: 1 addition & 1 deletion src/helpers/parse-flags.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* Behaviour flags string parser
* @param {string} flags required, 'applying' argument string
* @return {object}
* @returns {object}
*/
export const parseFlags = (flags) => {
const FLAGS_DIVIDER = ' ';
Expand Down
2 changes: 1 addition & 1 deletion src/helpers/validator.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const COMMENT_MARKER = '!';
/**
* Checks if rule text is comment e.g. !!example.org##+js(set-constant.js, test, false)
* @param {string} rule
* @return {boolean}
* @returns {boolean}
*/
const isComment = (rule) => startsWith(rule, COMMENT_MARKER);

Expand Down
2 changes: 1 addition & 1 deletion src/redirects/redirects.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class Redirects {
/**
* Returns redirect source object
* @param {string} title
* @return {Redirect}
* @returns {Redirect}
*/
getRedirect(title) {
if (Object.prototype.hasOwnProperty.call(this.redirects, title)) {
Expand Down

0 comments on commit 034db74

Please sign in to comment.