Skip to content

Commit

Permalink
feat: add eslint expo configs
Browse files Browse the repository at this point in the history
  • Loading branch information
pavanjoshi914 committed Sep 26, 2024
1 parent fb3987d commit bbd4c4f
Show file tree
Hide file tree
Showing 5 changed files with 950 additions and 22 deletions.
15 changes: 15 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// https://docs.expo.dev/guides/using-eslint/
module.exports = {
extends: ["expo", "prettier"],
plugins: ["prettier"],
rules: {
"@typescript-eslint/ban-ts-comment": [
"error",
{
"ts-ignore": "allow-with-description",
},
],
"no-console": ["error", { allow: ["info", "warn", "error"] }],
"no-constant-binary-expression": "error",
},
};
3 changes: 0 additions & 3 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

yarn lint-staged
2 changes: 1 addition & 1 deletion .lintstagedrc.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"*.ts": "tsc --noEmit",
"*.{js,jsx,ts,tsx}": ["prettier --write"],
"*.{js,jsx,ts,tsx}": ["prettier --write", "eslint --fix --max-warnings 0"],
"*.{css,md,json}": ["prettier --write"]
}
7 changes: 6 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
"format": "prettier --check '**/*.{js,ts,tsx,md,json}'",
"format:fix": "prettier --loglevel silent --write '**/*.{js,ts,tsx,md,json}'",
"ts:check": "tsc",
"prepare": "husky"
"prepare": "husky",
"lint": "eslint ."
},
"dependencies": {
"@getalby/lightning-tools": "^5.0.3",
Expand Down Expand Up @@ -66,6 +67,10 @@
"devDependencies": {
"@babel/core": "^7.20.0",
"@types/react": "~18.2.45",
"eslint": "^8.57.0",
"eslint-config-expo": "^7.1.2",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.2.1",
"husky": "^9.1.6",
"lint-staged": "^15.2.10",
"prettier": "^3.3.3",
Expand Down
Loading

0 comments on commit bbd4c4f

Please sign in to comment.