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 = {
|
module.exports = {
|
||||||
env: {
|
env: {
|
||||||
browser: true,
|
browser: true,
|
||||||
es6: true,
|
es2021: true,
|
||||||
node: true,
|
node: true,
|
||||||
},
|
},
|
||||||
extends: ["airbnb", "prettier"],
|
root: true,
|
||||||
parser: "babel-eslint",
|
extends: ['eslint:recommended', 'react-app', 'plugin:prettier/recommended', 'plugin:@typescript-eslint/recommended'],
|
||||||
|
overrides: [],
|
||||||
|
parser: '@typescript-eslint/parser',
|
||||||
parserOptions: {
|
parserOptions: {
|
||||||
|
ecmaVersion: 'latest',
|
||||||
|
sourceType: 'module',
|
||||||
ecmaFeatures: {
|
ecmaFeatures: {
|
||||||
jsx: true,
|
jsx: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
plugins: ["react"],
|
plugins: ['react', '@typescript-eslint'],
|
||||||
rules: {
|
rules: {
|
||||||
"no-console": process.env.NODE_ENV === "production" ? "warn" : "off",
|
eqeqeq: 2,
|
||||||
"no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off",
|
'no-alert': 2,
|
||||||
"react/prefer-stateless-function": 0, // 关闭react默认的props-type验证
|
'no-undef': 2,
|
||||||
"react/prop-types": [0],
|
'no-use-before-define': 2,
|
||||||
"react/jsx-closing-bracket-location": "off",
|
'react-hooks/exhaustive-deps': 2,
|
||||||
"consistent-return": "off",
|
'@typescript-eslint/no-explicit-any': 0,
|
||||||
// 关闭使用解构赋值的检测
|
'@typescript-eslint/no-non-null-assertion': 0,
|
||||||
"react/destructuring-assignment": [0, "always"],
|
'@typescript-eslint/no-var-requires': 0,
|
||||||
// 解决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,
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
@ -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" />
|
/// <reference types="react-scripts" />
|
||||||
declare module '*.less'
|
declare module '*.less';
|
||||||
|
Loading…
Reference in new issue