comment-variables 0.0.5 → 0.1.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.
Files changed (2) hide show
  1. package/index.js +43 -2
  2. package/package.json +2 -1
package/index.js CHANGED
@@ -6,6 +6,7 @@ import fs from "fs";
6
6
 
7
7
  import { ESLint } from "eslint";
8
8
  import tseslint from "typescript-eslint";
9
+ import markdown from "@eslint/markdown";
9
10
 
10
11
  import { runWithConfig } from "./run-with-config.js";
11
12
  import { findAllImports } from "./find-all-imports.js";
@@ -190,10 +191,30 @@ async function resolveCommentsInProject(fileGlobs = allJSTSFileGlobs) {
190
191
  [ruleName]: "warn", // Don't block builds, just apply fix
191
192
  },
192
193
  },
194
+ {
195
+ files: ["**/*.md"],
196
+ plugins: { markdown },
197
+ processor: "markdown/markdown",
198
+ },
199
+ {
200
+ files: [
201
+ "**/*.md/*.js",
202
+ "**/*.md/*.jsx",
203
+ "**/*.md/*.ts",
204
+ "**/*.md/*.tsx",
205
+ "**/*.md/*.cjs",
206
+ "**/*.md/*.mjs",
207
+ ],
208
+ ignores: [...knownIgnores],
209
+ languageOptions: typeScriptAndJSXCompatible,
210
+ rules: {
211
+ [ruleName]: "warn", // Don't block builds, just apply fix
212
+ },
213
+ },
193
214
  ],
194
215
  });
195
216
 
196
- const results = await eslint.lintFiles(fileGlobs);
217
+ const results = await eslint.lintFiles([...fileGlobs, "**/*.md"]);
197
218
  await ESLint.outputFixes(results);
198
219
 
199
220
  console.log({ results });
@@ -300,10 +321,30 @@ async function compressCommentsInProject(fileGlobs = allJSTSFileGlobs) {
300
321
  [ruleName]: "warn", // Don't block builds, just apply fix
301
322
  },
302
323
  },
324
+ {
325
+ files: ["**/*.md"],
326
+ plugins: { markdown },
327
+ processor: "markdown/markdown",
328
+ },
329
+ {
330
+ files: [
331
+ "**/*.md/*.js",
332
+ "**/*.md/*.jsx",
333
+ "**/*.md/*.ts",
334
+ "**/*.md/*.tsx",
335
+ "**/*.md/*.cjs",
336
+ "**/*.md/*.mjs",
337
+ ],
338
+ ignores: [...knownIgnores],
339
+ languageOptions: typeScriptAndJSXCompatible,
340
+ rules: {
341
+ [ruleName]: "warn", // Don't block builds, just apply fix
342
+ },
343
+ },
303
344
  ],
304
345
  });
305
346
 
306
- const results = await eslint.lintFiles(fileGlobs);
347
+ const results = await eslint.lintFiles([...fileGlobs, "**/*.md"]);
307
348
  await ESLint.outputFixes(results);
308
349
 
309
350
  console.log({ results });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "comment-variables",
3
- "version": "0.0.5",
3
+ "version": "0.1.0",
4
4
  "description": "",
5
5
  "bin": {
6
6
  "jscomments": "./index.js",
@@ -19,6 +19,7 @@
19
19
  "license": "MIT",
20
20
  "type": "module",
21
21
  "dependencies": {
22
+ "@eslint/markdown": "^6.5.0",
22
23
  "eslint": "^9.29.0",
23
24
  "get-sourcecode-from-file-path": "^1.0.0",
24
25
  "resolve-importing-path": "^1.0.2",