@thepalaceproject/circulation-admin 1.41.0-post.30 → 1.41.0-post.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/eslint.config.mjs +95 -0
- package/package.json +9 -9
- package/.eslintrc +0 -67
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import js from "@eslint/js";
|
|
2
|
+
import tseslint from "typescript-eslint";
|
|
3
|
+
import react from "eslint-plugin-react";
|
|
4
|
+
import reactHooks from "eslint-plugin-react-hooks";
|
|
5
|
+
import jsxA11y from "eslint-plugin-jsx-a11y";
|
|
6
|
+
import prettier from "eslint-config-prettier";
|
|
7
|
+
import globals from "globals";
|
|
8
|
+
|
|
9
|
+
export default tseslint.config(
|
|
10
|
+
{
|
|
11
|
+
ignores: ["dist/", "lib/", "docs/", "typings/", "node_modules/"],
|
|
12
|
+
},
|
|
13
|
+
js.configs.recommended,
|
|
14
|
+
...tseslint.configs.recommended,
|
|
15
|
+
react.configs.flat.recommended,
|
|
16
|
+
jsxA11y.flatConfigs.strict,
|
|
17
|
+
{
|
|
18
|
+
files: ["**/*.{js,jsx,ts,tsx}"],
|
|
19
|
+
plugins: {
|
|
20
|
+
"react-hooks": reactHooks,
|
|
21
|
+
},
|
|
22
|
+
languageOptions: {
|
|
23
|
+
// JSX is enabled by react.configs.flat.recommended and sourceType
|
|
24
|
+
// defaults to "module" in flat config, so neither needs to be set here.
|
|
25
|
+
globals: {
|
|
26
|
+
...globals.browser,
|
|
27
|
+
...globals.node,
|
|
28
|
+
...globals.jest,
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
settings: {
|
|
32
|
+
react: {
|
|
33
|
+
version: "detect",
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
rules: {
|
|
37
|
+
// Enable the two classic react-hooks rules explicitly rather than
|
|
38
|
+
// spreading `reactHooks.configs.recommended.rules`. eslint-plugin-react-hooks
|
|
39
|
+
// v7's recommended preset also turns on newer React Compiler rules
|
|
40
|
+
// (set-state-in-effect, refs, etc.).
|
|
41
|
+
// TODO: Adopt these new rules.
|
|
42
|
+
"react-hooks/rules-of-hooks": "error",
|
|
43
|
+
"react-hooks/exhaustive-deps": "warn",
|
|
44
|
+
"react/jsx-filename-extension": [
|
|
45
|
+
1,
|
|
46
|
+
{ extensions: [".js", ".jsx", ".ts", ".tsx"] },
|
|
47
|
+
],
|
|
48
|
+
"react/jsx-props-no-spreading": 0,
|
|
49
|
+
"@typescript-eslint/no-explicit-any": 0,
|
|
50
|
+
"no-useless-escape": 0,
|
|
51
|
+
"@typescript-eslint/explicit-function-return-type": 0,
|
|
52
|
+
"react/prop-types": 0,
|
|
53
|
+
"react/no-string-refs": 0,
|
|
54
|
+
"jsx-a11y/label-has-associated-control": 0,
|
|
55
|
+
"react/no-find-dom-node": 0,
|
|
56
|
+
"react/no-unescaped-entities": 0,
|
|
57
|
+
"@typescript-eslint/no-inferrable-types": 0,
|
|
58
|
+
// These rules conflict with idioms throughout this codebase, so we
|
|
59
|
+
// keep them off to preserve prior linting behavior:
|
|
60
|
+
// - short-circuit side effects, e.g. `cond && doThing()`, and chai
|
|
61
|
+
// assertions like `expect(x).to.be.true` (no-unused-expressions)
|
|
62
|
+
// - empty props/state types, e.g. `React.Component<{}, {}>`
|
|
63
|
+
// (no-empty-object-type)
|
|
64
|
+
// - `import x = require("x")` and CommonJS webpack configs
|
|
65
|
+
// (no-require-imports)
|
|
66
|
+
// TODO: Evaluate these rules to see if we want to apply them.
|
|
67
|
+
"@typescript-eslint/no-unused-expressions": 0,
|
|
68
|
+
"@typescript-eslint/no-empty-object-type": 0,
|
|
69
|
+
"@typescript-eslint/no-require-imports": 0,
|
|
70
|
+
"@typescript-eslint/no-unused-vars": [
|
|
71
|
+
"warn",
|
|
72
|
+
{
|
|
73
|
+
argsIgnorePattern: "^_",
|
|
74
|
+
varsIgnorePattern: "^_",
|
|
75
|
+
ignoreRestSiblings: true,
|
|
76
|
+
},
|
|
77
|
+
],
|
|
78
|
+
},
|
|
79
|
+
},
|
|
80
|
+
// Disable ESLint formatting rules that conflict with Prettier.
|
|
81
|
+
// This should be nearly the last option so it overrides previous rules.
|
|
82
|
+
prettier,
|
|
83
|
+
{
|
|
84
|
+
// ESLint merges `linterOptions` with last-writer-wins
|
|
85
|
+
// semantics, so placing it after every preset spread keeps a future plugin
|
|
86
|
+
// config from silently re-enabling it. Flat config reports unused
|
|
87
|
+
// eslint-disable directives by default; the previous .eslintrc setup did
|
|
88
|
+
// not. Keep it off to preserve prior behavior and avoid the pre-commit hook
|
|
89
|
+
// auto-stripping existing directives. Cleaning up stale directives can be
|
|
90
|
+
// done as a separate, focused change.
|
|
91
|
+
linterOptions: {
|
|
92
|
+
reportUnusedDisableDirectives: "off",
|
|
93
|
+
},
|
|
94
|
+
}
|
|
95
|
+
);
|
package/package.json
CHANGED
|
@@ -86,8 +86,7 @@
|
|
|
86
86
|
"@types/react-router": "^3.0.28",
|
|
87
87
|
"@types/recharts": "^1.8.28",
|
|
88
88
|
"@types/redux-mock-store": "^1.0.3",
|
|
89
|
-
"@
|
|
90
|
-
"@typescript-eslint/parser": "^5.46.0",
|
|
89
|
+
"@eslint/js": "^9.39.4",
|
|
91
90
|
"chai": "4.2.0",
|
|
92
91
|
"clean-webpack-plugin": "^2.0.1",
|
|
93
92
|
"colors-cli": "^1.0.27",
|
|
@@ -96,22 +95,22 @@
|
|
|
96
95
|
"dotenv-cli": "^11.0.0",
|
|
97
96
|
"enzyme": "^3.11.0",
|
|
98
97
|
"enzyme-adapter-react-16": "^1.15.6",
|
|
99
|
-
"eslint": "^
|
|
100
|
-
"eslint-config-prettier": "^
|
|
101
|
-
"eslint-plugin-jsx-a11y": "^6.2
|
|
102
|
-
"eslint-plugin-
|
|
103
|
-
"eslint-plugin-react": "^7.19.0",
|
|
98
|
+
"eslint": "^9.39.4",
|
|
99
|
+
"eslint-config-prettier": "^10.1.8",
|
|
100
|
+
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
101
|
+
"eslint-plugin-react": "^7.37.5",
|
|
104
102
|
"eslint-plugin-react-hooks": "^7.1.1",
|
|
105
103
|
"fetch-mock": "^10.0.7",
|
|
106
104
|
"fetch-mock-jest": "^1.5.1",
|
|
107
105
|
"fetch-ponyfill": "^7.1.0",
|
|
108
106
|
"file-loader": "^6.2.0",
|
|
109
107
|
"follow-redirects": "^1.16.0",
|
|
108
|
+
"globals": "^16.5.0",
|
|
110
109
|
"husky": "^4.3.0",
|
|
111
110
|
"jest": "^29.3.1",
|
|
112
111
|
"jest-environment-jsdom": "^30.4.1",
|
|
113
112
|
"jest-fixed-jsdom": "^0.0.11",
|
|
114
|
-
"jsdom": "^
|
|
113
|
+
"jsdom": "^29.1.1",
|
|
115
114
|
"json-loader": "^0.5.4",
|
|
116
115
|
"lint-staged": "^17.0.7",
|
|
117
116
|
"marked": "^18.0.5",
|
|
@@ -138,6 +137,7 @@
|
|
|
138
137
|
"tslint-react-a11y": "^1.1.0",
|
|
139
138
|
"typedoc": "^0.28.19",
|
|
140
139
|
"typescript": "^5.7.3",
|
|
140
|
+
"typescript-eslint": "^8.60.1",
|
|
141
141
|
"url-loader": "^4.1.1",
|
|
142
142
|
"webpack": "^5.105.2",
|
|
143
143
|
"webpack-cli": "^5.0.1",
|
|
@@ -154,5 +154,5 @@
|
|
|
154
154
|
"*.{js,jsx,ts,tsx,css,md}": "prettier --write",
|
|
155
155
|
"*.{js,css,md}": "prettier --write"
|
|
156
156
|
},
|
|
157
|
-
"version": "1.41.0-post.
|
|
157
|
+
"version": "1.41.0-post.32"
|
|
158
158
|
}
|
package/.eslintrc
DELETED
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": [
|
|
3
|
-
"eslint:recommended",
|
|
4
|
-
"plugin:@typescript-eslint/eslint-recommended",
|
|
5
|
-
"plugin:@typescript-eslint/recommended",
|
|
6
|
-
"plugin:react/recommended",
|
|
7
|
-
"plugin:jsx-a11y/strict",
|
|
8
|
-
"prettier",
|
|
9
|
-
"prettier/@typescript-eslint",
|
|
10
|
-
"plugin:prettier/recommended",
|
|
11
|
-
"prettier/react"
|
|
12
|
-
],
|
|
13
|
-
"parser": "@typescript-eslint/parser",
|
|
14
|
-
"parserOptions": {
|
|
15
|
-
"project": "tsconfig.json",
|
|
16
|
-
"sourceType": "module",
|
|
17
|
-
"ecmaFeatures": {
|
|
18
|
-
"jsx": true
|
|
19
|
-
}
|
|
20
|
-
},
|
|
21
|
-
"env": {
|
|
22
|
-
"browser": true,
|
|
23
|
-
"node": true,
|
|
24
|
-
"es6": true,
|
|
25
|
-
"jest": true
|
|
26
|
-
},
|
|
27
|
-
"rules": {
|
|
28
|
-
"import/extensions": 0,
|
|
29
|
-
"global-require": 0,
|
|
30
|
-
"react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx", ".ts", ".tsx"] }],
|
|
31
|
-
"react/jsx-props-no-spreading": 0,
|
|
32
|
-
"@typescript-eslint/no-explicit-any": 0,
|
|
33
|
-
"no-useless-escape": 0,
|
|
34
|
-
"@typescript-eslint/explicit-function-return-type": 0,
|
|
35
|
-
"react/prop-types": 0,
|
|
36
|
-
"@typescript-eslint/camelcase": 0,
|
|
37
|
-
"react/no-string-refs": 0,
|
|
38
|
-
"jsx-a11y/label-has-associated-control": 0,
|
|
39
|
-
"react/no-find-dom-node": 0,
|
|
40
|
-
"jsx-a11y/label-has-for": 0,
|
|
41
|
-
"react/no-unescaped-entities": 0,
|
|
42
|
-
"@typescript-eslint/no-inferrable-types": 0,
|
|
43
|
-
"@typescript-eslint/no-unused-vars": [
|
|
44
|
-
"warn",
|
|
45
|
-
{
|
|
46
|
-
"argsIgnorePattern": "^_",
|
|
47
|
-
"varsIgnorePattern": "^_",
|
|
48
|
-
"ignoreRestSiblings": true
|
|
49
|
-
}
|
|
50
|
-
]
|
|
51
|
-
},
|
|
52
|
-
"settings": {
|
|
53
|
-
"react": {
|
|
54
|
-
"version": "detect"
|
|
55
|
-
},
|
|
56
|
-
"import/resolver": {
|
|
57
|
-
"node": {
|
|
58
|
-
"extensions": [
|
|
59
|
-
".js",
|
|
60
|
-
".jsx",
|
|
61
|
-
".ts",
|
|
62
|
-
".tsx"
|
|
63
|
-
]
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
}
|