Skip to content

Add rule exceptions for prettier #28

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 31, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions .commitlintrc.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
'use strict';

module.exports = {
extends: ['@commitlint/config-conventional']
extends: ["@commitlint/config-conventional"],
};
13 changes: 7 additions & 6 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 @@ -6,13 +12,8 @@ insert_final_newline = true
indent_style = space
indent_size = 2

[*.{html,css,hbs,js}]
indent_style = tab
indent_size = tab
tab_width = 4

[*.hbs]
insert_final_newline = false

[*.md]
[*.{diff,md}]
trim_trailing_whitespace = false
21 changes: 18 additions & 3 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,22 @@
# unconventional js
/blueprints/*/files/
/vendor/

# compiled output
/dist/
/tmp/

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

# misc
coverage/
/coverage/
!.*
.*/
.eslintcache

# ember-try
/.node_modules.ember-try/
/bower.json.ember-try
/package.json.ember-try
23 changes: 10 additions & 13 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
'use strict';

module.exports = {
root: true,
parserOptions: {
sourceType: 'script'
},
extends: [
'plugin:node/recommended',
'eslint-config-bbva'
],
plugins: [
'node'
]
root: true,
parserOptions: {
sourceType: "script",
},
plugins: ["node", "prettier"],
extends: [
"plugin:node/recommended",
"plugin:prettier/recommended",
"eslint-config-bbva",
],
};
55 changes: 55 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: CI
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
name: Test
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up node
uses: actions/setup-node@v2
with:
node-version: 12
cache: yarn
- name: Install dependencies
run: yarn install
- name: Test
run: yarn test
- name: Upload codecov
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./packages/*/coverage/lcov.info
fail_ci_if_error: true
release:
if: github.ref == 'refs/heads/master'
needs: [test]
runs-on: ubuntu-latest
name: Release
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
token: ${{ secrets.GH_TOKEN }}
- name: Set up node
uses: actions/setup-node@v2
with:
node-version: 12
registry-url: "https://registry.npmjs.org"
- name: Configure CI Git User
run: |
git config --global user.email adrigzr@users.noreply.github.com
git config --global user.name adrigzr
- name: Install dependencies
run: yarn install
- name: Release
run: |
yarn build
lerna version --yes
lerna publish from-package --yes
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
27 changes: 22 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,28 @@
# See https://help.github.com/ignore-files/ for more about ignoring files.

# compiled output
/dist/
/tmp/

# dependencies
node_modules/
/bower_components/
node_modules

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

# ember-try
/.node_modules.ember-try/
/bower.json.ember-try
/package.json.ember-try
1 change: 1 addition & 0 deletions .husky/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn commitlint --edit "$1"
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn lint-staged
4 changes: 4 additions & 0 deletions .husky/pre-push
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn test
8 changes: 0 additions & 8 deletions .huskyrc.js

This file was deleted.

47 changes: 0 additions & 47 deletions .jsbeautifyrc

This file was deleted.

22 changes: 22 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,14 +1,36 @@
# compiled output
/dist/
/tmp/

# dependencies
/bower_components/

# misc
/.bowerrc
/.editorconfig
/.ember-cli
/.env*
/.eslintcache
/.eslintignore
/.eslintrc.js
/.git/
/.gitignore
/.prettierignore
/.prettierrc.js
/.template-lintrc.js
/.travis.yml
/.watchmanconfig
/bower.json
/config/ember-try.js
/CONTRIBUTING.md
/ember-cli-build.js
/testem.js
/tests/
/yarn-error.log
/yarn.lock
.gitkeep

# ember-try
/.node_modules.ember-try/
/bower.json.ember-try
/package.json.ember-try
2 changes: 1 addition & 1 deletion .npmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
//registry.npmjs.org/:_authToken=${NPM_TOKEN}
scripts-prepend-node-path=true
24 changes: 24 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# unconventional js
/blueprints/*/files/
/vendor/

# compiled output
/dist/
/tmp/

# dependencies
/bower_components/
/node_modules/

# misc
coverage
.nyc_output
!.*
.eslintcache
*.html
*.hbs

# ember-try
/.node_modules.ember-try/
/bower.json.ember-try
/package.json.ember-try
1 change: 1 addition & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = {};
51 changes: 0 additions & 51 deletions .travis.yml

This file was deleted.

14 changes: 7 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,22 @@ This doc outlines the details of collaborating on this Ember addon.

## Installation

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

## Eslint

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

## Running Tests

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

## Building

* `ember build`
- `ember build`

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