How to use the @adonisjs/sink.IniFile function in @adonisjs/sink

To help you get started, we’ve selected a few @adonisjs/sink examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github AdonisCommunity / create-adonis-ts-app / tasks / createEditorConfig.ts View on Github external
const task: TaskFn = (absPath) => {
  const editorConfig = new IniFile(absPath, '.editorconfig')

  editorConfig.set('*', {
    indent_style: 'space',
    indent_size: 2,
    end_of_line: 'lf',
    charset: 'utf-8',
    trim_trailing_whitespace: true,
    insert_final_newline: true,
  })

  editorConfig.set('*.json', {
    insert_final_newline: 'ignore',
  })

  editorConfig.set('*.md', {
    trim_trailing_whitespace: false,