Skip to content

Commit

Permalink
chore: remove unused tools rule-types.json, update-rule-types.js (#18125
Browse files Browse the repository at this point in the history
)

* chore: remove unused tools: rule-types.json, update-rule-types.js

* Reduce scope of Makefile.js changes
  • Loading branch information
JoshuaKGoldberg committed Feb 18, 2024
1 parent bf0c7ef commit 66f52e2
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 367 deletions.
15 changes: 0 additions & 15 deletions Makefile.js
Expand Up @@ -674,7 +674,6 @@ target.checkRuleFiles = function() {

echo("Validating rules");

const ruleTypes = require("./tools/rule-types.json");
let errors = 0;

RULE_FILES.forEach(filename => {
Expand All @@ -686,14 +685,6 @@ target.checkRuleFiles = function() {
const ruleCode = cat(filename);
const knownHeaders = ["Rule Details", "Options", "Environments", "Examples", "Known Limitations", "When Not To Use It", "Compatibility"];

/**
* Check if basename is present in rule-types.json file.
* @returns {boolean} true if present
* @private
*/
function isInRuleTypes() {
return Object.hasOwn(ruleTypes, basename);
}

/**
* Check if id is present in title
Expand Down Expand Up @@ -776,12 +767,6 @@ target.checkRuleFiles = function() {
}
}

// check for recommended configuration
if (!isInRuleTypes()) {
console.error("Missing setting for %s in tools/rule-types.json", basename);
errors++;
}

// check parity between rules index file and rules directory
const ruleIdsInIndex = require("./lib/rules/index");
const ruleDef = ruleIdsInIndex.get(basename);
Expand Down
294 changes: 0 additions & 294 deletions tools/rule-types.json

This file was deleted.

58 changes: 0 additions & 58 deletions tools/update-rule-types.js

This file was deleted.

0 comments on commit 66f52e2

Please sign in to comment.