fix: lint-staged and merge eslint-config-html (#2550)

This commit is contained in:
Matthieu MOREL
2021-12-11 11:12:14 +01:00
committed by GitHub
parent b7eb71e7d3
commit 67143b7bfd
5 changed files with 30 additions and 40 deletions

View File

@@ -14,7 +14,7 @@
"sourceType": "module" "sourceType": "module"
}, },
"extends": ["eslint:recommended", "plugin:jsdoc/recommended", "plugin:markdown/recommended", "plugin:prettier/recommended"], "extends": ["eslint:recommended", "plugin:jsdoc/recommended", "plugin:markdown/recommended", "plugin:prettier/recommended"],
"plugins": ["jest", "jsdoc", "prettier"], "plugins": ["html", "jest", "jsdoc", "prettier"],
"rules": { "rules": {
"no-prototype-builtins": 0, "no-prototype-builtins": 0,
"no-unused-vars": 0, "no-unused-vars": 0,

7
.gitignore vendored
View File

@@ -4,8 +4,7 @@ node_modules/
coverage/ coverage/
.idea/ .idea/
dist/*.js dist/
dist/*.map
yarn-error.log yarn-error.log
.npmrc .npmrc
@@ -13,10 +12,6 @@ token
package-lock.json package-lock.json
dist/classTest.html
dist/sequenceTest.html
.vscode/ .vscode/
cypress/platform/current.html cypress/platform/current.html
cypress/platform/experimental.html cypress/platform/experimental.html

View File

@@ -1,5 +1,5 @@
{ {
"*": [ "*.{js,html,md}": [
"yarn lint:fix" "yarn lint:fix"
] ]
} }

View File

@@ -58,7 +58,9 @@
}, },
flowchart: { flowchart: {
// defaultRenderer: 'dagre-wrapper', // defaultRenderer: 'dagre-wrapper',
nodeSpacing: 10, curve: 'cardinal', htmlLabels: true nodeSpacing: 10,
curve: 'cardinal',
htmlLabels: true,
}, },
htmlLabels: true, htmlLabels: true,
// gantt: { axisFormat: '%m/%d/%Y' }, // gantt: { axisFormat: '%m/%d/%Y' },
@@ -70,23 +72,25 @@
curve: 'basis', curve: 'basis',
securityLevel: 'antiscript', securityLevel: 'antiscript',
startOnLoad: false, startOnLoad: false,
secure: ['secure', 'securityLevel', 'startOnLoad', 'maxTextSize'] secure: ['secure', 'securityLevel', 'startOnLoad', 'maxTextSize'],
// themeVariables: {relationLabelColor: 'red'} // themeVariables: {relationLabelColor: 'red'}
}); });
function callback(){alert('It worked');} function callback() {
alert('It worked');
}
function xssAttack() { function xssAttack() {
const div = document.createElement('div') const div = document.createElement('div');
div.id = 'the-malware' div.id = 'the-malware';
div.className = 'malware' div.className = 'malware';
div.innerHTML = 'XSS Succeeded' div.innerHTML = 'XSS Succeeded';
document.getElementsByTagName('body')[0].appendChild(div); document.getElementsByTagName('body')[0].appendChild(div);
throw new Error('XSS Succeded'); throw new Error('XSS Succeded');
} }
var diagram = "classDiagram\n" var diagram = 'classDiagram\n';
diagram += "classA <-- classB : <ifr"; diagram += 'classA <-- classB : <ifr';
diagram += "ame/srcdoc='<scr"; diagram += "ame/srcdoc='<scr";
diagram += "ipt>parent.xssAttack(`XSS`)</"; diagram += 'ipt>parent.xssAttack(`XSS`)</';
diagram += "script>'>"; diagram += "script>'>";
// var diagram = "stateDiagram-v2\n"; // var diagram = "stateDiagram-v2\n";

View File

@@ -5150,15 +5150,6 @@ espree@^9.2.0:
acorn-jsx "^5.3.1" acorn-jsx "^5.3.1"
eslint-visitor-keys "^3.1.0" eslint-visitor-keys "^3.1.0"
espree@^9.1.0:
version "9.2.0"
resolved "https://registry.yarnpkg.com/espree/-/espree-9.2.0.tgz#c50814e01611c2d0f8bd4daa83c369eabba80dbc"
integrity sha512-oP3utRkynpZWF/F2x/HZJ+AGtnIclaR7z1pYPxy7NYM2fSO6LgK/Rkny8anRSPK/VwEA1eqm2squui0T7ZMOBg==
dependencies:
acorn "^8.6.0"
acorn-jsx "^5.3.1"
eslint-visitor-keys "^3.1.0"
esprima@1.1.x, esprima@~1.1.1: esprima@1.1.x, esprima@~1.1.1:
version "1.1.1" version "1.1.1"
resolved "https://registry.yarnpkg.com/esprima/-/esprima-1.1.1.tgz#5b6f1547f4d102e670e140c509be6771d6aeb549" resolved "https://registry.yarnpkg.com/esprima/-/esprima-1.1.1.tgz#5b6f1547f4d102e670e140c509be6771d6aeb549"