- Update: Cypress code coverage plugin

- Linting: Update as per latest ash-nazg
- npm: Update devDeps.
master
Brett Zamir 2020-04-12 10:45:03 +08:00
parent a850fdb34b
commit 4b92acc790
6 changed files with 6099 additions and 528 deletions

View File

@ -74,11 +74,8 @@ module.exports = {
{ {
files: ['.eslintrc.js', '.ncurc.js', 'tools/mochawesome-cli.js'], files: ['.eslintrc.js', '.ncurc.js', 'tools/mochawesome-cli.js'],
extends: [ extends: [
'plugin:node/recommended-script' 'ash-nazg/sauron-node-script'
], ]
rules: {
'import/no-commonjs': 0
}
}, },
// Our Markdown rules (and used for JSDoc examples as well, by way of // Our Markdown rules (and used for JSDoc examples as well, by way of
// our use of `jsdoc/check-examples` within `ash-nazg`) // our use of `jsdoc/check-examples` within `ash-nazg`)
@ -108,7 +105,9 @@ module.exports = {
'node/no-missing-import': ['off'], 'node/no-missing-import': ['off'],
'no-multi-spaces': 'off', 'no-multi-spaces': 'off',
'sonarjs/no-all-duplicated-branches': 'off', 'sonarjs/no-all-duplicated-branches': 'off',
'node/no-unpublished-import': ['error', {allowModules: ['@cypress/fiddle']}], 'node/no-unpublished-import': ['error', {
allowModules: ['@cypress/fiddle']
}],
'no-alert': 'off', 'no-alert': 'off',
// Disable until may fix https://github.com/gajus/eslint-plugin-jsdoc/issues/211 // Disable until may fix https://github.com/gajus/eslint-plugin-jsdoc/issues/211
indent: 'off' indent: 'off'
@ -123,8 +122,9 @@ module.exports = {
}, },
settings: { settings: {
polyfills: [ polyfills: [
// These are the primary polyfills needed by regular users if not present, // These are the primary polyfills needed by regular users if
// e.g., with core-js-bundle; also those under extensions // not present, e.g., with core-js-bundle; also those under
// extensions
'Array.isArray', 'Array.isArray',
'Blob', 'Blob',
'console', 'console',
@ -244,11 +244,8 @@ module.exports = {
{ {
files: ['cypress/plugins/index.js'], files: ['cypress/plugins/index.js'],
extends: [ extends: [
'plugin:node/recommended-script' 'ash-nazg/sauron-node-script'
], ]
rules: {
'import/no-commonjs': 0
}
}, },
{ {
files: ['cypress/**'], files: ['cypress/**'],
@ -278,8 +275,9 @@ module.exports = {
] ]
}, },
rules: { rules: {
// These errors are caused in Cypress files if user has not yet instrumented // These errors are caused in Cypress files if user has not
// code; need to reinvestigate why we had to instrument separately from nyc mocha // yet instrumented code; need to reinvestigate why we had to
// instrument separately from nyc mocha
'import/no-unresolved': 'warn', 'import/no-unresolved': 'warn',
'node/no-missing-import': 'warn', 'node/no-missing-import': 'warn',
@ -312,7 +310,8 @@ module.exports = {
'mocha/no-setup-in-describe': 0, 'mocha/no-setup-in-describe': 0,
'mocha-cleanup/no-outside-declaration': 0, 'mocha-cleanup/no-outside-declaration': 0,
// Useful to ensure allowing `this.timeout()`, etc., but a little oppressive // Useful to ensure allowing `this.timeout()`, etc., but a
// little oppressive
'mocha/no-mocha-arrows': 0, 'mocha/no-mocha-arrows': 0,
// Useful if enabling the regular `prefer-arrow-callback` // Useful if enabling the regular `prefer-arrow-callback`
// 'mocha/prefer-arrow-callback': 2 // 'mocha/prefer-arrow-callback': 2
@ -340,10 +339,10 @@ module.exports = {
'unicorn/prefer-string-slice': 'off', 'unicorn/prefer-string-slice': 'off',
'default-case': 'off', 'default-case': 'off',
'require-unicode-regexp': 'off', 'require-unicode-regexp': 'off',
'max-len': ['off', { 'max-len': 'off', /* , {
ignoreUrls: true, ignoreUrls: true,
ignoreRegExpLiterals: true ignoreRegExpLiterals: true
}], } */
'unicorn/prefer-query-selector': 'off', 'unicorn/prefer-query-selector': 'off',
'unicorn/prefer-node-append': 'off', 'unicorn/prefer-node-append': 'off',
'unicorn/no-zero-fractions': 'off', 'unicorn/no-zero-fractions': 'off',

View File

@ -57,6 +57,7 @@
- Docs: Update Pavol's email address (@prusnak) - Docs: Update Pavol's email address (@prusnak)
- Docs: Update Contributing, Testing (renamed to Development), - Docs: Update Contributing, Testing (renamed to Development),
Linting and ReleaseInstructions Linting and ReleaseInstructions
- Update: Cypress code coverage plugin
- Refactoring: Switch from `$.param.querystring` to `URL` - Refactoring: Switch from `$.param.querystring` to `URL`
- Refactoring: Ensure file-global jsdoc tags are at beginning of file - Refactoring: Ensure file-global jsdoc tags are at beginning of file
- Refactoring: Move `build-html` to `build` directory - Refactoring: Move `build-html` to `build` directory

View File

@ -12,5 +12,6 @@ export default (on, config) => {
// `config` is the resolved Cypress config // `config` is the resolved Cypress config
// https://docs.cypress.io/guides/tooling/code-coverage.html#Install-the-plugin // https://docs.cypress.io/guides/tooling/code-coverage.html#Install-the-plugin
on('task', codeCoverageTask); codeCoverageTask(on, config);
return config;
}; };

View File

@ -5185,7 +5185,7 @@ editor.init = function () {
break; break;
} default: { } default: {
this._paintOpacity = Number.parseFloat(selectedElement.getAttribute(type + '-opacity')); this._paintOpacity = Number.parseFloat(selectedElement.getAttribute(type + '-opacity'));
if (isNaN(this._paintOpacity)) { if (Number.isNaN(this._paintOpacity)) {
this._paintOpacity = 1.0; this._paintOpacity = 1.0;
} }
@ -6421,7 +6421,7 @@ editor.init = function () {
editor.ready = function (cb) { // eslint-disable-line promise/prefer-await-to-callbacks editor.ready = function (cb) { // eslint-disable-line promise/prefer-await-to-callbacks
return new Promise((resolve, reject) => { // eslint-disable-line promise/avoid-new return new Promise((resolve, reject) => { // eslint-disable-line promise/avoid-new
if (isReady) { if (isReady) {
resolve(cb()); // eslint-disable-line callback-return, promise/prefer-await-to-callbacks resolve(cb()); // eslint-disable-line node/callback-return, promise/prefer-await-to-callbacks
return; return;
} }
callbacks.push([cb, resolve, reject]); callbacks.push([cb, resolve, reject]);

6550
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -144,39 +144,39 @@
"@babel/node": "^7.8.7", "@babel/node": "^7.8.7",
"@babel/plugin-transform-modules-commonjs": "^7.9.0", "@babel/plugin-transform-modules-commonjs": "^7.9.0",
"@babel/plugin-transform-named-capturing-groups-regex": "^7.8.3", "@babel/plugin-transform-named-capturing-groups-regex": "^7.8.3",
"@babel/preset-env": "^7.9.0", "@babel/preset-env": "^7.9.5",
"@babel/register": "^7.9.0", "@babel/register": "^7.9.0",
"@cypress/code-coverage": "^2.0.0", "@cypress/code-coverage": "^3.1.0",
"@cypress/fiddle": "^1.4.3", "@cypress/fiddle": "^1.5.1",
"@fintechstudios/eslint-plugin-chai-as-promised": "^3.0.2", "@fintechstudios/eslint-plugin-chai-as-promised": "^3.0.2",
"@mysticatea/eslint-plugin": "^13.0.0", "@mysticatea/eslint-plugin": "^13.0.0",
"babel-plugin-transform-object-rest-spread": "^7.0.0-beta.3", "babel-plugin-transform-object-rest-spread": "^7.0.0-beta.3",
"coffeescript": "^2.5.1", "coffeescript": "^2.5.1",
"copyfiles": "^2.2.0", "copyfiles": "^2.2.0",
"core-js-bundle": "^3.6.4", "core-js-bundle": "^3.6.5",
"coveradge": "^0.5.0", "coveradge": "^0.5.0",
"cypress": "^4.3.0", "cypress": "^4.3.0",
"cypress-axe": "^0.8.1", "cypress-axe": "^0.8.1",
"cypress-multi-reporters": "^1.2.4", "cypress-multi-reporters": "^1.2.4",
"deparam": "git+https://github.com/brettz9/deparam.git#updates", "deparam": "git+https://github.com/brettz9/deparam.git#updates",
"eslint": "^6.8.0", "eslint": "^6.8.0",
"eslint-config-ash-nazg": "^18.0.0", "eslint-config-ash-nazg": "^19.0.0",
"eslint-config-standard": "^14.1.1", "eslint-config-standard": "^14.1.1",
"eslint-plugin-array-func": "^3.1.4", "eslint-plugin-array-func": "^3.1.5",
"eslint-plugin-chai-expect": "^2.1.0", "eslint-plugin-chai-expect": "^2.1.0",
"eslint-plugin-chai-expect-keywords": "^2.0.1", "eslint-plugin-chai-expect-keywords": "^2.0.1",
"eslint-plugin-chai-friendly": "^0.5.0", "eslint-plugin-chai-friendly": "^0.5.0",
"eslint-plugin-compat": "^3.5.1", "eslint-plugin-compat": "^3.5.1",
"eslint-plugin-cypress": "^2.10.3", "eslint-plugin-cypress": "^2.10.3",
"eslint-plugin-eslint-comments": "^3.1.2", "eslint-plugin-eslint-comments": "^3.1.2",
"eslint-plugin-html": "^6.0.0", "eslint-plugin-html": "^6.0.1",
"eslint-plugin-import": "^2.20.2", "eslint-plugin-import": "^2.20.2",
"eslint-plugin-jsdoc": "^22.1.0", "eslint-plugin-jsdoc": "^23.0.0",
"eslint-plugin-markdown": "^1.0.2", "eslint-plugin-markdown": "^1.0.2",
"eslint-plugin-mocha": "^6.3.0", "eslint-plugin-mocha": "^6.3.0",
"eslint-plugin-mocha-cleanup": "^1.8.0", "eslint-plugin-mocha-cleanup": "^1.8.0",
"eslint-plugin-no-unsanitized": "^3.1.0", "eslint-plugin-no-unsanitized": "^3.1.0",
"eslint-plugin-no-use-extend-native": "^0.4.1", "eslint-plugin-no-use-extend-native": "^0.5.0",
"eslint-plugin-node": "^11.1.0", "eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^4.2.1", "eslint-plugin-promise": "^4.2.1",
"eslint-plugin-sonarjs": "^0.5.0", "eslint-plugin-sonarjs": "^0.5.0",
@ -186,26 +186,28 @@
"gh-badges": "^2.2.1", "gh-badges": "^2.2.1",
"imageoptim-cli": "^3.0.2", "imageoptim-cli": "^3.0.2",
"jamilih": "^0.52.2", "jamilih": "^0.52.2",
"jsdoc": "^3.6.3", "jsdoc": "^3.6.4",
"license-badger": "^0.12.7", "license-badger": "^0.13.0",
"load-stylesheets": "^0.9.0", "load-stylesheets": "^0.9.0",
"mocha": "^7.1.1", "mocha": "^7.1.1",
"mocha-badge-generator": "^0.5.2", "mocha-badge-generator": "^0.5.2",
"mochawesome": "^5.0.0", "mochawesome": "^6.0.0",
"mochawesome-merge": "^4.0.3", "mochawesome-merge": "^4.0.3",
"mochawesome-report-generator": "^4.1.0", "mochawesome-report-generator": "^5.0.0",
"node-static": "^0.7.11", "node-static": "^0.7.11",
"npm-run-all": "^4.1.5", "npm-run-all": "^4.1.5",
"nyc": "^15.0.0", "nyc": "^15.0.1",
"open-cli": "^6.0.1", "open-cli": "^6.0.1",
"promise-fs": "^2.1.1", "promise-fs": "^2.1.1",
"qr-manipulation": "git+https://github.com/brettz9/qr-manipulation.git", "qr-manipulation": "git+https://github.com/brettz9/qr-manipulation.git",
"query-result": "git+https://github.com/WebReflection/query-result.git", "query-result": "git+https://github.com/WebReflection/query-result.git",
"react": "^16.13.1",
"react-dom": "^16.13.1",
"regenerator-runtime": "^0.13.5", "regenerator-runtime": "^0.13.5",
"remark-cli": "^8.0.0", "remark-cli": "^8.0.0",
"remark-lint-ordered-list-marker-value": "^2.0.0", "remark-lint-ordered-list-marker-value": "^2.0.0",
"rimraf": "^3.0.2", "rimraf": "^3.0.2",
"rollup": "2.3.2", "rollup": "2.6.0",
"rollup-plugin-babel": "^4.4.0", "rollup-plugin-babel": "^4.4.0",
"rollup-plugin-re": "^1.0.7", "rollup-plugin-re": "^1.0.7",
"rollup-plugin-terser": "^5.3.0", "rollup-plugin-terser": "^5.3.0",