Use flat config for ESLint (#1712)

* d3tooltip

* map2tree

* d3-state-visualizer

* react-base16-styling

* react-dock

* Cleanup

* Update

* react-json-tree

* redux-devtools

* redux-devtools-app

* redux-devtools-app-core

* redux-devtools-cli

* Fix

* redux-devtools-dock-monitor

* redux-devtools-extension

* redux-devtools-inspector-monitor

* redux-devtools-inspector-monitor-test-tab

* redux-devtools-inspector-monitor-trace-tab

* redux-devtools-instrument

* Simplify

* redux-devtools-log-monitor

* redux-devtools-remote

* redux-devtools-rtk-query-monitor

* redux-devtools-serialize

* redux-devtools-slider-monitor

* redux-devtools-utils

* Format
This commit is contained in:
Nathan Bierema 2024-08-08 23:47:07 -04:00 committed by GitHub
parent 9b2f8720c9
commit 4164b6279e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
156 changed files with 830 additions and 1751 deletions

View File

@ -0,0 +1,4 @@
import eslint from '@eslint/js';
import eslintConfigPrettier from 'eslint-config-prettier';
export default [eslint.configs.recommended, eslintConfigPrettier];

55
eslint.ts.config.base.mjs Normal file
View File

@ -0,0 +1,55 @@
import eslint from '@eslint/js';
import tseslint from 'typescript-eslint';
import eslintConfigPrettier from 'eslint-config-prettier';
export default (tsconfigRootDir, files = ['**/*.ts'], project = true) => [
{
files,
...eslint.configs.recommended,
},
...tseslint.configs.recommendedTypeChecked.map((config) => ({
files,
...config,
})),
...tseslint.configs.stylisticTypeChecked.map((config) => ({
files,
...config,
})),
{
files,
languageOptions: {
parserOptions: {
project,
tsconfigRootDir,
},
},
},
{
files,
...eslintConfigPrettier,
},
{
files,
rules: {
'@typescript-eslint/no-unsafe-return': 'off',
'@typescript-eslint/no-unsafe-assignment': 'off',
'@typescript-eslint/no-unsafe-call': 'off',
'@typescript-eslint/no-unsafe-member-access': 'off',
'@typescript-eslint/prefer-optional-chain': 'off',
'@typescript-eslint/no-base-to-string': 'off',
'@typescript-eslint/consistent-indexed-object-style': 'off',
'@typescript-eslint/prefer-nullish-coalescing': 'off',
'@typescript-eslint/consistent-type-definitions': 'off',
'@typescript-eslint/no-unused-vars': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/prefer-for-of': 'off',
'@typescript-eslint/non-nullable-type-assertion-style': 'off',
'@typescript-eslint/class-literal-property-style': 'off',
'@typescript-eslint/no-redundant-type-constituents': 'off',
'@typescript-eslint/prefer-string-starts-ends-with': 'off',
'@typescript-eslint/no-duplicate-type-constituents': 'off',
'@typescript-eslint/array-type': 'off',
'@typescript-eslint/prefer-function-type': 'off',
},
},
];

View File

@ -0,0 +1,64 @@
import eslint from '@eslint/js';
import tseslint from 'typescript-eslint';
import jest from 'eslint-plugin-jest';
import eslintConfigPrettier from 'eslint-config-prettier';
export default (tsconfigRootDir) => [
{
files: ['test/**/*.ts'],
...eslint.configs.recommended,
},
...tseslint.configs.recommendedTypeChecked.map((config) => ({
files: ['test/**/*.ts'],
...config,
})),
...tseslint.configs.stylisticTypeChecked.map((config) => ({
files: ['test/**/*.ts'],
...config,
})),
{
files: ['test/**/*.ts'],
languageOptions: {
parserOptions: {
project: ['./tsconfig.test.json'],
tsconfigRootDir,
},
},
},
{
files: ['test/**/*.ts'],
...jest.configs['flat/recommended'],
},
{
files: ['test/**/*.ts'],
...jest.configs['jest/style'],
},
{
files: ['test/**/*.ts'],
...eslintConfigPrettier,
},
{
files: ['test/**/*.ts'],
rules: {
'@typescript-eslint/no-unsafe-return': 'off',
'@typescript-eslint/no-unsafe-assignment': 'off',
'@typescript-eslint/no-unsafe-call': 'off',
'@typescript-eslint/no-unsafe-member-access': 'off',
'@typescript-eslint/prefer-optional-chain': 'off',
'@typescript-eslint/no-base-to-string': 'off',
'@typescript-eslint/consistent-indexed-object-style': 'off',
'@typescript-eslint/prefer-nullish-coalescing': 'off',
'@typescript-eslint/consistent-type-definitions': 'off',
'@typescript-eslint/no-unused-vars': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/prefer-for-of': 'off',
'@typescript-eslint/non-nullable-type-assertion-style': 'off',
'@typescript-eslint/class-literal-property-style': 'off',
'@typescript-eslint/no-redundant-type-constituents': 'off',
'@typescript-eslint/prefer-string-starts-ends-with': 'off',
'@typescript-eslint/no-duplicate-type-constituents': 'off',
'@typescript-eslint/array-type': 'off',
'@typescript-eslint/prefer-function-type': 'off',
},
},
];

View File

@ -0,0 +1,89 @@
import eslint from '@eslint/js';
import tseslint from 'typescript-eslint';
import react from 'eslint-plugin-react';
import { fixupPluginRules } from '@eslint/compat';
import eslintPluginReactHooks from 'eslint-plugin-react-hooks';
import eslintConfigPrettier from 'eslint-config-prettier';
export default (
tsconfigRootDir,
files = ['**/*.ts', '**/*.tsx'],
project = true,
) => [
{
files,
...eslint.configs.recommended,
},
...tseslint.configs.recommendedTypeChecked.map((config) => ({
files,
...config,
})),
...tseslint.configs.stylisticTypeChecked.map((config) => ({
files,
...config,
})),
{
files,
languageOptions: {
parserOptions: {
project,
tsconfigRootDir,
},
},
},
{
files,
...react.configs.flat.recommended,
},
{
files,
settings: {
react: {
version: 'detect',
},
},
},
{
files,
plugins: {
'react-hooks': fixupPluginRules(eslintPluginReactHooks),
},
},
{
files,
...eslintConfigPrettier,
},
{
files,
rules: {
'@typescript-eslint/no-unsafe-return': 'off',
'@typescript-eslint/no-unsafe-assignment': 'off',
'@typescript-eslint/no-unsafe-call': 'off',
'@typescript-eslint/no-unsafe-member-access': 'off',
'@typescript-eslint/no-misused-promises': [
'error',
{
checksVoidReturn: {
attributes: false,
},
},
],
'@typescript-eslint/prefer-optional-chain': 'off',
'@typescript-eslint/no-base-to-string': 'off',
'@typescript-eslint/consistent-indexed-object-style': 'off',
'@typescript-eslint/prefer-nullish-coalescing': 'off',
'@typescript-eslint/consistent-type-definitions': 'off',
'@typescript-eslint/no-unused-vars': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/prefer-for-of': 'off',
'@typescript-eslint/non-nullable-type-assertion-style': 'off',
'@typescript-eslint/class-literal-property-style': 'off',
'@typescript-eslint/no-redundant-type-constituents': 'off',
'@typescript-eslint/prefer-string-starts-ends-with': 'off',
'@typescript-eslint/no-duplicate-type-constituents': 'off',
'@typescript-eslint/array-type': 'off',
'@typescript-eslint/prefer-function-type': 'off',
'react/prop-types': 'off',
},
},
];

View File

@ -0,0 +1,85 @@
import eslint from '@eslint/js';
import tseslint from 'typescript-eslint';
import react from 'eslint-plugin-react';
import { fixupPluginRules } from '@eslint/compat';
import eslintPluginReactHooks from 'eslint-plugin-react-hooks';
import jest from 'eslint-plugin-jest';
import eslintConfigPrettier from 'eslint-config-prettier';
export default (tsconfigRootDir) => [
{
files: ['test/**/*.ts', 'test/**/*.tsx'],
...eslint.configs.recommended,
},
...tseslint.configs.recommendedTypeChecked.map((config) => ({
files: ['test/**/*.ts', 'test/**/*.tsx'],
...config,
})),
...tseslint.configs.stylisticTypeChecked.map((config) => ({
files: ['test/**/*.ts', 'test/**/*.tsx'],
...config,
})),
{
files: ['test/**/*.ts', 'test/**/*.tsx'],
languageOptions: {
parserOptions: {
project: ['./tsconfig.test.json'],
tsconfigRootDir,
},
},
},
{
files: ['test/**/*.ts', 'test/**/*.tsx'],
...react.configs.flat.recommended,
},
{
files: ['test/**/*.ts', 'test/**/*.tsx'],
settings: {
react: {
version: 'detect',
},
},
},
{
files: ['test/**/*.ts', 'test/**/*.tsx'],
plugins: {
'react-hooks': fixupPluginRules(eslintPluginReactHooks),
},
},
{
files: ['test/**/*.ts', 'test/**/*.tsx'],
...jest.configs['flat/recommended'],
},
{
files: ['test/**/*.ts', 'test/**/*.tsx'],
...jest.configs['jest/style'],
},
{
files: ['test/**/*.ts', 'test/**/*.tsx'],
...eslintConfigPrettier,
},
{
files: ['test/**/*.ts', 'test/**/*.tsx'],
rules: {
'@typescript-eslint/no-unsafe-return': 'off',
'@typescript-eslint/no-unsafe-assignment': 'off',
'@typescript-eslint/no-unsafe-call': 'off',
'@typescript-eslint/no-unsafe-member-access': 'off',
'@typescript-eslint/prefer-optional-chain': 'off',
'@typescript-eslint/no-base-to-string': 'off',
'@typescript-eslint/consistent-indexed-object-style': 'off',
'@typescript-eslint/prefer-nullish-coalescing': 'off',
'@typescript-eslint/consistent-type-definitions': 'off',
'@typescript-eslint/no-unused-vars': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/prefer-for-of': 'off',
'@typescript-eslint/non-nullable-type-assertion-style': 'off',
'@typescript-eslint/class-literal-property-style': 'off',
'@typescript-eslint/no-redundant-type-constituents': 'off',
'@typescript-eslint/prefer-string-starts-ends-with': 'off',
'@typescript-eslint/no-duplicate-type-constituents': 'off',
'@typescript-eslint/array-type': 'off',
'@typescript-eslint/prefer-function-type': 'off',
},
},
];

View File

@ -1,3 +0,0 @@
{
"parser": "@babel/eslint-parser"
}

View File

@ -1,31 +0,0 @@
{
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint"],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended-type-checked",
"plugin:@typescript-eslint/stylistic-type-checked",
"prettier"
],
"rules": {
"@typescript-eslint/no-unsafe-return": "off",
"@typescript-eslint/no-unsafe-assignment": "off",
"@typescript-eslint/no-unsafe-call": "off",
"@typescript-eslint/no-unsafe-member-access": "off",
"@typescript-eslint/prefer-optional-chain": "off",
"@typescript-eslint/no-base-to-string": "off",
"@typescript-eslint/consistent-indexed-object-style": "off",
"@typescript-eslint/prefer-nullish-coalescing": "off",
"@typescript-eslint/consistent-type-definitions": "off",
"@typescript-eslint/no-unused-vars": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/prefer-for-of": "off",
"@typescript-eslint/non-nullable-type-assertion-style": "off",
"@typescript-eslint/class-literal-property-style": "off",
"@typescript-eslint/no-redundant-type-constituents": "off",
"@typescript-eslint/prefer-string-starts-ends-with": "off",
"@typescript-eslint/no-duplicate-type-constituents": "off",
"@typescript-eslint/array-type": "off",
"@typescript-eslint/prefer-function-type": "off"
}
}

