@bfra.me/eslint-config 0.50.2 → 0.50.3

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/lib/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import "./chunk-EGRHWZRV.js";
2
2
 
3
3
  // src/define-config.ts
4
- import { isPackageExists as isPackageExists4 } from "local-pkg";
4
+ import { isPackageExists as isPackageExists3 } from "local-pkg";
5
5
 
6
6
  // ../es/src/env/ci.ts
7
7
  import isCI from "is-in-ci";
@@ -147,7 +147,7 @@ var GLOB_EXCLUDE = [
147
147
  import { fileURLToPath } from "url";
148
148
 
149
149
  // package.json
150
- var version = "0.50.2";
150
+ var version = "0.50.3";
151
151
 
152
152
  // src/parsers/any-parser.ts
153
153
  var lineBreakPattern = /\r\n|[\n\r\u2028\u2029]/u;
@@ -1287,7 +1287,6 @@ async function pnpm() {
1287
1287
 
1288
1288
  // src/configs/prettier.ts
1289
1289
  import process4 from "process";
1290
- import { isPackageExists as isPackageExists2 } from "local-pkg";
1291
1290
  function getConfigRules(configs) {
1292
1291
  if (Array.isArray(configs)) {
1293
1292
  const configWithRules = [...configs].reverse().find(
@@ -1309,8 +1308,8 @@ async function prettier(options = {}) {
1309
1308
  const [configPrettier, pluginPrettier, pluginJsonc, pluginYaml] = await Promise.all([
1310
1309
  interopDefault(import("eslint-config-prettier")),
1311
1310
  interopDefault(import("eslint-plugin-prettier")),
1312
- isPackageExists2("eslint-plugin-jsonc") ? interopDefault(import("eslint-plugin-jsonc")) : Promise.resolve(void 0),
1313
- isPackageExists2("eslint-plugin-yml") ? interopDefault(import("eslint-plugin-yml")) : Promise.resolve(void 0)
1311
+ interopDefault(import("eslint-plugin-jsonc")).catch(() => void 0),
1312
+ interopDefault(import("eslint-plugin-yml")).catch(() => void 0)
1314
1313
  ]);
1315
1314
  const jsoncPrettierRules = getConfigRules(pluginJsonc?.configs.prettier);
1316
1315
  const yamlPrettierRules = getConfigRules(pluginYaml?.configs.prettier);
@@ -1371,7 +1370,7 @@ async function prettier(options = {}) {
1371
1370
  }
1372
1371
 
1373
1372
  // src/configs/react.ts
1374
- import { isPackageExists as isPackageExists3 } from "local-pkg";
1373
+ import { isPackageExists as isPackageExists2 } from "local-pkg";
1375
1374
  var ReactRefreshAllowConstantExportPackages = ["vite"];
1376
1375
  var RemixPackages = ["@remix-run/node", "@remix-run/react", "@remix-run/serve", "@remix-run/dev"];
1377
1376
  var ReactRouterPackages = [
@@ -1406,11 +1405,11 @@ async function react(options = {}) {
1406
1405
  ]);
1407
1406
  const plugins = pluginReact.configs.all.plugins;
1408
1407
  const isAllowConstantExport = ReactRefreshAllowConstantExportPackages.some(
1409
- (i) => isPackageExists3(i)
1408
+ (i) => isPackageExists2(i)
1410
1409
  );
1411
- const isUsingRemix = RemixPackages.some((i) => isPackageExists3(i));
1412
- const isUsingReactRouter = ReactRouterPackages.some((i) => isPackageExists3(i));
1413
- const isUsingNext = NextJsPackages.some((i) => isPackageExists3(i));
1410
+ const isUsingRemix = RemixPackages.some((i) => isPackageExists2(i));
1411
+ const isUsingReactRouter = ReactRouterPackages.some((i) => isPackageExists2(i));
1412
+ const isUsingNext = NextJsPackages.some((i) => isPackageExists2(i));
1414
1413
  return [
1415
1414
  {
1416
1415
  name: "@bfra.me/react/setup",
@@ -2306,10 +2305,10 @@ async function defineConfig(options = {}, ...userConfigs) {
2306
2305
  packageJson: enablePackageJson = false,
2307
2306
  perfectionist: enablePerfectionist = true,
2308
2307
  pnpm: enableCatalogs = false,
2309
- prettier: enablePrettier = isPackageExists4("prettier"),
2308
+ prettier: enablePrettier = isPackageExists3("prettier"),
2310
2309
  react: enableReact = false,
2311
2310
  regexp: enableRegexp = true,
2312
- typescript: enableTypeScript = isPackageExists4("typescript"),
2311
+ typescript: enableTypeScript = isPackageExists3("typescript"),
2313
2312
  unicorn: enableUnicorn = true
2314
2313
  } = options;
2315
2314
  let isInEditor = options.isInEditor;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bfra.me/eslint-config",
3
- "version": "0.50.2",
3
+ "version": "0.50.3",
4
4
  "description": "Shared ESLint configuration for bfra.me",
5
5
  "keywords": [
6
6
  "bfra.me",
@@ -38,7 +38,7 @@
38
38
  ],
39
39
  "dependencies": {
40
40
  "@eslint-community/eslint-plugin-eslint-comments": "4.7.1",
41
- "@eslint/markdown": "7.5.1",
41
+ "@eslint/markdown": "8.0.1",
42
42
  "@stylistic/eslint-plugin": "5.10.0",
43
43
  "eslint-config-flat-gitignore": "2.3.0",
44
44
  "eslint-flat-config-utils": "3.1.0",
@@ -52,7 +52,7 @@
52
52
  "eslint-plugin-perfectionist": "5.8.0",
53
53
  "eslint-plugin-regexp": "3.1.0",
54
54
  "eslint-plugin-toml": "1.3.1",
55
- "eslint-plugin-unicorn": "63.0.0",
55
+ "eslint-plugin-unicorn": "64.0.0",
56
56
  "eslint-plugin-unused-imports": "4.4.1",
57
57
  "eslint-plugin-yml": "3.3.1",
58
58
  "globals": "17.4.0",
@@ -66,14 +66,14 @@
66
66
  "devDependencies": {
67
67
  "@eslint-react/eslint-plugin": "2.13.0",
68
68
  "@eslint/config-inspector": "1.5.0",
69
- "@eslint/core": "1.1.1",
69
+ "@eslint/core": "1.2.0",
70
70
  "@next/eslint-plugin-next": "16.2.2",
71
71
  "@types/eslint-config-prettier": "6.11.3",
72
72
  "@types/eslint-plugin-jsx-a11y": "6.10.1",
73
73
  "@typescript-eslint/types": "8.58.0",
74
74
  "@vitest/eslint-plugin": "1.6.14",
75
75
  "astro-eslint-parser": "1.4.0",
76
- "eslint": "10.1.0",
76
+ "eslint": "10.2.0",
77
77
  "eslint-config-prettier": "10.1.8",
78
78
  "eslint-plugin-astro": "1.6.0",
79
79
  "eslint-plugin-erasable-syntax-only": "0.4.0",
@@ -84,9 +84,9 @@
84
84
  "eslint-plugin-react-hooks": "7.0.1",
85
85
  "eslint-plugin-react-refresh": "0.5.2",
86
86
  "eslint-typegen": "2.3.1",
87
- "@bfra.me/prettier-config": "0.16.7",
87
+ "@bfra.me/works": "0.0.0-development",
88
88
  "@bfra.me/tsconfig": "0.12.2",
89
- "@bfra.me/works": "0.0.0-development"
89
+ "@bfra.me/prettier-config": "0.16.7"
90
90
  },
91
91
  "peerDependencies": {
92
92
  "@eslint-react/eslint-plugin": "^2.2.3",
@@ -1,7 +1,6 @@
1
1
  import type {Config} from '../config'
2
2
  import type {Flatten, OptionsIsInEditor, OptionsOverrides} from '../options'
3
3
  import process from 'node:process'
4
- import {isPackageExists} from 'local-pkg'
5
4
  import {GLOB_EXT_IN_MARKDOWN_FILES, GLOB_MARKDOWN_FILES, GLOB_TOML_FILES} from '../globs'
6
5
  import {requireOf} from '../require-of'
7
6
  import {interopDefault} from '../utils'
@@ -46,12 +45,8 @@ export async function prettier(options: PrettierOptions = {}): Promise<Config[]>
46
45
  const [configPrettier, pluginPrettier, pluginJsonc, pluginYaml] = await Promise.all([
47
46
  interopDefault(import('eslint-config-prettier')),
48
47
  interopDefault(import('eslint-plugin-prettier')),
49
- isPackageExists('eslint-plugin-jsonc')
50
- ? interopDefault(import('eslint-plugin-jsonc'))
51
- : Promise.resolve(undefined),
52
- isPackageExists('eslint-plugin-yml')
53
- ? interopDefault(import('eslint-plugin-yml'))
54
- : Promise.resolve(undefined),
48
+ interopDefault(import('eslint-plugin-jsonc')).catch(() => undefined),
49
+ interopDefault(import('eslint-plugin-yml')).catch(() => undefined),
55
50
  ])
56
51
  const jsoncPrettierRules = getConfigRules(pluginJsonc?.configs.prettier)
57
52
  const yamlPrettierRules = getConfigRules(pluginYaml?.configs.prettier)