Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion etc/eslint/.eslintrc.benchmarks.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@

// MODULES //

// FIXME: remove the next line and uncomment the subsequent line once all remark JSDoc ESLint rules are completed

Check warning on line 25 in etc/eslint/.eslintrc.benchmarks.js

View workflow job for this annotation

GitHub Actions / Lint Changed Files

Unexpected 'fixme' comment: 'FIXME: remove the next line and...'
var copy = require( './../../lib/node_modules/@stdlib/utils/copy' );

// var copy = require( './utils/copy.js' );

Check warning on line 28 in etc/eslint/.eslintrc.benchmarks.js

View workflow job for this annotation

GitHub Actions / Lint Changed Files

Comments should begin with an uppercase character
var defaults = require( './.eslintrc.js' );


Expand Down Expand Up @@ -105,7 +105,7 @@
*
* @private
*/
eslint.rules[ 'require-jsdoc' ] = 'off';
eslint.rules[ 'jsdoc/require-jsdoc' ] = 'off';

/**
* Do not require `@private` annotations.
Expand Down
2 changes: 1 addition & 1 deletion etc/eslint/.eslintrc.examples.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@

// MODULES //

// FIXME: remove the next line and uncomment the subsequent line once all remark JSDoc ESLint rules are completed

Check warning on line 25 in etc/eslint/.eslintrc.examples.js

View workflow job for this annotation

GitHub Actions / Lint Changed Files

Unexpected 'fixme' comment: 'FIXME: remove the next line and...'
var copy = require( './../../lib/node_modules/@stdlib/utils/copy' );

// var copy = require( './utils/copy.js' );

Check warning on line 28 in etc/eslint/.eslintrc.examples.js

View workflow job for this annotation

GitHub Actions / Lint Changed Files

Comments should begin with an uppercase character
var defaults = require( './.eslintrc.js' );


Expand Down Expand Up @@ -64,7 +64,7 @@
*
* @private
*/
eslint.rules[ 'require-jsdoc' ] = 'off';
eslint.rules[ 'jsdoc/require-jsdoc' ] = 'off';

/**
* Do not require `@private` annotations.
Expand Down
24 changes: 23 additions & 1 deletion etc/eslint/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ eslint.rules = require( './rules' );
* @memberof eslint
* @type {Array}
*/
eslint.overrides = require( './overrides/repl_namespace.js' );
eslint.overrides = require( './overrides/source.js' );

/**
* Parser options.
Expand All @@ -82,6 +82,28 @@ eslint.parserOptions = require( './parser-options' );
*/
eslint.plugins = require( './plugins' );

/**
* Shared settings.
*
* @name settings
* @memberof eslint
* @type {Object}
*/
eslint.settings = {
'jsdoc': {
'contexts': [
'ArrowFunctionExpression',
'ClassDeclaration',
'ClassExpression',
'FunctionDeclaration',
'FunctionExpression'
],
'tagNamePreference': {
'class': 'constructor'
}
}
};


// EXPORTS //

Expand Down
2 changes: 1 addition & 1 deletion etc/eslint/.eslintrc.markdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

// MODULES //

// FIXME: update the next line once all remark JSDoc ESLint rules are completed

Check warning on line 23 in etc/eslint/.eslintrc.markdown.js

View workflow job for this annotation

GitHub Actions / Lint Changed Files

Unexpected 'fixme' comment: 'FIXME: update the next line once all...'
var copy = require( './../../lib/node_modules/@stdlib/utils/copy' ); // var copy = require( './utils/copy.js' );
var defaults = require( './.eslintrc.js' );

Expand Down Expand Up @@ -107,7 +107,7 @@
*
* @private
*/
eslint.rules[ 'require-jsdoc' ] = 'off';
eslint.rules[ 'jsdoc/require-jsdoc' ] = 'off';

/**
* Do not require `@private` annotations.
Expand All @@ -121,7 +121,7 @@
*
* @private
*/
eslint.rules[ 'stdlib/jsdoc-return-annotations-values' ] = 'off'; // FIXME: remove this once we can reliably lint Markdown code blocks

Check warning on line 124 in etc/eslint/.eslintrc.markdown.js

View workflow job for this annotation

GitHub Actions / Lint Changed Files

Unexpected 'fixme' comment: 'FIXME: remove this once we can reliably...'

