@biscuittin/eslint-config 0.3.0 → 0.3.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.d.ts CHANGED
@@ -9088,6 +9088,8 @@ type AutofixOneVar = [] | [(("always" | "never" | "consecutive") | {
9088
9088
  var?: ("always" | "never" | "consecutive");
9089
9089
  let?: ("always" | "never" | "consecutive");
9090
9090
  const?: ("always" | "never" | "consecutive");
9091
+ using?: ("always" | "never" | "consecutive");
9092
+ awaitUsing?: ("always" | "never" | "consecutive");
9091
9093
  } | {
9092
9094
  initialized?: ("always" | "never" | "consecutive");
9093
9095
  uninitialized?: ("always" | "never" | "consecutive");
@@ -11384,10 +11386,17 @@ type NoRestrictedExports = [] | [({
11384
11386
  };
11385
11387
  })];
11386
11388
  // ----- no-restricted-globals -----
11387
- type NoRestrictedGlobals = (string | {
11389
+ type NoRestrictedGlobals = ((string | {
11388
11390
  name: string;
11389
11391
  message?: string;
11390
- })[];
11392
+ })[] | [] | [{
11393
+ globals: (string | {
11394
+ name: string;
11395
+ message?: string;
11396
+ })[];
11397
+ checkGlobalObject?: boolean;
11398
+ globalObjects?: string[];
11399
+ }]);
11391
11400
  // ----- no-restricted-imports -----
11392
11401
  type NoRestrictedImports = ((string | {
11393
11402
  name: string;
@@ -11882,6 +11891,8 @@ type OneVar = [] | [(("always" | "never" | "consecutive") | {
11882
11891
  var?: ("always" | "never" | "consecutive");
11883
11892
  let?: ("always" | "never" | "consecutive");
11884
11893
  const?: ("always" | "never" | "consecutive");
11894
+ using?: ("always" | "never" | "consecutive");
11895
+ awaitUsing?: ("always" | "never" | "consecutive");
11885
11896
  } | {
11886
11897
  initialized?: ("always" | "never" | "consecutive");
11887
11898
  uninitialized?: ("always" | "never" | "consecutive");
package/dist/index.js CHANGED
@@ -370,7 +370,6 @@ const parsers = {
370
370
  parserPlain: eslintPluginFormat.parserPlain,
371
371
  parserTypescript: parser
372
372
  };
373
- var parsers_default = parsers;
374
373
 
375
374
  //#endregion
376
375
  //#region src/configs/formatters.ts
@@ -445,7 +444,7 @@ async function formatters(options = {}) {
445
444
  {
446
445
  name: `${name$12.rules}/markdown`,
447
446
  files: [GLOB_MARKDOWN],
448
- languageOptions: { parser: parsers_default["parserPlain"] },
447
+ languageOptions: { parser: parsers["parserPlain"] },
449
448
  rules: hasPlugin("markdown") ? { "format/dprint": ["error", {
450
449
  language: getPluginUrl("markdown"),
451
450
  languageOptions: {
@@ -458,7 +457,7 @@ async function formatters(options = {}) {
458
457
  {
459
458
  name: `${name$12.rules}/malva`,
460
459
  files: [GLOB_STYLE, GLOB_POSTCSS],
461
- languageOptions: { parser: parsers_default["parserPlain"] },
460
+ languageOptions: { parser: parsers["parserPlain"] },
462
461
  rules: hasPlugin("malva") ? { "format/dprint": ["error", {
463
462
  language: getPluginUrl("malva"),
464
463
  languageOptions: {
@@ -474,7 +473,7 @@ async function formatters(options = {}) {
474
473
  {
475
474
  name: `${name$12.rules}/markup`,
476
475
  files: [GLOB_HTML],
477
- languageOptions: { parser: parsers_default["parserPlain"] },
476
+ languageOptions: { parser: parsers["parserPlain"] },
478
477
  rules: hasPlugin("markup") ? { "format/dprint": ["error", {
479
478
  language: getPluginUrl("markup"),
480
479
  languageOptions: {
@@ -489,7 +488,7 @@ async function formatters(options = {}) {
489
488
  {
490
489
  name: `${name$12.rules}/yaml`,
491
490
  files: [GLOB_YAML],
492
- languageOptions: { parser: parsers_default["parserPlain"] },
491
+ languageOptions: { parser: parsers["parserPlain"] },
493
492
  rules: hasPlugin("yaml") ? { "format/dprint": ["error", {
494
493
  language: getPluginUrl("yaml"),
495
494
  languageOptions: {
@@ -720,7 +719,7 @@ function json(options = {}) {
720
719
  jsonc: pluginJsonc
721
720
  },
722
721
  language: "json/json",
723
- languageOptions: { parser: parsers_default["parserJsonc"] }
722
+ languageOptions: { parser: parsers["parserJsonc"] }
724
723
  },
725
724
  {
726
725
  name: name$8.rules,
@@ -1249,7 +1248,7 @@ const configCommonRules = {
1249
1248
  "@eslint-react/no-unused-state": "warn",
1250
1249
  "@eslint-react/no-use-context": "warn",
1251
1250
  "@eslint-react/no-useless-forward-ref": "error",
1252
- "@eslint-react/no-useless-fragment": "off",
1251
+ "@eslint-react/no-useless-fragment": "error",
1253
1252
  "@eslint-react/prefer-destructuring-assignment": "off",
1254
1253
  "@eslint-react/prefer-react-namespace-import": "off",
1255
1254
  "@eslint-react/prefer-read-only-props": "off",
@@ -1301,6 +1300,7 @@ const configStylistic = {
1301
1300
  "@eslint-react/prefer-shorthand-fragment": "off",
1302
1301
  "@eslint-react/avoid-shorthand-boolean": "off",
1303
1302
  "@eslint-react/avoid-shorthand-fragment": "error",
1303
+ "@eslint-react/naming-convention/filename": "off",
1304
1304
  "@stylistic/jsx-closing-bracket-location": "error",
1305
1305
  "@stylistic/jsx-closing-tag-location": "error",
1306
1306
  "@stylistic/jsx-curly-brace-presence": ["error", { propElementValues: "always" }],
@@ -1466,7 +1466,7 @@ function typescript(options = {}) {
1466
1466
  languageOptions: {
1467
1467
  sourceType: "module",
1468
1468
  ecmaVersion: "latest",
1469
- parser: parsers_default["parserTypescript"],
1469
+ parser: parsers["parserTypescript"],
1470
1470
  parserOptions: {
1471
1471
  ecmaVersion: "latest",
1472
1472
  extraFileExtensions,
@@ -1592,8 +1592,14 @@ function enabled(options, defaults = false) {
1592
1592
  }
1593
1593
  function configOptions(options, defaultOptions) {
1594
1594
  const isInEditor = isInEditorEnv();
1595
- if (options === void 0) return { isInEditor };
1596
- if (typeof options === "boolean") return { isInEditor };
1595
+ if (options === void 0) return {
1596
+ ...defaultOptions,
1597
+ isInEditor
1598
+ };
1599
+ if (typeof options === "boolean") return {
1600
+ ...defaultOptions,
1601
+ isInEditor
1602
+ };
1597
1603
  return {
1598
1604
  ...defaultOptions,
1599
1605
  ...options,
@@ -1622,10 +1628,11 @@ async function config(options, ...userConfigs) {
1622
1628
  }
1623
1629
  if (enabled(options?.react, isPackageExists("react") || isPackageExists("@types/react"))) {
1624
1630
  const enableReactCompiler = isPackageExists("babel-plugin-react-compiler") || isPackageExists("react-compiler-webpack");
1625
- configs$2.push(jsx(), react(configOptions(options?.react, {
1631
+ const reactOptions = configOptions(options?.react, {
1626
1632
  typeCheck: enableTypeScript,
1627
1633
  reactCompiler: enableReactCompiler
1628
- })));
1634
+ });
1635
+ configs$2.push(jsx(), react(reactOptions));
1629
1636
  }
1630
1637
  if (enabled(options?.nextjs, isPackageExists("next"))) configs$2.push(nextJs());
1631
1638
  if (enabled(options?.node, isPackageExists("@types/node"))) configs$2.push(nodeJs(configOptions(options?.node)));
@@ -1633,7 +1640,8 @@ async function config(options, ...userConfigs) {
1633
1640
  configs$2.push(regexp(), unicorn(), disables());
1634
1641
  if (enabled(options?.format, isPackageExists("dprint"))) {
1635
1642
  const jsonOptions = configOptions(options?.json);
1636
- configs$2.push(formatters(configOptions(options?.format, { extraJsonFiles: jsonOptions.extraFiles })));
1643
+ const formatterOptions = configOptions(options?.format, { extraJsonFiles: jsonOptions.extraFiles });
1644
+ configs$2.push(formatters(formatterOptions));
1637
1645
  }
1638
1646
  let composer = new FlatConfigComposer(...configs$2);
1639
1647
  const _userConfigs = userConfigs;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@biscuittin/eslint-config",
3
3
  "type": "module",
4
- "version": "0.3.0",
4
+ "version": "0.3.2",
5
5
  "description": "A collection of ESLint configurations for Biscuit Tin projects.",
6
6
  "author": "Biscuit Tin <opensource@biscuitt.in>",
7
7
  "license": "MIT",
@@ -60,46 +60,46 @@
60
60
  },
61
61
  "dependencies": {
62
62
  "@eslint-community/eslint-plugin-eslint-comments": "^4.5.0",
63
- "@eslint-sukka/eslint-plugin-react-jsx-a11y": "^6.22.1",
64
- "@eslint/js": "^9.32.0",
63
+ "@eslint-sukka/eslint-plugin-react-jsx-a11y": "^6.23.1",
64
+ "@eslint/js": "^9.34.0",
65
65
  "@eslint/json": "^0.13.1",
66
- "@next/eslint-plugin-next": "^15.4.5",
66
+ "@next/eslint-plugin-next": "^15.5.0",
67
67
  "@package-json/types": "^0.0.11",
68
- "@stylistic/eslint-plugin": "^5.2.2",
68
+ "@stylistic/eslint-plugin": "^5.2.3",
69
69
  "eslint-config-flat-gitignore": "^2.1.0",
70
70
  "eslint-flat-config-utils": "^2.1.1",
71
71
  "eslint-import-resolver-typescript": "^4.4.4",
72
72
  "eslint-plugin-antfu": "^3.1.1",
73
73
  "eslint-plugin-autofix": "^2.2.0",
74
- "eslint-plugin-better-tailwindcss": "^3.7.4",
74
+ "eslint-plugin-better-tailwindcss": "^3.7.5",
75
75
  "eslint-plugin-format": "^1.0.1",
76
76
  "eslint-plugin-import-x": "^4.16.1",
77
77
  "eslint-plugin-jsonc": "^2.20.1",
78
78
  "eslint-plugin-n": "^17.21.3",
79
79
  "eslint-plugin-perfectionist": "^4.15.0",
80
80
  "eslint-plugin-react-compiler": "19.1.0-rc.2",
81
- "eslint-plugin-react-dom": "^1.52.3",
81
+ "eslint-plugin-react-dom": "^1.52.6",
82
82
  "eslint-plugin-react-hooks": "^5.2.0",
83
- "eslint-plugin-react-hooks-extra": "^1.52.3",
84
- "eslint-plugin-react-naming-convention": "^1.52.3",
83
+ "eslint-plugin-react-hooks-extra": "^1.52.6",
84
+ "eslint-plugin-react-naming-convention": "^1.52.6",
85
85
  "eslint-plugin-react-refresh": "^0.4.20",
86
- "eslint-plugin-react-web-api": "^1.52.3",
87
- "eslint-plugin-react-x": "^1.52.3",
88
- "eslint-plugin-regexp": "^2.9.1",
86
+ "eslint-plugin-react-web-api": "^1.52.6",
87
+ "eslint-plugin-react-x": "^1.52.6",
88
+ "eslint-plugin-regexp": "^2.10.0",
89
89
  "eslint-plugin-unicorn": "^60.0.0",
90
- "eslint-plugin-unused-imports": "^4.1.4",
90
+ "eslint-plugin-unused-imports": "^4.2.0",
91
91
  "find-up": "^7.0.0",
92
92
  "globals": "^16.3.0",
93
93
  "jsonc-eslint-parser": "^2.4.0",
94
- "local-pkg": "^1.1.1",
95
- "typescript-eslint": "^8.39.0"
94
+ "local-pkg": "^1.1.2",
95
+ "typescript-eslint": "^8.40.0"
96
96
  },
97
97
  "devDependencies": {
98
- "@eslint/config-inspector": "^1.1.0",
99
- "@typescript-eslint/parser": "^8.39.0",
98
+ "@eslint/config-inspector": "^1.2.0",
99
+ "@typescript-eslint/parser": "^8.40.0",
100
100
  "dprint": "^0.50.1",
101
- "eslint": "^9.32.0",
102
- "tailwindcss": "^4.1.11",
101
+ "eslint": "^9.34.0",
102
+ "tailwindcss": "^4.1.12",
103
103
  "ts-api-utils": "^2.1.0",
104
104
  "typescript": "^5.8.3"
105
105
  },
package/typegen.d.ts CHANGED
@@ -9323,6 +9323,8 @@ type AutofixOneVar = []|[(("always" | "never" | "consecutive") | {
9323
9323
  var?: ("always" | "never" | "consecutive")
9324
9324
  let?: ("always" | "never" | "consecutive")
9325
9325
  const?: ("always" | "never" | "consecutive")
9326
+ using?: ("always" | "never" | "consecutive")
9327
+ awaitUsing?: ("always" | "never" | "consecutive")
9326
9328
  } | {
9327
9329
  initialized?: ("always" | "never" | "consecutive")
9328
9330
  uninitialized?: ("always" | "never" | "consecutive")
@@ -12004,10 +12006,18 @@ type NoRestrictedExports = []|[({
12004
12006
  }
12005
12007
  })]
12006
12008
  // ----- no-restricted-globals -----
12007
- type NoRestrictedGlobals = (string | {
12009
+ type NoRestrictedGlobals = ((string | {
12008
12010
  name: string
12009
12011
  message?: string
12010
- })[]
12012
+ })[] | []|[{
12013
+
12014
+ globals: (string | {
12015
+ name: string
12016
+ message?: string
12017
+ })[]
12018
+ checkGlobalObject?: boolean
12019
+ globalObjects?: string[]
12020
+ }])
12011
12021
  // ----- no-restricted-imports -----
12012
12022
  type NoRestrictedImports = ((string | {
12013
12023
  name: string
@@ -12543,6 +12553,8 @@ type OneVar = []|[(("always" | "never" | "consecutive") | {
12543
12553
  var?: ("always" | "never" | "consecutive")
12544
12554
  let?: ("always" | "never" | "consecutive")
12545
12555
  const?: ("always" | "never" | "consecutive")
12556
+ using?: ("always" | "never" | "consecutive")
12557
+ awaitUsing?: ("always" | "never" | "consecutive")
12546
12558
  } | {
12547
12559
  initialized?: ("always" | "never" | "consecutive")
12548
12560
  uninitialized?: ("always" | "never" | "consecutive")