feat(kilo-vscode): add prettier enforcement

- Add prettier + eslint-config-prettier as devDependencies
- Create .prettierignore for dist/out/pnpm-lock.yaml
- Update eslint.config.mjs: add eslint-config-prettier, remove semi rule
- Add format and format:check scripts to package.json
- Inherits config from monorepo root (semi: false, printWidth: 120, 2-space indent)

Note: Does not reformat existing files yet — run pnpm format after merging open PRs.
This commit is contained in:
Mark IJbema
2026-02-09 13:21:13 +01:00
parent e87200035f
commit 7e20371cf9
4 changed files with 61 additions and 19 deletions
+4
View File
@@ -0,0 +1,4 @@
node_modules
dist
out
pnpm-lock.yaml
+23 -16
View File
@@ -1,27 +1,34 @@
import typescriptEslint from "typescript-eslint";
import typescriptEslint from "typescript-eslint"
import eslintConfigPrettier from "eslint-config-prettier"
export default [{
export default [
{
files: ["**/*.ts"],
}, {
},
{
plugins: {
"@typescript-eslint": typescriptEslint.plugin,
"@typescript-eslint": typescriptEslint.plugin,
},
languageOptions: {
parser: typescriptEslint.parser,
ecmaVersion: 2022,
sourceType: "module",
parser: typescriptEslint.parser,
ecmaVersion: 2022,
sourceType: "module",
},
rules: {
"@typescript-eslint/naming-convention": ["warn", {
selector: "import",
format: ["camelCase", "PascalCase"],
}],
"@typescript-eslint/naming-convention": [
"warn",
{
selector: "import",
format: ["camelCase", "PascalCase"],
},
],
curly: "warn",
eqeqeq: "warn",
"no-throw-literal": "warn",
semi: "warn",
curly: "warn",
eqeqeq: "warn",
"no-throw-literal": "warn",
},
}];
},
eslintConfigPrettier,
]
+4
View File
@@ -109,6 +109,8 @@
"watch-tests": "tsc -p . -w --outDir out",
"pretest": "pnpm run compile-tests && pnpm run compile && pnpm run lint",
"check-types": "tsc --noEmit",
"format": "prettier --write .",
"format:check": "prettier --check .",
"lint": "eslint src",
"test": "vscode-test"
},
@@ -121,7 +123,9 @@
"esbuild": "^0.27.2",
"esbuild-plugin-solid": "^0.6.0",
"eslint": "^9.39.2",
"eslint-config-prettier": "^10.1.8",
"npm-run-all": "^4.1.5",
"prettier": "^3.8.1",
"typescript": "^5.9.3",
"typescript-eslint": "^8.54.0"
},
+30 -3
View File
@@ -42,9 +42,15 @@ importers:
eslint:
specifier: ^9.39.2
version: 9.39.2
eslint-config-prettier:
specifier: ^10.1.8
version: 10.1.8(eslint@9.39.2)
npm-run-all:
specifier: ^4.1.5
version: 4.1.5
prettier:
specifier: ^3.8.1
version: 3.8.1
typescript:
specifier: ^5.9.3
version: 5.9.3
@@ -833,6 +839,12 @@ packages:
resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==}
engines: {node: '>=10'}
eslint-config-prettier@10.1.8:
resolution: {integrity: sha512-82GZUjRS0p/jganf6q1rEO25VSoHH0hKPCTrgillPjdI/3bgBhAE1QzHrHTizjpRvy6pGAvKjDJtk2pF9NDq8w==}
hasBin: true
peerDependencies:
eslint: '>=7.0.0'
eslint-scope@8.4.0:
resolution: {integrity: sha512-sNXOfKCn74rt8RICKMvJS7XKV/Xk9kA7DyJr8mJik3S7Cwgy3qlkkmyS2uQB3jiJg6VNdZd/pDBJu0nvG2NlTg==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
@@ -1468,6 +1480,11 @@ packages:
resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==}
engines: {node: '>= 0.8.0'}
prettier@3.8.1:
resolution: {integrity: sha512-UOnG6LftzbdaHZcKoPFtOcCKztrQ57WkHDeRD9t/PTQtmT0NHSeWWepj6pS0z/N7+08BHFDQVUrfmfMRcZwbMg==}
engines: {node: '>=14'}
hasBin: true
process-nextick-args@2.0.1:
resolution: {integrity: sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==}
@@ -2132,7 +2149,7 @@ snapshots:
'@eslint/config-array@0.21.1':
dependencies:
'@eslint/object-schema': 2.1.7
debug: 4.4.3(supports-color@8.1.1)
debug: 4.4.3
minimatch: 3.1.2
transitivePeerDependencies:
- supports-color
@@ -2148,7 +2165,7 @@ snapshots:
'@eslint/eslintrc@3.3.3':
dependencies:
ajv: 6.12.6
debug: 4.4.3(supports-color@8.1.1)
debug: 4.4.3
espree: 10.4.0
globals: 14.0.0
ignore: 5.3.2
@@ -2573,6 +2590,10 @@ snapshots:
es-errors: 1.3.0
is-data-view: 1.0.2
debug@4.4.3:
dependencies:
ms: 2.1.3
debug@4.4.3(supports-color@8.1.1):
dependencies:
ms: 2.1.3
@@ -2747,6 +2768,10 @@ snapshots:
escape-string-regexp@4.0.0: {}
eslint-config-prettier@10.1.8(eslint@9.39.2):
dependencies:
eslint: 9.39.2
eslint-scope@8.4.0:
dependencies:
esrecurse: 4.3.0
@@ -2773,7 +2798,7 @@ snapshots:
ajv: 6.12.6
chalk: 4.1.2
cross-spawn: 7.0.6
debug: 4.4.3(supports-color@8.1.1)
debug: 4.4.3
escape-string-regexp: 4.0.0
eslint-scope: 8.4.0
eslint-visitor-keys: 4.2.1
@@ -3396,6 +3421,8 @@ snapshots:
prelude-ls@1.2.1: {}
prettier@3.8.1: {}
process-nextick-args@2.0.1: {}
punycode@2.3.1: {}