@favorodera/eslint-config 0.0.7 → 0.0.8

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.d.mts CHANGED
@@ -18345,7 +18345,7 @@ declare const codeInMdGlob = "**/*.md/**/*.{js,cjs,mjs,ts,cts,mts,vue}";
18345
18345
  /** Glob pattern for matching scripts files */
18346
18346
  declare const scriptsGlob = "**/*.{js,cjs,mjs,ts,cts,mts}";
18347
18347
  /** Glob pattern for matching test files */
18348
- declare const testsGlob: string[];
18348
+ declare const testGlob = "**/*.{test,spec,bench,benchmark}.{js,cjs,mjs,ts,cts,mts}";
18349
18349
  /** Glob pattern for matching JSON files */
18350
18350
  declare const jsonGlob = "**/*.json";
18351
18351
  /** Glob pattern for matching JSON5 files */
@@ -18389,4 +18389,4 @@ declare function importModule<TModule>(module: Awaitable<TModule>): Promise<TMod
18389
18389
  default: infer TModuleDefault;
18390
18390
  } ? TModuleDefault : TModule>;
18391
18391
  //#endregion
18392
- export { type ConfigNames, type ConfigOptions, type RuleOptions, type Rules, type SharedOptions, type TypedFlatConfigItem, codeInMdGlob, extractRules, factory, ignoresGlob, importModule, jsGlob, json5Glob, jsonGlob, jsoncGlob, mdGlob, mdInMdGlob, packageJsonGlob, pnpmWorkspaceGlob, scriptsGlob, testsGlob, tsConfigGlob, tsGlob, vueGlob, yamlGlob };
18392
+ export { type ConfigNames, type ConfigOptions, type RuleOptions, type Rules, type SharedOptions, type TypedFlatConfigItem, codeInMdGlob, extractRules, factory, ignoresGlob, importModule, jsGlob, json5Glob, jsonGlob, jsoncGlob, mdGlob, mdInMdGlob, packageJsonGlob, pnpmWorkspaceGlob, scriptsGlob, testGlob, tsConfigGlob, tsGlob, vueGlob, yamlGlob };
package/dist/index.mjs CHANGED
@@ -19,7 +19,7 @@ const codeInMdGlob = "**/*.md/**/*.{js,cjs,mjs,ts,cts,mts,vue}";
19
19
  /** Glob pattern for matching scripts files */
20
20
  const scriptsGlob = "**/*.{js,cjs,mjs,ts,cts,mts}";
21
21
  /** Glob pattern for matching test files */
22
- const testsGlob = ["**/*.{tests,specs,benchmark,bench}.{js,cjs,mjs,ts,cts,mts}", "**/__tests__/**/*.{js,cjs,mjs,ts,cts,mts}"];
22
+ const testGlob = "**/*.{test,spec,bench,benchmark}.{js,cjs,mjs,ts,cts,mts}";
23
23
  /** Glob pattern for matching JSON files */
24
24
  const jsonGlob = "**/*.json";
25
25
  /** Glob pattern for matching JSON5 files */
@@ -1041,7 +1041,7 @@ async function tailwind(options) {
1041
1041
  }
1042
1042
  //#endregion
1043
1043
  //#region src/configs/test.ts
