Skip to content

Commit 1268a7c

Browse files
committed
Refactor package.json
1 parent 3a406c3 commit 1268a7c

File tree

2 files changed

+58
-47
lines changed

2 files changed

+58
-47
lines changed

index.d.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ export interface LeafDirective extends Parent, DirectiveFields {
6060
/**
6161
* Children of leaf directive.
6262
*/
63-
children: PhrasingContent[]
63+
children: Array<PhrasingContent>
6464

6565
/**
6666
* Data associated with the mdast leaf directive.
@@ -85,7 +85,7 @@ export interface TextDirective extends DirectiveFields, Parent {
8585
/**
8686
* Children of text directive.
8787
*/
88-
children: PhrasingContent[]
88+
children: Array<PhrasingContent>
8989

9090
/**
9191
* Data associated with the text leaf directive.

package.json

+56-45
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,9 @@
11
{
2-
"name": "mdast-util-directive",
3-
"version": "3.0.0",
4-
"description": "mdast extension to parse and serialize generic directives (`:cite[smith04]`)",
5-
"license": "MIT",
6-
"keywords": [
7-
"unist",
8-
"mdast",
9-
"mdast-util",
10-
"util",
11-
"utility",
12-
"markdown",
13-
"markup",
14-
"generic",
15-
"directive",
16-
"container",
17-
"extension"
18-
],
19-
"repository": "syntax-tree/mdast-util-directive",
20-
"bugs": "https://github.com/syntax-tree/mdast-util-directive/issues",
21-
"funding": {
22-
"type": "opencollective",
23-
"url": "https://opencollective.com/unified"
24-
},
252
"author": "Titus Wormer <[email protected]> (https://wooorm.com)",
3+
"bugs": "https://github.com/syntax-tree/mdast-util-directive/issues",
264
"contributors": [
275
"Titus Wormer <[email protected]> (https://wooorm.com)"
286
],
29-
"sideEffects": false,
30-
"type": "module",
31-
"exports": "./index.js",
32-
"files": [
33-
"lib/",
34-
"index.d.ts",
35-
"index.js"
36-
],
377
"dependencies": {
388
"@types/mdast": "^4.0.0",
399
"@types/unist": "^3.0.0",
@@ -44,6 +14,7 @@
4414
"stringify-entities": "^4.0.0",
4515
"unist-util-visit-parents": "^6.0.0"
4616
},
17+
"description": "mdast extension to parse and serialize generic directives (`:cite[smith04]`)",
4718
"devDependencies": {
4819
"@types/node": "^22.0.0",
4920
"c8": "^10.0.0",
@@ -56,16 +27,31 @@
5627
"unist-util-remove-position": "^5.0.0",
5728
"xo": "^0.60.0"
5829
},
59-
"scripts": {
60-
"prepack": "npm run build && npm run format",
61-
"build": "tsc --build --clean && tsc --build && type-coverage",
62-
"format": "remark . -qfo && prettier . -w --loglevel warn && xo --fix",
63-
"test-api-prod": "node --conditions production test.js",
64-
"test-api-dev": "node --conditions development test.js",
65-
"test-api": "npm run test-api-dev && npm run test-api-prod",
66-
"test-coverage": "c8 --100 --reporter lcov npm run test-api",
67-
"test": "npm run build && npm run format && npm run test-coverage"
30+
"exports": "./index.js",
31+
"files": [
32+
"index.d.ts",
33+
"index.js",
34+
"lib/"
35+
],
36+
"funding": {
37+
"type": "opencollective",
38+
"url": "https://opencollective.com/unified"
6839
},
40+
"keywords": [
41+
"container",
42+
"directive",
43+
"extension",
44+
"generic",
45+
"markdown",
46+
"markup",
47+
"mdast-util",
48+
"mdast",
49+
"unist",
50+
"utility",
51+
"util"
52+
],
53+
"license": "MIT",
54+
"name": "mdast-util-directive",
6955
"prettier": {
7056
"bracketSpacing": false,
7157
"semi": false,
@@ -79,21 +65,46 @@
7965
"remark-preset-wooorm"
8066
]
8167
},
68+
"repository": "syntax-tree/mdast-util-directive",
69+
"scripts": {
70+
"build": "tsc --build --clean && tsc --build && type-coverage",
71+
"format": "remark --frail --output --quiet -- . && prettier --log-level warn --write -- . && xo --fix",
72+
"test-api-dev": "node --conditions development test.js",
73+
"test-api-prod": "node --conditions production test.js",
74+
"test-api": "npm run test-api-dev && npm run test-api-prod",
75+
"test-coverage": "c8 --100 --reporter lcov -- npm run test-api",
76+
"test": "npm run build && npm run format && npm run test-coverage"
77+
},
78+
"sideEffects": false,
8279
"typeCoverage": {
8380
"atLeast": 100,
84-
"detail": true,
85-
"ignoreCatch": true,
8681
"strict": true
8782
},
83+
"type": "module",
84+
"version": "3.0.0",
8885
"xo": {
8986
"overrides": [
9087
{
9188
"files": [
92-
"**/*.ts"
89+
"**/*.d.ts"
9390
],
9491
"rules": {
95-
"@typescript-eslint/ban-types": "off",
96-
"@typescript-eslint/consistent-type-definitions": "off"
92+
"@typescript-eslint/array-type": [
93+
"error",
94+
{
95+
"default": "generic"
96+
}
97+
],
98+
"@typescript-eslint/ban-types": [
99+
"error",
100+
{
101+
"extendDefaults": true
102+
}
103+
],
104+
"@typescript-eslint/consistent-type-definitions": [
105+
"error",
106+
"interface"
107+
]
97108
}
98109
}
99110
],

0 commit comments

Comments
 (0)