eslint-config-un 0.2.0 → 0.2.2

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 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 files = userFiles.length > 0 ? internalOptions.mergeUserFilesWithFallback ? [...internalOptions.filesFallback || [], ...userFiles] : userFiles : internalOptions.filesFallback || [];
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
- ...internalOptions.includeDefaultFilesAndIgnores && {
437
- ...files.length > 0 && { files },
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
  };
@@ -1464,7 +1463,7 @@ var vueEslintConfig = (options, internalOptions = {}) => {
1464
1463
  builder.addConfig("vue/allow-default-export", {
1465
1464
  files: [
1466
1465
  GLOB_VUE,
1467
- isNuxtEnabled && [inNuxtAppDir("plugins/**/*.*"), inNuxtAppDir("server/**/*.*")]
1466
+ isNuxtEnabled && [inNuxtAppDir("plugins/**/*"), inNuxtAppDir("server/**/*")]
1468
1467
  ].flat().filter((v) => v !== false)
1469
1468
  }).addAnyRule("import/no-default-export", OFF);
1470
1469
  const a11yConfig = builder.addConfig(
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 files = userFiles.length > 0 ? internalOptions.mergeUserFilesWithFallback ? [...internalOptions.filesFallback || [], ...userFiles] : userFiles : internalOptions.filesFallback || [];
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
- ...internalOptions.includeDefaultFilesAndIgnores && {
425
- ...files.length > 0 && { files },
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
  };
@@ -1456,7 +1455,7 @@ var vueEslintConfig = (options, internalOptions = {}) => {
1456
1455
  builder.addConfig("vue/allow-default-export", {
1457
1456
  files: [
1458
1457
  GLOB_VUE,
1459
- isNuxtEnabled && [inNuxtAppDir("plugins/**/*.*"), inNuxtAppDir("server/**/*.*")]
1458
+ isNuxtEnabled && [inNuxtAppDir("plugins/**/*"), inNuxtAppDir("server/**/*")]
1460
1459
  ].flat().filter((v) => v !== false)
1461
1460
  }).addAnyRule("import/no-default-export", OFF);
1462
1461
  const a11yConfig = builder.addConfig(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-config-un",
3
- "version": "0.2.0",
3
+ "version": "0.2.2",
4
4
  "description": "A universal-ish ESLint config aiming to be reasonably strict and easily configurable.",
5
5
  "keywords": [
6
6
  "eslint",