Skip to content
Merged
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: 0 additions & 8 deletions .eslintignore

This file was deleted.

20 changes: 0 additions & 20 deletions .eslintrc.cjs

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/linter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '16'
node-version: '24'

- name: Install dependencies
run: npm install
Expand Down
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v24.11.1
56 changes: 56 additions & 0 deletions eslint.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
const {
defineConfig,
globalIgnores,
} = require("eslint/config");

const tsParser = require("@typescript-eslint/parser");
const typescriptEslint = require("@typescript-eslint/eslint-plugin");
const js = require("@eslint/js");

const {
FlatCompat,
} = require("@eslint/eslintrc");

const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all
});

module.exports = defineConfig([{
extends: compat.extends(
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:prettier/recommended",
),

languageOptions: {
parser: tsParser,
},

plugins: {
"@typescript-eslint": typescriptEslint,
},

rules: {
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/no-non-null-assertion": "off",
},
}, {
files: ["examples/**/*.js", "examples/**/*.ts"],

"rules": {
"no-undef": "off",
"@typescript-eslint/no-unused-vars": "off",
},
}, globalIgnores([
"**/dist",
"**/debug",
"**/lib",
"**/build",
"**/node_modules",
"**/3rdparty",
"**/.eslintrc.cjs",
"**/.next",
])]);
1 change: 0 additions & 1 deletion examples/chrome-extension/src/popup.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable @typescript-eslint/no-non-null-assertion */
"use strict";

// This code is partially adapted from the openai-chatgpt-chrome-extension repo:
Expand Down
2 changes: 0 additions & 2 deletions examples/simple-chat-ts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ Due to the differences in command-line tools between Unix/Linux and Windows syst
### Steps for Windows Users

1. **Create a Node.js Script File**:

- In the `examples\simple-chat` directory, create a file named `copy-config.js`.
- Add the following code to handle file copying:
```javascript
Expand All @@ -29,7 +28,6 @@ Due to the differences in command-line tools between Unix/Linux and Windows syst
```

2. **Modify `package.json`**:

- In the `scripts` section of your `package.json`, replace Unix-style `cp` commands with our new Node.js script. For example:
```json
"scripts": {
Expand Down
2 changes: 0 additions & 2 deletions examples/simple-chat-upload/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ Due to the differences in command-line tools between Unix/Linux and Windows syst
### Steps for Windows Users

1. **Create a Node.js Script File**:

- In the `examples\simple-chat` directory, create a file named `copy-config.js`.
- Add the following code to handle file copying:
```javascript
Expand All @@ -29,7 +28,6 @@ Due to the differences in command-line tools between Unix/Linux and Windows syst
```

2. **Modify `package.json`**:

- In the `scripts` section of your `package.json`, replace Unix-style `cp` commands with our new Node.js script. For example:
```json
"scripts": {
Expand Down
2 changes: 2 additions & 0 deletions jest.config.cjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
module.exports = {
preset: "ts-jest",
testEnvironment: "node",
roots: ["<rootDir>/tests", "<rootDir>/src"],
modulePathIgnorePatterns: ["<rootDir>/examples/"],
};
Loading