@eienjs/eslint-config 1.4.0 → 1.4.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.
@@ -3,7 +3,7 @@ const versionsMap = {
3
3
  "@adonisjs/eslint-plugin": "^2.0.1",
4
4
  "@nuxt/eslint-plugin": "^1.9.0",
5
5
  "astro-eslint-parser": "^1.2.2",
6
- "eslint": "^9.37.0",
6
+ "eslint": "^9.38.0",
7
7
  "eslint-plugin-astro": "^1.3.1",
8
8
  "eslint-plugin-format": "^1.0.2",
9
9
  "prettier-plugin-astro": "^0.14.1"
@@ -85,7 +85,8 @@ async function adonisjs(options = {}) {
85
85
  name: "eienjs/adonisjs/controllers-disables",
86
86
  rules: {
87
87
  "@typescript-eslint/explicit-function-return-type": "off",
88
- "@typescript-eslint/explicit-module-boundary-types": "off"
88
+ "@typescript-eslint/explicit-module-boundary-types": "off",
89
+ "@typescript-eslint/require-await": "off"
89
90
  }
90
91
  },
91
92
  {
@@ -105,7 +106,9 @@ async function adonisjs(options = {}) {
105
106
  "@typescript-eslint/unbound-method": "off",
106
107
  "@typescript-eslint/explicit-function-return-type": "off",
107
108
  "@typescript-eslint/explicit-module-boundary-types": "off",
108
- "@typescript-eslint/no-unsafe-assignment": "off"
109
+ "@typescript-eslint/no-unsafe-assignment": "off",
110
+ "@typescript-eslint/no-explicit-any": "off",
111
+ "@typescript-eslint/no-unsafe-return": "off"
109
112
  }
110
113
  }
111
114
  ];
@@ -1,4 +1,4 @@
1
- import { GLOB_ASTRO_TS, GLOB_MARKDOWN, GLOB_TS, GLOB_TSX } from "../globs.js";
1
+ import { GLOB_ASTRO_TS, GLOB_MARKDOWN, GLOB_TS, GLOB_TSX, GLOB_VUE } from "../globs.js";
2
2
  import { ensurePackages, interopDefault } from "../utils.js";
3
3
  import { pluginAntfu } from "../plugins.js";
4
4
  import process from "node:process";
