@component-hook/eslint-plugin 0.1.3-alpha.0 → 0.1.4-alpha.0

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.
Files changed (3) hide show
  1. package/README.md +13 -2
  2. package/dist/index.js +16 -8
  3. package/package.json +5 -5
package/README.md CHANGED
@@ -14,7 +14,7 @@ A opinionated ESLint config preset for JavaScript, TypeScript, Vue, and Prettier
14
14
  ## Features
15
15
 
16
16
  - Support `TypeScript`, `Vue` and `React` out-of-box.
17
- - Built-in `Markdown`, `Sonarjs`, `Security`, `Playwright` and `Testing-library` configs can be referenced for respective needs.
17
+ - Built-in `Markdown`, `Prettier`, `Sonarjs`, `Security`, `Playwright` and `Testing-library` configs can be referenced for respective needs.
18
18
  - Format with Prettier.
19
19
  - Ignores common files like `dist`, `node_modules`, `coverage`, and files in `.gitignore`.
20
20
  - Reasonable defaults, best practices, and just a few lines of configuration.
@@ -64,12 +64,19 @@ See [basic](./index.ts) and [ignores](./configs/ignores.ts) for more details.
64
64
  ```js
65
65
  import {
66
66
  reactPreset, // Includes basic, react, markdown, prettier, sonarjs, security configs
67
- vuePreset, // Includes basic, vue, markdown, prettier, sonarjs, security configs
68
67
  } from '@component-hook/eslint-plugin';
69
68
 
70
69
  export default reactPreset;
71
70
  ```
72
71
 
72
+ ```js
73
+ import {
74
+ vuePreset, // Includes basic, vue, markdown, prettier, sonarjs, security configs
75
+ } from '@component-hook/eslint-plugin';
76
+
77
+ export default vuePreset;
78
+ ```
79
+
73
80
  ## Configs
74
81
 
75
82
  | Name | Type | Reference |
@@ -109,3 +116,7 @@ export default reactPreset;
109
116
  - [eslint-plugin-testing-library/angular](https://github.com/testing-library/eslint-plugin-testing-library/blob/main/lib/configs/angular.ts)
110
117
  - [eslint-plugin-testing-library/marko](https://github.com/testing-library/eslint-plugin-testing-library/blob/main/lib/configs/marko.ts)
111
118
  - [eslint-plugin-playwright/flat/recommended](https://github.com/playwright-community/eslint-plugin-playwright/blob/main/src/index.ts)
119
+
120
+ ```
121
+
122
+ ```
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.0/node_modules/@eslint/js/src/configs/eslint-all.js
27
+ // ../../node_modules/.pnpm/@eslint+js@9.9.1/node_modules/@eslint/js/src/configs/eslint-all.js
28
28
  var require_eslint_all = __commonJS({
29
- "../../node_modules/.pnpm/@eslint+js@9.9.0/node_modules/@eslint/js/src/configs/eslint-all.js"(exports, module) {
29
+ "../../node_modules/.pnpm/@eslint+js@9.9.1/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.0/node_modules/@eslint/js/src/configs/eslint-recommended.js
235
+ // ../../node_modules/.pnpm/@eslint+js@9.9.1/node_modules/@eslint/js/src/configs/eslint-recommended.js
236
236
  var require_eslint_recommended = __commonJS({
237
- "../../node_modules/.pnpm/@eslint+js@9.9.0/node_modules/@eslint/js/src/configs/eslint-recommended.js"(exports, module) {
237
+ "../../node_modules/.pnpm/@eslint+js@9.9.1/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.0/node_modules/@eslint/js/src/index.js
307
+ // ../../node_modules/.pnpm/@eslint+js@9.9.1/node_modules/@eslint/js/src/index.js
308
308
  var require_src = __commonJS({
309
- "../../node_modules/.pnpm/@eslint+js@9.9.0/node_modules/@eslint/js/src/index.js"(exports, module) {
309
+ "../../node_modules/.pnpm/@eslint+js@9.9.1/node_modules/@eslint/js/src/index.js"(exports, module) {
310
310
  "use strict";
311
311
  module.exports = {
312
312
  configs: {
@@ -491,8 +491,16 @@ var prettierConfig = {
491
491
 
492
492
  // configs/sonarjs.ts
493
493
  var sonarjsConfig = {
494
- ...default12.configs.recommended,
495
- name: "component-hook/sonarjs"
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
+ },
503
+ settings: default12.configs.recommended.settings
496
504
  };
497
505
 
498
506
  // configs/security.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@component-hook/eslint-plugin",
3
- "version": "0.1.3-alpha.0",
3
+ "version": "0.1.4-alpha.0",
4
4
  "description": "ESLint config for component hook",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -44,16 +44,16 @@
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",
47
- "eslint-plugin-sonarjs": "^1.0.4",
47
+ "eslint-plugin-sonarjs": "^2.0.2",
48
48
  "eslint-plugin-testing-library": "^6.3.0",
49
49
  "eslint-plugin-vue": "^9.27.0",
50
50
  "globals": "^15.9.0",
51
- "typescript-eslint": "^8.1.0",
51
+ "typescript-eslint": "^8.3.0",
52
52
  "vue-eslint-parser": "^9.4.3"
53
53
  },
54
54
  "devDependencies": {
55
- "@eslint/config-inspector": "^0.5.3",
56
- "@types/eslint": "^9.6.0",
55
+ "@eslint/config-inspector": "^0.5.4",
56
+ "@types/eslint": "^9.6.1",
57
57
  "@types/eslint-plugin-security": "^3.0.0",
58
58
  "@types/eslint__js": "^8.42.3",
59
59
  "tsup": "^8.2.4"