Impl prettier to project
- Add prettier json config - Format project with prettier config - Enable prettier in zed project settings Signed-off-by: Asai Neko <sugar@sne.moe>
This commit is contained in:
21
.prettierrc.json
Normal file
21
.prettierrc.json
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"printWidth": 120,
|
||||
"tabWidth": 4,
|
||||
"useTabs": false,
|
||||
"semi": true,
|
||||
"singleQuote": true,
|
||||
"quoteProps": "as-needed",
|
||||
"jsxSingleQuote": true,
|
||||
"trailingComma": "all",
|
||||
"bracketSpacing": true,
|
||||
"objectWarp": "preserve",
|
||||
"bracketSameLine": false,
|
||||
"arrowParens": "always",
|
||||
"parser": "typescript",
|
||||
"poseWrap": "preserve",
|
||||
"htmlWhitespaceSensitivity": "ignore",
|
||||
"vueIndentScriptAndStyle": false,
|
||||
"endOfLine": "lf",
|
||||
"embeddedLanguageFormatting": "auto",
|
||||
"singleAttributePerLine": false
|
||||
}
|
||||
@@ -1 +1 @@
|
||||
nodeLinker: node-modules
|
||||
nodeLinker: node - modules;
|
||||
|
||||
@@ -4,6 +4,8 @@
|
||||
// see the documentation: https://zed.dev/docs/configuring-zed#settings-files
|
||||
|
||||
{
|
||||
"format_on_save": "on",
|
||||
"formatter": "prettier",
|
||||
"languages": {
|
||||
"TypeScript": {
|
||||
"language_servers": [
|
||||
|
||||
@@ -1,30 +1,30 @@
|
||||
// @ts-check
|
||||
import { defineConfig } from "astro/config";
|
||||
import starlight from "@astrojs/starlight";
|
||||
import starlightThemeGalaxy from "starlight-theme-galaxy";
|
||||
import { defineConfig } from 'astro/config';
|
||||
import starlight from '@astrojs/starlight';
|
||||
import starlightThemeGalaxy from 'starlight-theme-galaxy';
|
||||
|
||||
import mdx from "@astrojs/mdx";
|
||||
import mdx from '@astrojs/mdx';
|
||||
|
||||
// https://astro.build/config
|
||||
export default defineConfig({
|
||||
integrations: [
|
||||
starlight({
|
||||
title: "NixCN",
|
||||
defaultLocale: "root",
|
||||
title: 'NixCN',
|
||||
defaultLocale: 'root',
|
||||
locales: {
|
||||
root: {
|
||||
label: "简体中文",
|
||||
lang: "zh-CN",
|
||||
label: '简体中文',
|
||||
lang: 'zh-CN',
|
||||
},
|
||||
en: {
|
||||
label: "English",
|
||||
label: 'English',
|
||||
},
|
||||
},
|
||||
social: [
|
||||
{
|
||||
icon: "github",
|
||||
label: "GitHub",
|
||||
href: "https://github.com/withastro/starlight",
|
||||
icon: 'github',
|
||||
label: 'GitHub',
|
||||
href: 'https://github.com/withastro/starlight',
|
||||
},
|
||||
],
|
||||
sidebar: [],
|
||||
|
||||
Reference in New Issue
Block a user