# structure/lone-files

> Finds a folder that holds one code file and nothing else.

Finds a folder that holds one code file and nothing else.

Part of the [`structure`](/reference/configurations/structure/) configuration, at the `all` [level](/start/concepts/#levels). It runs at the `commit` [stage](/start/concepts/#stage), once per scope. gspot runs this check itself.

## Why

A folder with one file adds a level to every import path and groups nothing.

## What to do

Move the file up beside its neighbors, or use `gspot ignore structure/lone-files` with paths and a reason.

## Example

With TypeScript at level `all`, a `feature/only.ts` alone in its folder reports `lone-file`. Move it up beside related code, and update its imports.

## Turn it off

Turn it off for some files, with a reason:

```shell
gspot ignore structure/lone-files --paths "<glob>" --reason "<why>"
```
