comment-variables 1.5.6 → 1.6.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.
@@ -36,6 +36,8 @@ const makeRule = (reversedFlattenedConfigData, composedVariablesExclusives) => {
36
36
  },
37
37
  create: (context) => {
38
38
  const sourceCode = context.sourceCode;
39
+ if (!sourceCode) return;
40
+
39
41
  const comments = sourceCode
40
42
  .getAllComments()
41
43
  .filter((e) => e.type !== "Shebang");
@@ -35,6 +35,8 @@ const makeRule = (
35
35
  },
36
36
  create: (context) => {
37
37
  const sourceCode = context.sourceCode;
38
+ if (!sourceCode) return;
39
+
38
40
  const comments = sourceCode
39
41
  .getAllComments()
40
42
  .filter((e) => e.type !== "Shebang");
@@ -46,6 +46,9 @@ const coreCommentsFlow = async (
46
46
  {
47
47
  files: allJSTSFileGlobs,
48
48
  languageOptions: typeScriptAndJSXCompatible,
49
+ linterOptions: {
50
+ noInlineConfig: true,
51
+ },
49
52
  plugins: {
50
53
  [commentVariablesPluginName]: {
51
54
  rules: {
@@ -70,6 +73,9 @@ const coreCommentsFlow = async (
70
73
  {
71
74
  files: allMDVirtualJSTSFileGlobs,
72
75
  languageOptions: typeScriptAndJSXCompatible,
76
+ linterOptions: {
77
+ noInlineConfig: true,
78
+ },
73
79
  rules: {
74
80
  [`${commentVariablesPluginName}/${ruleName}`]: "warn",
75
81
  },
@@ -204,6 +210,9 @@ export const placeholdersCommentsFlow = async (
204
210
  files: configPathIgnores,
205
211
  ignores: [relativeMjsPath], // but the docs say ignorePatterns: https://eslint.org/docs/latest/integrate/nodejs-api#parameters
206
212
  languageOptions: typeScriptAndJSXCompatible,
213
+ linterOptions: {
214
+ noInlineConfig: true,
215
+ },
207
216
  plugins: {
208
217
  [commentVariablesPluginName]: {
209
218
  rules: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "comment-variables",
3
- "version": "1.5.6",
3
+ "version": "1.6.0",
4
4
  "description": "A CLI tool for configuring, managing and maintaining JavaScript comments as JavaScript variables.",
5
5
  "bin": {
6
6
  "comment-variables": "./library/index.js",
@@ -32,7 +32,7 @@
32
32
  "type": "module",
33
33
  "dependencies": {
34
34
  "@eslint/markdown": "^6.5.0",
35
- "comment-variables-resolve-config": "^1.17.5",
35
+ "comment-variables-resolve-config": "^1.18.0",
36
36
  "eslint": "^9.29.0",
37
37
  "prompts": "^2.4.2"
38
38
  },