update config
All checks were successful
All checks were successful
This commit is contained in:
parent
0c85df498e
commit
738381ee16
12
front/.editorconfig
Normal file
12
front/.editorconfig
Normal file
@ -0,0 +1,12 @@
|
||||
# https://EditorConfig.org
|
||||
|
||||
# top-most EditorConfig file
|
||||
root = true
|
||||
|
||||
[*]
|
||||
charset = utf-8
|
||||
end_of_line = lf
|
||||
indent_size = 2
|
||||
indent_style = space
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = false
|
10
front/.gitignore
vendored
10
front/.gitignore
vendored
@ -1,8 +1,6 @@
|
||||
# build output
|
||||
dist/
|
||||
|
||||
# generated types
|
||||
.astro/
|
||||
.output/
|
||||
|
||||
# dependencies
|
||||
node_modules/
|
||||
@ -13,6 +11,7 @@ yarn-debug.log*
|
||||
yarn-error.log*
|
||||
pnpm-debug.log*
|
||||
|
||||
|
||||
# environment variables
|
||||
.env
|
||||
.env.production
|
||||
@ -20,5 +19,6 @@ pnpm-debug.log*
|
||||
# macOS-specific files
|
||||
.DS_Store
|
||||
|
||||
# jetbrains setting folder
|
||||
.idea/
|
||||
pnpm-lock.yaml
|
||||
|
||||
.astro
|
4
front/.prettierignore
Normal file
4
front/.prettierignore
Normal file
@ -0,0 +1,4 @@
|
||||
dist
|
||||
node_modules
|
||||
.github
|
||||
.changeset
|
13
front/.prettierrc.cjs
Normal file
13
front/.prettierrc.cjs
Normal file
@ -0,0 +1,13 @@
|
||||
/** @type {import('prettier').Config} */
|
||||
module.exports = {
|
||||
printWidth: 120,
|
||||
semi: true,
|
||||
singleQuote: true,
|
||||
tabWidth: 2,
|
||||
trailingComma: 'es5',
|
||||
useTabs: false,
|
||||
|
||||
plugins: [require.resolve('prettier-plugin-astro')],
|
||||
|
||||
overrides: [{ files: '*.astro', options: { parser: 'astro' } }],
|
||||
};
|
6
front/.stackblitzrc
Normal file
6
front/.stackblitzrc
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
"startCommand": "npm start",
|
||||
"env": {
|
||||
"ENABLE_CJS_IMPORTS": true
|
||||
}
|
||||
}
|
275
front/.vscode/astrowind/config-schema.json
vendored
Normal file
275
front/.vscode/astrowind/config-schema.json
vendored
Normal file
@ -0,0 +1,275 @@
|
||||
{
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"site": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"site": {
|
||||
"type": "string"
|
||||
},
|
||||
"base": {
|
||||
"type": "string"
|
||||
},
|
||||
"trailingSlash": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"googleSiteVerificationId": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": ["name", "site", "base", "trailingSlash"],
|
||||
"additionalProperties": false
|
||||
},
|
||||
"metadata": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"title": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"default": {
|
||||
"type": "string"
|
||||
},
|
||||
"template": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": ["default", "template"]
|
||||
},
|
||||
"description": {
|
||||
"type": "string"
|
||||
},
|
||||
"robots": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"index": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"follow": {
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"required": ["index", "follow"]
|
||||
},
|
||||
"openGraph": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"site_name": {
|
||||
"type": "string"
|
||||
},
|
||||
"images": {
|
||||
"type": "array",
|
||||
"items": [
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"url": {
|
||||
"type": "string"
|
||||
},
|
||||
"width": {
|
||||
"type": "integer"
|
||||
},
|
||||
"height": {
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
"required": ["url", "width", "height"]
|
||||
}
|
||||
]
|
||||
},
|
||||
"type": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": ["site_name", "images", "type"]
|
||||
},
|
||||
"twitter": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"handle": {
|
||||
"type": "string"
|
||||
},
|
||||
"site": {
|
||||
"type": "string"
|
||||
},
|
||||
"cardType": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": ["handle", "site", "cardType"]
|
||||
}
|
||||
},
|
||||
"required": ["title", "description", "robots", "openGraph", "twitter"]
|
||||
},
|
||||
"i18n": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"language": {
|
||||
"type": "string"
|
||||
},
|
||||
"textDirection": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": ["language", "textDirection"]
|
||||
},
|
||||
"apps": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"blog": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"isEnabled": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"postsPerPage": {
|
||||
"type": "integer"
|
||||
},
|
||||
"isRelatedPostsEnabled": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"relatedPostsCount": {
|
||||
"type": "integer"
|
||||
},
|
||||
"post": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"isEnabled": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"permalink": {
|
||||
"type": "string"
|
||||
},
|
||||
"robots": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"index": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"follow": {
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"required": ["index"]
|
||||
}
|
||||
},
|
||||
"required": ["isEnabled", "permalink", "robots"]
|
||||
},
|
||||
"list": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"isEnabled": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"pathname": {
|
||||
"type": "string"
|
||||
},
|
||||
"robots": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"index": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"follow": {
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"required": ["index"]
|
||||
}
|
||||
},
|
||||
"required": ["isEnabled", "pathname", "robots"]
|
||||
},
|
||||
"category": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"isEnabled": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"pathname": {
|
||||
"type": "string"
|
||||
},
|
||||
"robots": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"index": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"follow": {
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"required": ["index"]
|
||||
}
|
||||
},
|
||||
"required": ["isEnabled", "pathname", "robots"]
|
||||
},
|
||||
"tag": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"isEnabled": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"pathname": {
|
||||
"type": "string"
|
||||
},
|
||||
"robots": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"index": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"follow": {
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"required": ["index"]
|
||||
}
|
||||
},
|
||||
"required": ["isEnabled", "pathname", "robots"]
|
||||
}
|
||||
},
|
||||
"required": ["isEnabled", "postsPerPage", "post", "list", "category", "tag"]
|
||||
}
|
||||
},
|
||||
"required": ["blog"]
|
||||
},
|
||||
"analytics": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"vendors": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"googleAnalytics": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": ["string", "null"]
|
||||
},
|
||||
"partytown": {
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
}
|
||||
},
|
||||
"required": ["id"]
|
||||
}
|
||||
},
|
||||
"required": ["googleAnalytics"]
|
||||
}
|
||||
},
|
||||
"required": ["vendors"]
|
||||
},
|
||||
"ui": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"theme": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": ["theme"]
|
||||
}
|
||||
},
|
||||
"required": ["site", "metadata", "i18n", "apps", "analytics", "ui"]
|
||||
}
|
8
front/.vscode/extensions.json
vendored
8
front/.vscode/extensions.json
vendored
@ -1,4 +1,10 @@
|
||||
{
|
||||
"recommendations": ["astro-build.astro-vscode"],
|
||||
"recommendations": [
|
||||
"astro-build.astro-vscode",
|
||||
"bradlc.vscode-tailwindcss",
|
||||
"dbaeumer.vscode-eslint",
|
||||
"esbenp.prettier-vscode",
|
||||
"unifiedjs.vscode-mdx"
|
||||
],
|
||||
"unwantedRecommendations": []
|
||||
}
|
||||
|
15
front/.vscode/settings.json
vendored
Normal file
15
front/.vscode/settings.json
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"css.customData": ["./vscode.tailwind.json"],
|
||||
"eslint.validate": ["javascript", "javascriptreact", "astro", "typescript", "typescriptreact"],
|
||||
"files.associations": {
|
||||
"*.mdx": "markdown"
|
||||
},
|
||||
"prettier.documentSelectors": ["**/*.astro"],
|
||||
"[astro]": {
|
||||
"editor.defaultFormatter": "astro-build.astro-vscode"
|
||||
},
|
||||
"yaml.schemas": {
|
||||
"./.vscode/astrowind/config-schema.json": "/src/config.yaml"
|
||||
},
|
||||
"eslint.experimental.useFlatConfig": true
|
||||
}
|
59
front/eslint.config.js
Normal file
59
front/eslint.config.js
Normal file
@ -0,0 +1,59 @@
|
||||
import astroEslintParser from 'astro-eslint-parser';
|
||||
import eslintPluginAstro from 'eslint-plugin-astro';
|
||||
import globals from 'globals';
|
||||
import js from '@eslint/js';
|
||||
import tseslint from 'typescript-eslint';
|
||||
import typescriptParser from '@typescript-eslint/parser';
|
||||
|
||||
export default [
|
||||
js.configs.recommended,
|
||||
...eslintPluginAstro.configs['flat/recommended'],
|
||||
...tseslint.configs.recommended,
|
||||
{
|
||||
languageOptions: {
|
||||
globals: {
|
||||
...globals.browser,
|
||||
...globals.node,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
files: ['**/*.astro'],
|
||||
languageOptions: {
|
||||
parser: astroEslintParser,
|
||||
parserOptions: {
|
||||
parser: '@typescript-eslint/parser',
|
||||
extraFileExtensions: ['.astro'],
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
files: ['**/*.{js,jsx,astro}'],
|
||||
rules: {
|
||||
'no-mixed-spaces-and-tabs': ['error', 'smart-tabs'],
|
||||
},
|
||||
},
|
||||
{
|
||||
// Define the configuration for `<script>` tag.
|
||||
// Script in `<script>` is assigned a virtual file name with the `.js` extension.
|
||||
files: ['**/*.{ts,tsx}', '**/*.astro/*.js'],
|
||||
languageOptions: {
|
||||
parser: typescriptParser,
|
||||
},
|
||||
rules: {
|
||||
// Note: you must disable the base rule as it can report incorrect errors
|
||||
'no-unused-vars': 'off',
|
||||
'@typescript-eslint/no-unused-vars': [
|
||||
'error',
|
||||
{
|
||||
argsIgnorePattern: '^_',
|
||||
destructuredArrayIgnorePattern: '^_',
|
||||
},
|
||||
],
|
||||
'@typescript-eslint/no-non-null-assertion': 'off',
|
||||
},
|
||||
},
|
||||
{
|
||||
ignores: ['dist', 'node_modules', '.github', 'types.generated.d.ts', '.astro'],
|
||||
},
|
||||
];
|
17
front/vscode.tailwind.json
Normal file
17
front/vscode.tailwind.json
Normal file
@ -0,0 +1,17 @@
|
||||
{
|
||||
"version": 1.1,
|
||||
"atDirectives": [
|
||||
{
|
||||
"name": "@tailwind",
|
||||
"description": "@tailwind tailwindcss"
|
||||
},
|
||||
{
|
||||
"name": "@layer",
|
||||
"description": "@layer tailwindcss"
|
||||
},
|
||||
{
|
||||
"name": "@apply",
|
||||
"description": "@apply tailwindcss"
|
||||
}
|
||||
]
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user