Skip to content
This repository was archived by the owner on Mar 4, 2025. It is now read-only.

Commit c54c637

Browse files
chore: update eslint config (#285)
Co-authored-by: Xin Du (Clark) <clark.duxin@gmail.com>
1 parent d0407af commit c54c637

File tree

19 files changed

+500
-251
lines changed

19 files changed

+500
-251
lines changed

Diff for: package.json

+1-8
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,9 @@
3030
"validate-npm-package-name": "^3.0.0"
3131
},
3232
"devDependencies": {
33-
"@nuxtjs/eslint-config": "^0.0.1",
33+
"@nuxtjs/eslint-config": "^1.0.1",
3434
"ava": "^1.2.1",
3535
"eslint": "^5.13.0",
36-
"eslint-config-standard": "^12.0.0",
37-
"eslint-plugin-import": "^2.16.0",
38-
"eslint-plugin-jest": "^22.2.2",
39-
"eslint-plugin-node": "^8.0.1",
40-
"eslint-plugin-promise": "^4.0.1",
41-
"eslint-plugin-standard": "^4.0.0",
42-
"eslint-plugin-vue": "^5.1.0",
4336
"standard-version": "^5.0.1"
4437
},
4538
"authors": [

Diff for: saofile.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ module.exports = {
116116
default: 'universal'
117117
}
118118
],
119-
templateData() {
119+
templateData () {
120120
const pwa = this.answers.features.includes('pwa')
121121
const eslint = this.answers.linter.includes('eslint')
122122
const prettier = this.answers.linter.includes('prettier')
@@ -139,7 +139,7 @@ module.exports = {
139139
pmRun
140140
}
141141
},
142-
actions() {
142+
actions () {
143143
const validation = validate(this.answers.name)
144144
validation.warnings && validation.warnings.forEach((warn) => {
145145
console.warn('Warning:', warn)
@@ -217,7 +217,7 @@ module.exports = {
217217

218218
return actions
219219
},
220-
async completed() {
220+
async completed () {
221221
this.gitInit()
222222

223223
await this.npmInstall({ npmClient: this.answers.pm })

Diff for: template/_package.json

+2-9
Original file line numberDiff line numberDiff line change
@@ -109,18 +109,11 @@
109109
"stylus-loader": "^3.0.2",
110110
<%_ } _%>
111111
<%_ if (eslint) { _%>
112-
"@nuxtjs/eslint-config": "^0.0.1",
113-
"@nuxtjs/eslint-module": "^0.0.1",
112+
"@nuxtjs/eslint-config": "^1.0.1",
113+
"@nuxtjs/eslint-module": "^0.2.1",
114114
"babel-eslint": "^10.0.1",
115115
"eslint": "^5.15.1",
116-
"eslint-config-standard": ">=12.0.0",
117-
"eslint-plugin-import": ">=2.16.0",
118-
"eslint-plugin-jest": ">=22.3.0",
119-
"eslint-plugin-node": ">=8.0.1",
120116
"eslint-plugin-nuxt": ">=0.4.2",
121-
"eslint-plugin-promise": ">=4.0.1",
122-
"eslint-plugin-standard": ">=4.0.0",
123-
"eslint-plugin-vue": "^5.2.2",
124117
<%_ } _%>
125118
<%_ if (prettier) { _%>
126119
"eslint-config-prettier": "^4.1.0",

Diff for: template/frameworks/adonis/app/Commands/NuxtBuild.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class NuxtBuild extends Command {
1010
*
1111
* @return {String}
1212
*/
13-
static get signature() {
13+
static get signature () {
1414
return 'nuxtbuild'
1515
}
1616

@@ -20,7 +20,7 @@ class NuxtBuild extends Command {
2020
*
2121
* @return {String}
2222
*/
23-
static get description() {
23+
static get description () {
2424
return 'Build for production the nuxt.js application.'
2525
}
2626

@@ -31,7 +31,7 @@ class NuxtBuild extends Command {
3131
* @param {Object} args [description]
3232
* @param {Object} options [description]
3333
*/
34-
async handle(args, options) {
34+
async handle (args, options) {
3535
const nuxt = use('Service/Nuxt')
3636
this.info('Building nuxt.js application...')
3737
await new Builder(nuxt).build()

Diff for: template/frameworks/adonis/app/Controllers/Http/NuxtController.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
'use strict'
22

33
class NuxtController {
4-
constructor() {
4+
constructor () {
55
this.nuxt = use('Service/Nuxt')
66
}
77

8-
async render({ request: { request: req }, response: { response: res } }) {
8+
async render ({ request: { request: req }, response: { response: res } }) {
99
await new Promise((resolve, reject) => {
1010
this.nuxt.render(req, res, (promise) => {
1111
promise.then(resolve).catch(reject)

Diff for: template/frameworks/adonis/app/Models/User.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
const Model = use('Model')
44

55
class User extends Model {
6-
static boot() {
6+
static boot () {
77
super.boot()
88

99
/**
@@ -26,7 +26,7 @@ class User extends Model {
2626
*
2727
* @return {Object}
2828
*/
29-
tokens() {
29+
tokens () {
3030
return this.hasMany('App/Models/Token')
3131
}
3232
}

Diff for: template/frameworks/adonis/providers/NuxtProvider.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@ const { ServiceProvider } = require('@adonisjs/fold')
22
const { Nuxt, Builder } = require('nuxt<%= edge %>')
33

44
class NuxtProvider extends ServiceProvider {
5-
register() {
5+
register () {
66
this.app.singleton('Service/Nuxt', () => {
77
const config = this.app.use('Config').get('nuxt')
88
return new Nuxt(config)
99
})
1010
}
1111

12-
async boot() {
12+
async boot () {
1313
const Helpers = this.app.use('Helpers')
1414
if (!Helpers.isAceCommand()) {
1515
const nuxt = this.app.use('Service/Nuxt')

Diff for: template/frameworks/buefy/layouts/default.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454

5555
<script>
5656
export default {
57-
data() {
57+
data () {
5858
return {
5959
items: [
6060
{

Diff for: template/frameworks/express/server/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const app = express()
77
const config = require('../nuxt.config.js')
88
config.dev = process.env.NODE_ENV !== 'production'
99

10-
async function start() {
10+
async function start () {
1111
// Init Nuxt.js
1212
const nuxt = new Nuxt(config)
1313

Diff for: template/frameworks/fastify/server/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const fastify = require('fastify')({
77
const config = require('../nuxt.config.js')
88
config.dev = process.env.NODE_ENV !== 'production'
99

10-
async function start() {
10+
async function start () {
1111
// Instantiate nuxt.js
1212
const nuxt = new Nuxt(config)
1313

Diff for: template/frameworks/feathers/server/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const express = require('@feathersjs/express')
66

77
process.env.NODE_CONFIG_DIR = path.join(__dirname, 'config/')
88

9-
async function start() {
9+
async function start () {
1010
const app = express(feathers())
1111

1212
const { Nuxt, Builder } = require('nuxt<%= edge %>')

Diff for: template/frameworks/hapi/server/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ const consola = require('consola')
22
const Hapi = require('@hapi/hapi')
33
const HapiNuxt = require('@nuxtjs/hapi')
44

5-
async function start() {
5+
async function start () {
66
const server = new Hapi.Server({
77
host: process.env.HOST || '127.0.0.1',
88
port: process.env.PORT || 3000

Diff for: template/frameworks/koa/server/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const app = new Koa()
88
const config = require('../nuxt.config.js')
99
config.dev = app.env !== 'production'
1010

11-
async function start() {
11+
async function start () {
1212
// Instantiate nuxt.js
1313
const nuxt = new Nuxt(config)
1414

Diff for: template/frameworks/micro/server/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ const consola = require('consola')
33
const dispatch = require('micro-route/dispatch')
44
const { Nuxt, Builder } = require('nuxt<%= edge %>')
55

6-
async function start() {
6+
async function start () {
77
// Require nuxt config
88
const config = require('../nuxt.config.js')
99

Diff for: template/frameworks/vuetify/layouts/default.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@
9090

9191
<script>
9292
export default {
93-
data() {
93+
data () {
9494
return {
9595
clipped: false,
9696
drawer: false,

Diff for: template/frameworks/vuetify/layouts/error.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@ export default {
2121
default: null
2222
}
2323
},
24-
head() {
24+
head () {
2525
const title =
2626
this.error.statusCode === 404 ? this.pageNotFound : this.otherError
2727
return {
2828
title
2929
}
3030
},
31-
data() {
31+
data () {
3232
return {
3333
pageNotFound: '404 Not Found',
3434
otherError: 'An error occurred'

Diff for: test/snapshots/index.test.js.md

+2-9
Original file line numberDiff line numberDiff line change
@@ -342,18 +342,11 @@ Generated by [AVA](https://ava.li).
342342
nuxt: '^2.0.0',
343343
},
344344
devDependencies: {
345-
'@nuxtjs/eslint-config': '^0.0.1',
346-
'@nuxtjs/eslint-module': '^0.0.1',
345+
'@nuxtjs/eslint-config': '^1.0.1',
346+
'@nuxtjs/eslint-module': '^0.2.1',
347347
'babel-eslint': '^10.0.1',
348348
eslint: '^5.15.1',
349-
'eslint-config-standard': '>=12.0.0',
350-
'eslint-plugin-import': '>=2.16.0',
351-
'eslint-plugin-jest': '>=22.3.0',
352-
'eslint-plugin-node': '>=8.0.1',
353349
'eslint-plugin-nuxt': '>=0.4.2',
354-
'eslint-plugin-promise': '>=4.0.1',
355-
'eslint-plugin-standard': '>=4.0.0',
356-
'eslint-plugin-vue': '^5.2.2',
357350
nodemon: '^1.18.9',
358351
},
359352
private: true,

Diff for: test/snapshots/index.test.js.snap

-150 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)