Skip to content

Commit

Permalink
feat: update libs and setup new rules (#72)
Browse files Browse the repository at this point in the history
* chore: bump librairies

* feat: setup new rules
  • Loading branch information
tsyirvo authored Mar 28, 2022
1 parent b493f0f commit cb895cd
Show file tree
Hide file tree
Showing 3 changed files with 248 additions and 234 deletions.
15 changes: 15 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,20 @@ module.exports = {
unnamedComponents: 'arrow-function',
},
],
'react/hook-use-state': 'error',
'react/jsx-key': [
'error',
{ checkFragmentShorthand: true, warnOnDuplicates: true },
],
'react/jsx-sort-props': [
'error',
{
callbacksLast: true,
shorthandLast: true,
multiline: 'last',
reservedFirst: ['ref', 'key', 'testID'],
},
],
'react/no-access-state-in-setstate': 'error',
'react/no-array-index-key': 'error',
'react/no-arrow-function-lifecycle': 'error',
Expand Down Expand Up @@ -169,6 +183,7 @@ module.exports = {
'@typescript-eslint/no-non-null-asserted-nullish-coalescing': 'error',
'@typescript-eslint/no-non-null-asserted-optional-chain': 'error',
'@typescript-eslint/no-non-null-assertion': 'error',
'@typescript-eslint/no-redundant-type-constituents': 'error',
'@typescript-eslint/no-unnecessary-boolean-literal-compare': [
'warn',
{
Expand Down
18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,22 +26,22 @@
"typescript": ">= 4.5"
},
"dependencies": {
"@typescript-eslint/eslint-plugin": "5.10.2",
"@typescript-eslint/parser": "5.10.2",
"eslint": "8.8.0",
"eslint-config-airbnb-typescript": "16.1.0",
"eslint-config-prettier": "8.3.0",
"@typescript-eslint/eslint-plugin": "5.16.0",
"@typescript-eslint/parser": "5.16.0",
"eslint": "8.12.0",
"eslint-config-airbnb-typescript": "16.1.4",
"eslint-config-prettier": "8.5.0",
"eslint-import-resolver-babel-plugin-root-import": "1.1.1",
"eslint-plugin-import": "2.25.3",
"eslint-plugin-react": "7.28.0",
"eslint-plugin-import": "2.25.4",
"eslint-plugin-react": "7.29.4",
"eslint-plugin-react-hooks": "4.3.0",
"eslint-plugin-react-native": "4.0.0",
"typescript": "4.5.5",
"typescript-eslint": "0.0.1-alpha.0"
},
"devDependencies": {
"@commitlint/cli": "16.1.0",
"@commitlint/config-conventional": "16.0.0",
"@commitlint/cli": "16.2.3",
"@commitlint/config-conventional": "16.2.1",
"@semantic-release/changelog": "6.0.1",
"@semantic-release/git": "10.0.1",
"husky": "7.0.4",
Expand Down
Loading

0 comments on commit cb895cd

Please sign in to comment.