b1c454f779
- Upgrade eslint from v8 to v9.18.0 - Migrate from .eslintrc.js to eslint.config.mjs (flat config) - Upgrade typescript-eslint to v8.20.0 (unified package) - Replace eslint-plugin-import with eslint-plugin-import-x for flat config support - Add globals package for environment globals - Update eslint-plugin-bsky-internal with proper meta objects for ESLint v9 - Fix deprecated context.getScope() API usage - Update bskyembed to use flat config - Remove deprecated --ext flag from lint scripts - Configure rules to maintain previous behavior while using new ESLint version
53 lines
1.2 KiB
JavaScript
53 lines
1.2 KiB
JavaScript
// @ts-check
|
|
import js from '@eslint/js'
|
|
import tseslint from 'typescript-eslint'
|
|
import simpleImportSort from 'eslint-plugin-simple-import-sort'
|
|
import globals from 'globals'
|
|
|
|
export default tseslint.config(
|
|
// Global ignores
|
|
{
|
|
ignores: ['dist/**', 'node_modules/**'],
|
|
},
|
|
|
|
// Base JS recommended rules
|
|
js.configs.recommended,
|
|
|
|
// TypeScript rules with type checking
|
|
...tseslint.configs.recommendedTypeChecked,
|
|
|
|
// Main configuration
|
|
{
|
|
files: ['**/*.{js,jsx,ts,tsx}'],
|
|
plugins: {
|
|
'simple-import-sort': simpleImportSort,
|
|
},
|
|
languageOptions: {
|
|
ecmaVersion: 'latest',
|
|
sourceType: 'module',
|
|
globals: {
|
|
...globals.browser,
|
|
},
|
|
parserOptions: {
|
|
projectService: true,
|
|
tsconfigRootDir: import.meta.dirname,
|
|
},
|
|
},
|
|
rules: {
|
|
'simple-import-sort/imports': 'warn',
|
|
'simple-import-sort/exports': 'warn',
|
|
'no-else-return': 'off',
|
|
'@typescript-eslint/no-require-imports': 'off',
|
|
'@typescript-eslint/no-unused-vars': [
|
|
'error',
|
|
{
|
|
argsIgnorePattern: '^_',
|
|
varsIgnorePattern: '^_',
|
|
caughtErrors: 'none',
|
|
ignoreRestSiblings: true,
|
|
},
|
|
],
|
|
},
|
|
},
|
|
)
|