@ghettoddos/eslint-config 1.2.0 → 1.3.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/dist/index.js CHANGED
@@ -1060,6 +1060,8 @@ async function react(options = {}) {
1060
1060
  name: "react/rules",
1061
1061
  rules: {
1062
1062
  // recommended rules from eslint-plugin-react-x https://eslint-react.xyz/docs/rules/overview#core-rules
1063
+ "react/jsx-no-duplicate-props": "warn",
1064
+ "react/jsx-uses-vars": "warn",
1063
1065
  "react/no-access-state-in-setstate": "error",
1064
1066
  "react/no-array-index-key": "warn",
1065
1067
  "react/no-children-count": "warn",
@@ -1076,7 +1078,6 @@ async function react(options = {}) {
1076
1078
  "react/no-create-ref": "error",
1077
1079
  "react/no-default-props": "error",
1078
1080
  "react/no-direct-mutation-state": "error",
1079
- "react/no-duplicate-jsx-props": "warn",
1080
1081
  "react/no-duplicate-key": "warn",
1081
1082
  "react/no-forward-ref": "warn",
1082
1083
  "react/no-implicit-key": "warn",
@@ -1097,7 +1098,6 @@ async function react(options = {}) {
1097
1098
  "react/no-unused-state": "warn",
1098
1099
  "react/no-use-context": "warn",
1099
1100
  "react/no-useless-forward-ref": "warn",
1100
- "react/use-jsx-vars": "warn",
1101
1101
  // recommended rules from eslint-plugin-react-dom https://eslint-react.xyz/docs/rules/overview#dom-rules
1102
1102
  "react-dom/no-dangerously-set-innerhtml": "warn",
1103
1103
  "react-dom/no-dangerously-set-innerhtml-with-children": "error",
@@ -1120,6 +1120,7 @@ async function react(options = {}) {
1120
1120
  // recommended rules from eslint-plugin-react-hooks-extra https://eslint-react.xyz/docs/rules/overview#hooks-extra-rules
1121
1121
  "react-hooks-extra/no-direct-set-state-in-use-effect": "warn",
1122
1122
  "react-hooks-extra/no-unnecessary-use-prefix": "warn",
1123
+ "react-hooks-extra/prefer-use-state-lazy-initialization": "warn",
1123
1124
  // recommended rules from eslint-plugin-react-web-api https://eslint-react.xyz/docs/rules/overview#web-api-rules
1124
1125
  "react-web-api/no-leaked-event-listener": "warn",
1125
1126
  "react-web-api/no-leaked-interval": "warn",
@@ -1229,6 +1230,7 @@ async function sortPackageJson() {
1229
1230
  "keywords",
1230
1231
  "categories",
1231
1232
  "sideEffects",
1233
+ "imports",
1232
1234
  "exports",
1233
1235
  "main",
1234
1236
  "module",
@@ -1641,6 +1643,10 @@ async function typescript(options = {}) {
1641
1643
 
1642
1644
  // src/configs/unicorn.ts
1643
1645
  async function unicorn(options = {}) {
1646
+ const {
1647
+ allRecommended = false,
1648
+ overrides = {}
1649
+ } = options;
1644
1650
  return [
1645
1651
  {
1646
1652
  name: "unicorn/rules",
@@ -1648,7 +1654,7 @@ async function unicorn(options = {}) {
1648
1654
  unicorn: default6
1649
1655
  },
1650
1656
  rules: {
1651
- ...options.allRecommended ? default6.configs.recommended.rules : {
1657
+ ...allRecommended ? default6.configs.recommended.rules : {
1652
1658
  "unicorn/consistent-empty-array-spread": "error",
1653
1659
  "unicorn/error-message": "error",
1654
1660
  "unicorn/escape-case": "error",
@@ -1664,7 +1670,8 @@ async function unicorn(options = {}) {
1664
1670
  "unicorn/prefer-string-starts-ends-with": "error",
1665
1671
  "unicorn/prefer-type-error": "error",
1666
1672
  "unicorn/throw-new-error": "error"
1667
- }
1673
+ },
1674
+ ...overrides
1668
1675
  }
1669
1676
  }
1670
1677
  ];
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ghettoddos/eslint-config",
3
3
  "type": "module",
4
- "version": "1.2.0",
4
+ "version": "1.3.0",
5
5
  "description": "ghettoDdOS ESLint config",
6
6
  "author": "ghettoDdOS <pen.egor2002@gamil.com> (https://github.com/ghettoDdOS/)",
7
7
  "license": "MIT",
@@ -42,31 +42,31 @@
42
42
  }
43
43
  },
44
44
  "dependencies": {
45
- "@antfu/install-pkg": "^1.0.0",
46
- "@clack/prompts": "^0.10.0",
47
- "@eslint-community/eslint-plugin-eslint-comments": "^4.4.1",
48
- "@eslint-react/eslint-plugin": "^1.38.3",
49
- "@eslint/markdown": "^6.3.0",
45
+ "@antfu/install-pkg": "^1.1.0",
46
+ "@clack/prompts": "^0.10.1",
47
+ "@eslint-community/eslint-plugin-eslint-comments": "^4.5.0",
48
+ "@eslint-react/eslint-plugin": "^1.49.0",
49
+ "@eslint/markdown": "^6.4.0",
50
50
  "@stylistic/eslint-plugin": "^4.2.0",
51
- "@typescript-eslint/eslint-plugin": "^8.28.0",
52
- "@typescript-eslint/parser": "^8.28.0",
51
+ "@typescript-eslint/eslint-plugin": "^8.32.0",
52
+ "@typescript-eslint/parser": "^8.32.0",
53
53
  "eslint-config-flat-gitignore": "^2.1.0",
54
54
  "eslint-flat-config-utils": "^2.0.1",
55
55
  "eslint-merge-processors": "^2.0.0",
56
56
  "eslint-plugin-antfu": "^3.1.1",
57
- "eslint-plugin-import-x": "^4.9.3",
57
+ "eslint-plugin-import-x": "^4.11.1",
58
58
  "eslint-plugin-jsonc": "^2.20.0",
59
- "eslint-plugin-n": "^17.17.0",
60
- "eslint-plugin-perfectionist": "^4.10.1",
59
+ "eslint-plugin-n": "^17.18.0",
60
+ "eslint-plugin-perfectionist": "^4.12.3",
61
61
  "eslint-plugin-pnpm": "^0.3.1",
62
62
  "eslint-plugin-react-hooks": "^5.2.0",
63
- "eslint-plugin-react-refresh": "^0.4.19",
63
+ "eslint-plugin-react-refresh": "^0.4.20",
64
64
  "eslint-plugin-regexp": "^2.7.0",
65
65
  "eslint-plugin-toml": "^0.12.0",
66
- "eslint-plugin-unicorn": "^58.0.0",
66
+ "eslint-plugin-unicorn": "^59.0.1",
67
67
  "eslint-plugin-unused-imports": "^4.1.4",
68
- "eslint-plugin-yml": "^1.17.0",
69
- "globals": "^16.0.0",
68
+ "eslint-plugin-yml": "^1.18.0",
69
+ "globals": "^16.1.0",
70
70
  "jsonc-eslint-parser": "^2.4.0",
71
71
  "local-pkg": "^1.1.1",
72
72
  "parse-gitignore": "^2.0.0",
@@ -76,17 +76,17 @@
76
76
  "devDependencies": {
77
77
  "@eslint/config-inspector": "^1.0.2",
78
78
  "@prettier/plugin-xml": "^3.4.1",
79
- "@types/node": "^22.13.14",
79
+ "@types/node": "^22.15.17",
80
80
  "@unocss/eslint-plugin": "66.1.0-beta.3",
81
81
  "bumpp": "^10.1.0",
82
- "eslint": "^9.23.0",
82
+ "eslint": "^9.26.0",
83
83
  "eslint-plugin-format": "^1.0.1",
84
- "eslint-typegen": "^2.1.0",
85
- "lint-staged": "^15.5.0",
86
- "simple-git-hooks": "^2.12.1",
84
+ "eslint-typegen": "^2.2.0",
85
+ "lint-staged": "^16.0.0",
86
+ "simple-git-hooks": "^2.13.0",
87
87
  "tsup": "^8.4.0",
88
- "tsx": "^4.19.3",
89
- "typescript": "^5.8.2"
88
+ "tsx": "^4.19.4",
89
+ "typescript": "^5.8.3"
90
90
  },
91
91
  "simple-git-hooks": {
92
92
  "pre-commit": "npx lint-staged"