@qualcomm-ui/eslint-config-typescript 1.0.0 → 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.
- package/LICENSE.txt +31 -31
- package/index.d.ts +91 -0
- package/index.js +0 -73
- package/package.json +8 -3
package/LICENSE.txt
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
|
|
2
|
-
|
|
3
|
-
Redistribution and use in source and binary forms, with or without
|
|
4
|
-
modification, are permitted (subject to the limitations in the
|
|
5
|
-
disclaimer below) provided that the following conditions are met:
|
|
6
|
-
|
|
7
|
-
* Redistributions of source code must retain the above copyright
|
|
8
|
-
notice, this list of conditions and the following disclaimer.
|
|
9
|
-
|
|
10
|
-
* Redistributions in binary form must reproduce the above
|
|
11
|
-
copyright notice, this list of conditions and the following
|
|
12
|
-
disclaimer in the documentation and/or other materials provided
|
|
13
|
-
with the distribution.
|
|
14
|
-
|
|
15
|
-
* Neither the name of Qualcomm Technologies, Inc. nor the names of its
|
|
16
|
-
contributors may be used to endorse or promote products derived
|
|
17
|
-
from this software without specific prior written permission.
|
|
18
|
-
|
|
19
|
-
NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE
|
|
20
|
-
GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT
|
|
21
|
-
HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
|
|
22
|
-
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
|
23
|
-
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
|
24
|
-
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
|
25
|
-
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
26
|
-
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
|
|
27
|
-
GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
28
|
-
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
|
|
29
|
-
IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
|
30
|
-
OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
|
|
31
|
-
IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
1
|
+
Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
|
|
2
|
+
|
|
3
|
+
Redistribution and use in source and binary forms, with or without
|
|
4
|
+
modification, are permitted (subject to the limitations in the
|
|
5
|
+
disclaimer below) provided that the following conditions are met:
|
|
6
|
+
|
|
7
|
+
* Redistributions of source code must retain the above copyright
|
|
8
|
+
notice, this list of conditions and the following disclaimer.
|
|
9
|
+
|
|
10
|
+
* Redistributions in binary form must reproduce the above
|
|
11
|
+
copyright notice, this list of conditions and the following
|
|
12
|
+
disclaimer in the documentation and/or other materials provided
|
|
13
|
+
with the distribution.
|
|
14
|
+
|
|
15
|
+
* Neither the name of Qualcomm Technologies, Inc. nor the names of its
|
|
16
|
+
contributors may be used to endorse or promote products derived
|
|
17
|
+
from this software without specific prior written permission.
|
|
18
|
+
|
|
19
|
+
NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE
|
|
20
|
+
GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT
|
|
21
|
+
HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
|
|
22
|
+
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
|
23
|
+
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
|
24
|
+
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
|
25
|
+
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
26
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
|
|
27
|
+
GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
28
|
+
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
|
|
29
|
+
IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
|
30
|
+
OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
|
|
31
|
+
IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
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,8 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qualcomm-ui/eslint-config-typescript",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "QUI ESLint config for consistent TypeScript code",
|
|
5
5
|
"author": "Ryan Bower",
|
|
6
|
+
"license": "BSD-3-Clause-Clear",
|
|
6
7
|
"repository": "https://github.com/qualcomm/qualcomm-ui",
|
|
7
8
|
"sideEffects": false,
|
|
8
9
|
"type": "module",
|
|
@@ -11,7 +12,10 @@
|
|
|
11
12
|
"config"
|
|
12
13
|
],
|
|
13
14
|
"main": "index.js",
|
|
15
|
+
"module": "index.js",
|
|
16
|
+
"types": "index.d.ts",
|
|
14
17
|
"files": [
|
|
18
|
+
"index.d.ts",
|
|
15
19
|
"index.js",
|
|
16
20
|
"base.js",
|
|
17
21
|
"jsdoc.js",
|
|
@@ -26,12 +30,13 @@
|
|
|
26
30
|
"access": "public"
|
|
27
31
|
},
|
|
28
32
|
"devDependencies": {
|
|
29
|
-
"@
|
|
33
|
+
"@eslint/core": "^1.0.0",
|
|
34
|
+
"@qualcomm-ui/cli": "^1.0.2",
|
|
30
35
|
"@stylistic/eslint-plugin": "5.2.0",
|
|
31
36
|
"@typescript-eslint/eslint-plugin": "8.46.2",
|
|
32
37
|
"@typescript-eslint/parser": "8.46.2",
|
|
33
38
|
"eslint-plugin-comment-length": "^2.2.1",
|
|
34
|
-
"typescript-eslint": "8.
|
|
39
|
+
"typescript-eslint": "8.46.2"
|
|
35
40
|
},
|
|
36
41
|
"peerDependencies": {
|
|
37
42
|
"@eslint/js": ">=9.37.0",
|