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

Commit 1da2f0c

Browse files
committedDec 10, 2018
feat: move ssr to base
1 parent 4b32052 commit 1da2f0c

7 files changed

+7
-13
lines changed
 

‎docs/rules/no-globals-in-created.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
> disallow `window/document` in `created/beforeCreate`
44
5-
- :gear: This rule is included in `"plugin:nuxt/ssr"`.
5+
- :gear: This rule is included in `"plugin:nuxt/base"`.
66

77
## Rule Details
88

‎lib/configs/base.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ module.exports = {
1717
rules: {
1818
'nuxt/no-env-in-context': 'error',
1919
'nuxt/no-env-in-mounted': 'error',
20-
'nuxt/no-this-in-fetch-data': 'error'
20+
'nuxt/no-globals-in-created': 'error',
21+
'nuxt/no-this-in-fetch-data': 'error',
22+
'nuxt/no-timing-in-fetch-data': 'warn'
2123
}
2224
}

‎lib/configs/recommended.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module.exports = {
2-
extends: require.resolve('./ssr.js'),
2+
extends: require.resolve('./base.js'),
33
rules: {
44
'nuxt/no-timing-in-fetch-data': 'error'
55
}

‎lib/configs/ssr.js

-7
This file was deleted.

‎lib/index.js

-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ module.exports = {
88
},
99
configs: {
1010
'base': require('./configs/base'),
11-
'ssr': require('./configs/ssr'),
1211
'recommended': require('./configs/recommended')
1312
},
1413
processors: {

‎lib/rules/no-globals-in-created.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ module.exports = {
1414
meta: {
1515
docs: {
1616
description: 'disallow `window/document` in `created/beforeCreate`',
17-
category: 'ssr'
17+
category: 'base'
1818
},
1919
messages: {
2020
noGlobals: 'Unexpected {{name}} in {{funcName}}.'

‎lib/rules/no-timing-in-fetch-data.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ module.exports = {
1414
meta: {
1515
docs: {
1616
description: 'disallow `setTimeout/setInterval` in `asyncData/fetch`',
17-
category: 'ssr'
17+
category: 'base'
1818
},
1919
messages: {
2020
noTiming: 'Unexpected {{name}} in {{funcName}}.'

0 commit comments

Comments
 (0)
This repository has been archived.