@@ -9,6 +9,7 @@ async function typescript(options = {}) {
9
9
  const files = options.files ?? [
10
10
  GLOB_TS,
11
11
  GLOB_TSX,
12
+ GLOB_VUE,
12
13
  ...componentExts.map((ext) => `**/*.${ext}`)
13
14
  ];
14
15
  const filesTypeAware = options.filesTypeAware ?? [GLOB_TS, GLOB_TSX];
@@ -214,10 +215,9 @@ async function typescript(options = {}) {
214
215
  if (isErasableSyntaxOnly) {
215
216
  await ensurePackages(["eslint-plugin-erasable-syntax-only"]);
216
217
  const pluginErasableSyntaxOnly = await interopDefault(import("eslint-plugin-erasable-syntax-only"));
217
- const { enums, parameterProperties } = typeof isErasableSyntaxOnly === "boolean" ? {
218
- enums: true,
219
- parameterProperties: true
220
- } : isErasableSyntaxOnly;
218
+ const resolvedErasableSyntaxOnly = typeof erasableSyntaxOnly === "boolean" ? {} : erasableSyntaxOnly;
219
+ const enums = resolvedErasableSyntaxOnly.enums ?? true;
220
+ const parameterProperties = resolvedErasableSyntaxOnly.parameterProperties ?? true;
221
221
  rules.push({
222
222
  files,
223
223
  name: "eienjs/typescript/erasable-syntax-only",
package/dist/package.js CHANGED
@@ -1,5 +1,5 @@
1
1
  //#region package.json
2
- var version = "1.4.0";
2
+ var version = "1.4.2";
3
3
 
4
4
  //#endregion
5
5
  export { version };
package/dist/typegen.d.ts CHANGED
@@ -128,6 +128,11 @@ interface RuleOptions {
128
128
  * @see https://eslint.style/rules/eol-last
129
129
  */
130
130
  '@stylistic/eol-last'?: Linter.RuleEntry<StylisticEolLast>;
131
+ /**
132
+ * Enforce consistent spacing and line break styles inside brackets.
133
+ * @see https://eslint.style/rules/list-style
134
+ */
135
+ '@stylistic/exp-list-style'?: Linter.RuleEntry<StylisticExpListStyle>;
131
136
  /**
132
137
  * Enforce line breaks between arguments of a function call
133
138
  * @see https://eslint.style/rules/function-call-argument-newline
@@ -2184,6 +2189,26 @@ interface RuleOptions {
2184
2189
  * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/text-escaping.md#repos-sticky-header
2185
2190
  */
2186
2191
  'jsdoc/text-escaping'?: Linter.RuleEntry<JsdocTextEscaping>;
2192
+ /**
2193
+ * Prefers either function properties or method signatures
2194
+ * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/ts-method-signature-style.md#repos-sticky-header
2195
+ */
2196
+ 'jsdoc/ts-method-signature-style'?: Linter.RuleEntry<JsdocTsMethodSignatureStyle>;
2197
+ /**
2198
+ * Warns against use of the empty object type
2199
+ * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/ts-no-empty-object-type.md#repos-sticky-header
2200
+ */
2201
+ 'jsdoc/ts-no-empty-object-type'?: Linter.RuleEntry<[]>;
2202
+ /**
2203
+ * Catches unnecessary template expressions such as string expressions within a template literal.
2204
+ * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/ts-no-unnecessary-template-expression.md#repos-sticky-header
2205
+ */
2206
+ 'jsdoc/ts-no-unnecessary-template-expression'?: Linter.RuleEntry<JsdocTsNoUnnecessaryTemplateExpression>;
2207
+ /**
2208
+ * Prefers function types over call signatures when there are no other properties.
2209
+ * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/ts-prefer-function-type.md#repos-sticky-header
2210
+ */
2211
+ 'jsdoc/ts-prefer-function-type'?: Linter.RuleEntry<JsdocTsPreferFunctionType>;
2187
2212
  /**
2188
2213
  * Formats JSDoc type values.
2189
2214
  * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/type-formatting.md#repos-sticky-header
@@ -4468,7 +4493,7 @@ interface RuleOptions {
4468
4493
  */
4469
4494
  'template-tag-spacing'?: Linter.RuleEntry<TemplateTagSpacing>;
4470
4495
  /**
4471
- * require .spec test file pattern
4496
+ * require test file pattern
4472
4497
  * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/consistent-test-filename.md
4473
4498
  */
4474
4499
  'test/consistent-test-filename'?: Linter.RuleEntry<TestConsistentTestFilename>;
@@ -7296,6 +7321,50 @@ type StylisticCurlyNewline = [] | [(("always" | "never") | {
7296
7321
  type StylisticDotLocation = [] | [("object" | "property")];
7297
7322
  // ----- @stylistic/eol-last -----
7298
7323
  type StylisticEolLast = [] | [("always" | "never" | "unix" | "windows")];
7324
+ // ----- @stylistic/exp-list-style -----
7325
+ type StylisticExpListStyle = [] | [{
7326
+ singleLine?: _StylisticExpListStyle_SingleLineConfig;
7327
+ multiLine?: _StylisticExpListStyle_MultiLineConfig;
7328
+ overrides?: {
7329
+ "[]"?: _StylisticExpListStyle_BaseConfig;
7330
+ "{}"?: _StylisticExpListStyle_BaseConfig;
7331
+ "<>"?: _StylisticExpListStyle_BaseConfig;
7332
+ "()"?: _StylisticExpListStyle_BaseConfig;
7333
+ ArrayExpression?: _StylisticExpListStyle_BaseConfig;
7334
+ ArrayPattern?: _StylisticExpListStyle_BaseConfig;
7335
+ ArrowFunctionExpression?: _StylisticExpListStyle_BaseConfig;
7336
+ CallExpression?: _StylisticExpListStyle_BaseConfig;
7337
+ ExportNamedDeclaration?: _StylisticExpListStyle_BaseConfig;
7338
+ FunctionDeclaration?: _StylisticExpListStyle_BaseConfig;
7339
+ FunctionExpression?: _StylisticExpListStyle_BaseConfig;
7340
+ ImportDeclaration?: _StylisticExpListStyle_BaseConfig;
7341
+ ImportAttributes?: _StylisticExpListStyle_BaseConfig;
7342
+ NewExpression?: _StylisticExpListStyle_BaseConfig;
7343
+ ObjectExpression?: _StylisticExpListStyle_BaseConfig;
7344
+ ObjectPattern?: _StylisticExpListStyle_BaseConfig;
7345
+ TSDeclareFunction?: _StylisticExpListStyle_BaseConfig;
7346
+ TSFunctionType?: _StylisticExpListStyle_BaseConfig;
7347
+ TSInterfaceBody?: _StylisticExpListStyle_BaseConfig;
7348
+ TSEnumBody?: _StylisticExpListStyle_BaseConfig;
7349
+ TSTupleType?: _StylisticExpListStyle_BaseConfig;
7350
+ TSTypeLiteral?: _StylisticExpListStyle_BaseConfig;
7351
+ TSTypeParameterDeclaration?: _StylisticExpListStyle_BaseConfig;
7352
+ TSTypeParameterInstantiation?: _StylisticExpListStyle_BaseConfig;
7353
+ JSONArrayExpression?: _StylisticExpListStyle_BaseConfig;
7354
+ JSONObjectExpression?: _StylisticExpListStyle_BaseConfig;
7355
+ };
7356
+ }];
7357
+ interface _StylisticExpListStyle_SingleLineConfig {
7358
+ spacing?: ("always" | "never");
7359
+ maxItems?: number;
7360
+ }
7361
+ interface _StylisticExpListStyle_MultiLineConfig {
7362
+ minItems?: number;
7363
+ }
7364
+ interface _StylisticExpListStyle_BaseConfig {
7365
+ singleLine?: _StylisticExpListStyle_SingleLineConfig;
7366
+ multiline?: _StylisticExpListStyle_MultiLineConfig;
7367
+ }
7299
7368
  // ----- @stylistic/function-call-argument-newline -----
7300
7369
  type StylisticFunctionCallArgumentNewline = [] | [("always" | "never" | "consistent")];
7301
7370
  // ----- @stylistic/function-call-spacing -----
@@ -7365,7 +7434,11 @@ type StylisticIndent = [] | [("tab" | number)] | [("tab" | number), {
7365
7434
  ObjectExpression?: (number | ("first" | "off"));
7366
7435
  ImportDeclaration?: (number | ("first" | "off"));
7367
7436
  flatTernaryExpressions?: boolean;
7368
- offsetTernaryExpressions?: boolean;
7437
+ offsetTernaryExpressions?: (boolean | {
7438
+ CallExpression?: boolean;
7439
+ AwaitExpression?: boolean;
7440
+ NewExpression?: boolean;
7441
+ });
7369
7442
  offsetTernaryExpressionsOffsetCallExpressions?: boolean;
7370
7443
  ignoredNodes?: string[];
7371
7444
  ignoreComments?: boolean;
@@ -8166,6 +8239,7 @@ type StylisticObjectCurlySpacing = [] | [("always" | "never")] | [("always" | "n
8166
8239
  TSInterfaceBody?: ("always" | "never");
8167
8240
  TSEnumBody?: ("always" | "never");
8168
8241
  };
8242
+ emptyObjects?: ("ignore" | "always" | "never");
8169
8243
  }];
8170
8244
  // ----- @stylistic/object-property-newline -----
8171
8245
  type StylisticObjectPropertyNewline = [] | [{
@@ -10105,6 +10179,18 @@ type JsdocTextEscaping = [] | [{
10105
10179
  escapeHTML?: boolean;
10106
10180
  escapeMarkdown?: boolean;
10107
10181
  }];
10182
+ // ----- jsdoc/ts-method-signature-style -----
10183
+ type JsdocTsMethodSignatureStyle = [] | [("method" | "property")] | [("method" | "property"), {
10184
+ enableFixer?: boolean;
10185
+ }];
10186
+ // ----- jsdoc/ts-no-unnecessary-template-expression -----
10187
+ type JsdocTsNoUnnecessaryTemplateExpression = [] | [{
10188
+ enableFixer?: boolean;
10189
+ }];
10190
+ // ----- jsdoc/ts-prefer-function-type -----
10191
+ type JsdocTsPreferFunctionType = [] | [{
10192
+ enableFixer?: boolean;
10193
+ }];
10108
10194
  // ----- jsdoc/type-formatting -----
10109
10195
  type JsdocTypeFormatting = [] | [{
10110
10196
  arrayBrackets?: ("angle" | "square");
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@eienjs/eslint-config",
3
3
  "type": "module",
4
- "version": "1.4.0",
4
+ "version": "1.4.2",
5
5
  "description": "EienJS ESLint Config",
6
6
  "author": "Fernando Isidro <luffynando@gmail.com> (https://github.com/luffynando/)",
7
7
  "license": "MIT",
@@ -40,7 +40,7 @@
40
40
  "@nuxt/eslint-plugin": "^1.9.0",
41
41
  "@prettier/plugin-xml": "^3.4.2",
42
42
  "astro-eslint-parser": "^1.2.2",
43
- "eslint": "^9.37.0",
43
+ "eslint": "^9.38.0",
44
44
  "eslint-plugin-astro": "^1.3.1",
45
45
  "eslint-plugin-erasable-syntax-only": "^0.3.1",
46
46
  "eslint-plugin-format": "^1.0.2",
@@ -76,11 +76,11 @@
76
76
  "@antfu/install-pkg": "^1.1.0",
77
77
  "@clack/prompts": "^0.11.0",
78
78
  "@eslint-community/eslint-plugin-eslint-comments": "^4.5.0",
79
- "@eslint/markdown": "^7.4.0",
80
- "@stylistic/eslint-plugin": "^5.4.0",
81
- "@typescript-eslint/eslint-plugin": "^8.46.0",
82
- "@typescript-eslint/parser": "^8.46.0",
83
- "@vitest/eslint-plugin": "^1.3.16",
79
+ "@eslint/markdown": "^7.5.0",
80
+ "@stylistic/eslint-plugin": "^5.5.0",
81
+ "@typescript-eslint/eslint-plugin": "^8.46.2",
82
+ "@typescript-eslint/parser": "^8.46.2",
83
+ "@vitest/eslint-plugin": "^1.3.24",
84
84
  "ansis": "^4.2.0",
85
85
  "cac": "^6.7.14",
86
86
  "eslint-config-flat-gitignore": "^2.1.0",
@@ -89,17 +89,17 @@
89
89
  "eslint-plugin-antfu": "^3.1.1",
90
90
  "eslint-plugin-command": "^3.3.1",
91
91
  "eslint-plugin-import-lite": "^0.3.0",
92
- "eslint-plugin-jsdoc": "^61.0.1",
92
+ "eslint-plugin-jsdoc": "^61.1.8",
93
93
  "eslint-plugin-jsonc": "^2.21.0",
94
94
  "eslint-plugin-n": "^17.23.1",
95
95
  "eslint-plugin-no-only-tests": "^3.3.0",
96
96
  "eslint-plugin-perfectionist": "^4.15.1",
97
- "eslint-plugin-pnpm": "^1.2.0",
97
+ "eslint-plugin-pnpm": "^1.3.0",
98
98
  "eslint-plugin-regexp": "^2.10.0",
99
99
  "eslint-plugin-toml": "^0.12.0",
100
100
  "eslint-plugin-unicorn": "^61.0.2",
101
- "eslint-plugin-unused-imports": "^4.2.0",
102
- "eslint-plugin-vue": "^10.5.0",
101
+ "eslint-plugin-unused-imports": "^4.3.0",
102
+ "eslint-plugin-vue": "^10.5.1",
103
103
  "eslint-plugin-yml": "^1.19.0",
104
104
  "eslint-processor-vue-blocks": "^2.0.0",
105
105
  "globals": "^16.4.0",
@@ -118,10 +118,10 @@
118
118
  "@eslint/config-inspector": "^1.3.0",
119
119
  "@nuxt/eslint-plugin": "^1.9.0",
120
120
  "@prettier/plugin-xml": "^3.4.2",
121
- "@types/node": "^22.18.9",
121
+ "@types/node": "^22.18.12",
122
122
  "astro-eslint-parser": "^1.2.2",
123
123
  "auto-changelog": "^2.5.0",
124
- "eslint": "^9.37.0",
124
+ "eslint": "^9.38.0",
125
125
  "eslint-plugin-astro": "^1.3.1",
126
126
  "eslint-plugin-erasable-syntax-only": "^0.3.1",
127
127
  "eslint-plugin-format": "^1.0.2",
@@ -129,7 +129,7 @@
129
129
  "husky": "^9.1.7",
130
130
  "np": "^10.2.0",
131
131
  "prettier-plugin-astro": "^0.14.1",
132
- "tsdown": "0.15.6",
132
+ "tsdown": "^0.15.9",
133
133
  "tsx": "^4.20.6",
134
134
  "typescript": "^5.9.3"
135
135
  },
@@ -147,11 +147,7 @@
147
147
  },
148
148
  "auto-changelog": {
149
149
  "template": "keepachangelog",
150
- "hideCredit": true,
151
- "commitUrl": "https://github.com/eienjs/eslint-config/commit/{id}",
152
- "issueUrl": "https://github.com/eienjs/eslint-config/issues/{id}",
153
- "mergeUrl": "https://github.com/eienjs/eslint-config/pull/{id}",
154
- "compareUrl": "https://github.com/eienjs/eslint-config/compare/{from}...{to}"
150
+ "hideCredit": true
155
151
  },
156
152
  "np": {
157
153
  "message": "chore(release): :tada: %s",