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

Commit

Permalink
feat: move ssr to base
Browse files Browse the repository at this point in the history
  • Loading branch information
clarkdo committed Dec 10, 2018
1 parent 4b32052 commit 1da2f0c
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 13 deletions.
2 changes: 1 addition & 1 deletion docs/rules/no-globals-in-created.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

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

## Rule Details

Expand Down
4 changes: 3 additions & 1 deletion lib/configs/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ module.exports = {
rules: {
'nuxt/no-env-in-context': 'error',
'nuxt/no-env-in-mounted': 'error',
'nuxt/no-this-in-fetch-data': 'error'
'nuxt/no-globals-in-created': 'error',
'nuxt/no-this-in-fetch-data': 'error',
'nuxt/no-timing-in-fetch-data': 'warn'
}
}
2 changes: 1 addition & 1 deletion lib/configs/recommended.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module.exports = {
extends: require.resolve('./ssr.js'),
extends: require.resolve('./base.js'),
rules: {
'nuxt/no-timing-in-fetch-data': 'error'
}
Expand Down
7 changes: 0 additions & 7 deletions lib/configs/ssr.js

This file was deleted.

1 change: 0 additions & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ module.exports = {
},
configs: {
'base': require('./configs/base'),
'ssr': require('./configs/ssr'),
'recommended': require('./configs/recommended')
},
processors: {
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/no-globals-in-created.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ module.exports = {
meta: {
docs: {
description: 'disallow `window/document` in `created/beforeCreate`',
category: 'ssr'
category: 'base'
},
messages: {
noGlobals: 'Unexpected {{name}} in {{funcName}}.'
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/no-timing-in-fetch-data.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ module.exports = {
meta: {
docs: {
description: 'disallow `setTimeout/setInterval` in `asyncData/fetch`',
category: 'ssr'
category: 'base'
},
messages: {
noTiming: 'Unexpected {{name}} in {{funcName}}.'
Expand Down

0 comments on commit 1da2f0c

Please sign in to comment.