Skip to content

Commit

Permalink
disable eslint for css
Browse files Browse the repository at this point in the history
  • Loading branch information
technophile-04 committed Aug 31, 2022
1 parent 7d76a6e commit 3d4192b
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 35 deletions.
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn lint-staged
yarn lint-staged
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,10 @@
"lint-staged": "^13.0.3"
},
"lint-staged" : {
"packages/react-app/src/**/*.{js,jsx,css}": [
"packages/react-app/src/**/*.{js,jsx}": [
"prettier --write",
"yarn react-app:lint"
"eslint --fix",
"eslint --max-warnings=0 --ignore-path packages/react-app/.eslintignore"
]
}
}
12 changes: 6 additions & 6 deletions packages/react-app/scripts/ipfs.js
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
const {create, globSource} = require("ipfs-http-client");
const { create, globSource } = require("ipfs-http-client");
const chalk = require("chalk");
const { clearLine } = require("readline");

const infura = { host: "ipfs.infura.io", port: "5001", protocol: "https" };
// run your own ipfs daemon: https://docs.ipfs.io/how-to/command-line-quick-start/#install-ipfs
// const localhost = { host: "localhost", port: "5001", protocol: "http" };

const ipfs = create(infura);
const ipfs = create(infura);

const ipfsGateway = "https://ipfs.io/ipfs/";
const ipnsGateway = "https://ipfs.io/ipns/";

const addOptions = {
pin: true,
wrapWithDirectory: true
wrapWithDirectory: true,
};

const pushDirectoryToIPFS = async path => {
try {
const file = ipfs.addAll(globSource(path, '**/*'), addOptions)
const file = ipfs.addAll(globSource(path, "**/*"), addOptions);
let lastRes;
for await (const f of file) {
lastRes = f
lastRes = f;
}
return lastRes
return lastRes;
} catch (e) {
return {};
}
Expand Down
27 changes: 13 additions & 14 deletions packages/react-app/scripts/s3.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,40 +40,40 @@ const options = {
///////////// First, let's automatically create the bucket if it doesn't exist...
/////////////

var AWS = require('aws-sdk');
var AWS = require("aws-sdk");
// Load credentials and set Region from JSON file
AWS.config.loadFromPath('./aws.json');
AWS.config.loadFromPath("./aws.json");

// Create S3 service object
s3 = new AWS.S3({apiVersion: '2006-03-01'});
s3 = new AWS.S3({ apiVersion: "2006-03-01" });

// Create params JSON for S3.createBucket
var bucketParams = {
Bucket : BUCKETNAME,
ACL : 'public-read'
Bucket: BUCKETNAME,
ACL: "public-read",
};

// Create params JSON for S3.setBucketWebsite
var staticHostParams = {
Bucket: BUCKETNAME,
WebsiteConfiguration: {
ErrorDocument: {
Key: 'index.html'
},
IndexDocument: {
Suffix: 'index.html'
ErrorDocument: {
Key: "index.html",
},
IndexDocument: {
Suffix: "index.html",
},
},
}
};

// Call S3 to create the bucket
s3.createBucket(bucketParams, function(err, data) {
s3.createBucket(bucketParams, function (err, data) {
if (err) {
console.log("Error", err);
} else {
console.log("Bucket URL is ", data.Location);
// Set the new policy on the newly created bucket
s3.putBucketWebsite(staticHostParams, function(err, data) {
s3.putBucketWebsite(staticHostParams, function (err, data) {
if (err) {
// Display error message
console.log("Error", err);
Expand All @@ -85,7 +85,6 @@ s3.createBucket(bucketParams, function(err, data) {
/// After the bucket is created, we upload to it:
///
s3FolderUpload(directoryName, credentials, options /* , invalidation */);

}
});
}
Expand Down
2 changes: 0 additions & 2 deletions packages/react-app/src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,6 @@ function App(props) {
// keep track of a variable from the contract in the local React state:
const purpose = useContractReader(readContracts, "YourContract", "purpose");

const block = 4;

/*
const addressFromENS = useResolveName(mainnetProvider, "austingriffith.eth");
console.log("🏷 Resolved austingriffith.eth as:",addressFromENS)
Expand Down
18 changes: 9 additions & 9 deletions packages/react-app/src/hooks/GasPrice.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ export default function useGasPrice(targetNetwork, speed) {
if (targetNetwork.hasOwnProperty("gasPrice")) {
setGasPrice(targetNetwork.gasPrice);
} else {
axios
.get("https://ethgasstation.info/json/ethgasAPI.json")
.then(response => {
const newGasPrice = response.data[speed || "fast"] * 100000000;
if (newGasPrice !== gasPrice) {
setGasPrice(newGasPrice);
}
})
.catch(error => console.log(error));
axios
.get("https://ethgasstation.info/json/ethgasAPI.json")
.then(response => {
const newGasPrice = response.data[speed || "fast"] * 100000000;
if (newGasPrice !== gasPrice) {
setGasPrice(newGasPrice);
}
})
.catch(error => console.log(error));
}
};

Expand Down
1 change: 0 additions & 1 deletion packages/react-app/src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
text-align: center;
}


body {
margin: 0;
}
Expand Down

0 comments on commit 3d4192b

Please sign in to comment.