mirror of
https://github.com/actions/setup-node.git
synced 2025-06-28 21:53:48 +00:00
Add and configure ESLint and update configuration for Prettier (#703)
* Add ESLinter and update Prettier * Update eslint config * Update dependencies * Rebuild action * Update package.json * Updates docs * Update docs
This commit is contained in:
parent
7c29869aec
commit
962678f22c
31 changed files with 3804 additions and 1545 deletions
|
@ -33,7 +33,7 @@ function writeRegistryToFile(
|
|||
}
|
||||
|
||||
core.debug(`Setting auth in ${fileLocation}`);
|
||||
let newContents: string = '';
|
||||
let newContents = '';
|
||||
if (fs.existsSync(fileLocation)) {
|
||||
const curContents: string = fs.readFileSync(fileLocation, 'utf8');
|
||||
curContents.split(os.EOL).forEach((line: string) => {
|
||||
|
@ -46,8 +46,8 @@ function writeRegistryToFile(
|
|||
// Remove http: or https: from front of registry.
|
||||
const authString: string =
|
||||
registryUrl.replace(/(^\w+:|^)/, '') + ':_authToken=${NODE_AUTH_TOKEN}';
|
||||
const registryString: string = `${scope}registry=${registryUrl}`;
|
||||
const alwaysAuthString: string = `always-auth=${alwaysAuth}`;
|
||||
const registryString = `${scope}registry=${registryUrl}`;
|
||||
const alwaysAuthString = `always-auth=${alwaysAuth}`;
|
||||
newContents += `${authString}${os.EOL}${registryString}${os.EOL}${alwaysAuthString}`;
|
||||
fs.writeFileSync(fileLocation, newContents);
|
||||
core.exportVariable('NPM_CONFIG_USERCONFIG', fileLocation);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue