How to use the eslint-plugin-jest.configs 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 roginfarrer / react-collapsed / .eslintrc.js View on Github external
],
    'max-lines-per-function': 'off',
    'jest/no-disabled-tests': 'off',
  },
  overrides: [
    Object.assign(
      {
        files: ['**/*.test.js'],
        env: {
          jest: true, // now **/*.test.js files' env has both es6 *and* jest
        },
        // Can't extend in overrides: https://github.com/eslint/eslint/issues/8813
        // "extends": ["plugin:jest/recommended"]
        plugins: ['jest'],
      },
      require('eslint-plugin-jest').configs.recommended
    ),
  ],
};
github ember-cli / ember-rfc176-data / .eslintrc.js View on Github external
rules: {
    'prettier/prettier': ['error', { singleQuote: true, trailingComma: 'es5' }],
  },
  overrides: [
    {
      files: ['scripts/*.js'],
      rules: {
        'no-console': 'off',
      }
    },
    {
      files: ['tests/*.test.js'],
      plugins: ['jest'],

      // can't use `extends` in nested config :sob:
      rules: require('eslint-plugin-jest').configs.recommended.rules,

      env: {
        'jest': true
      }
    },
    {
      files: ['scripts/**/*.js', 'tests/**/*.js'],
      rules: {
        // prevent fallback to node 4 only support, this package only distributes *.json
        // node version isn't super important...
        'node/no-unsupported-features': 'off',
      }
    }
  ]
};
github vuelidate / vuelidate / .eslintrc.js View on Github external
es6: true,
    node: true
  },
  extends: [
    // 'plugin:vue/essential', // is this required?
    'standard'
  ],
  globals: {},
  parserOptions: {
    ecmaVersion: 2018,
    sourceType: 'module'
  },
  plugins: [],
  rules: {},
  overrides: [
    Object.assign({}, jestConfig.configs.recommended, {
      files: ['packages/**/*.spec.js'],
      globals: jestConfig.environments.globals.globals,
      env: {
        es6: true,
        node: true
      }
    })
  ]
}

eslint-plugin-jest

ESLint rules for Jest

MIT
Latest version published 16 days ago

Package Health Score

92 / 100
Full package analysis