@tb-dev/eslint-config 3.7.2 → 3.8.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.
package/dist/index.cjs CHANGED
@@ -51,8 +51,7 @@ function getIgnores() {
51
51
  }
52
52
  async function vue(options) {
53
53
  const { overrides, vue: enabled } = options;
54
- if (!enabled)
55
- return [];
54
+ if (!enabled) return [];
56
55
  const [vuePlugin, vueParser, tsParser] = await Promise.all([
57
56
  // @ts-expect-error no types
58
57
  interopDefault(import("eslint-plugin-vue")),
@@ -338,8 +337,7 @@ async function vue(options) {
338
337
  }
339
338
  async function vitest(options) {
340
339
  const { overrides, vitest: enabled } = options;
341
- if (!enabled)
342
- return {};
340
+ if (!enabled) return {};
343
341
  const plugin = await interopDefault(import("eslint-plugin-vitest"));
344
342
  return {
345
343
  plugins: {
@@ -394,8 +392,7 @@ async function vitest(options) {
394
392
  }
395
393
  async function unicorn(options) {
396
394
  const { overrides, unicorn: enabled = true } = options;
397
- if (!enabled)
398
- return {};
395
+ if (!enabled) return {};
399
396
  const plugin = await interopDefault(import("eslint-plugin-unicorn"));
400
397
  return {
401
398
  plugins: {
@@ -425,6 +422,7 @@ async function unicorn(options) {
425
422
  "unicorn/no-invalid-fetch-options": "error",
426
423
  "unicorn/no-invalid-remove-event-listener": "error",
427
424
  "unicorn/no-magic-array-flat-depth": "error",
425
+ "unicorn/no-negation-in-equality-check": "error",
428
426
  "unicorn/no-single-promise-in-promise-methods": "error",
429
427
  "unicorn/no-thenable": "error",
430
428
  "unicorn/no-typeof-undefined": "off",
@@ -457,8 +455,7 @@ async function unicorn(options) {
457
455
  function javascript(options) {
458
456
  const { overrides } = options;
459
457
  const files = [Glob.All];
460
- if (options.vue)
461
- files.push(Glob.Vue);
458
+ if (options.vue) files.push(Glob.Vue);
462
459
  return {
463
460
  files,
464
461
  languageOptions: {
@@ -614,8 +611,7 @@ async function typescript(options) {
614
611
  interopDefault(import("@typescript-eslint/eslint-plugin"))
615
612
  ]);
616
613
  const files = [Glob.Typescript];
617
- if (options.vue)
618
- files.push(Glob.Vue);
614
+ if (options.vue) files.push(Glob.Vue);
619
615
  const rules = {
620
616
  "@typescript-eslint/adjacent-overload-signatures": "error",
621
617
  "no-array-constructor": "off",
@@ -870,8 +866,7 @@ async function typescript(options) {
870
866
  }
871
867
  async function perfectionist(options) {
872
868
  const { overrides, perfectionist: enabled = true } = options;
873
- if (!enabled)
874
- return {};
869
+ if (!enabled) return {};
875
870
  const plugin = await interopDefault(import("eslint-plugin-perfectionist"));
876
871
  return {
877
872
  plugins: {
package/dist/index.js CHANGED
@@ -28,8 +28,7 @@ function getIgnores() {
28
28
  }
29
29
  async function vue(options) {
30
30
  const { overrides, vue: enabled } = options;
31
- if (!enabled)
32
- return [];
31
+ if (!enabled) return [];
33
32
  const [vuePlugin, vueParser, tsParser] = await Promise.all([
34
33
  // @ts-expect-error no types
35
34
  interopDefault(import("eslint-plugin-vue")),
@@ -315,8 +314,7 @@ async function vue(options) {
315
314
  }
316
315
  async function vitest(options) {
317
316
  const { overrides, vitest: enabled } = options;
318
- if (!enabled)
319
- return {};
317
+ if (!enabled) return {};
320
318
  const plugin = await interopDefault(import("eslint-plugin-vitest"));
321
319
  return {
322
320
  plugins: {
@@ -371,8 +369,7 @@ async function vitest(options) {
371
369
  }
372
370
  async function unicorn(options) {
373
371
  const { overrides, unicorn: enabled = true } = options;
374
- if (!enabled)
375
- return {};
372
+ if (!enabled) return {};
376
373
  const plugin = await interopDefault(import("eslint-plugin-unicorn"));
377
374
  return {
378
375
  plugins: {
@@ -402,6 +399,7 @@ async function unicorn(options) {
402
399
  "unicorn/no-invalid-fetch-options": "error",
403
400
  "unicorn/no-invalid-remove-event-listener": "error",
404
401
  "unicorn/no-magic-array-flat-depth": "error",
402
+ "unicorn/no-negation-in-equality-check": "error",
405
403
  "unicorn/no-single-promise-in-promise-methods": "error",
406
404
  "unicorn/no-thenable": "error",
407
405
  "unicorn/no-typeof-undefined": "off",
@@ -434,8 +432,7 @@ async function unicorn(options) {
434
432
  function javascript(options) {
435
433
  const { overrides } = options;
436
434
  const files = [Glob.All];
437
- if (options.vue)
438
- files.push(Glob.Vue);
435
+ if (options.vue) files.push(Glob.Vue);
439
436
  return {
440
437
  files,
441
438
  languageOptions: {
@@ -591,8 +588,7 @@ async function typescript(options) {
591
588
  interopDefault(import("@typescript-eslint/eslint-plugin"))
592
589
  ]);
593
590
  const files = [Glob.Typescript];
594
- if (options.vue)
595
- files.push(Glob.Vue);
591
+ if (options.vue) files.push(Glob.Vue);
596
592
  const rules = {
597
593
  "@typescript-eslint/adjacent-overload-signatures": "error",
598
594
  "no-array-constructor": "off",
@@ -847,8 +843,7 @@ async function typescript(options) {
847
843
  }
848
844
  async function perfectionist(options) {
849
845
  const { overrides, perfectionist: enabled = true } = options;
850
- if (!enabled)
851
- return {};
846
+ if (!enabled) return {};
852
847
  const plugin = await interopDefault(import("eslint-plugin-perfectionist"));
853
848
  return {
854
849
  plugins: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tb-dev/eslint-config",
3
- "version": "3.7.2",
3
+ "version": "3.8.1",
4
4
  "description": "ESLint config",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -20,11 +20,11 @@
20
20
  "@typescript-eslint/eslint-plugin": "^7.13.0",
21
21
  "@typescript-eslint/parser": "^7.13.0",
22
22
  "eslint-config-prettier": "^9.1.0",
23
- "eslint-plugin-perfectionist": "^2.10.0",
24
- "eslint-plugin-unicorn": "^53.0.0",
23
+ "eslint-plugin-perfectionist": "^2.11.0",
24
+ "eslint-plugin-unicorn": "^54.0.0",
25
25
  "eslint-plugin-vitest": "^0.5.4",
26
26
  "eslint-plugin-vue": "^9.26.0",
27
- "globals": "^15.4.0",
27
+ "globals": "^15.6.0",
28
28
  "vue-eslint-parser": "^9.4.3"
29
29
  },
30
30
  "devDependencies": {
@@ -32,11 +32,11 @@
32
32
  "@types/node": "^20.14.2",
33
33
  "eslint": "^8.57.0",
34
34
  "husky": "^9.0.11",
35
- "lint-staged": "^15.2.5",
36
- "prettier": "^3.3.1",
35
+ "lint-staged": "^15.2.7",
36
+ "prettier": "^3.3.2",
37
37
  "tslib": "^2.6.3",
38
38
  "typescript": "^5.4.5",
39
- "vite": "^5.2.13",
39
+ "vite": "^5.3.1",
40
40
  "vite-plugin-dts": "^3.9.1"
41
41
  },
42
42
  "peerDependencies": {