@commission-on-post/eslint-config-recommended 0.8.2 → 0.8.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/.eslintrc.js +19 -1
  2. package/package.json +4 -2
package/.eslintrc.js CHANGED
@@ -6,6 +6,7 @@ module.exports = {
6
6
  extends: [
7
7
  "eslint:recommended",
8
8
  "plugin:import/recommended",
9
+ "plugin:import/typescript",
9
10
  "plugin:@typescript-eslint/recommended",
10
11
  "plugin:@typescript-eslint/recommended-requiring-type-checking"
11
12
  ],
@@ -112,6 +113,9 @@ module.exports = {
112
113
  "prefer-inline": true
113
114
  }
114
115
  ],
116
+ "import/no-named-as-default": [
117
+ "off"
118
+ ],
115
119
  "@typescript-eslint/no-empty-function": [
116
120
  "warn",
117
121
  {
@@ -1077,5 +1081,19 @@ module.exports = {
1077
1081
  "space-infix-ops": [
1078
1082
  "off"
1079
1083
  ]
1080
- }
1084
+ },
1085
+ settings: {
1086
+ "import/parsers": {
1087
+ "@typescript-eslint/parser": [".ts", ".tsx"]
1088
+ },
1089
+ "import/resolver": {
1090
+ "typescript": {
1091
+ "alwaysTryTypes": true, // always try to resolve types under `<root>@types` directory even it doesn't contain any source code, like `@types/unist`
1092
+
1093
+ // use <root>/path/to/folder/tsconfig.json
1094
+ "project": "path/to/folder"
1095
+ },
1096
+ "node": true
1097
+ }
1098
+ }
1081
1099
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@commission-on-post/eslint-config-recommended",
3
- "version": "0.8.2",
3
+ "version": "0.8.3",
4
4
  "description": "ESLint config using recommended state practices for the Commission on POST",
5
5
  "main": "index.js",
6
6
  "author": "Ryan W. Bell",
@@ -23,6 +23,7 @@
23
23
  "peerDependencies": {
24
24
  "@typescript-eslint/eslint-plugin": ">=6.2.1",
25
25
  "@typescript-eslint/parser": ">=6.2.1",
26
+ "eslint-import-resolver-typescript": ">=3.5.5",
26
27
  "eslint": ">=8.46.0",
27
28
  "typescript": ">=5.1.6"
28
29
  },
@@ -31,6 +32,7 @@
31
32
  "@typescript-eslint/parser": "^6.2.1",
32
33
  "eslint": "^8.46.0",
33
34
  "eslint-plugin-import": "^2.28.0",
34
- "typescript": "^5.1.6"
35
+ "typescript": "^5.1.6",
36
+ "eslint-import-resolver-typescript": "^3.5.5"
35
37
  }
36
38
  }