From 4c0b028c55fc1674b374efe0bc6dd22c02b4ac88 Mon Sep 17 00:00:00 2001 From: Kai Cataldo Date: Fri, 8 May 2020 13:00:25 -0400 Subject: [PATCH] Fix: remove Node.js and CommonJS category from build process (#13242) * Fix: Remove Node.js and CommonJS category from build process * Remove categories that do not contain any rules --- Makefile.js | 3 +++ conf/category-list.json | 1 - 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Makefile.js b/Makefile.js index 3434cdca9cc..f5f3fd589ee 100644 --- a/Makefile.js +++ b/Makefile.js @@ -210,6 +210,9 @@ function generateRuleIndexPage() { } }); + // `.rules` will be `undefined` if all rules in category are deprecated. + categoriesData.categories = categoriesData.categories.filter(category => !!category.rules); + const output = yaml.safeDump(categoriesData, { sortKeys: true }); output.to(outputFile); diff --git a/conf/category-list.json b/conf/category-list.json index 6609734950a..cd3b816b657 100644 --- a/conf/category-list.json +++ b/conf/category-list.json @@ -4,7 +4,6 @@ { "name": "Best Practices", "description": "These rules relate to better ways of doing things to help you avoid problems:" }, { "name": "Strict Mode", "description": "These rules relate to strict mode directives:" }, { "name": "Variables", "description": "These rules relate to variable declarations:" }, - { "name": "Node.js and CommonJS", "description": "These rules relate to code running in Node.js, or in browsers with CommonJS:" }, { "name": "Stylistic Issues", "description": "These rules relate to style guidelines, and are therefore quite subjective:" }, { "name": "ECMAScript 6", "description": "These rules relate to ES6, also known as ES2015:" } ],