From 9c2a87616026e36542ee6cb18584cc747ef3099d Mon Sep 17 00:00:00 2001 From: Matt Strapp Date: Fri, 20 Sep 2024 08:54:29 -0500 Subject: Move node packages to src/ At least pretend to make it clean Signed-off-by: Matt Strapp --- src/packages/eslint-config/README.md | 3 +++ src/packages/eslint-config/library.js | 34 +++++++++++++++++++++++++++++++++ src/packages/eslint-config/package.json | 17 +++++++++++++++++ 3 files changed, 54 insertions(+) create mode 100644 src/packages/eslint-config/README.md create mode 100644 src/packages/eslint-config/library.js create mode 100644 src/packages/eslint-config/package.json (limited to 'src/packages/eslint-config') diff --git a/src/packages/eslint-config/README.md b/src/packages/eslint-config/README.md new file mode 100644 index 0000000..8b42d90 --- /dev/null +++ b/src/packages/eslint-config/README.md @@ -0,0 +1,3 @@ +# `@turbo/eslint-config` + +Collection of internal eslint configurations. diff --git a/src/packages/eslint-config/library.js b/src/packages/eslint-config/library.js new file mode 100644 index 0000000..9b59cc0 --- /dev/null +++ b/src/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/src/packages/eslint-config/package.json b/src/packages/eslint-config/package.json new file mode 100644 index 0000000..395c345 --- /dev/null +++ b/src/packages/eslint-config/package.json @@ -0,0 +1,17 @@ +{ + "name": "@repo/eslint-config", + "version": "0.0.0", + "devDependencies": { + "@typescript-eslint/eslint-plugin": "8.6.0", + "@typescript-eslint/parser": "8.6.0", + "@vercel/style-guide": "6.0.0", + "eslint-config-prettier": "^9.1.0", + "eslint-config-turbo": "^2.1.2", + "eslint-plugin-only-warn": "^1.1.0", + "typescript": "^5.6.2" + }, + "files": [ + "library.js" + ], + "private": true +} -- cgit v1.2.3