Skip to content

Commit 73eb29e

Browse files
authored
Merge pull request #28 from BBVAEngineering/feature-prettier
2 parents 7554f49 + d99e0a4 commit 73eb29e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+4741
-4287
lines changed

.commitlintrc.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
'use strict';
2-
31
module.exports = {
4-
extends: ['@commitlint/config-conventional']
2+
extends: ["@commitlint/config-conventional"],
53
};

.editorconfig

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
# EditorConfig helps developers define and maintain consistent
2+
# coding styles between different editors and IDEs
3+
# editorconfig.org
4+
5+
root = true
6+
17
[*]
28
end_of_line = lf
39
charset = utf-8
@@ -6,13 +12,8 @@ insert_final_newline = true
612
indent_style = space
713
indent_size = 2
814

9-
[*.{html,css,hbs,js}]
10-
indent_style = tab
11-
indent_size = tab
12-
tab_width = 4
13-
1415
[*.hbs]
1516
insert_final_newline = false
1617

17-
[*.md]
18+
[*.{diff,md}]
1819
trim_trailing_whitespace = false

.eslintignore

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,22 @@
1+
# unconventional js
2+
/blueprints/*/files/
3+
/vendor/
4+
5+
# compiled output
6+
/dist/
7+
/tmp/
8+
19
# dependencies
2-
bower_components/
3-
node_modules/
10+
/bower_components/
11+
/node_modules/
412

513
# misc
6-
coverage/
14+
/coverage/
715
!.*
16+
.*/
17+
.eslintcache
18+
19+
# ember-try
20+
/.node_modules.ember-try/
21+
/bower.json.ember-try
22+
/package.json.ember-try

.eslintrc.js

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
1-
'use strict';
2-
31
module.exports = {
4-
root: true,
5-
parserOptions: {
6-
sourceType: 'script'
7-
},
8-
extends: [
9-
'plugin:node/recommended',
10-
'eslint-config-bbva'
11-
],
12-
plugins: [
13-
'node'
14-
]
2+
root: true,
3+
parserOptions: {
4+
sourceType: "script",
5+
},
6+
plugins: ["node", "prettier"],
7+
extends: [
8+
"plugin:node/recommended",
9+
"plugin:prettier/recommended",
10+
"eslint-config-bbva",
11+
],
1512
};

