Skip to content

Commit

Permalink
optimize css & eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinmoch committed Jul 28, 2023
1 parent e998a01 commit ccd4382
Show file tree
Hide file tree
Showing 16 changed files with 54 additions and 37 deletions.
27 changes: 27 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
module.exports = {
root: true,
env: {
node: true
},
extends: process.env.PLATFORM_ENV === "react" ? ["react-app"] : ["plugin:vue/essential", "@vue/standard"],
rules: {
"one-var": "off",
"no-mixed-operators": "off",
"no-template-curly-in-string": "off",
"space-before-function-paren": "off",
"arrow-parens": "off",
"generator-star-spacing": "off",
"no-debugger": "off",
"vue/require-prop-types": "off",
"vue/max-attributes-per-line": "off",
"vue/require-default-prop": "off",
"vue/html-self-closing": "off",
"vue/attributes-order": "off",
"import/no-anonymous-default-export": "off",
"react-hooks/exhaustive-deps": "off",
"react-hooks/rules-of-hooks": "off"
},
parserOptions: {
parser: "babel-eslint"
}
}
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
"cp-cli": "^2.0.0",
"cross-env": "^7.0.0",
"express": "^4.17.1",
"less-loader": "^11.1.3",
"react-app-rewired": "^2.1.3",
"react-scripts": "~5.0.1",
"typescript": "*",
Expand Down
2 changes: 1 addition & 1 deletion public/card.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 15 additions & 15 deletions public/mainifest.json → public/manifest.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"short_name": "React App",
"name": "Create React App Sample",
"icons": [
{
"src": "favicon.ico",
"sizes": "64x64 32x32 24x24 16x16",
"type": "image/x-icon"
}
],
"start_url": ".",
"display": "standalone",
"theme_color": "#000000",
"background_color": "#ffffff"
}
{
"short_name": "React App",
"name": "Create React App Sample",
"icons": [
{
"src": "favicon.ico",
"sizes": "64x64 32x32 24x24 16x16",
"type": "image/x-icon"
}
],
"start_url": ".",
"display": "standalone",
"theme_color": "#000000",
"background_color": "#ffffff"
}
5 changes: 1 addition & 4 deletions public/vue.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,7 @@
</head>
<body>
<noscript>
<strong
>We're sorry but vue1 doesn't work properly without JavaScript enabled.
Please enable it to continue.</strong
>
<strong>We're sorry but vue1 doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->
Expand Down
8 changes: 4 additions & 4 deletions src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { changeTheme, supportCssVars, enableCssVars, themeVars } from './theme'
import Todo from './views/Todo'
import tagVars from './theme/Tag'
import todoVars from './theme/Todo'
import './style/app.less'
import './style/app.css'

export default () => {
const [todoColor, setTodoColor] = useState(() => themeVars(Object.keys(todoVars)[0]))
Expand Down Expand Up @@ -34,11 +34,11 @@ export default () => {
return (
<div id="app">
<div id="nav">
<span>更改 Tag 颜色 </span>
<span>更改 Tag 颜色</span>
<input name="aui-tag-color" type="color" size="4" value={tagColor} onChange={change} />
<span>更改 {title} 颜色 </span>
<span>更改 {title} 颜色</span>
<input name="aui-todo-color" type="color" size="4" value={todoColor} onChange={change} />
<span>更改字体大小 </span>
<span>更改字体大小</span>
<input name="aui-font-size" type="text" size="2" value={fontSize} onChange={change} />
</div>
<Todo />
Expand Down
2 changes: 1 addition & 1 deletion src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import Todo from './views/Todo.vue'
import { cssVars as tagVars } from './vue/Tag'
import { cssVars as todoVars } from './vue/Todo'
import { changeTheme, supportCssVars, enableCssVars, themeVars, combineVars, onResize } from './theme'
import './style/app.less'
import './style/app.css'
export default {
components: {
Expand Down
3 changes: 1 addition & 2 deletions src/card/Card.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ export default {
return {
title: 'Card title',
subTitle: 'Card subtitle',
text:
"Some quick example text to build on the card title and make up the bulk of the card's content"
text: "Some quick example text to build on the card title and make up the bulk of the card's content"
}
},
cssVars: {
Expand Down
2 changes: 1 addition & 1 deletion src/react/Todo/mobile.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react'
import Tag from '../Tag'
import '../../style/mobile.less'
import '../../style/mobile.css'

export default props => {
const { removeTag, value, keydown, input, tags, ref, $mode } = props
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion src/views/Template.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react'
import '../style/template.less'
import '../style/template.css'

export default props => {
const { addTag, removeTag, value, keydown, input, tags, ref } = props
Expand Down
2 changes: 1 addition & 1 deletion src/views/Template.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<script>
import { renderless, api } from '../renderless/Todo/vue'
import { props, setup } from '../vue/common'
import '../style/template.less'
import '../style/template.css'
export default {
props: [...props, 'newTag', 'tags'],
Expand Down
2 changes: 1 addition & 1 deletion src/vue/Todo/mobile.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<script>
import { renderless, api } from '../../renderless/Todo/vue'
import { props, setup } from '../common'
import '../../style/mobile.less'
import '../../style/mobile.css'
export default {
props: [...props, 'newTag', 'tags'],
Expand Down
5 changes: 0 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6651,11 +6651,6 @@ lcid@^2.0.0:
dependencies:
invert-kv "^2.0.0"

less-loader@^11.1.3:
version "11.1.3"
resolved "https://registry.npmmirror.com/less-loader/-/less-loader-11.1.3.tgz#1bb62d6ca9bf00a177c02793b54baac40f9be694"
integrity sha512-A5b7O8dH9xpxvkosNrP0dFp2i/dISOJa9WwGF3WJflfqIERE2ybxh1BFDj5CovC2+jCE4M354mk90hN6ziXlVw==

less@^4.1.3:
version "4.1.3"
resolved "https://registry.npmmirror.com/less/-/less-4.1.3.tgz#175be9ddcbf9b250173e0a00b4d6920a5b770246"
Expand Down

0 comments on commit ccd4382

Please sign in to comment.