@ivuorinen/markdownlint-config 0.1.7 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ivuorinen/markdownlint-config",
3
- "version": "0.1.7",
3
+ "version": "0.2.1",
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.1",
39
40
  "markdownlint-cli": "0.37.0"
40
41
  },
41
- "gitHead": "f65b10c109bc593d0ed41198b82d20e1f24c47ac"
42
+ "gitHead": "33a338c34715a618415d6e782f4d6b95250c40d0"
42
43
  }
@@ -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
- const filePath = path.join(process.env.INIT_CWD, '.markdownlint.json')
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
  }