Commit fb2c4578 authored by 邓晓峰's avatar 邓晓峰

fix: eslint:fix errors

parent c5dba396
# editorconfig.org # http://editorconfig.org
root = true root = true
[*] [*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
indent_style = space indent_style = space
indent_size = 2 indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true trim_trailing_whitespace = true
insert_final_newline = true
[*.md] [*.md]
trim_trailing_whitespace = false trim_trailing_whitespace = false
[Makefile]
indent_style = tab
This diff is collapsed.
const fs = require('fs'); const fs = require('fs');
const path = require('path'); const path = require('path');
const prettierOptions = JSON.parse( const prettierOptions = JSON.parse(
fs.readFileSync(path.resolve(__dirname, '.prettierrc'), 'utf8'), fs.readFileSync(path.resolve(__dirname, '.prettierrc'), 'utf8'),
); );
...@@ -68,12 +67,20 @@ module.exports = { ...@@ -68,12 +67,20 @@ module.exports = {
'no-confusing-arrow': 0, 'no-confusing-arrow': 0,
'no-console': 1, 'no-console': 1,
'no-unused-vars': 0, 'no-unused-vars': 0,
'no-use-before-define': 0, 'no-void': 0,
'func-names': 0,
'array-callback-return':0,
'no-return-assign': 1,
'no-nested-ternary': 0,
'consistent-return': 0,
'no-param-reassign': 0,
'no-unused-expressions': 0,
'no-restricted-syntax': 0,
"no-shadow": ["error", { "builtinGlobals": false, "hoist": "functions", "allow": [] }],
'no-cond-assign': 1,
'prefer-template': 2, 'prefer-template': 2,
'react/jsx-wrap-multilines': 0, 'react/jsx-wrap-multilines': 0,
'react/prop-types': 0, 'react/prop-types': 0,
'react/forbid-prop-types': 0,
'react/sort-comp': 1,
'react/jsx-one-expression-per-line': 0, 'react/jsx-one-expression-per-line': 0,
'react/jsx-props-no-spreading': 0, 'react/jsx-props-no-spreading': 0,
'react/state-in-constructor': 0, 'react/state-in-constructor': 0,
...@@ -91,12 +98,10 @@ module.exports = { ...@@ -91,12 +98,10 @@ module.exports = {
'react/require-extension': 0, 'react/require-extension': 0,
'react/self-closing-comp': 0, 'react/self-closing-comp': 0,
'react/sort-comp': 0, 'react/sort-comp': 0,
'react/require-default-props': 0,
'react/jsx-fragments': 0, 'react/jsx-fragments': 0,
'redux-saga/no-yield-in-race': 2, 'redux-saga/no-yield-in-race': 2,
'redux-saga/yield-effects': 2, 'redux-saga/yield-effects': 2,
'require-yield': 0, 'require-yield': 0,
}, },
settings: { settings: {
'import/resolver': { 'import/resolver': {
......
...@@ -11,4 +11,4 @@ npm-debug.log ...@@ -11,4 +11,4 @@ npm-debug.log
.idea .idea
src/umi src/umi
.vscode .vscode
civweb civbase
{ {
"printWidth": 80, "printWidth": 80,
"tabWidth": 2, "tabWidth": 2,
"useTabs": false, "useTabs": false,
"semi": true, "semi": true,
"singleQuote": true, "singleQuote": true,
"trailingComma": "all" "trailingComma": "all"
} }
{
"processors": ["stylelint-processor-styled-components"],
"extends": [
"stylelint-config-recommended",
"stylelint-config-styled-components"
]
}
//{
// "processors": ["stylelint-processor-styled-components"],
// "extends": [
// "stylelint-config-recommended",
// "stylelint-config-styled-components"
// ]
//}
const fabric = require('@umijs/fabric');
module.exports = {
...fabric.stylelint,
};
...@@ -7,6 +7,7 @@ export default { ...@@ -7,6 +7,7 @@ export default {
menu: { menu: {
locale: true, locale: true,
}, },
pwa: false,
headerHeight: 48, headerHeight: 48,
title: '熊猫智慧城市监控管理解决方案', title: '熊猫智慧城市监控管理解决方案',
iconfontUrl: '', iconfontUrl: '',
......
"use strict";
module.exports = {
dev: {
'/CityInterface': {
// target: 'http://192.168.10.151:8055',
// target: 'https://panda-water.cn',
// target: 'http://192.168.19.102:8055',
target: 'https://panda-water.com',
// target: 'http://192.168.10.150:8050',
// target: 'http://192.168.19.103:8112',
// target: 'http://192.168.12.8:8098',
// target: 'http://192.168.10.20:8888',
changeOrigin: true,
headers: {
'Access-Control-Allow-Origin': '*'
},
pathRewrite: {
'/CityInterface': '/CityInterface'
}
},
'/cityinterface': {
// target: 'http://192.168.10.150:8050',
// target: 'https://panda-water.cn',
// target: 'http://192.168.19.102:8055',
target: 'https://panda-water.com',
// target: 'http://192.168.12.8:8098',
// target: 'http://192.168.10.20:8888',
changeOrigin: true,
headers: {
'Access-Control-Allow-Origin': '*'
},
pathRewrite: {
'/cityinterface': '/cityinterface'
}
},
'/Publish': {
// target: 'http://192.168.12.8:8098',
// target: 'http://192.168.10.20:8888',
// target: 'http://192.168.10.151:8055',
// target: 'https://panda-water.cn',
// target: 'http://192.168.19.102:8055',
target: 'https://panda-water.com',
// target: 'http://192.168.10.150:8050',
changeOrigin: true,
headers: {
'Access-Control-Allow-Origin': '*'
},
pathRewrite: {
'/Publish': '/Publish'
}
}
}
};
\ No newline at end of file
const path = require('path'); const path = require('path');
const webpack = require('webpack'); const webpack = require('webpack');
const slash = require('slash2'); const slash = require('slash2');
const pkg = require('../../package.json');
const CopyPlugin = require('copy-webpack-plugin'); const CopyPlugin = require('copy-webpack-plugin');
const pkg = require('../../package.json');
const argv = require('../../server/argv'); const argv = require('../../server/argv');
const ASSET_PATH = process.env.ASSET_PATH || '/'; const ASSET_PATH = process.env.ASSET_PATH || '/';
module.exports = options => ({ module.exports = options => ({
...@@ -10,7 +10,9 @@ module.exports = options => ({ ...@@ -10,7 +10,9 @@ module.exports = options => ({
entry: options.entry, entry: options.entry,
output: Object.assign( output: Object.assign(
{ {
path: argv.releasepath ? path.resolve(argv.releasepath, pkg.name.toLocaleLowerCase()) : path.resolve(process.cwd(), pkg.name.toLocaleLowerCase()), path: argv.releasepath
? path.resolve(argv.releasepath, pkg.name.toLocaleLowerCase())
: path.resolve(process.cwd(), pkg.name.toLocaleLowerCase()),
publicPath: `/${pkg.name.toLocaleLowerCase()}`, publicPath: `/${pkg.name.toLocaleLowerCase()}`,
}, },
options.output, options.output,
...@@ -34,7 +36,8 @@ module.exports = options => ({ ...@@ -34,7 +36,8 @@ module.exports = options => ({
test: /\.css$/, test: /\.css$/,
exclude: /node_modules/, exclude: /node_modules/,
use: ['style-loader', 'css-loader'], use: ['style-loader', 'css-loader'],
}, { },
{
test: /\.less$/, test: /\.less$/,
use: [ use: [
...@@ -79,6 +82,9 @@ module.exports = options => ({ ...@@ -79,6 +82,9 @@ module.exports = options => ({
loader: 'less-loader', loader: 'less-loader',
options: { options: {
javascriptEnabled: true, javascriptEnabled: true,
// modifyVars: {
// '@ant-prefix': 'panda',
// },
}, },
}, },
], ],
...@@ -100,6 +106,7 @@ module.exports = options => ({ ...@@ -100,6 +106,7 @@ module.exports = options => ({
options: { options: {
// Inline files smaller than 10 kB // Inline files smaller than 10 kB
limit: 10 * 1024, limit: 10 * 1024,
name: '[name].[ext]',
noquotes: true, noquotes: true,
}, },
}, },
...@@ -114,7 +121,7 @@ module.exports = options => ({ ...@@ -114,7 +121,7 @@ module.exports = options => ({
// Inline files smaller than 10 kB // Inline files smaller than 10 kB
limit: 10 * 1024, limit: 10 * 1024,
name: '[name].[ext]', name: '[name].[ext]',
outputPath: 'images/' outputPath: 'images/',
}, },
}, },
// { // {
......
...@@ -141,13 +141,13 @@ module.exports = require('./webpack.base.babel')({ ...@@ -141,13 +141,13 @@ module.exports = require('./webpack.base.babel')({
hashDigest: 'hex', hashDigest: 'hex',
hashDigestLength: 20, hashDigestLength: 20,
}), }),
new WebpackManifestPlugin({ // new WebpackManifestPlugin({
publicPath: '/civbase/', // publicPath: '/civbase/',
map: (file) => { // map: (file) => {
file.name = file.name.replace(/(\.[a-f0-9]{32})(\..*)$/, '$2'); // file.name = file.name.replace(/(\.[a-f0-9]{32})(\..*)$/, '$2');
return file; // return file;
} // }
}) // })
], ],
performance: { performance: {
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment