Skip to content
This repository was archived by the owner on Dec 13, 2018. It is now read-only.

Add ESLint #3

Closed
wants to merge 19 commits into from
Closed

Add ESLint #3

wants to merge 19 commits into from

Conversation

dav-is
Copy link

@dav-is dav-is commented Oct 18, 2016

Added Eslint. Rules still need some discussion

flarum/framework#879

Copy link
Contributor

@franzliedke franzliedke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix these minor formatting issues and then squash all your commits together.

var concat = require('gulp-concat');
var babel = require('gulp-babel');
var cached = require('gulp-cached');
var remember = require('gulp-remember');
var order = require('gulp-order');
var streamqueue = require('streamqueue');
var file = require('gulp-file');
var gulpIf = require('gulp-if');
var gulpTap = require("gulp-tap");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use single quotes here for consistency.

var babelCore = require('babel-core');

function handleError(e) {
console.log(e.toString());
this.emit('end');
}
function isFixed (file) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove the space before the opening parenthesis.

"/^onsubmit$/",
"/^onerror$/"
]
}]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you explain what all of these do? Especially the order array isn't particularly self-explanatory.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The order is the order methods must come in classes. I looked for the most common pattern for methods and came up with this order. As for the rest, the documentation explains it better than I could.

@franzliedke
Copy link
Contributor

@tobscure You'll have to take care of this one.

@dav-is
Copy link
Author

dav-is commented Oct 18, 2016

One of the rules that I wasn't sure to turn on or off was defining methods as statics if they don't use this.

@tobyzerner tobyzerner self-assigned this Oct 18, 2016
@franzliedke
Copy link
Contributor

This package is now obsolete, in favor of flarum-webpack-config, right? Let's archive this then... @tobscure

@tobyzerner tobyzerner closed this Dec 13, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants