@bigcommerce/eslint-config 2.9.1 → 2.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/configs/base.js CHANGED
@@ -1,3 +1,4 @@
1
+ /** @type {import("eslint").Linter.Config} */
1
2
  module.exports = {
2
3
  env: {
3
4
  browser: true,
@@ -0,0 +1,5 @@
1
+ /** @type {import("eslint").Linter.Config} */
2
+ module.exports = {
3
+ extends: 'plugin:jest-dom/recommended',
4
+ plugins: ['jest-dom'],
5
+ };
package/configs/jest.js CHANGED
@@ -1,3 +1,4 @@
1
+ /** @type {import("eslint").Linter.Config} */
1
2
  module.exports = {
2
3
  env: {
3
4
  jest: true,
package/configs/jsdoc.js CHANGED
@@ -1,3 +1,4 @@
1
+ /** @type {import("eslint").Linter.Config} */
1
2
  module.exports = {
2
3
  plugins: ['jsdoc'],
3
4
  rules: {
@@ -21,6 +21,7 @@ function getRules() {
21
21
  };
22
22
  }
23
23
 
24
+ /** @type {import("eslint").Linter.Config} */
24
25
  module.exports = {
25
26
  extends: ['plugin:prettier/recommended'],
26
27
  rules: getRules(),
package/configs/react.js CHANGED
@@ -1,3 +1,4 @@
1
+ /** @type {import("eslint").Linter.Config} */
1
2
  module.exports = {
2
3
  extends: [
3
4
  'plugin:react/recommended',
@@ -0,0 +1,8 @@
1
+ /** @type {import("eslint").Linter.Config} */
2
+ module.exports = {
3
+ extends: ['plugin:testing-library/react'],
4
+ plugins: ['testing-library'],
5
+ rules: {
6
+ 'testing-library/no-render-in-lifecycle': 'off',
7
+ },
8
+ };
@@ -1,5 +1,6 @@
1
1
  const { join } = require('path');
2
2
 
3
+ /** @type {import("eslint").Linter.Config} */
3
4
  module.exports = {
4
5
  extends: [
5
6
  'plugin:import/typescript',
package/index.js CHANGED
@@ -7,6 +7,14 @@ module.exports = {
7
7
  extends: './configs/jest',
8
8
  files: ['**/*.spec.*', '**/spec.*', 'jest-setup.*'],
9
9
  },
10
+ hasPackage('@testing-library/jest-dom') && {
11
+ extends: './configs/jest-dom',
12
+ files: ['**/*.spec.*', '**/spec.*', 'jest-setup.*'],
13
+ },
14
+ hasPackage('@testing-library/react') && {
15
+ extends: './configs/testing-library',
16
+ files: ['**/*.spec.*', '**/spec.*', 'jest-setup.*'],
17
+ },
10
18
  hasPackage('react') && {
11
19
  extends: './configs/react',
12
20
  files: ['**/*.ts', '**/*.tsx', '**/*.js', '**/*.jsx'],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bigcommerce/eslint-config",
3
- "version": "2.9.1",
3
+ "version": "2.10.0",
4
4
  "description": "Default ESLint configuration used at BigCommerce",
5
5
  "main": "index.js",
6
6
  "files": [
@@ -30,16 +30,20 @@
30
30
  "eslint-plugin-gettext": "^1.2.0",
31
31
  "eslint-plugin-import": "^2.26.0",
32
32
  "eslint-plugin-jest": "^28.4.0",
33
+ "eslint-plugin-jest-dom": "^5.5.0",
33
34
  "eslint-plugin-jest-formatting": "^3.1.0",
34
35
  "eslint-plugin-jsdoc": "^50.2.2",
35
36
  "eslint-plugin-jsx-a11y": "^6.5.1",
36
37
  "eslint-plugin-prettier": "^5.2.1",
37
38
  "eslint-plugin-react": "^7.29.4",
38
- "eslint-plugin-react-hooks": "^4.5.0",
39
+ "eslint-plugin-react-hooks": "^5.0.0",
39
40
  "eslint-plugin-switch-case": "^1.1.2",
41
+ "eslint-plugin-testing-library": "^7.0.0",
40
42
  "prettier": "^3.3.3"
41
43
  },
42
44
  "devDependencies": {
45
+ "@testing-library/jest-dom": "^6.6.3",
46
+ "@testing-library/react": "^16.0.1",
43
47
  "react": "^18.3.1"
44
48
  },
45
49
  "peerDependencies": {
@@ -51,5 +55,5 @@
51
55
  "optional": true
52
56
  }
53
57
  },
54
- "gitHead": "73ecca900b0e7c1459b1cc4089465d4b49cacc3c"
58
+ "gitHead": "6ab2382726d4770d615d5a55a9d4220e1c69af28"
55
59
  }