@ivuorinen/markdownlint-config 0.1.7 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- package/package.json +3 -2
- package/scripts/postinstall.js +10 -1
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@ivuorinen/markdownlint-config",
|
3
|
-
"version": "0.
|
3
|
+
"version": "0.2.0",
|
4
4
|
"description": "ivuorinen's shareable configuration for markdownlint.",
|
5
5
|
"author": {
|
6
6
|
"name": "Ismo Vuorinen",
|
@@ -36,7 +36,8 @@
|
|
36
36
|
"postinstall": "node scripts/postinstall.js"
|
37
37
|
},
|
38
38
|
"dependencies": {
|
39
|
+
"@ivuorinen/config-checker": "^1.1.0",
|
39
40
|
"markdownlint-cli": "0.37.0"
|
40
41
|
},
|
41
|
-
"gitHead": "
|
42
|
+
"gitHead": "f3a80ecd3e6bbcd81c104022230fd765e7292354"
|
42
43
|
}
|
package/scripts/postinstall.js
CHANGED
@@ -2,9 +2,18 @@
|
|
2
2
|
|
3
3
|
const fs = require('fs')
|
4
4
|
const path = require('path')
|
5
|
+
const process = require('process')
|
6
|
+
const checkConfig = require('@ivuorinen/config-checker')
|
7
|
+
const foundConfig = checkConfig('markdownlint')
|
5
8
|
|
6
|
-
|
9
|
+
if (foundConfig.length > 0) {
|
10
|
+
console.log('markdownlint-config: Found existing markdownlint config file, skipping creation.')
|
11
|
+
console.log('markdownlint-config: If you want to create a new config file, please remove the existing one.')
|
12
|
+
console.log(`markdownlint-config: Found config files at: ${foundConfig.join(', ')}`)
|
13
|
+
process.exit(0)
|
14
|
+
}
|
7
15
|
|
16
|
+
const filePath = path.join(process.env.INIT_CWD, '.markdownlint.json')
|
8
17
|
const fileConfigObject = {
|
9
18
|
extends: '@ivuorinen/markdownlint-config'
|
10
19
|
}
|