@open-turo/eslint-config-typescript 9.0.15 → 9.0.17

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.
@@ -14,7 +14,7 @@ jobs:
14
14
  mkdir -p "$HOME/bin"
15
15
  bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash) latest "$HOME/bin"
16
16
  echo "${HOME}/bin" >> "$GITHUB_PATH"
17
- - uses: open-turo/actions-node/lint@v5
17
+ - uses: open-turo/actions-node/lint@v6
18
18
  with:
19
19
  github-token: ${{ secrets.GITHUB_TOKEN }}
20
20
  npm-token: ${{ secrets.OPEN_TURO_NPM_TOKEN }}
@@ -22,7 +22,7 @@ jobs:
22
22
  name: Test
23
23
  runs-on: ubuntu-latest
24
24
  steps:
25
- - uses: open-turo/actions-node/test@v5
25
+ - uses: open-turo/actions-node/test@v6
26
26
  with:
27
27
  github-token: ${{ secrets.GITHUB_TOKEN }}
28
28
  test-flags: --coverage
@@ -10,7 +10,7 @@ jobs:
10
10
  name: Release
11
11
  runs-on: ubuntu-latest
12
12
  steps:
13
- - uses: open-turo/actions-node/release@v5
13
+ - uses: open-turo/actions-node/release@v6
14
14
  with:
15
15
  github-token: ${{ secrets.OPEN_TURO_GITHUB_TOKEN }}
16
16
  npm-token: ${{ secrets.OPEN_TURO_NPM_TOKEN }}
package/index.js CHANGED
@@ -72,22 +72,22 @@ module.exports = {
72
72
  "simple-import-sort/imports": "error",
73
73
  "simple-import-sort/exports": "error",
74
74
  "sort-destructure-keys/sort-destructure-keys": "error",
75
- /**
76
- * List of sonarjs rules we turned off after release of eslint-plugin-sonarjs v2
77
- * Some rules are too restrictive for common use cases,
78
- * and others are already covered by other plugins used here.
79
- */
80
- "sonarjs/different-types-comparison": "off",
75
+ // This rule is not helpful in TypeScript files, and in JavaScript we often return different types from functions, so this is not a strictness level we want to enforce.
81
76
  "sonarjs/function-return-type": "off",
82
- "sonarjs/no-clear-text-protocols": "warn",
77
+ // We may want to catch errors but not use the error object directly, just trigger error handling fallbacks within the catch block.
83
78
  "sonarjs/no-ignored-exceptions": "off",
84
- "sonarjs/no-misused-promises": "off",
85
- "sonarjs/no-nested-functions": "off",
79
+ "sonarjs/no-nested-functions": ["warn", { threshold: 5 }],
80
+ // Overlaps with @typescript-eslint/prefer-nullish-coalescing
86
81
  "sonarjs/prefer-nullish-coalescing": "off",
82
+ // Overlaps with @typescript-eslint/no-unused-vars
87
83
  "sonarjs/sonar-no-unused-vars": "off",
84
+ // Overlaps with @typescript-eslint/prefer-optional-chain
88
85
  "sonarjs/sonar-prefer-optional-chain": "off",
86
+ // Useful for guarding against prop mutation in React, but too much of a lift as very rarely do we apply readonly/ReadonlyArray<T> to type definitions
89
87
  "sonarjs/sonar-prefer-read-only-props": "off",
88
+ // Noisy rule: if we wanted stricter linting of TODOs, we could use unicorn/expiring-todo-comments
90
89
  "sonarjs/todo-tag": "off",
90
+ // A useful rule to consider for libraries to better document (and export) type definitions, but noisy in app usages (especially around redux type definitions)
91
91
  "sonarjs/use-type-alias": "off",
92
92
  /**
93
93
  * {@link https://typescript-eslint.io/rules/consistent-type-imports | TypeScript ESLint: consistent-type-imports docs}
package/legacy.js CHANGED
@@ -73,22 +73,22 @@ module.exports = {
73
73
  "simple-import-sort/imports": "error",
74
74
  "simple-import-sort/exports": "error",
75
75
  "sort-destructure-keys/sort-destructure-keys": "error",
76
- /**
77
- * List of sonarjs rules we turned off after release of eslint-plugin-sonarjs v2
78
- * Some rules are too restrictive for common use cases,
79
- * and others are already covered by other plugins used here.
80
- */
81
- "sonarjs/different-types-comparison": "off",
76
+ // This rule is not helpful in TypeScript files, and in JavaScript we often return different types from functions, so this is not a strictness level we want to enforce.
82
77
  "sonarjs/function-return-type": "off",
83
- "sonarjs/no-clear-text-protocols": "warn",
78
+ // We may want to catch errors but not use the error object directly, just trigger error handling fallbacks within the catch block.
84
79
  "sonarjs/no-ignored-exceptions": "off",
85
- "sonarjs/no-misused-promises": "off",
86
- "sonarjs/no-nested-functions": "off",
80
+ "sonarjs/no-nested-functions": ["warn", { threshold: 5 }],
81
+ // Overlaps with @typescript-eslint/prefer-nullish-coalescing
87
82
  "sonarjs/prefer-nullish-coalescing": "off",
83
+ // Overlaps with @typescript-eslint/no-unused-vars
88
84
  "sonarjs/sonar-no-unused-vars": "off",
85
+ // Overlaps with @typescript-eslint/prefer-optional-chain
89
86
  "sonarjs/sonar-prefer-optional-chain": "off",
87
+ // Useful for guarding against prop mutation in React, but too much of a lift as very rarely do we apply readonly/ReadonlyArray<T> to type definitions
90
88
  "sonarjs/sonar-prefer-read-only-props": "off",
89
+ // Noisy rule: if we wanted stricter linting of TODOs, we could use unicorn/expiring-todo-comments
91
90
  "sonarjs/todo-tag": "off",
91
+ // A useful rule to consider for libraries to better document (and export) type definitions, but noisy in app usages (especially around redux type definitions)
92
92
  "sonarjs/use-type-alias": "off",
93
93
  "@typescript-eslint/no-unused-vars": [
94
94
  "error",
package/package.json CHANGED
@@ -7,7 +7,7 @@
7
7
  "eslint-config-prettier": "9.1.0",
8
8
  "eslint-import-resolver-typescript": "3.6.3",
9
9
  "eslint-plugin-import": "2.30.0",
10
- "eslint-plugin-jest": "28.8.2",
10
+ "eslint-plugin-jest": "28.8.3",
11
11
  "eslint-plugin-json": "4.0.1",
12
12
  "eslint-plugin-node": "11.1.0",
13
13
  "eslint-plugin-prettier": "5.2.1",
@@ -42,5 +42,5 @@
42
42
  "access": "public"
43
43
  },
44
44
  "repository": "https://github.com/open-turo/eslint-config-typescript",
45
- "version": "9.0.15"
45
+ "version": "9.0.17"
46
46
  }