mirror of
https://github.com/upstash/context7.git
synced 2025-06-26 23:50:04 +00:00
38 lines
1.0 KiB
JavaScript
38 lines
1.0 KiB
JavaScript
import tseslint from "typescript-eslint";
|
|
import eslintPluginPrettier from "eslint-plugin-prettier";
|
|
|
|
export default tseslint.config({
|
|
// Base ESLint configuration
|
|
ignores: ["node_modules/**", "build/**", "dist/**", ".git/**", ".github/**"],
|
|
languageOptions: {
|
|
ecmaVersion: 2020,
|
|
sourceType: "module",
|
|
parser: tseslint.parser,
|
|
parserOptions: {},
|
|
globals: {
|
|
// Add Node.js globals
|
|
process: "readonly",
|
|
require: "readonly",
|
|
module: "writable",
|
|
console: "readonly",
|
|
},
|
|
},
|
|
// Settings for all files
|
|
linterOptions: {
|
|
reportUnusedDisableDirectives: true,
|
|
},
|
|
// Apply ESLint recommended rules
|
|
extends: [tseslint.configs.recommended],
|
|
plugins: {
|
|
prettier: eslintPluginPrettier,
|
|
},
|
|
rules: {
|
|
// TypeScript rules
|
|
"@typescript-eslint/explicit-module-boundary-types": "off",
|
|
"@typescript-eslint/no-unused-vars": ["error", { argsIgnorePattern: "^_" }],
|
|
"@typescript-eslint/no-explicit-any": "warn",
|
|
// Prettier integration
|
|
"prettier/prettier": "error",
|
|
},
|
|
});
|