Skip to content

Commit

Permalink
style: adding linting for basis to collab
Browse files Browse the repository at this point in the history
  • Loading branch information
HinsonSIDAN committed Oct 6, 2023
1 parent 023c667 commit 2e720d4
Show file tree
Hide file tree
Showing 43 changed files with 13,089 additions and 8,782 deletions.
43 changes: 43 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"env": {
"es2021": true,
"node": true
},
"extends": [
"airbnb-base",
"eslint:recommended",
"plugin:import/errors",
"plugin:import/warnings",
"plugin:import/typescript",
"plugin:@typescript-eslint/recommended",
"prettier"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 12,
"sourceType": "module"
},
"plugins": ["@typescript-eslint/eslint-plugin", "prettier"],
"rules": {
"import/prefer-default-export": "off",
"@typescript-eslint/no-inferrable-types": "off",
"import/extensions": "off",
"camelcase": "off",
"prettier/prettier": 0,
"no-console": "off",
"class-methods-use-this": "off",
"prefer-regex-literals": "warn",
"no-control-regex": "warn",
"no-use-before-define": "warn",
"no-param-reassign": "warn",
"max-classes-per-file": "warn",
"no-useless-constructor": "off"
},
"settings": {
"import/resolver": {
"typescript": {
"alwaysTryTypes": true
}
}
}
}
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx --no -- commitlint --edit
5 changes: 5 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx lint-staged
yarn lint
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
coverage
7 changes: 7 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"singleQuote": true,
"trailingComma": "all",
"tabWidth": 4,
"semi": true,
"printWidth": 120
}
1 change: 1 addition & 0 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = { extends: ['@commitlint/config-conventional'] };
28 changes: 24 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@
"scripts": {
"build": "tsup src/index.ts --format cjs,esm --dts",
"release": "pnpm run build && changeset publish",
"lint": "tsc",
"lint": "yarn prettier '*/**/*.ts' --write && yarn eslint '*/**/*.ts' --fix",
"test": "pnpm test",
"clean": "rm -rf dist && rm -rf node_modules && rm -f package-lock.json"
"clean": "rm -rf dist && rm -rf node_modules && rm -f package-lock.json",
"prepare": "husky install"
},
"keywords": [
"typescript",
Expand All @@ -22,11 +23,30 @@
"author": "gomaestro.org",
"license": "Apache-2.0",
"devDependencies": {
"@commitlint/cli": "^17.4.3",
"@commitlint/config-conventional": "^17.4.3",
"@typescript-eslint/eslint-plugin": "^5.59.1",
"@typescript-eslint/parser": "^5.59.1",
"commitlint": "^17.4.3",
"@changesets/cli": "^2.26.2",
"tsup": "^7.2.0",
"typescript": "^5.2.2"
"typescript": "^5.2.2",
"eslint": "^8.39.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-config-prettier": "^8.8.0",
"eslint-import-resolver-typescript": "^3.6.0",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-prettier": "^4.2.1",
"husky": "^8.0.3",
"prettier": "^2.8.8"
},
"dependencies": {
"axios": "^1.5.0"
},
"lint-staged": {
"**/*.{js,ts,}": [
"yarn prettier --write",
"yarn eslint --fix"
]
}
}
}
Loading

0 comments on commit 2e720d4

Please sign in to comment.