browser-extensions
browser-extensions copied to clipboard
chore: run TSLint on all folders
Closes #64
To fix:
ERROR: /Users/felix/src/github.com/sourcegraph/browser-extensions/chrome/extension/background.tsx[114, 1]: Promises must be handled appropriately
ERROR: /Users/felix/src/github.com/sourcegraph/browser-extensions/chrome/extension/background.tsx[268, 5]: Promises must be handled appropriately
ERROR: /Users/felix/src/github.com/sourcegraph/browser-extensions/chrome/extension/background.tsx[276, 5]: Promises must be handled appropriately
ERROR: /Users/felix/src/github.com/sourcegraph/browser-extensions/chrome/extension/background.tsx[321, 5]: Promises must be handled appropriately
ERROR: /Users/felix/src/github.com/sourcegraph/browser-extensions/extension/safari/StorageArea.ts[65, 40]: Explicit type parameter needs to be provided to the constructor
ERROR: /Users/felix/src/github.com/sourcegraph/browser-extensions/extension/storage.ts[91, 40]: Avoid referencing unbound methods which may cause unintentional scoping of 'this'.
ERROR: /Users/felix/src/github.com/sourcegraph/browser-extensions/extension/storage.ts[91, 50]: Avoid referencing unbound methods which may cause unintentional scoping of 'this'.
@ijsnow can you confirm TSLint is now run on all folders?
@felixfbecker https://sourcegraph.com/github.com/sourcegraph/browser-extensions@master/-/blob/package.json?diff=ffb64d67db79b099c7879353fdaebfbf2b06194a&utm_source=firefox-extension#L14
So that is a no
It's ran on all code that is ran by the browser extension
Tests in cypress/, the webpack configs in webpack/ and the scripts in scripts/ are all TypeScript and should be linted too
Here's how to move this PR to https://github.com/sourcegraph/sourcegraph/tree/master/packages/browser-extensions
cd browser-extensions
git format-patch master --stdout > /tmp/patch
cd ../sourcegraph
cat /tmp/patch | git am -3 --directory=packages/browser-extensions/
# and fixup merge conflicts