@esphome/compose-eslint 0.0.1 → 0.1.2

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.
@@ -0,0 +1,16 @@
1
+ import { ESLint, Linter } from 'eslint';
2
+
3
+ /**
4
+ * ESPHome TSX ESLint Plugin
5
+ *
6
+ * This package provides custom ESLint rules for enforcing
7
+ * best practices and constraints in ESPHome TSX projects.
8
+ */
9
+
10
+ interface ComposeESLint {
11
+ plugin: ESLint.Plugin;
12
+ recommended: Linter.Config[];
13
+ }
14
+ declare const composeESLint: ComposeESLint;
15
+
16
+ export { type ComposeESLint, composeESLint as default };
package/dist/index.mjs ADDED
@@ -0,0 +1,46 @@
1
+ // src/index.ts
2
+ import tseslint from "typescript-eslint";
3
+ var plugin = {
4
+ meta: {
5
+ name: "@esphome/compose-eslint",
6
+ version: "0.0.1"
7
+ },
8
+ rules: {
9
+ // Custom rules will be added here
10
+ }
11
+ };
12
+ var recommended = [
13
+ ...tseslint.configs.recommended,
14
+ {
15
+ plugins: {
16
+ "@esphome/compose-eslint": plugin
17
+ },
18
+ languageOptions: {
19
+ parserOptions: {
20
+ ecmaVersion: "latest",
21
+ sourceType: "module",
22
+ ecmaFeatures: { jsx: true }
23
+ }
24
+ },
25
+ rules: {
26
+ // Demote to warning: the JSX factory import (ESPCompose) and top-level
27
+ // function declarations (which the compiler transforms into ESPHome
28
+ // <script> elements) appear unused to static analysis but are consumed
29
+ // at compile time.
30
+ "@typescript-eslint/no-unused-vars": ["warn", {
31
+ varsIgnorePattern: "^ESPCompose$"
32
+ }]
33
+ }
34
+ },
35
+ {
36
+ ignores: ["**/dist/**", "**/node_modules/**", "**/.espcompose/**"]
37
+ }
38
+ ];
39
+ var composeESLint = {
40
+ plugin,
41
+ recommended
42
+ };
43
+ var index_default = composeESLint;
44
+ export {
45
+ index_default as default
46
+ };
package/package.json CHANGED
@@ -1,13 +1,14 @@
1
1
  {
2
2
  "name": "@esphome/compose-eslint",
3
- "version": "0.0.1",
3
+ "version": "0.1.2",
4
4
  "description": "ESLint plugin with custom rules for ESPHome Compose projects",
5
- "main": "dist/index.js",
6
- "types": "dist/index.d.ts",
5
+ "main": "dist/index.mjs",
6
+ "module": "dist/index.mjs",
7
+ "types": "dist/index.d.mts",
7
8
  "exports": {
8
9
  ".": {
9
- "require": "./dist/index.js",
10
- "types": "./dist/index.d.ts"
10
+ "types": "./dist/index.d.mts",
11
+ "import": "./dist/index.mjs"
11
12
  }
12
13
  },
13
14
  "files": [
@@ -21,24 +22,32 @@
21
22
  ],
22
23
  "author": "",
23
24
  "license": "MIT",
25
+ "repository": {
26
+ "type": "git",
27
+ "url": "git+https://github.com/xmlguy74/espcompose.git",
28
+ "directory": "packages/eslint"
29
+ },
30
+ "engines": {
31
+ "node": ">=22"
32
+ },
24
33
  "publishConfig": {
25
34
  "access": "public"
26
35
  },
36
+ "dependencies": {
37
+ "typescript-eslint": "^8.0.0"
38
+ },
27
39
  "peerDependencies": {
28
- "eslint": ">=8.0.0"
40
+ "eslint": ">=9.0.0"
29
41
  },
30
42
  "devDependencies": {
31
- "@typescript-eslint/eslint-plugin": "^7.0.0",
32
- "@typescript-eslint/parser": "^7.0.0",
33
- "@types/eslint": "^8.0.0",
34
- "eslint": "^8.0.0",
43
+ "eslint": "^9.0.0",
35
44
  "tsup": "^8.0.0",
36
45
  "typescript": "^5.4.0"
37
46
  },
38
47
  "scripts": {
39
- "build": "tsup src/index.ts --format cjs --dts",
48
+ "build": "tsup src/index.ts --format esm --dts",
40
49
  "clean": "rimraf dist",
41
- "lint": "eslint --ext .ts src",
50
+ "lint": "eslint src",
42
51
  "test": "echo \"No tests yet\""
43
52
  }
44
53
  }
package/dist/index.d.ts DELETED
@@ -1,12 +0,0 @@
1
- import { ESLint } from 'eslint';
2
-
3
- /**
4
- * ESPHome TSX ESLint Plugin
5
- *
6
- * This package provides custom ESLint rules for enforcing
7
- * best practices and constraints in ESPHome TSX projects.
8
- */
9
-
10
- declare const plugin: ESLint.Plugin;
11
-
12
- export { plugin as default };
package/dist/index.js DELETED
@@ -1,21 +0,0 @@
1
- "use strict";
2
-
3
- // src/index.ts
4
- var plugin = {
5
- meta: {
6
- name: "@esphome-tsx/eslint-plugin",
7
- version: "0.0.1"
8
- },
9
- rules: {
10
- // Custom rules will be added here
11
- },
12
- configs: {
13
- recommended: {
14
- plugins: ["@esphome-tsx"],
15
- rules: {
16
- // Recommended rule configurations will be added here
17
- }
18
- }
19
- }
20
- };
21
- module.exports = plugin;