Skip to content

Commit 1ad94ec

Browse files
committed
Release v0.22.0
1 parent 4b29079 commit 1ad94ec

561 files changed

Lines changed: 41993 additions & 964 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.env.example

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# More information about envs and how the flow is set up
2+
# can be found in src/services/appConfig/README.md
3+
4+
# use this for additional debug option
5+
# possible values: true, false, 1, 0 or undefined
6+
REACT_APP_DEBUG=
7+
8+
# use this for tweak API url
9+
# possible values: string values or undefined
10+
REACT_APP_API_URL=
11+
12+
# use this for API authentication
13+
# possible values: string values or undefined
14+
REACT_APP_API_KEY=
15+
16+
# the email to sign automatically in with when in dev mode
17+
# if not specified or not in dev mode, the auto-sign-in feature is inactive
18+
#
19+
# possible values: string values or undefined
20+
REACT_APP_DEV_AUTO_SIGN_IN_EMAIL=
21+
22+
# the password to automatically sign in with when in dev mode
23+
# if not specified or not in dev mode, the auto-sign-in feature is inactive
24+
#
25+
# possible values: string values or undefined
26+
REACT_APP_DEV_AUTO_SIGN_IN_PASSWORD=
27+
28+
# the boolean flag to skip input validation on login screen when in dev mode
29+
# if not specified or not in dev mode, the input validation remains enabled
30+
#
31+
# possible values: true, false, 1, 0 or undefined
32+
REACT_APP_SKIP_LOGIN_INPUTS_VALIDATION=
33+
34+
# the boolean flag that forces to show the login screen & make the user log in manually
35+
# if not specified, a false is assumed by default
36+
# useful for testing environment
37+
#
38+
# possible values: true, false or undefined
39+
REACT_APP_FORCE_LOGIN_SCREEN=
40+
41+
# the numeric flag in ms that overrides the default
42+
# if not specified, a default value is used
43+
# useful for testing environment
44+
#
45+
# possible values: number or undefined
46+
REACT_APP_OVERRIDE_SPLASH_SCREEN_DURATION_MS=
47+
48+
# REACT_APP_VERSION is set automatically by scripts/get-current-commit.sh

.eslintignore

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,20 @@
1+
# Build output
2+
build/
3+
dist/
4+
5+
# Node modules
6+
node_modules/
7+
8+
# Coverage directory
9+
coverage/
10+
11+
# Config files
12+
*.config.js
13+
114
# Shaka Player files
215
src/w3cmedia/App*
316
src/w3cmedia/shakaplayer/dist
417
src/w3cmedia/polyfills
518

19+
# ESLint plugins
20+
plugins/

.eslintrc.js

