@appium/oxc-config 2.0.0-beta.1 → 2.0.0-beta.3
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/oxlint.mjs +13 -77
- package/package.json +4 -4
package/oxlint.mjs
CHANGED
|
@@ -11,7 +11,7 @@ export const ignorePatterns = ['**/.*', '**/*-d.ts', '**/build/**', '**/coverage
|
|
|
11
11
|
/**
|
|
12
12
|
* Shared Oxlint configuration for Appium projects.
|
|
13
13
|
*
|
|
14
|
-
*
|
|
14
|
+
* Originally migrated from @appium/eslint-config-appium-ts via @oxlint/migrate.
|
|
15
15
|
* Stylistic rules are intentionally omitted; use `@appium/oxc-config/oxfmt` instead.
|
|
16
16
|
*
|
|
17
17
|
* Rules not available in Oxlint (no equivalent yet):
|
|
@@ -22,10 +22,7 @@ export const ignorePatterns = ['**/.*', '**/*-d.ts', '**/build/**', '**/coverage
|
|
|
22
22
|
*/
|
|
23
23
|
/** @type {import('oxlint').OxlintConfig} */
|
|
24
24
|
const config = {
|
|
25
|
-
plugins: [],
|
|
26
|
-
categories: {
|
|
27
|
-
correctness: 'off',
|
|
28
|
-
},
|
|
25
|
+
plugins: ['eslint', 'promise', 'import', 'oxc', 'typescript', 'unicorn'],
|
|
29
26
|
options: {
|
|
30
27
|
typeAware: true,
|
|
31
28
|
},
|
|
@@ -34,68 +31,16 @@ const config = {
|
|
|
34
31
|
},
|
|
35
32
|
rules: {
|
|
36
33
|
// --- ESLint recommended (js/recommended) ---
|
|
37
|
-
'constructor-super': 'error',
|
|
38
|
-
'for-direction': 'error',
|
|
39
|
-
'getter-return': 'error',
|
|
40
|
-
'no-async-promise-executor': 'error',
|
|
41
34
|
'no-case-declarations': 'error',
|
|
42
|
-
'no-class-assign': 'error',
|
|
43
|
-
'no-compare-neg-zero': 'error',
|
|
44
|
-
'no-cond-assign': 'error',
|
|
45
|
-
'no-const-assign': 'error',
|
|
46
|
-
'no-constant-binary-expression': 'error',
|
|
47
|
-
'no-constant-condition': 'error',
|
|
48
|
-
'no-control-regex': 'error',
|
|
49
|
-
'no-debugger': 'error',
|
|
50
|
-
'no-delete-var': 'error',
|
|
51
|
-
'no-dupe-class-members': 'error',
|
|
52
|
-
'no-dupe-else-if': 'error',
|
|
53
|
-
'no-dupe-keys': 'error',
|
|
54
|
-
'no-duplicate-case': 'error',
|
|
55
35
|
'no-empty': 'off',
|
|
56
|
-
'no-empty-character-class': 'error',
|
|
57
|
-
'no-empty-pattern': 'error',
|
|
58
|
-
'no-empty-static-block': 'error',
|
|
59
|
-
'no-ex-assign': 'error',
|
|
60
|
-
'no-extra-boolean-cast': 'error',
|
|
61
36
|
'no-fallthrough': 'error',
|
|
62
|
-
'no-func-assign': 'error',
|
|
63
|
-
'no-global-assign': 'error',
|
|
64
|
-
'no-import-assign': 'error',
|
|
65
|
-
'no-invalid-regexp': 'error',
|
|
66
|
-
'no-irregular-whitespace': 'error',
|
|
67
|
-
'no-loss-of-precision': 'error',
|
|
68
|
-
'no-misleading-character-class': 'error',
|
|
69
|
-
'no-new-native-nonconstructor': 'error',
|
|
70
|
-
'no-nonoctal-decimal-escape': 'error',
|
|
71
|
-
'no-obj-calls': 'error',
|
|
72
37
|
'no-prototype-builtins': 'warn',
|
|
73
38
|
'no-redeclare': 'error',
|
|
74
39
|
'no-regex-spaces': 'error',
|
|
75
|
-
'no-self-assign': 'error',
|
|
76
|
-
'no-setter-return': 'error',
|
|
77
|
-
'no-shadow-restricted-names': 'error',
|
|
78
|
-
'no-sparse-arrays': 'error',
|
|
79
|
-
'no-this-before-super': 'error',
|
|
80
|
-
'no-unassigned-vars': 'warn',
|
|
81
40
|
'no-undef': 'error',
|
|
82
41
|
'no-unexpected-multiline': 'off',
|
|
83
|
-
'no-unreachable': 'error',
|
|
84
|
-
'no-unsafe-finally': 'error',
|
|
85
|
-
'no-unsafe-negation': 'error',
|
|
86
|
-
'no-unsafe-optional-chaining': 'error',
|
|
87
|
-
'no-unused-labels': 'error',
|
|
88
|
-
'no-unused-private-class-members': 'error',
|
|
89
|
-
'no-unused-vars': 'warn',
|
|
90
42
|
'no-useless-assignment': 'warn',
|
|
91
|
-
'no-useless-backreference': 'error',
|
|
92
|
-
'no-useless-catch': 'error',
|
|
93
|
-
'no-useless-escape': 'error',
|
|
94
|
-
'no-with': 'error',
|
|
95
43
|
'preserve-caught-error': 'warn',
|
|
96
|
-
'require-yield': 'error',
|
|
97
|
-
'use-isnan': 'error',
|
|
98
|
-
'valid-typeof': 'error',
|
|
99
44
|
|
|
100
45
|
// --- eslint-plugin-promise (flat/recommended) ---
|
|
101
46
|
'promise/always-return': 'error',
|
|
@@ -123,7 +68,6 @@ const config = {
|
|
|
123
68
|
|
|
124
69
|
// --- typescript-eslint recommended ---
|
|
125
70
|
'no-array-constructor': 'error',
|
|
126
|
-
'no-unused-expressions': 'error',
|
|
127
71
|
'typescript/ban-ts-comment': [
|
|
128
72
|
'warn',
|
|
129
73
|
{
|
|
@@ -131,22 +75,12 @@ const config = {
|
|
|
131
75
|
'ts-ignore': 'allow-with-description',
|
|
132
76
|
},
|
|
133
77
|
],
|
|
134
|
-
'typescript/no-duplicate-enum-values': 'error',
|
|
135
78
|
'typescript/no-empty-object-type': 'off',
|
|
136
79
|
'typescript/no-explicit-any': 'off',
|
|
137
|
-
'typescript/no-extra-non-null-assertion': 'error',
|
|
138
|
-
'typescript/no-misused-new': 'error',
|
|
139
80
|
'typescript/no-namespace': 'error',
|
|
140
|
-
'typescript/no-non-null-asserted-optional-chain': 'error',
|
|
141
81
|
'typescript/no-require-imports': 'off',
|
|
142
|
-
'typescript/no-this-alias': 'error',
|
|
143
82
|
'typescript/no-unnecessary-type-constraint': 'error',
|
|
144
|
-
'typescript/no-unsafe-declaration-merging': 'error',
|
|
145
83
|
'typescript/no-unsafe-function-type': 'error',
|
|
146
|
-
'typescript/no-wrapper-object-types': 'error',
|
|
147
|
-
'typescript/prefer-as-const': 'error',
|
|
148
|
-
'typescript/prefer-namespace-keyword': 'error',
|
|
149
|
-
'typescript/triple-slash-reference': 'error',
|
|
150
84
|
'typescript/consistent-type-imports': [
|
|
151
85
|
'error',
|
|
152
86
|
{
|
|
@@ -166,6 +100,8 @@ const config = {
|
|
|
166
100
|
radix: 'error',
|
|
167
101
|
'require-await': 'off',
|
|
168
102
|
'no-empty-function': 'off',
|
|
103
|
+
'typescript/await-thenable': 'off',
|
|
104
|
+
'typescript/unbound-method': 'off',
|
|
169
105
|
'unicorn/prefer-node-protocol': 'warn',
|
|
170
106
|
|
|
171
107
|
// eslint-config-prettier disables (kept for parity with legacy config)
|
|
@@ -176,7 +112,6 @@ const config = {
|
|
|
176
112
|
overrides: [
|
|
177
113
|
{
|
|
178
114
|
files: ['**/*.{js,mjs,cjs,jsx,mjsx,ts,tsx,mtsx}'],
|
|
179
|
-
plugins: ['promise', 'import', 'typescript', 'unicorn'],
|
|
180
115
|
env: {
|
|
181
116
|
es2022: true,
|
|
182
117
|
node: true,
|
|
@@ -186,22 +121,23 @@ const config = {
|
|
|
186
121
|
BufferEncoding: 'readonly',
|
|
187
122
|
},
|
|
188
123
|
},
|
|
189
|
-
{
|
|
190
|
-
files: ['**/*.{ts,tsx,mtsx}'],
|
|
191
|
-
plugins: ['typescript'],
|
|
192
|
-
rules: {
|
|
193
|
-
'typescript/no-floating-promises': 'warn',
|
|
194
|
-
},
|
|
195
|
-
},
|
|
196
124
|
{
|
|
197
125
|
files: ['**/test/**'],
|
|
198
|
-
plugins: ['typescript', 'import'],
|
|
199
126
|
rules: {
|
|
200
127
|
'no-unused-expressions': 'off',
|
|
201
128
|
'import/no-named-as-default-member': 'off',
|
|
129
|
+
'promise/always-return': 'off',
|
|
130
|
+
'promise/catch-or-return': 'off',
|
|
131
|
+
'promise/no-callback-in-promise': 'off',
|
|
132
|
+
'promise/param-names': 'off',
|
|
133
|
+
'promise/prefer-await-to-callbacks': 'off',
|
|
134
|
+
'promise/prefer-await-to-then': 'off',
|
|
202
135
|
'typescript/ban-ts-comment': 'off',
|
|
136
|
+
'typescript/no-base-to-string': 'off',
|
|
203
137
|
'typescript/no-non-null-assertion': 'off',
|
|
204
138
|
'typescript/no-floating-promises': 'off',
|
|
139
|
+
'typescript/no-useless-default-assignment': 'off',
|
|
140
|
+
'typescript/restrict-template-expressions': 'off',
|
|
205
141
|
},
|
|
206
142
|
},
|
|
207
143
|
],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@appium/oxc-config",
|
|
3
|
-
"version": "2.0.0-beta.
|
|
3
|
+
"version": "2.0.0-beta.3",
|
|
4
4
|
"description": "Shared Oxlint and Oxfmt config for Appium projects",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"appium",
|
|
@@ -36,13 +36,13 @@
|
|
|
36
36
|
"test:smoke": "node scripts/test-smoke.mjs"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"oxfmt": "^0.
|
|
40
|
-
"oxlint": "~1.
|
|
39
|
+
"oxfmt": "^0.74.0",
|
|
40
|
+
"oxlint": "~1.89.0",
|
|
41
41
|
"oxlint-tsgolint": "^7.0.2001"
|
|
42
42
|
},
|
|
43
43
|
"engines": {
|
|
44
44
|
"node": "^22.22.2 || ^24.15.0 || >=26.0.0",
|
|
45
45
|
"npm": ">=10"
|
|
46
46
|
},
|
|
47
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "8fead4e46c638a9d52334127fcaa20496d9b690e"
|
|
48
48
|
}
|