From 29b8334b060dc0c05a509d523ead4b3a30229fef Mon Sep 17 00:00:00 2001 From: vantezzen Date: Thu, 5 Sep 2019 11:22:49 +0200 Subject: Add eslint --- config/app.js | 23 +++++++++++------------ config/auth.js | 17 ++++++++--------- config/bodyParser.js | 21 ++++++++++----------- config/cors.js | 5 ++--- config/database.js | 21 ++++++++++----------- config/drive.js | 17 +++++++---------- config/hash.js | 11 +++++------ config/session.js | 13 ++++++------- config/shield.js | 13 ++++++------- 9 files changed, 65 insertions(+), 76 deletions(-) (limited to 'config') diff --git a/config/app.js b/config/app.js index 4b4f7a5..4d36c7b 100644 --- a/config/app.js +++ b/config/app.js @@ -1,7 +1,6 @@ -'use strict' /** @type {import('@adonisjs/framework/src/Env')} */ -const Env = use('Env') +const Env = use('Env'); module.exports = { @@ -94,7 +93,7 @@ module.exports = { | response.send('Hello', { ignoreEtag: true }) | */ - etag: false + etag: false, }, views: { @@ -107,7 +106,7 @@ module.exports = { | production to optimize view loading time. | */ - cache: Env.get('CACHE_VIEWS', true) + cache: Env.get('CACHE_VIEWS', true), }, static: { @@ -146,7 +145,7 @@ module.exports = { | that exists will be served. Example: ['html', 'htm']. | */ - extensions: false + extensions: false, }, locales: { @@ -173,7 +172,7 @@ module.exports = { | based on HTTP headers/query string. | */ - locale: 'en' + locale: 'en', }, logger: { @@ -202,7 +201,7 @@ module.exports = { console: { driver: 'console', name: 'adonis-app', - level: 'info' + level: 'info', }, /* @@ -220,8 +219,8 @@ module.exports = { driver: 'file', name: 'adonis-app', filename: 'adonis.log', - level: 'info' - } + level: 'info', + }, }, /* @@ -238,6 +237,6 @@ module.exports = { httpOnly: true, sameSite: false, path: '/', - maxAge: 7200 - } -} + maxAge: 7200, + }, +}; diff --git a/config/auth.js b/config/auth.js index c70db3f..b831b06 100644 --- a/config/auth.js +++ b/config/auth.js @@ -1,7 +1,6 @@ -'use strict' /** @type {import('@adonisjs/framework/src/Env')} */ -const Env = use('Env') +const Env = use('Env'); module.exports = { /* @@ -32,7 +31,7 @@ module.exports = { model: 'App/Models/User', scheme: 'session', uid: 'email', - password: 'password' + password: 'password', }, /* @@ -53,7 +52,7 @@ module.exports = { model: 'App/Models/User', scheme: 'basic', uid: 'email', - password: 'password' + password: 'password', }, /* @@ -72,8 +71,8 @@ module.exports = { uid: 'email', password: 'password', options: { - secret: Env.get('APP_KEY') - } + secret: Env.get('APP_KEY'), + }, }, /* @@ -89,6 +88,6 @@ module.exports = { model: 'App/Models/User', scheme: 'api', uid: 'email', - password: 'password' - } -} + password: 'password', + }, +}; diff --git a/config/bodyParser.js b/config/bodyParser.js index f04d291..c336e67 100644 --- a/config/bodyParser.js +++ b/config/bodyParser.js @@ -1,4 +1,3 @@ -'use strict' module.exports = { /* @@ -47,8 +46,8 @@ module.exports = { 'application/json', 'application/json-patch+json', 'application/vnd.api+json', - 'application/csp-report' - ] + 'application/csp-report', + ], }, /* @@ -61,8 +60,8 @@ module.exports = { */ raw: { types: [ - 'text/*' - ] + 'text/*', + ], }, /* @@ -75,8 +74,8 @@ module.exports = { */ form: { types: [ - 'application/x-www-form-urlencoded' - ] + 'application/x-www-form-urlencoded', + ], }, /* @@ -89,7 +88,7 @@ module.exports = { */ files: { types: [ - 'multipart/form-data' + 'multipart/form-data', ], /* @@ -133,7 +132,7 @@ module.exports = { | is to true. Otherwise everything is processed manually. | */ - processManually: [] + processManually: [], /* |-------------------------------------------------------------------------- @@ -153,5 +152,5 @@ module.exports = { | } | */ - } -} + }, +}; diff --git a/config/cors.js b/config/cors.js index ffc1951..7ebbe3f 100644 --- a/config/cors.js +++ b/config/cors.js @@ -1,4 +1,3 @@ -'use strict' module.exports = { /* @@ -83,5 +82,5 @@ module.exports = { | Define Access-Control-Allow-Max-Age | */ - maxAge: 90 -} + maxAge: 90, +}; diff --git a/config/database.js b/config/database.js index a7a2776..0e9cfba 100644 --- a/config/database.js +++ b/config/database.js @@ -1,10 +1,9 @@ -'use strict' /** @type {import('@adonisjs/framework/src/Env')} */ -const Env = use('Env') +const Env = use('Env'); /** @type {import('@adonisjs/ignitor/src/Helpers')} */ -const Helpers = use('Helpers') +const Helpers = use('Helpers'); module.exports = { /* @@ -32,10 +31,10 @@ module.exports = { sqlite: { client: 'sqlite3', connection: { - filename: Helpers.databasePath(`${Env.get('DB_DATABASE', 'development')}.sqlite`) + filename: Helpers.databasePath(`${Env.get('DB_DATABASE', 'development')}.sqlite`), }, useNullAsDefault: true, - debug: Env.get('DB_DEBUG', false) + debug: Env.get('DB_DEBUG', false), }, /* @@ -55,9 +54,9 @@ module.exports = { port: Env.get('DB_PORT', ''), user: Env.get('DB_USER', 'root'), password: Env.get('DB_PASSWORD', ''), - database: Env.get('DB_DATABASE', 'adonis') + database: Env.get('DB_DATABASE', 'adonis'), }, - debug: Env.get('DB_DEBUG', false) + debug: Env.get('DB_DEBUG', false), }, /* @@ -77,8 +76,8 @@ module.exports = { port: Env.get('DB_PORT', ''), user: Env.get('DB_USER', 'root'), password: Env.get('DB_PASSWORD', ''), - database: Env.get('DB_DATABASE', 'adonis') + database: Env.get('DB_DATABASE', 'adonis'), }, - debug: Env.get('DB_DEBUG', false) - } -} + debug: Env.get('DB_DEBUG', false), + }, +}; diff --git a/config/drive.js b/config/drive.js index 901e699..617ce47 100644 --- a/config/drive.js +++ b/config/drive.js @@ -1,7 +1,4 @@ -'use strict' - -const Helpers = use('Helpers') -const Env = use('Env') +const Env = use('Env'); module.exports = { /* @@ -25,8 +22,8 @@ module.exports = { | */ local: { - root: __dirname + '/../recipes', - driver: 'local' + root: `${__dirname}/../recipes`, + driver: 'local', }, /* @@ -42,7 +39,7 @@ module.exports = { key: Env.get('S3_KEY'), secret: Env.get('S3_SECRET'), bucket: Env.get('S3_BUCKET'), - region: Env.get('S3_REGION') - } - } -} + region: Env.get('S3_REGION'), + }, + }, +}; diff --git a/config/hash.js b/config/hash.js index 42f5805..297c977 100644 --- a/config/hash.js +++ b/config/hash.js @@ -1,7 +1,6 @@ -'use strict' /** @type {import('@adonisjs/framework/src/Env')} */ -const Env = use('Env') +const Env = use('Env'); module.exports = { /* @@ -25,7 +24,7 @@ module.exports = { | */ bcrypt: { - rounds: 10 + rounds: 10, }, /* @@ -44,6 +43,6 @@ module.exports = { | */ argon: { - type: 1 - } -} + type: 1, + }, +}; diff --git a/config/session.js b/config/session.js index f49b9b7..bce28bd 100644 --- a/config/session.js +++ b/config/session.js @@ -1,6 +1,5 @@ -'use strict' -const Env = use('Env') +const Env = use('Env'); module.exports = { /* @@ -65,7 +64,7 @@ module.exports = { cookie: { httpOnly: true, path: '/', - sameSite: false + sameSite: false, }, /* @@ -78,7 +77,7 @@ module.exports = { | */ file: { - location: 'sessions' + location: 'sessions', }, /* @@ -94,6 +93,6 @@ module.exports = { port: 6379, password: null, db: 0, - keyPrefix: '' - } -} + keyPrefix: '', + }, +}; diff --git a/config/shield.js b/config/shield.js index 3d4526a..5c1c5cd 100644 --- a/config/shield.js +++ b/config/shield.js @@ -1,4 +1,3 @@ -'use strict' module.exports = { /* @@ -64,7 +63,7 @@ module.exports = { | if you want to know the behavior. https://github.com/helmetjs/helmet/pull/82 | */ - disableAndroid: true + disableAndroid: true, }, /* @@ -80,7 +79,7 @@ module.exports = { */ xss: { enabled: true, - enableOnOldIE: false + enableOnOldIE: false, }, /* @@ -139,7 +138,7 @@ module.exports = { httpOnly: false, sameSite: true, path: '/', - maxAge: 7200 - } - } -} + maxAge: 7200, + }, + }, +}; -- cgit v1.2.3-54-g00ecf