Skip to content

Commit

Permalink
Fix build issues.
Browse files Browse the repository at this point in the history
  • Loading branch information
mikecao committed Nov 22, 2021
1 parent cfa220c commit d4dd206
Show file tree
Hide file tree
Showing 9 changed files with 676 additions and 161 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"es2020": true,
"node": true
},
"extends": ["eslint:recommended", "plugin:react/recommended", "prettier"],
"extends": ["eslint:recommended", "plugin:react/recommended", "prettier", "next"],
"parserOptions": {
"ecmaFeatures": {
"jsx": true
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
.idea
*.iml
*.log
.vscode/*
/.vscode/

# debug
npm-debug.log*
Expand Down
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx lint-staged
2 changes: 1 addition & 1 deletion components/layout/Header.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import Bars from 'assets/bars.svg';
export default function Header() {
const user = useSelector(state => state.user);
const [active, setActive] = useState(false);
const { locale, dir } = useLocale();
const { dir } = useLocale();

function handleClick() {
setActive(state => !state);
Expand Down
2 changes: 1 addition & 1 deletion components/metrics/FilterTags.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export default function FilterTags({ params, onClick }) {
return null;
}
return (
<div className={styles.tag}>
<div key={key} className={styles.tag}>
<Button icon={<Times />} onClick={() => onClick(key)} variant="action" iconRight>
{`${key}: ${params[key]}`}
</Button>
Expand Down
2 changes: 1 addition & 1 deletion lib/queries.js
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ export function getSessionMetrics(website_id, start_at, end_at, field, filters =

export function getPageviewMetrics(website_id, start_at, end_at, field, table, filters = {}) {
const params = [website_id, start_at, end_at];
const { domain, url, ref } = filters;
const { domain, url } = filters;

let domainFilter = '';
let urlFilter = '';
Expand Down
3 changes: 3 additions & 0 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ module.exports = {
FORCE_SSL: !!process.env.FORCE_SSL,
},
basePath: process.env.BASE_PATH,
eslint: {
ignoreDuringBuilds: true,
},
webpack(config) {
config.module.rules.push({
test: /\.svg$/,
Expand Down
17 changes: 7 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "umami",
"version": "1.24.0",
"version": "1.24.1",
"description": "A simple, fast, website analytics alternative to Google Analytics. ",
"author": "Mike Cao <[email protected]>",
"license": "MIT",
Expand Down Expand Up @@ -35,7 +35,9 @@
"download-country-names": "node scripts/download-country-names.js",
"loadtest": "node scripts/loadtest.js",
"loadtest:medium": "node scripts/loadtest.js --weight=medium",
"loadtest:heavy": "node scripts/loadtest.js --weight=heavy --verbose"
"loadtest:heavy": "node scripts/loadtest.js --weight=heavy --verbose",
"lint": "next lint --quiet",
"prepare": "husky install"
},
"lint-staged": {
"**/*.js": [
Expand All @@ -50,11 +52,6 @@
"prettier --write"
]
},
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
},
"dependencies": {
"@fontsource/inter": "4.5.0",
"@prisma/client": "2.29.1",
Expand Down Expand Up @@ -107,14 +104,14 @@
"cross-env": "^7.0.3",
"del": "^6.0.0",
"dotenv-cli": "^4.0.0",
"eslint": "^8.1.0",
"eslint": "^7.32.0",
"eslint-config-next": "^12.0.1",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-react": "^7.24.0",
"eslint-plugin-react-hooks": "^4.2.0",
"extract-react-intl-messages": "^4.1.1",
"husky": "^7.0.4",
"husky": "^7.0.0",
"lint-staged": "^11.0.0",
"loadtest": "5.1.2",
"npm-run-all": "^4.1.5",
Expand All @@ -129,7 +126,7 @@
"rollup": "^2.48.0",
"rollup-plugin-hashbang": "^2.2.2",
"rollup-plugin-terser": "^7.0.2",
"stylelint": "^14.0.1",
"stylelint": "^13.13.0",
"stylelint-config-css-modules": "^2.2.0",
"stylelint-config-prettier": "^9.0.3",
"stylelint-config-recommended": "^5.0.0",
Expand Down
Loading

0 comments on commit d4dd206

Please sign in to comment.