Skip to content

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

chore: update eslint config (#6840)

Dmitry Gozmanec7d37d92f4b
diff --git a/.eslintignore b/.eslintignore
index 9c8e091091..5f39e7ceb0 100644
--- a/.eslintignore
+++ b/.eslintignore
@@ -1,17 +1,16 @@
-test/assets/modernizr.js
-lib/
-*.js
+# Ignore everything by default
+**/*
+
+# Check ts files in src/
+!src
+!src/**/*.ts
+src/**/*.d.ts
src/generated/*
src/server/chromium/protocol.ts
src/server/firefox/protocol.ts
src/server/webkit/protocol.ts
-src/third_party/
-/types/*
-/index.d.ts
-utils/generate_types/overrides.d.ts
-utils/generate_types/test/test.ts
-node_modules/
-browser_patches/*/checkout/
-browser_patches/chromium/output/
-**/*.d.ts
-output/
+
+# Check ts files in tests/
+!tests
+!tests/**/*.ts
+tests/**/*.d.ts
diff --git a/.eslintrc.js b/.eslintrc.js
index bdb9799c6c..60c67832b8 100644
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -114,7 +114,7 @@ module.exports = {
// copyright
"notice/notice": [2, {
"mustMatch": "Copyright",
- "templateFile": "./utils/copyright.js",
+ "templateFile": require("path").join(__dirname, "utils", "copyright.js"),
}],
}
};
diff --git a/package.json b/package.json
index 63bd904921..cb344cde61 100644
--- a/package.json
+++ b/package.json
@@ -15,7 +15,7 @@
"atest": "folio --config=tests/config/android.config.ts",
"etest": "folio --config=tests/config/electron.config.ts",
"test": "folio --config=tests/config/default.config.ts",
- "eslint": "[ \"$CI\" = true ] && eslint --quiet -f codeframe --ext js,ts . || eslint --ext js,ts .",
+ "eslint": "[ \"$CI\" = true ] && eslint --quiet -f codeframe --ext ts . || eslint --ext ts .",
"tsc": "tsc -p .",
"tsc-installer": "tsc -p ./src/install/tsconfig.json",
"doc": "node utils/doclint/cli.js",