Skip to content

Commit

Permalink
chore: Update ESLint configuration and dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
ozhanefemeral committed Jul 24, 2024
1 parent 60dbae1 commit 9292f55
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 5 deletions.
21 changes: 20 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,32 @@
const { resolve } = require("node:path");

const project = resolve(process.cwd(), "tsconfig.json");

/** @type {import("eslint").Linter.Config} */
module.exports = {
root: true,
extends: ["@repo/eslint-config/library.js"],
extends: ["eslint:recommended", "prettier"],
plugins: ["only-warn", "@typescript-eslint"],
parser: "@typescript-eslint/parser",
parserOptions: {
project: "./tsconfig.json",
tsconfigRootDir: __dirname,
},
env: {
node: true,
},
settings: {
"import/resolver": {
typescript: {
project,
},
},
},
ignorePatterns: [".*.js", "node_modules/", "dist/"],
overrides: [
{
files: ["*.js?(x)", "*.ts?(x)"],
},
{
files: ["**/*.test.ts", "**/*.test.tsx"],
env: {
Expand Down
Binary file added bun.lockb
Binary file not shown.
8 changes: 6 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"types": "dist/index.d.ts",
"scripts": {
"build": "tsup src/index.ts --format cjs,esm --dts --minify --clean",
"lint": "eslint src/**/*.ts",
"lint": "eslint .",
"test": "jest",
"changeset": "changeset",
"version-packages": "changeset version",
Expand All @@ -17,9 +17,13 @@
"@changesets/cli": "^2.27.7",
"@jest/types": "^29.6.3",
"@types/jest": "^29.5.12",
"tsup": "^8.1.2",
"@typescript-eslint/eslint-plugin": "^7.17.0",
"@typescript-eslint/parser": "^7.17.0",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-only-warn": "^1.1.0",
"jest": "^29.7.0",
"tsup": "^8.1.2",
"typescript": "^5.5.3"
},
"peerDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@
"*": ["node_modules/*", "src/*"]
}
},
"include": ["src/**/*"],
"exclude": ["node_modules", "**/*.spec.ts", "**/*.test.ts"]
"include": ["src/**/*", "jest.config.ts"],
"exclude": ["node_modules"]
}

0 comments on commit 9292f55

Please sign in to comment.