@phiphi/oxfmt-config 0.0.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/.npmignore ADDED
@@ -0,0 +1,7 @@
1
+ **/__tests__/**
2
+ src
3
+ !.npmignore
4
+ tsconfig.json
5
+ tsdown.config.ts
6
+ vitest.config.ts
7
+ vitest.setup.ts
@@ -0,0 +1,22 @@
1
+ $ tsdown
2
+ ℹ tsdown v0.22.14 powered by rolldown v1.2.0
3
+ ℹ config file: /Volumes/Dev/aphilibeaux/frontends-libs/packages/oxfmt/tsdown.config.ts
4
+ (node:16043) [MODULE_TYPELESS_PACKAGE_JSON] Warning: Module type of file:///Volumes/Dev/aphilibeaux/frontends-libs/tsdown.config.ts?no-cache=f6af67ff-d7e7-41b0-a567-73cfaa8e6be2 is not specified and it doesn't parse as CommonJS.
5
+ Reparsing as ES module because module syntax was detected. This incurs a performance overhead.
6
+ To eliminate this warning, add "type": "module" to /Volumes/Dev/aphilibeaux/frontends-libs/package.json.
7
+ (Use `node --trace-warnings ...` to show where the warning was created)
8
+ ℹ entry: src/index.ts
9
+ ℹ targets: chrome111, edge111, firefox114, safari16.4, ios16.4
10
+ ℹ tsconfig: tsconfig.json
11
+ ℹ Build start
12
+ ℹ Cleaning 2 files
13
+
14
+  WARN  TypeScript 7.0 does not yet have a stable API and is experimental. Some options will be unavailable.
15
+
16
+ ℹ Emit types with typescript@7.0.2
17
+ ℹ dist/index.js 1.12 kB │ gzip: 0.58 kB
18
+ ℹ dist/index.d.ts 0.24 kB │ gzip: 0.16 kB
19
+ ℹ 2 files, total: 1.36 kB
20
+ ✔ Build complete in 270ms
21
+ ✔ [attw] No problems found (444ms)
22
+ ✔ [publint] No issues found (520ms)
package/CHANGELOG.md ADDED
@@ -0,0 +1 @@
1
+ # @philibea/oxfmt-config
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 philibeaux
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,37 @@
1
+ # @phiphi/oxfmt-config
2
+
3
+ Scaleway's shareable configuration for [oxfmt](https://oxc.rs/docs/guide/usage/formatter.html).
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install --save-dev @phiphi/oxfmt-config
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ Create a `oxfmt.config.ts` file in your project root:
14
+
15
+ ```ts
16
+ import config from '@phiphi/oxfmt-config'
17
+
18
+ export default config
19
+ ```
20
+
21
+ Or if you want to extends defaults
22
+
23
+ ```ts
24
+ import { defineConfig } from 'oxfmt'
25
+ import config, { mergeConfig } from '@phiphi/oxfmt-config'
26
+
27
+ export default mergeConfig(
28
+ config,
29
+ defineConfig({
30
+ ignorePatterns: ['custom_path/**'],
31
+ }),
32
+ )
33
+ ```
34
+
35
+ ## License
36
+
37
+ MIT
@@ -0,0 +1,6 @@
1
+ import { OxfmtConfig } from "oxfmt";
2
+ //#region src/index.d.ts
3
+ declare const config: OxfmtConfig;
4
+ declare const mergeConfig: (configA: OxfmtConfig, configB: OxfmtConfig) => OxfmtConfig;
5
+ //#endregion
6
+ export { config as default, mergeConfig };
package/dist/index.js ADDED
@@ -0,0 +1,53 @@
1
+ import { deepmerge } from "deepmerge-ts";
2
+ import { defineConfig } from "oxfmt";
3
+ //#region src/index.ts
4
+ const config = defineConfig({
5
+ useTabs: false,
6
+ tabWidth: 2,
7
+ printWidth: 120,
8
+ singleQuote: true,
9
+ jsxSingleQuote: false,
10
+ quoteProps: "as-needed",
11
+ trailingComma: "all",
12
+ semi: false,
13
+ arrowParens: "avoid",
14
+ bracketSameLine: false,
15
+ bracketSpacing: true,
16
+ sortPackageJson: true,
17
+ embeddedLanguageFormatting: "auto",
18
+ endOfLine: "lf",
19
+ objectWrap: "preserve",
20
+ proseWrap: "preserve",
21
+ sortImports: {
22
+ newlinesBetween: false,
23
+ order: "asc"
24
+ },
25
+ ignorePatterns: [
26
+ "CHANGELOG.md",
27
+ ".changeset",
28
+ "pnpm-workspace.yaml",
29
+ "**/_generated",
30
+ "**/*.gen.*",
31
+ "**/.next",
32
+ "**/next-env.d.ts",
33
+ "**/.output",
34
+ "**/dist",
35
+ "**/build",
36
+ "**/out",
37
+ "**/.turbo",
38
+ "**/storybook-static",
39
+ "**/.cache",
40
+ "**/public/build",
41
+ "**/.vite",
42
+ "**/coverage",
43
+ "**/.nyc_output",
44
+ "**/*.auto.*",
45
+ "**/graphql-types.*",
46
+ "**/schema.d.ts",
47
+ "**/schema.graphql.d.ts",
48
+ "**/*.d.ts.map"
49
+ ]
50
+ });
51
+ const mergeConfig = (configA, configB) => deepmerge(configA, configB);
52
+ //#endregion
53
+ export { config as default, mergeConfig };
package/package.json ADDED
@@ -0,0 +1,45 @@
1
+ {
2
+ "name": "@phiphi/oxfmt-config",
3
+ "version": "0.0.1",
4
+ "description": "Shareable configuration for oxfmt",
5
+ "keywords": [
6
+ "config",
7
+ "fmt",
8
+ "oxfmt",
9
+ "oxfmt-config"
10
+ ],
11
+ "homepage": "https://github.com/philibea/frontends-libs/tree/main/packages/oxfmt-config",
12
+ "bugs": {
13
+ "url": "https://github.com/philibea/frontends-libs/issues"
14
+ },
15
+ "license": "MIT",
16
+ "repository": {
17
+ "type": "git",
18
+ "url": "git+https://github.com/philibea/frontends-libs.git",
19
+ "directory": "packages/oxfmt-config"
20
+ },
21
+ "type": "module",
22
+ "sideEffects": false,
23
+ "types": "./dist/index.d.ts",
24
+ "exports": {
25
+ ".": "./dist/index.js",
26
+ "./package.json": "./package.json"
27
+ },
28
+ "publishConfig": {
29
+ "access": "public"
30
+ },
31
+ "dependencies": {
32
+ "deepmerge-ts": "7.1.5"
33
+ },
34
+ "devDependencies": {
35
+ "oxfmt": "0.58.0"
36
+ },
37
+ "peerDependencies": {
38
+ "oxfmt": ">=0.45.0"
39
+ },
40
+ "scripts": {
41
+ "typecheck": "tsc --noEmit",
42
+ "build": "tsdown",
43
+ "build:profile": "npx vite-bundle-visualizer -c vite.config.ts"
44
+ }
45
+ }