sagiegurari / grunt-markdownlint Goto Github PK
View Code? Open in Web Editor NEWA grunt task for markdown style checker and lint tool.
License: Apache License 2.0
A grunt task for markdown style checker and lint tool.
License: Apache License 2.0
This package does not indicate which versions of Node are supported.
For example, your update of "markdownlint" caused the supported version
of Node to change in a patch release. This requires others to have to track
through your commits as well as those of your dependencies to figure out
WTH happened. While I see no reason for this package to have specified a
newer version of "markdownlint" (since its API did not change), this change
would have been caught by TravisCI if "engines" had been specified.
This fix should officially update the package version to 2.0.0, as should
have occurred for 1.1.5.
...
"engines": {
"node": ">= 6.14.12",
"npm": ">= 3.10.10"
}
}
0.4.0 - Add MD044, enhance MD013/MD032/MD041/MD042/MD043, fix for MD038, dependencies.
Doesn't accept markdownlint config file.
markdownlint: {
all: {
options: {
config: './markdownlint.json'
},
src: [
'src/**/*.md'
]
}
},
I believe this would make things much simpler.
Possible grunt-markdownlint bug.
On the stage “Registering Gruntfile tasks” after
Loading "grunt-markdownlint.js" tasks…OK
+ markdownlint
Loading "linter.js" tasks…OK
>> No tasks were registered or unregistered.
I’m not getting it for any of my 50 Grunt plugins.
This configuration on GitHub, Travis CI build for it.
Gruntfile.coffee
:
module.exports = (grunt) ->
grunt.loadNpmTasks('grunt-markdownlint')
# [INFO] Or any another working Grunt plugins instead of “grunt-contrib-stylus”,
# “grunt-purgecss” and “merge-source-maps”
grunt.loadNpmTasks('grunt-contrib-stylus')
grunt.loadNpmTasks('grunt-purgecss')
grunt.loadNpmTasks('merge-source-maps')
grunt.initConfig
markdownlint:
# [INFO] Or any another valid Markdown file
src: ["KiraGoddess.md"]
package.json
:
{
"devDependencies": {
"coffeescript": "^2.7.0",
"grunt": "^1.5.3",
"grunt-contrib-stylus": "^1.2.0",
"grunt-markdownlint": "^3.1.5",
"grunt-purgecss": "^5.0.0",
"merge-source-maps": "^0.6.1"
}
}
KiraGoddess.md
:
# Kira
Goddess!
The part of the .travis.yml
:
install:
- npm install -g grunt-cli
- npm install
script:
- grunt markdownlint --verbose --stack
Reading "Gruntfile.coffee" Gruntfile…OK
Registering Gruntfile tasks.
Registering "grunt-markdownlint" local Npm module tasks.
Reading /home/travis/build/Kristinita/SashaGruntDebugging/node_modules/grunt-markdownlint/package.json…OK
Parsing /home/travis/build/Kristinita/SashaGruntDebugging/node_modules/grunt-markdownlint/package.json…OK
Loading "grunt-markdownlint.js" tasks…OK
+ markdownlint
Loading "linter.js" tasks…OK
+ >> No tasks were registered or unregistered.
Registering "grunt-contrib-stylus" local Npm module tasks.
Reading /home/travis/build/Kristinita/SashaGruntDebugging/node_modules/grunt-contrib-stylus/package.json…OK
Parsing /home/travis/build/Kristinita/SashaGruntDebugging/node_modules/grunt-contrib-stylus/package.json…OK
Loading "stylus.js" tasks…OK
+ stylus
Registering "grunt-purgecss" local Npm module tasks.
Reading /home/travis/build/Kristinita/SashaGruntDebugging/node_modules/grunt-purgecss/package.json…OK
Parsing /home/travis/build/Kristinita/SashaGruntDebugging/node_modules/grunt-purgecss/package.json…OK
Loading "purgecss.js" tasks…OK
+ purgecss
Registering "merge-source-maps" local Npm module tasks.
Reading /home/travis/build/Kristinita/SashaGruntDebugging/node_modules/merge-source-maps/package.json…OK
Parsing /home/travis/build/Kristinita/SashaGruntDebugging/node_modules/merge-source-maps/package.json…OK
Loading "merge.js" tasks…OK
+ merge-source-maps
Initializing config…OK
As you can see in this console output, Grunt generate unexpected message solely after grunt-markdownlint linter.js
loading. After registering and loading other Grunt plugins, Grunt doesn’t generate this message.
Operating system:
Node.js v18.9.0
grunt-cli v1.3.2, grunt v1.5.3
grunt-markdownlint 3.1.5
Thanks.
Grunt task ignores .markdownlint.json
and only processes rules placed within its options.config
.
A "markdownlint-cli" user with an existing configuration file (or someone wishing to store tool configuration externally) is SOL. Propose adding options.configFile
to simplify external configuration; it would read the file's contents and store within options.config
.
Gruntfile.coffee
modification (partial) grunt.initConfig
readme: 'README.md'
markdownlint:
options:
configFile: '.markdownlint.json'
default:
src: [
'<%= readme %>'
]
Alternatively (or meanwhile), document use of external file configuration.
Gruntfile.coffee
using existing codebase without modification (partial) grunt.initConfig
readme: 'README.md'
markdownlint:
options:
config: require './.markdownlint.json'
default:
src: [
'<%= readme %>'
]
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.