Skip to content

Commit

Permalink
Eslint checks wip
Browse files Browse the repository at this point in the history
  • Loading branch information
madprops committed Dec 30, 2024
1 parent 29b3fc2 commit 7526866
Show file tree
Hide file tree
Showing 6 changed files with 88 additions and 57 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@
Thumbs.db
desktop.ini
package-lock.json
.directory
.directory
.eslintcache
75 changes: 75 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
import globals from "globals";
import pluginJs from "@eslint/js";

export default [
// pluginJs.configs.recommended,

{languageOptions: {globals: globals.browser}},

{
rules: {
// "no-unused-vars": "off",
// "indent": ["error", 2],
// "linebreak-style": ["error", "unix"],
// "quotes": ["error", "backtick"],
// "no-console": "error",
// "no-multi-spaces": "error",
// "no-multiple-empty-lines": ["error", {"max": 1}],
// "object-shorthand": ["error", "always"],
// "semi": ["error", "never"],
// "no-else-return": "error",
// "padded-blocks": ["error", "never"],
// "no-lonely-if": "error",
// "eqeqeq": ["error", "always"],
// "curly": ["error", "all"],
// "brace-style": ["error", "stroustrup", {"allowSingleLine": true}],
// "no-var": "error",
// "arrow-spacing": ["error", {"before": true, "after": true}],
// "space-in-parens": ["error", "never"],
// "object-curly-spacing": ["error", "never"],
// "prefer-object-spread": "error",
// "no-eval": "error",
// "no-useless-escape": "error",
// "default-param-last": "error",
// "dot-notation": "error",
// "keyword-spacing": "error",
// "space-infix-ops": "error",
// "comma-spacing": "error",
// "comma-dangle": ["error", "always-multiline"],
// "no-extra-parens": ["error", "all", {
// "nestedBinaryExpressions": false,
// "enforceForArrowConditionals": false,
// "returnAssign": false
// }],
// "padding-line-between-statements": [
// "error",
// { "blankLine": "always", "prev": "block-like", "next": "*" }
// ],
// "func-call-spacing": ["error", "never"],
// "space-before-function-paren": ["error", {
// "anonymous": "never",
// "named": "never",
// "asyncArrow": "always"
// }],
},
languageOptions: {
globals: {
Hue: "writable",
Msg: "writable",
Utilz: "writable",
Croppie: "writable",
Handlebars: "writable",
jdenticon: "writable",
Dropzone: "writable",
io: "writable",
Twitch: "writable",
SC: "writable",
YT: "writable",
onYouTubeIframeAPIReady: "writable",
ColorLib: "writable",
NeedContext: "writable",
dateFormat: "writable",
}
}
}
]
50 changes: 0 additions & 50 deletions eslint.json

This file was deleted.

5 changes: 0 additions & 5 deletions eslint_check.sh

This file was deleted.

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
"winston": "~3.6.0",
"connect-redis": "~6.1.1",
"tar": "~6.1.11",
"yaml": "~2.1.1"
"yaml": "~2.1.1",
"eslint": "~9.17.0",
"globals": "~15.9.0"
}
}
8 changes: 8 additions & 0 deletions utils/check.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/env bash

export NODE_OPTIONS="--no-warnings"

npx eslint --cache public/static/assets/js/main/*.js
# npx eslint --cache eslint.json --no-ignore public/static/assets/js/libs/utilz.js
# npx eslint --cache eslint.json --no-ignore public/static/assets/js/libs/colorlib.js
# npx eslint --cache eslint.json --no-ignore public/static/assets/js/libs/msg.js

0 comments on commit 7526866

Please sign in to comment.