Skip to content

Commit cba2aca

Browse files
committed
chore: un-mono-repoing
1 parent 5227715 commit cba2aca

20 files changed

+5662
-19
lines changed

.config/eslint.js.config.base.mjs

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import eslint from '@eslint/js';
2+
import eslintConfigPrettier from 'eslint-config-prettier';
3+
4+
export default [eslint.configs.recommended, eslintConfigPrettier];
+89
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
import eslint from '@eslint/js';
2+
import tseslint from 'typescript-eslint';
3+
import react from 'eslint-plugin-react';
4+
import { fixupPluginRules } from '@eslint/compat';
5+
import eslintPluginReactHooks from 'eslint-plugin-react-hooks';
6+
import eslintConfigPrettier from 'eslint-config-prettier';
7+
8+
export default (
9+
tsconfigRootDir,
10+
files = ['**/*.ts', '**/*.tsx'],
11+
project = true,
12+
) => [
13+
{
14+
files,
15+
...eslint.configs.recommended,
16+
},
17+
...tseslint.configs.recommendedTypeChecked.map((config) => ({
18+
files,
19+
...config,
20+
})),
21+
...tseslint.configs.stylisticTypeChecked.map((config) => ({
22+
files,
23+
...config,
24+
})),
25+
{
26+
files,
27+
languageOptions: {
28+
parserOptions: {
29+
project,
30+
tsconfigRootDir,
31+
},
32+
},
33+
},
34+
{
35+
files,
36+
...react.configs.flat.recommended,
37+
},
38+
{
39+
files,
40+
settings: {
41+
react: {
42+
version: 'detect',
43+
},
44+
},
45+
},
46+
{
47+
files,
48+
plugins: {
49+
'react-hooks': fixupPluginRules(eslintPluginReactHooks),
50+
},
51+
},
52+
{
53+
files,
54+
...eslintConfigPrettier,
55+
},
56+
{
57+
files,
58+
rules: {
59+
'@typescript-eslint/no-unsafe-return': 'off',
60+
'@typescript-eslint/no-unsafe-assignment': 'off',
61+
'@typescript-eslint/no-unsafe-call': 'off',
62+
'@typescript-eslint/no-unsafe-member-access': 'off',
63+
'@typescript-eslint/no-misused-promises': [
64+
'error',
65+
{
66+
checksVoidReturn: {
67+
attributes: false,
68+
},
69+
},
70+
],
71+
'@typescript-eslint/prefer-optional-chain': 'off',
72+
'@typescript-eslint/no-base-to-string': 'off',
73+
'@typescript-eslint/consistent-indexed-object-style': 'off',
74+
'@typescript-eslint/prefer-nullish-coalescing': 'off',
75+
'@typescript-eslint/consistent-type-definitions': 'off',
76+
'@typescript-eslint/no-unused-vars': 'off',
77+
'@typescript-eslint/no-explicit-any': 'off',
78+
'@typescript-eslint/prefer-for-of': 'off',
79+
'@typescript-eslint/non-nullable-type-assertion-style': 'off',
80+
'@typescript-eslint/class-literal-property-style': 'off',
81+
'@typescript-eslint/no-redundant-type-constituents': 'off',
82+
'@typescript-eslint/prefer-string-starts-ends-with': 'off',
83+
'@typescript-eslint/no-duplicate-type-constituents': 'off',
84+
'@typescript-eslint/array-type': 'off',
85+
'@typescript-eslint/prefer-function-type': 'off',
86+
'react/prop-types': 'off',
87+
},
88+
},
89+
];
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
import eslint from '@eslint/js';
2+
import tseslint from 'typescript-eslint';
3+
import react from 'eslint-plugin-react';
4+
import { fixupPluginRules } from '@eslint/compat';
5+
import eslintPluginReactHooks from 'eslint-plugin-react-hooks';
6+
import jest from 'eslint-plugin-jest';
7+
import eslintConfigPrettier from 'eslint-config-prettier';
8+
9+
export default (tsconfigRootDir) => [
10+
{
11+
files: ['test/**/*.ts', 'test/**/*.tsx'],
12+
...eslint.configs.recommended,
13+
},
14+
...tseslint.configs.recommendedTypeChecked.map((config) => ({
15+
files: ['test/**/*.ts', 'test/**/*.tsx'],
16+
...config,
17+
})),
18+
...tseslint.configs.stylisticTypeChecked.map((config) => ({
19+
files: ['test/**/*.ts', 'test/**/*.tsx'],
20+
...config,
21+
})),
22+
{
23+
files: ['test/**/*.ts', 'test/**/*.tsx'],
24+
languageOptions: {
25+
parserOptions: {
26+
project: ['./tsconfig.test.json'],
27+
tsconfigRootDir,
28+
},
29+
},
30+
},
31+
{
32+
files: ['test/**/*.ts', 'test/**/*.tsx'],
33+
...react.configs.flat.recommended,
34+
},
35+
{
36+
files: ['test/**/*.ts', 'test/**/*.tsx'],
37+
settings: {
38+
react: {
39+
version: 'detect',
40+
},
41+
},
42+
},
43+
{
44+
files: ['test/**/*.ts', 'test/**/*.tsx'],
45+
plugins: {
46+
'react-hooks': fixupPluginRules(eslintPluginReactHooks),
47+
},
48+
},
49+
{
50+
files: ['test/**/*.ts', 'test/**/*.tsx'],
51+
...jest.configs['flat/recommended'],
52+
},
53+
{
54+
files: ['test/**/*.ts', 'test/**/*.tsx'],
55+
...jest.configs['jest/style'],
56+
},
57+
{
58+
files: ['test/**/*.ts', 'test/**/*.tsx'],
59+
...eslintConfigPrettier,
60+
},
61+
{
62+
files: ['test/**/*.ts', 'test/**/*.tsx'],
63+
rules: {
64+
'@typescript-eslint/no-unsafe-return': 'off',
65+
'@typescript-eslint/no-unsafe-assignment': 'off',
66+
'@typescript-eslint/no-unsafe-call': 'off',
67+
'@typescript-eslint/no-unsafe-member-access': 'off',
68+
'@typescript-eslint/prefer-optional-chain': 'off',
69+
'@typescript-eslint/no-base-to-string': 'off',
70+
'@typescript-eslint/consistent-indexed-object-style': 'off',
71+
'@typescript-eslint/prefer-nullish-coalescing': 'off',
72+
'@typescript-eslint/consistent-type-definitions': 'off',
73+
'@typescript-eslint/no-unused-vars': 'off',
74+
'@typescript-eslint/no-explicit-any': 'off',
75+
'@typescript-eslint/prefer-for-of': 'off',
76+
'@typescript-eslint/non-nullable-type-assertion-style': 'off',
77+
'@typescript-eslint/class-literal-property-style': 'off',
78+
'@typescript-eslint/no-redundant-type-constituents': 'off',
79+
'@typescript-eslint/prefer-string-starts-ends-with': 'off',
80+
'@typescript-eslint/no-duplicate-type-constituents': 'off',
81+
'@typescript-eslint/array-type': 'off',
82+
'@typescript-eslint/prefer-function-type': 'off',
83+
},
84+
},
85+
];

