chore: remove unused files, config and packges (#3400)

* chore: remove all trace of jquery

* chore(eslintrc): use ignorePatterns instead of .eslintignore

* remove all trace of jshint

* remove unused karma-mocha dependency

* remove unnecessary script from package.json

* cleanup eslintrc

* missed jquery in package.json
This commit is contained in:
Sid Vishnoi 2021-03-24 03:38:08 +05:30 committed by GitHub
parent 42e41ecbdd
commit 38deff3392
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 3 additions and 235 deletions

View File

@ -1,3 +0,0 @@
builds/*
js/*
!js/profile-w3c-common.js

View File

@ -1,10 +1,9 @@
{
"ignorePatterns": ["builds/**", "js/**"],
"env": {
"browser": true,
"es6": true,
"node": true,
"jquery": true,
"amd": true,
"worker": true
},
"extends": ["eslint:recommended", "plugin:prettier/recommended"],
@ -43,13 +42,6 @@
"spaced-comment": ["error", "always", { "block": { "balanced": true } }]
},
"globals": {
"flushIframes": true,
"hyperHTML": true,
"makeBasicConfig": true,
"makeDefaultBody": true,
"makeRSDoc": true,
"makeStandardOps": true,
"pickRandomsFromList": true,
"respecConfig": true
},
"plugins": ["import", "prettier"]

23
package-lock.json generated
View File

@ -2360,12 +2360,6 @@
}
}
},
"jquery": {
"version": "3.6.0",
"resolved": "https://registry.npmjs.org/jquery/-/jquery-3.6.0.tgz",
"integrity": "sha512-JVzAR/AjBvVt2BmYhxRCSYysDsPcssdmTFnzyLEts9qNwmjmu4JTAMYubEfwVOSwpQ1I1sKKFcxhZCI2buerfw==",
"dev": true
},
"js-tokens": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
@ -2504,23 +2498,6 @@
"integrity": "sha512-PtilRLno5O6wH3lDihRnz0Ba8oSn0YUJqKjjux1peoYGwo0AQqrWRbdWk/RLzcGlb+onTyXAnHl6M+Hu3UxG/Q==",
"dev": true
},
"karma-mocha": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/karma-mocha/-/karma-mocha-2.0.1.tgz",
"integrity": "sha512-Tzd5HBjm8his2OA4bouAsATYEpZrp9vC7z5E5j4C5Of5Rrs1jY67RAwXNcVmd/Bnk1wgvQRou0zGVLey44G4tQ==",
"dev": true,
"requires": {
"minimist": "^1.2.3"
},
"dependencies": {
"minimist": {
"version": "1.2.5",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
"integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==",
"dev": true
}
}
},
"karma-mocha-reporter": {
"version": "2.2.5",
"resolved": "https://registry.npmjs.org/karma-mocha-reporter/-/karma-mocha-reporter-2.2.5.tgz",

View File

@ -42,13 +42,11 @@
"hyperhtml": "^2.34.0",
"idb": "^6.0.0",
"jasmine": "^3.7.0",
"jquery": "^3.6.0",
"karma": "^6.2.0",
"karma-chrome-launcher": "^3.1.0",
"karma-firefox-launcher": "^2.1.0",
"karma-jasmine": "^4.0.1",
"karma-jasmine-html-reporter": "^1.5.4",
"karma-mocha": "^2.0.1",
"karma-mocha-reporter": "^2.2.5",
"karma-safari-launcher": "^1.0.0",
"loading-indicator": "^2.0.0",
@ -65,7 +63,6 @@
"build:geonovum-debug": "npm run build:geonovum -- --debug",
"build:geonovum": "node ./tools/builder.js geonovum",
"build:w3c-debug": "npm run build:w3c -- --debug",
"build:w3c-with-jquery": "node ./tools/builder.js w3c-common",
"build:w3c": "node ./tools/builder.js w3c",
"build:dini-debug": "node run build:dini -- --debug",
"build:dini": "node ./tools/builder.js dini",
@ -78,7 +75,7 @@
"start": "node ./tools/dev-server.js",
"test:build": "jasmine --random=false ./tests/test-build.js",
"test:headless": "node ./tests/headless.js",
"test:karma": "npm run karma"
"test:karma": "karma start --single-run"
},
"dependencies": {
"colors": "^1.4.0",

View File

@ -1,107 +0,0 @@
/**
* The w3c-common profile is DEPRECATED.
* Update (Apr 15, 2020): The w3c-common profile will no longer receive updates.
* It is frozen at v25.5.0.
*
* The difference between w3c-common and the w3c profile
* is that this profile includes jQuery to support legacy
* specs.
*
* However, you are strongly discouraged from using
* jQuery. Please use vanilla JS/DOM instead:
*
* http://youmightnotneedjquery.com
*
* If you need help, reach out to the ReSpec maintainers.
*/
"use strict";
// In case everything else fails, we want the error
window.addEventListener("error", ev => {
console.error(ev.error, ev.message, ev);
});
const modules = [
// order is significant
import("../src/core/base-runner.js"),
import("../src/core/ui.js"),
import("../src/core/jquery-enhanced.js"),
import("../src/core/location-hash.js"),
import("../src/core/l10n.js"),
import("../src/w3c/defaults.js"),
import("../src/core/style.js"),
import("../src/w3c/style.js"),
import("../src/w3c/l10n.js"),
import("../src/core/github.js"),
import("../src/core/data-include.js"),
import("../src/core/markdown.js"),
import("../src/core/reindent.js"),
import("../src/core/title.js"),
import("../src/w3c/level.js"),
import("../src/w3c/headers.js"),
import("../src/w3c/abstract.js"),
import("../src/core/data-transform.js"),
import("../src/core/data-abbr.js"),
import("../src/core/inlines.js"),
import("../src/w3c/conformance.js"),
import("../src/core/dfn.js"),
import("../src/core/pluralize.js"),
import("../src/core/examples.js"),
import("../src/core/issues-notes.js"),
import("../src/core/best-practices.js"),
import("../src/core/figures.js"),
import("../src/core/webidl.js"),
import("../src/core/biblio.js"),
import("../src/core/link-to-dfn.js"),
import("../src/core/xref.js"),
import("../src/core/data-cite.js"),
import("../src/core/webidl-index.js"),
import("../src/core/render-biblio.js"),
import("../src/core/dfn-index.js"),
import("../src/core/contrib.js"),
import("../src/core/fix-headers.js"),
import("../src/core/structure.js"),
import("../src/core/informative.js"),
import("../src/core/id-headers.js"),
import("../src/core/caniuse.js"),
import("../src/core/mdn-annotation.js"),
import("../src/ui/save-html.js"),
import("../src/ui/search-specref.js"),
import("../src/ui/about-respec.js"),
import("../src/core/seo.js"),
import("../src/w3c/seo.js"),
import("../src/core/highlight.js"),
import("../src/core/webidl-clipboard.js"),
import("../src/core/data-tests.js"),
import("../src/core/list-sorter.js"),
import("../src/core/highlight-vars.js"),
import("../src/core/dfn-panel.js"),
import("../src/core/data-type.js"),
import("../src/core/algorithms.js"),
import("../src/core/anchor-expander.js"),
import("../src/core/custom-elements/index.js"),
/* Linter must be the last thing to run */
import("../src/core/linter.js"),
import("../src/core/a11y.js"),
];
async function domReady() {
if (document.readyState === "loading") {
await new Promise(resolve =>
document.addEventListener("DOMContentLoaded", resolve)
);
}
}
(async () => {
const [runner, { ui }, ...plugins] = await Promise.all(modules);
try {
ui.show();
await domReady();
await runner.runAll(plugins);
} finally {
ui.enable();
}
})().catch(err => {
console.error(err);
});

View File

@ -4,7 +4,6 @@
// Configuration:
// - localBiblio: override or supplement the official biblio with your own.
/* jshint jquery: true */
import { biblioDB } from "./biblio-db.js";
import { createResourceHint } from "./utils.js";

View File

@ -1,7 +1,6 @@
// @ts-check
// Module core/ui
// Handles the ReSpec UI
/* jshint laxcomma:true */
// XXX TODO
// - look at other UI things to add
// - list issues

View File

@ -1,5 +1,4 @@
// @ts-check
/* jshint strict: true, browser:true, jquery: true */
// Module dini/style
// Inserts a link to the appropriate W3C style for the specification's maturity level.
// CONFIGURATION

10
src/type-helper.d.ts vendored
View File

@ -46,8 +46,6 @@ interface Window {
(deps: string[], callback: (...modules: any[]) => void): void;
modules: { [dep: string]: any };
};
$: JQueryStatic;
jQuery: JQueryStatic;
axe?: {
run(context: Node, options: any): Promise<{ violations: AxeViolation[] }>;
};
@ -96,14 +94,6 @@ declare namespace Intl {
}
}
interface JQuery {
renameElement(name: string): JQuery<any>;
getDfnTitles(): string[];
linkTargets(): import("./core/utils.js").LinkTarget[];
makeID(pfx?: string, txt?: string, noLC?: boolean): string;
allTextNodes(exclusions: string[]): Text[];
}
interface BiblioData {
aliasOf?: string;
id?: string;

View File

@ -1,5 +1,4 @@
// @ts-check
/* jshint strict: true, browser:true, jquery: true */
// Module w3c/style
// Inserts a link to the appropriate W3C style for the specification's maturity level.
// CONFIGURATION

View File

@ -2,7 +2,7 @@ env:
jasmine: true
node: false
extends:
- 'plugin:jasmine/recommended'
- "plugin:jasmine/recommended"
parserOptions:
sourceType: module
rules:
@ -14,5 +14,3 @@ rules:
jasmine/prefer-jasmine-matcher: 2
plugins:
- jasmine
globals:
expectAsync: true

View File

@ -1,72 +0,0 @@
{
"maxerr": 50,
"bitwise": true,
"camelcase": false,
"curly": true,
"eqeqeq": true,
"forin": true,
"freeze": true,
"immed": false,
"indent": 2,
"latedef": false,
"newcap": true,
"noarg": true,
"noempty": true,
"nonbsp": true,
"nonew": false,
"plusplus": false,
"quotmark": "double",
"unused": "strict",
"maxparams": false,
"maxdepth": 3,
"maxlen": false,
"asi": false,
"boss": false,
"debug": false,
"eqnull": false,
"es5": false,
"moz": true,
"evil": false,
"expr": false,
"funcscope": false,
"iterator": false,
"lastsemic": false,
"laxbreak": false,
"laxcomma": false,
"loopfunc": false,
"multistr": false,
"noyield": true,
"notypeof": false,
"proto": false,
"scripturl": false,
"shadow": false,
"sub": false,
"supernew": false,
"validthis": true,
"browser": true,
"browserify": false,
"couch": false,
"devel": true,
"dojo": false,
"jasmine": true,
"jquery": true,
"mocha": true,
"mootools": false,
"node": true,
"nonstandard": false,
"phantom": false,
"prototypejs": false,
"qunit": false,
"rhino": false,
"shelljs": false,
"typed": false,
"worker": false,
"wsh": false,
"yui": false,
"predef": [ "makeStandardOps", "makeDefaultBody", "makeRSDoc", "flushIframes", "makeBasicConfig", "require", "pickRandomsFromList" ],
"globals": {
"expect": true,
"async": true
},
"esnext": true
}