Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[minor] office-addin-lint: update package versions #848

Merged
merged 3 commits into from
Apr 4, 2024

Conversation

akrantz
Copy link
Contributor

@akrantz akrantz commented Apr 4, 2024

Update the package versions for office-addin-lint.

For context, I was working on a project derived from Office-Addin-TaskPane-React template which involves custom functions, and was running into strange errors from eslint in TypeScript code in VS Code. I noticed that eslint was very out of date. After updating these package versions, building Office-Addin-Scripts and linking to office-addin-lint from the project, it fixed the errors.

NOTE: I removed engines-strict in .npmrc so I could use Node LTS.

I always wanted to mention that I think there should be a process to regularly update packages to newer versions across the repository. Relying only on dependabot or making updates only for addressing vulnerabilities isn't really enough. It's better to stay current with TypeScript, eslint, react, etc.

  1. Do these changes impact command syntax of any of the packages? (e.g., add/remove command, add/remove a command parameter, or update required parameters)
    No

  2. Do these changes impact documentation? (e.g., a tutorial on https://learn.microsoft.com/office/dev/add-ins/overview/office-add-ins)
    No

Validation/testing performed:

I validated this in the project I was working on. Running the Dev Server in VS Code did not show any errors.
I didn't get any lint errors in the project after linking to the new version of office-addin-lint.
npm run build in the project had no errors.
I ran npm install and npm run build in the root of the repository and there were no errors.
I ran npm run test in office-addin-lint project.

I noticed that npm run prettier in the template project wasn't working, so I fixed the path and it works now.

@akrantz akrantz requested a review from a team as a code owner April 4, 2024 13:48
@@ -11,7 +11,7 @@ const eslintPath = require.resolve("eslint");
const prettierPath = require.resolve("prettier");
const eslintDir = path.parse(eslintPath).dir;
const eslintFilePath = path.resolve(eslintDir, "../bin/eslint.js");
const prettierFilePath = path.resolve(prettierPath, "../bin-prettier.js");
const prettierFilePath = path.resolve(prettierPath, "../bin/prettier.cjs");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not very familiar with the prettier setup . . . what is effect of this (this is not a file in this package itself)?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's in the prettier code. I suppose you could ask whether the command should use npx instead, but the change here is just to match changes within prettier itself for its code.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense . . . I just haven't seen that file used anywhere so I wasn't sure how it was used.

@millerds millerds merged commit 5c31aa7 into OfficeDev:master Apr 4, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants