<commit_before><!--

@license Apache-2.0

Copyright (c) 2018 The Stdlib Authors.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

-->

# Maximum Line Length

> [ESLint rule][eslint-rules] to prevent lines in JSDoc descriptions from having too many characters.

<section class="intro">

</section>

<!-- /.intro -->

<section class="usage">

## Usage

```javascript
var rule = require( '@stdlib/_tools/eslint/rules/jsdoc-maximum-line-length' );
```

#### rule

[ESLint rule][eslint-rules] to prevent lines in JSDoc descriptions from having too many characters. The rule does not check the length of headings, tables, code, definitions, and other nodes that cannot be wrapped.

**Bad**:

<!-- eslint-disable stdlib/jsdoc-maximum-line-length, stdlib/jsdoc-list-item-indent, stdlib/jsdoc-markdown-remark -->

```javascript
/**
* Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa.
*
* @returns {string} a value
*
* @example
* var str = beep();
* // returns 'boop'
*/
function beep() {
    return 'boop';
}
```

**Good**:

<!-- eslint-disable stdlib/jsdoc-list-item-indent, stdlib/jsdoc-markdown-remark -->

```javascript
/**
* Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
*
* @returns {string} a value
*
* @example
* var str = beep();
* // returns 'boop'
*/
function beep() {
    return 'boop';
}
```

The [rule][eslint-rules] may be configured using the same options as supported by [remark][remark-lint-maximum-line-length]. By default, the rule allows a maximum line width of `80` characters.

</section>

<!-- /.usage -->

<section class="examples">

## Examples

<!-- eslint no-undef: "error" -->

```javascript
var Linter = require( 'eslint' ).Linter;
var rule = require( '@stdlib/_tools/eslint/rules/jsdoc-maximum-line-length' );

var linter = new Linter();
var result;
var code;

// Generate our source code:
code = [
    '/**',
    '* Too long when rule is configured with a maximum line width of `10`...',
    '*',
    '*',
    '* @param {string} str - input value',
    '* @returns {string} output value',
    '*',
    '* @example',
    '* var out = beep( "boop" );',
    '* // returns "beepboop"',
    '*/',
    'function beep( str ) {',
    '\treturn "beep" + str;',
    '}'
].join( '\n' );

// Register the ESLint rule:
linter.defineRule( 'jsdoc-maximum-line-length', rule );

// Lint the code:
result = linter.verify( code, {
    'rules': {
        'jsdoc-maximum-line-length': [ 'error', 10 ]
    }
});
console.log( result );
/* =>
    [
        {
            'ruleId': 'jsdoc-maximum-line-length',
            'severity': 2,
            'message': 'Line must be at most 10 characters',
            'line': 2,
            'column': 72,
            'nodeType': null,
            'source': '* Too long when rule is configured with a maximum line width of `10`...',
            'endLine': 11,
            'endColumn': 3
        }
    ]
*/
```

</section>

<!-- /.examples -->

<section class="links">

[eslint-rules]: https://eslint.org/docs/developer-guide/working-with-rules

[remark-lint-maximum-line-length]: https://github.com/remarkjs/remark-lint/tree/master/packages/remark-lint-maximum-line-length

</section>

<!-- /.links -->
<commit_msg>Remove unnecessary disabling of lint rules and fix link<commit_after><!--

@license Apache-2.0

Copyright (c) 2018 The Stdlib Authors.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

-->

# Maximum Line Length

> [ESLint rule][eslint-rules] to prevent lines in JSDoc descriptions from having too many characters.

<section class="intro">

</section>

<!-- /.intro -->

<section class="usage">

## Usage

```javascript
var rule = require( '@stdlib/_tools/eslint/rules/jsdoc-maximum-line-length' );
```

#### rule

[ESLint rule][eslint-rules] to prevent lines in JSDoc descriptions from having too many characters. The rule does not check the length of headings, tables, code, definitions, and other nodes that cannot be wrapped.

**Bad**:

<!-- eslint-disable stdlib/jsdoc-maximum-line-length, stdlib/jsdoc-markdown-remark -->

```javascript
/**
* Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa.
*
* @returns {string} a value
*
* @example
* var str = beep();
* // returns 'boop'
*/
function beep() {
    return 'boop';
}
```

**Good**:

```javascript
/**
* Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
*
* @returns {string} a value
*
* @example
* var str = beep();
* // returns 'boop'
*/
function beep() {
    return 'boop';
}
```

The [rule][eslint-rules] may be configured using the same options as supported by [remark][remark-lint-maximum-line-length]. By default, the rule allows a maximum line width of `80` characters.

</section>

<!-- /.usage -->

<section class="examples">

## Examples

<!-- eslint no-undef: "error" -->

```javascript
var Linter = require( 'eslint' ).Linter;
var rule = require( '@stdlib/_tools/eslint/rules/jsdoc-maximum-line-length' );

var linter = new Linter();
var result;
var code;

// Generate our source code:
code = [
    '/**',
    '* Too long when rule is configured with a maximum line width of `10`...',
    '*',
    '*',
    '* @param {string} str - input value',
    '* @returns {string} output value',
    '*',
    '* @example',
    '* var out = beep( "boop" );',
    '* // returns "beepboop"',
    '*/',
    'function beep( str ) {',
    '\treturn "beep" + str;',
    '}'
].join( '\n' );

// Register the ESLint rule:
linter.defineRule( 'jsdoc-maximum-line-length', rule );

// Lint the code:
result = linter.verify( code, {
    'rules': {
        'jsdoc-maximum-line-length': [ 'error', 10 ]
    }
});
console.log( result );
/* =>
    [
        {
            'ruleId': 'jsdoc-maximum-line-length',
            'severity': 2,
            'message': 'Line must be at most 10 characters',
            'line': 2,
            'column': 72,
            'nodeType': null,
            'source': '* Too long when rule is configured with a maximum line width of `10`...',
            'endLine': 11,
            'endColumn': 3
        }
    ]
*/
```

</section>

<!-- /.examples -->

<section class="links">

[eslint-rules]: https://eslint.org/docs/developer-guide/working-with-rules

[remark-lint-maximum-line-length]: https://github.com/remarkjs/remark-lint/tree/7727269a1088e9e9b2008465e8c1947b38a44b69/packages/remark-lint-maximum-line-length

</section>

<!-- /.links -->

{'fraction_non_alphanumeric': 0.15584239130434782, 'fraction_numerical': 0.01154891304347826, 'mean_word_length': 3.112290502793296, 'pattern_counts': {'":': 0, '<': 34, '<?xml version=': 0, '>': 38, 'https://': 4, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1568925', 'n_tokens_mistral': 2470, 'n_tokens_neox': 2339, 'n_words': 742}