Skip to content

Commit 12ac41b

Browse files
committed
Add template to prep for next stage of extension's development
1 parent 5b66158 commit 12ac41b

17 files changed

+2116
-31
lines changed

.editorconfig

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# EditorConfig is awesome: http://EditorConfig.org
2+
3+
# top-most EditorConfig file
4+
root = true
5+
6+
# Tab indentation
7+
[*]
8+
indent_style = space
9+
indent_size = 4
10+
trim_trailing_whitespace = true
11+
insert_final_newline = true
12+
13+
# The indent size used in the `package.json` file cannot be changed
14+
# https://github.com/npm/npm/pull/3180#issuecomment-16336516
15+
[{npm-shrinkwrap.json,package.json}]
16+
indent_style = space
17+
indent_size = 4

.eslintrc

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
{
2+
"env": {
3+
"node": true,
4+
"es6": true,
5+
"mocha": true
6+
},
7+
"parser": "@typescript-eslint/parser",
8+
"plugins": ["@typescript-eslint"],
9+
"extends": [
10+
"eslint:recommended",
11+
"airbnb",
12+
"plugin:@typescript-eslint/recommended",
13+
"plugin:import/errors",
14+
"plugin:import/warnings",
15+
"plugin:import/typescript",
16+
"prettier"
17+
],
18+
"rules": {
19+
// Overriding ESLint rules with Typescript-specific ones
20+
"@typescript-eslint/ban-ts-comment": [
21+
"error",
22+
{
23+
"ts-ignore": "allow-with-description"
24+
}
25+
],
26+
"@typescript-eslint/explicit-module-boundary-types": "error",
27+
"no-bitwise": "off",
28+
"no-dupe-class-members": "off",
29+
"@typescript-eslint/no-dupe-class-members": "error",
30+
"no-empty-function": "off",
31+
"@typescript-eslint/no-empty-function": ["error"],
32+
"@typescript-eslint/no-empty-interface": "off",
33+
"@typescript-eslint/no-explicit-any": "error",
34+
"@typescript-eslint/no-non-null-assertion": "off",
35+
"no-unused-vars": "off",
36+
"@typescript-eslint/no-unused-vars": "error",
37+
"no-use-before-define": "off",
38+
"@typescript-eslint/no-use-before-define": [
39+
"error",
40+
{
41+
"functions": false
42+
}
43+
],
44+
"no-useless-constructor": "off",
45+
"@typescript-eslint/no-useless-constructor": "error",
46+
"@typescript-eslint/no-var-requires": "off",
47+
"semi": [2, "always"],
48+
49+
// Other rules
50+
"class-methods-use-this": ["error", {"exceptMethods": ["dispose"]}],
51+
"func-names": "off",
52+
"import/extensions": "off",
53+
"import/namespace": "off",
54+
"import/no-extraneous-dependencies": "off",
55+
"import/no-unresolved": [
56+
"error",
57+
{
58+
"ignore": ["monaco-editor", "vscode"]
59+
}
60+
],
61+
"import/prefer-default-export": "off",
62+
"linebreak-style": "off",
63+
"no-await-in-loop": "off",
64+
"no-console": "off",
65+
"no-control-regex": "off",
66+
"no-extend-native": "off",
67+
"no-multi-str": "off",
68+
"no-param-reassign": "off",
69+
"no-prototype-builtins": "off",
70+
"no-restricted-syntax": [
71+
"error",
72+
{
73+
"selector": "ForInStatement",
74+
"message": "for..in loops iterate over the entire prototype chain, which is virtually never what you want. Use Object.{keys,values,entries}, and iterate over the resulting array."
75+
},
76+
77+
{
78+
"selector": "LabeledStatement",
79+
"message": "Labels are a form of GOTO; using them makes code confusing and hard to maintain and understand."
80+
},
81+
{
82+
"selector": "WithStatement",
83+
"message": "`with` is disallowed in strict mode because it makes code impossible to predict and optimize."
84+
}
85+
],
86+
"no-template-curly-in-string": "off",
87+
"no-underscore-dangle": "off",
88+
"no-useless-escape": "off",
89+
"no-void": [
90+
"error",
91+
{
92+
"allowAsStatement": true
93+
}
94+
],
95+
"operator-assignment": "off",
96+
"react/jsx-filename-extension": [
97+
1,
98+
{
99+
"extensions": [".tsx"]
100+
}
101+
],
102+
"strict": "off"
103+
}
104+
}

