From b967ae6bdf64bf6d36726a4eca547ca5d193d888 Mon Sep 17 00:00:00 2001 From: Gary Burgess Date: Mon, 3 Apr 2017 23:05:18 +0100 Subject: [PATCH] Update build --- .eslintrc.json | 34 ++++++++++++++++++++++++++++++++++ .gitignore | 3 +-- .jscsrc | 17 ----------------- .jshintrc | 19 ------------------- .travis.yml | 12 +++--------- package.json | 6 +++--- 6 files changed, 41 insertions(+), 50 deletions(-) create mode 100644 .eslintrc.json delete mode 100644 .jscsrc delete mode 100644 .jshintrc diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 0000000..910f3a7 --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,34 @@ +{ + "parserOptions": { + "ecmaVersion": 5 + }, + "extends": "eslint:recommended", + "env": { + "commonjs": true + }, + "rules": { + "strict": [2, "global"], + "block-scoped-var": 2, + "consistent-return": 2, + "eqeqeq": [2, "smart"], + "guard-for-in": 2, + "no-caller": 2, + "no-extend-native": 2, + "no-loop-func": 2, + "no-new": 2, + "no-param-reassign": 2, + "no-return-assign": 2, + "no-unused-expressions": 2, + "no-use-before-define": 2, + "radix": [2, "always"], + "indent": [2, 2, { "SwitchCase": 1 }], + "quotes": [2, "double"], + "semi": [2, "always"] + }, + "globals": { + "setTimeout": true, + "clearTimeout": true, + "setInterval": true, + "clearInterval": true + } +} diff --git a/.gitignore b/.gitignore index e306283..7050558 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,6 @@ /.* !/.gitignore -!/.jscsrc -!/.jshintrc +!/.eslintrc.json !/.travis.yml /bower_components/ /node_modules/ diff --git a/.jscsrc b/.jscsrc deleted file mode 100644 index 2561ce9..0000000 --- a/.jscsrc +++ /dev/null @@ -1,17 +0,0 @@ -{ - "preset": "grunt", - "disallowSpacesInFunctionExpression": null, - "requireSpacesInFunctionExpression": { - "beforeOpeningRoundBrace": true, - "beforeOpeningCurlyBrace": true - }, - "disallowSpacesInAnonymousFunctionExpression": null, - "requireSpacesInAnonymousFunctionExpression": { - "beforeOpeningRoundBrace": true, - "beforeOpeningCurlyBrace": true - }, - "disallowSpacesInsideObjectBrackets": null, - "requireSpacesInsideObjectBrackets": "all", - "validateQuoteMarks": "\"", - "requireCurlyBraces": null -} diff --git a/.jshintrc b/.jshintrc deleted file mode 100644 index 1b91455..0000000 --- a/.jshintrc +++ /dev/null @@ -1,19 +0,0 @@ -{ - "bitwise": true, - "eqeqeq": true, - "forin": true, - "freeze": true, - "funcscope": true, - "futurehostile": true, - "strict": "global", - "latedef": true, - "noarg": true, - "nocomma": true, - "nonew": true, - "notypeof": true, - "singleGroups": true, - "undef": true, - "unused": true, - "eqnull": true, - "predef": ["exports", "setTimeout", "clearTimeout", "setInterval", "clearInterval"] -} diff --git a/.travis.yml b/.travis.yml index 5fb6c2f..7f150a3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,21 +1,15 @@ language: node_js dist: trusty sudo: required -node_js: 6 -env: - - PATH=$HOME/purescript:$PATH +node_js: stable install: - - TAG=$(wget -q -O - https://github.com/purescript/purescript/releases/latest --server-response --max-redirect 0 2>&1 | sed -n -e 's/.*Location:.*tag\///p') - - wget -O $HOME/purescript.tar.gz https://github.com/purescript/purescript/releases/download/$TAG/linux64.tar.gz - - tar -xvf $HOME/purescript.tar.gz -C $HOME/ - - chmod a+x $HOME/purescript - npm install -g bower - npm install -script: - bower install --production +script: - npm run -s build - bower install - - npm run -s test + - npm -s test after_success: - >- test $TRAVIS_TAG && diff --git a/package.json b/package.json index c477226..5a71519 100644 --- a/package.json +++ b/package.json @@ -2,14 +2,14 @@ "private": true, "scripts": { "clean": "rimraf output && rimraf .pulp-cache", - "build": "jshint src && jscs src && pulp build -- --censor-lib --strict", + "build": "eslint src && pulp build -- --censor-lib --strict", "test": "pulp test" }, "devDependencies": { - "jscs": "^2.11.0", - "jshint": "^2.9.4", + "eslint": "^3.19.0", "pulp": "^11.0.0", "purescript-psa": "^0.5.0", + "purescript": "^0.11.1", "rimraf": "^2.6.1" } }