@poool/dprint-config 6.3.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/CHANGELOG.md ADDED
@@ -0,0 +1,17 @@
1
+ # Change Log
2
+
3
+ All notable changes to this project will be documented in this file.
4
+ See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
+
6
+ # [6.3.0](https://github.com/p3ol/linter/compare/v6.2.1...v6.3.0) (2026-09-02)
7
+
8
+ ### Bug Fixes
9
+
10
+ * remove wrong rule ([032e46d](https://github.com/p3ol/linter/commit/032e46d4cf7d4057d00ccb71f80e868a2caed0d3))
11
+ * try to change format test timeout ([b4181ea](https://github.com/p3ol/linter/commit/b4181ea58f6d92526aaf2774fc549d627fafb767))
12
+ * upgrade various deps ([9669036](https://github.com/p3ol/linter/commit/96690361faec85e2958c525d7cb0712f94ea7337))
13
+
14
+ ### Features
15
+
16
+ * add dprint support ([3e996bb](https://github.com/p3ol/linter/commit/3e996bbdc838eda0d8d2be79763c39bb1f3f9970))
17
+ * add rules ([d5d8cde](https://github.com/p3ol/linter/commit/d5d8cdea8b380831aa4ee8f4d625fd231e11c96c))
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2020 Poool
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,18 @@
1
+ # Poool dprint config
2
+
3
+ > Common dprint rules we share between projects at Poool
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ yarn add dprint @poool/dprint-config --dev
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ ```json name=".dprintrc.json"
14
+ {
15
+ "$schema": "https://dprint.dev/schemas/v0.json",
16
+ "extends": ["node_modules/@poool/dprint-config/lib/recommended.json"]
17
+ }
18
+ ```
@@ -0,0 +1,6 @@
1
+ export declare const context: import("@dprint/formatter").FormatterContext;
2
+ declare const _default: {
3
+ context: import("@dprint/formatter").FormatterContext;
4
+ };
5
+ export default _default;
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../lib/index.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,OAAO,8CAAoD,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,5 @@
1
+ import { createContext } from '@dprint/formatter';
2
+ import recommended from './recommended.json' with { type: 'json' };
3
+ export const context = createContext(recommended);
4
+ export default { context };
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../lib/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElD,OAAO,WAAW,MAAM,oBAAoB,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAEnE,MAAM,CAAC,MAAM,OAAO,GAAG,aAAa,CAAC,WAAkC,CAAC,CAAC;AAEzE,eAAe,EAAE,OAAO,EAAE,CAAC"}
@@ -0,0 +1,28 @@
1
+ {
2
+ "$schema": "https://dprint.dev/schemas/v0.json",
3
+ "lineWidth": 100,
4
+ "indentWidth": 2,
5
+ "useTabs": false,
6
+ "newLineKind": "lf",
7
+ "typescript": {
8
+ "quoteStyle": "alwaysSingle",
9
+ "jsx.quoteStyle": "preferDouble",
10
+ "semiColons": "always",
11
+ "trailingCommas": "onlyMultiLine",
12
+ "arrowFunction.useParentheses": "preferNone",
13
+ "quoteProps": "asNeeded",
14
+ "memberExpression.linePerExpression": false,
15
+ "conditionalExpression.linePerExpression": true,
16
+ "objectExpression.spaceSurroundingProperties": true,
17
+ "module.sortImportDeclarations": "maintain",
18
+ "importDeclaration.sortNamedImports": "maintain",
19
+ "exportDeclaration.sortNamedExports": "maintain",
20
+ "module.sortExportDeclarations": "maintain",
21
+ "importDeclaration.forceMultiLine": "whenMultiple"
22
+ },
23
+ "excludes": ["**/node_modules", "**/.yarn", "**/dist", "**/coverage", "**/tmp"],
24
+ "plugins": [
25
+ "https://plugins.dprint.dev/typescript-0.93.4.wasm",
26
+ "https://plugins.dprint.dev/g-plane/malva-v0.16.0.wasm"
27
+ ]
28
+ }
@@ -0,0 +1,16 @@
1
+ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
2
+
3
+ exports[`@poool/dprint-config > should pass base rules 1`] = `
4
+ "const toolongvalue =
5
+ '11111111545644455465464897984684984894894984891984894899849848918949848948998489';
6
+
7
+ const wrongIndent = true
8
+ ? 'yes'
9
+ : 'no';
10
+
11
+ const doubleQuoted = 'outch';
12
+
13
+ const arrotWithParenthesis = a => a;
14
+
15
+ const objectWithoutSpaces = { spaces: false };"
16
+ `;
@@ -0,0 +1,22 @@
1
+ import { readFile } from 'node:fs/promises';
2
+ import { fileURLToPath } from 'node:url';
3
+ import path from 'node:path';
4
+
5
+ import { execa } from 'execa';
6
+
7
+ describe('@poool/dprint-config', () => {
8
+ const $ = execa({ preferLocal: true, reject: false });
9
+
10
+ it('should pass base rules', { timeout: 30000 }, async () => {
11
+ const dirname = path.dirname(fileURLToPath(import.meta.url));
12
+ const fixturePath = path.resolve(dirname, '../../../tests/fixtures/format-errors.ts');
13
+ const configPath = path.resolve(dirname, '../../../tests/fixtures/dprint.json');
14
+ const content = await readFile(fixturePath, 'utf8');
15
+
16
+ const { stdout } = await $({ input: content })`
17
+ dprint fmt --stdin ${fixturePath} --config ${configPath}
18
+ `;
19
+
20
+ expect(stdout).toMatchSnapshot();
21
+ });
22
+ });
package/lib/index.ts ADDED
@@ -0,0 +1,8 @@
1
+ import type { GlobalConfiguration } from '@dprint/formatter';
2
+ import { createContext } from '@dprint/formatter';
3
+
4
+ import recommended from './recommended.json' with { type: 'json' };
5
+
6
+ export const context = createContext(recommended as GlobalConfiguration);
7
+
8
+ export default { context };
@@ -0,0 +1,28 @@
1
+ {
2
+ "$schema": "https://dprint.dev/schemas/v0.json",
3
+ "lineWidth": 100,
4
+ "indentWidth": 2,
5
+ "useTabs": false,
6
+ "newLineKind": "lf",
7
+ "typescript": {
8
+ "quoteStyle": "alwaysSingle",
9
+ "jsx.quoteStyle": "preferDouble",
10
+ "semiColons": "always",
11
+ "trailingCommas": "onlyMultiLine",
12
+ "arrowFunction.useParentheses": "preferNone",
13
+ "quoteProps": "asNeeded",
14
+ "memberExpression.linePerExpression": false,
15
+ "conditionalExpression.linePerExpression": true,
16
+ "objectExpression.spaceSurroundingProperties": true,
17
+ "module.sortImportDeclarations": "maintain",
18
+ "importDeclaration.sortNamedImports": "maintain",
19
+ "exportDeclaration.sortNamedExports": "maintain",
20
+ "module.sortExportDeclarations": "maintain",
21
+ "importDeclaration.forceMultiLine": "whenMultiple"
22
+ },
23
+ "excludes": ["**/node_modules", "**/.yarn", "**/dist", "**/coverage", "**/tmp"],
24
+ "plugins": [
25
+ "https://plugins.dprint.dev/typescript-0.93.4.wasm",
26
+ "https://plugins.dprint.dev/g-plane/malva-v0.16.0.wasm"
27
+ ]
28
+ }
package/package.json ADDED
@@ -0,0 +1,34 @@
1
+ {
2
+ "name": "@poool/dprint-config",
3
+ "version": "6.3.0",
4
+ "description": "Common dprint rules we share between projects at Poool",
5
+ "license": "MIT",
6
+ "author": "Simon Deflesschouwer <simon@poool.fr>",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "https://github.com/p3ol/linter.git",
10
+ "directory": "packages/dprint-config"
11
+ },
12
+ "type": "module",
13
+ "sideEffects": false,
14
+ "main": "dist/index.js",
15
+ "types": "dist/index.d.ts",
16
+ "publishConfig": {
17
+ "access": "public"
18
+ },
19
+ "scripts": {
20
+ "clean": "rm -rf ./dist || true",
21
+ "build": "tsc -p tsconfig.build.json"
22
+ },
23
+ "devDependencies": {
24
+ "@dprint/formatter": "0.5.1",
25
+ "dprint": "0.57.0"
26
+ },
27
+ "peerDependencies": {
28
+ "dprint": ">=0.56.0 <1.0.0"
29
+ },
30
+ "engines": {
31
+ "node": ">=22"
32
+ },
33
+ "gitHead": "bc248a6d4ac0143f192a9625cb83b41f148b2462"
34
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "extends": "./tsconfig.json",
3
+ "compilerOptions": {
4
+ "declaration": true,
5
+ "declarationMap": true,
6
+ "outDir": "./dist",
7
+ "rootDir": "./lib",
8
+ "resolveJsonModule": true,
9
+ "allowImportingTsExtensions": false,
10
+ "noEmit": false
11
+ },
12
+ "exclude": ["**/*.test.ts", "jest.config.ts", "./dist/*"]
13
+ }
package/tsconfig.json ADDED
@@ -0,0 +1,4 @@
1
+ {
2
+ "extends": "../../tsconfig.json",
3
+ "include": ["*.ts", "**/*.ts", "*.js", "**/*.js"]
4
+ }