.gitattributes

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# Set default behavior to automatically normalize line endings.
2-
* text=auto
3-
2+
package.json text eol=lf
3+
package-lock.json text eol=lf

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
@types:registry=https://registry.npmjs.org

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
v14.15.1

.prettierrc.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
module.exports = {
2+
singleQuote: true,
3+
printWidth: 120,
4+
tabWidth: 4,
5+
endOfLine: 'auto',
6+
trailingComma: 'all',
7+
overrides: [
8+
{
9+
files: ['*.yml', '*.yaml'],
10+
options: {
11+
tabWidth: 2
12+
}
13+
}
14+
]
15+
};

.vscode/extensions.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
// See https://go.microsoft.com/fwlink/?LinkId=827846
3+
// for the documentation about the extensions.json format
4+
"recommendations": [
5+
// Extension identifier format: ${publisher}.${name}. Example: vscode.csharp
6+
"ms-vscode.vscode-typescript-tslint-plugin",
7+
"EditorConfig.EditorConfig"
8+
]
9+
}

.vscode/launch.json

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,17 @@
66
"version": "0.1.3",
77
"configurations": [
88
{
9-
"name": "Extension",
9+
"name": "Launch Extension",
1010
"type": "extensionHost",
1111
"request": "launch",
1212
"runtimeExecutable": "${execPath}",
1313
"args": [
14-
"--extensionDevelopmentPath=${workspaceFolder}"
15-
]
14+
"--extensionDevelopmentPath=${workspaceRoot}"
15+
],
16+
"stopOnEntry": false,
17+
"sourceMaps": true,
18+
"outFiles": [ "${workspaceRoot}/dist/**/*.js" ],
19+
"preLaunchTask": "Compile"
1620
}
1721
]
1822
}

.vscode/settings.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// Place your settings in this file to overwrite default and user settings.
2+
{
3+
"files.exclude": {
4+
"out": false // set this to true to hide the "out" folder with the compiled JS files
5+
},
6+
"search.exclude": {
7+
"out": true // set this to false to include "out" folder in search results
8+
},
9+
"typescript.tsdk": "./node_modules/typescript/lib",
10+
"vsicons.presets.angular": false // we want to use the TS server from our node_modules folder to control its version
11+
}

.vscode/tasks.json

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
// See https://go.microsoft.com/fwlink/?LinkId=733558
2+
// for the documentation about the tasks.json format
3+
{
4+
"version": "2.0.0",
5+
"presentation": {
6+
"echo": true,
7+
"reveal": "always",
8+
"focus": false,
9+
"panel": "shared"
10+
},
11+
"tasks": [
12+
{
13+
"label": "Compile",
14+
"type": "npm",
15+
"script": "compile",
16+
"isBackground": true,
17+
"problemMatcher": ["$tsc-watch"],
18+
"group": {
19+
"kind": "build",
20+
"isDefault": true
21+
}
22+
}
23+
]
24+
}

.vscodeignore

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
11
.vscode/**
22
.vscode-test/**
3-
.gitignore
3+
.vscode test/**
4+
.editorconfig
5+
.env
6+
.eslintrc
7+
.gitattributes
8+
.gitignore
9+
.gitmodules
10+
.npmrc
11+
.nvmrc
12+
.github/**
13+
*.vsix
14+
tsconfig*.json
15+
16+
src/**
17+
languageServer/**
18+
languageServer.*/**
19+
nodeLanguageServer/**
20+
nodeLanguageServer.*/**
21+
bin/**

0 commit comments

Comments
 (0)