diff --git a/docs/rules/no-globals-in-created.md b/docs/rules/no-globals-in-created.md index da5acfc..29cc66d 100644 --- a/docs/rules/no-globals-in-created.md +++ b/docs/rules/no-globals-in-created.md @@ -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 diff --git a/lib/configs/base.js b/lib/configs/base.js index a0484fa..62720ea 100644 --- a/lib/configs/base.js +++ b/lib/configs/base.js @@ -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' } } diff --git a/lib/configs/recommended.js b/lib/configs/recommended.js index 2e8b826..2de652d 100644 --- a/lib/configs/recommended.js +++ b/lib/configs/recommended.js @@ -1,5 +1,5 @@ module.exports = { - extends: require.resolve('./ssr.js'), + extends: require.resolve('./base.js'), rules: { 'nuxt/no-timing-in-fetch-data': 'error' } diff --git a/lib/configs/ssr.js b/lib/configs/ssr.js deleted file mode 100644 index e227b18..0000000 --- a/lib/configs/ssr.js +++ /dev/null @@ -1,7 +0,0 @@ -module.exports = { - extends: require.resolve('./base.js'), - rules: { - 'nuxt/no-globals-in-created': 'error', - 'nuxt/no-timing-in-fetch-data': 'warn' - } -} diff --git a/lib/index.js b/lib/index.js index 3e049e2..3901d84 100644 --- a/lib/index.js +++ b/lib/index.js @@ -8,7 +8,6 @@ module.exports = { }, configs: { 'base': require('./configs/base'), - 'ssr': require('./configs/ssr'), 'recommended': require('./configs/recommended') }, processors: { diff --git a/lib/rules/no-globals-in-created.js b/lib/rules/no-globals-in-created.js index ac7b27e..c474c77 100644 --- a/lib/rules/no-globals-in-created.js +++ b/lib/rules/no-globals-in-created.js @@ -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}}.' diff --git a/lib/rules/no-timing-in-fetch-data.js b/lib/rules/no-timing-in-fetch-data.js index b1ba3bb..49ca278 100644 --- a/lib/rules/no-timing-in-fetch-data.js +++ b/lib/rules/no-timing-in-fetch-data.js @@ -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}}.'