arui-presets-lint 9.1.1 → 9.1.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.
package/cli/index.mjs CHANGED
@@ -1,6 +1,10 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  import { execaCommand } from 'execa';
4
+ import path from 'node:path';
5
+ import { fileURLToPath } from 'node:url';
6
+
7
+ const packageRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');
4
8
 
5
9
  const prettierParams =
6
10
  '"./**/*.{ts,tsx,js,jsx,mjs,mts,cjs,cts,css,json,mjsx,cjsx,mtsx,ctsx}" --no-error-on-unmatched-pattern --cache';
@@ -35,6 +39,7 @@ try {
35
39
  await execaCommand(exec, {
36
40
  shell: true,
37
41
  preferLocal: true,
42
+ localDir: packageRoot,
38
43
  stdio: ['pipe', 'inherit', 'inherit'],
39
44
  });
40
45
  } catch (error) {
@@ -484,13 +484,7 @@ export const bestPracticesConfig: Linter.Config = {
484
484
 
485
485
  // Требует не использовать фигурные скобки там, где их можно опустить
486
486
  // https://eslint.org/docs/rules/arrow-body-style
487
- 'arrow-body-style': [
488
- 'error',
489
- 'as-needed',
490
- {
491
- requireReturnForObjectLiteral: true,
492
- },
493
- ],
487
+ 'arrow-body-style': ['error', 'as-needed'],
494
488
 
495
489
  // Проверяет вызов super() в конструкторах
496
490
  // https://eslint.org/docs/rules/constructor-super
@@ -34,12 +34,13 @@ export const typescriptConfig: Linter.Config = {
34
34
  },
35
35
  rules: {
36
36
  // https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/src/configs/eslintrc/recommended-type-checked.ts
37
- ...(tseslint.configs.recommendedTypeChecked.reduce((acc, obj) => {
38
- return {
37
+ ...(tseslint.configs.recommendedTypeChecked.reduce(
38
+ (acc, obj) => ({
39
39
  ...acc,
40
40
  ...obj?.rules,
41
- };
42
- }, {}) as TSESLint.FlatConfig.Rules),
41
+ }),
42
+ {},
43
+ ) as TSESLint.FlatConfig.Rules),
43
44
 
44
45
  // Требовать явного указания типов возвращаемых данных и аргументов для методов публичных классов экспортируемых функций и классов
45
46
  // https://typescript-eslint.io/rules/explicit-module-boundary-types
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "arui-presets-lint",
3
- "version": "9.1.1",
3
+ "version": "9.1.3",
4
4
  "description": "Config files for arui-apps",
5
5
  "author": "core-ds contributors",
6
6
  "license": "MIT",