eslint-config-heck 4.3.2 → 5.0.0-beta.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.
@@ -1,6 +1,5 @@
1
- "use strict";
2
-
3
- module.exports = [
1
+ // biome-ignore lint/style/noDefaultExport: Required for ESLint configuration
2
+ export default [
4
3
  {
5
4
  rules: {
6
5
  "max-depth": ["warn", 2],
@@ -0,0 +1,6 @@
1
+ import complexity from "./complexity.js";
2
+ import groupImports from "./groupImports.js";
3
+ import nodeWithBiome from "./nodeWithBiome.js";
4
+
5
+ // biome-ignore lint/style/noDefaultExport: Required for ESLint configuration
6
+ export default [...nodeWithBiome, ...complexity, ...groupImports];
@@ -1,6 +1,5 @@
1
- "use strict";
2
-
3
- module.exports = [
1
+ // biome-ignore lint/style/noDefaultExport: Required for ESLint configuration
2
+ export default [
4
3
  {
5
4
  rules: {
6
5
  "sort-imports": [
@@ -1,17 +1,16 @@
1
- "use strict";
1
+ import stylistic from "@stylistic/eslint-plugin";
2
+ import typescriptEslint from "@typescript-eslint/eslint-plugin";
3
+ import tsParser from "@typescript-eslint/parser";
4
+ import importPlugin, { flatConfigs } from "eslint-plugin-import";
5
+ import jest from "eslint-plugin-jest";
6
+ import react from "eslint-plugin-react";
7
+ import reactHooks from "eslint-plugin-react-hooks";
8
+ import testingLibrary from "eslint-plugin-testing-library";
9
+ import unicorn from "eslint-plugin-unicorn";
10
+ import globals from "globals";
2
11
 
3
- const stylistic = require("@stylistic/eslint-plugin");
4
- const typescriptEslint = require("@typescript-eslint/eslint-plugin");
5
- const tsParser = require("@typescript-eslint/parser");
6
- const importPlugin = require("eslint-plugin-import");
7
- const jest = require("eslint-plugin-jest");
8
- const react = require("eslint-plugin-react");
9
- const reactHooks = require("eslint-plugin-react-hooks");
10
- const testingLibrary = require("eslint-plugin-testing-library");
11
- const unicorn = require("eslint-plugin-unicorn");
12
- const globals = require("globals");
13
-
14
- module.exports = [
12
+ // biome-ignore lint/style/noDefaultExport: Required for ESLint configuration
13
+ export default [
15
14
  {
16
15
  plugins: {
17
16
  "@stylistic": stylistic,
@@ -507,6 +506,7 @@ module.exports = [
507
506
  allowExpressions: true,
508
507
  },
509
508
  ],
509
+ "react/jsx-pascal-case": "error",
510
510
  "react/jsx-props-no-spread-multi": "error",
511
511
  "react/jsx-props-no-spreading": "off",
512
512
  "react/jsx-sort-props": "off",
@@ -613,6 +613,8 @@ module.exports = [
613
613
  ignore: ["^ex([A-Z0-9].*)?$"],
614
614
  },
615
615
  ],
616
+ "unicorn/consistent-assert": "error",
617
+ "unicorn/consistent-date-clone": "error",
616
618
  "unicorn/consistent-destructuring": "error",
617
619
  "unicorn/consistent-empty-array-spread": "error",
618
620
  "unicorn/consistent-existence-index-check": "error",
@@ -642,6 +644,7 @@ module.exports = [
642
644
  "unicorn/import-style": "error",
643
645
  "unicorn/new-for-builtins": "error",
644
646
  "unicorn/no-abusive-eslint-disable": "error",
647
+ "unicorn/no-accessor-recursion": "error",
645
648
  "unicorn/no-anonymous-default-export": "error",
646
649
  "unicorn/no-array-callback-reference": "off",
647
650
  "unicorn/no-array-for-each": "off",
@@ -656,12 +659,14 @@ module.exports = [
656
659
  "unicorn/no-for-loop": "error",
657
660
  "unicorn/no-hex-escape": "error",
658
661
  "unicorn/no-instanceof-array": "error",
662
+ "unicorn/no-instanceof-builtins": "error",
659
663
  "unicorn/no-invalid-fetch-options": "error",
660
664
  "unicorn/no-invalid-remove-event-listener": "error",
661
665
  "unicorn/no-keyword-prefix": "off",
662
666
  "unicorn/no-length-as-slice-end": "error",
663
667
  "unicorn/no-lonely-if": "error",
664
668
  "unicorn/no-magic-array-flat-depth": "error",
669
+ "unicorn/no-named-default": "error",
665
670
  "unicorn/no-negated-condition": "error",
666
671
  "unicorn/no-negation-in-equality-check": "error",
667
672
  "unicorn/no-nested-ternary": "off",
@@ -809,7 +814,7 @@ module.exports = [
809
814
  },
810
815
  {
811
816
  files: ["**/*.ts", "**/*.tsx"],
812
- ...importPlugin.flatConfigs.typescript,
817
+ ...flatConfigs.typescript,
813
818
  },
814
819
  {
815
820
  files: ["**/*.ts", "**/*.tsx"],
@@ -821,7 +826,7 @@ module.exports = [
821
826
  sourceType: "module",
822
827
  parserOptions: {
823
828
  projectService: true,
824
- tsconfigRootDir: __dirname,
829
+ tsconfigRootDir: import.meta.dirname,
825
830
  },
826
831
  },
827
832
  rules: {
@@ -1,17 +1,16 @@
1
- "use strict";
1
+ import stylistic from "@stylistic/eslint-plugin";
2
+ import typescriptEslint from "@typescript-eslint/eslint-plugin";
3
+ import tsParser from "@typescript-eslint/parser";
4
+ import importPlugin, { flatConfigs } from "eslint-plugin-import";
5
+ import jest from "eslint-plugin-jest";
6
+ import react from "eslint-plugin-react";
7
+ import reactHooks from "eslint-plugin-react-hooks";
8
+ import testingLibrary from "eslint-plugin-testing-library";
9
+ import unicorn from "eslint-plugin-unicorn";
10
+ import globals from "globals";
2
11
 
3
- const stylistic = require("@stylistic/eslint-plugin");
4
- const typescriptEslint = require("@typescript-eslint/eslint-plugin");
5
- const tsParser = require("@typescript-eslint/parser");
6
- const importPlugin = require("eslint-plugin-import");
7
- const jest = require("eslint-plugin-jest");
8
- const react = require("eslint-plugin-react");
9
- const reactHooks = require("eslint-plugin-react-hooks");
10
- const testingLibrary = require("eslint-plugin-testing-library");
11
- const unicorn = require("eslint-plugin-unicorn");
12
- const globals = require("globals");
13
-
14
- module.exports = [
12
+ // biome-ignore lint/style/noDefaultExport: Required for ESLint configuration
13
+ export default [
15
14
  {
16
15
  plugins: {
17
16
  "@stylistic": stylistic,
@@ -308,9 +307,11 @@ module.exports = [
308
307
  "unicode-bom": "error",
309
308
 
310
309
  // @stylistic
310
+ "@stylistic/jsx-pascal-case": "off",
311
311
  "@stylistic/max-statements-per-line": "error",
312
312
  "@stylistic/multiline-comment-style": ["error", "separate-lines"],
313
313
  "@stylistic/no-floating-decimal": "error",
314
+ "@stylistic/no-mixed-operators": "off",
314
315
  "@stylistic/padding-line-between-statements": [
315
316
  "error",
316
317
  // return
@@ -538,6 +539,8 @@ module.exports = [
538
539
  ignore: ["^ex([A-Z0-9].*)?$"],
539
540
  },
540
541
  ],
542
+ "unicorn/consistent-assert": "error",
543
+ "unicorn/consistent-date-clone": "error",
541
544
  "unicorn/consistent-destructuring": "error",
542
545
  "unicorn/consistent-empty-array-spread": "error",
543
546
  "unicorn/consistent-existence-index-check": "error",
@@ -557,6 +560,7 @@ module.exports = [
557
560
  "unicorn/import-style": "error",
558
561
  "unicorn/new-for-builtins": "off",
559
562
  "unicorn/no-abusive-eslint-disable": "error",
563
+ "unicorn/no-accessor-recursion": "error",
560
564
  "unicorn/no-anonymous-default-export": "error",
561
565
  "unicorn/no-array-callback-reference": "off",
562
566
  "unicorn/no-array-for-each": "off",
@@ -571,12 +575,14 @@ module.exports = [
571
575
  "unicorn/no-for-loop": "error",
572
576
  "unicorn/no-hex-escape": "error",
573
577
  "unicorn/no-instanceof-array": "off",
578
+ "unicorn/no-instanceof-builtins": "error",
574
579
  "unicorn/no-invalid-fetch-options": "error",
575
580
  "unicorn/no-invalid-remove-event-listener": "error",
576
581
  "unicorn/no-keyword-prefix": "off",
577
582
  "unicorn/no-length-as-slice-end": "error",
578
583
  "unicorn/no-lonely-if": "off",
579
584
  "unicorn/no-magic-array-flat-depth": "error",
585
+ "unicorn/no-named-default": "error",
580
586
  "unicorn/no-negated-condition": "off",
581
587
  "unicorn/no-negation-in-equality-check": "error",
582
588
  "unicorn/no-nested-ternary": "off",
@@ -724,7 +730,7 @@ module.exports = [
724
730
  },
725
731
  {
726
732
  files: ["**/*.ts", "**/*.tsx"],
727
- ...importPlugin.flatConfigs.typescript,
733
+ ...flatConfigs.typescript,
728
734
  },
729
735
  {
730
736
  files: ["**/*.ts", "**/*.tsx"],
@@ -736,7 +742,7 @@ module.exports = [
736
742
  sourceType: "module",
737
743
  parserOptions: {
738
744
  projectService: true,
739
- tsconfigRootDir: __dirname,
745
+ tsconfigRootDir: import.meta.dirname,
740
746
  },
741
747
  },
742
748
  rules: {
package/package.json CHANGED
@@ -1,16 +1,16 @@
1
1
  {
2
2
  "name": "eslint-config-heck",
3
- "version": "4.3.2",
3
+ "version": "5.0.0-beta.1",
4
4
  "description": "Contains an ESLint configuration for ES2015+, TypeScript, and React.",
5
5
  "type": "module",
6
6
  "main": "index.js",
7
7
  "exports": {
8
8
  "./biome": "./biomeLinting.json",
9
- "./node": "./node.cjs",
10
- "./nodeWithBiome": "./nodeWithBiome.cjs",
11
- "./complexity": "./complexity.cjs",
12
- "./groupImports": "./groupImports.cjs",
13
- "./reactNative": "./reactNative.cjs"
9
+ "./node": "./node.js",
10
+ "./nodeWithBiome": "./nodeWithBiome.js",
11
+ "./complexity": "./complexity.js",
12
+ "./groupImports": "./groupImports.js",
13
+ "./reactNative": "./reactNative.js"
14
14
  },
15
15
  "scripts": {
16
16
  "update": "npx -y npm-check-updates -i --install never && npx -y npm-check-updates -i --target minor --install never && npx -y npm-check-updates -i --target patch --install never && npm update --force",
@@ -26,9 +26,9 @@
26
26
  "author": "atheck",
27
27
  "license": "MIT",
28
28
  "dependencies": {
29
- "@stylistic/eslint-plugin": "3.1.0",
30
- "@typescript-eslint/eslint-plugin": "8.24.0",
31
- "@typescript-eslint/parser": "8.24.0",
29
+ "@stylistic/eslint-plugin": "4.0.0",
30
+ "@typescript-eslint/eslint-plugin": "8.24.1",
31
+ "@typescript-eslint/parser": "8.24.1",
32
32
  "eslint": "9.20.1",
33
33
  "eslint-plugin-import": "2.31.0",
34
34
  "eslint-plugin-jest": "28.11.0",
@@ -36,7 +36,7 @@
36
36
  "eslint-plugin-react-hooks": "5.1.0",
37
37
  "eslint-plugin-react-native": "5.0.0",
38
38
  "eslint-plugin-testing-library": "7.1.1",
39
- "eslint-plugin-unicorn": "56.0.1",
39
+ "eslint-plugin-unicorn": "57.0.0",
40
40
  "typescript": "5.7.3"
41
41
  },
42
42
  "devDependencies": {
@@ -48,7 +48,7 @@
48
48
  "globals": "15.15.0",
49
49
  "jest": "29.7.0",
50
50
  "react": "18.3.1",
51
- "semantic-release": "24.2.2"
51
+ "semantic-release": "24.2.3"
52
52
  },
53
53
  "repository": {
54
54
  "type": "git",
@@ -1,8 +1,7 @@
1
- "use strict";
1
+ import reactNative from "eslint-plugin-react-native";
2
2
 
3
- const reactNative = require("eslint-plugin-react-native");
4
-
5
- module.exports = [
3
+ // biome-ignore lint/style/noDefaultExport: Required for ESLint configuration
4
+ export default [
6
5
  {
7
6
  plugins: {
8
7
  "react-native": reactNative,
package/eslint.config.cjs DELETED
@@ -1,7 +0,0 @@
1
- "use strict";
2
-
3
- const complexity = require("./complexity.cjs");
4
- const groupImports = require("./groupImports.cjs");
5
- const nodeWithBiome = require("./nodeWithBiome.cjs");
6
-
7
- module.exports = [...nodeWithBiome, ...complexity, ...groupImports];