Skip to content

Commit 14a3de3

Browse files
authored
Merge pull request #1 from gtk-grafana/gtk-grafana/react-vite-component-template
Reduce module size and repackage outside of redux-devtools monorepo
2 parents 535ea10 + abb88a7 commit 14a3de3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+14448
-13741
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
.idea
22
node_modules
33
lib
4+
dist
5+
*.tgz

README.md

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,10 @@ const json = {
2424
<JSONTree data={json} />;
2525
```
2626

27-
#### Result:
28-
29-
![](https://i.ibb.co/0KSYRJg/example-result.png)
30-
31-
Check out [examples](examples) directory for more details.
32-
3327
### Theming
3428

35-
Style with CSS. @todo base styles
29+
TODO/In progress. All base styles are a single css class of specificity, and can be overwritten in the consuming application.
3630

37-
<div>
38-
<JSONTree data={data} />
39-
</div>;
4031
```
4132
4233
#### Advanced Customization
@@ -110,7 +101,7 @@ Their full signatures are:
110101
- Improved and maintained by [Alexander Kuznetsov](https://github.com/alexkuz). The repository was merged into [`redux-devtools` monorepo](https://github.com/reduxjs/redux-devtools) from [`alexkuz/react-json-tree`](https://github.com/alexkuz/react-json-tree).
111102

112103
### Similar Libraries
113-
104+
- [original react-json-tree](https://github.com/reduxjs/redux-devtools/tree/main/packages/react-json-tree)
114105
- [react-treeview](https://github.com/chenglou/react-treeview)
115106
- [react-json-inspector](https://github.com/Lapple/react-json-inspector)
116107
- [react-object-inspector](https://github.com/xyc/react-object-inspector)

eslint.config.js

Lines changed: 26 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,29 @@
1-
import eslintJs from './.config/eslint.js.config.base.mjs';
2-
import eslintTsReact from './.config/eslint.ts.react.config.base.mjs';
3-
import eslintTsReactJest from './.config/eslint.ts.react.jest.config.base.mjs';
1+
import js from '@eslint/js'
2+
import globals from 'globals'
3+
import reactHooks from 'eslint-plugin-react-hooks'
4+
import reactRefresh from 'eslint-plugin-react-refresh'
5+
import tseslint from 'typescript-eslint'
6+
import eslintConfigPrettier from 'eslint-config-prettier'
47

5-
export default [
6-
...eslintJs,
7-
...eslintTsReact(import.meta.dirname),
8-
...eslintTsReactJest(import.meta.dirname),
8+
export default tseslint.config(
9+
{ ignores: ['dist'] },
910
{
10-
ignores: ['examples', 'lib'],
11+
extends: [js.configs.recommended, ...tseslint.configs.recommended, eslintConfigPrettier],
12+
files: ['**/*.{ts,tsx}'],
13+
languageOptions: {
14+
ecmaVersion: 2020,
15+
globals: globals.browser,
16+
},
17+
plugins: {
18+
'react-hooks': reactHooks,
19+
'react-refresh': reactRefresh,
20+
},
21+
rules: {
22+
...reactHooks.configs.recommended.rules,
23+
'react-refresh/only-export-components': ['warn', { allowConstantExport: true }],
24+
},
1125
},
12-
];
26+
{
27+
files: ['**/*.stories.@(ts|tsx|js|jsx|mjs|cjs)'],
28+
}
29+
)

examples/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@ yarn link
1212

1313
And in this package, run
1414
```
15-
npm link react
15+
yarn link react
1616
```
1717

1818
Then start and install the examples:
1919

2020
```
21-
npm install
22-
npm start
21+
yarn install
22+
yarn start
2323
```
2424

2525
Now edit `src/App.js`.

0 commit comments

Comments
 (0)