程序问答   发布时间:2022-06-02  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了如何解决无法加载配置“更漂亮”以进行扩展。在反应 Js大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。

如何解决如何解决无法加载配置“更漂亮”以进行扩展。在反应 Js?

开发过程中遇到如何解决无法加载配置“更漂亮”以进行扩展。在反应 Js的问题如何解决?下面主要结合日常开发的经验,给出你关于如何解决无法加载配置“更漂亮”以进行扩展。在反应 Js的解决方法建议,希望对你解决如何解决无法加载配置“更漂亮”以进行扩展。在反应 Js有所启发或帮助;

我对 React Js 很陌生,现在我正在使用 Core-ui 模板进行学习。

这里我面临这样的问题

无法加载要扩展的“更漂亮”配置。

如何解决无法加载配置“更漂亮”以进行扩展。在反应 Js

如何解决无法加载配置“更漂亮”以进行扩展。在反应 Js

Package.Json

},"devDependencIEs": {
    "eslint": "^5.8.0","eslint-plugin-prettIEr": "^3.4.0","prettIEr": "2.3.2"
  }

.eslintrc.Js

  plugins: ['prettIEr'],rules: {
    'prettIEr/prettIEr': ['error',{ endOfline: 'auto' }],// Use our .prettIErrc file as source
    'react/react-in-Jsx-scope': 'off','react/prop-types': 'off',// 'simple-import-sort/imports': 'error',// 'simple-import-sort/exports': 'error',},}

解决方法

尝试添加 eslint-config-prettier。

npm install --save-dev eslint-config-prettier

在您的 .eslintrc 中,您需要将“prettier”作为最后一项添加到 extends 数组中。

,

有两种类型的 packagespluginsconfigs 他们插件进入插件部分他们拥有所有规则和内容以及他们进入的 configs extends 部分

@H_278_28@module.exports = {
    extends: ["eslint:recommended","eslint-config-prettier"],env: {
        node: true,commonjs: true,es6: true,},parser: "babel-eslint",parserOptions: {
        ecmaVersion: 2018,sourceType: "module",ecmaFeatures: {
            impliedStrict: true,jsx: true,setTings: {
        polyfills: ["promises"],"import/resolver": {
            node: {
                moduleDirectory: "node_modules",plugins: ["import","babel","eslint-plugins-prettier"],rules: {
        indent: ["error","tab"],quotes: ["error","double"],semi: ["error","always"],"space-before-function-paren": ["error","keyword-spacing": [
            "error",{
                before: true,after: true,],"arrow-body-style": ["error","as-needed"],"arrow-parens": ["error","comma-spacing": [
            "error",{
                before: false,"object-curly-spacing": [
            "error","always",{
                arraysInObjects: false,"template-curly-spacing": ["error","comma-dangle": [
            "error",{
                arrays: "never",objects: "always",imports: "never",exports: "never",functions: "ignore","block-spacing": ["error","no-else-return": "error","no-nested-ternary": "error","require-await": "error","arrow-spacing": [
            "error","prefer-const": "error","no-var": "error","no-use-before-define": "error","linebreak-style": ["error","unix"],};

大佬总结

以上是大佬教程为你收集整理的如何解决无法加载配置“更漂亮”以进行扩展。在反应 Js全部内容,希望文章能够帮你解决如何解决无法加载配置“更漂亮”以进行扩展。在反应 Js所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。