@component-hook/eslint-plugin 0.1.4-alpha.2 → 0.1.4

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 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` | `eslint-plugin-sonarjs/recommended` |
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
@@ -24,9 +24,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
24
24
  mod
25
25
  ));
26
26
 
27
- // ../../node_modules/.pnpm/@eslint+js@9.9.1/node_modules/@eslint/js/src/configs/eslint-all.js
27
+ // ../../node_modules/.pnpm/@eslint+js@9.10.0/node_modules/@eslint/js/src/configs/eslint-all.js
28
28
  var require_eslint_all = __commonJS({
29
- "../../node_modules/.pnpm/@eslint+js@9.9.1/node_modules/@eslint/js/src/configs/eslint-all.js"(exports, module) {
29
+ "../../node_modules/.pnpm/@eslint+js@9.10.0/node_modules/@eslint/js/src/configs/eslint-all.js"(exports, module) {
30
30
  "use strict";
31
31
  module.exports = Object.freeze({
32
32
  "rules": {
@@ -232,9 +232,9 @@ var require_eslint_all = __commonJS({
232
232
  }
233
233
  });
234
234
 
235
- // ../../node_modules/.pnpm/@eslint+js@9.9.1/node_modules/@eslint/js/src/configs/eslint-recommended.js
235
+ // ../../node_modules/.pnpm/@eslint+js@9.10.0/node_modules/@eslint/js/src/configs/eslint-recommended.js
236
236
  var require_eslint_recommended = __commonJS({
237
- "../../node_modules/.pnpm/@eslint+js@9.9.1/node_modules/@eslint/js/src/configs/eslint-recommended.js"(exports, module) {
237
+ "../../node_modules/.pnpm/@eslint+js@9.10.0/node_modules/@eslint/js/src/configs/eslint-recommended.js"(exports, module) {
238
238
  "use strict";
239
239
  module.exports = Object.freeze({
240
240
  rules: Object.freeze({
@@ -304,9 +304,9 @@ var require_eslint_recommended = __commonJS({
304
304
  }
305
305
  });
306
306
 
307
- // ../../node_modules/.pnpm/@eslint+js@9.9.1/node_modules/@eslint/js/src/index.js
307
+ // ../../node_modules/.pnpm/@eslint+js@9.10.0/node_modules/@eslint/js/src/index.js
308
308
  var require_src = __commonJS({
309
- "../../node_modules/.pnpm/@eslint+js@9.9.1/node_modules/@eslint/js/src/index.js"(exports, module) {
309
+ "../../node_modules/.pnpm/@eslint+js@9.10.0/node_modules/@eslint/js/src/index.js"(exports, module) {
310
310
  "use strict";
311
311
  module.exports = {
312
312
  configs: {
@@ -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 sonarjsConfig = {
494
- name: "component-hook/sonarjs",
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 plugins2 = {
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: plugins2,
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: plugins2,
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: plugins2,
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: plugins2,
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: plugins2,
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: sonarjsConfig,
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, sonarjsConfig, securityConfig];
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 = [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@component-hook/eslint-plugin",
3
- "version": "0.1.4-alpha.2",
3
+ "version": "0.1.4",
4
4
  "description": "ESLint config for component hook",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -40,7 +40,7 @@
40
40
  "eslint-plugin-markdown": "^5.1.0",
41
41
  "eslint-plugin-playwright": "^1.6.2",
42
42
  "eslint-plugin-prettier": "^5.2.1",
43
- "eslint-plugin-react": "^7.35.2",
43
+ "eslint-plugin-react": "^7.36.1",
44
44
  "eslint-plugin-react-hooks": "^4.6.2",
45
45
  "eslint-plugin-regexp": "^2.6.0",
46
46
  "eslint-plugin-security": "^3.0.1",
@@ -48,7 +48,7 @@
48
48
  "eslint-plugin-testing-library": "^6.3.0",
49
49
  "eslint-plugin-vue": "^9.28.0",
50
50
  "globals": "^15.9.0",
51
- "typescript-eslint": "^8.4.0",
51
+ "typescript-eslint": "^8.5.0",
52
52
  "vue-eslint-parser": "^9.4.3"
53
53
  },
54
54
  "devDependencies": {