.prettierrc配置文件详解

{
    // tab缩进大小,默认为2
    "tabWidth": 4,
    // 使用tab缩进,默认false
    "useTabs": false,
    // 使用分号, 默认true
    "semi": false,
    // 使用单引号, 默认false(在jsx中配置无效, 默认都是双引号)
    "singleQuote": true,
    // 行尾逗号,默认none,可选 none|es5|all
    // es5 包括es5中的数组、对象
    // all 包括函数对象等所有可选
    "trailingComma": "none",
    // 对象中的空格 默认true
    // true: { foo: bar }
    // false: {foo: bar}
    "bracketSpacing": true,
    // JSX标签闭合位置 默认false
    // false: <div
    //          className=""
    //          style={{}}
    //       >
    // true: <div
    //          className=""
    //          style={{}} >
    "jsxBracketSameLine": false,
    // 箭头函数参数括号 默认avoid 可选 avoid| always
    // avoid 能省略括号的时候就省略 例如x => x
    // always 总是有括号
    "arrowParens": "avoid"
}
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
GitLab是一个基于Git的版本控制系统和代码托管平台,它在企业和开源社区中广泛使用。GitLab有一个配置文件gitlab.rb,可以用于配置GitLab的各种设置。下面是这个配置文件的详细解释: 1. 外部URL 外部URL是GitLab的根网址,用于访问GitLab。在gitlab.rb配置文件中可以设置这个URL,例如: external_url 'https://gitlab.example.com' 2. SMTP设置 GitLab可以通过SMTP服务器发送电子邮件。在gitlab.rb配置文件中可以配置SMTP服务器的设置,例如: gitlab_rails['smtp_enable'] = true gitlab_rails['smtp_address'] = "smtp.example.com" gitlab_rails['smtp_port'] = 587 gitlab_rails['smtp_user_name'] = "user" gitlab_rails['smtp_password'] = "password" gitlab_rails['smtp_domain'] = "example.com" gitlab_rails['smtp_authentication'] = "login" gitlab_rails['smtp_enable_starttls_auto'] = true 3. PostgreSQL设置 GitLab使用PostgreSQL作为其默认数据库,可以在gitlab.rb配置文件配置PostgreSQL的设置,例如: postgresql['enable'] = true postgresql['username'] = "gitlab" postgresql['password'] = "password" postgresql['database'] = "gitlabhq_production" postgresql['host'] = "localhost" postgresql['port'] = 5432 postgresql['sslmode'] = "verify-full" 4. Redis设置 GitLab使用Redis作为它的缓存和队列服务器,可以在gitlab.rb配置文件配置Redis的设置,例如: redis['enable'] = true redis['host'] = "localhost" redis['port'] = 6379 redis['password'] = "password" redis['database'] = 0 5. Unicorn设置 GitLab使用Unicorn作为它的Web服务器,可以在gitlab.rb配置文件配置Unicorn的设置,例如: unicorn['worker_processes'] = 2 unicorn['listen'] = 'localhost' unicorn['port'] = 8080 unicorn['socket'] = '/var/run/gitlab/gitlab.socket' unicorn['pidfile'] = '/var/run/gitlab/gitlab.pid' unicorn['worker_timeout'] = 60 unicorn['log_directory'] = "/var/log/gitlab/unicorn" 以上是gitlab.rb配置文件的一些常见设置,可以根据需要进行修改。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值