.config/tsconfig.base.json

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"compilerOptions": {
3+
"target": "es2020",
4+
"moduleResolution": "bundler",
5+
"declaration": true,
6+
"strict": true,
7+
"allowSyntheticDefaultImports": true,
8+
"esModuleInterop": true,
9+
"forceConsistentCasingInFileNames": true,
10+
"types": []
11+
}
12+
}

.config/tsconfig.esm.base.json

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"compilerOptions": {
3+
"target": "es2020",
4+
"module": "node16",
5+
"declaration": true,
6+
"strict": true,
7+
"allowSyntheticDefaultImports": true,
8+
"esModuleInterop": true,
9+
"forceConsistentCasingInFileNames": true,
10+
"types": []
11+
}
12+
}

.config/tsconfig.esm.react.base.json

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"extends": "./tsconfig.esm.base.json",
3+
"compilerOptions": {
4+
"jsx": "react"
5+
}
6+
}

.config/tsconfig.react.base.json

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"extends": "./tsconfig.base.json",
3+
"compilerOptions": {
4+
"jsx": "react"
5+
}
6+
}

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.idea
2+
node_modules
3+
lib

eslint.config.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import eslintJs from '../../eslint.js.config.base.mjs';
2-
import eslintTsReact from '../../eslint.ts.react.config.base.mjs';
3-
import eslintTsReactJest from '../../eslint.ts.react.jest.config.base.mjs';
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';
44

