From fae69a44e4a146bc0478fecdf9ade3bbf851df7a Mon Sep 17 00:00:00 2001 From: Daniel Tschinder Date: Fri, 16 Jun 2017 17:50:07 +0200 Subject: [PATCH] Fix prettier --- .eslintignore | 1 + .eslintrc | 2 +- package.json | 2 +- test/utils/relative.test.js | 16 ++++++++-------- 4 files changed, 11 insertions(+), 10 deletions(-) diff --git a/.eslintignore b/.eslintignore index 8bd9527d..baf2ec04 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,4 +1,5 @@ lib node_modules +scripts test/output test/fixtures diff --git a/.eslintrc b/.eslintrc index 5517af4a..e5cddf5d 100644 --- a/.eslintrc +++ b/.eslintrc @@ -7,6 +7,6 @@ "plugins": ["prettier"], "rules": { "arrow-parens": "off", - "prettier/prettier": "error" + "prettier/prettier": ["error", { "trailingComma": "all" }] } } diff --git a/package.json b/package.json index bc43d89d..d3db2258 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ "scripts": { "clean": "rimraf lib/", "build": "babel src/ --out-dir lib/", - "format": "prettier --write --trailing-comma all \"src/**/*.js\" \"test/*.test.js\" \"test/helpers/*.js\" && prettier --write --trailing-comma es5 \"scripts/*.js\"", + "format": "prettier --write --trailing-comma all \"src/**/*.js\" \"test/**/*.test.js\" \"test/helpers/*.js\" && prettier --write --trailing-comma es5 \"scripts/*.js\"", "lint": "eslint src test", "precommit": "lint-staged", "prepublish": "yarn run clean && yarn run build", diff --git a/test/utils/relative.test.js b/test/utils/relative.test.js index 851cc830..96183b2d 100644 --- a/test/utils/relative.test.js +++ b/test/utils/relative.test.js @@ -3,35 +3,35 @@ import os from "os"; import relative from "../../lib/utils/relative.js"; if (os.platform() === "win32") { - test("should get correct relative path - depth 0 - windows", (t) => { + test("should get correct relative path - depth 0 - windows", t => { t.is(relative("C:\\the\\root", "C:\\the\\root\\one.js"), "one.js"); }); - test("should get correct relative path - depth 1 - windows", (t) => { + test("should get correct relative path - depth 1 - windows", t => { t.is(relative("C:\\the\\root", "C:\\the\\rootone.js"), "..\\rootone.js"); }); - test("should get correct relative path - depth 2 - windows", (t) => { + test("should get correct relative path - depth 2 - windows", t => { t.is(relative("C:\\the\\root", "C:\\therootone.js"), "C:\\therootone.js"); }); - test("should get correct relative path with main root - depth 0 - windows", (t) => { + test("should get correct relative path with main root - depth 0 - windows", t => { t.is(relative("C:\\", "C:\\the\\root\\one.js"), "the\\root\\one.js"); }); } else { - test("should get correct relative path - depth 0", (t) => { + test("should get correct relative path - depth 0", t => { t.is(relative("/the/root", "/the/root/one.js"), "one.js"); }); - test("should get correct relative path - depth 1", (t) => { + test("should get correct relative path - depth 1", t => { t.is(relative("/the/root", "/the/rootone.js"), "../rootone.js"); }); - test("should get correct relative path - depth 2", (t) => { + test("should get correct relative path - depth 2", t => { t.is(relative("/the/root", "/therootone.js"), "/therootone.js"); }); - test("should get correct relative path with main root - depth 0", (t) => { + test("should get correct relative path with main root - depth 0", t => { t.is(relative("/", "/the/root/one.js"), "the/root/one.js"); }); }