Skip to content

Commit

Permalink
fix: ensure jest globals are enabled in styles config (#1241)
Browse files Browse the repository at this point in the history
  • Loading branch information
G-Rath committed Sep 9, 2022
1 parent 570a644 commit a165e98
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
3 changes: 3 additions & 0 deletions src/__tests__/__snapshots__/rules.test.ts.snap
Expand Up @@ -91,6 +91,9 @@ exports[`rules should export configs that refer to actual rules 1`] = `
},
},
"style": {
"env": {
"jest/globals": true,
},
"plugins": [
"jest",
],
Expand Down
15 changes: 6 additions & 9 deletions src/index.ts
Expand Up @@ -68,15 +68,12 @@ export = {
configs: {
all: createConfig(allRules),
recommended: createConfig(recommendedRules),
style: {
plugins: ['jest'],
rules: {
'jest/no-alias-methods': 'warn',
'jest/prefer-to-be': 'error',
'jest/prefer-to-contain': 'error',
'jest/prefer-to-have-length': 'error',
},
},
style: createConfig({
'jest/no-alias-methods': 'warn',
'jest/prefer-to-be': 'error',
'jest/prefer-to-contain': 'error',
'jest/prefer-to-have-length': 'error',
}),
},
environments: {
globals: {
Expand Down

0 comments on commit a165e98

Please sign in to comment.