* #issue-fix The new menu will ask if you want to erase the current content but it will ignore the answer * #issue-fix dialog needs to be closer than the original * #issue-fix main menu alignment changes * #issue_fix double click and opensvg issue fixed * #issue-fix process_cancel change to seConfirm * #issue-fix review how the top toolbar display when many buttons are displayed * #issue-fix unwanted css reoved * #issue-fix BOTTOM TOOLS Make sure all features of the bottom toolbar are working * #issue-fix IMPORT IMAGE menu open issue fixed * #issue-fix alert dialog overwrite style * #issue-fix lint issue fixed * npm update + associated fixes * #36 look of opacity button should like the zoom button (without the dropdown button) * #37 Clicking anywhere on the bottom bar (for example below the opacity button is displaying the “color popup”.) * #38 The opacity button does not update with the current element * #42 When you import an image, it works well but the dialog should disappear automatically * Fixes #53: 4th option for the background display fixed * Fixes #53: 4th option for the background fixed * #49 the x button does not work * Fixes #41: Alignment fixes in bottom bar * fix test scenario * #39 opacity button/stroke size/radius button don’t allow the 0 value * #41 The look and alignment of stroke size and stroke style should be consistent with the rest of the bottom bar. * #44 Text font dropdown is broken * #52 Fix the export * Fixes #44: Text font dropdown fixed * Fixes #44: Text font dropdown fixed * Fixes #44: Text font dropdown fixed * Fixes #44: Text font dropdown fixed * Update index.html * update husky * fixes * moves from index.html to js * fix #66 * fix #48 first set of new icons * Reorganize tools in left panel to be more intuitive * Update button styles to adapt to new icons * Fix #48 new set of icons for alignments * Variabilisation of icon bkgd colors Update of color choice to fit new icons design * Update canvas and rulers colors * Improve layer handle design * Modernize SVG Logo but keeping original spirit * Fix #48 continue improve icons * Continue to reorganise left panel * Update right panel handle for layers * Fix #48 new set of icons for main menu * Improve main menu design * Rework menu organisation * Rework menu organisation * Update input element design * New icons * Improve Zoom Module * Improve Color Picker Module * New icons * New icons * #65 restore the feature of start/end marker lines partially did * #64 The export dialog needs to include the quality options (except for PDF) * #39 opacity button/stroke size/radius button don’t allow the 0 value * #39 eslint changes * #69 menu button style overwrite * #65 restore the feature of start/end marker lines * #43 With a small window, the look of the top toolbar is broken * #43 tool top alignment revert * #46 Move this jQuery component to a web component for graduate and picker components * #46 Move this jQuery component to a web component * remove some non standard lint rules * #46 picker convert as pure javascript changes * #46 jquery plugin convert to pure javascript * #46 jquery plugin change to pure javascript * #46 jquery remove and convert to pure javascript * #46 slider issue fixed * #46 ColorValuePicker and js convertion * #46 globals $ remov from slider class * #46 jquery convert pure javascript changes * #46 jquery to js convertion changes * #46 paintbox and current element color set issue fixed * #46 unwanted files removed * #46 $.extend modify changes * #46 extend modifiey changes * #46 $.extend change to pure javascript * #46 extend and data changes * #46 jquery removed * #45 These buttons don't work and dropdown is broken * #45 These buttons don't work and dropdown is broken * #45 These buttons don't work and dropdown is broken commit reverted * #43 With a small window, the look of the top toolbar is broken * Update jQuery.jPicker.js * #76 draggable modification changes * #76 jquery-ui-1.8.17.custom.min.js removed from editor * #76 jquery ui file removed * npm update * #77 console issue fixed * #77 <SVG> button issue fixed * #77 shortkey issue fixed * #77 jquery hotkeys plugin changes * #77 hotkey plugin related changes * #78 hotkey related code comment. * #78 js-hotkeys/jquery.hotkeys.min.js file removed from svgedit.js * #51 Rewrite the color palette without elix * #81 unwanted files removed * #81 folder name renamed * #81 folder rename changes * #81 jquery-ui folder renamed * #81 jquery modify changes * #81 globals $ removed Co-authored-by: Agriya Dev5 <agriya.dev5@agriya.in> Co-authored-by: mathieucura <mathieu@optimistik.fr>
280 lines
7.7 KiB
JavaScript
280 lines
7.7 KiB
JavaScript
"use strict";
|
|
|
|
module.exports = {
|
|
extends: [
|
|
"plugin:compat/recommended",
|
|
"plugin:node/recommended",
|
|
"plugin:no-unsanitized/DOM",
|
|
"plugin:promise/recommended",
|
|
"plugin:import/errors",
|
|
"plugin:markdown/recommended",
|
|
"plugin:sonarjs/recommended"
|
|
],
|
|
plugins: ["jsdoc", "promise", "html", "import", "sonarjs"],
|
|
parserOptions: {
|
|
ecmaVersion: 2020,
|
|
sourceType: "module"
|
|
},
|
|
env: {
|
|
browser: true,
|
|
es6: true
|
|
},
|
|
settings: {
|
|
polyfills: [
|
|
// These are the primary polyfills needed by regular users if
|
|
// not present, e.g., with core-js-bundle; also those under
|
|
// extensions
|
|
"fetch",
|
|
"Promise",
|
|
"Promise.all",
|
|
// 'Set',
|
|
"Uint8Array",
|
|
"URL"
|
|
]
|
|
},
|
|
rules: {
|
|
// check-examples is not picking up eslint config properly in some
|
|
// environments; see also discussion above
|
|
// `mocha-cleanup/no-assertions-outside-it`
|
|
"sonarjs/cognitive-complexity": 0,
|
|
"sonarjs/no-duplicate-string": 0,
|
|
"sonarjs/no-collapsible-if": 0,
|
|
"sonarjs/no-small-switch": 0,
|
|
"sonarjs/no-identical-functions": 0,
|
|
"sonarjs/no-duplicated-branches": 0,
|
|
|
|
"jsdoc/check-examples": [
|
|
"warn",
|
|
{
|
|
rejectExampleCodeRegex: "^`",
|
|
checkDefaults: true,
|
|
checkParams: true,
|
|
checkProperties: true
|
|
}
|
|
],
|
|
// The Babel transform seems to have a problem converting these
|
|
"prefer-named-capture-group": "off",
|
|
"jsdoc/require-file-overview": [
|
|
"error",
|
|
{
|
|
tags: {
|
|
file: {
|
|
initialCommentsOnly: true,
|
|
preventDuplicates: true
|
|
},
|
|
license: {
|
|
initialCommentsOnly: true,
|
|
preventDuplicates: true
|
|
},
|
|
copyright: {
|
|
initialCommentsOnly: true,
|
|
preventDuplicates: true
|
|
},
|
|
author: {
|
|
initialCommentsOnly: true,
|
|
preventDuplicates: true
|
|
},
|
|
module: {
|
|
initialCommentsOnly: true,
|
|
preventDuplicates: true
|
|
},
|
|
exports: {
|
|
initialCommentsOnly: true,
|
|
preventDuplicates: true
|
|
}
|
|
}
|
|
}
|
|
],
|
|
// Warning or Off for now but should be reviewed
|
|
// Override these rules which are difficult for us
|
|
// to apply at this time
|
|
"default-case": "off",
|
|
"require-unicode-regexp": "off",
|
|
"max-len": ["warn", { ignoreComments: true, code: 130 }], // 130 is too much but too many occurences
|
|
"eslint-comments/require-description": "off",
|
|
"compat/compat": "error",
|
|
"consistent-this": "off",
|
|
"import/no-anonymous-default-export": "off",
|
|
"node/no-unsupported-features/node-builtins": "warn",
|
|
"prefer-exponentiation-operator": "warn",
|
|
"node/no-unsupported-features/es-syntax": "off",
|
|
"no-unsanitized/method": [
|
|
"error",
|
|
{
|
|
escape: {
|
|
methods: ["encodeURIComponent", "encodeURI"]
|
|
}
|
|
}
|
|
]
|
|
},
|
|
overrides: [
|
|
// Locales have no need for importing outside of SVG-Edit
|
|
// and translations may need a longer line length
|
|
{
|
|
files: [
|
|
'src/editor/locale/lang.*.js',
|
|
'src/editor/extensions/*/locale/**',
|
|
'docs/tutorials/ExtensionDocs.md/*.js'
|
|
],
|
|
rules: {
|
|
"import/no-anonymous-default-export": "off",
|
|
"max-len": "off",
|
|
"node/no-missing-import": "off",
|
|
"import/no-unresolved": "off"
|
|
}
|
|
},
|
|
// These browser files don't do importing or requiring
|
|
{
|
|
files: [
|
|
"src/editor/touch.js",
|
|
"src/editor/typedefs.js",
|
|
"src/editor/redirect-on-no-module-support.js",
|
|
"src/editor/extensions/ext-imagelib/index.js",
|
|
"screencasts/svgopen2010/script.js"
|
|
],
|
|
rules: {
|
|
"import/unambiguous": ["off"]
|
|
}
|
|
},
|
|
{
|
|
files: ["**/*.html", "screencasts/**"],
|
|
globals: {
|
|
root: "off"
|
|
},
|
|
settings: {
|
|
polyfills: [
|
|
"document.querySelector",
|
|
"history",
|
|
"history.pushState",
|
|
"history.replaceState",
|
|
"location.hash",
|
|
"navigator",
|
|
"Number.parseFloat",
|
|
"Number.parseInt",
|
|
"Number.isNaN"
|
|
]
|
|
},
|
|
rules: {
|
|
"import/unambiguous": "off"
|
|
}
|
|
},
|
|
{
|
|
// As consumed by jsdoc, cannot be expressed as ESM
|
|
files: ["docs/jsdoc-config.js"],
|
|
parserOptions: {
|
|
sourceType: "script"
|
|
},
|
|
globals: {
|
|
module: false
|
|
},
|
|
rules: {
|
|
"import/no-commonjs": "off",
|
|
strict: "off"
|
|
}
|
|
},
|
|
{
|
|
files: ["cypress/**"],
|
|
extends: [
|
|
"plugin:cypress/recommended",
|
|
"plugin:mocha/recommended",
|
|
"plugin:mocha-cleanup/recommended-no-limits",
|
|
"plugin:@fintechstudios/chai-as-promised/recommended",
|
|
"plugin:chai-expect-keywords/recommended",
|
|
"plugin:chai-expect/recommended",
|
|
"plugin:chai-friendly/recommended"
|
|
],
|
|
env: {
|
|
node: true
|
|
},
|
|
settings: {
|
|
polyfills: [
|
|
"console",
|
|
"Date.now",
|
|
"document.body",
|
|
"document.createElementNS",
|
|
"document.head",
|
|
"DOMParser",
|
|
"Number.isNaN",
|
|
"Object.keys",
|
|
"Object.entries",
|
|
"Promise"
|
|
]
|
|
},
|
|
rules: {
|
|
// These errors are caused in Cypress files if user has not
|
|
// yet instrumented code; need to reinvestigate why we had to
|
|
// instrument separately from nyc mocha
|
|
"import/no-unresolved": ["error", { ignore: ["/instrumented/"] }],
|
|
"node/no-missing-import": "off",
|
|
"jsdoc/check-examples": "off",
|
|
"chai-expect-keywords/no-unsupported-keywords": [
|
|
"error",
|
|
{
|
|
allowChaiDOM: true
|
|
}
|
|
],
|
|
// Would be good but seems necessary due to some bugs in Cypress
|
|
// in detecting visibility
|
|
// 'cypress/no-force': 0,
|
|
// Good but would be difficult to enforce (and data-* may not be less
|
|
// brittle than IDs/classes anyways)
|
|
// 'cypress/require-data-selectors': 0,
|
|
"cypress/assertion-before-screenshot": 2,
|
|
|
|
// Conflicts with Cypress `should`
|
|
"mocha-cleanup/invalid-assertions": 0,
|
|
|
|
// Might see about working around to avoid the option limitation,
|
|
// but convenient
|
|
"mocha-cleanup/no-expressions-in-assertions": [
|
|
"error",
|
|
{
|
|
replacementsOnly: true
|
|
}
|
|
],
|
|
|
|
// Too oppressive when planning to extend a section
|
|
"mocha/no-hooks-for-single-case": 0,
|
|
|
|
// Would be good to enable but needs some refactoring
|
|
"mocha/no-setup-in-describe": 0,
|
|
"mocha-cleanup/no-outside-declaration": 0,
|
|
|
|
// Useful to ensure allowing `this.timeout()`, etc., but a
|
|
// little oppressive
|
|
"mocha/no-mocha-arrows": 0,
|
|
// Useful if enabling the regular `prefer-arrow-callback`
|
|
// 'mocha/prefer-arrow-callback': 2
|
|
|
|
"jsdoc/require-jsdoc": 0,
|
|
"no-console": 0,
|
|
"import/unambiguous": 0
|
|
}
|
|
},
|
|
{
|
|
// Node files
|
|
files: [
|
|
"docs/jsdoc-config.js",
|
|
"build/build-html.js",
|
|
"rollup.config.js",
|
|
"rollup-config.config.js"
|
|
],
|
|
env: {
|
|
node: true
|
|
},
|
|
settings: {
|
|
polyfills: ["console", "Promise.resolve"]
|
|
},
|
|
globals: {
|
|
require: true
|
|
},
|
|
rules: {
|
|
// We can't put Rollup in npmignore or user can't get access,
|
|
// and we have too many modules to add to `peerDependencies`
|
|
// so this rule can know them to be available, so we instead
|
|
// disable
|
|
"node/no-unpublished-import": "off"
|
|
}
|
|
}
|
|
]
|
|
}; |