Skip to content

Commit dbd0ac2

Browse files
authored
Merge pull request #76 from purescript/ps-0.11
Update for PureScript 0.11
2 parents 8fd322a + a1c83a7 commit dbd0ac2

14 files changed

+48
-58
lines changed

.eslintrc.json

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"parserOptions": {
3+
"ecmaVersion": 5
4+
},
5+
"extends": "eslint:recommended",
6+
"env": {
7+
"commonjs": true
8+
},
9+
"rules": {
10+
"strict": [2, "global"],
11+
"block-scoped-var": 2,
12+
"consistent-return": 2,
13+
"eqeqeq": [2, "smart"],
14+
"guard-for-in": 2,
15+
"no-caller": 2,
16+
"no-extend-native": 2,
17+
"no-loop-func": 2,
18+
"no-new": 2,
19+
"no-param-reassign": 2,
20+
"no-return-assign": 2,
21+
"no-unused-expressions": 2,
22+
"no-use-before-define": 2,
23+
"radix": [2, "always"],
24+
"indent": [2, 2],
25+
"quotes": [2, "double"],
26+
"semi": [2, "always"]
27+
}
28+
}

.gitignore

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
/.*
22
!/.gitignore
3-
!/.jscsrc
4-
!/.jshintrc
3+
!/.eslintrc.json
54
!/.travis.yml
65
/bower_components/
76
/node_modules/

.jscsrc

-17
This file was deleted.

.jshintrc

-20
This file was deleted.

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
language: node_js
22
dist: trusty
33
sudo: required
4-
node_js: 6
4+
node_js: stable
55
env:
66
- PATH=$HOME/purescript:$PATH
77
install:

bower.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@
1717
"package.json"
1818
],
1919
"dependencies": {
20-
"purescript-either": "^2.0.0",
21-
"purescript-maybe": "^2.0.0",
22-
"purescript-partial": "^1.1.2"
20+
"purescript-either": "^3.0.0",
21+
"purescript-maybe": "^3.0.0",
22+
"purescript-partial": "^1.2.0"
2323
},
2424
"devDependencies": {
25-
"purescript-assert": "^2.0.0",
26-
"purescript-console": "^2.0.0"
25+
"purescript-assert": "^3.0.0",
26+
"purescript-console": "^3.0.0"
2727
}
2828
}

package.json

+5-6
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,13 @@
22
"private": true,
33
"scripts": {
44
"clean": "rimraf output && rimraf .pulp-cache",
5-
"build": "jshint src && jscs src && pulp build --censor-lib --strict",
5+
"build": "eslint src && pulp build -- --censor-lib --strict",
66
"test": "pulp test"
77
},
88
"devDependencies": {
9-
"jscs": "^2.8.0",
10-
"jshint": "^2.9.1",
11-
"pulp": "^9.0.1",
12-
"purescript-psa": "^0.3.9",
13-
"rimraf": "^2.5.0"
9+
"eslint": "^3.17.1",
10+
"pulp": "^10.0.4",
11+
"purescript-psa": "^0.5.0-rc.1",
12+
"rimraf": "^2.6.1"
1413
}
1514
}

src/Data/String.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,8 @@ exports.drop = function (n) {
133133

134134
exports.count = function (p) {
135135
return function (s) {
136-
for (var i = 0; i < s.length && p(s.charAt(i)); i++); {}
136+
var i = 0;
137+
while (i < s.length && p(s.charAt(i))) i++;
137138
return i;
138139
};
139140
};

src/Data/String/Regex.purs

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import Data.String (Pattern(..), contains)
2424
import Data.String.Regex.Flags (RegexFlags(..), RegexFlagsRec)
2525

2626
-- | Wraps Javascript `RegExp` objects.
27-
foreign import data Regex :: *
27+
foreign import data Regex :: Type
2828

2929
foreign import showRegex' :: Regex -> String
3030

test/Test/Data/Char.purs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module Test.Data.Char (testChar) where
22

3-
import Prelude (Unit, (==), ($), bind)
3+
import Prelude (Unit, (==), ($), discard)
44

55
import Control.Monad.Eff (Eff)
66
import Control.Monad.Eff.Console (CONSOLE, log)

test/Test/Data/String.purs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module Test.Data.String (testString) where
22

3-
import Prelude (Unit, Ordering(..), (==), ($), bind, negate, not, (/=), (&&))
3+
import Prelude (Unit, Ordering(..), (==), ($), discard, negate, not, (/=), (&&))
44

55
import Control.Monad.Eff (Eff)
66
import Control.Monad.Eff.Console (CONSOLE, log)

test/Test/Data/String/CaseInsensitive.purs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module Test.Data.String.CaseInsensitive (testCaseInsensitiveString) where
22

3-
import Prelude (Unit, (==), ($), bind, compare, Ordering(..))
3+
import Prelude (Unit, (==), ($), discard, compare, Ordering(..))
44

55
import Control.Monad.Eff (Eff)
66
import Control.Monad.Eff.Console (CONSOLE, log)

test/Test/Data/String/Regex.purs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module Test.Data.String.Regex (testStringRegex) where
22

3-
import Prelude (Unit, ($), (<>), bind, (==), not)
3+
import Prelude (Unit, ($), (<>), discard, (==), not)
44

55
import Control.Monad.Eff (Eff)
66
import Control.Monad.Eff.Console (CONSOLE, log)

test/Test/Data/String/Unsafe.purs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module Test.Data.String.Unsafe (testStringUnsafe) where
22

3-
import Prelude (Unit, (==), ($), bind)
3+
import Prelude (Unit, (==), ($), discard)
44

55
import Control.Monad.Eff (Eff)
66
import Control.Monad.Eff.Console (CONSOLE, log)

0 commit comments

Comments
 (0)