@wistia/eslint-config 1.3.1 → 1.4.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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @wistia/eslint-config
2
2
 
3
+ ## 1.4.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#412](https://github.com/wistia/eslint-config/pull/412) [`ab09493`](https://github.com/wistia/eslint-config/commit/ab094933364da1b9152b81a248c12bbaca733b5f) Thanks [@okize](https://github.com/okize)! - feat: add `preserve-caught-error` & `no-unassigned-vars` to base ruleset
8
+
3
9
  ## 1.3.1
4
10
 
5
11
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wistia/eslint-config",
3
- "version": "1.3.1",
3
+ "version": "1.4.0",
4
4
  "description": "Wistia's ESLint configurations",
5
5
  "packageManager": "yarn@4.12.0",
6
6
  "type": "module",
@@ -197,7 +197,11 @@ export default {
197
197
 
198
198
  // Disallow unmodified loop conditions
199
199
  // https://eslint.org/docs/rules/no-unmodified-loop-condition
200
- 'no-unmodified-loop-condition': 'off',
200
+ 'no-unmodified-loop-condition': 'error',
201
+
202
+ // Disallow let or var variables that are read but never assigned
203
+ // https://eslint.org/docs/latest/rules/no-unassigned-vars
204
+ 'no-unassigned-vars': 'error',
201
205
 
202
206
  // Disallow unreachable code after return, throw, continue, and break statements
203
207
  // https://eslint.org/docs/rules/no-unreachable
@@ -987,6 +991,12 @@ export default {
987
991
  // https://eslint.org/docs/rules/prefer-template
988
992
  'prefer-template': 'error',
989
993
 
994
+ // Disallow losing originally caught error when re-throwing custom errors
995
+ // https://eslint.org/docs/latest/rules/preserve-caught-error
996
+ 'preserve-caught-error': ['error', {
997
+ 'requireCatchParameter': false
998
+ }],
999
+
990
1000
  // Enforce the consistent use of the radix argument when using parseInt()
991
1001
  // https://eslint.org/docs/rules/radix
992
1002
  radix: 'error',
@@ -1563,6 +1563,9 @@
1563
1563
  "no-throw-literal": [
1564
1564
  2,
1565
1565
  ],
1566
+ "no-unassigned-vars": [
1567
+ 2,
1568
+ ],
1566
1569
  "no-undef": [
1567
1570
  2,
1568
1571
  {
@@ -1593,7 +1596,7 @@
1593
1596
  0,
1594
1597
  ],
1595
1598
  "no-unmodified-loop-condition": [
1596
- 0,
1599
+ 2,
1597
1600
  ],
1598
1601
  "no-unneeded-ternary": [
1599
1602
  2,
@@ -1812,6 +1815,12 @@
1812
1815
  "prefer-template": [
1813
1816
  2,
1814
1817
  ],
1818
+ "preserve-caught-error": [
1819
+ 2,
1820
+ {
1821
+ "requireCatchParameter": false,
1822
+ },
1823
+ ],
1815
1824
  "prettier/prettier": [
1816
1825
  2,
1817
1826
  ],
@@ -2017,6 +2017,9 @@
2017
2017
  "no-throw-literal": [
2018
2018
  0,
2019
2019
  ],
2020
+ "no-unassigned-vars": [
2021
+ 2,
2022
+ ],
2020
2023
  "no-undef": [
2021
2024
  0,
2022
2025
  {
@@ -2047,7 +2050,7 @@
2047
2050
  0,
2048
2051
  ],
2049
2052
  "no-unmodified-loop-condition": [
2050
- 0,
2053
+ 2,
2051
2054
  ],
2052
2055
  "no-unneeded-ternary": [
2053
2056
  2,
@@ -2242,6 +2245,12 @@
2242
2245
  "prefer-template": [
2243
2246
  2,
2244
2247
  ],
2248
+ "preserve-caught-error": [
2249
+ 2,
2250
+ {
2251
+ "requireCatchParameter": false,
2252
+ },
2253
+ ],
2245
2254
  "prettier/prettier": [
2246
2255
  2,
2247
2256
  ],