@corva/eslint-config-browser
Advanced tools
Comparing version 0.2.0 to 0.2.2
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" |
6771
166
+ Added@corva/eslint-plugin-test-selectors@1.0.0(transitive)
- Removedeslint-plugin-test-selectors@^2.1.1
- Removedeslint-plugin-test-selectors@2.1.1(transitive)
- Removednanoid@3.3.7(transitive)