circle-exclamation
Deeplint is still in the MVP development phase and not yet available for use.

Init Command

This guide explains how to use the DeepLint init command to set up DeepLint in your project.

Overview

The init command initializes DeepLint in your project by creating a configuration file. This is typically the first command you'll run when setting up DeepLint for a new project.

The init command:

  • Creates a configuration file in your project root

  • Sets up default configuration options

  • Prompts you for any required information

Basic Usage

To initialize DeepLint in your project, run:

deeplint init

This will create a configuration file with default settings in your project root.

circle-info

By default, the init command creates a JavaScript configuration file (deeplint.config.js). You can specify a different format using the --js or --yaml flags.

Command Options

The init command supports the following options:

--force, -f

The --force option allows you to overwrite an existing configuration file:

This is useful when you want to reset your configuration to the default values.

--js

The --js option explicitly specifies that you want to create a JavaScript configuration file:

This is the default behavior, so you don't need to specify this option unless you want to be explicit.

--yaml

The --yaml option specifies that you want to create a YAML configuration file:

This will create a .deeplintrc.yml file instead of a JavaScript configuration file.

Command Aliases

The init command has the following aliases:

  • Full-Word Aliases:

    • initialize: Initialize DeepLint in the current project

    • create-config: Create a DeepLint configuration file

  • Short Aliases:

    • i: Initialize DeepLint in the current project

You can use any of these aliases instead of init:

Examples

Here are some examples of using the init command:

Creates a JavaScript configuration file (deeplint.config.js) with default settings.

Configuration File

The init command creates a configuration file with default settings. Here's an example of the default configuration:

Troubleshooting

Configuration File Already Exists

If a configuration file already exists, the init command will fail with an error:

To overwrite the existing configuration file, use the --force option:

Permission Issues

If you don't have permission to write to the project directory, the init command will fail with an error:

Make sure you have write permission for the project directory.

Next Steps

After initializing DeepLint, you can:

  1. Configure DeepLint for your project

For more information about DeepLint's configuration options, see the Configuration guide.

Last updated