eslint-plugin-unicorn-x
Version:
More than 100 powerful ESLint rules
10 lines (7 loc) • 355 B
JavaScript
import path from 'node:path';
import packageJson from '../../package.json' with {type: 'json'};
const repoUrl = 'https://github.com/es-tooling/eslint-plugin-unicorn-x';
export default function getDocumentationUrl(filename) {
const ruleName = path.basename(filename, '.js');
return `${repoUrl}/blob/${packageJson.version}/docs/rules/${ruleName}.md`;
}