Skip to content

Commit

Permalink
config: format json hbs as json (#540)
Browse files Browse the repository at this point in the history
  • Loading branch information
manuel-rw authored May 24, 2024
1 parent 114176e commit 9e199b7
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 12 deletions.
8 changes: 8 additions & 0 deletions tooling/prettier/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,14 @@ const config = {
importOrderParserPlugins: ["typescript", "jsx", "decorators-legacy"],
printWidth: 120,
importOrderTypeScriptVersion: "4.4.0",
overrides: [
{
files: "*.json.hbs",
options: {
parser: "json",
},
},
],
};

export default config;
44 changes: 35 additions & 9 deletions turbo/generators/templates/package.json.hbs
Original file line number Diff line number Diff line change
@@ -1,9 +1,35 @@
{ "name": "@homarr/{{name}}", "private": true, "version": "0.1.0", "exports": {
".": "./index.ts" }, "typesVersions": { "*": { "*": [ "src/*" ] } }, "license":
"MIT", "scripts": { "clean": "rm -rf .turbo node_modules", "lint": "eslint .",
"format": "prettier --check . --ignore-path ../../.gitignore", "typecheck": "tsc
--noEmit" }, "devDependencies": { "@homarr/eslint-config": "workspace:^0.2.0",
"@homarr/prettier-config": "workspace:^0.1.0", "@homarr/tsconfig":
"workspace:^0.1.0", "eslint": "^8.57.0", "typescript": "^5.4.5" },
"eslintConfig": { "extends": [ "@homarr/eslint-config/base" ] }, "prettier":
"@homarr/prettier-config" }
{
"name": "@homarr/{{name}}",
"private": true,
"version": "0.1.0",
"exports": {
".": "./index.ts"
},
"typesVersions": {
"*": {
"*": [
"src/*"
]
}
},
"license": "MIT",
"scripts": {
"clean": "rm -rf .turbo node_modules",
"lint": "eslint .",
"format": "prettier --check . --ignore-path ../../.gitignore",
"typecheck": "tsc --noEmit"
},
"devDependencies": {
"@homarr/eslint-config": "workspace:^0.2.0",
"@homarr/prettier-config": "workspace:^0.1.0",
"@homarr/tsconfig": "workspace:^0.1.0",
"eslint": "^8.57.0",
"typescript": "^5.4.5"
},
"eslintConfig": {
"extends": [
"@homarr/eslint-config/base"
]
},
"prettier": "@homarr/prettier-config"
}
16 changes: 13 additions & 3 deletions turbo/generators/templates/tsconfig.json.hbs
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
{ "extends": "@homarr/tsconfig/base.json", "compilerOptions": {
"tsBuildInfoFile": "node_modules/.cache/tsbuildinfo.json" }, "include": ["*.ts",
"src"], "exclude": ["node_modules"] }
{
"extends": "@homarr/tsconfig/base.json",
"compilerOptions": {
"tsBuildInfoFile": "node_modules/.cache/tsbuildinfo.json"
},
"include": [
"*.ts",
"src"
],
"exclude": [
"node_modules"
]
}

0 comments on commit 9e199b7

Please sign in to comment.