mirror of https://github.com/longtai-cn/hippo4j
parent
65742f786f
commit
4edf39ea1c
@ -0,0 +1,5 @@
|
||||
/.git
|
||||
/.vscode
|
||||
node_modules
|
||||
build
|
||||
public
|
@ -1,31 +1,29 @@
|
||||
module.exports = {
|
||||
env: {
|
||||
browser: true,
|
||||
es6: true,
|
||||
es2021: true,
|
||||
node: true,
|
||||
},
|
||||
extends: ["airbnb", "prettier"],
|
||||
parser: "babel-eslint",
|
||||
root: true,
|
||||
extends: ['eslint:recommended', 'react-app', 'plugin:prettier/recommended', 'plugin:@typescript-eslint/recommended'],
|
||||
overrides: [],
|
||||
parser: '@typescript-eslint/parser',
|
||||
parserOptions: {
|
||||
ecmaVersion: 'latest',
|
||||
sourceType: 'module',
|
||||
ecmaFeatures: {
|
||||
jsx: true,
|
||||
},
|
||||
},
|
||||
plugins: ["react"],
|
||||
plugins: ['react', '@typescript-eslint'],
|
||||
rules: {
|
||||
"no-console": process.env.NODE_ENV === "production" ? "warn" : "off",
|
||||
"no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off",
|
||||
"react/prefer-stateless-function": 0, // 关闭react默认的props-type验证
|
||||
"react/prop-types": [0],
|
||||
"react/jsx-closing-bracket-location": "off",
|
||||
"consistent-return": "off",
|
||||
// 关闭使用解构赋值的检测
|
||||
"react/destructuring-assignment": [0, "always"],
|
||||
// 解决require报错问题
|
||||
"import/no-extraneous-dependencies": ["error", { devDependencies: true }],
|
||||
"react/jsx-wrap-multilines": "off",
|
||||
"global-require": 0,
|
||||
"jsx-a11y/no-static-element-interactions": 0,
|
||||
"jsx-a11y/click-events-have-key-events": 0,
|
||||
eqeqeq: 2,
|
||||
'no-alert': 2,
|
||||
'no-undef': 2,
|
||||
'no-use-before-define': 2,
|
||||
'react-hooks/exhaustive-deps': 2,
|
||||
'@typescript-eslint/no-explicit-any': 0,
|
||||
'@typescript-eslint/no-non-null-assertion': 0,
|
||||
'@typescript-eslint/no-var-requires': 0,
|
||||
},
|
||||
};
|
||||
|
@ -0,0 +1,5 @@
|
||||
#!/usr/bin/env sh
|
||||
. "$(dirname -- "$0")/_/husky.sh"
|
||||
|
||||
echo "pre-commit";
|
||||
npx lint-staged;
|
@ -0,0 +1,4 @@
|
||||
/.git
|
||||
/.vscode
|
||||
node_modules
|
||||
build
|
@ -1,2 +1,2 @@
|
||||
/// <reference types="react-scripts" />
|
||||
declare module '*.less'
|
||||
declare module '*.less';
|
||||
|
Loading…
Reference in new issue