55
export default [
66
...eslintJs,

examples/eslint.config.mjs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
import eslintJs from '../../../eslint.js.config.base.mjs';
2-
import eslintTs from '../../../eslint.ts.react.config.base.mjs';
1+
import eslintJs from '.config/eslint.js.config.base.mjs';
2+
import eslintTs from '.config/eslint.ts.react.config.base.mjs';
33

44
export default [
55
...eslintJs,
66
...eslintTs(import.meta.dirname),
77
...eslintTs(
88
import.meta.dirname,
99
['webpack.config.ts'],
10-
['./tsconfig.webpack.json'],
10+
['tsconfig.webpack.json'],
1111
),
1212
{
1313
ignores: ['dist'],

examples/tsconfig.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"extends": "../../../tsconfig.react.base.json",
2+
"extends": "../.config/tsconfig.react.base.json",
33
"include": ["src"]
44
}

examples/tsconfig.webpack.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"extends": "../../../tsconfig.base.json",
2+
"extends": "../.config/tsconfig.base.json",
33
"compilerOptions": {
44
"types": ["node", "webpack-dev-server"]
55
},

jest.config.cjs jest.config.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module.exports = {
1+
const config = {
22
extensionsToTreatAsEsm: ['.ts', '.tsx'],
33
moduleNameMapper: {
44
'^(\\.{1,2}/.*)\\.js$': '$1',
@@ -10,3 +10,5 @@ module.exports = {
1010
],
1111
},
1212
};
13+
14+
export default config;

package.json

+20-7
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,18 @@
66
"react",
77
"json viewer"
88
],
9-
"homepage": "https://github.com/reduxjs/redux-devtools/tree/master/packages/react-json-tree",
9+
"homepage": "https://github.com/gtk-grafana/react-json-tree",
1010
"bugs": {
11-
"url": "https://github.com/reduxjs/redux-devtools/issues"
11+
"url": "https://github.com/gtk-grafana/react-json-tree/issues"
1212
},
1313
"license": "MIT",
1414
"author": "Shu Uesugi <[email protected]> (http://github.com/chibicode)",
1515
"contributors": [
1616
"Alexander Kuznetsov <[email protected]> (http://kuzya.org/)",
1717
"Dave Vedder <[email protected]> (http://www.eskimospy.com/)",
1818
"Daniele Zannotti <[email protected]> (http://www.github.com/dzannotti)",
19-
"Mihail Diordiev <[email protected]> (https://github.com/zalmoxisus)"
19+
"Mihail Diordiev <[email protected]> (https://github.com/zalmoxisus)",
20+
"Galen Kistler <[email protected] (https://github.com/gtk-grafana)>"
2021
],
2122
"files": [
2223
"lib",
@@ -28,7 +29,7 @@
2829
"sideEffects": false,
2930
"repository": {
3031
"type": "git",
31-
"url": "https://github.com/reduxjs/redux-devtools.git"
32+
"url": "https://github.com/gtk-grafana/react-json-tree.git"
3233
},
3334
"scripts": {
3435
"build": "tsc",
@@ -41,21 +42,33 @@
4142
},
4243
"dependencies": {
4344
"@types/lodash": "^4.17.15",
44-
"react-base16-styling": "workspace:^"
45+
"react-base16-styling": "^0.10.0"
4546
},
4647
"devDependencies": {
48+
"@eslint/compat": "^1.2.7",
49+
"@eslint/js": "^9.21.0",
4750
"@types/jest": "^29.5.14",
4851
"@types/react": "^18.3.18",
4952
"@types/react-test-renderer": "^18.3.1",
53+
"eslint-config-prettier": "^10.0.2",
54+
"eslint-plugin-jest": "^28.11.0",
55+
"eslint-plugin-react": "^7.37.4",
56+
"eslint-plugin-react-hooks": "^5.2.0",
5057
"jest": "^29.7.0",
5158
"react": "^18.3.1",
5259
"react-test-renderer": "^18.3.1",
5360
"rimraf": "^6.0.1",
5461
"ts-jest": "^29.2.6",
55-
"typescript": "~5.7.3"
62+
"typescript": "~5.7.3",
63+
"typescript-eslint": "^8.25.0",
64+
"@babel/core": "^7.26.9",
65+
"@changesets/cli": "^2.28.1",
66+
"eslint": "^9.21.0",
67+
"prettier": "3.5.2"
5668
},
5769
"peerDependencies": {
5870
"@types/react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
59-
"react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"
71+
"react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
72+
"ts-node": "^10.9.2"
6073
}
6174
}

0 commit comments

Comments
 (0)