Skip to content

Commit

Permalink
Merge pull request #129 from BBVAEngineering/feature-transition-end
Browse files Browse the repository at this point in the history
House keeping
  • Loading branch information
adrigzr authored Sep 28, 2020
2 parents b1de821 + 286436b commit 6d7816f
Show file tree
Hide file tree
Showing 46 changed files with 15,099 additions and 26,031 deletions.
3 changes: 0 additions & 3 deletions .commitlintrc.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
/* eslint-env node */
'use strict';

module.exports = {
extends: ['@commitlint/config-conventional']
};
10 changes: 8 additions & 2 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# EditorConfig helps developers define and maintain consistent
# coding styles between different editors and IDEs
# editorconfig.org

root = true

[*]
end_of_line = lf
charset = utf-8
Expand All @@ -11,8 +17,8 @@ indent_style = tab
indent_size = tab
tab_width = 4

[*.hbs]
[*.{hbs,yml,yaml}]
insert_final_newline = false

[*.md]
[*.{diff,md}]
trim_trailing_whitespace = false
78 changes: 42 additions & 36 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,52 +1,58 @@
module.exports = {
root: true,
parser: 'babel-eslint',
parserOptions: {
ecmaVersion: 2017,
sourceType: 'module'
ecmaVersion: 2018,
sourceType: 'module',
ecmaFeatures: {
legacyDecorators: true
}
},
plugins: [
'ember'
'ember',
'bbva'
],
extends: [
'eslint:recommended',
'plugin:ember/recommended',
'eslint-config-bbva'
],
env: {
browser: true
},
rules: {
'ember/no-jquery': 'error'
},
overrides: [
// node files
{
files: [
'.eslintrc.js',
'.template-lintrc.js',
'ember-cli-build.js',
'index.js',
'testem.js',
'blueprints/*/index.js',
'config/**/*.js',
'tests/dummy/config/**/*.js'
],
excludedFiles: [
'addon/**',
'addon-test-support/**',
'app/**',
'tests/dummy/app/**'
],
parserOptions: {
sourceType: 'script',
ecmaVersion: 2017
},
env: {
browser: false,
node: true
},
plugins: ['node'],
rules: Object.assign({}, require('eslint-plugin-node').configs.recommended.rules, {
// add your custom rules and overrides for node files here
'no-process-env': 0
})
overrides: [{
files: [
'.huskyrc.js',
'.commitlintrc.js',
'.eslintrc.js',
'.template-lintrc.js',
'ember-cli-build.js',
'index.js',
'testem.js',
'blueprints/*/index.js',
'config/**/*.js',
'tests/dummy/config/**/*.js'
],
excludedFiles: [
'addon/**',
'addon-test-support/**',
'app/**',
'tests/dummy/app/**'
],
parserOptions: {
sourceType: 'script'
},
env: {
browser: false,
node: true
},
plugins: ['node'],
extends: ['plugin:node/recommended'],
rules: {
'no-process-env': 0
}
]
}]
};
26 changes: 14 additions & 12 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,26 +1,28 @@
# See https://help.github.com/ignore-files/ for more about ignoring files.

# compiled output
/dist
/tmp
/dist/
/tmp/

# dependencies
/node_modules
/bower_components
/bower_components/
/node_modules/

# misc
/.env*
/.pnp*
/.sass-cache
/connect.lock
/coverage/*
/coverage/
/libpeerconnection.log
npm-debug.log*
yarn-error.log
testem.log
tags*
/npm-debug.log*
/testem.log
/yarn-error.log
/tags*
/.nyc_output
.DS_Store

# ember-try
.node_modules.ember-try/
bower.json.ember-try
package.json.ember-try
/.node_modules.ember-try/
/bower.json.ember-try
/package.json.ember-try
6 changes: 6 additions & 0 deletions .huskyrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
hooks: {
'commit-msg': 'commitlint -E HUSKY_GIT_PARAMS',
'pre-push': 'yarn test'
}
};
8 changes: 7 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,23 @@
/.bowerrc
/.editorconfig
/.ember-cli
/.ember-cli.js
/.env*
/.eslintignore
/.eslintrc.js
/.git/
/.gitignore
/.template-lintrc.js
/.commitlintrc.js
/.huskyrc.js
/.nycrc.json
/.releaserc
/greenkeeper.json
/jsconfig.json
/.travis.yml
/.watchmanconfig
/bower.json
/config/ember-try.js
/CONTRIBUTING.md
/ember-cli-build.js
/testem.js
/tests/
Expand Down
9 changes: 3 additions & 6 deletions .releaserc
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
{
"prepare": [
"@semantic-release/changelog",
"@semantic-release/npm",
"@semantic-release/git"
],
"verifyConditions": [
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@semantic-release/changelog",
"@semantic-release/npm",
"@semantic-release/git",
Expand Down
12 changes: 6 additions & 6 deletions .template-lintrc.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
'use strict';

module.exports = {
extends: 'recommended',

extends: 'octane',
rules: {
'no-bare-strings': true,
'block-indentation': 'tab',
Expand All @@ -13,12 +10,15 @@ module.exports = {
'deprecated-each-syntax': true,
'link-rel-noopener': true,
'no-invalid-interactive': true,
'img-alt-attributes': true,
'require-valid-alt-text': true,
'style-concatenation': true,
'deprecated-inline-view-helper': true,
'no-unused-block-params': true,
'inline-link-to': true,
'no-inline-styles': true,
'simple-unless': false
}
},
ignore: [
'tests/dummy/**'
]
};
44 changes: 15 additions & 29 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,75 +1,61 @@
---
language: node_js
node_js: stable
sudo: false
dist: trusty
node_js: "10"
dist: xenial

addons:
chrome: stable

cache:
directories:
- $HOME/.npm
cache: yarn

env:
global:
- JOBS=1

jobs:
fail_fast: true
fast_finish: true
allow_failures:
- env: EMBER_TRY_SCENARIO=ember-canary

include:
- stage: "Tests"
before_install:
- npm config set spin false
- npm install -g npm@6
- npm install -g codecov
- npm install -g greenkeeper-lockfile@1
- npm install -g @commitlint/travis-cli
- npm --version
install:
- if [[ $TRAVIS_BRANCH =~ greenkeeper || $TRAVIS_PULL_REQUEST_BRANCH =~ greenkeeper ]]; then npm install; else npm ci; fi
before_script:
- greenkeeper-lockfile-update
- yarn --version
script:
- commitlint-travis
- npm run lint:js
- npm run lint:hbs
- npm test
after_script:
- greenkeeper-lockfile-upload
- yarn lint:js
- yarn lint:hbs
- yarn test
- yarn semantic-release --dry-run --branches=$TRAVIS_BRANCH
after_success:
- codecov --file=coverage/lcov.info

- stage: "Regression Tests"
env: EMBER_TRY_SCENARIO=ember-lts-3.4
- env: EMBER_TRY_SCENARIO=ember-lts-3.8
env: EMBER_TRY_SCENARIO=ember-lts-3.16
- env: EMBER_TRY_SCENARIO=ember-lts-3.20
- env: EMBER_TRY_SCENARIO=ember-release
- env: EMBER_TRY_SCENARIO=ember-beta
- env: EMBER_TRY_SCENARIO=ember-canary
- env: EMBER_TRY_SCENARIO=ember-default-with-jquery
- env: EMBER_TRY_SCENARIO=ember-classic

- stage: "Release"
script: skip
deploy:
provider: script
skip_cleanup: true
script:
- npx semantic-release
script: yarn semantic-release

before_install:
- npm config set spin false
- npm install -g npm@6
- npm --version
- yarn --version

script:
- node_modules/.bin/ember try:one $EMBER_TRY_SCENARIO --skip-cleanup
- node_modules/.bin/ember try:one $EMBER_TRY_SCENARIO

stages:
- "Tests"
- "Regression Tests"
- name: "Release"
if: branch = master

34 changes: 15 additions & 19 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,26 @@
# Contributing

This doc outlines the details of collaborating on this Ember addon.
# How To Contribute

## Installation

* `git clone <repository-url>` this repository
* `cd <addon-name>`
* `npm install`

## Eslint
* `git clone <repository-url>`
* `cd my-addon`
* `yarn install`

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

## Running
* `yarn lint:hbs`
* `yarn lint:js`
* `yarn lint:js -- --fix`

* `ember serve`
* Visit your app at [http://localhost:4200](http://localhost:4200).
## Running tests

## Running Tests
* `ember test` – Runs the test suite on the current Ember version
* `ember test --server` – Runs the test suite in "watch mode"
* `ember try:each` – Runs the test suite against multiple Ember versions

* `npm test` (Runs `ember try:each` to test your addon against multiple Ember versions)
* `ember test`
* `ember test --server`
## Running the dummy application

## Building

* `ember build`
* `ember serve`
* Visit the dummy application at [http://localhost:4200](http://localhost:4200).

For more information on using ember-cli, visit [https://ember-cli.com/](https://ember-cli.com/).
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# The MIT License (MIT)

Copyright (c) 2018
Copyright (c) 2020

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ All the modals are shown in the modal container.

```html
{{! templates/application.hbs }}
{{modal-container}}
<ModalContainer/>
```

You can close all modals by using the `close` method.
Expand Down
Empty file removed addon/.gitkeep
Empty file.
Loading

0 comments on commit 6d7816f

Please sign in to comment.