@gurso/oxc-config 0.0.2
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/.gitlab-ci.yml +50 -0
- package/README.md +1 -0
- package/fmt.ts +3 -0
- package/index.ts +3 -0
- package/oxfmt.config.ts +9 -0
- package/package.json +27 -0
- package/postinstall.js +14 -0
- package/tsconfig.json +23 -0
package/.gitlab-ci.yml
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
image: node
|
|
2
|
+
|
|
3
|
+
stages:
|
|
4
|
+
- test
|
|
5
|
+
- deploy
|
|
6
|
+
|
|
7
|
+
variables:
|
|
8
|
+
npm_config_cache: "$CI_PROJECT_DIR/.npm"
|
|
9
|
+
|
|
10
|
+
cache:
|
|
11
|
+
key:
|
|
12
|
+
files:
|
|
13
|
+
- package-lock.json
|
|
14
|
+
paths:
|
|
15
|
+
- .npm/
|
|
16
|
+
|
|
17
|
+
before_script:
|
|
18
|
+
- npm ci --prefer-offline
|
|
19
|
+
|
|
20
|
+
.test_template:
|
|
21
|
+
stage: test
|
|
22
|
+
# rules:
|
|
23
|
+
# - if: $CI_COMMIT_TAG =~ /^v(\d+\.){2}\d+$/
|
|
24
|
+
|
|
25
|
+
lint:
|
|
26
|
+
extends: .test_template
|
|
27
|
+
script:
|
|
28
|
+
- npm run lint
|
|
29
|
+
|
|
30
|
+
format:
|
|
31
|
+
extends: .test_template
|
|
32
|
+
script:
|
|
33
|
+
- npm run fmt
|
|
34
|
+
|
|
35
|
+
typecheck:
|
|
36
|
+
extends: .test_template
|
|
37
|
+
script:
|
|
38
|
+
- npm run typecheck
|
|
39
|
+
|
|
40
|
+
publish:
|
|
41
|
+
stage: deploy
|
|
42
|
+
id_tokens:
|
|
43
|
+
NPM_ID_TOKEN:
|
|
44
|
+
aud: "npm:registry.npmjs.org"
|
|
45
|
+
SIGSTORE_ID_TOKEN:
|
|
46
|
+
aud: sigstore
|
|
47
|
+
rules:
|
|
48
|
+
- if: $CI_COMMIT_TAG =~ /^v(\d+\.){2}\d+$/
|
|
49
|
+
script:
|
|
50
|
+
- npm publish --access public
|
package/README.md
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# oxc-config
|
package/fmt.ts
ADDED
package/index.ts
ADDED
package/oxfmt.config.ts
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@gurso/oxc-config",
|
|
3
|
+
"version": "0.0.2",
|
|
4
|
+
"keywords": [
|
|
5
|
+
"oxc"
|
|
6
|
+
],
|
|
7
|
+
"homepage": "https://gitlab.com/gurso/oxc-config#readme",
|
|
8
|
+
"bugs": {
|
|
9
|
+
"url": "https://gitlab.com/gurso/oxc-config/issues"
|
|
10
|
+
},
|
|
11
|
+
"repository": {
|
|
12
|
+
"type": "git",
|
|
13
|
+
"url": "git+ssh://git@gitlab.com/gurso/oxc-config.git"
|
|
14
|
+
},
|
|
15
|
+
"type": "module",
|
|
16
|
+
"scripts": {
|
|
17
|
+
"lint": "echo 'TODO: lint stuff'",
|
|
18
|
+
"fmt": "oxfmt --check",
|
|
19
|
+
"typecheck": "tsc --noEmit"
|
|
20
|
+
},
|
|
21
|
+
"dependencies": {
|
|
22
|
+
"oxfmt": "0.48.0"
|
|
23
|
+
},
|
|
24
|
+
"devDependencies": {
|
|
25
|
+
"typescript": "6.0.3"
|
|
26
|
+
}
|
|
27
|
+
}
|
package/postinstall.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { existsSync, copyFile } from "node:fs"
|
|
2
|
+
import { resolve } from "node:path"
|
|
3
|
+
import pkg from "./package.json" with { type: "json" }
|
|
4
|
+
|
|
5
|
+
const [scope] = pkg.name.split("/")
|
|
6
|
+
const scopeFolder = resolve("./").split("/").at(-2)
|
|
7
|
+
|
|
8
|
+
const destFile = resolve("../../../oxfmt.config.ts")
|
|
9
|
+
|
|
10
|
+
if (scope === scopeFolder && !existsSync(destFile)) {
|
|
11
|
+
copyFile(resolve("./oxfmt.config.ts"), destFile, err => {
|
|
12
|
+
if (err) console.error(err)
|
|
13
|
+
})
|
|
14
|
+
}
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"rootDir": "./",
|
|
4
|
+
// "outDir": "./dist",
|
|
5
|
+
|
|
6
|
+
"target": "ES2020",
|
|
7
|
+
"lib": ["ESNext"],
|
|
8
|
+
"module": "nodenext",
|
|
9
|
+
"moduleResolution": "nodenext",
|
|
10
|
+
"esModuleInterop": true,
|
|
11
|
+
"allowSyntheticDefaultImports": true,
|
|
12
|
+
|
|
13
|
+
"noUncheckedIndexedAccess": true,
|
|
14
|
+
"exactOptionalPropertyTypes": true,
|
|
15
|
+
|
|
16
|
+
"strict": true,
|
|
17
|
+
"verbatimModuleSyntax": true,
|
|
18
|
+
"isolatedModules": true,
|
|
19
|
+
"noUncheckedSideEffectImports": true,
|
|
20
|
+
"moduleDetection": "force",
|
|
21
|
+
"skipLibCheck": true
|
|
22
|
+
}
|
|
23
|
+
}
|