Skip to content

lint:fix not working #171

Open
Open
@majdalsado

Description

@majdalsado

Prerequisites

  • I am running the latest version of Node and the tools
  • I checked the documentation and found no answer
  • I checked to make sure that this issue has not already been filed

Expected behavior

The Office Add-in template's linter should properly run and fix lint issues for TypeScript files.

Current behavior

The linter seems to be primarily configured for JavaScript files and doesn't properly recognize TypeScript files, even though TypeScript-specific configurations are present.
Although it's able to run the lint command, it fails when I try to run it with the --fix flag.

Steps to Reproduce

  1. Create a new Office Add-in project using the Yeoman generator
  2. Run the lint command: npm run lint
  3. Observe it runs successfully
  4. Run the lint command with fix: npm run lint:fix
  5. Observe errors for browser globals in TypeScript files`> [email protected] lint:fix
> office-addin-lint fix

Oops! Something went wrong! :(

ESLint: 9.20.1

No files matching the pattern "src/**/*.js" were found.
Please check for typing mistakes in the pattern.

Context

  • Operating System: macOS
  • Node version: 18.x/20.x
  • Office version: Microsoft 365
  • Tool versions:
    • typescript: ^5.4.2
    • office-addin-lint: ^3.0.3
    • eslint-plugin-office-addins: ^3.0.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions