Skip to content

Commit

Permalink
Added linter config and updated packages. (#70)
Browse files Browse the repository at this point in the history
  • Loading branch information
barticus authored Aug 7, 2023
1 parent eec57af commit 9b920c0
Show file tree
Hide file tree
Showing 16 changed files with 2,089 additions and 466 deletions.
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,3 @@ build/Release

# Dependency directories
functions/node_modules/

.vscode
8 changes: 8 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"editor.formatOnSave": true,
"editor.defaultFormatter": "dbaeumer.vscode-eslint",
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"eslint.workingDirectories": ["./functions"]
}
27 changes: 27 additions & 0 deletions functions/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
module.exports = {
env: {
node: true,
es2022: true,
},
parserOptions: {
ecmaVersion: 2023,
},
extends: [
"eslint:recommended",
"airbnb-base",
],
rules: {
"no-restricted-globals": ["error", "name", "length"],
"prefer-arrow-callback": "error",
quotes: ["error", "double", { allowTemplateLiterals: true }],
},
overrides: [
{
files: ["tests/*.js", "tests/**/*.js"],
env: {
jest: true,
},
},
],
globals: {},
};
2 changes: 1 addition & 1 deletion functions/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ module.exports = {
mailchimpMergeField: process.env.MAILCHIMP_MERGE_FIELDS_CONFIG,
mailchimpMemberEventsWatchPath: process.env.MAILCHIMP_MEMBER_EVENTS_WATCH_PATH,
mailchimpMemberEvents: process.env.MAILCHIMP_MEMBER_EVENTS_CONFIG,
mailchimpRetryAttempts: process.env.MAILCHIMP_RETRY_ATTEMPTS
mailchimpRetryAttempts: process.env.MAILCHIMP_RETRY_ATTEMPTS,
};
Loading

0 comments on commit 9b920c0

Please sign in to comment.