Upgrade packages and improve linter action (#167)
This commit is contained in:
committed by
GitHub
parent
77a9633984
commit
4b10532cea
10
.eslintrc.js
Normal file
10
.eslintrc.js
Normal file
@@ -0,0 +1,10 @@
|
||||
module.exports = {
|
||||
"extends": "standard",
|
||||
"globals": {
|
||||
"$": "readonly",
|
||||
"localStorage": "readonly",
|
||||
},
|
||||
"ignorePatterns": [
|
||||
"/javascripts/",
|
||||
],
|
||||
};
|
||||
18
.github/workflows/lint.yml
vendored
18
.github/workflows/lint.yml
vendored
@@ -6,6 +6,11 @@ on:
|
||||
- src/*
|
||||
- svg/*
|
||||
- package*.json
|
||||
pull_request:
|
||||
paths:
|
||||
- src/*
|
||||
- svg/*
|
||||
- package*.json
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
@@ -23,11 +28,14 @@ jobs:
|
||||
- name: Install npm dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Lint JavaScript
|
||||
run: npm run lint:js
|
||||
|
||||
- name: Lint Sass
|
||||
run: npm run lint:sass
|
||||
- name: Run linters
|
||||
uses: samuelmeuli/lint-action@v1
|
||||
with:
|
||||
github_token: ${{ secrets.github_token }}
|
||||
eslint: true
|
||||
eslint_dir: "src/javascripts"
|
||||
stylelint: true
|
||||
stylelint_dir: "src/sass"
|
||||
|
||||
- name: Check build
|
||||
run: npm run build
|
||||
|
||||
1779
package-lock.json
generated
1779
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
24
package.json
24
package.json
@@ -20,13 +20,13 @@
|
||||
"scripts": {
|
||||
"build": "grunt",
|
||||
"watch": "grunt watch",
|
||||
"lint:js": "standard",
|
||||
"lint:js": "eslint src/javascripts/",
|
||||
"lint:sass": "stylelint src/sass/**/*.scss",
|
||||
"lint": "npm run -S lint:js && npm run -S lint:sass"
|
||||
},
|
||||
"dependencies": {
|
||||
"autoprefixer": "^9.7.4",
|
||||
"grunt": "^1.0.4",
|
||||
"autoprefixer": "^9.7.5",
|
||||
"grunt": "^1.1.0",
|
||||
"grunt-contrib-uglify": "^4.0.1",
|
||||
"grunt-contrib-watch": "^1.1.0",
|
||||
"grunt-postcss": "^0.9.0",
|
||||
@@ -35,19 +35,15 @@
|
||||
"sass-inline-svg": "^1.2.3"
|
||||
},
|
||||
"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-order": "^3.1.1",
|
||||
"stylelint-scss": "^3.14.2"
|
||||
},
|
||||
"standard": {
|
||||
"globals": [
|
||||
"$",
|
||||
"localStorage"
|
||||
],
|
||||
"ignore": [
|
||||
"/javascripts"
|
||||
]
|
||||
"stylelint-scss": "^3.16.0"
|
||||
},
|
||||
"browserslist": [
|
||||
"last 2 versions",
|
||||
|
||||
Reference in New Issue
Block a user