Skip to content

Commit 4836131

Browse files
authored
Merge pull request #271 from drubin/add-editorconfig
Add .editorconfig
2 parents 6e56ebe + 963b879 commit 4836131

File tree

4 files changed

+63
-48
lines changed

4 files changed

+63
-48
lines changed

.editorconfig

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
root = true
2+
3+
[*]
4+
indent_style = space
5+
indent_size = 2
6+
charset = utf-8
7+
trim_trailing_whitespace = true
8+
insert_final_newline = true
9+
10+
[*.{ts,js}]
11+
indent_style = space
12+
indent_size = 4
13+
charset = utf-8
14+
trim_trailing_whitespace = true
15+
insert_final_newline = true

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ cd javascript
124124

125125
## Formatting
126126

127-
Run `npm run format` or install an editor plugin like https://github.com/prettier/prettier-vscode.
127+
Run `npm run format` or install an editor plugin like https://github.com/prettier/prettier-vscode and https://marketplace.visualstudio.com/items?itemName=EditorConfig.EditorConfig
128128

129129
## Linting
130130

tsconfig.json

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,32 @@
11
{
2-
"compilerOptions": {
3-
"module": "commonjs",
4-
"noImplicitAny": false,
5-
"suppressImplicitAnyIndexErrors": true,
6-
"target": "es6",
7-
"moduleResolution": "node",
8-
"removeComments": false,
9-
"sourceMap": true,
10-
"noLib": false,
11-
"declaration": true,
12-
"outDir": "dist",
13-
"rootDir": "src",
14-
"esModuleInterop": true,
15-
"allowSyntheticDefaultImports": true,
16-
"strict": true,
17-
"forceConsistentCasingInFileNames": true,
18-
"importHelpers": true
19-
// enable this when it works with tslint, or we switch to prettier
20-
// "declarationMap": true
21-
},
22-
"exclude": [
23-
"node_modules",
24-
"src/*_test.ts",
25-
"dist"
26-
],
27-
"include": [
28-
"*.ts",
29-
"src/**/*"
30-
]
2+
"compilerOptions": {
3+
"module": "commonjs",
4+
"noImplicitAny": false,
5+
"suppressImplicitAnyIndexErrors": true,
6+
"target": "es6",
7+
"moduleResolution": "node",
8+
"removeComments": false,
9+
"sourceMap": true,
10+
"noLib": false,
11+
"declaration": true,
12+
"outDir": "dist",
13+
"rootDir": "src",
14+
"esModuleInterop": true,
15+
"allowSyntheticDefaultImports": true,
16+
"strict": true,
17+
"forceConsistentCasingInFileNames": true,
18+
"importHelpers": true
19+
// enable this when it works with tslint, or we switch to prettier
20+
// "declarationMap": true
21+
},
22+
"exclude": [
23+
"node_modules",
24+
"src/*_test.ts",
25+
"dist"
26+
],
27+
"include": [
28+
"*.ts",
29+
"src/**/*"
30+
]
3131
}
3232

tslint.json

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
{
2-
"extends": "tslint:recommended",
3-
"defaultSeverity": "error",
4-
"linterOptions": {
5-
"exclude": [
6-
"src/api.ts",
7-
"dist",
8-
"node_modules"
9-
]
10-
},
11-
"jsRules": {},
12-
"rules": {
13-
"quotemark": [true, "single", "avoid-escape", "avoid-template"],
14-
"interface-name": [true, "never-prefix"],
15-
"object-literal-sort-keys": false,
16-
"object-literal-key-quotes": [true, "as-needed"],
17-
"max-classes-per-file": false
18-
},
19-
"rulesDirectory": []
2+
"extends": "tslint:recommended",
3+
"defaultSeverity": "error",
4+
"linterOptions": {
5+
"exclude": [
6+
"src/api.ts",
7+
"dist",
8+
"node_modules"
9+
]
10+
},
11+
"jsRules": {},
12+
"rules": {
13+
"quotemark": [true, "single", "avoid-escape", "avoid-template"],
14+
"interface-name": [true, "never-prefix"],
15+
"object-literal-sort-keys": false,
16+
"object-literal-key-quotes": [true, "as-needed"],
17+
"max-classes-per-file": false
18+
},
19+
"rulesDirectory": []
2020
}

0 commit comments

Comments
 (0)