From 35ca4f401b09277a23bcafe829ce0c21e83d8330 Mon Sep 17 00:00:00 2001 From: Andrei Neculau Date: Fri, 1 Nov 2019 12:12:58 +0100 Subject: [PATCH 1/3] allow import/resolver to like .ts extensions even from .js modules --- configs/import.js | 17 ++++++++++++++++- configs/typescript.js | 17 ----------------- 2 files changed, 16 insertions(+), 18 deletions(-) diff --git a/configs/import.js b/configs/import.js index 6041644..329ffea 100644 --- a/configs/import.js +++ b/configs/import.js @@ -7,7 +7,22 @@ module.exports = { 'import/ignore': [ '\\.json$', 'node_modules' - ] + ], + + 'import/resolver': { + node: { + extensions: [ + // default + react + '.js', + '.json', + '.jsx', + '.mjs', + // typescript + react + '.ts', + '.tsx' + ] + } + } }, rules: { diff --git a/configs/typescript.js b/configs/typescript.js index 975c363..fe922b2 100644 --- a/configs/typescript.js +++ b/configs/typescript.js @@ -21,23 +21,6 @@ module.exports = { project: './tsconfig.json' }, - settings: { - 'import/resolver': { - node: { - extensions: [ - // default + react - '.js', - '.json', - '.jsx', - '.mjs', - // typescript + react - '.ts', - '.tsx' - ] - } - } - }, - rules: { // 'no-var' is broken atm for typescript, but it will be fixed in a the next version // see https://github.com/eslint/eslint/pull/11443 From d20beb11b2220338926484f372734f10f66665d9 Mon Sep 17 00:00:00 2001 From: Andrei Neculau Date: Fri, 1 Nov 2019 12:35:22 +0100 Subject: [PATCH 2/3] '@typescript-eslint/prefer-interface': 'off' --- configs/typescript.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configs/typescript.js b/configs/typescript.js index fe922b2..42514a8 100644 --- a/configs/typescript.js +++ b/configs/typescript.js @@ -34,7 +34,7 @@ module.exports = { '@typescript-eslint/ban-types': 'off', '@typescript-eslint/no-type-alias': 'off', // tslint:interface-over-type-literal - '@typescript-eslint/prefer-interface': 'error', // tslint:interface-over-type-literal + '@typescript-eslint/prefer-interface': 'off', // tslint:interface-over-type-literal '@typescript-eslint/explicit-member-accessibility': 'off', // tslint:member-access '@typescript-eslint/generic-type-naming': 'error', From 710427ffedea77a99d0a573828c2e90b57198d3c Mon Sep 17 00:00:00 2001 From: Andrei Neculau Date: Fri, 1 Nov 2019 12:38:43 +0100 Subject: [PATCH 3/3] 0.9.2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index aeab0f2..12ae343 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "private": true, "name": "eslint-config-firecloud", "description": "The ESLint config used within Tobii Cloud Services.", - "version": "0.9.1", + "version": "0.9.2", "license": "Unlicense", "files": [ "/*.js",