/**
* Do not enforce disallowing empty lines between module-level require statements.
Expand Down
2 changes: 1 addition & 1 deletion etc/eslint/.eslintrc.tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@

// MODULES //

// FIXME: remove the next line and uncomment the subsequent line once all remark JSDoc ESLint rules are completed

Check warning on line 25 in etc/eslint/.eslintrc.tests.js

View workflow job for this annotation

GitHub Actions / Lint Changed Files

Unexpected 'fixme' comment: 'FIXME: remove the next line and...'
var copy = require( './../../lib/node_modules/@stdlib/utils/copy' );

// var copy = require( './utils/copy.js' );

Check warning on line 28 in etc/eslint/.eslintrc.tests.js

View workflow job for this annotation

GitHub Actions / Lint Changed Files

Comments should begin with an uppercase character
var defaults = require( './.eslintrc.js' );


Expand Down Expand Up @@ -112,7 +112,7 @@
*
* @private
*/
eslint.rules[ 'require-jsdoc' ] = 'off';
eslint.rules[ 'jsdoc/require-jsdoc' ] = 'off';

/**
* Do not require `@private` annotations.
Expand Down
14 changes: 10 additions & 4 deletions etc/eslint/overrides/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,12 @@ var restrictedSyntaxConfig = [ 'error',
* @namespace overrides
*/
var overrides = [
{
'files': [ 'etc/eslint/rules/*.js' ],
'rules': {
'stdlib/jsdoc-doctest': 'off'
}
},
{
'files': [ '[a-z].js' ],
'rules': {
Expand All @@ -89,7 +95,7 @@ var overrides = [
'skipComments': true
}],
'no-restricted-syntax': restrictedSyntaxConfig,
'require-jsdoc': 'off',
'jsdoc/require-jsdoc': 'off',
'stdlib/jsdoc-private-annotation': 'off',
'stdlib/jsdoc-doctest': 'off',
'stdlib/no-unnecessary-nested-functions': 'off'
Expand All @@ -101,7 +107,7 @@ var overrides = [
'no-new-wrappers': 'warn',
'vars-on-top': 'off',
'no-console': 'off',
'require-jsdoc': 'off',
'jsdoc/require-jsdoc': 'off',
'stdlib/jsdoc-private-annotation': 'off',
'stdlib/jsdoc-doctest': 'off',
'stdlib/no-unnecessary-nested-functions': 'off',
Expand All @@ -119,7 +125,7 @@ var overrides = [
'skipComments': true
}],
'no-restricted-syntax': restrictedSyntaxConfig,
'require-jsdoc': 'off',
'jsdoc/require-jsdoc': 'off',
'stdlib/jsdoc-private-annotation': 'off',
'stdlib/jsdoc-doctest': 'off',
'stdlib/no-single-property-require': 'off',
Expand Down Expand Up @@ -156,7 +162,7 @@ var overrides = [
'no-tabs': 'error',
'no-undef': 'off',
'no-unused-vars': 'off',
'require-jsdoc': 'off',
'jsdoc/require-jsdoc': 'off',
'stdlib/jsdoc-private-annotation': 'off',
'stdlib/jsdoc-return-annotations-values': 'off',
'stdlib/no-single-property-require': 'off',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,17 @@
// MAIN //

/**
* ESLint overrides for REPL namespace files.
* ESLint overrides for JavaScript source files.
*
* @namespace overrides
*/
var overrides = [
{
'files': [ 'etc/eslint/rules/*.js' ],
'rules': {
'stdlib/jsdoc-doctest': 'off'
}
},
{
'files': [ '[a-z].js' ],
'rules': {
Expand Down
1 change: 1 addition & 0 deletions etc/eslint/plugins/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

// ESLint plugins:
var plugins = [
'jsdoc',
'n',
'stdlib',
'@cspell'
Expand Down
10 changes: 1 addition & 9 deletions etc/eslint/rules/best_practices.js
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@
* @default 'off'
* @see [dot-notation]{@link https://eslint.org/docs/rules/dot-notation}
*/
rules[ 'dot-notation' ] = 'off'; // TODO: revisit?

Check warning on line 316 in etc/eslint/rules/best_practices.js

View workflow job for this annotation

GitHub Actions / Lint Changed Files

Unexpected 'todo' comment: 'TODO: revisit?'

/**
* Always require `===` over `==`.
Expand Down Expand Up @@ -902,7 +902,7 @@
* var str = 'Hello \
* world!';
*
* @example;
* @example
* // Good...
* var str = 'Hello\nworld!';
*/
Expand Down Expand Up @@ -1102,8 +1102,6 @@
*/
rules[ 'no-return-assign' ] = [ 'error', 'always' ];

/* eslint-disable stdlib/jsdoc-doctest-marker, stdlib/jsdoc-doctest-quote-props */

/**
* Never allow `return await`.
*
Expand All @@ -1121,8 +1119,6 @@
*/
rules[ 'no-return-await' ] = 'error';

/* eslint-enable stdlib/jsdoc-doctest-marker stdlib/jsdoc-doctest-quote-props */

/**
* Never allow using `javascript:` in urls.
*
Expand Down Expand Up @@ -1509,8 +1505,6 @@
*/
rules[ 'radix' ] = [ 'error', 'always' ];

/* eslint-disable stdlib/jsdoc-doctest-marker, stdlib/jsdoc-doctest-quote-props */

/**
* Always require `async` functions to have an `await` expression.
*
Expand All @@ -1534,8 +1528,6 @@
*/
rules[ 'require-await' ] = 'error';

/* eslint-enable stdlib/jsdoc-doctest-marker, stdlib/jsdoc-doctest-quote-props */

/**
* Don't require the `u` flag on a regular expression.
*
Expand Down
114 changes: 98 additions & 16 deletions etc/eslint/rules/programmer_errors.js
Original file line number Diff line number Diff line change
Expand Up @@ -832,34 +832,116 @@ rules[ 'require-atomic-updates' ] = 'error';
* @example
* // Good...
* var isnan = require( '@stdlib/math/base/assert/is-nan' );
*
* if ( isnan( x ) ) {
* // Do something...
* }
*/
rules[ 'use-isnan' ] = 'error';

/**
* Require valid JSDoc.
* Ensure JSDoc parameter names match function parameters.
*
* @name jsdoc/check-param-names
* @memberof rules
* @type {Array}
* @see [check-param-names]{@link https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/check-param-names.md}
*/
rules[ 'jsdoc/check-param-names' ] = [ 'error', {
'allowExtraTrailingParamDocs': true,
'checkDestructured': false
}];

/**
* Require a JSDoc description.
*
* @name jsdoc/require-description
* @memberof rules
* @type {string}
* @see [require-description]{@link https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-description.md}
*/
rules[ 'jsdoc/require-description' ] = 'error';

/**
* Require JSDoc for function parameters.
*
* @name valid-jsdoc
* @name jsdoc/require-param
* @memberof rules
* @type {Array}
* @see [valid-jsdoc]{@link https://eslint.org/docs/rules/valid-jsdoc}
*/
rules[ 'valid-jsdoc' ] = [ 'error', {
'prefer': {
'arg': 'param',
'argument': 'param',
'class': 'constructor',
'return': 'returns'
},
'requireReturn': false,
'requireReturnType': true,
'matchDescription': '.+',
'requireParamDescription': true,
'requireReturnDescription': true
* @see [require-param]{@link https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-param.md}
*/
rules[ 'jsdoc/require-param' ] = [ 'error', {
'checkDestructured': false,
'checkDestructuredRoots': false
}];

/**
* Require `@param` description.
*
* @name jsdoc/require-param-description
* @memberof rules
* @type {string}
* @see [require-param-description]{@link https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-param-description.md}
*/
rules[ 'jsdoc/require-param-description' ] = 'error';

/**
* Require `@param` type.
*
* @name jsdoc/require-param-type
* @memberof rules
* @type {string}
* @see [require-param-type]{@link https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-param-type.md}
*/
rules[ 'jsdoc/require-param-type' ] = 'error';

/**
* Require `@returns` when a function returns a value.
*
* @name jsdoc/require-returns
* @memberof rules
* @type {Array}
* @see [require-returns]{@link https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-returns.md}
*/
rules[ 'jsdoc/require-returns' ] = [ 'error', {
'checkGetters': false,
'contexts': [
'ArrowFunctionExpression:not([async=true])',
'FunctionDeclaration:not([async=true])',
'FunctionExpression:not([async=true])'
]
}];

/**
* Require `@returns` type.
*
* @name jsdoc/require-returns-type
* @memberof rules
* @type {string}
* @see [require-returns-type]{@link https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-returns-type.md}
*/
rules[ 'jsdoc/require-returns-type' ] = 'error';

/**
* Require `@returns` description.
*
* @name jsdoc/require-returns-description
* @memberof rules
* @type {string}
* @see [require-returns-description]{@link https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-returns-description.md}
*/
rules[ 'jsdoc/require-returns-description' ] = 'error';

/**
* Enforce valid JSDoc tag names.
*
* @name jsdoc/check-tag-names
* @memberof rules
* @type {string}
* @see [check-tag-names]{@link https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/check-tag-names.md}
*/
rules[ 'jsdoc/check-tag-names' ] = 'error';

/**
* Only allow the result of `typeof` to be compared against a select subset of known strings (e.g., 'string', 'undefined', etc.).
*
Expand Down
9 changes: 5 additions & 4 deletions etc/eslint/rules/style.js
Original file line number Diff line number Diff line change
Expand Up @@ -876,7 +876,7 @@
* @default [ 'off', 'starred-block' ]
* @see [multiline-comment-style]{@link https://eslint.org/docs/rules/multiline-comment-style}
*/
rules[ 'multiline-comment-style' ] = [ 'off', 'starred-block' ]; // TODO: enable once non-"aligned" blocks are supported

Check warning on line 879 in etc/eslint/rules/style.js

View workflow job for this annotation

GitHub Actions / Lint Changed Files

Unexpected 'todo' comment: 'TODO: enable once non-"aligned" blocks...'

/**
* Allow same line or multiline ternary expressions.
Expand Down Expand Up @@ -1848,18 +1848,19 @@
/**
* Require JSDoc comments.
*
* @name require-jsdoc
* @name jsdoc/require-jsdoc
* @memberof rules
* @type {Array}
* @see [require-jsdoc]{@link https://eslint.org/docs/rules/require-jsdoc}
* @see [require-jsdoc]{@link https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-jsdoc.md}
*/
rules[ 'require-jsdoc' ] = [ 'error', {
rules[ 'jsdoc/require-jsdoc' ] = [ 'error', {
'require': {
'FunctionDeclaration': true,
'ClassDeclaration': true,
'MethodDefinition': true,
'ArrowFunctionExpression': true
}
},
'contexts': []
}];

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ var polyvalQ = require( './polyval_q.js' );
* \operatorname{log}(1+f) &= f - s (f - R) & \textrm{(if f is not too large)} \\
* \operatorname{log}(1+f) &= f - (h_{fsq} - s (h_{fsq}+R)) & \textrm{(better accuracy)}
* \end{align*}
* ```
*
* 3. Finally,
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ var TWO = f32( 2.0 );
* \operatorname{log}(1+f) &= f - s (f - R) & \textrm{(if f is not too large)} \\
* \operatorname{log}(1+f) &= f - (h_{fsq} - s (h_{fsq}+R)) & \textrm{(better accuracy)}
* \end{align*}
* ```
*
* 3. Finally,
*
Expand Down
2 changes: 1 addition & 1 deletion lib/node_modules/@stdlib/repl/lib/validate.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ var validateSettings = require( './validate_settings.js' );
* @param {Options} options - function options
* @param {string} [options.inputPrompt] - input prompt
* @param {string} [options.outputPrompt] - output prompt
* @param {ReadableStream} [options.input=] - input stream
* @param {ReadableStream} [options.input] - input stream
* @param {WritableStream} [options.output] - output stream
* @param {boolean} [options.sandbox] - boolean indicating whether to run a REPL in a sandboxed context
* @param {PositiveInteger} [options.timeout] - number of milliseconds to execute a command before terminating execution
Expand Down
2 changes: 1 addition & 1 deletion lib/node_modules/@stdlib/stats/kde2d/lib/validate.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ var getKernel = require( './get_kernel.js' );
* @param {NumericArray} [options.h] - array of length two indicating the x and y bandwidth values
* @param {number} [options.xMin] - lower limit of x
* @param {number} [options.xMax] - upper limit of x
* @param {number} [options.xMin] - lower limit of y
* @param {number} [options.yMin] - lower limit of y
* @param {number} [options.yMax] - upper limit of y
* @param {(string|Function)} [options.kernel] - a string or function to specifying the used kernel function
* @returns {(Error|null)} null or an error object
Expand Down