diff --git a/.circleci/config.yml b/.circleci/config.yml index c1c8704..f67df3d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -31,7 +31,7 @@ jobs: fingerprints: - "64:3e:d4:d8:4b:95:68:79:d3:3b:ab:b1:5c:fa:2d:3d" - - run: npm install + - run: npm ci - save_cache: paths: diff --git a/.eslintrc.cjs b/.eslintrc.cjs new file mode 100644 index 0000000..9f1ae70 --- /dev/null +++ b/.eslintrc.cjs @@ -0,0 +1,51 @@ +module.exports = { + root: true, + parser: '@typescript-eslint/parser', + env: { + // allow document, window, etc (these are expected as a frontend-library) + browser: true, + }, + plugins: ['jest', '@typescript-eslint'], + extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended', 'plugin:prettier/recommended'], + rules: { + // some of the dependencies do not support module imports... yet + '@typescript-eslint/no-var-requires': 'off', + // as a framework, we have to sometimes just expect anything + '@typescript-eslint/no-explicit-any': 'off', + // we shouldn't have console logs in our project + 'no-console': 'error', + }, + overrides: [ + // allow module.exports for config, testing, and docs + { + files: [ + '**/*.cjs', // any file with the cjs extension + './*.js', // top level config + './docs/runkit_example.js', // runkit example + './integration-tests/broken-app/**.js', // tests that still need runtime import/export + ], + env: { + commonjs: true, + }, + }, + + // configure test files to be in the jest environment + { + files: ['integration-tests/**/*', 'performance-tests/**/*'], + env: { + jest: true, + }, + rules: { + '@typescript-eslint/no-empty-function': 'off', + }, + }, + + // local scripts are expected to run on local machines with node + { + files: ['dev-scripts/**/*.js'], + env: { + node: true, + }, + }, + ], +}; diff --git a/.gitignore b/.gitignore index 2c2015c..999676e 100644 --- a/.gitignore +++ b/.gitignore @@ -4,20 +4,9 @@ dist # Coverage Report coverage -# docma docs -docs/website - -# Logs -logs -*.log -*.log.* - # Dependency directory node_modules -# SSL certificates -.ssl - # parcel test app files -dist .parcel-cache +.parcel-dist diff --git a/.prettierrc.cjs b/.prettierrc.cjs new file mode 100644 index 0000000..1e6fa04 --- /dev/null +++ b/.prettierrc.cjs @@ -0,0 +1,5 @@ +module.exports = { + useTabs: true, + singleQuote: true, + printWidth: 120, +}; diff --git a/README.md b/README.md index 15c6f2e..a77624f 100644 --- a/README.md +++ b/README.md @@ -12,11 +12,14 @@
Account: ${account ? account : 'No Account Info'}
Is Account Logged In: ${loggedIn}
Test Page Content
Root Loaded: ${rootStore.loaded}
- The page is ${initialWait.isDone ? 'done' : 'loading'}. -
The page is ${initialWait.isDone ? 'done' : 'loading'}.
Updated: ${tabState.tabWasUpdated}
Was Locked: ${previousLockState.locked}
Tab Dismissed
No Tab Information
${newTask.label.length} / 255
${newTask.type.length} / 255
+ New Task Label (${newTask.label.length} / 255) + + +
+ New Task Type (${newTask.type.length} / 255) + + +