Skip to content

Commit

Permalink
Update JS dependencies and misc tweaks (go-gitea#13741)
Browse files Browse the repository at this point in the history
* Update JS dependencies and misc tweaks

- Update all JS dependencies minus webpack
- Adapt CodeMirrors styling to new CSS parent introduced by EasyMDE
- Set eslint parser to latest and add new eslint 7.14 rule
- Speed up npm install by disabling audit and fund checks
- Move fomantic-ui to optional dependencies to further speed up npm
- Enable syntax highlighting on GH for .eslintrc and .stylelintrc
- Makefile cleanups

* disable audit in npmrc

* add missing dash

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
  • Loading branch information
silverwind and techknowlogick authored Nov 29, 2020
1 parent c4deb97 commit e81edc0
Show file tree
Hide file tree
Showing 9 changed files with 843 additions and 1,055 deletions.
3 changes: 2 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ ignorePatterns:

parserOptions:
sourceType: module
ecmaVersion: 2020
ecmaVersion: 2021

plugins:
- eslint-plugin-unicorn
Expand Down Expand Up @@ -235,6 +235,7 @@ rules:
no-new-symbol: [2]
no-new-wrappers: [2]
no-new: [0]
no-nonoctal-decimal-escape: [2]
no-obj-calls: [2]
no-octal-escape: [2]
no-octal: [2]
Expand Down
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@
/vendor/** -text -eol linguist-vendored
/public/vendor/** -text -eol linguist-vendored
/templates/**/*.tmpl linguist-language=Handlebars
/.eslintrc linguist-language=YAML
/.stylelintrc linguist-language=YAML
2 changes: 2 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
audit=false
fund=false
package-lock=true
save-exact=true
15 changes: 9 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ swagger-check: generate-swagger
echo "Please run 'make generate-swagger' and commit the result:"; \
echo "$${diff}"; \
exit 1; \
fi;
fi

.PHONY: swagger-validate
swagger-validate:
Expand Down Expand Up @@ -296,7 +296,7 @@ fmt-check:
echo "Please run 'make fmt' and commit the result:"; \
echo "$${diff}"; \
exit 1; \
fi;
fi

.PHONY: checks
checks: checks-frontend checks-backend
Expand Down Expand Up @@ -348,7 +348,7 @@ test-check:
echo "You should change the tests to create these files in a temporary directory."; \
echo "Do not simply add these files to .gitignore"; \
exit 1; \
fi;
fi

.PHONY: test\#%
test\#%:
Expand All @@ -373,7 +373,7 @@ test-vendor: vendor
echo "Please run 'make vendor' and commit the result:"; \
echo "$${diff}"; \
exit 1; \
fi;
fi

generate-ini-sqlite:
sed -e 's|{{REPO_TEST_DIR}}|${REPO_TEST_DIR}|g' \
Expand Down Expand Up @@ -623,7 +623,7 @@ docs:
cd docs; make trans-copy clean build-offline;

node_modules: package-lock.json
npm install --no-save
npm install --no-save --no-optional
@touch node_modules

.PHONY: npm-update
Expand All @@ -637,6 +637,9 @@ npm-update: node-check | node_modules
fomantic: $(FOMANTIC_DEST)

$(FOMANTIC_DEST): $(FOMANTIC_CONFIGS) | node_modules
@if [ ! -d node_modules/fomantic-ui ]; then \
npm install --no-save; \
fi
rm -rf $(FOMANTIC_DEST_DIR)
cp -f web_src/fomantic/theme.config.less node_modules/fomantic-ui/src/theme.config
cp -rf web_src/fomantic/_site/* node_modules/fomantic-ui/src/_site/
Expand Down Expand Up @@ -664,7 +667,7 @@ svg-check: svg
echo "Please run 'make svg' and 'git add $(SVG_DEST_DIR)' and commit the result:"; \
echo "$${diff}"; \
exit 1; \
fi;
fi

.PHONY: update-translations
update-translations:
Expand Down
Loading

0 comments on commit e81edc0

Please sign in to comment.