Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions eslint.config.mts
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
/* eslint-disable import/no-relative-packages */

import type { ConfigWithExtends } from "@eslint/config-helpers";
import eslintJs from "@eslint/js";
import prettierConfig from "eslint-config-prettier/flat";
import importPlugin from "eslint-plugin-import";
import mochaPlugin from "eslint-plugin-mocha";
import unicornPlugin from "eslint-plugin-unicorn";
import unusedImportsPlugin from "eslint-plugin-unused-imports";
import eslintTs, { type ConfigWithExtends } from "typescript-eslint";
import { defineConfig } from "eslint/config";
import tsEslint from "typescript-eslint";
import { commonConfig } from "./packages/common/eslint.config.mts";
import { cursorlessEngineConfig } from "./packages/cursorless-engine/eslint.config.mts";
import { cursorlessOrgConfig } from "./packages/cursorless-org/eslint.config.mts";
Expand Down Expand Up @@ -33,7 +37,7 @@ const rootConfig: ConfigWithExtends = {
},

languageOptions: {
parser: eslintTs.parser,
parser: tsEslint.parser,
ecmaVersion: 6,
sourceType: "module",
parserOptions: {
Expand Down Expand Up @@ -137,16 +141,15 @@ const disabledTypeCheckConfig: ConfigWithExtends = {
"**/*.js",
"**/*.mjs",
],

extends: [eslintTs.configs.disableTypeChecked],
extends: [tsEslint.configs.disableTypeChecked],
};

export default eslintTs.config(
export default defineConfig(
ignoresConfig,
eslintJs.configs.recommended,
// We want to enable this in the long run. For now there are a lot of errors that needs to be handled.
// eslintTs.configs.recommendedTypeChecked,
eslintTs.configs.recommended,
tsEslint.configs.recommended,
prettierConfig,
rootConfig,
tsxConfig,
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
"watch:tsc": "tsc --build --watch"
},
"devDependencies": {
"@eslint/config-helpers": "^0.5.0",
"@eslint/eslintrc": "^3.3.1",
"@eslint/js": "^9.39.1",
"@pnpm/meta-updater": "^2.0.6",
Expand Down
4 changes: 2 additions & 2 deletions packages/common/eslint.config.mts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { ConfigArray } from "typescript-eslint";
import type { ConfigWithExtendsArray } from "@eslint/config-helpers";

export const commonConfig: ConfigArray = [
export const commonConfig: ConfigWithExtendsArray = [
{
files: ["packages/common/**/*.ts"],

Expand Down
2 changes: 1 addition & 1 deletion packages/cursorless-cheatsheet/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"dependencies": {
"@cursorless/common": "workspace:*",
"@cursorless/node-common": "workspace:*",
"immer": "^10.2.0",
"immer": "^11.0.0",
"lodash-es": "^4.17.21",
"node-html-parser": "^7.0.1"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/cursorless-engine/eslint.config.mts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { ConfigWithExtends } from "typescript-eslint";
import type { ConfigWithExtends } from "@eslint/config-helpers";

export const cursorlessEngineConfig: ConfigWithExtends = {
files: ["packages/cursorless-engine/**/*.ts"],
Expand Down
2 changes: 1 addition & 1 deletion packages/cursorless-engine/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"@cursorless/common": "workspace:*",
"@cursorless/node-common": "workspace:*",
"@cursorless/sentence-parser": "workspace:*",
"immer": "^10.2.0",
"immer": "^11.0.0",
"immutability-helper": "^3.1.1",
"itertools": "^2.5.0",
"lodash-es": "^4.17.21",
Expand Down
2 changes: 1 addition & 1 deletion packages/cursorless-neovim-e2e/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"devDependencies": {
"@types/chai": "^5.2.3",
"@types/js-yaml": "^4.0.9",
"@types/lodash": "^4.17.20",
"@types/lodash": "^4.17.21",
"@types/sinon": "^21.0.0",
"neovim": "^5.4.0"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/cursorless-neovim/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"devDependencies": {
"@types/chai": "^5.2.3",
"@types/js-yaml": "^4.0.9",
"@types/lodash": "^4.17.20",
"@types/lodash": "^4.17.21",
"lodash": "^4.17.21",
"neovim": "^5.4.0",
"vscode-uri": "^3.1.0"
Expand Down
15 changes: 8 additions & 7 deletions packages/cursorless-org/eslint.config.mts
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
import { FlatCompat } from "@eslint/eslintrc";
import type { ConfigWithExtends } from "typescript-eslint";

const compat = new FlatCompat({
baseDirectory: import.meta.dirname,
});
import type { ConfigWithExtends } from "@eslint/config-helpers";
import nextVitals from "eslint-config-next/core-web-vitals";
import tsEslint from "typescript-eslint";

export const cursorlessOrgConfig: ConfigWithExtends = {
files: ["packages/cursorless-org/**/*"],

extends: [compat.extends("next/core-web-vitals")],
extends: nextVitals,

languageOptions: {
parser: tsEslint.parser,
},

settings: {
next: {
Expand Down
2 changes: 1 addition & 1 deletion packages/cursorless-org/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"@types/react": "^19.2.6",
"@types/react-dom": "^19.2.3",
"eslint": "^9.39.1",
"eslint-config-next": "^15.5.6",
"eslint-config-next": "^16.0.3",
"http-server": "^14.1.1",
"postcss": "^8.5.6",
"tailwindcss": "^4.1.17",
Expand Down
2 changes: 1 addition & 1 deletion packages/cursorless-tutorial/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"dependencies": {
"@cursorless/common": "workspace:*",
"@cursorless/cursorless-engine": "workspace:*",
"immer": "^10.2.0",
"immer": "^11.0.0",
"lodash-es": "^4.17.21"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/cursorless-vscode-e2e/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"@cursorless/common": "workspace:*",
"@cursorless/node-common": "workspace:*",
"@cursorless/vscode-common": "workspace:*",
"immer": "^10.2.0",
"immer": "^11.0.0",
"lodash-es": "^4.17.21"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/cursorless-vscode/eslint.config.mts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { ConfigWithExtends } from "typescript-eslint";
import type { ConfigWithExtends } from "@eslint/config-helpers";

export const cursorlessVscodeConfig: ConfigWithExtends = {
files: ["packages/cursorless-vscode/src/scripts/**/*.ts"],
Expand Down
2 changes: 1 addition & 1 deletion packages/neovim-common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"vscode-uri": "^3.1.0"
},
"devDependencies": {
"@types/lodash": "^4.17.20",
"@types/lodash": "^4.17.21",
"@types/vscode": "1.95.0"
}
}
Loading
Loading