@wsxjs/eslint-plugin-wsx 0.0.14 → 0.0.16

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wsxjs/eslint-plugin-wsx",
3
- "version": "0.0.14",
3
+ "version": "0.0.16",
4
4
  "description": "ESLint plugin for WSX Framework",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
@@ -25,7 +25,7 @@
25
25
  "web-components"
26
26
  ],
27
27
  "dependencies": {
28
- "@wsxjs/wsx-core": "0.0.14"
28
+ "@wsxjs/wsx-core": "0.0.16"
29
29
  },
30
30
  "devDependencies": {
31
31
  "tsup": "^8.0.0",
@@ -1,105 +0,0 @@
1
- // src/configs/flat.ts
2
- var flatConfig = {
3
- name: "wsx/recommended",
4
- files: ["**/*.tsx", "**/*.jsx", "**/*.wsx"],
5
- languageOptions: {
6
- parser: "@typescript-eslint/parser",
7
- ecmaVersion: "latest",
8
- sourceType: "module",
9
- parserOptions: {
10
- ecmaFeatures: {
11
- jsx: true
12
- },
13
- jsxPragma: "h",
14
- jsxFragmentName: "Fragment",
15
- extraFileExtensions: [".wsx"]
16
- },
17
- globals: {
18
- // Browser environment
19
- window: "readonly",
20
- document: "readonly",
21
- console: "readonly",
22
- // Node.js environment
23
- process: "readonly",
24
- Buffer: "readonly",
25
- __dirname: "readonly",
26
- __filename: "readonly",
27
- global: "readonly",
28
- module: "readonly",
29
- require: "readonly",
30
- exports: "readonly",
31
- // Web Components API
32
- HTMLElement: "readonly",
33
- customElements: "readonly",
34
- CustomEvent: "readonly",
35
- ShadowRoot: "readonly",
36
- HTMLSlotElement: "readonly",
37
- CSSStyleSheet: "readonly",
38
- // WSX specific
39
- h: "readonly",
40
- Fragment: "readonly"
41
- }
42
- },
43
- plugins: {
44
- wsx: {
45
- rules: {
46
- "render-method-required": {},
47
- "no-react-imports": {},
48
- "web-component-naming": {}
49
- }
50
- }
51
- },
52
- rules: {
53
- // WSX specific rules
54
- "wsx/render-method-required": "error",
55
- "wsx/no-react-imports": "error",
56
- "wsx/web-component-naming": "warn",
57
- // TypeScript rules (recommended)
58
- "@typescript-eslint/no-unused-vars": ["error", { argsIgnorePattern: "^_" }],
59
- "@typescript-eslint/no-explicit-any": "warn",
60
- "@typescript-eslint/explicit-function-return-type": "off",
61
- "@typescript-eslint/explicit-module-boundary-types": "off",
62
- "@typescript-eslint/no-non-null-assertion": "warn",
63
- // General rules
64
- "no-console": ["warn", { allow: ["warn", "error"] }],
65
- "no-debugger": "error",
66
- "no-unused-vars": "off",
67
- // Use TypeScript version
68
- "no-undef": "off",
69
- // TypeScript handles this
70
- "prefer-const": "error",
71
- "no-var": "error",
72
- "no-duplicate-imports": "error",
73
- "no-trailing-spaces": "error",
74
- "eol-last": "error",
75
- "comma-dangle": ["error", "always-multiline"],
76
- semi: ["error", "always"],
77
- quotes: ["error", "double", { avoidEscape: true, allowTemplateLiterals: true }],
78
- // 明确禁用所有 React 相关规则
79
- "react/react-in-jsx-scope": "off",
80
- "react/prop-types": "off",
81
- "react/jsx-uses-react": "off",
82
- "react/jsx-uses-vars": "off",
83
- "react/jsx-key": "off",
84
- "react/jsx-no-duplicate-props": "off",
85
- "react/jsx-no-undef": "off",
86
- "react/no-array-index-key": "off",
87
- "react/no-unescaped-entities": "off"
88
- },
89
- settings: {
90
- // No React settings needed
91
- }
92
- };
93
- function createFlatConfig(plugin) {
94
- return {
95
- ...flatConfig,
96
- plugins: {
97
- wsx: plugin
98
- }
99
- };
100
- }
101
-
102
- export {
103
- flatConfig,
104
- createFlatConfig
105
- };
@@ -1,130 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
-
20
- // src/configs/flat.ts
21
- var flat_exports = {};
22
- __export(flat_exports, {
23
- createFlatConfig: () => createFlatConfig,
24
- flatConfig: () => flatConfig
25
- });
26
- module.exports = __toCommonJS(flat_exports);
27
- var flatConfig = {
28
- name: "wsx/recommended",
29
- files: ["**/*.tsx", "**/*.jsx", "**/*.wsx"],
30
- languageOptions: {
31
- parser: "@typescript-eslint/parser",
32
- ecmaVersion: "latest",
33
- sourceType: "module",
34
- parserOptions: {
35
- ecmaFeatures: {
36
- jsx: true
37
- },
38
- jsxPragma: "h",
39
- jsxFragmentName: "Fragment",
40
- extraFileExtensions: [".wsx"]
41
- },
42
- globals: {
43
- // Browser environment
44
- window: "readonly",
45
- document: "readonly",
46
- console: "readonly",
47
- // Node.js environment
48
- process: "readonly",
49
- Buffer: "readonly",
50
- __dirname: "readonly",
51
- __filename: "readonly",
52
- global: "readonly",
53
- module: "readonly",
54
- require: "readonly",
55
- exports: "readonly",
56
- // Web Components API
57
- HTMLElement: "readonly",
58
- customElements: "readonly",
59
- CustomEvent: "readonly",
60
- ShadowRoot: "readonly",
61
- HTMLSlotElement: "readonly",
62
- CSSStyleSheet: "readonly",
63
- // WSX specific
64
- h: "readonly",
65
- Fragment: "readonly"
66
- }
67
- },
68
- plugins: {
69
- wsx: {
70
- rules: {
71
- "render-method-required": {},
72
- "no-react-imports": {},
73
- "web-component-naming": {}
74
- }
75
- }
76
- },
77
- rules: {
78
- // WSX specific rules
79
- "wsx/render-method-required": "error",
80
- "wsx/no-react-imports": "error",
81
- "wsx/web-component-naming": "warn",
82
- // TypeScript rules (recommended)
83
- "@typescript-eslint/no-unused-vars": ["error", { argsIgnorePattern: "^_" }],
84
- "@typescript-eslint/no-explicit-any": "warn",
85
- "@typescript-eslint/explicit-function-return-type": "off",
86
- "@typescript-eslint/explicit-module-boundary-types": "off",
87
- "@typescript-eslint/no-non-null-assertion": "warn",
88
- // General rules
89
- "no-console": ["warn", { allow: ["warn", "error"] }],
90
- "no-debugger": "error",
91
- "no-unused-vars": "off",
92
- // Use TypeScript version
93
- "no-undef": "off",
94
- // TypeScript handles this
95
- "prefer-const": "error",
96
- "no-var": "error",
97
- "no-duplicate-imports": "error",
98
- "no-trailing-spaces": "error",
99
- "eol-last": "error",
100
- "comma-dangle": ["error", "always-multiline"],
101
- semi: ["error", "always"],
102
- quotes: ["error", "double", { avoidEscape: true, allowTemplateLiterals: true }],
103
- // 明确禁用所有 React 相关规则
104
- "react/react-in-jsx-scope": "off",
105
- "react/prop-types": "off",
106
- "react/jsx-uses-react": "off",
107
- "react/jsx-uses-vars": "off",
108
- "react/jsx-key": "off",
109
- "react/jsx-no-duplicate-props": "off",
110
- "react/jsx-no-undef": "off",
111
- "react/no-array-index-key": "off",
112
- "react/no-unescaped-entities": "off"
113
- },
114
- settings: {
115
- // No React settings needed
116
- }
117
- };
118
- function createFlatConfig(plugin) {
119
- return {
120
- ...flatConfig,
121
- plugins: {
122
- wsx: plugin
123
- }
124
- };
125
- }
126
- // Annotate the CommonJS export names for ESM import in node:
127
- 0 && (module.exports = {
128
- createFlatConfig,
129
- flatConfig
130
- });
@@ -1,8 +0,0 @@
1
- import {
2
- createFlatConfig,
3
- flatConfig
4
- } from "../chunk-MR6HKTAK.mjs";
5
- export {
6
- createFlatConfig,
7
- flatConfig
8
- };