@component-hook/eslint-plugin 0.1.4-alpha.1 → 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 -22
- 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,20 +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
|
-
},
|
|
505
|
-
settings: default12.configs.recommended.settings
|
|
493
|
+
var plugins2 = {
|
|
494
|
+
sonarjs: fixupPluginRules(default12)
|
|
506
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
|
+
];
|
|
507
522
|
|
|
508
523
|
// configs/security.ts
|
|
509
524
|
var securityConfig = {
|
|
@@ -643,7 +658,7 @@ var playwrightConfig = {
|
|
|
643
658
|
|
|
644
659
|
// configs/testing-library.ts
|
|
645
660
|
var configs = default15.configs;
|
|
646
|
-
var
|
|
661
|
+
var plugins3 = {
|
|
647
662
|
"testing-library": fixupPluginRules({ rules: default15.rules })
|
|
648
663
|
};
|
|
649
664
|
var rules4 = {
|
|
@@ -654,7 +669,7 @@ var rules4 = {
|
|
|
654
669
|
};
|
|
655
670
|
var testingLibraryDomConfig = {
|
|
656
671
|
name: "component-hook/testing-library/dom",
|
|
657
|
-
plugins:
|
|
672
|
+
plugins: plugins3,
|
|
658
673
|
rules: {
|
|
659
674
|
...configs.dom.rules,
|
|
660
675
|
...rules4
|
|
@@ -662,7 +677,7 @@ var testingLibraryDomConfig = {
|
|
|
662
677
|
};
|
|
663
678
|
var testingLibraryAngularConfig = {
|
|
664
679
|
name: "component-hook/testing-library/angular",
|
|
665
|
-
plugins:
|
|
680
|
+
plugins: plugins3,
|
|
666
681
|
rules: {
|
|
667
682
|
...configs.angular.rules,
|
|
668
683
|
...rules4
|
|
@@ -670,7 +685,7 @@ var testingLibraryAngularConfig = {
|
|
|
670
685
|
};
|
|
671
686
|
var testingLibraryReactConfig = {
|
|
672
687
|
name: "component-hook/testing-library/react",
|
|
673
|
-
plugins:
|
|
688
|
+
plugins: plugins3,
|
|
674
689
|
rules: {
|
|
675
690
|
...configs.react.rules,
|
|
676
691
|
...rules4
|
|
@@ -678,7 +693,7 @@ var testingLibraryReactConfig = {
|
|
|
678
693
|
};
|
|
679
694
|
var testingLibraryVueConfig = {
|
|
680
695
|
name: "component-hook/testing-library/vue",
|
|
681
|
-
plugins:
|
|
696
|
+
plugins: plugins3,
|
|
682
697
|
rules: {
|
|
683
698
|
...configs.vue.rules,
|
|
684
699
|
...rules4
|
|
@@ -686,7 +701,7 @@ var testingLibraryVueConfig = {
|
|
|
686
701
|
};
|
|
687
702
|
var testingLibraryMarkoConfig = {
|
|
688
703
|
name: "component-hook/testing-library/marko",
|
|
689
|
-
plugins:
|
|
704
|
+
plugins: plugins3,
|
|
690
705
|
rules: {
|
|
691
706
|
...configs.marko.rules,
|
|
692
707
|
...rules4
|
|
@@ -753,7 +768,7 @@ var configs2 = {
|
|
|
753
768
|
vue: vueConfigs,
|
|
754
769
|
markdown: markdownConfigs,
|
|
755
770
|
prettier: prettierConfig,
|
|
756
|
-
sonarjs:
|
|
771
|
+
sonarjs: sonarjsConfigs,
|
|
757
772
|
security: securityConfig,
|
|
758
773
|
playwright: playwrightConfig,
|
|
759
774
|
"testing-library/dom": testingLibraryDomConfig,
|
|
@@ -763,7 +778,7 @@ var configs2 = {
|
|
|
763
778
|
"testing-library/marko": testingLibraryMarkoConfig
|
|
764
779
|
};
|
|
765
780
|
var eslint_plugin_default = { configs: configs2 };
|
|
766
|
-
var basicPreset = [...markdownConfigs, prettierConfig,
|
|
781
|
+
var basicPreset = [...markdownConfigs, prettierConfig, ...sonarjsConfigs, securityConfig];
|
|
767
782
|
var reactPreset = [...basicConfigs, ...reactConfigs, ...basicPreset];
|
|
768
783
|
var vuePreset = [...basicConfigs, ...vueConfigs, ...basicPreset];
|
|
769
784
|
var vueSkyline = [
|