@elliemae/pui-cli 9.0.0-alpha.6 → 9.0.0-alpha.7
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/dist/cjs/lint-config/eslint/flat/common.mjs +5 -2
- package/dist/cjs/lint-config/eslint/flat/presets.mjs +14 -2
- package/dist/esm/lint-config/eslint/flat/common.mjs +5 -2
- package/dist/esm/lint-config/eslint/flat/presets.mjs +14 -2
- package/dist/types/lib/lint-config/eslint/flat/presets.d.mts +8 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/lib/lint-config/eslint/flat/common.mjs +5 -2
- package/lib/lint-config/eslint/flat/presets.mjs +14 -2
- package/package.json +1 -1
|
@@ -4,7 +4,6 @@ import eslintConfigPrettier from 'eslint-config-prettier';
|
|
|
4
4
|
import importX from 'eslint-plugin-import-x';
|
|
5
5
|
import jest from 'eslint-plugin-jest';
|
|
6
6
|
import testingLibrary from 'eslint-plugin-testing-library';
|
|
7
|
-
import wdio from 'eslint-plugin-wdio';
|
|
8
7
|
import globals from 'globals';
|
|
9
8
|
import tseslint from 'typescript-eslint';
|
|
10
9
|
import {
|
|
@@ -16,6 +15,7 @@ import {
|
|
|
16
15
|
testingLibraryDomRules,
|
|
17
16
|
testingLibraryReactRules,
|
|
18
17
|
wdioGlobals,
|
|
18
|
+
wdioPlugin,
|
|
19
19
|
wdioRecommendedRules,
|
|
20
20
|
wdioSpecFiles,
|
|
21
21
|
} from './presets.mjs';
|
|
@@ -119,10 +119,13 @@ export function createBaseFlatConfigs(tsRules) {
|
|
|
119
119
|
},
|
|
120
120
|
{
|
|
121
121
|
files: wdioSpecFiles,
|
|
122
|
-
plugins: { wdio, jest },
|
|
122
|
+
plugins: { wdio: wdioPlugin, jest },
|
|
123
123
|
languageOptions: { globals: wdioGlobals },
|
|
124
124
|
rules: {
|
|
125
125
|
...wdioRecommendedRules,
|
|
126
|
+
// JS e2e specs are not type-checked; use await-expect instead of no-floating-promise.
|
|
127
|
+
'wdio/await-expect': 'error',
|
|
128
|
+
'wdio/no-floating-promise': 'off',
|
|
126
129
|
'jest/valid-expect': 'off',
|
|
127
130
|
},
|
|
128
131
|
},
|
|
@@ -75,10 +75,22 @@ export const reactPresetRules = {
|
|
|
75
75
|
...reduxSaga.configs.recommended.rules,
|
|
76
76
|
};
|
|
77
77
|
|
|
78
|
+
/**
|
|
79
|
+
* eslint-plugin-wdio v9 default export exposes config severities as `rules` when
|
|
80
|
+
* typescript-eslint is installed. Use flat/recommended's nested plugin instead.
|
|
81
|
+
*/
|
|
82
|
+
const wdioFlatRecommended =
|
|
83
|
+
wdio.configs['flat/recommended'] ?? wdio.configs.recommended;
|
|
84
|
+
|
|
85
|
+
export const wdioPlugin = wdioFlatRecommended.plugins?.wdio ?? wdio;
|
|
86
|
+
|
|
78
87
|
/** @type {import('eslint').Linter.RulesRecord} */
|
|
79
|
-
export const wdioRecommendedRules =
|
|
88
|
+
export const wdioRecommendedRules = wdioFlatRecommended.rules ?? {};
|
|
80
89
|
|
|
81
90
|
/** @type {Record<string, boolean>} */
|
|
82
|
-
export const wdioGlobals =
|
|
91
|
+
export const wdioGlobals =
|
|
92
|
+
wdioFlatRecommended.languageOptions?.globals ??
|
|
93
|
+
wdio.configs.recommended.globals ??
|
|
94
|
+
{};
|
|
83
95
|
|
|
84
96
|
export { storybookFlatConfigs };
|
|
@@ -4,7 +4,6 @@ import eslintConfigPrettier from 'eslint-config-prettier';
|
|
|
4
4
|
import importX from 'eslint-plugin-import-x';
|
|
5
5
|
import jest from 'eslint-plugin-jest';
|
|
6
6
|
import testingLibrary from 'eslint-plugin-testing-library';
|
|
7
|
-
import wdio from 'eslint-plugin-wdio';
|
|
8
7
|
import globals from 'globals';
|
|
9
8
|
import tseslint from 'typescript-eslint';
|
|
10
9
|
import {
|
|
@@ -16,6 +15,7 @@ import {
|
|
|
16
15
|
testingLibraryDomRules,
|
|
17
16
|
testingLibraryReactRules,
|
|
18
17
|
wdioGlobals,
|
|
18
|
+
wdioPlugin,
|
|
19
19
|
wdioRecommendedRules,
|
|
20
20
|
wdioSpecFiles,
|
|
21
21
|
} from './presets.mjs';
|
|
@@ -119,10 +119,13 @@ export function createBaseFlatConfigs(tsRules) {
|
|
|
119
119
|
},
|
|
120
120
|
{
|
|
121
121
|
files: wdioSpecFiles,
|
|
122
|
-
plugins: { wdio, jest },
|
|
122
|
+
plugins: { wdio: wdioPlugin, jest },
|
|
123
123
|
languageOptions: { globals: wdioGlobals },
|
|
124
124
|
rules: {
|
|
125
125
|
...wdioRecommendedRules,
|
|
126
|
+
// JS e2e specs are not type-checked; use await-expect instead of no-floating-promise.
|
|
127
|
+
'wdio/await-expect': 'error',
|
|
128
|
+
'wdio/no-floating-promise': 'off',
|
|
126
129
|
'jest/valid-expect': 'off',
|
|
127
130
|
},
|
|
128
131
|
},
|
|
@@ -75,10 +75,22 @@ export const reactPresetRules = {
|
|
|
75
75
|
...reduxSaga.configs.recommended.rules,
|
|
76
76
|
};
|
|
77
77
|
|
|
78
|
+
/**
|
|
79
|
+
* eslint-plugin-wdio v9 default export exposes config severities as `rules` when
|
|
80
|
+
* typescript-eslint is installed. Use flat/recommended's nested plugin instead.
|
|
81
|
+
*/
|
|
82
|
+
const wdioFlatRecommended =
|
|
83
|
+
wdio.configs['flat/recommended'] ?? wdio.configs.recommended;
|
|
84
|
+
|
|
85
|
+
export const wdioPlugin = wdioFlatRecommended.plugins?.wdio ?? wdio;
|
|
86
|
+
|
|
78
87
|
/** @type {import('eslint').Linter.RulesRecord} */
|
|
79
|
-
export const wdioRecommendedRules =
|
|
88
|
+
export const wdioRecommendedRules = wdioFlatRecommended.rules ?? {};
|
|
80
89
|
|
|
81
90
|
/** @type {Record<string, boolean>} */
|
|
82
|
-
export const wdioGlobals =
|
|
91
|
+
export const wdioGlobals =
|
|
92
|
+
wdioFlatRecommended.languageOptions?.globals ??
|
|
93
|
+
wdio.configs.recommended.globals ??
|
|
94
|
+
{};
|
|
83
95
|
|
|
84
96
|
export { storybookFlatConfigs };
|
|
@@ -18,6 +18,14 @@ export const testingLibraryDomRules: import("eslint").Linter.RulesRecord;
|
|
|
18
18
|
export const testingLibraryReactRules: import("eslint").Linter.RulesRecord;
|
|
19
19
|
/** @type {import('eslint').Linter.RulesRecord} */
|
|
20
20
|
export const reactPresetRules: import("eslint").Linter.RulesRecord;
|
|
21
|
+
export const wdioPlugin: {
|
|
22
|
+
configs: {};
|
|
23
|
+
rules: {
|
|
24
|
+
"await-expect": import("eslint").Rule.RuleModule;
|
|
25
|
+
"no-debug": import("eslint").Rule.RuleModule;
|
|
26
|
+
"no-pause": import("eslint").Rule.RuleModule;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
21
29
|
/** @type {import('eslint').Linter.RulesRecord} */
|
|
22
30
|
export const wdioRecommendedRules: import("eslint").Linter.RulesRecord;
|
|
23
31
|
/** @type {Record<string, boolean>} */
|