@travetto/eslint 7.1.4 → 8.0.0-alpha.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@travetto/eslint",
3
- "version": "7.1.4",
3
+ "version": "8.0.0-alpha.1",
4
4
  "type": "module",
5
5
  "description": "ES Linting Rules",
6
6
  "keywords": [
@@ -24,18 +24,18 @@
24
24
  "directory": "module/eslint"
25
25
  },
26
26
  "dependencies": {
27
- "@eslint/js": "^9.39.2",
28
- "@stylistic/eslint-plugin": "^5.7.0",
29
- "@travetto/runtime": "^7.1.4",
27
+ "@eslint/js": "^10.0.1",
28
+ "@stylistic/eslint-plugin": "^5.10.0",
29
+ "@travetto/runtime": "^8.0.0-alpha.1",
30
30
  "@types/eslint": "^9.6.1",
31
- "@typescript-eslint/eslint-plugin": "^8.52.0",
32
- "@typescript-eslint/parser": "^8.52.0",
33
- "eslint": "^9.39.2",
34
- "eslint-plugin-import": "^2.32.0",
35
- "eslint-plugin-unused-imports": "^4.3.0"
31
+ "@typescript-eslint/eslint-plugin": "8.56.2-alpha.2",
32
+ "@typescript-eslint/parser": "8.56.2-alpha.2",
33
+ "@typescript-eslint/typescript-estree": "8.56.2-alpha.2",
34
+ "eslint": "^10.0.3",
35
+ "eslint-plugin-unused-imports": "^4.4.1"
36
36
  },
37
37
  "peerDependencies": {
38
- "@travetto/cli": "^7.1.4"
38
+ "@travetto/cli": "^8.0.0-alpha.1"
39
39
  },
40
40
  "peerDependenciesMeta": {
41
41
  "@travetto/cli": {
@@ -1,9 +1,10 @@
1
+ import fs from 'node:fs';
1
2
  import eslintJs from '@eslint/js';
2
3
  import type { Linter } from 'eslint';
3
4
  import tsEslintPlugin from '@typescript-eslint/eslint-plugin';
4
5
  import stylisticPlugin from '@stylistic/eslint-plugin';
5
6
  import unusedImports from 'eslint-plugin-unused-imports';
6
- import importPlugin from 'eslint-plugin-import';
7
+ // import importPlugin from 'eslint-plugin-import';
7
8
 
8
9
  import { castTo, JSONUtil, Runtime, RuntimeIndex } from '@travetto/runtime';
9
10
 
@@ -28,7 +29,7 @@ for (const plugin of plugins) {
28
29
 
29
30
  const overrides = Runtime.workspaceRelative('eslint-overrides.json');
30
31
 
31
- const extra: (typeof STD_RULES)[] = JSONUtil.readFileSync(overrides, []);
32
+ const extra: (typeof STD_RULES)[] = fs.existsSync(overrides) ? JSONUtil.fromBinaryArray(fs.readFileSync(overrides)) : [];
32
33
 
33
34
  export const rules: Linter.Config[] = [
34
35
  eslintJs.configs.recommended,
@@ -43,7 +44,7 @@ export const rules: Linter.Config[] = [
43
44
  '@typescript-eslint': {
44
45
  rules: castTo(tsEslintPlugin.rules),
45
46
  },
46
- import: importPlugin,
47
+ // import: importPlugin,
47
48
  'unused-imports': unusedImports,
48
49
  ...(Object.fromEntries(plugins.map(plugin => [plugin.name, plugin])))
49
50
  },
@@ -63,7 +64,7 @@ export const rules: Linter.Config[] = [
63
64
  rules: stylisticPlugin.rules
64
65
  },
65
66
  'unused-imports': unusedImports,
66
- import: importPlugin,
67
+ // import: importPlugin,
67
68
  },
68
69
  rules: {
69
70
  ...Object.fromEntries(Object.entries(STD_RULES!).filter(rule => !rule[0].startsWith('@typescript'))),
@@ -80,6 +81,8 @@ export const rules: Linter.Config[] = [
80
81
  files: ['**/DOC.ts', '**/DOC.tsx', '**/doc/**/*.ts', '**/doc/**/*.tsx'],
81
82
  rules: {
82
83
  'max-len': 0,
84
+ 'no-unassigned-vars': 0,
85
+ 'no-useless-assignment': 0,
83
86
  'no-unused-private-class-members': 0,
84
87
  '@typescript-eslint/no-unused-vars': 0,
85
88
  '@typescript-eslint/explicit-function-return-type': 0
@@ -8,6 +8,7 @@ export const STD_RULES: Linter.Config['rules'] = {
8
8
  '@typescript-eslint/explicit-function-return-type': 0,
9
9
  '@typescript-eslint/no-non-null-assertion': 0,
10
10
  '@typescript-eslint/no-explicit-any': 'warn',
11
+ '@typescript-eslint/await-thenable': 'error',
11
12
  '@typescript-eslint/parameter-properties': 'error',
12
13
  '@typescript-eslint/explicit-member-accessibility': [0, { accessibility: 'explicit' }],
13
14
  indent: 0,
@@ -230,10 +231,10 @@ export const STD_RULES: Linter.Config['rules'] = {
230
231
  fixStyle: 'inline-type-imports',
231
232
  },
232
233
  ],
233
- 'import/enforce-node-protocol-usage': ['error', 'always'],
234
- 'import/no-self-import': ['error'],
235
- 'import/extensions': ['error', 'ignorePackages'],
236
- 'import/order': ['error', {
237
- groups: ['builtin', 'external', ['parent', 'sibling']],
238
- }]
234
+ // 'import/enforce-node-protocol-usage': ['error', 'always'],
235
+ // 'import/no-self-import': ['error'],
236
+ // 'import/extensions': ['error', 'ignorePackages'],
237
+ // 'import/order': ['error', {
238
+ // groups: ['builtin', 'external', ['parent', 'sibling']],
239
+ // }]
239
240
  };
@@ -21,7 +21,7 @@ export class ESLintCommand implements CliCommandShape {
21
21
  /** Should we attempt to fix? */
22
22
  fix?: boolean;
23
23
 
24
- preMain(): void {
24
+ finalize(): void {
25
25
  Env.DEBUG.set(false);
26
26
  }
27
27