Skip to content

Commit c186223

Browse files
committed
v0.0.3
1 parent 13ecc48 commit c186223

Some content is hidden

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

58 files changed

+6837
-1984
lines changed

.editorconfig

Lines changed: 39 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,48 @@
55
root = true
66

77
[*]
8-
98
indent_style = space
109
indent_size = 2
11-
1210
end_of_line = lf
1311
charset = utf-8
1412
trim_trailing_whitespace = true
1513
insert_final_newline = true
14+
max_line_length = 80
15+
16+
# JSON files
17+
[*.json]
18+
max_line_length = 120
19+
20+
# YAML files
21+
[*.{yml,yaml}]
22+
max_line_length = 120
23+
24+
# Markdown files
25+
[*.md]
26+
trim_trailing_whitespace = false
27+
max_line_length = 100
28+
29+
30+
31+
# Python (for any scripts)
32+
[*.py]
33+
indent_style = space
34+
indent_size = 4
35+
max_line_length = 88
36+
37+
# Swift files
38+
[*.swift]
39+
indent_style = space
40+
indent_size = 4
41+
max_line_length = 120
42+
43+
# Kotlin files
44+
[*.{kt,kts}]
45+
indent_style = space
46+
indent_size = 4
47+
max_line_length = 120
48+
49+
# Gradle files
50+
[*.gradle]
51+
indent_style = space
52+
indent_size = 4

.eslintignore

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Dependencies
2+
node_modules/
3+
4+
# Build outputs
5+
lib/
6+
build/
7+
dist/
8+
*.tgz
9+
10+
# Generated files
11+
android/generated/
12+
ios/generated/
13+
android/build/
14+
ios/build/
15+
16+
# Coverage
17+
coverage/
18+
19+
# Logs
20+
*.log
21+
22+
# Temporary files
23+
*.tmp
24+
*.temp
25+
26+
# React Native specific
27+
.expo/
28+
.turbo/
29+
30+
# Example app specific
31+
example/android/app/build/
32+
example/ios/build/
33+
example/node_modules/
34+
example/ios/Pods/
35+
36+
# Configuration files that might have different linting rules
37+
babel.config.js
38+
metro.config.js
39+
jest.config.js
40+
41+
# Package files
42+
*.tgz

.eslintrc.js

Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
module.exports = {
2+
root: true,
3+
extends: ['@react-native', 'prettier'],
4+
parser: '@typescript-eslint/parser',
5+
parserOptions: {
6+
ecmaFeatures: {
7+
jsx: true,
8+
},
9+
ecmaVersion: 2022,
10+
sourceType: 'module',
11+
},
12+
plugins: [
13+
'@typescript-eslint',
14+
'react',
15+
'react-hooks',
16+
'react-native',
17+
'prettier',
18+
],
19+
env: {
20+
'react-native/react-native': true,
21+
'es2022': true,
22+
'node': true,
23+
'jest': true,
24+
},
25+
rules: {
26+
// Prettier integration
27+
'prettier/prettier': [
28+
'error',
29+
{
30+
quoteProps: 'consistent',
31+
singleQuote: true,
32+
tabWidth: 2,
33+
trailingComma: 'es5',
34+
useTabs: false,
35+
printWidth: 80,
36+
semi: true,
37+
bracketSpacing: true,
38+
arrowParens: 'avoid',
39+
endOfLine: 'lf',
40+
},
41+
],
42+
43+
// React rules
44+
'react/react-in-jsx-scope': 'off',
45+
'react/prop-types': 'off',
46+
'react/display-name': 'off',
47+
'react-hooks/rules-of-hooks': 'error',
48+
'react-hooks/exhaustive-deps': 'warn',
49+
50+
// TypeScript rules
51+
'@typescript-eslint/no-unused-vars': [
52+
'error',
53+
{
54+
argsIgnorePattern: '^_',
55+
varsIgnorePattern: '^_',
56+
caughtErrorsIgnorePattern: '^_',
57+
},
58+
],
59+
'@typescript-eslint/explicit-function-return-type': 'off',
60+
'@typescript-eslint/explicit-module-boundary-types': 'off',
61+
'@typescript-eslint/no-explicit-any': 'warn',
62+
'@typescript-eslint/no-non-null-assertion': 'warn',
63+
64+
// General code quality rules
65+
'no-console': 'warn',
66+
'no-debugger': 'error',
67+
'no-var': 'error',
68+
'prefer-const': 'error',
69+
'prefer-template': 'error',
70+
'object-shorthand': 'error',
71+
'no-duplicate-imports': 'error',
72+
'no-useless-rename': 'error',
73+
'no-useless-computed-key': 'error',
74+
'no-unneeded-ternary': 'error',
75+
'yoda': 'error',
76+
77+
// React Native specific rules
78+
'react-native/no-unused-styles': 'error',
79+
'react-native/split-platform-components': 'error',
80+
'react-native/no-inline-styles': 'warn',
81+
'react-native/no-color-literals': 'warn',
82+
'react-native/no-raw-text': 'off', // Can be too restrictive for libraries
83+
},
84+
overrides: [
85+
{
86+
files: ['**/__tests__/**/*', '**/*.test.*', '**/*.spec.*'],
87+
env: {
88+
jest: true,
89+
},
90+
rules: {
91+
'@typescript-eslint/no-explicit-any': 'off',
92+
'@typescript-eslint/no-non-null-assertion': 'off',
93+
'no-console': 'off',
94+
},
95+
},
96+
{
97+
files: ['**/*.js', '**/*.jsx'],
98+
rules: {
99+
'@typescript-eslint/no-var-requires': 'off',
100+
'@typescript-eslint/explicit-function-return-type': 'off',
101+
},
102+
},
103+
{
104+
files: ['example/**/*'],
105+
rules: {
106+
'react-native/no-color-literals': 'off',
107+
'react-native/no-unused-styles': 'off',
108+
'react-native/no-inline-styles': 'off',
109+
'no-duplicate-imports': 'off',
110+
'@typescript-eslint/no-shadow': 'off',
111+
'@typescript-eslint/no-unused-vars': 'off',
112+
'@typescript-eslint/no-explicit-any': 'off',
113+
'no-console': 'off',
114+
},
115+
},
116+
],
117+
settings: {
118+
react: {
119+
version: 'detect',
120+
},
121+
},
122+
ignorePatterns: [
123+
'node_modules/',
124+
'lib/',
125+
'android/build/',
126+
'ios/build/',
127+
'android/generated/',
128+
'ios/generated/',
129+
'*.tgz',
130+
'coverage/',
131+
],
132+
};

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@ jobs:
8181
if: env.turbo_cache_hit != 1
8282
uses: actions/setup-java@v3
8383
with:
84-
distribution: 'zulu'
85-
java-version: '17'
84+
distribution: "zulu"
85+
java-version: "17"
8686

