@cluerise/tools 5.3.4 → 5.3.5

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.
@@ -9,5 +9,11 @@ export default {
9
9
  parser: 'html',
10
10
  },
11
11
  },
12
+ {
13
+ files: ['*.json', '*.jsonc'],
14
+ options: {
15
+ trailingComma: 'none',
16
+ },
17
+ },
12
18
  ],
13
19
  };
@@ -498,20 +498,16 @@ class FileLinter {
498
498
  return this.#eslint.isPathIgnored(path);
499
499
  }
500
500
  async #prettierLint(patterns) {
501
- const configPath = await Prettier.resolveConfigFile();
502
- if (!configPath) {
503
- return [];
504
- }
505
- const config = await Prettier.resolveConfig(configPath);
506
- if (!config) {
507
- return [];
508
- }
509
501
  const paths = await glob(patterns, {
510
502
  nodir: true,
511
503
  ignore: "node_modules/**"
512
504
  });
513
505
  const results = await Promise.all(
514
506
  paths.map(async (path) => {
507
+ const config = await Prettier.resolveConfig(path);
508
+ if (!config) {
509
+ return null;
510
+ }
515
511
  if (await this.#isIgnoredByPrettier(path)) {
516
512
  return null;
517
513
  }
@@ -287,20 +287,16 @@ class FileLinter {
287
287
  return this.#eslint.isPathIgnored(path);
288
288
  }
289
289
  async #prettierLint(patterns) {
290
- const configPath = await Prettier.resolveConfigFile();
291
- if (!configPath) {
292
- return [];
293
- }
294
- const config = await Prettier.resolveConfig(configPath);
295
- if (!config) {
296
- return [];
297
- }
298
290
  const paths = await glob(patterns, {
299
291
  nodir: true,
300
292
  ignore: "node_modules/**"
301
293
  });
302
294
  const results = await Promise.all(
303
295
  paths.map(async (path) => {
296
+ const config = await Prettier.resolveConfig(path);
297
+ if (!config) {
298
+ return null;
299
+ }
304
300
  if (await this.#isIgnoredByPrettier(path)) {
305
301
  return null;
306
302
  }
@@ -237,20 +237,16 @@ class FileLinter {
237
237
  return this.#eslint.isPathIgnored(path);
238
238
  }
239
239
  async #prettierLint(patterns) {
240
- const configPath = await Prettier.resolveConfigFile();
241
- if (!configPath) {
242
- return [];
243
- }
244
- const config = await Prettier.resolveConfig(configPath);
245
- if (!config) {
246
- return [];
247
- }
248
240
  const paths = await glob(patterns, {
249
241
  nodir: true,
250
242
  ignore: "node_modules/**"
251
243
  });
252
244
  const results = await Promise.all(
253
245
  paths.map(async (path) => {
246
+ const config = await Prettier.resolveConfig(path);
247
+ if (!config) {
248
+ return null;
249
+ }
254
250
  if (await this.#isIgnoredByPrettier(path)) {
255
251
  return null;
256
252
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cluerise/tools",
3
- "version": "5.3.4",
3
+ "version": "5.3.5",
4
4
  "description": "Tools for maintaining TypeScript projects.",
5
5
  "author": "Branislav Holý <brano@holy.am>",
6
6
  "repository": "github:cluerise/tools",