Skip to content

Commit 45dc2a2

Browse files
committed
Auto-format on commit and use single quotes
1 parent c7ee9fa commit 45dc2a2

3 files changed

Lines changed: 23 additions & 21 deletions

File tree

.vscode/settings.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,6 @@
3333
// This is necessary so that eslint can properly resolve its plugins
3434
"resolvePluginsRelativeTo": "./extensions/ql-vscode"
3535
},
36-
// Force this to false since this will cause too many changes on each commit
37-
"editor.formatOnSave": false
36+
"editor.formatOnSave": false,
37+
"prettier.singleQuote": true
3838
}

extensions/ql-vscode/.eslintrc.js

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,35 @@
11
module.exports = {
2-
parser: '@typescript-eslint/parser',
2+
parser: "@typescript-eslint/parser",
33
parserOptions: {
44
ecmaVersion: 2018,
5-
sourceType: 'module',
6-
project: ['tsconfig.json', './src/**/tsconfig.json'],
5+
sourceType: "module",
6+
project: ["tsconfig.json", "./src/**/tsconfig.json"],
77
},
8-
plugins: ['@typescript-eslint'],
8+
plugins: ["@typescript-eslint"],
99
env: {
1010
node: true,
11-
es6: true
11+
es6: true,
1212
},
13-
extends: [
14-
'eslint:recommended',
15-
'plugin:@typescript-eslint/recommended',
16-
],
13+
extends: ["eslint:recommended", "plugin:@typescript-eslint/recommended"],
1714
rules: {
18-
'@typescript-eslint/no-use-before-define': 0,
19-
'@typescript-eslint/no-unused-vars': ["warn", {
20-
"vars": "all",
21-
"args": "none",
22-
"ignoreRestSiblings": false
23-
}],
15+
"@typescript-eslint/no-use-before-define": 0,
16+
"@typescript-eslint/no-unused-vars": [
17+
"warn",
18+
{
19+
vars: "all",
20+
args: "none",
21+
ignoreRestSiblings: false,
22+
},
23+
],
2424
"@typescript-eslint/explicit-function-return-type": "off",
2525
"@typescript-eslint/no-non-null-assertion": "off",
2626
"@typescript-eslint/no-explicit-any": "off",
27-
"prefer-const": ["warn", {"destructuring": "all"}],
28-
"indent": "off",
27+
"prefer-const": ["warn", { destructuring: "all" }],
28+
indent: "off",
2929
"@typescript-eslint/indent": "off",
3030
"@typescript-eslint/no-throw-literal": "error",
3131
"no-useless-escape": 0,
32-
"semi": 2
32+
semi: 2,
33+
quotes: ["warn", "single"]
3334
},
3435
};

extensions/ql-vscode/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -664,7 +664,8 @@
664664
"prettier --write"
665665
],
666666
"./**/*.{ts,tsx}": [
667-
"tsfmt -r"
667+
"tsfmt -r",
668+
"eslint --fix"
668669
]
669670
}
670671
}

0 commit comments

Comments
 (0)