Skip to content

Commit

Permalink
Merge pull request #271 from drubin/add-editorconfig
Browse files Browse the repository at this point in the history
Add .editorconfig
  • Loading branch information
k8s-ci-robot committed Jun 10, 2019
2 parents 6e56ebe + 963b879 commit 4836131
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 48 deletions.
15 changes: 15 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
root = true

[*]
indent_style = space
indent_size = 2
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.{ts,js}]
indent_style = space
indent_size = 4
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ cd javascript

## Formatting

Run `npm run format` or install an editor plugin like https://github.com/prettier/prettier-vscode.
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

## Linting

Expand Down
58 changes: 29 additions & 29 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
{
"compilerOptions": {
"module": "commonjs",
"noImplicitAny": false,
"suppressImplicitAnyIndexErrors": true,
"target": "es6",
"moduleResolution": "node",
"removeComments": false,
"sourceMap": true,
"noLib": false,
"declaration": true,
"outDir": "dist",
"rootDir": "src",
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"importHelpers": true
// enable this when it works with tslint, or we switch to prettier
// "declarationMap": true
},
"exclude": [
"node_modules",
"src/*_test.ts",
"dist"
],
"include": [
"*.ts",
"src/**/*"
]
"compilerOptions": {
"module": "commonjs",
"noImplicitAny": false,
"suppressImplicitAnyIndexErrors": true,
"target": "es6",
"moduleResolution": "node",
"removeComments": false,
"sourceMap": true,
"noLib": false,
"declaration": true,
"outDir": "dist",
"rootDir": "src",
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"importHelpers": true
// enable this when it works with tslint, or we switch to prettier
// "declarationMap": true
},
"exclude": [
"node_modules",
"src/*_test.ts",
"dist"
],
"include": [
"*.ts",
"src/**/*"
]
}

36 changes: 18 additions & 18 deletions tslint.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
{
"extends": "tslint:recommended",
"defaultSeverity": "error",
"linterOptions": {
"exclude": [
"src/api.ts",
"dist",
"node_modules"
]
},
"jsRules": {},
"rules": {
"quotemark": [true, "single", "avoid-escape", "avoid-template"],
"interface-name": [true, "never-prefix"],
"object-literal-sort-keys": false,
"object-literal-key-quotes": [true, "as-needed"],
"max-classes-per-file": false
},
"rulesDirectory": []
"extends": "tslint:recommended",
"defaultSeverity": "error",
"linterOptions": {
"exclude": [
"src/api.ts",
"dist",
"node_modules"
]
},
"jsRules": {},
"rules": {
"quotemark": [true, "single", "avoid-escape", "avoid-template"],
"interface-name": [true, "never-prefix"],
"object-literal-sort-keys": false,
"object-literal-key-quotes": [true, "as-needed"],
"max-classes-per-file": false
},
"rulesDirectory": []
}

0 comments on commit 4836131

Please sign in to comment.