Skip to content

Commit

Permalink
Refactor state management with recoil.js (micronaut-projects#51)
Browse files Browse the repository at this point in the history
* WIP - Exploring alt approaches to state management - extensive hooks.

* WIP - Recoil for state management.

* Create Mockable injection points for state

* Refactor initial data to be injectable

* Properly capture GH cloneUrl/htmlUrl during state initialization

* Add ES Lint Import Order Rules.

* Fix react-syntax-highlighter theme imports - test-renderer now works!

* Update unit tests for initial routing effect
  • Loading branch information
eahrold authored Aug 11, 2021
1 parent 57666eb commit 6e72188
Show file tree
Hide file tree
Showing 56 changed files with 2,202 additions and 935 deletions.
31 changes: 31 additions & 0 deletions main/src/main/js/launch/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
module.exports = {
extends: 'react-app',
plugins: ['react', 'import'],
rules: {
'import/order': [
'error',
{
groups: [
'builtin',
'external',
'internal',
'parent',
'sibling',
'index',
],
pathGroups: [
{
pattern: 'react*',
group: 'external',
position: 'before',
},
],
pathGroupsExcludedImportTypes: ['react'],
alphabetize: {
order: 'asc',
caseInsensitive: true,
},
},
],
},
}
13 changes: 13 additions & 0 deletions main/src/main/js/launch/package-lock.json

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

10 changes: 4 additions & 6 deletions main/src/main/js/launch/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
"react-materialize": "^3.9.8",
"react-scripts": "^4.0.3",
"react-syntax-highlighter": "^12.2.1",
"react-test-renderer": "^17.0.2"
"react-test-renderer": "^17.0.2",
"recoil": "^0.3.1"
},
"scripts": {
"start": "react-scripts start",
Expand All @@ -24,10 +25,7 @@
"eject": "react-scripts eject",
"format": "prettier --write \"**/*.+(js|jsx|json|css|md)\"",
"lint": "eslint './src/**/*.js'",
"lint:fix": "npx lint --fix"
},
"eslintConfig": {
"extends": "react-app"
"lint:fix": "eslint './src/**/*.js' --fix"
},
"browserslist": {
"production": [
Expand All @@ -41,4 +39,4 @@
"last 1 safari version"
]
}
}
}
Loading

0 comments on commit 6e72188

Please sign in to comment.