@amazon-devices/eslint-plugin-kepler 0.1.8 → 0.1.11
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/README.md +13 -11
- package/dist/formatters/default.js +8 -189
- package/dist/formatters/default.js.LICENSE.txt +1 -0
- package/dist/index.js +1 -107
- package/package.json +1 -1
- package/dist/formatters/KeplerReport.js +0 -40
- package/dist/metrics/Metrics.js +0 -69
- package/dist/metrics/TelemetryService.js +0 -48
- package/dist/rules/apiPrivileges/ApiPrivilegeStateCheck.js +0 -102
- package/dist/rules/apiPrivileges/ApiPrivilegesCheck.js +0 -67
- package/dist/rules/apiPrivileges/apiPermissionsNeeded.js +0 -58
- package/dist/rules/apiPrivileges/manifestHelper.js +0 -44
- package/dist/rules/backwardCompatibility/BackwardCompatibility.js +0 -119
- package/dist/rules/backwardCompatibility/BackwardCompatibilityCopyOnPack.js +0 -101
- package/dist/rules/backwardCompatibility/BackwardCompatibilitySysconfCheck.js +0 -73
- package/dist/rules/performance/Animated.js +0 -64
- package/dist/rules/performance/CheckSubscription.js +0 -150
- package/dist/rules/performance/DetectSplashScreen.js +0 -62
- package/dist/rules/performance/DetectUseReportFullyDrawn.js +0 -50
- package/dist/rules/performance/FlatList.js +0 -39
- package/dist/rules/systemDistributedLibs/SDLPackageVersionCheck.js +0 -136
- package/dist/rules/systemDistributedLibs/SDLPackageVersionCheckImports.js +0 -58
- package/dist/rules/systemDistributedLibs/sdlHelpers.js +0 -232
- package/dist/rules/systemDistributedLibs/sdlRuleMessages.js +0 -25
- package/dist/state/KeplerESLintPluginStateManager.js +0 -94
- package/dist/utils/Constants.js +0 -40
- package/dist/utils/PackageUtils.js +0 -50
- package/dist/utils/RuleUtils.js +0 -128
package/README.md
CHANGED
|
@@ -36,11 +36,11 @@ To use Vega ESLint Plugin, complete the below steps in your Vega App Project.
|
|
|
36
36
|
```
|
|
37
37
|
|
|
38
38
|
Available configs:
|
|
39
|
-
- `kepler` - All
|
|
39
|
+
- `kepler` - All Vega rules (performance + system distributed library checks + API privileges + backward compatibility)
|
|
40
40
|
- `performance` - Performance-related rules only
|
|
41
41
|
- `system-distributed-libs` - System distributed library checks (package.json validation and import informational flagging)
|
|
42
42
|
- `api-privileges` - API privileges validation rules
|
|
43
|
-
- `backward-compatibility` - Backward compatibility validation rules for
|
|
43
|
+
- `backward-compatibility` - Backward compatibility validation rules for Vega library projects
|
|
44
44
|
|
|
45
45
|
You can use multiple configs:
|
|
46
46
|
```javascript
|
|
@@ -75,7 +75,8 @@ To use Vega ESLint Plugin, complete the below steps in your Vega App Project.
|
|
|
75
75
|
"@amazon-devices/kepler/api-privileges-check": "error",
|
|
76
76
|
"@amazon-devices/kepler/api-privilege-state-check": "error",
|
|
77
77
|
"@amazon-devices/kepler/backward-compatibility": "error",
|
|
78
|
-
"@amazon-devices/kepler/backward-compatibility-copy-on-pack": "error"
|
|
78
|
+
"@amazon-devices/kepler/backward-compatibility-copy-on-pack": "error",
|
|
79
|
+
"@amazon-devices/kepler/package-migration": "error"
|
|
79
80
|
}
|
|
80
81
|
}
|
|
81
82
|
```
|
|
@@ -201,20 +202,25 @@ Flags imports of system distributed libraries with informational messages to ens
|
|
|
201
202
|
|
|
202
203
|
## Backward Compatibility Rules
|
|
203
204
|
|
|
204
|
-
The plugin includes rules for managing backward compatibility in
|
|
205
|
+
The plugin includes rules for managing backward compatibility in Vega library projects:
|
|
205
206
|
|
|
206
207
|
### `@amazon-devices/kepler/backward-compatibility`
|
|
207
|
-
Validates that
|
|
208
|
+
Validates that Vega library projects have proper version compatibility configuration:
|
|
208
209
|
- Checks for the existence of `kepler-compatibility.json` file in the project root
|
|
209
210
|
- Validates that the current package version is listed in the compatibility file
|
|
210
|
-
- Only runs in
|
|
211
|
+
- Only runs in repositories with SDL project configuration
|
|
211
212
|
|
|
212
213
|
### `@amazon-devices/kepler/backward-compatibility-copy-on-pack`
|
|
213
214
|
Ensures that the `kepler-compatibility.json` file is included in npm packages:
|
|
214
215
|
- Validates that `kepler-compatibility.json` is listed in the `files` array of `package.json`
|
|
215
|
-
- Only runs in
|
|
216
|
+
- Only runs in repositories with SDL project configuration
|
|
216
217
|
- Required for proper version compatibility validation in published packages
|
|
217
218
|
|
|
219
|
+
### `@amazon-devices/kepler/package-migration`
|
|
220
|
+
Validates that packages requiring migration to system distributed libraries are updated to newer versions:
|
|
221
|
+
- Checks specific packages that have been released as system distributed libraries
|
|
222
|
+
- Provides package version recommendations to make use of SDL released libs
|
|
223
|
+
|
|
218
224
|
## API Privileges Rules
|
|
219
225
|
|
|
220
226
|
The plugin includes two rules for validating API privilege requirements:
|
|
@@ -236,10 +242,6 @@ The rule checks imports of known privilege-requiring packages and ensures the co
|
|
|
236
242
|
### `@amazon-devices/kepler/api-privilege-state-check`
|
|
237
243
|
Validates that APIs requiring user privilege prompts have proper SecurityManager implementation. Some APIs require explicit user consent through privilege request dialogs.
|
|
238
244
|
|
|
239
|
-
**Requirements for APIs with user prompts:**
|
|
240
|
-
- SecurityManager package dependency (`@amazon-devices/security-manager-lib` or `@amazon-devices/security-manager-lib`) in `package.json`
|
|
241
|
-
- SecurityManager method calls (`SecurityManager.getPrivilegeState` and `SecurityManager.requestPrivilege`) in the codebase
|
|
242
|
-
|
|
243
245
|
**Example error:**
|
|
244
246
|
```
|
|
245
247
|
The API @amazon-devices/kepler-identifiers requires you prompt the user for privilige acceptance. See the Vega documentation for this API as well as for SecurityManager.
|