@@ -27,6 +27,8 @@ const baseConfig = {
2727 "plugin:jest-dom/recommended" ,
2828 "plugin:prettier/recommended" ,
2929 "plugin:@typescript-eslint/recommended" ,
30+ "plugin:import/recommended" ,
31+ "plugin:import/typescript" ,
3032 ] ,
3133 rules : {
3234 "@typescript-eslint/await-thenable" : "error" ,
@@ -57,22 +59,26 @@ const baseConfig = {
5759 "filenames/match-regexp" : "off" ,
5860 "func-style" : "off" ,
5961 "i18n-text/no-en" : "off" ,
60- "import/named" : "off" ,
61- "import/no-dynamic-require" : "off" ,
62- "import/no-dynamic-required" : "off" ,
63- "import/no-anonymous-default-export" : "off" ,
64- "import/no-commonjs" : "off" ,
65- "import/no-mutable-exports" : "off" ,
66- "import/no-namespace" : "off" ,
67- "import/no-unresolved" : "off" ,
68- "import/no-webpack-loader-syntax" : "off" ,
6962 "no-invalid-this" : "off" ,
7063 "no-fallthrough" : "off" ,
7164 "no-console" : "off" ,
7265 "no-shadow" : "off" ,
7366 "github/array-foreach" : "off" ,
7467 "github/no-then" : "off" ,
7568 "react/jsx-key" : [ "error" , { checkFragmentShorthand : true } ] ,
69+ "import/no-cycle" : "off" ,
70+ "import/no-namespace" : "off" ,
71+ // Never allow extensions in import paths, except for JSON files where they are required.
72+ "import/extensions" : [ "error" , "never" , { json : "always" } ] ,
73+ } ,
74+ settings : {
75+ "import/resolver" : {
76+ typescript : true ,
77+ node : true ,
78+ } ,
79+ "import/extensions" : [ ".js" , ".jsx" , ".ts" , ".tsx" , ".json" ] ,
80+ // vscode and sarif don't exist on-disk, but only provide types.
81+ "import/core-modules" : [ "vscode" , "sarif" ] ,
7682 } ,
7783} ;
7884
0 commit comments