Skip to content

Commit

Permalink
feat: adds husky and clans up npm packages (#4)
Browse files Browse the repository at this point in the history
Co-authored-by: Fabboy <67000409+Fabbboy@users.noreply.github.com>
  • Loading branch information
OnlyNico43 and Fabbboy authored Apr 4, 2024
1 parent 637d477 commit 95185a6
Show file tree
Hide file tree
Showing 6 changed files with 3,229 additions and 6,059 deletions.
25 changes: 0 additions & 25 deletions .eslintrc.js

This file was deleted.

59 changes: 59 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
{
"root": true,
"env": {
"node": true,
"es6": true
},
"ignorePatterns": ["coverage/**", "dist/**", "scripts/**", "**/*.sh"],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:prettier/recommended"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "./tsconfig.json",
"tsconfigRootDir": "./"
},
"plugins": ["@typescript-eslint", "prettier", "unused-imports"],
"rules": {
"unused-imports/no-unused-imports": "error",
"@typescript-eslint/explicit-function-return-type": [
"error",
{
"allowExpressions": true,
"allowConciseArrowFunctionExpressionsStartingWithVoid": true
}
],
"prettier/prettier": ["error", {}, { "usePrettierrc": true }],
"require-await": ["error"],
"no-return-await": ["error"],
"@typescript-eslint/no-floating-promises": ["error"],
"@typescript-eslint/no-shadow": ["error"],
"max-len": [
"error",
{
"code": 150,
"tabWidth": 2,
"ignoreComments": true,
"ignoreUrls": true,
"ignoreStrings": true,
"ignoreTemplateLiterals": true,
"ignoreRegExpLiterals": true
}
]
},
"overrides": [
{
"files": ["*.spec.ts"],
"env": {}
},
{
"files": ["test/**/*.js"],
"rules": {
"@typescript-eslint/explicit-function-return-type": "off"
}
}
]
}
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
npm run precommit
4 changes: 4 additions & 0 deletions .lintstagedrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module.exports = {
'**/*.{ts,tsx}': 'eslint',
'**/*.ts?(x)': () => 'tsc --noEmit',
};
Loading

0 comments on commit 95185a6

Please sign in to comment.