Skip to content

Commit 6890d96

Browse files
authored
Add ESLint config (#82)
* Add eslint config and fix linter issues * Update changelog
1 parent 60791cc commit 6890d96

File tree

5 files changed

+355
-324
lines changed

5 files changed

+355
-324
lines changed

.eslintrc.json

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

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ bower_components/
44
package-lock.json
55

66
/.*
7+
!/.eslintrc.json
78
!/.github
89
!/.gitignore
910

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ New features:
1212
Bugfixes:
1313

1414
Other improvements:
15+
- Added ESLint config and fixed the resulting linter issues (#82)
1516

1617
## [v5.0.0](https://github.com/purescript-web/purescript-canvas/releases/tag/v5.0.0) - 2021-02-26
1718

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@
22
"private": true,
33
"scripts": {
44
"clean": "rimraf output && rimraf .pulp-cache",
5-
"build": "pulp build -- --censor-lib --strict"
5+
"build": "eslint src && pulp build -- --censor-lib --strict"
66
},
77
"devDependencies": {
8+
"eslint": "^7.32.0",
89
"pulp": "^15.0.0",
910
"purescript-psa": "^0.8.0",
1011
"rimraf": "^3.0.2"

0 commit comments

Comments
 (0)