Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
tslint-eslint-rules
Advanced tools
"use strict"; var es6_promise_1 = require('es6-promise'); var https = require('https'); var rules_1 = require('./rules'); function camelCaseToDash(str) { return str.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase(); } function arrayDiff(source, target) { return source.filter(function (item) { return target.indexOf(item) === -1; }); } function requestFromGithub(path, callback) { var options = { path: path, host: 'api.github.com', headers: { 'User-Agent': 'tslint-eslint-rules' } }; https.get(options, function (resp) { resp.setEncoding('utf8'); var buffer = []; resp.on('data', function (chunk) { buffer.push(chunk); }); resp.on('end', function () { var data = JSON.parse(buffer.join('')); callback(data); }); }).on('error', function (e) { console.error(e); }); } function compareToESLint() { return new es6_promise_1.Promise(function (fulfill) { requestFromGithub('/repos/eslint/eslint/contents/lib/rules', function (data) { var rules = data .filter(function (obj) { return obj.name.endsWith('.js'); }) .map(function (obj) { return obj.name.substring(0, obj.name.length - 3); }); var esRules = Object.keys(rules_1.ruleESMap); var missing = arrayDiff(rules.map(function (x) { return rules_1.toCamelCase(x); }), esRules); var deprecated = arrayDiff(esRules, rules.map(function (x) { return rules_1.toCamelCase(x); })); var buffer = []; if (missing.length) { buffer.push('Missing ESLint rules (http://eslint.org/docs/rules):'); missing.forEach(function (rule) { var name = camelCaseToDash(rule); buffer.push("- " + name); }); } if (deprecated.length) { buffer.push('Deprecated ESLint rules:'); deprecated.forEach(function (rule) { var name = camelCaseToDash(rule); buffer.push("- " + name); }); } if (missing.length + deprecated.length === 0) { buffer.push('ESLint rules are in sync!'); } console.log(buffer.join('\n'), '\n'); fulfill(); }); }); } exports.compareToESLint = compareToESLint; function compareToTSLint() { return new es6_promise_1.Promise(function (fulfill) { requestFromGithub('/repos/palantir/tslint/contents/src/rules', function (data) { var rules = data .filter(function (obj) { return obj.name.endsWith('.ts'); }) .map(function (obj) { return obj.name.substring(0, obj.name.length - 7); }); var notInUse = require('../../src/readme/unusedTSLintRules.json'); notInUse.forEach(function (name) { var camel = rules_1.toCamelCase(name); var index = rules.indexOf(camel); if (index > -1) { rules.splice(index, 1); } }); var tsRules = Object.keys(rules_1.ruleTSMap); var missing = arrayDiff(rules, tsRules); var buffer = []; if (missing.length) { buffer.push('Missing TSLint rules (http://palantir.github.io/tslint/rules):'); missing.forEach(function (rule) { var name = camelCaseToDash(rule); buffer.push("- " + name); }); } else { buffer.push('TSLint rules are in sync!'); } console.log(buffer.join('\n'), '\n'); fulfill(); }); }); } exports.compareToTSLint = compareToTSLint;
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInJlYWRtZS9mZXRjaC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsNEJBQXdCLGFBQWEsQ0FBQyxDQUFBO0FBQ3RDLElBQVksS0FBSyxXQUFNLE9BQU8sQ0FBQyxDQUFBO0FBQy9CLHNCQUFrRCxTQUFTLENBQUMsQ0FBQTtBQUU1RCx5QkFBeUIsR0FBRztJQUMxQixNQUFNLENBQUMsR0FBRyxDQUFDLE9BQU8sQ0FBQyxpQkFBaUIsRUFBRSxPQUFPLENBQUMsQ0FBQyxXQUFXLEVBQUUsQ0FBQztBQUMvRCxDQUFDO0FBRUQsbUJBQW1CLE1BQU0sRUFBRSxNQUFNO0lBQy9CLE1BQU0sQ0FBQyxNQUFNLENBQUMsTUFBTSxDQUFDLFVBQUEsSUFBSSxJQUFJLE9BQUEsTUFBTSxDQUFDLE9BQU8sQ0FBQyxJQUFJLENBQUMsS0FBSyxDQUFDLENBQUMsRUFBM0IsQ0FBMkIsQ0FBQyxDQUFDO0FBQzVELENBQUM7QUFFRCwyQkFBMkIsSUFBSSxFQUFFLFFBQVE7SUFDdkMsSUFBTSxPQUFPLEdBQUc7UUFDZCxVQUFJO1FBQ0osSUFBSSxFQUFFLGdCQUFnQjtRQUN0Qix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QyxDQUFDLENBQUM7WUFDTCxDQUFDO1lBQUMsSUFBSSxDQUFDLENBQUM7Z0JBQ04sTUFBTSxDQUFDLElBQUksQ0FBQywyQkFBMkIsQ0FBQyxDQUFDO1lBQzNDLENBQUM7WUFDRCxPQUFPLENBQUMsR0FBRyxDQUFDLE1BQU0sQ0FBQyxJQUFJLENBQUMsSUFBSSxDQUFDLEVBQUUsSUFBSSxDQUFDLENBQUM7WUFDckMsT0FBTyxFQUFFLENBQUM7UUFDWixDQUFDLENBQUMsQ0FBQztJQUNMLENBQUMsQ0FBQyxDQUFDO0FBQ0wsQ0FBQztBQUlDLHVCQUFlLG1CQUpoQjtBQUtDIiwiZmlsZSI6InJlYWRtZS9mZXRjaC5qcyIsInNvdXJjZVJvb3QiOiIvVXNlcnMvam1sb3Blei9Xb3Jrc3BhY2UvdHNsaW50LWVzbGludC1ydWxlcy9zcmMifQ==
FAQs
Improve your TSLint with the missing ESLint Rules
The npm package tslint-eslint-rules receives a total of 102,248 weekly downloads. As such, tslint-eslint-rules popularity was classified as popular.
We found that tslint-eslint-rules demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.