@w5s/prettier-config 1.0.0-alpha.1

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) 2021 Julien Polo
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,62 @@
1
+ <!-- AUTO-GENERATED-CONTENT:START (PKGJSON:template=# W5s Prettier configuration _(${name})_) -->
2
+ # W5s Prettier configuration _(@w5s/prettier-config)_
3
+ <!-- AUTO-GENERATED-CONTENT:END -->
4
+
5
+ [![NPM Version][package-version-svg]][package-url]
6
+ [![License][license-image]][license-url]
7
+
8
+ <!-- AUTO-GENERATED-CONTENT:START (PKGJSON:template=> ${description}&unknownTxt= ) -->
9
+ > Prettier shared configuration
10
+ <!-- AUTO-GENERATED-CONTENT:END -->
11
+
12
+ ## Installation
13
+
14
+ <!-- AUTO-GENERATED-CONTENT:START (PKGJSON:template=```console\nnpm install --save-dev ${name}\n```) -->
15
+ ```console
16
+ npm install --save-dev @w5s/prettier-config
17
+ ```
18
+ <!-- AUTO-GENERATED-CONTENT:END -->
19
+
20
+ ## Usage
21
+
22
+ In the `.prettierrc.json` for your project
23
+
24
+ <!-- AUTO-GENERATED-CONTENT:START (PKGJSON:template=```json\n"${name}"\n```) -->
25
+ ```json
26
+ "@w5s/prettier-config"
27
+ ```
28
+ <!-- AUTO-GENERATED-CONTENT:END -->
29
+
30
+ Or in the `.prettierrc.js`, to be able to override rules
31
+
32
+ <!-- AUTO-GENERATED-CONTENT:START (PKGJSON:template=```js\nmodule.exports = {\n ...require('${name}'),\n // Override rules\n};\n```) -->
33
+ ```js
34
+ module.exports = {
35
+ ...require('@w5s/prettier-config'),
36
+ // Override rules
37
+ };
38
+ ```
39
+ <!-- AUTO-GENERATED-CONTENT:END -->
40
+
41
+ ## Requirements
42
+ <!-- AUTO-GENERATED-CONTENT:START (PKGJSON:template=Prettier: ${peerDependencies.prettier}&unknownTxt= ) -->
43
+ Prettier: >= 2.0
44
+ <!-- AUTO-GENERATED-CONTENT:END -->
45
+
46
+ ## License
47
+ <!-- AUTO-GENERATED-CONTENT:START (PKGJSON:template=[${license}][license-url] © ${author}) -->
48
+ [MIT][license-url] © Julien Polo <julien.polo@gmail.com>
49
+ <!-- AUTO-GENERATED-CONTENT:END -->
50
+
51
+ <!-- VARIABLES -->
52
+
53
+ <!-- AUTO-GENERATED-CONTENT:START (PKGJSON:template=[package-version-svg]: https://img.shields.io/npm/v/${name}.svg?style=flat-square) -->
54
+ [package-version-svg]: https://img.shields.io/npm/v/@w5s/prettier-config.svg?style=flat-square
55
+ <!-- AUTO-GENERATED-CONTENT:END -->
56
+ <!-- AUTO-GENERATED-CONTENT:START (PKGJSON:template=[package-url]: https://www.npmjs.com/package/${name}) -->
57
+ [package-url]: https://www.npmjs.com/package/@w5s/prettier-config
58
+ <!-- AUTO-GENERATED-CONTENT:END -->
59
+ <!-- AUTO-GENERATED-CONTENT:START (PKGJSON:template=[license-image]: https://img.shields.io/badge/license-${license}-green.svg?style=flat-square) -->
60
+ [license-image]: https://img.shields.io/badge/license-MIT-green.svg?style=flat-square
61
+ <!-- AUTO-GENERATED-CONTENT:END -->
62
+ [license-url]: ../../LICENSE
package/index.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ import Config from './lib/index.js';
2
+
3
+ export = Config;
package/index.js ADDED
@@ -0,0 +1,2 @@
1
+ /** @type {import('prettier').Config} */
2
+ module.exports = require('./lib/index.js').default;
package/lib/index.d.ts ADDED
@@ -0,0 +1,4 @@
1
+ import type { Config } from 'prettier';
2
+ declare const prettierConfig: Config;
3
+ export default prettierConfig;
4
+ //# sourceMappingURL=index.d.ts.map
package/lib/index.js ADDED
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const prettierConfig = {
4
+ singleQuote: true,
5
+ trailingComma: 'es5',
6
+ overrides: [
7
+ {
8
+ files: ['*.css', '*.scss'],
9
+ options: {
10
+ trailingComma: 'none',
11
+ },
12
+ },
13
+ ],
14
+ };
15
+ exports.default = prettierConfig;
16
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;AAEA,MAAM,cAAc,GAAW;IAC7B,WAAW,EAAE,IAAI;IACjB,aAAa,EAAE,KAAK;IACpB,SAAS,EAAE;QACT;YACE,KAAK,EAAE,CAAC,OAAO,EAAE,QAAQ,CAAC;YAC1B,OAAO,EAAE;gBACP,aAAa,EAAE,MAAM;aACtB;SACF;KACF;CACF,CAAC;AAEF,kBAAe,cAAc,CAAC"}
package/package.json ADDED
@@ -0,0 +1,69 @@
1
+ {
2
+ "name": "@w5s/prettier-config",
3
+ "version": "1.0.0-alpha.1",
4
+ "description": "Prettier shared configuration",
5
+ "keywords": [
6
+ "typescript",
7
+ "config",
8
+ "tsc"
9
+ ],
10
+ "homepage": "https://github.com/w5s/project-config/blob/main/packages/prettier-config#readme",
11
+ "bugs": {
12
+ "url": "https://github.com/w5s/project-config/issues"
13
+ },
14
+ "repository": {
15
+ "type": "git",
16
+ "url": "git@github.com:w5s/project-config.git",
17
+ "directory": "packages/prettier-config"
18
+ },
19
+ "license": "MIT",
20
+ "author": "Julien Polo <julien.polo@gmail.com>",
21
+ "type": "commonjs",
22
+ "exports": {
23
+ ".": "./index.js",
24
+ "./lib/*": "./lib/*"
25
+ },
26
+ "typings": "./index.d.ts",
27
+ "files": [
28
+ "lib/**/!(*.spec).d.ts",
29
+ "lib/**/!(*.spec).js.map",
30
+ "lib/**/!(*.spec).js",
31
+ "src/**/!(*.spec).ts",
32
+ "!example/**/*",
33
+ "!*.cjs",
34
+ "index.js",
35
+ "index.d.ts"
36
+ ],
37
+ "scripts": {
38
+ "build": "concurrently \"npm:build:*\" \":\"",
39
+ "build:tsc": "tsc",
40
+ "clean": "concurrently \"npm:clean:*\" \":\"",
41
+ "docs": "md-magic --path '**/*.md' --ignore='node_modules'",
42
+ "format": "concurrently \"npm:format:*\" \":\"",
43
+ "format:src": "eslint . --fix --ext=mjs,cjs,js,jsx,ts,tsx,json,jsonc,json5,yml,yaml",
44
+ "lint": "concurrently \"npm:lint:*\" \":\"",
45
+ "lint:src": "eslint . --ext=mjs,cjs,js,jsx,ts,tsx,json,jsonc,json5,yml,yaml",
46
+ "prepare": "concurrently \"npm:prepare:*\" \":\"",
47
+ "spellcheck": "cspell --no-progress '**'",
48
+ "test": "concurrently \"npm:test:*\" ",
49
+ "test:src": "exit 0"
50
+ },
51
+ "devDependencies": {
52
+ "prettier": "2.8.0"
53
+ },
54
+ "peerDependencies": {
55
+ "prettier": ">= 2.0"
56
+ },
57
+ "peerDependenciesMeta": {
58
+ "prettier": {
59
+ "optional": true
60
+ }
61
+ },
62
+ "engines": {
63
+ "node": ">=16.0.0"
64
+ },
65
+ "publishConfig": {
66
+ "access": "public"
67
+ },
68
+ "gitHead": "e6b57fb4d5c15057b66ccef776ec225496b012b7"
69
+ }
package/src/index.ts ADDED
@@ -0,0 +1,16 @@
1
+ import type { Config } from 'prettier';
2
+
3
+ const prettierConfig: Config = {
4
+ singleQuote: true,
5
+ trailingComma: 'es5',
6
+ overrides: [
7
+ {
8
+ files: ['*.css', '*.scss'],
9
+ options: {
10
+ trailingComma: 'none',
11
+ },
12
+ },
13
+ ],
14
+ };
15
+
16
+ export default prettierConfig;