How to use the eslint-plugin-jest.rules function in eslint-plugin-jest

To help you get started, we’ve selected a few eslint-plugin-jest examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github moxystudio / eslint-config / addons / jest.js View on Github external
'extends': [
        '../rules/jest',
    ].map(require.resolve),
    'plugins': [
        'jest',
    ],
    'overrides': [{
        'env': {
            'jest/globals': false,
        },
        'files': [
            '**/*.js',
        ],
        'excludedFiles': testFilePatterns,
        // Disable all rules provided by Jest plugin
        'rules': Object.keys(jestPlugin.rules).reduce(function (rules, rule) {
            rules['jest/' + rule] = 0;

            return rules;
        }, {}),
    }, {
        'files': testFilePatterns,
        'rules': {
            'prefer-import/prefer-import-over-require': 0,
        },
    }],
};

eslint-plugin-jest

ESLint rules for Jest

MIT
Latest version published 3 days ago

Package Health Score

92 / 100
Full package analysis