View File

@ -1,32 +0,0 @@
{
"plugins": ["jest"],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended-type-checked",
"plugin:@typescript-eslint/stylistic-type-checked",
"plugin:jest/recommended",
"plugin:jest/style",
"prettier"
],
"rules": {
"@typescript-eslint/no-unsafe-return": "off",
"@typescript-eslint/no-unsafe-assignment": "off",
"@typescript-eslint/no-unsafe-call": "off",
"@typescript-eslint/no-unsafe-member-access": "off",
"@typescript-eslint/prefer-optional-chain": "off",
"@typescript-eslint/no-base-to-string": "off",
"@typescript-eslint/consistent-indexed-object-style": "off",
"@typescript-eslint/prefer-nullish-coalescing": "off",
"@typescript-eslint/consistent-type-definitions": "off",
"@typescript-eslint/no-unused-vars": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/prefer-for-of": "off",
"@typescript-eslint/non-nullable-type-assertion-style": "off",
"@typescript-eslint/class-literal-property-style": "off",
"@typescript-eslint/no-redundant-type-constituents": "off",
"@typescript-eslint/prefer-string-starts-ends-with": "off",
"@typescript-eslint/no-duplicate-type-constituents": "off",
"@typescript-eslint/array-type": "off",
"@typescript-eslint/prefer-function-type": "off"
}
}

View File

@ -1,52 +0,0 @@
{
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaFeatures": {
"jsx": true
}
},
"plugins": ["@typescript-eslint", "react"],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended-type-checked",
"plugin:@typescript-eslint/stylistic-type-checked",
"plugin:react/recommended",
"plugin:react-hooks/recommended",
"prettier"
],
"settings": {
"react": {
"version": "detect"
}
},
"rules": {
"@typescript-eslint/no-unsafe-return": "off",
"@typescript-eslint/no-unsafe-assignment": "off",
"@typescript-eslint/no-unsafe-call": "off",
"@typescript-eslint/no-unsafe-member-access": "off",
"@typescript-eslint/no-misused-promises": [
"error",
{
"checksVoidReturn": {
"attributes": false
}
}
],
"@typescript-eslint/prefer-optional-chain": "off",
"@typescript-eslint/no-base-to-string": "off",
"@typescript-eslint/consistent-indexed-object-style": "off",
"@typescript-eslint/prefer-nullish-coalescing": "off",
"@typescript-eslint/consistent-type-definitions": "off",
"@typescript-eslint/no-unused-vars": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/prefer-for-of": "off",
"@typescript-eslint/non-nullable-type-assertion-style": "off",
"@typescript-eslint/class-literal-property-style": "off",
"@typescript-eslint/no-redundant-type-constituents": "off",
"@typescript-eslint/prefer-string-starts-ends-with": "off",
"@typescript-eslint/no-duplicate-type-constituents": "off",
"@typescript-eslint/array-type": "off",
"@typescript-eslint/prefer-function-type": "off",
"react/prop-types": "off"
}
}

