Skip to content

Commit

Permalink
config updated
Browse files Browse the repository at this point in the history
  • Loading branch information
CodyCodes95 committed Jul 15, 2024
1 parent 2800b4c commit d3d073c
Show file tree
Hide file tree
Showing 3 changed files with 84 additions and 4 deletions.
58 changes: 58 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
const { resolve } = require("node:path");

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

/** @type {import("eslint").Linter.Config} */
module.exports = {
extends: [
"prettier",
"plugin:@typescript-eslint/recommended-type-checked",
"plugin:@typescript-eslint/stylistic-type-checked",
],
plugins: ["@typescript-eslint"],
rules: {
"@typescript-eslint/array-type": "off",
"@typescript-eslint/consistent-type-definitions": "off",
"turbo/no-undeclared-env-vars": "off",
"@typescript-eslint/consistent-type-imports": [
"warn",
{
prefer: "type-imports",
fixStyle: "inline-type-imports",
},
],
"@typescript-eslint/no-unused-vars": [
"warn",
{
argsIgnorePattern: "^_",
},
],
"@typescript-eslint/no-explicit-any": "warn",
"@typescript-eslint/require-await": "off",
"@typescript-eslint/no-misused-promises": [
"error",
{
checksVoidReturn: {
attributes: false,
},
},
],
},
env: {
node: true,
},
settings: {
"import/resolver": {
typescript: {
project,
},
},
},
ignorePatterns: [
// Ignore dotfiles
".*.js",
"node_modules/",
"*.d.ts",
],
overrides: [{ files: ["*.js?(x)", "*.ts?(x)"] }],
};
27 changes: 24 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,31 @@
{
"name": "clicksend-sdk",
"module": "index.ts",
"name": "@codythatsme/clicksend-sdk",
"module": "src/index.ts",
"type": "module",
"scripts": {
"dev": "vite",
"bump": "npm version patch --no-git-tag-version",
"prebuild": "npm run bump",
"build": "tsc --p ./tsconfig-build.json && vite build",
"lint": "eslint src --ext .ts,.tsx",
"format": "prettier --write src",
"publish": "npm publish --access public"
},
"main": "dist/index.js",
"files": [
"dist"
],
"devDependencies": {
"@types/bun": "latest",
"prettier": "^3.2.5"
"@types/eslint": "^8.56.2",
"@types/node": "^20.8.3",
"@typescript-eslint/parser": "^7.1.0",
"@typescript-eslint/eslint-plugin": "^7.1.0",
"eslint": "^8",
"vite": "^5.3.3",
"vite-plugin-dts": "^3.5.1",
"glob": "^10.3.10",
"prettier": "^3.0.3"
},
"peerDependencies": {
"typescript": "^5.0.0"
Expand Down
3 changes: 2 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
// Some stricter flags (disabled by default)
"noUnusedLocals": false,
"noUnusedParameters": false,
"noPropertyAccessFromIndexSignature": false
"noPropertyAccessFromIndexSignature": false,
"noUncheckedIndexedAccess": false
}
}

0 comments on commit d3d073c

Please sign in to comment.