Skip to content

Commit

Permalink
Add eslint as a dev-dependency; add 'Travis-CI' YAML configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
nfreear committed Jun 4, 2019
1 parent 0c2d6a5 commit 69ebade
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 3 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
package-lock.json
composer.*
vendor/
dev/
/config.php
ads.php
Expand All @@ -9,5 +12,5 @@ crowdin.yaml
*.po
.idea/
xgettext.*
*/node_modules/
/node_modules/
/nbproject/private/
25 changes: 25 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# https://docs.travis-ci.com/user/languages/javascript-with-nodejs/
# https://medium.com/@gogl.alex/how-to-properly-set-up-eslint-with-prettier-for-vue-or-nuxt-in-vscode-e42532099a9c

# os: linux (default)

dist: xenial # Faster.

sudo: false

language: node_js

node_js: 11

cache: npm

# install: npm ci (default)

# before_script: npm run build

# script: npm test (default)

# Output the 'eslint' configuration.
after_script: grep -rn eslintConfig -A 7 package.json

# End.
19 changes: 17 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"description": "Remind users to update their browser in an unobtrusive way.",
"main": "update.npm.full.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"fix": "# Todo: semistandard --fix",
"test": "eslint ./*.js # semistandard"
},
"repository": {
"type": "git",
Expand All @@ -23,5 +24,19 @@
"bugs": {
"url": "https://github.com/browser-update/browser-update/issues"
},
"homepage": "http://browser-update.org"
"homepage": "https://browser-update.org",
"eslintConfig": {
"env": {
"browser": true
},
"extends": [
"eslint:recommended"
]
},
"devDependencies": {
"eslint": "^5.16.0"
},
"peerDependencies": {
"semistandard": "^13.0.1"
}
}

0 comments on commit 69ebade

Please sign in to comment.