-
-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Update all of archiveweb.page to use TypeScript * Convert entire project to TS using some tools from https://github.com/stripe-archive/flow-to-typescript-codemod * Set up ESLint with rules from replaywebpage, and autofix a bunch of things * Run format + lint on all files * Remove checked-in built files * Replaces outdated node-sass with sass - Update dependencies to wabac.js 2.20.0 and awp-sw 0.5.0, also updated to TS - App: fixes for opening links in new window - Some improvements to embed viewer, additional customizations, additional event messages passed from iframe - Supersedes PR #228 --------- Co-authored-by: emma <[email protected]> Co-authored-by: Henry Wilkinson <[email protected]>
- Loading branch information
Showing
76 changed files
with
12,829 additions
and
7,617 deletions.
There are no files selected for viewing
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 +1 @@ | ||
src/static/* | ||
static/* |
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,34 +1,100 @@ | ||
/* eslint-env node */ | ||
/** @type { import("eslint").Linter.Config } */ | ||
module.exports = { | ||
"env": { | ||
"browser": true, | ||
"es6": true, | ||
"webextensions": true | ||
}, | ||
"extends": "eslint:recommended", | ||
"parserOptions": { | ||
"ecmaVersion": 2018, | ||
"sourceType": "module" | ||
}, | ||
"rules": { | ||
"no-restricted-globals": [ | ||
2, | ||
"event", "error" | ||
], | ||
"indent": [ | ||
"error", | ||
2 | ||
], | ||
"linebreak-style": [ | ||
"error", | ||
"unix" | ||
], | ||
"quotes": [ | ||
"error", | ||
"double" | ||
], | ||
"semi": [ | ||
"error", | ||
"always" | ||
] | ||
} | ||
env: { | ||
browser: true, | ||
es6: true, | ||
webextensions: true, | ||
}, | ||
extends: [ | ||
"eslint:recommended", | ||
"plugin:@typescript-eslint/eslint-recommended", | ||
"plugin:wc/recommended", | ||
"plugin:lit/recommended", | ||
"prettier", | ||
], | ||
plugins: ["@typescript-eslint", "lit"], | ||
parser: "@typescript-eslint/parser", | ||
parserOptions: { | ||
project: ["./tsconfig.eslint.json"], | ||
tsconfigRootDir: __dirname, | ||
}, | ||
root: true, | ||
rules: { | ||
/* start stylistic rules */ | ||
"@typescript-eslint/adjacent-overload-signatures": "error", | ||
"@typescript-eslint/array-type": "error", | ||
"@typescript-eslint/consistent-type-imports": [ | ||
"error", | ||
{ | ||
fixStyle: "inline-type-imports", | ||
}, | ||
], | ||
"@typescript-eslint/prefer-readonly": "warn", | ||
"@typescript-eslint/class-literal-property-style": ["warn", "getters"], | ||
"@typescript-eslint/consistent-generic-constructors": "error", | ||
"@typescript-eslint/consistent-type-assertions": "error", | ||
"@typescript-eslint/no-confusing-non-null-assertion": "warn", | ||
"@typescript-eslint/no-inferrable-types": "warn", | ||
"@typescript-eslint/non-nullable-type-assertion-style": "warn", | ||
"@typescript-eslint/prefer-for-of": "warn", | ||
// "@typescript-eslint/prefer-nullish-coalescing": "warn", | ||
"@typescript-eslint/prefer-optional-chain": "warn", | ||
"@typescript-eslint/prefer-string-starts-ends-with": "warn", | ||
/* end stylistic rules */ | ||
|
||
/* start recommended rules */ | ||
"no-restricted-globals": [2, "event", "error"], | ||
"@typescript-eslint/no-base-to-string": "warn", | ||
"@typescript-eslint/no-duplicate-enum-values": "error", | ||
"@typescript-eslint/no-duplicate-type-constituents": "warn", | ||
"@typescript-eslint/no-explicit-any": "warn", | ||
"@typescript-eslint/no-extra-non-null-assertion": "error", | ||
// "@typescript-eslint/no-floating-promises": "warn", | ||
"@typescript-eslint/no-for-in-array": "warn", | ||
"no-unused-vars": "off", | ||
"@typescript-eslint/no-unused-vars": [ | ||
"warn", | ||
{ | ||
argsIgnorePattern: "^_", | ||
varsIgnorePattern: "^_", | ||
destructuredArrayIgnorePattern: "^_", | ||
}, | ||
], | ||
"no-implied-eval": "off", | ||
"@typescript-eslint/no-implied-eval": "error", | ||
"no-loss-of-precision": "off", | ||
"@typescript-eslint/no-loss-of-precision": "warn", | ||
"@typescript-eslint/no-misused-new": "error", | ||
"@typescript-eslint/no-misused-promises": [ | ||
"error", | ||
{ checksVoidReturn: { arguments: false } }, | ||
], | ||
"@typescript-eslint/no-non-null-asserted-nullish-coalescing": "error", | ||
"@typescript-eslint/no-non-null-asserted-optional-chain": "warn", | ||
"@typescript-eslint/no-redundant-type-constituents": "warn", | ||
"@typescript-eslint/no-this-alias": "warn", | ||
"@typescript-eslint/no-unnecessary-type-assertion": "warn", | ||
"@typescript-eslint/no-unnecessary-type-constraint": "warn", | ||
// "@typescript-eslint/no-unsafe-argument": "warn", | ||
// "@typescript-eslint/no-unsafe-assignment": "warn", | ||
// "@typescript-eslint/no-unsafe-call": "warn", | ||
"@typescript-eslint/no-unsafe-declaration-merging": "warn", | ||
"@typescript-eslint/no-unsafe-enum-comparison": "warn", | ||
// "@typescript-eslint/no-unsafe-member-access": "warn", | ||
// "@typescript-eslint/no-unsafe-return": "warn", | ||
"@typescript-eslint/prefer-as-const": "warn", | ||
"require-await": "off", | ||
"@typescript-eslint/require-await": "warn", | ||
"@typescript-eslint/restrict-template-expressions": "warn", | ||
"@typescript-eslint/unbound-method": "off", | ||
}, | ||
ignorePatterns: [ | ||
"ruffle/**/*", | ||
"build/**/*", | ||
"/sw.js", | ||
"/ui.js", | ||
"dist/**/*", | ||
], | ||
reportUnusedDisableDirectives: true, | ||
}; |
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 |
---|---|---|
|
@@ -4,5 +4,4 @@ | |
!examples/*.warc | ||
**/node_modules | ||
.DS_Store | ||
!dist/embed/* | ||
|
||
dist |
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,2 @@ | ||
LICENSE.md | ||
static/* |
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,8 @@ | ||
{ | ||
"recommendations": [ | ||
"dbaeumer.vscode-eslint", | ||
"esbenp.prettier-vscode", | ||
"runem.lit-plugin", | ||
"streetsidesoftware.code-spell-checker" | ||
] | ||
} |
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,67 @@ | ||
{ | ||
"cSpell.languageSettings": [ | ||
{ | ||
"languageId": "typescript", | ||
"allowCompoundWords": true, | ||
"dictionaries": ["typescript", "node", "html", "fonts", "css"] | ||
}, | ||
{ | ||
"languageId": "javascript", | ||
"allowCompoundWords": true, | ||
"dictionaries": ["typescript", "node", "html", "fonts", "css"] | ||
}, | ||
{ | ||
"languageId": "markdown", | ||
"allowCompoundWords": true, | ||
"dictionaries": ["typescript", "node", "html", "fonts", "css"] | ||
} | ||
], | ||
"cSpell.words": [ | ||
"authed", | ||
"autoipfs", | ||
"browsertrix", | ||
"btrix", | ||
"Bulma", | ||
"canonicalization", | ||
"cdxj", | ||
"Collec", | ||
"colls", | ||
"consts", | ||
"electronuserland", | ||
"flexsearch", | ||
"gapi", | ||
"gauth", | ||
"gdrive", | ||
"iframes", | ||
"indexeddb", | ||
"inited", | ||
"ipfs", | ||
"ival", | ||
"kiwix", | ||
"ndjson", | ||
"pmarsceill", | ||
"popd", | ||
"pushd", | ||
"pywb", | ||
"reauth", | ||
"recalc", | ||
"replaybase", | ||
"replayweb.page", | ||
"sesh", | ||
"Strs", | ||
"surt", | ||
"svgs", | ||
"swmanager", | ||
"swonly", | ||
"Unfullscreen", | ||
"unrewriting", | ||
"unsharing", | ||
"wabac", | ||
"WACZ", | ||
"WARC", | ||
"warcio", | ||
"webrecorder", | ||
"wrlogo" | ||
], | ||
"cSpell.ignorePaths": ["node_modules", ".git", "*.lock", "package.json"] | ||
} |
Oops, something went wrong.