From 20d1580ee7cb4bbc74d89dae18b8984a0bedbaa7 Mon Sep 17 00:00:00 2001 From: Krister Kari Date: Tue, 23 May 2023 00:05:54 +0300 Subject: [PATCH] Fix styling --- README.md | 6 +++--- package.json | 10 +++++----- yarn.lock | 5 +++++ 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 06d17fe..4cb01d0 100644 --- a/README.md +++ b/README.md @@ -174,7 +174,7 @@ var upstreamTransformer = require("metro-react-native-babel-transformer"); var lessTransformer = require("react-native-less-transformer"); -module.exports.transform = function({ src, filename, options }) { +module.exports.transform = function ({ src, filename, options }) { if (filename.endsWith(".less")) { var opts = Object.assign(options, { lessOptions: { @@ -253,11 +253,11 @@ var upstreamTransformer = require("metro-react-native-babel-transformer"); var lessTransformer = require("react-native-less-transformer"); var postCSSTransformer = require("react-native-postcss-transformer"); -module.exports.transform = function({ src, filename, options }) { +module.exports.transform = function ({ src, filename, options }) { if (filename.endsWith(".less")) { return lessTransformer .renderToCSS({ src, filename, options }) - .then(css => + .then((css) => postCSSTransformer.transform({ src: css, filename, options }) ); } else { diff --git a/package.json b/package.json index 22f4466..e2ab66e 100644 --- a/package.json +++ b/package.json @@ -27,6 +27,7 @@ }, "devDependencies": { "eslint": "^8.33.0", + "eslint-config-prettier": "^8.8.0", "eslint-config-standard": "^15.0.1", "eslint-plugin-import": "^2.16.0", "eslint-plugin-node": "^11.1.0", @@ -44,12 +45,11 @@ ] }, "eslintConfig": { - "extends": "standard", + "extends": [ + "standard", + "prettier" + ], "rules": { - "space-before-function-paren": [ - 2, - "never" - ], "semi": [ 2, "always" diff --git a/yarn.lock b/yarn.lock index 1ed344e..f03432e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -995,6 +995,11 @@ escape-string-regexp@^4.0.0: resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== +eslint-config-prettier@^8.8.0: + version "8.8.0" + resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-8.8.0.tgz#bfda738d412adc917fd7b038857110efe98c9348" + integrity sha512-wLbQiFre3tdGgpDv67NQKnJuTlcUVYHas3k+DZCc2U2BadthoEY4B7hLPvAxaqdyOGCzuLfii2fqGph10va7oA== + eslint-config-standard@^15.0.1: version "15.0.1" resolved "https://registry.yarnpkg.com/eslint-config-standard/-/eslint-config-standard-15.0.1.tgz#1262eafaba66f4f03fdf3cf655a28aa8b40868b7"