diff options
author | HampusM <hampus@hampusmat.com> | 2022-05-23 15:29:46 +0200 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2022-05-23 15:29:46 +0200 |
commit | 71a02201164597481b926a26ab1eaa1ee112f4ec (patch) | |
tree | 70caba29f5c47285892aa8f8be7d3462d98f7353 /master | |
parent | fb4ffea4161c3ac88eeb43bc886fab63dfdc3891 (diff) |
chore(master): improve eslint config
Diffstat (limited to 'master')
-rw-r--r-- | master/.eslintrc.js | 166 |
1 files changed, 149 insertions, 17 deletions
diff --git a/master/.eslintrc.js b/master/.eslintrc.js index 905c914..c72e378 100644 --- a/master/.eslintrc.js +++ b/master/.eslintrc.js @@ -1,18 +1,150 @@ module.exports = { - root: true, - env: { - node: true - }, - extends: [ - 'plugin:vue/vue3-essential', - '@vue/standard', - '@vue/typescript/recommended' - ], - parserOptions: { - ecmaVersion: 2020 - }, - rules: { - 'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off', - 'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off' - } -} + root: true, + env: { + node: true + }, + extends: [ + "plugin:vue/vue3-strongly-recommended", + "@vue/standard", + "@vue/typescript" + ], + parser: "vue-eslint-parser", + parserOptions: { + parser: "@typescript-eslint/parser", + ecmaVersion: 2020 + }, + rules: { + "no-console": process.env.NODE_ENV === "production" ? "warn" : "off", + "no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off", + "vue/html-indent": [ "error", "tab" ], + "array-bracket-spacing": [ + "error", + "always" + ], + "array-bracket-newline": [ "warn", "consistent" ], + "array-element-newline": "off", + "arrow-body-style": "off", + "arrow-parens": [ + "error", + "as-needed" + ], + "arrow-spacing": [ + "error", + { + after: true, + before: true + } + ], + "brace-style": [ "error", "stroustrup", { allowSingleLine: false } ], + camelcase: "off", + "capitalized-comments": [ + "error", + "always" + ], + "comma-spacing": [ + "error", + { + after: true, + before: false + } + ], + "comma-style": [ + "error", + "last" + ], + "comma-dangle": [ "error", "never" ], + "computed-property-spacing": [ + "error", + "never" + ], + curly: [ "error", "all" ], + "dot-notation": "off", + eqeqeq: "error", + "func-names": "off", + "func-style": [ "error", "declaration", { allowArrowFunctions: true } ], + "id-length": "off", + "implicit-arrow-linebreak": [ + "error", + "beside" + ], + indent: [ "warn", "tab" ], + "keyword-spacing": [ "error", { + before: false, + overrides: { + from: { before: true }, + for: { after: false }, + if: { after: false }, + throw: { after: false }, + while: { after: false } + } + } ], + "linebreak-style": [ + "error", + "unix" + ], + "line-comment-position": [ "error", { position: "above" } ], + "max-len": [ "error", { code: 90 } ], + "max-lines": [ "error", 600 ], + "max-params": [ "error", 6 ], + "max-statements": "off", + "multiline-comment-style": [ "error", "bare-block" ], + "no-await-in-loop": "off", + "no-control-regex": "off", + "no-else-return": [ + "error", + { + allowElseIf: true + } + ], + "no-extra-parens": "off", + "no-magic-numbers": "off", + "no-tabs": "off", + "no-ternary": "off", + "no-underscore-dangle": [ "error", { allowAfterThis: true } ], + "no-var": "error", + "object-curly-spacing": [ + "error", + "always" + ], + "object-shorthand": "off", + "one-var": "off", + "padded-blocks": "off", + "prefer-arrow-callback": "off", + "prefer-const": "off", + "prefer-destructuring": "off", + "prefer-template": "off", + "quote-props": [ "error", "as-needed" ], + quotes: [ "error", "double" ], + semi: [ "error", "always" ], + "semi-style": [ + "error", + "last" + ], + "sort-keys": "off", + "space-before-function-paren": [ "error", "never" ], + "space-in-parens": [ + "error", + "never" + ], + "spaced-comment": [ + "error", + "always" + ], + strict: [ + "error", + "never" + ], + "template-curly-spacing": [ + "error", + "never" + ], + "unicode-bom": [ + "error", + "never" + ], + yoda: [ + "error", + "never" + ] + } +}; |