5.6.1 ā€¢ Published 4 years ago

@jsenv/prettier-check-project v5.6.1

Weekly downloads
61
License
MIT
Repository
github
Last release
4 years ago

Prettier check project

Format staged or project files with prettier.

github package npm package github ci codecov

Table of contents

Presentation

This package was designed to:

  • format staged files with prettier, prefect in a precommit hook.
  • get an overwiew of your files state regarding prettier formatting.
  • format your project files at once.
import { formatWithPrettier } from "@jsenv/prettier-check-project"

formatWithPrettier({
  projectDirectoryUrl: "file:///directory",
})

node terminal screenshot

Installation

npm install @jsenv/prettier-check-project

formatWithPrettier

formatWithPrettier is an async function collecting files to format them with prettier. It also logs progression and return summary and report objects.

import { formatWithPrettier } from "@jsenv/prettier-check-project"

const { summary, report } = await formatWithPrettier({
  logLevel: "debug",
  projectDirectoryUrl: "file:///Users/you/directory",
  prettierIgnoreFileRelativeUrl: ".prettierignore",
  projectFilesConfig: {
    "./src/": true,
    "./*": true,
  },
})

ā€” source code at src/formatWithPrettier.js.

5.6.1

4 years ago

5.6.0

4 years ago

5.5.0

4 years ago

5.4.0

4 years ago

5.3.0

4 years ago

5.2.1

4 years ago

5.2.0

4 years ago

5.1.1

4 years ago

5.1.0

4 years ago

5.0.0

4 years ago

4.2.0

4 years ago

4.1.0

4 years ago

4.0.0

4 years ago

3.5.0

5 years ago

3.4.0

5 years ago

3.3.0

5 years ago

3.2.0

5 years ago

3.1.0

5 years ago

3.0.0

5 years ago

2.9.0

5 years ago

2.8.0

5 years ago

2.7.0

5 years ago

2.6.0

5 years ago

2.5.0

5 years ago

2.3.0

5 years ago

2.2.0

5 years ago

2.1.0

5 years ago

2.0.0

5 years ago

1.10.0

5 years ago

1.9.0

5 years ago

1.8.0

5 years ago

1.7.0

5 years ago

1.6.0

5 years ago

1.5.0

5 years ago

1.3.0

5 years ago

1.2.0

5 years ago

1.1.0

5 years ago

1.0.0

5 years ago