Skip to content

linter: using PandaCSS's ESLint rule via jsPlugins returns different results for glob vs specific path #16867

@elliotleelewis

Description

@elliotleelewis

What version of Oxlint are you using?

1.32.0

What command did you run?

oxlint --type-aware --quiet vs oxlint --type-aware --quiet ./Scripts/react/ZoneSelectChips.tsx

What does your .oxlintrc.json config file look like?

{
  "$schema": "./node_modules/oxlint/configuration_schema.json",
  "extends": ["./.oxlintrc.generated.json"],
  "ignorePatterns": [".vite/*", "**/nm/**", "**/styles/panda/**", "**/forter.js"],
  "rules": {
    "id-length": "off",
    "max-depth": "off",
    "max-lines-per-function": "off",
    "max-params": "off",

    // Disabled various sonarjs rules due to internal exceptions being thrown
    "sonarjs/no-all-duplicated-branches": "off",
    "sonarjs/no-duplicated-branches": "off",
    "sonarjs/no-element-overwrite": "off",
    "sonarjs/no-identical-expressions": "off",
    "sonarjs/no-identical-functions": "off"
  },
  "overrides": [
    {
      "files": ["**/api-types.ts"],
      "rules": {
        "tsdoc/syntax": "off"
      }
    },
    {
      "files": ["**/*.{ts,tsx,mts,cts}"],
      // TODO - delete these rule overrides below 1 at a time (these rules are enabled in our shared configs and base rules, but currently cause errors)
      "rules": {
        "sonarjs/prefer-immediate-return": "warn",
        "testing-library/prefer-screen-queries": "warn",
        "unicorn/catch-error-name": "warn",
        "unicorn/consistent-function-scoping": "warn",
        "unicorn/filename-case": "warn",
        "unicorn/no-array-callback-reference": "warn",
        "unicorn/no-document-cookie": "warn",
        "unicorn/no-new-array": "warn",
        "unicorn/no-useless-undefined": "warn",
        "unicorn/prefer-dom-node-dataset": "warn",
        "unicorn/prefer-global-this": "warn",
        "unicorn/prefer-structured-clone": "warn",
        "no-deprecated": "warn",
        "no-misused-promises": "warn",
        "no-unsafe-type-assertion": "warn"
      }
    },
    {
      "files": ["**/*.{js,jsx,mjs,cjs}"],
      // TODO - delete these rule overrides below 1 at a time (these rules are enabled in our shared configs and base rules, but currently cause errors)
      "rules": {
        "prefer-arrow-functions/prefer-arrow-functions": "warn",
        "react-compiler/react-compiler": "warn",
        "sonarjs/no-small-switch": "warn",
        "sonarjs/prefer-immediate-return": "warn",
        "unicorn/catch-error-name": "warn",
        "unicorn/consistent-function-scoping": "warn",
        "unicorn/filename-case": "warn",
        "unicorn/no-array-callback-reference": "warn",
        "unicorn/no-array-for-each": "warn",
        "unicorn/no-array-reverse": "warn",
        "unicorn/no-array-sort": "warn",
        "unicorn/no-new-array": "warn",
        "unicorn/no-object-as-default-parameter": "warn",
        "unicorn/no-useless-undefined": "warn",
        "unicorn/no-useless-spread": "warn",
        "unicorn/no-useless-switch-case": "warn",
        "unicorn/prefer-add-event-listener": "warn",
        "unicorn/prefer-array-some": "warn",
        "unicorn/prefer-code-point": "warn",
        "unicorn/prefer-global-this": "warn",
        "unicorn/prefer-logical-operator-over-ternary": "warn",
        "unicorn/prefer-number-properties": "warn",
        "unicorn/prefer-regexp-test": "warn",
        "unicorn/prefer-query-selector": "warn",
        "unicorn/prefer-spread": "warn",
        "unicorn/prefer-string-slice": "warn",
        "unicorn/prefer-structured-clone": "warn",
        "no-constant-binary-expression": "warn"
      }
    }
  ],
  "settings": {
    "@pandacss": {
      "configPath": "./panda.config.ts"
    }
  }
}

./.oxlintrc.generated.json:

