From 2a0c4cc1c39ca64302352aaf82efacefff243d42 Mon Sep 17 00:00:00 2001 From: Henning Dieterichs Date: Thu, 8 Jul 2021 12:39:13 +0200 Subject: [PATCH] Uses eslint-plugin-header to enforce license headers. Features quick fix to add license header. --- .eslintignore | 1 + .eslintrc.json | 13 ++++++++++++- package.json | 3 ++- yarn.lock | 5 +++++ 4 files changed, 20 insertions(+), 2 deletions(-) diff --git a/.eslintignore b/.eslintignore index 8b93a4199e5..6d76bb78eb7 100644 --- a/.eslintignore +++ b/.eslintignore @@ -16,3 +16,4 @@ **/extensions/markdown-language-features/notebook-out/** **/extensions/typescript-basics/test/colorize-fixtures/** **/extensions/**/dist/** +**/extensions/typescript-language-features/test-workspace/** diff --git a/.eslintrc.json b/.eslintrc.json index 51e623e8f1b..0983efcd74f 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -7,7 +7,8 @@ }, "plugins": [ "@typescript-eslint", - "jsdoc" + "jsdoc", + "header" ], "rules": { "constructor-super": "warn", @@ -979,6 +980,16 @@ "xterm*" ] } + ], + "header/header": [ + 2, + "block", + [ + "---------------------------------------------------------------------------------------------", + " * Copyright (c) Microsoft Corporation. All rights reserved.", + " * Licensed under the MIT License. See License.txt in the project root for license information.", + " *--------------------------------------------------------------------------------------------" + ] ] }, "overrides": [ diff --git a/package.json b/package.json index 7d9ea7cf630..f5f264494e5 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "code-oss-dev", "version": "1.59.0", - "distro": "4f9399b417ee98731317fbd4616d6fc287172355", + "distro": "74b4e453554c83bca64754d34278aff04e1d78f9", "author": { "name": "Microsoft Corporation" }, @@ -59,6 +59,7 @@ "dependencies": { "applicationinsights": "1.0.8", "chokidar": "3.5.1", + "eslint-plugin-header": "3.1.1", "graceful-fs": "4.2.6", "http-proxy-agent": "^2.1.0", "https-proxy-agent": "^2.2.3", diff --git a/yarn.lock b/yarn.lock index 598813eab24..471ad47e9c7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3264,6 +3264,11 @@ escape-string-regexp@^2.0.0: resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz#a30304e99daa32e23b2fd20f51babd07cffca344" integrity sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w== +eslint-plugin-header@3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-header/-/eslint-plugin-header-3.1.1.tgz#6ce512432d57675265fac47292b50d1eff11acd6" + integrity sha512-9vlKxuJ4qf793CmeeSrZUvVClw6amtpghq3CuWcB5cUNnWHQhgcqy5eF8oVKFk1G3Y/CbchGfEaw3wiIJaNmVg== + eslint-plugin-jsdoc@^19.1.0: version "19.1.0" resolved "https://registry.yarnpkg.com/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-19.1.0.tgz#fcc17f0378fdd6ee1c847a79b7211745cb05d014"