@ntnyq/eslint-config 4.1.0 → 4.2.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.mjs CHANGED
@@ -1619,9 +1619,11 @@ const configPinia = (options = {}) => {
1619
1619
  ];
1620
1620
  };
1621
1621
 
1622
+ const ALLOWED_DEPENDENCIES = ["eslint-plugin-unicorn"];
1622
1623
  const configDepend = (options = {}) => {
1623
1624
  const {
1624
1625
  files = [GLOB_SRC],
1626
+ allowed = [],
1625
1627
  // check package.json file
1626
1628
  packageJson: enableCheckPackageJson = true
1627
1629
  } = options;
@@ -1633,7 +1635,12 @@ const configDepend = (options = {}) => {
1633
1635
  depend: pluginDepend
1634
1636
  },
1635
1637
  rules: {
1636
- "depend/ban-dependencies": "error",
1638
+ "depend/ban-dependencies": [
1639
+ "error",
1640
+ {
1641
+ allowed: [...allowed, ...ALLOWED_DEPENDENCIES]
1642
+ }
1643
+ ],
1637
1644
  // Overrides rules
1638
1645
  ...options.overrides
1639
1646
  }
@@ -1650,7 +1657,12 @@ const configDepend = (options = {}) => {
1650
1657
  parser: parserJsonc
1651
1658
  },
1652
1659
  rules: {
1653
- "depend/ban-dependencies": "error",
1660
+ "depend/ban-dependencies": [
1661
+ "error",
1662
+ {
1663
+ allowed: [...allowed, ...ALLOWED_DEPENDENCIES]
1664
+ }
1665
+ ],
1654
1666
  // Overrides rules
1655
1667
  ...options.overrides
1656
1668
  }
@@ -2085,6 +2097,10 @@ const disabledRules = {
2085
2097
  * @see https://caniuse.com/?search=globalThis
2086
2098
  */
2087
2099
  "unicorn/prefer-global-this": "off",
2100
+ /**
2101
+ * Required node v20.11
2102
+ */
2103
+ "unicorn/prefer-import-meta-properties": "off",
2088
2104
  "unicorn/prefer-top-level-await": "off"
2089
2105
  };
2090
2106
  const configUnicorn = (options = {}) => [
@@ -2171,12 +2187,15 @@ const configUnicorn = (options = {}) => [
2171
2187
  * @pg Array
2172
2188
  */
2173
2189
  "unicorn/no-array-method-this-argument": "error",
2174
- "unicorn/no-array-push-push": "error",
2175
2190
  "unicorn/no-new-array": "error",
2191
+ "unicorn/no-unnecessary-array-flat-depth": "error",
2192
+ "unicorn/no-unnecessary-array-splice-count": "error",
2193
+ "unicorn/no-unnecessary-slice-end": "error",
2176
2194
  "unicorn/prefer-array-find": "error",
2177
2195
  "unicorn/prefer-array-flat-map": "error",
2178
2196
  "unicorn/prefer-array-index-of": "error",
2179
2197
  "unicorn/prefer-array-some": "error",
2198
+ "unicorn/prefer-single-call": "error",
2180
2199
  "unicorn/require-array-join-separator": "error",
2181
2200
  /**
2182
2201
  * @pg Set
@@ -2954,11 +2973,7 @@ const configESLintPlugin = async (options = {}) => {
2954
2973
  };
2955
2974
 
2956
2975
  const configGitHubAction = (options = {}) => {
2957
- const {
2958
- //
2959
- files = [GLOB_GITHUB_ACTION],
2960
- overrides: overridesRules = {}
2961
- } = options;
2976
+ const { files = [GLOB_GITHUB_ACTION] } = options;
2962
2977
  return [
2963
2978
  {
2964
2979
  name: "ntnyq/github-action",
@@ -2973,7 +2988,9 @@ const configGitHubAction = (options = {}) => {
2973
2988
  "github-action/no-invalid-key": "error",
2974
2989
  "github-action/prefer-file-extension": "error",
2975
2990
  "github-action/require-action-name": "error",
2976
- ...overridesRules
2991
+ "github-action/valid-timeout-minutes": "error",
2992
+ "github-action/valid-trigger-events": "error",
2993
+ ...options.overrides
2977
2994
  }
2978
2995
  }
2979
2996
  ];
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@ntnyq/eslint-config",
3
3
  "type": "module",
4
- "version": "4.1.0",
5
- "packageManager": "pnpm@10.9.0",
4
+ "version": "4.2.0",
5
+ "packageManager": "pnpm@10.10.0",
6
6
  "description": "An opinionated ESLint config preset of ntnyq",
7
7
  "keywords": [
8
8
  "eslint",
@@ -73,13 +73,13 @@
73
73
  }
74
74
  },
75
75
  "dependencies": {
76
- "@antfu/install-pkg": "^1.0.0",
76
+ "@antfu/install-pkg": "^1.1.0",
77
77
  "@clack/prompts": "^0.10.1",
78
78
  "@eslint-community/eslint-plugin-eslint-comments": "^4.5.0",
79
- "@eslint/js": "^9.25.1",
79
+ "@eslint/js": "^9.26.0",
80
80
  "@eslint/markdown": "^6.4.0",
81
- "@unocss/eslint-plugin": "^66.1.0-beta.12",
82
- "@vitest/eslint-plugin": "^1.1.43",
81
+ "@unocss/eslint-plugin": "^66.1.0",
82
+ "@vitest/eslint-plugin": "^1.1.44",
83
83
  "eslint-config-flat-gitignore": "^2.1.0",
84
84
  "eslint-flat-config-utils": "^2.0.1",
85
85
  "eslint-import-resolver-typescript": "^4.3.4",
@@ -87,8 +87,8 @@
87
87
  "eslint-plugin-antfu": "^3.1.1",
88
88
  "eslint-plugin-command": "^3.2.0",
89
89
  "eslint-plugin-de-morgan": "^1.2.1",
90
- "eslint-plugin-depend": "^1.0.0",
91
- "eslint-plugin-github-action": "^0.0.15",
90
+ "eslint-plugin-depend": "^1.1.0",
91
+ "eslint-plugin-github-action": "^0.0.16",
92
92
  "eslint-plugin-import-x": "^4.11.0",
93
93
  "eslint-plugin-jsdoc": "^50.6.11",
94
94
  "eslint-plugin-jsonc": "^2.20.0",
@@ -98,41 +98,41 @@
98
98
  "eslint-plugin-perfectionist": "^4.12.3",
99
99
  "eslint-plugin-pinia": "^0.4.1",
100
100
  "eslint-plugin-pnpm": "^0.3.1",
101
- "eslint-plugin-prettier": "^5.2.6",
101
+ "eslint-plugin-prettier": "^5.4.0",
102
102
  "eslint-plugin-regexp": "^2.7.0",
103
- "eslint-plugin-svgo": "^0.7.1",
103
+ "eslint-plugin-svgo": "^0.7.2",
104
104
  "eslint-plugin-toml": "^0.12.0",
105
- "eslint-plugin-unicorn": "^58.0.0",
106
- "eslint-plugin-vue": "^10.0.0",
105
+ "eslint-plugin-unicorn": "^59.0.1",
106
+ "eslint-plugin-vue": "^10.1.0",
107
107
  "eslint-plugin-yml": "^1.18.0",
108
108
  "eslint-processor-vue-blocks": "^2.0.0",
109
- "globals": "^16.0.0",
109
+ "globals": "^16.1.0",
110
110
  "jsonc-eslint-parser": "^2.4.0",
111
111
  "local-pkg": "^1.1.1",
112
112
  "prettier": "^3.5.3",
113
113
  "toml-eslint-parser": "^0.10.0",
114
- "typescript-eslint": "^8.31.0",
114
+ "typescript-eslint": "^8.32.0",
115
115
  "vue-eslint-parser": "^10.1.3",
116
116
  "yaml-eslint-parser": "^1.3.0"
117
117
  },
118
118
  "devDependencies": {
119
119
  "@ntnyq/prettier-config": "^2.0.0",
120
- "@types/node": "^22.15.2",
120
+ "@types/node": "^22.15.14",
121
121
  "bumpp": "^10.1.0",
122
- "eslint": "^9.25.1",
122
+ "eslint": "^9.26.0",
123
123
  "eslint-parser-plain": "^0.1.1",
124
124
  "eslint-plugin-eslint-plugin": "^6.4.0",
125
125
  "eslint-typegen": "^2.1.0",
126
126
  "husky": "^9.1.7",
127
127
  "jiti": "^2.4.2",
128
128
  "nano-staged": "^0.8.0",
129
- "npm-run-all2": "^7.0.2",
129
+ "npm-run-all2": "^8.0.1",
130
130
  "tinyglobby": "^0.2.13",
131
- "tsx": "^4.19.3",
131
+ "tsx": "^4.19.4",
132
132
  "typescript": "^5.8.3",
133
133
  "unbuild": "^3.5.0",
134
134
  "uncase": "^0.1.0",
135
- "vitest": "^3.1.2"
135
+ "vitest": "^3.1.3"
136
136
  },
137
137
  "engines": {
138
138
  "node": ">=18.18.0"