mirror of
https://github.com/movie-web/extension.git
synced 2025-09-13 14:33:26 +00:00
Fix eslint and add basic request listening
This commit is contained in:
@@ -3,7 +3,7 @@ module.exports = {
|
|||||||
browser: true,
|
browser: true,
|
||||||
},
|
},
|
||||||
extends: ['airbnb-base', 'plugin:@typescript-eslint/recommended', 'plugin:prettier/recommended'],
|
extends: ['airbnb-base', 'plugin:@typescript-eslint/recommended', 'plugin:prettier/recommended'],
|
||||||
ignorePatterns: ['lib/*', 'tests/*', '/*.js', '/*.ts', '/**/*.test.ts', 'test/*'],
|
ignorePatterns: ['dist/*', 'plugins/*', 'tests/*', '/*.cjs', '/*.js', '/*.ts', '/**/*.test.ts', 'test/*'],
|
||||||
parser: '@typescript-eslint/parser',
|
parser: '@typescript-eslint/parser',
|
||||||
parserOptions: {
|
parserOptions: {
|
||||||
project: './tsconfig.json',
|
project: './tsconfig.json',
|
@@ -21,8 +21,17 @@
|
|||||||
"vite": "^5.0.10"
|
"vite": "^5.0.10"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"@types/chrome": "^0.0.254",
|
||||||
"@types/lodash.merge": "^4.6.9",
|
"@types/lodash.merge": "^4.6.9",
|
||||||
"@types/node": "^20.10.5",
|
"@types/node": "^20.10.5",
|
||||||
|
"@typescript-eslint/eslint-plugin": "^6.15.0",
|
||||||
|
"@typescript-eslint/parser": "^6.15.0",
|
||||||
|
"eslint": "^8.56.0",
|
||||||
|
"eslint-config-airbnb-base": "^15.0.0",
|
||||||
|
"eslint-config-prettier": "^9.1.0",
|
||||||
|
"eslint-import-resolver-typescript": "^3.6.1",
|
||||||
|
"eslint-plugin-import": "^2.29.1",
|
||||||
|
"eslint-plugin-prettier": "^5.1.1",
|
||||||
"lodash.merge": "^4.6.2",
|
"lodash.merge": "^4.6.2",
|
||||||
"vite-plugin-static-copy": "^1.0.0"
|
"vite-plugin-static-copy": "^1.0.0"
|
||||||
}
|
}
|
||||||
|
1900
pnpm-lock.yaml
generated
1900
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
11
src/index.ts
11
src/index.ts
@@ -1 +1,10 @@
|
|||||||
console.log("testing");
|
chrome.webRequest.onBeforeSendHeaders.addListener(
|
||||||
|
(details) => {
|
||||||
|
console.log(details);
|
||||||
|
return { requestHeaders: details.requestHeaders };
|
||||||
|
},
|
||||||
|
{ urls: ['<all_urls>'] },
|
||||||
|
['blocking', 'requestHeaders'],
|
||||||
|
);
|
||||||
|
|
||||||
|
console.log('loaded extension');
|
||||||
|
@@ -5,5 +5,6 @@
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<script type="module" src="./popup/index.ts"></script>
|
<script type="module" src="./popup/index.ts"></script>
|
||||||
|
<h1>This is the popup</h1>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@@ -1 +1 @@
|
|||||||
console.log("popup js")
|
console.log('popup js');
|
||||||
|
Reference in New Issue
Block a user