aboutsummaryrefslogtreecommitdiffstats
path: root/packages/eslint-config
diff options
context:
space:
mode:
authorMatt Strapp <matt@mattstrapp.net>2024-08-09 09:05:18 -0500
committerMatt Strapp <matt@mattstrapp.net>2024-08-09 09:05:18 -0500
commitf7e13f5917e176fd44a80479ab06eb61e34dd138 (patch)
treedc5ebed287c123b4e572371074ffcd59a8a76334 /packages/eslint-config
parentci: Rename things better (diff)
downloadlocusts-f7e13f5917e176fd44a80479ab06eb61e34dd138.tar
locusts-f7e13f5917e176fd44a80479ab06eb61e34dd138.tar.gz
locusts-f7e13f5917e176fd44a80479ab06eb61e34dd138.tar.bz2
locusts-f7e13f5917e176fd44a80479ab06eb61e34dd138.tar.lz
locusts-f7e13f5917e176fd44a80479ab06eb61e34dd138.tar.xz
locusts-f7e13f5917e176fd44a80479ab06eb61e34dd138.tar.zst
locusts-f7e13f5917e176fd44a80479ab06eb61e34dd138.zip
feat: Add Node.js
Signed-off-by: Matt Strapp <matt@mattstrapp.net>
Diffstat (limited to '')
-rw-r--r--packages/eslint-config/README.md3
-rw-r--r--packages/eslint-config/library.js34
-rw-r--r--packages/eslint-config/package.json17
3 files changed, 54 insertions, 0 deletions
diff --git a/packages/eslint-config/README.md b/packages/eslint-config/README.md
new file mode 100644
index 0000000..8b42d90
--- /dev/null
+++ b/packages/eslint-config/README.md
@@ -0,0 +1,3 @@
+# `@turbo/eslint-config`
+
+Collection of internal eslint configurations.
diff --git a/packages/eslint-config/library.js b/packages/eslint-config/library.js
new file mode 100644
index 0000000..9b59cc0
--- /dev/null
+++ b/packages/eslint-config/library.js
@@ -0,0 +1,34 @@
+const { resolve } = require("node:path");
+
+const project = resolve(process.cwd(), "tsconfig.json");
+
+/** @type {import("eslint").Linter.Config} */
+module.exports = {
+ extends: ["eslint:recommended", "prettier", "turbo"],
+ plugins: ["only-warn"],
+ globals: {
+ React: true,
+ JSX: true,
+ },
+ env: {
+ node: true,
+ },
+ settings: {
+ "import/resolver": {
+ typescript: {
+ project,
+ },
+ },
+ },
+ ignorePatterns: [
+ // Ignore dotfiles
+ ".*.js",
+ "node_modules/",
+ "dist/",
+ ],
+ overrides: [
+ {
+ files: ["*.js?(x)", "*.ts?(x)"],
+ },
+ ],
+};
diff --git a/packages/eslint-config/package.json b/packages/eslint-config/package.json
new file mode 100644
index 0000000..d6a436a
--- /dev/null
+++ b/packages/eslint-config/package.json
@@ -0,0 +1,17 @@
+{
+ "name": "@repo/eslint-config",
+ "version": "0.0.0",
+ "devDependencies": {
+ "@typescript-eslint/eslint-plugin": "8.0.1",
+ "@typescript-eslint/parser": "8.0.1",
+ "@vercel/style-guide": "6.0.0",
+ "eslint-config-prettier": "^9.1.0",
+ "eslint-config-turbo": "^2.0.0",
+ "eslint-plugin-only-warn": "^1.1.0",
+ "typescript": "^5.4.5"
+ },
+ "files": [
+ "library.js"
+ ],
+ "private": true
+}