Skip to content

Commit

Permalink
Prettier (#103)
Browse files Browse the repository at this point in the history
* add prettier config and vscode format on save

* format src/ with prettier

* no-semi prettier config

* format src/ with no-semi config

* ci

* add files.insertFinalNewline
  • Loading branch information
jw3 committed Aug 26, 2021
1 parent ae9d6ac commit d85a7f5
Show file tree
Hide file tree
Showing 17 changed files with 2,551 additions and 2,131 deletions.
9 changes: 5 additions & 4 deletions .eslintrc.json
Expand Up @@ -10,11 +10,12 @@
],
"rules": {
"@typescript-eslint/naming-convention": "warn",
"@typescript-eslint/semi": "warn",
"curly": "warn",
"eqeqeq": "warn",
"no-throw-literal": "warn",
"semi": "off",
"indent": [2, "tab", {"SwitchCase": 1}]
}
"no-unexpected-multiline": "error"
},
"extends": [
"prettier"
]
}
4 changes: 4 additions & 0 deletions .github/workflows/nightly.yml
Expand Up @@ -18,6 +18,10 @@ jobs:

- name: Install dependencies
run: yarn install

- name: Check formatting
run: |
yarn run prettier src -c
- name: Create vsix
run: |
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/release.yml
Expand Up @@ -35,6 +35,10 @@ jobs:
- name: Install dependencies
run: yarn install

- name: Check formatting
run: |
yarn run prettier src -c
- name: Yarn Compile
run: yarn compile

Expand Down
5 changes: 5 additions & 0 deletions .prettierrc
@@ -0,0 +1,5 @@

{
"semi": false,
"singleQuote": true
}
7 changes: 6 additions & 1 deletion .vscode/settings.json
@@ -1,5 +1,6 @@
// Place your settings in this file to overwrite default and user settings.
{
"files.insertFinalNewline": true,
"files.exclude": {
"out": false // set this to true to hide the "out" folder with the compiled JS files
},
Expand All @@ -10,5 +11,9 @@
"typescript.tsc.autoDetect": "off",
"files.watcherExclude": {
"**/target": true
},
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true
}
}
}
2 changes: 2 additions & 0 deletions package.json
Expand Up @@ -54,8 +54,10 @@
"@typescript-eslint/eslint-plugin": "^4.21.0",
"@typescript-eslint/parser": "^4.21.0",
"eslint": "^7.23.0",
"eslint-config-prettier": "^8.3.0",
"glob": "^7.1.6",
"mocha": "^8.3.2",
"prettier": "^2.3.2",
"ts-loader": "^8.1.0",
"typescript": "^4.2.3",
"vsce": "^1.87.1",
Expand Down

0 comments on commit d85a7f5

Please sign in to comment.