Skip to content

Commit

Permalink
Merge pull request #887 from RocketChat/improve/eslint
Browse files Browse the repository at this point in the history
[IMPROVE] Update ESLint rules following Rocket.Chat guidelines
  • Loading branch information
tassoevan authored Sep 19, 2018
2 parents 8a484df + 154a851 commit c3f3a82
Show file tree
Hide file tree
Showing 45 changed files with 2,970 additions and 2,963 deletions.
7 changes: 5 additions & 2 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,12 @@ charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.{js,coffee,html,less,json}]
[*.{js,coffee,html,less,css,json}]
indent_style = tab

[*.i18n.json]
indent_style = space
indent_size = 4
indent_size = 2

[*.md]
trim_trailing_whitespace = false
11 changes: 5 additions & 6 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
node_modules
app
e2e
src/public/lib/bugsnag.js
src/public/vendor/*
scripts/istanbul-reporter.js
/node_modules
/app
/src/public/lib/bugsnag.js
/src/public/vendor/*
/scripts/istanbul-reporter.js
9 changes: 9 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"extends": [
"@rocket.chat/eslint-config"
],
"globals": {
"_": false,
"Bugsnag": false
}
}
82 changes: 0 additions & 82 deletions .eslintrc.json

This file was deleted.

3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,8 @@ Using [electron-mocha](https://github.com/jprichardson/electron-mocha) test runn
yarn e2e
```

Using [mocha](https://mochajs.org/) test runner and [spectron](http://electron.atom.io/spectron/). This task searches for all files in `e2e` directory which respect pattern `*.e2e.js`.
Using [mocha](https://mochajs.org/) test runner and [spectron](http://electron.atom.io/spectron/).
This task searches for all files in `src/e2e` directory which respect pattern `*.e2e.js`.


### Code coverage
Expand Down
14 changes: 0 additions & 14 deletions e2e/app.e2e.js

This file was deleted.

87 changes: 0 additions & 87 deletions e2e/utils.js

This file was deleted.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"release": "gulp release --env=production",
"release-dev": "gulp release --env=development",
"release-mas-dev": "build --publish never --mac mas-dev --c.mac.provisioningProfile=Development.provisionprofile",
"lint": "eslint .",
"lint": "eslint src",
"pretest": "gulp build-unit-tests --env=test",
"test": "electron-mocha app/specs.js.autogenerated --renderer --require source-map-support/register",
"coverage": "npm test -- -R scripts/istanbul-reporter",
Expand All @@ -38,6 +38,7 @@
"node-mac-notifier": "^1.1.0"
},
"devDependencies": {
"@rocket.chat/eslint-config": "^0.1.2",
"chai": "^4.1.2",
"conventional-changelog-cli": "^2.0.5",
"electron": "^2.0.9",
Expand Down
14 changes: 7 additions & 7 deletions src/app.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import './branding/branding.js';
import { start } from './scripts/start';
import { remote } from 'electron';
const app = remote.app;
const { app } = remote;

Bugsnag.metaData = {
// platformId: app.process.platform,
// platformArch: app.process.arch,
// electronVersion: app.process.versions.electron,
version: app.getVersion()
// platformVersion: cordova.platformVersion
// build: appInfo.build
// platformId: app.process.platform,
// platformArch: app.process.arch,
// electronVersion: app.process.versions.electron,
version: app.getVersion(),
// platformVersion: cordova.platformVersion
// build: appInfo.build
};

Bugsnag.appVersion = app.getVersion();
Expand Down
Loading

0 comments on commit c3f3a82

Please sign in to comment.