Skip to content

Commit

Permalink
Fix lint issues and add linting to CI (origo-map#1561)
Browse files Browse the repository at this point in the history
  • Loading branch information
sweco-sedalh authored Feb 3, 2023
1 parent a61d3e3 commit dc110a0
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 2 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Lint
on:
push:
pull_request:
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v3
with:
node-version: 14
cache: 'npm'
- name: Install dependencies
run: npm install
- name: Run ESLint
run: npm run lint
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
"main": "origo.js",
"scripts": {
"start": "npm run prebuild-sass | run-p watch-js watch-sass",
"lint": "eslint -c .eslintrc.json origo.js src/**/*.js --fix",
"lint": "eslint -c .eslintrc.json origo.js src/",
"lint-fix": "eslint -c .eslintrc.json origo.js src/ --fix",
"lint-run": "npm run prebuild-sass | webpack-dev-server --config ./tasks/webpack.lint.dev.js --mode development",
"lint-build": "webpack --config ./tasks/webpack.lint.prod.js && npm run build-sass | npm run copy-plugins | npm run copy",
"watch-js": "webpack-dev-server --config ./tasks/webpack.dev.js --mode development",
Expand Down
4 changes: 3 additions & 1 deletion src/viewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ const Viewer = function Viewer(targetOption, options = {}) {
let selectionmanager;

let {
projection,
projection
} = options;
const {
breakPoints,
breakPointsPrefix,
clsOptions = '',
Expand Down

0 comments on commit dc110a0

Please sign in to comment.