Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

eslint-plugin-jest-dom

Package Overview
Dependencies
Maintainers
1
Versions
61
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-jest-dom - npm Package Compare versions

Comparing version 1.1.2 to 1.1.3

16

lib/index.js

@@ -20,11 +20,17 @@ /**

module.exports.generateRecommendedConfig = rules => {
return Object.entries(rules).reduce(
(memo, [name, rule]) =>
rule.meta.docs.recommended
? { ...memo, [`jest-dom/${name}`]: 'error' }
: memo,
{}
);
};
module.exports.configs = {
recommended: {
plugins: ['jest-dom'],
rules: {
'jest-dom/prefer-checked': 'error',
'jest-dom/prefer-enabled-disabled': 'error',
'jest-dom/prefer-required': 'error',
},
rules: module.exports.generateRecommendedConfig(module.exports.rules),
},
};
{
"name": "eslint-plugin-jest-dom",
"version": "1.1.2",
"version": "1.1.3",
"description": "lint rules for use with jest-dom",

@@ -18,3 +18,3 @@ "keywords": [

"dependencies": {
"requireindex": "~1.1.0"
"requireindex": "~1.2.0"
},

@@ -21,0 +21,0 @@ "devDependencies": {

@@ -37,7 +37,3 @@ # eslint-plugin-jest-dom

{
"rules": {
"jest-dom/prefer-checked": "error",
"jest-dom/prefer-enabled-disabled": "error",
"jest-dom/prefer-required": "error"
}
"rules": {}
}

@@ -44,0 +40,0 @@ ```

@@ -1,2 +0,2 @@

const { rules } = require('../lib/index');
const { rules, generateRecommendedConfig, configs } = require('../lib/index');

@@ -6,1 +6,10 @@ it('should have all the rules', () => {

});
it('should have a recommended config with recommended rules', () => {
expect(
generateRecommendedConfig({
good: { meta: { docs: { recommended: true } } },
bad: { meta: { docs: { recommended: false } } },
})
).toEqual({ 'jest-dom/good': 'error' });
});

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc