既有适合小白学习的零基础资料,也有适合3年以上经验的小伙伴深入学习提升的进阶课程,涵盖了95%以上大数据知识点,真正体系化!
由于文件比较多,这里只是将部分目录截图出来,全套包含大厂面经、学习笔记、源码讲义、实战项目、大纲路线、讲解视频,并且后续会持续更新
module.exports = {
'env': {
'browser': true,
'es2021': true
},
'extends': [
'eslint:recommended',
'plugin:react/recommended'
],
'overrides': [
{
'env': {
'node': true
},
'files': [
'.eslintrc.{js,cjs}'
],
'parserOptions': {
'sourceType': 'script'
}
}
],
'parserOptions': {
'ecmaVersion': 'latest',
'sourceType': 'module'
},
'plugins': [
'react'
],
'rules': {
},
};
3 安装 vite-plugin-eslint
npm i -D vite-plugin-eslint
4 配置 vite.config.js 文件
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import eslintPlugin from 'vite-plugin-eslint'
export default defineConfig({
plugins: [
react(),
// 添加 eslint 插件配置
eslintPlugin({
include: ['src/\*\*/\*.js', 'src/\*\*/\*.jsx', 'src/\*.js', 'src/\*.jsx']
})
],
resolve: {
alias: {
},
},
})
5 修改 eslint 默认配置
可根据实际情况进行配置。
module.exports = {
'env': {
'browser': true,
'es2021': true
},
'extends': [
'eslint:recommended',
'plugin:react/recommended'
],
'overrides': [
{
'env': {
'node': true
},
'files': [
'.eslintrc.{js,cjs}'
],
'parserOptions': {
'sourceType': 'script'
}
}
],
'parserOptions': {
'ecmaVersion': 'latest',
'sourceType': 'module'
},
'plugins': [
'react'
],
'rules': {
'indent': [
2,
2,
{
'SwitchCase': 1,
'ignoredNodes': ['TemplateLiteral']
}
], //缩进
'no-unused-vars': [0], //未使用变量
'quotes': [2, 'single'], //单引号
'jsx-quotes': ['error', 'prefer-single'],
'no-console': [0, { 'allow': ['warn', 'error'] }], //console
'linebreak-style': [0, 'unix'], //强制执行统一的行结尾
'semi': [2, 'always'], //分号结尾
'curly': 2,
'no-eval': 1, //禁止使用eval
'no-caller': 2,
'no-else-return': 2, //如果if语句里面有return,后面不能跟else语句
'no-extend-native': 2, //禁止扩展native对象
'no-extra-bind': 2, //禁止不必要的函数绑定
'no-floating-decimal': 2, //禁止省略浮点数中的0
'no-implied-eval': 2, //禁止使用隐式eval
'no-labels': 2, //禁止标签声明
'no-with': 2, //禁用with
![img](https://img-blog.csdnimg.cn/img_convert/6269ee539f241fb7fb8bd542ce15d92f.png)
![img](https://img-blog.csdnimg.cn/img_convert/af6198b27ac1ad784b03570f93d424df.png)
![img](https://img-blog.csdnimg.cn/img_convert/29fe9c88de7002d820ffdcd06adbdbf9.png)
**既有适合小白学习的零基础资料,也有适合3年以上经验的小伙伴深入学习提升的进阶课程,涵盖了95%以上大数据知识点,真正体系化!**
**由于文件比较多,这里只是将部分目录截图出来,全套包含大厂面经、学习笔记、源码讲义、实战项目、大纲路线、讲解视频,并且后续会持续更新**
**[需要这份系统化资料的朋友,可以戳这里获取](https://bbs.csdn.net/topics/618545628)**
知识点,真正体系化!**
**由于文件比较多,这里只是将部分目录截图出来,全套包含大厂面经、学习笔记、源码讲义、实战项目、大纲路线、讲解视频,并且后续会持续更新**
**[需要这份系统化资料的朋友,可以戳这里获取](https://bbs.csdn.net/topics/618545628)**