Vue.js 我对Nuxtjs的初始配置有问题

Vue.js 我对Nuxtjs的初始配置有问题,vue.js,nuxt.js,Vue.js,Nuxt.js,重现问题的步骤: $warn创建nuxt应用程序nuxt-project1 $cd nuxt-project1 纱线开发 这是错误: 在配置中找不到规则。您是否提供了“规则”属性 您需要向stylelint.config.js文件添加一些规则 例如:取自网站 我解决了向styleling.config.js添加rules属性的问题 以前 之后 您可能希望步骤2使用cd-nuxt-project1,但通常尝试cd-nuxt-project1会导致“bash:cd:参数太多” "rules":

重现问题的步骤:

$warn创建nuxt应用程序nuxt-project1

$cd nuxt-project1

纱线开发

这是错误:

在配置中找不到规则。您是否提供了“规则”属性


您需要向
stylelint.config.js
文件添加一些规则 例如:取自网站


我解决了向
styleling.config.js
添加
rules
属性的问题

以前

之后


您可能希望步骤2使用
cd-nuxt-project1
,但通常尝试
cd-nuxt-project1
会导致“bash:cd:参数太多”
  "rules": {
    "block-no-empty": null,
    "color-no-invalid-hex": true,
    "comment-empty-line-before": [ "always", {
      "ignore": ["stylelint-commands", "after-comment"]
    } ],
    "declaration-colon-space-after": "always",
    "indentation": ["tab", {
      "except": ["value"]
    }],
    "max-empty-lines": 2,
    "rule-empty-line-before": [ "always", {
      "except": ["first-nested"],
      "ignore": ["after-comment"]
    } ],
    "unit-whitelist": ["em", "rem", "%", "s"]
  }
}
module.exports = {
  // add your custom config here
  // https://stylelint.io/user-guide/configuration
  rules: {},
};