.github/workflows/ci.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: CI
2+
on: [push, pull_request]
3+
jobs:
4+
test:
5+
runs-on: ubuntu-latest
6+
name: Test
7+
steps:
8+
- name: Checkout
9+
uses: actions/checkout@v2
10+
- name: Set up node
11+
uses: actions/setup-node@v2
12+
with:
13+
node-version: 12
14+
cache: yarn
15+
- name: Install dependencies
16+
run: yarn install
17+
- name: Test
18+
run: yarn test
19+
- name: Upload codecov
20+
uses: codecov/codecov-action@v1
21+
with:
22+
token: ${{ secrets.CODECOV_TOKEN }}
23+
files: ./packages/*/coverage/lcov.info
24+
fail_ci_if_error: true
25+
release:
26+
if: github.ref == 'refs/heads/master'
27+
needs: [test]
28+
runs-on: ubuntu-latest
29+
name: Release
30+
steps:
31+
- name: Checkout
32+
uses: actions/checkout@v2
33+
with:
34+
fetch-depth: 0
35+
token: ${{ secrets.GH_TOKEN }}
36+
- name: Set up node
37+
uses: actions/setup-node@v2
38+
with:
39+
node-version: 12
40+
registry-url: "https://registry.npmjs.org"
41+
- name: Configure CI Git User
42+
run: |
43+
git config --global user.email adrigzr@users.noreply.github.com
44+
git config --global user.name adrigzr
45+
- name: Install dependencies
46+
run: yarn install
47+
- name: Release
48+
run: |
49+
yarn build
50+
lerna version --yes
51+
lerna publish from-package --yes
52+
env:
53+
GH_TOKEN: ${{ secrets.GH_TOKEN }}
54+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
55+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.gitignore

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,28 @@
11
# See https://help.github.com/ignore-files/ for more about ignoring files.
22

3+
# compiled output
4+
/dist/
5+
/tmp/
6+
37
# dependencies
4-
node_modules/
8+
/bower_components/
9+
node_modules
510

611
# misc
7-
coverage/
8-
npm-debug.log*
9-
yarn-error.log
10-
/tags*
12+
.DS_Store
13+
/.env*
14+
/.pnp*
15+
/.sass-cache
16+
/.eslintcache
1117
.nyc_output
18+
/connect.lock
19+
coverage
20+
/libpeerconnection.log
21+
/npm-debug.log*
22+
/testem.log
23+
/yarn-error.log
24+
25+
# ember-try
26+
/.node_modules.ember-try/
27+
/bower.json.ember-try
28+
/package.json.ember-try

.husky/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
_

.husky/commit-msg

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
yarn commitlint --edit "$1"

.husky/pre-commit

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
yarn lint-staged

.husky/pre-push

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
yarn test

.huskyrc.js

Lines changed: 0 additions & 8 deletions
This file was deleted.

.jsbeautifyrc

Lines changed: 0 additions & 47 deletions
This file was deleted.

.npmignore

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,36 @@
1+
# compiled output
2+
/dist/
3+
/tmp/
4+
5+
# dependencies
6+
/bower_components/
7+
18
# misc
29
/.bowerrc
310
/.editorconfig
411
/.ember-cli
512
/.env*
13+
/.eslintcache
614
/.eslintignore
715
/.eslintrc.js
16+
/.git/
817
/.gitignore
18+
/.prettierignore
19+
/.prettierrc.js
920
/.template-lintrc.js
1021
/.travis.yml
1122
/.watchmanconfig
23+
/bower.json
24+
/config/ember-try.js
1225
/CONTRIBUTING.md
26+
/ember-cli-build.js
27+
/testem.js
28+
/tests/
29+
/yarn-error.log
1330
/yarn.lock
1431
.gitkeep
32+
33+
# ember-try
34+
/.node_modules.ember-try/
35+
/bower.json.ember-try
36+
/package.json.ember-try

.npmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
//registry.npmjs.org/:_authToken=${NPM_TOKEN}
1+
scripts-prepend-node-path=true

.prettierignore

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# unconventional js
2+
/blueprints/*/files/
3+
/vendor/
4+
5+
# compiled output
6+
/dist/
7+
/tmp/
8+
9+
# dependencies
10+
/bower_components/
11+
/node_modules/
12+
13+
# misc
14+
coverage
15+
.nyc_output
16+
!.*
17+
.eslintcache
18+
*.html
19+
*.hbs
20+
21+
# ember-try
22+
/.node_modules.ember-try/
23+
/bower.json.ember-try
24+
/package.json.ember-try

.prettierrc.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = {};

.travis.yml

Lines changed: 0 additions & 51 deletions
This file was deleted.

CONTRIBUTING.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,22 @@ This doc outlines the details of collaborating on this Ember addon.
44

55
## Installation
66

7-
* `git clone <repository-url>` this repository
8-
* `cd <repository-name>`
9-
* `npm install`
7+
- `git clone <repository-url>` this repository
8+
- `cd <repository-name>`
9+
- `npm install`
1010

1111
## Eslint
1212

1313
You need to follow our [eslint](https://github.com/BBVAEngineering/javascript/tree/master/eslint-config-bbva) rules.
1414

1515
## Running Tests
1616

17-
* `npm test` (Runs `ember try:each` to test your addon against multiple Ember versions)
18-
* `ember test`
19-
* `ember test --server`
17+
- `npm test` (Runs `ember try:each` to test your addon against multiple Ember versions)
18+
- `ember test`
19+
- `ember test --server`
2020

2121
## Building
2222

23-
* `ember build`
23+
- `ember build`
2424

2525
For more information on using ember-cli, visit [https://ember-cli.com/](https://ember-cli.com/).

0 commit comments

Comments
 (0)