Noosphere Possibilities Maximized

    @side/eslint-config-jest

    0.6.0 • Public • Published

    @side/eslint-config-jest

    An ESLint configuration which enables lint rules for Jest tests.

    Installation

    Install this package, and ensure you have installed its peer dependencies.

    yarn info @side/eslint-config-jest peerDependencies

    yarn add -D @side/eslint-config-jest

    Usage

    Once all peer dependencies have been added to your project, extend this configuration in your project's .eslintrc.js.

    .eslintrc.js

    module.exports = {
      overrides: [
        {
          files: [
            '**/__tests__/**',
            '**/__mocks__/**',
            'test.{js,jsx}',
            'test-*.{js,jsx}',
            '**/*{.,_}{test,spec}.{js,jsx}',
          ],
          // Make sure you exclude any paths where Cypress tests are located
          excludedFiles: ['**/cypress/**/*.js'],
          extends: ['@side/jest'],
        },
      ],
    };

    Note: Make sure to extend this as an override so you can specify the exact Jest test files you want these rules to be run against. Please reference the eslint-plugin-jest documentation for more details.

    Keywords

    none

    Install

    npm i @side/eslint-config-jest

    DownloadsWeekly Downloads

    2,395

    Version

    0.6.0

    License

    UNLICENSED

    Unpacked Size

    10.1 kB

    Total Files

    5

    Last publish

    Collaborators

    • reside-eng