TP-25001 | added eslint and prettier (#228)

This commit is contained in:
Ishan Srivastava
2023-04-12 19:15:38 +05:30
committed by GitHub Enterprise
parent 3d2f21e75d
commit eb8d1be6b0
8 changed files with 387 additions and 328 deletions

1
.eslintignore Normal file
View File

@@ -0,0 +1 @@
node_modules/

View File

@@ -1,17 +0,0 @@
module.exports = {
root: true,
extends: '@react-native-community',
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint'],
overrides: [
{
files: ['*.ts', '*.tsx'],
rules: {
'@typescript-eslint/no-shadow': ['error'],
'no-shadow': 'off',
'no-undef': 'off',
'comma-dangle': 'off',
},
},
],
};

26
.eslintrc.json Normal file
View File

@@ -0,0 +1,26 @@
{
"env": {
"browser": true,
"es2021": true
},
"extends": [
"plugin:react/recommended",
"standard-with-typescript",
"airbnb",
"airbnb/hooks",
"prettier"
],
"overrides": [
],
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module",
"project": ["./tsconfig.json"]
},
"plugins": [
"react",
"react-native"
],
"rules": {
}
}

13
.prettierrc.json Normal file
View File

@@ -0,0 +1,13 @@
{
"arrowParens": "always",
"bracketSpacing": true,
"jsxBracketSameLine": false,
"jsxSingleQuote": false,
"quoteProps": "as-needed",
"singleQuote": true,
"semi": true,
"printWidth": 100,
"useTabs": false,
"tabWidth": 2,
"trailingComma": "es5"
}

View File

@@ -1,4 +1,4 @@
export const BASE_AV_APP_URL = 'https://dev-longhorn-portal.np.navi-tech.in/field-app';
export const SENTRY_DSN = 'https://8e6f0a36d1a4433693cde5f20f27cfac@glitchtip.cmd.navi-tech.in/170';
export const SENTRY_DSN = 'https://acef93c884c1424cacc4ec899562e203@glitchtip.cmd.navi-tech.in/173';
export const JANUS_SERVICE_URL = 'https://dev-longhorn-portal.np.navi-tech.in/api/events/json';
export const ENV = 'dev';

View File

@@ -1,5 +1,4 @@
export const BASE_AV_APP_URL = 'https://longhorn.navi.com/field-app';
// sentry.io
export const SENTRY_DSN = 'https://e979a70a4d8649ca9f02583816505788@o4504994571157504.ingest.sentry.io/4504994577907712';
export const SENTRY_DSN = 'https://5daa4832fade44b389b265de9b26c2fd@glitchtip.cmd.navi-tech.in/172';
export const JANUS_SERVICE_URL = 'https://longhorn.navi.com/api/events/json';
export const ENV = 'prod';

View File

@@ -71,7 +71,6 @@
"@babel/core": "7.12.9",
"@babel/plugin-proposal-decorators": "7.20.7",
"@babel/runtime": "7.12.5",
"@react-native-community/eslint-config": "3.2.0",
"@tsconfig/react-native": "2.0.2",
"@types/jest": "26.0.23",
"@types/react": "18.0.21",
@@ -79,23 +78,31 @@
"@types/react-native-video": "5.0.14",
"@types/react-native-video-player": "0.10.3",
"@types/react-test-renderer": "18.0.0",
"@typescript-eslint/eslint-plugin": "5.45.0",
"@typescript-eslint/eslint-plugin": "^5.43.0",
"@typescript-eslint/parser": "5.37.0",
"babel-jest": "26.6.3",
"babel-plugin-module-resolver": "^4.1.0",
"babel-plugin-transform-remove-console": "^6.9.4",
"better-sqlite3": "8.0.1",
"eslint": "8.28.0",
"eslint": "8.22.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-config-airbnb-typescript": "17.0.0",
"eslint-config-prettier": "8.5.0",
"eslint-plugin-import": "2.26.0",
"eslint-config-prettier": "^8.8.0",
"eslint-config-standard-with-typescript": "^34.0.1",
"eslint-plugin-import": "^2.25.2",
"eslint-plugin-jsx-a11y": "6.6.1",
"eslint-plugin-react": "7.31.11",
"eslint-plugin-n": "^15.0.0",
"eslint-plugin-promise": "^6.0.0",
"eslint-plugin-react": "^7.32.2",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-native": "^4.0.0",
"jest": "26.6.3",
"metro-react-native-babel-preset": "0.72.3",
"miragejs": "0.1.47",
"prettier": "2.8.0",
"prettier": "^2.8.7",
"react-test-renderer": "18.1.0",
"eslint-config-prettier-react": "^0.0.24",
"typescript": "4.8.3"
},
"jest": {

632
yarn.lock

File diff suppressed because it is too large Load Diff