Skip to content

Commit

Permalink
enable jsdoc/require-property-description
Browse files Browse the repository at this point in the history
  • Loading branch information
stanislav-atr committed Dec 28, 2022
1 parent c3d3d5d commit 048e32c
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 30 deletions.
4 changes: 1 addition & 3 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,10 @@ module.exports = {
'no-restricted-syntax': 0,
// jsdoc rules
'jsdoc/check-tag-names': ['error', { definedTags: ['scriptlet', 'trustedScriptlet', 'redirect'] }],
'jsdoc/require-param': 0,
'jsdoc/require-jsdoc': 0,
'jsdoc/require-param-description': 0,

'jsdoc/require-property-description': 0,
// jsdoc problematics
'jsdoc/require-param': 0, // requires params for scriptlets
'jsdoc/valid-types': 0,
'jsdoc/no-undefined-types': 0,
// jsdoc questionable
Expand Down
10 changes: 5 additions & 5 deletions scripts/build-compatibility-table.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ const WIKI_COMPATIBILITY_TABLE_PATH = path.resolve(

/**
* @typedef {object} CompatibilityItem
* @property {string} adg
* @property {string} abp
* @property {string} ubo
* @property {string} adg AdGuard name
* @property {string} abp Adblock Plus name
* @property {string} ubo uBlock name
*/

/**
* @typedef {object} CompatibilityData
* @property {CompatibilityItem[]} scriptlets
* @property {CompatibilityItem[]} redirects
* @property {CompatibilityItem[]} scriptlets list of scriptlets compatibility items
* @property {CompatibilityItem[]} redirects list of redirects compatibility items
*/

/**
Expand Down
6 changes: 3 additions & 3 deletions scripts/check-sources-updates.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ const getRedirectsFromTable = (platform) => {

/**
* @typedef {object} Diff
* @property {string[]} removed
* @property {string[]} added
* @property {string[]} added added content
* @property {string[]} removed removed content
*/

/**
Expand All @@ -78,8 +78,8 @@ const getRedirectsFromTable = (platform) => {
*/
const getDiff = (oldList, newList) => {
const diff = {
removed: [],
added: [],
removed: [],
};

diff.removed = oldList.filter((item) => (
Expand Down
6 changes: 3 additions & 3 deletions src/helpers/get-property-in-chain.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import { isEmptyObject } from './object-utils';

/**
* @typedef Chain
* @property {object} base
* @property {string} prop
* @property {string} [chain]
* @property {object} base current chain base
* @property {string} prop current chain prop
* @property {string} [chain] string representation
*/

/**
Expand Down
6 changes: 3 additions & 3 deletions src/helpers/get-wildcard-property-in-chain.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/**
* @typedef Chain
* @property {object} base
* @property {string} prop
* @property {string} [chain]
* @property {object} base current chain base
* @property {string} prop current chain prop
* @property {string} [chain] string representation
*/

/**
Expand Down
10 changes: 4 additions & 6 deletions src/helpers/string-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,8 @@ export const isValidMatchNumber = (match) => {

/**
* @typedef {object} MatchData
* @property {boolean} isInvertedMatch
* @property {RegExp} matchRegexp
* @property {boolean} isInvertedMatch if matching should be inverted
* @property {RegExp} matchRegexp match value parsed into regex
*/

/**
Expand All @@ -246,8 +246,8 @@ export const parseMatchArg = (match) => {

/**
* @typedef {object} DelayData
* @property {boolean} isInvertedDelayMatch
* @property {number|null} delayMatch
* @property {boolean} isInvertedDelayMatch if matching should be inverted
* @property {number|null} delayMatch parsed delay or null if delay is invalid
*/

/**
Expand All @@ -256,8 +256,6 @@ export const parseMatchArg = (match) => {
*
* @param {string} delay
* @returns {DelayData} `{ isInvertedDelayMatch, delayMatch }` where:
* `isInvertedDelayMatch` is boolean,
* `delayMatch` is number OR null for invalid `delay`
*/
export const parseDelayArg = (delay) => {
const INVERT_MARKER = '!';
Expand Down
12 changes: 6 additions & 6 deletions src/redirects/redirects.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ import jsYaml from 'js-yaml';
* }
*
* @typedef {object} Redirect
* @property {string} title
* @property {string} comment
* @property {string} content
* @property {string} contentType
* @property {boolean} [isBlocking]
* @property {string} [sha]
* @property {string} title resource name
* @property {string} comment resource description
* @property {string} content encoded resource content
* @property {string} contentType MIME type
* @property {boolean} [isBlocking] e.g click2load redirect
* @property {string} [sha] hash
*/

class Redirects {
Expand Down
2 changes: 1 addition & 1 deletion src/scriptlets/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import { getScriptletFunction } from '../../tmp/scriptlets-func';
* @property {Array<string>} args Arguments for scriptlet function
* @property {'extension'|'corelibs'|'test'} engine -
* Defines the final form of scriptlet string presentation
* @property {string} [version]
* @property {string} [version] extension version
* @property {boolean} [verbose] flag to enable printing to console debug information
* @property {string} [ruleText] Source rule text is used for debugging purposes
* @property {string} [domainName] domain name where scriptlet is applied; for debugging purposes
Expand Down

0 comments on commit 048e32c

Please sign in to comment.