Skip to content

Commit c5c54e7

Browse files
committed
Merge remote-tracking branch 'origin/trunk' into fix-docker
2 parents 20fdc43 + ec5757d commit c5c54e7

File tree

103 files changed

+680
-317
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

103 files changed

+680
-317
lines changed

javascript/node/selenium-webdriver/.eslintignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

javascript/node/selenium-webdriver/.eslintrc.js

Lines changed: 0 additions & 44 deletions
This file was deleted.

javascript/node/selenium-webdriver/BUILD.bazel

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -187,22 +187,15 @@ copy_to_bin(
187187

188188
eslint_bin.eslint_test(
189189
name = "eslint-test",
190-
args = [
191-
"--ignore-pattern",
192-
"node_modules",
193-
"--ignore-pattern",
194-
"generator",
195-
"--ext",
196-
"js",
197-
"lib/http.js",
198-
"**/*.js",
199-
],
200190
chdir = package_name(),
201191
data = SRC_FILES + [
202192
":eslint-config",
193+
":node_modules/@eslint/js",
194+
":node_modules/eslint-plugin-mocha",
195+
":node_modules/eslint-plugin-n",
203196
":node_modules/eslint-plugin-no-only-tests",
204-
":node_modules/eslint-plugin-node",
205197
":node_modules/eslint-plugin-prettier",
198+
":node_modules/globals",
206199
":node_modules/jszip",
207200
":node_modules/mocha",
208201
":node_modules/tmp",
@@ -216,7 +209,7 @@ eslint_bin.eslint_test(
216209

217210
copy_to_bin(
218211
name = "eslint-config",
219-
srcs = [".eslintrc.js"],
212+
srcs = ["eslint.config.js"],
220213
)
221214

222215
prettier_bin.prettier_test(

javascript/node/selenium-webdriver/bidi/index.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
// specific language governing permissions and limitations
1616
// under the License.
1717

18-
// eslint-disable-next-line node/no-missing-require
1918
const { EventEmitter } = require('node:events')
2019
const WebSocket = require('ws')
2120

javascript/node/selenium-webdriver/bidi/partitionDescriptor.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ const Type = {
3030
* Described in https://w3c.github.io/webdriver-bidi/#command-storage-getCookies.
3131
*/
3232
class PartitionDescriptor {
33+
/*eslint no-unused-private-class-members: "off"*/
3334
#type
3435

3536
/**

javascript/node/selenium-webdriver/common/seleniumManager.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@
2121
* Wrapper for getting information from the Selenium Manager binaries
2222
*/
2323

24-
const { platform } = require('process')
25-
const path = require('path')
26-
const fs = require('fs')
27-
const spawnSync = require('child_process').spawnSync
24+
const { platform } = require('node:process')
25+
const path = require('node:path')
26+
const fs = require('node:fs')
27+
const spawnSync = require('node:child_process').spawnSync
2828
const { Capability } = require('../lib/capabilities')
2929
const logging = require('../lib/logging')
3030

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
// Licensed to the Software Freedom Conservancy (SFC) under one
2+
// or more contributor license agreements. See the NOTICE file
3+
// distributed with this work for additional information
4+
// regarding copyright ownership. The SFC licenses this file
5+
// to you under the Apache License, Version 2.0 (the
6+
// "License"); you may not use this file except in compliance
7+
// with the License. You may obtain a copy of the License at
8+
//
9+
// http://www.apache.org/licenses/LICENSE-2.0
10+
//
11+
// Unless required by applicable law or agreed to in writing,
12+
// software distributed under the License is distributed on an
13+
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
// KIND, either express or implied. See the License for the
15+
// specific language governing permissions and limitations
16+
// under the License.
17+
18+
const globals = require('globals')
19+
const noOnlyTests = require('eslint-plugin-no-only-tests')
20+
const js = require('@eslint/js')
21+
const eslintPluginPrettierRecommended = require('eslint-plugin-prettier/recommended')
22+
const mochaPlugin = require('eslint-plugin-mocha')
23+
const nodePlugin = require('eslint-plugin-n')
24+
25+
module.exports = [
26+
js.configs.recommended,
27+
eslintPluginPrettierRecommended,
28+
mochaPlugin.configs.flat.recommended,
29+
nodePlugin.configs['flat/recommended-script'],
30+
{
31+
languageOptions: {
32+
globals: {
33+
mocha: true,
34+
es6: true,
35+
...globals.node,
36+
},
37+
parserOptions: {
38+
ecmaVersion: 2022,
39+
},
40+
},
41+
files: ['**/*.js', 'lib/http.js'],
42+
ignores: ['node_modules/*', 'generator/*', 'devtools/generator/'],
43+
plugins: {
44+
'no-only-tests': noOnlyTests,
45+
},
46+
rules: {
47+
'no-const-assign': 'error',
48+
'no-this-before-super': 'error',
49+
'no-undef': 'error',
50+
'no-unreachable': 'error',
51+
'no-unused-vars': [
52+
'error',
53+
{
54+
varsIgnorePattern: '^_',
55+
args: 'all',
56+
argsIgnorePattern: '^_',
57+
},
58+
],
59+
'constructor-super': 'error',
60+
'valid-typeof': 'error',
61+
'no-only-tests/no-only-tests': 'error',
62+
'n/no-deprecated-api': ['error'],
63+
'n/no-missing-import': ['error'],
64+
'n/no-missing-require': ['error'],
65+
'n/no-mixed-requires': ['error'],
66+
'n/no-new-require': ['error'],
67+
'n/no-unpublished-import': ['error'],
68+
'n/no-unpublished-require': [
69+
'error',
70+
{
71+
allowModules: [
72+
'globals',
73+
'@eslint/js',
74+
'eslint-plugin-mocha',
75+
'eslint-plugin-prettier',
76+
'eslint-plugin-n',
77+
'eslint-plugin-no-only-tests',
78+
],
79+
tryExtensions: ['.js'],
80+
},
81+
],
82+
'n/prefer-node-protocol': ['error'],
83+
'mocha/no-skipped-tests': ['off'],
84+
'mocha/no-mocha-arrows': ['off'],
85+
'mocha/no-setup-in-describe': ['off'],
86+
'mocha/no-top-level-hooks': ['off'],
87+
'mocha/no-sibling-hooks': ['off'],
88+
'mocha/no-exports': ['off'],
89+
'mocha/no-empty-description': ['off'],
90+
'mocha/max-top-level-suites': ['off'],
91+
'mocha/consistent-spacing-between-blocks': ['off'],
92+
'mocha/no-nested-tests': ['off'],
93+
'mocha/no-pending-tests': ['off'],
94+
'mocha/no-identical-title': ['off'],
95+
'prettier/prettier': [
96+
'error',
97+
{
98+
endOfLine: 'lf',
99+
printWidth: 120,
100+
semi: false,
101+
singleQuote: true,
102+
trailingComma: 'all',
103+
},
104+
],
105+
},
106+
},
107+
]

javascript/node/selenium-webdriver/firefox.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,8 @@
107107

108108
'use strict'
109109

110-
const fs = require('fs')
111-
const path = require('path')
110+
const fs = require('node:fs')
111+
const path = require('node:path')
112112
const Symbols = require('./lib/symbols')
113113
const command = require('./lib/command')
114114
const http = require('./http')

javascript/node/selenium-webdriver/http/index.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@
2222

2323
'use strict'
2424

25-
const http = require('http')
26-
const https = require('https')
27-
const url = require('url')
25+
const http = require('node:http')
26+
const https = require('node:https')
27+
const url = require('node:url')
2828

2929
const httpLib = require('../lib/http')
3030

@@ -45,7 +45,7 @@ let RequestOptions // eslint-disable-line
4545
* @throws {Error} if the URL does not include a hostname.
4646
*/
4747
function getRequestOptions(aUrl) {
48-
//eslint-disable-next-line node/no-deprecated-api
48+
// eslint-disable-next-line n/no-deprecated-api
4949
let options = url.parse(aUrl)
5050
if (!options.hostname) {
5151
throw new Error('Invalid URL: ' + aUrl)
@@ -140,7 +140,7 @@ class HttpClient {
140140
} else {
141141
path += httpRequest.path
142142
}
143-
//eslint-disable-next-line node/no-deprecated-api
143+
// eslint-disable-next-line n/no-deprecated-api
144144
let parsedPath = url.parse(path)
145145

146146
let options = {
@@ -218,7 +218,7 @@ function sendRequest(options, onOk, onError, opt_data, opt_proxy, opt_retries) {
218218
if (response.statusCode == 302 || response.statusCode == 303) {
219219
let location
220220
try {
221-
// eslint-disable-next-line node/no-deprecated-api
221+
// eslint-disable-next-line n/no-deprecated-api
222222
location = url.parse(response.headers['location'])
223223
} catch (ex) {
224224
onError(

javascript/node/selenium-webdriver/io/exec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
'use strict'
1919

20-
const childProcess = require('child_process')
20+
const childProcess = require('node:child_process')
2121

2222
/**
2323
* Options for configuring an executed command.

0 commit comments

Comments
 (0)