From 394f871a370731ed49752cbaad24b31a6e0fb1f8 Mon Sep 17 00:00:00 2001 From: Eric Date: Fri, 26 Jun 2020 16:50:19 -0500 Subject: [PATCH] Change the eslintrc.js file for our Typescript work --- .eslintrc.js | 46 +++++++++++++++++++++++++++------------------- 1 file changed, 27 insertions(+), 19 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 78ff9cf2..548ba1b0 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,23 +1,31 @@ // License: AGPL-3.0-or-later WITH WTO-AP-3.0-or-later // Full license explanation at https://github.com/houdiniproject/houdini/blob/master/LICENSE + + module.exports = { - "env": { - "browser": true, - "commonjs": true, - "es6": true - }, - "extends": "eslint:recommended", - "parserOptions": { - "sourceType": "module" - }, - "rules": { - "linebreak-style": [ - "error", - "unix" - ], - "semi": [ - "error", - "never" - ] - } + root: true, + + overrides: [ + { + "files": ['**/*.ts'], + parser: '@typescript-eslint/parser', + plugins: [ + '@typescript-eslint', + ], + extends: [ + 'eslint:recommended', + 'plugin:@typescript-eslint/recommended', + ] + } + ], + "rules": { + "linebreak-style": [ + "error", + "unix" + ], + "semi": [ + "error", + "never" + ] + } };