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

Commit 2f2f968

Browse files
ricardogobbosouzaclarkdo
authored andcommitted
refactor: replace eslint-loader in extend with eslint-module (#244)
1 parent 9c31232 commit 2f2f968

File tree

4 files changed

+5
-13
lines changed

4 files changed

+5
-13
lines changed

template/_package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@
5757
"devDependencies": {
5858
"nodemon": "^1.18.9"<% if (eslint === 'yes') { %>,
5959
"@nuxtjs/eslint-config": "^0.0.1",
60+
"@nuxtjs/eslint-module": "^0.0.1",
6061
"babel-eslint": "^10.0.1",
6162
"eslint": "^5.15.1",
6263
"eslint-config-standard": ">=12.0.0",
@@ -66,7 +67,6 @@
6667
"eslint-plugin-nuxt": ">=0.4.2",
6768
"eslint-plugin-promise": ">=4.0.1",
6869
"eslint-plugin-standard": ">=4.0.0",
69-
"eslint-loader": "^2.1.2",
7070
"eslint-plugin-vue": "^5.2.2"<% } %><% if (prettier === 'yes') { %>,
7171
"eslint-config-prettier": "^4.1.0",
7272
"eslint-plugin-prettier": "^3.0.1",

template/nuxt/nuxt.config.js

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,8 @@ module.exports = {
7979
'@nuxtjs/bulma',<% } %><% if (ui === 'buefy') { %>
8080
// Doc: https://buefy.github.io/#/documentation
8181
'nuxt-buefy',<% } %><% if (pwa === 'yes') { %>
82-
'@nuxtjs/pwa',<% } %>
82+
'@nuxtjs/pwa',<% } %><% if (eslint === 'yes') { %>
83+
'@nuxtjs/eslint-module',<% } %>
8384
],
8485
<% if (axios === 'yes') { %>
8586
/*
@@ -112,16 +113,7 @@ module.exports = {
112113
/*
113114
** You can extend webpack config here
114115
*/
115-
extend(config, ctx) {<% if (eslint === 'yes') { %>
116-
// Run ESLint on save
117-
if (ctx.isDev && ctx.isClient) {
118-
config.module.rules.push({
119-
enforce: 'pre',
120-
test: /\.(js|vue)$/,
121-
loader: 'eslint-loader',
122-
exclude: /(node_modules)/
123-
})
124-
}<% } %>
116+
extend(config, ctx) {
125117
}
126118
}
127119
}

test/snapshots/index.test.js.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,10 +178,10 @@ Generated by [AVA](https://ava.li).
178178
},
179179
devDependencies: {
180180
'@nuxtjs/eslint-config': '^0.0.1',
181+
'@nuxtjs/eslint-module': '^0.0.1',
181182
'babel-eslint': '^10.0.1',
182183
eslint: '^5.15.1',
183184
'eslint-config-standard': '>=12.0.0',
184-
'eslint-loader': '^2.1.2',
185185
'eslint-plugin-import': '>=2.16.0',
186186
'eslint-plugin-jest': '>=22.3.0',
187187
'eslint-plugin-node': '>=8.0.1',

test/snapshots/index.test.js.snap

-5 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)