diff --git a/.eslintrc.js b/.eslintrc.js index 0c14d962..223fd7ff 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -8,6 +8,7 @@ module.exports = { }, extends: [ 'not-an-aardvark/node', + 'plugin:eslint-comments/recommended', 'plugin:node/recommended', 'plugin:prettier/recommended', 'plugin:unicorn/recommended', @@ -23,6 +24,9 @@ module.exports = { ], 'require-jsdoc': 'error', + 'eslint-comments/no-unused-disable': 'error', + 'eslint-comments/require-description': 'error', + 'unicorn/consistent-function-scoping': 'off', 'unicorn/no-array-callback-reference': 'off', 'unicorn/no-array-for-each': 'off', @@ -65,6 +69,8 @@ module.exports = { 'no-unused-vars': 'off', strict: 'off', + 'eslint-comments/require-description': 'off', + 'unicorn/filename-case': 'off', }, }, diff --git a/lib/index.js b/lib/index.js index a6892c22..e0a81cee 100644 --- a/lib/index.js +++ b/lib/index.js @@ -43,7 +43,7 @@ const allRules = Object.fromEntries( module.exports.rules = allRules; -// eslint-disable-next-line unicorn/prefer-object-from-entries +// eslint-disable-next-line unicorn/prefer-object-from-entries -- this is fine for now module.exports.configs = Object.keys(configFilters).reduce( (configs, configName) => { return Object.assign(configs, { diff --git a/lib/rules/require-meta-docs-url.js b/lib/rules/require-meta-docs-url.js index 49324675..a1955030 100644 --- a/lib/rules/require-meta-docs-url.js +++ b/lib/rules/require-meta-docs-url.js @@ -114,7 +114,7 @@ module.exports = { messageId: !urlPropNode ? 'missing' - : // eslint-disable-next-line unicorn/no-nested-ternary + : // eslint-disable-next-line unicorn/no-nested-ternary -- this is fine for now !expectedUrl ? 'wrongType' : /* otherwise */ 'mismatch', diff --git a/lib/utils.js b/lib/utils.js index d2bc6505..4302c4ce 100644 --- a/lib/utils.js +++ b/lib/utils.js @@ -41,7 +41,7 @@ const INTERESTING_RULE_KEYS = new Set(['create', 'meta']); * @returns Object */ function collectInterestingProperties(properties, interestingKeys) { - // eslint-disable-next-line unicorn/prefer-object-from-entries + // eslint-disable-next-line unicorn/prefer-object-from-entries -- this is fine for now return properties.reduce((parsedProps, prop) => { const keyValue = module.exports.getKeyName(prop); if (interestingKeys.has(keyValue)) { @@ -128,7 +128,7 @@ function getRuleExportsESM(ast, scopeManager) { ].includes(statement.type) ) .map((statement) => statement.declaration || statement.expression) - // eslint-disable-next-line unicorn/prefer-object-from-entries + // eslint-disable-next-line unicorn/prefer-object-from-entries -- this is fine for now .reduce((currentExports, node) => { if (node.type === 'ObjectExpression') { // Check `export default { create() {}, meta: {} }` @@ -184,7 +184,7 @@ function getRuleExportsCJS(ast, scopeManager) { .map((statement) => statement.expression) .filter((expression) => expression.type === 'AssignmentExpression') .filter((expression) => expression.left.type === 'MemberExpression') - // eslint-disable-next-line unicorn/prefer-object-from-entries + // eslint-disable-next-line unicorn/prefer-object-from-entries -- this is fine for now .reduce((currentExports, node) => { if ( node.left.object.type === 'Identifier' && @@ -600,7 +600,7 @@ module.exports = { if (reportArgs.length === 1) { if (reportArgs[0].type === 'ObjectExpression') { - // eslint-disable-next-line unicorn/prefer-object-from-entries + // eslint-disable-next-line unicorn/prefer-object-from-entries -- this is fine for now return reportArgs[0].properties.reduce((reportInfo, property) => { const propName = module.exports.getKeyName(property); diff --git a/package.json b/package.json index cf38d742..c68fb743 100644 --- a/package.json +++ b/package.json @@ -54,6 +54,7 @@ "eslint": "^8.7.0", "eslint-config-not-an-aardvark": "^2.1.0", "eslint-config-prettier": "^8.3.0", + "eslint-plugin-eslint-comments": "^3.2.0", "eslint-plugin-eslint-plugin": "file:./", "eslint-plugin-markdown": "^2.0.1", "eslint-plugin-node": "^11.1.0",