8787
- name: Finalize Android SDK
8888
if: env.turbo_cache_hit != 1

.prettierignore

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# Dependencies
2+
node_modules/
3+
4+
# Build outputs
5+
lib/
6+
build/
7+
dist/
8+
*.tgz
9+
10+
# Generated files
11+
android/generated/
12+
ios/generated/
13+
android/build/
14+
ios/build/
15+
16+
# Coverage
17+
coverage/
18+
19+
# Logs
20+
*.log
21+
yarn-error.log
22+
npm-debug.log
23+
24+
# OS
25+
.DS_Store
26+
Thumbs.db
27+
28+
# IDE
29+
.vscode/
30+
.idea/
31+
32+
# Temporary files
33+
*.tmp
34+
*.temp
35+
36+
# React Native specific
37+
.expo/
38+
.turbo/
39+
40+
# Example app specific
41+
example/android/app/build/
42+
example/ios/build/
43+
example/node_modules/
44+
example/ios/Pods/
45+
46+
# Package files
47+
*.tgz
48+
49+
# Documentation (if auto-generated)
50+
docs/api/
51+

.prettierrc.js

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
module.exports = {
2+
// Basic formatting
3+
printWidth: 80,
4+
tabWidth: 2,
5+
useTabs: false,
6+
semi: true,
7+
singleQuote: true,
8+
quoteProps: 'consistent',
9+
trailingComma: 'es5',
10+
bracketSpacing: true,
11+
bracketSameLine: false,
12+
arrowParens: 'avoid',
13+
endOfLine: 'lf',
14+
15+
// JSX specific
16+
jsxSingleQuote: true,
17+
18+
// Prose wrapping
19+
proseWrap: 'preserve',
20+
21+
// HTML whitespace sensitivity
22+
htmlWhitespaceSensitivity: 'css',
23+
24+
// Vue files support (if needed in future)
25+
vueIndentScriptAndStyle: false,
26+
27+
// Embedded language formatting
28+
embeddedLanguageFormatting: 'auto',
29+
30+
// File overrides for specific file types
31+
overrides: [
32+
{
33+
files: '*.json',
34+
options: {
35+
printWidth: 120,
36+
trailingComma: 'none',
37+
},
38+
},
39+
{
40+
files: '*.md',
41+
options: {
42+
printWidth: 100,
43+
proseWrap: 'always',
44+
semi: false,
45+
trailingComma: 'none',
46+
},
47+
},
48+
{
49+
files: '*.yaml',
50+
options: {
51+
printWidth: 120,
52+
singleQuote: false,
53+
},
54+
},
55+
{
56+
files: '*.yml',
57+
options: {
58+
printWidth: 120,
59+
singleQuote: false,
60+
},
61+
},
62+
],
63+
};

0 commit comments

Comments
 (0)