6
带有eslint-config-airbnb扩展名为'.js'的文件中不允许JSX
我已经安装了eslint-config-airbnb,它应该为React预配置ESLINT: 我们的默认导出包含我们所有的ESLint规则,包括ECMAScript 6+和React。它需要eslint,eslint-plugin-import,eslint-plugin-react和eslint-plugin-jsx-a11y。 我.eslintrc扩展了它的配置: { "extends": "eslint-config-airbnb", "env": { "browser": true, "node": true, "mocha": true }, "rules": { "new-cap": [2, { "capIsNewExceptions": ["List", "Map", "Set"] }], "react/no-multi-comp": 0, "import/default": 0, "import/no-duplicates": 0, "import/named": 0, "import/namespace": 0, "import/no-unresolved": 0, "import/no-named-as-default": 2, "comma-dangle": 0, // not sure why airbnb turned this on. …