Socket
Socket
Sign inDemoInstall

@corva/eslint-config-browser

Package Overview
Dependencies
335
Maintainers
14
Versions
21
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.2.0 to 0.2.2

47

eslint/enforce-test-ids/createConfig.js
module.exports.createConfig = severity => ({
plugins: ['test-selectors', 'testing-library'],
plugins: ['@corva/test-selectors', 'testing-library'],
rules: {

@@ -8,14 +8,41 @@ 'testing-library/consistent-data-testid': [

testIdPattern: '^[a-z][a-zA-Z0-9]+$', // camelCase with numbers
// We need both 'testId' and 'testid' as 'test-selectors' is case-insensitive
testIdAttribute: ['data-testid', 'testId', 'testid'],
testIdAttribute: ['data-testid', 'testId'],
},
],
'test-selectors/anchor': [severity, 'always', { testAttribute: ['data-testid', 'testId'] }],
'test-selectors/button': [severity, 'always', { testAttribute: ['data-testid', 'testId'] }],
'test-selectors/input': [severity, 'always', { testAttribute: ['data-testid', 'testId'] }],
'test-selectors/onChange': [severity, 'always', { testAttribute: ['data-testid', 'testId'] }],
'test-selectors/onClick': [severity, 'always', { testAttribute: ['data-testid', 'testId'] }],
'test-selectors/onKeyDown': [severity, 'always', { testAttribute: ['data-testid', 'testId'] }],
'test-selectors/onKeyUp': [severity, 'always', { testAttribute: ['data-testid', 'testId'] }],
'@corva/test-selectors/anchor': [
severity,
'always',
{ testAttribute: ['data-testid', 'testId'] },
],
'@corva/test-selectors/button': [
severity,
'always',
{ testAttribute: ['data-testid', 'testId'] },
],
'@corva/test-selectors/input': [
severity,
'always',
{ testAttribute: ['data-testid', 'testId'] },
],
'@corva/test-selectors/onChange': [
severity,
'always',
{ testAttribute: ['data-testid', 'testId'] },
],
'@corva/test-selectors/onClick': [
severity,
'always',
{ testAttribute: ['data-testid', 'testId'] },
],
'@corva/test-selectors/onKeyDown': [
severity,
'always',
{ testAttribute: ['data-testid', 'testId'] },
],
'@corva/test-selectors/onKeyUp': [
severity,
'always',
{ testAttribute: ['data-testid', 'testId'] },
],
},
});
{
"name": "@corva/eslint-config-browser",
"version": "0.2.0",
"version": "0.2.2",
"description": "Defines global linting rules for Corva.AI frontend projects",

@@ -33,2 +33,3 @@ "keywords": [

"@babel/preset-react": "7.12.10",
"@corva/eslint-plugin-test-selectors": "^1.0.0",
"eslint": "^7.22.0",

@@ -42,3 +43,2 @@ "eslint-config-airbnb": "^18.2.1",

"eslint-plugin-react-hooks": "^4.2.0",
"eslint-plugin-test-selectors": "^2.1.1",
"eslint-plugin-testing-library": "^6.2.0",

@@ -45,0 +45,0 @@ "prettier": "^2.0.0"

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc