Skip to content

Commit b2f3655

Browse files
authored
Add Prettier support (#739)
1 parent 6a017ab commit b2f3655

File tree

9 files changed

+1872
-238
lines changed

9 files changed

+1872
-238
lines changed

.eslintrc.yaml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
env:
2+
browser: true
3+
node: true
4+
5+
plugins:
6+
- prettier
7+
8+
extends:
9+
- prettier
10+
11+
parserOptions:
12+
ecmaVersion: 8
13+
sourceType: module
14+
ecmaFeatures:
15+
jsx: true
16+
17+
rules:
18+
curly: 2
19+
dot-notation: 2
20+
id-length: 2
21+
no-const-assign: 2
22+
no-dupe-class-members: 2
23+
no-else-return: 2
24+
no-inner-declarations: 2
25+
no-lonely-if: 2
26+
no-magic-numbers: [2, {ignore: [-1, 0, 1]}]
27+
no-shadow: 2
28+
no-unneeded-ternary: 2
29+
no-unused-expressions: 2
30+
no-unused-vars: [2, {args: none}]
31+
no-useless-return: 2
32+
no-var: 2
33+
one-var: [2, never]
34+
prefer-arrow-callback: 2
35+
prefer-const: 2
36+
prefer-promise-reject-errors: 2
37+
prettier/prettier: 2
38+
sort-imports: 2
39+
sort-keys: [2, asc, {caseSensitive: true, natural: true}]
40+
sort-vars: 2
41+
strict: [2, global]

.prettierrc.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
bracketSpacing: false
2+
jsxBracketSameLine: false
3+
printWidth: 80
4+
proseWrap: false
5+
requirePragma: false
6+
semi: true
7+
singleQuote: true
8+
tabWidth: 2
9+
trailingComma: all
10+
useTabs: false
11+
12+
overrides:
13+
- files: "*.json"
14+
options:
15+
printWidth: 200

README.md

Lines changed: 25 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,22 @@
1-
gae-init
2-
========
1+
# gae-init
32

4-
[![Slack Status](https://gae-init-slack.herokuapp.com/badge.svg)](https://gae-init-slack.herokuapp.com)
3+
[![Slack Status](https://gae-init-slack.herokuapp.com/badge.svg)](https://gae-init-slack.herokuapp.com) [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/prettier/prettier)
54

6-
> **gae-init** is the easiest boilerplate to kick start new applications on Google
7-
App Engine using Python, Flask, RESTful, Bootstrap and tons of other cool features.
5+
> **gae-init** is the easiest boilerplate to kick start new applications on Google App Engine using Python, Flask, RESTful, Bootstrap and tons of other cool features.
86
9-
Read the [documentation][], where you can find a complete [feature list][],
10-
a detailed [tutorial][], the [how to][] section and more..
7+
Read the [documentation][], where you can find a complete [feature list][], a detailed [tutorial][], the [how to][] section and more..
118

12-
The latest version is always accessible from
13-
[https://gae-init.appspot.com](https://gae-init.appspot.com)
9+
The latest version is always accessible from [https://gae-init.appspot.com](https://gae-init.appspot.com)
1410

15-
Requirements
16-
------------
11+
## Requirements
1712

18-
- [Google App Engine SDK for Python][]
19-
- [Node.js][], [pip][], [virtualenv][]
20-
- [macOS][] or [Linux][] or [Windows][]
13+
* [Google App Engine SDK for Python][]
14+
* [Node.js][], [pip][], [virtualenv][]
15+
* [macOS][] or [Linux][] or [Windows][]
2116

22-
Make sure you have all of the above or refer to the docs on how to
23-
[install the requirements](http://docs.gae-init.appspot.com/requirement/).
17+
Make sure you have all of the above or refer to the docs on how to [install the requirements](http://docs.gae-init.appspot.com/requirement/).
2418

25-
Running the Development Environment
26-
-----------------------------------
19+
## Running the Development Environment
2720

2821
```bash
2922
$ cd /path/to/project-name
@@ -32,16 +25,15 @@ $ gulp
3225

3326
To test it visit `http://localhost:3000` in your browser.
3427

35-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
28+
---
3629

3730
For a complete list of commands:
3831

3932
```bash
4033
$ gulp help
4134
```
4235

43-
Initializing or Resetting the project
44-
------------------------------------
36+
## Initializing or Resetting the project
4537

4638
```bash
4739
$ cd /path/to/project-name
@@ -57,16 +49,15 @@ $ npm install
5749
$ gulp
5850
```
5951

60-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
52+
---
6153

6254
To install [Gulp][] as a global package:
6355

6456
```bash
6557
$ npm install -g gulp
6658
```
6759

68-
Deploying on Google App Engine
69-
------------------------------
60+
## Deploying on Google App Engine
7061

7162
```bash
7263
$ gulp deploy
@@ -75,17 +66,16 @@ $ gulp deploy --project=foo --version=bar
7566
$ gulp deploy --project=foo --version=bar --no-promote
7667
```
7768

78-
Tech Stack
79-
----------
80-
81-
- [Google App Engine][], [NDB][]
82-
- [Jinja2][], [Flask][], [Flask-RESTful][], [Flask-WTF][]
83-
- [CoffeeScript][], [Less][]
84-
- [Bootstrap][], [Font Awesome][], [Social Buttons][]
85-
- [jQuery][], [Moment.js][]
86-
- [OpenID][] sign in (Google, Facebook, Twitter and more)
87-
- [Python 2.7][], [pip][], [virtualenv][]
88-
- [Gulp][], [Bower][]
69+
## Tech Stack
70+
71+
* [Google App Engine][], [NDB][]
72+
* [Jinja2][], [Flask][], [Flask-RESTful][], [Flask-WTF][]
73+
* [CoffeeScript][], [Less][]
74+
* [Bootstrap][], [Font Awesome][], [Social Buttons][]
75+
* [jQuery][], [Moment.js][]
76+
* [OpenID][] sign in (Google, Facebook, Twitter and more)
77+
* [Python 2.7][], [pip][], [virtualenv][]
78+
* [Gulp][], [Bower][]
8979

9080
[bootstrap]: http://getbootstrap.com/
9181
[bower]: http://bower.io/

bin/README.md

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
1-
Command Line Scripts
2-
====================
1+
# Command Line Scripts
32

4-
Requirements
5-
------------
3+
## Requirements
64

7-
You can install the requirements easily by executing the following scripts using
8-
`curl` & `bash`:
5+
You can install the requirements easily by executing the following scripts using `curl` & `bash`:
96

10-
### [Cloud Shell](https://cloud.google.com/shell/)
7+
### [Cloud Shell](https://cloud.google.com/shell/)
118

129
All requirements are met, out of the box.
1310

main/static/src/style/signin.less

Lines changed: 49 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
@height-base: @line-height-computed + @padding-base-vertical * 2;
2-
@height-lg: floor(@font-size-large * @line-height-base) + @padding-large-vertical * 2;
3-
@height-sm: floor(@font-size-small * 1.5) + @padding-small-vertical * 2;
4-
@height-xs: floor(@font-size-small * 1.2) + @padding-small-vertical + 1;
2+
@height-lg: floor(@font-size-large * @line-height-base) +
3+
@padding-large-vertical * 2;
4+
@height-sm: floor(@font-size-small * 1.5) + @padding-small-vertical * 2;
5+
@height-xs: floor(@font-size-small * 1.2) + @padding-small-vertical + 1;
56

67
.btn-social {
78
position: relative;
@@ -19,7 +20,7 @@
1920
line-height: @height-base + 2;
2021
font-size: 1.6em;
2122
text-align: center;
22-
border-right: 1px solid rgba(0,0,0,.2);
23+
border-right: 1px solid rgba(0, 0, 0, 0.2);
2324
}
2425
&.btn-lg {
2526
padding-left: @height-lg + @padding-large-horizontal;
@@ -56,7 +57,7 @@
5657
:first-child {
5758
border: none;
5859
text-align: center;
59-
width: 100%!important;
60+
width: 100% !important;
6061
}
6162
&.btn-lg {
6263
height: @height-lg;
@@ -80,7 +81,7 @@
8081

8182
.btn-social(@color-bg, @color: #fff) {
8283
background-color: @color-bg;
83-
.button-variant(@color, @color-bg, rgba(0,0,0,.2));
84+
.button-variant(@color, @color-bg, rgba(0,0,0,0.2));
8485
}
8586

8687
.auth {
@@ -97,17 +98,45 @@
9798
}
9899
}
99100

100-
.btn-azure_ad { .btn-social(#307ea7); }
101-
.btn-bitbucket { .btn-social(#205081); }
102-
.btn-dropbox { .btn-social(#007ee5); }
103-
.btn-facebook { .btn-social(#3b5998); }
104-
.btn-github { .btn-social(#444444); }
105-
.btn-google { .btn-social(#dd4b39); }
106-
.btn-instagram { .btn-social(#3f729b); }
107-
.btn-linkedin { .btn-social(#007bb6); }
108-
.btn-mailru { .btn-social(#168de2); }
109-
.btn-microsoft { .btn-social(#2672ec); }
110-
.btn-reddit { .btn-social(#eff7ff, #000); }
111-
.btn-twitter { .btn-social(#55acee); }
112-
.btn-vk { .btn-social(#587ea3); }
113-
.btn-yahoo { .btn-social(#720e9e); }
101+
.btn-azure_ad {
102+
.btn-social(#307ea7);
103+
}
104+
.btn-bitbucket {
105+
.btn-social(#205081);
106+
}
107+
.btn-dropbox {
108+
.btn-social(#007ee5);
109+
}
110+
.btn-facebook {
111+
.btn-social(#3b5998);
112+
}
113+
.btn-github {
114+
.btn-social(#444444);
115+
}
116+
.btn-google {
117+
.btn-social(#dd4b39);
118+
}
119+
.btn-instagram {
120+
.btn-social(#3f729b);
121+
}
122+
.btn-linkedin {
123+
.btn-social(#007bb6);
124+
}
125+
.btn-mailru {
126+
.btn-social(#168de2);
127+
}
128+
.btn-microsoft {
129+
.btn-social(#2672ec);
130+
}
131+
.btn-reddit {
132+
.btn-social(#eff7ff, #000);
133+
}
134+
.btn-twitter {
135+
.btn-social(#55acee);
136+
}
137+
.btn-vk {
138+
.btn-social(#587ea3);
139+
}
140+
.btn-yahoo {
141+
.btn-social(#720e9e);
142+
}

main/static/src/style/style.less

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
@import "../../ext/font-awesome/less/font-awesome";
2-
@import "../../ext/bootstrap/less/bootstrap";
1+
@import '../../ext/font-awesome/less/font-awesome';
2+
@import '../../ext/bootstrap/less/bootstrap';
33

4-
@import "base";
5-
@import "variables";
6-
@import "test";
7-
@import "mixins";
8-
@import "footer";
9-
@import "signin";
10-
@import "user";
4+
@import 'base';
5+
@import 'variables';
6+
@import 'test';
7+
@import 'mixins';
8+
@import 'footer';
9+
@import 'signin';
10+
@import 'user';

main/static/src/style/variables.less

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@fa-font-path: "/p/ext/font-awesome/fonts";
2-
@icon-font-path: "/p/ext/bootstrap/fonts/";
1+
@fa-font-path: '/p/ext/font-awesome/fonts';
2+
@icon-font-path: '/p/ext/bootstrap/fonts/';
33

4-
@footer-height: @line-height-computed * 5;
4+
@footer-height: @line-height-computed * 5;

0 commit comments

Comments
 (0)