Skip to content

Commit bc714ba

Browse files
committed
Add eslint config
An early start that gets some linting in place.
1 parent d907421 commit bc714ba

4 files changed

Lines changed: 15 additions & 1 deletion

File tree

.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
src/vector/modernizr.js

.eslintrc.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
extends: ["./node_modules/matrix-react-sdk/.eslintrc.js"],
3+
}

package.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@
4141
"start:js:prod": "NODE_ENV=production webpack-dev-server -w --progress",
4242
"start": "node scripts/babelcheck.js && parallelshell \"npm run start:res\" \"npm run start:js\"",
4343
"start:prod": "parallelshell \"npm run start:res\" \"npm run start:js:prod\"",
44+
"lint": "eslint src/",
45+
"lintall": "eslint src/ test/",
4446
"clean": "rimraf lib webapp electron/dist",
4547
"prepublish": "npm run build:compile",
4648
"test": "karma start --single-run=true --autoWatch=false --browsers PhantomJS --colors=false",
@@ -95,6 +97,9 @@
9597
"electron-builder": "^11.2.4",
9698
"electron-builder-squirrel-windows": "^11.2.1",
9799
"emojione": "^2.2.3",
100+
"eslint": "^3.14.0",
101+
"eslint-plugin-flowtype": "^2.30.0",
102+
"eslint-plugin-react": "^6.9.0",
98103
"expect": "^1.16.0",
99104
"fs-extra": "^0.30.0",
100105
"html-webpack-plugin": "^2.24.0",
@@ -148,7 +153,7 @@
148153
"target": "deb",
149154
"maintainer": "support@riot.im",
150155
"desktop": {
151-
"StartupWMClass": "riot-web"
156+
"StartupWMClass": "riot-web"
152157
}
153158
},
154159
"win": {

test/.eslintrc.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module.exports = {
2+
env: {
3+
mocha: true,
4+
},
5+
}

0 commit comments

Comments
 (0)