-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into extract_entry_points
- Loading branch information
Showing
77 changed files
with
1,954 additions
and
886 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// this belongs to the injected/ package, but eslint has issues with linting files outside of the base directory: | ||
// https://github.com/eslint/eslint/discussions/18806#discussioncomment-10848750 | ||
|
||
export default [ | ||
{ | ||
languageOptions: { | ||
ecmaVersion: "latest", | ||
sourceType: "script", | ||
}, | ||
rules: { | ||
"no-implicit-globals": "error", | ||
} | ||
} | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
import tseslint from 'typescript-eslint'; | ||
import ddgConfig from "@duckduckgo/eslint-config"; | ||
import globals from "globals"; | ||
|
||
// @ts-check | ||
export default tseslint.config( | ||
...ddgConfig, | ||
...tseslint.configs.recommended, | ||
{ | ||
ignores: [ | ||
"**/build/", | ||
"**/docs/", | ||
"injected/lib", | ||
"Sources/ContentScopeScripts/dist/", | ||
"injected/integration-test/extension/contentScope.js", | ||
"injected/integration-test/test-pages/duckplayer/scripts/dist", | ||
"special-pages/pages/**/public", | ||
"special-pages/playwright-report/", | ||
"special-pages/test-results/", | ||
"special-pages/types/", | ||
"special-pages/messages/", | ||
"playwright-report", | ||
"test-results", | ||
"injected/src/types", | ||
], | ||
}, | ||
{ | ||
languageOptions: { | ||
globals: { | ||
$USER_PREFERENCES$: "readonly", | ||
$USER_UNPROTECTED_DOMAINS$: "readonly", | ||
$CONTENT_SCOPE$: "readonly", | ||
$BUNDLED_CONFIG$: "readonly", | ||
}, | ||
|
||
ecmaVersion: "latest", | ||
sourceType: "script", | ||
}, | ||
|
||
rules: { | ||
"no-restricted-syntax": ["error", { | ||
selector: "MethodDefinition[key.type='PrivateIdentifier']", | ||
message: "Private methods are currently unsupported in older WebKit and ESR Firefox", | ||
}], | ||
|
||
"require-await": ["error"], | ||
"promise/prefer-await-to-then": ["error"], | ||
"@typescript-eslint/no-unused-vars": ["error", { | ||
args: "none", | ||
caughtErrors: "none", | ||
ignoreRestSiblings: true, | ||
vars: "all" | ||
}], | ||
}, | ||
}, | ||
{ | ||
ignores: ["injected/integration-test/test-pages/**", "injected/integration-test/extension/**"], | ||
languageOptions: { | ||
parserOptions: { | ||
projectService: { | ||
allowDefaultProject: ['eslint.config.js', 'build-output.eslint.config.js'], | ||
}, | ||
} | ||
}, | ||
rules: { | ||
"@typescript-eslint/await-thenable": "error", | ||
}, | ||
}, | ||
{ | ||
files: ["**/scripts/*.js", "**/*.mjs", "**/unit-test/**/*.js", "**/integration-test/**/*.spec.js"], | ||
languageOptions: { | ||
globals: { | ||
...globals.node, | ||
} | ||
} | ||
}, | ||
{ | ||
files: ["injected/**/*.js"], | ||
languageOptions: { | ||
globals: { | ||
windowsInteropPostMessage: "readonly", | ||
windowsInteropAddEventListener: "readonly", | ||
windowsInteropRemoveEventListener: "readonly", | ||
} | ||
} | ||
}, | ||
{ | ||
files: ["**/unit-test/*.js"], | ||
languageOptions: { | ||
globals: { | ||
...globals.jasmine, | ||
} | ||
} | ||
}, | ||
{ | ||
ignores: ["**/scripts/*.js"], | ||
languageOptions: { | ||
globals: { | ||
...globals.browser, | ||
...globals.webextensions, | ||
} | ||
} | ||
} | ||
); |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
/* global process */ | ||
import { defineConfig, devices } from '@playwright/test' | ||
|
||
export default defineConfig({ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.