mirror of
https://github.com/DavidAnson/markdownlint-cli2-action.git
synced 2024-12-22 04:43:32 +01:00
Initial implementation.
This commit is contained in:
parent
43204394f8
commit
7cf57ac21e
6 changed files with 28936 additions and 84 deletions
84
.gitignore
vendored
84
.gitignore
vendored
|
@ -6,99 +6,15 @@ yarn-debug.log*
|
|||
yarn-error.log*
|
||||
lerna-debug.log*
|
||||
|
||||
# Diagnostic reports (https://nodejs.org/api/report.html)
|
||||
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
|
||||
|
||||
# Runtime data
|
||||
pids
|
||||
*.pid
|
||||
*.seed
|
||||
*.pid.lock
|
||||
|
||||
# Directory for instrumented libs generated by jscoverage/JSCover
|
||||
lib-cov
|
||||
|
||||
# Coverage directory used by tools like istanbul
|
||||
coverage
|
||||
*.lcov
|
||||
|
||||
# nyc test coverage
|
||||
.nyc_output
|
||||
|
||||
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
|
||||
.grunt
|
||||
|
||||
# Bower dependency directory (https://bower.io/)
|
||||
bower_components
|
||||
|
||||
# node-waf configuration
|
||||
.lock-wscript
|
||||
|
||||
# Compiled binary addons (https://nodejs.org/api/addons.html)
|
||||
build/Release
|
||||
|
||||
# Dependency directories
|
||||
node_modules/
|
||||
jspm_packages/
|
||||
|
||||
# TypeScript v1 declaration files
|
||||
typings/
|
||||
|
||||
# TypeScript cache
|
||||
*.tsbuildinfo
|
||||
|
||||
# Optional npm cache directory
|
||||
.npm
|
||||
|
||||
# Optional eslint cache
|
||||
.eslintcache
|
||||
|
||||
# Microbundle cache
|
||||
.rpt2_cache/
|
||||
.rts2_cache_cjs/
|
||||
.rts2_cache_es/
|
||||
.rts2_cache_umd/
|
||||
|
||||
# Optional REPL history
|
||||
.node_repl_history
|
||||
|
||||
# Output of 'npm pack'
|
||||
*.tgz
|
||||
|
||||
# Yarn Integrity file
|
||||
.yarn-integrity
|
||||
|
||||
# dotenv environment variables file
|
||||
.env
|
||||
.env.test
|
||||
|
||||
# parcel-bundler cache (https://parceljs.org/)
|
||||
.cache
|
||||
|
||||
# Next.js build output
|
||||
.next
|
||||
|
||||
# Nuxt.js build / generate output
|
||||
.nuxt
|
||||
dist
|
||||
|
||||
# Gatsby files
|
||||
.cache/
|
||||
# Comment in the public line in if your project uses Gatsby and *not* Next.js
|
||||
# https://nextjs.org/blog/next-9-1#public-directory-support
|
||||
# public
|
||||
|
||||
# vuepress build output
|
||||
.vuepress/dist
|
||||
|
||||
# Serverless directories
|
||||
.serverless/
|
||||
|
||||
# FuseBox cache
|
||||
.fusebox/
|
||||
|
||||
# DynamoDB Local files
|
||||
.dynamodb/
|
||||
|
||||
# TernJS port file
|
||||
.tern-port
|
||||
|
|
11
README.md
11
README.md
|
@ -1,2 +1,13 @@
|
|||
# markdownlint-cli2-action
|
||||
|
||||
A GitHub Action to run the markdownlint-cli2 tool for linting Markdown/CommonMark files with the markdownlint library
|
||||
|
||||
## Inputs
|
||||
|
||||
### glob
|
||||
|
||||
...
|
||||
|
||||
## Example
|
||||
|
||||
...
|
||||
|
|
11
action.yml
Normal file
11
action.yml
Normal file
|
@ -0,0 +1,11 @@
|
|||
name: 'markdownlint-cli2-action'
|
||||
author: 'David Anson'
|
||||
description: 'A GitHub Action to run the markdownlint-cli2 tool for linting Markdown/CommonMark files with the markdownlint library'
|
||||
inputs:
|
||||
glob:
|
||||
description: 'Glob expression of files to lint'
|
||||
default: '*.{md,markdown}'
|
||||
required: false
|
||||
runs:
|
||||
using: 'node12'
|
||||
main: 'dist/index.js'
|
28869
dist/index.js
vendored
Normal file
28869
dist/index.js
vendored
Normal file
File diff suppressed because one or more lines are too long
18
markdownlint-cli2-action.js
Normal file
18
markdownlint-cli2-action.js
Normal file
|
@ -0,0 +1,18 @@
|
|||
// @ts-check
|
||||
|
||||
"use strict";
|
||||
|
||||
const core = require("@actions/core");
|
||||
// const github = require("@actions/github");
|
||||
const { "main": markdownlintCli2 } = require("markdownlint-cli2");
|
||||
|
||||
const logMessage = core.info;
|
||||
const logError = core.error;
|
||||
markdownlintCli2({
|
||||
"argv": [],
|
||||
logMessage,
|
||||
logError
|
||||
}).then(
|
||||
(exitCode) => exitCode && core.setFailed(`Failed with exit code: ${exitCode}`),
|
||||
(reason) => core.setFailed(`Failed due to reason: ${reason}`)
|
||||
);
|
27
package.json
Normal file
27
package.json
Normal file
|
@ -0,0 +1,27 @@
|
|||
{
|
||||
"name": "markdownlint-cli2-action",
|
||||
"version": "0.0.1",
|
||||
"description": "A GitHub Action to run the markdownlint-cli2 tool for linting Markdown/CommonMark files with the markdownlint library",
|
||||
"author": {
|
||||
"name": "David Anson",
|
||||
"url": "https://dlaa.me/"
|
||||
},
|
||||
"license": "MIT",
|
||||
"homepage": "https://github.com/DavidAnson/markdownlint-cli2-action",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/DavidAnson/markdownlint-cli2-action.git"
|
||||
},
|
||||
"bugs": "https://github.com/DavidAnson/markdownlint-cli2-action/issues",
|
||||
"scripts": {
|
||||
"build": "ncc build markdownlint-cli2-action.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@actions/core": "~1.2.6",
|
||||
"@actions/github": "~4.0.0",
|
||||
"markdownlint-cli2": "~0.0.13"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@vercel/ncc": "~0.27.0"
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue