From 00926c71dcc5930cb98d71a509d9b2fe1eb84812 Mon Sep 17 00:00:00 2001 From: Ethan Frey Date: Wed, 22 Jan 2020 17:48:29 +0100 Subject: [PATCH] Set up format and lint configs --- .editorconfig | 12 ++++++++++ .eslintrc.json | 61 ++++++++++++++++++++++++++++++++++++++++++++++++ .prettierrc.json | 4 ++++ 3 files changed, 77 insertions(+) create mode 100644 .editorconfig create mode 100644 .eslintrc.json create mode 100644 .prettierrc.json diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000000..697a547116 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,12 @@ +root = true + +[*] +charset = utf-8 +end_of_line = lf +indent_size = 2 +indent_style = space +insert_final_newline = true +trim_trailing_whitespace = true + +[*.py] +indent_size = 4 diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 0000000000..cbbaf4b502 --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,61 @@ +{ + "env": { + "es6": true, + "jasmine": true, + "node": true, + "worker": true + }, + "parser": "@typescript-eslint/parser", + "parserOptions": { + "ecmaVersion": 2018 + }, + "plugins": ["@typescript-eslint", "prettier", "simple-import-sort", "import"], + "extends": [ + "eslint:recommended", + "plugin:@typescript-eslint/recommended", + "prettier/@typescript-eslint", + "plugin:prettier/recommended", + "plugin:import/typescript" + ], + "rules": { + "curly": ["warn", "multi-line", "consistent"], + "no-console": ["warn", { "allow": ["error", "info", "warn"] }], + "no-param-reassign": "warn", + "no-shadow": "warn", + "prefer-const": "warn", + "spaced-comment": ["warn", "always", { "line": { "markers": ["/