1 Star 0 Fork 2.2K

船长 / pdman

forked from robergroup / pdman 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
.eslintrc 3.17 KB
一键复制 编辑 原始数据 按行查看 历史
jiaoshou1234 提交于 2018-08-27 11:10 . feat: init project and open source
{
"extends": "airbnb",
"parser": "babel-eslint",
"env": {
"browser": true,
"node": true,
"es6": true
},
"rules": {
"indent": ["off"],//关闭缩进检查
"react/jsx-indent": ["warn", 2],
"react/jsx-indent-props": ["warn", 2],
"padded-blocks":["off"],
"no-unused-vars":["warn"],
"react/jsx-tag-spacing":["off"],
"jsx-quotes":["off"],
"react/jsx-closing-tag-location":["off"],
"react/jsx-closing-bracket-location":["off"],
"object-shorthand": ["off"],
"no-useless-escape":["off"], //不允许在字符串和正则表达式中使用无意义的换行符
"no-cond-assign":["off"],
"keyword-spacing":["off"],//if等关键字后面一定要跟空格
"object-curly-spacing":["off"],//{ }内容开始结束必需要有空格
"one-var-declaration-per-line":["off"],//一行只能写一个变量
"spaced-comment":["off"],
"no-multi-spaces":["off"],
"prefer-destructuring":["off"],
"semi-spacing":["off"],//分号前必需要有空格(你怎么管得这么细呢,这么多规则,谁记得住)
"space-before-blocks": ["off"],
"comma-spacing":["off"],
"key-spacing":["off"],
"prefer-const":["off"],
"one-var":["off"],//一行只能有一个变量声明,关闭掉
"arrow-body-style": ["off"], // 箭头函数中,如果函数体里只有一句代码时允许不省略大括号
"import/prefer-default-export": ["off"], // 允许一个js文件中导出多个
"react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx"] }], // 允许使用js文件来写react
"react/prefer-stateless-function": ["off"], // 允许无状态组件不写成函数组件
"linebreak-style": ["off"], // 关闭回车换行格式的检查
"react/prop-types": ["off"], // 允许不申明props的类型以及校验而直接使用
"jsx-a11y/anchor-is-valid": ["off"], // 允许使用锚点路由
"object-curly-newline": ["off"], // 解构对象时允许不换行
"no-underscore-dangle": ["off"], //允许标识符中有悬空下划线
"react/no-multi-comp": ["off"], // 允许一个js文件中同时存在多个组件
"react/no-string-refs": ["off"], // 允许使用ref通过字符串的形式
"import/extensions": [1, { "extensions": [".json"] }], // 允许导入json格式的文件
"jsx-a11y/click-events-have-key-events": ["off"], // 允许定义点击事件的时候不加上onKeyDown、onKeyUp等来区分
"jsx-a11y/no-static-element-interactions": ["off"], // 允许非常用的节点不使用role="button"增加点击事件
"jsx-a11y/no-noninteractive-element-interactions": ["off"], // 允许非交互性组件增加事件
"function-paren-newline": ["off"], // 允许方法的参数换行,
"no-return-assign": ["off"], //允许箭头函数的返回值是一个赋值语句
"no-mixed-operators":0, // 关闭禁止混合使用不同的操作符
"no-console": 0, // 关闭禁止使用控制台
"no-unused-expressions": 0, // 关闭禁止无返回值表达式
"import/no-extraneous-dependencies": 0,
"jsx-a11y/mouse-events-have-key-events": 0,
"react/no-find-dom-node": 0,
"jsx-a11y/no-noninteractive-tabindex": 0,
"jsx-a11y/no-autofocus": 0
}
}
NodeJS
1
https://gitee.com/mediar/pdman.git
git@gitee.com:mediar/pdman.git
mediar
pdman
pdman
lite

搜索帮助