{
  "$schema": "./node_modules/oxlint/configuration_schema.json",
  "jsPlugins": [
    "@pandacss/eslint-plugin",
    "eslint-plugin-playwright",
    "eslint-plugin-prefer-arrow-functions",
    "eslint-plugin-react-compiler",
    "eslint-plugin-regexp",
    "eslint-plugin-sonarjs",
    "eslint-plugin-storybook",
    "eslint-plugin-testing-library",
    "eslint-plugin-tsdoc",
    "eslint-plugin-unused-imports"
  ],
  "rules": {
    "array-bracket-newline": "off",
    "array-bracket-spacing": "off",
    "array-callback-return": [
      "error",
      {
        "allowImplicit": true
      }
    ],
    "array-element-newline": "off",
    "arrow-parens": "off",
    "arrow-spacing": "off",
    "block-spacing": "off",
    "brace-style": "off",
    "camelcase": [
      "error",
      {
        "properties": "never",
        "ignoreDestructuring": false,
        "ignoreImports": false,
        "ignoreGlobals": false
      }
    ],
    "comma-dangle": "off",
    "comma-spacing": "off",
    "comma-style": "off",
    "complexity": [
      "error",
      {
        "max": 18,
        "variant": "modified"
      }
    ],
    "computed-property-spacing": "off",
    "curly": 0,
    "default-case-last": "error",
    "dot-location": "off",
    "eol-last": "off",
    "eqeqeq": [
      "error",
      "always"
    ],
    "func-call-spacing": "off",
    "func-names": [
      "error",
      "as-needed"
    ],
    "func-style": [
      "error",
      "expression"
    ],
    "function-call-argument-newline": "off",
    "function-paren-newline": "off",
    "generator-star": "off",
    "generator-star-spacing": "off",
    "grouped-accessor-pairs": "error",
    "id-length": [
      "error",
      {
        "min": 2,
        "exceptions": [
          "i",
          "j",
          "k",
          "x",
          "y",
          "z"
        ]
      }
    ],
    "implicit-arrow-linebreak": "off",
    "indent": "off",
    "indent-legacy": "off",
    "jsx-quotes": "off",
    "key-spacing": "off",
    "keyword-spacing": "off",
    "linebreak-style": "off",
    "lines-around-comment": 0,
    "max-depth": [
      "error",
      5
    ],
    "max-len": 0,
    "max-lines-per-function": [
      "error",
      {
        "max": 160,
        "skipBlankLines": true,
        "skipComments": true
      }
    ],
    "max-params": [
      "error",
      8
    ],
    "max-statements": [
      "error",
      20
    ],
    "max-statements-per-line": "off",
    "multiline-ternary": "off",
    "new-cap": [
      "error",
      {
        "newIsCap": true,
        "capIsNew": false
      }
    ],
    "new-parens": "off",
    "newline-per-chained-call": "off",
    "no-alert": "error",
    "no-arrow-condition": "off",
    "no-caller": "error",
    "no-comma-dangle": "off",
    "no-confusing-arrow": 0,
    "no-constant-binary-expression": "error",
    "no-constant-condition": "error",
    "no-constructor-return": "error",
    "no-duplicate-case": "error",
    "no-duplicate-imports": [
      "error",
      {
        "allowSeparateTypeImports": true
      }
    ],
    "no-empty-character-class": "error",
    "no-ex-assign": "error",
    "no-extend-native": "error",
    "no-extra-bind": "error",
    "no-extra-label": "error",
    "no-extra-parens": "off",
    "no-extra-semi": "off",
    "no-floating-decimal": "off",
    "no-implicit-coercion": "error",
    "no-implicit-globals": "error",
    "no-invalid-regexp": "error",
    "no-irregular-whitespace": "error",
    "no-iterator": "error",
    "no-label-var": "error",
    "no-lone-blocks": "error",
    "no-loop-func": "error",
    "no-mixed-operators": 0,
    "no-mixed-spaces-and-tabs": "off",
    "no-multi-spaces": "off",
    "no-multiple-empty-lines": "off",
    "no-negated-condition": "off",
    "no-nested-ternary": "off",
    "no-promise-executor-return": "error",
    "no-proto": "error",
    "no-reserved-keys": "off",
    "no-restricted-syntax": [
      "error",
      {
        "selector": "Literal[value=/.*(?:urge|rush|mislead).*/i]",
        "message": "File contains a prohibited word (urge, rush, mislead) per compliance guidance"
      }
    ],
    "no-script-url": "error",
    "no-self-compare": "error",
    "no-sequences": "error",
    "no-shadow": [
      "error",
      {
        "allow": [
          "children"
        ]
      }
    ],
    "no-space-before-semi": "off",
    "no-spaced-func": "off",
    "no-sparse-arrays": "error",
    "no-tabs": 0,
    "no-template-curly-in-string": "error",
    "no-throw-literal": "error",
    "no-trailing-spaces": "off",
    "no-undef-init": "error",
    "no-underscore-dangle": "error",
    "no-unexpected-multiline": 0,
    "no-unneeded-ternary": "error",
    "no-unreachable-loop": "error",
    "no-unused-expressions": "error",
    "no-unused-labels": "error",
    "no-use-before-define": "error",
    "no-useless-call": "error",
    "no-useless-catch": "error",
    "no-useless-computed-key": "error",
    "no-useless-concat": "error",
    "no-useless-rename": "error",
    "no-useless-return": "error",
    "no-var": "error",
    "no-void": "error",
    "no-whitespace-before-property": "off",
    "no-wrap-func": "off",
    "nonblock-statement-body-position": "off",
    "object-curly-newline": "off",
    "object-curly-spacing": "off",
    "object-property-newline": "off",
    "object-shorthand": [
      "error",
      "always"
    ],
    "one-var": [
      "error",
      "never"
    ],
    "one-var-declaration-per-line": "off",
    "operator-linebreak": "off",
    "padded-blocks": "off",
    "prefer-arrow-callback": "error",
    "prefer-const": "error",
    "prefer-destructuring": [
      "error",
      {
        "array": false,
        "object": true
      }
    ],
    "prefer-promise-reject-errors": [
      "error",
      {
        "allowEmptyReject": true
      }
    ],
    "prefer-rest-params": "error",
    "prefer-spread": "error",
    "prefer-template": "error",
    "quote-props": "off",
    "quotes": 0,
    "rest-spread-spacing": "off",
    "semi": "off",
    "semi-spacing": "off",
    "semi-style": "off",
    "space-after-function-name": "off",
    "space-after-keywords": "off",
    "space-before-blocks": "off",
    "space-before-function-paren": "off",
    "space-before-function-parentheses": "off",
    "space-before-keywords": "off",
    "space-in-brackets": "off",
    "space-in-parens": "off",
    "space-infix-ops": "off",
    "space-return-throw-case": "off",
    "space-unary-ops": "off",
    "space-unary-word-ops": "off",
    "switch-colon-spacing": "off",
    "template-curly-spacing": "off",
    "template-tag-spacing": "off",
    "use-isnan": "error",
    "valid-typeof": "error",
    "wrap-iife": "off",
    "wrap-regex": "off",
    "yield-star-spacing": "off",
    "@pandacss/file-not-included": "off",
    "@pandacss/no-config-function-in-source": "off",
    "@pandacss/no-debug": "error",
    "@pandacss/no-deprecated-tokens": "error",
    "@pandacss/no-dynamic-styling": "error",
    "@pandacss/no-hardcoded-color": "off",
    "@pandacss/no-important": "error",
    "@pandacss/no-invalid-nesting": "error",
    "@pandacss/no-invalid-token-paths": "error",
    "@pandacss/no-physical-properties": "error",
    "@pandacss/no-property-renaming": "error",
    "@pandacss/no-unsafe-token-fn-usage": "error",
    "@pandacss/prefer-atomic-properties": "error",
    "@pandacss/prefer-longhand-properties": "error",
    "@pandacss/prefer-unified-property-style": "error",
    "@typescript-eslint/block-spacing": "off",
    "@typescript-eslint/brace-style": "off",
    "@typescript-eslint/comma-dangle": "off",
    "@typescript-eslint/comma-spacing": "off",
    "@typescript-eslint/consistent-type-exports": "error",
    "@typescript-eslint/consistent-type-imports": [
      "error",
      {
        "prefer": "type-imports",
        "fixStyle": "separate-type-imports"
      }
    ],
    "@typescript-eslint/func-call-spacing": "off",
    "@typescript-eslint/indent": "off",
    "@typescript-eslint/key-spacing": "off",
    "@typescript-eslint/keyword-spacing": "off",
    "@typescript-eslint/lines-around-comment": 0,
    "@typescript-eslint/member-delimiter-style": "off",
    "@typescript-eslint/no-duplicate-enum-values": "error",
    "@typescript-eslint/no-duplicate-type-constituents": "off",
    "@typescript-eslint/no-extra-parens": "off",
    "@typescript-eslint/no-extra-semi": "off",
    "@typescript-eslint/no-import-type-side-effects": "error",
    "@typescript-eslint/no-misused-promises": "off",
    "@typescript-eslint/no-unsafe-type-assertion": "error",
    "@typescript-eslint/no-unused-vars": "off",
    "@typescript-eslint/object-curly-spacing": "off",
    "@typescript-eslint/quotes": 0,
    "@typescript-eslint/semi": "off",
    "@typescript-eslint/space-before-blocks": "off",
    "@typescript-eslint/space-before-function-paren": "off",
    "@typescript-eslint/space-infix-ops": "off",
    "@typescript-eslint/type-annotation-spacing": "off",
    "import/extensions": [
      "error",
      "ignorePackages",
      {
        "js": "never",
        "cjs": "never",
        "mjs": "never",
        "jsx": "never",
        "ts": "never",
        "cts": "never",
        "mts": "never",
        "tsx": "never"
      }
    ],
    "import/named": "off",
    "import/no-cycle": "off",
    "import/order": [
      "error",
      {
        "groups": [
          "builtin",
          "external",
          "internal",
          "parent",
          "sibling",
          "index"
        ],
        "distinctGroup": false,
        "newlines-between": "never",
        "pathGroups": [
          {
            "pattern": "react",
            "group": "external",
            "position": "before"
          },
          {
            "pattern": "src/**",
            "group": "external",
            "position": "after"
          }
        ],
        "pathGroupsExcludedImportTypes": [
          "react",
          "builtin"
        ],
        "alphabetize": {
          "order": "asc",
          "orderImportKind": "asc",
          "caseInsensitive": true
        },
        "named": true
      }
    ],
    "import/prefer-default-export": "off",
    "jsdoc/check-access": "error",
    "jsdoc/check-alignment": "error",
    "jsdoc/check-param-names": "error",
    "jsdoc/check-tag-names": "error",
    "jsdoc/check-types": "error",
    "jsdoc/empty-tags": "error",
    "jsdoc/lines-before-block": "off",
    "jsdoc/no-blank-blocks": [
      "error",
      {
        "enableFixer": true
      }
    ],
    "jsdoc/no-defaults": "error",
    "jsdoc/require-hyphen-before-param-description": [
      "error",
      "always"
    ],
    "jsdoc/require-jsdoc": "off",
    "jsdoc/require-param": [
      "error",
      {
        "ignoreWhenAllParamsMissing": true
      }
    ],
    "jsdoc/require-param-name": "error",
    "jsdoc/require-returns": "off",
    "jsdoc/require-returns-description": "off",
    "jsdoc/tag-lines": "off",
    "jsdoc/valid-types": "error",
    "jsx-a11y/accessible-emoji": "error",
    "jsx-a11y/alt-text": "error",
    "jsx-a11y/anchor-ambiguous-text": "error",
    "jsx-a11y/anchor-has-content": "error",
    "jsx-a11y/anchor-is-valid": "error",
    "jsx-a11y/aria-activedescendant-has-tabindex": "error",
    "jsx-a11y/aria-props": "error",
    "jsx-a11y/aria-proptypes": "error",
    "jsx-a11y/aria-role": "error",
    "jsx-a11y/aria-unsupported-elements": "error",
    "jsx-a11y/autocomplete-valid": "error",
    "jsx-a11y/click-events-have-key-events": "error",
    "jsx-a11y/control-has-associated-label": "error",
    "jsx-a11y/heading-has-content": "error",
    "jsx-a11y/html-has-lang": "error",
    "jsx-a11y/iframe-has-title": "error",
    "jsx-a11y/img-redundant-alt": "error",
    "jsx-a11y/interactive-supports-focus": "error",
    "jsx-a11y/label-has-associated-control": "error",
    "jsx-a11y/lang": "error",
    "jsx-a11y/media-has-caption": "error",
    "jsx-a11y/mouse-events-have-key-events": "error",
    "jsx-a11y/no-access-key": "error",
    "jsx-a11y/no-aria-hidden-on-focusable": "error",
    "jsx-a11y/no-autofocus": "error",
    "jsx-a11y/no-distracting-elements": "error",
    "jsx-a11y/no-interactive-element-to-noninteractive-role": "error",
    "jsx-a11y/no-noninteractive-element-interactions": "error",
    "jsx-a11y/no-noninteractive-element-to-interactive-role": "error",
    "jsx-a11y/no-noninteractive-tabindex": "error",
    "jsx-a11y/no-onchange": "error",
    "jsx-a11y/no-redundant-roles": "error",
    "jsx-a11y/no-static-element-interactions": "error",
    "jsx-a11y/prefer-tag-over-role": "error",
    "jsx-a11y/role-has-required-aria-props": "error",
    "jsx-a11y/role-supports-aria-props": "error",
    "jsx-a11y/scope": "error",
    "jsx-a11y/tabindex-no-positive": "error",
    "prefer-arrow-functions/prefer-arrow-functions": "error",
    "promise/always-return": "error",
    "promise/catch-or-return": "error",
    "promise/no-multiple-resolved": "error",
    "promise/no-new-statics": "error",
    "promise/no-return-in-finally": "error",
    "promise/param-names": "error",
    "promise/valid-params": "error",
    "react/button-has-type": "error",
    "react/default-props-match-prop-types": "error",
    "react/destructuring-assignment": [
      "error",
      "always"
    ],
    "react/display-name": "off",
    "react/forbid-foreign-prop-types": "error",
    "react/jsx-boolean-value": [
      "error",
      "never"
    ],
    "react/jsx-child-element-spacing": "off",
    "react/jsx-closing-bracket-location": "off",
    "react/jsx-closing-tag-location": "off",
    "react/jsx-curly-newline": "off",
    "react/jsx-curly-spacing": "off",
    "react/jsx-equals-spacing": "off",
    "react/jsx-first-prop-new-line": "off",
    "react/jsx-fragments": [
      "error",
      "syntax"
    ],
    "react/jsx-handler-names": "error",
    "react/jsx-indent": "off",
    "react/jsx-indent-props": "off",
    "react/jsx-key": "error",
    "react/jsx-max-depth": [
      "error",
      {
        "max": 4
      }
    ],
    "react/jsx-max-props-per-line": "off",
    "react/jsx-newline": "off",
    "react/jsx-no-bind": "error",
    "react/jsx-no-comment-textnodes": "error",
    "react/jsx-no-constructed-context-values": "error",
    "react/jsx-no-duplicate-props": "error",
    "react/jsx-no-leaked-render": "error",
    "react/jsx-no-script-url": "error",
    "react/jsx-no-target-blank": "error",
    "react/jsx-no-undef": "error",
    "react/jsx-no-useless-fragment": "error",
    "react/jsx-one-expression-per-line": "off",
    "react/jsx-pascal-case": "error",
    "react/jsx-props-no-multi-spaces": "off",
    "react/jsx-sort-props": "error",
    "react/jsx-space-before-closing": "off",
    "react/jsx-tag-spacing": "off",
    "react/jsx-uses-react": "error",
    "react/jsx-uses-vars": "error",
    "react/jsx-wrap-multilines": "off",
    "react/no-access-state-in-setstate": "error",
    "react/no-array-index-key": "error",
    "react/no-children-prop": "error",
    "react/no-danger": "error",
    "react/no-danger-with-children": "error",
    "react/no-deprecated": "error",
    "react/no-did-mount-set-state": "error",
    "react/no-did-update-set-state": "error",
    "react/no-direct-mutation-state": "error",
    "react/no-find-dom-node": "error",
    "react/no-is-mounted": "error",
    "react/no-multi-comp": "error",
    "react/no-object-type-as-default-prop": "error",
    "react/no-render-return-value": "error",
    "react/no-set-state": "error",
    "react/no-string-refs": "error",
    "react/no-this-in-sfc": "error",
    "react/no-typos": "error",
    "react/no-unescaped-entities": "error",
    "react/no-unknown-property": "error",
    "react/no-unsafe": "error",
    "react/no-unstable-nested-components": "error",
    "react/no-unused-prop-types": "error",
    "react/no-unused-state": "error",
    "react/no-will-update-set-state": "error",
    "react/prefer-es6-class": "error",
    "react/prefer-exact-props": "error",
    "react/prefer-stateless-function": "error",
    "react/prop-types": "off",
    "react/require-default-props": "off",
    "react/require-optimization": "error",
    "react/require-render-return": "error",
    "react/self-closing-comp": "error",
    "react/sort-comp": "error",
    "react/sort-prop-types": "error",
    "react/state-in-constructor": "error",
    "react/static-property-placement": "error",
    "react/style-prop-object": "error",
    "react/void-dom-elements-no-children": "error",
    "react-compiler/react-compiler": "error",
    "react-hooks/exhaustive-deps": "error",
    "react-hooks/rules-of-hooks": "error",
    "regexp/no-contradiction-with-assertion": "error",
    "regexp/no-empty-character-class": "error",
    "regexp/no-invalid-regexp": "error",
    "regexp/no-misleading-capturing-group": "error",
    "regexp/no-misleading-unicode-character": "error",
    "regexp/no-super-linear-backtracking": "error",
    "regexp/no-super-linear-move": "error",
    "sonarjs/cors": "error",
    "sonarjs/csrf": "error",
    "sonarjs/insecure-cookie": "error",
    "sonarjs/no-all-duplicated-branches": "error",
    "sonarjs/no-duplicate-string": "off",
    "sonarjs/no-duplicated-branches": "error",
    "sonarjs/no-element-overwrite": "error",
    "sonarjs/no-hardcoded-passwords": "error",
    "sonarjs/no-hardcoded-secrets": "error",
    "sonarjs/no-identical-expressions": "error",
    "sonarjs/no-identical-functions": "error",
    "sonarjs/no-same-line-conditional": "error",
    "sonarjs/no-small-switch": "error",
    "sonarjs/no-unused-collection": "error",
    "sonarjs/no-useless-catch": "error",
    "sonarjs/prefer-immediate-return": "error",
    "sonarjs/prefer-single-boolean-return": "error",
    "sonarjs/weak-ssl": "error",
    "unicorn/better-regex": "error",
    "unicorn/catch-error-name": "error",
    "unicorn/consistent-assert": "error",
    "unicorn/consistent-date-clone": "error",
    "unicorn/consistent-destructuring": "off",
    "unicorn/consistent-empty-array-spread": "error",
    "unicorn/consistent-existence-index-check": "error",
    "unicorn/consistent-function-scoping": "error",
    "unicorn/custom-error-definition": "error",
    "unicorn/empty-brace-spaces": "off",
    "unicorn/error-message": "error",
    "unicorn/escape-case": "error",
    "unicorn/expiring-todo-comments": "warn",
    "unicorn/explicit-length-check": "error",
    "unicorn/filename-case": "error",
    "unicorn/import-style": "error",
    "unicorn/new-for-builtins": "error",
    "unicorn/no-abusive-eslint-disable": "error",
    "unicorn/no-accessor-recursion": "error",
    "unicorn/no-anonymous-default-export": "error",
    "unicorn/no-array-callback-reference": "error",
    "unicorn/no-array-for-each": "error",
    "unicorn/no-array-method-this-argument": "error",
    "unicorn/no-array-reduce": "off",
    "unicorn/no-array-reverse": "error",
    "unicorn/no-array-sort": "error",
    "unicorn/no-await-expression-member": "error",
    "unicorn/no-await-in-promise-methods": "error",
    "unicorn/no-console-spaces": "error",
    "unicorn/no-document-cookie": "error",
    "unicorn/no-empty-file": "error",
    "unicorn/no-for-loop": "error",
    "unicorn/no-hex-escape": "error",
    "unicorn/no-immediate-mutation": "error",
    "unicorn/no-instanceof-builtins": "error",
    "unicorn/no-invalid-fetch-options": "error",
    "unicorn/no-invalid-remove-event-listener": "error",
    "unicorn/no-keyword-prefix": "off",
    "unicorn/no-lonely-if": "error",
    "unicorn/no-magic-array-flat-depth": "error",
    "unicorn/no-named-default": "error",
    "unicorn/no-negated-condition": "error",
    "unicorn/no-negation-in-equality-check": "error",
    "unicorn/no-nested-ternary": "off",
    "unicorn/no-new-array": "error",
    "unicorn/no-new-buffer": "error",
    "unicorn/no-null": "off",
    "unicorn/no-object-as-default-parameter": "error",
    "unicorn/no-process-exit": "error",
    "unicorn/no-single-promise-in-promise-methods": "error",
    "unicorn/no-static-only-class": "error",
    "unicorn/no-thenable": "error",
    "unicorn/no-this-assignment": "error",
    "unicorn/no-typeof-undefined": "error",
    "unicorn/no-unnecessary-array-flat-depth": "error",
    "unicorn/no-unnecessary-array-splice-count": "error",
    "unicorn/no-unnecessary-await": "error",
    "unicorn/no-unnecessary-polyfills": "off",
    "unicorn/no-unnecessary-slice-end": "error",
    "unicorn/no-unreadable-array-destructuring": "error",
    "unicorn/no-unreadable-iife": "error",
    "unicorn/no-unused-properties": "off",
    "unicorn/no-useless-collection-argument": "error",
    "unicorn/no-useless-error-capture-stack-trace": "error",
    "unicorn/no-useless-fallback-in-spread": "error",
    "unicorn/no-useless-length-check": "error",
    "unicorn/no-useless-promise-resolve-reject": "error",
    "unicorn/no-useless-spread": "error",
    "unicorn/no-useless-switch-case": "error",
    "unicorn/no-useless-undefined": "error",
    "unicorn/no-zero-fractions": "error",
    "unicorn/number-literal-case": "off",
    "unicorn/numeric-separators-style": "error",
    "unicorn/prefer-add-event-listener": "error",
    "unicorn/prefer-array-find": "error",
    "unicorn/prefer-array-flat": "error",
    "unicorn/prefer-array-flat-map": "error",
    "unicorn/prefer-array-index-of": "error",
    "unicorn/prefer-array-some": "error",
    "unicorn/prefer-at": "error",
    "unicorn/prefer-bigint-literals": "error",
    "unicorn/prefer-blob-reading-methods": "error",
    "unicorn/prefer-class-fields": "error",
    "unicorn/prefer-classlist-toggle": "error",
    "unicorn/prefer-code-point": "error",
    "unicorn/prefer-date-now": "error",
    "unicorn/prefer-default-parameters": "error",
    "unicorn/prefer-dom-node-append": "error",
    "unicorn/prefer-dom-node-dataset": "error",
    "unicorn/prefer-dom-node-remove": "error",
    "unicorn/prefer-dom-node-text-content": "error",
    "unicorn/prefer-event-target": "error",
    "unicorn/prefer-export-from": "error",
    "unicorn/prefer-global-this": "error",
    "unicorn/prefer-import-meta-properties": "off",
    "unicorn/prefer-includes": "error",
    "unicorn/prefer-json-parse-buffer": "off",
    "unicorn/prefer-keyboard-event-key": "error",
    "unicorn/prefer-logical-operator-over-ternary": "error",
    "unicorn/prefer-math-min-max": "error",
    "unicorn/prefer-math-trunc": "error",
    "unicorn/prefer-modern-dom-apis": "error",
    "unicorn/prefer-modern-math-apis": "error",
    "unicorn/prefer-module": "error",
    "unicorn/prefer-native-coercion-functions": "error",
    "unicorn/prefer-negative-index": "error",
    "unicorn/prefer-node-protocol": "error",
    "unicorn/prefer-number-properties": "error",
    "unicorn/prefer-object-from-entries": "error",
    "unicorn/prefer-optional-catch-binding": "error",
    "unicorn/prefer-prototype-methods": "error",
    "unicorn/prefer-query-selector": "error",
    "unicorn/prefer-reflect-apply": "error",
    "unicorn/prefer-regexp-test": "error",
    "unicorn/prefer-response-static-json": "error",
    "unicorn/prefer-set-has": "error",
    "unicorn/prefer-set-size": "error",
    "unicorn/prefer-single-call": "error",
    "unicorn/prefer-spread": "error",
    "unicorn/prefer-string-raw": "error",
    "unicorn/prefer-string-replace-all": "error",
    "unicorn/prefer-string-slice": "error",
    "unicorn/prefer-string-starts-ends-with": "error",
    "unicorn/prefer-string-trim-start-end": "error",
    "unicorn/prefer-structured-clone": "error",
    "unicorn/prefer-switch": "error",
    "unicorn/prefer-ternary": "error",
    "unicorn/prefer-top-level-await": "error",
    "unicorn/prefer-type-error": "error",
    "unicorn/prevent-abbreviations": [
      "error",
      {
        "checkShorthandProperties": true,
        "checkFilenames": false,
        "allowList": {
          "Props": true,
          "props": true,
          "utils": true,
          "Utils": true,
          "args": true,
          "arg": true,
          "Args": true,
          "Arg": true,
          "ref": true,
          "refs": true,
          "Ref": true,
          "Refs": true,
          "params": true,
          "Params": true,
          "Param": true,
          "var": true,
          "vars": true,
          "Var": true,
          "Vars": true
        },
        "replacements": {
          "e": {
            "event": false
          },
          "res": false,
          "cmd": {
            "command": true
          },
          "errCb": {
            "handleError": true
          }
        }
      }
    ],
    "unicorn/relative-url-style": "error",
    "unicorn/require-array-join-separator": "error",
    "unicorn/require-module-attributes": "error",
    "unicorn/require-module-specifiers": "error",
    "unicorn/require-number-to-fixed-digits-argument": "error",
    "unicorn/require-post-message-target-origin": "off",
    "unicorn/string-content": "off",
    "unicorn/switch-case-braces": "error",
    "unicorn/template-indent": 0,
    "unicorn/text-encoding-identifier-case": "error",
    "unicorn/throw-new-error": "error",
    "unused-imports/no-unused-imports": "error",
    "unused-imports/no-unused-vars": [
      "warn",
      {
        "vars": "all",
        "varsIgnorePattern": "^_",
        "args": "after-used",
        "argsIgnorePattern": "^_"
      }
    ]
  },
  "overrides": [
    {
      "files": [
        "**/*.ts",
        "**/*.tsx",
        "**/*.mts",
        "**/*.cts"
      ],
      "rules": {
        "constructor-super": "off",
        "getter-return": "off",
        "no-class-assign": "off",
        "no-const-assign": "off",
        "no-dupe-args": "off",
        "no-dupe-class-members": "off",
        "no-dupe-keys": "off",
        "no-func-assign": "off",
        "no-import-assign": "off",
        "no-new-native-nonconstructor": "off",
        "no-new-symbol": "off",
        "no-obj-calls": "off",
        "no-redeclare": "off",
        "no-setter-return": "off",
        "no-this-before-super": "off",
        "no-undef": "off",
        "no-unreachable": "off",
        "no-unsafe-negation": "off",
        "no-var": "error",
        "no-with": "off",
        "prefer-const": "error",
        "prefer-rest-params": "error",
        "prefer-spread": "error"
      }
    },
    {
      "files": [
        "**/*{.ts,.cts,.mts,.tsx}"
      ],
      "rules": {
        "no-implied-eval": "off",
        "no-return-await": "off",
        "no-throw-literal": "off",
        "prefer-promise-reject-errors": "off",
        "require-await": "off",
        "@typescript-eslint/await-thenable": "error",
        "@typescript-eslint/no-array-delete": "error",
        "@typescript-eslint/no-base-to-string": "error",
        "@typescript-eslint/no-confusing-void-expression": "error",
        "@typescript-eslint/no-deprecated": "error",
        "@typescript-eslint/no-duplicate-type-constituents": "error",
        "@typescript-eslint/no-floating-promises": "error",
        "@typescript-eslint/no-for-in-array": "error",
        "@typescript-eslint/no-implied-eval": "error",
        "@typescript-eslint/no-meaningless-void-operator": "error",
        "@typescript-eslint/no-misused-promises": "error",
        "@typescript-eslint/no-misused-spread": "error",
        "@typescript-eslint/no-mixed-enums": "error",
        "@typescript-eslint/no-redundant-type-constituents": "error",
        "@typescript-eslint/no-unnecessary-boolean-literal-compare": "error",
        "@typescript-eslint/no-unnecessary-condition": "error",
        "@typescript-eslint/no-unnecessary-template-expression": "error",
        "@typescript-eslint/no-unnecessary-type-arguments": "error",
        "@typescript-eslint/no-unnecessary-type-assertion": "error",
        "@typescript-eslint/no-unnecessary-type-conversion": "error",
        "@typescript-eslint/no-unnecessary-type-parameters": "error",
        "@typescript-eslint/no-unsafe-argument": "error",
        "@typescript-eslint/no-unsafe-assignment": "error",
        "@typescript-eslint/no-unsafe-call": "error",
        "@typescript-eslint/no-unsafe-enum-comparison": "error",
        "@typescript-eslint/no-unsafe-member-access": "error",
        "@typescript-eslint/no-unsafe-return": "error",
        "@typescript-eslint/no-unsafe-unary-minus": "error",
        "@typescript-eslint/only-throw-error": "error",
        "@typescript-eslint/prefer-promise-reject-errors": "error",
        "@typescript-eslint/prefer-reduce-type-parameter": "error",
        "@typescript-eslint/prefer-return-this-type": "error",
        "@typescript-eslint/related-getter-setter-pairs": "error",
        "@typescript-eslint/require-await": "error",
        "@typescript-eslint/restrict-plus-operands": [
          "error",
          {
            "allowAny": false,
            "allowBoolean": false,
            "allowNullish": false,
            "allowNumberAndString": false,
            "allowRegExp": false
          }
        ],
        "@typescript-eslint/restrict-template-expressions": [
          "error",
          {
            "allowAny": false,
            "allowBoolean": false,
            "allowNever": false,
            "allowNullish": false,
            "allowNumber": false,
            "allowRegExp": false
          }
        ],
        "@typescript-eslint/return-await": [
          "error",
          "error-handling-correctness-only"
        ],
        "@typescript-eslint/unbound-method": "error",
        "@typescript-eslint/use-unknown-in-catch-callback-variable": "error"
      }
    },
    {
      "files": [
        "**/*{.ts,.cts,.mts,.tsx}"
      ],
      "rules": {
        "dot-notation": "off",
        "@typescript-eslint/dot-notation": "error",
        "@typescript-eslint/non-nullable-type-assertion-style": "error",
        "@typescript-eslint/prefer-find": "error",
        "@typescript-eslint/prefer-includes": "error",
        "@typescript-eslint/prefer-nullish-coalescing": "error",
        "@typescript-eslint/prefer-optional-chain": "error",
        "@typescript-eslint/prefer-regexp-exec": "error",
        "@typescript-eslint/prefer-string-starts-ends-with": "error"
      }
    },
    {
      "files": [
        "**/*{.ts,.cts,.mts,.tsx}"
      ],
      "rules": {
        "@typescript-eslint/no-confusing-non-null-assertion": "error",
        "@typescript-eslint/no-non-null-asserted-optional-chain": "error",
        "@typescript-eslint/prefer-as-const": "error",
        "@typescript-eslint/prefer-literal-enum-member": "error",
        "@typescript-eslint/restrict-template-expressions": [
          "error",
          {
            "allowNumber": true
          }
        ],
        "promise/avoid-new": "error",
        "promise/no-nesting": "error",
        "promise/no-return-wrap": "error",
        "regexp/no-dupe-disjunctions": "error",
        "regexp/no-empty-alternative": "error",
        "regexp/no-optional-assertion": "error",
        "regexp/no-unused-capturing-group": "error",
        "regexp/no-useless-assertions": "error",
        "regexp/no-useless-backreference": "error",
        "regexp/no-useless-quantifier": "error"
      }
    },
    {
      "files": [
        "**/*.{test,spec}.{js,jsx,ts,tsx}",
        "**/__tests__/**/*"
      ],
      "rules": {
        "func-names": "off",
        "max-lines-per-function": "off",
        "max-statements": "off",
        "no-console": "off",
        "no-magic-numbers": "off",
        "prefer-arrow-callback": "off",
        "@typescript-eslint/no-empty-function": "off",
        "@typescript-eslint/no-explicit-any": "off",
        "@typescript-eslint/no-non-null-assertion": "off",
        "@typescript-eslint/no-unsafe-assignment": "off",
        "@typescript-eslint/no-unsafe-call": "off",
        "@typescript-eslint/no-unsafe-member-access": "off",
        "import/no-extraneous-dependencies": [
          "error",
          {
            "devDependencies": true
          }
        ],
        "vitest/no-conditional-expect": "error",
        "vitest/no-conditional-in-test": "error",
        "vitest/no-disabled-tests": "error",
        "vitest/no-duplicate-hooks": "error",
        "vitest/no-focused-tests": "error",
        "vitest/no-identical-title": "error",
        "vitest/no-standalone-expect": "error",
        "vitest/no-test-return-statement": "error",
        "vitest/valid-describe-callback": "error",
        "vitest/valid-expect": "error",
        "vitest/valid-title": "error"
      }
    },
    {
      "files": [
        "**/*.{test,spec}.{js,jsx,ts,tsx}",
        "**/__tests__/**/*"
      ],
      "rules": {
        "vitest/prefer-comparison-matcher": "error",
        "vitest/prefer-equality-matcher": "error",
        "vitest/prefer-expect-assertions": [
          "error",
          {
            "onlyFunctionsWithAsyncKeyword": true
          }
        ],
        "vitest/prefer-hooks-in-order": "error",
        "vitest/prefer-hooks-on-top": "error",
        "vitest/prefer-mock-promise-shorthand": "error",
        "vitest/prefer-spy-on": "error",
        "vitest/prefer-strict-equal": "error",
        "vitest/prefer-to-be": "error",
        "vitest/prefer-to-contain": "error",
        "vitest/prefer-to-have-length": "error",
        "vitest/prefer-todo": "error",
        "vitest/prefer-vi-mocked": "error",
        "vitest/require-to-throw-message": "error",
        "vitest/require-top-level-describe": "error"
      }
    },
    {
      "files": [
        "**/*.{test,spec}.{js,jsx,ts,tsx}",
        "**/__tests__/**/*"
      ],
      "rules": {
        "testing-library/await-async-events": "error",
        "testing-library/await-async-queries": "error",
        "testing-library/await-async-utils": "error",
        "testing-library/no-await-sync-queries": "error",
        "testing-library/no-debugging-utils": "error",
        "testing-library/no-manual-cleanup": "error",
        "testing-library/no-render-in-lifecycle": "error",
        "testing-library/no-unnecessary-act": "error",
        "testing-library/no-wait-for-multiple-assertions": "error",
        "testing-library/no-wait-for-side-effects": "error",
        "testing-library/prefer-find-by": "error",
        "testing-library/prefer-presence-queries": "error",
        "testing-library/prefer-query-by-disappearance": "error"
      }
    },
    {
      "files": [
        "**/*.{test,spec}.{js,jsx,ts,tsx}",
        "**/__tests__/**/*"
      ],
      "rules": {
        "testing-library/consistent-data-testid": [
          "error",
          {
            "testIdPattern": "^[a-z]+(-[a-z]+)*-id$"
          }
        ],
        "testing-library/no-global-regexp-flag-in-query": "error",
        "testing-library/no-manual-cleanup": "error",
        "testing-library/prefer-explicit-assert": "error"
      }
    },
    {
      "files": [
        "**/*.{test,spec}.{js,jsx,ts,tsx}",
        "**/__tests__/**/*"
      ],
      "rules": {
        "testing-library/no-container": "error",
        "testing-library/no-node-access": "error",
        "testing-library/no-test-id-queries": "warn",
        "testing-library/prefer-explicit-assert": "error",
        "testing-library/prefer-screen-queries": "error",
        "testing-library/prefer-user-event": "error"
      }
    },
    {
      "files": [
        "**/*.e2e.{test,spec}.{js,jsx,ts,tsx}",
        "**/e2e/**/*",
        "**/tests/e2e/**/*",
        "**/*.playwright.{ts,js}"
      ],
      "rules": {
        "playwright/expect-expect": "error",
        "playwright/max-nested-describe": "error",
        "playwright/missing-playwright-await": "error",
        "playwright/no-conditional-expect": "error",
        "playwright/no-conditional-in-test": "error",
        "playwright/no-focused-test": "error",
        "playwright/no-force-option": "error",
        "playwright/no-wait-for-timeout": "error",
        "playwright/prefer-to-be": "error",
        "playwright/prefer-to-contain": "error",
        "playwright/prefer-to-have-length": "error",
        "playwright/prefer-web-first-assertions": "error",
        "playwright/valid-expect": "error"
      }
    },
    {
      "files": [
        "**/*.stories.{js,jsx,ts,tsx,mdx}",
        "**/*.story.{js,jsx,ts,tsx}"
      ],
      "rules": {
        "max-lines-per-function": "off",
        "no-console": "off",
        "no-magic-numbers": "off",
        "no-underscore-dangle": "off",
        "react/forbid-dom-props": "off",
        "react/jsx-no-bind": "off",
        "react/jsx-no-literals": "off",
        "react/jsx-props-no-spreading": "off",
        "react/no-array-index-key": "off",
        "react/require-default-props": "off",
        "storybook/await-interactions": "error",
        "storybook/context-in-play-function": "error",
        "storybook/csf-component": "error",
        "storybook/default-exports": "error",
        "storybook/hierarchy-separator": "error",
        "storybook/meta-inline-properties": [
          "error",
          {
            "csfVersion": 3
          }
        ],
        "storybook/meta-satisfies-type": "error",
        "storybook/no-redundant-story-name": "error",
        "storybook/no-stories-of": "error",
        "storybook/no-title-property-in-meta": "warn",
        "storybook/no-uninstalled-addons": "error",
        "storybook/prefer-pascal-case": "error",
        "storybook/story-exports": "error",
        "storybook/use-storybook-expect": "error",
        "storybook/use-storybook-testing-library": "error",
        "unused-imports/no-unused-vars": "off"
      }
    },
    {
      "files": [
        "**/*{.ts,.cts,.mts,.tsx}"
      ],
      "rules": {
        "jsdoc/check-param-names": [
          "error",
          {
            "checkDestructured": false
          }
        ],
        "jsdoc/check-tag-names": "off",
        "jsdoc/require-param": [
          "error",
          {
            "ignoreWhenAllParamsMissing": true,
            "checkDestructured": false
          }
        ],
        "jsdoc/require-param-type": "off",
        "jsdoc/require-returns-type": "off",
        "jsdoc/valid-types": "off",
        "tsdoc/syntax": "error"
      }
    },
    {
      "files": [
        "**/*{.js,.cjs,.mjs,.jsx}"
      ],
      "rules": {
        "jsdoc/require-param-description": "off",
        "jsdoc/require-param-type": "error",
        "jsdoc/require-returns-type": "error"
      }
    }
  ]
}

