@amedia/eslint-config-jest
Version:
ESLint configuration to be used by developers at Amedia
29 lines (27 loc) • 738 B
JavaScript
import pluginJest from 'eslint-plugin-jest';
export default [
{
files: ['**/*.spec.js', '**/*.test.js'],
plugins: { jest: pluginJest },
languageOptions: {
globals: pluginJest.environments.globals.globals,
},
rules: {
'jest/consistent-test-it': [
'error',
{
fn: 'it',
withinDescribe: 'it',
},
],
'jest/expect-expect': 'error',
'jest/no-disabled-tests': 'warn',
'jest/no-focused-tests': 'warn',
'jest/no-identical-title': 'error',
'jest/no-large-snapshots': ['warn', { maxSize: 300 }],
'jest/prefer-strict-equal': 'error',
'jest/prefer-to-have-length': 'error',
'jest/valid-expect': 'error',
},
},
];