Skip to content

Commit

Permalink
Updated lint rules
Browse files Browse the repository at this point in the history
  • Loading branch information
tahiris719 committed Apr 6, 2022
1 parent 042af63 commit 09d2b12
Show file tree
Hide file tree
Showing 9 changed files with 107 additions and 46 deletions.
81 changes: 79 additions & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,81 @@
module.exports = {
root: true,
extends: '@react-native-community',
root: true,
parser: 'babel-eslint',
ignorePatterns: [
'vendor/**/*',
],
rules: {
semi: 'warn',
eqeqeq: 'warn',
'max-len': [
'warn',
{
code: 140,
ignoreUrls: true,
ignoreStrings: true,
ignoreComments: true,
ignoreTrailingComments: true,
ignoreTemplateLiterals: true,
},
],
'eol-last': ['warn', 'always'],
indent: [
'warn',
4,
{
VariableDeclarator: 'first',
flatTernaryExpressions: true,
},
],
'spaced-comment': ['warn', 'always'],
curly: ['warn', 'all'],
'brace-style': [
'warn',
'1tbs',
{
allowSingleLine: true,
},
],
quotes: [
'warn',
'single',
{
allowTemplateLiterals: true,
},
],
'object-curly-spacing': [
'warn',
'always',
{
arraysInObjects: false,
},
],
'prefer-const': 'warn',
'no-debugger': 'error',
'no-unreachable': 'error',
'no-dupe-keys': 'warn',
'no-duplicate-case': 'warn',
'no-duplicate-imports': 'error',
'no-regex-spaces': 'warn',
'no-fallthrough': 'error',
'no-var': 'error',
'no-unused-expressions': 'warn',
'no-trailing-spaces': 'off',
'no-multiple-empty-lines': [
'warn',
{
max: 1,
maxBOF: 0,
maxEOF: 1,
},
],
'sort-imports': [
'warn',
{
ignoreCase: true,
allowSeparatedGroups: true,
memberSyntaxSortOrder: ['none', 'all', 'single', 'multiple'],
},
],
},
};
3 changes: 1 addition & 2 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
source 'https://rubygems.org'

# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
ruby '3.1.0'

gem 'cocoapods', '~> 1.11', '>= 1.11.2'
gem 'cocoapods', '~> 1.11', '>= 1.11.3'
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ PLATFORMS
ruby

DEPENDENCIES
cocoapods (~> 1.11, >= 1.11.2)
cocoapods (~> 1.11, >= 1.11.3)

RUBY VERSION
ruby 3.1.0p0
Expand Down
9 changes: 3 additions & 6 deletions __tests__/App-test.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
/**
* @format
*/

import 'react-native';
import React from 'react';

import App from '../App';

// Note: test renderer must be required after react-native.
// Note: `react-test-renderer` must be after `react-native`
import renderer from 'react-test-renderer';

it('renders correctly', () => {
renderer.create(<App />);
renderer.create(<App/>);
});
2 changes: 1 addition & 1 deletion babel.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module.exports = {
presets: ['module:metro-react-native-babel-preset'],
presets: ['module:metro-react-native-babel-preset'],
};
7 changes: 2 additions & 5 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
/**
* @format
*/
import { AppRegistry } from 'react-native';

import {AppRegistry} from 'react-native';
import App from './App';
import {name as appName} from './app.json';
import { name as appName } from './app.json';

AppRegistry.registerComponent(appName, () => App);
24 changes: 10 additions & 14 deletions metro.config.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
/**
* Metro configuration for React Native
* https://github.com/facebook/react-native
*
* @format
*/
// Metro configuration for React Native:
// https://github.com/facebook/react-native

