Update AGENTS.md. Start fixing old weird errors
This commit is contained in:
@@ -2,10 +2,15 @@ import * as path from 'node:path';
|
||||
import { includeIgnoreFile } from '@eslint/compat';
|
||||
import eslint from '@eslint/js';
|
||||
import importPlugin from 'eslint-plugin-import';
|
||||
// eslint-plugin-prefer-arrow-functions doesn't ship flat config types — cast needed
|
||||
import preferArrowFunctions from 'eslint-plugin-prefer-arrow-functions';
|
||||
import turboPlugin from 'eslint-plugin-turbo';
|
||||
import { defineConfig } from 'eslint/config';
|
||||
import tseslint from 'typescript-eslint';
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
const preferArrowPlugin = preferArrowFunctions as any;
|
||||
|
||||
/**
|
||||
* All packages that leverage t3-env should use this rule
|
||||
*/
|
||||
@@ -45,6 +50,7 @@ export const baseConfig = defineConfig(
|
||||
plugins: {
|
||||
import: importPlugin,
|
||||
turbo: turboPlugin,
|
||||
'prefer-arrow-functions': preferArrowPlugin,
|
||||
},
|
||||
extends: [
|
||||
eslint.configs.recommended,
|
||||
@@ -58,10 +64,6 @@ export const baseConfig = defineConfig(
|
||||
'warn',
|
||||
{ argsIgnorePattern: '^_', varsIgnorePattern: '^_' },
|
||||
],
|
||||
'@typescript-eslint/consistent-type-imports': [
|
||||
'warn',
|
||||
{ prefer: 'type-imports', fixStyle: 'inline-type-imports' },
|
||||
],
|
||||
'@typescript-eslint/no-misused-promises': [
|
||||
2,
|
||||
{ checksVoidReturn: { attributes: false } },
|
||||
@@ -73,7 +75,17 @@ export const baseConfig = defineConfig(
|
||||
},
|
||||
],
|
||||
'@typescript-eslint/no-non-null-assertion': 'error',
|
||||
'import/consistent-type-specifier-style': ['error', 'prefer-top-level'],
|
||||
'@typescript-eslint/consistent-type-definitions': 'off',
|
||||
'prefer-arrow-functions/prefer-arrow-functions': [
|
||||
'warn',
|
||||
{
|
||||
allowNamedFunctions: false,
|
||||
classPropertiesAllowed: false,
|
||||
disallowPrototype: false,
|
||||
returnStyle: 'unchanged',
|
||||
singleReturnOnly: false,
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user