Skip to content

Commit

Permalink
Merge pull request #362 from Financial-Times/readme-options-updates
Browse files Browse the repository at this point in the history
docs: use standard table format for readme options
  • Loading branch information
jkerr321 authored Mar 7, 2023
2 parents fbdc549 + 390743f commit 279bb27
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 21 deletions.
26 changes: 5 additions & 21 deletions plugins/prettier/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,26 +27,10 @@ This will modify your `package.json`. You should commit this change.

### Options

#### `files`

A required Array of strings of filepath(s) or filepath pattern(s) to be formatted. Defaults to `['{,!(node_modules)/**/}*.js'].

#### `configOptions`

An optional prettier configuration object. Defaults to:

```js
{
singleQuote: true,
useTabs: true,
bracketSpacing: true,
arrowParens: 'always',
trailingComma: 'none'
}
```

#### `configFile`

An optional String that specifies the prettier configuration file (.prettierrc.json). The configuration file will be resolved starting from the location of the file being formatted, and searching up the file tree until a config file is (or isn’t) found. If the configFile is not found the prettier plugin will default to configOptions.
| Key | Description | Default value |
|-|-|-|
| `files` | A required Array of strings of filepath(s) or filepath pattern(s) to be formatted | `['{,!(node_modules)/**/}*.js']` |
| `configOptions` | An optional prettier configuration object | <br>`{`<br>` singleQuote: true,`<br>` useTabs: true,`<br>` bracketSpacing: true,`<br>` arrowParens: 'always',`<br>` trailingComma: 'none'`<br>`}`<br> |
| `configFile` | An optional String that specifies the prettier configuration file (.prettierrc.json). The configuration file will be resolved starting from the location of the file being formatted, and searching up the file tree until a config file is (or isn’t) found. If the configFile is not found the prettier plugin will default to configOptions. | `configOptions` value |

For more information on prettier configuration, visit the [Prettier docs](https://prettier.io/docs/en/configuration.html).
6 changes: 6 additions & 0 deletions plugins/webpack/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@ hooks:
'test:local': WebpackDevelopment
```

## Options

| Key | Description | Default value |
|-|-|-|
| `configPath` | An optional path to your Webpack config file | none |

## Tasks

| Task | Description | Default hooks |
Expand Down

0 comments on commit 279bb27

Please sign in to comment.