Skip to content

Commit

Permalink
chore: Modernise app codebase
Browse files Browse the repository at this point in the history
  • Loading branch information
fguitton committed Oct 17, 2024
1 parent b964a80 commit 64f22d7
Show file tree
Hide file tree
Showing 78 changed files with 879 additions and 41,356 deletions.
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"eslint.autoFixOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
"source.fixAll.eslint": "explicit"
},
"eslint.validate": [
"javascript",
Expand Down
15 changes: 0 additions & 15 deletions .yarnrc.yml

This file was deleted.

34 changes: 17 additions & 17 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,24 +36,24 @@
]
},
"devDependencies": {
"@commitlint/config-conventional": "13.1.0",
"@release-it/conventional-changelog": "3.2.0",
"@typescript-eslint/eslint-plugin": "4.29.1",
"@typescript-eslint/parser": "4.29.1",
"commitlint": "13.1.0",
"eslint": "7.32.0",
"eslint-config-react-app": "6.0.0",
"@commitlint/config-conventional": "^18.5.0",
"@release-it/conventional-changelog": "9.0.0",
"@typescript-eslint/eslint-plugin": "8.9.0",
"@typescript-eslint/parser": "8.9.0",
"commitlint": "18.5.0",
"eslint": "^8.57.1",
"eslint-config-expo": "^7.1.2",
"eslint-config-react-app": "^7.0.1",
"eslint-config-recommended": "4.1.0",
"eslint-plugin-flowtype": "5.9.0",
"eslint-plugin-import": "2.24.0",
"eslint-plugin-jest": "24.4.0",
"eslint-plugin-import": "2.31.0",
"eslint-plugin-jest": "28.8.3",
"eslint-plugin-jsx-a11y": "6.4.1",
"eslint-plugin-react": "7.24.0",
"eslint-plugin-react-hooks": "4.2.0",
"expo-cli": "4.10.0",
"expo-yarn-workspaces": "1.5.2",
"husky": "7.0.1",
"release-it": "14.11.5"
"eslint-plugin-react-compiler": "0.0.0-experimental-1e98da5-20241002",
"eslint-plugin-react-hooks": "4.6.2",
"expo-cli": "6.3.10",
"expo-yarn-workspaces": "2.3.2",
"husky": "9.1.6",
"release-it": "17.10.0"
},
"husky": {
"hooks": {
Expand Down Expand Up @@ -90,4 +90,4 @@
"react": "17.0.2",
"react-native": "https://github.com/expo/react-native/archive/sdk-42.0.0.tar.gz"
}
}
}
8 changes: 4 additions & 4 deletions packages/mobile/.env
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
REACT_APP_VERSION=${npm_package_version}
REACT_APP_NAME=${npm_package_name}
REACT_APP_SECRETARIUM_GATEWAYS="cluster1#name1#wss://hostname1:port#key1,cluster2#name2#wss://hostname2:port#key2,..."
REACT_APP_SECRETARIUM_GATEWAYS_OVERWRITABLE=false
EXPO_PUBLIC_VERSION=${npm_package_version}
EXPO_PUBLIC_NAME=${npm_package_name}
EXPO_PUBLIC_SECRETARIUM_GATEWAYS="cluster1#name1#wss://hostname1:port#key1,cluster2#name2#wss://hostname2:port#key2,..."
EXPO_PUBLIC_SECRETARIUM_GATEWAYS_OVERWRITABLE=false
8 changes: 0 additions & 8 deletions packages/mobile/.eslintignore

This file was deleted.

152 changes: 152 additions & 0 deletions packages/mobile/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
const defaultPlugins = [
'@typescript-eslint',
'import',
'jest',
'react',
'react-compiler',
'react-hooks'
];

const defaultEnv = {
es6: true
};

const defaultGlobals = {

};

const javascriptDefaultRules = {
'indent': [
'error',
4,
{ SwitchCase: 1 }
],
'comma-dangle': [
'error',
'never'
],
'no-trailing-spaces': 'error',
'no-unused-vars': [
'warn',
{ argsIgnorePattern: '^__unused' }
],
'no-unused-expressions': [
'error'
],
'quotes': [
'error',
'single'
],
'quote-props': [
'error',
'consistent-as-needed'
],
'semi': [
'error',
'always'
],
'react-compiler/react-compiler': 'error'
};

const typescriptDefaultRules = {
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': [
'warn',
{ argsIgnorePattern: '^__unused' }
],
'@typescript-eslint/no-explicit-any': 'warn',
'no-unused-expressions': 'off',
'@typescript-eslint/no-unused-expressions': [
'error'
],
'quote-props': [
'error',
'consistent-as-needed'
],
'quotes': 'off',
'@typescript-eslint/ban-types': 'off'
};


const javascriptExtensions = [
'react-app',
'expo',
'eslint:recommended'
];

const typescriptExtensions = javascriptExtensions.concat([
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended'
]);

// https://docs.expo.dev/guides/using-eslint/
module.exports = {
extends: javascriptExtensions,
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 2018,
sourceType: 'module',
createDefaultProgram: true
},
settings: {
react: {
version: 'detect'
}
},
globals: defaultGlobals,
plugins: defaultPlugins,
rules: javascriptDefaultRules,
overrides: [
{
files: [
'*eslint*',
'*config.js',
'scripts/*'
],
env: {
node: true
}
},
{
files: [
'**/*.ts', '**/*.tsx'
],
globals: {
Atomics: 'readonly',
SharedArrayBuffer: 'readonly'
},
extends: typescriptExtensions,
rules: typescriptDefaultRules
},
{
files: [
'**/*.test.js',
'**/*.test.jsx',
'**/test/**/*.js',
'**/test/**/*.jsx'
],
env: Object.assign({}, defaultEnv, {
'jest/globals': true
}),
extends: javascriptExtensions,
rules: javascriptDefaultRules
},
{
files: [
'**/*.test.ts',
'**/*.test.tsx',
'**/test/**/*.ts',
'**/test/**/*.tsx'
],
env: Object.assign({}, defaultEnv, {
'jest/globals': true
}),
globals: {
Atomics: 'readonly',
SharedArrayBuffer: 'readonly'
},
extends: typescriptExtensions,
rules: typescriptDefaultRules
}
]
};
11 changes: 0 additions & 11 deletions packages/mobile/.expo-shared/README.md

This file was deleted.

19 changes: 0 additions & 19 deletions packages/mobile/.expo-shared/assets.json

This file was deleted.

Loading

0 comments on commit 64f22d7

Please sign in to comment.