Skip to content

Commit

Permalink
install eslint in functions
Browse files Browse the repository at this point in the history
  • Loading branch information
MurakawaTakuya committed Nov 6, 2024
1 parent a09b189 commit 9c617dd
Show file tree
Hide file tree
Showing 7 changed files with 53 additions and 15 deletions.
9 changes: 6 additions & 3 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"[scss]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.codeActionsOnSave": {
"editor.codeActionsOnSave": {
"source.fixAll.stylelint": "explicit"
}
},
Expand All @@ -24,6 +24,9 @@
"files.insertFinalNewline": true,
"editor.codeActionsOnSave": {
"source.addMissingImports": "always",
"source.fixAll.eslint": "explicit"
}
"source.fixAll.eslint": "explicit",
"source.organizeImports": "always"
},
"typescript.updateImportsOnFileMove.enabled": "always",
"javascript.updateImportsOnFileMove.enabled": "always"
}
11 changes: 5 additions & 6 deletions functions/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ module.exports = {
"plugin:import/typescript",
"google",
"plugin:@typescript-eslint/recommended",
"prettier",
],
parser: "@typescript-eslint/parser",
parserOptions: {
Expand All @@ -21,13 +22,11 @@ module.exports = {
"/lib/**/*", // Ignore built files.
"/generated/**/*", // Ignore generated files.
],
plugins: [
"@typescript-eslint",
"import",
],
plugins: ["@typescript-eslint", "import"],
rules: {
"quotes": ["error", "double"],
quotes: ["error", "double"],
"import/no-unresolved": 0,
"indent": ["error", 2],
indent: ["error", 2],
},
plugins: ["eslint-plugin-unused-imports"],
};
19 changes: 18 additions & 1 deletion functions/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion functions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^5.12.0",
"@typescript-eslint/parser": "^5.12.0",
"eslint": "^8.9.0",
"eslint": "^8.57.1",
"eslint-config-google": "^0.14.0",
"eslint-plugin-import": "^2.25.4",
"eslint-plugin-unused-imports": "^4.1.4",
"firebase-functions-test": "^3.1.0",
"typescript": "^4.9.0"
},
Expand Down
4 changes: 2 additions & 2 deletions functions/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
* See a full list of supported triggers at https://firebase.google.com/docs/functions
*/

import { onRequest } from "firebase-functions/v2/https";
import * as logger from "firebase-functions/logger";
// import { onRequest } from "firebase-functions/v2/https";
// import * as logger from "firebase-functions/logger";

// Start writing functions
// https://firebase.google.com/docs/functions/typescript
Expand Down
19 changes: 18 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@
"@types/node": "^20",
"@types/react": "^18",
"@types/react-dom": "^18",
"eslint": "^8",
"eslint": "^8.57.1",
"eslint-config-next": "15.0.2",
"eslint-plugin-unused-imports": "^4.1.4",
"stylelint": "^16.10.0",
"stylelint-config-recess-order": "^5.1.1",
"stylelint-config-standard": "^36.0.1",
Expand Down

0 comments on commit 9c617dd

Please sign in to comment.