From da382350ccbf4902572ea46dd6a6ebd839e50433 Mon Sep 17 00:00:00 2001 From: Titus Wormer Date: Mon, 20 Jan 2025 10:29:03 +0100 Subject: [PATCH] Refactor `package.json` --- .prettierignore | 3 +- package.json | 82 +++++++++---------- .../strikethrough-not-one/config.json | 2 +- test/fixtures/table-no-align/config.json | 2 +- test/fixtures/table-no-align/tree.json | 7 +- test/fixtures/table-no-padding/config.json | 2 +- test/fixtures/table-no-padding/tree.json | 7 +- test/fixtures/table-string-length/config.json | 2 +- test/fixtures/table-string-length/tree.json | 6 +- test/fixtures/table/tree.json | 7 +- 10 files changed, 49 insertions(+), 71 deletions(-) diff --git a/.prettierignore b/.prettierignore index e7939c4..8d01c59 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,3 +1,2 @@ -coverage/ -*.json *.md +coverage/ diff --git a/package.json b/package.json index 87fd903..596e81a 100644 --- a/package.json +++ b/package.json @@ -1,41 +1,9 @@ { - "name": "remark-gfm", - "version": "4.0.0", - "description": "remark plugin to support GFM (autolink literals, footnotes, strikethrough, tables, tasklists)", - "license": "MIT", - "keywords": [ - "autolink", - "footnote", - "gfm", - "github", - "markdown", - "mdast", - "plugin", - "remark", - "remark-plugin", - "strikethrough", - "table", - "tasklist", - "unified" - ], - "repository": "remarkjs/remark-gfm", - "bugs": "https://github.com/remarkjs/remark-gfm/issues", - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - }, "author": "Titus Wormer (https://wooorm.com)", + "bugs": "https://github.com/remarkjs/remark-gfm/issues", "contributors": [ "Titus Wormer (https://wooorm.com)" ], - "sideEffects": false, - "type": "module", - "exports": "./index.js", - "files": [ - "lib/", - "index.d.ts", - "index.js" - ], "dependencies": { "@types/mdast": "^4.0.0", "mdast-util-gfm": "^3.0.0", @@ -44,6 +12,7 @@ "remark-stringify": "^11.0.0", "unified": "^11.0.0" }, + "description": "remark plugin to support GFM (autolink literals, footnotes, strikethrough, tables, tasklists)", "devDependencies": { "@types/node": "^22.0.0", "c8": "^10.0.0", @@ -58,14 +27,33 @@ "typescript": "^5.0.0", "xo": "^0.60.0" }, - "scripts": { - "build": "tsc --build --clean && tsc --build && type-coverage", - "format": "remark . --frail --output --quiet && prettier . --log-level warn --write && xo --fix", - "prepack": "npm run build && npm run format", - "test": "npm run build && npm run format && npm run test-coverage", - "test-api": "node --conditions development test/index.js", - "test-coverage": "c8 --100 --reporter lcov npm run test-api" + "exports": "./index.js", + "files": [ + "index.d.ts", + "index.js", + "lib/" + ], + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" }, + "keywords": [ + "autolink", + "footnote", + "gfm", + "github", + "markdown", + "mdast", + "plugin", + "remark", + "remark-plugin", + "strikethrough", + "table", + "tasklist", + "unified" + ], + "license": "MIT", + "name": "remark-gfm", "prettier": { "bracketSpacing": false, "singleQuote": true, @@ -79,12 +67,22 @@ "remark-preset-wooorm" ] }, + "repository": "remarkjs/remark-gfm", + "scripts": { + "build": "tsc --build --clean && tsc --build && type-coverage", + "format": "remark . --frail --output --quiet && prettier . --log-level warn --write && xo --fix", + "prepack": "npm run build && npm run format", + "test": "npm run build && npm run format && npm run test-coverage", + "test-api": "node --conditions development test/index.js", + "test-coverage": "c8 --100 --reporter lcov npm run test-api" + }, + "sideEffects": false, "typeCoverage": { "atLeast": 100, - "detail": true, - "ignoreCatch": true, "strict": true }, + "type": "module", + "version": "4.0.0", "xo": { "overrides": [ { diff --git a/test/fixtures/strikethrough-not-one/config.json b/test/fixtures/strikethrough-not-one/config.json index f9ccf43..9ebe776 100644 --- a/test/fixtures/strikethrough-not-one/config.json +++ b/test/fixtures/strikethrough-not-one/config.json @@ -1,3 +1,3 @@ { "singleTilde": false -} \ No newline at end of file +} diff --git a/test/fixtures/table-no-align/config.json b/test/fixtures/table-no-align/config.json index 79510c8..eeaeb82 100644 --- a/test/fixtures/table-no-align/config.json +++ b/test/fixtures/table-no-align/config.json @@ -1,3 +1,3 @@ { "tablePipeAlign": false -} \ No newline at end of file +} diff --git a/test/fixtures/table-no-align/tree.json b/test/fixtures/table-no-align/tree.json index 7ccf685..eebf698 100644 --- a/test/fixtures/table-no-align/tree.json +++ b/test/fixtures/table-no-align/tree.json @@ -3,12 +3,7 @@ "children": [ { "type": "table", - "align": [ - null, - "left", - "right", - "center" - ], + "align": [null, "left", "right", "center"], "children": [ { "type": "tableRow", diff --git a/test/fixtures/table-no-padding/config.json b/test/fixtures/table-no-padding/config.json index 589c52b..08e3189 100644 --- a/test/fixtures/table-no-padding/config.json +++ b/test/fixtures/table-no-padding/config.json @@ -1,3 +1,3 @@ { "tableCellPadding": false -} \ No newline at end of file +} diff --git a/test/fixtures/table-no-padding/tree.json b/test/fixtures/table-no-padding/tree.json index 7ccf685..eebf698 100644 --- a/test/fixtures/table-no-padding/tree.json +++ b/test/fixtures/table-no-padding/tree.json @@ -3,12 +3,7 @@ "children": [ { "type": "table", - "align": [ - null, - "left", - "right", - "center" - ], + "align": [null, "left", "right", "center"], "children": [ { "type": "tableRow", diff --git a/test/fixtures/table-string-length/config.json b/test/fixtures/table-string-length/config.json index 31778c8..49fffba 100644 --- a/test/fixtures/table-string-length/config.json +++ b/test/fixtures/table-string-length/config.json @@ -1,3 +1,3 @@ { "stringLength": "this is overwritten in `test/index.js`" -} \ No newline at end of file +} diff --git a/test/fixtures/table-string-length/tree.json b/test/fixtures/table-string-length/tree.json index 554d233..c00e2a5 100644 --- a/test/fixtures/table-string-length/tree.json +++ b/test/fixtures/table-string-length/tree.json @@ -3,11 +3,7 @@ "children": [ { "type": "table", - "align": [ - null, - null, - null - ], + "align": [null, null, null], "children": [ { "type": "tableRow", diff --git a/test/fixtures/table/tree.json b/test/fixtures/table/tree.json index 4c9482c..088dc63 100644 --- a/test/fixtures/table/tree.json +++ b/test/fixtures/table/tree.json @@ -3,12 +3,7 @@ "children": [ { "type": "table", - "align": [ - null, - "left", - "right", - "center" - ], + "align": [null, "left", "right", "center"], "children": [ { "type": "tableRow",