Skip to content

Commit

Permalink
Merge pull request RocketChat#286 from RocketChat/eslint
Browse files Browse the repository at this point in the history
Fix and configure ESLint
  • Loading branch information
engelgabriel committed Jan 11, 2017
2 parents 231463f + 1e747bd commit f430a66
Show file tree
Hide file tree
Showing 20 changed files with 1,684 additions and 1,674 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ trim_trailing_whitespace = true
insert_final_newline = true

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

[*.md]
trim_trailing_whitespace = false
6 changes: 6 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
node_modules
app
e2e
src/public/lib/bugsnag.js
src/public/vendor/jquery-1.12.0.js
scripts/istanbul-reporter.js
81 changes: 0 additions & 81 deletions .eslintrc

This file was deleted.

80 changes: 80 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
{
"parserOptions": {
"sourceType": "module"
},
"env": {
"browser": true,
"commonjs": true,
"es6": true,
"node": true,
"jquery": true
},
"rules": {
"no-multi-spaces": 2,
"no-eval": 2,
"no-extend-native": 2,
"no-multi-str": 2,
"no-use-before-define": 2,
"no-const-assign": 2,
"no-cond-assign": 2,
"no-constant-condition": 2,
"no-control-regex": 2,
"no-debugger": 2,
"no-delete-var": 2,
"no-dupe-keys": 2,
"no-dupe-args": 2,
"no-duplicate-case": 2,
"no-empty": 2,
"no-empty-character-class": 2,
"no-ex-assign": 2,
"no-extra-boolean-cast": 2,
"no-extra-semi": 2,
"no-fallthrough": 2,
"no-func-assign": 2,
"no-inner-declarations": [2, "functions"],
"no-invalid-regexp": 2,
"no-irregular-whitespace": 2,
"no-mixed-spaces-and-tabs": 2,
"no-sparse-arrays": 2,
"no-negated-in-lhs": 2,
"no-obj-calls": 2,
"no-octal": 2,
"no-redeclare": 2,
"no-regex-spaces": 2,
"no-undef": 2,
"no-unreachable": 2,
"no-unused-vars": [2, {
"vars": "all",
"args": "after-used"
}],
"no-lonely-if": 2,
"no-trailing-spaces": 2,
"complexity": [1, 31],
"space-in-parens": [2, "never"],
"space-before-function-paren": [2, "always"],
"space-before-blocks": [2, "always"],
"indent": [2, 4, {"SwitchCase": 1}],
"keyword-spacing": 2,
"block-spacing": 2,
"brace-style": [2, "1tbs", { "allowSingleLine": true }],
"computed-property-spacing": 2,
"comma-spacing": 2,
"comma-style": 2,
"guard-for-in": 2,
"wrap-iife": 2,
"block-scoped-var": 2,
"curly": [2, "all"],
"eqeqeq": [2, "allow-null"],
"new-cap": [2, {
"capIsNewExceptions": ["Match.Optional", "Match.Maybe", "Match.ObjectIncluding"]
}],
"use-isnan": 2,
"valid-typeof": 2,
"linebreak-style": [2, "unix"],
"semi": [2, "always"]
},
"globals": {
"_" : false,
"Bugsnag" : false
}
}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# electron-boilerplate [![Build Status](https://travis-ci.org/szwacz/electron-boilerplate.svg?branch=master)](https://travis-ci.org/szwacz/electron-boilerplate) [![Build status](https://ci.appveyor.com/api/projects/status/s9htc1k5ojkn08fr?svg=true)](https://ci.appveyor.com/project/szwacz/electron-boilerplate)
# electron-boilerplate [![Build Status](https://img.shields.io/travis/RocketChat/Rocket.Chat.Electron/master.svg)](https://travis-ci.org/RocketChat/Rocket.Chat.Electron) [![Build status](https://ci.appveyor.com/api/projects/status/k72eq3gm42wt4j8b?svg=true)](https://ci.appveyor.com/project/RocketChat/rocket-chat-electron) [![Project Dependencies](https://david-dm.org/RocketChat/Rocket.Chat.Electron.svg)](https://david-dm.org/RocketChat/Rocket.Chat.Electron) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/54ebf39732d14cb19a1a992b46bd0da6)](https://www.codacy.com/app/RocketChat/Rocket-Chat-Electron?utm_source=github.com&utm_medium=referral&utm_content=RocketChat/Rocket.Chat.Electron&utm_campaign=Badge_Grade)

A minimalistic yet comprehensive boilerplate application for [Electron runtime](http://electron.atom.io). Tested on macOS, Windows and Linux.

Expand Down
12 changes: 6 additions & 6 deletions src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ import { remote } from 'electron';
var app = remote.app;

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 f430a66

Please sign in to comment.