@archoleat/prettier-define-config 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 Archoleat
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,59 @@
1
+ # Prettier Define Config
2
+
3
+ ![NPM Version](https://img.shields.io/npm/v/%40archoleat%2Fprettier-define-config)
4
+ ![NPM Downloads](https://img.shields.io/npm/dm/%40archoleat%2Fprettier-define-config)
5
+ ![ESM](https://img.shields.io/badge/ESM-fe0)
6
+ ![Provenance](https://img.shields.io/badge/Provenance-fo0)
7
+ ![CodeQL](https://img.shields.io/github/actions/workflow/status/archoleat/prettier-define-config/codeql.yaml?label=CodeQL)
8
+ ![Specs](https://img.shields.io/github/actions/workflow/status/archoleat/prettier-define-config/spec.yaml?label=Specs)
9
+ ![Commitlint](https://img.shields.io/github/actions/workflow/status/archoleat/prettier-define-config/commitlint.yaml?label=Commitlint)
10
+ ![Editorconfig](https://img.shields.io/github/actions/workflow/status/archoleat/prettier-define-config/editorconfig.yaml?label=Editorconfig)
11
+ ![Prettier](https://img.shields.io/github/actions/workflow/status/archoleat/prettier-define-config/prettier.yaml?label=Prettier)
12
+ ![ESLint](https://img.shields.io/github/actions/workflow/status/archoleat/prettier-define-config/eslint.yaml?label=ESLint)
13
+ ![Markdown](https://img.shields.io/github/actions/workflow/status/archoleat/prettier-define-config/markdown.yaml?label=Markdown)
14
+
15
+ ## Table of Contents
16
+
17
+ - [Installation](#installation)
18
+ - [Usage](#usage)
19
+ - [Contributing](#contributing)
20
+ - [License](#license)
21
+
22
+ ## Installation
23
+
24
+ ```shell
25
+ # pnpm
26
+ pnpm i -D @archoleat/prettier-define-config
27
+ ```
28
+
29
+ ```shell
30
+ # npm
31
+ npm i -D @archoleat/prettier-define-config
32
+ ```
33
+
34
+ ```shell
35
+ # yarn
36
+ yarn add -D @archoleat/prettier-define-config
37
+ ```
38
+
39
+ ## Usage
40
+
41
+ See [Prettier Configuration](https://prettier.io/docs/en/options.html).
42
+
43
+ ```js
44
+ // prettier.config.js or prettier.config.ts
45
+ import { defineConfig } from '@archoleat/prettier-define-config';
46
+
47
+ export default defineConfig({
48
+ // Your options
49
+ })
50
+ ```
51
+
52
+ ## Contributing
53
+
54
+ Please read [**CONTRIBUTING**](https://github.com/archoleat/.github/blob/main/CONTRIBUTING.md)
55
+ to start contributing.
56
+
57
+ ## License
58
+
59
+ This project is licensed under the [**MIT license**](LICENSE).
package/index.d.ts ADDED
@@ -0,0 +1,12 @@
1
+ import { Config } from 'prettier';
2
+
3
+ /**
4
+ * Define an Prettier config.
5
+ *
6
+ * @param {object} config Prettier config.
7
+ *
8
+ * @returns Prettier config.
9
+ */
10
+ declare const defineConfig: (config: Config) => Config;
11
+
12
+ export { defineConfig };
package/index.js ADDED
@@ -0,0 +1 @@
1
+ const n=e=>e;export{n as defineConfig};
package/package.json ADDED
@@ -0,0 +1,108 @@
1
+ {
2
+ "name": "@archoleat/prettier-define-config",
3
+ "description": "Provide a defineConfig function for Prettier",
4
+ "version": "1.0.0",
5
+ "license": "MIT",
6
+ "author": {
7
+ "email": "archoleat@gmail.com",
8
+ "name": "Archoleat",
9
+ "url": "https://github.com/archoleat"
10
+ },
11
+ "homepage": "https://github.com/archoleat/prettier-define-config#readme",
12
+ "repository": {
13
+ "type": "git",
14
+ "url": "git+https://github.com/archoleat/prettier-define-config.git"
15
+ },
16
+ "bugs": {
17
+ "url": "https://github.com/archoleat/prettier-define-config/issues"
18
+ },
19
+ "keywords": [
20
+ "archoleat-prettier-define-config",
21
+ "archoleat",
22
+ "config",
23
+ "configuration",
24
+ "define-config",
25
+ "plugin",
26
+ "prettier-config",
27
+ "prettier-define-config",
28
+ "prettier",
29
+ "typescript"
30
+ ],
31
+ "packageManager": "pnpm@9.4.0",
32
+ "engines": {
33
+ "node": ">=20.0.0",
34
+ "pnpm": ">=9.0.0"
35
+ },
36
+ "volta": {
37
+ "node": "20.16.0",
38
+ "pnpm": "9.4.0"
39
+ },
40
+ "type": "module",
41
+ "types": "index.d.ts",
42
+ "imports": {
43
+ "#src": "./src/index.ts"
44
+ },
45
+ "exports": {
46
+ ".": "./index.js"
47
+ },
48
+ "files": [
49
+ "index.d.ts",
50
+ "index.js"
51
+ ],
52
+ "scripts": {
53
+ "init": "pnpm i && husky",
54
+ "spec": "vitest",
55
+ "spec:coverage": "vitest run --coverage",
56
+ "build": "rollup -c rollup.config.ts --configPlugin typescript",
57
+ "release": "semantic-release",
58
+ "lint:editorconfig": "editorconfig-checker",
59
+ "lint:formatting": "prettier . --check",
60
+ "lint:md": "remark . --quiet --frail",
61
+ "lint:ts": "eslint src/index.ts --fix",
62
+ "prettify": "prettier . --write",
63
+ "commit": "cz"
64
+ },
65
+ "peerDependencies": {
66
+ "prettier": "^3.3.3"
67
+ },
68
+ "devDependencies": {
69
+ "@archoleat/commitlint-define-config": "^1.0.8",
70
+ "@archoleat/eslint-flat-compatibility": "^1.1.6",
71
+ "@archoleat/semantic-release-define-config": "^1.1.13",
72
+ "@commitlint/cli": "^19.4.0",
73
+ "@commitlint/config-conventional": "^19.2.2",
74
+ "@commitlint/types": "^19.0.3",
75
+ "@rollup/plugin-typescript": "^11.1.6",
76
+ "@semantic-release/changelog": "^6.0.3",
77
+ "@semantic-release/git": "^10.0.1",
78
+ "@typescript-eslint/eslint-plugin": "^7.18.0",
79
+ "@typescript-eslint/parser": "^7.18.0",
80
+ "@vitest/coverage-v8": "^2.0.5",
81
+ "conventional-changelog-conventionalcommits": "^8.0.0",
82
+ "cz-conventional-changelog": "^3.3.0",
83
+ "editorconfig-checker": "^5.1.8",
84
+ "eslint": "^8.57.0",
85
+ "eslint-config-airbnb-typescript": "^18.0.0",
86
+ "eslint-config-prettier": "^9.1.0",
87
+ "eslint-define-config": "^2.1.0",
88
+ "eslint-import-resolver-typescript": "^3.6.1",
89
+ "eslint-plugin-import": "^2.29.1",
90
+ "eslint-plugin-unicorn": "^55.0.0",
91
+ "git-pull-run": "^1.4.0",
92
+ "globals": "^15.9.0",
93
+ "husky": "^9.1.4",
94
+ "lint-staged": "^15.2.8",
95
+ "prettier": "^3.3.3",
96
+ "remark": "15.0.1",
97
+ "remark-cli": "^12.0.1",
98
+ "remark-preset-lint-consistent": "^6.0.0",
99
+ "remark-preset-lint-markdown-style-guide": "^6.0.0",
100
+ "remark-preset-lint-recommended": "^7.0.0",
101
+ "rollup": "^4.20.0",
102
+ "rollup-plugin-dts": "^6.1.1",
103
+ "rollup-plugin-esbuild": "^6.1.1",
104
+ "semantic-release": "^24.0.0",
105
+ "typescript": "^5.5.4",
106
+ "vitest": "^2.0.5"
107
+ }
108
+ }