1044
- const testDefaults = { files: testsGlob };
1044
+ const testDefaults = { files: [testGlob] };
1045
1045
  /**
1046
1046
  * Constructs the flat config items for test linting, extending
1047
1047
  * the recommended Vitest rule sets.
@@ -1062,14 +1062,59 @@ async function test(options) {
1062
1062
  name: "favorodera/test/rules",
1063
1063
  rules: {
1064
1064
  ...renamePluginsInRules(baseRules, { vitest: "test" }),
1065
+ "test/consistent-each-for": ["error", {
1066
+ describe: "for",
1067
+ it: "for",
1068
+ suite: "for",
1069
+ test: "for"
1070
+ }],
1065
1071
  "test/consistent-test-it": ["error", {
1066
1072
  fn: "it",
1067
1073
  withinDescribe: "it"
1068
1074
  }],
1069
- "test/no-identical-title": "error",
1070
- "test/no-import-node-test": "error",
1075
+ "test/consistent-vitest-vi": "error",
1076
+ "test/hoisted-apis-on-top": "error",
1077
+ "test/max-expects": "error",
1078
+ "test/max-nested-describe": "error",
1079
+ "test/no-alias-methods": "error",
1080
+ "test/no-conditional-in-test": "error",
1081
+ "test/no-conditional-tests": "error",
1082
+ "test/no-duplicate-hooks": "error",
1083
+ "test/no-hooks": "error",
1084
+ "test/no-large-snapshots": "warn",
1085
+ "test/no-test-prefixes": "error",
1086
+ "test/no-test-return-statement": "error",
1087
+ "test/padding-around-all": "error",
1088
+ "test/prefer-called-times": "error",
1089
+ "test/prefer-called-with": "error",
1090
+ "test/prefer-comparison-matcher": "error",
1091
+ "test/prefer-each": "error",
1092
+ "test/prefer-equality-matcher": "error",
1093
+ "test/prefer-expect-resolves": "error",
1094
+ "test/prefer-expect-type-of": "error",
1071
1095
  "test/prefer-hooks-in-order": "error",
1096
+ "test/prefer-hooks-on-top": "error",
1097
+ "test/prefer-import-in-mock": "error",
1098
+ "test/prefer-importing-vitest-globals": "error",
1072
1099
  "test/prefer-lowercase-title": "error",
1100
+ "test/prefer-mock-promise-shorthand": "error",
1101
+ "test/prefer-mock-return-shorthand": "error",
1102
+ "test/prefer-snapshot-hint": "error",
1103
+ "test/prefer-spy-on": "error",
1104
+ "test/prefer-strict-boolean-matchers": "error",
1105
+ "test/prefer-strict-equal": "error",
1106
+ "test/prefer-to-be": "error",
1107
+ "test/prefer-to-be-object": "error",
1108
+ "test/prefer-to-contain": "error",
1109
+ "test/prefer-to-have-been-called-times": "error",
1110
+ "test/prefer-to-have-length": "error",
1111
+ "test/prefer-todo": "error",
1112
+ "test/prefer-vi-mocked": "error",
1113
+ "test/require-awaited-expect-poll": "error",
1114
+ "test/require-hook": "error",
1115
+ "test/require-to-throw-message": "error",
1116
+ "test/require-top-level-describe": "error",
1117
+ "test/warn-todo": "warn",
1073
1118
  ...resolved.overrides
1074
1119
  }
1075
1120
  },
@@ -1095,7 +1140,7 @@ const typescriptDefaults = { files: [tsGlob] };
1095
1140
  async function typescript(options) {
1096
1141
  const resolved = defu(options, typescriptDefaults);
1097
1142
  const tsEsLint = await importModule(import("typescript-eslint"));
1098
- const baseRules = extractRules(tsEsLint.configs.recommended, tsEsLint.configs.strict);
1143
+ const baseRules = extractRules(tsEsLint.configs.strict, tsEsLint.configs.stylistic);
1099
1144
  return [{
1100
1145
  name: "favorodera/typescript/setup",
1101
1146
  plugins: { ts: tsEsLint.plugin }
@@ -1112,8 +1157,12 @@ async function typescript(options) {
1112
1157
  default: "generic",
1113
1158
  readonly: "generic"
1114
1159
  }],
1115
- "ts/consistent-type-imports": ["error", { prefer: "type-imports" }],
1116
- "ts/no-empty-object-type": ["error", { allowInterfaces: "with-single-extends" }],
1160
+ "ts/consistent-type-imports": "error",
1161
+ "ts/default-param-last": "error",
1162
+ "ts/method-signature-style": "error",
1163
+ "ts/no-import-type-side-effects": "error",
1164
+ "ts/no-loop-func": "error",
1165
+ "ts/no-redeclare": "error",
1117
1166
  ...resolved.overrides
1118
1167
  }
1119
1168
  }];
@@ -1437,4 +1486,4 @@ function factory(options = {}) {
1437
1486
  return composer;
1438
1487
  }
1439
1488
  //#endregion
1440
- export { codeInMdGlob, extractRules, factory, ignoresGlob, importModule, jsGlob, json5Glob, jsonGlob, jsoncGlob, mdGlob, mdInMdGlob, packageJsonGlob, pnpmWorkspaceGlob, scriptsGlob, testsGlob, tsConfigGlob, tsGlob, vueGlob, yamlGlob };
1489
+ export { codeInMdGlob, extractRules, factory, ignoresGlob, importModule, jsGlob, json5Glob, jsonGlob, jsoncGlob, mdGlob, mdInMdGlob, packageJsonGlob, pnpmWorkspaceGlob, scriptsGlob, testGlob, tsConfigGlob, tsGlob, vueGlob, yamlGlob };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@favorodera/eslint-config",
3
3
  "type": "module",
4
- "version": "0.0.7",
4
+ "version": "0.0.8",
5
5
  "private": false,
6
6
  "description": "Opinionated, type-safe flat ESLint configuration factory for Vue, TypeScript, Tailwind, and more.",
7
7
  "author": "Favour Emeka <favorodera@gmail.com>",
@@ -28,14 +28,9 @@
28
28
  "linter"
29
29
  ],
30
30
  "exports": {
31
- ".": {
32
- "import": "./dist/index.mjs",
33
- "require": "./dist/index.cjs"
34
- },
31
+ ".": "./dist/index.mjs",
35
32
  "./package.json": "./package.json"
36
33
  },
37
- "main": "./dist/index.cjs",
38
- "module": "./dist/index.mjs",
39
34
  "types": "./dist/index.d.cts",
40
35
  "files": [
41
36
  "dist"