Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion packages/eslint-config-sentry-react/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,28 @@ module.exports = {
'plugin:jest-dom/recommended',
],

plugins: ['jest-dom'],
plugins: ['jest-dom', 'testing-library'],

rules: {
/**
* Custom
*/
// highlights literals in JSX components w/o translation tags
'getsentry/jsx-needs-il8n': ['off'],
'testing-library/render-result-naming-convention': 'off',
'testing-library/prefer-screen-queries': 'off',
},

/**
* Our current version of eslint unfortunately does not support extends in
* overrides. Once we upgrade we can uncomment this and remove local
Comment on lines +25 to +26
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you know what version supports it?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like it was introduced in v6.0.0-alpha.2
https://github.com/eslint/eslint/releases/tag/v6.0.0-alpha.2
This PR: eslint/eslint#11554

* .eslintrc.js files in test folders. It is there to ensure that
* testing-library rules run only against test files.
*/
// overrides: [
// {
// files: ['**/__tests__/**/*.[jt]s?(x)', '**/?(*.)+(spec|test).[jt]s?(x)'],
// extends: ['plugin:testing-library/react'],
// },
// ],
};
3 changes: 2 additions & 1 deletion packages/eslint-config-sentry-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@
"homepage": "https://github.com/getsentry/eslint-config-sentry#readme",
"dependencies": {
"eslint-config-sentry": "^1.66.0",
"eslint-plugin-jest-dom": "^3.9.2"
"eslint-plugin-jest-dom": "^3.9.2",
"eslint-plugin-testing-library": "^4.12.4"
},
"volta": {
"node": "10.16.3",
Expand Down
Loading