Skip to content

Commit

Permalink
Auto sort type interfaces
Browse files Browse the repository at this point in the history
  • Loading branch information
dsernst committed Jan 6, 2020
1 parent ea3783e commit 6b70215
Show file tree
Hide file tree
Showing 4 changed files with 108 additions and 234 deletions.
4 changes: 3 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@ module.exports = {
root: true,
extends: '@react-native-community',
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint', 'sort-keys-fix'],
plugins: ['@typescript-eslint', 'sort-keys-fix', 'typescript-sort-keys'],
rules: {
'no-alert': ['off'],
semi: ['error', 'never'],
'sort-keys-fix/sort-keys-fix': 'warn',
'sort-imports': ['warn', { ignoreDeclarationSort: true }],
'react/jsx-sort-props': ['warn'],
'typescript-sort-keys/interface': 2,
'typescript-sort-keys/string-enum': 2,
},
}
2 changes: 1 addition & 1 deletion InitScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ type InitScreenProps = {
duration: string
hasChanting: boolean
hasExtendedMetta: boolean
setDuration: (d: string) => void
pressStart: () => void
setDuration: (d: string) => void
toggle: (key: string) => () => void
}

Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"eslint": "^6.5.1",
"eslint-plugin-react": "^7.17.0",
"eslint-plugin-sort-keys-fix": "^1.1.0",
"eslint-plugin-typescript-sort-keys": "^0.5.0",
"jest": "^24.9.0",
"metro-react-native-babel-preset": "^0.56.0",
"react-test-renderer": "16.9.0",
Expand Down
Loading

0 comments on commit 6b70215

Please sign in to comment.