@ivuorinen/markdownlint-config 0.1.6 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ivuorinen/markdownlint-config",
3
- "version": "0.1.6",
3
+ "version": "0.2.0",
4
4
  "description": "ivuorinen's shareable configuration for markdownlint.",
5
5
  "author": {
6
6
  "name": "Ismo Vuorinen",
@@ -10,9 +10,7 @@
10
10
  "url": "https://github.com/ivuorinen/base-configs/issues"
11
11
  },
12
12
  "engines": {
13
- "node": ">= 12",
14
- "npm": ">= 6",
15
- "yarn": ">=1.20.0"
13
+ "node": ">= 18"
16
14
  },
17
15
  "files": [
18
16
  "index.json",
@@ -38,7 +36,8 @@
38
36
  "postinstall": "node scripts/postinstall.js"
39
37
  },
40
38
  "dependencies": {
39
+ "@ivuorinen/config-checker": "^1.1.0",
41
40
  "markdownlint-cli": "0.37.0"
42
41
  },
43
- "gitHead": "2346b3b448d362ebee56beace935e2614a9c5482"
42
+ "gitHead": "f3a80ecd3e6bbcd81c104022230fd765e7292354"
44
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
  }