Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@ charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[package.json]
indent_style = space
indent_size = 2

[*.md]
trim_trailing_whitespace = false

[*.mdx]
trim_trailing_whitespace = false
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
npx lint-staged
16 changes: 16 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Deep Directories
**/node_modules

# Generated Directories
**/dist
**/.astro
**/__coverage__

# Directories
.changeset

# Files
pnpm-lock.yaml
pre-commit
.prettierignore

23 changes: 23 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"printWidth": 100,
"semi": true,
"singleQuote": true,
"tabWidth": 2,
"trailingComma": "es5",
"useTabs": false,
"plugins": ["prettier-plugin-astro"],
"overrides": [
{
"files": [".*", "*.json", "*.md"],
"options": {
"useTabs": false
}
},
{
"files": ["*.md", "*.mdx"],
"options": {
"printWidth": 80
}
}
]
}
13 changes: 6 additions & 7 deletions astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,17 @@ export default defineConfig({
description: 'Contribute to freeCodeCamp.org',
logo: {
src: './public/icons/icon-96x96.png',
replacesTitle: true
replacesTitle: true,
},
tableOfContents: true,
defaultLocale: 'en',
editLink: {
baseUrl: 'https://github.com/freeCodeCamp/contribute/edit/main/'
baseUrl: 'https://github.com/freeCodeCamp/contribute/edit/main/',
},
social: {
github: 'https://github.com/freeCodeCamp',
twitter: 'https://twitter.com/freeCodeCamp',
discord:
'https://discord.com/invite/freecodecamp-org-official-fi-fo-692816967895220344'
discord: 'https://discord.com/invite/freecodecamp-org-official-fi-fo-692816967895220344',
},
sidebar: sidebar,
components: {
Expand All @@ -35,10 +34,10 @@ export default defineConfig({
// Relative path to your custom CSS file
'./src/styles/theme.css',
],
})
}),
],
output: 'hybrid',
adapter: cloudflare({
imageService: 'passthrough'
})
imageService: 'passthrough',
}),
});
11 changes: 10 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,12 @@
"start": "astro dev",
"build": "astro check && astro build",
"preview": "wrangler pages dev ./dist",
"astro": "astro"
"astro": "astro",
"format": "prettier -w --cache --plugin prettier-plugin-astro .",
"prepare": "husky"
},
"lint-staged": {
"*": "prettier -w --cache --plugin prettier-plugin-astro ."
},
"dependencies": {
"@astrojs/check": "^0.5.10",
Expand All @@ -17,6 +22,10 @@
"typescript": "^5.4.3"
},
"devDependencies": {
"husky": "^9.0.11",
"lint-staged": "^15.2.2",
"prettier": "^3.2.5",
"prettier-plugin-astro": "^0.13.0",
"wrangler": "^3.39.0"
}
}
Loading