Lines changed: 228 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,228 @@
1+
const storagePattern = {
2+
group: ['@react-native-async-storage/*'],
3+
message:
4+
"\n\nImport of @react-native-async-storage is allowed only in 'src/services/storage'. \n\nUse `import { DeviceStorage } from '@AppServices/storage'` instead",
5+
};
6+
7+
const deviceInfoPattern = {
8+
group: [
9+
'@amazon-devices/react-native-device-info',
10+
'@amazon-devices/react-native-device-info/*',
11+
],
12+
message:
13+
"\n\nImport of @amazon-devices/react-native-device-info is allowed only in 'src/services/deviceInfo'. \n\nUse `import { DeviceInfo } from '@AppServices/deviceInfo'` instead",
14+
};
15+
16+
const netInfoPattern = {
17+
group: [
18+
'@amazon-devices/keplerscript-netmgr-lib',
19+
'@amazon-devices/keplerscript-netmgr-lib/*',
20+
],
21+
message:
22+
"\n\nImport of @amazon-devices/keplerscript-netmgr-lib is allowed only in 'src/services/netInfo'. \n\nUse `import { NetInfo } from '@AppServices/netInfo'` instead",
23+
};
24+
25+
const appConfigPattern = {
26+
group: ['@AppEnvs'],
27+
message:
28+
"\n\nImport envs is allowed only in 'src/services/appConfig'. \n\nUse `import { AppEnvs } from '@AppServices/appConfig'` instead",
29+
};
30+
31+
const keplerUiComponentsGroup = {
32+
group: ['@amazon-devices/kepler-ui-components'],
33+
message:
34+
"\n\nImport Kepler UI component is allowed only in 'src/components/core' and 'src/theme'.\n\nImport needed component from '@AppComponents/core",
35+
};
36+
37+
const tvFocusGuideViewPath = {
38+
name: '@amazon-devices/react-native-kepler',
39+
importNames: ['TVFocusGuideView'],
40+
message: 'Please use FocusGuideView from @AppServices/focusGuide instead',
41+
};
42+
43+
const useTVEventHandlerPath = {
44+
name: '@amazon-devices/react-native-kepler',
45+
importNames: ['useTVEventHandler'],
46+
message:
47+
'Please use useFocusGuideEventHandler from @AppServices/focusGuide instead',
48+
};
49+
50+
const rules = {
51+
'react-compiler/react-compiler': 'error',
52+
'import/order': [
53+
'error',
54+
{
55+
groups: ['builtin', 'external', 'internal', 'parent', 'sibling', 'index'],
56+
pathGroups: [
57+
{
58+
pattern: '@App*',
59+
group: 'parent',
60+
position: 'before',
61+
},
62+
{
63+
pattern: '@App*/**',
64+
group: 'parent',
65+
position: 'before',
66+
},
67+
{
68+
pattern: './**',
69+
group: 'parent',
70+
position: 'after',
71+
},
72+
],
73+
alphabetize: {
74+
order: 'asc',
75+
caseInsensitive: false,
76+
},
77+
distinctGroup: false,
78+
'newlines-between': 'always',
79+
warnOnUnassignedImports: true,
80+
},
81+
],
82+
'no-restricted-imports': [
83+
'error',
84+
{
85+
paths: [tvFocusGuideViewPath, useTVEventHandlerPath],
86+
patterns: [
87+
storagePattern,
88+
deviceInfoPattern,
89+
netInfoPattern,
90+
appConfigPattern,
91+
keplerUiComponentsGroup,
92+
],
93+
},
94+
],
95+
'react-native/no-raw-text': [
96+
'error',
97+
{
98+
skip: ['Typography'],
99+
},
100+
],
101+
'no-console': 'error',
102+
'no-restricted-properties': [
103+
'error',
104+
{
105+
object: 'console',
106+
property: 'log',
107+
message: 'Please use `logDebug` from `@AppUtils/logging`',
108+
},
109+
{
110+
object: 'console',
111+
property: 'warn',
112+
message: 'Please use `logWarning` from `@AppUtils/logging`',
113+
},
114+
{
115+
object: 'console',
116+
property: 'error',
117+
message: 'Please use `logError` from `@AppUtils/logging`',
118+
},
119+
],
120+
curly: ['error'],
121+
'@typescript-eslint/no-explicit-any': 'error',
122+
'@typescript-eslint/consistent-type-imports': 'error',
123+
'react-native-a11y/has-accessibility-hint': 'off',
124+
'react-native-a11y/has-valid-accessibility-descriptors': 'off', // eslint-plugin-amzn-a11y rule is used instead
125+
'amzn-a11y/no-inferior-a11y-props': 'error',
126+
'amzn-a11y/no-missing-a11y-props': 'error',
127+
};
128+
129+
const overrides = [
130+
{
131+
files: ['src/services/storage/**/*'],
132+
rules: {
133+
'no-restricted-imports': [
134+
'off',
135+
{
136+
patterns: [storagePattern],
137+
},
138+
],
139+
},
140+
},
141+
{
142+
files: ['src/services/deviceInfo/**/*'],
143+
rules: {
144+
'no-restricted-imports': [
145+
'off',
146+
{
147+
patterns: [deviceInfoPattern],
148+
},
149+
],
150+
},
151+
},
152+
{
153+
files: ['src/services/netInfo/**/*'],
154+
rules: {
155+
'no-restricted-imports': [
156+
'off',
157+
{
158+
patterns: [netInfoPattern],
159+
},
160+
],
161+
},
162+
},
163+
{
164+
files: ['src/services/appConfig/**/*'],
165+
rules: {
166+
'no-restricted-imports': [
167+
'off',
168+
{
169+
patterns: [appConfigPattern],
170+
},
171+
],
172+
},
173+
},
174+
{
175+
files: ['src/components/core/**/*', 'src/theme/**/*'],
176+
rules: {
177+
'no-restricted-imports': [
178+
'off',
179+
{
180+
patterns: [keplerUiComponentsGroup],
181+
},
182+
],
183+
},
184+
},
185+
{
186+
files: ['src/**/*.test.tsx', 'src/**/*.spec.tsx'],
187+
rules: {
188+
'react-native/no-color-literals': ['off'],
189+
'react-native/no-inline-styles': ['off'],
190+
},
191+
},
192+
{
193+
files: ['src/services/focusGuide/**/*'],
194+
rules: {
195+
'no-restricted-imports': [
196+
'off',
197+
{
198+
paths: [tvFocusGuideViewPath, useTVEventHandlerPath],
199+
},
200+
],
201+
},
202+
},
203+
];
204+
205+
module.exports = {
206+
root: true,
207+
extends: ['@callstack', 'plugin:react-native-a11y/basic'],
208+
plugins: [
209+
'@typescript-eslint',
210+
'import',
211+
'amzn-a11y',
212+
'eslint-plugin-react-compiler',
213+
],
214+
rules,
215+
overrides,
216+
parserOptions: {
217+
project: './tsconfig.json',
218+
},
219+
parser: '@typescript-eslint/parser',
220+
settings: {
221+
'import/resolver': 'typescript',
222+
/**
223+
* below is to make all `@` imports internal to make sure we can
224+
* group them (external imports cannot be group with `groupPath`)
225+
*/
226+
'import/internal-regex': '^@(.*?)/',
227+
},
228+
};

.npmrc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
legacy-peer-deps
1+
engine-strict=true
2+
unsafe-perm=true

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
20.18.1

.prettierignore

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,17 @@
1-
src/w3cmedia/shakaplayer/dist
1+
# Build output
2+
build/
3+
dist/
4+
5+
# Node modules
6+
node_modules/
7+
8+
# Coverage directory
9+
coverage/
10+
11+
# Logs
12+
*.log
13+
14+
# Shaka Player files
15+
src/w3cmedia/polyfills/*
16+
src/w3cmedia/shakaplayer/dist/*
17+
src/w3cmedia/App*.tsx

.prettierrc.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
module.exports = {
2+
bracketSameLine: true,
3+
bracketSpacing: true,
4+
singleQuote: true,
5+
trailingComma: "all",
6+
tabWidth: 2,
7+
};

0 commit comments

Comments
 (0)