@open-turo/eslint-config-typescript 2.2.0 → 2.3.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/index.js CHANGED
@@ -2,10 +2,12 @@ module.exports = {
2
2
  root: true,
3
3
  env: {
4
4
  es2022: true,
5
+ jest: true,
5
6
  },
6
7
  parser: "@typescript-eslint/parser",
7
8
  plugins: [
8
9
  "@typescript-eslint",
10
+ "eslint-plugin-jest",
9
11
  "import",
10
12
  "jest",
11
13
  "json",
@@ -36,6 +38,17 @@ module.exports = {
36
38
  project: "./tsconfig.json",
37
39
  sourceType: "module",
38
40
  },
41
+ overrides: [
42
+ {
43
+ files: ["test/**"],
44
+ plugins: ["jest"],
45
+ rules: {
46
+ // this turns the original rule off *only* for test files, for jest compatibility
47
+ "@typescript-eslint/unbound-method": "off",
48
+ "jest/unbound-method": "error",
49
+ },
50
+ },
51
+ ],
39
52
  rules: {
40
53
  "import/default": "off",
41
54
  "import/named": "off",
@@ -66,6 +79,7 @@ module.exports = {
66
79
  argsIgnorePattern: "^_",
67
80
  },
68
81
  ],
82
+ "@typescript-eslint/unbound-method": "error",
69
83
  },
70
84
  settings: {
71
85
  "import/parsers": {
package/legacy.js CHANGED
@@ -1,13 +1,14 @@
1
1
  module.exports = {
2
2
  root: true,
3
3
  env: {
4
- es6: true,
4
+ es2022: true,
5
5
  jest: true,
6
6
  },
7
7
  parser: "@typescript-eslint/parser",
8
8
  ignorePatterns: ["jest.config.js"],
9
9
  plugins: [
10
10
  "@typescript-eslint",
11
+ "eslint-plugin-jest",
11
12
  "import",
12
13
  "jest",
13
14
  "json",
@@ -17,7 +18,6 @@ module.exports = {
17
18
  "sonarjs",
18
19
  "sort-destructure-keys",
19
20
  "typescript-sort-keys",
20
- "eslint-plugin-jest",
21
21
  ],
22
22
  extends: [
23
23
  "eslint:recommended",
package/package.json CHANGED
@@ -54,5 +54,5 @@
54
54
  "access": "public"
55
55
  },
56
56
  "repository": "https://github.com/open-turo/eslint-config-typescript",
57
- "version": "2.2.0"
57
+ "version": "2.3.0"
58
58
  }