diff --git a/.eslintrc.js b/.eslintrc.js new file mode 100644 index 0000000..b15f9b0 --- /dev/null +++ b/.eslintrc.js @@ -0,0 +1,38 @@ +module.exports = { + parser: '@typescript-eslint/parser', + extends: [ + 'eslint:recommended', + 'plugin:@typescript-eslint/recommended', + 'plugin:prettier/recommended', + ], + plugins: ['prettier'], + env: { + node: true, + browser: true, + worker: true, + es2022: true, + }, + rules: { + 'prettier/prettier': 'error', + 'no-unused-vars': 'off', + '@typescript-eslint/no-unused-vars': [ + 'error', + { ignoreRestSiblings: true, argsIgnorePattern: '^_' }, + ], + }, + overrides: [ + { + files: ['*d.ts'], + rules: { + 'no-undef': 'off', + }, + }, + { + files: ['*js'], + globals: { + webcm: 'writable', + }, + }, + ], +} + diff --git a/src/track.ts b/src/track.ts index 3c86f92..2956e6b 100644 --- a/src/track.ts +++ b/src/track.ts @@ -3,7 +3,7 @@ import { ComponentSettings, MCEvent } from '@managed-components/types' const USER_DATA: Record = { email: { hashed: true }, phone_number: { hashed: true }, - external_id: { hashed: true } + external_id: { hashed: true }, } const getTtclid = (event: MCEvent) => {