eslint-plugin-sonarjs 4.0.1 → 4.0.3
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/README.md +23 -22
- package/cjs/S100/config.js +3 -3
- package/cjs/S100/generated-meta.js +3 -3
- package/cjs/S100/index.js +3 -3
- package/cjs/S100/meta.js +3 -3
- package/cjs/S100/rule.js +10 -8
- package/cjs/S101/config.js +4 -4
- package/cjs/S101/generated-meta.js +4 -4
- package/cjs/S101/index.js +3 -3
- package/cjs/S101/meta.js +3 -3
- package/cjs/S101/rule.js +6 -6
- package/cjs/S104/config.js +3 -3
- package/cjs/S104/generated-meta.js +3 -3
- package/cjs/S104/index.js +3 -3
- package/cjs/S104/meta.js +3 -3
- package/cjs/S104/rule.js +5 -5
- package/cjs/S105/generated-meta.js +3 -3
- package/cjs/S105/index.js +3 -3
- package/cjs/S105/meta.js +3 -3
- package/cjs/S105/rule.js +5 -5
- package/cjs/S1066/generated-meta.js +3 -3
- package/cjs/S1066/index.js +3 -3
- package/cjs/S1066/meta.js +3 -3
- package/cjs/S1066/rule.js +8 -7
- package/cjs/S1067/config.js +3 -3
- package/cjs/S1067/generated-meta.js +3 -3
- package/cjs/S1067/index.js +3 -3
- package/cjs/S1067/meta.js +3 -3
- package/cjs/S1067/rule.js +11 -9
- package/cjs/S1110/generated-meta.js +3 -3
- package/cjs/S1110/index.js +3 -3
- package/cjs/S1110/meta.js +3 -3
- package/cjs/S1110/rule.js +10 -8
- package/cjs/S1119/generated-meta.js +3 -3
- package/cjs/S1119/index.js +3 -3
- package/cjs/S1119/meta.js +3 -3
- package/cjs/S1119/rule.js +5 -5
- package/cjs/S1121/generated-meta.js +3 -3
- package/cjs/S1121/index.js +3 -3
- package/cjs/S1121/meta.js +3 -3
- package/cjs/S1121/rule.js +7 -6
- package/cjs/S1125/generated-meta.js +3 -3
- package/cjs/S1125/index.js +3 -3
- package/cjs/S1125/meta.js +3 -3
- package/cjs/S1125/rule.js +12 -11
- package/cjs/S1126/generated-meta.js +3 -3
- package/cjs/S1126/index.js +3 -3
- package/cjs/S1126/meta.js +3 -3
- package/cjs/S1126/rule.js +31 -12
- package/cjs/S1128/generated-meta.js +5 -4
- package/cjs/S1128/index.js +3 -3
- package/cjs/S1128/meta.js +3 -3
- package/cjs/S1128/rule.js +11 -8
- package/cjs/S1134/generated-meta.js +3 -3
- package/cjs/S1134/index.js +3 -3
- package/cjs/S1134/meta.js +3 -3
- package/cjs/S1134/rule.js +5 -5
- package/cjs/S1135/generated-meta.js +3 -3
- package/cjs/S1135/index.js +3 -3
- package/cjs/S1135/meta.js +3 -3
- package/cjs/S1135/rule.js +5 -5
- package/cjs/S1154/generated-meta.js +3 -3
- package/cjs/S1154/index.js +3 -3
- package/cjs/S1154/meta.js +3 -3
- package/cjs/S1154/rule.js +9 -7
- package/cjs/S117/config.js +3 -3
- package/cjs/S117/generated-meta.js +3 -3
- package/cjs/S117/index.js +3 -3
- package/cjs/S117/meta.js +3 -3
- package/cjs/S117/rule.js +9 -8
- package/cjs/S1172/generated-meta.js +3 -3
- package/cjs/S1172/index.js +3 -3
- package/cjs/S1172/meta.js +3 -3
- package/cjs/S1172/rule.js +5 -5
- package/cjs/S1192/config.js +3 -3
- package/cjs/S1192/generated-meta.js +3 -3
- package/cjs/S1192/index.js +3 -3
- package/cjs/S1192/meta.js +3 -3
- package/cjs/S1192/rule.js +10 -9
- package/cjs/S1219/generated-meta.js +3 -3
- package/cjs/S1219/index.js +3 -3
- package/cjs/S1219/meta.js +3 -3
- package/cjs/S1219/rule.js +7 -6
- package/cjs/S1226/generated-meta.js +3 -3
- package/cjs/S1226/index.js +3 -3
- package/cjs/S1226/meta.js +3 -3
- package/cjs/S1226/rule.js +9 -7
- package/cjs/S124/config.js +3 -3
- package/cjs/S124/generated-meta.js +3 -3
- package/cjs/S124/index.js +3 -3
- package/cjs/S124/meta.js +3 -3
- package/cjs/S124/rule.js +5 -5
- package/cjs/S125/generated-meta.js +3 -3
- package/cjs/S125/index.js +3 -3
- package/cjs/S125/meta.js +3 -3
- package/cjs/S125/rule.js +76 -27
- package/cjs/S126/generated-meta.js +3 -3
- package/cjs/S126/index.js +3 -3
- package/cjs/S126/meta.js +3 -3
- package/cjs/S126/rule.js +5 -5
- package/cjs/S1264/generated-meta.js +3 -3
- package/cjs/S1264/index.js +3 -3
- package/cjs/S1264/meta.js +3 -3
- package/cjs/S1264/rule.js +5 -5
- package/cjs/S128/generated-meta.js +3 -3
- package/cjs/S128/index.js +3 -3
- package/cjs/S128/meta.js +3 -3
- package/cjs/S128/rule.js +7 -6
- package/cjs/S1291/generated-meta.js +3 -3
- package/cjs/S1291/index.js +3 -3
- package/cjs/S1291/meta.js +3 -3
- package/cjs/S1291/rule.js +5 -5
- package/cjs/S1301/generated-meta.js +3 -3
- package/cjs/S1301/index.js +3 -3
- package/cjs/S1301/meta.js +3 -3
- package/cjs/S1301/rule.js +143 -5
- package/cjs/S1313/generated-meta.js +5 -5
- package/cjs/S1313/index.js +3 -3
- package/cjs/S1313/meta.js +3 -3
- package/cjs/S1313/rule.js +5 -5
- package/cjs/S134/config.js +4 -4
- package/cjs/S134/generated-meta.js +3 -3
- package/cjs/S134/index.js +3 -3
- package/cjs/S134/meta.js +3 -3
- package/cjs/S134/rule.js +10 -8
- package/cjs/S135/generated-meta.js +3 -3
- package/cjs/S135/index.js +3 -3
- package/cjs/S135/meta.js +3 -3
- package/cjs/S135/rule.js +8 -7
- package/cjs/S138/config.js +3 -3
- package/cjs/S138/generated-meta.js +3 -3
- package/cjs/S138/index.js +3 -3
- package/cjs/S138/meta.js +3 -3
- package/cjs/S138/rule.js +12 -9
- package/cjs/S1439/generated-meta.js +3 -3
- package/cjs/S1439/index.js +3 -3
- package/cjs/S1439/meta.js +3 -3
- package/cjs/S1439/rule.js +5 -5
- package/cjs/S1444/generated-meta.js +3 -3
- package/cjs/S1444/index.js +3 -3
- package/cjs/S1444/meta.js +3 -3
- package/cjs/S1444/rule.js +5 -5
- package/cjs/S1451/config.js +3 -3
- package/cjs/S1451/generated-meta.js +3 -3
- package/cjs/S1451/index.js +3 -3
- package/cjs/S1451/meta.js +3 -3
- package/cjs/S1451/rule.js +5 -5
- package/cjs/S1472/generated-meta.js +3 -3
- package/cjs/S1472/index.js +3 -3
- package/cjs/S1472/meta.js +3 -3
- package/cjs/S1472/rule.js +5 -5
- package/cjs/S1479/config.js +3 -3
- package/cjs/S1479/generated-meta.js +3 -3
- package/cjs/S1479/index.js +3 -3
- package/cjs/S1479/meta.js +3 -3
- package/cjs/S1479/rule.js +5 -5
- package/cjs/S1481/generated-meta.js +3 -3
- package/cjs/S1481/index.js +3 -3
- package/cjs/S1481/meta.js +3 -3
- package/cjs/S1481/rule.js +5 -5
- package/cjs/S1488/generated-meta.js +3 -3
- package/cjs/S1488/index.js +3 -3
- package/cjs/S1488/meta.js +3 -3
- package/cjs/S1488/rule.js +14 -10
- package/cjs/S1515/generated-meta.js +3 -3
- package/cjs/S1515/index.js +3 -3
- package/cjs/S1515/meta.js +3 -3
- package/cjs/S1515/rule.js +13 -11
- package/cjs/S1523/generated-meta.js +3 -3
- package/cjs/S1523/index.js +3 -3
- package/cjs/S1523/meta.js +3 -3
- package/cjs/S1523/rule.js +8 -8
- package/cjs/S1526/generated-meta.js +3 -3
- package/cjs/S1526/index.js +3 -3
- package/cjs/S1526/meta.js +3 -3
- package/cjs/S1526/rule.js +8 -7
- package/cjs/S1527/generated-meta.js +3 -3
- package/cjs/S1527/index.js +3 -3
- package/cjs/S1527/meta.js +3 -3
- package/cjs/S1527/rule.js +5 -5
- package/cjs/S1528/generated-meta.js +3 -3
- package/cjs/S1528/index.js +3 -3
- package/cjs/S1528/meta.js +3 -3
- package/cjs/S1528/rule.js +2 -2
- package/cjs/S1529/generated-meta.js +3 -3
- package/cjs/S1529/index.js +3 -3
- package/cjs/S1529/meta.js +3 -3
- package/cjs/S1529/rule.js +7 -6
- package/cjs/S1530/generated-meta.js +3 -3
- package/cjs/S1530/index.js +3 -3
- package/cjs/S1530/meta.js +3 -3
- package/cjs/S1530/rule.js +8 -6
- package/cjs/S1533/generated-meta.js +3 -3
- package/cjs/S1533/index.js +3 -3
- package/cjs/S1533/meta.js +3 -3
- package/cjs/S1533/rule.js +5 -5
- package/cjs/S1535/generated-meta.js +3 -3
- package/cjs/S1535/index.js +3 -3
- package/cjs/S1535/meta.js +3 -3
- package/cjs/S1535/rule.js +5 -5
- package/cjs/S1541/config.js +3 -3
- package/cjs/S1541/generated-meta.js +3 -3
- package/cjs/S1541/index.js +3 -3
- package/cjs/S1541/meta.js +3 -3
- package/cjs/S1541/rule.js +13 -10
- package/cjs/S1607/generated-meta.js +3 -3
- package/cjs/S1607/index.js +3 -3
- package/cjs/S1607/meta.js +3 -3
- package/cjs/S1607/rule.js +25 -23
- package/cjs/S1764/generated-meta.js +3 -3
- package/cjs/S1764/index.js +3 -3
- package/cjs/S1764/meta.js +3 -3
- package/cjs/S1764/rule.js +13 -10
- package/cjs/S1821/generated-meta.js +3 -3
- package/cjs/S1821/index.js +3 -3
- package/cjs/S1821/meta.js +3 -3
- package/cjs/S1821/rule.js +5 -5
- package/cjs/S1848/generated-meta.js +3 -3
- package/cjs/S1848/index.js +3 -3
- package/cjs/S1848/meta.js +3 -3
- package/cjs/S1848/rule.js +13 -10
- package/cjs/S1854/generated-meta.js +3 -3
- package/cjs/S1854/index.js +3 -3
- package/cjs/S1854/meta.js +3 -3
- package/cjs/S1854/rule.js +21 -17
- package/cjs/S1862/generated-meta.js +3 -3
- package/cjs/S1862/index.js +3 -3
- package/cjs/S1862/meta.js +3 -3
- package/cjs/S1862/rule.js +13 -11
- package/cjs/S1871/generated-meta.js +3 -3
- package/cjs/S1871/index.js +3 -3
- package/cjs/S1871/meta.js +3 -3
- package/cjs/S1871/rule.js +24 -19
- package/cjs/S1874/generated-meta.js +3 -3
- package/cjs/S1874/index.js +3 -3
- package/cjs/S1874/meta.js +3 -3
- package/cjs/S1874/rule.js +7 -6
- package/cjs/S1940/generated-meta.js +3 -3
- package/cjs/S1940/index.js +3 -3
- package/cjs/S1940/meta.js +3 -3
- package/cjs/S1940/rule.js +5 -5
- package/cjs/S1994/generated-meta.js +3 -3
- package/cjs/S1994/index.js +3 -3
- package/cjs/S1994/meta.js +3 -3
- package/cjs/S1994/rule.js +13 -10
- package/cjs/S2004/config.js +3 -3
- package/cjs/S2004/generated-meta.js +3 -3
- package/cjs/S2004/index.js +3 -3
- package/cjs/S2004/meta.js +3 -3
- package/cjs/S2004/rule.js +12 -10
- package/cjs/S2068/config.js +3 -3
- package/cjs/S2068/generated-meta.js +3 -3
- package/cjs/S2068/index.js +3 -3
- package/cjs/S2068/meta.js +3 -3
- package/cjs/S2068/rule.js +102 -15
- package/cjs/S2077/generated-meta.js +3 -3
- package/cjs/S2077/index.js +3 -3
- package/cjs/S2077/meta.js +3 -3
- package/cjs/S2077/rule.js +45 -9
- package/cjs/S2092/generated-meta.js +4 -4
- package/cjs/S2092/index.js +3 -3
- package/cjs/S2092/meta.js +3 -3
- package/cjs/S2092/rule.js +5 -5
- package/cjs/S2123/generated-meta.js +3 -3
- package/cjs/S2123/index.js +3 -3
- package/cjs/S2123/meta.js +3 -3
- package/cjs/S2123/rule.js +5 -5
- package/cjs/S2137/generated-meta.js +3 -3
- package/cjs/S2137/index.js +3 -3
- package/cjs/S2137/meta.js +3 -3
- package/cjs/S2137/rule.js +5 -5
- package/cjs/S2138/generated-meta.js +3 -3
- package/cjs/S2138/index.js +3 -3
- package/cjs/S2138/meta.js +3 -3
- package/cjs/S2138/rule.js +7 -6
- package/cjs/S2187/generated-meta.js +3 -3
- package/cjs/S2187/index.js +3 -3
- package/cjs/S2187/meta.js +3 -3
- package/cjs/S2187/rule.js +5 -5
- package/cjs/S2201/generated-meta.js +3 -3
- package/cjs/S2201/index.js +3 -3
- package/cjs/S2201/meta.js +3 -3
- package/cjs/S2201/rule.js +11 -8
- package/cjs/S2208/generated-meta.js +5 -4
- package/cjs/S2208/index.js +3 -3
- package/cjs/S2208/meta.js +3 -3
- package/cjs/S2208/rule.js +5 -5
- package/cjs/S2234/generated-meta.js +3 -3
- package/cjs/S2234/index.js +3 -3
- package/cjs/S2234/meta.js +3 -3
- package/cjs/S2234/rule.js +163 -16
- package/cjs/S2245/generated-meta.js +3 -3
- package/cjs/S2245/index.js +3 -3
- package/cjs/S2245/meta.js +3 -3
- package/cjs/S2245/rule.js +7 -6
- package/cjs/S2251/generated-meta.js +3 -3
- package/cjs/S2251/index.js +3 -3
- package/cjs/S2251/meta.js +3 -3
- package/cjs/S2251/rule.js +8 -7
- package/cjs/S2255/generated-meta.js +3 -3
- package/cjs/S2255/index.js +3 -3
- package/cjs/S2255/meta.js +3 -3
- package/cjs/S2255/rule.js +9 -8
- package/cjs/S2259/generated-meta.js +3 -3
- package/cjs/S2259/index.js +3 -3
- package/cjs/S2259/meta.js +3 -3
- package/cjs/S2259/rule.js +17 -12
- package/cjs/S2301/generated-meta.js +3 -3
- package/cjs/S2301/index.js +3 -3
- package/cjs/S2301/meta.js +3 -3
- package/cjs/S2301/rule.js +24 -13
- package/cjs/S2310/generated-meta.js +3 -3
- package/cjs/S2310/index.js +3 -3
- package/cjs/S2310/meta.js +3 -3
- package/cjs/S2310/rule.js +17 -14
- package/cjs/S2392/generated-meta.js +3 -3
- package/cjs/S2392/index.js +3 -3
- package/cjs/S2392/meta.js +3 -3
- package/cjs/S2392/rule.js +51 -8
- package/cjs/S2424/generated-meta.js +3 -3
- package/cjs/S2424/index.js +3 -3
- package/cjs/S2424/meta.js +3 -3
- package/cjs/S2424/rule.js +5 -5
- package/cjs/S2428/generated-meta.js +3 -3
- package/cjs/S2428/index.js +3 -3
- package/cjs/S2428/meta.js +3 -3
- package/cjs/S2428/rule.js +11 -9
- package/cjs/S2486/generated-meta.js +3 -3
- package/cjs/S2486/index.js +3 -3
- package/cjs/S2486/meta.js +3 -3
- package/cjs/S2486/rule.js +7 -6
- package/cjs/S2589/generated-meta.js +3 -3
- package/cjs/S2589/index.js +3 -3
- package/cjs/S2589/meta.js +3 -3
- package/cjs/S2589/rule.js +15 -13
- package/cjs/S2598/generated-meta.js +3 -3
- package/cjs/S2598/index.js +3 -3
- package/cjs/S2598/meta.js +3 -3
- package/cjs/S2598/rule.js +20 -17
- package/cjs/S2612/generated-meta.js +4 -4
- package/cjs/S2612/index.js +3 -3
- package/cjs/S2612/meta.js +3 -3
- package/cjs/S2612/rule.js +11 -9
- package/cjs/S2639/generated-meta.js +3 -3
- package/cjs/S2639/index.js +3 -3
- package/cjs/S2639/meta.js +3 -3
- package/cjs/S2639/rule.js +5 -5
- package/cjs/S2681/generated-meta.js +3 -3
- package/cjs/S2681/index.js +3 -3
- package/cjs/S2681/meta.js +3 -3
- package/cjs/S2681/rule.js +5 -5
- package/cjs/S2692/generated-meta.js +3 -3
- package/cjs/S2692/index.js +3 -3
- package/cjs/S2692/meta.js +3 -3
- package/cjs/S2692/rule.js +9 -7
- package/cjs/S2699/generated-meta.js +3 -3
- package/cjs/S2699/index.js +3 -3
- package/cjs/S2699/meta.js +3 -3
- package/cjs/S2699/rule.js +40 -31
- package/cjs/S2703/generated-meta.js +3 -3
- package/cjs/S2703/index.js +3 -3
- package/cjs/S2703/meta.js +3 -3
- package/cjs/S2703/rule.js +5 -5
- package/cjs/S2737/generated-meta.js +3 -3
- package/cjs/S2737/index.js +3 -3
- package/cjs/S2737/meta.js +3 -3
- package/cjs/S2737/rule.js +9 -7
- package/cjs/S2755/generated-meta.js +3 -3
- package/cjs/S2755/index.js +3 -3
- package/cjs/S2755/meta.js +3 -3
- package/cjs/S2755/rule.js +12 -9
- package/cjs/S2757/generated-meta.js +3 -3
- package/cjs/S2757/index.js +3 -3
- package/cjs/S2757/meta.js +3 -3
- package/cjs/S2757/rule.js +5 -5
- package/cjs/S2817/generated-meta.js +3 -3
- package/cjs/S2817/index.js +3 -3
- package/cjs/S2817/meta.js +3 -3
- package/cjs/S2817/rule.js +13 -10
- package/cjs/S2819/generated-meta.js +3 -3
- package/cjs/S2819/index.js +3 -3
- package/cjs/S2819/meta.js +3 -3
- package/cjs/S2819/rule.js +19 -15
- package/cjs/S2870/generated-meta.js +3 -3
- package/cjs/S2870/index.js +3 -3
- package/cjs/S2870/meta.js +3 -3
- package/cjs/S2870/rule.js +11 -8
- package/cjs/S2871/generated-meta.js +3 -3
- package/cjs/S2871/index.js +3 -3
- package/cjs/S2871/meta.js +3 -3
- package/cjs/S2871/rule.js +15 -12
- package/cjs/S2970/generated-meta.js +3 -3
- package/cjs/S2970/index.js +3 -3
- package/cjs/S2970/meta.js +3 -3
- package/cjs/S2970/rule.js +12 -11
- package/cjs/S2990/generated-meta.js +3 -3
- package/cjs/S2990/index.js +3 -3
- package/cjs/S2990/meta.js +3 -3
- package/cjs/S2990/rule.js +5 -5
- package/cjs/S2999/config.js +3 -3
- package/cjs/S2999/generated-meta.js +3 -3
- package/cjs/S2999/index.js +3 -3
- package/cjs/S2999/meta.js +3 -3
- package/cjs/S2999/rule.js +13 -10
- package/cjs/S3001/generated-meta.js +3 -3
- package/cjs/S3001/index.js +3 -3
- package/cjs/S3001/meta.js +3 -3
- package/cjs/S3001/rule.js +5 -5
- package/cjs/S3003/generated-meta.js +3 -3
- package/cjs/S3003/index.js +3 -3
- package/cjs/S3003/meta.js +3 -3
- package/cjs/S3003/rule.js +13 -10
- package/cjs/S3317/generated-meta.js +5 -4
- package/cjs/S3317/index.js +3 -3
- package/cjs/S3317/meta.js +3 -3
- package/cjs/S3317/rule.js +7 -6
- package/cjs/S3330/generated-meta.js +3 -3
- package/cjs/S3330/index.js +3 -3
- package/cjs/S3330/meta.js +3 -3
- package/cjs/S3330/rule.js +5 -5
- package/cjs/S3358/generated-meta.js +3 -3
- package/cjs/S3358/index.js +3 -3
- package/cjs/S3358/meta.js +3 -3
- package/cjs/S3358/rule.js +5 -5
- package/cjs/S3402/generated-meta.js +3 -3
- package/cjs/S3402/index.js +3 -3
- package/cjs/S3402/meta.js +3 -3
- package/cjs/S3402/rule.js +17 -13
- package/cjs/S3403/generated-meta.js +3 -3
- package/cjs/S3403/index.js +3 -3
- package/cjs/S3403/meta.js +3 -3
- package/cjs/S3403/rule.js +13 -10
- package/cjs/S3415/generated-meta.js +3 -3
- package/cjs/S3415/index.js +3 -3
- package/cjs/S3415/meta.js +3 -3
- package/cjs/S3415/rule.js +19 -16
- package/cjs/S3499/generated-meta.js +5 -4
- package/cjs/S3499/index.js +3 -3
- package/cjs/S3499/meta.js +3 -3
- package/cjs/S3499/rule.js +8 -7
- package/cjs/S3500/generated-meta.js +5 -4
- package/cjs/S3500/index.js +3 -3
- package/cjs/S3500/meta.js +3 -3
- package/cjs/S3500/rule.js +8 -7
- package/cjs/S3513/generated-meta.js +5 -4
- package/cjs/S3513/index.js +3 -3
- package/cjs/S3513/meta.js +3 -3
- package/cjs/S3513/rule.js +8 -7
- package/cjs/S3514/generated-meta.js +5 -4
- package/cjs/S3514/index.js +3 -3
- package/cjs/S3514/meta.js +3 -3
- package/cjs/S3514/rule.js +13 -10
- package/cjs/S3516/generated-meta.js +3 -3
- package/cjs/S3516/index.js +3 -3
- package/cjs/S3516/meta.js +3 -3
- package/cjs/S3516/rule.js +112 -10
- package/cjs/S3524/config.js +3 -3
- package/cjs/S3524/generated-meta.js +5 -4
- package/cjs/S3524/index.js +3 -3
- package/cjs/S3524/meta.js +3 -3
- package/cjs/S3524/rule.js +5 -5
- package/cjs/S3525/generated-meta.js +5 -4
- package/cjs/S3525/index.js +3 -3
- package/cjs/S3525/meta.js +3 -3
- package/cjs/S3525/rule.js +9 -7
- package/cjs/S3531/generated-meta.js +5 -4
- package/cjs/S3531/index.js +3 -3
- package/cjs/S3531/meta.js +3 -3
- package/cjs/S3531/rule.js +8 -6
- package/cjs/S3533/generated-meta.js +5 -4
- package/cjs/S3533/index.js +3 -3
- package/cjs/S3533/meta.js +3 -3
- package/cjs/S3533/rule.js +11 -10
- package/cjs/S3579/generated-meta.js +3 -3
- package/cjs/S3579/index.js +3 -3
- package/cjs/S3579/meta.js +3 -3
- package/cjs/S3579/rule.js +9 -7
- package/cjs/S3616/generated-meta.js +3 -3
- package/cjs/S3616/index.js +3 -3
- package/cjs/S3616/meta.js +3 -3
- package/cjs/S3616/rule.js +9 -7
- package/cjs/S3626/generated-meta.js +3 -3
- package/cjs/S3626/index.js +3 -3
- package/cjs/S3626/meta.js +3 -3
- package/cjs/S3626/rule.js +7 -6
- package/cjs/S3686/generated-meta.js +3 -3
- package/cjs/S3686/index.js +3 -3
- package/cjs/S3686/meta.js +3 -3
- package/cjs/S3686/rule.js +10 -8
- package/cjs/S3699/generated-meta.js +3 -3
- package/cjs/S3699/index.js +3 -3
- package/cjs/S3699/meta.js +3 -3
- package/cjs/S3699/rule.js +8 -7
- package/cjs/S3735/generated-meta.js +3 -3
- package/cjs/S3735/index.js +3 -3
- package/cjs/S3735/meta.js +3 -3
- package/cjs/S3735/rule.js +11 -8
- package/cjs/S3757/generated-meta.js +3 -3
- package/cjs/S3757/index.js +3 -3
- package/cjs/S3757/meta.js +3 -3
- package/cjs/S3757/rule.js +11 -9
- package/cjs/S3758/generated-meta.js +3 -3
- package/cjs/S3758/index.js +3 -3
- package/cjs/S3758/meta.js +3 -3
- package/cjs/S3758/rule.js +12 -10
- package/cjs/S3760/generated-meta.js +3 -3
- package/cjs/S3760/index.js +3 -3
- package/cjs/S3760/meta.js +3 -3
- package/cjs/S3760/rule.js +27 -24
- package/cjs/S3776/config.js +3 -3
- package/cjs/S3776/generated-meta.js +3 -3
- package/cjs/S3776/index.js +3 -3
- package/cjs/S3776/meta.js +12 -4
- package/cjs/S3776/rule.js +39 -38
- package/cjs/S3782/generated-meta.js +3 -3
- package/cjs/S3782/index.js +3 -3
- package/cjs/S3782/meta.js +3 -3
- package/cjs/S3782/rule.js +10 -8
- package/cjs/S3785/generated-meta.js +3 -3
- package/cjs/S3785/index.js +3 -3
- package/cjs/S3785/meta.js +3 -3
- package/cjs/S3785/rule.js +12 -9
- package/cjs/S3796/generated-meta.js +3 -3
- package/cjs/S3796/index.js +3 -3
- package/cjs/S3796/meta.js +3 -3
- package/cjs/S3796/rule.js +15 -11
- package/cjs/S3798/generated-meta.js +3 -3
- package/cjs/S3798/index.js +3 -3
- package/cjs/S3798/meta.js +3 -3
- package/cjs/S3798/rule.js +4 -3
- package/cjs/S3800/generated-meta.js +3 -3
- package/cjs/S3800/index.js +3 -3
- package/cjs/S3800/meta.js +3 -3
- package/cjs/S3800/rule.js +19 -14
- package/cjs/S3801/generated-meta.js +3 -3
- package/cjs/S3801/index.js +3 -3
- package/cjs/S3801/meta.js +3 -3
- package/cjs/S3801/rule.js +18 -14
- package/cjs/S3827/generated-meta.js +3 -3
- package/cjs/S3827/index.js +3 -3
- package/cjs/S3827/meta.js +3 -3
- package/cjs/S3827/rule.js +9 -6
- package/cjs/S3923/generated-meta.js +3 -3
- package/cjs/S3923/index.js +3 -3
- package/cjs/S3923/meta.js +3 -3
- package/cjs/S3923/rule.js +12 -9
- package/cjs/S3972/generated-meta.js +3 -3
- package/cjs/S3972/index.js +3 -3
- package/cjs/S3972/meta.js +3 -3
- package/cjs/S3972/rule.js +8 -7
- package/cjs/S3973/generated-meta.js +3 -3
- package/cjs/S3973/index.js +3 -3
- package/cjs/S3973/meta.js +3 -3
- package/cjs/S3973/rule.js +10 -8
- package/cjs/S3981/generated-meta.js +3 -3
- package/cjs/S3981/index.js +3 -3
- package/cjs/S3981/meta.js +3 -3
- package/cjs/S3981/rule.js +7 -6
- package/cjs/S3984/generated-meta.js +3 -3
- package/cjs/S3984/index.js +3 -3
- package/cjs/S3984/meta.js +3 -3
- package/cjs/S3984/rule.js +7 -6
- package/cjs/S4030/generated-meta.js +3 -3
- package/cjs/S4030/index.js +3 -3
- package/cjs/S4030/meta.js +3 -3
- package/cjs/S4030/rule.js +15 -12
- package/cjs/S4036/generated-meta.js +3 -3
- package/cjs/S4036/index.js +3 -3
- package/cjs/S4036/meta.js +3 -3
- package/cjs/S4036/rule.js +11 -9
- package/cjs/S4043/generated-meta.js +3 -3
- package/cjs/S4043/index.js +3 -3
- package/cjs/S4043/meta.js +3 -3
- package/cjs/S4043/rule.js +15 -11
- package/cjs/S4139/generated-meta.js +3 -3
- package/cjs/S4139/index.js +3 -3
- package/cjs/S4139/meta.js +3 -3
- package/cjs/S4139/rule.js +10 -8
- package/cjs/S4143/generated-meta.js +3 -3
- package/cjs/S4143/index.js +3 -3
- package/cjs/S4143/meta.js +3 -3
- package/cjs/S4143/rule.js +15 -12
- package/cjs/S4144/config.js +3 -3
- package/cjs/S4144/generated-meta.js +3 -3
- package/cjs/S4144/index.js +3 -3
- package/cjs/S4144/meta.js +3 -3
- package/cjs/S4144/rule.js +15 -12
- package/cjs/S4158/generated-meta.js +3 -3
- package/cjs/S4158/index.js +3 -3
- package/cjs/S4158/meta.js +3 -3
- package/cjs/S4158/rule.js +15 -12
- package/cjs/S4165/generated-meta.js +3 -3
- package/cjs/S4165/index.js +3 -3
- package/cjs/S4165/meta.js +3 -3
- package/cjs/S4165/rule.js +17 -15
- package/cjs/S4322/generated-meta.js +3 -3
- package/cjs/S4322/index.js +3 -3
- package/cjs/S4322/meta.js +3 -3
- package/cjs/S4322/rule.js +11 -8
- package/cjs/S4323/generated-meta.js +3 -3
- package/cjs/S4323/index.js +3 -3
- package/cjs/S4323/meta.js +3 -3
- package/cjs/S4323/rule.js +7 -6
- package/cjs/S4324/generated-meta.js +3 -3
- package/cjs/S4324/index.js +3 -3
- package/cjs/S4324/meta.js +3 -3
- package/cjs/S4324/rule.js +10 -8
- package/cjs/S4328/config.js +3 -3
- package/cjs/S4328/generated-meta.js +3 -3
- package/cjs/S4328/index.js +3 -3
- package/cjs/S4328/meta.js +3 -3
- package/cjs/S4328/rule.js +5 -5
- package/cjs/S4335/generated-meta.js +3 -3
- package/cjs/S4335/index.js +3 -3
- package/cjs/S4335/meta.js +3 -3
- package/cjs/S4335/rule.js +9 -7
- package/cjs/S4423/generated-meta.js +3 -3
- package/cjs/S4423/index.js +3 -3
- package/cjs/S4423/meta.js +3 -3
- package/cjs/S4423/rule.aws.js +3 -3
- package/cjs/S4423/rule.js +7 -6
- package/cjs/S4423/rule.lib.js +11 -10
- package/cjs/S4426/generated-meta.js +3 -3
- package/cjs/S4426/index.js +3 -3
- package/cjs/S4426/meta.js +3 -3
- package/cjs/S4426/rule.js +14 -13
- package/cjs/S4502/generated-meta.js +3 -3
- package/cjs/S4502/index.js +3 -3
- package/cjs/S4502/meta.js +3 -3
- package/cjs/S4502/rule.js +19 -16
- package/cjs/S4507/generated-meta.js +3 -3
- package/cjs/S4507/index.js +3 -3
- package/cjs/S4507/meta.js +3 -3
- package/cjs/S4507/rule.js +11 -9
- package/cjs/S4524/generated-meta.js +3 -3
- package/cjs/S4524/index.js +3 -3
- package/cjs/S4524/meta.js +3 -3
- package/cjs/S4524/rule.js +5 -5
- package/cjs/S4619/generated-meta.js +3 -3
- package/cjs/S4619/index.js +3 -3
- package/cjs/S4619/meta.js +3 -3
- package/cjs/S4619/rule.js +9 -7
- package/cjs/S4621/generated-meta.js +3 -3
- package/cjs/S4621/index.js +3 -3
- package/cjs/S4621/meta.js +3 -3
- package/cjs/S4621/rule.js +8 -7
- package/cjs/S4622/config.js +3 -3
- package/cjs/S4622/generated-meta.js +3 -3
- package/cjs/S4622/index.js +3 -3
- package/cjs/S4622/meta.js +3 -3
- package/cjs/S4622/rule.js +8 -6
- package/cjs/S4623/generated-meta.js +3 -3
- package/cjs/S4623/index.js +3 -3
- package/cjs/S4623/meta.js +3 -3
- package/cjs/S4623/rule.js +11 -8
- package/cjs/S4624/generated-meta.js +5 -4
- package/cjs/S4624/index.js +3 -3
- package/cjs/S4624/meta.js +3 -3
- package/cjs/S4624/rule.js +9 -7
- package/cjs/S4634/generated-meta.js +5 -4
- package/cjs/S4634/index.js +3 -3
- package/cjs/S4634/meta.js +3 -3
- package/cjs/S4634/rule.js +7 -6
- package/cjs/S4721/generated-meta.js +3 -3
- package/cjs/S4721/index.js +3 -3
- package/cjs/S4721/meta.js +3 -3
- package/cjs/S4721/rule.js +10 -8
- package/cjs/S4782/generated-meta.js +3 -3
- package/cjs/S4782/index.js +3 -3
- package/cjs/S4782/meta.js +3 -3
- package/cjs/S4782/rule.js +10 -8
- package/cjs/S4784/generated-meta.js +3 -3
- package/cjs/S4784/index.js +3 -3
- package/cjs/S4784/meta.js +3 -3
- package/cjs/S4784/rule.js +8 -7
- package/cjs/S4787/generated-meta.js +3 -3
- package/cjs/S4787/index.js +3 -3
- package/cjs/S4787/meta.js +3 -3
- package/cjs/S4787/rule.js +12 -10
- package/cjs/S4790/generated-meta.js +3 -3
- package/cjs/S4790/index.js +3 -3
- package/cjs/S4790/meta.js +3 -3
- package/cjs/S4790/rule.js +10 -8
- package/cjs/S4798/generated-meta.js +3 -3
- package/cjs/S4798/index.js +3 -3
- package/cjs/S4798/meta.js +3 -3
- package/cjs/S4798/rule.js +5 -5
- package/cjs/S4817/generated-meta.js +3 -3
- package/cjs/S4817/index.js +3 -3
- package/cjs/S4817/meta.js +3 -3
- package/cjs/S4817/rule.js +13 -11
- package/cjs/S4818/generated-meta.js +3 -3
- package/cjs/S4818/index.js +3 -3
- package/cjs/S4818/meta.js +3 -3
- package/cjs/S4818/rule.js +7 -6
- package/cjs/S4822/generated-meta.js +5 -4
- package/cjs/S4822/index.js +3 -3
- package/cjs/S4822/meta.js +3 -3
- package/cjs/S4822/rule.js +16 -12
- package/cjs/S4823/generated-meta.js +3 -3
- package/cjs/S4823/index.js +3 -3
- package/cjs/S4823/meta.js +3 -3
- package/cjs/S4823/rule.js +7 -6
- package/cjs/S4829/generated-meta.js +3 -3
- package/cjs/S4829/index.js +3 -3
- package/cjs/S4829/meta.js +3 -3
- package/cjs/S4829/rule.js +7 -6
- package/cjs/S4830/generated-meta.js +3 -3
- package/cjs/S4830/index.js +3 -3
- package/cjs/S4830/meta.js +3 -3
- package/cjs/S4830/rule.js +14 -11
- package/cjs/S5042/generated-meta.js +7 -7
- package/cjs/S5042/index.js +3 -3
- package/cjs/S5042/meta.js +3 -3
- package/cjs/S5042/rule.js +12 -10
- package/cjs/S5122/generated-meta.js +4 -4
- package/cjs/S5122/index.js +3 -3
- package/cjs/S5122/meta.js +3 -3
- package/cjs/S5122/rule.js +43 -39
- package/cjs/S5148/generated-meta.js +4 -4
- package/cjs/S5148/index.js +3 -3
- package/cjs/S5148/meta.js +3 -3
- package/cjs/S5148/rule.js +12 -11
- package/cjs/S5247/generated-meta.js +3 -3
- package/cjs/S5247/index.js +3 -3
- package/cjs/S5247/meta.js +3 -3
- package/cjs/S5247/rule.js +25 -21
- package/cjs/S5256/generated-meta.js +3 -3
- package/cjs/S5256/index.js +3 -3
- package/cjs/S5256/meta.js +3 -3
- package/cjs/S5256/rule.js +8 -7
- package/cjs/S5257/generated-meta.js +3 -3
- package/cjs/S5257/index.js +3 -3
- package/cjs/S5257/meta.js +3 -3
- package/cjs/S5257/rule.js +7 -6
- package/cjs/S5260/generated-meta.js +3 -3
- package/cjs/S5260/index.js +3 -3
- package/cjs/S5260/meta.js +3 -3
- package/cjs/S5260/rule.js +7 -6
- package/cjs/S5264/generated-meta.js +3 -3
- package/cjs/S5264/index.js +3 -3
- package/cjs/S5264/meta.js +3 -3
- package/cjs/S5264/rule.js +7 -6
- package/cjs/S5332/generated-meta.js +3 -3
- package/cjs/S5332/index.js +3 -3
- package/cjs/S5332/meta.js +3 -3
- package/cjs/S5332/rule.aws.js +3 -3
- package/cjs/S5332/rule.js +7 -6
- package/cjs/S5332/rule.lib.js +22 -20
- package/cjs/S5443/generated-meta.js +4 -4
- package/cjs/S5443/index.js +3 -3
- package/cjs/S5443/meta.js +3 -3
- package/cjs/S5443/rule.js +5 -5
- package/cjs/S5527/generated-meta.js +3 -3
- package/cjs/S5527/index.js +3 -3
- package/cjs/S5527/meta.js +3 -3
- package/cjs/S5527/rule.js +21 -17
- package/cjs/S5542/generated-meta.js +3 -3
- package/cjs/S5542/index.js +3 -3
- package/cjs/S5542/meta.js +3 -3
- package/cjs/S5542/rule.js +9 -7
- package/cjs/S5547/generated-meta.js +3 -3
- package/cjs/S5547/index.js +3 -3
- package/cjs/S5547/meta.js +3 -3
- package/cjs/S5547/rule.js +9 -7
- package/cjs/S5604/config.js +3 -3
- package/cjs/S5604/generated-meta.js +3 -3
- package/cjs/S5604/index.js +3 -3
- package/cjs/S5604/meta.js +3 -3
- package/cjs/S5604/rule.js +18 -17
- package/cjs/S5659/generated-meta.js +3 -3
- package/cjs/S5659/index.js +3 -3
- package/cjs/S5659/meta.js +3 -3
- package/cjs/S5659/rule.js +18 -15
- package/cjs/S5689/generated-meta.js +4 -4
- package/cjs/S5689/index.js +3 -3
- package/cjs/S5689/meta.js +3 -3
- package/cjs/S5689/rule.js +14 -11
- package/cjs/S5691/generated-meta.js +3 -3
- package/cjs/S5691/index.js +3 -3
- package/cjs/S5691/meta.js +3 -3
- package/cjs/S5691/rule.js +10 -8
- package/cjs/S5693/config.js +3 -3
- package/cjs/S5693/generated-meta.js +4 -4
- package/cjs/S5693/index.js +3 -3
- package/cjs/S5693/meta.js +3 -3
- package/cjs/S5693/rule.js +17 -15
- package/cjs/S5725/generated-meta.js +3 -3
- package/cjs/S5725/index.js +3 -3
- package/cjs/S5725/meta.js +3 -3
- package/cjs/S5725/rule.js +12 -9
- package/cjs/S5728/generated-meta.js +3 -3
- package/cjs/S5728/index.js +3 -3
- package/cjs/S5728/meta.js +3 -3
- package/cjs/S5728/rule.js +10 -7
- package/cjs/S5730/generated-meta.js +3 -3
- package/cjs/S5730/index.js +3 -3
- package/cjs/S5730/meta.js +3 -3
- package/cjs/S5730/rule.js +12 -9
- package/cjs/S5732/generated-meta.js +3 -3
- package/cjs/S5732/index.js +3 -3
- package/cjs/S5732/meta.js +3 -3
- package/cjs/S5732/rule.js +11 -8
- package/cjs/S5734/generated-meta.js +3 -3
- package/cjs/S5734/index.js +3 -3
- package/cjs/S5734/meta.js +3 -3
- package/cjs/S5734/rule.js +10 -7
- package/cjs/S5736/generated-meta.js +3 -3
- package/cjs/S5736/index.js +3 -3
- package/cjs/S5736/meta.js +3 -3
- package/cjs/S5736/rule.js +11 -8
- package/cjs/S5739/generated-meta.js +3 -3
- package/cjs/S5739/index.js +3 -3
- package/cjs/S5739/meta.js +3 -3
- package/cjs/S5739/rule.js +14 -11
- package/cjs/S5742/generated-meta.js +3 -3
- package/cjs/S5742/index.js +3 -3
- package/cjs/S5742/meta.js +3 -3
- package/cjs/S5742/rule.js +10 -7
- package/cjs/S5743/generated-meta.js +3 -3
- package/cjs/S5743/index.js +3 -3
- package/cjs/S5743/meta.js +3 -3
- package/cjs/S5743/rule.js +11 -9
- package/cjs/S5757/generated-meta.js +3 -3
- package/cjs/S5757/index.js +3 -3
- package/cjs/S5757/meta.js +3 -3
- package/cjs/S5757/rule.js +16 -13
- package/cjs/S5759/generated-meta.js +3 -3
- package/cjs/S5759/index.js +3 -3
- package/cjs/S5759/meta.js +3 -3
- package/cjs/S5759/rule.js +13 -10
- package/cjs/S5842/generated-meta.js +3 -3
- package/cjs/S5842/index.js +3 -3
- package/cjs/S5842/meta.js +3 -3
- package/cjs/S5842/rule.js +5 -5
- package/cjs/S5843/config.js +3 -3
- package/cjs/S5843/generated-meta.js +3 -3
- package/cjs/S5843/index.js +3 -3
- package/cjs/S5843/meta.js +3 -3
- package/cjs/S5843/rule.js +25 -22
- package/cjs/S5850/generated-meta.js +3 -3
- package/cjs/S5850/index.js +3 -3
- package/cjs/S5850/meta.js +3 -3
- package/cjs/S5850/rule.js +7 -6
- package/cjs/S5852/generated-meta.js +3 -3
- package/cjs/S5852/index.js +3 -3
- package/cjs/S5852/meta.js +3 -3
- package/cjs/S5852/rule.js +5 -5
- package/cjs/S5856/generated-meta.js +3 -3
- package/cjs/S5856/index.js +3 -3
- package/cjs/S5856/meta.js +3 -3
- package/cjs/S5856/rule.js +13 -10
- package/cjs/S5860/generated-meta.js +3 -3
- package/cjs/S5860/index.js +3 -3
- package/cjs/S5860/meta.js +3 -3
- package/cjs/S5860/rule.js +33 -29
- package/cjs/S5863/generated-meta.js +3 -3
- package/cjs/S5863/index.js +3 -3
- package/cjs/S5863/meta.js +3 -3
- package/cjs/S5863/rule.js +18 -14
- package/cjs/S5867/generated-meta.js +3 -3
- package/cjs/S5867/index.js +3 -3
- package/cjs/S5867/meta.js +3 -3
- package/cjs/S5867/rule.js +11 -10
- package/cjs/S5868/generated-meta.js +3 -3
- package/cjs/S5868/index.js +3 -3
- package/cjs/S5868/meta.js +3 -3
- package/cjs/S5868/rule.js +10 -8
- package/cjs/S5869/generated-meta.js +3 -3
- package/cjs/S5869/index.js +3 -3
- package/cjs/S5869/meta.js +3 -3
- package/cjs/S5869/rule.js +9 -8
- package/cjs/S5876/generated-meta.js +3 -3
- package/cjs/S5876/index.js +3 -3
- package/cjs/S5876/meta.js +3 -3
- package/cjs/S5876/rule.js +15 -11
- package/cjs/S5958/generated-meta.js +3 -3
- package/cjs/S5958/index.js +3 -3
- package/cjs/S5958/meta.js +3 -3
- package/cjs/S5958/rule.js +15 -12
- package/cjs/S5973/generated-meta.js +3 -3
- package/cjs/S5973/index.js +3 -3
- package/cjs/S5973/meta.js +3 -3
- package/cjs/S5973/rule.js +13 -10
- package/cjs/S6019/generated-meta.js +3 -3
- package/cjs/S6019/index.js +3 -3
- package/cjs/S6019/meta.js +3 -3
- package/cjs/S6019/rule.js +7 -6
- package/cjs/S6035/generated-meta.js +3 -3
- package/cjs/S6035/index.js +3 -3
- package/cjs/S6035/meta.js +3 -3
- package/cjs/S6035/rule.js +5 -5
- package/cjs/S6079/generated-meta.js +3 -3
- package/cjs/S6079/index.js +3 -3
- package/cjs/S6079/meta.js +3 -3
- package/cjs/S6079/rule.js +12 -9
- package/cjs/S6080/generated-meta.js +3 -3
- package/cjs/S6080/index.js +3 -3
- package/cjs/S6080/meta.js +3 -3
- package/cjs/S6080/rule.js +16 -13
- package/cjs/S6092/generated-meta.js +3 -3
- package/cjs/S6092/index.js +3 -3
- package/cjs/S6092/meta.js +3 -3
- package/cjs/S6092/rule.js +12 -10
- package/cjs/S6245/generated-meta.js +3 -3
- package/cjs/S6245/index.js +3 -3
- package/cjs/S6245/meta.js +3 -3
- package/cjs/S6245/rule.js +17 -12
- package/cjs/S6249/generated-meta.js +3 -3
- package/cjs/S6249/index.js +3 -3
- package/cjs/S6249/meta.js +3 -3
- package/cjs/S6249/rule.js +10 -8
- package/cjs/S6252/generated-meta.js +3 -3
- package/cjs/S6252/index.js +3 -3
- package/cjs/S6252/meta.js +3 -3
- package/cjs/S6252/rule.js +15 -11
- package/cjs/S6265/generated-meta.js +4 -4
- package/cjs/S6265/index.js +3 -3
- package/cjs/S6265/meta.js +3 -3
- package/cjs/S6265/rule.js +30 -23
- package/cjs/S6268/generated-meta.js +3 -3
- package/cjs/S6268/index.js +3 -3
- package/cjs/S6268/meta.js +3 -3
- package/cjs/S6268/rule.js +8 -7
- package/cjs/S6270/generated-meta.js +4 -4
- package/cjs/S6270/index.js +3 -3
- package/cjs/S6270/meta.js +3 -3
- package/cjs/S6270/rule.js +15 -12
- package/cjs/S6275/generated-meta.js +4 -4
- package/cjs/S6275/index.js +3 -3
- package/cjs/S6275/meta.js +3 -3
- package/cjs/S6275/rule.js +5 -5
- package/cjs/S6281/generated-meta.js +3 -3
- package/cjs/S6281/index.js +3 -3
- package/cjs/S6281/meta.js +3 -3
- package/cjs/S6281/rule.js +25 -20
- package/cjs/S6299/generated-meta.js +3 -3
- package/cjs/S6299/index.js +3 -3
- package/cjs/S6299/meta.js +3 -3
- package/cjs/S6299/rule.js +5 -5
- package/cjs/S6302/generated-meta.js +4 -4
- package/cjs/S6302/index.js +3 -3
- package/cjs/S6302/meta.js +3 -3
- package/cjs/S6302/rule.js +9 -8
- package/cjs/S6303/generated-meta.js +4 -4
- package/cjs/S6303/index.js +3 -3
- package/cjs/S6303/meta.js +3 -3
- package/cjs/S6303/rule.js +15 -13
- package/cjs/S6304/generated-meta.js +3 -3
- package/cjs/S6304/index.js +3 -3
- package/cjs/S6304/meta.js +3 -3
- package/cjs/S6304/rule.js +9 -8
- package/cjs/S6308/generated-meta.js +4 -4
- package/cjs/S6308/index.js +3 -3
- package/cjs/S6308/meta.js +3 -3
- package/cjs/S6308/rule.js +10 -8
- package/cjs/S6317/generated-meta.js +3 -3
- package/cjs/S6317/index.js +3 -3
- package/cjs/S6317/meta.js +3 -3
- package/cjs/S6317/rule.js +8 -7
- package/cjs/S6319/generated-meta.js +3 -3
- package/cjs/S6319/index.js +3 -3
- package/cjs/S6319/meta.js +3 -3
- package/cjs/S6319/rule.js +5 -5
- package/cjs/S6321/generated-meta.js +3 -3
- package/cjs/S6321/index.js +3 -3
- package/cjs/S6321/meta.js +3 -3
- package/cjs/S6321/rule.js +28 -26
- package/cjs/S6323/generated-meta.js +3 -3
- package/cjs/S6323/index.js +3 -3
- package/cjs/S6323/meta.js +3 -3
- package/cjs/S6323/rule.js +7 -6
- package/cjs/S6324/generated-meta.js +3 -3
- package/cjs/S6324/index.js +3 -3
- package/cjs/S6324/meta.js +3 -3
- package/cjs/S6324/rule.js +5 -5
- package/cjs/S6326/generated-meta.js +3 -3
- package/cjs/S6326/index.js +3 -3
- package/cjs/S6326/meta.js +3 -3
- package/cjs/S6326/rule.js +5 -5
- package/cjs/S6327/generated-meta.js +3 -3
- package/cjs/S6327/index.js +3 -3
- package/cjs/S6327/meta.js +3 -3
- package/cjs/S6327/rule.js +5 -5
- package/cjs/S6328/generated-meta.js +3 -3
- package/cjs/S6328/index.js +3 -3
- package/cjs/S6328/meta.js +3 -3
- package/cjs/S6328/rule.js +7 -6
- package/cjs/S6329/generated-meta.js +3 -3
- package/cjs/S6329/index.js +3 -3
- package/cjs/S6329/meta.js +3 -3
- package/cjs/S6329/rule.js +10 -8
- package/cjs/S6330/generated-meta.js +4 -4
- package/cjs/S6330/index.js +3 -3
- package/cjs/S6330/meta.js +3 -3
- package/cjs/S6330/rule.js +5 -5
- package/cjs/S6331/generated-meta.js +3 -3
- package/cjs/S6331/index.js +3 -3
- package/cjs/S6331/meta.js +3 -3
- package/cjs/S6331/rule.js +3 -3
- package/cjs/S6332/generated-meta.js +3 -3
- package/cjs/S6332/index.js +3 -3
- package/cjs/S6332/meta.js +3 -3
- package/cjs/S6332/rule.js +5 -5
- package/cjs/S6333/generated-meta.js +3 -3
- package/cjs/S6333/index.js +3 -3
- package/cjs/S6333/meta.js +3 -3
- package/cjs/S6333/rule.js +11 -9
- package/cjs/S6351/generated-meta.js +3 -3
- package/cjs/S6351/index.js +3 -3
- package/cjs/S6351/meta.js +3 -3
- package/cjs/S6351/rule.js +25 -22
- package/cjs/S6353/generated-meta.js +3 -3
- package/cjs/S6353/index.js +3 -3
- package/cjs/S6353/meta.js +3 -3
- package/cjs/S6353/rule.js +5 -5
- package/cjs/S6397/generated-meta.js +3 -3
- package/cjs/S6397/index.js +3 -3
- package/cjs/S6397/meta.js +3 -3
- package/cjs/S6397/rule.js +5 -5
- package/cjs/S6418/config.js +3 -3
- package/cjs/S6418/generated-meta.js +3 -3
- package/cjs/S6418/index.js +3 -3
- package/cjs/S6418/meta.js +3 -3
- package/cjs/S6418/rule.js +12 -27
- package/cjs/S6426/generated-meta.js +3 -3
- package/cjs/S6426/index.js +3 -3
- package/cjs/S6426/meta.js +3 -3
- package/cjs/S6426/rule.js +8 -7
- package/cjs/S6437/generated-meta.js +3 -3
- package/cjs/S6437/index.js +3 -3
- package/cjs/S6437/meta.js +3 -3
- package/cjs/S6437/rule.js +18 -10
- package/cjs/S6439/generated-meta.js +4 -4
- package/cjs/S6439/index.js +3 -3
- package/cjs/S6439/meta.js +3 -3
- package/cjs/S6439/rule.js +12 -10
- package/cjs/S6442/generated-meta.js +4 -4
- package/cjs/S6442/index.js +3 -3
- package/cjs/S6442/meta.js +3 -3
- package/cjs/S6442/rule.js +14 -11
- package/cjs/S6443/generated-meta.js +4 -4
- package/cjs/S6443/index.js +3 -3
- package/cjs/S6443/meta.js +3 -3
- package/cjs/S6443/rule.js +12 -10
- package/cjs/S6486/generated-meta.js +3 -3
- package/cjs/S6486/index.js +3 -3
- package/cjs/S6486/meta.js +3 -3
- package/cjs/S6486/rule.js +9 -8
- package/cjs/S6564/generated-meta.js +3 -3
- package/cjs/S6564/index.js +3 -3
- package/cjs/S6564/meta.js +3 -3
- package/cjs/S6564/rule.js +7 -6
- package/cjs/S6594/generated-meta.js +3 -3
- package/cjs/S6594/index.js +3 -3
- package/cjs/S6594/meta.js +3 -3
- package/cjs/S6594/rule.js +15 -11
- package/cjs/S6627/generated-meta.js +3 -3
- package/cjs/S6627/index.js +3 -3
- package/cjs/S6627/meta.js +3 -3
- package/cjs/S6627/rule.js +9 -7
- package/cjs/S6759/generated-meta.js +3 -3
- package/cjs/S6759/index.js +3 -3
- package/cjs/S6759/meta.js +3 -3
- package/cjs/S6759/rule.js +13 -9
- package/cjs/S6958/generated-meta.js +3 -3
- package/cjs/S6958/index.js +3 -3
- package/cjs/S6958/meta.js +3 -3
- package/cjs/S6958/rule.js +2 -2
- package/cjs/S6959/generated-meta.js +3 -3
- package/cjs/S6959/index.js +3 -3
- package/cjs/S6959/meta.js +3 -3
- package/cjs/S6959/rule.js +12 -9
- package/cjs/S7059/generated-meta.js +5 -4
- package/cjs/S7059/index.js +3 -3
- package/cjs/S7059/meta.js +3 -3
- package/cjs/S7059/rule.js +11 -8
- package/cjs/S7639/generated-meta.js +3 -3
- package/cjs/S7639/index.js +3 -3
- package/cjs/S7639/meta.js +3 -3
- package/cjs/S7639/rule.js +8 -7
- package/cjs/S7790/generated-meta.js +3 -3
- package/cjs/S7790/index.js +3 -3
- package/cjs/S7790/meta.js +3 -3
- package/cjs/S7790/rule.js +10 -8
- package/cjs/S8441/generated-meta.js +3 -3
- package/cjs/S8441/index.js +3 -3
- package/cjs/S8441/meta.js +3 -3
- package/cjs/S8441/rule.js +16 -12
- package/cjs/{helpers/aws/index.js → S8479/generated-meta.js} +35 -19
- package/cjs/S8479/index.js +21 -0
- package/cjs/S8479/meta.js +22 -0
- package/cjs/S8479/rule.js +239 -0
- package/cjs/S881/generated-meta.js +3 -3
- package/cjs/S881/index.js +3 -3
- package/cjs/S881/meta.js +3 -3
- package/cjs/S881/rule.js +5 -5
- package/cjs/S888/generated-meta.js +3 -3
- package/cjs/S888/index.js +3 -3
- package/cjs/S888/meta.js +3 -3
- package/cjs/S888/rule.js +7 -6
- package/cjs/S930/generated-meta.js +3 -3
- package/cjs/S930/index.js +3 -3
- package/cjs/S930/meta.js +3 -3
- package/cjs/S930/rule.js +17 -15
- package/cjs/helpers/accessibility.js +3 -3
- package/cjs/helpers/ast.js +12 -9
- package/cjs/helpers/aws/s3.js +9 -6
- package/cjs/helpers/cache.js +3 -3
- package/cjs/helpers/chai.js +41 -43
- package/cjs/helpers/collection.js +3 -3
- package/cjs/helpers/configs.js +2 -2
- package/cjs/helpers/cookie-flag-check.js +19 -17
- package/cjs/helpers/entropy.js +33 -0
- package/cjs/helpers/express.js +127 -128
- package/cjs/helpers/files.js +4 -4
- package/cjs/helpers/find-up/closest.js +3 -3
- package/cjs/helpers/internal-metrics.js +27 -0
- package/cjs/helpers/mocha.js +50 -54
- package/cjs/helpers/module-ts.js +8 -3
- package/cjs/helpers/package-jsons/closest.js +3 -3
- package/cjs/helpers/package-jsons/dependencies.js +135 -1
- package/cjs/helpers/package-jsons/index.js +1 -0
- package/cjs/helpers/package-jsons/parse.js +3 -3
- package/cjs/helpers/recognizers/Detector.js +3 -3
- package/cjs/helpers/recognizers/detectors/CamelCaseDetector.js +3 -3
- package/cjs/helpers/recognizers/detectors/ContainsDetector.js +3 -3
- package/cjs/helpers/recognizers/detectors/EndWithDetector.js +3 -3
- package/cjs/helpers/recognizers/detectors/KeywordsDetector.js +3 -3
- package/cjs/helpers/regex/ast.js +7 -6
- package/cjs/helpers/regex/extract.js +11 -11
- package/cjs/helpers/regex/group.js +2 -2
- package/cjs/helpers/regex/location.js +2 -2
- package/cjs/helpers/regex/range.js +5 -4
- package/cjs/helpers/regex/rule-template.js +4 -3
- package/cjs/helpers/sinon.js +33 -36
- package/cjs/helpers/supertest.js +34 -37
- package/cjs/helpers/vitest.js +29 -32
- package/cjs/plugin-rules.js +5 -3
- package/docs/aws-ec2-unencrypted-ebs-volume.md +1 -1
- package/docs/aws-iam-all-privileges.md +1 -1
- package/docs/aws-iam-public-access.md +1 -1
- package/docs/aws-opensearchservice-domain.md +1 -1
- package/docs/aws-rds-unencrypted-databases.md +1 -1
- package/docs/aws-s3-bucket-granted-access.md +1 -1
- package/docs/aws-sqs-unencrypted-queue.md +1 -1
- package/docs/class-name.md +3 -3
- package/docs/content-length.md +1 -1
- package/docs/cors.md +1 -1
- package/docs/dompurify-unsafe-config.md +7 -0
- package/docs/file-permissions.md +1 -1
- package/docs/insecure-cookie.md +1 -1
- package/docs/link-with-target-blank.md +1 -1
- package/docs/no-hardcoded-ip.md +1 -1
- package/docs/no-unsafe-unzip.md +4 -2
- package/docs/publicly-writable-directories.md +1 -1
- package/docs/x-powered-by.md +1 -1
- package/package.json +39 -1
- package/types/S101/config.d.ts +1 -1
- package/types/S1128/generated-meta.d.ts +1 -0
- package/types/S1313/generated-meta.d.ts +1 -1
- package/types/S134/config.d.ts +1 -1
- package/types/S2208/generated-meta.d.ts +1 -0
- package/types/S3317/generated-meta.d.ts +1 -0
- package/types/S3499/generated-meta.d.ts +1 -0
- package/types/S3500/generated-meta.d.ts +1 -0
- package/types/S3513/generated-meta.d.ts +1 -0
- package/types/S3514/generated-meta.d.ts +1 -0
- package/types/S3524/generated-meta.d.ts +1 -0
- package/types/S3525/generated-meta.d.ts +1 -0
- package/types/S3531/generated-meta.d.ts +1 -0
- package/types/S3533/generated-meta.d.ts +1 -0
- package/types/S3776/meta.d.ts +2 -0
- package/types/S4624/generated-meta.d.ts +1 -0
- package/types/S4634/generated-meta.d.ts +1 -0
- package/types/S4822/generated-meta.d.ts +1 -0
- package/types/S5042/generated-meta.d.ts +2 -2
- package/types/S6439/generated-meta.d.ts +1 -1
- package/types/S6442/generated-meta.d.ts +1 -1
- package/types/S6443/generated-meta.d.ts +1 -1
- package/types/S7059/generated-meta.d.ts +1 -0
- package/types/S8479/generated-meta.d.ts +17 -0
- package/types/S8479/index.d.ts +1 -0
- package/types/S8479/meta.d.ts +2 -0
- package/types/S8479/rule.d.ts +2 -0
- package/types/helpers/ancestor.d.ts +1 -1
- package/types/helpers/aws/s3.d.ts +1 -1
- package/types/helpers/chai.d.ts +3 -5
- package/types/helpers/entropy.d.ts +1 -0
- package/types/helpers/express.d.ts +38 -43
- package/types/helpers/files.d.ts +6 -21
- package/types/helpers/internal-metrics.d.ts +5 -0
- package/types/helpers/mocha.d.ts +19 -21
- package/types/helpers/package-jsons/dependencies.d.ts +36 -0
- package/types/helpers/regex/ast.d.ts +1 -1
- package/types/helpers/regex/rule-template.d.ts +1 -1
- package/types/helpers/sinon.d.ts +3 -5
- package/types/helpers/supertest.d.ts +3 -5
- package/types/helpers/type.d.ts +1 -1
- package/types/helpers/vitest.d.ts +3 -5
- package/types/plugin-rules.d.ts +1 -0
- package/cjs/helpers/decorators/index.js +0 -34
- package/cjs/helpers/decorators/interceptor.js +0 -88
- package/cjs/helpers/index.js +0 -60
- package/cjs/helpers/recognizers/index.js +0 -37
- package/cjs/helpers/rule-detect-react.js +0 -29
- package/cjs/helpers/validate-version.js +0 -94
- package/types/helpers/aws/index.d.ts +0 -3
- package/types/helpers/decorators/index.d.ts +0 -2
- package/types/helpers/decorators/interceptor.d.ts +0 -16
- package/types/helpers/index.d.ts +0 -28
- package/types/helpers/recognizers/index.d.ts +0 -2
- package/types/helpers/rule-detect-react.d.ts +0 -2
- package/types/helpers/validate-version.d.ts +0 -13
package/cjs/S1301/rule.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/*
|
|
3
3
|
* SonarQube JavaScript Plugin
|
|
4
|
-
* Copyright (C)
|
|
4
|
+
* Copyright (C) SonarSource Sàrl
|
|
5
5
|
* mailto:info AT sonarsource DOT com
|
|
6
6
|
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
7
|
+
* You can redistribute and/or modify this program under the terms of
|
|
8
|
+
* the Sonar Source-Available License Version 1, as published by SonarSource Sàrl.
|
|
9
9
|
*
|
|
10
10
|
* This program is distributed in the hope that it will be useful,
|
|
11
11
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
@@ -49,22 +49,35 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
49
49
|
return result;
|
|
50
50
|
};
|
|
51
51
|
})();
|
|
52
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
53
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
54
|
+
};
|
|
52
55
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
53
56
|
exports.rule = void 0;
|
|
54
|
-
const
|
|
57
|
+
const typescript_1 = __importDefault(require("typescript"));
|
|
58
|
+
const generate_meta_js_1 = require("../helpers/generate-meta.js");
|
|
59
|
+
const parser_services_js_1 = require("../helpers/parser-services.js");
|
|
60
|
+
const type_js_1 = require("../helpers/type.js");
|
|
55
61
|
const meta = __importStar(require("./generated-meta.js"));
|
|
56
62
|
exports.rule = {
|
|
57
|
-
meta: (0,
|
|
63
|
+
meta: (0, generate_meta_js_1.generateMeta)(meta, {
|
|
58
64
|
messages: {
|
|
59
65
|
replaceSwitch: 'Replace this "switch" statement by "if" statements to increase readability.',
|
|
60
66
|
},
|
|
61
67
|
}),
|
|
62
68
|
create(context) {
|
|
69
|
+
const services = context.sourceCode.parserServices;
|
|
63
70
|
return {
|
|
64
71
|
SwitchStatement(node) {
|
|
65
72
|
const { cases } = node;
|
|
66
73
|
const hasDefault = cases.some(x => !x.test);
|
|
67
74
|
if (cases.length < 2 || (cases.length === 2 && hasDefault)) {
|
|
75
|
+
if (hasDefault &&
|
|
76
|
+
// Safe: @typescript-eslint/parser provides TSESTree nodes at runtime; ESLint types
|
|
77
|
+
// visitors with estree.SwitchStatement, but the actual object is TSESTree.SwitchStatement.
|
|
78
|
+
isExhaustivenessCheck(node, services)) {
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
68
81
|
const firstToken = context.sourceCode.getFirstToken(node);
|
|
69
82
|
if (firstToken) {
|
|
70
83
|
context.report({
|
|
@@ -77,3 +90,128 @@ exports.rule = {
|
|
|
77
90
|
};
|
|
78
91
|
},
|
|
79
92
|
};
|
|
93
|
+
/**
|
|
94
|
+
* Returns true if the default case contains a TypeScript exhaustiveness pattern:
|
|
95
|
+
* - A variable declaration typed as `never` where the init is the switch discriminant
|
|
96
|
+
* (e.g., `const _exhaustiveCheck: never = x` where `x` is the discriminant)
|
|
97
|
+
* - A call expression whose argument is the switch discriminant narrowed to `never` by TypeScript
|
|
98
|
+
* (e.g., `assertNever(x)` where `x` is the discriminant narrowed to `never`)
|
|
99
|
+
*
|
|
100
|
+
* Both checks require the `never`-typed value to be the switch discriminant itself, not an
|
|
101
|
+
* unrelated `never`-returning expression (e.g., `fail()`).
|
|
102
|
+
*/
|
|
103
|
+
function isExhaustivenessCheck(node, services) {
|
|
104
|
+
const defaultCase = node.cases.find(c => c.test === null);
|
|
105
|
+
if (!defaultCase) {
|
|
106
|
+
return false;
|
|
107
|
+
}
|
|
108
|
+
const discriminant = node.discriminant;
|
|
109
|
+
for (const stmt of defaultCase.consequent) {
|
|
110
|
+
if (hasNeverTypeAnnotation(stmt, discriminant)) {
|
|
111
|
+
return true;
|
|
112
|
+
}
|
|
113
|
+
if ((0, parser_services_js_1.isRequiredParserServices)(services) && hasNeverTypedCallArg(stmt, discriminant, services)) {
|
|
114
|
+
return true;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
return false;
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Checks if a statement is `const _: never = <discriminant>`.
|
|
121
|
+
* The init must syntactically match the switch discriminant to rule out patterns like
|
|
122
|
+
* `const _: never = fail()` where `fail()` returns `never` but is unrelated to the discriminant.
|
|
123
|
+
*/
|
|
124
|
+
function hasNeverTypeAnnotation(stmt, discriminant) {
|
|
125
|
+
if (stmt.type !== 'VariableDeclaration') {
|
|
126
|
+
return false;
|
|
127
|
+
}
|
|
128
|
+
return stmt.declarations.some(d => {
|
|
129
|
+
if (d.type !== 'VariableDeclarator' || d.id.type !== 'Identifier') {
|
|
130
|
+
return false;
|
|
131
|
+
}
|
|
132
|
+
if (d.id.typeAnnotation?.typeAnnotation.type !== 'TSNeverKeyword') {
|
|
133
|
+
return false;
|
|
134
|
+
}
|
|
135
|
+
// The init must be the switch discriminant itself, not any other never-typed expression.
|
|
136
|
+
return d.init != null && isSameExpression(d.init, discriminant);
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* Checks if a statement contains an exhaustiveness-sentinel call with the switch discriminant as argument.
|
|
141
|
+
* All three conditions must hold:
|
|
142
|
+
* - The call itself must return `never`, identifying it as a sentinel (e.g., `assertNever`).
|
|
143
|
+
* Plain helpers like `logValue(status)` or `console.log(status)` accept a `never`-typed
|
|
144
|
+
* argument only because `never` is assignable to every type — they are not sentinels.
|
|
145
|
+
* - One argument must syntactically match the discriminant, narrowed to `never` by TypeScript's
|
|
146
|
+
* control flow, ruling out patterns like `assertNever(fail())` where `fail()` returns `never`
|
|
147
|
+
* but is not the discriminant.
|
|
148
|
+
* - The parameter type at the matching argument position must itself be `never`. This rules out
|
|
149
|
+
* helpers like `failWith(x: unknown): never` where the parameter accepts any value — only an
|
|
150
|
+
* explicit `(x: never): never` signature proves the call is an exhaustiveness sentinel.
|
|
151
|
+
*/
|
|
152
|
+
function hasNeverTypedCallArg(stmt, discriminant, services) {
|
|
153
|
+
let callExpr = null;
|
|
154
|
+
if (stmt.type === 'ExpressionStatement' && stmt.expression.type === 'CallExpression') {
|
|
155
|
+
callExpr = stmt.expression;
|
|
156
|
+
}
|
|
157
|
+
else if (stmt.type === 'ReturnStatement' && stmt.argument?.type === 'CallExpression') {
|
|
158
|
+
callExpr = stmt.argument;
|
|
159
|
+
}
|
|
160
|
+
else if (stmt.type === 'ThrowStatement' && stmt.argument?.type === 'CallExpression') {
|
|
161
|
+
callExpr = stmt.argument;
|
|
162
|
+
}
|
|
163
|
+
if (!callExpr) {
|
|
164
|
+
return false;
|
|
165
|
+
}
|
|
166
|
+
// The call itself must return `never` to qualify as an exhaustiveness sentinel.
|
|
167
|
+
// Safe: TSESTree and estree describe the same runtime AST objects; the double cast is required
|
|
168
|
+
// because TypeScript cannot directly cast between the two library declarations.
|
|
169
|
+
const callType = (0, type_js_1.getTypeFromTreeNode)(callExpr, services);
|
|
170
|
+
if ((callType.flags & typescript_1.default.TypeFlags.Never) === 0) {
|
|
171
|
+
return false;
|
|
172
|
+
}
|
|
173
|
+
const checker = services.program.getTypeChecker();
|
|
174
|
+
const tsCallNode = services.esTreeNodeToTSNodeMap.get(callExpr);
|
|
175
|
+
const signature = checker.getResolvedSignature(tsCallNode);
|
|
176
|
+
return callExpr.arguments.some((arg, index) => {
|
|
177
|
+
// The argument must be the switch discriminant, narrowed to `never` by TypeScript's control flow.
|
|
178
|
+
if (!isSameExpression(arg, discriminant)) {
|
|
179
|
+
return false;
|
|
180
|
+
}
|
|
181
|
+
const argType = (0, type_js_1.getTypeFromTreeNode)(arg, services);
|
|
182
|
+
if ((argType.flags & typescript_1.default.TypeFlags.Never) === 0) {
|
|
183
|
+
return false;
|
|
184
|
+
}
|
|
185
|
+
// The declared parameter type must be `never`. This distinguishes an explicit exhaustiveness
|
|
186
|
+
// sentinel like `assertNever(x: never)` from a helper that merely accepts `never` because
|
|
187
|
+
// `never` is assignable to every type (e.g., `failWith(x: unknown)`).
|
|
188
|
+
if (!signature) {
|
|
189
|
+
return false;
|
|
190
|
+
}
|
|
191
|
+
const params = signature.getParameters();
|
|
192
|
+
const param = params[index];
|
|
193
|
+
if (!param) {
|
|
194
|
+
return false;
|
|
195
|
+
}
|
|
196
|
+
const paramType = checker.getTypeOfSymbol(param);
|
|
197
|
+
return (paramType.flags & typescript_1.default.TypeFlags.Never) !== 0;
|
|
198
|
+
});
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* Returns true if two expressions refer to the same simple identifier or member expression.
|
|
202
|
+
* Handles `x` (Identifier) and `obj.prop` (non-computed MemberExpression).
|
|
203
|
+
*/
|
|
204
|
+
function isSameExpression(a, b) {
|
|
205
|
+
if (a.type === 'Identifier' && b.type === 'Identifier') {
|
|
206
|
+
return a.name === b.name;
|
|
207
|
+
}
|
|
208
|
+
if (a.type === 'MemberExpression' && b.type === 'MemberExpression') {
|
|
209
|
+
return (!a.computed &&
|
|
210
|
+
!b.computed &&
|
|
211
|
+
a.property.type === 'Identifier' &&
|
|
212
|
+
b.property.type === 'Identifier' &&
|
|
213
|
+
a.property.name === b.property.name &&
|
|
214
|
+
isSameExpression(a.object, b.object));
|
|
215
|
+
}
|
|
216
|
+
return false;
|
|
217
|
+
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/*
|
|
3
3
|
* SonarQube JavaScript Plugin
|
|
4
|
-
* Copyright (C)
|
|
4
|
+
* Copyright (C) SonarSource Sàrl
|
|
5
5
|
* mailto:info AT sonarsource DOT com
|
|
6
6
|
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
7
|
+
* You can redistribute and/or modify this program under the terms of
|
|
8
|
+
* the Sonar Source-Available License Version 1, as published by SonarSource Sàrl.
|
|
9
9
|
*
|
|
10
10
|
* This program is distributed in the hope that it will be useful,
|
|
11
11
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
@@ -34,9 +34,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
34
34
|
exports.requiredDependency = exports.languages = exports.scope = exports.sonarKey = exports.meta = void 0;
|
|
35
35
|
__exportStar(require("./meta.js"), exports);
|
|
36
36
|
exports.meta = {
|
|
37
|
-
type: '
|
|
37
|
+
type: 'suggestion',
|
|
38
38
|
docs: {
|
|
39
|
-
description: '
|
|
39
|
+
description: 'IP addresses should not be hardcoded',
|
|
40
40
|
recommended: true,
|
|
41
41
|
url: 'https://sonarsource.github.io/rspec/#/rspec/S1313/javascript',
|
|
42
42
|
requiresTypeChecking: false,
|
package/cjs/S1313/index.js
CHANGED
|
@@ -3,11 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.rule = void 0;
|
|
4
4
|
/*
|
|
5
5
|
* SonarQube JavaScript Plugin
|
|
6
|
-
* Copyright (C)
|
|
6
|
+
* Copyright (C) SonarSource Sàrl
|
|
7
7
|
* mailto:info AT sonarsource DOT com
|
|
8
8
|
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
9
|
+
* You can redistribute and/or modify this program under the terms of
|
|
10
|
+
* the Sonar Source-Available License Version 1, as published by SonarSource Sàrl.
|
|
11
11
|
*
|
|
12
12
|
* This program is distributed in the hope that it will be useful,
|
|
13
13
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
package/cjs/S1313/meta.js
CHANGED
|
@@ -3,11 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.eslintId = exports.implementation = void 0;
|
|
4
4
|
/*
|
|
5
5
|
* SonarQube JavaScript Plugin
|
|
6
|
-
* Copyright (C)
|
|
6
|
+
* Copyright (C) SonarSource Sàrl
|
|
7
7
|
* mailto:info AT sonarsource DOT com
|
|
8
8
|
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
9
|
+
* You can redistribute and/or modify this program under the terms of
|
|
10
|
+
* the Sonar Source-Available License Version 1, as published by SonarSource Sàrl.
|
|
11
11
|
*
|
|
12
12
|
* This program is distributed in the hope that it will be useful,
|
|
13
13
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
package/cjs/S1313/rule.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/*
|
|
3
3
|
* SonarQube JavaScript Plugin
|
|
4
|
-
* Copyright (C)
|
|
4
|
+
* Copyright (C) SonarSource Sàrl
|
|
5
5
|
* mailto:info AT sonarsource DOT com
|
|
6
6
|
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
7
|
+
* You can redistribute and/or modify this program under the terms of
|
|
8
|
+
* the Sonar Source-Available License Version 1, as published by SonarSource Sàrl.
|
|
9
9
|
*
|
|
10
10
|
* This program is distributed in the hope that it will be useful,
|
|
11
11
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
@@ -52,7 +52,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
52
52
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
53
53
|
exports.rule = void 0;
|
|
54
54
|
const node_net_1 = require("node:net");
|
|
55
|
-
const
|
|
55
|
+
const generate_meta_js_1 = require("../helpers/generate-meta.js");
|
|
56
56
|
const meta = __importStar(require("./generated-meta.js"));
|
|
57
57
|
const netMaskRegex = /(^[^/]+)\/\d{1,3}$/;
|
|
58
58
|
const acceptedIpAddresses = new Set([
|
|
@@ -79,7 +79,7 @@ const acceptedIpV4Starts = [
|
|
|
79
79
|
'203.0.113.',
|
|
80
80
|
];
|
|
81
81
|
exports.rule = {
|
|
82
|
-
meta: (0,
|
|
82
|
+
meta: (0, generate_meta_js_1.generateMeta)(meta, {
|
|
83
83
|
messages: {
|
|
84
84
|
checkIP: 'Make sure using a hardcoded IP address {{ip}} is safe here.',
|
|
85
85
|
},
|
package/cjs/S134/config.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/*
|
|
3
3
|
* SonarQube JavaScript Plugin
|
|
4
|
-
* Copyright (C)
|
|
4
|
+
* Copyright (C) SonarSource Sàrl
|
|
5
5
|
* mailto:info AT sonarsource DOT com
|
|
6
6
|
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
7
|
+
* You can redistribute and/or modify this program under the terms of
|
|
8
|
+
* the Sonar Source-Available License Version 1, as published by SonarSource Sàrl.
|
|
9
9
|
*
|
|
10
10
|
* This program is distributed in the hope that it will be useful,
|
|
11
11
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
@@ -22,7 +22,7 @@ exports.fields = [
|
|
|
22
22
|
[
|
|
23
23
|
{
|
|
24
24
|
field: 'maximumNestingLevel',
|
|
25
|
-
description:
|
|
25
|
+
description: 'Maximum allowed "if/for/while/switch/try" statements nesting depth',
|
|
26
26
|
default: 3,
|
|
27
27
|
},
|
|
28
28
|
],
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/*
|
|
3
3
|
* SonarQube JavaScript Plugin
|
|
4
|
-
* Copyright (C)
|
|
4
|
+
* Copyright (C) SonarSource Sàrl
|
|
5
5
|
* mailto:info AT sonarsource DOT com
|
|
6
6
|
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
7
|
+
* You can redistribute and/or modify this program under the terms of
|
|
8
|
+
* the Sonar Source-Available License Version 1, as published by SonarSource Sàrl.
|
|
9
9
|
*
|
|
10
10
|
* This program is distributed in the hope that it will be useful,
|
|
11
11
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
package/cjs/S134/index.js
CHANGED
|
@@ -3,11 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.rule = void 0;
|
|
4
4
|
/*
|
|
5
5
|
* SonarQube JavaScript Plugin
|
|
6
|
-
* Copyright (C)
|
|
6
|
+
* Copyright (C) SonarSource Sàrl
|
|
7
7
|
* mailto:info AT sonarsource DOT com
|
|
8
8
|
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
9
|
+
* You can redistribute and/or modify this program under the terms of
|
|
10
|
+
* the Sonar Source-Available License Version 1, as published by SonarSource Sàrl.
|
|
11
11
|
*
|
|
12
12
|
* This program is distributed in the hope that it will be useful,
|
|
13
13
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
package/cjs/S134/meta.js
CHANGED
|
@@ -17,11 +17,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
exports.schema = exports.hasSecondaries = exports.eslintId = exports.implementation = void 0;
|
|
18
18
|
/*
|
|
19
19
|
* SonarQube JavaScript Plugin
|
|
20
|
-
* Copyright (C)
|
|
20
|
+
* Copyright (C) SonarSource Sàrl
|
|
21
21
|
* mailto:info AT sonarsource DOT com
|
|
22
22
|
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
23
|
+
* You can redistribute and/or modify this program under the terms of
|
|
24
|
+
* the Sonar Source-Available License Version 1, as published by SonarSource Sàrl.
|
|
25
25
|
*
|
|
26
26
|
* This program is distributed in the hope that it will be useful,
|
|
27
27
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
package/cjs/S134/rule.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/*
|
|
3
3
|
* SonarQube JavaScript Plugin
|
|
4
|
-
* Copyright (C)
|
|
4
|
+
* Copyright (C) SonarSource Sàrl
|
|
5
5
|
* mailto:info AT sonarsource DOT com
|
|
6
6
|
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
7
|
+
* You can redistribute and/or modify this program under the terms of
|
|
8
|
+
* the Sonar Source-Available License Version 1, as published by SonarSource Sàrl.
|
|
9
9
|
*
|
|
10
10
|
* This program is distributed in the hope that it will be useful,
|
|
11
11
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
@@ -51,11 +51,13 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
51
51
|
})();
|
|
52
52
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
53
53
|
exports.rule = void 0;
|
|
54
|
-
const
|
|
54
|
+
const generate_meta_js_1 = require("../helpers/generate-meta.js");
|
|
55
|
+
const collection_js_1 = require("../helpers/collection.js");
|
|
56
|
+
const location_js_1 = require("../helpers/location.js");
|
|
55
57
|
const meta = __importStar(require("./generated-meta.js"));
|
|
56
58
|
const DEFAULT_MAXIMUM_NESTING_LEVEL = 3;
|
|
57
59
|
exports.rule = {
|
|
58
|
-
meta: (0,
|
|
60
|
+
meta: (0, generate_meta_js_1.generateMeta)(meta),
|
|
59
61
|
create(context) {
|
|
60
62
|
const sourceCode = context.sourceCode;
|
|
61
63
|
const threshold = context.options[0]?.maximumNestingLevel ??
|
|
@@ -69,14 +71,14 @@ exports.rule = {
|
|
|
69
71
|
}
|
|
70
72
|
function check(node) {
|
|
71
73
|
if (nodeStack.length === threshold) {
|
|
72
|
-
(0,
|
|
74
|
+
(0, location_js_1.report)(context, {
|
|
73
75
|
message: `Refactor this code to not nest more than ${threshold} if/for/while/switch/try statements.`,
|
|
74
76
|
loc: sourceCode.getFirstToken(node).loc,
|
|
75
|
-
}, nodeStack.map(n => (0,
|
|
77
|
+
}, nodeStack.map(n => (0, location_js_1.toSecondaryLocation)(n, '+1')));
|
|
76
78
|
}
|
|
77
79
|
}
|
|
78
80
|
function isElseIf(node) {
|
|
79
|
-
const parent = (0,
|
|
81
|
+
const parent = (0, collection_js_1.last)(context.sourceCode.getAncestors(node));
|
|
80
82
|
return (node.type === 'IfStatement' && parent.type === 'IfStatement' && node === parent.alternate);
|
|
81
83
|
}
|
|
82
84
|
const controlFlowNodes = [
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/*
|
|
3
3
|
* SonarQube JavaScript Plugin
|
|
4
|
-
* Copyright (C)
|
|
4
|
+
* Copyright (C) SonarSource Sàrl
|
|
5
5
|
* mailto:info AT sonarsource DOT com
|
|
6
6
|
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
7
|
+
* You can redistribute and/or modify this program under the terms of
|
|
8
|
+
* the Sonar Source-Available License Version 1, as published by SonarSource Sàrl.
|
|
9
9
|
*
|
|
10
10
|
* This program is distributed in the hope that it will be useful,
|
|
11
11
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
package/cjs/S135/index.js
CHANGED
|
@@ -3,11 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.rule = void 0;
|
|
4
4
|
/*
|
|
5
5
|
* SonarQube JavaScript Plugin
|
|
6
|
-
* Copyright (C)
|
|
6
|
+
* Copyright (C) SonarSource Sàrl
|
|
7
7
|
* mailto:info AT sonarsource DOT com
|
|
8
8
|
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
9
|
+
* You can redistribute and/or modify this program under the terms of
|
|
10
|
+
* the Sonar Source-Available License Version 1, as published by SonarSource Sàrl.
|
|
11
11
|
*
|
|
12
12
|
* This program is distributed in the hope that it will be useful,
|
|
13
13
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
package/cjs/S135/meta.js
CHANGED
|
@@ -3,11 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.hasSecondaries = exports.eslintId = exports.implementation = void 0;
|
|
4
4
|
/*
|
|
5
5
|
* SonarQube JavaScript Plugin
|
|
6
|
-
* Copyright (C)
|
|
6
|
+
* Copyright (C) SonarSource Sàrl
|
|
7
7
|
* mailto:info AT sonarsource DOT com
|
|
8
8
|
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
9
|
+
* You can redistribute and/or modify this program under the terms of
|
|
10
|
+
* the Sonar Source-Available License Version 1, as published by SonarSource Sàrl.
|
|
11
11
|
*
|
|
12
12
|
* This program is distributed in the hope that it will be useful,
|
|
13
13
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
package/cjs/S135/rule.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/*
|
|
3
3
|
* SonarQube JavaScript Plugin
|
|
4
|
-
* Copyright (C)
|
|
4
|
+
* Copyright (C) SonarSource Sàrl
|
|
5
5
|
* mailto:info AT sonarsource DOT com
|
|
6
6
|
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
7
|
+
* You can redistribute and/or modify this program under the terms of
|
|
8
|
+
* the Sonar Source-Available License Version 1, as published by SonarSource Sàrl.
|
|
9
9
|
*
|
|
10
10
|
* This program is distributed in the hope that it will be useful,
|
|
11
11
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
@@ -51,10 +51,11 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
51
51
|
})();
|
|
52
52
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
53
53
|
exports.rule = void 0;
|
|
54
|
-
const
|
|
54
|
+
const generate_meta_js_1 = require("../helpers/generate-meta.js");
|
|
55
|
+
const location_js_1 = require("../helpers/location.js");
|
|
55
56
|
const meta = __importStar(require("./generated-meta.js"));
|
|
56
57
|
exports.rule = {
|
|
57
|
-
meta: (0,
|
|
58
|
+
meta: (0, generate_meta_js_1.generateMeta)(meta),
|
|
58
59
|
create(context) {
|
|
59
60
|
let jumpTargets = [];
|
|
60
61
|
function enterScope() {
|
|
@@ -76,10 +77,10 @@ exports.rule = {
|
|
|
76
77
|
if (jumps && jumps.length > 1) {
|
|
77
78
|
const sourceCode = context.sourceCode;
|
|
78
79
|
const firstToken = sourceCode.getFirstToken(node);
|
|
79
|
-
(0,
|
|
80
|
+
(0, location_js_1.report)(context, {
|
|
80
81
|
loc: firstToken.loc,
|
|
81
82
|
message: 'Reduce the total number of "break" and "continue" statements in this loop to use one at most.',
|
|
82
|
-
}, jumps.map(jmp => (0,
|
|
83
|
+
}, jumps.map(jmp => (0, location_js_1.toSecondaryLocation)(jmp, jmp.type === 'BreakStatement' ? '"break" statement.' : '"continue" statement.')));
|
|
83
84
|
}
|
|
84
85
|
}
|
|
85
86
|
return {
|
package/cjs/S138/config.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/*
|
|
3
3
|
* SonarQube JavaScript Plugin
|
|
4
|
-
* Copyright (C)
|
|
4
|
+
* Copyright (C) SonarSource Sàrl
|
|
5
5
|
* mailto:info AT sonarsource DOT com
|
|
6
6
|
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
7
|
+
* You can redistribute and/or modify this program under the terms of
|
|
8
|
+
* the Sonar Source-Available License Version 1, as published by SonarSource Sàrl.
|
|
9
9
|
*
|
|
10
10
|
* This program is distributed in the hope that it will be useful,
|
|
11
11
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/*
|
|
3
3
|
* SonarQube JavaScript Plugin
|
|
4
|
-
* Copyright (C)
|
|
4
|
+
* Copyright (C) SonarSource Sàrl
|
|
5
5
|
* mailto:info AT sonarsource DOT com
|
|
6
6
|
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
7
|
+
* You can redistribute and/or modify this program under the terms of
|
|
8
|
+
* the Sonar Source-Available License Version 1, as published by SonarSource Sàrl.
|
|
9
9
|
*
|
|
10
10
|
* This program is distributed in the hope that it will be useful,
|
|
11
11
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
package/cjs/S138/index.js
CHANGED
|
@@ -3,11 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.rule = void 0;
|
|
4
4
|
/*
|
|
5
5
|
* SonarQube JavaScript Plugin
|
|
6
|
-
* Copyright (C)
|
|
6
|
+
* Copyright (C) SonarSource Sàrl
|
|
7
7
|
* mailto:info AT sonarsource DOT com
|
|
8
8
|
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
9
|
+
* You can redistribute and/or modify this program under the terms of
|
|
10
|
+
* the Sonar Source-Available License Version 1, as published by SonarSource Sàrl.
|
|
11
11
|
*
|
|
12
12
|
* This program is distributed in the hope that it will be useful,
|
|
13
13
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
package/cjs/S138/meta.js
CHANGED
|
@@ -17,11 +17,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
exports.schema = exports.eslintId = exports.implementation = void 0;
|
|
18
18
|
/*
|
|
19
19
|
* SonarQube JavaScript Plugin
|
|
20
|
-
* Copyright (C)
|
|
20
|
+
* Copyright (C) SonarSource Sàrl
|
|
21
21
|
* mailto:info AT sonarsource DOT com
|
|
22
22
|
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
23
|
+
* You can redistribute and/or modify this program under the terms of
|
|
24
|
+
* the Sonar Source-Available License Version 1, as published by SonarSource Sàrl.
|
|
25
25
|
*
|
|
26
26
|
* This program is distributed in the hope that it will be useful,
|
|
27
27
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
package/cjs/S138/rule.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/*
|
|
3
3
|
* SonarQube JavaScript Plugin
|
|
4
|
-
* Copyright (C)
|
|
4
|
+
* Copyright (C) SonarSource Sàrl
|
|
5
5
|
* mailto:info AT sonarsource DOT com
|
|
6
6
|
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
7
|
+
* You can redistribute and/or modify this program under the terms of
|
|
8
|
+
* the Sonar Source-Available License Version 1, as published by SonarSource Sàrl.
|
|
9
9
|
*
|
|
10
10
|
* This program is distributed in the hope that it will be useful,
|
|
11
11
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
@@ -54,14 +54,17 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
54
54
|
exports.rule = void 0;
|
|
55
55
|
exports.getLocsNumber = getLocsNumber;
|
|
56
56
|
exports.getCommentLineNumbers = getCommentLineNumbers;
|
|
57
|
-
const
|
|
57
|
+
const generate_meta_js_1 = require("../helpers/generate-meta.js");
|
|
58
|
+
const location_js_1 = require("../helpers/location.js");
|
|
59
|
+
const ancestor_js_1 = require("../helpers/ancestor.js");
|
|
60
|
+
const collection_js_1 = require("../helpers/collection.js");
|
|
58
61
|
const meta = __importStar(require("./generated-meta.js"));
|
|
59
62
|
const DEFAULT = 200;
|
|
60
63
|
const messages = {
|
|
61
64
|
functionMaxLine: 'This function has {{lineCount}} lines, which is greater than the {{threshold}} lines authorized. Split it into smaller functions.',
|
|
62
65
|
};
|
|
63
66
|
exports.rule = {
|
|
64
|
-
meta: (0,
|
|
67
|
+
meta: (0, generate_meta_js_1.generateMeta)(meta, { messages }),
|
|
65
68
|
create(context) {
|
|
66
69
|
const threshold = context.options[0]?.maximum ?? DEFAULT;
|
|
67
70
|
const sourceCode = context.sourceCode;
|
|
@@ -72,7 +75,7 @@ exports.rule = {
|
|
|
72
75
|
return {
|
|
73
76
|
'FunctionDeclaration, FunctionExpression, ArrowFunctionExpression': (node) => {
|
|
74
77
|
functionStack.push(node);
|
|
75
|
-
const parent = (0,
|
|
78
|
+
const parent = (0, ancestor_js_1.getParent)(context, node);
|
|
76
79
|
if (!node.loc || isIIFE(node, parent)) {
|
|
77
80
|
return;
|
|
78
81
|
}
|
|
@@ -82,7 +85,7 @@ exports.rule = {
|
|
|
82
85
|
},
|
|
83
86
|
ReturnStatement: (node) => {
|
|
84
87
|
const returnStatement = node;
|
|
85
|
-
const knowledge = functionKnowledge.get((0,
|
|
88
|
+
const knowledge = functionKnowledge.get((0, collection_js_1.last)(functionStack));
|
|
86
89
|
if (knowledge &&
|
|
87
90
|
returnStatement.argument &&
|
|
88
91
|
returnStatement.argument.type.startsWith('JSX')) {
|
|
@@ -109,7 +112,7 @@ exports.rule = {
|
|
|
109
112
|
lineCount: lineCount.toString(),
|
|
110
113
|
threshold: `${threshold}`,
|
|
111
114
|
},
|
|
112
|
-
loc: (0,
|
|
115
|
+
loc: (0, location_js_1.getMainFunctionTokenLocation)(functionLike, functionLike.parent, context),
|
|
113
116
|
});
|
|
114
117
|
}
|
|
115
118
|
}
|
|
@@ -175,7 +178,7 @@ function nameStartsWithCapital(node) {
|
|
|
175
178
|
if (node.type !== 'ArrowFunctionExpression') {
|
|
176
179
|
return null;
|
|
177
180
|
}
|
|
178
|
-
const parent = (0,
|
|
181
|
+
const parent = (0, ancestor_js_1.getNodeParent)(node);
|
|
179
182
|
if (!parent) {
|
|
180
183
|
return null;
|
|
181
184
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/*
|
|
3
3
|
* SonarQube JavaScript Plugin
|
|
4
|
-
* Copyright (C)
|
|
4
|
+
* Copyright (C) SonarSource Sàrl
|
|
5
5
|
* mailto:info AT sonarsource DOT com
|
|
6
6
|
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
7
|
+
* You can redistribute and/or modify this program under the terms of
|
|
8
|
+
* the Sonar Source-Available License Version 1, as published by SonarSource Sàrl.
|
|
9
9
|
*
|
|
10
10
|
* This program is distributed in the hope that it will be useful,
|
|
11
11
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|