2
0
mirror of https://github.com/tenrok/vue-select.git synced 2026-06-10 07:52:23 +03:00

refactor: apply eslint fixes (#1469)

This commit is contained in:
Jeff Sagal
2021-08-01 12:30:50 -07:00
committed by GitHub
parent a64ffc32d0
commit dd281aa8c6
85 changed files with 3616 additions and 3208 deletions
+16 -16
View File
@@ -1,14 +1,14 @@
require("dotenv").config();
const axios = require("axios");
const { graphql } = require("@octokit/graphql");
require('dotenv').config()
const axios = require('axios')
const { graphql } = require('@octokit/graphql')
module.exports = async () => ({
name: "constants.js",
name: 'constants.js',
content: `
export const SPONSORS = ${JSON.stringify(await getSponsors())};
export const CONTRIBUTORS = ${JSON.stringify(await getContributors())};
`
});
`,
})
/**
* Get a list of vue select contributors.
@@ -16,10 +16,10 @@ module.exports = async () => ({
*/
async function getContributors() {
const { data } = await axios.get(
"https://api.github.com/repos/sagalbot/vue-select/contributors?per_page=100"
);
'https://api.github.com/repos/sagalbot/vue-select/contributors?per_page=100'
)
return data;
return data
}
/**
@@ -49,17 +49,17 @@ async function getSponsors() {
}
}
}
`;
`
try {
const { user } = await graphql(query, {
headers: {
authorization: `token ${process.env.GITHUB_TOKEN || ""}`
}
});
return user.sponsorshipsAsMaintainer.nodes;
authorization: `token ${process.env.GITHUB_TOKEN || ''}`,
},
})
return user.sponsorshipsAsMaintainer.nodes
} catch (e) {
console.log(`${e.status} ${e.name} - Couldn't fetch sponsor data.`);
return [];
console.log(`${e.status} ${e.name} - Couldn't fetch sponsor data.`)
return []
}
}
+2 -2
View File
@@ -1,5 +1,5 @@
const clientDynamicModules = require('./clientDynamicModules');
const clientDynamicModules = require('./clientDynamicModules')
module.exports = {
clientDynamicModules: async () => await clientDynamicModules(),
};
}