diff options
author | Matt Strapp <matt@mattstrapp.net> | 2024-10-31 11:09:24 -0500 |
---|---|---|
committer | Matt Strapp <matt@mattstrapp.net> | 2024-10-31 11:09:24 -0500 |
commit | 406e9211f19ba67db5c792bd0a993e96abdb81f6 (patch) | |
tree | 9b217ea4837c3ffb97f69ebd58a7e6bd52582c97 /src | |
parent | js: Migrate to ESLint 9 (diff) | |
download | locusts-406e9211f19ba67db5c792bd0a993e96abdb81f6.tar locusts-406e9211f19ba67db5c792bd0a993e96abdb81f6.tar.gz locusts-406e9211f19ba67db5c792bd0a993e96abdb81f6.tar.bz2 locusts-406e9211f19ba67db5c792bd0a993e96abdb81f6.tar.lz locusts-406e9211f19ba67db5c792bd0a993e96abdb81f6.tar.xz locusts-406e9211f19ba67db5c792bd0a993e96abdb81f6.tar.zst locusts-406e9211f19ba67db5c792bd0a993e96abdb81f6.zip |
refactor: Update eslint configuration
Signed-off-by: Matt Strapp <matt@mattstrapp.net>
Diffstat (limited to 'src')
-rw-r--r-- | src/packages/eslint-config/eslint.library.config.js | 14 | ||||
-rw-r--r-- | src/packages/locusts/eslint.config.mjs | 7 | ||||
-rw-r--r-- | src/packages/locusts/package.json | 4 | ||||
-rw-r--r-- | src/packages/svelte/package.json | 5 |
4 files changed, 13 insertions, 17 deletions
diff --git a/src/packages/eslint-config/eslint.library.config.js b/src/packages/eslint-config/eslint.library.config.js index e3c7866..8154244 100644 --- a/src/packages/eslint-config/eslint.library.config.js +++ b/src/packages/eslint-config/eslint.library.config.js @@ -6,14 +6,9 @@ import ts from "typescript-eslint"; import prettier from "eslint-config-prettier"; import turboPlugin from "eslint-plugin-turbo"; -import { resolve } from "node:path"; - -const project = resolve(process.cwd(), "tsconfig.json"); - export default ts.config( eslint.configs.recommended, ...ts.configs.recommended, - prettier, { name: "eslint-config-turbo (recreated flat)", plugins: { @@ -26,14 +21,15 @@ export default ts.config( { name: "library", languageOptions: { - // parserOptions: { - // project: resolve(process.cwd(), "tsconfig.json") - // }, globals: { ...globals.browser, ...globals.node, + React: true, + JSX: true, + Svelte: true }, }, - ignores: ["build/", ".svelte-kit/", "dist/"], + ignores: ["**/build/", "**/.svelte-kit/", "**/dist/"], }, + prettier, ); diff --git a/src/packages/locusts/eslint.config.mjs b/src/packages/locusts/eslint.config.mjs index 1946c04..eab1d3a 100644 --- a/src/packages/locusts/eslint.config.mjs +++ b/src/packages/locusts/eslint.config.mjs @@ -2,4 +2,9 @@ import library from "@repo/eslint-config/eslint.library.config.js"; /** @type {import("eslint").Linter.Config[]} */ -export default [...library]; +export default [ + ...library, + { + ignores: ["dist/"], + }, +]; diff --git a/src/packages/locusts/package.json b/src/packages/locusts/package.json index 93bce80..4128954 100644 --- a/src/packages/locusts/package.json +++ b/src/packages/locusts/package.json @@ -5,13 +5,10 @@ "author": "Matt Strapp <matt+locusts@mattstrapp.net> (https://mattstrapp.net)", "bugs": "https://github.com/locusts-r-us/locusts/issues", "devDependencies": { - "@eslint/eslintrc": "^3.1.0", - "@eslint/js": "^9.13.0", "@repo/eslint-config": "workspace:*", "@repo/typescript-config": "workspace:*", "@types/node": "^22.8.4", "globals": "^15.0.0", - "prettier": "^3.3.2", "publint": "^0.2.0", "tsup": "^8.3.5", "tsx": "^4.19.2", @@ -34,6 +31,7 @@ }, "scripts": { "build": "tsup src/index.ts --format cjs,esm --dts && publint", + "clean": "rm -rf dist && rm -rf node_modules", "dev": "tsup src/index.ts --format cjs,esm --dts --watch", "lint": "prettier --check . && eslint .", "format": "prettier --write . && eslint --fix .", diff --git a/src/packages/svelte/package.json b/src/packages/svelte/package.json index 713a633..ac054c3 100644 --- a/src/packages/svelte/package.json +++ b/src/packages/svelte/package.json @@ -7,6 +7,7 @@ "scripts": { "dev": "vite dev", "build": "vite build && npm run package", + "clean": "rm -rf dist && rm -rf node_modules", "preview": "vite preview", "package": "svelte-kit sync && svelte-package && publint", "prepublishOnly": "npm run package", @@ -56,12 +57,8 @@ "@sveltejs/kit": "^2.0.0", "@sveltejs/package": "^2.0.0", "@sveltejs/vite-plugin-svelte": "^4.0.0", - "@types/eslint": "^9.6.0", - "eslint": "^9.7.0", "eslint-config-prettier": "^9.1.0", "eslint-plugin-svelte": "^2.36.0", - "globals": "^15.0.0", - "prettier": "^3.3.2", "prettier-plugin-svelte": "^3.2.6", "publint": "^0.2.0", "svelte": "^5.0.0", |