Skip to content

Commit

Permalink
umputun#5 fix linting
Browse files Browse the repository at this point in the history
  • Loading branch information
Mavrin committed Feb 14, 2020
1 parent 71aadba commit 695409c
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 11 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ ARG NODE_ENV=production
COPY --from=build-frontend-deps /srv/frontend/node_modules /srv/frontend/node_modules
ADD frontend /srv/frontend
RUN cd /srv/frontend && \
if [ -z "$SKIP_FRONTEND_TEST" ] ; then npx run-p check lint test build ; \
if [ -z "$SKIP_FRONTEND_TEST" ] ; then npx run-p check lint lint:style test build ; \
else echo "skip frontend tests and lint" ; npm run build ; fi && \
rm -rf ./node_modules

Expand Down
13 changes: 13 additions & 0 deletions frontend/.lintstagedrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
module.exports = {
'./**/*.{ts,tsx,js,jsx}': filenames => {
const files = filenames
.filter(file => {
return (
!(file.endsWith(".lintstagedrc.js") || file.endsWith(".stylelintrc.js") || file.endsWith(".eslintrc.js"))
);
})
.join(' ');
return [`eslint ${files} --max-warnings=0 --fix`, `git add ${files}`];
},
'./**/*.{scss,pcss,css}': ['prettier --write', 'stylelint', 'git add'],
};
10 changes: 0 additions & 10 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,6 @@
"pre-push": "npm run check && npm test"
}
},
"lint-staged": {
"./**/*.{ts,tsx,js,jsx}": [
"eslint --fix --max-warnings=0",
"git add"
],
"./**/*.scss": [
"prettier --write",
"git add"
]
},
"devDependencies": {
"@babel/core": "^7.6.4",
"@babel/plugin-syntax-dynamic-import": "^7.2.0",
Expand Down

0 comments on commit 695409c

Please sign in to comment.