Skip to content

Commit da3a629

Browse files
committed
more eslint config work
1 parent 8638e56 commit da3a629

File tree

326 files changed

+91539
-129464
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

326 files changed

+91539
-129464
lines changed

Node-1st-gen/assistant-say-number/functions/eslint.config.js

Lines changed: 0 additions & 26 deletions
This file was deleted.
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/**
2+
* Copyright 2025 Google LLC
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
import { defineConfig } from "eslint/config";
18+
import js from "@eslint/js";
19+
import globals from "globals";
20+
import tseslint from "typescript-eslint";
21+
22+
export default defineConfig([
23+
{ files: ["**/*.{js,mjs,cjs,ts}"], plugins: { js }, extends: ["js/recommended"] },
24+
{ files: ["**/*.js"], languageOptions: { sourceType: "commonjs" } },
25+
{ files: ["**/*.{js,mjs,cjs,ts}"], languageOptions: { globals: globals.node } },
26+
{ files: ["**/*.ts"], ...tseslint.configs.base },
27+
// samples often have unused vars just to show some value is available
28+
{ files: ["**/*.{js,mjs,cjs,ts}"], rules: { "no-unused-vars": "off" } },
29+
]);

Node-1st-gen/assistant-say-number/functions/package.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,16 @@
77
"firebase-functions": "^6.3.0"
88
},
99
"devDependencies": {
10-
"eslint": "^8.57.1",
10+
"@eslint/js": "^9.24.0",
11+
"eslint": "^9.24.0",
1112
"eslint-config-prettier": "^10.1.2",
1213
"eslint-plugin-promise": "^7.2.1",
13-
"prettier": "^3.5.3"
14+
"globals": "^16.0.0",
15+
"prettier": "^3.5.3",
16+
"typescript-eslint": "^8.30.1"
1417
},
1518
"scripts": {
16-
"lint": "prettier . --check && eslint .",
19+
"lint": "eslint .",
1720
"lint:fix": "prettier . --write",
1821
"serve": "firebase emulators:start --only functions",
1922
"shell": "firebase functions:shell",

0 commit comments

Comments
 (0)