@component-hook/eslint-plugin 1.5.0 → 1.5.1
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/dist/index.cjs +7 -5
- package/dist/index.d.cts +65 -2
- package/dist/index.d.mts +65 -2
- package/dist/index.mjs +6 -4
- package/package.json +16 -16
package/dist/index.cjs
CHANGED
|
@@ -19,7 +19,7 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
19
19
|
}
|
|
20
20
|
return to;
|
|
21
21
|
};
|
|
22
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
22
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule || !__hasOwnProp.call(mod, "default") ? __defProp(target, "default", {
|
|
23
23
|
value: mod,
|
|
24
24
|
enumerable: true
|
|
25
25
|
}) : target, mod));
|
|
@@ -486,7 +486,8 @@ const markdownConfigs = [..._eslint_markdown.default.configs.processor.map((conf
|
|
|
486
486
|
"sonarjs/unused-import": "off",
|
|
487
487
|
"sonarjs/no-unused-vars": "off",
|
|
488
488
|
"unicorn/no-useless-undefined": "off",
|
|
489
|
-
"unicorn/no-anonymous-default-export": "off"
|
|
489
|
+
"unicorn/no-anonymous-default-export": "off",
|
|
490
|
+
"unicorn/no-top-level-side-effects": "off"
|
|
490
491
|
}
|
|
491
492
|
}];
|
|
492
493
|
//#endregion
|
|
@@ -693,10 +694,8 @@ const unicornConfigs = [
|
|
|
693
694
|
{
|
|
694
695
|
name: "component-hook/unicorn",
|
|
695
696
|
rules: {
|
|
696
|
-
"unicorn/
|
|
697
|
-
"unicorn/consistent-empty-array-spread": "error",
|
|
697
|
+
"unicorn/consistent-arrow-return-style": "off",
|
|
698
698
|
"unicorn/consistent-function-scoping": ["error", { checkArrowFunctions: false }],
|
|
699
|
-
"unicorn/custom-error-definition": "error",
|
|
700
699
|
"unicorn/filename-case": ["error", {
|
|
701
700
|
cases: {
|
|
702
701
|
kebabCase: true,
|
|
@@ -711,8 +710,10 @@ const unicornConfigs = [
|
|
|
711
710
|
"unicorn/import-style": "off",
|
|
712
711
|
"unicorn/no-abusive-eslint-disable": "off",
|
|
713
712
|
"unicorn/no-array-for-each": "off",
|
|
713
|
+
"unicorn/no-barrel-files": "off",
|
|
714
714
|
"unicorn/no-duplicate-set-values": "error",
|
|
715
715
|
"unicorn/no-empty-file": "off",
|
|
716
|
+
"unicorn/no-for-each": "off",
|
|
716
717
|
"unicorn/no-for-loop": "error",
|
|
717
718
|
"unicorn/no-process-exit": "off",
|
|
718
719
|
"unicorn/no-this-assignment": "off",
|
|
@@ -722,6 +723,7 @@ const unicornConfigs = [
|
|
|
722
723
|
checkArrowFunctionBody: false
|
|
723
724
|
}],
|
|
724
725
|
"unicorn/numeric-separators-style": "off",
|
|
726
|
+
"unicorn/prefer-await": "off",
|
|
725
727
|
"unicorn/prefer-module": "off",
|
|
726
728
|
"unicorn/prefer-query-selector": "error",
|
|
727
729
|
"unicorn/prefer-ternary": "off",
|
package/dist/index.d.cts
CHANGED
|
@@ -1751,6 +1751,7 @@ interface VueRules {
|
|
|
1751
1751
|
/**
|
|
1752
1752
|
* Disallow function declarations that contain unsafe references inside loop statements
|
|
1753
1753
|
* @see https://typescript-eslint.io/rules/no-loop-func
|
|
1754
|
+
* @deprecated
|
|
1754
1755
|
*/
|
|
1755
1756
|
'@typescript-eslint/no-loop-func'?: Linter.RuleEntry<[]>;
|
|
1756
1757
|
/**
|
|
@@ -1827,6 +1828,7 @@ interface VueRules {
|
|
|
1827
1828
|
/**
|
|
1828
1829
|
* Disallow specified modules when loaded by `import`
|
|
1829
1830
|
* @see https://typescript-eslint.io/rules/no-restricted-imports
|
|
1831
|
+
* @deprecated
|
|
1830
1832
|
*/
|
|
1831
1833
|
'@typescript-eslint/no-restricted-imports'?: Linter.RuleEntry<TypescriptEslintNoRestrictedImports>;
|
|
1832
1834
|
/**
|
|
@@ -5357,6 +5359,7 @@ type VueSortKeys = [] | [("asc" | "desc")] | [("asc" | "desc"), {
|
|
|
5357
5359
|
ignoreGrandchildrenOf?: unknown[];
|
|
5358
5360
|
minKeys?: number;
|
|
5359
5361
|
natural?: boolean;
|
|
5362
|
+
allowLineSeparatedGroups?: boolean;
|
|
5360
5363
|
}];
|
|
5361
5364
|
type VueSpaceInParens = [] | [("always" | "never")] | [("always" | "never"), {
|
|
5362
5365
|
exceptions?: ("{}" | "[]" | "()" | "empty")[];
|
|
@@ -5617,6 +5620,11 @@ interface SonarjsRules {
|
|
|
5617
5620
|
* @see https://sonarsource.github.io/rspec/#/rspec/S3524/javascript
|
|
5618
5621
|
*/
|
|
5619
5622
|
'sonarjs/arrow-function-convention'?: Linter.RuleEntry<SonarjsArrowFunctionConvention>;
|
|
5623
|
+
/**
|
|
5624
|
+
* Assertions should be placed inside test cases or hooks
|
|
5625
|
+
* @see https://sonarsource.github.io/rspec/#/rspec/S8784/javascript
|
|
5626
|
+
*/
|
|
5627
|
+
'sonarjs/assertions-in-test-cases'?: Linter.RuleEntry<[]>;
|
|
5620
5628
|
/**
|
|
5621
5629
|
* Tests should include assertions
|
|
5622
5630
|
* @see https://sonarsource.github.io/rspec/#/rspec/S2699/javascript
|
|
@@ -5894,6 +5902,11 @@ interface SonarjsRules {
|
|
|
5894
5902
|
* @see https://sonarsource.github.io/rspec/#/rspec/S6328/javascript
|
|
5895
5903
|
*/
|
|
5896
5904
|
'sonarjs/existing-groups'?: Linter.RuleEntry<[]>;
|
|
5905
|
+
/**
|
|
5906
|
+
* Tests should be skipped explicitly
|
|
5907
|
+
* @see https://sonarsource.github.io/rspec/#/rspec/S8968/javascript
|
|
5908
|
+
*/
|
|
5909
|
+
'sonarjs/explicit-test-skip'?: Linter.RuleEntry<[]>;
|
|
5897
5910
|
/**
|
|
5898
5911
|
* Expressions should not be too complex
|
|
5899
5912
|
* @see https://sonarsource.github.io/rspec/#/rspec/S1067/javascript
|
|
@@ -6051,6 +6064,11 @@ interface SonarjsRules {
|
|
|
6051
6064
|
* @see https://sonarsource.github.io/rspec/#/rspec/S4622/javascript
|
|
6052
6065
|
*/
|
|
6053
6066
|
'sonarjs/max-union-size'?: Linter.RuleEntry<SonarjsMaxUnionSize>;
|
|
6067
|
+
/**
|
|
6068
|
+
* Lodash and Underscore.js `memoize` calls on functions with multiple parameters should use an explicit cache key function
|
|
6069
|
+
* @see https://sonarsource.github.io/rspec/#/rspec/S8932/javascript
|
|
6070
|
+
*/
|
|
6071
|
+
'sonarjs/memoize-cache-key'?: Linter.RuleEntry<[]>;
|
|
6054
6072
|
/**
|
|
6055
6073
|
* "for" loop increment clauses should modify the loops' counters
|
|
6056
6074
|
* @see https://sonarsource.github.io/rspec/#/rspec/S1994/javascript
|
|
@@ -6141,6 +6159,16 @@ interface SonarjsRules {
|
|
|
6141
6159
|
* @see https://sonarsource.github.io/rspec/#/rspec/S1854/javascript
|
|
6142
6160
|
*/
|
|
6143
6161
|
'sonarjs/no-dead-store'?: Linter.RuleEntry<[]>;
|
|
6162
|
+
/**
|
|
6163
|
+
* UI test debug commands should not be committed to version control
|
|
6164
|
+
* @see https://sonarsource.github.io/rspec/#/rspec/S8959/javascript
|
|
6165
|
+
*/
|
|
6166
|
+
'sonarjs/no-debug-commands-in-ui-tests'?: Linter.RuleEntry<[]>;
|
|
6167
|
+
/**
|
|
6168
|
+
* Default imports from modular utility libraries should not be used
|
|
6169
|
+
* @see https://sonarsource.github.io/rspec/#/rspec/S8927/javascript
|
|
6170
|
+
*/
|
|
6171
|
+
'sonarjs/no-default-utility-imports'?: Linter.RuleEntry<[]>;
|
|
6144
6172
|
/**
|
|
6145
6173
|
* "delete" should be used only with object properties
|
|
6146
6174
|
* @see https://sonarsource.github.io/rspec/#/rspec/S3001/javascript
|
|
@@ -6226,6 +6254,11 @@ interface SonarjsRules {
|
|
|
6226
6254
|
* @see https://sonarsource.github.io/rspec/#/rspec/S128/javascript
|
|
6227
6255
|
*/
|
|
6228
6256
|
'sonarjs/no-fallthrough'?: Linter.RuleEntry<[]>;
|
|
6257
|
+
/**
|
|
6258
|
+
* Fixed waits should not be used in tests
|
|
6259
|
+
* @see https://sonarsource.github.io/rspec/#/rspec/S2925/javascript
|
|
6260
|
+
*/
|
|
6261
|
+
'sonarjs/no-fixed-wait-in-tests'?: Linter.RuleEntry<[]>;
|
|
6229
6262
|
/**
|
|
6230
6263
|
* Floating point numbers should not be tested for equality
|
|
6231
6264
|
* @see https://sonarsource.github.io/rspec/#/rspec/S1244/javascript
|
|
@@ -6346,6 +6379,11 @@ interface SonarjsRules {
|
|
|
6346
6379
|
* @see https://sonarsource.github.io/rspec/#/rspec/S6627/javascript
|
|
6347
6380
|
*/
|
|
6348
6381
|
'sonarjs/no-internal-api-use'?: Linter.RuleEntry<[]>;
|
|
6382
|
+
/**
|
|
6383
|
+
* Inline snapshots should not contain interpolations
|
|
6384
|
+
* @see https://sonarsource.github.io/rspec/#/rspec/S8967/javascript
|
|
6385
|
+
*/
|
|
6386
|
+
'sonarjs/no-interpolation-in-inline-snapshots'?: Linter.RuleEntry<[]>;
|
|
6349
6387
|
/**
|
|
6350
6388
|
* Sensitive permissions should not be requested unnecessarily
|
|
6351
6389
|
* @see https://sonarsource.github.io/rspec/#/rspec/S5604/javascript
|
|
@@ -6398,6 +6436,11 @@ interface SonarjsRules {
|
|
|
6398
6436
|
* @see https://sonarsource.github.io/rspec/#/rspec/S5868/javascript
|
|
6399
6437
|
*/
|
|
6400
6438
|
'sonarjs/no-misleading-character-class'?: Linter.RuleEntry<[]>;
|
|
6439
|
+
/**
|
|
6440
|
+
* Test and hook callbacks should use a single completion style
|
|
6441
|
+
* @see https://sonarsource.github.io/rspec/#/rspec/S8960/javascript
|
|
6442
|
+
*/
|
|
6443
|
+
'sonarjs/no-mixed-completion-style'?: Linter.RuleEntry<[]>;
|
|
6401
6444
|
/**
|
|
6402
6445
|
* Content Security Policy should block mixed-content
|
|
6403
6446
|
* @see https://sonarsource.github.io/rspec/#/rspec/S5730/javascript
|
|
@@ -6470,7 +6513,7 @@ interface SonarjsRules {
|
|
|
6470
6513
|
*/
|
|
6471
6514
|
'sonarjs/no-redundant-optional'?: Linter.RuleEntry<[]>;
|
|
6472
6515
|
/**
|
|
6473
|
-
*
|
|
6516
|
+
* Unnecessary parentheses should be removed
|
|
6474
6517
|
* @see https://sonarsource.github.io/rspec/#/rspec/S1110/javascript
|
|
6475
6518
|
* @deprecated
|
|
6476
6519
|
*/
|
|
@@ -6547,7 +6590,7 @@ interface SonarjsRules {
|
|
|
6547
6590
|
*/
|
|
6548
6591
|
'sonarjs/no-table-as-layout'?: Linter.RuleEntry<[]>;
|
|
6549
6592
|
/**
|
|
6550
|
-
* Assertions should not
|
|
6593
|
+
* Assertions should not be trivially true
|
|
6551
6594
|
* @see https://sonarsource.github.io/rspec/#/rspec/S5914/javascript
|
|
6552
6595
|
*/
|
|
6553
6596
|
'sonarjs/no-trivial-assertions'?: Linter.RuleEntry<[]>;
|
|
@@ -6678,6 +6721,11 @@ interface SonarjsRules {
|
|
|
6678
6721
|
* @deprecated
|
|
6679
6722
|
*/
|
|
6680
6723
|
'sonarjs/os-command'?: Linter.RuleEntry<[]>;
|
|
6724
|
+
/**
|
|
6725
|
+
* Similar tests should be grouped in a single Parameterized test
|
|
6726
|
+
* @see https://sonarsource.github.io/rspec/#/rspec/S5976/javascript
|
|
6727
|
+
*/
|
|
6728
|
+
'sonarjs/parameterized-tests'?: Linter.RuleEntry<[]>;
|
|
6681
6729
|
/**
|
|
6682
6730
|
* Origins should be verified during cross-origin communications
|
|
6683
6731
|
* @see https://sonarsource.github.io/rspec/#/rspec/S2819/javascript
|
|
@@ -6693,6 +6741,11 @@ interface SonarjsRules {
|
|
|
6693
6741
|
* @see https://sonarsource.github.io/rspec/#/rspec/S1488/javascript
|
|
6694
6742
|
*/
|
|
6695
6743
|
'sonarjs/prefer-immediate-return'?: Linter.RuleEntry<[]>;
|
|
6744
|
+
/**
|
|
6745
|
+
* Native APIs should be preferred over Lodash and Underscore.js methods
|
|
6746
|
+
* @see https://sonarsource.github.io/rspec/#/rspec/S8907/javascript
|
|
6747
|
+
*/
|
|
6748
|
+
'sonarjs/prefer-native-lodash-alternative'?: Linter.RuleEntry<[]>;
|
|
6696
6749
|
/**
|
|
6697
6750
|
* Object literal syntax should be used
|
|
6698
6751
|
* @see https://sonarsource.github.io/rspec/#/rspec/S2428/javascript
|
|
@@ -6828,6 +6881,11 @@ interface SonarjsRules {
|
|
|
6828
6881
|
* @see https://sonarsource.github.io/rspec/#/rspec/S8786/javascript
|
|
6829
6882
|
*/
|
|
6830
6883
|
'sonarjs/super-linear-regex'?: Linter.RuleEntry<[]>;
|
|
6884
|
+
/**
|
|
6885
|
+
* Tests should not be registered asynchronously in suite callbacks
|
|
6886
|
+
* @see https://sonarsource.github.io/rspec/#/rspec/S8785/javascript
|
|
6887
|
+
*/
|
|
6888
|
+
'sonarjs/synchronous-suite-callback'?: Linter.RuleEntry<[]>;
|
|
6831
6889
|
/**
|
|
6832
6890
|
* Tables should have headers
|
|
6833
6891
|
* @see https://sonarsource.github.io/rspec/#/rspec/S5256/javascript
|
|
@@ -7221,6 +7279,11 @@ interface PlaywrightRules {
|
|
|
7221
7279
|
* @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/no-standalone-expect.md
|
|
7222
7280
|
*/
|
|
7223
7281
|
'playwright/no-standalone-expect'?: Linter.RuleEntry<[]>;
|
|
7282
|
+
/**
|
|
7283
|
+
* Disallow assertions on a Locator that can never fail
|
|
7284
|
+
* @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/no-unnecessary-assertions.md
|
|
7285
|
+
*/
|
|
7286
|
+
'playwright/no-unnecessary-assertions'?: Linter.RuleEntry<[]>;
|
|
7224
7287
|
/**
|
|
7225
7288
|
* Prevent unsafe variable references in page.evaluate() and page.addInitScript()
|
|
7226
7289
|
* @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/no-unsafe-references.md
|
package/dist/index.d.mts
CHANGED
|
@@ -1751,6 +1751,7 @@ interface VueRules {
|
|
|
1751
1751
|
/**
|
|
1752
1752
|
* Disallow function declarations that contain unsafe references inside loop statements
|
|
1753
1753
|
* @see https://typescript-eslint.io/rules/no-loop-func
|
|
1754
|
+
* @deprecated
|
|
1754
1755
|
*/
|
|
1755
1756
|
'@typescript-eslint/no-loop-func'?: Linter.RuleEntry<[]>;
|
|
1756
1757
|
/**
|
|
@@ -1827,6 +1828,7 @@ interface VueRules {
|
|
|
1827
1828
|
/**
|
|
1828
1829
|
* Disallow specified modules when loaded by `import`
|
|
1829
1830
|
* @see https://typescript-eslint.io/rules/no-restricted-imports
|
|
1831
|
+
* @deprecated
|
|
1830
1832
|
*/
|
|
1831
1833
|
'@typescript-eslint/no-restricted-imports'?: Linter.RuleEntry<TypescriptEslintNoRestrictedImports>;
|
|
1832
1834
|
/**
|
|
@@ -5357,6 +5359,7 @@ type VueSortKeys = [] | [("asc" | "desc")] | [("asc" | "desc"), {
|
|
|
5357
5359
|
ignoreGrandchildrenOf?: unknown[];
|
|
5358
5360
|
minKeys?: number;
|
|
5359
5361
|
natural?: boolean;
|
|
5362
|
+
allowLineSeparatedGroups?: boolean;
|
|
5360
5363
|
}];
|
|
5361
5364
|
type VueSpaceInParens = [] | [("always" | "never")] | [("always" | "never"), {
|
|
5362
5365
|
exceptions?: ("{}" | "[]" | "()" | "empty")[];
|
|
@@ -5617,6 +5620,11 @@ interface SonarjsRules {
|
|
|
5617
5620
|
* @see https://sonarsource.github.io/rspec/#/rspec/S3524/javascript
|
|
5618
5621
|
*/
|
|
5619
5622
|
'sonarjs/arrow-function-convention'?: Linter.RuleEntry<SonarjsArrowFunctionConvention>;
|
|
5623
|
+
/**
|
|
5624
|
+
* Assertions should be placed inside test cases or hooks
|
|
5625
|
+
* @see https://sonarsource.github.io/rspec/#/rspec/S8784/javascript
|
|
5626
|
+
*/
|
|
5627
|
+
'sonarjs/assertions-in-test-cases'?: Linter.RuleEntry<[]>;
|
|
5620
5628
|
/**
|
|
5621
5629
|
* Tests should include assertions
|
|
5622
5630
|
* @see https://sonarsource.github.io/rspec/#/rspec/S2699/javascript
|
|
@@ -5894,6 +5902,11 @@ interface SonarjsRules {
|
|
|
5894
5902
|
* @see https://sonarsource.github.io/rspec/#/rspec/S6328/javascript
|
|
5895
5903
|
*/
|
|
5896
5904
|
'sonarjs/existing-groups'?: Linter.RuleEntry<[]>;
|
|
5905
|
+
/**
|
|
5906
|
+
* Tests should be skipped explicitly
|
|
5907
|
+
* @see https://sonarsource.github.io/rspec/#/rspec/S8968/javascript
|
|
5908
|
+
*/
|
|
5909
|
+
'sonarjs/explicit-test-skip'?: Linter.RuleEntry<[]>;
|
|
5897
5910
|
/**
|
|
5898
5911
|
* Expressions should not be too complex
|
|
5899
5912
|
* @see https://sonarsource.github.io/rspec/#/rspec/S1067/javascript
|
|
@@ -6051,6 +6064,11 @@ interface SonarjsRules {
|
|
|
6051
6064
|
* @see https://sonarsource.github.io/rspec/#/rspec/S4622/javascript
|
|
6052
6065
|
*/
|
|
6053
6066
|
'sonarjs/max-union-size'?: Linter.RuleEntry<SonarjsMaxUnionSize>;
|
|
6067
|
+
/**
|
|
6068
|
+
* Lodash and Underscore.js `memoize` calls on functions with multiple parameters should use an explicit cache key function
|
|
6069
|
+
* @see https://sonarsource.github.io/rspec/#/rspec/S8932/javascript
|
|
6070
|
+
*/
|
|
6071
|
+
'sonarjs/memoize-cache-key'?: Linter.RuleEntry<[]>;
|
|
6054
6072
|
/**
|
|
6055
6073
|
* "for" loop increment clauses should modify the loops' counters
|
|
6056
6074
|
* @see https://sonarsource.github.io/rspec/#/rspec/S1994/javascript
|
|
@@ -6141,6 +6159,16 @@ interface SonarjsRules {
|
|
|
6141
6159
|
* @see https://sonarsource.github.io/rspec/#/rspec/S1854/javascript
|
|
6142
6160
|
*/
|
|
6143
6161
|
'sonarjs/no-dead-store'?: Linter.RuleEntry<[]>;
|
|
6162
|
+
/**
|
|
6163
|
+
* UI test debug commands should not be committed to version control
|
|
6164
|
+
* @see https://sonarsource.github.io/rspec/#/rspec/S8959/javascript
|
|
6165
|
+
*/
|
|
6166
|
+
'sonarjs/no-debug-commands-in-ui-tests'?: Linter.RuleEntry<[]>;
|
|
6167
|
+
/**
|
|
6168
|
+
* Default imports from modular utility libraries should not be used
|
|
6169
|
+
* @see https://sonarsource.github.io/rspec/#/rspec/S8927/javascript
|
|
6170
|
+
*/
|
|
6171
|
+
'sonarjs/no-default-utility-imports'?: Linter.RuleEntry<[]>;
|
|
6144
6172
|
/**
|
|
6145
6173
|
* "delete" should be used only with object properties
|
|
6146
6174
|
* @see https://sonarsource.github.io/rspec/#/rspec/S3001/javascript
|
|
@@ -6226,6 +6254,11 @@ interface SonarjsRules {
|
|
|
6226
6254
|
* @see https://sonarsource.github.io/rspec/#/rspec/S128/javascript
|
|
6227
6255
|
*/
|
|
6228
6256
|
'sonarjs/no-fallthrough'?: Linter.RuleEntry<[]>;
|
|
6257
|
+
/**
|
|
6258
|
+
* Fixed waits should not be used in tests
|
|
6259
|
+
* @see https://sonarsource.github.io/rspec/#/rspec/S2925/javascript
|
|
6260
|
+
*/
|
|
6261
|
+
'sonarjs/no-fixed-wait-in-tests'?: Linter.RuleEntry<[]>;
|
|
6229
6262
|
/**
|
|
6230
6263
|
* Floating point numbers should not be tested for equality
|
|
6231
6264
|
* @see https://sonarsource.github.io/rspec/#/rspec/S1244/javascript
|
|
@@ -6346,6 +6379,11 @@ interface SonarjsRules {
|
|
|
6346
6379
|
* @see https://sonarsource.github.io/rspec/#/rspec/S6627/javascript
|
|
6347
6380
|
*/
|
|
6348
6381
|
'sonarjs/no-internal-api-use'?: Linter.RuleEntry<[]>;
|
|
6382
|
+
/**
|
|
6383
|
+
* Inline snapshots should not contain interpolations
|
|
6384
|
+
* @see https://sonarsource.github.io/rspec/#/rspec/S8967/javascript
|
|
6385
|
+
*/
|
|
6386
|
+
'sonarjs/no-interpolation-in-inline-snapshots'?: Linter.RuleEntry<[]>;
|
|
6349
6387
|
/**
|
|
6350
6388
|
* Sensitive permissions should not be requested unnecessarily
|
|
6351
6389
|
* @see https://sonarsource.github.io/rspec/#/rspec/S5604/javascript
|
|
@@ -6398,6 +6436,11 @@ interface SonarjsRules {
|
|
|
6398
6436
|
* @see https://sonarsource.github.io/rspec/#/rspec/S5868/javascript
|
|
6399
6437
|
*/
|
|
6400
6438
|
'sonarjs/no-misleading-character-class'?: Linter.RuleEntry<[]>;
|
|
6439
|
+
/**
|
|
6440
|
+
* Test and hook callbacks should use a single completion style
|
|
6441
|
+
* @see https://sonarsource.github.io/rspec/#/rspec/S8960/javascript
|
|
6442
|
+
*/
|
|
6443
|
+
'sonarjs/no-mixed-completion-style'?: Linter.RuleEntry<[]>;
|
|
6401
6444
|
/**
|
|
6402
6445
|
* Content Security Policy should block mixed-content
|
|
6403
6446
|
* @see https://sonarsource.github.io/rspec/#/rspec/S5730/javascript
|
|
@@ -6470,7 +6513,7 @@ interface SonarjsRules {
|
|
|
6470
6513
|
*/
|
|
6471
6514
|
'sonarjs/no-redundant-optional'?: Linter.RuleEntry<[]>;
|
|
6472
6515
|
/**
|
|
6473
|
-
*
|
|
6516
|
+
* Unnecessary parentheses should be removed
|
|
6474
6517
|
* @see https://sonarsource.github.io/rspec/#/rspec/S1110/javascript
|
|
6475
6518
|
* @deprecated
|
|
6476
6519
|
*/
|
|
@@ -6547,7 +6590,7 @@ interface SonarjsRules {
|
|
|
6547
6590
|
*/
|
|
6548
6591
|
'sonarjs/no-table-as-layout'?: Linter.RuleEntry<[]>;
|
|
6549
6592
|
/**
|
|
6550
|
-
* Assertions should not
|
|
6593
|
+
* Assertions should not be trivially true
|
|
6551
6594
|
* @see https://sonarsource.github.io/rspec/#/rspec/S5914/javascript
|
|
6552
6595
|
*/
|
|
6553
6596
|
'sonarjs/no-trivial-assertions'?: Linter.RuleEntry<[]>;
|
|
@@ -6678,6 +6721,11 @@ interface SonarjsRules {
|
|
|
6678
6721
|
* @deprecated
|
|
6679
6722
|
*/
|
|
6680
6723
|
'sonarjs/os-command'?: Linter.RuleEntry<[]>;
|
|
6724
|
+
/**
|
|
6725
|
+
* Similar tests should be grouped in a single Parameterized test
|
|
6726
|
+
* @see https://sonarsource.github.io/rspec/#/rspec/S5976/javascript
|
|
6727
|
+
*/
|
|
6728
|
+
'sonarjs/parameterized-tests'?: Linter.RuleEntry<[]>;
|
|
6681
6729
|
/**
|
|
6682
6730
|
* Origins should be verified during cross-origin communications
|
|
6683
6731
|
* @see https://sonarsource.github.io/rspec/#/rspec/S2819/javascript
|
|
@@ -6693,6 +6741,11 @@ interface SonarjsRules {
|
|
|
6693
6741
|
* @see https://sonarsource.github.io/rspec/#/rspec/S1488/javascript
|
|
6694
6742
|
*/
|
|
6695
6743
|
'sonarjs/prefer-immediate-return'?: Linter.RuleEntry<[]>;
|
|
6744
|
+
/**
|
|
6745
|
+
* Native APIs should be preferred over Lodash and Underscore.js methods
|
|
6746
|
+
* @see https://sonarsource.github.io/rspec/#/rspec/S8907/javascript
|
|
6747
|
+
*/
|
|
6748
|
+
'sonarjs/prefer-native-lodash-alternative'?: Linter.RuleEntry<[]>;
|
|
6696
6749
|
/**
|
|
6697
6750
|
* Object literal syntax should be used
|
|
6698
6751
|
* @see https://sonarsource.github.io/rspec/#/rspec/S2428/javascript
|
|
@@ -6828,6 +6881,11 @@ interface SonarjsRules {
|
|
|
6828
6881
|
* @see https://sonarsource.github.io/rspec/#/rspec/S8786/javascript
|
|
6829
6882
|
*/
|
|
6830
6883
|
'sonarjs/super-linear-regex'?: Linter.RuleEntry<[]>;
|
|
6884
|
+
/**
|
|
6885
|
+
* Tests should not be registered asynchronously in suite callbacks
|
|
6886
|
+
* @see https://sonarsource.github.io/rspec/#/rspec/S8785/javascript
|
|
6887
|
+
*/
|
|
6888
|
+
'sonarjs/synchronous-suite-callback'?: Linter.RuleEntry<[]>;
|
|
6831
6889
|
/**
|
|
6832
6890
|
* Tables should have headers
|
|
6833
6891
|
* @see https://sonarsource.github.io/rspec/#/rspec/S5256/javascript
|
|
@@ -7221,6 +7279,11 @@ interface PlaywrightRules {
|
|
|
7221
7279
|
* @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/no-standalone-expect.md
|
|
7222
7280
|
*/
|
|
7223
7281
|
'playwright/no-standalone-expect'?: Linter.RuleEntry<[]>;
|
|
7282
|
+
/**
|
|
7283
|
+
* Disallow assertions on a Locator that can never fail
|
|
7284
|
+
* @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/no-unnecessary-assertions.md
|
|
7285
|
+
*/
|
|
7286
|
+
'playwright/no-unnecessary-assertions'?: Linter.RuleEntry<[]>;
|
|
7224
7287
|
/**
|
|
7225
7288
|
* Prevent unsafe variable references in page.evaluate() and page.addInitScript()
|
|
7226
7289
|
* @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/no-unsafe-references.md
|
package/dist/index.mjs
CHANGED
|
@@ -436,7 +436,8 @@ const markdownConfigs = [...pluginMarkdown.configs.processor.map((config) => ({
|
|
|
436
436
|
"sonarjs/unused-import": "off",
|
|
437
437
|
"sonarjs/no-unused-vars": "off",
|
|
438
438
|
"unicorn/no-useless-undefined": "off",
|
|
439
|
-
"unicorn/no-anonymous-default-export": "off"
|
|
439
|
+
"unicorn/no-anonymous-default-export": "off",
|
|
440
|
+
"unicorn/no-top-level-side-effects": "off"
|
|
440
441
|
}
|
|
441
442
|
}];
|
|
442
443
|
//#endregion
|
|
@@ -643,10 +644,8 @@ const unicornConfigs = [
|
|
|
643
644
|
{
|
|
644
645
|
name: "component-hook/unicorn",
|
|
645
646
|
rules: {
|
|
646
|
-
"unicorn/
|
|
647
|
-
"unicorn/consistent-empty-array-spread": "error",
|
|
647
|
+
"unicorn/consistent-arrow-return-style": "off",
|
|
648
648
|
"unicorn/consistent-function-scoping": ["error", { checkArrowFunctions: false }],
|
|
649
|
-
"unicorn/custom-error-definition": "error",
|
|
650
649
|
"unicorn/filename-case": ["error", {
|
|
651
650
|
cases: {
|
|
652
651
|
kebabCase: true,
|
|
@@ -661,8 +660,10 @@ const unicornConfigs = [
|
|
|
661
660
|
"unicorn/import-style": "off",
|
|
662
661
|
"unicorn/no-abusive-eslint-disable": "off",
|
|
663
662
|
"unicorn/no-array-for-each": "off",
|
|
663
|
+
"unicorn/no-barrel-files": "off",
|
|
664
664
|
"unicorn/no-duplicate-set-values": "error",
|
|
665
665
|
"unicorn/no-empty-file": "off",
|
|
666
|
+
"unicorn/no-for-each": "off",
|
|
666
667
|
"unicorn/no-for-loop": "error",
|
|
667
668
|
"unicorn/no-process-exit": "off",
|
|
668
669
|
"unicorn/no-this-assignment": "off",
|
|
@@ -672,6 +673,7 @@ const unicornConfigs = [
|
|
|
672
673
|
checkArrowFunctionBody: false
|
|
673
674
|
}],
|
|
674
675
|
"unicorn/numeric-separators-style": "off",
|
|
676
|
+
"unicorn/prefer-await": "off",
|
|
675
677
|
"unicorn/prefer-module": "off",
|
|
676
678
|
"unicorn/prefer-query-selector": "error",
|
|
677
679
|
"unicorn/prefer-ternary": "off",
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@component-hook/eslint-plugin",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.5.
|
|
4
|
+
"version": "1.5.1",
|
|
5
5
|
"description": "ESLint config for component hook",
|
|
6
6
|
"author": "Tzuyi",
|
|
7
7
|
"license": "MIT",
|
|
@@ -38,37 +38,37 @@
|
|
|
38
38
|
"tag": "latest"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
41
|
-
"eslint": "^9.39.
|
|
41
|
+
"eslint": "^9.39.5"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"@eslint-community/eslint-plugin-eslint-comments": "^4.7.2",
|
|
45
|
-
"@eslint/js": "^9.39.
|
|
45
|
+
"@eslint/js": "^9.39.5",
|
|
46
46
|
"@eslint/markdown": "^8.0.3",
|
|
47
47
|
"eslint-config-prettier": "^10.1.8",
|
|
48
|
-
"eslint-plugin-de-morgan": "^2.1.
|
|
48
|
+
"eslint-plugin-de-morgan": "^2.1.3",
|
|
49
49
|
"eslint-plugin-import": "^2.32.0",
|
|
50
|
-
"eslint-plugin-jsdoc": "^
|
|
51
|
-
"eslint-plugin-jsonc": "^3.
|
|
50
|
+
"eslint-plugin-jsdoc": "^64.0.2",
|
|
51
|
+
"eslint-plugin-jsonc": "^3.4.1",
|
|
52
52
|
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
53
|
-
"eslint-plugin-perfectionist": "^5.10.
|
|
54
|
-
"eslint-plugin-playwright": "^2.
|
|
53
|
+
"eslint-plugin-perfectionist": "^5.10.1",
|
|
54
|
+
"eslint-plugin-playwright": "^2.11.0",
|
|
55
55
|
"eslint-plugin-prettier": "^5.5.6",
|
|
56
56
|
"eslint-plugin-react": "^7.37.5",
|
|
57
57
|
"eslint-plugin-react-hooks": "^7.1.1",
|
|
58
58
|
"eslint-plugin-regexp": "^3.1.1",
|
|
59
59
|
"eslint-plugin-security": "^4.0.1",
|
|
60
|
-
"eslint-plugin-sonarjs": "^4.
|
|
60
|
+
"eslint-plugin-sonarjs": "^4.2.0",
|
|
61
61
|
"eslint-plugin-testing-library": "^7.16.2",
|
|
62
|
-
"eslint-plugin-unicorn": "^
|
|
63
|
-
"eslint-plugin-vue": "^10.
|
|
64
|
-
"eslint-plugin-yml": "^3.
|
|
65
|
-
"globals": "^17.
|
|
66
|
-
"jsonc-eslint-parser": "^3.
|
|
67
|
-
"typescript-eslint": "^8.
|
|
62
|
+
"eslint-plugin-unicorn": "^73.0.0",
|
|
63
|
+
"eslint-plugin-vue": "^10.10.0",
|
|
64
|
+
"eslint-plugin-yml": "^3.8.1",
|
|
65
|
+
"globals": "^17.9.0",
|
|
66
|
+
"jsonc-eslint-parser": "^3.3.0",
|
|
67
|
+
"typescript-eslint": "^8.66.0",
|
|
68
68
|
"vue-eslint-parser": "^10.4.1"
|
|
69
69
|
},
|
|
70
70
|
"devDependencies": {
|
|
71
|
-
"@eslint/config-inspector": "^3.0
|
|
71
|
+
"@eslint/config-inspector": "^3.2.0",
|
|
72
72
|
"@types/eslint-plugin-security": "^3.0.1",
|
|
73
73
|
"eslint-typegen": "^2.3.1"
|
|
74
74
|
},
|