Skip to content

Commit b7d673a

Browse files
author
Walker Leite
committed
fix(lint): fix lint errors
1 parent b550d32 commit b7d673a

File tree

16 files changed

+71
-36
lines changed

16 files changed

+71
-36
lines changed

.editorconfig

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

.eslintignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
test-project
2-
template
2+
template

.eslintrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@
2020
"require": true,
2121
"request": true
2222
}
23-
}
23+
}

template/.eslintrc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@
2525
"gulp-tasks/**/*.js"
2626
]
2727
}
28-
]
28+
],
29+
"import/extensions": "off",
30+
"no-param-reassign": "off"
2931
},
3032
"globals": {
3133
"expect": true,

template/client/store/modules/auth/actions.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ export function syncToken({commit, dispatch}) {
1414
/**
1515
* Sync router for auth
1616
*/
17-
export function syncRouter({state, dispatch}, router) {
17+
export function syncRouter({state, dispatch}, myRouter) {
1818
dispatch('syncToken');
1919

20-
router.beforeEach((to, from, next) => {
20+
myRouter.beforeEach((to, from, next) => {
2121
if (to.matched.some(record => record.meta.requiresAuth)) {
2222
// this route requires auth, check if logged in
2323
// if not, redirect to login page (except when it's profile route and
@@ -103,7 +103,7 @@ export function loadAccount({commit}, userId) {
103103
* @param {String} newPassword new password
104104
* @return {Promise} promise of the password reset
105105
*/
106-
export function resetPassword({commit, state}, {oldPassword, newPassword}) {
106+
export function resetPassword(ctx, {oldPassword, newPassword}) {
107107
return loopback
108108
.post(
109109
'/Accounts/change-password',
@@ -117,7 +117,7 @@ export function resetPassword({commit, state}, {oldPassword, newPassword}) {
117117
* @param {String} email user email
118118
* @return {Promise} promise of the sent email
119119
*/
120-
export function rememberPassword({commit}, email) {
120+
export function rememberPassword(ctx, email) {
121121
return loopback
122122
.post('/Accounts/reset', {email});
123123
}

template/client/view/mixins/notification.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable no-unused-vars */
12
export default {
23
methods: {
34
notifySuccess(msg) {

template/common/models/message.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable no-param-reassign */
12
export default function(Message) {
23
Message.greet = (msg, cb) => {
34
process.nextTick(() => {

template/gulp-tasks/build.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,13 @@ gulp.task('build:client', ['copy:client'], () => {
6565
.pipe(gulp.dest(dirs.buildClient));
6666
});
6767

68-
gulp.task('build:common', () => gulp.src(path.resolve(dirs.srcCommon, '**/*.js'))
69-
.pipe(sourcemaps.init())
70-
.pipe(babel())
71-
.pipe(sourcemaps.write('.'))
72-
.pipe(gulp.dest(dirs.buildCommon)));
68+
gulp.task('build:common', () => {
69+
return gulp.src(path.resolve(dirs.srcCommon, '**/*.js'))
70+
.pipe(sourcemaps.init())
71+
.pipe(babel())
72+
.pipe(sourcemaps.write('.'))
73+
.pipe(gulp.dest(dirs.buildCommon));
74+
})
7375

7476
gulp.task('build:server', ['copy:server'], () => gulp.src([
7577
path.resolve(dirs.srcServer, '**/*.js'),

template/gulp-tasks/compilers.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint no-useless-escape: 0, import/prefer-default-export: 0 */
12
import path from 'path';
23
import sass from 'vueify/lib/compilers/sass';
34
import {dirs} from './config';
@@ -12,19 +13,20 @@ function replaceCuringas(content) {
1213
}
1314

1415
export function customSass(content, callback, compiler, filePath) {
16+
let myContent = content
1517
const relativePath = path.relative(
1618
path.dirname(filePath),
1719
path.resolve(dirs.srcClient, 'style/global.scss')
1820
);
1921

2022
// Global SCSS
2123
//
22-
content = `@import "${relativePath}";${content}`;
24+
myContent = `@import "${relativePath}";${myContent}`;
2325

24-
content = replaceCuringas(content);
26+
myContent = replaceCuringas(myContent);
2527

2628
sass(
27-
content,
29+
myContent,
2830
callback,
2931
compiler,
3032
filePath

template/gulp-tasks/config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable import/prefer-default-export */
12
import path from 'path';
23

34
export const dirs = {};

0 commit comments

Comments
 (0)