mirror of
https://github.com/MrXujiang/h5-Dooring.git
synced 2025-12-12 18:22:51 +00:00
update:eslint
This commit is contained in:
parent
b47cdb4644
commit
10d7a504eb
8
packages/editor/.eslintignore
Normal file
8
packages/editor/.eslintignore
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
/lambda/
|
||||||
|
/scripts
|
||||||
|
/config
|
||||||
|
.history
|
||||||
|
public
|
||||||
|
dist
|
||||||
|
.umi
|
||||||
|
mock
|
||||||
@ -1,3 +0,0 @@
|
|||||||
{
|
|
||||||
"extends": "react-app"
|
|
||||||
}
|
|
||||||
26
packages/editor/.eslintrc.js
Executable file
26
packages/editor/.eslintrc.js
Executable file
@ -0,0 +1,26 @@
|
|||||||
|
module.exports = {
|
||||||
|
parser: '@typescript-eslint/parser',
|
||||||
|
parserOptions: {
|
||||||
|
project: 'tsconfig.json',
|
||||||
|
sourceType: 'module',
|
||||||
|
},
|
||||||
|
extends: [
|
||||||
|
require.resolve('@umijs/fabric/dist/eslint'),
|
||||||
|
'plugin:prettier/recommended',
|
||||||
|
],
|
||||||
|
ignorePatterns: ['.eslintrc.js'],
|
||||||
|
rules: {
|
||||||
|
'@typescript-eslint/no-unused-vars':'warn',
|
||||||
|
'@typescript-eslint/interface-name-prefix': 'off',
|
||||||
|
'@typescript-eslint/explicit-function-return-type': 'off',
|
||||||
|
'@typescript-eslint/explicit-module-boundary-types': 'off',
|
||||||
|
'@typescript-eslint/no-explicit-any': 'warn',
|
||||||
|
'@typescript-eslint/no-use-before-define':'off',
|
||||||
|
'@typescript-eslint/no-shadow':'off'
|
||||||
|
},
|
||||||
|
globals: {
|
||||||
|
ANT_DESIGN_PRO_ONLY_DO_NOT_USE_IN_YOUR_PRODUCTION: true,
|
||||||
|
page: true,
|
||||||
|
REACT_APP_ENV: true,
|
||||||
|
},
|
||||||
|
};
|
||||||
@ -1,11 +0,0 @@
|
|||||||
{
|
|
||||||
"singleQuote": true,
|
|
||||||
"trailingComma": "all",
|
|
||||||
"printWidth": 100,
|
|
||||||
"overrides": [
|
|
||||||
{
|
|
||||||
"files": ".prettierrc",
|
|
||||||
"options": { "parser": "json" }
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
7
packages/editor/.prettierrc.js
Normal file
7
packages/editor/.prettierrc.js
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
const fabric = require('@umijs/fabric');
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
...fabric.prettier,
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
7770
packages/editor/package-lock.json
generated
7770
packages/editor/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -53,11 +53,8 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@ant-design/icons": "^4.2.1",
|
"@ant-design/icons": "^4.2.1",
|
||||||
|
|
||||||
"@umijs/plugin-esbuild": "^1.0.1",
|
"@umijs/plugin-esbuild": "^1.0.1",
|
||||||
"@umijs/plugin-sass": "^1.1.1",
|
"@umijs/plugin-sass": "^1.1.1",
|
||||||
"@umijs/preset-react": "1.x",
|
|
||||||
"@umijs/test": "^3.2.19",
|
|
||||||
"antd": "^4.7.0",
|
"antd": "^4.7.0",
|
||||||
"antd-img-crop": "^3.10.0",
|
"antd-img-crop": "^3.10.0",
|
||||||
"axios": "^0.19.2",
|
"axios": "^0.19.2",
|
||||||
@ -92,6 +89,10 @@
|
|||||||
},
|
},
|
||||||
"license": "GPL-3.0",
|
"license": "GPL-3.0",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"@typescript-eslint/parser": "^4.28.2",
|
||||||
|
"@umijs/fabric": "^2.6.2",
|
||||||
|
"@umijs/preset-react": "1.x",
|
||||||
|
"@umijs/test": "^3.5.13",
|
||||||
"@types/classnames": "^2.2.10",
|
"@types/classnames": "^2.2.10",
|
||||||
"@types/codemirror": "^0.0.98",
|
"@types/codemirror": "^0.0.98",
|
||||||
"@types/events": "^3.0.0",
|
"@types/events": "^3.0.0",
|
||||||
@ -103,27 +104,22 @@
|
|||||||
"@types/redux-logger": "^3.0.8",
|
"@types/redux-logger": "^3.0.8",
|
||||||
"@types/xlsx": "^0.0.36",
|
"@types/xlsx": "^0.0.36",
|
||||||
"@typescript-eslint/eslint-plugin": "4.1.1",
|
"@typescript-eslint/eslint-plugin": "4.1.1",
|
||||||
"@typescript-eslint/parser": "4.1.1",
|
"eslint": "^7.30.0",
|
||||||
|
"eslint-config-prettier": "^8.3.0",
|
||||||
|
"eslint-plugin-prettier": "^3.4.0",
|
||||||
|
"prettier": "^2.2.0",
|
||||||
|
"typescript": "^4.1.2",
|
||||||
"babel-eslint": "10.x",
|
"babel-eslint": "10.x",
|
||||||
"babel-plugin-import": "^1.13.0",
|
"babel-plugin-import": "^1.13.0",
|
||||||
"cross-env": "^7.0.2",
|
"cross-env": "^7.0.2",
|
||||||
"eslint": "6.x",
|
|
||||||
"eslint-config-react-app": "^5.2.1",
|
"eslint-config-react-app": "^5.2.1",
|
||||||
"eslint-plugin-flowtype": "4.x",
|
|
||||||
"eslint-plugin-import": "2.x",
|
|
||||||
"eslint-plugin-jsx-a11y": "6.x",
|
|
||||||
"eslint-plugin-react": "7.x",
|
|
||||||
"eslint-plugin-react-hooks": "2.x",
|
|
||||||
"koa": "^2.13.0",
|
"koa": "^2.13.0",
|
||||||
"koa-body": "^4.2.0",
|
"koa-body": "^4.2.0",
|
||||||
"koa-logger": "^3.2.1",
|
"koa-logger": "^3.2.1",
|
||||||
"koa-static": "^5.0.0",
|
"koa-static": "^5.0.0",
|
||||||
"koa2-cors": "^2.0.6",
|
"koa2-cors": "^2.0.6",
|
||||||
"lint-staged": "^10.0.7",
|
"lint-staged": "^10.0.7",
|
||||||
"prettier": "^1.19.1",
|
|
||||||
"redux-logger": "^3.0.6",
|
"redux-logger": "^3.0.6",
|
||||||
"sass-loader": "^9.0.3",
|
"sass-loader": "^9.0.3"
|
||||||
"typescript": "^4.0.2",
|
|
||||||
"vuepress": "^1.8.0"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,7 +1,8 @@
|
|||||||
import React, { memo, PropsWithChildren } from 'react';
|
import type { PropsWithChildren } from 'react';
|
||||||
|
import React, { memo } from 'react';
|
||||||
import { Carousel } from 'zarm';
|
import { Carousel } from 'zarm';
|
||||||
import styles from './index.less';
|
import styles from './index.less';
|
||||||
import { ICarouselConfig } from './schema';
|
import type { ICarouselConfig } from './schema';
|
||||||
import logo from '@/assets/banner.png';
|
import logo from '@/assets/banner.png';
|
||||||
|
|
||||||
interface CarouselTypes extends ICarouselConfig {
|
interface CarouselTypes extends ICarouselConfig {
|
||||||
@ -29,7 +30,7 @@ const XCarousel = memo((props: PropsWithChildren<CarouselTypes>) => {
|
|||||||
</div>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
<Carousel
|
<Carousel
|
||||||
onChange={index => {
|
onChange={(index) => {
|
||||||
// console.log(`onChange: ${index}`);
|
// console.log(`onChange: ${index}`);
|
||||||
}}
|
}}
|
||||||
direction={direction}
|
direction={direction}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user