Skip to content

Commit e7e70d0

Browse files
committed
Fix linting
1 parent af235b5 commit e7e70d0

File tree

5 files changed

+8
-5
lines changed

5 files changed

+8
-5
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454
"postcss": "^8.3.5",
5555
"postcss-css-variables": "^0.18.0",
5656
"postcss-loader": "^3.0.0",
57+
"prettier": "^2.3.2",
5758
"react-hot-loader": "3.1.3",
5859
"react-native-sass-transformer": "^1.4.0",
5960
"react-native-typed-postcss-transformer": "^0.10.2",

rn-transformer.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@ var upstreamTransformer = require('metro-react-native-babel-transformer');
22
var sassTransformer = require('react-native-sass-transformer');
33
var postCSSTransformer = require('react-native-typed-postcss-transformer');
44

5-
module.exports.transform = function({src, filename, options}) {
5+
module.exports.transform = function ({src, filename, options}) {
66
if (filename.endsWith('.scss')) {
77
return sassTransformer
88
.renderToCSS({src, filename, options})
9-
.then(css => postCSSTransformer.transform({src: css, filename, options}));
9+
.then((css) =>
10+
postCSSTransformer.transform({src: css, filename, options}),
11+
);
1012
} else if (filename.endsWith('.css')) {
1113
return postCSSTransformer.transform({src, filename, options});
1214
} else {

src/utils/camelCase.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export function camelCase(str: string): string {
99
.replace(/[^\w\s]/g, '')
1010
// Uppercases the first character in each group immediately following a space
1111
// (delimited by spaces)
12-
.replace(/ (.)/g, function($1) {
12+
.replace(/ (.)/g, function ($1) {
1313
return $1.toUpperCase();
1414
})
1515
// Removes spaces

src/utils/titleCase.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
export const titleCase = (str: string): string => {
22
return str
33
.split(' ')
4-
.map(w => w[0].toUpperCase() + w.substr(1).toLowerCase())
4+
.map((w) => w[0].toUpperCase() + w.substr(1).toLowerCase())
55
.join(' ');
66
};

yarn.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8890,7 +8890,7 @@ prettier-linter-helpers@^1.0.0:
88908890
dependencies:
88918891
fast-diff "^1.1.2"
88928892

8893-
prettier@^2.0.2:
8893+
prettier@^2.0.2, prettier@^2.3.2:
88948894
version "2.3.2"
88958895
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.3.2.tgz#ef280a05ec253712e486233db5c6f23441e7342d"
88968896
integrity sha512-lnJzDfJ66zkMy58OL5/NY5zp70S7Nz6KqcKkXYzn2tMVrNxvbqaBpg7H3qHaLxCJ5lNMsGuM8+ohS7cZrthdLQ==

0 commit comments

Comments
 (0)