From a084460ffad3d6d5fa017b1dbe74c9307e664656 Mon Sep 17 00:00:00 2001 From: Sebastian Burschel Date: Thu, 29 Aug 2024 17:46:39 +0200 Subject: [PATCH] Added linter configs --- .eslintrc.json | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ .tidy.conf | 42 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 92 insertions(+) create mode 100644 .eslintrc.json create mode 100644 .tidy.conf diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 0000000..1d4d7be --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,50 @@ +{ + "extends": "eslint:recommended", + "env": { + "node": true, + "es6": true + }, + "parserOptions": { + "ecmaVersion": 2021 + }, + "rules": { + "arrow-spacing": ["warn", { "before": true, "after": true }], + "brace-style": ["error", "1tbs", { "allowSingleLine": true }], + "comma-dangle": ["error", "always-multiline"], + "comma-spacing": "error", + "comma-style": "error", + "curly": ["error", "multi-line", "consistent"], + "dot-location": ["error", "property"], + "handle-callback-err": "off", + "indent": ["error", 4], + "keyword-spacing": "error", + "max-nested-callbacks": ["error", { "max": 4 }], + "max-statements-per-line": ["error", { "max": 2 }], + "no-console": "off", + "no-empty-function": "error", + "no-floating-decimal": "error", + "no-inline-comments": "error", + "no-lonely-if": "error", + "no-multi-spaces": "error", + "no-multiple-empty-lines": ["error", { "max": 2, "maxEOF": 1, "maxBOF": 0 }], + "no-shadow": ["error", { "allow": ["err", "resolve", "reject"] }], + "no-trailing-spaces": ["error"], + "no-var": "error", + "object-curly-spacing": ["error", "always"], + "prefer-const": "error", + "quotes": ["error", "double"], + "semi": ["error", "never"], + "space-before-blocks": "error", + "space-before-function-paren": ["error", { + "anonymous": "never", + "named": "never", + "asyncArrow": "always" + }], + "space-in-parens": "error", + "space-infix-ops": "error", + "space-unary-ops": "error", + "spaced-comment": "error", + "yoda": "error" + } +} + diff --git a/.tidy.conf b/.tidy.conf new file mode 100644 index 0000000..221f5c9 --- /dev/null +++ b/.tidy.conf @@ -0,0 +1,42 @@ +anchor-as-name: no #? +doctype: omit +drop-empty-paras: no +fix-backslash: no +fix-bad-comments: no +fix-uri:no +hide-endtags: yes #? +#input-xml: yes #? +join-styles: no +literal-attributes: yes +lower-literals: no +merge-divs: no +merge-spans: no +output-html: yes +preserve-entities: yes +quote-ampersand: no +quote-nbsp: no +show-body-only: auto + +#Diagnostics Options Reference +show-errors: 0 +show-warnings: 0 + +#Pretty Print Options Reference +break-before-br: yes +indent: yes +indent-attributes: no #default +indent-spaces: 4 +tab-size: 4 +wrap: 132 +wrap-asp: no +wrap-jste: no +wrap-php: no +wrap-sections: no + +#Character Encoding Options Reference +char-encoding: utf8 + +#Miscellaneous Options Reference +force-output: yes +quiet: yes +tidy-mark: no