@qualcomm-ui/eslint-config-typescript 1.0.1 → 1.1.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/index.d.ts +91 -0
  2. package/index.js +0 -73
  3. package/package.json +6 -2
package/index.d.ts ADDED
@@ -0,0 +1,91 @@
1
+ import type {ConfigObject} from "@eslint/core"
2
+
3
+ interface TypescriptConfigExport {
4
+ configs: {
5
+ /**
6
+ * Base TypeScript configuration with parser and plugin setup.
7
+ * Required for each config to work.
8
+ */
9
+ base: ConfigObject
10
+
11
+ /**
12
+ * JSDoc validation rules (alignment, tag names, formatting).
13
+ * Use for code with public APIs or documentation requirements.
14
+ */
15
+ jsdoc: ConfigObject
16
+
17
+ /**
18
+ * TypeScript naming conventions (PascalCase for types, camelCase for
19
+ * properties, etc). Requires type information.
20
+ */
21
+ namingConventions: ConfigObject
22
+
23
+ /**
24
+ * Import optimizations for library code (consistent type imports, no side
25
+ * effects). Use for packages consumed by other projects.
26
+ */
27
+ performance: ConfigObject
28
+
29
+ /**
30
+ * Array of recommended configs. This is equivalent to the following:
31
+ * ```js
32
+ * import qui from "@qualcomm-ui/eslint-config-typescript"
33
+ *
34
+ * const recommended = [
35
+ * qui.configs.base,
36
+ * qui.configs.styleGuide,
37
+ * qui.configs.sortKeys,
38
+ * qui.configs.typeChecks,
39
+ * qui.configs.namingConventions,
40
+ * ]
41
+ * ```
42
+ *
43
+ * Usage:
44
+ *
45
+ * @example
46
+ * ```js
47
+ * // eslint.config.js
48
+ * import {defineConfig} from "eslint/config"
49
+ * import quiEslintTs from "@qualcomm-ui/eslint-config-typescript"
50
+ *
51
+ * export default defineConfig(
52
+ * {
53
+ * // other settings
54
+ * },
55
+ * {
56
+ * extends: [...quiEslintTs.configs.recommended],
57
+ * files: [/*TS Files*\/]
58
+ * },
59
+ * )
60
+ * ```
61
+ */
62
+ recommended: ConfigObject[]
63
+
64
+ /**
65
+ * Sort object properties, interface members, and type definitions
66
+ * alphabetically.
67
+ */
68
+ sortKeys: ConfigObject
69
+
70
+ /**
71
+ * Enforce explicit type exports for public APIs (prevents runtime bloat).
72
+ * Use for library entry points and public exports.
73
+ */
74
+ strictExports: ConfigObject
75
+
76
+ /**
77
+ * Code style rules (imports, formatting, unused code, etc).
78
+ * Enforces Prettier, import ordering, and code quality standards.
79
+ */
80
+ styleGuide: ConfigObject
81
+
82
+ /**
83
+ * Type-aware linting rules (await-thenable, no-unsafe-call, etc).
84
+ * Requires TypeScript type information. Catches type-related bugs.
85
+ */
86
+ typeChecks: ConfigObject
87
+ }
88
+ }
89
+
90
+ declare const typescriptConfig: TypescriptConfigExport
91
+ export default typescriptConfig
package/index.js CHANGED
@@ -9,87 +9,14 @@ import typeChecks from "./type-checks.js"
9
9
 
10
10
  export default {
11
11
  configs: {
12
- /**
13
- * Base TypeScript configuration with parser and plugin setup.
14
- * Required for all other configs to work.
15
- */
16
12
  base,
17
-
18
- /**
19
- * JSDoc validation rules (alignment, tag names, formatting).
20
- * Use for code with public APIs or documentation requirements.
21
- */
22
13
  jsdoc,
23
-
24
- /**
25
- * TypeScript naming conventions (PascalCase for types, camelCase for
26
- * properties, etc). Requires type information.
27
- */
28
14
  namingConventions,
29
-
30
- /**
31
- * Import optimizations for library code (consistent type imports, no side
32
- * effects). Use for packages consumed by other projects.
33
- */
34
15
  performance,
35
-
36
- /**
37
- * Array of recommended configs. This is equivalent to the following:
38
- * ```js
39
- * import qui from "@qualcomm-ui/eslint-config-typescript"
40
- *
41
- * const recommended = [
42
- * qui.configs.base,
43
- * qui.configs.styleGuide,
44
- * qui.configs.sortKeys,
45
- * qui.configs.typeChecks,
46
- * qui.configs.namingConventions,
47
- * ]
48
- * ```
49
- *
50
- * Usage:
51
- *
52
- * @example
53
- * ```js
54
- * // eslint.config.js
55
- * import {defineConfig} from "eslint/config"
56
- * import quiEslintTs from "@qualcomm-ui/eslint-config-typescript"
57
- *
58
- * export default defineConfig(
59
- * {
60
- * // other settings
61
- * },
62
- * {
63
- * extends: [...quiEslintTs.configs.recommended],
64
- * files: [/*TS Files*\/]
65
- * },
66
- * )
67
- * ```
68
- */
69
16
  recommended: [base, styleGuide, sortKeys, typeChecks, namingConventions],
70
-
71
- /**
72
- * Sort object properties, interface members, and type definitions
73
- * alphabetically.
74
- */
75
17
  sortKeys,
76
-
77
- /**
78
- * Enforce explicit type exports for public APIs (prevents runtime bloat).
79
- * Use for library entry points and public exports.
80
- */
81
18
  strictExports,
82
-
83
- /**
84
- * Code style rules (imports, formatting, unused code, etc).
85
- * Enforces Prettier, import ordering, and code quality standards.
86
- */
87
19
  styleGuide,
88
-
89
- /**
90
- * Type-aware linting rules (await-thenable, no-unsafe-call, etc).
91
- * Requires TypeScript type information. Catches type-related bugs.
92
- */
93
20
  typeChecks,
94
21
  },
95
22
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qualcomm-ui/eslint-config-typescript",
3
- "version": "1.0.1",
3
+ "version": "1.1.0",
4
4
  "description": "QUI ESLint config for consistent TypeScript code",
5
5
  "author": "Ryan Bower",
6
6
  "license": "BSD-3-Clause-Clear",
@@ -12,7 +12,10 @@
12
12
  "config"
13
13
  ],
14
14
  "main": "index.js",
15
+ "module": "index.js",
16
+ "types": "index.d.ts",
15
17
  "files": [
18
+ "index.d.ts",
16
19
  "index.js",
17
20
  "base.js",
18
21
  "jsdoc.js",
@@ -27,12 +30,13 @@
27
30
  "access": "public"
28
31
  },
29
32
  "devDependencies": {
33
+ "@eslint/core": "^1.0.0",
30
34
  "@qualcomm-ui/cli": "^1.0.2",
31
35
  "@stylistic/eslint-plugin": "5.2.0",
32
36
  "@typescript-eslint/eslint-plugin": "8.46.2",
33
37
  "@typescript-eslint/parser": "8.46.2",
34
38
  "eslint-plugin-comment-length": "^2.2.1",
35
- "typescript-eslint": "8.40.0"
39
+ "typescript-eslint": "8.46.2"
36
40
  },
37
41
  "peerDependencies": {
38
42
  "@eslint/js": ">=9.37.0",