2.0.6 • Published 25 days ago

@kodehort/prettier-config v2.0.6

Weekly downloads
-
License
MIT
Repository
github
Last release
25 days ago

prettier-config

npm version

prettier-config is a curated prettier configuration that can be across our projects and can be used in your projects. Rather than add this all to a template, it is included as a package enabling updates to be pulled forward into consuming projects.

Installation

  1. You'll first need to install Prettier:
npm install prettier --save-dev
  1. Next, install prettier-config, run the following command:
npm install --save-dev @kodehort/prettier-config

Or:

pnpm add @kodehort/prettier-config -D

Usage

To use prettier-config, you need to extend it in your prettier configuration file. Here's an example prettier.config.js file

import prettierConfig from "@kodehort/prettier-config";

/** @type {import("prettier").Config} */
export default {
  ...prettierConfig,
  semi: false,
};

FAQs

Module type of the repository has an impact in the configuration file

If the package is defined with type module in the package.json file, you need to use the .js extension for the configuration file. This is because the import statement is not supported in CommonJS files.

{
  "type": "module"
}
```

Otherwise you can use the `.mjs` extension for the configuration file.
2.0.6

25 days ago

2.0.5

1 month ago

2.0.3

1 month ago

2.0.4

1 month ago

2.0.2

1 month ago

2.0.1

1 month ago

2.0.0

1 month ago

1.1.6

1 month ago

1.1.5

1 month ago

1.1.4

1 month ago

1.1.1

9 months ago

1.0.2

10 months ago

1.1.0

10 months ago

1.1.3

9 months ago

1.1.2

9 months ago

1.0.1

11 months ago

1.0.0

11 months ago