eslint-config-un 0.2.0 → 0.2.1
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/dist/index.cjs +5 -6
- package/dist/index.js +5 -6
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -426,17 +426,16 @@ var ConfigEntryBuilder = class {
|
|
|
426
426
|
const { options: configOptions } = this;
|
|
427
427
|
const configName = genFlatConfigEntryName(name);
|
|
428
428
|
const userFiles = configOptions.files || [];
|
|
429
|
-
const
|
|
429
|
+
const fallbackFiles = internalOptions.filesFallback || [];
|
|
430
|
+
const files = userFiles.length > 0 && internalOptions.includeDefaultFilesAndIgnores ? internalOptions.mergeUserFilesWithFallback ? [...fallbackFiles, ...userFiles] : userFiles : fallbackFiles;
|
|
430
431
|
const ignores = [
|
|
431
432
|
...internalOptions.doNotIgnoreMarkdown ? [] : [GLOB_MARKDOWN],
|
|
432
433
|
...internalOptions.ignoreMarkdownCodeBlocks ? [GLOB_MARKDOWN_ALL_CODE_BLOCKS] : [],
|
|
433
|
-
...configOptions.ignores || []
|
|
434
|
+
...internalOptions.includeDefaultFilesAndIgnores ? configOptions.ignores || [] : []
|
|
434
435
|
];
|
|
435
436
|
const configFinal = {
|
|
436
|
-
...
|
|
437
|
-
|
|
438
|
-
...ignores.length > 0 && { ignores }
|
|
439
|
-
},
|
|
437
|
+
...files.length > 0 && { files },
|
|
438
|
+
...ignores.length > 0 && { ignores },
|
|
440
439
|
...config,
|
|
441
440
|
name: configName
|
|
442
441
|
};
|
package/dist/index.js
CHANGED
|
@@ -414,17 +414,16 @@ var ConfigEntryBuilder = class {
|
|
|
414
414
|
const { options: configOptions } = this;
|
|
415
415
|
const configName = genFlatConfigEntryName(name);
|
|
416
416
|
const userFiles = configOptions.files || [];
|
|
417
|
-
const
|
|
417
|
+
const fallbackFiles = internalOptions.filesFallback || [];
|
|
418
|
+
const files = userFiles.length > 0 && internalOptions.includeDefaultFilesAndIgnores ? internalOptions.mergeUserFilesWithFallback ? [...fallbackFiles, ...userFiles] : userFiles : fallbackFiles;
|
|
418
419
|
const ignores = [
|
|
419
420
|
...internalOptions.doNotIgnoreMarkdown ? [] : [GLOB_MARKDOWN],
|
|
420
421
|
...internalOptions.ignoreMarkdownCodeBlocks ? [GLOB_MARKDOWN_ALL_CODE_BLOCKS] : [],
|
|
421
|
-
...configOptions.ignores || []
|
|
422
|
+
...internalOptions.includeDefaultFilesAndIgnores ? configOptions.ignores || [] : []
|
|
422
423
|
];
|
|
423
424
|
const configFinal = {
|
|
424
|
-
...
|
|
425
|
-
|
|
426
|
-
...ignores.length > 0 && { ignores }
|
|
427
|
-
},
|
|
425
|
+
...files.length > 0 && { files },
|
|
426
|
+
...ignores.length > 0 && { ignores },
|
|
428
427
|
...config,
|
|
429
428
|
name: configName
|
|
430
429
|
};
|