From d5e2973dce617f451e4eb07491b3a6874ea6ca47 Mon Sep 17 00:00:00 2001 From: xuatz Date: Sun, 22 Jun 2025 20:29:30 +0900 Subject: chore: migrate away from eslint to oxlint (#1642) * chore: migrate away from eslint to oxlint * revert turbo task name lint * it seems like we can remove the seemingly default globals --- tooling/eslint/base.js | 45 -------------------------------------------- tooling/eslint/nextjs.js | 10 ---------- tooling/eslint/package.json | 42 ----------------------------------------- tooling/eslint/react.js | 27 -------------------------- tooling/eslint/tsconfig.json | 8 -------- 5 files changed, 132 deletions(-) delete mode 100644 tooling/eslint/base.js delete mode 100644 tooling/eslint/nextjs.js delete mode 100644 tooling/eslint/package.json delete mode 100644 tooling/eslint/react.js delete mode 100644 tooling/eslint/tsconfig.json (limited to 'tooling/eslint') diff --git a/tooling/eslint/base.js b/tooling/eslint/base.js deleted file mode 100644 index 4aa34798..00000000 --- a/tooling/eslint/base.js +++ /dev/null @@ -1,45 +0,0 @@ -/** @type {import("eslint").Linter.Config} */ -const config = { - extends: [ - "turbo", - "eslint:recommended", - "plugin:@typescript-eslint/recommended-type-checked", - "plugin:@typescript-eslint/stylistic-type-checked", - ], - env: { - es2022: true, - node: true, - }, - parser: "@typescript-eslint/parser", - parserOptions: { project: true }, - plugins: ["@typescript-eslint", "import"], - rules: { - "turbo/no-undeclared-env-vars": "off", - "@typescript-eslint/no-unused-vars": [ - "error", - { argsIgnorePattern: "^_", varsIgnorePattern: "^_" }, - ], - "@typescript-eslint/consistent-type-imports": "off", - "@typescript-eslint/no-misused-promises": [ - 2, - { checksVoidReturn: { attributes: false } }, - ], - "import/consistent-type-specifier-style": ["error", "prefer-top-level"], - "@typescript-eslint/no-floating-promises": "off", - "@typescript-eslint/unbound-method": "off", - "@typescript-eslint/restrict-template-expressions": "off", - "@typescript-eslint/prefer-optional-chain": "off", - }, - ignorePatterns: [ - "**/*.config.js", - "**/*.config.cjs", - "**/.eslintrc.cjs", - ".next", - "dist", - "build", - "pnpm-lock.yaml", - ], - reportUnusedDisableDirectives: true, -}; - -module.exports = config; diff --git a/tooling/eslint/nextjs.js b/tooling/eslint/nextjs.js deleted file mode 100644 index 169993e3..00000000 --- a/tooling/eslint/nextjs.js +++ /dev/null @@ -1,10 +0,0 @@ -/** @type {import('eslint').Linter.Config} */ -const config = { - extends: ["plugin:@next/next/core-web-vitals"], - rules: { - "@next/next/no-html-link-for-pages": "off", - "@typescript-eslint/require-await": "off", - }, -}; - -module.exports = config; diff --git a/tooling/eslint/package.json b/tooling/eslint/package.json deleted file mode 100644 index 102e6bdd..00000000 --- a/tooling/eslint/package.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "name": "@karakeep/eslint-config", - "version": "0.2.0", - "private": true, - "license": "MIT", - "files": [ - "./base.js", - "./nextjs.js", - "./react.js" - ], - "scripts": { - "clean": "rm -rf .turbo node_modules", - "format": "prettier --check . --ignore-path ../../.gitignore", - "lint": "eslint .", - "typecheck": "tsc --noEmit" - }, - "dependencies": { - "@next/eslint-plugin-next": "^14.1.1", - "@typescript-eslint/eslint-plugin": "~8.30.0", - "@typescript-eslint/parser": "~8.30.0", - "eslint-config-turbo": "^2.0.9", - "eslint-plugin-import": "^2.29.1", - "eslint-plugin-jsx-a11y": "^6.8.0", - "eslint-plugin-react": "^7.33.2", - "eslint-plugin-react-hooks": "^4.6.0" - }, - "devDependencies": { - "@karakeep/prettier-config": "workspace:^0.1.0", - "@karakeep/tsconfig": "workspace:^0.1.0", - "@types/eslint": "^8.56.5", - "eslint": "^8.57.0", - "prettier": "^3.4.2", - "typescript": "^5.7.3" - }, - "eslintConfig": { - "root": true, - "extends": [ - "./base.js" - ] - }, - "prettier": "@karakeep/prettier-config" -} diff --git a/tooling/eslint/react.js b/tooling/eslint/react.js deleted file mode 100644 index 38b735b9..00000000 --- a/tooling/eslint/react.js +++ /dev/null @@ -1,27 +0,0 @@ -/** @type {import('eslint').Linter.Config} */ -const config = { - extends: [ - "plugin:react/recommended", - "plugin:react-hooks/recommended", - "plugin:jsx-a11y/recommended", - ], - rules: { - "react/prop-types": "off", - "jsx-a11y/no-autofocus": "off", - "jsx-a11y/label-has-associated-control": "off", - "react-hooks/exhaustive-deps": "off", - }, - globals: { - React: "writable", - }, - settings: { - react: { - version: "detect", - }, - }, - env: { - browser: true, - }, -}; - -module.exports = config; diff --git a/tooling/eslint/tsconfig.json b/tooling/eslint/tsconfig.json deleted file mode 100644 index 25ea271f..00000000 --- a/tooling/eslint/tsconfig.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "extends": "@karakeep/tsconfig/base.json", - "compilerOptions": { - "tsBuildInfoFile": "node_modules/.cache/tsbuildinfo.json" - }, - "include": ["."], - "exclude": ["node_modules"] -} -- cgit v1.2.3-70-g09d2