Skip to content

Commit

Permalink
chore: update deps (jsdoctypeparser, lodash) and devDeps; lint per la…
Browse files Browse the repository at this point in the history
…test
  • Loading branch information
brettz9 committed Aug 4, 2020
1 parent 3c06f09 commit de49b36
Show file tree
Hide file tree
Showing 16 changed files with 70 additions and 37 deletions.
24 changes: 12 additions & 12 deletions package.json
Expand Up @@ -7,36 +7,36 @@
"dependencies": {
"comment-parser": "^0.7.5",
"debug": "^4.1.1",
"jsdoctypeparser": "^8.0.0",
"lodash": "^4.17.15",
"jsdoctypeparser": "^9.0.0",
"lodash": "^4.17.19",
"regextras": "^0.7.1",
"semver": "^7.3.2",
"spdx-expression-parse": "^3.0.1"
},
"description": "JSDoc linting rules for ESLint.",
"devDependencies": {
"@babel/cli": "^7.10.4",
"@babel/core": "^7.10.4",
"@babel/node": "^7.10.4",
"@babel/cli": "^7.10.5",
"@babel/core": "^7.11.0",
"@babel/node": "^7.10.5",
"@babel/plugin-transform-flow-strip-types": "^7.10.4",
"@babel/preset-env": "^7.10.4",
"@babel/register": "^7.10.4",
"@typescript-eslint/parser": "^3.5.0",
"@babel/preset-env": "^7.11.0",
"@babel/register": "^7.10.5",
"@typescript-eslint/parser": "^3.8.0",
"babel-eslint": "^10.1.0",
"babel-plugin-add-module-exports": "^1.0.2",
"babel-plugin-istanbul": "^6.0.0",
"chai": "^4.2.0",
"cross-env": "^7.0.2",
"eslint": "7.4.0",
"eslint-config-canonical": "^20.1.0",
"eslint": "7.6.0",
"eslint-config-canonical": "^22.0.0",
"gitdown": "^3.1.3",
"glob": "^7.1.6",
"husky": "^4.2.5",
"mocha": "^8.0.1",
"mocha": "^8.1.0",
"nyc": "^15.1.0",
"rimraf": "^3.0.2",
"semantic-release": "^17.1.1",
"typescript": "^3.9.6"
"typescript": "^3.9.7"
},
"engines": {
"node": ">=10"
Expand Down
3 changes: 1 addition & 2 deletions src/bin/generateReadme.js
Expand Up @@ -55,7 +55,7 @@ const getAssertions = () => {
});

