@@ -6,6 +6,10 @@ module.exports = {
66 "plugin:@typescript-eslint/recommended" ,
77 // https://prettier.io/docs/en/eslint.html
88 "plugin:prettier/recommended" ,
9+
10+ // https://github.com/benmosher/eslint-plugin-import
11+ "plugin:import/recommended" ,
12+ "plugin:import/typescript" ,
913 ] ,
1014 plugins : [ ] ,
1115 parser : "@typescript-eslint/parser" ,
@@ -26,17 +30,23 @@ module.exports = {
2630 "curly" : "warn" ,
2731 "no-param-reassign" : "warn" ,
2832
33+ "import/no-unresolved" : "off" , // cannot handle `paths` in tsconfig
34+ "import/no-cycle" : "error" ,
35+ "import/no-default-export" : "error" ,
36+
2937 "@typescript-eslint/no-unused-vars" :"warn" ,
30- "@typescript-eslint/array-type" : [ "error " , "generic" ] ,
38+ "@typescript-eslint/array-type" : [ "warn " , "generic" ] ,
3139 "@typescript-eslint/camelcase" : "warn" ,
3240 "@typescript-eslint/class-name-casing" : "warn" , // to allow the initial underscore
3341 "@typescript-eslint/no-non-null-assertion" : "warn" , // NOTE: pay attention to it because it may cause unexpected behavior
3442 "@typescript-eslint/prefer-for-of" : "warn" ,
3543 "@typescript-eslint/prefer-includes" : "warn" ,
3644 "@typescript-eslint/prefer-string-starts-ends-with" : "warn" ,
45+ "@typescript-eslint/prefer-readonly" : "warn" ,
46+ "@typescript-eslint/prefer-regexp-exec" : "warn" ,
3747 "@typescript-eslint/no-use-before-define" : "warn" ,
38- "@typescript-eslint/await-thenable" : "error " ,
39- "@typescript-eslint/no-for-in-array" : "error " ,
48+ "@typescript-eslint/await-thenable" : "warn " ,
49+ "@typescript-eslint/no-for-in-array" : "warn " ,
4050
4151 "@typescript-eslint/indent" : "off" ,
4252 "@typescript-eslint/no-explicit-any" : "off" ,
@@ -45,7 +55,7 @@ module.exports = {
4555 "@typescript-eslint/no-object-literal-type-assertion" : "off" ,
4656 "@typescript-eslint/no-empty-interface" : "off" ,
4757 "@typescript-eslint/no-parameter-properties" : "off" ,
48- "@typescript-eslint/no-var-requires" : "off" , // not a part of ECMA-262
58+ "@typescript-eslint/no-var-requires" : "off" , // enforces `import x = require("x")`, which is TypeScript-specific
4959 "@typescript-eslint/prefer-interface" : "off" ,
5060
5161 "prettier/prettier" : "warn" ,
0 commit comments