diff --git a/.eslintrc.js b/.eslintrc.js index e66b5fe..409d3e1 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -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'], }, diff --git a/package-lock.json b/package-lock.json index 2d58739..ebff804 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2981,6 +2981,15 @@ "integrity": "sha512-9aEPf1JEpiTjcFAmmyw8eiIXmcNZOqaZyHO77wgm0/dWfT/oxC1SrIq8ET38pMxHYrcB6Uew+TzUVsBeczF88g==", "dev": true }, + "eslint-plugin-sort-keys-fix": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-sort-keys-fix/-/eslint-plugin-sort-keys-fix-1.1.0.tgz", + "integrity": "sha512-6q5lM4eLjEui/GUUvrb7yTWWxslY0j7W4Ra6/F1t460fXLXtn18s0fDPqSYLsnXa6gXg+PYgh4eqdQbkgrqTpg==", + "dev": true, + "requires": { + "requireindex": "~1.2.0" + } + }, "eslint-scope": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.0.0.tgz", @@ -7468,6 +7477,12 @@ "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=" }, + "requireindex": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/requireindex/-/requireindex-1.2.0.tgz", + "integrity": "sha512-L9jEkOi3ASd9PYit2cwRfyppc9NoABujTP8/5gFcbERmo5jUoAKovIC3fsF17pkTnGsrByysqX+Kxd2OTNI1ww==", + "dev": true + }, "resolve": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.14.1.tgz", diff --git a/package.json b/package.json index 97669a3..1e65bbb 100644 --- a/package.json +++ b/package.json @@ -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",