We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b4868be commit f09203eCopy full SHA for f09203e
src/rules/utils.ts
@@ -1,5 +1,5 @@
1
// TODO: rename to utils.ts when TS migration is complete
2
-import { basename } from 'path';
+import { parse as parsePath } from 'path';
3
import {
4
AST_NODE_TYPES,
5
ESLintUtils,
@@ -11,7 +11,7 @@ import { version } from '../../package.json';
11
const REPO_URL = 'https://github.com/jest-community/eslint-plugin-jest';
12
13
export const createRule = ESLintUtils.RuleCreator(name => {
14
- const ruleName = basename(name, '.ts');
+ const ruleName = parsePath(name).name;
15
return `${REPO_URL}/blob/v${version}/docs/rules/${ruleName}.md`;
16
});
17
0 commit comments