@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 +7 -0
- package/.turbo/turbo-build.log +22 -0
- package/CHANGELOG.md +1 -0
- package/LICENSE +21 -0
- package/README.md +37 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +53 -0
- package/package.json +45 -0
package/.npmignore
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
[2m$ tsdown[22m
|
|
2
|
+
[34mℹ[39m [34mtsdown v0.22.14[39m powered by [38;2;255;126;23mrolldown v1.2.0[39m
|
|
3
|
+
[34mℹ[39m config file: [4m/Volumes/Dev/aphilibeaux/frontends-libs/packages/oxfmt/tsdown.config.ts[24m
|
|
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
|
+
[34mℹ[39m entry: [34msrc/index.ts[39m
|
|
9
|
+
[34mℹ[39m targets: [34mchrome111, edge111, firefox114, safari16.4, ios16.4[39m
|
|
10
|
+
[34mℹ[39m tsconfig: [34mtsconfig.json[39m
|
|
11
|
+
[34mℹ[39m Build start
|
|
12
|
+
[34mℹ[39m Cleaning 2 files
|
|
13
|
+
|
|
14
|
+
[43m WARN [49m TypeScript 7.0 does not yet have a stable API and is experimental. Some options will be unavailable.
|
|
15
|
+
|
|
16
|
+
[34mℹ[39m Emit types with [4mtypescript@7.0.2[24m
|
|
17
|
+
[34mℹ[39m [2mdist/[22m[1mindex.js[22m [2m1.12 kB[22m [2m│ gzip: 0.58 kB[22m
|
|
18
|
+
[34mℹ[39m [2mdist/[22m[32m[1mindex.d.ts[22m[39m [2m0.24 kB[22m [2m│ gzip: 0.16 kB[22m
|
|
19
|
+
[34mℹ[39m 2 files, total: 1.36 kB
|
|
20
|
+
[32m✔[39m Build complete in [32m270ms[39m
|
|
21
|
+
[32m✔[39m [2m[attw][22m No problems found [2m(444ms)[22m
|
|
22
|
+
[32m✔[39m [2m[publint][22m No issues found [2m(520ms)[22m
|
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
|
package/dist/index.d.ts
ADDED
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
|
+
}
|