diff --git a/.remarkignore b/.remarkignore new file mode 100644 index 0000000..65e3ba2 --- /dev/null +++ b/.remarkignore @@ -0,0 +1 @@ +test/ diff --git a/index.js b/index.js index f7805c3..3dfb120 100644 --- a/index.js +++ b/index.js @@ -28,7 +28,7 @@ export default function remarkGfm(options = {}) { // Other extensions /* c8 ignore next 2 */ // @ts-expect-error: to do: remove when remark is released. - data[field] ? data[field] : (data[field] = []) + data[field] || (data[field] = []) ) list.push(value) diff --git a/package.json b/package.json index 111b0e8..bc6bc8e 100644 --- a/package.json +++ b/package.json @@ -4,19 +4,19 @@ "description": "remark plugin to support GFM (autolink literals, footnotes, strikethrough, tables, tasklists)", "license": "MIT", "keywords": [ - "unified", + "autolink", + "footnote", + "gfm", + "github", + "markdown", + "mdast", + "plugin", "remark", "remark-plugin", - "plugin", - "mdast", - "markdown", - "table", "strikethrough", + "table", "tasklist", - "autolink", - "footnote", - "github", - "gfm" + "unified" ], "repository": "remarkjs/remark-gfm", "bugs": "https://github.com/remarkjs/remark-gfm/issues", @@ -59,34 +59,32 @@ }, "scripts": { "build": "tsc --build --clean && tsc --build && type-coverage", - "format": "remark . -qfo --ignore-pattern test/ && prettier . -w --log-level warn && xo --fix", + "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 --check-coverage --branches 100 --functions 100 --lines 100 --statements 100 --reporter lcov npm run test-api", - "test": "npm run build && npm run format && npm run test-coverage" + "test-coverage": "c8 --100 --reporter lcov npm run test-api" }, "prettier": { - "tabWidth": 2, - "useTabs": false, - "singleQuote": true, "bracketSpacing": false, + "singleQuote": true, "semi": false, - "trailingComma": "none" - }, - "xo": { - "prettier": true, - "rules": { - "unicorn/prefer-logical-operator-over-ternary": "off" - } + "tabWidth": 2, + "trailingComma": "none", + "useTabs": false }, "remarkConfig": { "plugins": [ - "preset-wooorm" + "remark-preset-wooorm" ] }, "typeCoverage": { "atLeast": 100, "detail": true, - "strict": true, - "ignoreCatch": true + "ignoreCatch": true, + "strict": true + }, + "xo": { + "prettier": true } }