Skip to content

Commit a026ae5

Browse files
committed
Upgrade dependencies
Fixes #371
1 parent 5f409ff commit a026ae5

File tree

6 files changed

+14
-13
lines changed

6 files changed

+14
-13
lines changed

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,14 @@
3535
"clean-regexp": "^1.0.0",
3636
"eslint-ast-utils": "^1.1.0",
3737
"eslint-template-visitor": "^1.0.0",
38-
"import-modules": "^1.1.0",
38+
"import-modules": "^2.0.0",
3939
"lodash.camelcase": "^4.3.0",
4040
"lodash.defaultsdeep": "^4.6.1",
4141
"lodash.kebabcase": "^4.1.1",
4242
"lodash.snakecase": "^4.1.1",
4343
"lodash.topairs": "^4.3.0",
4444
"lodash.upperfirst": "^4.3.1",
45-
"read-pkg-up": "^6.0.0",
45+
"read-pkg-up": "^7.0.0",
4646
"regexpp": "^3.0.0",
4747
"reserved-words": "^0.1.2",
4848
"safe-regex": "^2.0.2",
@@ -54,7 +54,7 @@
5454
"chalk": "^2.4.2",
5555
"coveralls": "^3.0.6",
5656
"del": "^5.1.0",
57-
"eslint": "^6.3.0",
57+
"eslint": "^6.5.1",
5858
"eslint-ava-rule-tester": "^3.0.0",
5959
"eslint-plugin-eslint-plugin": "2.1.0",
6060
"execa": "^2.0.4",
@@ -63,7 +63,7 @@
6363
"outdent": "^0.7.0",
6464
"pify": "^4.0.1",
6565
"tempy": "^0.3.0",
66-
"xo": "^0.24.0"
66+
"xo": "^0.25.3"
6767
},
6868
"peerDependencies": {
6969
"eslint": ">=6.3.0"

rules/expiring-todo-comments.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable unicorn/expiring-todo-comments */
12
'use strict';
23
const readPkgUp = require('read-pkg-up');
34
const semver = require('semver');
@@ -19,7 +20,7 @@ const MESSAGE_ID_MISSING_AT_SYMBOL = 'missingAtSymbol';
1920

2021
const packageResult = readPkgUp.sync();
2122
const hasPackage = Boolean(packageResult);
22-
const packageJson = hasPackage ? packageResult.package : {};
23+
const packageJson = hasPackage ? packageResult.packageJson : {};
2324

2425
const pkgDependencies = {
2526
...packageJson.dependencies,
@@ -40,7 +41,7 @@ function parseTodoWithArguments(string, {terms}) {
4041
return false;
4142
}
4243

43-
const TODO_ARGUMENT_RE = new RegExp('\\[([^}]+)\\]', 'i');
44+
const TODO_ARGUMENT_RE = /\[([^}]+)\]/i;
4445
const result = TODO_ARGUMENT_RE.exec(string);
4546

4647
if (!result) {

rules/no-console-spaces.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ const getArgumentValue = (context, nodeArgument) => {
3434
const sourceCode = context.getSourceCode();
3535
value = sourceCode.getText(nodeArgument);
3636
// Strip off backticks
37-
value = value.substring(1, value.length - 1);
37+
value = value.slice(1, value.length - 1);
3838
}
3939

4040
return value;

rules/no-keyword-prefix.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ const create = context => {
107107
const ALLOWED_PARENT_TYPES = new Set(['CallExpression', 'NewExpression']);
108108

109109
function report(node, keyword) {
110-
if (reported.indexOf(node) < 0) {
110+
if (!reported.includes(node)) {
111111
reported.push(node);
112112
context.report({
113113
node,
@@ -146,7 +146,7 @@ const create = context => {
146146
}
147147

148148
// Check if it's an import specifier
149-
} else if (['ImportSpecifier', 'ImportNamespaceSpecifier', 'ImportDefaultSpecifier'].indexOf(node.parent.type) >= 0) {
149+
} else if (['ImportSpecifier', 'ImportNamespaceSpecifier', 'ImportDefaultSpecifier'].includes(node.parent.type)) {
150150
// Report only if the local imported identifier is invalid
151151
if (Boolean(keyword) && node.parent.local && node.parent.local.name === node.name) {
152152
report(node, keyword);

test/filename-case.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,20 @@ const ruleTester = avaRuleTester(test, {
1111
function testCase(filename, chosenCase, errorMessage) {
1212
return testCaseWithOptions(
1313
filename,
14-
[{case: chosenCase}],
1514
errorMessage,
15+
[{case: chosenCase}]
1616
);
1717
}
1818

1919
function testManyCases(filename, chosenCases, errorMessage) {
2020
return testCaseWithOptions(
2121
filename,
22-
[{cases: chosenCases}],
2322
errorMessage,
23+
[{cases: chosenCases}]
2424
);
2525
}
2626

27-
function testCaseWithOptions(filename, options = [], errorMessage) {
27+
function testCaseWithOptions(filename, errorMessage, options = []) {
2828
return {
2929
code: 'foo()',
3030
filename,

test/get-docs-url.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import test from 'ava';
2-
import pkg from '../package';
2+
import pkg from '../package.json';
33
import getDocsUrl from '../rules/utils/get-docs-url';
44

55
test('returns the URL of the a named rule\'s documentation', t => {

0 commit comments

Comments
 (0)