const assertionCodes = assertionFiles.map((filePath) => {
// eslint-disable-next-line global-require, import/no-dynamic-require
// eslint-disable-next-line import/no-dynamic-require
const codes = require(filePath);

return {
Expand Down Expand Up @@ -132,7 +132,6 @@ const main = async () => {
} catch (error) {
/* eslint-disable-next-line no-console */
console.error(error);
/* eslint-disable-next-line no-process-exit */
process.exit(1);
}
};
Expand Down
4 changes: 3 additions & 1 deletion src/eslint/getJSDocComment.js
Expand Up @@ -260,5 +260,7 @@ const getJSDocComment = function (sourceCode, node, settings) {
return findJSDocComment(reducedNode);
};

export {getReducedASTNode, getJSDocComment, getDecorator};
export {
getReducedASTNode, getJSDocComment, getDecorator,
};
export default getJSDocComment;
10 changes: 7 additions & 3 deletions src/iterateJsdoc.js
@@ -1,8 +1,12 @@
// eslint-disable-next-line import/no-named-default
import {default as commentParser, stringify as commentStringify} from 'comment-parser';
import {
// eslint-disable-next-line import/no-named-default
default as commentParser, stringify as commentStringify,
} from 'comment-parser';
import _ from 'lodash';
import jsdocUtils from './jsdocUtils';
import {getJSDocComment, getReducedASTNode} from './eslint/getJSDocComment';
import {
getJSDocComment, getReducedASTNode,
} from './eslint/getJSDocComment';

const globalState = new Map();

Expand Down
4 changes: 3 additions & 1 deletion src/jsdocUtils.js
@@ -1,5 +1,7 @@
import _ from 'lodash';
import {jsdocTags, closureTags, typeScriptTags} from './tagNames';
import {
jsdocTags, closureTags, typeScriptTags,
} from './tagNames';
import WarnSettings from './WarnSettings';
import getDefaultTagStructureForMode from './getDefaultTagStructureForMode';

Expand Down
4 changes: 3 additions & 1 deletion src/rules/checkExamples.js
@@ -1,7 +1,9 @@
// Todo: When peerDeps bump to ESLint 7, see about replacing `CLIEngine`
// with non-deprecated `ESLint` class:
// https://github.com/eslint/eslint/blob/master/docs/user-guide/migrating-to-7.0.0.md#-the-cliengine-class-has-been-deprecated
import {CLIEngine} from 'eslint';
import {
CLIEngine,
} from 'eslint';
import iterateJsdoc from '../iterateJsdoc';

const zeroBasedLineIndexAdjust = -1;
Expand Down
4 changes: 3 additions & 1 deletion src/rules/checkTypes.js
@@ -1,4 +1,6 @@
import {parse, traverse, publish} from 'jsdoctypeparser';
import {
parse, traverse, publish,
} from 'jsdoctypeparser';
import iterateJsdoc from '../iterateJsdoc';

const strictNativeTypes = [
Expand Down
12 changes: 9 additions & 3 deletions src/rules/noUndefinedTypes.js
@@ -1,8 +1,14 @@
import _ from 'lodash';
import {parse as parseType, traverse} from 'jsdoctypeparser';
import iterateJsdoc, {parseComment} from '../iterateJsdoc';
import {
parse as parseType, traverse,
} from 'jsdoctypeparser';
import iterateJsdoc, {
parseComment,
} from '../iterateJsdoc';
import jsdocUtils from '../jsdocUtils';
import {getJSDocComment} from '../eslint/getJSDocComment';
import {
getJSDocComment,
} from '../eslint/getJSDocComment';

const extraTypes = [
'null', 'undefined', 'void', 'string', 'boolean', 'object',
Expand Down
4 changes: 3 additions & 1 deletion src/rules/requireDescriptionCompleteSentence.js
@@ -1,5 +1,7 @@
import _ from 'lodash';
import {RegExtras} from 'regextras/dist/main-umd';
import {
RegExtras,
} from 'regextras/dist/main-umd';
import iterateJsdoc from '../iterateJsdoc';

const otherDescriptiveTags = new Set([
Expand Down
8 changes: 6 additions & 2 deletions src/rules/requireJsdoc.js
@@ -1,8 +1,12 @@
import _ from 'lodash';
import jsdocUtils from '../jsdocUtils';
import exportParser from '../exportParser';
import {getJSDocComment, getReducedASTNode, getDecorator} from '../eslint/getJSDocComment';
import {getSettings} from '../iterateJsdoc';
import {
getJSDocComment, getReducedASTNode, getDecorator,
} from '../eslint/getJSDocComment';
import {
getSettings,
} from '../iterateJsdoc';

const OPTIONS_SCHEMA = {
additionalProperties: false,
Expand Down
4 changes: 3 additions & 1 deletion src/rules/validTypes.js
@@ -1,4 +1,6 @@
import {parse} from 'jsdoctypeparser';
import {
parse,
} from 'jsdoctypeparser';
import iterateJsdoc from '../iterateJsdoc';

const asExpression = /as\s+/u;
Expand Down
4 changes: 3 additions & 1 deletion src/tagNames.js
Expand Up @@ -194,4 +194,6 @@ const closureTags = {
unrestricted: [],
};

export {jsdocTags, closureTags, typeScriptTags};
export {
jsdocTags, closureTags, typeScriptTags,
};
8 changes: 6 additions & 2 deletions test/eslint/getJSDocComment.js
@@ -1,8 +1,12 @@
import {
RuleTester,
} from 'eslint';
import {getJSDocComment} from '../../src/eslint/getJSDocComment';
import {getSettings} from '../../src/iterateJsdoc';
import {
getJSDocComment,
} from '../../src/eslint/getJSDocComment';
import {
getSettings,
} from '../../src/iterateJsdoc';

const rule = {
create (context) {
Expand Down
6 changes: 4 additions & 2 deletions test/iterateJsdoc.js
Expand Up @@ -3,8 +3,10 @@
import {
expect,
} from 'chai';
// eslint-disable-next-line import/no-named-default
import {parseComment, default as iterateJsdoc} from '../src/iterateJsdoc';
import {
// eslint-disable-next-line import/no-named-default
parseComment, default as iterateJsdoc,
} from '../src/iterateJsdoc';

describe('iterateJsdoc', () => {
describe('constructor', () => {
Expand Down
4 changes: 3 additions & 1 deletion test/rules/assertions/checkTagNames.js
@@ -1,4 +1,6 @@
import {jsdocTags, typeScriptTags, closureTags} from '../../../src/tagNames';
import {
jsdocTags, typeScriptTags, closureTags,
} from '../../../src/tagNames';

const buildTagBlock = (tags) => {
return '/** \n * @' + Object.keys(tags).map((tagName, idx) => {
Expand Down
4 changes: 1 addition & 3 deletions test/rules/index.js
Expand Up @@ -6,7 +6,6 @@ import config from '../../src';

const ruleTester = new RuleTester();

// eslint-disable-next-line no-process-env
(process.env.npm_config_rule ? process.env.npm_config_rule.split(',') : [
'check-access',
'check-alignment',
Expand Down Expand Up @@ -53,7 +52,7 @@ const ruleTester = new RuleTester();
ecmaVersion: 6,
};

// eslint-disable-next-line global-require, import/no-dynamic-require
// eslint-disable-next-line import/no-dynamic-require
const assertions = require(`./assertions/${_.camelCase(ruleName)}`);

if (!_.has(rule, 'meta.schema')) {
Expand Down Expand Up @@ -89,7 +88,6 @@ const ruleTester = new RuleTester();
return assertion;
});

/* eslint-disable no-process-env */
if (process.env.npm_config_invalid) {
const indexes = process.env.npm_config_invalid.split(',');
assertions.invalid = assertions.invalid.filter((assertion, idx) => {
Expand Down

0 comments on commit de49b36

Please sign in to comment.