From 04e9f64278203a5dc9921ce4d340827f2dc586a8 Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Mon, 3 Feb 2020 09:45:14 +0100 Subject: [PATCH] Convert eslint config to .js to set parserOptions.project/.tsconfigRootDir --- .eslintrc.js | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++ .eslintrc.json | 56 ------------------------------------------------ 2 files changed, 58 insertions(+), 56 deletions(-) create mode 100644 .eslintrc.js delete mode 100644 .eslintrc.json diff --git a/.eslintrc.js b/.eslintrc.js new file mode 100644 index 0000000000..f41507091b --- /dev/null +++ b/.eslintrc.js @@ -0,0 +1,58 @@ +module.exports = { + env: { + es6: true, + jasmine: true, + node: true, + worker: true, + }, + parser: "@typescript-eslint/parser", + parserOptions: { + ecmaVersion: 2018, + project: "./tsconfig.json", + tsconfigRootDir: __dirname, + }, + 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: ["/