View File

@ -1,34 +0,0 @@
{
"plugins": ["jest"],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended-type-checked",
"plugin:@typescript-eslint/stylistic-type-checked",
"plugin:react/recommended",
"plugin:react-hooks/recommended",
"plugin:jest/recommended",
"plugin:jest/style",
"prettier"
],
"rules": {
"@typescript-eslint/no-unsafe-return": "off",
"@typescript-eslint/no-unsafe-assignment": "off",
"@typescript-eslint/no-unsafe-call": "off",
"@typescript-eslint/no-unsafe-member-access": "off",
"@typescript-eslint/prefer-optional-chain": "off",
"@typescript-eslint/no-base-to-string": "off",
"@typescript-eslint/consistent-indexed-object-style": "off",
"@typescript-eslint/prefer-nullish-coalescing": "off",
"@typescript-eslint/consistent-type-definitions": "off",
"@typescript-eslint/no-unused-vars": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/prefer-for-of": "off",
"@typescript-eslint/non-nullable-type-assertion-style": "off",
"@typescript-eslint/class-literal-property-style": "off",
"@typescript-eslint/no-redundant-type-constituents": "off",
"@typescript-eslint/prefer-string-starts-ends-with": "off",
"@typescript-eslint/no-duplicate-type-constituents": "off",
"@typescript-eslint/array-type": "off",
"@typescript-eslint/prefer-function-type": "off"
}
}

View File