module.exports = {
transformer: {
getTransformOptions: async () => ({
transform: {
experimentalImportSupport: false,
inlineRequires: true,
},
}),
},
transformer: {
getTransformOptions: async () => ({
transform: {
experimentalImportSupport: false,
inlineRequires: true,
},
}),
},
};
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
"lint": "eslint ."
},
"dependencies": {
"@fortawesome/fontawesome-svg-core": "^1.3.0",
"@fortawesome/free-regular-svg-icons": "^6.0.0",
"@fortawesome/free-solid-svg-icons": "^6.0.0",
"@fortawesome/fontawesome-svg-core": "^6.1.1",
"@fortawesome/free-regular-svg-icons": "^6.1.1",
"@fortawesome/free-solid-svg-icons": "^6.1.1",
"@fortawesome/react-native-fontawesome": "^0.2.7",
"@react-native-async-storage/async-storage": "^1.16.1",
"@react-native-community/datetimepicker": "^5.1.0",
Expand Down
19 changes: 7 additions & 12 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -785,26 +785,21 @@
resolved "https://registry.yarnpkg.com/@fortawesome/fontawesome-common-types/-/fontawesome-common-types-6.1.1.tgz#7dc996042d21fc1ae850e3173b5c67b0549f9105"
integrity sha512-wVn5WJPirFTnzN6tR95abCx+ocH+3IFLXAgyavnf9hUmN0CfWoDjPT/BAWsUVwSlYYVBeCLJxaqi7ZGe4uSjBA==

"@fortawesome/fontawesome-common-types@^0.3.0":
version "0.3.0"
resolved "https://registry.yarnpkg.com/@fortawesome/fontawesome-common-types/-/fontawesome-common-types-0.3.0.tgz#949995a05c0d8801be7e0a594f775f1dbaa0d893"
integrity sha512-CA3MAZBTxVsF6SkfkHXDerkhcQs0QPofy43eFdbWJJkZiq3SfiaH1msOkac59rQaqto5EqWnASboY1dBuKen5w==

"@fortawesome/fontawesome-svg-core@^1.3.0":
version "1.3.0"
resolved "https://registry.yarnpkg.com/@fortawesome/fontawesome-svg-core/-/fontawesome-svg-core-1.3.0.tgz#343fac91fa87daa630d26420bfedfba560f85885"
integrity sha512-UIL6crBWhjTNQcONt96ExjUnKt1D68foe3xjEensLDclqQ6YagwCRYVQdrp/hW0ALRp/5Fv/VKw+MqTUWYYvPg==
"@fortawesome/fontawesome-svg-core@^6.1.1":
version "6.1.1"
resolved "https://registry.yarnpkg.com/@fortawesome/fontawesome-svg-core/-/fontawesome-svg-core-6.1.1.tgz#3424ec6182515951816be9b11665d67efdce5b5f"
integrity sha512-NCg0w2YIp81f4V6cMGD9iomfsIj7GWrqmsa0ZsPh59G7PKiGN1KymZNxmF00ssuAlo/VZmpK6xazsGOwzKYUMg==
dependencies:
"@fortawesome/fontawesome-common-types" "^0.3.0"
"@fortawesome/fontawesome-common-types" "6.1.1"

"@fortawesome/free-regular-svg-icons@^6.0.0":
"@fortawesome/free-regular-svg-icons@^6.1.1":
version "6.1.1"
resolved "https://registry.yarnpkg.com/@fortawesome/free-regular-svg-icons/-/free-regular-svg-icons-6.1.1.tgz#3f2f58262a839edf0643cbacee7a8a8230061c98"
integrity sha512-xXiW7hcpgwmWtndKPOzG+43fPH7ZjxOaoeyooptSztGmJxCAflHZxXNK0GcT0uEsR4jTGQAfGklDZE5NHoBhKg==
dependencies:
"@fortawesome/fontawesome-common-types" "6.1.1"

"@fortawesome/free-solid-svg-icons@^6.0.0":
"@fortawesome/free-solid-svg-icons@^6.1.1":
version "6.1.1"
resolved "https://registry.yarnpkg.com/@fortawesome/free-solid-svg-icons/-/free-solid-svg-icons-6.1.1.tgz#3369e673f8fe8be2fba30b1ec274d47490a830a6"
integrity sha512-0/5exxavOhI/D4Ovm2r3vxNojGZioPwmFrKg0ZUH69Q68uFhFPs6+dhAToh6VEQBntxPRYPuT5Cg1tpNa9JUPg==
Expand Down

0 comments on commit 09d2b12

Please sign in to comment.