eslint-plugin-use-agnostic 2.0.5 → 2.0.7
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.
|
@@ -88,8 +88,6 @@ In this context, {{ ${specificFailure} }} `,
|
|
|
88
88
|
const rootPath = /** @type {string | undefined} */ (
|
|
89
89
|
context.settings.eXtraJSX?.rootPath
|
|
90
90
|
);
|
|
91
|
-
console.debug("context.settings are:", context.settings);
|
|
92
|
-
console.debug("context.settings.eXtraJSX are:", context.settings.eXtraJSX);
|
|
93
91
|
console.debug("reactFolder is:", reactFolder);
|
|
94
92
|
console.debug("rootPath is:", rootPath);
|
|
95
93
|
|
|
@@ -98,7 +96,11 @@ In this context, {{ ${specificFailure} }} `,
|
|
|
98
96
|
// pass the resolver to importsFlow, allExportsFlow, importsFlowRequire (resolver.resolveFileSync, getCommentedDirectiveFromModule)
|
|
99
97
|
|
|
100
98
|
const tsConfigPaths = getTsConfigPaths(rootPath);
|
|
101
|
-
|
|
99
|
+
console.debug("tsConfigPaths is:", tsConfigPaths);
|
|
100
|
+
const absoluteTsConfigPaths = makeAbsoluteFromTsConfigPaths(
|
|
101
|
+
rootPath,
|
|
102
|
+
tsConfigPaths,
|
|
103
|
+
);
|
|
102
104
|
const resolver = makeResolverFromAbsoluteTsConfigPaths(
|
|
103
105
|
absoluteTsConfigPaths,
|
|
104
106
|
);
|
|
@@ -132,11 +134,15 @@ In this context, {{ ${specificFailure} }} `,
|
|
|
132
134
|
};
|
|
133
135
|
|
|
134
136
|
const getTsConfigPaths = (rootPath) => {
|
|
137
|
+
const tsConfigJsonPath = path.join(rootPath, "tsconfig.json");
|
|
138
|
+
console.debug("tsConfigJsonPath is:", tsConfigJsonPath);
|
|
139
|
+
|
|
135
140
|
const parsed = ts.getParsedCommandLineOfConfigFile(
|
|
136
|
-
|
|
141
|
+
tsConfigJsonPath,
|
|
137
142
|
{},
|
|
138
143
|
ts.sys,
|
|
139
144
|
);
|
|
145
|
+
console.debug(tsConfigJsonPath);
|
|
140
146
|
|
|
141
147
|
if (!parsed) return {};
|
|
142
148
|
|
package/library/index.js
CHANGED
|
@@ -205,10 +205,24 @@ export const defineDirective21 = (reactFolder) => {
|
|
|
205
205
|
*/
|
|
206
206
|
export const defineConfigSettings = ({ reactFolder, rootPath }) => {
|
|
207
207
|
/**
|
|
208
|
-
* @type {["**\/*.js"]}
|
|
208
|
+
* @type {["**\/*.tsx", "**\/*.ts", "**\/*.mtsx", "**\/*.mts", "**\/*.ctsx", "**\/*.cts", "**\/*.jsx", "**\/*.js", "**\/*.mjsx", "**\/*.mjs", "**\/*.cjsx", "**\/*.cjs"]}
|
|
209
209
|
* The dummy file paths used by the eXtra JSX VS Code extension are JavaScript file paths, therefore this glob pattern is enough to work in recognizing the dummy file paths in order to retrieve the settings.
|
|
210
|
+
* Now that the settings are actually used in eslint-plugin-use-agnostic, they need to cover all JS/TS/JSX/TSX files.
|
|
210
211
|
*/
|
|
211
|
-
const files = [
|
|
212
|
+
const files = [
|
|
213
|
+
"**/*.tsx",
|
|
214
|
+
"**/*.ts",
|
|
215
|
+
"**/*.mtsx",
|
|
216
|
+
"**/*.mts",
|
|
217
|
+
"**/*.ctsx",
|
|
218
|
+
"**/*.cts",
|
|
219
|
+
"**/*.jsx",
|
|
220
|
+
"**/*.js",
|
|
221
|
+
"**/*.mjsx",
|
|
222
|
+
"**/*.mjs",
|
|
223
|
+
"**/*.cjsx",
|
|
224
|
+
"**/*.cjs",
|
|
225
|
+
];
|
|
212
226
|
|
|
213
227
|
return {
|
|
214
228
|
files,
|