What happened?

The @pandacss JS plugin rules work correctly when linting a single file but completely fail to detect violations when linting multiple files (glob patterns, directory scans, or explicit file lists).

Expected Behavior

PandaCSS rules like @pandacss/no-physical-properties should detect violations regardless of whether oxlint processes one file or multiple files.

Actual Behavior

  • Single file: Violations detected correctly
  • Multiple files: Violations not detected at all (reports 0 errors even when violations exist)

Reproduction

Setup:

Create a minimal PandaCSS project with:

  1. panda.config.ts:
export default {
  include: ["./src/**/*.{ts,tsx}"],
  outdir: "./styled-system"
};
  1. .oxlintrc.json:
{
  "jsPlugins": ["@pandacss/eslint-plugin"],
  "rules": {
    "@pandacss/no-physical-properties": "error"
  },
  "settings": {
    "@pandacss": {
      "configPath": "./panda.config.ts"
    }
  }
}
  1. src/Component.tsx with violation:
import { css } from "../styled-system/css";

const styles = css({
  marginLeft: "20px"  // Physical property violation
});

Test commands:

# ✅ Works - detects the marginLeft violation
npx oxlint src/Component.tsx
# Output: Found 0 warnings and 1 error.
#   x @pandacss(no-physical-properties): Use logical property instead of `marginLeft`

