Skip to content

Commit

Permalink
infra: prepare packages for publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
ElRodrigote committed May 29, 2024
1 parent 1bfd423 commit 90c83a0
Show file tree
Hide file tree
Showing 9 changed files with 107 additions and 10 deletions.
38 changes: 38 additions & 0 deletions packages/eslint-config/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# Dependencies
node_modules
.pnp
.pnp.js

# Local env files
.env
.env.local
.env.development.local
.env.test.local
.env.production.local

# Testing
coverage

# Turbo
.turbo

# Vercel
.vercel

# Build Outputs
.next/
out/
build
dist


# Debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Misc
.DS_Store
*.pem
5 changes: 5 additions & 0 deletions packages/eslint-config/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import library from "./library";
import next from "./next";
import reactInternal from "./react-internal";

export { library, next, reactInternal };
2 changes: 1 addition & 1 deletion packages/eslint-config/library.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const { resolve } = require("node:path");
const project = resolve(process.cwd(), "tsconfig.json");

/** @type {import("eslint").Linter.Config} */
module.exports = {
export default library = {
extends: ["eslint:recommended", "prettier", "eslint-config-turbo"],
plugins: ["only-warn"],
globals: {
Expand Down
4 changes: 2 additions & 2 deletions packages/eslint-config/next.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ const { resolve } = require("node:path");
const project = resolve(process.cwd(), "tsconfig.json");

/** @type {import("eslint").Linter.Config} */
module.exports = {
export default next = {
extends: [
"eslint:recommended",
"prettier",
require.resolve("@vercel/style-guide/eslint/next"),
resolve("@vercel/style-guide/eslint/next"),
"eslint-config-turbo",
],
globals: {
Expand Down
15 changes: 11 additions & 4 deletions packages/eslint-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,26 @@
"name": "@swapr-configs/eslint-config",
"version": "0.0.0",
"license": "ISC",
"main": "./dist/index.js",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"files": [
"library.js",
"next.js",
"react-internal.js"
],
"scripts": {
"build": "tsup index.ts --format cjs,esm --dts",
"clean": "npx rimraf dist && npx rimraf .turbo"
},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^7.1.0",
"@typescript-eslint/parser": "^7.1.0",
"@vercel/style-guide": "^5.2.0",
"eslint": "^9.2.0",
"eslint-config-turbo": "^1.12.4",
"eslint": "^9.3.0",
"eslint-config-prettier": "^9.1.0",
"eslint-config-turbo": "^1.12.4",
"eslint-plugin-only-warn": "^1.1.0",
"@typescript-eslint/parser": "^7.1.0",
"@typescript-eslint/eslint-plugin": "^7.1.0",
"typescript": "^5.3.3"
}
}
2 changes: 1 addition & 1 deletion packages/eslint-config/react-internal.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const project = resolve(process.cwd(), "tsconfig.json");
*/

/** @type {import("eslint").Linter.Config} */
module.exports = {
export default reactInternal = {
extends: ["eslint:recommended", "prettier", "eslint-config-turbo"],
plugins: ["only-warn"],
globals: {
Expand Down
38 changes: 38 additions & 0 deletions packages/typescript-config/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# Dependencies
node_modules
.pnp
.pnp.js

# Local env files
.env
.env.local
.env.development.local
.env.test.local
.env.production.local

# Testing
coverage

# Turbo
.turbo

# Vercel
.vercel

# Build Outputs
.next/
out/
build
dist


# Debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Misc
.DS_Store
*.pem
5 changes: 5 additions & 0 deletions packages/typescript-config/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import base from "./base.json";
import nextjs from "./nextjs.json";
import reactLibrary from "./react-library.json";

export { base, nextjs, reactLibrary };
8 changes: 6 additions & 2 deletions packages/typescript-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@
"name": "@swapr-configs/typescript-config",
"version": "0.0.0",
"license": "ISC",
"publishConfig": {
"access": "public"
"main": "./dist/index.js",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"scripts": {
"build": "tsup index.ts --format cjs,esm --dts",
"clean": "npx rimraf dist && npx rimraf .turbo"
}
}

0 comments on commit 90c83a0

Please sign in to comment.