@pplancq/eslint-config 2.2.0 → 2.3.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.
@@ -0,0 +1,274 @@
1
+ module.exports = {
2
+ plugins: ['import'],
3
+ parserOptions: {
4
+ ecmaVersion: 'latest',
5
+ sourceType: 'module',
6
+ },
7
+ env: {
8
+ es6: true,
9
+ },
10
+ rules: {
11
+ // eslint-plugin-import https://github.com/import-js/eslint-plugin-import
12
+
13
+ // import/consistent-type-specifier-style
14
+ // https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/consistent-type-specifier-style.md
15
+ 'import/consistent-type-specifier-style': 'off',
16
+
17
+ // import/default
18
+ // https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/default.md
19
+ 'import/default': 'off',
20
+
21
+ // import/dynamic-import-chunkname
22
+ // https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/dynamic-import-chunkname.md
23
+ 'import/dynamic-import-chunkname': [
24
+ 'off',
25
+ {
26
+ importFunctions: [],
27
+ webpackChunknameFormat: '[0-9a-zA-Z-_/.]+',
28
+ },
29
+ ],
30
+
31
+ // import/export
32
+ // https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/export.md
33
+ 'import/export': 'error',
34
+
35
+ // import/exports-last
36
+ // https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/exports-last.md
37
+ 'import/exports-last': 'off',
38
+
39
+ // import/extensions
40
+ // https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/extensions.md
41
+ 'import/extensions': [
42
+ 'error',
43
+ 'ignorePackages',
44
+ {
45
+ js: 'never',
46
+ mjs: 'never',
47
+ jsx: 'never',
48
+ },
49
+ ],
50
+
51
+ // import/first
52
+ // https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/first.md
53
+ 'import/first': 'error',
54
+
55
+ // import/group-exports
56
+ // https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/group-exports.md
57
+ 'import/group-exports': 'off',
58
+
59
+ // import/imports-first
60
+ // https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/imports-first.md
61
+ // This rule is deprecated.
62
+ 'import/imports-first': 'off',
63
+
64
+ // import/max-dependencies
65
+ // https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/max-dependencies.md
66
+ 'import/max-dependencies': ['off', { max: 10 }],
67
+
68
+ // import/named
69
+ // https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/named.md
70
+ 'import/named': 'error',
71
+
72
+ // import/namespace
73
+ // https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/namespace.md
74
+ 'import/namespace': 'off',
75
+
76
+ // import/newline-after-import
77
+ // https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/newline-after-import.md
78
+ 'import/newline-after-import': 'error',
79
+
80
+ // import/no-absolute-path
81
+ // https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-absolute-path.md
82
+ 'import/no-absolute-path': 'error',
83
+
84
+ // import/no-amd
85
+ // https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-amd.md
86
+ 'import/no-amd': 'error',
87
+
88
+ // import/no-anonymous-default-export
89
+ // https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-anonymous-default-export.md
90
+ 'import/no-anonymous-default-export': [
91
+ 'off',
92
+ {
93
+ allowArray: false,
94
+ allowArrowFunction: false,
95
+ allowAnonymousClass: false,
96
+ allowAnonymousFunction: false,
97
+ allowLiteral: false,
98
+ allowObject: false,
99
+ },
100
+ ],
101
+
102
+ // import/no-commonjs
103
+ // https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-commonjs.md
104
+ 'import/no-commonjs': 'off',
105
+
106
+ // import/no-cycle
107
+ // https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-cycle.md
108
+ 'import/no-cycle': ['error', { maxDepth: '∞' }],
109
+
110
+ // import/no-default-export
111
+ // https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-default-export.md
112
+ 'import/no-default-export': 'error',
113
+
114
+ // import/no-deprecated
115
+ // https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-deprecated.md
116
+ 'import/no-deprecated': 'off',
117
+
118
+ // import/no-duplicates
119
+ // https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-duplicates.md
120
+ 'import/no-duplicates': 'error',
121
+
122
+ // import/no-dynamic-require
123
+ // https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-dynamic-require.md
124
+ 'import/no-dynamic-require': 'error',
125
+
126
+ // import/no-empty-named-blocks
127
+ // https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-empty-named-blocks.md
128
+ 'import/no-empty-named-blocks': 'off',
129
+
130
+ // import/no-extraneous-dependencies
131
+ // https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-extraneous-dependencies.md
132
+ 'import/no-extraneous-dependencies': [
133
+ 'error',
134
+ {
135
+ devDependencies: [
136
+ 'test/**', // tape, common npm pattern
137
+ 'tests/**', // also common npm pattern
138
+ 'spec/**', // mocha, rspec-like pattern
139
+ '**/__tests__/**', // jest pattern
140
+ '**/__mocks__/**', // jest pattern
141
+ 'test.{js,jsx}', // repos with a single test file
142
+ 'test-*.{js,jsx}', // repos with multiple top-level test files
143
+ '**/*{.,_}{test,spec}.{js,jsx}', // tests where the extension or filename suffix denotes that it is a test
144
+ '**/jest.config.js', // jest config
145
+ '**/jest.setup.js', // jest setup
146
+ '**/vue.config.js', // vue-cli config
147
+ '**/webpack.config.js', // webpack config
148
+ '**/webpack.config.*.js', // webpack config
149
+ '**/rollup.config.js', // rollup config
150
+ '**/rollup.config.*.js', // rollup config
151
+ '**/gulpfile.js', // gulp config
152
+ '**/gulpfile.*.js', // gulp config
153
+ '**/Gruntfile{,.js}', // grunt config
154
+ '**/protractor.conf.js', // protractor config
155
+ '**/protractor.conf.*.js', // protractor config
156
+ '**/karma.conf.js', // karma config
157
+ '**/.eslintrc.js', // eslint config
158
+ ],
159
+ optionalDependencies: false,
160
+ },
161
+ ],
162
+
163
+ // import/no-import-module-exports
164
+ // https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-import-module-exports.md
165
+ 'import/no-import-module-exports': [
166
+ 'error',
167
+ {
168
+ exceptions: [],
169
+ },
170
+ ],
171
+
172
+ // import/no-internal-modules
173
+ // https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-internal-modules.md
174
+ 'import/no-internal-modules': [
175
+ 'off',
176
+ {
177
+ allow: [],
178
+ },
179
+ ],
180
+
181
+ // import/no-mutable-exports
182
+ // https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-mutable-exports.md
183
+ 'import/no-mutable-exports': 'error',
184
+
185
+ // import/no-named-as-default
186
+ // https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-named-as-default.md
187
+ 'import/no-named-as-default': 'error',
188
+
189
+ // import/no-named-as-default-member
190
+ // https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-named-as-default-member.md
191
+ 'import/no-named-as-default-member': 'error',
192
+
193
+ // import/no-named-default
194
+ // https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-named-default.md
195
+ 'import/no-named-default': 'error',
196
+
197
+ // import/no-named-export
198
+ // https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-named-export.md
199
+ 'import/no-named-export': 'off',
200
+
201
+ // import/no-namespace
202
+ // https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-namespace.md
203
+ 'import/no-namespace': 'off',
204
+
205
+ // import/no-nodejs-modules
206
+ // https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-nodejs-modules.md
207
+ 'import/no-nodejs-modules': 'off',
208
+
209
+ // import/no-relative-packages
210
+ // https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-relative-packages.md
211
+ 'import/no-relative-packages': 'error',
212
+
213
+ // import/no-relative-parent-imports
214
+ // https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-relative-parent-imports.md
215
+ 'import/no-relative-parent-imports': 'off',
216
+
217
+ // import/no-restricted-paths
218
+ // https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-restricted-paths.md
219
+ 'import/no-restricted-paths': 'off',
220
+
221
+ // import/no-self-import
222
+ // https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-self-import.md
223
+ 'import/no-self-import': 'error',
224
+
225
+ // import/no-unassigned-import
226
+ // https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-unassigned-import.md
227
+ 'import/no-unassigned-import': 'off',
228
+
229
+ // import/no-unresolved
230
+ // https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-unresolved.md
231
+ 'import/no-unresolved': ['error', { commonjs: true, caseSensitive: true }],
232
+
233
+ // import/no-unused-modules
234
+ // https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-unused-modules.md
235
+ 'import/no-unused-modules': [
236
+ 'off',
237
+ {
238
+ ignoreExports: [],
239
+ missingExports: true,
240
+ unusedExports: true,
241
+ },
242
+ ],
243
+
244
+ // import/no-useless-path-segments
245
+ // https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-useless-path-segments.md
246
+ 'import/no-useless-path-segments': ['error', { commonjs: true }],
247
+
248
+ // import/no-webpack-loader-syntax
249
+ // https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-webpack-loader-syntax.md
250
+ 'import/no-webpack-loader-syntax': 'error',
251
+
252
+ // import/order
253
+ // https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/order.md
254
+ 'import/order': ['error', { groups: [['builtin', 'external', 'internal']] }],
255
+
256
+ // import/prefer-default-export
257
+ // https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/prefer-default-export.md
258
+ 'import/prefer-default-export': 'off',
259
+
260
+ // import/unambiguous
261
+ // https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/unambiguous.md
262
+ 'import/unambiguous': 'off',
263
+ },
264
+ settings: {
265
+ 'import/extensions': ['.js', '.mjs', '.jsx'],
266
+ 'import/core-modules': [],
267
+ 'import/ignore': ['node_modules', '\\.(coffee|scss|css|less|hbs|svg|json)$'],
268
+ 'import/resolver': {
269
+ node: {
270
+ extensions: ['.js'],
271
+ },
272
+ },
273
+ },
274
+ };
package/rules/jest.js CHANGED
@@ -7,29 +7,281 @@ module.exports = {
7
7
  'jest/globals': true,
8
8
  },
