@umijs/lint 4.0.0-rc.13 → 4.0.0-rc.14
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.
|
@@ -27,7 +27,7 @@ const recommended_1 = __importStar(require("./rules/recommended"));
|
|
|
27
27
|
require("./setup");
|
|
28
28
|
module.exports = {
|
|
29
29
|
parser: '@babel/eslint-parser',
|
|
30
|
-
plugins: ['react', 'react-hooks'
|
|
30
|
+
plugins: ['react', 'react-hooks'],
|
|
31
31
|
settings: {
|
|
32
32
|
react: {
|
|
33
33
|
version: 'detect',
|
|
@@ -47,6 +47,16 @@ module.exports = {
|
|
|
47
47
|
files: ['**/*.{ts,tsx}'],
|
|
48
48
|
rules: recommended_1.typescript,
|
|
49
49
|
},
|
|
50
|
+
{
|
|
51
|
+
settings: {
|
|
52
|
+
jest: {
|
|
53
|
+
version: 26,
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
files: ['**/*.{test,spec,unit,e2e}.{ts,tsx,js,jsx}'],
|
|
57
|
+
plugins: ['jest'],
|
|
58
|
+
rules: recommended_1.jest,
|
|
59
|
+
},
|
|
50
60
|
],
|
|
51
61
|
parserOptions: {
|
|
52
62
|
ecmaFeatures: {
|
|
@@ -47,6 +47,17 @@ declare const _default: {
|
|
|
47
47
|
'react/no-unescaped-entities': number;
|
|
48
48
|
'react/no-unknown-property': number;
|
|
49
49
|
'react/require-render-return': number;
|
|
50
|
+
'react-hooks/rules-of-hooks': number;
|
|
51
|
+
};
|
|
52
|
+
/**
|
|
53
|
+
* recommended enabled/disabled rules for umi project
|
|
54
|
+
* @note base on recommended rule set from loaded eslint plugins
|
|
55
|
+
*/
|
|
56
|
+
export default _default;
|
|
57
|
+
/**
|
|
58
|
+
* config-plugin-jest rules
|
|
59
|
+
*/
|
|
60
|
+
export declare const jest: {
|
|
50
61
|
'jest/no-conditional-expect': number;
|
|
51
62
|
'jest/no-deprecated-functions': number;
|
|
52
63
|
'jest/no-export': number;
|
|
@@ -61,13 +72,7 @@ declare const _default: {
|
|
|
61
72
|
'jest/valid-expect-in-promise': number;
|
|
62
73
|
'jest/valid-expect': number;
|
|
63
74
|
'jest/valid-title': number;
|
|
64
|
-
'react-hooks/rules-of-hooks': number;
|
|
65
75
|
};
|
|
66
|
-
/**
|
|
67
|
-
* recommended enabled/disabled rules for umi project
|
|
68
|
-
* @note base on recommended rule set from loaded eslint plugins
|
|
69
|
-
*/
|
|
70
|
-
export default _default;
|
|
71
76
|
/**
|
|
72
77
|
* recommended enabled/disabled rules for typescript umi project
|
|
73
78
|
* @note base on recommended rule set from loaded eslint plugins
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.typescript = void 0;
|
|
3
|
+
exports.typescript = exports.jest = void 0;
|
|
4
4
|
/**
|
|
5
5
|
* recommended enabled/disabled rules for umi project
|
|
6
6
|
* @note base on recommended rule set from loaded eslint plugins
|
|
@@ -64,7 +64,13 @@ exports.default = {
|
|
|
64
64
|
'react/no-unescaped-entities': 2,
|
|
65
65
|
'react/no-unknown-property': 2,
|
|
66
66
|
'react/require-render-return': 2,
|
|
67
|
-
// config-plugin-
|
|
67
|
+
// config-plugin-react-hooks rules
|
|
68
|
+
'react-hooks/rules-of-hooks': 2,
|
|
69
|
+
};
|
|
70
|
+
/**
|
|
71
|
+
* config-plugin-jest rules
|
|
72
|
+
*/
|
|
73
|
+
exports.jest = {
|
|
68
74
|
'jest/no-conditional-expect': 2,
|
|
69
75
|
'jest/no-deprecated-functions': 2,
|
|
70
76
|
'jest/no-export': 2,
|
|
@@ -79,8 +85,6 @@ exports.default = {
|
|
|
79
85
|
'jest/valid-expect-in-promise': 2,
|
|
80
86
|
'jest/valid-expect': 2,
|
|
81
87
|
'jest/valid-title': 2,
|
|
82
|
-
// config-plugin-react-hooks rules
|
|
83
|
-
'react-hooks/rules-of-hooks': 2,
|
|
84
88
|
};
|
|
85
89
|
/**
|
|
86
90
|
* recommended enabled/disabled rules for typescript umi project
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umijs/lint",
|
|
3
|
-
"version": "4.0.0-rc.
|
|
3
|
+
"version": "4.0.0-rc.14",
|
|
4
4
|
"description": "@umijs/lint",
|
|
5
5
|
"homepage": "https://github.com/umijs/umi-next/tree/master/packages/lint#readme",
|
|
6
6
|
"bugs": "https://github.com/umijs/umi-next/issues",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
],
|
|
18
18
|
"scripts": {
|
|
19
19
|
"build": "pnpm tsc",
|
|
20
|
-
"build:deps": "
|
|
20
|
+
"build:deps": "umi-scripts bundleDeps",
|
|
21
21
|
"dev": "pnpm build -- --watch"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"@stylelint/postcss-css-in-js": "^0.37.2",
|
|
27
27
|
"@typescript-eslint/eslint-plugin": "5.20.0",
|
|
28
28
|
"@typescript-eslint/parser": "5.20.0",
|
|
29
|
-
"@umijs/babel-preset-umi": "4.0.0-rc.
|
|
29
|
+
"@umijs/babel-preset-umi": "4.0.0-rc.14",
|
|
30
30
|
"eslint-plugin-jest": "26.1.4",
|
|
31
31
|
"eslint-plugin-react": "7.29.4",
|
|
32
32
|
"eslint-plugin-react-hooks": "4.4.0",
|