@ -2,11 +2,10 @@
"private": true,
"devDependencies": {
"@babel/core": "^7.25.2",
"@babel/eslint-parser": "^7.25.1",
"@changesets/cli": "^2.27.7",
"@eslint/compat": "^1.1.1",
"@eslint/js": "^8.57.0",
"@nrwl/nx-cloud": "^19.0.0",
"@typescript-eslint/eslint-plugin": "^8.0.1",
"@typescript-eslint/parser": "^8.0.1",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-jest": "^28.7.0",
@ -15,7 +14,8 @@
"jest": "^29.7.0",
"nx": "^19.5.6",
"prettier": "3.3.3",
"typescript": "~5.5.4"
"typescript": "~5.5.4",
"typescript-eslint": "^8.0.1"
},
"scripts": {
"format": "prettier --write .",

View File

@ -1,2 +0,0 @@
examples
lib

View File

@ -1,13 +0,0 @@
module.exports = {
extends: '../../eslintrc.js.base.json',
overrides: [
{
files: ['*.ts'],
extends: '../../eslintrc.ts.base.json',
parserOptions: {
tsconfigRootDir: __dirname,
project: true,
},
},
],
};

View File

@ -0,0 +1,10 @@
import eslintJs from '../../eslint.js.config.base.mjs';
import eslintTs from '../../eslint.ts.config.base.mjs';
export default [
...eslintJs,
...eslintTs(import.meta.dirname),
{
ignores: ['examples', 'lib'],
},
];

View File

@ -1,17 +0,0 @@
module.exports = {
extends: '../../../../eslintrc.ts.base.json',
parserOptions: {
tsconfigRootDir: __dirname,
project: true,
},
overrides: [
{
files: ['webpack.config.ts'],
extends: '../../../../eslintrc.ts.base.json',
parserOptions: {
tsconfigRootDir: __dirname,
project: ['./tsconfig.webpack.json'],
},
},
],
};

View File

@ -0,0 +1,15 @@
import eslintJs from '../../../../eslint.js.config.base.mjs';
import eslintTs from '../../../../eslint.ts.config.base.mjs';
export default [
...eslintJs,
...eslintTs(import.meta.dirname),
...eslintTs(
import.meta.dirname,
['webpack.config.ts'],
['./tsconfig.webpack.json'],
),
{
ignores: ['dist'],
},
];

View File

@ -21,7 +21,7 @@
"scripts": {
"start": "cross-env TS_NODE_PROJECT=\"tsconfig.webpack.json\" webpack serve --open",
"build": "cross-env TS_NODE_PROJECT=\"tsconfig.webpack.json\" webpack",
"lint": "eslint . --ext .ts",
"lint": "eslint .",
"type-check": "tsc --noEmit"
},
"dependencies": {
@ -33,12 +33,8 @@
"@babel/preset-env": "^7.25.3",
"@babel/preset-typescript": "^7.24.7",
"@types/node": "^20.14.14",
"@typescript-eslint/eslint-plugin": "^8.0.1",
"@typescript-eslint/parser": "^8.0.1",
"babel-loader": "^9.1.3",
"cross-env": "^7.0.3",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"fork-ts-checker-webpack-plugin": "^9.0.2",
"html-webpack-plugin": "^5.6.0",
"ts-node": "^10.9.2",

View File

@ -31,7 +31,7 @@
"scripts": {
"build": "tsc",
"clean": "rimraf lib",
"lint": "eslint . --ext .ts",
"lint": "eslint .",
"type-check": "tsc --noEmit",
"prepack": "pnpm run clean && pnpm run build",
"prepublish": "pnpm run lint"
@ -46,10 +46,6 @@
},
"devDependencies": {
"@types/ramda": "^0.30.1",
"@typescript-eslint/eslint-plugin": "^8.0.1",
"@typescript-eslint/parser": "^8.0.1",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"rimraf": "^6.0.1",
"typescript": "~5.5.4"
}

View File

@ -1 +0,0 @@
lib

View File

@ -1,13 +0,0 @@
module.exports = {
extends: '../../eslintrc.js.base.json',
overrides: [
{
files: ['*.ts'],
extends: '../../eslintrc.ts.base.json',
parserOptions: {
tsconfigRootDir: __dirname,
project: true,
},
},
],
};

View File

@ -0,0 +1,10 @@
import eslintJs from '../../eslint.js.config.base.mjs';
import eslintTs from '../../eslint.ts.config.base.mjs';
export default [
...eslintJs,
...eslintTs(import.meta.dirname),
{
ignores: ['lib'],
},
];

View File

@ -27,18 +27,14 @@
"scripts": {
"build": "tsc",
"clean": "rimraf lib",
"lint": "eslint . --ext .ts",
"lint": "eslint .",
"type-check": "tsc --noEmit",
"prepack": "pnpm run clean && pnpm run build",
"prepublish": "pnpm run lint"
},
"devDependencies": {
"@types/d3": "^7.4.3",
"@typescript-eslint/eslint-plugin": "^8.0.1",
"@typescript-eslint/parser": "^8.0.1",
"d3": "^7.9.0",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"rimraf": "^6.0.1",
"typescript": "~5.5.4"
},

View File

@ -1 +0,0 @@
lib

View File

@ -1,21 +0,0 @@
module.exports = {
extends: '../../eslintrc.js.base.json',
overrides: [
{
files: ['*.ts'],
extends: '../../eslintrc.ts.jest.base.json',
parserOptions: {
tsconfigRootDir: __dirname,
project: true,
},
},
{
files: ['test/**/*.ts'],
extends: '../../eslintrc.ts.jest.base.json',
parserOptions: {
tsconfigRootDir: __dirname,
project: ['./tsconfig.test.json'],
},
},
],
};

View File

@ -0,0 +1,12 @@
import eslintJs from '../../eslint.js.config.base.mjs';
import eslintTs from '../../eslint.ts.config.base.mjs';
import eslintTsJest from '../../eslint.ts.jest.config.base.mjs';
export default [
...eslintJs,
...eslintTs(import.meta.dirname),
...eslintTsJest(import.meta.dirname),
{
ignores: ['lib'],
},
];

View File

@ -31,7 +31,7 @@
"build": "tsc",
"clean": "rimraf lib",
"test": "node --experimental-vm-modules node_modules/jest/bin/jest.js",
"lint": "eslint . --ext .ts",
"lint": "eslint .",
"type-check": "tsc --noEmit",
"prepack": "pnpm run clean && pnpm run build",
"prepublish": "pnpm run lint && pnpm run test"
@ -42,11 +42,6 @@
"devDependencies": {
"@types/jest": "^29.5.12",
"@types/lodash-es": "^4.17.12",
"@typescript-eslint/eslint-plugin": "^8.0.1",
"@typescript-eslint/parser": "^8.0.1",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-jest": "^28.7.0",
"immutable": "^4.3.7",
"jest": "^29.7.0",
"rimraf": "^6.0.1",

View File

@ -1 +0,0 @@
lib

View File

@ -1,21 +0,0 @@
module.exports = {
extends: '../../eslintrc.js.base.json',
overrides: [
{
files: ['*.ts'],
extends: '../../eslintrc.ts.jest.base.json',
parserOptions: {
tsconfigRootDir: __dirname,
project: true,
},
},
{
files: ['test/**/*.ts'],
extends: '../../eslintrc.ts.jest.base.json',
parserOptions: {
tsconfigRootDir: __dirname,
project: ['./tsconfig.test.json'],
},
},
],
};

View File

@ -0,0 +1,12 @@
import eslintJs from '../../eslint.js.config.base.mjs';
import eslintTs from '../../eslint.ts.config.base.mjs';
import eslintTsJest from '../../eslint.ts.jest.config.base.mjs';
export default [
...eslintJs,
...eslintTs(import.meta.dirname),
...eslintTsJest(import.meta.dirname),
{
ignores: ['lib'],
},
];

View File

@ -30,7 +30,7 @@
"build": "tsc",
"clean": "rimraf lib",
"test": "node --experimental-vm-modules node_modules/jest/bin/jest.js",
"lint": "eslint . --ext .ts",
"lint": "eslint .",
"type-check": "tsc --noEmit",
"prepack": "pnpm run clean && pnpm run build",
"prepublish": "pnpm run lint && pnpm run test"
@ -45,11 +45,6 @@
"@types/color": "^3.0.6",
"@types/jest": "^29.5.12",
"@types/lodash-es": "^4.17.12",
"@typescript-eslint/eslint-plugin": "^8.0.1",
"@typescript-eslint/parser": "^8.0.1",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-jest": "^28.7.0",
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"rimraf": "^6.0.1",

View File

@ -1,2 +0,0 @@
demo
lib

View File

@ -1,21 +0,0 @@
module.exports = {
extends: '../../eslintrc.js.base.json',
overrides: [
{
files: ['*.ts', '*.tsx'],
extends: '../../eslintrc.ts.react.base.json',
parserOptions: {
tsconfigRootDir: __dirname,
project: true,
},
},
{
files: ['test/**/*.ts', 'test/**/*.tsx'],
extends: '../../eslintrc.ts.react.jest.base.json',
parserOptions: {
tsconfigRootDir: __dirname,
project: ['./tsconfig.test.json'],
},
},
],
};

View File

@ -1 +0,0 @@
dist

View File

@ -1,17 +0,0 @@
module.exports = {
extends: '../../../eslintrc.ts.react.base.json',
parserOptions: {
tsconfigRootDir: __dirname,
project: true,
},
overrides: [
{
files: ['webpack.config.ts'],
extends: '../../../eslintrc.ts.base.json',
parserOptions: {
tsconfigRootDir: __dirname,
project: ['./tsconfig.webpack.json'],
},
},
],
};

View File

@ -0,0 +1,15 @@
import eslintJs from '../../../eslint.js.config.base.mjs';
import eslintTs from '../../../eslint.ts.react.config.base.mjs';
export default [
...eslintJs,
...eslintTs(import.meta.dirname),
...eslintTs(
import.meta.dirname,
['webpack.config.ts'],
['./tsconfig.webpack.json'],
),
{
ignores: ['dist'],
},
];

View File

@ -6,7 +6,7 @@
"scripts": {
"start": "cross-env TS_NODE_PROJECT=\"tsconfig.webpack.json\" webpack serve --open",
"build": "cross-env TS_NODE_PROJECT=\"tsconfig.webpack.json\" webpack",
"lint": "eslint . --ext .ts,.tsx",
"lint": "eslint .",
"type-check": "tsc --noEmit"
},
"dependencies": {
@ -27,14 +27,8 @@
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"@types/styled-components": "^5.1.34",
"@typescript-eslint/eslint-plugin": "^8.0.1",
"@typescript-eslint/parser": "^8.0.1",
"babel-loader": "^9.1.3",
"cross-env": "^7.0.3",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-react": "^7.35.0",
"eslint-plugin-react-hooks": "^4.6.2",
"fork-ts-checker-webpack-plugin": "^9.0.2",
"html-webpack-plugin": "^5.6.0",
"ts-node": "^10.9.2",

View File

@ -0,0 +1,12 @@
import eslintJs from '../../eslint.js.config.base.mjs';
import eslintTsReact from '../../eslint.ts.react.config.base.mjs';
import eslintTsReactJest from '../../eslint.ts.react.jest.config.base.mjs';
export default [
...eslintJs,
...eslintTsReact(import.meta.dirname),
...eslintTsReactJest(import.meta.dirname),
{
ignores: ['demo', 'lib'],
},
];

View File

@ -30,7 +30,7 @@
"build": "tsc",
"clean": "rimraf lib",
"test": "node --experimental-vm-modules node_modules/jest/bin/jest.js",
"lint": "eslint . --ext .ts,.tsx",
"lint": "eslint .",
"type-check": "tsc --noEmit",
"prepack": "pnpm run clean && pnpm run build",
"prepublish": "pnpm run lint && pnpm run test"
@ -43,13 +43,6 @@
"@types/jest": "^29.5.12",
"@types/react": "^18.3.3",
"@types/react-test-renderer": "^18.3.0",
"@typescript-eslint/eslint-plugin": "^8.0.1",
"@typescript-eslint/parser": "^8.0.1",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-jest": "^28.7.0",
"eslint-plugin-react": "^7.35.0",
"eslint-plugin-react-hooks": "^4.6.2",
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"react": "^18.3.1",

View File

@ -1,2 +0,0 @@
examples
lib

View File

@ -1,29 +0,0 @@
module.exports = {
extends: '../../eslintrc.js.base.json',
overrides: [
{
files: ['*.ts', '*.tsx'],
extends: '../../eslintrc.ts.react.base.json',
parserOptions: {
tsconfigRootDir: __dirname,
project: true,
},
},
{
files: ['test/**/*.ts', 'test/**/*.tsx'],
extends: '../../eslintrc.ts.react.jest.base.json',
parserOptions: {
tsconfigRootDir: __dirname,
project: ['./tsconfig.test.json'],
},
},
{
files: ['webpack.config.umd.ts'],
extends: '../../eslintrc.ts.base.json',
parserOptions: {
tsconfigRootDir: __dirname,
project: ['./tsconfig.webpack.json'],
},
},
],
};

View File

@ -0,0 +1,12 @@
import eslintJs from '../../eslint.js.config.base.mjs';
import eslintTsReact from '../../eslint.ts.react.config.base.mjs';
import eslintTsReactJest from '../../eslint.ts.react.jest.config.base.mjs';
export default [
...eslintJs,
...eslintTsReact(import.meta.dirname),
...eslintTsReactJest(import.meta.dirname),
{
ignores: ['examples', 'lib'],
},
];

View File

@ -1 +0,0 @@
dist

View File

@ -1,17 +0,0 @@
module.exports = {
extends: '../../../eslintrc.ts.react.base.json',
parserOptions: {
tsconfigRootDir: __dirname,
project: true,
},
overrides: [
{
files: ['webpack.config.ts'],
extends: '../../../eslintrc.ts.base.json',
parserOptions: {
tsconfigRootDir: __dirname,
project: ['./tsconfig.webpack.json'],
},
},
],
};

View File

@ -0,0 +1,15 @@
import eslintJs from '../../../eslint.js.config.base.mjs';
import eslintTs from '../../../eslint.ts.react.config.base.mjs';
export default [
...eslintJs,
...eslintTs(import.meta.dirname),
...eslintTs(
import.meta.dirname,
['webpack.config.ts'],
['./tsconfig.webpack.json'],
),
{
ignores: ['dist'],
},
];

View File

@ -15,7 +15,7 @@
"scripts": {
"start": "cross-env TS_NODE_PROJECT=\"tsconfig.webpack.json\" webpack serve --open",
"build": "cross-env TS_NODE_PROJECT=\"tsconfig.webpack.json\" webpack",
"lint": "eslint . --ext .ts,.tsx",
"lint": "eslint .",
"type-check": "tsc --noEmit"
},
"dependencies": {
@ -33,14 +33,8 @@
"@types/node": "^20.14.14",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"@typescript-eslint/eslint-plugin": "^8.0.1",
"@typescript-eslint/parser": "^8.0.1",
"babel-loader": "^9.1.3",
"cross-env": "^7.0.3",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-react": "^7.35.0",
"eslint-plugin-react-hooks": "^4.6.2",
"fork-ts-checker-webpack-plugin": "^9.0.2",
"html-webpack-plugin": "^5.6.0",
"ts-node": "^10.9.2",

View File

@ -34,7 +34,7 @@
"build": "tsc",
"clean": "rimraf lib",
"test": "node --experimental-vm-modules node_modules/jest/bin/jest.js",
"lint": "eslint . --ext .ts,.tsx",
"lint": "eslint .",
"type-check": "tsc --noEmit",
"prepack": "pnpm run clean && pnpm run build",
"prepublish": "pnpm run lint && pnpm run test"
@ -47,13 +47,6 @@
"@types/jest": "^29.5.12",
"@types/react": "^18.3.3",
"@types/react-test-renderer": "^18.3.0",
"@typescript-eslint/eslint-plugin": "^8.0.1",
"@typescript-eslint/parser": "^8.0.1",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-jest": "^28.7.0",
"eslint-plugin-react": "^7.35.0",
"eslint-plugin-react-hooks": "^4.6.2",
"jest": "^29.7.0",
"react": "^18.3.1",
"react-test-renderer": "^18.3.1",

View File

@ -1,2 +0,0 @@
build
lib

View File

@ -1,21 +0,0 @@
module.exports = {
extends: '../../eslintrc.js.base.json',
overrides: [
{
files: ['*.ts', '*.tsx'],
extends: '../../eslintrc.ts.react.base.json',
parserOptions: {
tsconfigRootDir: __dirname,
project: true,
},
},
{
files: ['test/**/*.ts', 'test/**/*.tsx'],
extends: '../../eslintrc.ts.react.jest.base.json',
parserOptions: {
tsconfigRootDir: __dirname,
project: ['./tsconfig.test.json'],
},
},
],
};

View File

@ -0,0 +1,12 @@
import eslintJs from '../../eslint.js.config.base.mjs';
import eslintTsReact from '../../eslint.ts.react.config.base.mjs';
import eslintTsReactJest from '../../eslint.ts.react.jest.config.base.mjs';
export default [
...eslintJs,
...eslintTsReact(import.meta.dirname),
...eslintTsReactJest(import.meta.dirname),
{
ignores: ['lib'],
},
];

View File

@ -29,7 +29,7 @@
"build:types": "tsc --emitDeclarationOnly",
"clean": "rimraf lib",
"test": "jest",
"lint": "eslint . --ext .ts,.tsx",
"lint": "eslint .",
"type-check": "tsc --noEmit",
"prepack": "pnpm run clean && pnpm run build",
"prepublish": "pnpm run type-check && pnpm run lint && pnpm run test"
@ -73,15 +73,8 @@
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"@types/styled-components": "^5.1.34",
"@typescript-eslint/eslint-plugin": "^8.0.1",
"@typescript-eslint/parser": "^8.0.1",
"cross-env": "^7.0.3",
"esbuild": "^0.23.0",
"eslint": "^8.57.0",
"eslint-plugin-jest": "^28.7.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-react": "^7.35.0",
"eslint-plugin-react-hooks": "^4.6.2",
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"react": "^18.3.1",

View File

@ -1,3 +0,0 @@
build
lib
umd

View File

@ -1,37 +0,0 @@
module.exports = {
extends: '../../eslintrc.js.base.json',
overrides: [
{
files: ['*.ts', '*.tsx'],
extends: '../../eslintrc.ts.react.base.json',
parserOptions: {
tsconfigRootDir: __dirname,
project: true,
},
},
{
files: ['demo/**/*.ts', 'demo/**/*.tsx'],
extends: '../../eslintrc.ts.react.base.json',
parserOptions: {
tsconfigRootDir: __dirname,
project: ['./tsconfig.demo.json'],
},
},
{
files: ['test/**/*.ts', 'test/**/*.tsx'],
extends: '../../eslintrc.ts.react.jest.base.json',
parserOptions: {
tsconfigRootDir: __dirname,
project: ['./tsconfig.test.json'],
},
},
{
files: ['webpack.config.ts', 'webpack.config.umd.ts'],
extends: '../../eslintrc.ts.base.json',
parserOptions: {
tsconfigRootDir: __dirname,
project: ['./tsconfig.webpack.json'],
},
},
],
};

View File

@ -29,7 +29,7 @@ await esbuild.build({
// https://github.com/evanw/esbuild/issues/337#issuecomment-954633403
function importAsGlobals(mapping) {
// https://stackoverflow.com/a/3561711/153718
const escRe = (s) => s.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&');
const escRe = (s) => s.replace(/[-/\\^$*+?.()|[\]{}]/g, '\\$&');
const filter = new RegExp(
Object.keys(mapping)
.map((mod) => `^${escRe(mod)}$`)

View File

@ -0,0 +1,32 @@
import globals from 'globals';
import eslintJs from '../../eslint.js.config.base.mjs';
import eslintTsReact from '../../eslint.ts.react.config.base.mjs';
import eslintTsReactJest from '../../eslint.ts.react.jest.config.base.mjs';
import eslintTs from '../../eslint.ts.react.config.base.mjs';
export default [
...eslintJs,
...eslintTsReact(import.meta.dirname),
...eslintTsReact(
import.meta.dirname,
['demo/**/*.ts', 'demo/**/*.tsx'],
['./tsconfig.demo.json'],
),
...eslintTsReactJest(import.meta.dirname),
...eslintTs(
import.meta.dirname,
['webpack.config.ts', 'webpack.config.umd.ts'],
['./tsconfig.webpack.json'],
),
{
ignores: ['build', 'lib', 'umd'],
},
{
files: ['buildUmd.mjs'],
languageOptions: {
globals: {
...globals.nodeBuiltin,
},
},
},
];

View File

@ -33,7 +33,7 @@
"build:umd": "node buildUmd.mjs --dev",
"build:umd:min": "node buildUmd.mjs",
"clean": "rimraf build lib umd",
"lint": "eslint . --ext .ts,.tsx",
"lint": "eslint .",
"type-check": "tsc --noEmit",
"prepack": "pnpm run clean && pnpm run build",
"prepublish": "pnpm run type-check && pnpm run lint"
@ -69,17 +69,12 @@
"@types/socketcluster-client": "^19.1.0",
"@types/styled-components": "^5.1.34",
"@types/webpack-env": "^1.18.5",
"@typescript-eslint/eslint-plugin": "^8.0.1",
"@typescript-eslint/parser": "^8.0.1",
"babel-loader": "^9.1.3",
"cross-env": "^7.0.3",
"css-loader": "^7.1.2",
"esbuild": "^0.23.0",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-react": "^7.35.0",
"eslint-plugin-react-hooks": "^4.6.2",
"fork-ts-checker-webpack-plugin": "^9.0.2",
"globals": "^15.9.0",
"html-loader": "^5.1.0",
"html-webpack-plugin": "^5.6.0",
"react": "^18.3.1",

View File

@ -1,13 +0,0 @@
module.exports = {
extends: '../../eslintrc.js.base.json',
overrides: [
{
files: ['*.ts', '*.tsx'],
extends: '../../eslintrc.ts.react.base.json',
parserOptions: {
tsconfigRootDir: __dirname,
project: true,
},
},
],
};

View File

@ -0,0 +1,10 @@
import eslintJs from '../../eslint.js.config.base.mjs';
import eslintTsReact from '../../eslint.ts.react.config.base.mjs';
export default [
...eslintJs,
...eslintTsReact(import.meta.dirname),
{
ignores: ['lib'],
},
];

View File

@ -33,7 +33,7 @@
"build:esm": "babel src --config-file ./babel.config.esm.json --extensions \".ts,.tsx\" --out-dir lib/esm",
"build:types": "tsc --emitDeclarationOnly",
"clean": "rimraf lib",
"lint": "eslint . --ext .ts,.tsx",
"lint": "eslint .",
"type-check": "tsc --noEmit",
"prepack": "pnpm run clean && pnpm run build",
"prepublish": "pnpm run type-check && pnpm run lint"
@ -54,12 +54,6 @@
"@babel/preset-typescript": "^7.24.7",
"@redux-devtools/core": "^4.0.0",
"@types/react": "^18.3.3",
"@typescript-eslint/eslint-plugin": "^8.0.1",
"@typescript-eslint/parser": "^8.0.1",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-react": "^7.35.0",
"eslint-plugin-react-hooks": "^4.6.2",
"react": "^18.3.1",
"redux": "^5.0.1",
"rimraf": "^6.0.1",

View File

@ -1,2 +0,0 @@
dist
umd

View File

@ -1,20 +0,0 @@
module.exports = {
overrides: [
{
files: ['*.ts'],
extends: '../../eslintrc.ts.base.json',
parserOptions: {
tsconfigRootDir: __dirname,
project: true,
},
},
{
files: ['test/**/*.ts'],
extends: '../../eslintrc.ts.jest.base.json',
parserOptions: {
tsconfigRootDir: __dirname,
project: ['./tsconfig.test.json'],
},
},
],
};

View File

@ -2,7 +2,7 @@
"private": true,
"name": "@redux-devtools/cli",
"version": "0.0.1",
"main": "electron.js",
"main": "electron.cjs",
"description": "Remote Redux DevTools",
"authors": "Mihail Diordiev"
}

View File

@ -0,0 +1,20 @@
import globals from 'globals';
import eslintJs from '../../eslint.js.config.base.mjs';
import eslintTs from '../../eslint.ts.config.base.mjs';
import eslintTsJest from '../../eslint.ts.jest.config.base.mjs';
export default [
...eslintJs,
...eslintTs(import.meta.dirname),
...eslintTsJest(import.meta.dirname),
{
ignores: ['dist', 'umd'],
},
{
languageOptions: {
globals: {
...globals.nodeBuiltin,
},
},
},
];

View File

@ -32,7 +32,7 @@
"start:electron": "node ./bin/redux-devtools.js --open",
"clean": "rimraf dist",
"test": "jest",
"lint": "eslint . --ext .ts,.tsx",
"lint": "eslint .",
"type-check": "tsc --noEmit",
"prepack": "pnpm run clean && pnpm run build",
"prepublish": "pnpm run type-check && pnpm run lint && pnpm run test"
@ -84,11 +84,7 @@
"@types/styled-components": "^5.1.34",
"@types/supertest": "^6.0.2",
"@types/uuid": "^10.0.0",
"@typescript-eslint/eslint-plugin": "^8.0.1",
"@typescript-eslint/parser": "^8.0.1",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-jest": "^28.7.0",
"globals": "^15.9.0",
"jest": "^29.7.0",
"ncp": "^2.0.0",
"rimraf": "^6.0.1",

View File

@ -1,13 +0,0 @@
module.exports = {
extends: '../../eslintrc.js.base.json',
overrides: [
{
files: ['.ts', 'tsx'],
extends: '../../eslintrc.ts.react.base.json',
parserOptions: {
tsconfigRootDir: __dirname,
project: true,
},
},
],
};

View File

@ -0,0 +1,10 @@
import eslintJs from '../../eslint.js.config.base.mjs';
import eslintTsReact from '../../eslint.ts.react.config.base.mjs';
export default [
...eslintJs,
...eslintTsReact(import.meta.dirname),
{
ignores: ['lib'],
},
];

View File

@ -35,7 +35,7 @@
"build:esm": "babel src --config-file ./babel.config.esm.json --extensions \".ts,.tsx\" --out-dir lib/esm",
"build:types": "tsc --emitDeclarationOnly",
"clean": "rimraf lib",
"lint": "eslint . --ext .ts,.tsx",
"lint": "eslint .",
"type-check": "tsc --noEmit",
"prepack": "pnpm run clean && pnpm run build",
"prepublish": "pnpm run type-check && pnpm run lint"
@ -56,12 +56,6 @@
"@redux-devtools/core": "^4.0.0",
"@types/parse-key": "^0.2.2",
"@types/react": "^18.3.3",
"@typescript-eslint/eslint-plugin": "^8.0.1",
"@typescript-eslint/parser": "^8.0.1",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-react": "^7.35.0",
"eslint-plugin-react-hooks": "^4.6.2",
"react": "^18.3.1",
"redux": "^5.0.1",
"rimraf": "^6.0.1",

View File

@ -192,17 +192,8 @@ class DockMonitor<S, A extends Action<string>> extends Component<
onSizeChange={this.handleSizeChange}
dimMode="none"
>
{Children.map(
children as
| Monitor<S, A, LiftedState<S, A, unknown>, unknown, Action<string>>
| Monitor<
S,
A,
LiftedState<S, A, unknown>,
unknown,
Action<string>
>[],
(child, index) => this.renderChild(child, index, rest),
{Children.map(children, (child, index) =>
this.renderChild(child, index, rest),
)}
</Dock>
);

View File

@ -1 +0,0 @@
lib

View File

@ -1,13 +0,0 @@
module.exports = {
extends: '../../eslintrc.js.base.json',
overrides: [
{
files: ['*.ts'],
extends: '../../eslintrc.ts.base.json',
parserOptions: {
tsconfigRootDir: __dirname,
project: true,
},
},
],
};

View File

@ -0,0 +1,10 @@
import eslintJs from '../../eslint.js.config.base.mjs';
import eslintTs from '../../eslint.ts.config.base.mjs';
export default [
...eslintJs,
...eslintTs(import.meta.dirname),
{
ignores: ['lib'],
},
];

View File

@ -23,7 +23,7 @@
"build:esm": "babel src --config-file ./babel.config.esm.json --extensions \".ts\" --out-dir lib/esm",
"build:types": "tsc --emitDeclarationOnly",
"clean": "rimraf lib",
"lint": "eslint . --ext .ts",
"lint": "eslint .",
"type-check": "tsc --noEmit",
"prepack": "pnpm run clean && pnpm run build",
"prepublish": "pnpm run type-check && pnpm run lint"
@ -39,10 +39,6 @@
"@babel/plugin-transform-runtime": "^7.24.7",
"@babel/preset-env": "^7.25.3",
"@babel/preset-typescript": "^7.24.7",
"@typescript-eslint/eslint-plugin": "^8.0.1",
"@typescript-eslint/parser": "^8.0.1",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"redux": "^5.0.1",
"rimraf": "^6.0.1",
"typescript": "~5.5.4"

View File

@ -1,37 +0,0 @@
module.exports = {
extends: '../../eslintrc.js.base.json',
overrides: [
{
files: ['*.ts', '*.tsx'],
extends: '../../eslintrc.ts.react.base.json',
parserOptions: {
tsconfigRootDir: __dirname,
project: true,
},
},
{
files: ['demo/**/*.ts', 'demo/**/*.tsx'],
extends: '../../eslintrc.ts.react.base.json',
parserOptions: {
tsconfigRootDir: __dirname,
project: ['./demo/tsconfig.json'],
},
},
{
files: ['demo/config/webpack.config.ts'],
extends: '../../eslintrc.ts.base.json',
parserOptions: {
tsconfigRootDir: __dirname,
project: ['./demo/config/tsconfig.json'],
},
},
{
files: ['test/**/*.ts', 'test/**/*.tsx'],
extends: '../../eslintrc.ts.react.jest.base.json',
parserOptions: {
tsconfigRootDir: __dirname,
project: ['./tsconfig.test.json'],
},
},
],
};

View File

@ -1,17 +0,0 @@
module.exports = {
extends: '../../../eslintrc.ts.react.base.json',
parserOptions: {
tsconfigRootDir: __dirname,
project: true,
},
overrides: [
{
files: ['webpack.config.ts'],
extends: '../../../eslintrc.ts.base.json',
parserOptions: {
tsconfigRootDir: __dirname,
project: ['./tsconfig.webpack.json'],
},
},
],
};

View File

@ -0,0 +1,15 @@
import eslintJs from '../../../eslint.js.config.base.mjs';
import eslintTs from '../../../eslint.ts.react.config.base.mjs';
export default [
...eslintJs,
...eslintTs(import.meta.dirname),
...eslintTs(
import.meta.dirname,
['webpack.config.ts'],
['./tsconfig.webpack.json'],
),
{
ignores: ['dist'],
},
];

View File

@ -6,7 +6,7 @@
"scripts": {
"start": "cross-env TS_NODE_PROJECT=\"tsconfig.webpack.json\" webpack serve --open",
"build": "cross-env TS_NODE_PROJECT=\"tsconfig.webpack.json\" webpack",
"lint": "eslint . --ext .ts,.tsx",
"lint": "eslint .",
"type-check": "tsc --noEmit"
},
"dependencies": {
@ -39,15 +39,9 @@
"@types/redux-logger": "^3.0.13",
"@types/styled-components": "^5.1.34",
"@types/webpack-env": "^1.18.5",
"@typescript-eslint/eslint-plugin": "^8.0.1",
"@typescript-eslint/parser": "^8.0.1",
"babel-loader": "^9.1.3",
"cross-env": "^7.0.3",
"css-loader": "^7.1.2",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-react": "^7.35.0",
"eslint-plugin-react-hooks": "^4.6.2",
"fork-ts-checker-webpack-plugin": "^9.0.2",
"html-webpack-plugin": "^5.6.0",
"style-loader": "^4.0.0",

View File

@ -0,0 +1,12 @@
import eslintJs from '../../eslint.js.config.base.mjs';
import eslintTsReact from '../../eslint.ts.react.config.base.mjs';
import eslintTsReactJest from '../../eslint.ts.react.jest.config.base.mjs';
export default [
...eslintJs,
...eslintTsReact(import.meta.dirname),
...eslintTsReactJest(import.meta.dirname),
{
ignores: ['demo', 'lib'],
},
];

View File

@ -37,7 +37,7 @@
"build:types": "tsc --emitDeclarationOnly",
"clean": "rimraf lib",
"test": "jest",
"lint": "eslint . --ext .ts,.tsx",
"lint": "eslint .",
"type-check": "tsc --noEmit",
"prepack": "pnpm run clean && pnpm run build",
"prepublish": "pnpm run type-check && pnpm run lint && pnpm run test"
@ -70,13 +70,6 @@
"@types/jsan": "^3.1.5",
"@types/object-path": "^0.11.4",
"@types/react": "^18.3.3",
"@typescript-eslint/eslint-plugin": "^8.0.1",
"@typescript-eslint/parser": "^8.0.1",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-jest": "^28.7.0",
"eslint-plugin-react": "^7.35.0",
"eslint-plugin-react-hooks": "^4.6.2",
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"react": "^18.3.1",

View File

@ -1,21 +0,0 @@
module.exports = {
extends: '../../eslintrc.js.base.json',
overrides: [
{
files: ['*.ts', '*.tsx'],
extends: '../../eslintrc.ts.react.base.json',
parserOptions: {
tsconfigRootDir: __dirname,
project: true,
},
},
{
files: ['test/**/*.ts', 'test/**/*.tsx'],
extends: '../../eslintrc.ts.react.jest.base.json',
parserOptions: {
tsconfigRootDir: __dirname,
project: ['./tsconfig.test.json'],
},
},
],
};

View File

@ -0,0 +1,12 @@
import eslintJs from '../../eslint.js.config.base.mjs';
import eslintTsReact from '../../eslint.ts.react.config.base.mjs';
import eslintTsReactJest from '../../eslint.ts.react.jest.config.base.mjs';
export default [
...eslintJs,
...eslintTsReact(import.meta.dirname),
...eslintTsReactJest(import.meta.dirname),
{
ignores: ['lib'],
},
];

View File

@ -24,7 +24,7 @@
"build:types": "tsc --emitDeclarationOnly",
"clean": "rimraf lib",
"test": "jest",
"lint": "eslint . --ext .ts,.tsx",
"lint": "eslint .",
"type-check": "tsc --noEmit",
"prepack": "pnpm run clean && pnpm run build",
"prepublish": "pnpm run type-check && pnpm run lint && pnpm run test"
@ -58,13 +58,6 @@
"@types/path-browserify": "^1.0.2",
"@types/react": "^18.3.3",
"@types/source-map": "0.5.2",
"@typescript-eslint/eslint-plugin": "^8.0.1",
"@typescript-eslint/parser": "^8.0.1",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-jest": "^28.7.0",
"eslint-plugin-react": "^7.35.0",
"eslint-plugin-react-hooks": "^4.6.2",
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"react": "^18.3.1",

View File

@ -1,2 +0,0 @@
demo
lib

View File

@ -1,32 +0,0 @@
module.exports = {
extends: '../../eslintrc.js.base.json',
overrides: [
{
files: ['*.ts', '*.tsx'],
extends: '../../eslintrc.ts.react.base.json',
parserOptions: {
tsconfigRootDir: __dirname,
project: true,
},
rules: {
'react/no-unknown-property': ['error', { ignore: ['css'] }],
},
},
{
files: ['demo/**/*.ts', 'demo/**/*.tsx'],
extends: '../../eslintrc.ts.react.base.json',
parserOptions: {
tsconfigRootDir: __dirname,
project: ['./demo/tsconfig.json'],
},
},
{
files: ['demo/config/webpack.config.ts'],
extends: '../../eslintrc.ts.base.json',
parserOptions: {
tsconfigRootDir: __dirname,
project: ['./demo/config/tsconfig.json'],
},
},
],
};

View File

@ -1,17 +0,0 @@
module.exports = {
extends: '../../../eslintrc.ts.react.base.json',
parserOptions: {
tsconfigRootDir: __dirname,
project: true,
},
overrides: [
{
files: ['webpack.config.ts'],
extends: '../../../eslintrc.ts.base.json',
parserOptions: {
tsconfigRootDir: __dirname,
project: ['./tsconfig.webpack.json'],
},
},
],
};

View File

@ -0,0 +1,15 @@
import eslintJs from '../../../eslint.js.config.base.mjs';
import eslintTs from '../../../eslint.ts.react.config.base.mjs';
export default [
...eslintJs,
...eslintTs(import.meta.dirname),
...eslintTs(
import.meta.dirname,
['webpack.config.ts'],
['./tsconfig.webpack.json'],
),
{
ignores: ['dist'],
},
];

View File

@ -6,7 +6,7 @@
"scripts": {
"start": "cross-env TS_NODE_PROJECT=\"tsconfig.webpack.json\" webpack serve --open",
"build": "cross-env TS_NODE_PROJECT=\"tsconfig.webpack.json\" webpack",
"lint": "eslint . --ext .ts,.tsx",
"lint": "eslint .",
"type-check": "tsc --noEmit"
},
"dependencies": {
@ -36,14 +36,8 @@
"@types/react-dom": "^18.3.0",
"@types/redux-logger": "^3.0.13",
"@types/webpack-env": "^1.18.5",
"@typescript-eslint/eslint-plugin": "^8.0.1",
"@typescript-eslint/parser": "^8.0.1",
"babel-loader": "^9.1.3",
"cross-env": "^7.0.3",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-react": "^7.35.0",
"eslint-plugin-react-hooks": "^4.6.2",
"fork-ts-checker-webpack-plugin": "^9.0.2",
"html-webpack-plugin": "^5.6.0",
"ts-node": "^10.9.2",

View File

@ -0,0 +1,16 @@
import eslintJs from '../../eslint.js.config.base.mjs';
import eslintTsReact from '../../eslint.ts.react.config.base.mjs';
export default [
...eslintJs,
...eslintTsReact(import.meta.dirname),
{
ignores: ['demo', 'lib'],
},
{
files: ['**/*.ts', '**/*.tsx'],
rules: {
'react/no-unknown-property': ['error', { ignore: ['css'] }],
},
},
];

View File

@ -29,7 +29,7 @@
"build:esm": "babel src --config-file ./babel.config.esm.json --extensions \".ts,.tsx\" --out-dir lib/esm",
"build:types": "tsc --emitDeclarationOnly",
"clean": "rimraf lib",
"lint": "eslint . --ext .ts,.tsx",
"lint": "eslint .",
"type-check": "tsc --noEmit",
"prepack": "pnpm run clean && pnpm run build",
"prepublish": "pnpm run type-check && pnpm run lint"
@ -65,12 +65,6 @@
"@types/hex-rgba": "^1.0.3",
"@types/lodash.debounce": "^4.0.9",
"@types/react": "^18.3.3",
"@typescript-eslint/eslint-plugin": "^8.0.1",
"@typescript-eslint/parser": "^8.0.1",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-react": "^7.35.0",
"eslint-plugin-react-hooks": "^4.6.2",
"react": "^18.3.1",
"redux": "^5.0.1",
"rimraf": "^6.0.1",

View File

@ -1 +0,0 @@
lib

View File

@ -1,21 +0,0 @@
module.exports = {
extends: '../../eslintrc.js.base.json',
overrides: [
{
files: ['*.ts'],
extends: '../../eslintrc.ts.base.json',
parserOptions: {
tsconfigRootDir: __dirname,
project: true,
},
},
{
files: ['test/**/*.ts'],
extends: '../../eslintrc.ts.jest.base.json',
parserOptions: {
tsconfigRootDir: __dirname,
project: ['./tsconfig.test.json'],
},
},
],
};

Some files were not shown because too many files have changed in this diff Show More