-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
eslint/prettier rig & fixes for example app, fixed some tests
- Loading branch information
Showing
46 changed files
with
481 additions
and
349 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import { fixupPluginRules } from '@eslint/compat'; | ||
import js from '@eslint/js'; | ||
import eslintReactNative from 'eslint-plugin-react-native'; | ||
import typescriptEslint from 'typescript-eslint'; | ||
|
||
export default typescriptEslint.config( | ||
// don't lint config files | ||
{ | ||
ignores: ['*.config.*js'], | ||
}, | ||
{ | ||
plugins: { | ||
'@typescript-eslint': typescriptEslint.plugin, | ||
}, | ||
rules: {}, | ||
}, | ||
js.configs.recommended, | ||
...typescriptEslint.configs.recommended, | ||
// react-native | ||
{ | ||
name: 'eslint-plugin-react-native', | ||
plugins: { | ||
'react-native': fixupPluginRules({ | ||
rules: eslintReactNative.rules, | ||
}), | ||
}, | ||
rules: { | ||
...eslintReactNative.configs.all.rules, | ||
'react-native/sort-styles': 'off', | ||
'react-native/no-inline-styles': 'warn', | ||
}, | ||
}, | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
import { AppRegistry } from 'react-native'; | ||
import App from './src/App'; | ||
import { name as appName } from './app.json'; | ||
import { install } from 'react-native-quick-crypto'; | ||
|
||
const global = globalThis; | ||
install(); | ||
global.process.cwd = () => 'sxsx'; | ||
global.process.env = { NODE_ENV: 'production' }; | ||
global.location = {}; | ||
|
||
import { AppRegistry } from 'react-native'; | ||
import App from './src/App'; | ||
import { name as appName } from './app.json'; | ||
|
||
AppRegistry.registerComponent(appName, () => App); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
"packageManager": "[email protected]", | ||
"scripts": { | ||
"android": "react-native run-android", | ||
"ios": "react-native run-ios --simulator='iPhone 15'", | ||
"ios": "react-native run-ios", | ||
"tsc": "tsc --noEmit", | ||
"typescript": "tsc --noEmit", | ||
"lint": "eslint \"**/*.{js,ts,tsx}\"", | ||
|
@@ -41,9 +41,10 @@ | |
"@babel/plugin-transform-class-static-block": "^7.24.7", | ||
"@babel/preset-env": "^7.20.0", | ||
"@babel/runtime": "^7.20.0", | ||
"@eslint/compat": "^1.1.1", | ||
"@eslint/js": "10.0.0", | ||
"@react-native/gradle-plugin": "0.74.87", | ||
"@react-native/metro-config": "^0.73.2", | ||
"@tsconfig/react-native": "^2.0.2", | ||
"@types/chai": "^4.3.4", | ||
"@types/jest": "^29.2.1", | ||
"@types/mocha": "^10.0.1", | ||
|
@@ -52,11 +53,13 @@ | |
"@types/react-test-renderer": "^18.0.0", | ||
"@types/readable-stream": "^4.0.11", | ||
"babel-plugin-module-resolver": "^5.0.0", | ||
"eslint": "^8.4.1", | ||
"eslint": "9.9.1", | ||
"metro-react-native-babel-preset": "0.76.8", | ||
"prettier": "^2.4.1" | ||
"prettier": "3.3.3", | ||
"typescript": "5.5.4", | ||
"typescript-eslint": "8.3.0" | ||
}, | ||
"jest": { | ||
"preset": "react-native" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
export default { | ||
arrowParens: 'avoid', | ||
bracketSameLine: true, | ||
bracketSpacing: true, | ||
singleQuote: true, | ||
trailingComma: 'all', | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
export const colors: Record<string, string> = { | ||
gray: '#ccc', | ||
white: '#fff', | ||
green: '#3cb043', | ||
red: '#e60000', | ||
blue: '#1976d2', | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.