# ❌ Fails - same file, no detection
npx oxlint 'src/*.tsx'
# Output: Found 0 warnings and 0 errors.

# ❌ Fails - explicit file list
npx oxlint src/Component.tsx src/AnotherFile.tsx
# Output: Found 0 warnings and 0 errors.

# ❌ Fails - directory scan
npx oxlint src/
# Output: Found 0 warnings and 0 errors.

Configuration Attempts

Tested multiple configuration variations - none work for multi-file scanning:

  • ✗ "configPath": "./panda.config.ts"
  • ✗ "configPath": "panda.config.ts" (without ./)
  • ✗ Absolute path: "configPath": "/absolute/path/to/panda.config.ts"
  • ✗ Empty settings: "@pandacss": {}
  • ✗ No settings section at all

Analysis

The PandaCSS plugin appears to have an issue with:

  1. Config resolution during multi-file processing, or
  2. Plugin initialization that only works for single-file invocations

The "JS plugins are experimental" warning appears in both single-file and multi-file scans, so the plugin loads - it just doesn't execute rules correctly during multi-file processing.

Environment

  • oxlint version: 1.32.0
  • Node version: 22.12.0
  • OS: macOS 14.6 (Darwin 24.6.0)
  • @pandacss/eslint-plugin: 0.3.0

Workaround

Using ESLint with @pandacss/eslint-plugin correctly detects violations in all scanning modes. Oxlint's PandaCSS plugin only works reliably for single-file linting.

Impact

This makes oxlint's PandaCSS plugin unusable in CI/CD pipelines and development workflows where multi-file linting is required. Users must continue using ESLint for PandaCSS rule enforcement.

Metadata

Metadata

Assignees

Labels

Type

Priority

None yet

Effort

None yet

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions