mirror of
https://github.com/linsa-io/linsa.git
synced 2026-01-11 11:50:25 +01:00
49 lines
1.1 KiB
JavaScript
49 lines
1.1 KiB
JavaScript
import js from "@eslint/js"
|
|
import tseslint from "@typescript-eslint/eslint-plugin"
|
|
import tsparser from "@typescript-eslint/parser"
|
|
import globals from "globals"
|
|
|
|
export default [
|
|
js.configs.recommended,
|
|
{
|
|
files: ["**/*.{js,mjs,cjs,ts,tsx}"],
|
|
languageOptions: {
|
|
parser: tsparser,
|
|
parserOptions: {
|
|
ecmaVersion: 2021,
|
|
sourceType: "module",
|
|
ecmaFeatures: {
|
|
jsx: true,
|
|
},
|
|
},
|
|
globals: {
|
|
...globals.browser,
|
|
...globals.node,
|
|
...globals.es2021,
|
|
},
|
|
},
|
|
plugins: {
|
|
"@typescript-eslint": tseslint,
|
|
},
|
|
rules: {
|
|
...tseslint.configs.recommended.rules,
|
|
"@typescript-eslint/no-unused-vars": [
|
|
"warn",
|
|
{ argsIgnorePattern: "^_" },
|
|
],
|
|
"@typescript-eslint/no-explicit-any": "warn",
|
|
// Disable no-undef for TypeScript files as TypeScript handles this
|
|
"no-undef": "off",
|
|
},
|
|
},
|
|
{
|
|
ignores: [
|
|
"**/node_modules/**",
|
|
"**/dist/**",
|
|
"**/.wrangler/**",
|
|
"**/out/**",
|
|
"**/build/**",
|
|
],
|
|
},
|
|
]
|