Skip to content

Commit de0cada

Browse files
committed
chore: prettier.
1 parent 9b2553c commit de0cada

29 files changed

+853
-493
lines changed

.eslintrc.js

Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,15 @@
11
/**@type {import('eslint').Linter.Config} */
22
// eslint-disable-next-line no-undef
33
module.exports = {
4-
root: true,
5-
parser: '@typescript-eslint/parser',
6-
plugins: [
7-
'@typescript-eslint',
8-
],
9-
extends: [
10-
'eslint:recommended',
11-
'plugin:@typescript-eslint/recommended',
12-
],
13-
rules: {
14-
'semi': [2, "always"],
15-
'@typescript-eslint/no-unused-vars': 0,
16-
'@typescript-eslint/no-explicit-any': 0,
17-
'@typescript-eslint/explicit-module-boundary-types': 0,
18-
'@typescript-eslint/no-non-null-assertion': 0,
19-
}
20-
};
4+
root: true,
5+
parser: '@typescript-eslint/parser',
6+
plugins: ['@typescript-eslint'],
7+
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended'],
8+
rules: {
9+
semi: [2, 'always'],
10+
'@typescript-eslint/no-unused-vars': 0,
11+
'@typescript-eslint/no-explicit-any': 0,
12+
'@typescript-eslint/explicit-module-boundary-types': 0,
13+
'@typescript-eslint/no-non-null-assertion': 0,
14+
},
15+
};

.prettierignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
out/
2+
yarn.lock

.prettierrc.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
module.exports = {
2+
tabWidth: 2,
3+
printWidth: 100,
4+
trailingComma: 'all',
5+
useTabs: false,
6+
semi: true,
7+
singleQuote: true,
8+
jsxSingleQuote: true,
9+
jsxBracketSameLine: true,
10+
};

.vscode/extensions.json

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
{
2-
// See https://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations.
3-
// Extension identifier format: ${publisher}.${name}. Example: vscode.csharp
2+
// See https://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations.
3+
// Extension identifier format: ${publisher}.${name}. Example: vscode.csharp
44

5-
// List of extensions which should be recommended for users of this workspace.
6-
"recommendations": [
7-
"dbaeumer.vscode-eslint"
8-
]
9-
}
5+
// List of extensions which should be recommended for users of this workspace.
6+
"recommendations": ["dbaeumer.vscode-eslint"]
7+
}

.vscode/launch.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33
// Hover to view descriptions of existing attributes.
44
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
55
{
6-
"version": "0.2.0",
7-
"configurations": [
8-
{
9-
"name": "Run Extension",
10-
"type": "extensionHost",
11-
"request": "launch",
12-
"runtimeExecutable": "${execPath}",
13-
"args": ["--extensionDevelopmentPath=${workspaceRoot}"],
14-
"outFiles": ["${workspaceFolder}/out/**/*.js"]
15-
}
16-
]
6+
"version": "0.2.0",
7+
"configurations": [
8+
{
9+
"name": "Run Extension",
10+
"type": "extensionHost",
11+
"request": "launch",
12+
"runtimeExecutable": "${execPath}",
13+
"args": ["--extensionDevelopmentPath=${workspaceRoot}"],
14+
"outFiles": ["${workspaceFolder}/out/**/*.js"]
15+
}
16+
]
1717
}

.vscode/settings.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"editor.insertSpaces": false
3-
}
2+
"editor.insertSpaces": false
3+
}

.vscode/tasks.json

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

package.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,11 +127,24 @@
127127
"@typescript-eslint/parser": "^3.0.2",
128128
"css-loader": "^5.0.0",
129129
"eslint": "^7.1.0",
130+
"husky": "^5.0.4",
131+
"lint-staged": "^10.5.2",
130132
"npm-run-all": "^4.1.5",
133+
"prettier": "^2.2.1",
131134
"style-loader": "^2.0.0",
132135
"ts-loader": "^8.0.5",
133136
"typescript": "^4.0.3",
134137
"webpack": "4",
135138
"webpack-cli": "^4.0.0"
139+
},
140+
"husky": {
141+
"hooks": {
142+
"pre-commit": "lint-staged"
143+
}
144+
},
145+
"lint-staged": {
146+
"**/*.{js,json,css,scss,md}": [
147+
"prettier --write"
148+
]
136149
}
137150
}

0 commit comments

Comments
 (0)