Skip to content

Commit 26ca9c3

Browse files
committed
Add eslint header rule
1 parent f22e228 commit 26ca9c3

19 files changed

+49
-3
lines changed

.eslintrc.json

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
},
77
"plugins": [
88
"@typescript-eslint/eslint-plugin",
9-
"jsdoc"
9+
"jsdoc",
10+
"header"
1011
],
1112
"rules": {
1213
"constructor-super": "warn",
@@ -60,6 +61,16 @@
6061
{
6162
"allowTemplateLiterals": true
6263
}
63-
]
64+
],
65+
"header/header": [
66+
2,
67+
"block",
68+
[
69+
"---------------------------------------------------------------------------------------------",
70+
" * Copyright (c) Gitpod. All rights reserved.",
71+
" * Licensed under the MIT License. See License.txt in the project root for license information.",
72+
" *--------------------------------------------------------------------------------------------"
73+
]
74+
]
6475
}
6576
}

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,8 @@
9797
"webpack": "webpack --mode development",
9898
"compile": "tsc -b",
9999
"watch": "tsc -b -w",
100-
"package": "npx vsce package --yarn"
100+
"package": "npx vsce package --yarn",
101+
"lint": "eslint . --ext .ts"
101102
},
102103
"devDependencies": {
103104
"@types/analytics-node": "^3.1.9",
@@ -116,6 +117,7 @@
116117
"@typescript-eslint/parser": "^5.19.0",
117118
"eslint": "^8.13.0",
118119
"eslint-plugin-jsdoc": "^19.1.0",
120+
"eslint-plugin-header": "3.1.1",
119121
"minimist": "^1.2.6",
120122
"ts-loader": "^9.2.7",
121123
"typescript": "^4.6.3",

src/authentication.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/*---------------------------------------------------------------------------------------------
22
* Copyright (c) Gitpod. All rights reserved.
3+
* Licensed under the MIT License. See License.txt in the project root for license information.
34
*--------------------------------------------------------------------------------------------*/
45

56
import * as vscode from 'vscode';

src/common/dispose.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/*---------------------------------------------------------------------------------------------
22
* Copyright (c) Gitpod. All rights reserved.
3+
* Licensed under the MIT License. See License.txt in the project root for license information.
34
*--------------------------------------------------------------------------------------------*/
45

56
import * as vscode from 'vscode';

src/common/files.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/*---------------------------------------------------------------------------------------------
22
* Copyright (c) Gitpod. All rights reserved.
3+
* Licensed under the MIT License. See License.txt in the project root for license information.
34
*--------------------------------------------------------------------------------------------*/
45

56
import * as fs from 'fs';

src/common/keychain.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/*---------------------------------------------------------------------------------------------
22
* Copyright (c) Gitpod. All rights reserved.
3+
* Licensed under the MIT License. See License.txt in the project root for license information.
34
*--------------------------------------------------------------------------------------------*/
45

56
// keytar depends on a native module shipped in vscode, so this is

src/common/logger.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/*---------------------------------------------------------------------------------------------
22
* Copyright (c) Gitpod. All rights reserved.
3+
* Licensed under the MIT License. See License.txt in the project root for license information.
34
*--------------------------------------------------------------------------------------------*/
45

56
import * as vscode from 'vscode';

src/common/telemetry.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/*---------------------------------------------------------------------------------------------
22
* Copyright (c) Gitpod. All rights reserved.
3+
* Licensed under the MIT License. See License.txt in the project root for license information.
34
*--------------------------------------------------------------------------------------------*/
45

56
// This code is based on https://github.com/microsoft/vscode-extension-telemetry

src/common/utils.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/*---------------------------------------------------------------------------------------------
22
* Copyright (c) Gitpod. All rights reserved.
3+
* Licensed under the MIT License. See License.txt in the project root for license information.
34
*--------------------------------------------------------------------------------------------*/
45

56
import { EventEmitter, Event, Disposable } from 'vscode';

src/exportLogs.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
/*---------------------------------------------------------------------------------------------
2+
* Copyright (c) Gitpod. All rights reserved.
3+
* Licensed under the MIT License. See License.txt in the project root for license information.
4+
*--------------------------------------------------------------------------------------------*/
5+
16
import * as path from 'path';
27
import * as yazl from 'yazl';
38
import * as fs from 'fs';

0 commit comments

Comments
 (0)