mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-08 09:00:05 +00:00
chore: configure eslint
This commit is contained in:
1
.eslintignore
Normal file
1
.eslintignore
Normal file
@@ -0,0 +1 @@
|
||||
/build
|
||||
49
.eslintrc
Normal file
49
.eslintrc
Normal file
@@ -0,0 +1,49 @@
|
||||
{
|
||||
"extends": "eslint:recommended",
|
||||
"parserOptions": {
|
||||
"ecmaVersion": 5
|
||||
},
|
||||
"env": {
|
||||
"browser": true,
|
||||
"node": true
|
||||
},
|
||||
"globals": {
|
||||
"gl": true,
|
||||
"GL": true,
|
||||
"LS": true,
|
||||
"Uint8Array": true,
|
||||
"Uint32Array": true,
|
||||
"Float32Array": true,
|
||||
"LGraphCanvas": true,
|
||||
"LGraph": true,
|
||||
"LGraphNode": true,
|
||||
"LiteGraph": true,
|
||||
"LGraphTexture": true,
|
||||
"Mesh": true,
|
||||
"Shader": true,
|
||||
"enableWebGLCanvas": true,
|
||||
"vec2": true,
|
||||
"vec3": true,
|
||||
"vec4": true,
|
||||
"DEG2RAD": true,
|
||||
"isPowerOfTwo": true,
|
||||
"cloneCanvas": true,
|
||||
"createCanvas": true,
|
||||
"hex2num": true,
|
||||
"colorToString": true,
|
||||
"showElement": true,
|
||||
"quat": true,
|
||||
"AudioSynth": true,
|
||||
"SillyClient": true
|
||||
},
|
||||
"rules": {
|
||||
"no-console": "off",
|
||||
"no-empty": "warn",
|
||||
"no-redeclare": "warn",
|
||||
"no-inner-declarations": "warn",
|
||||
"no-constant-condition": "warn",
|
||||
"no-unused-vars": "warn",
|
||||
"no-mixed-spaces-and-tabs": "warn",
|
||||
"no-unreachable": "warn"
|
||||
}
|
||||
}
|
||||
2
.vscode/extensions.json
vendored
2
.vscode/extensions.json
vendored
@@ -3,7 +3,7 @@
|
||||
// Extension identifier format: ${publisher}.${name}. Example: vscode.csharp
|
||||
|
||||
// List of extensions which should be recommended for users of this workspace.
|
||||
"recommendations": ["esbenp.prettier-vscode"],
|
||||
"recommendations": ["esbenp.prettier-vscode", "dbaeumer.vscode-eslint"],
|
||||
// List of extensions recommended by VS Code that should not be recommended for users of this workspace.
|
||||
"unwantedRecommendations": []
|
||||
}
|
||||
|
||||
@@ -12,7 +12,9 @@
|
||||
"build": "grunt build",
|
||||
"start": "nodemon utils/server.js",
|
||||
"test": "echo \"Error: no test specified\" && exit 1",
|
||||
"prettier": "npx prettier --write src/**/*.* css/**/*.*"
|
||||
"prettier": "npx prettier --write src/**/*.* css/**/*.*",
|
||||
"lint": "npx eslint src",
|
||||
"lint:fix": "npx eslint --fix src"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
||||
Reference in New Issue
Block a user