@jimmy.codes/eslint-config 7.7.0 → 7.8.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.
package/README.md CHANGED
@@ -272,7 +272,6 @@ This config includes the following plugins:
272
272
  | [`@tanstack/eslint-plugin-query`](https://tanstack.com/query/latest/docs/eslint/eslint-plugin-query) | TanStack Query rules |
273
273
  | [`@vitest/eslint-plugin`](https://github.com/vitest-dev/eslint-plugin-vitest) | Vitest support |
274
274
  | [`eslint-config-prettier`](https://github.com/prettier/eslint-config-prettier) | Disable formatting conflicts |
275
- | [`eslint-plugin-arrow-return-style-x`](https://github.com/christopher-buss/eslint-plugin-arrow-return-style-x) | Arrow function return style |
276
275
  | [`eslint-plugin-astro`](https://ota-meshi.github.io/eslint-plugin-astro/) | Astro framework support |
277
276
  | [`eslint-plugin-import-x`](https://github.com/un-ts/eslint-plugin-import-x) | Import order and hygiene |
278
277
  | [`eslint-plugin-jest`](https://github.com/jest-community/eslint-plugin-jest) | Jest support |
@@ -13,7 +13,9 @@ const hasJest = () => {
13
13
  return isPackageExists("jest");
14
14
  };
15
15
  const hasTestingLibrary = () => {
16
- return ["@testing-library/react"].some((pkg) => isPackageExists(pkg));
16
+ return ["@testing-library/react"].some((pkg) => {
17
+ return isPackageExists(pkg);
18
+ });
17
19
  };
18
20
  const hasReactQuery = () => {
19
21
  return isPackageExists("@tanstack/react-query");
package/dist/index.d.mts CHANGED
@@ -1402,16 +1402,6 @@ interface RuleOptions {
1402
1402
  * @deprecated
1403
1403
  */
1404
1404
  'arrow-spacing'?: Linter.RuleEntry<ArrowSpacing>;
1405
- /**
1406
- * Enforce consistent arrow function return style based on length, multiline expressions, JSX usage, and export context
1407
- * @see https://github.com/christopher-buss/eslint-plugin-arrow-return-style-x/blob/v1.2.6/src/rules/arrow-return-style/documentation.md
1408
- */
1409
- 'arrow-style/arrow-return-style'?: Linter.RuleEntry<ArrowStyleArrowReturnStyle>;
1410
- /**
1411
- * Disallow anonymous arrow functions as export default declarations
1412
- * @see https://github.com/christopher-buss/eslint-plugin-arrow-return-style-x/blob/v1.2.6/src/rules/no-export-default-arrow/documentation.md
1413
- */
1414
- 'arrow-style/no-export-default-arrow'?: Linter.RuleEntry<[]>;
1415
1405
  /**
1416
1406
  * apply `jsx-a11y/alt-text` rule to Astro components
1417
1407
  * @see https://ota-meshi.github.io/eslint-plugin-astro/rules/jsx-a11y/alt-text/
@@ -9602,17 +9592,6 @@ type ArrowParens = [] | [("always" | "as-needed")] | [("always" | "as-needed"),
9602
9592
  type ArrowSpacing = [] | [{
9603
9593
  before?: boolean;
9604
9594
  after?: boolean;
9605
- }]; // ----- arrow-style/arrow-return-style -----
9606
- type ArrowStyleArrowReturnStyle = [] | [{
9607
- jsxAlwaysUseExplicitReturn?: boolean;
9608
- maxLen?: number;
9609
- maxObjectProperties?: number;
9610
- namedExportsAlwaysUseExplicitReturn?: boolean;
9611
- objectReturnStyle?: ("always-explicit" | "complex-explicit" | "off");
9612
- usePrettier?: (boolean | {
9613
- [k: string]: unknown | undefined;
9614
- } | null);
9615
- [k: string]: unknown | undefined;
9616
9595
  }]; // ----- astro/jsx-a11y/alt-text -----
9617
9596
  type AstroJsxA11YAltText = [] | [{
9618
9597
  elements?: string[];
package/dist/index.mjs CHANGED
@@ -1,12 +1,11 @@
1
1
  import { GLOB_CJS, GLOB_IGNORES, GLOB_TESTS } from "./globs.mjs";
2
- import { a as hasReact, c as hasTestingLibrary, d as hasVitest, i as hasPlaywright, l as hasTypescript, n as hasJest, o as hasReactQuery, r as hasNext, s as hasStorybook, t as hasAstro } from "./has-dependency-BB12gGNt.mjs";
2
+ import { a as hasReact, c as hasTestingLibrary, d as hasVitest, i as hasPlaywright, l as hasTypescript, n as hasJest, o as hasReactQuery, r as hasNext, s as hasStorybook, t as hasAstro } from "./has-dependency-B7hGqVJZ.mjs";
3
3
  import gitignoreConfig from "eslint-config-flat-gitignore";
4
4
  import globals from "globals";
5
5
  import { recommended } from "@eslint-community/eslint-plugin-eslint-comments/configs";
6
6
  import { createTypeScriptImportResolver } from "eslint-import-resolver-typescript";
7
7
  import { configs, importX } from "eslint-plugin-import-x";
8
8
  import nodePlugin from "eslint-plugin-n";
9
- import arrowReturnStylePlugin from "eslint-plugin-arrow-return-style-x";
10
9
  import deMorganPlugin, { configs as configs$1 } from "eslint-plugin-de-morgan";
11
10
  import eslint from "@eslint/js";
12
11
  import jsdocPlugin from "eslint-plugin-jsdoc";
@@ -102,14 +101,7 @@ const importsConfig = ({ isTypescriptEnabled = false } = {}) => {
102
101
  //#region src/rules/javascript.ts
103
102
  const additionalRules = {
104
103
  "array-callback-return": ["error", { allowImplicit: true }],
105
- "arrow-body-style": "off",
106
- "arrow-style/arrow-return-style": ["error", {
107
- jsxAlwaysUseExplicitReturn: true,
108
- namedExportsAlwaysUseExplicitReturn: true,
109
- objectReturnStyle: "off",
110
- usePrettier: false
111
- }],
112
- "arrow-style/no-export-default-arrow": "error",
104
+ "arrow-body-style": ["error", "always"],
113
105
  "class-methods-use-this": "error",
114
106
  "consistent-return": "error",
115
107
  "curly": ["error", "all"],
@@ -179,10 +171,7 @@ const javascriptConfig = () => {
179
171
  return [{
180
172
  linterOptions: { reportUnusedDisableDirectives: true },
181
173
  name: "jimmy.codes/javascript",
182
- plugins: {
183
- "arrow-style": arrowReturnStylePlugin,
184
- "de-morgan": deMorganPlugin
185
- },
174
+ plugins: { "de-morgan": deMorganPlugin },
186
175
  rules: javascriptRules
187
176
  }, {
188
177
  files: GLOB_TESTS,
@@ -460,7 +449,7 @@ const unicornRules = {
460
449
  "unicorn/filename-case": "off",
461
450
  "unicorn/import-style": "off",
462
451
  "unicorn/no-abusive-eslint-disable": "off",
463
- "unicorn/no-anonymous-default-export": "off",
452
+ "unicorn/no-anonymous-default-export": "error",
464
453
  "unicorn/no-array-callback-reference": "off",
465
454
  "unicorn/no-array-reduce": "off",
466
455
  "unicorn/no-null": "off",
@@ -557,7 +546,7 @@ const defineConfig = async ({ astro = false, autoDetect = true, gitignore = fals
557
546
  ];
558
547
  const featureConfigs = await Promise.all([
559
548
  isTypescriptEnabled && unwrap(import("./typescript-BDNbtOD5.mjs"), typescript),
560
- isReactEnabled && unwrap(import("./react-CWFVE51B.mjs"), react),
549
+ isReactEnabled && unwrap(import("./react-qDMgdbVJ.mjs"), react),
561
550
  isTanstackQueryEnabled && unwrap(import("./tanstack-query-ntNKBb-Z.mjs"), tanstackQuery),
562
551
  isAstroEnabled && unwrap(import("./astro-BMlbg_8j.mjs"), astro),
563
552
  isJestEnabled && unwrap(import("./jest-W70UkOeC.mjs"), jest),
@@ -1,5 +1,5 @@
1
1
  import { GLOB_JSX, GLOB_TSX } from "./globs.mjs";
2
- import { l as hasTypescript, r as hasNext, u as hasVite } from "./has-dependency-BB12gGNt.mjs";
2
+ import { l as hasTypescript, r as hasNext, u as hasVite } from "./has-dependency-B7hGqVJZ.mjs";
3
3
  import { n as extractOptions, t as unwrapDefault } from "./interop-default-BDN5nH8B.mjs";
4
4
  import { t as upwarn } from "./upwarn-Bq0SLcj_.mjs";
5
5
  import globals from "globals";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jimmy.codes/eslint-config",
3
- "version": "7.7.0",
3
+ "version": "7.8.0",
4
4
  "description": "A simple, modern ESLint config that covers most use cases.",
5
5
  "keywords": [
6
6
  "eslint",
@@ -52,7 +52,6 @@
52
52
  "eslint-config-flat-gitignore": "^2.3.0",
53
53
  "eslint-config-prettier": "^10.1.8",
54
54
  "eslint-import-resolver-typescript": "^4.4.4",
55
- "eslint-plugin-arrow-return-style-x": "^1.2.6",
56
55
  "eslint-plugin-astro": "^1.7.0",
57
56
  "eslint-plugin-de-morgan": "^2.1.1",
58
57
  "eslint-plugin-erasable-syntax-only": "0.4.1",