Skip to content

Commit

Permalink
Merge pull request #358 from lo1tuma/utils
Browse files Browse the repository at this point in the history
Use @eslint-community/eslint-utils instead of unmaintained eslint-utils
  • Loading branch information
lo1tuma authored Aug 20, 2024
2 parents 434a64a + ea7ba53 commit 542d65a
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion lib/rules/no-empty-description.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

const { getStringIfConstant } = require('eslint-utils');
const { getStringIfConstant } = require('@eslint-community/eslint-utils');

const DEFAULT_TEST_NAMES = [ 'describe', 'context', 'suite', 'it', 'test', 'specify' ];
const ERROR_MESSAGE = 'Unexpected empty test description.';
Expand Down
4 changes: 2 additions & 2 deletions lib/rules/valid-suite-description.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

const { getStringIfConstant } = require('eslint-utils');
const { getStringIfConstant } = require('@eslint-community/eslint-utils');

/**
* @fileoverview Match suite descriptions to match a pre-configured regular expression
Expand Down Expand Up @@ -108,7 +108,7 @@ module.exports = {

if (isSuite(node)) {
if (!hasValidOrNoSuiteDescription(node)) {
context.report({ node, message: message || `Invalid "${ callee.name }()" description found.` });
context.report({ node, message: message || `Invalid "${callee.name}()" description found.` });
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions lib/rules/valid-test-description.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

const { getStringIfConstant } = require('eslint-utils');
const { getStringIfConstant } = require('@eslint-community/eslint-utils');

/**
* @fileoverview Match test descriptions to match a pre-configured regular expression
Expand Down Expand Up @@ -107,7 +107,7 @@ module.exports = {

if (isTest(node)) {
if (!hasValidOrNoTestDescription(node)) {
context.report({ node, message: message || `Invalid "${ callee.name }()" description found.` });
context.report({ node, message: message || `Invalid "${callee.name}()" description found.` });
}
}
}
Expand Down
4 changes: 3 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"release": "release-it"
},
"dependencies": {
"eslint-utils": "^3.0.0",
"@eslint-community/eslint-utils": "^4.4.0",
"globals": "^14.0.0",
"rambda": "^7.4.0"
},
Expand Down

0 comments on commit 542d65a

Please sign in to comment.