Merge "Enforce ES2015 syntax"
This commit is contained in:
21
.eslintrc
21
.eslintrc
@@ -3,3 +3,24 @@ extends: openstack
|
|||||||
parserOptions:
|
parserOptions:
|
||||||
ecmaVersion: 6
|
ecmaVersion: 6
|
||||||
sourceType: module
|
sourceType: module
|
||||||
|
|
||||||
|
rules:
|
||||||
|
# disallow unnecessary .call() and .apply()
|
||||||
|
# http://eslint.org/docs/rules/no-useless-call
|
||||||
|
no-useless-call: 2
|
||||||
|
|
||||||
|
# require let or const instead of var
|
||||||
|
# http://eslint.org/docs/rules/no-var
|
||||||
|
no-var: 2
|
||||||
|
|
||||||
|
# suggest using arrow functions as callbacks
|
||||||
|
# http://eslint.org/docs/rules/prefer-arrow-callback
|
||||||
|
prefer-arrow-callback: 2
|
||||||
|
|
||||||
|
# suggest using the spread operator instead of .apply().
|
||||||
|
# http://eslint.org/docs/rules/prefer-spread
|
||||||
|
prefer-spread: 2
|
||||||
|
|
||||||
|
# suggest using the rest parameters instead of arguments
|
||||||
|
# http://eslint.org/docs/rules/prefer-rest-params
|
||||||
|
prefer-rest-params: 2
|
||||||
|
@@ -2,7 +2,7 @@ import Test from "../../src/index.js";
|
|||||||
|
|
||||||
describe("Simple test", () => {
|
describe("Simple test", () => {
|
||||||
it("should export a class", () => {
|
it("should export a class", () => {
|
||||||
var t = new Test();
|
let t = new Test();
|
||||||
expect(t).toBeDefined();
|
expect(t).toBeDefined();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user