Skip to content

Commit

Permalink
chore: upgrade eslint & prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaofan2406 committed Aug 23, 2021
1 parent 9ee4293 commit d2bfbaf
Show file tree
Hide file tree
Showing 113 changed files with 455 additions and 476 deletions.
9 changes: 0 additions & 9 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,19 +1,10 @@
{
"root": true,
"globals": {
"expect": false
},
"parser": "@babel/eslint-parser",
"plugins": ["jest-dom"],
"extends": ["adslot", "plugin:jest-dom/recommended"],
"settings": {
"lodash": {
"version": 4
},
"import/resolver": {
"node": {
"extensions": [".js", ".jsx"]
}
}
},
"rules": {
Expand Down
3 changes: 0 additions & 3 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
const isDevelopment = process.env.TYPE === 'development';

const plugins = ['@babel/plugin-proposal-class-properties', '@babel/plugin-proposal-object-rest-spread'];

const presets = [
['@babel/preset-env', { useBuiltIns: 'usage', corejs: { version: 3 } }],
[
Expand Down Expand Up @@ -30,6 +28,5 @@ const env = {

module.exports = {
presets,
plugins,
env,
};
2 changes: 1 addition & 1 deletion config/paths.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const fs = require('fs');
// Make sure any symlinks in the project folder are resolved:
// https://github.com/facebookincubator/create-react-app/issues/637
const appDirectory = fs.realpathSync(process.cwd());
const resolveApp = relativePath => path.resolve(appDirectory, relativePath);
const resolveApp = (relativePath) => path.resolve(appDirectory, relativePath);

module.exports = {
appBuild: resolveApp('docs'),
Expand Down
2 changes: 1 addition & 1 deletion config/webpack.config.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ module.exports = webpackMerge(commonConfig, {
// This is the URL that app is served from. We use "/" in development.
publicPath: '/',
// Point sourcemap entries to original disk location (format as URL on Windows)
devtoolModuleFilenameTemplate: info => path.resolve(info.absoluteResourcePath).replace(/\\/g, '/'),
devtoolModuleFilenameTemplate: (info) => path.resolve(info.absoluteResourcePath).replace(/\\/g, '/'),
},
cache: { type: 'filesystem' },
module: {
Expand Down
2 changes: 1 addition & 1 deletion config/webpack.config.dist.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ module.exports = webpackMerge(commonConfig, {

return cssnano()
.process(input, postcssOptions)
.then(result => {
.then((result) => {
return {
code: result.css,
map: result.map,
Expand Down
2 changes: 1 addition & 1 deletion config/webpack.config.prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ module.exports = webpackMerge(commonConfig, {

return cssnano()
.process(input, postcssOptions)
.then(result => {
.then((result) => {
return {
code: result.css,
map: result.map,
Expand Down
2 changes: 1 addition & 1 deletion config/webpackDevServer.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const protocol = process.env.HTTPS === 'true' ? 'https' : 'http';
const host = process.env.HOST || '0.0.0.0';

// eslint-disable-next-line
module.exports = function(proxy, allowedHost) {
module.exports = function (proxy, allowedHost) {
return {
// WebpackDevServer 2.4.3 introduced a security fix that prevents remote
// websites from potentially accessing local content through DNS rebinding:
Expand Down
Loading

0 comments on commit d2bfbaf

Please sign in to comment.