Rename eslint config file.
The name required by the plugin_eslint bazel rule got changed in
change I6b504664e1
Also fix outdated command in the README and remove lines in
test-setup.ts that cause TypeScript compiler to complain and do not seem
to be needed anymore.
Release-Notes: skip
Change-Id: I2f57a2dabbb9771f97b42d32a993758fdac44369
diff --git a/README.md b/README.md
index 5a87b38..9d53108 100644
--- a/README.md
+++ b/README.md
@@ -10,7 +10,7 @@
For running unit tests execute:
- bazel test --test_output=all //plugins/delete-project/web:karma_test
+ bazel test //plugins/delete-project/web:web_test_runner
For checking or fixing eslint formatter problems run:
diff --git a/web/.eslintrc.js b/web/eslint.config.js
similarity index 75%
rename from web/.eslintrc.js
rename to web/eslint.config.js
index ee166d3..b6396c8 100644
--- a/web/.eslintrc.js
+++ b/web/eslint.config.js
@@ -14,7 +14,15 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+const {defineConfig} = require('eslint/config');
+
+// eslint-disable-next-line no-undef
__plugindir = 'delete-project/web';
-module.exports = {
- extends: '../../.eslintrc.js',
-};
+
+const gerritEslint = require('../../eslint.config.js');
+
+module.exports = defineConfig([
+ {
+ extends: [gerritEslint],
+ },
+]);
diff --git a/web/test/test-setup.ts b/web/test/test-setup.ts
index 4f113a1..ec876b5 100644
--- a/web/test/test-setup.ts
+++ b/web/test/test-setup.ts
@@ -16,15 +16,6 @@
*/
import '@gerritcodereview/typescript-api/gerrit';
import {css} from 'lit';
-import sinon from 'sinon';
-
-declare global {
- interface Window {
- sinon: typeof sinon;
- }
- let sinon: typeof sinon;
-}
-window.sinon = sinon;
window.Gerrit = {
install: () => {},