@fullstacksjs/eslint-config 13.3.1 → 13.4.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.
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
 
7
- var _eslintPluginJestFormatting = _interopRequireDefault(require("eslint-plugin-jest-formatting"));
7
+ var _eslintPlugin = _interopRequireDefault(require("@vitest/eslint-plugin"));
8
8
  var _globals = _interopRequireDefault(require("globals"));
9
9
  var _conditions = require("../utils/conditions.js");
10
10
  var _globs = require("../utils/globs.js");
@@ -16,7 +16,7 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
16
16
  function tests(options = {}) {
17
17
  return {
18
18
  plugins: {
19
- 'jest-formatting': _eslintPluginJestFormatting.default
19
+ vitest: _eslintPlugin.default
20
20
  },
21
21
  files: [..._globs.globs.test, ..._globs.globs.e2e],
22
22
  languageOptions: {
@@ -26,12 +26,13 @@ function tests(options = {}) {
26
26
  }
27
27
  },
28
28
  rules: {
29
- 'jest-formatting/padding-around-after-all-blocks': 'warn',
30
- 'jest-formatting/padding-around-after-each-blocks': 'warn',
31
- 'jest-formatting/padding-around-before-all-blocks': 'warn',
32
- 'jest-formatting/padding-around-before-each-blocks': 'warn',
33
- 'jest-formatting/padding-around-describe-blocks': 'warn',
34
- 'jest-formatting/padding-around-test-blocks': 'warn',
29
+ 'vitest/padding-around-after-all-blocks': 'warn',
30
+ 'vitest/padding-around-after-each-blocks': 'warn',
31
+ 'vitest/padding-around-before-all-blocks': 'warn',
32
+ 'vitest/padding-around-before-each-blocks': 'warn',
33
+ 'vitest/padding-around-describe-blocks': 'warn',
34
+ 'vitest/padding-around-expect-groups': 'warn',
35
+ 'vitest/padding-around-test-blocks': 'warn',
35
36
  'max-lines-per-function': 'off',
36
37
  'no-sparse-arrays': 'off',
37
38
  'no-empty-function': 'off',
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
 
7
- var _eslintPluginVitest = _interopRequireDefault(require("eslint-plugin-vitest"));
7
+ var _eslintPlugin = _interopRequireDefault(require("@vitest/eslint-plugin"));
8
8
  var _globs = require("../utils/globs.js");
9
9
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
10
10
  /**
@@ -14,7 +14,7 @@ function vitest() {
14
14
  return {
15
15
  files: _globs.globs.test,
16
16
  plugins: {
17
- vitest: _eslintPluginVitest.default
17
+ vitest: _eslintPlugin.default
18
18
  },
19
19
  languageOptions: {
20
20
  globals: {
@@ -22,19 +22,25 @@ function vitest() {
22
22
  test: 'writable',
23
23
  describe: 'writable',
24
24
  it: 'writable',
25
+ expectTypeOf: 'writable',
26
+ assertType: 'writable',
25
27
  expect: 'writable',
26
28
  assert: 'writable',
29
+ chai: 'writable',
27
30
  vitest: 'writable',
28
31
  vi: 'writable',
29
32
  beforeAll: 'writable',
30
33
  afterAll: 'writable',
31
34
  beforeEach: 'writable',
32
- afterEach: 'writable'
35
+ afterEach: 'writable',
36
+ onTestFailed: 'writable',
37
+ onTestFinished: 'writable'
33
38
  }
34
39
  },
35
40
  rules: {
36
41
  'vitest/consistent-test-filename': 'off',
37
42
  'vitest/consistent-test-it': 'warn',
43
+ 'vitest/consistent-vitest-vi': 'warn',
38
44
  'vitest/expect-expect': 'warn',
39
45
  'vitest/max-expects': 'off',
40
46
  'vitest/max-nested-describe': 'off',
@@ -50,6 +56,7 @@ function vitest() {
50
56
  'vitest/no-hooks': 'off',
51
57
  'vitest/no-identical-title': 'error',
52
58
  'vitest/no-import-node-test': 'error',
59
+ 'vitest/no-importing-vitest-globals': 'off',
53
60
  'vitest/no-interpolation-in-snapshots': 'warn',
54
61
  'vitest/no-large-snapshots': 'warn',
55
62
  'vitest/no-mocks-import': 'warn',
@@ -58,18 +65,23 @@ function vitest() {
58
65
  'vitest/no-standalone-expect': 'warn',
59
66
  'vitest/no-test-prefixes': 'warn',
60
67
  'vitest/no-test-return-statement': 'warn',
68
+ 'vitest/prefer-called-once': 'warn',
69
+ 'vitest/prefer-called-times': 'off',
61
70
  'vitest/prefer-called-with': 'warn',
62
71
  'vitest/prefer-comparison-matcher': 'warn',
72
+ 'vitest/prefer-describe-function-title': 'off',
63
73
  'vitest/prefer-each': 'warn',
64
74
  'vitest/prefer-equality-matcher': 'warn',
65
75
  'vitest/prefer-expect-assertions': 'off',
66
76
  'vitest/prefer-expect-resolves': 'warn',
67
77
  'vitest/prefer-hooks-in-order': 'warn',
68
78
  'vitest/prefer-hooks-on-top': 'warn',
69
- 'vitest/prefer-lowercase-title': 'off',
79
+ 'vitest/prefer-importing-vitest-globals': 'off',
80
+ 'vitest/prefer-lowercase-title': 'warn',
70
81
  'vitest/prefer-mock-promise-shorthand': 'warn',
71
82
  'vitest/prefer-snapshot-hint': 'warn',
72
83
  'vitest/prefer-spy-on': 'warn',
84
+ 'vitest/prefer-strict-boolean-matchers': 'off',
73
85
  'vitest/prefer-strict-equal': 'off',
74
86
  'vitest/prefer-to-be': 'warn',
75
87
  'vitest/prefer-to-be-falsy': 'off',
@@ -78,13 +90,17 @@ function vitest() {
78
90
  'vitest/prefer-to-contain': 'warn',
79
91
  'vitest/prefer-to-have-length': 'warn',
80
92
  'vitest/prefer-todo': 'warn',
93
+ 'vitest/prefer-vi-mocked': 'warn',
81
94
  'vitest/require-hook': 'warn',
82
95
  'vitest/require-local-test-context-for-concurrent-snapshots': 'warn',
96
+ 'vitest/require-mock-type-parameters': 'off',
83
97
  'vitest/require-to-throw-message': 'warn',
84
98
  'vitest/require-top-level-describe': 'warn',
85
99
  'vitest/valid-describe-callback': 'warn',
86
100
  'vitest/valid-expect': 'warn',
87
- 'vitest/valid-title': 'warn'
101
+ 'vitest/valid-expect-in-promise': 'warn',
102
+ 'vitest/valid-title': 'warn',
103
+ 'vitest/warn-todo': 'warn'
88
104
  }
89
105
  };
90
106
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fullstacksjs/eslint-config",
3
- "version": "13.3.1",
3
+ "version": "13.4.0",
4
4
  "license": "MIT",
5
5
  "author": "fullstacks <fullstacksjs@gmail.com>",
6
6
  "description": "fullstacks eslint config",
@@ -39,12 +39,12 @@
39
39
  "@eslint/compat": "1.3.2",
40
40
  "@next/eslint-plugin-next": "15.5.3",
41
41
  "@stylistic/eslint-plugin": "5.3.1",
42
+ "@vitest/eslint-plugin": "1.3.9",
42
43
  "deepmerge": "4.3.1",
43
44
  "eslint-plugin-better-tailwindcss": "3.7.8",
44
45
  "eslint-plugin-cypress": "5.1.1",
45
46
  "eslint-plugin-import-x": "4.16.1",
46
47
  "eslint-plugin-jest": "29.0.1",
47
- "eslint-plugin-jest-formatting": "3.1.0",
48
48
  "eslint-plugin-jsx-a11y": "6.10.2",
49
49
  "eslint-plugin-n": "17.21.3",
50
50
  "eslint-plugin-perfectionist": "4.15.0",
@@ -54,7 +54,6 @@
54
54
  "eslint-plugin-react-hooks": "5.2.0",
55
55
  "eslint-plugin-regexp": "2.10.0",
56
56
  "eslint-plugin-storybook": "0.12.0",
57
- "eslint-plugin-vitest": "0.5.4",
58
57
  "globals": "16.4.0",
59
58
  "local-pkg": "1.1.2",
60
59
  "typescript-eslint": "8.43.0"
@@ -1,4 +1,4 @@
1
- import plugin from 'eslint-plugin-jest-formatting';
1
+ import plugin from '@vitest/eslint-plugin';
2
2
  import globals from 'globals';
3
3
 
4
4
  import { predicate } from '../utils/conditions.mjs';
@@ -10,18 +10,19 @@ import { globs } from '../utils/globs.mjs';
10
10
  */
11
11
  function tests(options = {}) {
12
12
  return {
13
- plugins: { 'jest-formatting': plugin },
13
+ plugins: { vitest: plugin },
14
14
  files: [...globs.test, ...globs.e2e],
15
15
  languageOptions: {
16
16
  globals: { ...globals['shared-node-browser'], ...globals.jest },
17
17
  },
18
18
  rules: {
19
- 'jest-formatting/padding-around-after-all-blocks': 'warn',
20
- 'jest-formatting/padding-around-after-each-blocks': 'warn',
21
- 'jest-formatting/padding-around-before-all-blocks': 'warn',
22
- 'jest-formatting/padding-around-before-each-blocks': 'warn',
23
- 'jest-formatting/padding-around-describe-blocks': 'warn',
24
- 'jest-formatting/padding-around-test-blocks': 'warn',
19
+ 'vitest/padding-around-after-all-blocks': 'warn',
20
+ 'vitest/padding-around-after-each-blocks': 'warn',
21
+ 'vitest/padding-around-before-all-blocks': 'warn',
22
+ 'vitest/padding-around-before-each-blocks': 'warn',
23
+ 'vitest/padding-around-describe-blocks': 'warn',
24
+ 'vitest/padding-around-expect-groups': 'warn',
25
+ 'vitest/padding-around-test-blocks': 'warn',
25
26
 
26
27
  'max-lines-per-function': 'off',
27
28
  'no-sparse-arrays': 'off',
@@ -1,4 +1,4 @@
1
- import plugin from 'eslint-plugin-vitest';
1
+ import plugin from '@vitest/eslint-plugin';
2
2
 
3
3
  import { globs } from '../utils/globs.mjs';
4
4
 
@@ -15,19 +15,25 @@ function vitest() {
15
15
  test: 'writable',
16
16
  describe: 'writable',
17
17
  it: 'writable',
18
+ expectTypeOf: 'writable',
19
+ assertType: 'writable',
18
20
  expect: 'writable',
19
21
  assert: 'writable',
22
+ chai: 'writable',
20
23
  vitest: 'writable',
21
24
  vi: 'writable',
22
25
  beforeAll: 'writable',
23
26
  afterAll: 'writable',
24
27
  beforeEach: 'writable',
25
28
  afterEach: 'writable',
29
+ onTestFailed: 'writable',
30
+ onTestFinished: 'writable',
26
31
  },
27
32
  },
28
33
  rules: {
29
34
  'vitest/consistent-test-filename': 'off',
30
35
  'vitest/consistent-test-it': 'warn',
36
+ 'vitest/consistent-vitest-vi': 'warn',
31
37
  'vitest/expect-expect': 'warn',
32
38
  'vitest/max-expects': 'off',
33
39
  'vitest/max-nested-describe': 'off',
@@ -43,6 +49,7 @@ function vitest() {
43
49
  'vitest/no-hooks': 'off',
44
50
  'vitest/no-identical-title': 'error',
45
51
  'vitest/no-import-node-test': 'error',
52
+ 'vitest/no-importing-vitest-globals': 'off',
46
53
  'vitest/no-interpolation-in-snapshots': 'warn',
47
54
  'vitest/no-large-snapshots': 'warn',
48
55
  'vitest/no-mocks-import': 'warn',
@@ -51,18 +58,23 @@ function vitest() {
51
58
  'vitest/no-standalone-expect': 'warn',
52
59
  'vitest/no-test-prefixes': 'warn',
53
60
  'vitest/no-test-return-statement': 'warn',
61
+ 'vitest/prefer-called-once': 'warn',
62
+ 'vitest/prefer-called-times': 'off',
54
63
  'vitest/prefer-called-with': 'warn',
55
64
  'vitest/prefer-comparison-matcher': 'warn',
65
+ 'vitest/prefer-describe-function-title': 'off',
56
66
  'vitest/prefer-each': 'warn',
57
67
  'vitest/prefer-equality-matcher': 'warn',
58
68
  'vitest/prefer-expect-assertions': 'off',
59
69
  'vitest/prefer-expect-resolves': 'warn',
60
70
  'vitest/prefer-hooks-in-order': 'warn',
61
71
  'vitest/prefer-hooks-on-top': 'warn',
62
- 'vitest/prefer-lowercase-title': 'off',
72
+ 'vitest/prefer-importing-vitest-globals': 'off',
73
+ 'vitest/prefer-lowercase-title': 'warn',
63
74
  'vitest/prefer-mock-promise-shorthand': 'warn',
64
75
  'vitest/prefer-snapshot-hint': 'warn',
65
76
  'vitest/prefer-spy-on': 'warn',
77
+ 'vitest/prefer-strict-boolean-matchers': 'off',
66
78
  'vitest/prefer-strict-equal': 'off',
67
79
  'vitest/prefer-to-be': 'warn',
68
80
  'vitest/prefer-to-be-falsy': 'off',
@@ -71,13 +83,17 @@ function vitest() {
71
83
  'vitest/prefer-to-contain': 'warn',
72
84
  'vitest/prefer-to-have-length': 'warn',
73
85
  'vitest/prefer-todo': 'warn',
86
+ 'vitest/prefer-vi-mocked': 'warn',
74
87
  'vitest/require-hook': 'warn',
75
88
  'vitest/require-local-test-context-for-concurrent-snapshots': 'warn',
89
+ 'vitest/require-mock-type-parameters': 'off',
76
90
  'vitest/require-to-throw-message': 'warn',
77
91
  'vitest/require-top-level-describe': 'warn',
78
92
  'vitest/valid-describe-callback': 'warn',
79
93
  'vitest/valid-expect': 'warn',
94
+ 'vitest/valid-expect-in-promise': 'warn',
80
95
  'vitest/valid-title': 'warn',
96
+ 'vitest/warn-todo': 'warn',
81
97
  },
82
98
  };
83
99
  }