@component-hook/eslint-plugin 0.1.4-alpha.2 → 0.1.4-alpha.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 +2 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +37 -24
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -43,7 +43,7 @@ export default [
|
|
|
43
43
|
...componentHookPlugin.configs.vue,
|
|
44
44
|
...componentHookPlugin.configs.markdown,
|
|
45
45
|
componentHookPlugin.configs.prettier,
|
|
46
|
-
componentHookPlugin.configs.sonarjs,
|
|
46
|
+
...componentHookPlugin.configs.sonarjs,
|
|
47
47
|
componentHookPlugin.configs.security,
|
|
48
48
|
{
|
|
49
49
|
files: ['**/__tests__/unit/**/*.test.[jt]s?(x)'],
|
|
@@ -86,7 +86,7 @@ export default vuePreset;
|
|
|
86
86
|
| react | `Linter.Config[]` | `eslint-plugin-react/recommended`, `eslint-plugin-react-hooks/recommended`, `eslint-plugin-jsx-a11y/recommended` |
|
|
87
87
|
| markdown | `Linter.Config[]` | `eslint-plugin-markdown/recommended` |
|
|
88
88
|
| prettier | `Linter.Config` | `eslint-plugin-prettier/recommended`, `eslint-config-prettier` |
|
|
89
|
-
| sonarjs | `Linter.Config`
|
|
89
|
+
| sonarjs | `Linter.Config[]` | `eslint-plugin-sonarjs/recommended` |
|
|
90
90
|
| security | `Linter.Config` | `eslint-plugin-security/recommended` |
|
|
91
91
|
| playwright | `Linter.Config` | `eslint-plugin-playwright/flat/recommended` |
|
|
92
92
|
| testing-library/dom | `Linter.Config` | `eslint-plugin-testing-library/dom` |
|
package/dist/index.d.ts
CHANGED
|
@@ -1162,7 +1162,7 @@ declare const _default: {
|
|
|
1162
1162
|
vue: eslint.Linter.Config<eslint.Linter.RulesRecord>[];
|
|
1163
1163
|
markdown: eslint.Linter.Config<eslint.Linter.RulesRecord>[];
|
|
1164
1164
|
prettier: eslint.Linter.Config<eslint.Linter.RulesRecord>;
|
|
1165
|
-
sonarjs: eslint.Linter.Config<eslint.Linter.RulesRecord
|
|
1165
|
+
sonarjs: eslint.Linter.Config<eslint.Linter.RulesRecord>[];
|
|
1166
1166
|
security: eslint.Linter.Config<eslint.Linter.RulesRecord>;
|
|
1167
1167
|
playwright: eslint.Linter.Config<eslint.Linter.RulesRecord>;
|
|
1168
1168
|
'testing-library/dom': eslint.Linter.Config<eslint.Linter.RulesRecord>;
|
package/dist/index.js
CHANGED
|
@@ -420,7 +420,7 @@ var importConfigs = [
|
|
|
420
420
|
}
|
|
421
421
|
},
|
|
422
422
|
{
|
|
423
|
-
name: "component-hook/allow-default-export",
|
|
423
|
+
name: "component-hook/import/allow-default-export",
|
|
424
424
|
files: [
|
|
425
425
|
"**/*.d.ts",
|
|
426
426
|
"**/*.md/**",
|
|
@@ -490,22 +490,35 @@ var prettierConfig = {
|
|
|
490
490
|
};
|
|
491
491
|
|
|
492
492
|
// configs/sonarjs.ts
|
|
493
|
-
var
|
|
494
|
-
|
|
495
|
-
plugins: {
|
|
496
|
-
sonarjs: fixupPluginRules({ rules: default12.rules })
|
|
497
|
-
},
|
|
498
|
-
rules: {
|
|
499
|
-
...default12.configs.recommended.rules,
|
|
500
|
-
"sonarjs/no-commented-code": "warn",
|
|
501
|
-
"sonarjs/no-vue-bypass-sanitization": "warn",
|
|
502
|
-
// TypeError: Cannot read properties of undefined (reading 'members')
|
|
503
|
-
"sonarjs/prefer-enum-initializers": "off",
|
|
504
|
-
// TypeError: Cannot read properties of undefined (reading 'some')
|
|
505
|
-
"sonarjs/sonar-no-fallthrough": "off"
|
|
506
|
-
},
|
|
507
|
-
settings: default12.configs.recommended.settings
|
|
493
|
+
var plugins2 = {
|
|
494
|
+
sonarjs: fixupPluginRules(default12)
|
|
508
495
|
};
|
|
496
|
+
var { settings } = default12.configs.recommended;
|
|
497
|
+
var sonarjsConfigs = [
|
|
498
|
+
{
|
|
499
|
+
name: "component-hook/sonarjs",
|
|
500
|
+
plugins: plugins2,
|
|
501
|
+
rules: {
|
|
502
|
+
...default12.configs.recommended.rules,
|
|
503
|
+
"sonarjs/no-commented-code": "warn",
|
|
504
|
+
"sonarjs/no-vue-bypass-sanitization": "warn",
|
|
505
|
+
// TypeError: Cannot read properties of undefined (reading 'members')
|
|
506
|
+
"sonarjs/prefer-enum-initializers": "off",
|
|
507
|
+
// TypeError: Cannot read properties of undefined (reading 'some')
|
|
508
|
+
"sonarjs/sonar-no-fallthrough": "off"
|
|
509
|
+
},
|
|
510
|
+
settings
|
|
511
|
+
},
|
|
512
|
+
{
|
|
513
|
+
name: "component-hook/sonarjs/allow-unused-import",
|
|
514
|
+
files: ["**/*.md/**"],
|
|
515
|
+
plugins: plugins2,
|
|
516
|
+
rules: {
|
|
517
|
+
"sonarjs/unused-import": "off"
|
|
518
|
+
},
|
|
519
|
+
settings
|
|
520
|
+
}
|
|
521
|
+
];
|
|
509
522
|
|
|
510
523
|
// configs/security.ts
|
|
511
524
|
var securityConfig = {
|
|
@@ -645,7 +658,7 @@ var playwrightConfig = {
|
|
|
645
658
|
|
|
646
659
|
// configs/testing-library.ts
|
|
647
660
|
var configs = default15.configs;
|
|
648
|
-
var
|
|
661
|
+
var plugins3 = {
|
|
649
662
|
"testing-library": fixupPluginRules({ rules: default15.rules })
|
|
650
663
|
};
|
|
651
664
|
var rules4 = {
|
|
@@ -656,7 +669,7 @@ var rules4 = {
|
|
|
656
669
|
};
|
|
657
670
|
var testingLibraryDomConfig = {
|
|
658
671
|
name: "component-hook/testing-library/dom",
|
|
659
|
-
plugins:
|
|
672
|
+
plugins: plugins3,
|
|
660
673
|
rules: {
|
|
661
674
|
...configs.dom.rules,
|
|
662
675
|
...rules4
|
|
@@ -664,7 +677,7 @@ var testingLibraryDomConfig = {
|
|
|
664
677
|
};
|
|
665
678
|
var testingLibraryAngularConfig = {
|
|
666
679
|
name: "component-hook/testing-library/angular",
|
|
667
|
-
plugins:
|
|
680
|
+
plugins: plugins3,
|
|
668
681
|
rules: {
|
|
669
682
|
...configs.angular.rules,
|
|
670
683
|
...rules4
|
|
@@ -672,7 +685,7 @@ var testingLibraryAngularConfig = {
|
|
|
672
685
|
};
|
|
673
686
|
var testingLibraryReactConfig = {
|
|
674
687
|
name: "component-hook/testing-library/react",
|
|
675
|
-
plugins:
|
|
688
|
+
plugins: plugins3,
|
|
676
689
|
rules: {
|
|
677
690
|
...configs.react.rules,
|
|
678
691
|
...rules4
|
|
@@ -680,7 +693,7 @@ var testingLibraryReactConfig = {
|
|
|
680
693
|
};
|
|
681
694
|
var testingLibraryVueConfig = {
|
|
682
695
|
name: "component-hook/testing-library/vue",
|
|
683
|
-
plugins:
|
|
696
|
+
plugins: plugins3,
|
|
684
697
|
rules: {
|
|
685
698
|
...configs.vue.rules,
|
|
686
699
|
...rules4
|
|
@@ -688,7 +701,7 @@ var testingLibraryVueConfig = {
|
|
|
688
701
|
};
|
|
689
702
|
var testingLibraryMarkoConfig = {
|
|
690
703
|
name: "component-hook/testing-library/marko",
|
|
691
|
-
plugins:
|
|
704
|
+
plugins: plugins3,
|
|
692
705
|
rules: {
|
|
693
706
|
...configs.marko.rules,
|
|
694
707
|
...rules4
|
|
@@ -755,7 +768,7 @@ var configs2 = {
|
|
|
755
768
|
vue: vueConfigs,
|
|
756
769
|
markdown: markdownConfigs,
|
|
757
770
|
prettier: prettierConfig,
|
|
758
|
-
sonarjs:
|
|
771
|
+
sonarjs: sonarjsConfigs,
|
|
759
772
|
security: securityConfig,
|
|
760
773
|
playwright: playwrightConfig,
|
|
761
774
|
"testing-library/dom": testingLibraryDomConfig,
|
|
@@ -765,7 +778,7 @@ var configs2 = {
|
|
|
765
778
|
"testing-library/marko": testingLibraryMarkoConfig
|
|
766
779
|
};
|
|
767
780
|
var eslint_plugin_default = { configs: configs2 };
|
|
768
|
-
var basicPreset = [...markdownConfigs, prettierConfig,
|
|
781
|
+
var basicPreset = [...markdownConfigs, prettierConfig, ...sonarjsConfigs, securityConfig];
|
|
769
782
|
var reactPreset = [...basicConfigs, ...reactConfigs, ...basicPreset];
|
|
770
783
|
var vuePreset = [...basicConfigs, ...vueConfigs, ...basicPreset];
|
|
771
784
|
var vueSkyline = [
|