Skip to content

Commit

Permalink
Auto sort object keys w/ eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
dsernst committed Jan 6, 2020
1 parent e4ce087 commit ea3783e
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ module.exports = {
root: true,
extends: '@react-native-community',
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint'],
plugins: ['@typescript-eslint', 'sort-keys-fix'],
rules: {
'no-alert': ['off'],
semi: ['error', 'never'],
'sort-keys': ['warn'],
'sort-keys-fix/sort-keys-fix': 'warn',
'sort-imports': ['warn', { ignoreDeclarationSort: true }],
'react/jsx-sort-props': ['warn'],
},
Expand Down
15 changes: 15 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

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

0 comments on commit ea3783e

Please sign in to comment.