Skip to content
This repository was archived by the owner on Jun 12, 2024. It is now read-only.

Commit 0fedb9f

Browse files
committed
style: applied linting
1 parent 9051a5b commit 0fedb9f

File tree

19 files changed

+98
-65
lines changed

19 files changed

+98
-65
lines changed

.editorconfig

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,25 +11,22 @@ end_of_line = lf
1111
insert_final_newline = true
1212
trim_trailing_whitespace = true
1313
charset = utf-8
14+
indent_size = 2
15+
indent_style = space
1416

1517
[*.py]
16-
indent_style = space
1718
indent_size = 4
1819
max_line_length = 88
1920

2021
[Dockerfile]
21-
indent_style = space
2222
indent_size = 4
2323

2424
[{Makefile,go.mod,go.sum,*.go,.gitmodules}]
2525
indent_style = tab
2626
indent_size = 4
2727

28-
[*.{js,jsx,json,y{a,}ml,toml,html,cwl,ts,tsx}]
29-
indent_style = space
30-
indent_size = 2
28+
[*.{js,jsx,ts,tsx,json,y{a,}ml,toml,html}]
29+
max_line_length = 100
3130

3231
[*.{diff,md,rst}]
3332
trim_trailing_whitespace = false
34-
indent_style = space
35-
indent_size = 2

.pre-commit-config.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
repos:
2+
- repo: 'https://github.com/pre-commit/pre-commit-hooks'
3+
rev: v4.4.0
4+
hooks:
5+
- id: check-ast
6+
- id: check-case-conflict
7+
- id: check-json
8+
- id: pretty-format-json
9+
- id: check-merge-conflict
10+
- id: check-toml
11+
- id: check-xml
12+
- id: check-yaml
13+
- id: detect-private-key
14+
- id: end-of-file-fixer
15+
- id: fix-byte-order-marker
16+
- id: mixed-line-ending
17+
- id: sort-simple-yaml
18+
- id: trailing-whitespace

sdex-encrypted-communicator/.eslintrc.json

Lines changed: 39 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,22 @@
2525
"ecmaVersion": 12,
2626
"sourceType": "module"
2727
},
28-
"plugins": ["react", "react-hooks", "react-native", "@typescript-eslint", "prettier"],
28+
"plugins": [
29+
"react",
30+
"react-hooks",
31+
"react-native",
32+
"@typescript-eslint",
33+
"prettier"
34+
],
2935
"settings": {
3036
"import/resolver": {
3137
"node": {
32-
"extensions": [".js", ".jsx", ".ts", ".tsx"]
38+
"extensions": [
39+
".js",
40+
".jsx",
41+
".ts",
42+
".tsx"
43+
]
3344
},
3445
"react": {
3546
"version": "detect"
@@ -47,6 +58,23 @@
4758
"tsx": "never"
4859
}
4960
],
61+
"@typescript-eslint/no-floating-promises": [
62+
"error",
63+
{
64+
"ignoreIIFE": true
65+
}
66+
],
67+
"react/jsx-filename-extension": [
68+
"error",
69+
{
70+
"extensions": [
71+
".js",
72+
".jsx",
73+
".ts",
74+
".tsx"
75+
]
76+
}
77+
],
5078
"quotes": [
5179
"warn",
5280
"double",
@@ -55,7 +83,14 @@
5583
"allowTemplateLiterals": true
5684
}
5785
],
58-
"max-classes-per-file": ["off"],
59-
"no-bitwise": ["off"]
86+
"max-classes-per-file": [
87+
"off"
88+
],
89+
"no-bitwise": [
90+
"off"
91+
],
92+
"import/prefer-default-export": [
93+
"off"
94+
]
6095
}
6196
}

sdex-encrypted-communicator/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,3 +147,4 @@ package-lock.json
147147

148148
dist/
149149
%ProgramData%/
150+
.expo/

sdex-encrypted-communicator/.prettierrc

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,19 @@
55
"quoteProps": "as-needed",
66
"singleQuote": false,
77
"printWidth": 100,
8-
"editor.formatOnSave": true,
98
"proseWrap": "always",
109
"tabWidth": 2,
11-
"requireConfig": false,
10+
"endOfLine": "lf",
1211
"useTabs": false,
1312
"bracketSpacing": true,
14-
"jsxBracketSameLine": false,
1513
"semi": true,
1614
"arrowParens": "always",
1715
"jsxSingleQuote": false,
18-
"trailingComma": "all"
16+
"trailingComma": "all",
17+
"overrides": [
18+
{
19+
"files": ".prettierrc",
20+
"options": { "parser": "json" }
21+
}
22+
]
1923
}

sdex-encrypted-communicator/android/app/src/main/AndroidManifest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,4 @@
3232
</activity>
3333
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" android:exported="false"/>
3434
</application>
35-
</manifest>
35+
</manifest>

sdex-encrypted-communicator/android/app/src/main/java/pl/janwadolowski/sdexcommunicator/MainActivity.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
public class MainActivity extends ReactActivity {
1414
@Override
1515
protected void onCreate(Bundle savedInstanceState) {
16-
// Set the theme to AppTheme BEFORE onCreate to support
16+
// Set the theme to AppTheme BEFORE onCreate to support
1717
// coloring the background, status bar, and navigation bar.
1818
// This is required for expo-splash-screen.
1919
setTheme(R.style.AppTheme);

sdex-encrypted-communicator/android/app/src/main/res/drawable/rn_edit_text_material.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
android:insetBottom="@dimen/abc_edit_text_inset_bottom_material">
2121

2222
<selector>
23-
<!--
23+
<!--
2424
This file is a copy of abc_edit_text_material (https://bit.ly/3k8fX7I).
2525
The item below with state_pressed="false" and state_focused="false" causes a NullPointerException.
2626
NullPointerException:tempt to invoke virtual method 'android.graphics.drawable.Drawable android.graphics.drawable.Drawable$ConstantState.newDrawable(android.content.res.Resources)'
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
22
<item android:drawable="@color/splashscreen_background"/>
3-
</layer-list>
3+
</layer-list>

sdex-encrypted-communicator/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
33
<background android:drawable="@color/iconBackground"/>
44
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
5-
</adaptive-icon>
5+
</adaptive-icon>

0 commit comments

Comments
 (0)