From c55db4aad1c376446f60a879d69cefa87273fad2 Mon Sep 17 00:00:00 2001 From: Milutin Kristofic Date: Tue, 3 Mar 2020 14:27:16 +0100 Subject: [PATCH] Add lint rule for license in js files Change-Id: Icced042c376e4bb7f8c98f2c01875a5427411ad2 --- package.json | 2 +- polygerrit-ui/app/.eslintrc.json | 18 +++++++++++++++++- yarn.lock | 8 ++++---- 3 files changed, 22 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 2b8b3d3fbc..ef67309bc4 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "eslint": "^6.6.0", "eslint-config-google": "^0.13.0", "eslint-plugin-html": "^6.0.0", - "eslint-plugin-jsdoc": "^18.4.3", + "eslint-plugin-jsdoc": "^19.2.0", "fried-twinkie": "^0.2.2", "polymer-cli": "^1.9.11", "typescript": "^3.7.4", diff --git a/polygerrit-ui/app/.eslintrc.json b/polygerrit-ui/app/.eslintrc.json index 82ef94a7de..35f23447e1 100644 --- a/polygerrit-ui/app/.eslintrc.json +++ b/polygerrit-ui/app/.eslintrc.json @@ -123,8 +123,24 @@ "jsdoc/require-returns-check": 0, "jsdoc/require-returns-description": 0, "jsdoc/require-returns-type": 2, - "jsdoc/valid-types": 2 + "jsdoc/valid-types": 2, + "jsdoc/require-file-overview": ["error", { + "tags": { + "license": { + "mustExist": true, + "preventDuplicates": true + } + } + }] }, + "overrides": [ + { + "files": ["*.html", "test.js", "test-infra.js", "template_test.js"], + "rules": { + "jsdoc/require-file-overview": "off" + } + } + ], "plugins": [ "html", "jsdoc" diff --git a/yarn.lock b/yarn.lock index aadb990657..556b6c88e8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3281,10 +3281,10 @@ eslint-plugin-html@^6.0.0: dependencies: htmlparser2 "^3.10.1" -eslint-plugin-jsdoc@^18.4.3: - version "18.11.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-18.11.0.tgz#724e6aa35f01c7f80629b2e313b007422cc159af" - integrity sha512-24J2+eK2ZHZ1KvpKcoOEir2k4xJKfPzZ1JC9PToi8y8Tn59T8TVVSNRTTRzsDdiaQeIbehApB3KxqIfJG8o7hg== +eslint-plugin-jsdoc@^19.2.0: + version "19.2.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-19.2.0.tgz#f522b970878ae402b28ce62187305b33dfe2c834" + integrity sha512-QdNifBFLXCDGdy+26RXxcrqzEZarFWNybCZQVqJQYEYPlxd6lm+LPkrs6mCOhaGc2wqC6zqpedBQFX8nQJuKSw== dependencies: comment-parser "^0.7.2" debug "^4.1.1"