![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
eslint-config-automatic
Advanced tools
这是个人的ESLint规则配置,包括多个常用集合,对于每一条规则,提供简要注释和规则说明网址,没有使用其他的extends
。
在rules
目录下,有一些规则库,可以作为单独的配置信息,放入ESLint配置文件中的extends
里面。
例如,如果想引用React Native
的规则,则在extends
中添加如下代码:
"extends": [
"@smartshallot/rules/react-native",
]
其余依次类推,目前支持的配置如下所示:
base
:包含现有的每一条规则,按照分类组织文件结构。具体规则列表请参照ESLint官方网站:规则文档。react
react-native
:使用了插件eslint-plugin-react-native。typescript
如果只引用规则,那ESLint配置文件剩余的部分都需要自行完成,也可以使用install
目录下相应的安装脚本来进行设置。
依旧以react-native
为例,在.eslintrc.js
中,设置如下:
const config = {
// ...
"extends": [
// ...
"@smartshallot/rules/react-native",
],
// ...
}
require('@smartshallot/install/react-native')(config);
module.exports = config;
注意:install
中的脚本,只设置一个配置插件的设置项,如果要引用多个配置信息,则需要依次对config
进行设置,可参照module
目录中的文件写法。
除了上述的只引用规则信息之外,还可以使用已经集成好的脚本,来生成相应的ESLint配置文件。
以TypeScript语言的react-native
项目为例,对应于module
目录下的typescript-react-native.js
文件,需要在.eslintrc.js
中,设置如下:
const config = require('@smartshallot/module/typescript-react-native');
// 这里添加想修改的设置,也可以不添加
module.exports = config;
目前支持的集成设置类型如下:
javascript
:只使用JavaScript开发的项目,没有React相关代码。javascript-react
:使用JavaScript开发的React项目。javascript-react-native
:使用JavaScript开发的React Native项目。typescript
:只使用TypeScript开发的项目,没有React相关代码。typescript-react
:使用TypeScript开发的React项目。typescript-react-native
:使用TypeScript开发的React Native项目。FAQs
An ESLint Configuration Set.
We found that eslint-config-automatic demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.