Upgrade packages and improve linter action (#167)

This commit is contained in:
Grzegorz Rajchman
2020-03-27 18:14:49 +00:00
committed by GitHub
parent 77a9633984
commit 4b10532cea
4 changed files with 801 additions and 1032 deletions

10
.eslintrc.js Normal file
View File

@@ -0,0 +1,10 @@
module.exports = {
"extends": "standard",
"globals": {
"$": "readonly",
"localStorage": "readonly",
},
"ignorePatterns": [
"/javascripts/",
],
};

View File

@@ -6,6 +6,11 @@ on:
- src/* - src/*
- svg/* - svg/*
- package*.json - package*.json
pull_request:
paths:
- src/*
- svg/*
- package*.json
jobs: jobs:
lint: lint:
@@ -23,11 +28,14 @@ jobs:
- name: Install npm dependencies - name: Install npm dependencies
run: npm ci run: npm ci
- name: Lint JavaScript - name: Run linters
run: npm run lint:js uses: samuelmeuli/lint-action@v1
with:
- name: Lint Sass github_token: ${{ secrets.github_token }}
run: npm run lint:sass eslint: true
eslint_dir: "src/javascripts"
stylelint: true
stylelint_dir: "src/sass"
- name: Check build - name: Check build
run: npm run build run: npm run build

1781
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -20,13 +20,13 @@
"scripts": { "scripts": {
"build": "grunt", "build": "grunt",
"watch": "grunt watch", "watch": "grunt watch",
"lint:js": "standard", "lint:js": "eslint src/javascripts/",
"lint:sass": "stylelint src/sass/**/*.scss", "lint:sass": "stylelint src/sass/**/*.scss",
"lint": "npm run -S lint:js && npm run -S lint:sass" "lint": "npm run -S lint:js && npm run -S lint:sass"
}, },
"dependencies": { "dependencies": {
"autoprefixer": "^9.7.4", "autoprefixer": "^9.7.5",
"grunt": "^1.0.4", "grunt": "^1.1.0",
"grunt-contrib-uglify": "^4.0.1", "grunt-contrib-uglify": "^4.0.1",
"grunt-contrib-watch": "^1.1.0", "grunt-contrib-watch": "^1.1.0",
"grunt-postcss": "^0.9.0", "grunt-postcss": "^0.9.0",
@@ -35,19 +35,15 @@
"sass-inline-svg": "^1.2.3" "sass-inline-svg": "^1.2.3"
}, },
"devDependencies": { "devDependencies": {
"standard": "^13.1.0", "eslint": "^6.8.0",
"eslint-config-standard": "^14.1.1",
"eslint-plugin-import": "^2.20.1",
"eslint-plugin-node": "^11.0.0",
"eslint-plugin-promise": "^4.2.1",
"eslint-plugin-standard": "^4.0.1",
"stylelint": "^10.1.0", "stylelint": "^10.1.0",
"stylelint-order": "^3.1.1", "stylelint-order": "^3.1.1",
"stylelint-scss": "^3.14.2" "stylelint-scss": "^3.16.0"
},
"standard": {
"globals": [
"$",
"localStorage"
],
"ignore": [
"/javascripts"
]
}, },
"browserslist": [ "browserslist": [
"last 2 versions", "last 2 versions",