简体   繁体   English

如何在未反应的项目中使用`eslint-config-airbnb`?

[英]How can I use `eslint-config-airbnb` in a non-react project?

I am using eslint in my project and I'd like to use airbnb style. 我在项目中使用eslint ,但我想使用airbnb样式。 The problem I have is I need to install eslint-config-airbnb dependency which depends on eslint-plugin-jsx-a11y and some react plugin. 我的问题是我需要安装eslint-config-airbnb依赖项,该依赖项取决于eslint-plugin-jsx-a11y和一些react插件。 My project is not a react project and I wonder how I can use airbnb eslint without bring react dependencies. 我的项目不是airbnb项目,我想知道如何在不带来airbnb依赖的情况下使用airbnb eslint。

Below is the configuration in my eslint to use airbnb style: 以下是我的eslint中使用airbnb样式的配置:

extends: [airbnb, eslint:recommended]

Airbnb附带了一个单独的软件包eslint-config-airbnb-baseeslint-config-airbnb继承自该eslint-config-airbnb ),其中仅包含不支持React / JSX的基本样式。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Eslint - 找不到 eslint-config-airbnb - Eslint - eslint-config-airbnb not find 如何在非反应模块中使用 moment() 库(对于 React 项目)? - How can I use moment() library inside a non-react module (for a React project)? 使用eslint-config-airbnb ESLint“模块构建失败”错误 - ESLint “Module build failed” error with eslint-config-airbnb 在react.js中使用eslint-config-airbnb时,“ fetch”是未定义的,“ localStorage”是未定义的 - “fetch” is undefined and “localStorage” is undefined , on using eslint-config-airbnb in react.js 带有 eslint-config-airbnb 的扩展名为“.js”的文件中不允许使用 JSX - JSX not allowed in files with extension ' .js' with eslint-config-airbnb 如何在非反应组件中连接到商店 - How can I connect to the store in non-react components 使用 eslint-config-airbnb 后出现 Missing file extension "tsx" for "./reducer" 错误 - Missing file extension "tsx" for "./reducer" error after using eslint-config-airbnb 更漂亮的 eslint:使用 'prettier' 或 'plugin:prettier/recommended' 和 React Typescript airbnb eslint 配置 - Prettier eslint: use 'prettier' or 'plugin:prettier/recommended' with React Typescript airbnb eslint config 如何在rails上的非反应javascript中使用jquery? - How to use jquery in non-react javascript on rails? 如果没有非 React DOM 父级,则无法卸载 React 门户 - 如何在删除父级之前手动卸载门户? - React portal cannot be unmounted without non-react DOM parent - how can I unmount the portal manually before removing the parent?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM