diff --git a/packages/eslint-config/js.js b/packages/eslint-config/js.js index 46f5926..cf0a00d 100644 --- a/packages/eslint-config/js.js +++ b/packages/eslint-config/js.js @@ -24,7 +24,7 @@ module.exports = { 'plugin:sonarjs/recommended', 'plugin:security/recommended-legacy' ], - plugins: ['promise', 'unicorn'], + plugins: ['promise', 'unicorn', 'todo-with-label'], rules: { 'no-multiple-empty-lines': ['error', {max: 1}], 'no-empty': ['error', {allowEmptyCatch: true}], @@ -235,7 +235,14 @@ module.exports = { 'security/detect-possible-timing-attacks': 'error', 'security/detect-pseudoRandomBytes': 'error', 'security/detect-unsafe-regex': 'off', - 'security/detect-bidi-characters': 'error' + 'security/detect-bidi-characters': 'error', + 'todo-with-label/has-valid-pattern': [ + 'error', + { + pattern: + '^(TODO|NOTE|COMMENT|FIXME|BUG|HACK|INFO|XXX)\\((\\w+-\\d+)\\)\\: (.*)$' + } + ] }, overrides: [ { diff --git a/packages/eslint-config/package.json b/packages/eslint-config/package.json index a184b4f..8febd18 100644 --- a/packages/eslint-config/package.json +++ b/packages/eslint-config/package.json @@ -27,6 +27,7 @@ "eslint-plugin-sonar": "^0.13.2", "eslint-plugin-sonarjs": "^0.23.0", "eslint-plugin-ssr-friendly": "^1.3.0", + "eslint-plugin-todo-with-label": "^2.0.0", "eslint-plugin-unicorn": "^50.0.1" } } diff --git a/yarn.lock b/yarn.lock index 02d64fc..4df62ba 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2672,6 +2672,13 @@ eslint-plugin-ssr-friendly@^1.3.0: dependencies: globals "^13.8.0" +eslint-plugin-todo-with-label@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-todo-with-label/-/eslint-plugin-todo-with-label-2.0.0.tgz#3b5e64ece40994e461b989996fe65bc157e7d454" + integrity sha512-ZFt9ZPBa6kmUphuu3IP1it/9pGwAPtkctFkoWNk6YUSBQ1e3AuEDip4nRxPJsRZ5srN5VwIdJrQrrW1N4X7fdw== + dependencies: + debug "^4.3.4" + eslint-plugin-unicorn@^50.0.1: version "50.0.1" resolved "https://registry.yarnpkg.com/eslint-plugin-unicorn/-/eslint-plugin-unicorn-50.0.1.tgz#e539cdb02dfd893c603536264c4ed9505b70e3bf"