securityos/node_modules/eslint-plugin-unicorn/rules/utils/get-documentation-url.js

11 lines
336 B
JavaScript
Raw Normal View History

2024-09-06 15:32:35 +00:00
'use strict';
const path = require('node:path');
const packageJson = require('../../package.json');
const repoUrl = 'https://github.com/sindresorhus/eslint-plugin-unicorn';
module.exports = filename => {
const ruleName = path.basename(filename, '.js');
return `${repoUrl}/blob/v${packageJson.version}/docs/rules/${ruleName}.md`;
};