mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-03-10 14:10:37 -07:00
fix(chore): Support linting for cjs (#18639)
Co-authored-by: Gal Zahavi <38544478+galz10@users.noreply.github.com>
This commit is contained in:
8
.github/scripts/sync-maintainer-labels.cjs
vendored
8
.github/scripts/sync-maintainer-labels.cjs
vendored
@@ -1,5 +1,9 @@
|
||||
/* eslint-disable @typescript-eslint/no-require-imports */
|
||||
/* global process, console, require */
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2026 Google LLC
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
const { Octokit } = require('@octokit/rest');
|
||||
|
||||
/**
|
||||
|
||||
@@ -37,7 +37,6 @@ export default tseslint.config(
|
||||
'dist/**',
|
||||
'evals/**',
|
||||
'packages/test-utils/**',
|
||||
'packages/core/src/skills/builtin/skill-creator/scripts/*.cjs',
|
||||
],
|
||||
},
|
||||
eslint.configs.recommended,
|
||||
@@ -243,7 +242,7 @@ export default tseslint.config(
|
||||
},
|
||||
},
|
||||
{
|
||||
files: ['./**/*.{tsx,ts,js}'],
|
||||
files: ['./**/*.{tsx,ts,js,cjs}'],
|
||||
plugins: {
|
||||
headers,
|
||||
import: importPlugin,
|
||||
@@ -269,7 +268,6 @@ export default tseslint.config(
|
||||
'import/enforce-node-protocol-usage': ['error', 'always'],
|
||||
},
|
||||
},
|
||||
// extra settings for scripts that we run directly with node
|
||||
{
|
||||
files: ['./scripts/**/*.js', 'esbuild.config.js'],
|
||||
languageOptions: {
|
||||
@@ -290,6 +288,30 @@ export default tseslint.config(
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
files: ['**/*.cjs'],
|
||||
languageOptions: {
|
||||
sourceType: 'commonjs',
|
||||
globals: {
|
||||
...globals.node,
|
||||
},
|
||||
},
|
||||
rules: {
|
||||
'no-restricted-syntax': 'off',
|
||||
'no-console': 'off',
|
||||
'no-empty': 'off',
|
||||
'no-redeclare': 'off',
|
||||
'@typescript-eslint/no-require-imports': 'off',
|
||||
'@typescript-eslint/no-unused-vars': [
|
||||
'error',
|
||||
{
|
||||
argsIgnorePattern: '^_',
|
||||
varsIgnorePattern: '^_',
|
||||
caughtErrorsIgnorePattern: '^_',
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
files: ['packages/vscode-ide-companion/esbuild.js'],
|
||||
languageOptions: {
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
/* eslint-env node */
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2026 Google LLC
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* Skill Initializer - Creates a new skill from template
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
/* eslint-env node */
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2026 Google LLC
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* Skill Packager - Creates a distributable .skill file of a skill folder
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
/* eslint-env node */
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2026 Google LLC
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* Quick validation logic for skills.
|
||||
|
||||
Reference in New Issue
Block a user