9
9
  rules: {
10
+ // eslint-plugin-import https://github.com/import-js/eslint-plugin-import
11
+
12
+ // import/no-extraneous-dependencies
13
+ // https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-extraneous-dependencies.md
10
14
  'import/no-extraneous-dependencies': 'off',
11
15
 
12
16
  // eslint-plugin-jest https://github.com/jest-community/eslint-plugin-jest
17
+ // Enforce test and it usage conventions
18
+ // https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/consistent-test-it.md
19
+ 'jest/consistent-test-it': 'off',
20
+
21
+ // Enforce assertion to be made in a test body
22
+ // https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/expect-expect.md
23
+ 'jest/expect-expect': 'off',
24
+
25
+ // Enforces a maximum number assertion calls in a test body
26
+ // https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/max-expects.md
27
+ 'jest/max-expects': 'off',
28
+
29
+ // Enforces a maximum depth to nested describe calls
30
+ // https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/max-nested-describe.md
31
+ 'jest/max-nested-describe': 'off',
32
+
33
+ // Disallow alias methods
34
+ // https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/no-alias-methods.md
35
+ 'jest/no-alias-methods': 'off',
36
+
37
+ // Disallow commented out tests
38
+ // https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/no-commented-out-tests.md
39
+ 'jest/no-commented-out-tests': 'off',
40
+
41
+ // Disallow calling expect conditionally
42
+ // https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/no-conditional-expect.md
13
43
  'jest/no-conditional-expect': 'error',
44
+
45
+ // Disallow conditional logic in tests
46
+ // https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/no-conditional-in-test.md
47
+ 'jest/no-conditional-in-test': 'off',
48
+
49
+ // Disallow confusing usages of jest.setTimeout
50
+ // https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/no-confusing-set-timeout.md
51
+ 'jest/no-confusing-set-timeout': 'off',
52
+
53
+ // Disallow use of deprecated functions
54
+ // https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/no-deprecated-functions.md
55
+ 'jest/no-deprecated-functions': 'off',
56
+
57
+ // Disallow disabled tests
58
+ // https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/no-disabled-tests.md
59
+ 'jest/no-disabled-tests': 'off',
60
+
61
+ // Disallow using a callback in asynchronous tests and hooks
62
+ // https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/no-done-callback.md
63
+ 'jest/no-done-callback': 'off',
64
+
65
+ // Disallow duplicate setup and teardown hooks
66
+ // https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/no-duplicate-hooks.md
67
+ 'jest/no-duplicate-hooks': 'off',
68
+
69
+ // Disallow using exports in files containing tests
70
+ // https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/no-export.md
71
+ 'jest/no-export': 'off',
72
+
73
+ // Disallow focused tests
74
+ // https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/no-focused-tests.md
75
+ 'jest/no-focused-tests': 'off',
76
+
77
+ // Disallow setup and teardown hooks
78
+ // https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/no-hooks.md
79
+ 'jest/no-hooks': 'off',
80
+
81
+ // Disallow identical titles
82
+ // https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/no-identical-title.md
14
83
  'jest/no-identical-title': 'error',
84
+
85
+ // Disallow string interpolation inside snapshots
86
+ // https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/no-interpolation-in-snapshots.md
15
87
  'jest/no-interpolation-in-snapshots': 'error',
88
+
89
+ // Disallow Jasmine globals
90
+ // https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/no-jasmine-globals.md
16
91
  'jest/no-jasmine-globals': 'error',
92
+
93
+ // Disallow large snapshots
94
+ // https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/no-large-snapshots.md
95
+ 'jest/no-large-snapshots': 'off',
96
+
97
+ // Disallow manually importing from __mocks__
98
+ // https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/no-mocks-import.md
17
99
  'jest/no-mocks-import': 'error',
18
- 'jest/valid-describe-callback': 'error',
19
- 'jest/valid-expect': 'error',
20
- 'jest/valid-expect-in-promise': 'error',
21
- 'jest/valid-title': 'error',
100
+
101
+ // Disallow specific jest. methods
102
+ // https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/no-restricted-jest-methods.md
103
+ 'jest/no-restricted-jest-methods': 'off',
104
+
105
+ // Disallow specific matchers & modifiers
106
+ // https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/no-restricted-matchers.md
107
+ 'jest/no-restricted-matchers': 'off',
108
+
109
+ // Disallow using expect outside of it or test blocks
110
+ // https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/no-standalone-expect.md
111
+ 'jest/no-standalone-expect': 'off',
112
+
113
+ // Require using .only and .skip over f and x
114
+ // https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/no-test-prefixes.md
115
+ 'jest/no-test-prefixes': 'off',
116
+
117
+ // Disallow explicitly returning from tests
118
+ // https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/no-test-return-statement.md
119
+ 'jest/no-test-return-statement': 'off',
120
+
121
+ // Disallow using jest.mock() factories without an explicit type parameter
122
+ // https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/no-untyped-mock-factory.md
123
+ 'jest/no-untyped-mock-factory': 'off',
124
+
125
+ // Enforce padding around afterAll blocks
126
+ // https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/padding-around-after-all-blocks.md
127
+ 'jest/padding-around-after-all-blocks': 'off',
128
+
129
+ // Enforce padding around afterEach blocks
130
+ // https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/padding-around-after-each-blocks.md
131
+ 'jest/padding-around-after-each-blocks': 'off',
132
+
133
+ // Enforce padding around Jest functions
134
+ // https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/padding-around-all.md
135
+ 'jest/padding-around-all': 'off',
136
+
137
+ // Enforce padding around beforeAll blocks
138
+ // https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/padding-around-before-all-blocks.md
139
+ 'jest/padding-around-before-all-blocks': 'off',
140
+
141
+ // Enforce padding around beforeEach blocks
142
+ // https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/padding-around-before-each-blocks.md
143
+ 'jest/padding-around-before-each-blocks': 'off',
144
+
145
+ // Enforce padding around describe blocks
146
+ // https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/padding-around-describe-blocks.md
147
+ 'jest/padding-around-describe-blocks': 'off',
148
+
149
+ // Enforce padding around expect groups
150
+ // https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/padding-around-expect-groups.md
151
+ 'jest/padding-around-expect-groups': 'off',
152
+
153
+ // Enforce padding around afterAll blocks
154
+ // https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/padding-around-test-blocks.md
155
+ 'jest/padding-around-test-blocks': 'off',
156
+
157
+ // Suggest using toBeCalledWith() or toHaveBeenCalledWith()
158
+ // https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/prefer-called-with.md
22
159
  'jest/prefer-called-with': 'error',
160
+
161
+ // Suggest using the built-in comparison matchers
162
+ // https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/prefer-comparison-matcher.md
163
+ 'jest/prefer-comparison-matcher': 'off',
164
+
165
+ // Prefer using .each rather than manual loops
166
+ // https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/prefer-each.md
167
+ 'jest/prefer-each': 'off',
168
+
169
+ // Suggest using the built-in equality matchers
170
+ // https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/prefer-equality-matcher.md
171
+ 'jest/prefer-equality-matcher': 'off',
172
+
173
+ // Suggest using expect.assertions() OR expect.hasAssertions()
174
+ // https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/prefer-expect-assertions.md
175
+ 'jest/prefer-expect-assertions': 'off',
176
+
177
+ // Prefer await expect(...).resolves over expect(await ...) syntax
178
+ // https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/prefer-expect-resolves.md
179
+ 'jest/prefer-expect-resolves': 'off',
180
+
181
+ // Prefer having hooks in a consistent order
182
+ // https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/prefer-hooks-in-order.md
183
+ 'jest/prefer-hooks-in-order': 'off',
184
+
185
+ // Suggest having hooks before any test cases
186
+ // https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/prefer-hooks-on-top.md
23
187
  'jest/prefer-hooks-on-top': 'error',
188
+
189
+ // Prefer importing Jest globals
190
+ // https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/prefer-importing-jest-globals.md
191
+ 'jest/prefer-importing-jest-globals': 'off',
192
+
193
+ // Prefer jest.mocked() over fn as jest.Mock
194
+ // https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/prefer-jest-mocked.md
195
+ 'jest/prefer-jest-mocked': 'off',
196
+
197
+ // Enforce lowercase test names
198
+ // https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/prefer-lowercase-title.md
199
+ 'jest/prefer-lowercase-title': 'off',
200
+
201
+ // Prefer mock resolved/rejected shorthands for promises
202
+ // https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/prefer-mock-promise-shorthand.md
203
+ 'jest/prefer-mock-promise-shorthand': 'off',
204
+
205
+ // Prefer including a hint with external snapshots
206
+ // https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/prefer-snapshot-hint.md
207
+ 'jest/prefer-snapshot-hint': 'off',
208
+
209
+ // Suggest using jest.spyOn()
210
+ // https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/prefer-spy-on.md
211
+ 'jest/prefer-spy-on': 'off',
212
+
213
+ // Suggest using toStrictEqual()
214
+ // https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/prefer-strict-equal.md
24
215
  'jest/prefer-strict-equal': 'error',
216
+
217
+ // Suggest using toBe() for primitive literals
218
+ // https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/prefer-to-be.md
219
+ 'jest/prefer-to-be': 'off',
220
+
221
+ // Suggest using toContain()
222
+ // https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/prefer-to-contain.md
25
223
  'jest/prefer-to-contain': 'error',
224
+
225
+ // Suggest using toHaveLength()
226
+ // https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/prefer-to-have-length.md
26
227
  'jest/prefer-to-have-length': 'error',
27
228
 
229
+ // Suggest using test.todo
230
+ // https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/prefer-todo.md
231
+ 'jest/prefer-todo': 'off',
232
+
233
+ // Require setup and teardown code to be within a hook
234
+ // https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/require-hook.md
235
+ 'jest/require-hook': 'off',
236
+
237
+ // Require a message for toThrow()
238
+ // https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/require-to-throw-message.md
239
+ 'jest/require-to-throw-message': 'off',
240
+
241
+ // Require test cases and hooks to be inside a describe block
242
+ // https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/require-top-level-describe.md
243
+ 'jest/require-top-level-describe': 'off',
244
+
245
+ // Enforce unbound methods are called with their expected scope
246
+ // https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/unbound-method.md
247
+ 'jest/unbound-method': 'off',
248
+
249
+ // Enforce valid describe() callback
250
+ // https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/valid-describe-callback.md
251
+ 'jest/valid-describe-callback': 'error',
252
+
253
+ // Enforce valid expect() usage
254
+ // https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/valid-expect.md
255
+ 'jest/valid-expect': 'error',
256
+
257
+ // Require promises that have expectations in their chain to be valid
258
+ // https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/valid-expect-in-promise.md
259
+ 'jest/valid-expect-in-promise': 'error',
260
+
261
+ // Enforce valid titles
262
+ // https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/valid-title.md
263
+ 'jest/valid-title': 'error',
264
+
28
265
  // eslint-plugin-jest-extended https://github.com/jest-community/eslint-plugin-jest-extended
266
+
267
+ // Suggest using toBeArray()
268
+ // https://github.com/jest-community/eslint-plugin-jest-extended/blob/main/docs/rules/prefer-to-be-array.md
29
269
  'jest-extended/prefer-to-be-array': 'error',
270
+
271
+ // Suggest using toBeFalse()
272
+ // https://github.com/jest-community/eslint-plugin-jest-extended/blob/main/docs/rules/prefer-to-be-false.md
30
273
  'jest-extended/prefer-to-be-false': 'error',
274
+
275
+ // Suggest using toBeObject()
276
+ // https://github.com/jest-community/eslint-plugin-jest-extended/blob/main/docs/rules/prefer-to-be-object.md
31
277
  'jest-extended/prefer-to-be-object': 'error',
278
+
279
+ // Suggest using toBeTrue()
280
+ // https://github.com/jest-community/eslint-plugin-jest-extended/blob/main/docs/rules/prefer-to-be-true.md
32
281
  'jest-extended/prefer-to-be-true': 'error',
282
+
283
+ // Suggest using toHaveBeenCalledOnce()
284
+ // https://github.com/jest-community/eslint-plugin-jest-extended/blob/main/docs/rules/prefer-to-have-been-called-once.md
33
285
  'jest-extended/prefer-to-have-been-called-once': 'error',
34
286
  },
35
287
  },