diff options
Diffstat (limited to 'packages')
-rw-r--r-- | packages/client/.eslintrc.json | 41 | ||||
-rw-r--r-- | packages/client/package.json | 7 | ||||
-rw-r--r-- | packages/eslint-config-base/.eslintrc.json | 10 | ||||
-rw-r--r-- | packages/eslint-config-base/index.js | 139 | ||||
-rw-r--r-- | packages/eslint-config-base/package.json | 8 | ||||
-rw-r--r-- | packages/server/.eslintrc.json | 17 | ||||
-rw-r--r-- | packages/server/package.json | 6 |
7 files changed, 228 insertions, 0 deletions
diff --git a/packages/client/.eslintrc.json b/packages/client/.eslintrc.json new file mode 100644 index 0000000..d60df09 --- /dev/null +++ b/packages/client/.eslintrc.json @@ -0,0 +1,41 @@ +{ + "env": { + "node": true + }, + "parser": "vue-eslint-parser", + "parserOptions": { + "parser": "@typescript-eslint/parser" + }, + "extends": [ + "plugin:vue/vue3-strongly-recommended", + "@vue/standard", + "@vue/typescript", + "base" + ], + "overrides": [ + { + "files": ["*.ts"], + "extends": [ + "plugin:@typescript-eslint/recommended" + ] + } + ], + "rules": { + "vue/max-attributes-per-line": [ "warn", { + "singleline": { + "max": 2, + "allowFirstLine": true + }, + "multiline": { + "max": 2, + "allowFirstLine": false + } + } ], + "vue/html-closing-bracket-newline": [ "error", { + "singleline": "never", + "multiline": "never" + } ], + "vue/html-indent": [ "error", "tab" ], + "typescript-eslint/no-var-requires": "off" + } +}
\ No newline at end of file diff --git a/packages/client/package.json b/packages/client/package.json index 65496d4..a82dafd 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -32,10 +32,17 @@ "@vue/compiler-sfc": "^3.0.0", "@vue/eslint-config-standard": "^6.0.0", "@vue/eslint-config-typescript": "^7.0.0", + "eslint": "^7.31.0", + "eslint-config-base": "^1.0.0", + "eslint-plugin-import": "^2.23.4", + "eslint-plugin-node": "^11.1.0", + "eslint-plugin-promise": "^4.2.1", + "eslint-plugin-vue": "^7.14.0", "sass": "^1.26.5", "sass-loader": "^12.1.0", "shared_types": "^1.0.0", "typescript": "^4.3.5", + "vue-eslint-parser": "^7.9.0", "webpack": "^5.46.0" }, "license": "MIT" diff --git a/packages/eslint-config-base/.eslintrc.json b/packages/eslint-config-base/.eslintrc.json new file mode 100644 index 0000000..d79f15b --- /dev/null +++ b/packages/eslint-config-base/.eslintrc.json @@ -0,0 +1,10 @@ +{ + "env": { + "es2021": true, + "node": true + }, + "parserOptions": { + "ecmaVersion": 12 + }, + "extends": "./index.js" +} diff --git a/packages/eslint-config-base/index.js b/packages/eslint-config-base/index.js new file mode 100644 index 0000000..bcd5f24 --- /dev/null +++ b/packages/eslint-config-base/index.js @@ -0,0 +1,139 @@ +module.exports = { + rules: { + "no-console": "off", + "no-debugger": "off", + "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", + "eol-last": [ + "error", + "never" + ], + eqeqeq: "error", + "func-names": "off", + "func-style": [ "error", "declaration" ], + "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": "off", + "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" + ] + } +};
\ No newline at end of file diff --git a/packages/eslint-config-base/package.json b/packages/eslint-config-base/package.json new file mode 100644 index 0000000..51c3fcc --- /dev/null +++ b/packages/eslint-config-base/package.json @@ -0,0 +1,8 @@ +{ + "name": "eslint-config-base", + "version": "1.0.0", + "main": "index.js", + "author": "HampusMat", + "license": "MIT", + "private": true +} diff --git a/packages/server/.eslintrc.json b/packages/server/.eslintrc.json new file mode 100644 index 0000000..6d17384 --- /dev/null +++ b/packages/server/.eslintrc.json @@ -0,0 +1,17 @@ +{ + "env": { + "commonjs": true, + "es2021": true, + "node": true + }, + "extends": [ + "standard", + "plugin:@typescript-eslint/recommended", + "base" + ], + "parserOptions": { + "ecmaVersion": 12, + "parser": "@typescript-eslint/parser" + }, + "plugins": [ "@typescript-eslint" ] +}
\ No newline at end of file diff --git a/packages/server/package.json b/packages/server/package.json index f5ff6e1..06ce863 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -24,6 +24,12 @@ "@types/whatwg-url": "^8.2.0", "@typescript-eslint/eslint-plugin": "^4.26.0", "@typescript-eslint/parser": "^4.26.0", + "eslint": "^7.31.0", + "eslint-config-base": " ^1.0.0", + "eslint-config-standard": "^16.0.3", + "eslint-plugin-import": "^2.23.4", + "eslint-plugin-node": "^11.1.0", + "eslint-plugin-promise": "^5.1.0", "nodemon": "^2.0.12", "shared_types": "^1.0.0", "ts-node": "^10.1.0", |