@bigcommerce/eslint-config 2.9.1 → 2.11.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.11.0",
4
4
  "description": "Default ESLint configuration used at BigCommerce",
5
5
  "main": "index.js",
6
6
  "files": [
@@ -20,26 +20,30 @@
20
20
  "directory": "packages/eslint-config"
21
21
  },
22
22
  "dependencies": {
23
- "@bigcommerce/eslint-plugin": "^1.3.1",
24
- "@rushstack/eslint-patch": "^1.1.3",
23
+ "@bigcommerce/eslint-plugin": "^1.4.0",
24
+ "@rushstack/eslint-patch": "^1.10.5",
25
25
  "@stylistic/eslint-plugin": "^2.1.0",
26
- "@typescript-eslint/eslint-plugin": "^8.4.0",
27
- "@typescript-eslint/parser": "^8.4.0",
26
+ "@typescript-eslint/eslint-plugin": "^8.26.0",
27
+ "@typescript-eslint/parser": "^8.26.0",
28
28
  "eslint-config-prettier": "^9.1.0",
29
- "eslint-import-resolver-typescript": "^3.5.2",
29
+ "eslint-import-resolver-typescript": "^3.8.3",
30
30
  "eslint-plugin-gettext": "^1.2.0",
31
- "eslint-plugin-import": "^2.26.0",
32
- "eslint-plugin-jest": "^28.4.0",
31
+ "eslint-plugin-import": "^2.31.0",
32
+ "eslint-plugin-jest": "^28.11.0",
33
+ "eslint-plugin-jest-dom": "^5.5.0",
33
34
  "eslint-plugin-jest-formatting": "^3.1.0",
34
- "eslint-plugin-jsdoc": "^50.2.2",
35
- "eslint-plugin-jsx-a11y": "^6.5.1",
36
- "eslint-plugin-prettier": "^5.2.1",
37
- "eslint-plugin-react": "^7.29.4",
38
- "eslint-plugin-react-hooks": "^4.5.0",
35
+ "eslint-plugin-jsdoc": "^50.6.3",
36
+ "eslint-plugin-jsx-a11y": "^6.10.1",
37
+ "eslint-plugin-prettier": "^5.2.3",
38
+ "eslint-plugin-react": "^7.37.4",
39
+ "eslint-plugin-react-hooks": "^5.2.0",
39
40
  "eslint-plugin-switch-case": "^1.1.2",
40
- "prettier": "^3.3.3"
41
+ "eslint-plugin-testing-library": "^7.1.1",
42
+ "prettier": "^3.5.3"
41
43
  },
42
44
  "devDependencies": {
45
+ "@testing-library/jest-dom": "^6.6.3",
46
+ "@testing-library/react": "^16.2.0",
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": "a015c577fb7187c784132a262ee2220abb058c7d"
55
59
  }