Skip to content

Commit

Permalink
Merge pull request #58 from react18-tools/fix-eslint
Browse files Browse the repository at this point in the history
Fix eslint
  • Loading branch information
mayank1513 authored Dec 18, 2024
2 parents 969d5b0 + fc71228 commit 15fa3a7
Show file tree
Hide file tree
Showing 37 changed files with 360 additions and 2,502 deletions.
8 changes: 0 additions & 8 deletions examples/express/.eslintrc.js

This file was deleted.

4 changes: 4 additions & 0 deletions examples/express/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import { config } from "@repo/eslint-config/base.js";

/** @type {import("eslint").Linter.Config} */
export default config;
1 change: 1 addition & 0 deletions examples/express/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"clean": "rm -rf dist",
"typecheck": "tsc --noEmit",
"lint": "eslint src/",
"lint:fix": "eslint src/ --fix",
"test": "jest --detectOpenHandles"
},
"jest": {
Expand Down
8 changes: 0 additions & 8 deletions examples/nextjs/.eslintrc.js

This file was deleted.

4 changes: 4 additions & 0 deletions examples/nextjs/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import { nextJsConfig } from "@repo/eslint-config/next.js";

/** @type {import("eslint").Linter.Config} */
export default nextJsConfig;
1 change: 1 addition & 0 deletions examples/nextjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"clean": "rm -rf .next",
"dev": "next dev -p 3002",
"lint": "next lint",
"lint:fix": "next lint --fix",
"typecheck": "tsc --noEmit",
"start": "next start"
},
Expand Down
8 changes: 0 additions & 8 deletions examples/remix/.eslintrc.js

This file was deleted.

4 changes: 4 additions & 0 deletions examples/remix/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import { config } from "@repo/eslint-config/react.js";

/** @type {import("eslint").Linter.Config} */
export default config;
3 changes: 2 additions & 1 deletion examples/remix/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"build": "remix build",
"dev": "remix dev",
"typecheck": "tsc --noEmit",
"lint": "eslint app/"
"lint": "eslint app/",
"lint:fix": "eslint app/ --fix"
},
"dependencies": {
"@remix-run/node": "^2.15.1",
Expand Down
8 changes: 0 additions & 8 deletions examples/vite/.eslintrc.js

This file was deleted.

4 changes: 4 additions & 0 deletions examples/vite/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import { config } from "@repo/eslint-config/react.js";

/** @type {import("eslint").Linter.Config} */
export default config;
3 changes: 2 additions & 1 deletion examples/vite/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"clean": "rm -rf dist",
"dev": "vite --host 0.0.0.0 --port 3001 --clearScreen false",
"typecheck": "tsc --noEmit",
"lint": "eslint src/"
"lint": "eslint src/",
"lint:fix": "eslint src/ --fix"
},
"dependencies": {
"@repo/shared": "workspace:*",
Expand Down
8 changes: 0 additions & 8 deletions lib/.eslintrc.js

This file was deleted.

4 changes: 4 additions & 0 deletions lib/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import { config } from "@repo/eslint-config/react.js";

/** @type {import("eslint").Linter.Config} */
export default config;
1 change: 1 addition & 0 deletions lib/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"dev": "tsup --watch && tsc -p tsconfig-build.json -w",
"typecheck": "tsc --noEmit",
"lint": "eslint src/",
"lint:fix": "eslint src/ --fix",
"test": "vitest run --coverage"
},
"devDependencies": {
Expand Down
11 changes: 2 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"doc": "node scripts/doc.js && typedoc",
"format": "prettier --write \"**/*.{ts,tsx,md,css,scss}\"",
"lint": "turbo lint",
"lint:fix": "turbo lint:fix",
"test": "turbo test",
"typecheck": "turbo typecheck",
"preinstall": "node scripts/update-pm.js",
Expand All @@ -32,13 +33,5 @@
"packageManager": "[email protected]",
"engines": {
"node": ">=18"
},
"pnpm": {
"overrides": {
"eslint": "^8.0.0"
}
},
"overrides": {
"eslint": "^8.0.0"
}
}
}
34 changes: 0 additions & 34 deletions packages/config-eslint/index.js

This file was deleted.

43 changes: 0 additions & 43 deletions packages/config-eslint/next.js

This file was deleted.

13 changes: 0 additions & 13 deletions packages/config-eslint/package.json

This file was deleted.

39 changes: 0 additions & 39 deletions packages/config-eslint/react.js

This file was deleted.

43 changes: 0 additions & 43 deletions packages/config-eslint/remix.js

This file was deleted.

46 changes: 0 additions & 46 deletions packages/config-eslint/server.js

This file was deleted.

File renamed without changes.
32 changes: 32 additions & 0 deletions packages/eslint-config/base.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import js from "@eslint/js";
import eslintConfigPrettier from "eslint-config-prettier";
import turboPlugin from "eslint-plugin-turbo";
import tseslint from "typescript-eslint";
import onlyWarn from "eslint-plugin-only-warn";

/**
* A shared ESLint configuration for the repository.
*
* @type {import("eslint").Linter.Config}
* */
export const config = [
js.configs.recommended,
eslintConfigPrettier,
...tseslint.configs.recommended,
{
plugins: {
turbo: turboPlugin,
},
rules: {
"turbo/no-undeclared-env-vars": "warn",
},
},
{
plugins: {
onlyWarn,
},
},
{
ignores: ["dist/**"],
},
];
Loading

0 comments on commit 15fa3a7

Please sign in to comment.