Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .azure-devops/full-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ extends:
jobs:
- job: Windows_Latest
steps:
- task: NodeTool@0
- task: UseNode@1
inputs:
versionSpec: '24.x'
version: '24.x'
displayName: 'Use Node.js 24.x'
- template: /.azure-devops/steps/npm-install.yaml@self
- template: /.azure-devops/steps/build-individually.yaml@self
Expand All @@ -45,9 +45,9 @@ extends:
image: ubuntu-latest
os: linux
steps:
- task: NodeTool@0
- task: UseNode@1
inputs:
versionSpec: '24.x'
version: '24.x'
displayName: 'Use Node.js 24.x'
- template: /.azure-devops/steps/npm-install.yaml@self
- template: /.azure-devops/steps/build.yaml@self
Expand Down
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -139,4 +139,7 @@ project.xcworkspace
/packages/hxplatform/src/Telemetry/*.g.*

# Local AI helper files
CLAUDE.md
CLAUDE.md

# temporary build file
*.tsbuildinfo
3 changes: 2 additions & 1 deletion .npmrc
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
registry=https://registry.npmjs.org/
registry=https://office.pkgs.visualstudio.com/_packaging/OfficeDev/npm/registry/
always-auth=true
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,13 @@ The [Excel Custom Functions](https://github.com/OfficeDev/Excel-Custom-Functions

* [Node.js](https://nodejs.org)

## npm registry auth
Run the following command to get the authenticator for the first time:

`npm install --global @microsoft/artifacts-npm-credprovider --registry https://pkgs.dev.azure.com/artifacts-public/23934c1b-a3b5-4b70-9dd3-d1bef4cc72a0/_packaging/AzureArtifacts/npm/registry/`

Run `artifacts-npm-credprovider` to authenticate for the npm registry.
Comment thread
millerds marked this conversation as resolved.

## Getting started

In a command prompt, run:
Expand Down
8,257 changes: 3,578 additions & 4,679 deletions package-lock.json

Large diffs are not rendered by default.

14 changes: 10 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "root",
"private": true,
"engines": {
"node": ">=18 <25",
"node": "^20.19.0 || ^22.13.0 || >=24",
"npm": ">=8 <=11"
},
"scripts": {
Expand All @@ -22,14 +22,20 @@
"update-packages": "npm run exec -- npm update --dev"
},
"devDependencies": {
"@microsoft/eslint-plugin-sdl": "^1.0.1",
"@eslint/js": "^10.0.0",
"@types/node": "^22.10.10",
"eslint": "^9.0.0",
"eslint": "^10.0.0",
"lerna": "^9.0.3",
"typescript": "~5.9.3",
"typescript-eslint": "^8.8.1"
},
"overrides": {
"git-url-parse": "^13.0.0"
"eslint-plugin-react": {
"eslint": "$eslint"
},
"eslint-plugin-react-native": {
"eslint": "$eslint"
}
},
"workspaces": ["packages/*"]
}
3 changes: 1 addition & 2 deletions packages/custom-functions-metadata-plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@
"@types/node": "^14.17.2",
"concurrently": "^9.0.0",
"office-addin-lint": "^3.0.10",
"rimraf": "^6.0.1",
"typescript": "^4.7.4"
"rimraf": "^6.0.1"
},
"peerDependencies": {
"webpack": "^5.94.0"
Expand Down
1 change: 1 addition & 0 deletions packages/custom-functions-metadata-plugin/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"extends": "../../tsconfig.json",
"compilerOptions": {
"outDir": "lib",
"rootDir": "src",
"skipLibCheck": true
},
"include": ["src/**/*"],
Expand Down
2 changes: 1 addition & 1 deletion packages/custom-functions-metadata/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"office-addin-prettier-config": "^2.0.5",
"rimraf": "^6.0.1",
"ts-node": "^10.9.1",
"typescript": "^4.7.4"
"typescript": "~4.9.5"
},
"repository": {
"type": "git",
Expand Down
1 change: 1 addition & 0 deletions packages/custom-functions-metadata/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"extends": "../../tsconfig.json",
"compilerOptions": {
"outDir": "lib",
"rootDir": "src",
"skipLibCheck": true,
},
"include": ["src/**/*"],
Expand Down
5 changes: 2 additions & 3 deletions packages/eslint-config-office-addins/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"eslint"
],
"dependencies": {
"eslint": "^9.0.0",
"eslint": "^10.0.0",
"eslint-plugin-office-addins": "^4.0.10"
},
"peerDependencies": {
Expand All @@ -24,8 +24,7 @@
"@types/node": "^14.17.2",
"concurrently": "^9.0.0",
"office-addin-lint": "^3.0.10",
"rimraf": "^6.0.1",
"typescript": "^4.7.4"
"rimraf": "^6.0.1"
},
"repository": {
"type": "git",
Expand Down
1 change: 1 addition & 0 deletions packages/eslint-config-office-addins/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"extends": "../../tsconfig.json",
"compilerOptions": {
"outDir": "lib",
"rootDir": "src",
"skipLibCheck": true,
},
"include": ["src/**/*"],
Expand Down
19 changes: 8 additions & 11 deletions packages/eslint-plugin-excel-custom-functions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,31 +21,28 @@
"dependencies": {
"@types/custom-functions-runtime": "^1.5.1",
"@types/office-js": "^1.0.139",
"@typescript-eslint/utils": "^7.5.0",
"eslint": "^8.57.0",
"tslib": "^2.0.1",
"tsutils": "^3.17.1"
"@typescript-eslint/utils": "^8.0.0",
"tslib": "^2.0.1"
},
"peerDependencies": {
"typescript": "^4.7.4"
"eslint": "^8.57.0 || ^9.0.0 || ^10.0.0",
"typescript": "^5.0.0"
},
"devDependencies": {
"@microsoft/office-js": "^1.1.43",
"@types/jest": "^29.5.12",
"@types/node": "^14.17.2",
"@typescript-eslint/eslint-plugin": "^7.3.0",
"@typescript-eslint/parser": "^7.5.0",
"@typescript-eslint/rule-tester": "^7.5.0",
"@typescript-eslint/scope-manager": "^5.33.1",
"@typescript-eslint/eslint-plugin": "^8.0.0",
"@typescript-eslint/parser": "^8.0.0",
"@typescript-eslint/rule-tester": "^8.0.0",
"eslint-plugin-prettier": "^5.1.3",
"jest": "^29.7.0",
"office-addin-lint": "^3.0.10",
"office-addin-prettier-config": "^2.0.5",
"office-addin-usage-data": "^2.1.1",
"prettier": "^3.4.2",
"rimraf": "^6.0.1",
"ts-jest": "^29.1.2",
"typescript": "^4.7.4"
"ts-jest": "^29.1.2"
},
"repository": {
"type": "git",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { TSESTree, ESLintUtils, ParserServices } from "@typescript-eslint/utils";
import { TSESTree, ESLintUtils } from "@typescript-eslint/utils";
import {
REPO_URL,
callExpressionAnalysis,
Expand All @@ -25,8 +25,6 @@ export default ESLintUtils.RuleCreator(() => REPO_URL)({
meta: {
docs: {
description: "Prevents office read api calls",
recommended: "recommended",
requiresTypeChecking: true,
},
Comment thread
millerds marked this conversation as resolved.
type: "problem",
messages: <Record<MessageIds, string>>{
Expand All @@ -40,7 +38,7 @@ export default ESLintUtils.RuleCreator(() => REPO_URL)({
AssignmentExpression: (node: TSESTree.AssignmentExpression) => void;
VariableDeclarator: (node: TSESTree.VariableDeclarator) => void;
} {
const services: ParserServices = ESLintUtils.getParserServices(ruleContext);
const services = ESLintUtils.getParserServices(ruleContext);
const typeChecker: ts.TypeChecker = services.program.getTypeChecker();

// Registry of all functions that use Office API calls (regardless if CF or not)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { TSESTree, ESLintUtils, ParserServices } from "@typescript-eslint/utils";
import { TSESTree, ESLintUtils } from "@typescript-eslint/utils";
import { REPO_URL, callExpressionAnalysis, assignmentExpressionAnalysis } from "./utils";
import { RuleContext } from "@typescript-eslint/utils/ts-eslint";
import ts from "typescript";
Expand All @@ -20,8 +20,6 @@ export default ESLintUtils.RuleCreator(() => REPO_URL)({
meta: {
docs: {
description: "Prevents office write api calls",
recommended: "recommended",
requiresTypeChecking: true,
},
Comment thread
millerds marked this conversation as resolved.
type: "problem",
messages: <Record<MessageIds, string>>{
Expand All @@ -34,7 +32,7 @@ export default ESLintUtils.RuleCreator(() => REPO_URL)({
CallExpression: (node: TSESTree.CallExpression) => void;
AssignmentExpression: (node: TSESTree.AssignmentExpression) => void;
} {
const services: ParserServices = ESLintUtils.getParserServices(ruleContext);
const services = ESLintUtils.getParserServices(ruleContext);
const typeChecker: ts.TypeChecker = services.program.getTypeChecker();

//Registry of all functions that use Office API calls (regardless if CF or not)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@ type Options = unknown[];
type MessageIds = 'officeReadCall';

const ruleTester = new RuleTester({
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 2018,
sourceType: 'module',
tsconfigRootDir: path.resolve(__dirname, '..'),
project: './tsconfig.test.json', // relative to tsconfigRootDir
languageOptions: {
parserOptions: {
ecmaVersion: 2018,
sourceType: 'module',
tsconfigRootDir: path.resolve(__dirname, '..'),
project: './tsconfig.test.json', // relative to tsconfigRootDir
},
},
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@ type Options = unknown[];
type MessageIds = 'officeWriteCall';

const ruleTester = new RuleTester({
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 2018,
sourceType: 'module',
tsconfigRootDir: path.resolve(__dirname, '..'),
project: './tsconfig.test.json', // relative to tsconfigRootDir
languageOptions: {
parserOptions: {
ecmaVersion: 2018,
sourceType: 'module',
tsconfigRootDir: path.resolve(__dirname, '..'),
project: './tsconfig.test.json', // relative to tsconfigRootDir
},
},
});

Expand Down
9 changes: 9 additions & 0 deletions packages/eslint-plugin-office-addins/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,13 @@ module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json'],
transform: {
'^.+\\.ts$': ['ts-jest', {
tsconfig: {
module: 'commonjs',
moduleResolution: 'bundler',
esModuleInterop: true,
},
}],
},
};
8 changes: 4 additions & 4 deletions packages/eslint-plugin-office-addins/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
"test": "jest"
},
"peerDependencies": {
"eslint": "^9.0.0"
"eslint": "^9.0.0 || ^10.0.0",
"typescript": "^5.4.3"
},
"dependencies": {
"eslint-config-prettier": "^9.1.0",
Expand All @@ -26,14 +27,13 @@
"office-addin-prettier-config": "^2.0.5",
"prettier": "^3.2.5",
"requireindex": "~1.2.0",
"typescript": "^5.4.3",
"typescript-eslint": "~8.8.0"
"typescript-eslint": "^8.56.0"
},
"devDependencies": {
"@types/eslint-config-prettier": "^6.11.3",
"@types/jest": "^29.5.12",
"@types/node": "^20.12.3",
"@typescript-eslint/rule-tester": "~8.8.0",
"@typescript-eslint/rule-tester": "^8.56.0",
"jest": "^29.7.0",
"rimraf": "^6.0.1",
"ts-jest": "^29.1.2"
Expand Down
10 changes: 10 additions & 0 deletions packages/eslint-plugin-office-addins/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,16 @@ const recommended = [
jsx: true,
},
},
globals: {
Excel: "readonly",
Office: "readonly",
OfficeExtension: "readonly",
OfficeRuntime: "readonly",
Word: "readonly",
PowerPoint: "readonly",
OneNote: "readonly",
Visio: "readonly",
},
},
rules: {
"@typescript-eslint/no-unused-vars": "error",
Expand Down
1 change: 1 addition & 0 deletions packages/eslint-plugin-office-addins/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"module": "Node16",
"moduleResolution": "node16",
"outDir": "lib",
"rootDir": "src",
"skipLibCheck": true
},
"include": ["src/**/*"],
Expand Down
3 changes: 1 addition & 2 deletions packages/office-addin-cache/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@
"mocha": "^11.0.1",
"office-addin-lint": "^3.0.10",
"rimraf": "^6.0.1",
"ts-node": "^10.9.2",
"typescript": "^5.9.3"
"ts-node": "^10.9.2"
},
"repository": {
"type": "git",
Expand Down
4 changes: 1 addition & 3 deletions packages/office-addin-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,14 @@
"@types/node": "^14.17.2",
"@types/node-fetch": "^2.5.10",
"concurrently": "^9.0.0",
"eslint": "^9.0.0",
"eslint-plugin-office-addins": "^4.0.10",
"eslint-plugin-prettier": "^3.4.0",
"eslint-plugin-prettier": "^5.1.3",
"mocha": "^11.0.1",
"office-addin-prettier-config": "^2.0.5",
"office-addin-usage-data": "^2.1.1",
"prettier": "^3.5.3",
"rimraf": "^6.0.1",
"ts-node": "^10.9.1",
"typescript": "^4.7.4",
"typescript-eslint": "^8.4.0"
},
"repository": {
Expand Down
1 change: 1 addition & 0 deletions packages/office-addin-cli/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"extends": "../../tsconfig.json",
"compilerOptions": {
"outDir": "lib",
"rootDir": "src",
"skipLibCheck": true,
"types": ["node", "node-fetch"]
},
Expand Down
Loading