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:
@@ -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 []
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
const clientDynamicModules = require('./clientDynamicModules');
|
||||
const clientDynamicModules = require('./clientDynamicModules')
|
||||
|
||||
module.exports = {
|
||||
clientDynamicModules: async () => await clientDynamicModules(),
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user